File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/AxisSpace.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/AxisSpace.java | |||
Method name: Rectangle2D shrink(Rectangle2D, Rectangle2D)
|
Method name: Rectangle2D expand(Rectangle2D, Rectangle2D)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if (result == null) {↵ | 1 | if (result == null) {↵ | |
2 | result = new Rectangle2D.Double();↵ | 2 | result = new Rectangle2D.Double();↵ | |
3 | }↵ | 3 | }↵ | |
4 | result.setRect(↵ | 4 | result.setRect(↵ | |
5 | area.getX() + this.left, ↵ | 5 | area.getX() - this.left, ↵ | |
6 | area.getY() + this.top,↵ | 6 | area.getY() - this.top,↵ | |
7 | area.getWidth() - this.left - this.right,↵ | 7 | area.getWidth() + this.left + this.right,↵ | |
8 | area.getHeight() - this.top - this.bottom↵ | 8 | area.getHeight() + this.top + this.bottom↵ | |
9 | );↵ | 9 | );↵ | |
10 | return result; | 10 |
| |
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 declared in the same class |
Number of node comparisons | 8 |
Number of mapped statements | 4 |
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.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (result == null) | 1 | if (result == null) | ||||||||||||||||||||
2 | result = new Rectangle2D.Double(); | 2 | result = new Rectangle2D.Double(); | ||||||||||||||||||||
3 | result.setRect(area.getX() + this.left, area.getY() + this.top, area.getWidth() - this.left - this.right, area.getHeight() - this.top - this.bottom); |
| 3 | result.setRect(area.getX() - this.left, area.getY() - this.top, area.getWidth() + this.left + this.right, area.getHeight() + this.top + this.bottom); | |||||||||||||||||||
4 | return result; | 4 | return result; |
Row | Violation |
---|