• DocumentCode
    1991633
  • Title

    Code Smell Detecting Tool and Code Smell-Structure Bug Relationship

  • Author

    Danphitsanuphan, Phongphan ; Suwantada, Thanitta

  • Author_Institution
    Dept. of Comput. & Inf. Sci., King Mongkut´´s Univ. of Technol., Bangkok, Thailand
  • fYear
    2012
  • fDate
    27-30 May 2012
  • Firstpage
    1
  • Lastpage
    5
  • Abstract
    This paper proposes an approach for detecting the so- called bad smells in software known as Code Smell. In considering software bad smells, object-oriented software metrics were used to detect the source code whereby Eclipse Plugins were developed for detecting in which location of Java source code the bad smell appeared so that software refactoring could then take place. The detected source code was classified into 7 types: Large Class, Long Method, Parallel Inheritance Hierarchy, Long Parameter List, Lazy Class, Switch Statement, and Data Class. This work conducted analysis by using 323 java classes to ascertain the relationship between the code smell and structural defects of software by using the data mining techniques of Naive Bayes and Association Rules. The result of the Naive Bayes test showed that the Lazy Class caused structural defects in DLS, DE, and Se. Also, Data Class caused structural defects in UwF, DE, and Se, while Long Method, Large Class, Data Class, and Switch Statement caused structural defects in UwF and Se. Finally, Parallel Inheritance Hierarchy caused structural defects in Se. However, Long Parameter List caused no structural defects whatsoever. The results of the Association Rules test found that the Lazy Class code smell caused structural defects in DLS and DE, which corresponded to the results of the Naive Bayes test.
  • Keywords
    Bayes methods; Java; data mining; object-oriented programming; software maintenance; software metrics; Eclipse plugins; Java source code; association rules; code smell detecting tool; code smell structure bug relationship; data class; data mining techniques; large class; lazy class; long method; long parameter list; naive Bayes; object-oriented software metrics; parallel inheritance hierarchy; software bad smells; software refactoring; switch statement; Association rules; Computer bugs; Educational institutions; Java; Software; Software metrics;
  • fLanguage
    English
  • Publisher
    ieee
  • Conference_Titel
    Engineering and Technology (S-CET), 2012 Spring Congress on
  • Conference_Location
    Xian
  • Print_ISBN
    978-1-4577-1965-3
  • Type

    conf

  • DOI
    10.1109/SCET.2012.6342082
  • Filename
    6342082