Content area

Abstract

Modern software development often confronts performance challenges stemming from suboptimal code, inefficient algorithms, or inappropriate resource management. Software refactoring, a technique traditionally employed to enhance code quality and maintainability without altering software behavior, has the potential to mitigate these issues. While prior research has extensively investigated the relationship between refactoring and functional defects, its influence on performance remains comparatively underexplored.

In this thesis, we present two complementary empirical studies that examine how refactoring practices relate to and affect software performance. The first study investigates 255 Java open-source projects, drawing on data from GitHub’s API and RefactoringMiner. Our findings indicate that performance-related issues are frequently addressed through modifications to class structures and method configurations, with “Change Variable Type” emerging as the most impactful refactoring strategy. Statistical analysis reveals that performance-related commits are 1.77 times more likely to contain refactoring operations than non-performance commits. A deeper manual classification of 300 performance-refactoring instances uncovers 11 distinct motivations for refactoring when tackling performance concerns, as well as three main contexts in which these refactorings are applied.

Building on these insights, the second study focuses on refactoring’s effect on execution time in 15 open-source Java projects. By employing automated tools to trace code changes and measure performance, we identify the most common refactoring types associated with performance fluctuations—particularly method extraction and variable inlining—and assess the magnitude of these changes. We further highlight contextual factors that shape the direction and degree of performance impacts, including code structure, method invocation frequency, and test coverage.

Collectively, our results underscore the nuanced, dual impact of refactoring: while it enhances maintainability, it can also significantly influence software performance, sometimes leading to notable gains and occasionally to regressions. By providing a replicable methodology for evaluating refactoring-induced performance variations, this work aims to offer valuable guidelines for developers and researchers seeking to strike an optimal balance between code quality and runtime efficiency.

Details

1010268
Identifier / keyword
Title
Balancing Software Maintainability and Performance: An Empirical Study on Refactoring Practices
Number of pages
139
Publication year
2025
Degree date
2025
School code
1105
Source
MAI 87/3(E), Masters Abstracts International
ISBN
9798293881352
Committee member
Hamdaqa, Mohammad
University/institution
Ecole Polytechnique, Montreal (Canada)
University location
Canada -- Quebec, CA
Degree
M.A.Sc.
Source type
Dissertation or Thesis
Language
English
Document type
Dissertation/Thesis
Dissertation/thesis number
32317651
ProQuest document ID
3254265575
Document URL
https://www.proquest.com/dissertations-theses/balancing-software-maintainability-performance/docview/3254265575/se-2?accountid=208611
Copyright
Database copyright ProQuest LLC; ProQuest does not claim copyright in the individual underlying works.
Database
ProQuest One Academic