switch(col)
{
case 0:
return Boolean.class;
case 1:
return String.class;
default:
throw new InternalError();
}
switch(col)
{
case 0:
return String.class;
case 1:
return Color.class;
default:
throw new InternalError();
}
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/JCheckBoxList.java
|
|
File path: /jEdit-4.2/src/org/gjt/sp/jedit/options/BrowserColorsOptionPane.java
|
Method name: Class getColumnClass(int)
|
|
Method name: Class getColumnClass(int)
|
Number of AST nodes: 7
|
|
Number of AST nodes: 7
|
|
1 | switch(col)↵ | | 1 | switch(col)↵
|
2 | {↵ | | 2 | {↵
|
3 | case 0:↵ | | 3 | case 0:↵
|
4 | return Boolean.class;↵ | | 4 | return String.class;↵
|
5 | case 1:↵ | | 5 | case 1:↵
|
6 | return String.class;↵ | | 6 | return Color.class;↵
|
7 | default:↵ | | 7 | default:↵
|
8 | throw new InternalError();↵ | | 8 | throw new InternalError();↵
|
9 | } | | 9 | }
|
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.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 26 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.8 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | switch (col) | | 1 | switch (col) |
2 | | | 2 | |
3 | | | | |
4 | | | 4 | |
5 | | | 3 | |
| | | 5 | |
6 | | | 6 | |
7 | throw new InternalError(); | | 7 | throw new InternalError(); |
Precondition Violations (2)
Row |
Violation |
1 | Unmatched return Boolean.class; |
2 | Unmatched return Color.class; |