Code clone analysis methods for efficient software maintenance

芳樹 肥後 · Institutional Repositories DataBase (IRDB) · 2006

Maintaining software systems becomes more difficult as the size and complexity of them increase.One factor that makes software maintenance more difficult is the presence of code clones.A code clone is a code fragment that has identical or similar code fragments to it in the source code.Code clones are introduced by various reasons such as reusing code by 'copy and paste'.If we modify a code clone with many similar code fragments, it is necessary to consider whether or not we have to modify each of them.Especially, for large-scale software, such a process is very complicated and expensive.We tend to overlook some of code fragments which should be modified.In this study, we propose maintenance support methods for the presence of code clones.This study covers comprehensive maintenance situations that we are suffered from code clones.To sophisticate and enrich our methods as practical ones, we are promoting academic-industrial collaboration.We deliver our tools to industrial people, and they apply the tools to their software development and maintenance contexts, and they send feedback to us.We improve our methods and tools based on the feedback, and deliver the improved tools to them repeatedly.This iterative improvement process enhanced our methods and tools as useful ones in practical software development and maintenance.We propose methods of visualizing and characterizing code clones to support understanding them in a software system.The methods are very practical since they have a filtering functionality for eliminating uninteresting code clones.Automatic code clone detection by tools tends to detect many uninteresting code clones.Uninteresting code clones are the ones that we are not interested in from a viewpoint of software maintenance.For example, consecutive method invocations and case entries of switch-statements are typically uninteresting.The existence reason of these code clones is not copy and paste but the syntax of the programming language.The visualization method provides a bird's eye view of code clones distribution all over the system.Using this view, we can understand the distribution state of code clones at a glance.The characterization method calculates some metrics of the software entities (code clones and source files).This quantitative characterization enables I am most indebted to my supervisor Professor Katsuro Inoue for his continuous support and supervision over the years.Without his help, experience and advice, this thesis would never have reached completion.

Read the paper · More papers on PaperTik