Research on the Methods of Java Code Clone Detecting

Author
WangGuan
Advisor
WangBin
School
Beijing University of Technology
Major
Computer Software and Theory
Classification
TP312.1 Programming language ALGOL
Degree
Master's thesis
Year
2008
Downloads
142
Citations
2

Request the full text

Abstract

The success of large-scale systems are known as legacy systems . These systems have great commercial value . However , because they are bulky , and the absence of the document information , and it is difficult to maintain. The similarity of code is a big problem that plagued engineers . In a large-scale software projects , about 10-30% of the code is the code of the similarity . Due to the similarity of the existence of the code , resulting in a 70 % overhead in the software maintenance . The similarity of the code is the same as or similar to the same source code snippets . Similar code will result in the emergence of a variety of problems in the process of the software maintenance . Described in this paper on the similarity of code generated and the resulting security risks . Different tools on the similarity of the type of the code due to the use of different purposes , different division . The existing similarity code classification and detection methods , this paper similarity code is divided into five categories : simple similarity snippet rename similarity snippet , is not adjacent to a similar code snippet , disorder similar code fragments and entangled similarity snippet . This paper similar code detection method is divided into four categories : string - based analysis , metric - based analysis method , based on the abstract syntax tree analysis method and program dependence graph - based analysis methods . The similarity of a collection of similar code snippet may have a class or a class of similar problems . The different types of similarity code can use a different method to be judged. This paper elaborates a sex determination method based on the string of code similar to the theory and algorithms knowledge of the sex determination method and the method of determining similarity based on the code of the program dependence graph required in the implementation process , similar to the code based on software metrics . These mainly include : Karp- Rabin algorithm , based on the Karp-Rabin GST algorithm , software metrics theory , program dependence graph theory and related algorithms . In addition , for the Java language , this paper describes the string - based code similar to Determine the tools , similarity judgment based on the code of the software metrics tools and based on the code of the program dependence graph similarity determination tool design and elaborate tools realization method.

Table of contents

Abstract 3-4 ABSTRACT 4-7 Chapter 1 Introduction 7-11 1.1 Background 7-8 1.2 research 8 1.3 Research Methods 8-9 1.4 paper structure 9-11 Chapter 2 Research and theoretical foundation 11-45 2.1 similarities code outlining 11-14 2.2 Karp-Rabin algorithm 14-20 2.2.1 simple questions algorithmic description 14 2.2.2 General Issues algorithmic description 14-16 2.2.3 Algorithm nature 16-18 2.2.4 GST based on the Karp-Rabin algorithm 18-20 2.3 software metrics 20-26 2.3.1 software metrics theory 20-23 2.3.2 Similarity code detection software metrics theory 23-26 2.4 program dependence graph 26-44 2.4.1 program dependence graph description 26 2.4.2 Control Flow Graph Description 26-29 2.4.3 original control dependency graph 29-37 2.4.4 approximation control dependency graph 37-39 2.4.5 practical control dependency graph 39-41 2.4.6 data dependency graph description 41-43 2.4.7 code similarity detection program dependence graph theory 43-44 2.5 Chapter Summary 44-45 Chapter 3 designs 45-73 3.1 code based string similarity judgment tool design and implementation 45-56 3.1.1 overall design 45-47 3.1.2 serialized component design and implementation 47 3.1.3 fingerprinting component design and implementation 47-51 3.1.4 merge component design and implementation 51-53 3.1.5 experimental data analysis 53-56 3.2 code based on software metrics similarity judgment Tool Design and Implementation 56-67 3.2.1 overall design 56-58 3.2.2 serialized component design and implementation 58-61 3.2.3 measurement information extraction component design and implementation 61-65 3.2.4 Clustering component design and implementation 65-66 3.2.5 experimental data analysis 66-67 3.3 code based on the program dependence graph similarity judgment tools are designed 67-71 3.3.1 overall design 67 3.3.2 serialized component design 67-69 3.3.3 program dependence graph generation component design 69-70 3.3.4 Comparison component design 70-71 3.4 Summary 71-73 Conclusion 73-75 References 75-79 published during the master's degree thesis 79-81 Thanks 81

Related dissertations

  1. Design and implementation of a remote experiment system based on CS4000 platform
  2. An Algorithm for Matching Strings with Wildcards
    YunZhengJia ·Northeastern University ·2011 ·Master's thesis
  3. Research and Implementation on Efficient String Match for Ten Millions of Patterns
    CaoXiaoLong ·Harbin Institute of Technology ·2012 ·Master's thesis
  4. Research and Implementation of Software Metrics Decision-making System
  5. Design and Implement of Detention Center Information Management System
    TianYanHui ·Tianjin University ·2012 ·Master's thesis
  6. Design and Application of Ziyang Local Taxation Management Information Platform
  7. Design and Implementation of Enterprise Project Audit Management System
    LiEnFeng ·Jilin University ·2013 ·Master's thesis
  8. The Research and Implementation of Coal Mine Equipment Management System Based on the Spot Check Instrument
  9. Design and Implementation of Ng Firewall System Based on Flow Identification Technology
  10. Design and Implementation of Universal Network Mapping Strategy Management System
  11. Studies on String Mathching Algorithm Based on the Character’s Law
    LiGuoHua ·Zhengzhou University ·2012 ·Master's thesis
  12. The Research for Fast Exact String Matching Algorithms
    FanHongBo ·Harbin Engineering University ·2011 ·Doctoral dissertation
  13. The Design and Implementation of Instructional System of Java Program Design
    CaoFeiTeng ·Hunan Normal University ·2012 ·Master's thesis
  14. Study on Information Query System of Occupational Disease Prevention Based on JSP
    LiuQunZhi ·Nanchang University ·2012 ·Master's thesis
  15. Design and implementation of distributed test data management system based on wireless communication
    ShenWenWu ·Central South University ·2012 ·Master's thesis
  16. The Design and Implementation of Science and Technology Plan Declaration Management System for Weifang
    WangWeiCheng ·Shandong University ·2013 ·Master's thesis
  17. The Design and Implementation of Album Production Order Management System
    ZhaoLing ·Shandong University ·2013 ·Master's thesis
  18. The Design and Implementation of Construction Enterprise Information Reporting System for Coastal Zone
    ZhangTao ·Shandong University ·2012 ·Master's thesis
  19. The Design and Implementation of VIP Guard Mmanagement System for Weifang Public Security Bureau
    GuoGuangCai ·Shandong University ·2012 ·Master's thesis
  20. The Design and Implementation of Open Education Student Services Management System
    ZhouALiu ·Shandong University ·2012 ·Master's thesis