The Impact of Auto-Refactoring Code Smells on the Resource Utilization of Cloud Software

Cloud-based software-as-a-service (SaaS) have gained popularity due to their low cost and elasticity. However, like other software, SaaS applications suffer from code smells, which can drastically affect functionality and resource usage. Code smell is any design in the source code that indicates a deeper problem. The software community deploys automated refactoring to eliminate smells which can improve performance and also decrease the usage of critical resources. However, studies that analyze the impact of automatic refactoring smells in SaaS on resources such as CPU and memory have been conducted to a limited extent. Here, we aim to fill that gap and study the impact on resource usage of SaaS applications due to automatic refactoring of seven classic code smells: god class, feature envy, type checking, cyclic dependency, shotgun surgery, god method, and spaghetti code. We specified six real-life SaaS applications from Github called Zimbra, OneDataShare, GraphHopper, Hadoop, JENA, and JAMES which ran on Openstack cloud. Results show that refactoring smells by tools like JDeodrant and JSparrow have widely varying impacts on the CPU and memory consumption of the tested applications based on the type of smell refactored. We present the resource utilization impact of each smell and also discuss the potential reasons leading to that effect.

[1]  Asif Imran,et al.  Web Data Amalgamation for Security Engineering: Digital Forensic Investigation of Open Source Cloud , 2016, J. Univers. Comput. Sci..

[2]  Alexander Chatzigeorgiou,et al.  JDeodorant: Identification and Removal of Type-Checking Bad Smells , 2008, 2008 12th European Conference on Software Maintenance and Reengineering.

[3]  Xiao Liu,et al.  PaaS - Black or White: An Investigation into Software Development Model for Building Retail Industry SaaS , 2017, 2017 IEEE/ACM 39th International Conference on Software Engineering Companion (ICSE-C).

[4]  Michele Lanza,et al.  Object-Oriented Metrics in Practice - Using Software Metrics to Characterize, Evaluate, and Improve the Design of Object-Oriented Systems , 2006 .

[5]  Asif Imran Design Smell Detection and Analysis for Open Source Java Software , 2019, 2019 IEEE International Conference on Software Maintenance and Evolution (ICSME).

[6]  Randy H. Katz,et al.  A view of cloud computing , 2010, CACM.

[7]  Asif Imran,et al.  Cloud-Niagara: A high availability and low overhead fault tolerance middleware for the cloud , 2014, 16th Int'l Conf. Computer and Information Technology.

[8]  Mario Piattini,et al.  Analyzing the Harmful Effect of God Class Refactoring on Power Consumption , 2014, IEEE Software.

[9]  Eleni Stroulia,et al.  JDeodorant: identification and application of extract class refactorings , 2011, 2011 33rd International Conference on Software Engineering (ICSE).

[10]  Kwankamol Nongpong,et al.  Feature envy factor: A metric for automatic feature envy detection , 2015, 2015 7th International Conference on Knowledge and Smart Technology (KST).

[11]  Eduardo Figueiredo,et al.  An Empirical Study on the Impact of Android Code Smells on Resource Usage , 2018, SEKE.

[12]  Mauricio A. Saca Refactoring improving the design of existing code , 2017, 2017 IEEE 37th Central America and Panama Convention (CONCAPAN XXXVII).

[13]  Jing Li,et al.  The Qualitas Corpus: A Curated Collection of Java Code for Empirical Studies , 2010, 2010 Asia Pacific Software Engineering Conference.

[14]  Hiroaki Kobayashi,et al.  A Platform-Specific Code Smell Alert System for High Performance Computing Applications , 2014, 2014 IEEE International Parallel & Distributed Processing Symposium Workshops.

[15]  Foutse Khomh,et al.  An Empirical Study of the Impact of Two Antipatterns, Blob and Spaghetti Code, on Program Comprehension , 2011, 2011 15th European Conference on Software Maintenance and Reengineering.

[16]  Durgaprasad Gangodkar,et al.  Hadoop, MapReduce and HDFS: A Developers Perspective☆ , 2015 .

[17]  Giuseppe Procaccianti,et al.  Empirical Evaluation of the Energy Impact of Refactoring Code Smells , 2018, ICT4S.

[18]  Mariano Ceccato,et al.  Goto Elimination Strategies in the Migration of Legacy Code to Java , 2008, 2008 12th European Conference on Software Maintenance and Reengineering.

[19]  Girish Suryanarayana,et al.  Refactoring for software architecture smells , 2016, IWoR@ASE.