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
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
- Study on the Spatial Organization of Tourism in Shanxi Province
- Design and Development of a High-speed Heavy-load Palletizing Robot
- The Design and Analysis of Octahedral Module Deployable Mast
- Research on Mechanical Properties Of the Elastic Body of a Six-Axis Force Sensor Based on Strain Gauge
- Compiler-directed Static Analysis and Code Transformation
- Static Security Detection of C Applications
- The Research of Exploiting Software Security Vulnerabilities Based on Android Platforms
- Research of Fault-tolerant Technology and Its Application in Integrated Navigation System
- The Finite Element Analysis and Optimization of the Key Components of FP2500A Type Stack-Turning Machine for Organic Fertilizer
- Design and Analysis of PF1In-cryostat-feeder Support for ITER Poloidal Field
- Research on Steel Structure Optimization and Dynamic Characteristics of HZS240Concrete Mixing Station
- Mechanical Performance Analysis of Semi-rigid Steel Frames Filled Profild Steel Plate Wall
- Large Steel Structure Natural Draft Cooling Tower of Force Analysis
- The Wind Resistance Study of the Steel Frame Structural Main Factory Building of Large Thermal Power Plant
- The Analysis of the Structure Stability of Zhongding International Mansion
- Research on the Mechanical Behaviors of Concrete-filled Double Skin Steel Tubular Column
- The Analysis and Comparison for Different Forms of T Fence in the Wiggins Gas Holder
- The Research on the Use of Composite Structure in Three-dimensional Garage
- Static Analysis of the Ground-supported Flat-bottomed Cylindrical Steel-concrete Composite Silo
- Mechanical Behavior Analysis of Large Silos Storage for High Temperature Stored Materials