Common refactorings, a dependency graph and some code smells: an empirical study of Java OSS

S. Counsell, Y. Hassoun, G. Loizou, R. Najjar
{"title":"Common refactorings, a dependency graph and some code smells: an empirical study of Java OSS","authors":"S. Counsell, Y. Hassoun, G. Loizou, R. Najjar","doi":"10.1145/1159733.1159777","DOIUrl":null,"url":null,"abstract":"Refactoring, as a software engineering discipline has emerged over recent years to become an important aspect of maintaining software. Refactoring refers to the restructuring of software according to specific mechanics and principles. In this paper, we describe an analysis of the results from a tool whose purpose was to identify and extract refactorings from seven open-source Java systems. In particular, we analyzed the mechanics of the most commonly and least commonly applied refactorings to try and account for their frequency. Results showed the most common refactorings of the fifteen coined a 'Gang of Six', to be generally those with a high in-degree and low out-degree when mapped on a dependency graph; the same refactorings also featured strongly in the remedying of bad code smells. Remarkably and surprisingly, inheritance and encapsulationbased refactorings were found to have been applied relatively infrequently - we offer explanations for why this may be the case. The paper thus identifies 'core' refactorings central to many of the changes made by developers on open-source systems. While we can not guarantee that developers consciously undertake refactoring in any sense, the empirical results demonstrate that simple renaming and moving fields/methods between classes are common components of open-source system re-engineering. From a wider software engineering perspective, knowledge of what a modification will incur in likely sub-tasks is of value to developers whether working on open-source or other forms of software.","PeriodicalId":201305,"journal":{"name":"International Symposium on Empirical Software Engineering","volume":"184 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2006-09-21","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"43","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"International Symposium on Empirical Software Engineering","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/1159733.1159777","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 43

Abstract

Refactoring, as a software engineering discipline has emerged over recent years to become an important aspect of maintaining software. Refactoring refers to the restructuring of software according to specific mechanics and principles. In this paper, we describe an analysis of the results from a tool whose purpose was to identify and extract refactorings from seven open-source Java systems. In particular, we analyzed the mechanics of the most commonly and least commonly applied refactorings to try and account for their frequency. Results showed the most common refactorings of the fifteen coined a 'Gang of Six', to be generally those with a high in-degree and low out-degree when mapped on a dependency graph; the same refactorings also featured strongly in the remedying of bad code smells. Remarkably and surprisingly, inheritance and encapsulationbased refactorings were found to have been applied relatively infrequently - we offer explanations for why this may be the case. The paper thus identifies 'core' refactorings central to many of the changes made by developers on open-source systems. While we can not guarantee that developers consciously undertake refactoring in any sense, the empirical results demonstrate that simple renaming and moving fields/methods between classes are common components of open-source system re-engineering. From a wider software engineering perspective, knowledge of what a modification will incur in likely sub-tasks is of value to developers whether working on open-source or other forms of software.
常见重构、依赖关系图和一些代码气味:Java OSS的实证研究
重构作为一门软件工程学科,近年来已经成为维护软件的一个重要方面。重构是指按照特定的机制和原则对软件进行重构。在本文中,我们描述了对一个工具结果的分析,该工具的目的是从七个开源Java系统中识别和提取重构。特别地,我们分析了最常用和最不常用的重构机制,试图解释它们的频率。结果显示,在这15个重构中,最常见的重构被称为“六人帮”,通常是那些在依赖关系图上具有高入度和低出度的重构;同样的重构在修复不良代码气味方面也发挥了重要作用。值得注意且令人惊讶的是,我们发现基于继承和封装的重构应用相对较少——我们会解释为什么会出现这种情况。因此,本文确定了开发人员在开源系统上所做的许多更改的“核心”重构。虽然我们不能保证开发人员在任何意义上都有意识地进行重构,但实证结果表明,简单的重命名和在类之间移动字段/方法是开源系统重构的常见组件。从更广泛的软件工程角度来看,对于开发人员来说,无论是在开源软件上还是在其他形式的软件上工作,了解修改将在可能的子任务中引起什么是有价值的。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信