SAGA: Efficient and large-scale detection of near-miss clones with GPU acceleration

Clone detection on large code repository is necessary for many big code analysis tasks. The goal is to provide rich information on identical and similar code across projects. Detecting near-miss code clones on big code is challenging since it requires intensive computing and memory resources as the...

Full description

Saved in:
Bibliographic Details
Main Authors: LI, Guanhua, WU, Yijian, ROY, Chanchal K., SUN, Jun, PENG, Xin, ZHAN, Nanjie, HU, Bin, MA, Jingyi
Format: text
Language:English
Published: Institutional Knowledge at Singapore Management University 2020
Subjects:
Online Access:https://ink.library.smu.edu.sg/sis_research/5976
https://ink.library.smu.edu.sg/context/sis_research/article/6979/viewcontent/SAGA_gpu_SANER2020_av.pdf
Tags: Add Tag
No Tags, Be the first to tag this record!
Institution: Singapore Management University
Language: English
id sg-smu-ink.sis_research-6979
record_format dspace
spelling sg-smu-ink.sis_research-69792021-06-01T04:17:14Z SAGA: Efficient and large-scale detection of near-miss clones with GPU acceleration LI, Guanhua WU, Yijian ROY, Chanchal K. SUN, Jun PENG, Xin ZHAN, Nanjie HU, Bin MA, Jingyi Clone detection on large code repository is necessary for many big code analysis tasks. The goal is to provide rich information on identical and similar code across projects. Detecting near-miss code clones on big code is challenging since it requires intensive computing and memory resources as the scale of the source code increases. In this work, we propose SAGA, an efficient suffix-array based code clone detection tool designed with sophisticated GPU optimization. SAGA not only detects Type-l and Type-2 clones but also does so for cross-project large repositories and for the most computationally expensive Type-3 clones. Meanwhile, it also works at segment granularity, which is even more challenging. It detects code clones in 100 million lines of code within 11 minutes (with recall and precision comparable to state-of-the-art approaches), which is more than 10 times faster than state-of-the-art tools. It is the only tool that efficiently detects Type-3 near-miss clones at segment granularity in large code repository (e.g., within 11 hours on 1 billion lines of code). We conduct a preliminary case study on 85,202 GitHub Java projects with 1 billion lines of code and exhibit the distribution of clones across projects. We find about 1.23 million Type-3 clone groups, containing 28 million lines of code at arbitrary segment granularity, which are only detectable with SAGA. We believe SAGA is useful in many software engineering applications such as code provenance analysis, code completion, change impact analysis, and many more. 2020-02-01T08:00:00Z text application/pdf https://ink.library.smu.edu.sg/sis_research/5976 info:doi/10.1109/SANER48275.2020.9054832 https://ink.library.smu.edu.sg/context/sis_research/article/6979/viewcontent/SAGA_gpu_SANER2020_av.pdf http://creativecommons.org/licenses/by-nc-nd/4.0/ Research Collection School Of Computing and Information Systems eng Institutional Knowledge at Singapore Management University big code clone detection GPU acceleration near-miss clone segment clone Information Security Software Engineering
institution Singapore Management University
building SMU Libraries
continent Asia
country Singapore
Singapore
content_provider SMU Libraries
collection InK@SMU
language English
topic big code
clone detection
GPU acceleration
near-miss clone
segment clone
Information Security
Software Engineering
spellingShingle big code
clone detection
GPU acceleration
near-miss clone
segment clone
Information Security
Software Engineering
LI, Guanhua
WU, Yijian
ROY, Chanchal K.
SUN, Jun
PENG, Xin
ZHAN, Nanjie
HU, Bin
MA, Jingyi
SAGA: Efficient and large-scale detection of near-miss clones with GPU acceleration
description Clone detection on large code repository is necessary for many big code analysis tasks. The goal is to provide rich information on identical and similar code across projects. Detecting near-miss code clones on big code is challenging since it requires intensive computing and memory resources as the scale of the source code increases. In this work, we propose SAGA, an efficient suffix-array based code clone detection tool designed with sophisticated GPU optimization. SAGA not only detects Type-l and Type-2 clones but also does so for cross-project large repositories and for the most computationally expensive Type-3 clones. Meanwhile, it also works at segment granularity, which is even more challenging. It detects code clones in 100 million lines of code within 11 minutes (with recall and precision comparable to state-of-the-art approaches), which is more than 10 times faster than state-of-the-art tools. It is the only tool that efficiently detects Type-3 near-miss clones at segment granularity in large code repository (e.g., within 11 hours on 1 billion lines of code). We conduct a preliminary case study on 85,202 GitHub Java projects with 1 billion lines of code and exhibit the distribution of clones across projects. We find about 1.23 million Type-3 clone groups, containing 28 million lines of code at arbitrary segment granularity, which are only detectable with SAGA. We believe SAGA is useful in many software engineering applications such as code provenance analysis, code completion, change impact analysis, and many more.
format text
author LI, Guanhua
WU, Yijian
ROY, Chanchal K.
SUN, Jun
PENG, Xin
ZHAN, Nanjie
HU, Bin
MA, Jingyi
author_facet LI, Guanhua
WU, Yijian
ROY, Chanchal K.
SUN, Jun
PENG, Xin
ZHAN, Nanjie
HU, Bin
MA, Jingyi
author_sort LI, Guanhua
title SAGA: Efficient and large-scale detection of near-miss clones with GPU acceleration
title_short SAGA: Efficient and large-scale detection of near-miss clones with GPU acceleration
title_full SAGA: Efficient and large-scale detection of near-miss clones with GPU acceleration
title_fullStr SAGA: Efficient and large-scale detection of near-miss clones with GPU acceleration
title_full_unstemmed SAGA: Efficient and large-scale detection of near-miss clones with GPU acceleration
title_sort saga: efficient and large-scale detection of near-miss clones with gpu acceleration
publisher Institutional Knowledge at Singapore Management University
publishDate 2020
url https://ink.library.smu.edu.sg/sis_research/5976
https://ink.library.smu.edu.sg/context/sis_research/article/6979/viewcontent/SAGA_gpu_SANER2020_av.pdf
_version_ 1770575712451821568