1103-1-2

public Rectangle2D shrink(Rectangle2D area, Rectangle2D result) { if (result == null) { result = new Rectangle2D.Double(); } result.setRect( area.getX() + this.left, area.getY() + this.top, area.getWidth() - this.left - this.right, area.getHeight() - this.top - this.bottom ); return result;
public Rectangle2D expand(Rectangle2D area, Rectangle2D result) { if (result == null) { result = new Rectangle2D.Double(); } result.setRect( area.getX() - this.left, area.getY() - this.top, area.getWidth() + this.left + this.right, area.getHeight() + this.top + this.bottom ); return result;

Clone fragments detected by clone detection tool
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: `` |  | Method name: ``
Number of AST nodes: 0 |  | Number of AST nodes: 0

1

    public Rectangle2D shrink(Rectangle2D area, Rectangle2D result) {↵

1

    public Rectangle2D expand(Rectangle2D area, Rectangle2D result) {↵

2

            if (result == null) {↵

2

            if (result == null) {↵

3

                result = new Rectangle2D.Double();↵

3

                result = new Rectangle2D.Double();↵

4

            }↵

4

            }↵

5

            result.setRect(↵

5

            result.setRect(↵

6

                area.getX() + this.left, ↵

6

                area.getX() - this.left, ↵

7

                area.getY() + this.top,↵

7

                area.getY() - this.top,↵

8

                area.getWidth() - this.left - this.right,↵

8

                area.getWidth() + this.left + this.right,↵

9

                area.getHeight() - this.top - this.bottom↵

9

                area.getHeight() + this.top + this.bottom↵

10

            );↵

10

            );↵

11

            return result;↵

11

            return result;↵

12

12

See real code fragment |  | See real code fragment

Summary
Number of common nesting structure subtrees | 0
Number of refactorable cases | 0
Number of non-refactorable cases | 0
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0
Clones location |
Number of node comparisons | 0