Download PDFOpen PDF in browserTowards Automated Refactoring of Code Clones in Object-Oriented Programming LanguagesEasyChair Preprint 1278, version 213 pages•Date: July 30, 2019AbstractDuplication in source code can have a major negative impact on the maintainability of source code, as it creates implicit dependencies between fragments of code. Such implicit dependencies often cause bugs and increase maintenance efforts. In this study, we look into the opportunities to automatically refactor these duplication problems for object-oriented programming languages. We propose a method to detect clones that are suitable for refactoring. This method focuses on the context and scope of clones, ensuring our refactoring improves the design and does not create side effects. Our intermediate results indicate that more than half of the duplication in code is related to each other through inheritance, making it easier to refactor these clones in a clean way. About 40 percent of the duplication can be refactored through method extraction, while other clones require other refactoring techniques or further transformations. Future measurements will provide further insight into what clones should be refactored to improve the design of software systems. Keyphrases: Clone Class, Clone Refactoring, Clone type, Code Clones, Java, Maintainability, Method extraction, OOP, Software Engineering, Software clone, automatic refactoring, clone detection, clone detection tool, clone type definition, code clone, code clone detection, duplicated code refactoring advisor, duplication, metrics, modern clone detection tool, object-oriented language, object-oriented programming, object-oriented programming language, open source, refactoring opportunity, refactoring technique
|