File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/RingPlot.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/dial/DialTextAnnotation.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 18 | Number of AST nodes: 18 | |||
1 | if (this == obj) {↵ | 1 | if (obj == this) {↵ | |
2 | return true;↵ | 2 | return true;↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!(obj instanceof RingPlot)) {↵ | 4 | if (!(obj instanceof DialTextAnnotation)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | RingPlot that = (RingPlot) obj;↵ | 7 | DialTextAnnotation that = (DialTextAnnotation) obj;↵ | |
8 | if (this.separatorsVisible != that.separatorsVisible) {↵ | 8 | if (!this.label.equals(that.label)) {↵ | |
9 | return false;↵ | 9 | return false;↵ | |
10 | }↵ | 10 | }↵ | |
11 | if (!ObjectUtilities.equal(this.separatorStroke, ↵ | 11 | if (!↵ | |
12 | that.separatorStroke)) {↵ | 12 | this.font.equals(that.font)) {↵ | |
13 | return false;↵ | 13 | return false;↵ | |
14 | }↵ | 14 | }↵ | |
15 | if (!PaintUtilities.equal(this.separatorPaint, that.separatorPaint)) {↵ | 15 | if (!PaintUtilities.equal(this.paint, that.paint)) {↵ | |
16 | return false;↵ | 16 | return false;↵ | |
17 | }↵ | 17 | }↵ | |
18 | if (this.innerSeparatorExtension != that.innerSeparatorExtension) {↵ | 18 | if (this.radius != that.radius) {↵ | |
19 | return false;↵ | 19 | return false;↵ | |
20 | }↵ | 20 | }↵ | |
21 | if (this.outerSeparatorExtension != that.outerSeparatorExtension) {↵ | 21 | if (this.angle != that.angle) {↵ | |
22 | return false;↵ | 22 | return false;↵ | |
23 | }↵ | 23 | }↵ | |
24 | if (this.sectionDepth != that.sectionDepth) {↵ | 24 | if (!this.anchor.equals(that.anchor)) {↵ | |
25 | return false;↵ | 25 | return false;↵ | |
26 | }↵ | 26 | }↵ | |
27 | return super.equals(obj); | 27 |
| |
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) | 5.4 |
Clones location | Clones are in different classes |
Number of node comparisons | 101 |
Number of mapped statements | 11 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 5.8 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | if (!(obj instanceof RingPlot)) |
| 3 | if (!(obj instanceof DialTextAnnotation)) | ||||||||||||||||||||||||||||||
4 | return false; | 4 | return false; | |||||||||||||||||||||||||||||||
5 | RingPlot that = (RingPlot)obj; |
| 5 | DialTextAnnotation that = (DialTextAnnotation)obj; | ||||||||||||||||||||||||||||||
|
| 6 | if (!this.label.equals(that.label)) | |||||||||||||||||||||||||||||||
|
| 7 | return false; | |||||||||||||||||||||||||||||||
6 | if (this.separatorsVisible != that.separatorsVisible) |
| 12 | if (this.radius != that.radius) | ||||||||||||||||||||||||||||||
7 | return false; | 13 | return false; | |||||||||||||||||||||||||||||||
8 | if (!ObjectUtilities.equal(this.separatorStroke, that.separatorStroke)) |
| 10 | if (!PaintUtilities.equal(this.paint, that.paint)) | ||||||||||||||||||||||||||||||
9 | return false; | 11 | return false; | |||||||||||||||||||||||||||||||
10 | if (!PaintUtilities.equal(this.separatorPaint, that.separatorPaint)) |
| 8 | if (!this.font.equals(that.font)) | ||||||||||||||||||||||||||||||
11 | return false; | 9 | return false; | |||||||||||||||||||||||||||||||
12 | if (this.innerSeparatorExtension != that.innerSeparatorExtension) |
| 14 | if (this.angle != that.angle) | ||||||||||||||||||||||||||||||
13 | return false; | 15 | return false; |
Row | Violation |
---|---|
1 | Unmatched statement if(!this.label.equals(that.label)) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched return false; |
3 | Type boolean of variable this.separatorsVisible does not match with type double of variable this.radius |
4 | Expression that.separatorsVisible cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression that.radius cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Type boolean of variable that.separatorsVisible does not match with type double of variable that.radius |
7 | Type java.awt.Stroke of variable this.separatorStroke does not match with type java.awt.Paint of variable this.paint |
8 | Expression that.separatorStroke cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression that.paint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Type java.awt.Stroke of variable that.separatorStroke does not match with type java.awt.Paint of variable that.paint |
11 | Type org.jfree.util.ObjectUtilities does not match with type org.jfree.util.PaintUtilities |
12 | Expression PaintUtilities.equal(this.separatorPaint,that.separatorPaint) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Expression this.font.equals(that.font) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Expression that.innerSeparatorExtension cannot be parameterized, because it has dependencies to/from statements that will be extracted |
15 | Expression that.angle cannot be parameterized, because it has dependencies to/from statements that will be extracted |
16 | Clone fragment #1 returns variable that with type org.jfree.chart.plot.RingPlot , while Clone fragment #2 returns variable that with type org.jfree.chart.plot.dial.DialTextAnnotation |
17 | Not all possible execution flows end in a return statement |