Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1109/ICPC.2017.38acmconferencesArticle/Chapter ViewAbstractPublication PagesicseConference Proceedingsconference-collections
research-article

An exploratory study on the relationship between changes and refactoring

Published: 20 May 2017 Publication History

Abstract

Refactoring aims at improving the internal structure of a software system without changing its external behavior. Previous studies empirically assessed, on the one hand, the benefits of refactoring in terms of code quality and developers' productivity, and on the other hand, the underlying reasons that push programmers to apply refactoring. Results achieved in the latter investigations indicate that besides personal motivation such as the responsibility concerned with code authorship, refactoring is mainly performed as a consequence of changes in the requirements rather than driven by software quality. However, these findings have been derived by surveying developers, and therefore no software repository study has been carried out to corroborate the achieved findings. To bridge this gap, we provide a quantitative investigation on the relationship between different types of code changes (i.e., Fault Repairing Modification, Feature Introduction Modification, and General Maintenance Modification) and 28 different refactoring types coming from 3 open source projects. Results showed that developers tend to apply a higher number of refactoring operations aimed at improving maintainability and comprehensibility of the source code when fixing bugs. Instead, when new features are implemented, more complex refactoring operations are performed to improve code cohesion. Most of the times, the underlying reasons behind the application of such refactoring operations are represented by the presence of duplicate code or previously introduced self-admitted technical debts.

References

