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.black; } else if (colorName.equals(COLOR_BLUE)) { return Color.blue; } else if (colorName.equals(COLOR_CYAN)) { return Color.cyan;
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.black;
3
        } else if (colorName.equals(COLOR_WHITE)) {
2
        } else if (colorName.equals(COLOR_BLUE)) {
4
            return Color.white;
3
            return Color.blue;
5
        } else if (colorName.equals(COLOR_YELLOW)) {
4
        } else if (colorName.equals(COLOR_CYAN)) {
6
            return Color.yellow;
5
            return Color.
7
        }
6
cyan;
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