An External Client-Based Approach for the Extract Class Refactoring: A Theoretical Model and an Empirical Approach
Source abstract
Abstract
A commonly observed ambiguity of a class is simply a reflection of multiple methods’ implementation within an individual class. The process of Extract Class refactoring is, therefore, used to separate the different responsibilities of a class into different classes. A major limitation in existing approaches of the Extract Class refactoring is based on factors that are internal to the class, i.e., structural and semantic relationships between methods, in order to identify and separate the responsibilities of the class which are inadequate in many cases. Thus, we propose a novel approach that exploits the clients of the class to support the Extract Class refactoring. The importance of this approach lies in its usefulness to support existing approaches since it involves factors external to the class, i.e., the clients. Moreover, an extensive empirical evaluation is presented to support the proposed method through the utilization of real classes selected from two open source systems. The result shows the potential of our proposed approach and usefulness that leads to an improvement in the quality of the considered classes.
Source: crossref · Quality: baseline
Research context
OpenAlex topics: Software Engineering Research · Imbalanced Data Classification Techniques
SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.
Affiliations
Department of Computer Science, Albaha University, Albaha 65799, Saudi Arabia
References (32)
Show source-provided references
1. Fowler, M. (1999). Refactoring: Improving the Design of Existing Code, Addison-Wesley Professional.
2. Martin, R.C., and Martin, M. (2006). Agile Principles, Patterns, and Practices in C# (Robert C. Martin), Prentice Hall PTR.
3. Fokaefs, M., Tsantalis, N., Chatzigeorgiou, A., and Sander, J. (2009, January 20–26). Decomposing object-oriented class modules using an agglomerative clustering technique. Proceedings of the 2009 IEEE International Conference on Software Maintenance, Edmonton, AB, Canada.10.1109/ICSM.2009.5306332 ↗
4. Identifying extract class refactoring opportunities using structural and semantic cohesion measures10.1016/j.jss.2010.11.918 ↗
5. Automating extract class refactoring: An improved method and its evaluation10.1007/s10664-013-9256-x ↗
6. Client-based cohesion metrics for Java programs10.1016/j.scico.2009.01.005 ↗
7. Defining and validating a client-based cohesion metric for object-oriented classes10.1109/COMPSAC.2017.99 ↗
8. Using Client-Based Class Cohesion Metrics to Predict Class Maintainability10.1109/COMPSAC.2019.00020 ↗
9. Alzahrani, M. (2020;, January 27–30). Using Clients to Support Extract Class Refactoring. Proceedings of the 18th International Conference on Software Engineering Research and Practice, Las Vegas, NV, USA.
10. Fokaefs, M., Tsantalis, N., Stroulia, E., and Chatzigeorgiou, A. (2011, January 21–28). JDeodorant: Identification and application of extract class refactorings. Proceedings of the 2011 33rd International Conference on Software Engineering (ICSE), Honolulu, HI, USA.10.1145/1985793.1985989 ↗
11. Simon, F., Steinbruckner, F., and Lewerentz, C. (2001, January 14–16). Metrics based refactoring. Proceedings of the Fifth European Conference on Software Maintenance and Reengineering, Lisbon, Portugal.
12. Marinescu, R. (2004, January 11–14). Detection strategies: Metrics-based rules for detecting design flaws. Proceedings of the 20th IEEE International Conference on Software Maintenance, Chicago, IL, USA.
13. Opportunities and challenges applying functional data analysis to the study of open source software evolution10.1214/088342306000000141 ↗
14. Du Bois, B., Demeyer, S., and Verelst, J. (2004, January 8–12). Refactoring-improving coupling and cohesion of existing code. Proceedings of the 11th working conference on reverse engineering, Delft, The Netherlands.
15. Software module clustering as a multi-objective search problem10.1109/TSE.2010.26 ↗
16. Seng, O., Stammel, J., and Burkhart, D. (2006, January 8–12). Search-based determination of refactorings for improving the class structure of object-oriented systems. Proceedings of the 8th Annual Conference on Genetic and Evolutionary Computation, Seattle, DC, USA.10.1145/1143997.1144315 ↗
17. Abdeen, H., Ducasse, S., Sahraoui, H., and Alloui, I. (2009, January 13–16). Automatic package coupling and cycle minimization. Proceedings of the 2009 16th Working Conference on Reverse Engineering, Lille, France.10.1109/WCRE.2009.13 ↗
18. O’Keeffe, M., and Cinnéide, M.O. (2006, January 22–24). Search-based software maintenance. Proceedings of the Conference on Software Maintenance and Reengineering (CSMR’06), Bari, Italy.10.1109/CSMR.2006.49 ↗
19. Bavota, G., De Lucia, A., Marcus, A., and Oliveto, R. (2010, January 20–24). A two-step technique for extract class refactoring. Proceedings of the IEEE/ACM International Conference on Automated Software Engineering, Antwerp, Belgium.10.1145/1858996.1859024 ↗
20. Suggesting extract class refactoring opportunities by measuring strength of method interactions10.1109/APSEC.2013.123 ↗
21. Bavota, G., De Lucia, A., Marcus, A., Oliveto, R., and Palomba, F. (2012, January 2–9). Supporting extract class refactoring in eclipse: The aries project. Proceedings of the 2012 34th International Conference on Software Engineering (ICSE), Zurich, Switzerland.10.1109/ICSE.2012.6227233 ↗
22. Bavota, G., Oliveto, R., De Lucia, A., Antoniol, G., and Gueheneuc, Y.G. (2010, January 12–18). Playing with refactoring: Identifying extract class opportunities through game theory. Proceedings of the 2010 IEEE International Conference on Software Maintenance, Timi oara, Romania.10.1109/ICSM.2010.5609739 ↗
23. A metrics suite for object oriented design10.1109/32.295895 ↗
24. Bafandeh Mayvan, B., Rasoolzadegan, A., and Javan Jafari, A. (2020). Bad smell detection using quality metrics and refactoring opportunities. J. Softw. Evol. Process., e2255.10.1002/smr.2255 ↗
25. Cormen, T.H., Leiserson, C.E., Rivest, R.L., and Stein, C. (2009). Introd. Algorithms, MIT Press.
26. Automatic software refactoring via weighted clustering in method-level networks10.1109/TSE.2017.2679752 ↗
27. Empirical evaluation of the impact of object-oriented code refactoring on quality attributes: A systematic literature review
28. (2020, March 22). Apache Tomcat. Available online: https://tomcat.apache.org/.
29. (2020, March 22). Apache Ant. Available online: https://ant.apache.org/.
30. A precise method-method interaction-based cohesion metric for object-oriented classes
31. (2020, March 22). Eclipse Java Development Tools (JDT). Available online: https://www.eclipse.org/jdt/.
32. R Foundation (2020, March 22). The R Project for Statistical Computing. Available online: http://www.r-project.org.