Changes of Evaluation Values on Component Rank Model by Taking Code Clones into Consideration

Reishi YOKOMORI  Norihiro YOSHIDA  Masami NORO  Katsuro INOUE  

IEICE TRANSACTIONS on Information and Systems   Vol.E101-D   No.1   pp.130-141
Publication Date: 2018/01/01
Online ISSN: 1745-1361
Type of Manuscript: PAPER
Category: Software System
component rank,  code clone,  component graph,  use relation,  

Full Text: PDF(765.4KB)
>>Buy this Article

There are many software systems that have been used and maintained for a long time. By undergoing such a maintenance process, similar code fragments were intentionally left in the source code of such software, and knowing how to manage a software system that contains a lot of similar code fragments becomes a major concern. In this study, we proposed a method to pick up components that were commonly used in similar code fragments from a target software system. This method was realized by using the component rank model and by checking the differences of evaluation values for each component before and after merging components that had similar code fragments. In many cases, components whose evaluation value had decreased would be used by both the components that were merged, so we considered that these components were commonly used in similar code fragments. Based on the proposed approach, we implemented a system to calculate differences of evaluation values for each component, and conducted three evaluation experiments to confirm that our method was useful for detecting components that were commonly used in similar code fragments, and to confirm how our method can help developers when developers add similar components. Based on the experimental results, we also discuss some improvement methods and provide the results from applications of these methods.