zoukankan      html  css  js  c++  java
  • 【Software Clone】2014-IEEE-Towards a Big Data Curated Benchmark of Inter-Project Code Clones

    image

    Abstract

    大数据的克隆检测和搜索算法已经作为嵌入在应用中的一部分.

    本文推出一个代码检测基准.包含一些已知的真假克隆代码.其中包括600万条真克隆(包含type-1,type-2,type-3,type-4).


    S1   Introduction

    IJaDataset 2.0包含25,000个系统,365MLOC(Million Lines of Code).通过人工标记找出实现相似功能的代码,10个功能,包含6百万真克隆对,26万假克隆对.其他的基准都不存在对语义克隆的检测.


    S2 background

    代码段:包含一个三元组(l,s,e):l表示源文件,s表示开始的行号,e表示结束的行号.

    克隆对:(f1, f2, φ),f1和f2表示相似片段,φ表示相似度;

    克隆类:(f1, f2, ..., fn, φ),相似代码片段的集合.

    参考之前4中类型的代码克隆:

                 Type-1: Syntactically identical code snippets, except fordifferences in white space, layout and comments.
                        Type-2: Syntactically identical code snippets, except for differences  in  identifier  names,  literal  values,  white  space,layout and comments.
                       Type-3: Syntactically similar code snippets that differ at the statement level. Snippets have statements added, modified and/or removed with respect to each other.
                       Type-4: Syntactically dissimilar code snippets that implement the same functionality.


    S3   建立基准的方法

    确定一个常用的代码功能,然后寻找可能是克隆的代码(候选代码).通过人工标记这些代码的真假.

    image

    A.片段标记

    B.真克隆对

    C.假克隆对


    S4   总结

    image


    S5   评估克隆检测工具

    image:基准中的所有的真克隆对集合

    image:检测工具检测到的克隆对

    image召回率

    image精确度


    S6   数据集的应用


    S6   效度威胁


    S7   总结

    数据集既考虑的语义,也考虑了语法相似.

    总:本文主要是讲IJaDataset 2.0这个数据集的介绍.下载地址.下载下来之后,解压可以看到image

    image

    sample:

    image

    image

    这个sql文件有3.72G

    创建postgresql数据库,然后直接执行sql语句就可以了.

  • 相关阅读:
    C# String.Compare 方法测试
    C#checked 与 unchecked
    C#枚举类型
    C#结构体
    C越界和溢出的区别
    python/matlab : 将txt文件中的数据读为numpy数组
    matlab程序里调用python文件
    Python
    Pycharm调试及快捷键技巧
    Pycharm远程连接服务器debug时报错
  • 原文地址:https://www.cnblogs.com/XBWer/p/4521853.html
Copyright © 2011-2022 走看看