Published in Expert Systems with Applications, 2024
• We summarize the concerns of developers related to their decision-making toward code smell criticality, including code design and implementation, code evolution, code functionality, and developer-related factors.
• To our knowledge, we propose the first work that quantifies the gap between XAI explanation and developers’ expectations in code smell prioritization. The expectation could be huge even if all their concerns are captured by the features, e.g., more than 40% of the concerns of the developers do not appear in simple explanations.
• We discover that the gap could be narrowed to an acceptable extent by adapting to developers’ when selecting features, i.e., preserving the features related to the major concerns of developers as much as possible.
• We conclude that if the gap is narrowed, inspecting the top 3 to 5 important features is sufficient to meet the developers’ expectations in explaining issues with simpler causes such as Spaghetti Code, but the explanation may be less helpful for novice users in issues with complex or controversial causes such as Shotgun Surgery.
• We outline the challenges and opportunities of XAI for code smell prioritization and SQA in terms of feature engineering, problem definition, and XAI methodologies.
Recommended citation: Zijie Huang, Huiqun Yu*, Guisheng Fan*, Zhiqing Shao, Mingchen Li, Yuguo Liang. Aligning XAI explanations with software developers’ expectations: A case study with code smell prioritization. Expert Systems with Applications, 2024, 238: 121640. https://doi.org/10.1016/j.eswa.2023.121640. [CCF-C/SCI-Q1]
Download Paper | Download Bibtex