首页    期刊浏览 2024年09月20日 星期五
登录注册

文章基本信息

  • 标题:God Class Refactoring Recommendation and Extraction Using Context based Grouping
  • 本地全文:下载
  • 作者:Tahmim Jeba ; Tarek Mahmud ; Pritom S. Akash
  • 期刊名称:International Journal of Information Technology and Computer Science
  • 印刷版ISSN:2074-9007
  • 电子版ISSN:2074-9015
  • 出版年度:2020
  • 卷号:12
  • 期号:5
  • 页码:14-37
  • DOI:10.5815/ijitcs.2020.05.02
  • 出版社:MECS Publisher
  • 摘要:Code smells are the indicators of the flaws in the design and development phases that decrease the maintainability and reusability of a system. A system with uneven distribution of responsibilities among the classes is generated by one of the most hazardous code smells called God Class. To address this threatening issue, an extract class refactoring technique is proposed that incorporates both cohesion and contextual aspects of a class. In this work, greater emphasis was provided on the code documentation to extract classes with higher contextual similarity. Firstly, the source code is analyzed to generate a set of cluster of extracted methods. Secondly, another set of clusters is generated by analyzing code documentation. Then, merging these two, a final cluster set is formed to extract the God Class. Finally, an automatic refactoring approach is also followed to build newly identified classes. Using two different metrics, a comparative result analysis is provided where it is shown that the cohesion among the classes is increased if the context is added in the refactoring process. Moreover, a manual inspection is conducted to ensure that the methods of the refactored classes are contextually organized. This recommendation of God Class extraction can significantly help the developers in minimizing the burden of refactoring on own their own and maintaining the software systems.
  • 关键词:Code Smell;God Class;Extract Class Refactoring;Hierarchical Clustering;Cluster Composition;Automatic Refactoring
国家哲学社会科学文献中心版权所有