[1]
M. Fowler, K. Beck, J. Brant, W. Opdyke, and D. Roberts, Refactoring: Improving the Design of Existing Code. Addison-Wiley, 1999.
[2]
E. Ammerlaan, W. Veninga, and A. Zaidman, "Old habits die hard: Why refactoring for understandability does not give immediate benefits," in Proc. Int'l Conf. on Software Analysis, Evolution, and Reengineering (SANER). IEEE, 2015, pp. 504--507.
[3]
L. Moonen, A. van Deursen, A. Zaidman, and M. Bruntink, "On the interplay between software testing and evolution and its effect on program comprehension," in Software Evolution, T. Mens and S. Demeyer, Eds. Springer, 2008, pp. 173--202.
[4]
M. Alshayeb, "Empirical investigation of refactoring effect on software quality," Information and Software Technology, vol. 51, no. 9, pp. 1319 -- 1326, 2009.
[5]
R. Moser, P. Abrahamsson, W. Pedrycz, A. Sillitti, and G. Succi, "A case study on the impact of refactoring on quality and productivity in an agile team," in Balancing Agility and Formalism in Software Engineering, B. Meyer, J. R. Nawrocki, and B. Walter, Eds. Berlin, Heidelberg: Springer-Verlag, 2008, pp. 252--266.
[6]
G. Szoke, G. Antal, C. Nagy, R. Ferenc, and T. Gyimóthy, "Bulk fixing coding issues and its effects on software quality: Is it worth refactoring?" in Proc. Int'l Working Conf. on Source Code Analysis and Manipulation (SCAM). IEEE, 2014, pp. 95--104.
[7]
N. Moha, Y. Guéhéneuc, L. Duchien, and A. Le Meur, "Decor: A method for the specification and detection of code and design smells," IEEE Trans. Softw. Eng., vol. 36, no. 1, pp. 20--36, 2010.
[8]
F. Palomba, G. Bavota, M. Di Penta, R. Oliveto, D. Poshyvanyk, and A. De Lucia, "Mining version histories for detecting code smells," IEEE Trans. Softw. Eng., 2015.
[9]
F. Palomba, A. Panichella, A. De Lucia, R. Oliveto, and A. Zaidman, "A textual-based technique for smell detection," in Proc. Int'l Conf on Program Comprehension (ICPC). IEEE, 2016, pp. 1--10.
[10]
N. Tsantalis and A. Chatzigeorgiou, "Identification of move method refactoring opportunities," IEEE Trans. Softw. Eng., vol. 35, no. 3, pp. 347--367, 2009.
[11]
G. Bavota, A. De Lucia, and R. Oliveto, "Identifying extract class refactoring opportunities using structural and semantic cohesion measures," Journal of Systems and Software, vol. 84, pp. 397--414, March 2011.
[12]
G. Bavota, R. Oliveto, M. Gethers, D. Poshyvanyk, and A. De Lucia, "Methodbook: Recommending move method refactorings via relational topic models," IEEE Trans. Softw. Eng., vol. 40, no. 7, pp. 671--694, 2014.
[13]
G. Bavota, M. Gethers, R. Oliveto, D. Poshyvanyk, and A. De Lucia, "Improving software modularization via automated analysis of latent topics and dependencies," ACM Trans. Softw. Eng. Methodol., vol. 23, no. 1, p. 4, 2014.
[14]
E. Murphy-Hill, C. Parnin, and A. P. Black, "How we refactor, and how we know it," IEEE Trans. Softw. Eng., vol. 38, no. 1, pp. 5--18, 2011.
[15]
M. Kim, T. Zimmermann, and N. Nagappan, "A field study of refactoring challenges and benefits," in Proc. Int'l Symposium on Foundations of Software Engineering (FSE). ACM, 2012, p. 50.
[16]
D. Silva, N. Tsantalis, and M. T. Valente, "Why we refactor? confessions of github contributors," in Proc. Int'l Symposium on the Foundations of Software Engineering (FSE). ACM, 2016, pp. 858--870.
[17]
Y. Wang, "What motivates software engineers to refactor source code? evidences from professional developers," in Proc. Int'l Conf. Software Maintenance (ICSM). IEEE, 2009, pp. 413--416.
[18]
G. Bavota, A. D. Lucia, M. D. Penta, R. Oliveto, and F. Palomba, "An experimental investigation on the innate relationship between quality and refactoring," Journal of Systems and Software, vol. 107, pp. 1--14, 2015.
[19]
A. E. Hassan, "Predicting faults using the complexity of code changes," in Proc. Int'l Conf. on Software Engineering (ICSE). IEEE, 2009, pp. 78--88.
[20]
R. P. L. Buse and W. R. Weimer, "Learning a metric for code readability," IEEE Trans. Softw. Eng., vol. 36, no. 4, pp. 546--558, 2010.
[21]
I. Kadar, P. Hegedus, R. Ferenc, and T. Gyimthy, "A code refactoring dataset and its assessment regarding software maintainability," in Proc. Int'l Conf. on Software Analysis, Evolution, and Reengineering (SANER). IEEE, 2016, pp. 599--603.
[22]
A. Mockus and L. G. Votta, "Identifying reasons for software changes using historic databases," in Proceedings of the International Conference on Software Maintenance (ICSM). IEEE, 2000, pp. 120--.
[23]
D. Hosmer and S. Lemeshow, Applied Logistic Regression (2nd Edition). Wiley, 2000.
[24]
D. Sheskin, Handbook of Parametric and Nonparametric Statistical Procedures (fourth edition). Chapman & All, 2007.
[25]
W. J. Conover, Practical Nonparametric Statistics, 3rd ed. Wiley, 1998.
[26]
G. Bavota, B. De Carluccio, A. De Lucia, M. Di Penta, R. Oliveto, and O. Strollo, "When does a refactoring induce bugs? an empirical study," in Proc. Int'l Working Conf. on Source Code Analysis and Manipulation (SCAM). IEEE, 2012, pp. 104--113.
[27]
B. Du Bois, S. Demeyer, and J. Verelst, "Does the "refactor to understand" reverse engineering pattern improve program comprehension?" in Proc. European Conf. on Software Maintenance and Reengineering (CSMR). IEEE, 2005, pp. 334--343.
[28]
S. R. Chidamber and C. F. Kemerer, "A metrics suite for object oriented design," IEEE Trans. Softw. Eng., vol. 20, no. 6, pp. 476--493, 1994.
[29]
W. Cunningham, "The WyCash portfolio management system," OOPS Messenger, vol. 4, no. 2, pp. 29--30, 1993.
[30]
M. L. Collard, H. H. Kagdi, and J. I. Maletic, "An xml-based lightweight c++ fact extractor," in Proc. Int'l Workshop on Program Comprehension (IWPC). IEEE, 2003, pp. 134--143.
[31]
A. Potdar and E. Shihab, "An exploratory study on self-admitted technical debt," in Proc. Int'l Conf on Software Maintenance and Evolution (ICSME). IEEE, 2014, pp. 91--100.
[32]
E. Maldonado, E. Shihab, and N. Tsantalis, "Using natural language processing to automatically detect self-admitted technical debt," IEEE Transactions on Software Engineering, vol. pp, no. 99, pp. 1--1, 2017.
[33]
K. Prete, N. Rachatasumrit, N. Sudan, and M. Kim, "Template-based reconstruction of complex refactorings," in Proc. Int'l Conf. on Software Maintenance (ICSM). IEEE, 2010, pp. 1--10.
[34]
Q. D. Soetens, J. Pérez, S. Demeyer, and A. Zaidman, "Circumventing refactoring masking using fine-grained change recording," in Proc. Int'l Workshop on Principles of Software Evolution (IWPSE). ACM, 2015, pp. 9--18.
[35]
F. Vonken and A. Zaidman, "Refactoring with unit testing: A match made in heaven?" in Proc. Working Conf. on Reverse Engineering (WCRE). IEEE, 2012, pp. 29--38.
[36]
G. Bavota, A. De Lucia, A. Marcus, and R. Oliveto, Recommending Refactoring Operations in Large Software Systems. Springer, 2014, pp. 387--419.
[37]
M. Kim, T. Zimmermann, and N. Nagappan, "An empirical study of refactoring challenges and benefits at microsoft," IEEE Trans. Softw. Eng., vol. 40, no. 7, pp. 633--649, 2014.
[38]
Y. Kataoka, T. Imai, H. Andou, and T. Fukaya, "A quantitative evaluation of maintainability enhancement by refactoring," in Proc. Int'l Conf. on Software Maintenance (ICSM). IEEE, 2002, pp. 576 -- 585.
[39]
M. Gatrell and S. Counsell, "The effect of refactoring on change and fault-proneness in commercial c# software," Sci. Comput. Program., vol. 102, no. C, pp. 44--56, 2015.
[40]
K. Stroggylos and D. Spinellis, "Refactoring--does it improve software quality?" in Proceedings of the 5th International Workshop on Software Quality, ser. WoSQ '07. IEEE, 2007, pp. 10-.
[41]
E. Stroulia and R. Kapoor, "Metrics of refactoring-based development: An experience report," in OOIS 2001, X. Wang, R. Johnston, and S. Patel, Eds. Springer, 2001, pp. 113--122.

