Method method = null;
try {
method = list.getClass().getMethod("getSelectedValue", null);
} catch (NoSuchMethodException nsme) {
}
data.registerDataLookup("Plugin.ID", new DefaultDataLookup(list,
method, null));
Method method = null;
try {
method = list.getClass().getMethod("getSelectedValue", null);
} catch (NoSuchMethodException nsme) {
}
data.registerDataLookup("Plugin.ID", new DefaultDataLookup(list,
method, null));
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/config/mailboximport/PluginStep.java
|
|
File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/gui/dialog/importfilter/PluginStep.java
|
Method name: JComponent createComponent()
|
|
Method name: JComponent createComponent()
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | Method method = null;↵ | | 1 | Method method = null;↵
|
|
2 | try {↵ | | 2 | try {↵
|
3 | method = list.getClass().getMethod("getSelectedValue", null);↵ | | 3 | method = list.getClass().getMethod("getSelectedValue", null);↵
|
4 | } catch (NoSuchMethodException nsme) {↵ | | 4 | } catch (NoSuchMethodException nsme) {↵
|
5 | }↵ | | 5 | }↵
|
|
6 | data.registerDataLookup("Plugin.ID", new DefaultDataLookup(list,↵ | | 6 | data.registerDataLookup("Plugin.ID", new DefaultDataLookup(list,↵
|
7 | method, null)); | | 7 | method, null));
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 8 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.8 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
10 | Method method = null; | | 11 | Method method = null; |
11 | try | | 12 | try |
12 | method = list.getClass().getMethod("getSelectedValue", null); | | 13 | method = list.getClass().getMethod("getSelectedValue", null); |
13 | data.registerDataLookup("Plugin.ID", new DefaultDataLookup(list, method, null)); | | 14 | data.registerDataLookup("Plugin.ID", new DefaultDataLookup(list, method, null)); |
Precondition Violations (0)
Row |
Violation |