if (paint == null) { if (this.backgroundPaint != null) { this.backgroundPaint = null; fireChangeEvent(); } } else { if (this.backgroundPaint != null) { if (this.backgroundPaint.equals(paint)) { return; // nothing to do } } this.backgroundPaint = paint; fireChangeEvent(); }
if (stroke == null) { if (this.outlineStroke != null) { this.outlineStroke = null; fireChangeEvent(); } } else { if (this.outlineStroke != null) { if (this.outlineStroke.equals(stroke)) { return; // nothing to do } } this.outlineStroke = stroke; fireChangeEvent(); }
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/Plot.java File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/Plot.java
Method name: void setBackgroundPaint(Paint) Method name: void setOutlineStroke(Stroke)
Number of AST nodes: 9 Number of AST nodes: 9
1
if (paint == null) {
1
if (stroke == null) {
2
            if (this.backgroundPaint != null) {
2
            if (this.outlineStroke != null) {
3
                this.backgroundPaint = null;
3
                this.outlineStroke = null;
4
                fireChangeEvent();
4
                fireChangeEvent();
5
            }
5
            }
6
        }
6
        }
7
        else {
7
        else {
8
            if (this.backgroundPaint != null) {
8
            if (this.outlineStroke != null) {
9
                if (this.backgroundPaint.equals(paint)) {
9
                if (this.outlineStroke.equals(stroke)) {
10
                    return;  // nothing to do
10
                    return;  // nothing to do
11
                }
11
                }
12
            }
12
            }
13
            this.backgroundPaint = paint;
13
            this.outlineStroke = stroke;
14
            fireChangeEvent();
14
            fireChangeEvent();
15
        }
15
        }
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