File path: /jfreechart-1.0.10/src/org/jfree/chart/block/GridArrangement.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/PolarPlot.java | |||
Method name: Size2D arrangeNN(BlockContainer, Graphics2D)
|
Method name: void drawCornerTextItems(Graphics2D, Rectangle2D)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 5 | |||
1 | Block b = (Block) iterator.next();↵ | |||
2 | Size2D s = b.arrange(g2, RectangleConstraint.NONE↵ | 1 | String msg = (String) it.next();↵ | |
2 | FontMetrics fm = g2.getFontMetrics();↵ | |||
3 | );↵ | 3 | Rectangle2D bounds = TextUtilities.getTextBounds(msg, g2, fm);↵ | |
4 | maxW = Math.max(maxW, s.width);↵ | 4 | width = Math.max(width, bounds.getWidth());↵ | |
5 | maxH = Math.max(maxH, s.height); | 5 | height += bounds.getHeight(); | |
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.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 21 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 4 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6 | Block b = (Block)iterator.next(); | | ||||||||||||||||||
| 7 | String msg = (String)it.next(); | ||||||||||||||||||
7 | Size2D s = b.arrange(g2, RectangleConstraint.NONE); |
| | |||||||||||||||||
| 8 | FontMetrics fm = g2.getFontMetrics(); | ||||||||||||||||||
|
| 9 | Rectangle2D bounds = TextUtilities.getTextBounds(msg, g2, fm); | |||||||||||||||||
8 | maxW = Math.max(maxW, s.width); |
| 10 | width = Math.max(width, bounds.getWidth()); | ||||||||||||||||
9 | maxH = Math.max(maxH, s.height); | | ||||||||||||||||||
| 11 | height += bounds.getHeight(); |
Row | Violation |
---|---|
1 | Unmatched statement Size2D s=b.arrange(g2,RectangleConstraint.NONE); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement Rectangle2D bounds=TextUtilities.getTextBounds(msg,g2,fm); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |