There are lots of code clones appearing in software,which are similar code fragments with each other. In the past decades,researchers have proposed some state-of-the-art methods to detect clones. The code clones have ...There are lots of code clones appearing in software,which are similar code fragments with each other. In the past decades,researchers have proposed some state-of-the-art methods to detect clones. The code clones have showing some relationship with the evolution of software. In order to explore relationships between clones and their evolution,we propose a framework to cluster clones with a Fuzzy C-means clustering method.Firstly,we detect all the clones using Ni Cad,and build the clone genealogies for multiple versions software.Secondly,we extract some metrics to describe the clones and their evolution. Finally,we cluster all clone's vectors,which are generated with the different metrics for different proposes. Experimental results on six open source software packages have shown the relationships among the clone life,the number of change times,the clone pattern and et al. can help developers to understand clones.展开更多
基金Sponsored by the National Natural Science Foundation of China(Grant No.61173021)
文摘There are lots of code clones appearing in software,which are similar code fragments with each other. In the past decades,researchers have proposed some state-of-the-art methods to detect clones. The code clones have showing some relationship with the evolution of software. In order to explore relationships between clones and their evolution,we propose a framework to cluster clones with a Fuzzy C-means clustering method.Firstly,we detect all the clones using Ni Cad,and build the clone genealogies for multiple versions software.Secondly,we extract some metrics to describe the clones and their evolution. Finally,we cluster all clone's vectors,which are generated with the different metrics for different proposes. Experimental results on six open source software packages have shown the relationships among the clone life,the number of change times,the clone pattern and et al. can help developers to understand clones.