File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/ExtendedCategoryAxis.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/Tick.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 12 | Number of AST nodes: 11 | |||
1 | if (obj == this) {↵ | 1 | if (obj instanceof Tick) {↵ | |
2 | return true;↵ | 2 | ↵ | |
3 | }↵ | |||
4 | if (!(obj instanceof ExtendedCategoryAxis↵ | 3 | Tick t = (Tick) obj; ↵ | |
5 | )) {↵ | 4 | if (!ObjectUtilities.equal(this.text, t.text)) {↵ | |
6 | return false;↵ | 5 | return false;↵ | |
7 | }↵ | |||
8 | ExtendedCategoryAxis that = (ExtendedCategoryAxis) obj;↵ | |||
9 | if (!this.sublabelFont.equals(that.sublabelFont↵ | 6 | ↵ | |
7 | }↵ | |||
10 | )) {↵ | 8 | if (!ObjectUtilities.equal(this.textAnchor, t.textAnchor)) {↵ | |
11 | return false;↵ | 9 | return false; ↵ | |
12 | }↵ | 10 | ↵ | |
11 | }↵ | |||
13 | if (!PaintUtilities.equal(this.sublabelPaint, that.sublabelPaint)) {↵ | 12 | if (!ObjectUtilities.equal(this.rotationAnchor, t.rotationAnchor)) {↵ | |
14 | return false;↵ | 13 | return false; ↵ | |
15 | }↵ | 14 | }↵ | |
16 | if (!this.sublabels.equals(that.sublabels)) {↵ | 15 | if (!(this.angle == t.angle)) {↵ | |
17 | return false;↵ | 16 | return false; ↵ | |
18 | }↵ | 17 | ↵ | |
18 | }↵ | |||
19 | return super.equals(obj); | 19 | return true;↵ | |
20 |
| |||
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) | 1.7 |
Clones location | Clones are in different classes |
Number of node comparisons | 51 |
Number of mapped statements | 8 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 5.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 4 | Tick t = (Tick)obj; | ||||||||||||||||||||||||||||||||||||||
3 | if (!(obj instanceof ExtendedCategoryAxis)) |
| 11 | if (!(this.angle == t.angle)) | ||||||||||||||||||||||||||||||||||||
4 | return false; | 12 | return false; | |||||||||||||||||||||||||||||||||||||
5 | ExtendedCategoryAxis that = (ExtendedCategoryAxis)obj; | | ||||||||||||||||||||||||||||||||||||||
6 | if (!this.sublabelFont.equals(that.sublabelFont)) |
| 7 | if (!ObjectUtilities.equal(this.textAnchor, t.textAnchor)) | ||||||||||||||||||||||||||||||||||||
7 | return false; | 8 | return false; | |||||||||||||||||||||||||||||||||||||
8 | if (!PaintUtilities.equal(this.sublabelPaint, that.sublabelPaint)) |
| 9 | if (!ObjectUtilities.equal(this.rotationAnchor, t.rotationAnchor)) | ||||||||||||||||||||||||||||||||||||
9 | return false; | 10 | return false; | |||||||||||||||||||||||||||||||||||||
10 | if (!this.sublabels.equals(that.sublabels)) |
| 5 | if (!ObjectUtilities.equal(this.text, t.text)) | ||||||||||||||||||||||||||||||||||||
11 | return false; | 6 | return false; |
Row | Violation |
---|---|
1 | Expression this.angle == t.angle cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression this.sublabelFont.equals(that.sublabelFont) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression ObjectUtilities.equal(this.textAnchor,t.textAnchor) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Type java.awt.Paint of variable this.sublabelPaint does not match with type org.jfree.ui.TextAnchor of variable this.rotationAnchor |
5 | Expression that.sublabelPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression t.rotationAnchor cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Type java.awt.Paint of variable that.sublabelPaint does not match with type org.jfree.ui.TextAnchor of variable t.rotationAnchor |
8 | Expression that.sublabelPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression t.rotationAnchor cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Type java.awt.Paint of variable that.sublabelPaint does not match with type org.jfree.ui.TextAnchor of variable t.rotationAnchor |
11 | Type org.jfree.util.PaintUtilities does not match with type org.jfree.util.ObjectUtilities |
12 | Expression this.sublabels.equals(that.sublabels) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Expression ObjectUtilities.equal(this.text,t.text) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Not all possible execution flows end in a return statement |