ToolBarOptionPane.Button button =
(ToolBarOptionPane.Button)list
.getSelectedValue();
label = button.label;
actionName = button.actionName;
ToolBarOptionPane.IconListEntry selectedIcon =
(ToolBarOptionPane.IconListEntry)
builtinCombo.getSelectedItem();
icon = selectedIcon.icon;
iconName = selectedIcon.name;
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/options/ToolBarOptionPane.java
|
|
File path: /jEdit-4.2/src/org/gjt/sp/jedit/options/ToolBarOptionPane.java
|
Method name: ToolBarOptionPane.Button getSelection()
|
|
Method name: ToolBarOptionPane.Button getSelection()
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | ToolBarOptionPane.Button button =↵ | | 1 | ToolBarOptionPane.IconListEntry selectedIcon =↵
|
2 | (ToolBarOptionPane.Button)list↵ | | 2 | (ToolBarOptionPane.↵
|
3 | ↵ | | 3 | IconListEntry)↵
|
4 | .getSelectedValue();↵ | | 4 | builtinCombo.getSelectedItem();↵
|
5 | label = button.label;↵ | | 5 | icon = selectedIcon.icon;↵
|
6 | actionName = button.actionName; | | 6 | iconName = selectedIcon.name;
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in the same method |
Number of node comparisons | 9 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
| | | 8 | ToolBarOptionPane.IconListEntry selectedIcon = (ToolBarOptionPane.IconListEntry)builtinCombo.getSelectedItem(); |
| | | 9 | icon = selectedIcon.icon; |
18 | ToolBarOptionPane.Button button = (ToolBarOptionPane.Button)list.getSelectedValue(); | | | |
19 | label = button.label; | | 10 | iconName = selectedIcon.name; |
20 | actionName = button.actionName; | | | |
Precondition Violations (1)
Row |
Violation |
1 | Type org.gjt.sp.jedit.options.ToolBarOptionPane.Button of variable button does not match with type org.gjt.sp.jedit.options.ToolBarOptionPane.IconListEntry of variable selectedIcon |