How to Improve Deep Learning for Software Analytics (a case study with code smell detection)

Rahul Yedida, Tim Menzies
2/2/2022
cs.SE

Official code: yrahul3910/code-smell-detection (6 stars, Python, last commit 2022-04-18).

Abstract

To reduce technical debt and make code more maintainable, it is important to be able to warn programmers about code smells. State-of-the-art code small detectors use deep learners, without much exploration of alternatives within that technology.

Show full abstract

One promising alternative for software analytics and deep learning is GHOST (from TSE'21) that relies on a combination of hyper-parameter optimization of feedforward neural networks and a novel oversampling technique to deal with class imbalance. The prior study from TSE'21 proposing this novel "fuzzy sampling" was somewhat limited in that the method was tested on defect prediction, but nothing else. Like defect prediction, code smell detection datasets have a class imbalance (which motivated "fuzzy sampling"). Hence, in this work we test if fuzzy sampling is useful for code smell detection. The results of this paper show that we can achieve better than state-of-the-art results on code smell detection with fuzzy oversampling. For example, for "feature envy", we were able to achieve 99+\% AUC across all our datasets, and on 8/10 datasets for "misplaced class". While our specific results refer to code smell detection, they do suggest other lessons for other kinds of analytics. For example: (a) try better preprocessing before trying complex learners (b) include simpler learners as a baseline in software analytics (c) try "fuzzy sampling" as one such baseline.

View on arXivView PDF

Code Implementations(1)

Code smell detection code and results

61PythonSep 14, 20214 years ago

Similar Papers

Cite this paper

@article{yedida2022improve,
  title  = {How to Improve Deep Learning for Software Analytics (a case study with code smell detection)},
  author = {Rahul Yedida and Tim Menzies},
  year   = {2022},
  eprint = {2202.01322},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2202.01322}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2202.01322.svg)](https://codeofpaper.com/paper/2202.01322)

Discussion