Font Size: a A A

Loop Body Clone Detection Based On Program Dependence Graph

Posted on:2020-09-26Degree:MasterType:Thesis
Country:ChinaCandidate:Z LiFull Text:PDF
GTID:2518306515984839Subject:Computer technology
Abstract/Summary:PDF Full Text Request
In recent years,with the rapid development of computer technology and software development,code cloning detection technology has become an increasingly important research topic in the computer field.Up to now,the text-level code cloning detection technology has been developed relatively well.The code cloning method based on text,token,metric,and virtual AST has matured.The academic community has turned its attention to the cloning of semantic level.Because the code cloning of semantic level does not have much similarity at the text level,the cloning of the semantic level is difficult,including de-textualization,refining code core functions,functional similarity detection,and so on.The program dependence graph can solve the above difficulties well,but there are problems such as the big time complexity of creating program dependence graph and difficulty of the graph comparison.This paper starts with the typical semantic level code clone of loop body cloning,and conducts in-depth research on code cloning using code dependencies displayed by program dependence graphs.The main work is:(1)Optimize the program dependence graph,leaving only the information related to the loop body,and delete the meaningless nodes in the remaining nodes,reducing the size of the program dependency graph.Multi-level processing of nested loops or conditional statements,simplifying nested loops.(2)The loop body is regarded as the internal and external parts for code cloning judgment,the external iteration initialization and iteration conditions are judged internally,and the loop body logic is judged internally by data dependency and control dependency.If both parties judge the same,then loop body code clone pair.(3)Construct a data set for loop body cloning detection and experiment with other tools.
Keywords/Search Tags:Code clone, Program dependence graph, Loop body, Control dependency, Data dependenc
PDF Full Text Request
Related items