arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2303.08729cs.SEcs.AIcs.LGcs.PL
收藏

DACOS-A手工标注的代码气味数据集

DACOS-A Manually Annotated Dataset of Code Smells

Dalhousie University(达尔豪斯大学)

Himesh Nandani, Mootez Saad, Tushar Sharma

摘要:

研究人员将机器学习技术应用于代码气味检测,以对抗许多代码气味的主观性。这种方法需要一个大型的、手动注释的数据集来进行训练和基准测试。现有的文献提供了一些数据集;然而,它们的大小很小,更重要的是,不关注主观代码片段。在本文中,我们介绍了DACOS,这是一个手动注释的数据集,包含5,192个代码片段的10,267个注释。该数据集针对三种不同粒度的代码气味:多方面的抽象,复杂的方法和长参数列表。数据集的创建分为两个阶段。第一阶段通过确定用于检测气味的指标阈值来帮助我们识别潜在主观的代码片段。第二阶段收集潜在主观片段的注释。我们还提供了一个扩展的数据集DACOSX,其中包括使用第一阶段确定的阈值确定的绝对良性和绝对臭的片段。我们已经开发了TagMan,一个Web应用程序来帮助注释者逐个查看和标记片段,并记录所提供的注释。我们使数据集和Web应用程序可公开访问。该数据集将帮助研究人员研究气味检测技术,以建立相关的和上下文感知的机器学习模型。

英文摘要:

Researchers apply machine-learning techniques for code smell detection to counter the subjectivity of many code smells. Such approaches need a large, manually annotated dataset for training and benchmarking. Existing literature offers a few datasets; however, they are small in size and, more importantly, do not focus on the subjective code snippets. In this paper, we present DACOS, a manually annotated dataset containing 10,267 annotations for 5,192 code snippets. The dataset targets three kinds of code smells at different granularity: multifaceted abstraction, complex method, and long parameter list. The dataset is created in two phases. The first phase helps us identify the code snippets that are potentially subjective by determining the thresholds of metrics used to detect a smell. The second phase collects annotations for potentially subjective snippets. We also offer an extended dataset DACOSX that includes definitely benign and definitely smelly snippets by using the thresholds identified in the first phase. We have developed TagMan, a web application to help annotators view and mark the snippets one-by-one and record the provided annotations. We make the datasets and the web application accessible publicly. This dataset will help researchers working on smell detection techniques to build relevant and context-aware machine-learning models.

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

↑