Query-based filtering and graphical view generation for clone analysis

Code clones are similar program structures recurring in software systems. Clone detectors produce much information and a challenge is to identify useful clones depending on the goals of clone analysis. To do so, further abstraction, filtering and visualization of cloning information, with the involvement of a human expert, is required. In this paper, we describe a technique for filtering and visualization of cloning information generated by Clone Miner, a clone detection tool presented in our earlier work. Unique benefit and contribution of our approach is that a human expert can define a wide range of filters to extract abstract views of the cloning data using a clone-query system to suit specific needs of clone analysis. We then produce standardized graphical presentations of those views for various types of clone queries. We implemented the technique into an Eclipse plug-in called Clone Visualizer. Clone Visualizer works closely with Clone Miner which not only finds similar code fragments (simple clones) but also finds higher-level abstractions of the cloning information. Our method is the first attempt to address filtering and visualization of those higher level cloning abstractions. We illustrate application of our technique with examples from a clone analysis project with Clone Miner and Clone Visualizer.

[1]  Cristina V. Lopes,et al.  Aspect-oriented programming , 1999, ECOOP Workshops.

[2]  Stan Jarzabek,et al.  Eliminating redundancies with a "composition with adaptation" meta-programming technique , 2003, ESEC/FSE-11.

[3]  Shinji Kusumoto,et al.  Gemini: maintenance support environment based on code clone analysis , 2002, Proceedings Eighth IEEE Symposium on Software Metrics.

[4]  J. Howard Johnson,et al.  Substring matching for clone detection and change tracking , 1994, Proceedings 1994 International Conference on Software Maintenance.

[5]  Stéphane Ducasse,et al.  A language independent approach for detecting duplicated code , 1999, Proceedings IEEE International Conference on Software Maintenance - 1999 (ICSM'99). 'Software Maintenance for Business Change' (Cat. No.99CB36360).

[6]  Michael W. Godfrey,et al.  Improved tool support for the investigation of duplication in software , 2005, 21st IEEE International Conference on Software Maintenance (ICSM'05).

[7]  Weishan Zhang,et al.  XVCL: XML-based variant configuration language , 2003, 25th International Conference on Software Engineering, 2003. Proceedings..

[8]  Stan Jarzabek,et al.  F-metric: a WWW-based framework for intelligent formulation and analysis of metric queries , 1998, J. Syst. Softw..

[9]  Stéphane Ducasse,et al.  Insights into system-wide code duplication , 2004, 11th Working Conference on Reverse Engineering.

[10]  Giuseppe Scanniello,et al.  Identifying Clones in Dynamic Web Sites Using Similarity Thresholds , 2004, ICEIS.

[11]  Yuanyuan Zhou,et al.  CP-Miner: finding copy-paste and related bugs in large-scale software code , 2006, IEEE Transactions on Software Engineering.

[12]  Gregor Kiczales,et al.  Aspect-oriented programming , 1996, CSUR.

[13]  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.

[14]  Stan Jarzabek,et al.  Detecting higher-level similarity patterns in programs , 2005, ESEC/FSE-13.

[15]  Shinji Kusumoto,et al.  CCFinder: A Multilinguistic Token-Based Code Clone Detection System for Large Scale Source Code , 2002, 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]  J. Howard Johnson,et al.  Navigating the textual redundancy web in legacy source , 1996, CASCON.

[18]  Jeffrey G. Gray,et al.  Visualization of clone detection results , 2006, ETX.

[19]  J. Howard Johnson,et al.  Visualizing textual redundancy in legacy source , 1994, CASCON.

[20]  이준상,et al.  미래 소프트웨어 개발기술 : Aspect - Oriented Programming과 Subject - Oriented Programming , 2003 .

[21]  Stan Jarzabek,et al.  Design of Flexible Static Program Analyzers with PQL , 1998, IEEE Trans. Software Eng..

[22]  Jens Krinke,et al.  Identifying similar code with program dependence graphs , 2001, Proceedings Eighth Working Conference on Reverse Engineering.