# Automatic Detection of GUI Design Smells: The Case of Blob Listener

**Authors:** Val\'eria Lelli, Arnaud Blouin, Benoit Baudry, Fabien Coulon, and Olivier Beaudoux

arXiv: 1703.08803 · 2017-03-28

## TL;DR

This paper introduces Blob listeners, a new GUI design smell in Java Swing applications, and presents a static analysis tool that effectively detects them to improve GUI code quality.

## Contribution

It identifies Blob listeners as a novel GUI design smell, develops a static analysis method, and demonstrates high detection accuracy in real-world software.

## Key findings

- 21% of GUI controllers are Blob listeners
- InspectorGuidget detects 97.37% of Blob listeners
- Blob listeners are linked to higher fault-proneness

## Abstract

Graphical User Interfaces (GUIs) intensively rely on event-driven programming: widgets send GUI events, which capture users' interactions, to dedicated objects called controllers. Controllers implement several GUI listeners that handle these events to produce GUI commands. In this work, we conducted an empirical study on 13 large Java Swing open-source software systems. We study to what extent the number of GUI commands that a GUI listener can produce has an impact on the change-and fault-proneness of the GUI listener code. We identify a new type of design smell, called Blob listener that characterizes GUI listeners that can produce more than two GUI commands. We show that 21 % of the analyzed GUI controllers are Blob listeners. We propose a systematic static code analysis procedure that searches for Blob listener that we implement in InspectorGuidget. We conducted experiments on six software systems for which we manually identified 37 instances of Blob listener. InspectorGuidget successfully detected 36 Blob listeners out of 37. The results exhibit a precision of 97.37 % and a recall of 97.59 %. Finally, we propose coding practices to avoid the use of Blob listeners.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1703.08803/full.md

## Figures

5 figures with captions in the complete paper: https://tomesphere.com/paper/1703.08803/full.md

## References

42 references — full list in the complete paper: https://tomesphere.com/paper/1703.08803/full.md

---
Source: https://tomesphere.com/paper/1703.08803