ABSTRACT
Developers need to consistently improve the internal structural quality of a program to address its maintainability and possibly other non-functional concerns. Refactoring is the main practice to improve code quality. Typical refactoring factors, such as their complexity and explicitness (i.e., their self-affirmation), may influence its effectiveness in improving key internal code attributes, such as enhancing cohesion or reducing its coupling, complexity and size. However, we still lack an understanding of whether such concerns and factors play a role on improving the code structural quality. Thus, this paper investigates the relationship between complexity, explicitness and effectiveness of refactorings and non-functional concerns in four projects. We study four non-functional concerns, namely maintainability, security, performance, and robustness. Our findings reveal that complex refactorings indeed have an impactful effect on the code structure, either improving or reducing the code structural quality. We also found that both self-affirmed refactorings and non-functional concerns are usually accompanied by complex refactorings, but tend to have a negative effect on code structural quality. Our findings can: (i) help researchers to improve the design of empirical studies and refactoring-related tools, and (ii) warn practitioners on which circumstances their refactorings may cause a negative impact on code quality.
- E. AlOmar, M. W. Mkaouer, and A. Ouni. 2019. Can refactoring be self-affirmed? an exploratory study on how developers document their refactoring activities in commit messages. In 3rd IWoR. IEEE, 51--58.Google Scholar
- E. A. AlOmar, M.W. Mkaouer, A. Ouni, and M. Kessentini. 2019. Do design metrics capture developers perception of quality? an empirical study on self-affirmed refactoring activities. arXiv preprint arXiv:1907.04797 (2019).Google Scholar
- M. Alshayeb. 2009. Empirical investigation of refactoring effect on software quality. Information and Software Technology 51, 9 (2009), 1319--1326.Google ScholarDigital Library
- G. An, A. Blot, J. Petke, and S. Yoo. 2019. PyGGI 2.0: Language Independent Genetic Improvement Framework. In 27th Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering. ACM, 1100--1104.Google Scholar
- G. Bavota, A. De Lucia, M. Di Penta, R. Oliveto, and F. Palomba. 2015. An experimental investigation on the innate relationship between quality and refactoring. Journal of Systems and Software 107 (2015), 1--14.Google ScholarDigital Library
- A. C. Bibiano, E. Fernandes, D. Oliveira, A. Garcia, M. Kalinowski, B. Fonseca, R. Oliveira, A. Oliveira, and D. Cedrim. 2019. A quantitative study on characteristics and effect of batch refactoring on code smells. In ESEM. IEEE, 1--11.Google Scholar
- A. C. Bibiano, V. Soares, D. Coutinho, E. Fernandes, J. Correia, K. Santos, A. Oliveira, A. Garcia, R. Gheyi, B. Fonseca, M. Ribeiro, C. Barbosa, and D. Oliveira. 2020. How Does Incomplete Composite Refactoring Affect Internal Quality Attributes?. In 28th ICPC.Google Scholar
- F. Bourquin and R. K. Keller. 2007. High-impact refactoring based on architecture violations. In 11th European Conference on Software Maintenance and Reengineering (CSMR'07). IEEE, 149--158.Google Scholar
- N. Cacho, E. A. Barbosa, J. Araujo, F. Pranto, A. Garcia, T. Cesar, E. Soares, A. Cassio, T. Filipe, and I. Garcia. 2014. How Does Exception Handling Behavior Evolve? An Exploratory Study in Java and C# Applications. In IEEE ICSME.Google Scholar
- N. Cacho, T. César, T. Filipe, E. Soares, A. Cassio, R. Souza, I. Garcia, E. A. Barbosa, and A. Garcia. 2014. Trading Robustness for Maintainability: An Empirical Study of Evolving C# Programs. In 36th ICSE. ACM, 584--595.Google Scholar
- A. Casamayor, D. Godoy, and M. Campo. 2010. Identification of non-functional requirements in textual specifications: A semi-supervised learning approach. Information and Software Technology 52, 4 (2010), 436--445.Google ScholarDigital Library
- A. Chávez, I. Ferreira, E. Fernandes, D. Cedrim, and A. Garcia. 2017. How Does Refactoring Affect Internal Quality Attributes? A Multi-Project Study. In 31st SBES. ACM, 74--83.Google Scholar
- I. Chowdhury, B. Chan, and M. Zulkernine. 2008. Security Metrics for Source Code Structures. In 4th International Workshop on Software Engineering for Secure Systems. ACM, 57--64.Google Scholar
- S. Demeyer. 2003. Maintainability versus Performance: What's the Effect of Introducing Polymorphism?Google Scholar
- E. Fernandes, A. Chávez, A. Garcia, I. Ferreira, D. Cedrim, L. Sousa, and W. Oizumi. 2020. Refactoring effect on internal quality attributes: What haven't they told you yet? Information and Software Technology 126 (2020), 106347.Google ScholarCross Ref
- M. Fowler. 2018. Refactoring: improving the design of existing code. Addison-Wesley Professional.Google ScholarDigital Library
- E. Gamma, R. Helm, R.Johnson, and J. Vlissides. 1994. Design Patterns: Elements of Reusable Object-Oriented Software. Pearson Educationl.Google Scholar
- S. Götz and M. Pukall. 2009. On Performance of Delegation in Java. In 2nd International Workshop on Hot Topics in Software Upgrades (HotSWUp '09). ACM, Article 3, 6 pages.Google Scholar
- S. Hayashi, M. Saeki, and M. Kurihara. 2006. Supporting refactoring activities using histories of program modification. Transactions on Information and Systems 89, 4 (2006), 1403--1412.Google ScholarDigital Library
- B. Jakobus, E. A. Barbosa, A. Garcia, and C. J. P. de Lucena. 2015. Contrasting exception handling code across languages: An experience report involving 50 open source projects. In IEEE 26th ISSRE. 183--193.Google Scholar
- M. Kim, T. Zimmermann, and N. Nagappan. 2014. An empirical study of refactoring challenges and benefits at Microsoft. TSE 40, 7 (2014), 633--649.Google ScholarDigital Library
- M. Lu and P. Liang. 2017. Automatic Classification of Non-Functional Requirements from Augmented App User Reviews. In 21st EASE. ACM, 344--353.Google Scholar
- S. Moshtari and A. Sami. 2016. Evaluating and Comparing Complexity, Coupling and a New Proposed Set of Coupling Metrics in Cross-Project Vulnerability Prediction. In 31st Annual Symposium on Applied Computing. ACM, 1415--1421.Google Scholar
- E. Murphy-Hill, C. Parnin, and A. P. Black. 2011. How we refactor, and how we know it. TSE 38, 1 (2011), 5--18.Google ScholarDigital Library
- M. Paixao, M. Harman, Y. Zhang, and Y. Yu. 2017. An empirical study of cohesion and coupling: Balancing optimization and disruption. IEEE Transactions on Evolutionary Computation 22, 3 (2017), 394--414.Google ScholarCross Ref
- C. Parnin and C. Görg. 2006. Lightweight visualizations for inspecting code smells. In Symposium on Software visualization. ACM, 171--172.Google Scholar
- J. Petke, M. Harman, W. B. Langdon, and W. Weimer. 2018. Specialising Software for Different Downstream Applications Using Genetic Improvement and Code Transplantation. IEEE TSE 44, 6 (2018), 574--594.Google ScholarDigital Library
- J. Ratzinger. 2007. sPACE -- Software Project Assessment in the Course of Evolution. Doctoral Dissertation. Vienna University of Technology.Google Scholar
- Scientific Toolworks, Inc. 2020. Understand. https://scitools.com/support/metrics_list/?Google Scholar
- M. Siavvas and D. Kehagias, D.and Tzovaras. 2017. A Preliminary Study on the Relationship Among Software Metrics and Specific Vulnerability Types. In International Conference on Computational Science and Computational Intelligence (CSCI). 916--921.Google Scholar
- N. Siegmund, M. Kuhlemann, M. Pukall, and S. Apel. 2010. Optimizing Nonfunctional Properties of Software Product Lines by means of Refactorings. In 4th International Workshop on Variability Modelling of Software-Intensive Systems, Vol. 37. Universität Duisburg-Essen, 115--122.Google Scholar
- C. U. Smith and L. G. Williams. 2000. Software Performance AntiPatterns. In 2nd International Workshop on Software and Performance.Google Scholar
- V. Soares, A. Oliveira, J. Pereira, A. C. Bibano, A. Garcia, P. R. Farah, S. Vergilio, M. Schots, C. Silva, D. Coutinho, D. Oliveira, and A Uchôa. 2020. Website. https://sbes2020refactoring.github.io/Google Scholar
- L. Sousa, D. Cedrim, A. Garcia, W. Oizumi, A. C. Bibiano, D. Tenorio, M. Kim, and A. Oliveira. 2020. Characterizing and Identifying Composite Refactorings: Concepts, Heuristics and Patterns. In 17th ICSE.Google Scholar
- D. Tenorio, A. C. Bibiano, and A. Garcia. 2019. On the customization of batch refactoring. In 3rd IWoR. IEEE Press, 13--16.Google Scholar
- N. Tsantalis, M. Mansouri, L. M. Eshkevari, D. Mazinanian, and D. Dig. 2018. Accurate and Efficient Refactoring Detection in Commit History. In 40th ICSE. ACM, 483--494.Google Scholar
- M. Vakilian, N. Chen, S. Negara, B. A. Rajkumar, B. P. Bailey, and R. E. Johnson. 2012. Use, disuse, and misuse of automated refactorings. In 34th ICSE. IEEE Press, 233--243.Google Scholar
Index Terms
- On the Relation between Complexity, Explicitness, Effectiveness of Refactorings and Non-Functional Concerns
Recommendations
How do Code Smell Co-occurrences Removal Impact Internal Quality Attributes? A Developers’ Perspective
SBES '21: Proceedings of the XXXV Brazilian Symposium on Software EngineeringCode smells are poor code structures that might harm the software quality and evolution. However, previous studies has shown that only individual occurrences of smells may not be enough to assess the real impact that these smells can bring on systems. ...
Deriving refactorings for aspectJ
OOPSLA '04: Companion to the 19th annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applicationsIn this paper we present aspect-oriented programming laws that are useful for deriving refactorings for AspectJ. The laws help developers to verify if the transformations they define preserve behavior. We illustrate that by deriving several AspectJ ...
Refactoring of Crosscutting Concerns with Metaphor-Based Heuristics
It has been advocated that Aspect-Oriented Programming (AOP) is an effective technique to improve software maintainability through explicit support for modularising crosscutting concerns. However, in order to take the advantages of AOP, there is a need ...
Comments