一种新的代码表示,用于检测使用高级和抽象编译代码表示的Java代码克隆
Fahmi H Quradaa1,2, Sara Shahzad1, Rashad Saeed1,2
1Department of Computer Science, University of Peshawar, Peshawar, Pakistan.
PloS one
|May 10, 2024
概括
本研究介绍了一种用于检测Java中的代码克隆的新方法,从而提高软件质量. 这种新的方法结合了抽象语法树的特性和低级代码表示,以准确地识别语义克隆.
科学领域:
- 计算机科学 计算机科学
- 软件工程 软件工程 软件工程
背景情况:
- 通过复制粘贴重复使用代码导致代码克隆,影响软件质量和维护能力.
- 现有的代码克隆检测方法与语义克隆作斗争,并且经常忽视低级代码表示.
研究的目的:
- 开发一种新的代码表示,用于识别Java源代码中的语法和语义代码克隆.
- 提高代码克隆检测技术的准确性和有效性.
主要方法:
- 集成的高级抽象语法树 (AST) 功能与静态分析中间表示 (例如,Soot框架) 的低级功能.
- 训练了15个机器学习模型,包括像LightGBM这样的集体分类器,在组合代码表示上.
- 采用线性特征组合,性能优于乘法和距离技术.
主要成果:
- 提出的方法在检测大数据集上的语义克隆方面表现出高准确性.
- 集体分类器,特别是LightGBM,实现了非常高的准确性.
- 线性特征组合被证明比其他组合方法更有效.
结论:
- 新的代码表示和机器学习模型显著改善了Java中的语义克隆检测.
- 这种方法优于现有的代码克隆检测技术,特别是语义克隆.
- 这些发现提供了一个更强大的解决方案,通过解决代码重复来维持软件质量.
更多相关视频
15:07VDJ-Seq: Deep Sequencing Analysis of Rearranged Immunoglobulin Heavy Chain Gene to Reveal Clonal Evolution Patterns of B Cell Lymphoma
Published on: December 28, 2015
26.7K
11:02Detecting Somatic Genetic Alterations in Tumor Specimens by Exon Capture and Massively Parallel Sequencing
Published on: October 18, 2013
19.4K
相关概念视频
Block Diagram Reduction
202
The process of deriving the transfer function of a control system often involves reducing its block diagram to a single block. This simplification can be achieved through a series of strategic operations, including relocating branch points and comparators. These operations preserve the overall function of the system while allowing for easier manipulation and combination of blocks.
The first step in this process is the identification and relocation of a branch point. A branch point, where a...
The first step in this process is the identification and relocation of a branch point. A branch point, where a...
202
Brick Classifications
114
Bricks, a fundamental component of construction, are categorized based on their application and structural characteristics into several types. These include facing bricks, building bricks, hollow bricks, paving bricks, and firebricks. Facing bricks, also referred to as face bricks, are primarily used for both structural support and visual appeal, making their appearance a crucial aspect. In contrast, building bricks are typically used in concealed sections of a structure, such as behind the...
114
High-Level and Low-Level Awareness
265
Controlled processes in human consciousness represent high-alert mental states where individuals deliberately focus their attention on achieving specific goals. Controlled processes can be seen in situations like mastering new technology, where a person might become so absorbed that they ignore surrounding distractions. Such processes involve selective attention, requiring one to concentrate on particular elements of experience while disregarding others. These are governed by executive...
265
Overview of Transposition and Recombination
15.4K
Transposons make up a significant part of genomes of various organisms. Therefore, it is believed that transposition played a major evolutionary role in speciation by changing genome sizes and modifying gene expression patterns. For example, in bacteria, transposition can lead to conferring antibiotic resistance. Movement of transposable elements within the genetic pool of pathogenic bacteria can aid in transfer of antibiotic-resistant genetic elements. In eukaryotes, transposons can carry out...
15.4K
Source Transformation
6.0K
Source transformation is a fundamental technique employed in circuit analysis, offering a valuable tool for simplifying complex electrical circuits. This technique involves the replacement of either a voltage source in series with a resistor by a current source in parallel with a resistor, or vice versa. The key concept here is that when the original sources are deactivated (turned off), the equivalent resistance at the circuit's end terminals remains the same.
It is essential to note that when...
It is essential to note that when...
6.0K
Comparing Copy Number Variations and SNPs
17.7K
Sequencing of the human genome has opened up several best-kept secrets of the genome. Scientists have identified thousands of genome variations that exist within a population. These variations can be a single nucleotide or a larger chromosomal variation.
Copy number variations or CNVs are the structural variations that cover more than 1kb of DNA sequence. The single nucleotide polymorphism (SNP), on the other hand, is a single nucleotide change or a point mutation that is found in more than 1%...
Copy number variations or CNVs are the structural variations that cover more than 1kb of DNA sequence. The single nucleotide polymorphism (SNP), on the other hand, is a single nucleotide change or a point mutation that is found in more than 1%...
17.7K
