A Lightweight Approach for Detection of Code Smells
详细信息    查看全文
  • 作者:Ghulam Rasool ; Zeeshan Arshad
  • 关键词:Code smells ; Code flaws ; SQL ; Regular expressions ; Refactoring
  • 刊名:Arabian Journal for Science and Engineering
  • 出版年:2017
  • 出版时间:February 2017
  • 年:2017
  • 卷:42
  • 期:2
  • 页码:483-506
  • 全文大小:
  • 刊物类别:Engineering
  • 刊物主题:Engineering, general; Science, Humanities and Social Sciences, multidisciplinary;
  • 出版者:Springer Berlin Heidelberg
  • ISSN:2191-4281
  • 卷排序:42
文摘
The accurate removal of code smells from source code supports activities such as refactoring, maintenance, examining code quality etc. A large number of techniques and tools are presented for the specification and detection of code smells from source code in the last decade, but they still lack accuracy and flexibility due to different interpretations of code smell definitions. Most techniques target just detection of few code smells and render different results on the same examined systems due to different informal definitions and threshold values of metrics used for detecting code smells. We present a flexible and lightweight approach based on multiple searching techniques for the detection and visualization of all 22 code smells from source code of multiple languages. Our approach is lightweight and flexible due to application of SQL queries on intermediate repository and use of regular expressions on selected source code constructs. The concept of approach is validated by performing experiments on eight publicly available open source software projects developed using Java and C# programming languages, and results are compared with existing approaches. The accuracy of presented approach varies from 86–97 % on the eight selected software projects.

© 2004-2018 中国地质图书馆版权所有 京ICP备05064691号 京公网安备11010802017129号

地址:北京市海淀区学院路29号 邮编:100083

电话:办公室:(+86 10)66554848;文献借阅、咨询服务、科技查新:66554700