Systems Engineering and Electronics

Previous Articles    

Clone flaw detection method based on clone code detection

CHANG Chao1, LIU Kesheng2, ZHAO Jun2, HUANG Ning1   

  1. (1. Doctoral Student Team, Electronics Engineering Institute of PLA, Hefei 230037, China;
    2. Department of Network, Electronics Engineering Institute of PLA, Hefei 230037, China)
  • Online:2017-08-28 Published:2010-01-03

Abstract:

In software development, clone flaw phenomena caused by code clone occur at intervals. A method based on code clone detection was proposed to detect the clone flaws. The code area related to the flaw was located by code comparison or patch restoration. The flaw code and testing code were divided into functions as the analysis unit. By selecting and quantifying the metric feature, structure feature and text feature for every function, functions those may have clone flaws were identified using the progressive similar function filtration way. These suspected flaws were ensured using model checking and data-flow analysis. In the experiment with several typical open source projects, a number of clone flaws were detected. The results validate the effectiveness of the proposed method. Furthermore, a conclusion was drawn that when finding a flaw, averaging 2-5 clone points should be checked.

[an error occurred while processing this directive]