Problematic Code Clones Identification using Multiple Detection Results

被引:5
|
作者
Higo, Yoshiki [1 ]
Sawa, Ken-ichi [1 ]
Kusumoto, Shinji [1 ]
机构
[1] Osaka Univ, Grad Sch Informat Sci & Technol, Suita, Osaka 5650871, Japan
关键词
code clone; fault detection;
D O I
10.1109/APSEC.2009.30
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Most code clones are generated by copy-and paste programming. Copy-and-paste programming shortens a time required for implementation because pasted code is a template of the required functionality. However, it sometimes brings on new bugs to the source code. After copy-and-paste, pasted code is somewhat changed fitting for the context of the region surrounding the pasted code. For example, some identifiers are replaced with other identifiers or a few statements are inserted, deleted, or changed. If such modifications are incorrectly performed, bugs occur in code clones. However, not all code clones are problematic, many code clones have decent reasons for their existence. Consequently, simple code clone detection is inefficient for identifying problematic code clones. Firstly, this paper proposes a classification scheme for dividing problematic code clones from non problematic ones. Secondly, it proposes a method for extracting specific code clones classified as problematic ones. Thirdly, it presents results of case studies conducted for evaluating the proposed method. The proposed method uses multiple code clone detection tools, and it doesn't directly analyze program source code. After multiple detections, simple operations are performed to extract code clones that are likely to be problematic. In the case studies conducted on an open source software system, the proposed method could actually identify 22 problematic code clones.
引用
收藏
页码:365 / 372
页数:8
相关论文
共 50 条
  • [1] To Enhance the Code Clone Detection Algorithm by using Hybrid Approach for detection of code clones
    Roopam
    Singh, Gurpreet
    2017 INTERNATIONAL CONFERENCE ON INTELLIGENT COMPUTING AND CONTROL SYSTEMS (ICICCS), 2017, : 192 - 198
  • [2] On detection of gapped code clones using gap locations
    Ueda, Y
    Kamiya, T
    Kusumoto, S
    Inoue, K
    APSEC 2002: NINTH ASIA PACIFIC SOFTWARE ENGINEERING CONFERENCE, 2002, : 327 - 336
  • [3] Multilingual Detection of Code Clones Using ANTLR Grammar Definitions
    Semura, Yuichi
    Yoshida, Norihiro
    Choi, Eunjong
    Inoue, Katsuro
    2018 25TH ASIA-PACIFIC SOFTWARE ENGINEERING CONFERENCE (APSEC 2018), 2018, : 673 - 677
  • [4] A detection framework for semantic code clones and obfuscated code
    Sheneamer, Abdullah
    Roy, Swarup
    Kalita, Jugal
    EXPERT SYSTEMS WITH APPLICATIONS, 2018, 97 : 405 - 420
  • [5] Scalable and accurate detection of code clones
    S. Sargsyan
    Sh. Kurmangaleev
    A. Belevantsev
    A. Avetisyan
    Programming and Computer Software, 2016, 42 : 27 - 33
  • [6] Scalable and Accurate Detection of Code Clones
    Sargsyan, S.
    Kurmangaleev, Sh.
    Belevantsev, A.
    Avetisyan, A.
    PROGRAMMING AND COMPUTER SOFTWARE, 2016, 42 (01) : 27 - 33
  • [7] A code obfuscation framework using code clones
    Kulkarni, Aniket
    Metta, Ravindra
    22nd International Conference on Program Comprehension, ICPC 2014 - Proceedings, 2014, : 295 - 299
  • [8] Investigating Vector-based Detection of Code Clones Using BigCloneBench
    Yokoi, Kazuki
    Choi, Eunjong
    Yoshida, Norihiro
    Inoue, Katsuro
    2018 25TH ASIA-PACIFIC SOFTWARE ENGINEERING CONFERENCE (APSEC 2018), 2018, : 699 - 700
  • [9] EncCD: A Framework for Efficient Detection of Code Clones
    Khan, Minhaj
    INTERNATIONAL ARAB JOURNAL OF INFORMATION TECHNOLOGY, 2019, 16 (05) : 947 - 952
  • [10] Code Clones Detection Using Machine Learning Technique: Support Vector Machine
    Jadon, Shruti
    2016 IEEE INTERNATIONAL CONFERENCE ON COMPUTING, COMMUNICATION AND AUTOMATION (ICCCA), 2016, : 299 - 303