skip to main content
10.1145/3422392.3422439acmotherconferencesArticle/Chapter ViewAbstractPublication PagessbesConference Proceedingsconference-collections
research-article

On the Relation between Complexity, Explicitness, Effectiveness of Refactorings and Non-Functional Concerns

Published:21 December 2020Publication History

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.

References

  1. 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 ScholarGoogle Scholar
  2. 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 ScholarGoogle Scholar
  3. M. Alshayeb. 2009. Empirical investigation of refactoring effect on software quality. Information and Software Technology 51, 9 (2009), 1319--1326.Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. 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 ScholarGoogle Scholar
  5. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  6. 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 ScholarGoogle Scholar
  7. 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 ScholarGoogle Scholar
  8. 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 ScholarGoogle Scholar
  9. 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 ScholarGoogle Scholar
  10. 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 ScholarGoogle Scholar
  11. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  12. 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 ScholarGoogle Scholar
  13. 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 ScholarGoogle Scholar
  14. S. Demeyer. 2003. Maintainability versus Performance: What's the Effect of Introducing Polymorphism?Google ScholarGoogle Scholar
  15. 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 ScholarGoogle ScholarCross RefCross Ref
  16. M. Fowler. 2018. Refactoring: improving the design of existing code. Addison-Wesley Professional.Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. E. Gamma, R. Helm, R.Johnson, and J. Vlissides. 1994. Design Patterns: Elements of Reusable Object-Oriented Software. Pearson Educationl.Google ScholarGoogle Scholar
  18. 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 ScholarGoogle Scholar
  19. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  20. 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 ScholarGoogle Scholar
  21. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  22. M. Lu and P. Liang. 2017. Automatic Classification of Non-Functional Requirements from Augmented App User Reviews. In 21st EASE. ACM, 344--353.Google ScholarGoogle Scholar
  23. 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 ScholarGoogle Scholar
  24. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  25. 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 ScholarGoogle ScholarCross RefCross Ref
  26. C. Parnin and C. Görg. 2006. Lightweight visualizations for inspecting code smells. In Symposium on Software visualization. ACM, 171--172.Google ScholarGoogle Scholar
  27. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  28. J. Ratzinger. 2007. sPACE -- Software Project Assessment in the Course of Evolution. Doctoral Dissertation. Vienna University of Technology.Google ScholarGoogle Scholar
  29. Scientific Toolworks, Inc. 2020. Understand. https://scitools.com/support/metrics_list/?Google ScholarGoogle Scholar
  30. 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 ScholarGoogle Scholar
  31. 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 ScholarGoogle Scholar
  32. C. U. Smith and L. G. Williams. 2000. Software Performance AntiPatterns. In 2nd International Workshop on Software and Performance.Google ScholarGoogle Scholar
  33. 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 ScholarGoogle Scholar
  34. 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 ScholarGoogle Scholar
  35. D. Tenorio, A. C. Bibiano, and A. Garcia. 2019. On the customization of batch refactoring. In 3rd IWoR. IEEE Press, 13--16.Google ScholarGoogle Scholar
  36. 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 ScholarGoogle Scholar
  37. 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 ScholarGoogle Scholar

Index Terms

  1. On the Relation between Complexity, Explicitness, Effectiveness of Refactorings and Non-Functional Concerns

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in
        • Published in

          cover image ACM Other conferences
          SBES '20: Proceedings of the XXXIV Brazilian Symposium on Software Engineering
          October 2020
          901 pages
          ISBN:9781450387538
          DOI:10.1145/3422392

          Copyright © 2020 ACM

          Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 21 December 2020

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • research-article
          • Research
          • Refereed limited

          Acceptance Rates

          Overall Acceptance Rate147of427submissions,34%

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader