Abstract :
|
In this work different kind of cloning will be identified including the copy code, renamed code, modified code etc. A three layered approach is suggested in this work to perform the duplicate code detection for a c program. In first layer, the code optimization is suggested in this work. The optimization of code is here in terms of removal of blank lines, unreachable statements, statement format etc. As the optimization will be done, an optimized standard code is present for the clone matching. In the second layer, the code statements will be represented as the nodes and the flow will be represented as the edges, based on this the structural components will be derived. Now a match will be performed respective to the number of components i.e. nodes and the edges. If the component count is adaptive to the code cloning, finally all the possible path between the start and end state will be identified along with path length. If all the possible path between two codes is identical, it will taken as the codes are clone codes.
|