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

使用文件级弱标注的多粒度软件标注

Multi-granular Software Annotation using File-level Weak Labelling

Cezar Sas, Andrea Capiluppi

AI总结:

本文提出利用项目级标签进行弱标注并借助层次聚合实现源代码文件、包及整个项目的多粒度自动标注,实验表明该方法可正确标注50%的文件和超过50%的包,并能平均为每个项目发现三个新的相关标签。

摘要:

开发人员最耗时的任务之一是理解新的代码库。一种有效的方法是用有意义的标注来标记源代码文件,这可以帮助开发人员更快地理解代码库的内容和功能。然而,现有的大多数代码标注解决方案都集中在项目级分类上:手动标注单个文件耗时、容易出错且难以扩展。本文提出的工作旨在通过利用项目级标签来自动化文件标注;并使用文件级标注来标注更大粒度的项目,例如包和整个项目。我们提出了一种新颖的方法,使用弱标注方法和随后的层次聚合来标注源代码文件。我们研究了这种方法在实现软件项目多粒度标注方面是否有效,从而帮助开发人员更快地理解代码库的内容和功能。我们的评估结合了人工评估和自动化指标来评价标注质量。我们的方法正确标注了50%的文件和超过50%的包。此外,在文件级捕获的信息使我们能够为任何给定项目平均识别出三个新的相关标签。我们可以得出结论,所提出的方法是一种方便且有前景的方式,可以为文件生成有噪声(不精确)的标注。此外,层次聚合有效地保留了在文件级捕获的信息,并且可以将其传播到包和整个项目本身。

英文摘要:

One of the most time-consuming tasks for developers is the comprehension of new code bases. An effective approach to aid this process is to label source code files with meaningful annotations, which can help developers understand the content and functionality of a code base quicker. However, most existing solutions for code annotation focus on project-level classification: manually labelling individual files is time-consuming, error-prone and hard to scale. The work presented in this paper aims to automate the annotation of files by leveraging project-level labels; and using the file-level annotations to annotate items at larger levels of granularity, for example, packages and a whole project. We propose a novel approach to annotate source code files using a weak labelling approach and a subsequent hierarchical aggregation. We investigate whether this approach is effective in achieving multi-granular annotations of software projects, which can aid developers in understanding the content and functionalities of a code base more quickly. Our evaluation uses a combination of human assessment and automated metrics to evaluate the annotations' quality. Our approach correctly annotated 50% of files and more than 50\% of packages. Moreover, the information captured at the file-level allowed us to identify, on average, three new relevant labels for any given project. We can conclude that the proposed approach is a convenient and promising way to generate noisy (not precise) annotations for files. Furthermore, hierarchical aggregation effectively preserves the information captured at file-level, and it can be propagated to packages and the overall project itself.

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

↑