this.shape_counter++;
if (shape_counter >= (SHAPE_ARRAY.length - 1)) {
shape_counter = 0;
}
return SHAPE_ARRAY[shape_counter];
if (shape_counter >= (SHAPE_ARRAY.length - 1)) {
shape_counter = 0;
}
return SHAPE_ARRAY[shape_counter];
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/visualizers/LineGraph.java
|
|
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/testelement/LineChart.java
|
Method name: Shape nextShape()
|
|
Method name: Shape nextShape()
|
Number of AST nodes: 4
|
|
Number of AST nodes: 3
|
|
1 | this.shape_counter++;↵ | | |
|
2 | if (shape_counter >= (SHAPE_ARRAY.length - 1)) {↵ | | 1 | if (shape_counter >= (SHAPE_ARRAY.length - 1)) {↵
|
3 | shape_counter = 0;↵ | | 2 | shape_counter = 0;↵
|
4 | }↵ | | 3 | }↵
|
5 | return SHAPE_ARRAY[shape_counter]; | | 4 | return SHAPE_ARRAY[shape_counter];
|
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.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 6 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.3 |
Clone type | Type 3 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | this.shape_counter++; | | | |
2 | if (shape_counter >= (SHAPE_ARRAY.length - 1)) | | 1 | if (shape_counter >= (SHAPE_ARRAY.length - 1)) |
3 | | | 2 | |
4 | return SHAPE_ARRAY[shape_counter]; | | 3 | return SHAPE_ARRAY[shape_counter]; |
Precondition Violations (0)
Row |
Violation |