File path: /jfreechart-1.0.10/src/org/jfree/chart/block/AbstractBlock.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/labels/AbstractXYItemLabelGenerator.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 20 | Number of AST nodes: 18 | |||
1 | if (obj == this) {↵ | 1 | if (obj == this) {↵ | |
2 | return true; ↵ | 2 | return true;↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!(obj instanceof AbstractBlock)) {↵ | 4 | if (!(obj instanceof AbstractXYItemLabelGenerator)) {↵ | |
5 | return false; ↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | AbstractBlock that = (AbstractBlock) obj;↵ | 7 | AbstractXYItemLabelGenerator that = (AbstractXYItemLabelGenerator) obj;↵ | |
8 | if (!ObjectUtilities.equal(this.id, that.id)) {↵ | 8 | if (!this.formatString.equals(that.formatString)) {↵ | |
9 | return false;↵ | 9 | return false;↵ | |
10 | }↵ | 10 | }↵ | |
11 | if (!this.frame.equals(that.frame)) {↵ | 11 | if (!ObjectUtilities.equal(this.xFormat, that.xFormat)) {↵ | |
12 | return false; ↵ | 12 | return false;↵ | |
13 | }↵ | 13 | }↵ | |
14 | if (!this.bounds.equals(that.bounds)) {↵ | 14 | if (!ObjectUtilities.equal(this.xDateFormat, that.xDateFormat)) {↵ | |
15 | return false; ↵ | 15 | return false;↵ | |
16 | }↵ | 16 | }↵ | |
17 | if (!this.margin.equals(that.margin)) {↵ | 17 | if (!ObjectUtilities.equal(this.yFormat, that.yFormat)) {↵ | |
18 | return false; ↵ | 18 | return false;↵ | |
19 | }↵ | 19 | }↵ | |
20 | if (!this.padding.equals(that.padding)) {↵ | 20 | if (!ObjectUtilities.equal(th↵ | |
21 | return false; ↵ | |||
22 | }↵ | |||
23 | if (this.height != that.height) {↵ | 21 | is.yDateFormat, that.yDateFormat)) {↵ | |
24 | return false; ↵ | 22 | return false;↵ | |
25 | }↵ | 23 | }↵ | |
26 | if (this.width != that.width) {↵ | 24 | if (!this.nullYString.equals(that.nullYString)) {↵ | |
27 | return false; ↵ | 25 | return false;↵ | |
28 | }↵ | 26 | }↵ | |
29 | return true; | 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) | 8.8 |
Clones location | Clones are in different classes |
Number of node comparisons | 139 |
Number of mapped statements | 14 |
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) | 6.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (obj == this) | 1 | if (obj == this) | ||||||||||||||||||||||||||||
2 | return true; | 2 | return true; | ||||||||||||||||||||||||||||
3 | if (!(obj instanceof AbstractBlock)) |
| 3 | if (!(obj instanceof AbstractXYItemLabelGenerator)) | |||||||||||||||||||||||||||
4 | return false; | 4 | return false; | ||||||||||||||||||||||||||||
| 5 | AbstractXYItemLabelGenerator that = (AbstractXYItemLabelGenerator)obj; | |||||||||||||||||||||||||||||
5 | AbstractBlock that = (AbstractBlock)obj; | | |||||||||||||||||||||||||||||
6 | if (!ObjectUtilities.equal(this.id, that.id)) |
| 8 | if (!ObjectUtilities.equal(this.xFormat, that.xFormat)) | |||||||||||||||||||||||||||
7 | return false; | 9 | return false; | ||||||||||||||||||||||||||||
8 | if (!this.frame.equals(that.frame)) |
| 6 | if (!this.formatString.equals(that.formatString)) | |||||||||||||||||||||||||||
9 | return false; | 7 | return false; | ||||||||||||||||||||||||||||
10 | if (!this.bounds.equals(that.bounds)) |
| 10 | if (!ObjectUtilities.equal(this.xDateFormat, that.xDateFormat)) | |||||||||||||||||||||||||||
11 | return false; | 11 | return false; | ||||||||||||||||||||||||||||
12 | if (!this.margin.equals(that.margin)) |
| 12 | if (!ObjectUtilities.equal(this.yFormat, that.yFormat)) | |||||||||||||||||||||||||||
13 | return false; | 13 | return false; | ||||||||||||||||||||||||||||
14 | if (!this.padding.equals(that.padding)) |
| 14 | if (!ObjectUtilities.equal(this.yDateFormat, that.yDateFormat)) | |||||||||||||||||||||||||||
15 | return false; | 15 | return false; |
Row | Violation |
---|---|
1 | Type org.jfree.chart.block.AbstractBlock does not match with type org.jfree.chart.labels.AbstractXYItemLabelGenerator |
2 | Type java.lang.String of variable this.id does not match with type java.text.NumberFormat of variable this.xFormat |
3 | Type java.lang.String of variable that.id does not match with type java.text.NumberFormat of variable that.xFormat |
4 | Expression that.id cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression that.xFormat cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Type java.lang.String of variable that.id does not match with type java.text.NumberFormat of variable that.xFormat |
7 | Type org.jfree.chart.block.BlockFrame of variable that.frame does not match with type java.lang.String of variable that.formatString |
8 | Expression that.frame cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression that.formatString cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Type org.jfree.chart.block.BlockFrame of variable that.frame does not match with type java.lang.String of variable that.formatString |
11 | Type org.jfree.chart.block.BlockFrame of variable this.frame does not match with type java.lang.String of variable this.formatString |
12 | Expression this.bounds.equals(that.bounds) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Expression ObjectUtilities.equal(this.xDateFormat,that.xDateFormat) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Expression this.margin.equals(that.margin) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
15 | Expression ObjectUtilities.equal(this.yFormat,that.yFormat) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
16 | Expression this.padding.equals(that.padding) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
17 | Expression ObjectUtilities.equal(this.yDateFormat,that.yDateFormat) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
18 | Not all possible execution flows end in a return statement |