area = trimMargin(area);
drawBorder(g2, area);
area = trimBorder(area);
area = trimPadding(area);
g2.setPaint(this.paint);
g2.fill(area);
area = trimMargin(area);
drawBorder(g2, area);
area = trimBorder(area);
area = trimPadding(area);
this.container.draw(g2, area);
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/block/ColorBlock.java
|
|
File path: /jfreechart-1.0.10/src/org/jfree/chart/title/CompositeTitle.java
|
Method name: void draw(Graphics2D, Rectangle2D)
|
|
Method name: void draw(Graphics2D, Rectangle2D)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 5
|
|
1 | area = trimMargin(area);↵ | | 1 | area = trimMargin(area);↵
|
2 | drawBorder(g2, area);↵ | | 2 | drawBorder(g2, area);↵
|
3 | area = trimBorder(area);↵ | | 3 | area = trimBorder(area);↵
|
4 | area = trimPadding(area);↵ | | 4 | area = trimPadding(area);↵
|
5 | g2.setPaint(this.paint);↵ | | 5 | ↵
|
6 | g2.fill(area); | | 6 | this.container.draw(g2, area);
|
See real code fragment |
|
See real code fragment |
Summary
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) | 0.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 30 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | area = trimMargin(area); | | 1 | area = trimMargin(area); |
2 | drawBorder(g2, area); | | 2 | drawBorder(g2, area); |
3 | area = trimBorder(area); | | 3 | area = trimBorder(area); |
4 | area = trimPadding(area); | | 4 | area = trimPadding(area); |
| | | 5 | this.container.draw(g2, area); |
5 | g2.setPaint(this.paint); | | | |
6 | g2.fill(area); | | | |
Precondition Violations (2)
Row |
Violation |
1 | Unmatched statement this.container.draw(g2,area); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement g2.fill(area); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |