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: Stroke[] createStrokes(int)
|
Method name: Shape[] createShapes(int)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | Stroke[] str = new Stroke[count];↵ | 1 | Shape[] shapes = new Shape[count];↵ | |
2 | for (int idx=0; idx < count; idx++) {↵ | 2 | for (int idx=0; idx < count; idx++) {↵ | |
3 | str[idx] = nextStroke();↵ | 3 | shapes[idx] = nextShape();↵ | |
4 | }↵ | 4 | }↵ | |
5 | return str; | 5 | return shapes; | |
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) | 0.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 8 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 0.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||
---|---|---|---|---|---|---|---|
| 1 | Shape[] shapes = new Shape[count]; | |||||
1 | Stroke[] str = new Stroke[count]; | | |||||
2 | for (int idx = 0; idx < count; idx++) | 2 | for (int idx = 0; idx < count; idx++) | ||||
|
| 3 | shapes[idx] = nextShape(); | ||||
3 | str[idx] = nextStroke(); |
| | ||||
|
| 4 | return shapes; | ||||
4 | return str; |
| |
Row | Violation |
---|---|
1 | Unmatched statement shapes[idx]=nextShape(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement str[idx]=nextStroke(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched return shapes; |
4 | Unmatched return str; |