if (this.backgroundPaint != null) { if (!this.backgroundPaint.equals(paint)) { this.backgroundPaint = paint; fireChartChanged(); } } else { if (paint != null) { this.backgroundPaint = paint; fireChartChanged(); } }
if (this.backgroundImage != null) { if (!this.backgroundImage.equals(image)) { this.backgroundImage = image; fireChartChanged(); } } else { if (image != null) { this.backgroundImage = image; fireChartChanged(); } }
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/JFreeChart.java File path: /jfreechart-1.0.10/src/org/jfree/chart/JFreeChart.java
Method name: void setBackgroundPaint(Paint) Method name: void setBackgroundImage(Image)
Number of AST nodes: 7 Number of AST nodes: 7
1
if (this.backgroundPaint != null) {
1
if (this.backgroundImage != null) {
2
            if (!this.backgroundPaint.equals(paint)) {
2
            if (!this.backgroundImage.equals(image)) {
3
                this.backgroundPaint = paint;
3
                this.backgroundImage = image;
4
                fireChartChanged();
4
                fireChartChanged();
5
            }
5
            }
6
        }
6
        }
7
        else {
7
        else {
8
            if (paint != null) {
8
            if (image != null) {
9
                this.backgroundPaint = paint;
9
                this.backgroundImage = image;
10
                fireChartChanged();
10
                fireChartChanged();
11
            }
11
            }
12
        }
12
        }
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.3
Clones locationClones are declared in the same class
Number of node comparisons4