File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/proxy/HttpRequestHdr.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/action/LoadRecentProject.java | |||
Method name: void populateSampler(Map, Map)
|
Method name: void updateRecentFileMenuItems(List, String)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | synchronized (formEncodings) {↵ | |||
2 | ↵ | 1 | for(int i = 0; i < NUMBER_OF_MENU_ITEMS; i++) {↵ | |
3 | String formEncoding = (String) formEncodings.get(urlWithoutQuery);↵ | 2 | String f↵ | |
4 | // Form encoding has priority over page encoding↵ | |||
5 | if (formEncoding != null) {↵ | |||
6 | contentEncoding = formEncoding;↵ | |||
7 | ↵ | 3 | ileName = (String)newRecentFiles.get(i);↵ | |
4 | if(fileName != null) {↵ | |||
5 | setRecentFile(i, fileName);↵ | |||
8 | }↵ | 6 | }↵ | |
9 | } | 7 |
| |
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 different classes |
Number of node comparisons | 6 |
Number of mapped statements | 2 |
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 | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
35 | String formEncoding = (String)formEncodings.get(urlWithoutQuery); |
| 12 | String fileName = (String)newRecentFiles.get(i); | ||||||||||||||||||||||||
36 | if (formEncoding != null) |
| 13 | if (fileName != null) | ||||||||||||||||||||||||
|
| 14 | setRecentFile(i, fileName); | |||||||||||||||||||||||||
37 | contentEncoding = formEncoding; | |
Row | Violation |
---|---|
1 | Type java.lang.String of variable urlWithoutQuery does not match with type int of variable i |
2 | Type java.util.Map of variable formEncodings does not match with type java.util.LinkedList of variable newRecentFiles |
3 | Unmatched statement setRecentFile(i,fileName); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |