Title :
Semantic code clone detection using parse trees and grammar recovery
Author :
Tekchandani, Rajkumar ; Bhatia, Rajiv K. ; Singh, Monika
Author_Institution :
CSE Dept., Thapar Univ., Patiala, India
Abstract :
Code cloning is the common requirement for most of the software applications. Code clones are the similar code fragments that exist at different locations in a software system. This type of reuse approach of existing code is called code cloning and the pasted code fragment is called as clone of the original. Code duplication exists in one of the two categories: Syntactic or semantic. Existing techniques of semantic code clone detection deals with program dependence graphs. In this paper, we proposed an algorithm that finds the semantic code clones on the basis of parse trees and formal grammars. This paper finds the similar code fragments those are structurally divergent but semantically equivalent on the basis of parse trees and grammar recovery. It also provides the design and implementation of proposed approach followed by results.
Keywords :
grammars; software engineering; trees (mathematics); code duplication; formal grammars; grammar recovery; parse trees; program dependence graphs; semantic code clone detection; similar code fragments; software development; Code Clones; Grammar Recovery; Parse Trees; Semantic Code Clones;
Conference_Titel :
Confluence 2013: The Next Generation Information Technology Summit (4th International Conference)
Conference_Location :
Noida
Electronic_ISBN :
978-1-84919-846-2
DOI :
10.1049/cp.2013.2291