File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/functions/StringFromFile.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/functions/StringFromFile.java | |||
Method name: void openFile()
|
Method name: void openFile()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if (values.length >= PARAM_START) {↵ | 1 | if (values.length >= PARAM_END) {↵ | |
2 | start = ((CompoundVariable) values[PARAM_START - 1]).execute();↵ | 2 | String tmp = ((CompoundVariable) values[PARAM_END - 1]).execute();↵ | |
3 | try {↵ | 3 | try {↵ | |
4 | myStart = Integer.valueOf(start).intValue();↵ | 4 | myEnd = Integer.valueOf(tmp).intValue();↵ | |
5 | } catch (NumberFormatException e) {↵ | 5 | } catch (NumberFormatException e) {↵ | |
6 | myStart = COUNT_UNUSED;// Don't process invalid numbers↵ | 6 | myEnd = COUNT_UNUSED;// Don't process invalid numbers↵ | |
7 | }↵ | 7 | // (including "")↵ | |
8 | }↵ | |||
8 | } | 9 |
| |
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 the same method |
Number of node comparisons | 8 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | if (values.length >= PARAM_START) |
| 10 | if (values.length >= PARAM_END) | |||||||||||||||
5 | start = ((CompoundVariable)values[PARAM_START - 1]).execute(); |
| | ||||||||||||||||
|
| 11 | String tmp = ((CompoundVariable)values[PARAM_END - 1]).execute(); | ||||||||||||||||
6 | try |
| 12 | try | |||||||||||||||
7 | myStart = Integer.valueOf(start).intValue(); |
| 13 | myEnd = Integer.valueOf(tmp).intValue(); |
Row | Violation |
---|---|
1 | Unmatched statement start=((CompoundVariable)values[PARAM_START - 1]).execute(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Unmatched statement String tmp=((CompoundVariable)values[PARAM_END - 1]).execute(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
3 | Expression myStart cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression myEnd cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression myStart is a field being modified, and thus it cannot be parameterized |
6 | Expression myEnd is a field being modified, and thus it cannot be parameterized |
7 | Expression myStart is a field being modified, and thus it cannot be parameterized |
8 | Expression myEnd is a field being modified, and thus it cannot be parameterized |