Evaluation experiments on the detection of programming patterns using software metrics

Cloning of code fragments in large systems is a common practice that may result in redundant code, higher maintenance costs, and less modular systems. The paper examines and evaluates the use of five data and control flow related metrics for identifying similar code fragments. The metrics are used as signatures for a code fragment. Matching on such signatures results in fast matching that can be used to locate instances of code cloning even in the presence of modifications such as changes in variable names, and insertion of statements. The paper takes an information retrieval approach and reports on experiments conducted for retrieving code fragments in three different software systems.

[1]  Hausi A. Müller,et al.  Structural Redocumentation: A Case Study , 1995, IEEE Softw..

[2]  Jim Q. Ning,et al.  Automated support for Legacy code understanding : Reverse engineering , 1994 .

[3]  E. Myers,et al.  Approximate matching of regular expressions , 1989 .

[4]  Wojtek Kozaczynski,et al.  Automated support for legacy code understanding , 1994, CACM.

[5]  Gail E. Kaiser,et al.  An Information Retrieval Approach For Automatically Constructing Software Libraries , 1991, IEEE Trans. Software Eng..

[6]  Maurice H. Halstead,et al.  Elements of software science , 1977 .

[7]  Ettore Merlo,et al.  Experiment on the automatic detection of function clones in a software system using metrics , 1996, 1996 Proceedings of International Conference on Software Maintenance.

[8]  Hugo T. Jankowitz Detecting Plagiarism in Student Pascal Programs , 1988, Comput. J..

[9]  P. H. Newcomb,et al.  Requirements for Advanced Year 2000 Maintenance Tools , 1997, Computer.

[10]  J. Howard Johnson,et al.  Navigating the textual redundancy web in legacy source , 1996, CASCON.

[11]  Aniello Cimitile,et al.  Software salvaging based on conditions , 1994, Proceedings 1994 International Conference on Software Maintenance.

[12]  Hausi A. Müller,et al.  Understanding software systems using reverse engineering technology perspectives from the Rigi project , 1993, CASCON.

[13]  Linda Mary Wills,et al.  Automated program recognition by graph parsing , 1992 .

[14]  Linda M. Wills,et al.  Reverse Engineering , 1996, Springer US.

[15]  Atul Prakash,et al.  A Framework for Source Code Search Using Program Patterns , 1994, IEEE Trans. Software Eng..

[16]  Brenda S. Baker,et al.  On finding duplication and near-duplication in large software systems , 1995, Proceedings of 2nd Working Conference on Reverse Engineering.

[17]  Paul R. Hanau,et al.  Prototyping and simulation tools for user/computer dialogue design , 1980, SIGGRAPH '80.

[18]  Atul Prakash,et al.  Investigating Reverse Engineering Technologies for the CAS Program Understanding Project , 1994, IBM Syst. J..