主权项 |
1. A method, implemented by one or more computing devices, for estimating an impact of changing one or more source files in a software based on a clone dependency graph, the method comprising:
extracting the one or more source files of a software from a source code repository; detecting one or more code clones present in the one or more extracted source files of the software based on a predefined threshold; creating the clone dependency graph based on the one or more identified code clones, the clone dependency graph including one or more nodes and one or more edges, the one or more edges having a weight denoting a clone mass, the clone mass having a value equal to a ratio of a number of common lines between the one or more extracted source files and a total length of the one or more source files; measuring one or more graph metrics of the clone dependency graph, wherein the one or more graph metrics include degree centrality, closeness centrality, betweenness centrality, bonacich's centrality, graph clustering index and average path length; and estimating the impact of changing the segment of the one or more source files based on the clone dependency graph and the one or more graph metrics. |