File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/action/Load.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java | |||
Method name: void doAction(ActionEvent)
|
Method name: int getPort()
|
|||
Number of AST nodes: 6 | Number of AST nodes: 7 | |||
1 | if(selectedFile != null) {↵ | 1 | if↵ | |
2 | boolean merging = e.getActionCommand().equals(ActionNames.MERGE);↵ | |||
3 | // We must ask the user if it is ok to close current project↵ | |||
4 | if(!merging) {↵ | |||
5 | if (!Close.performAction(e)) {↵ | |||
6 | return;↵ | |||
7 | }↵ | |||
8 | }↵ | |||
9 | loadProjectFile(e, selectedFile, merging);↵ | |||
10 | ↵ | 2 | (port == UNSPECIFIED_PORT) {↵ | |
3 | String prot = getProtocol();↵ | |||
4 | if (PROTOCOL_HTTPS.equalsIgnoreCase(prot)) {↵ | |||
5 | return DEFAULT_HTTPS_PORT;↵ | |||
6 | }↵ | |||
7 | if (!PROTOCOL_HTTP.equalsIgnoreCase(prot)) {↵ | |||
8 | log.warn("Unexpected protocol: "+prot);↵ | |||
9 | // TODO - should this return something else?↵ | |||
10 | }↵ | |||
11 | return DEFAULT_HTTP_PORT;↵ | |||
11 | } | 12 | } | |
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.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 6 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.4 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 3 | String prot = getProtocol(); | ||||||||||||
8 | if (!Close.performAction(e)) |
| 4 | if (PROTOCOL_HTTPS.equalsIgnoreCase(prot)) | ||||||||||
|
| 5 | return DEFAULT_HTTPS_PORT; | |||||||||||
9 | return; |
| |
Row | Violation |
---|---|
1 | Unmatched return DEFAULT_HTTPS_PORT; |
2 | Unmatched return; |