Code Clone Restructuring of C Programs Via K-Nearest Neighbor Algorithm

Author
FengJiangHui
Advisor
SuXiaoHong
School
Harbin Institute of Technology
Major
Computer Science and Technology
Classification
TP311.52 Software Development
Degree
Master's thesis
Year
2011
Downloads
20
Citations
0

Request the full text

Abstract

With the rapid development of computer software , the software programmers began multiplexing to reduce the workload . But the result of this approach is flooded with a large number of cloned code in software systems . In most cases , the cloned code is harmful to the system , it increases the length of the software , the software architecture becomes more bloated , maintenance is very difficult , reduce the efficiency of the system is running , there are a lot of errors and lead software . Reconstruction technology appears , can be effective on the clone code processing, and to reduce its impact on system hazards . The cloned code refactoring but there is not a lot . The current status quo , this paper proposes a reconstruction method based on the K- nearest neighbor cloning code . Firstly C the clone code structure syntax tree , on the basis of the syntax tree program dependence graph , then static analysis to obtain program control flow and data flow information . Then, using the code fragment based control dependence subgraph of K- nearest neighbor clustering algorithm to analyze the code , select the executable statements as entities , data attributes and control attributes of entities classified isolated facilitate the extraction of functional independence . Then, call type and number of extraction algorithm based on the abstract syntax tree to obtain the variable type , to determine the process to extract the parameters to solve the problem of the return value of the new process , code fragments extracted as a separate process , and using the procedure call replacement of its location in the source code . The article uses the clone code refactoring methods model based on K- nearest neighbor test code and open source code in the existing literature . The experimental results indicate that the reconstruction model presented in this paper can be efficiently extract the low cohesion , function Cloning intersecting code having a high accuracy of clustering .

Related dissertations

  1. Study on the Spatial Organization of Tourism in Shanxi Province
    BaoKeFei ·Shanxi Normal University ·2013 ·Master's thesis
  2. Design and Development of a High-speed Heavy-load Palletizing Robot
    CaoJiaZuo ·Tianjin University ·2012 ·Master's thesis
  3. The Design and Analysis of Octahedral Module Deployable Mast
    LiCheng ·Harbin Engineering University ·2013 ·Master's thesis
  4. Research on Mechanical Properties Of the Elastic Body of a Six-Axis Force Sensor Based on Strain Gauge
    WangZhiHong ·Anhui University of Engineering ·2013 ·Master's thesis
  5. Compiler-directed Static Analysis and Code Transformation
  6. Static Security Detection of C Applications
  7. The Research of Exploiting Software Security Vulnerabilities Based on Android Platforms
    TangYuJing ·Hebei University of Engineering ·2013 ·Master's thesis
  8. Research of Fault-tolerant Technology and Its Application in Integrated Navigation System
    ZhangJunYong ·Harbin Engineering University ·2013 ·Master's thesis
  9. The Finite Element Analysis and Optimization of the Key Components of FP2500A Type Stack-Turning Machine for Organic Fertilizer
    WangZeMin ·Nanjing Agricultural College ·2013 ·Master's thesis
  10. Design and Analysis of PF1In-cryostat-feeder Support for ITER Poloidal Field
    ZhangJunLong ·Hefei University of Technology ·2013 ·Master's thesis
  11. Research on Steel Structure Optimization and Dynamic Characteristics of HZS240Concrete Mixing Station
  12. Mechanical Performance Analysis of Semi-rigid Steel Frames Filled Profild Steel Plate Wall
    LiuYing ·Harbin Institute of Technology ·2012 ·Master's thesis
  13. Large Steel Structure Natural Draft Cooling Tower of Force Analysis
    WangJin ·East China Jiaotong University ·2013 ·Master's thesis
  14. The Wind Resistance Study of the Steel Frame Structural Main Factory Building of Large Thermal Power Plant
    WanShunLu ·Guangxi University ·2012 ·Master's thesis
  15. The Analysis of the Structure Stability of Zhongding International Mansion
    WangLi ·Shenyang University ·2012 ·Master's thesis
  16. Research on the Mechanical Behaviors of Concrete-filled Double Skin Steel Tubular Column
    PengCaiJie ·Hunan University ·2013 ·Master's thesis
  17. The Analysis and Comparison for Different Forms of T Fence in the Wiggins Gas Holder
    ZhangZuo ·Tianjin University ·2012 ·Master's thesis
  18. The Research on the Use of Composite Structure in Three-dimensional Garage
    XuZhaoFeng ·Hunan University ·2013 ·Master's thesis
  19. Static Analysis of the Ground-supported Flat-bottomed Cylindrical Steel-concrete Composite Silo
    GaoCongChao ·Hebei University of Engineering ·2013 ·Master's thesis
  20. Mechanical Behavior Analysis of Large Silos Storage for High Temperature Stored Materials
    SongJing ·Zhejiang University ·2014 ·Master's thesis