File path: /jfreechart-1.0.10/src/org/jfree/chart/JFreeChart.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/title/LegendGraphic.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 32 | Number of AST nodes: 32 | |||
1 | if (obj == this) {↵ | 1 | if (!(obj instanceof LegendGraphic)) {↵ | |
2 | return true;↵ | 2 | return false;↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!(obj instanceof JFreeChart)↵ | 4 | LegendGraphic that = (LegendGraphic) obj;↵ | |
5 | ) {↵ | 5 | if (this.shapeVisible != that.shapeVisible) {↵ | |
6 | return false;↵ | 6 | return false;↵ | |
7 | }↵ | 7 | }↵ | |
8 | JFreeChart that = (JFreeChart) obj;↵ | 8 | ↵ | |
9 | if (!this.renderingHints.equals(that.renderingHints)) {↵ | 9 | if (!ShapeUtilities.equal(this.shape, that.shape)) {↵ | |
10 | return false;↵ | 10 | return false;↵ | |
11 | }↵ | 11 | }↵ | |
12 | if (this.borderVisible != that.borderVisible) {↵ | 12 | if (this.shapeFilled != that.shapeFilled) {↵ | |
13 | return false;↵ | 13 | return false;↵ | |
14 | }↵ | 14 | }↵ | |
15 | if (!ObjectUtilities.equal(this.borderStroke, that.borderStroke)) {↵ | 15 | if (!PaintUtilities.equal(this.fillPaint, that.fillPaint)) {↵ | |
16 | return false;↵ | 16 | return false;↵ | |
17 | }↵ | 17 | }↵ | |
18 | if (!PaintUtilities.equal(this.borderPaint, that.borderPaint↵ | 18 | if (!ObjectUtilities.equal(this.fillPaintTransformer, ↵ | |
19 | )) {↵ | 19 | that.fillPaintTransformer)) {↵ | |
20 | return false;↵ | 20 | return false;↵ | |
21 | }↵ | 21 | }↵ | |
22 | if (!this.padding.equals(that.padding)) {↵ | 22 | if (this.shapeOutlineVisible != that.shapeOutlineVisible) {↵ | |
23 | return false;↵ | 23 | return false;↵ | |
24 | }↵ | 24 | }↵ | |
25 | if (!ObjectUtilities.equal(this.title, that.title)) {↵ | 25 | if (!PaintUtilities.equal(this.outlinePaint, that.outlinePaint)) {↵ | |
26 | return false;↵ | 26 | return false;↵ | |
27 | }↵ | 27 | }↵ | |
28 | if (!ObjectUtilities.equal(this.subtitles, that.subtitles)) {↵ | 28 | if (!ObjectUtilities.equal(this.outlineStroke, that.outlineStroke)) {↵ | |
29 | return false;↵ | 29 | return false;↵ | |
30 | }↵ | 30 | }↵ | |
31 | if (!ObjectUtilities.equal(this.plot, that.plot)) {↵ | 31 | if (this.shapeAnchor != that.shapeAnchor) {↵ | |
32 | return false;↵ | 32 | return false;↵ | |
33 | }↵ | 33 | }↵ | |
34 | if (!PaintUtilities.equal(↵ | 34 | if (↵ | |
35 | this.backgroundPaint, that.backgroundPaint↵ | |||
36 | )) {↵ | 35 | this.shapeLocation != that.shapeLocation) {↵ | |
37 | return false;↵ | 36 | return false;↵ | |
38 | }↵ | 37 | }↵ | |
39 | if (!ObjectUtilities.equal(this.backgroundImage,↵ | 38 | if (↵ | |
40 | that.backgroundImage)) {↵ | 39 | this.lineVisible != that.lineVisible) {↵ | |
41 | return false;↵ | 40 | return false;↵ | |
42 | }↵ | 41 | }↵ | |
43 | if (this.backgroundImageAlignment != that.backgroundImageAlignment) {↵ | 42 | if (!ShapeUtilities.equal(this.line, that.line)) {↵ | |
44 | return false;↵ | 43 | return false;↵ | |
45 | }↵ | 44 | }↵ | |
46 | if (this.backgroundImageAlpha != that.backgroundImageAlpha) {↵ | 45 | if (!PaintUtilities.equal(this.linePaint, that.linePaint)) {↵ | |
47 | return false;↵ | 46 | return false;↵ | |
48 | }↵ | 47 | }↵ | |
49 | if (this.notify != that.notify) {↵ | 48 | if (!ObjectUtilities.equal(this.lineStroke, that.lineStroke)) {↵ | |
50 | return false;↵ | 49 | return false;↵ | |
51 | }↵ | 50 | }↵ | |
52 | return true; | 51 | return super.equals(obj); | |
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) | 28.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 415 |
Number of mapped statements | 27 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 4 |
Time elapsed for statement mapping (ms) | 27.8 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | if (!(obj instanceof JFreeChart)) |
| 1 | if (!(obj instanceof LegendGraphic)) | ||||||||||||||||||||||||||||||
4 | return false; | 2 | return false; | |||||||||||||||||||||||||||||||
5 | JFreeChart that = (JFreeChart)obj; |
| 3 | LegendGraphic that = (LegendGraphic)obj; | ||||||||||||||||||||||||||||||
6 | if (!this.renderingHints.equals(that.renderingHints)) |
| 6 | if (!ShapeUtilities.equal(this.shape, that.shape)) | ||||||||||||||||||||||||||||||
7 | return false; | 7 | return false; | |||||||||||||||||||||||||||||||
8 | if (this.borderVisible != that.borderVisible) |
| 4 | if (this.shapeVisible != that.shapeVisible) | ||||||||||||||||||||||||||||||
9 | return false; | 5 | return false; | |||||||||||||||||||||||||||||||
|
| 8 | if (this.shapeFilled != that.shapeFilled) | |||||||||||||||||||||||||||||||
|
| 9 | return false; | |||||||||||||||||||||||||||||||
10 | if (!ObjectUtilities.equal(this.borderStroke, that.borderStroke)) |
| 18 | if (!ObjectUtilities.equal(this.outlineStroke, that.outlineStroke)) | ||||||||||||||||||||||||||||||
11 | return false; | 19 | return false; | |||||||||||||||||||||||||||||||
12 | if (!PaintUtilities.equal(this.borderPaint, that.borderPaint)) |
| 10 | if (!PaintUtilities.equal(this.fillPaint, that.fillPaint)) | ||||||||||||||||||||||||||||||
13 | return false; | 11 | return false; | |||||||||||||||||||||||||||||||
14 | if (!this.padding.equals(that.padding)) |
| 12 | if (!ObjectUtilities.equal(this.fillPaintTransformer, that.fillPaintTransformer)) | ||||||||||||||||||||||||||||||
15 | return false; | 13 | return false; | |||||||||||||||||||||||||||||||
16 | if (!ObjectUtilities.equal(this.title, that.title)) |
| 30 | if (!ObjectUtilities.equal(this.lineStroke, that.lineStroke)) | ||||||||||||||||||||||||||||||
17 | return false; | 31 | return false; | |||||||||||||||||||||||||||||||
18 | if (!ObjectUtilities.equal(this.subtitles, that.subtitles)) |
| 16 | if (!PaintUtilities.equal(this.outlinePaint, that.outlinePaint)) | ||||||||||||||||||||||||||||||
19 | return false; | 17 | return false; | |||||||||||||||||||||||||||||||
|
| 20 | if (this.shapeAnchor != that.shapeAnchor) | |||||||||||||||||||||||||||||||
|
| 21 | return false; | |||||||||||||||||||||||||||||||
20 | if (!ObjectUtilities.equal(this.plot, that.plot)) |
| 26 | if (!ShapeUtilities.equal(this.line, that.line)) | ||||||||||||||||||||||||||||||
21 | return false; | 27 | return false; | |||||||||||||||||||||||||||||||
22 | if (!PaintUtilities.equal(this.backgroundPaint, that.backgroundPaint)) |
| 28 | if (!PaintUtilities.equal(this.linePaint, that.linePaint)) | ||||||||||||||||||||||||||||||
23 | return false; | 29 | return false; | |||||||||||||||||||||||||||||||
24 | if (!ObjectUtilities.equal(this.backgroundImage, that.backgroundImage)) |
| | |||||||||||||||||||||||||||||||
25 | return false; |
| | |||||||||||||||||||||||||||||||
26 | if (this.backgroundImageAlignment != that.backgroundImageAlignment) |
| 24 | if (this.lineVisible != that.lineVisible) | ||||||||||||||||||||||||||||||
27 | return false; | 25 | return false; | |||||||||||||||||||||||||||||||
28 | if (this.backgroundImageAlpha != that.backgroundImageAlpha) |
| 22 | if (this.shapeLocation != that.shapeLocation) | ||||||||||||||||||||||||||||||
29 | return false; | 23 | return false; | |||||||||||||||||||||||||||||||
30 | if (this.notify != that.notify) |
| 14 | if (this.shapeOutlineVisible != that.shapeOutlineVisible) | ||||||||||||||||||||||||||||||
31 | return false; | 15 | return false; |
Row | Violation |
---|---|
1 | Expression this.renderingHints.equals(that.renderingHints) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression ShapeUtilities.equal(this.shape,that.shape) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression that.borderVisible cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression that.shapeVisible cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Unmatched statement if(this.shapeFilled != that.shapeFilled) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
6 | Unmatched return false; |
7 | Expression that.borderStroke cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression that.outlineStroke cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression that.borderPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression that.fillPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression this.padding.equals(that.padding) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Expression ObjectUtilities.equal(this.fillPaintTransformer,that.fillPaintTransformer) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Type org.jfree.chart.title.TextTitle of variable this.title does not match with type java.awt.Stroke of variable this.lineStroke |
14 | Expression that.title cannot be parameterized, because it has dependencies to/from statements that will be extracted |
15 | Expression that.lineStroke cannot be parameterized, because it has dependencies to/from statements that will be extracted |
16 | Type org.jfree.chart.title.TextTitle of variable that.title does not match with type java.awt.Stroke of variable that.lineStroke |
17 | Type java.util.List of variable this.subtitles does not match with type java.awt.Paint of variable this.outlinePaint |
18 | Expression that.subtitles cannot be parameterized, because it has dependencies to/from statements that will be extracted |
19 | Expression that.outlinePaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
20 | Type java.util.List of variable that.subtitles does not match with type java.awt.Paint of variable that.outlinePaint |
21 | Type org.jfree.util.ObjectUtilities does not match with type org.jfree.util.PaintUtilities |
22 | Unmatched statement if(this.shapeAnchor != that.shapeAnchor) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
23 | Unmatched return false; |
24 | Type org.jfree.chart.plot.Plot of variable this.plot does not match with type java.awt.Shape of variable this.line |
25 | Expression that.plot cannot be parameterized, because it has dependencies to/from statements that will be extracted |
26 | Expression that.line cannot be parameterized, because it has dependencies to/from statements that will be extracted |
27 | Type org.jfree.chart.plot.Plot of variable that.plot does not match with type java.awt.Shape of variable that.line |
28 | Type org.jfree.util.ObjectUtilities does not match with type org.jfree.util.ShapeUtilities |
29 | Expression that.backgroundPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
30 | Expression that.linePaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
31 | Unmatched statement if(!ObjectUtilities.equal(this.backgroundImage,that.backgroundImage)) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
32 | Unmatched return false; |
33 | Type int of variable this.backgroundImageAlignment does not match with type boolean of variable this.lineVisible |
34 | Expression that.backgroundImageAlignment cannot be parameterized, because it has dependencies to/from statements that will be extracted |
35 | Expression that.lineVisible cannot be parameterized, because it has dependencies to/from statements that will be extracted |
36 | Type int of variable that.backgroundImageAlignment does not match with type boolean of variable that.lineVisible |
37 | Type float of variable this.backgroundImageAlpha does not match with type org.jfree.ui.RectangleAnchor of variable this.shapeLocation |
38 | Expression that.backgroundImageAlpha cannot be parameterized, because it has dependencies to/from statements that will be extracted |
39 | Expression that.shapeLocation cannot be parameterized, because it has dependencies to/from statements that will be extracted |
40 | Type float of variable that.backgroundImageAlpha does not match with type org.jfree.ui.RectangleAnchor of variable that.shapeLocation |
41 | Expression that.notify cannot be parameterized, because it has dependencies to/from statements that will be extracted |
42 | Expression that.shapeOutlineVisible cannot be parameterized, because it has dependencies to/from statements that will be extracted |
43 | Clone fragment #1 returns variable that with type org.jfree.chart.JFreeChart , while Clone fragment #2 returns variable that with type org.jfree.chart.title.LegendGraphic |
44 | Not all possible execution flows end in a return statement |