Using Decision Tree Classifiers in Source Code Analysis to Recognize Algorithms: An Experiment with Sorting Algorithms

被引:8
|
作者
Taherkhani, Ahmad [1 ]
机构
[1] Aalto Univ, Dept Comp Sci & Engn, FI-00076 Aalto, Finland
来源
COMPUTER JOURNAL | 2011年 / 54卷 / 11期
基金
芬兰科学院;
关键词
algorithm recognition; decision tree classifier; C4; 5; algorithm; roles of variables;
D O I
10.1093/comjnl/bxr025
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
We discuss algorithm recognition (AR) and present a method for recognizing algorithms automatically from Java source code. The method consists of two phases. In the first phase, the recognizable algorithms are converted into the vectors of characteristics, which are computed based on static analysis of program code, including various statistics of language constructs and analysis of Roles of Variables in the target program. In the second phase, the algorithms are classified based on these vectors using the C4.5 decision tree classifier. We demonstrate the performance of the method by applying it to sorting algorithms. Using leave-one-out cross-validation technique, we have conducted an experimental evaluation of the classification performance showing that the average classification accuracy is 98.1% (the data set consisted of five different types of sorting algorithms). The results show the applicability and usefulness of roles of variables in AR, and illustrate that the C4.5 algorithm is a suitable decision tree classifier for our purpose. The limitations of the method are also discussed.
引用
收藏
页码:1845 / 1860
页数:16
相关论文
共 50 条
  • [1] Mining Patterns in Source Code Using Tree Mining Algorithms
    Pham, Hoang Son
    Nijssen, Siegfried
    Mens, Kim
    Di Nucci, Dario
    Molderez, Tim
    De Roover, Coen
    Fabry, Johan
    Zaytsev, Vadim
    [J]. Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), 2019, 11828 LNAI : 471 - 480
  • [2] Mining Patterns in Source Code Using Tree Mining Algorithms
    Pham, Hoang Son
    Nijssen, Siegfried
    Mens, Kim
    Di Nucci, Dario
    Molderez, Tim
    De Roover, Coen
    Fabry, Johan
    Zaytsev, Vadim
    [J]. DISCOVERY SCIENCE (DS 2019), 2019, 11828 : 471 - 480
  • [3] Pruning Decision Tree Using Genetic Algorithms
    Chen, Jie
    Wang, Xizhao
    Zhai, Junhai
    [J]. 2009 INTERNATIONAL CONFERENCE ON ARTIFICIAL INTELLIGENCE AND COMPUTATIONAL INTELLIGENCE, VOL III, PROCEEDINGS, 2009, : 244 - 248
  • [4] Computational Complexity Analysis of Decision Tree Algorithms
    Sani, Habiba Muhammad
    Lei, Ci
    Neagu, Daniel
    [J]. ARTIFICIAL INTELLIGENCE XXXV (AI 2018), 2018, 11311 : 191 - 197
  • [5] Investigating Evaluation Measures in Ant Colony Algorithms for Learning Decision Tree Classifiers
    Salama, Khalid M.
    Abdelbar, Ashraf M.
    Otero, Fernando E. B.
    [J]. 2015 IEEE SYMPOSIUM SERIES ON COMPUTATIONAL INTELLIGENCE (IEEE SSCI), 2015, : 1146 - 1153
  • [6] Recognizing Algorithms Using Language Constructs, Software Metrics and Roles of Variables: An Experiment with Sorting Algorithms
    Taherkhani, Ahmad
    Korhonen, Ari
    Malmi, Lauri
    [J]. COMPUTER JOURNAL, 2011, 54 (07): : 1049 - 1066
  • [7] FUZZY DECISION TREE ALGORITHMS
    CHANG, RLP
    PAVLIDIS, T
    [J]. IEEE TRANSACTIONS ON SYSTEMS MAN AND CYBERNETICS, 1977, 7 (01): : 28 - 35
  • [8] Source code obfuscation with genetic algorithms using LLVM code optimizations
    de la Torre, Juan Carlos
    Jareno, Javier
    Aragon-Jurado, Jose Miguel
    Varrette, Sebastien
    Dorronsoro, Bernabe
    [J]. LOGIC JOURNAL OF THE IGPL, 2024,
  • [9] Breast Cancer Classification using Decision Tree Algorithms
    Tarawneh, Omar
    Otair, Mohammed
    Husni, Moath
    Abuaddous, Hayfa Y.
    Tarawneh, Monther
    Almomani, Malek A.
    [J]. INTERNATIONAL JOURNAL OF ADVANCED COMPUTER SCIENCE AND APPLICATIONS, 2022, 13 (04) : 676 - 680
  • [10] Porting Decision Tree Algorithms to Multicore Using FastFlow
    Aldinucci, Marco
    Ruggieri, Salvatore
    Torquati, Massimo
    [J]. MACHINE LEARNING AND KNOWLEDGE DISCOVERY IN DATABASES, PT I: EUROPEAN CONFERENCE, ECML PKDD 2010, 2010, 6321 : 7 - 23