On the Use of Refactoring in Security Vulnerability Fixes: An Exploratory Study on Maven Libraries
Ayano Ikegami, Raula Gaikovina Kula, Bodin Chinthanet, Vittunyuta, Maeprasart, Ali Ouni, Takashi Ishio, Kenichi Matsumoto

TL;DR
This study investigates how refactoring actions are used alongside security vulnerability fixes in Maven libraries, revealing that nearly one-third of fixes involve refactoring, which could inform future automated support tools.
Contribution
It provides the first empirical analysis of the relationship between refactoring and vulnerability fixes in real-world Maven libraries, highlighting the prevalence of refactoring in security fixes.
Findings
31.9% of vulnerability fixes involved refactoring
Refactoring is used to improve security fix quality
Potential for automated tools to support refactoring during security fixes
Abstract
Third-party library dependencies are commonplace in today's software development. With the growing threat of security vulnerabilities, applying security fixes in a timely manner is important to protect software systems. As such, the community developed a list of software and hardware weakness known as Common Weakness Enumeration (CWE) to assess vulnerabilities. Prior work has revealed that maintenance activities such as refactoring code potentially correlate with security-related aspects in the source code. In this work, we explore the relationship between refactoring and security by analyzing refactoring actions performed jointly with vulnerability fixes in practice. We conducted a case study to analyze 143 maven libraries in which 351 known vulnerabilities had been detected and fixed. Surprisingly, our exploratory results show that developers incorporate refactoring operations in…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Web Application Security Vulnerabilities · Software Reliability and Analysis Research
