ToxiSpanSE: An Explainable Toxicity Detection in Code Review Comments

07/07/2023
by   Jaydeb Saker, et al.
0

Background: The existence of toxic conversations in open-source platforms can degrade relationships among software developers and may negatively impact software product quality. To help mitigate this, some initial work has been done to detect toxic comments in the Software Engineering (SE) domain. Aims: Since automatically classifying an entire text as toxic or non-toxic does not help human moderators to understand the specific reason(s) for toxicity, we worked to develop an explainable toxicity detector for the SE domain. Method: Our explainable toxicity detector can detect specific spans of toxic content from SE texts, which can help human moderators by automatically highlighting those spans. This toxic span detection model, ToxiSpanSE, is trained with the 19,651 code review (CR) comments with labeled toxic spans. Our annotators labeled the toxic spans within 3,757 toxic CR samples. We explored several types of models, including one lexicon-based approach and five different transformer-based encoders. Results: After an extensive evaluation of all models, we found that our fine-tuned RoBERTa model achieved the best score with 0.88 F1, 0.87 precision, and 0.93 recall for toxic class tokens, providing an explainable toxicity classifier for the SE domain. Conclusion: Since ToxiSpanSE is the first tool to detect toxic spans in the SE domain, this tool will pave a path to combat toxicity in the SE community.

READ FULL TEXT
research
09/20/2020

A Benchmark Study of the Contemporary Toxicity Detectors on Software Engineering Interactions

Automated filtering of toxic conversations may help an Open-source softw...
research
02/26/2022

Automated Identification of Toxic Code Reviews: How Far Can We Go?

Toxic conversations during software development interactions may have se...
research
10/13/2020

ReviewRobot: Explainable Paper Review Generation based on Knowledge Synthesis

To assist human review process, we build a novel ReviewRobot to automati...
research
06/04/2021

Towards offensive language detection and reduction in four Software Engineering communities

Software Engineering (SE) communities such as Stack Overflow have become...
research
03/24/2021

Exploiting the Unique Expression for Improved Sentiment Analysis in Software Engineering Text

Sentiment analysis on software engineering (SE) texts has been widely us...
research
09/16/2022

A Decade of Code Comment Quality Assessment: A Systematic Literature Review

Code comments are important artifacts in software systems and play a par...
research
01/11/2022

Automatic Detection and Analysis of Technical Debts in Peer-Review Documentation of R Packages

Technical debt (TD) is a metaphor for code-related problems that arise a...

Please sign up or login with your details

Forgot password? Click here to reset