Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Index-based Java software code clone detection method

A detection method and software code technology, applied in the field of program understanding, can solve problems such as the validity discount of detection methods

Active Publication Date: 2015-04-29
HANGZHOU DIANZI UNIV
View PDF2 Cites 10 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

For example, due to the need to compare the similarity of tens of millions of lines of software code developed by different companies or organizations, if the code clone cannot be obtained within an appropriate time range, the effectiveness of the detection method will be greatly reduced

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Index-based Java software code clone detection method
  • Index-based Java software code clone detection method
  • Index-based Java software code clone detection method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0025] The specific implementation of the index-based Java software code clone detection method provided by the present invention is mainly divided into 3 steps (such as figure 1 Shown):

[0026] (1) Assuming that it has been established in memory according to steps (1), (2) and (3) , with . In the preprocessing stage, the available memory is limited. The source code of each source file in the set of source files to be tested is read in sequence, and the source code is lexically analyzed and normalized to obtain the "sentence line number" corresponding to each source file. Character sequence" key-value pair collection, establish "file path File latest timestamp" key-value pair and update . (2) In the cloning detection stage, if the file to be detected has not been modified, then directly Obtain the corresponding files in Set of values, otherwise the "statement line number Lexical item sequence" every other The line statement is regarded as a code segment, and the file pa...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses an index-based Java software code clone detection method. The index-based Java software code clone detection method employs the strategy that code segment information caching and memory index comparison are integrated and includes pre-saving code segment information of each source file in the memory index in the beginning; adopting the index searching method with time complexity to perform memory comparison. According to the arrangement, by caching the code segment information, the problem of the traditional method of low efficiency caused by rebuilding of a data structure in the case of every clone detection is solved; in the memory index comparison way, the problem of the traditional method of long period caused by pair comparison is solved.

Description

Technical field [0001] The invention belongs to the technical field of program understanding, and specifically relates to an index-based method for detecting Java software code clones. Background technique [0002] One of the concerns in the field of software engineering is how to improve the efficiency of the software development process and the quality of software products. In the entire cycle of software development, software maintenance occupies most of the resources and time, and software maintenance involves reading source code, scanning source code, and understanding the modifications made to the source code. time. Therefore, in order to improve the software development environment and improve the quality of software products, it is necessary to attach importance to software maintenance and provide software maintenance personnel with appropriate methods of understanding the program. [0003] By analyzing the program code, mining the cloning phenomenon in the program code, ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F11/36G06F21/12
Inventor 俞东进舒翔陈真理王杰
Owner HANGZHOU DIANZI UNIV
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products