Technical Debt (TD) refers to the situation where developers make trade-offs to achieve short-term goals at the expense of long-term code quality, which can have a negative impact on the quality of software systems. In the context of code review, such sub-optimal implementations have chances to be timely resolved during the review process before the code is merged. Therefore, we could consider them as Potential Technical Debt (PTD) since PTD will evolve into TD when it is injected into software systems without being resolved. To date, little is known about the extent to which PTD is identified in code reviews. To this end, we conducted an exploratory study in an attempt to understand the nature of PTD in code reviews and track down the resolution of PTD after being identified. We randomly collected 2,030 review comments from the Nova project of OpenStack and the Qt Base project of Qt. We then manually checked these review comments, and obtained 163 PTD-related review comments for further analysis. Our results show that: (1) PTD can be identified in code reviews but is not prevalent. (2) Design, defect, documentation, requirement, test, and code PTD are identified in code reviews, in which code and documentation PTD are the dominant. (3) 81.0% of the PTD identified in code reviews has been resolved by developers, and 78.0% of the resolved TD was resolved by developers within a week. (4) Code refactoring is the main practice used by developers to resolve the PTD identified in code reviews. Our findings indicate that: (1) review-based detection of PTD is seen as one of the trustworthy mechanisms in development, and (2) there is still a significant proportion of PTD (19.0%) remaining unresolved when injected into the software systems. Practitioners and researchers should establish effective strategies to manage and resolve PTD in development.
翻译:技术债务(TD)是指开发商以牺牲长期代码质量为代价为实现短期目标而作出取舍以牺牲长期代码质量而牺牲短期目标的情况,在代码审查方面,这种次最佳执行有可能在代码合并前的审查过程中及时解决,因此,我们可以将其视为潜在技术债务(PTD),因为当将PTD注入软件系统时,这种潜在技术债务(PTD)将演变成TD(TD),而没有得到解决。迄今为止,对于在代码审查中确定PTD(PTD)的未解决程度,人们还很少知道。为此,我们进行了一项探索性研究,试图在代码审查中了解PTD(PTD)的透明性审查的性质,并在查明后跟踪PTD(PTD)的解决方案。