使用ToxiCR自动识别有毒代码评审
Automated Identification of Toxic Code Reviews Using ToxiCR
摘要:
在软件开发互动过程中的有害对话可能会对自由和开放源码软件(FOSS)开发项目产生严重影响。例如,有害对话的受害者可能会害怕表达自己,因此失去动力,最终可能会离开项目。自动过滤有害对话可帮助自由和开放源码软件社区保持其成员之间的健康互动。然而,现成的毒性检测器在软件工程(SE)数据集上表现不佳,例如从代码评审评论中策划的数据集。为了应对这一挑战,我们提出了ToxiCR,一个基于监督学习的毒性识别工具,用于代码评审交互。ToxiCR包括选择十种监督学习算法之一的选项,选择文本矢量化技术的选项,八个预处理步骤,以及19,571个代码评审评论的大规模标记数据集。这八个预处理步骤中有两个是SE域特定的。通过对预处理步骤和矢量化技术的各种组合的模型进行严格评估,我们已经确定了数据集的最佳组合,提高了95.8%的准确率和88.9%的F1得分。ToxiCR在我们的数据集上显著优于现有的毒性检测器。我们已经发布了我们的数据集,预训练模型,评估结果和源代码,可在https://github.com/WSU-SEAL/ToxiCR上公开获取
英文摘要:
Toxic conversations during software development interactions may have serious repercussions on a Free and Open Source Software (FOSS) development project. For example, victims of toxic conversations may become afraid to express themselves, therefore get demotivated, and may eventually leave the project. Automated filtering of toxic conversations may help a FOSS community to maintain healthy interactions among its members. However, off-the-shelf toxicity detectors perform poorly on Software Engineering (SE) datasets, such as one curated from code review comments. To encounter this challenge, we present ToxiCR, a supervised learning-based toxicity identification tool for code review interactions. ToxiCR includes a choice to select one of the ten supervised learning algorithms, an option to select text vectorization techniques, eight preprocessing steps, and a large-scale labeled dataset of 19,571 code review comments. Two out of those eight preprocessing steps are SE domain specific. With our rigorous evaluation of the models with various combinations of preprocessing steps and vectorization techniques, we have identified the best combination for our dataset that boosts 95.8% accuracy and 88.9% F1 score. ToxiCR significantly outperforms existing toxicity detectors on our dataset. We have released our dataset, pre-trained models, evaluation results, and source code publicly available at: https://github.com/WSU-SEAL/ToxiCR
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。