1177-2-3

public void setRangeZoomable(boolean flag) { if (flag) { Plot plot = this.chart.getPlot(); if (plot instanceof Zoomable) { Zoomable z = (Zoomable) plot; this.rangeZoomable = flag && (z.isRangeZoomable()); } } else { this.rangeZoomable = false;
public void setDomainZoomable(boolean flag) { if (flag) { Plot plot = this.chart.getPlot(); if (plot instanceof Zoomable) { Zoomable z = (Zoomable) plot; this.domainZoomable = flag && (z.isDomainZoomable()); } } else { this.domainZoomable = false;

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/ChartPanel.java |  | File path: /jfreechart-1.0.10/swt/org/jfree/experimental/chart/swt/ChartComposite.java
Method name: `` |  | Method name: ``
Number of AST nodes: 0 |  | Number of AST nodes: 0

1

    public void setRangeZoomable(boolean flag) {
    ↵

1

    public void setDomainZoomable(boolean flag) {↵

2

            if (flag) {
    ↵

2

            if (flag) {↵

3

                Plot plot = this.chart.getPlot();
    ↵

3

                Plot plot = this.chart.getPlot();↵

4

                if (plot instanceof Zoomable) {
    ↵

4

                if (plot instanceof Zoomable) {↵

5

                    Zoomable z = (Zoomable) plot;
    ↵

5

                    Zoomable z = (Zoomable) plot;↵

6

                    this.rangeZoomable = flag && (z.isRangeZoomable());
    ↵

6

                    this.domainZoomable = flag && (z.isDomainZoomable());  ↵

7

                }
    ↵

7

                }↵

8

            }
    ↵

8

            }↵

9

            else {
    ↵

9

            else {↵

10

                this.rangeZoomable = false;
    ↵

10

                this.domainZoomable = false;↵

11

11

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