Do Code Smells Impact the Effort of Different Maintenance Programming Activities?

Do Code Smells Impact the Effort of Different Maintenance Programming Activities?
复制标题

代码异味会影响不同维护编程活动的工作吗?

DOI:
10.1109/saner.2016.103
复制
发表时间:
2016
期刊:
2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering (SANER)
影响因子:
--
通讯作者:
Yann
Yann
中科院分区:
--
文献类型:
--
作者:
Z. Soh;A. Yamashita;Foutse Khomh;Yann

文献摘要

被引文献

相似文献

迄今为止的实证研究表明,代码异味对文件级别的维护工作的影响相对较小。我们推测,之前的研究发现代码异味的影响较低,因为所考虑的工作是“纯粹的工作”,不区分开发人员活动的类型。在我们的研究中,我们研究了代码气味在活动级别的影响。活动的示例有:读取、编辑、搜索和导航,这些活动在维护期间对不同文件独立执行。我们推测,以不同代码气味的形式表示的结构属性确实会对执行某些类型的活动的工作量产生影响。为了验证这个猜想,我们重新审视了之前关于代码气味对维护工作影响的研究,使用相同的数据集,但考虑了活动工作量。聘请了六名专业开发人员在四个功能等效的 Java 系统上执行三项维护任务。每个开发人员执行两项维护任务。在维护任务期间,我们监控开发人员的日志。然后,我们定义一个注释模式来识别开发人员的活动并评估代码气味是否影响不同的维护活动。结果表明,不同的代码气味对活动工作量的影响不同。然而,为解决任务而执行的更改的大小对所有活动的影响比代码气味和文件大小更重要。虽然代码气味对编辑和导航工作的影响比文件大小更大,但文件大小对阅读和搜索活动的影响比代码气味更大。这些结果的一个主要含义是,如果代码气味确实影响某些类型活动的工作量,则意味着它们的影响取决于当前维护任务的类型,其中某些类型的活动将比其他类型的活动更占主导地位。
Empirical studies have shown so far that code smells have relatively low impact over maintenance effort at file level. We surmise that previous studies have found low effects of code smells because the effort considered is a "sheer-effort" that does not distinguish between the kinds of developers' activities. In our study, we investigate the effects of code smells at the activity level. Examples of activities are: reading, editing, searching, and navigating, which are performed independently over different files during maintenance. We conjecture that structural attributes represented in the form of different code smells do indeed have an effect on the effort for performing certain kinds of activities. To verify this conjecture, we revisit a previous study about the impact of code smell on maintenance effort, using the same dataset, but considering activity effort. Six professional developers were hired to perform three maintenance tasks on four functionally equivalent Java Systems. Each developer performs two maintenance tasks. During maintenance task, we monitor developers' logs. Then, we define an annotation schema to identify developers' activities and assess whether code smells affect different maintenance activities. Results show that different code smells affect differently activity effort. Yet, the size of the changes performed to solve the task impacts the effort of all activities more than code smells and file size. While code smells impact the editing and navigating effort more than file size, the file size impacts the reading and searching activities more than code smells. One major implication of these results is that if code smells indeed affect the effort of certain kinds of activities, it means that their effects are contingent on the type of maintenance task at hand, where some kinds of activities will become more predominant than others.