File path: /jfreechart-1.0.10/src/org/jfree/chart/block/ColumnArrangement.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/block/FlowArrangement.java | |||
Method name: Size2D arrangeNF(BlockContainer, Graphics2D, RectangleConstraint)
|
Method name: Size2D arrangeFN(BlockContainer, Graphics2D, RectangleConstraint)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | itemsInColumn.clear();↵ | 1 | itemsInRow.clear();↵ | |
2 | x = x + maxWidth + this.horizontalGap;↵ | 2 | x = ↵ | |
3 | y = 0.0↵ | 3 | 0.0;↵ | |
4 | ;↵ | 4 | y = y + maxHeight + this.verticalGap;↵ | |
5 | maxWidth = size.width;↵ | 5 | maxHeight = size.height;↵ | |
6 | block.setBounds(↵ | 6 | block.setBounds(↵ | |
7 | new Rectangle2D.Double(↵ | 7 | new Rectangle2D.Double(↵ | |
8 | x, y, size.width, Math.min(size.height, height)↵ | 8 | x, y, Math.min(size.width, width), size.height↵ | |
9 | )↵ | 9 | )↵ | |
10 | );↵ | 10 | );↵ | |
11 | y = size.height + this.verticalGap;↵ | 11 | x = size.width + this.horizontalGap;↵ | |
12 | itemsInColumn.add(block); | 12 | itemsInRow.add(block); | |
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 | 50 |
Number of mapped statements | 7 |
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) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
21 | itemsInColumn.clear(); |
| 19 | itemsInRow.clear(); | |||||||||||||||||||
22 | x = x + maxWidth + this.horizontalGap; |
| 21 | y = y + maxHeight + this.verticalGap; | |||||||||||||||||||
23 | y = 0.0; |
| 20 | x = 0.0; | |||||||||||||||||||
24 | maxWidth = size.width; |
| 22 | maxHeight = size.height; | |||||||||||||||||||
25 | block.setBounds(new Rectangle2D.Double(x, y, size.width, Math.min(size.height, height))); |
| 23 | block.setBounds(new Rectangle2D.Double(x, y, Math.min(size.width, width), size.height)); | |||||||||||||||||||
26 | y = size.height + this.verticalGap; |
| 24 | x = size.width + this.horizontalGap; | |||||||||||||||||||
27 | itemsInColumn.add(block); |
| 25 | itemsInRow.add(block); |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables y, x, maxWidth , while Clone fragment #2 returns variables x, y, maxHeight |