Evaluation method and evaluation device for similarity of source codes

An evaluation device and source code technology, applied in the field of source code similarity evaluation device, can solve problems such as unrealistic and insufficient purpose of efficient analysis

CN103678111AInactive Publication Date: 2014-03-26HITACHI LTD
4 Cites 3 Cited by

Patent Information

Authority / Receiving Office
CN · China
Current Assignee / Owner
Publication Date
2014-03-26
Estimated Expiration
Not applicable · inactive patent

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

The invention relates to an evaluation method and an evaluation device for similarity of source codes. Calculation amount for analysis of code clone increases with large-scale software. The evaluation device for similarity of the source codes comprises a development achievements analysis unit (21) for extracting source code list constituting the software, a corresponding relationship analysis unit (22) for comparing a comparison reference source code list (44a) and a comparison target source code list (44b) and analyzing corresponding relationships of the both, a comparison object determining unit (23) for determining a comparison object of a comparison target source code (44b) contained in a comparison reference of the comparison reference source code list (44a) from the comparison target source codes (44b) according to the corresponding relationship, a similarity calculation unit for calculating the similarity between a comparison reference source code (44a) and a source code determined by the comparison object determining unit (23), and an output unit (15) for outputting combination of the comparison reference source code (44a) and the similarity.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The present invention relates to a source code similarity evaluation method for evaluating the similarity of source code groups constituting software and a source code similarity evaluation device implementing the method. Background technique

[0002] In recent years, software called legacy software (legacy software) is expanding along with the expansion of the application range of software. The so-called legacy software refers to software that repeatedly adds functions and corrects functions in response to new requirements for the system, resulting in an increase in the size and complexity of the software, making it difficult to maintain and increasing maintenance costs.

[0003] One of the reasons for the increase in maintenance cost of legacy software is the existence of similar code strings called so-called code clones. Code clones are the same or similar multiple code columns contained in the source code, mainly due to the inheritance of the sour...

Examples

no. 1 approach

[0050] (Operation of the first embodiment)

[0051] figure 2 It is a diagram showing the operation of the source code similarity evaluation unit of the first embodiment.

[0052] When the source code similarity evaluation unit 20 receives an instruction from the user 200 via the user interface 19, it performs an evaluation of the similarity between the software stored in the comparison reference software storage unit 40a and the software stored in the comparison target software storage unit 40b. evaluate. The source code similarity evaluation unit 20 displays the similarity relationship information 48 to the user 200 via the user interface 19 .

[0053] The comparison reference software storage unit 40a and the comparison target software storage unit 40b are stored in the document database 12, the external document database 110 ( figure 1 )middle. The comparison reference software storage unit 40a is obtained by modifying existing software, for example, and includes a fil...