DACOS-A Manually Annotated Dataset of Code Smells

要約

研究者は、多くのコードの匂いの主観性に対抗するために、コードの匂いの検出に機械学習技術を適用しています。
このようなアプローチでは、トレーニングとベンチマークのために、手動で注釈を付けた大規模なデータセットが必要です。
既存の文献では、いくつかのデータセットが提供されています。
ただし、サイズが小さく、さらに重要なことに、主観的なコード スニペットに焦点を当てていません。
このホワイト ペーパーでは、5,192 のコード スニペットに対する 10,267 の注釈を含む、手動で注釈が付けられたデータセットである DACOS を紹介します。
このデータセットは、多面的な抽象化、複雑なメソッド、および長いパラメーター リストの 3 種類のコードの匂いを異なる粒度で対象としています。
データセットは 2 つのフェーズで作成されます。
最初のフェーズでは、匂いの検出に使用されるメトリックのしきい値を決定することで、潜在的に主観的なコード スニペットを特定するのに役立ちます。
第 2 段階では、潜在的に主観的なスニペットの注釈を収集します。
また、最初のフェーズで特定されたしきい値を使用して、完全に無害で完全に悪臭のあるスニペットを含む拡張データセット DACOSX も提供します。
アノテーターがスニペットを 1 つずつ表示してマークし、提供されたアノテーションを記録するのに役立つ Web アプリケーションである TagMan を開発しました。
データセットと 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.

arxiv情報

著者 Himesh Nandani,Mootez Saad,Tushar Sharma
発行日 2023-03-15 16:13:40+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.LG, cs.PL, cs.SE パーマリンク