if (this.useSeriesOffset) {
x1 = domainAxis.getCategorySeriesMiddle(dataset.getColumnKey(
column), dataset.getRowKey(row), dataset, this.itemMargin,
dataArea, plot.getDomainAxisEdge());
}
else {
x1 = domainAxis.getCategoryMiddle(column, getColumnCount(),
dataArea, plot.getDomainAxisEdge());
}
if (this.useSeriesOffset) {
x1 = domainAxis.getCategorySeriesMiddle(dataset.getColumnKey(
column), dataset.getRowKey(row), dataset,
this.itemMargin, dataArea, plot.getDomainAxisEdge());
}
else {
x1 = domainAxis.getCategoryMiddle(column, getColumnCount(),
dataArea, plot.getDomainAxisEdge());
}
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/LineAndShapeRenderer.java
|
|
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/ScatterRenderer.java
|
Method name: void drawItem(Graphics2D, CategoryItemRendererState, Rectangle2D, CategoryPlot, CategoryAxis, ValueAxis, CategoryDataset, int, int, int)
|
|
Method name: void drawItem(Graphics2D, CategoryItemRendererState, Rectangle2D, CategoryPlot, CategoryAxis, ValueAxis, CategoryDataset, int, int, int)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | if (this.useSeriesOffset) {↵ | | 1 | if (this.useSeriesOffset) {↵
|
2 | x1 = domainAxis.getCategorySeriesMiddle(dataset.getColumnKey(↵ | | 2 | x1 = domainAxis.getCategorySeriesMiddle(dataset.getColumnKey(↵
|
3 | column), dataset.getRowKey(row), dataset, this.itemMargin,↵ | | 3 | column), dataset.getRowKey(row), dataset,↵
|
4 | dataArea, plot.getDomainAxisEdge());↵ | | 4 | this.itemMargin, dataArea, plot.getDomainAxisEdge());↵
|
5 | }↵ | | 5 | }↵
|
6 | else {↵ | | 6 | else {↵
|
7 | x1 = domainAxis.getCategoryMiddle(column, getColumnCount(),↵ | | 7 | x1 = domainAxis.getCategoryMiddle(column, getColumnCount(),↵
|
8 | dataArea, plot.getDomainAxisEdge());↵ | | 8 | dataArea, plot.getDomainAxisEdge());↵
|
9 | } | | 9 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 9 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 43.6 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
10 | if (this.useSeriesOffset) | | 11 | if (this.useSeriesOffset) |
11 | x1 = domainAxis.getCategorySeriesMiddle(dataset.getColumnKey(column), dataset.getRowKey(row), dataset, this.itemMargin, dataArea, plot.getDomainAxisEdge()); | | 12 | x1 = domainAxis.getCategorySeriesMiddle(dataset.getColumnKey(column), dataset.getRowKey(row), dataset, this.itemMargin, dataArea, plot.getDomainAxisEdge()); |
| | | | |
12 | x1 = domainAxis.getCategoryMiddle(column, getColumnCount(), dataArea, plot.getDomainAxisEdge()); | | 13 | x1 = domainAxis.getCategoryMiddle(column, getColumnCount(), dataArea, plot.getDomainAxisEdge()); |
Precondition Violations (0)
Row |
Violation |