Cited By

View all
  • (2024)DRMiner: A Tool For Identifying And Analyzing Refactorings In DockerfileProceedings of the 21st International Conference on Mining Software Repositories10.1145/3643991.3644921(584-594)Online publication date: 15-Apr-2024
  • (2024)Method-level Bug Prediction: Problems and PromisesACM Transactions on Software Engineering and Methodology10.1145/364033133:4(1-31)Online publication date: 13-Jan-2024
  • (2022)How do Trivial Refactorings Affect Classification Prediction Models?Proceedings of the 16th Brazilian Symposium on Software Components, Architectures, and Reuse10.1145/3559712.3559720(81-90)Online publication date: 3-Oct-2022
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ICPC '17: Proceedings of the 25th International Conference on Program Comprehension
May 2017
399 pages
ISBN:9781538605356

Sponsors

Publisher

IEEE Press

Publication History

Published: 20 May 2017

Check for updates

Author Tags

  1. code changes
  2. empirical studies
  3. refactoring

Qualifiers

  • Research-article

Conference

ICSE '17
Sponsor:

Upcoming Conference

ICSE 2025

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)5
  • Downloads (Last 6 weeks)0
Reflects downloads up to 02 Sep 2024

Other Metrics

Citations

Cited By

View all
  • (2024)DRMiner: A Tool For Identifying And Analyzing Refactorings In DockerfileProceedings of the 21st International Conference on Mining Software Repositories10.1145/3643991.3644921(584-594)Online publication date: 15-Apr-2024
  • (2024)Method-level Bug Prediction: Problems and PromisesACM Transactions on Software Engineering and Methodology10.1145/364033133:4(1-31)Online publication date: 13-Jan-2024
  • (2022)How do Trivial Refactorings Affect Classification Prediction Models?Proceedings of the 16th Brazilian Symposium on Software Components, Architectures, and Reuse10.1145/3559712.3559720(81-90)Online publication date: 3-Oct-2022
  • (2022)An exploratory study on refactoring documentation in issues handlingProceedings of the 19th International Conference on Mining Software Repositories10.1145/3524842.3528525(107-111)Online publication date: 23-May-2022
  • (2022)An empirical study on maintainable method size in JavaProceedings of the 19th International Conference on Mining Software Repositories10.1145/3524842.3527975(252-264)Online publication date: 23-May-2022
  • (2021)An Empirical Study on Refactoring-Inducing Pull RequestsProceedings of the 15th ACM / IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM)10.1145/3475716.3475785(1-12)Online publication date: 11-Oct-2021
  • (2021)Extracting Concise Bug-Fixing Patches from Human-Written Patches in Version Control SystemsProceedings of the 43rd International Conference on Software Engineering10.1109/ICSE43902.2021.00069(686-698)Online publication date: 22-May-2021
  • (2020)An Empirical Study of Quick Remedy CommitsProceedings of the 28th International Conference on Program Comprehension10.1145/3387904.3389266(60-71)Online publication date: 13-Jul-2020
  • (2020)How Does Incomplete Composite Refactoring Affect Internal Quality Attributes?Proceedings of the 28th International Conference on Program Comprehension10.1145/3387904.3389264(149-159)Online publication date: 13-Jul-2020
  • (2020)Testing of Mobile Applications in the WildProceedings of the 28th International Conference on Program Comprehension10.1145/3387904.3389256(296-307)Online publication date: 13-Jul-2020
  • Show More Cited By

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media