arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1703.08803cs.SEcs.HC
收藏

GUI设计气味的自动检测:以Blob气味为例

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

Valéria Lelli, Arnaud Blouin, Benoit Baudry, Fabien Coulon, Olivier Beaudoux

摘要:

图形用户界面(GUI)强烈依赖于事件驱动编程:小部件将捕获用户交互的GUI事件发送到称为控制器的专用对象。控制器实现了几个GUI侦听器,这些侦听器处理这些事件以生成GUI命令。在这项工作中,我们进行了13个大型Java Swing开源软件系统的实证研究。我们研究在何种程度上的GUI命令,GUI监听器可以产生的GUI监听器代码的变化和故障倾向的影响。我们确定了一种新型的设计气味,称为Blob侦听器,其特征在于可以产生两个以上的GUI命令的GUI侦听器。我们发现,21%的分析GUI控制器是Blob侦听器。我们提出了一个系统的静态代码分析过程,搜索Blob监听器,我们在InspectorGuidget中实现。我们进行了六个软件系统,我们手动确定37个实例的Blob监听器的实验。InspectorGuidget成功检测到37个Blob侦听器中的36个。实验结果表明,该方法的准确率为97.37%,召回率为97.59%.最后,我们提出了避免使用Blob侦听器的编码实践。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