File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/StatisticalBarRenderer.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/StackedXYAreaRenderer.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 10 | Number of AST nodes: 10 | |||
1 | if (obj == this) {↵ | 1 | if (obj == this) {↵ | |
2 | return true;↵ | 2 | return true;↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!(obj instanceof StatisticalBarRenderer)) {↵ | 4 | if (!(obj instanceof StackedXYAreaRenderer) || !super.equals(obj)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | StatisticalBarRenderer that = (StatisticalBarRenderer) obj;↵ | 7 | StackedXYAreaRenderer that = (StackedXYAreaRenderer) obj;↵ | |
8 | if (!PaintUtilities.equal(this.errorIndicatorPaint,↵ | 8 | if (!PaintUtilities.equal(this.↵ | |
9 | that.errorIndicatorPaint)) {↵ | 9 | shapePaint, that.shapePaint)) {↵ | |
10 | return false;↵ | 10 | return false;↵ | |
11 | }↵ | 11 | }↵ | |
12 | if (!ObjectUtilities.equal(this.errorIndicatorStroke,↵ | 12 | if (!ObjectUtilities.equal(this.↵ | |
13 | that.errorIndicatorStroke)) {↵ | 13 | shapeStroke, that.shapeStroke)) {↵ | |
14 | return false;↵ | 14 | return false;↵ | |
15 | }↵ | 15 | }↵ | |
16 | return super.equals(obj); | 16 | return true; | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 2.6 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 29 |
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 2.9 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (obj == this) | 1 | if (obj == this) | |||||||||||||||||||||||||||||||
2 | return true; | 2 | return true; | |||||||||||||||||||||||||||||||
| 3 | if (!(obj instanceof StackedXYAreaRenderer) || !super.equals(obj)) | ||||||||||||||||||||||||||||||||
|
| 4 | return false; | |||||||||||||||||||||||||||||||
| 5 | StackedXYAreaRenderer that = (StackedXYAreaRenderer)obj; | ||||||||||||||||||||||||||||||||
3 | if (!(obj instanceof StatisticalBarRenderer)) |
| 6 | if (!PaintUtilities.equal(this.shapePaint, that.shapePaint)) | ||||||||||||||||||||||||||||||
4 | return false; | 7 | return false; | |||||||||||||||||||||||||||||||
5 | StatisticalBarRenderer that = (StatisticalBarRenderer)obj; | | ||||||||||||||||||||||||||||||||
6 | if (!PaintUtilities.equal(this.errorIndicatorPaint, that.errorIndicatorPaint)) |
| 8 | if (!ObjectUtilities.equal(this.shapeStroke, that.shapeStroke)) | ||||||||||||||||||||||||||||||
7 | return false; | 9 | return false; |
Row | Violation |
---|---|
1 | Unmatched return false; |
2 | Expression PaintUtilities.equal(this.shapePaint,that.shapePaint) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Type java.awt.Paint of variable this.errorIndicatorPaint does not match with type java.awt.Stroke of variable this.shapeStroke |
4 | Expression that.errorIndicatorPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression that.shapeStroke cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Type java.awt.Paint of variable that.errorIndicatorPaint does not match with type java.awt.Stroke of variable that.shapeStroke |
7 | Type org.jfree.util.PaintUtilities does not match with type org.jfree.util.ObjectUtilities |
8 | Not all possible execution flows end in a return statement |