File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/SymbolAxis.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: 14 | Number of AST nodes: 14 | |||
1 | if (obj == this) {↵ | 1 | if (this == obj) {↵ | |
2 | return true;↵ | 2 | return true; ↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!(obj instanceof SymbolAxis)) {↵ | 4 | if (obj instanceof Tick) {↵ | |
5 | return false;↵ | 5 | ↵ | |
6 | }↵ | |||
7 | SymbolAxis that = (SymbolAxis) obj;↵ | |||
8 | if (!this.symbol↵ | 6 | Tick t = (Tick) obj; ↵ | |
9 | s.equals(that.symbols)) {↵ | 7 | if (!ObjectUtilities.equal(this.text, t.text)) {↵ | |
10 | return false;↵ | 8 | return false; ↵ | |
11 | }↵ | 9 | ↵ | |
10 | }↵ | |||
12 | if (this.gridBandsVisible != that.gridBandsVisible) {↵ | 11 | if (!ObjectUtilities.equal(this.textAnchor, t.textAnchor)) {↵ | |
13 | return false;↵ | 12 | return false;↵ | |
13 | ↵ | |||
14 | }↵ | 14 | }↵ | |
15 | if (!PaintUtilities.equal(this.gridBandPaint, that.gridBandPaint)) {↵ | 15 | if (!ObjectUtilities.equal(this.rotationAnchor, t.rotationAnchor)) {↵ | |
16 | return false;↵ | 16 | return false; ↵ | |
17 | }↵ | 17 | ↵ | |
18 | }↵ | |||
18 | if (!PaintUtilities.equal(this.gridBandAlternatePaint, ↵ | 19 | if (!↵ | |
19 | that.gridBandAlternatePaint)) {↵ | 20 | (this.angle == t.angle)) {↵ | |
21 | return false; ↵ | |||
22 | }↵ | |||
20 | return false;↵ | 23 | return true;↵ | |
21 | }↵ | 24 | }↵ | |
22 | return super.equals(obj); | 25 | return false; | |
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 |
Number of node comparisons | 55 |
Number of mapped statements | 8 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 4.7 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 4 | Tick t = (Tick)obj; | ||||||||||||||||||||||||||||||||||||||
3 | if (!(obj instanceof SymbolAxis)) |
| 11 | if (!(this.angle == t.angle)) | ||||||||||||||||||||||||||||||||||||
4 | return false; | 12 | return false; | |||||||||||||||||||||||||||||||||||||
5 | SymbolAxis that = (SymbolAxis)obj; | | ||||||||||||||||||||||||||||||||||||||
6 | if (!this.symbols.equals(that.symbols)) |
| 7 | if (!ObjectUtilities.equal(this.textAnchor, t.textAnchor)) | ||||||||||||||||||||||||||||||||||||
7 | return false; | 8 | return false; | |||||||||||||||||||||||||||||||||||||
8 | if (this.gridBandsVisible != that.gridBandsVisible) | | ||||||||||||||||||||||||||||||||||||||
9 | return false; |
| | |||||||||||||||||||||||||||||||||||||
10 | if (!PaintUtilities.equal(this.gridBandPaint, that.gridBandPaint)) |
| 9 | if (!ObjectUtilities.equal(this.rotationAnchor, t.rotationAnchor)) | ||||||||||||||||||||||||||||||||||||
11 | return false; | 10 | return false; | |||||||||||||||||||||||||||||||||||||
12 | if (!PaintUtilities.equal(this.gridBandAlternatePaint, that.gridBandAlternatePaint)) |
| 5 | if (!ObjectUtilities.equal(this.text, t.text)) | ||||||||||||||||||||||||||||||||||||
13 | 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.symbols.equals(that.symbols) 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 | Unmatched return false; |
5 | Type java.awt.Paint of variable this.gridBandPaint does not match with type org.jfree.ui.TextAnchor of variable this.rotationAnchor |
6 | Expression that.gridBandPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression t.rotationAnchor cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Type java.awt.Paint of variable that.gridBandPaint does not match with type org.jfree.ui.TextAnchor of variable t.rotationAnchor |
9 | Expression that.gridBandPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression t.rotationAnchor cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Type java.awt.Paint of variable that.gridBandPaint does not match with type org.jfree.ui.TextAnchor of variable t.rotationAnchor |
12 | Type org.jfree.util.PaintUtilities does not match with type org.jfree.util.ObjectUtilities |
13 | Type java.awt.Paint of variable this.gridBandAlternatePaint does not match with type java.lang.String of variable this.text |
14 | Expression that.gridBandAlternatePaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
15 | Expression t.text cannot be parameterized, because it has dependencies to/from statements that will be extracted |
16 | Type java.awt.Paint of variable that.gridBandAlternatePaint does not match with type java.lang.String of variable t.text |
17 | Expression that.gridBandAlternatePaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
18 | Expression t.text cannot be parameterized, because it has dependencies to/from statements that will be extracted |
19 | Type java.awt.Paint of variable that.gridBandAlternatePaint does not match with type java.lang.String of variable t.text |
20 | Type org.jfree.util.PaintUtilities does not match with type org.jfree.util.ObjectUtilities |
21 | Not all possible execution flows end in a return statement |