File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/ldap/sampler/LDAPExtSampler.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/ldap/sampler/LDAPExtSampler.java | |||
Method name: String[] getRequestAttributes(String)
|
Method name: String[] getRequestAttributes(String)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 4 | |||
1 | while (attr.length() > 0) {↵ | 1 | while (attr.length() > 0) {↵ | |
2 | index = attr.indexOf(SEMI_COLON);↵ | 2 | index = attr.indexOf(SEMI_COLON);↵ | |
3 | mods[count] = attr.substring(0, index);↵ | 3 | ↵ | |
4 | count += 1;↵ | 4 | count += 1;↵ | |
5 | attr = attr.substring(index + 1);↵ | 5 | attr = attr.substring(index + 1);↵ | |
6 | } | 6 | } | |
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.1 |
Clones location | Clones are in the same method |
Number of node comparisons | 21 |
Number of mapped statements | 4 |
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.9 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||
---|---|---|---|---|---|---|---|
17 | while (attr.length() > 0) | 9 | while (attr.length() > 0) | ||||
18 | index = attr.indexOf(SEMI_COLON); | 10 | index = attr.indexOf(SEMI_COLON); | ||||
19 | mods[count] = attr.substring(0, index); |
| | ||||
20 | count += 1; | 11 | count += 1; | ||||
21 | attr = attr.substring(index + 1); | 12 | attr = attr.substring(index + 1); |
Row | Violation |
---|---|
1 | Unmatched statement mods[count]=attr.substring(0,index); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Clone fragment #1 returns variables index, count, attr , while Clone fragment #2 returns variables count |