Software Code Clone Detection Using AST
Journal Title: International Journal of P2P Network Trends and Technology(IJPTT) - Year 2014, Vol 9, Issue 1
Abstract
The research which exists suggests that a considerable portion (10-15%) of the source code of large-scale computer programs is duplicate code. Detection and removal of such clones promises decreased software maintenance costs of possibly the same magnitude. Previous work was limited to detection of either near misses differing only in single lexemes, or near misses only between complete functions. This paper presents simple and practical methods for detecting exact and near miss clones over arbitrary program fragments in program source code by using abstract syntax trees. Previous work also did not suggest practical means for removing detected clones. Since our methods operate in terms of the program structure, clones could be removed by mechanical methods producing in-lined procedures or standard preprocessor macros.A tool using these techniques is applied to a C production software system of some 500K source lines, and the results confirm detected levels of duplication found by previous work. The tool produces macro bodies needed for clone removal, and macro invocations to replace the clones. The tool uses a variation of the well-known compiler method for detecting common sub-expressions. This method determines exact tree matches; a number of adjustments are needed to detect equivalent statement sequences, commutative operands, and nearly exact matches. We additionally suggest that clone detection could also be useful in producing more structured code, and in reverse engineering to discover domain concepts and their implementations.
Authors and Affiliations
G. Anil kumar , Dr. C. R. K. Reddy , Dr. A. Govardhan
An Overview of Privacy and Security in SNS
The use of Social Networking web sites and applications is rising day by day, many users are not properly informed of the risks associated with using these sites and application. User should understand these risks...
Mobile Ad-hoc Network Simulators, A Survey and Comparisons
Wireless communication technologies have been making growing interest in the past years, which has resulted in many proposals of their new applications. From indoor wireless local area networks to outdoor cellular mobile...
A MediNet for staying connected in a Mobile Healthcare System
A mobile healthcare system is a network includes a collection of number of components that includes patients and their health-care providers. In this system it is important that the patient to remain connected at a...
Homomorphic Encryption Scheme & Its Application for Mobile Agent Security
Mobile agents (MA) are autonomous software entities that are able to migrate across heterogeneous network execution environments. Protection of Mobile agents is one of the most difficult problems in the area of mobile ag...
A Study of Asynchronous Routing Protocols in Peer to Peer Networks
Mobile Ad Hoc Network (MANET) is a self organized and self configurable network where the mobile nodes move arbitrarily. It is a collection of multi-hop wireless mobile nodes that communicate with each other without cent...