Abstract

The activities of copy and paste fragments of code from a source code into the other source code, with or without modification, are known as the code cloning. The process is often done by software developers because it's easier than generate code manually. In the other hand, this behavior leads to the increasing of effort to maintenance the code. Research on detecting the presence of cloning has been done. Detection of cloned semantically is a detection method that still needs a deepening. One of the detection methods of semantic cloning is based on the behavior of the code. The code behavior detected by looking at input, output and the effects of the method. Methods with the same input, output and effect will show that the function of the method is the same. However, the detection method based on input, output and effect could not be used in a void method and method without parameters. There is no explanations about input, output and effect in that kind of methods. In this case, the solution is needed to find the input, output and the effects of the method. This research is a concern on how to find an input, output and effect in void and non-parameterized method. Detection of input, output and effects done using PDG (Program Dependence Graph). The result is used to reconstruct void and non-parameterizes method. Trial is performed on each method (without exception) using random input data to get the behavior methods. Trial is done using small size source code from jDraw. From the result of the trial process, can be concluded that semantic clone detection using the methods behavior approach is sound very promising. This method can also detect type 1, type 2 and type 3 clone beside the semantic clone itself with an accuracy about 89%.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call