Jump to body Japanese

What is Libra component?

The purpose of Libra component is to support modifying code clones. The user can modify where should be modified without omission. The same support can be provided by Gemini. But, Gemini provides all code clones detected by CCFinder. In debugging or adding new functions, only a specified code and its code clones are necessary.

Detection Strategy

Libra component internally uses some options of CCFinder, and detect code clones across the specified code fragment and target source codes. CCFinder detect the following three type code clones, and each detection can be set by options.D

Libra categorizes the specified code fragment into group 1 and target source codes into group 2, and runs CCFinder with the option that detects only code clones across groups. Using such a process, Libra provides minimum necessary code clones to the user. CCFinder sorts all detected code clones after its detection process. Detecting minimum necessary code clones shortens the amount of CCFinder running time.

Modifying Support Component LIBRA

input a code fragment

The left figure is the window that the user inputs his concern code fragment. Libra detect only code clones across a code fragment input here and target source codes. Also, the user can set the number of tokens of his concern code fragment as the minimum code clone length. This setting prevents CCFinder from detecting tiny no-interested code clones. All Libra component do is to compose groups and run CCFinder, so Libra component can be used for all programing languages that CCFinder can detect code clones.

a snapshot of Libra

Libra component runs CCFinder and provides the information of detected code clones after the user input a specific code fragment and target source codes. The detection time is very short because Libra detects only minimum necessary code clones. After detecting code clones, the GUI of Libra component shows up. The left figure is a snapshot of the GUI. The left side of it is the Directory Tree of target source codes. Source codes shareing some code clones with the specified code fragments is highlighted, and also the numbe of code clones represented. In selecting a file on the Directory Tree, the source code is represented on the Source Code View. Of course, cloned parts are highlighted.

Copyright © 2005-2007 Software Engineering Laboratory All Rights Reserved.