arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2205.02208cs.SE
收藏

WeakSATD:检测弱自承认技术债务

WeakSATD: Detecting Weak Self-admitted Technical Debt

Barbara Russo, Matteo Camilli, Moritz Mock

摘要:

加速发展可能会产生技术债务,即,不完全正确的代码,使其正确的努力随着时间的推移而增加,这是一种兴趣。开发人员可能会意识到债务,因为他们在代码注释中承认了这一点。文献报道,这种自我承认的技术债务在程序中存在很长一段时间,但目前还不清楚其对代码质量的长期影响。我们认为,自我承认的技术债务包含了一些不同的弱点,可能会影响程序的安全性。因此,债务不偿还的时间越长,弱点被利用的风险就越高。为了讨论我们的主张并提高开发人员对未偿还的自我承认的技术债务的脆弱性的认识,我们探索了Chromium C代码中的自我承认的技术债务,以检测任何已知的弱点。在这个初步的研究中,我们首先挖掘常见的弱点枚举存储库来定义自动检测和修复弱代码的算法。然后,我们解析C代码,以找到自我承认的技术债务和它所引用的代码块。最后,我们使用分析来发现与自我承认的技术债务相关的弱代码片段,并向开发人员推荐潜在的缓解措施。这些知识可以用来优先考虑自我承认的技术债务进行修复。已经开发了一个原型并应用于Chromium代码。初步研究结果表明,55%的技术债务代码包含14种不同类型的弱代码。

英文摘要:

Speeding up development may produce technical debt, i.e., not-quite-right code for which the effort to make it right increases with time as a sort of interest. Developers may be aware of the debt as they admit it in their code comments. Literature reports that such a self-admitted technical debt survives for a long time in a program, but it is not yet clear its impact on the quality of the code in the long term. We argue that self-admitted technical debt contains a number of different weaknesses that may affect the security of a program. Therefore, the longer a debt is not paid back the higher is the risk that the weaknesses can be exploited. To discuss our claim and rise the developers' awareness of the vulnerability of the self-admitted technical debt that is not paid back, we explore the self-admitted technical debt in the Chromium C-code to detect any known weaknesses. In this preliminary study, we first mine the Common Weakness Enumeration repository to define heuristics for the automatic detection and fix of weak code. Then, we parse the C-code to find self-admitted technical debt and the code block it refers to. Finally, we use the heuristics to find weak code snippets associated to self-admitted technical debt and recommend their potential mitigation to developers. Such knowledge can be used to prioritize self-admitted technical debt for repair. A prototype has been developed and applied to the Chromium code. Initial findings report that 55\% of self-admitted technical debt code contains weak code of 14 different types.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