Proceedings of the EAI 3rd International Conference on Intelligent Systems and Machine Learning, ICISML 2024, January 5-6, 2024, Pune, India

Research Article

A Refactoring Advisor for Enhanced Cloned Software: Based on Several Machine Learning Techniques

Download27 downloads
  • @INPROCEEDINGS{10.4108/eai.5-1-2024.2342581,
        author={Badri Narayanan K and Sreeja  Nukarapu and Devatha Krishna Sai and Bharath Reddy Gudibandi},
        title={A Refactoring Advisor for Enhanced Cloned Software: Based on Several Machine Learning Techniques},
        proceedings={Proceedings of the EAI 3rd International Conference on Intelligent Systems and Machine Learning, ICISML 2024, January 5-6, 2024, Pune, India},
        publisher={EAI},
        proceedings_a={ICISML},
        year={2024},
        month={8},
        keywords={clone machine learning outlier detection categorization abstract syntax tree (ast)},
        doi={10.4108/eai.5-1-2024.2342581}
    }
    
  • Badri Narayanan K
    Sreeja Nukarapu
    Devatha Krishna Sai
    Bharath Reddy Gudibandi
    Year: 2024
    A Refactoring Advisor for Enhanced Cloned Software: Based on Several Machine Learning Techniques
    ICISML
    EAI
    DOI: 10.4108/eai.5-1-2024.2342581
Badri Narayanan K1,*, Sreeja Nukarapu2, Devatha Krishna Sai1, Bharath Reddy Gudibandi1
  • 1: VIT-AP University
  • 2: Vallurupalli Nageswara Rao Vignana Jyothi Institute of Engineering &Technology College
*Contact email: badrinarayanan78@gmail.com

Abstract

Software development is time-consuming and frequently monotonous. The risk of code getting copied and pasted increases as the number of developers working on a project rises. When a program contains numerous duplicates, the quality of the code can be raised by giving developers instructions on how to rework the clone and what needs to be refactored. Code that needs to be refactored can be found by looking at clones with an automatic refactoring advisor. The advisors may be incorporated into current IDEs. Here, we describe a cutting-edge learning technique that automatically extracts properties from discovered code clones and trains models to give developers advice on how to eliminate code duplication. We demonstrate that our method outperforms earlier methods in terms of both the accuracy of the provided refactoring recommendations and the ability to automatically extract the proper parameters for performing refactoring on code clones. In contrast to prior approaches’ Class-based approach, we created a model to distinguish between refactored and anonymous copies. We demonstrate how the learned model can be used to rate each cloned piece of code in a codebase and evaluate whether it needs to be refactored. We describe a novel method for turning anomalous refactoring clone types into unknown clone set participants, 1 which is a more reliable solution than prior work that employed thresholds of similarity to identify refactoring clones and offers a thorough analysis.