![]() ![]() However, in some cases, they neglect or violate these principles due to the lack of time or budget (Taibi et al., 2017, Yamashita and Moonen, b), which results in confusing, complex, and problematic structures in code, known as code smells (Palomba et al., 2018, Fowler and Beck, 2018, Khomh et al., 2012). Developers usually leverage the principles such as single responsibility and modularity to achieve a good design. Correctly adhering to object-oriented principles is a preliminary approach to make quality software. ![]() Reaching high-quality design is of great concern in developing today’s software systems where flexibility, reusability, and maintainability are essential (Subramaniam and Zulzalil, 2012, Yamashita and Moonen, a). The results show the applicability of the proposed method in establishing the single responsibility principle with a 21% improvement compared to the state-of-the-art extract method refactoring approaches. Experts’ opinion is used to evaluate the proposed approach on five different Java projects. Subsequently, the best destination class is determined such that design modularity is maximized. Finally, a proper name is assigned to the extracted method based on its responsibility. All possible refactorings are then extracted and ranked by a modularity metric, emphasizing high cohesion and low coupling classes for the detected methods. Then, long method smells are detected, considering the methods’ dependencies and sizes. First, a graph representing project entities is created. This paper aims to automatically identify and refactor the long method smells in Java codes using advanced graph analysis techniques, addressing the aforementioned difficulties. However, current approaches still face serious problems such as insufficient accuracy in detecting refactoring opportunities, limitations on correction types, the need for human intervention in the refactoring process, and lack of attention to object-oriented principles, mainly single responsibility and cohesion–coupling principles. Extract Method refactoring is mainly applied to eliminate the Long Method smell. Despite various attempts to detect the long method code smell, few automated approaches are presented to refactor this smell. Long Method is amongst the most common code smells in software systems. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |