if (util.match("/^... clientFile (.+)$/", line)) { String f = util.group(1); existing.add(f); } else if (util.match("/^(.+) - no such file/", line)) { String f = util.group(1); nonExisting.add(f); }
if (!stroke.equals("transparent")) { BasicStroke bStroke = new BasicStroke(stroke_width); graphics.setColor(ColorMapper.getColorByName(stroke)); graphics.setStroke(bStroke); graphics.draw(new Ellipse2D.Double(0, 0, width, height)); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/perforce/FStatP4OutputHandler.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/optional/image/Ellipse.java
Method name: void process(String) Method name: PlanarImage executeDrawOperation()
Number of AST nodes: 6 Number of AST nodes: 5
1
if (util.match("/^... clientFile (.+)$/", line)) {
1
if (
2
            String f = util.group(1);
3
            existing.add(f);
4
        } else if (util.match("/^(.+) - no such file/", lin
2
!stroke.equals("transparent")) {
3
            BasicStroke bStroke = new BasicStroke(stroke_width);
5
e)) {
4
            graphics.setColor(ColorMapper.getColorByName(stroke));
6
            String f = util.group(1);
5
            
7
            nonExisting.add(f
6
graphics.setStroke(bStroke);
8
);
7
            graphics.draw(new Ellipse2D.Double(0, 0, width, height));
9
        }
8
        }
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.2
Clones locationClones are in different classes
Number of node comparisons2