if (colorName.equals(COLOR_RED)) {
return Color.red;
} else if (colorName.equals(COLOR_WHITE)) {
return Color.white;
} else if (colorName.equals(COLOR_YELLOW)) {
return Color.yellow;
}
return Color.green;
} else if (colorName.equals(COLOR_MAGENTA)) {
return Color.magenta;
} else if (colorName.equals(COLOR_ORANGE)) {
return Color.orange;
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/optional/image/ColorMapper.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/optional/image/ColorMapper.java
|
Method name: Color getColorByName(String)
|
|
Method name: Color getColorByName(String)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 3
|
|
1 | if (colorName.equals(COLOR_RED)) {↵ | | |
|
2 | return Color.red;↵ | | 1 | return Color.green;↵
|
3 | } else if (colorName.equals(COLOR_WHITE)) {↵ | | 2 | } else if (colorName.equals(COLOR_MAGENTA)) {↵
|
4 | return Color.white;↵ | | 3 | return Color.magenta;↵
|
5 | } else if (colorName.equals(COLOR_YELLOW)) {↵ | | 4 | } else if (colorName.equals(COLOR_ORANGE)) {↵
|
6 | return Color.yellow;↵ | | 5 | return Color.↵
|
7 | } | | 6 | orange;
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in the same method |
Number of node comparisons | 0 |