{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2025,11,22]],"date-time":"2025-11-22T11:27:41Z","timestamp":1763810861115,"version":"build-2065373602"},"reference-count":48,"publisher":"MDPI AG","issue":"8","license":[{"start":{"date-parts":[[2022,8,16]],"date-time":"2022-08-16T00:00:00Z","timestamp":1660608000000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Computers"],"abstract":"<jats:p>A large class with many responsibilities is a design flaw that commonly occurs in real-world object-oriented systems during their lifespan. Such a class tends to be more difficult to comprehend, test, and change. Extract class refactoring (ECR) is the technique that is used to address this design flaw by trying to extract a set of smaller classes with better quality from the large class. Unfortunately, ECR is a costly process that takes great time and effort when it is conducted completely by hand. Thus, many approaches have been introduced in the literature that tried to automatically suggest the best set of classes that can be extracted from a large class. However, most of these approaches focus on improving the cohesion of the extracted classes yet neglect the coupling between them which can lead to the extraction of highly coupled classes. Therefore, this paper proposes a novel approach that considers the combination of the cohesion and coupling to identify the set of classes that can be extracted from a large class. The proposed approach was empirically evaluated based on real-world Blobs taken from two open-source object-oriented systems. The results of the empirical evaluation revealed that the proposed approach is potentially useful and leads to improvement in the overall quality.<\/jats:p>","DOI":"10.3390\/computers11080123","type":"journal-article","created":{"date-parts":[[2022,8,16]],"date-time":"2022-08-16T23:44:25Z","timestamp":1660693465000},"page":"123","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":8,"title":["Extract Class Refactoring Based on Cohesion and Coupling: A Greedy Approach"],"prefix":"10.3390","volume":"11","author":[{"ORCID":"https:\/\/orcid.org\/0000-0002-6585-4483","authenticated-orcid":false,"given":"Musaad","family":"Alzahrani","sequence":"first","affiliation":[{"name":"Department of Computer Science, Albaha University, Albaha 65799, Saudi Arabia"}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"1968","published-online":{"date-parts":[[2022,8,16]]},"reference":[{"key":"ref_1","doi-asserted-by":"crossref","first-page":"1054","DOI":"10.1109\/TSE.2011.88","article-title":"Structural complexity and programmer team strategy: An experimental test","volume":"38","author":"Ramasubbu","year":"2011","journal-title":"IEEE Trans. Softw. Eng."},{"key":"ref_2","doi-asserted-by":"crossref","first-page":"298","DOI":"10.1016\/j.jss.2016.02.024","article-title":"Using indirect coupling metrics to predict package maintainability and testability","volume":"121","author":"Almugrin","year":"2016","journal-title":"J. Syst. Softw."},{"key":"ref_3","doi-asserted-by":"crossref","unstructured":"Alzahrani, M., and Melton, A. (2017, January 4\u20138). Defining and validating a client-based cohesion metric for object-oriented classes. Proceedings of the 2017 IEEE 41st Annual Computer Software and Applications Conference (COMPSAC), Turin, Italy.","DOI":"10.1109\/COMPSAC.2017.99"},{"key":"ref_4","doi-asserted-by":"crossref","unstructured":"Alzahrani, M., Alqithami, S., and Melton, A. (2019, January 15\u201319). Using client-based class cohesion metrics to predict class maintainability. Proceedings of the 2019 IEEE 43rd Annual Computer Software and Applications Conference (COMPSAC), Milwaukee, WI, USA.","DOI":"10.1109\/COMPSAC.2019.00020"},{"key":"ref_5","doi-asserted-by":"crossref","first-page":"2028","DOI":"10.1016\/j.infsof.2013.07.005","article-title":"Object-oriented class maintainability prediction using internal quality attributes","volume":"55","year":"2013","journal-title":"Inf. Softw. Technol."},{"key":"ref_6","doi-asserted-by":"crossref","first-page":"33","DOI":"10.1016\/S0020-0190(03)00382-X","article-title":"Software evolution\u2014Background, theory, practice","volume":"88","author":"Lehman","year":"2003","journal-title":"Inf. Process. Lett."},{"key":"ref_7","doi-asserted-by":"crossref","first-page":"e2423","DOI":"10.1002\/smr.2423","article-title":"Understanding software architecture erosion: A systematic mapping study","volume":"34","author":"Li","year":"2022","journal-title":"J. Softw. Evol. Process."},{"key":"ref_8","unstructured":"Fowler, M. (2018). Refactoring: Improving the Design of Existing Code, Addison-Wesley Professional."},{"key":"ref_9","doi-asserted-by":"crossref","unstructured":"\u015eanl\u0131alp, I., \u00d6zt\u00fcrk, M.M., and Yi\u011fit, T. (2022). Energy Efficiency Analysis of Code Refactoring Techniques for Green and Sustainable Software in Portable Devices. Electronics, 11.","DOI":"10.3390\/electronics11030442"},{"key":"ref_10","doi-asserted-by":"crossref","unstructured":"Fokaefs, M., Tsantalis, N., Chatzigeorgiou, A., and Sander, J. (2009, January 20\u201326). Decomposing object-oriented class modules using an agglomerative clustering technique. Proceedings of the 2009 IEEE International Conference on Software Maintenance, Edmonton, AB, Canada.","DOI":"10.1109\/ICSM.2009.5306332"},{"key":"ref_11","doi-asserted-by":"crossref","first-page":"397","DOI":"10.1016\/j.jss.2010.11.918","article-title":"Identifying extract class refactoring opportunities using structural and semantic cohesion measures","volume":"84","author":"Bavota","year":"2011","journal-title":"J. Syst. Softw."},{"key":"ref_12","doi-asserted-by":"crossref","first-page":"1617","DOI":"10.1007\/s10664-013-9256-x","article-title":"Automating extract class refactoring: An improved method and its evaluation","volume":"19","author":"Bavota","year":"2014","journal-title":"Empir. Softw. Eng."},{"key":"ref_13","doi-asserted-by":"crossref","unstructured":"Alzahrani, M., and Alqithami, S. (2020). An External Client-Based Approach for the Extract Class Refactoring: A Theoretical Model and an Empirical Approach. Appl. Sci., 10.","DOI":"10.3390\/app10176038"},{"key":"ref_14","doi-asserted-by":"crossref","unstructured":"Bavota, G., Oliveto, R., De Lucia, A., Antoniol, G., and Gu\u00e9h\u00e9neuc, Y.G. (2010, January 12\u201318). Playing with refactoring: Identifying extract class opportunities through game theory. Proceedings of the 2010 IEEE International Conference on Software Maintenance, Timisoara, Romania.","DOI":"10.1109\/ICSM.2010.5609739"},{"key":"ref_15","doi-asserted-by":"crossref","first-page":"110394","DOI":"10.1016\/j.jss.2019.110394","article-title":"How does object-oriented code refactoring influence software quality? Research landscape and challenges","volume":"157","author":"Kaur","year":"2019","journal-title":"J. Syst. Softw."},{"key":"ref_16","doi-asserted-by":"crossref","first-page":"1","DOI":"10.1186\/s40411-018-0046-4","article-title":"A survey of search-based refactoring for software maintenance","volume":"6","author":"Mohan","year":"2018","journal-title":"J. Softw. Eng. Res. Dev."},{"key":"ref_17","first-page":"127","article-title":"An empirical assessment of refactoring impact on software quality using a hierarchical quality model","volume":"5","author":"Shatnawi","year":"2011","journal-title":"Int. J. Softw. Eng. Its Appl."},{"key":"ref_18","first-page":"012068","article-title":"A Multi-Objective Approach for Software Quality Improvement","volume":"Volume 1950","author":"Makkar","year":"2021","journal-title":"Proceedings of the Journal of Physics: Conference Series"},{"key":"ref_19","doi-asserted-by":"crossref","unstructured":"Kaur, A., and Kaur, M. (2016, January 23\u201325). Analysis of code refactoring impact on software quality. Proceedings of the MATEC Web of Conferences, EDP Sciences, Amsterdam, The Netherlands.","DOI":"10.1051\/matecconf\/20165702012"},{"key":"ref_20","first-page":"43","article-title":"Analysis of code refactoring impact on software quality: A scientific explanation","volume":"7","author":"Kaur","year":"2021","journal-title":"Adv. Asp. Eng. Res."},{"key":"ref_21","first-page":"1433","article-title":"Assessment of optimum refactoring sequence to improve the software quality of object-oriented software","volume":"41","author":"Tarwani","year":"2020","journal-title":"J. Inf. Optim. Sci."},{"key":"ref_22","doi-asserted-by":"crossref","unstructured":"Ivers, J., Nord, R.L., Ozkaya, I., Seifried, C., Timperley, C.S., and Kessentini, M. (2022). Industry Experiences with Large-Scale Refactoring. arXiv.","DOI":"10.1145\/3540250.3558954"},{"key":"ref_23","doi-asserted-by":"crossref","first-page":"4","DOI":"10.1109\/32.979986","article-title":"A hierarchical model for object-oriented design quality assessment","volume":"28","author":"Bansiya","year":"2002","journal-title":"IEEE Trans. Softw. Eng."},{"key":"ref_24","doi-asserted-by":"crossref","first-page":"1125","DOI":"10.1016\/j.infsof.2012.04.004","article-title":"Constructing models for predicting extract subclass refactoring opportunities using object-oriented quality metrics","volume":"54","year":"2012","journal-title":"Inf. Softw. Technol."},{"key":"ref_25","doi-asserted-by":"crossref","unstructured":"Bavota, G., De Carluccio, B., De Lucia, A., Di Penta, M., Oliveto, R., and Strollo, O. (2012, January 23\u201324). When does a refactoring induce bugs? An empirical study. Proceedings of the 2012 IEEE 12th International Working Conference on Source Code Analysis and Manipulation, Riva del Garda, Italy.","DOI":"10.1109\/SCAM.2012.20"},{"key":"ref_26","doi-asserted-by":"crossref","unstructured":"Prete, K., Rachatasumrit, N., Sudan, N., and Kim, M. (2010, January 12\u201318). Template-based reconstruction of complex refactorings. Proceedings of the 2010 IEEE International Conference on Software Maintenance, Timisoara, Romania.","DOI":"10.1109\/ICSM.2010.5609577"},{"key":"ref_27","first-page":"1","article-title":"When do changes induce fixes?","volume":"30","author":"Zimmermann","year":"2005","journal-title":"ACM Sigsoft Softw. Eng. Notes"},{"key":"ref_28","doi-asserted-by":"crossref","first-page":"1","DOI":"10.1007\/s10664-012-9214-z","article-title":"How changes affect software entropy: An empirical study","volume":"19","author":"Canfora","year":"2014","journal-title":"Empir. Softw. Eng."},{"key":"ref_29","doi-asserted-by":"crossref","first-page":"44","DOI":"10.1016\/j.scico.2014.12.002","article-title":"The effect of refactoring on change and fault-proneness in commercial c# software","volume":"102","author":"Gatrell","year":"2015","journal-title":"Sci. Comput. Program."},{"key":"ref_30","doi-asserted-by":"crossref","first-page":"633","DOI":"10.1109\/TSE.2014.2318734","article-title":"An empirical study of refactoringchallenges and benefits at microsoft","volume":"40","author":"Kim","year":"2014","journal-title":"IEEE Trans. Softw. Eng."},{"key":"ref_31","unstructured":"Simon, F., Steinbruckner, F., and Lewerentz, C. (2001, January 14\u201316). Metrics based refactoring. Proceedings of the Proceedings Fifth European Conference on Software Maintenance and Reengineering, Lisbon, Portugal."},{"key":"ref_32","unstructured":"Marinescu, R. (2004, January 11\u201314). Detection strategies: Metrics-based rules for detecting design flaws. Proceedings of the 20th IEEE International Conference on Software Maintenance, 2004 Proceedings, Chicago, IL, USA."},{"key":"ref_33","doi-asserted-by":"crossref","first-page":"476","DOI":"10.1109\/32.295895","article-title":"A metrics suite for object oriented design","volume":"20","author":"Chidamber","year":"1994","journal-title":"IEEE Trans. Softw. Eng."},{"key":"ref_34","doi-asserted-by":"crossref","first-page":"e2255","DOI":"10.1002\/smr.2255","article-title":"Bad smell detection using quality metrics and refactoring opportunities","volume":"32","author":"Rasoolzadegan","year":"2020","journal-title":"J. Softw. Evol. Process."},{"key":"ref_35","doi-asserted-by":"crossref","unstructured":"Fokaefs, M., Tsantalis, N., Stroulia, E., and Chatzigeorgiou, A. (2011, January 21\u201328). Jdeodorant: Identification and application of extract class refactorings. Proceedings of the 2011 33rd International Conference on Software Engineering (ICSE), Honolulu, HI, USA.","DOI":"10.1145\/1985793.1985989"},{"key":"ref_36","unstructured":"Cormen, T.H., Leiserson, C.E., Rivest, R.L., and Stein, C. (2022). Introduction to Algorithms, MIT Press."},{"key":"ref_37","doi-asserted-by":"crossref","first-page":"202","DOI":"10.1109\/TSE.2017.2679752","article-title":"Automatic software refactoring via weighted clustering in method-level networks","volume":"44","author":"Wang","year":"2017","journal-title":"IEEE Trans. Softw. Eng."},{"key":"ref_38","doi-asserted-by":"crossref","unstructured":"Akash, P.S., Sadiq, A.Z., and Kabir, A. (2019, January 4\u20135). An Approach of Extracting God Class Exploiting Both Structural and Semantic Similarity. Proceedings of the ENASE, Heraklion, Greece.","DOI":"10.5220\/0007743804270433"},{"key":"ref_39","first-page":"993","article-title":"Latent dirichlet allocation","volume":"3","author":"Blei","year":"2003","journal-title":"J. Mach. Learn. Res."},{"key":"ref_40","doi-asserted-by":"crossref","unstructured":"Alzahrani, M. (2021). Using clients to support extract class refactoring. Advances in Software Engineering, Education, and e-Learning, Springer.","DOI":"10.1007\/978-3-030-70873-3_48"},{"key":"ref_41","doi-asserted-by":"crossref","first-page":"227901","DOI":"10.1109\/ACCESS.2020.3046109","article-title":"Measuring class cohesion based on client similarities between method pairs: An improved approach that supports refactoring","volume":"8","author":"Alzahrani","year":"2020","journal-title":"IEEE Access"},{"key":"ref_42","doi-asserted-by":"crossref","unstructured":"Gui, G., and Scott, P.D. (2006, January 22\u201323). Coupling and cohesion measures for evaluation of component reusability. Proceedings of the 2006 International Workshop on Mining Software Repositories, Shanghai, China.","DOI":"10.1145\/1137983.1137989"},{"key":"ref_43","doi-asserted-by":"crossref","unstructured":"Bonja, C., and Kidanmariam, E. (2006, January 10\u201312). Metrics for class cohesion and similarity between methods. Proceedings of the 44th Annual Southeast Regional Conference, Melbourne, FL, USA.","DOI":"10.1145\/1185448.1185469"},{"key":"ref_44","first-page":"1","article-title":"A precise method-method interaction-based cohesion metric for object-oriented classes","volume":"21","author":"Briand","year":"2012","journal-title":"ACM Trans. Softw. Eng. Methodol. (TOSEM)"},{"key":"ref_45","unstructured":"(2022, June 22). Xerces2. Available online: https:\/\/xerces.apache.org\/xerces2-j\/."},{"key":"ref_46","unstructured":"(2022, June 22). Ganttproject. Available online: https:\/\/sourceforge.net\/projects\/ganttproject\/."},{"key":"ref_47","unstructured":"(2022, June 22). JavaParser. Available online: https:\/\/javaparser.org\/."},{"key":"ref_48","doi-asserted-by":"crossref","first-page":"347","DOI":"10.1109\/TSE.2009.1","article-title":"Identification of move method refactoring opportunities","volume":"35","author":"Tsantalis","year":"2009","journal-title":"IEEE Trans. Softw. Eng."}],"container-title":["Computers"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/2073-431X\/11\/8\/123\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,11]],"date-time":"2025-10-11T00:09:21Z","timestamp":1760141361000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/2073-431X\/11\/8\/123"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2022,8,16]]},"references-count":48,"journal-issue":{"issue":"8","published-online":{"date-parts":[[2022,8]]}},"alternative-id":["computers11080123"],"URL":"https:\/\/doi.org\/10.3390\/computers11080123","relation":{},"ISSN":["2073-431X"],"issn-type":[{"type":"electronic","value":"2073-431X"}],"subject":[],"published":{"date-parts":[[2022,8,16]]}}}