User Interface Design Smell: Automatic Detection and Refactoring of Blob Listeners - Archive ouverte HAL Accéder directement au contenu
Pré-Publication, Document De Travail Année : 2017

User Interface Design Smell: Automatic Detection and Refactoring of Blob Listeners

Résumé

Context. User Interfaces (UIs) intensively rely on event-driven programming: widgets send UI events, which capture users' interactions, to dedicated objects called controllers. Controllers use several UI listeners that handle these events to produce UI commands. Objective. The first objective of this work is to show empirical evidences that the code that describes and controls UIs can be affected by design smells, as any software artifact. The second objective is to show that because UI code is intertwined with the rest of the code, specific code analysis procedures are required to detect and refactor UI design smells. Method. We conducted an empirical study on four large Java Swing and SWT open-source software systems: Eclipse, JabRef, ArgouML, and FreeCol. We study to what extent the number of UI commands that a UI listener can produce has an impact on the change-and fault-proneness of the UI listener code. Results. We identify a new type of design smell, called Blob listener that characterizes UI listeners that can produce more than two UI commands. We propose a systematic static code analysis procedure that searches for Blob listener that we implement in InspectorGuidget. We conducted experiments on the four software systems for which we manually identified 53 instances of Blob listener. InspectorGuidget successfully detected 52 Blob listeners out of 53. The results exhibit a precision of 81.25 % and a recall of 98.11 %. We then developed a semi-automatically and behavior-preserving refactoring process to remove Blob listeners. 49.06 % of the 53 Blob listeners were automatically refactored. Patches for JabRef, and FreeCol have been accepted and merged. Discussions with developers of the four software systems assess the relevance of the Blob listener. Conclusion. This work shows that UI code also suffers from design smells that have to be identified and characterized. We argue that studies have to be conducted to find other UI design smells and tools that analyze UI code must be developed.
Fichier principal
Vignette du fichier
main.pdf (426.3 Ko) Télécharger le fichier
Origine : Fichiers produits par l'(les) auteur(s)

Dates et versions

hal-01499106 , version 1 (30-03-2017)
hal-01499106 , version 2 (11-04-2017)
hal-01499106 , version 3 (18-04-2017)
hal-01499106 , version 4 (25-05-2018)
hal-01499106 , version 5 (29-05-2018)

Identifiants

  • HAL Id : hal-01499106 , version 2

Citer

Arnaud Blouin, Valéria Lelli, Benoit Baudry, Fabien Coulon. User Interface Design Smell: Automatic Detection and Refactoring of Blob Listeners. 2017. ⟨hal-01499106v2⟩
1057 Consultations
1381 Téléchargements

Partager

Gmail Facebook X LinkedIn More