Detecting code clones with gaps by function applications

Tsubasa Matsushita, Isao Sasano

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Abstract

Code clones are pairs or groups of code segments which are identical or similar to each other. Generally the existence of code clones is considered to make it cumbersome to maintain the source code, so that various kinds of code clone detection tools have been developed. Simple ones divide the source code into a sequence of lines or tokens and find identical or similar sub-sequences. Differences among code clones, called gaps, may prevent clones from being detected or may make clones to be detected with being fragmented. In order to cope with gaps, various tools have been developed by using abstract syntax trees, comparing some metrics, or using program dependency graphs. In this paper we present a novel algorithm for detecting clones by focusing on gaps by function applications. Based on the algorithm we have implemented a tool for detecting code clones on programs written in Standard ML. Copyright is held by the owner/author(s).

LanguageEnglish
Title of host publicationPEPM 2017 - Proceedings of the 2017 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, co-located with POPL 2017
PublisherAssociation for Computing Machinery, Inc
Pages12-22
Number of pages11
ISBN (Electronic)9781450347211
DOIs
StatePublished - 2017 Jan 2
Event2017 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, PEPM 2017 - Paris, France
Duration: 2017 Jan 162017 Jan 17

Other

Other2017 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, PEPM 2017
CountryFrance
CityParis
Period17/1/1617/1/17

Keywords

  • Abstract syntax tree
  • Code clone
  • Function application
  • Gap

ASJC Scopus subject areas

  • Software
  • Computer Graphics and Computer-Aided Design
  • Computer Vision and Pattern Recognition

Cite this

Matsushita, T., & Sasano, I. (2017). Detecting code clones with gaps by function applications. In PEPM 2017 - Proceedings of the 2017 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, co-located with POPL 2017 (pp. 12-22). Association for Computing Machinery, Inc. DOI: 10.1145/3018882.3018892

Detecting code clones with gaps by function applications. / Matsushita, Tsubasa; Sasano, Isao.

PEPM 2017 - Proceedings of the 2017 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, co-located with POPL 2017. Association for Computing Machinery, Inc, 2017. p. 12-22.

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Matsushita, T & Sasano, I 2017, Detecting code clones with gaps by function applications. in PEPM 2017 - Proceedings of the 2017 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, co-located with POPL 2017. Association for Computing Machinery, Inc, pp. 12-22, 2017 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, PEPM 2017, Paris, France, 17/1/16. DOI: 10.1145/3018882.3018892
Matsushita T, Sasano I. Detecting code clones with gaps by function applications. In PEPM 2017 - Proceedings of the 2017 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, co-located with POPL 2017. Association for Computing Machinery, Inc. 2017. p. 12-22. Available from, DOI: 10.1145/3018882.3018892
Matsushita, Tsubasa ; Sasano, Isao. / Detecting code clones with gaps by function applications. PEPM 2017 - Proceedings of the 2017 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, co-located with POPL 2017. Association for Computing Machinery, Inc, 2017. pp. 12-22
@inproceedings{b36c47ff626a47978c10f23ac6927835,
title = "Detecting code clones with gaps by function applications",
abstract = "Code clones are pairs or groups of code segments which are identical or similar to each other. Generally the existence of code clones is considered to make it cumbersome to maintain the source code, so that various kinds of code clone detection tools have been developed. Simple ones divide the source code into a sequence of lines or tokens and find identical or similar sub-sequences. Differences among code clones, called gaps, may prevent clones from being detected or may make clones to be detected with being fragmented. In order to cope with gaps, various tools have been developed by using abstract syntax trees, comparing some metrics, or using program dependency graphs. In this paper we present a novel algorithm for detecting clones by focusing on gaps by function applications. Based on the algorithm we have implemented a tool for detecting code clones on programs written in Standard ML. Copyright is held by the owner/author(s).",
keywords = "Abstract syntax tree, Code clone, Function application, Gap",
author = "Tsubasa Matsushita and Isao Sasano",
year = "2017",
month = "1",
day = "2",
doi = "10.1145/3018882.3018892",
language = "English",
pages = "12--22",
booktitle = "PEPM 2017 - Proceedings of the 2017 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, co-located with POPL 2017",
publisher = "Association for Computing Machinery, Inc",

}

TY - GEN

T1 - Detecting code clones with gaps by function applications

AU - Matsushita,Tsubasa

AU - Sasano,Isao

PY - 2017/1/2

Y1 - 2017/1/2

N2 - Code clones are pairs or groups of code segments which are identical or similar to each other. Generally the existence of code clones is considered to make it cumbersome to maintain the source code, so that various kinds of code clone detection tools have been developed. Simple ones divide the source code into a sequence of lines or tokens and find identical or similar sub-sequences. Differences among code clones, called gaps, may prevent clones from being detected or may make clones to be detected with being fragmented. In order to cope with gaps, various tools have been developed by using abstract syntax trees, comparing some metrics, or using program dependency graphs. In this paper we present a novel algorithm for detecting clones by focusing on gaps by function applications. Based on the algorithm we have implemented a tool for detecting code clones on programs written in Standard ML. Copyright is held by the owner/author(s).

AB - Code clones are pairs or groups of code segments which are identical or similar to each other. Generally the existence of code clones is considered to make it cumbersome to maintain the source code, so that various kinds of code clone detection tools have been developed. Simple ones divide the source code into a sequence of lines or tokens and find identical or similar sub-sequences. Differences among code clones, called gaps, may prevent clones from being detected or may make clones to be detected with being fragmented. In order to cope with gaps, various tools have been developed by using abstract syntax trees, comparing some metrics, or using program dependency graphs. In this paper we present a novel algorithm for detecting clones by focusing on gaps by function applications. Based on the algorithm we have implemented a tool for detecting code clones on programs written in Standard ML. Copyright is held by the owner/author(s).

KW - Abstract syntax tree

KW - Code clone

KW - Function application

KW - Gap

UR - http://www.scopus.com/inward/record.url?scp=85010280653&partnerID=8YFLogxK

UR - http://www.scopus.com/inward/citedby.url?scp=85010280653&partnerID=8YFLogxK

U2 - 10.1145/3018882.3018892

DO - 10.1145/3018882.3018892

M3 - Conference contribution

SP - 12

EP - 22

BT - PEPM 2017 - Proceedings of the 2017 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, co-located with POPL 2017

PB - Association for Computing Machinery, Inc

ER -