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.magenta; } else if (colorName.equals(COLOR_ORANGE)) { return Color.orange; } else if (colorName.equals(COLOR_PINK)) { return Color.pink;
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.magenta;
3
        } else if (colorName.equals(COLOR_WHITE)) {
2
        } else if (colorName.equals(COLOR_ORANGE)) {
4
            return Color.white;
3
            return Color.orange;
5
        } else if (colorName.equals(COLOR_YELLOW)) {
4
        } else if (colorName.equals(COLOR_PINK)) {
6
            return Color.yellow;
5
            return Color.
7
        }
6
pink;
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are in the same method
Number of node comparisons0