if (state.getProcessVisibleItemsOnly()) {
int[] itemBounds = RendererUtilities.findLiveItems(
dataset, series, xAxis.getLowerBound(),
xAxis.getUpperBound());
firstItem = itemBounds[0];
lastItem = itemBounds[1];
}
if (state.getProcessVisibleItemsOnly()) {
int[] itemBounds = RendererUtilities.findLiveItems(
dataset, series, xAxis.getLowerBound(),
xAxis.getUpperBound());
firstItem = itemBounds[0];
lastItem = itemBounds[1];
}
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/XYPlot.java
|
|
File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/XYPlot.java
|
Method name: boolean render(Graphics2D, Rectangle2D, int, PlotRenderingInfo, CrosshairState)
|
|
Method name: boolean render(Graphics2D, Rectangle2D, int, PlotRenderingInfo, CrosshairState)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | if (state.getProcessVisibleItemsOnly()) {↵ | | 1 | if (state.getProcessVisibleItemsOnly()) {↵
|
2 | int[] itemBounds = RendererUtilities.findLiveItems(↵ | | 2 | int[] itemBounds = RendererUtilities.findLiveItems(↵
|
3 | dataset, series, xAxis.getLowerBound(),↵ | | 3 | dataset, series, xAxis.getLowerBound(),↵
|
4 | xAxis.getUpperBound());↵ | | 4 | xAxis.getUpperBound());↵
|
5 | firstItem = itemBounds[0];↵ | | 5 | firstItem = itemBounds[0];↵
|
6 | lastItem = itemBounds[1];↵ | | 6 | lastItem = itemBounds[1];↵
|
7 | } | | 7 | }
|
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.8 |
Clones location | Clones are in the same method |
Number of node comparisons | 18 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 4 |
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) | 8.2 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
23 | if (state.getProcessVisibleItemsOnly()) | | 34 | if (state.getProcessVisibleItemsOnly()) |
24 | int[] itemBounds = RendererUtilities.findLiveItems(dataset, series, xAxis.getLowerBound(), xAxis.getUpperBound()); | | 35 | int[] itemBounds = RendererUtilities.findLiveItems(dataset, series, xAxis.getLowerBound(), xAxis.getUpperBound()); |
25 | firstItem = itemBounds[0]; | | 36 | firstItem = itemBounds[0]; |
26 | lastItem = itemBounds[1]; | | 37 | lastItem = itemBounds[1]; |
Precondition Violations (1)
Row |
Violation |
1 | Clone fragment #1 returns variables firstItem, lastItem , while Clone fragment #2 returns variables firstItem, lastItem |