Abstract

To assist developers refactored code and to enable improvements to software quality when numbers of clones are found in software programs, we require an approach to advise developers on what a clone needs to refactor and what type of refactoring is needed. This paper suggests a unique learning method that automatically extracts features from the detected code clones and trains models to advise developers on what type needs to be refactored. Our approach differs from others, which specifies types of refactored clones as classes and creates a model for detecting the types of refactored clones and the clones which are anonymous. We introduce a new method by which to convert refactoring clone type outliers into Unknown clone set to improve classification results. We present an extensive comparative study and an evaluation of the efficacy of our suggested idea by using state-of-the-art classification models.

Highlights

  • Code clones are pairs of code fragments which have a high degree of similarity or which are identical

  • This paper discusses the common and recent classification algorithms used for refactoring code clone classification and an outlier detection model combined for classifying the test examples as belonging to known or unknown class sizes

  • COMPARISON DISCUSSION There are many methods which automatically remove clones via application of refactoring [13], [15], [16]. Such methods primarily perform an extraction of a method by parameterizing any clone differences and factorizing the common part

Read more

Summary

INTRODUCTION

Code clones are pairs of code fragments which have a high degree of similarity or which are identical. Longer-living clones which have been altered with another element in the same class are difficult to remove or refactor It is a bug which can be corrected as the source code can be. Our approach provides different types of refactoring recommendation to a developer for preventing to remove the positive side of code clones and builds a training model after removing outliers to improve the results. Our study can improve clone maintenance by removing duplication code by identifying refactoring clones. A presentation of a new machine learning framework that automatically extracts features from the detected code clones and trains models to advise developers on the types of refactored clone code and those which are not refactored. We have organized the paper : Section II introduces the definitions of the cloned and refactored clones.

DEFINITIONS OF CODE CLONES AND REFACTORINGS
PROPOSED APPROACH
COMPARISON DISCUSSION
Findings
VIII. CONCLUSION
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