switch(index)
{
case 0:
return jEdit.getProperty("options.syntax.object");
case 1:
return jEdit.getProperty("options.syntax.style");
default:
return null;
}
switch(index)
{
case 0:
return jEdit.getProperty("options.abbrevs.abbrev");
case 1:
return jEdit.getProperty("options.abbrevs.expand");
default:
return null;
}
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/options/SyntaxHiliteOptionPane.java
|
|
File path: /jEdit-4.2/src/org/gjt/sp/jedit/options/AbbrevsOptionPane.java
|
Method name: String getColumnName(int)
|
|
Method name: String getColumnName(int)
|
Number of AST nodes: 7
|
|
Number of AST nodes: 7
|
|
1 | switch(index)↵ | | 1 | switch(index)↵
|
2 | {↵ | | 2 | {↵
|
3 | case 0:↵ | | 3 | case 0:↵
|
4 | return jEdit.getProperty("options.syntax.object");↵ | | 4 | return jEdit.getProperty("options.abbrevs.abbrev");↵
|
5 | case 1:↵ | | 5 | case 1:↵
|
6 | return jEdit.getProperty("options.syntax.style");↵ | | 6 | return jEdit.getProperty("options.abbrevs.expand");↵
|
7 | default:↵ | | 7 | default:↵
|
8 | return null;↵ | | 8 | return null;↵
|
9 | } | | 9 | }
|
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 | 25 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 7 |
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) | 1.1 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | switch (index) | | 1 | switch (index) |
2 | | | 2 | |
3 | return jEdit.getProperty("options.syntax.object"); | | 3 | return jEdit.getProperty("options.abbrevs.abbrev"); |
4 | | | 4 | |
5 | return jEdit.getProperty("options.syntax.style"); | | 5 | return jEdit.getProperty("options.abbrevs.expand"); |
6 | | | 6 | |
7 | | | 7 | |
Precondition Violations (0)
Row |
Violation |