File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/optional/image/Ellipse.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/optional/image/Arc.java | |||
Method name: PlanarImage executeDrawOperation()
|
Method name: PlanarImage executeDrawOperation()
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if (!stroke.equals("transparent")) {↵ | 1 | if (!stroke.equals("transparent")) {↵ | |
2 | BasicStroke bStroke = new BasicStroke(stroke_width);↵ | 2 | BasicStroke bStroke = new BasicStroke(stroke_width);↵ | |
3 | graphics.setColor(ColorMapper.getColorByName(stroke));↵ | 3 | graphics.setColor(ColorMapper.getColorByName(stroke));↵ | |
4 | graphics.setStroke(bStroke);↵ | 4 | graphics.setStroke(bStroke);↵ | |
5 | graphics.draw(new Ellipse2D.Double(0, 0, width, height↵ | 5 | graphics.draw(new Arc2D.Double(stroke_width, stroke_width, width,↵ | |
6 | ));↵ | 6 | height, start, stop, type));↵ | |
7 | } | 7 |
| |
See real code fragment | See real code fragment |
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 |
Number of mapped statements | 5 |
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.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | if (!stroke.equals("transparent")) | 3 | if (!stroke.equals("transparent")) | ||||||||||||||
4 | BasicStroke bStroke = new BasicStroke(stroke_width); | 4 | BasicStroke bStroke = new BasicStroke(stroke_width); | ||||||||||||||
5 | graphics.setColor(ColorMapper.getColorByName(stroke)); | 5 | graphics.setColor(ColorMapper.getColorByName(stroke)); | ||||||||||||||
6 | graphics.setStroke(bStroke); | 6 | graphics.setStroke(bStroke); | ||||||||||||||
7 | graphics.draw(new Ellipse2D.Double(0, 0, width, height)); |
| 7 | graphics.draw(new Arc2D.Double(stroke_width, stroke_width, width, height, start, stop, type)); |
Row | Violation |
---|