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(); }
if (paint == null) { if (this.outlinePaint != null) { this.outlinePaint = null; fireChangeEvent(); } } else { if (this.outlinePaint != null) { if (this.outlinePaint.equals(paint)) { return; // nothing to do } } this.outlinePaint = paint; 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 setOutlineStroke(Stroke) Method name: void setOutlinePaint(Paint)
Number of AST nodes: 9 Number of AST nodes: 9
1
if (stroke == null) {
1
if (paint == null) {
2
            if (this.outlineStroke != null) {
2
            if (this.outlinePaint != null) {
3
                this.outlineStroke = null;
3
                this.outlinePaint = null;
4
                fireChangeEvent();
4
                fireChangeEvent();
5
            }
5
            }
6
        }
6
        }
7
        else {
7
        else {
8
            if (this.outlineStroke != null) {
8
            if (this.outlinePaint != null) {
9
                if (this.outlineStroke.equals(stroke)) {
9
                if (this.outlinePaint.equals(paint)) {
10
                    return;  // nothing to do
10
                    return;  // nothing to do
11
                }
11
                }
12
            }
12
            }
13
            this.outlineStroke = stroke;
13
            this.outlinePaint = paint;
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