File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/optional/image/Arc.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/optional/image/Rectangle.java | |||
Method name: PlanarImage executeDrawOperation()
|
Method name: PlanarImage executeDrawOperation()
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | ImageOperation instr = ((ImageOperation) instructions.elementAt(i));↵ | 1 | ImageOperation instr = ((ImageOperation) instructions.elementAt(i));↵ | |
2 | if (instr instanceof DrawOperation) {↵ | 2 | if (instr instanceof DrawOperation) {↵ | |
3 | PlanarImage img = ((DrawOperation) instr).executeDrawOperation();↵ | 3 | PlanarImage img = ((DrawOperation) instr).executeDrawOperation();↵ | |
4 | graphics.drawImage(img.getAsBufferedImage(), null, 0, 0);↵ | 4 | graphics.drawImage(img.getAsBufferedImage(), null, 0, 0);↵ | |
5 | } else if (instr instanceof TransformOperation) {↵ | 5 | } else if (instr instanceof TransformOperation) {↵ | |
6 | graphics = (Graphics2D) bi.getGraphics();↵ | 6 | graphics = (Graphics2D) bi.getGraphics();↵ | |
7 | PlanarImage image↵ | 7 | PlanarImage image↵ | |
8 | = ((TransformOperation) instr)↵ | 8 | = ((TransformOperation) instr)↵ | |
9 | .executeTransformOperation(PlanarImage.wrapRenderedImage(bi));↵ | 9 | .executeTransformOperation(PlanarImage.wrapRenderedImage(bi));↵ | |
10 | bi = image.getAsBufferedImage();↵ | 10 | bi = image.getAsBufferedImage();↵ | |
11 | } | 11 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 40 |
Number of mapped statements | 8 |
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.5 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
12 | ImageOperation instr = ((ImageOperation)instructions.elementAt(i)); | 17 | ImageOperation instr = ((ImageOperation)instructions.elementAt(i)); | |
13 | if (instr instanceof DrawOperation) | 18 | if (instr instanceof DrawOperation) | |
14 | PlanarImage img = ((DrawOperation)instr).executeDrawOperation(); | 19 | PlanarImage img = ((DrawOperation)instr).executeDrawOperation(); | |
15 | graphics.drawImage(img.getAsBufferedImage(), null, 0, 0); | 20 | graphics.drawImage(img.getAsBufferedImage(), null, 0, 0); | |
16 | else if (instr instanceof TransformOperation) | 21 | else if (instr instanceof TransformOperation) | |
17 | graphics = (Graphics2D)bi.getGraphics(); | 22 | graphics = (Graphics2D)bi.getGraphics(); | |
18 | PlanarImage image = ((TransformOperation)instr).executeTransformOperation(PlanarImage.wrapRenderedImage(bi)); | 23 | PlanarImage image = ((TransformOperation)instr).executeTransformOperation(PlanarImage.wrapRenderedImage(bi)); | |
19 | bi = image.getAsBufferedImage(); | 24 | bi = image.getAsBufferedImage(); |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables bi, graphics , while Clone fragment #2 returns variables bi, graphics |