File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/save/CSVSaveService.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/save/CSVSaveService.java | |||
Method name: SampleEvent makeResultFromDelimitedString(String[], SampleSaveConfiguration, long)
|
Method name: SampleEvent makeResultFromDelimitedString(String[], SampleSaveConfiguration, long)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if (saveConfig.saveBytes()) {↵ | 1 | if (saveConfig.saveLatency()) {↵ | |
2 | field = CSV_BYTES;↵ | 2 | field = CSV_LATENCY;↵ | |
3 | text = parts[i++];↵ | 3 | text = parts[i++];↵ | |
4 | result.setBytes(Integer.parseInt(text));↵ | 4 | result.setLatency(Long.parseLong(text));↵ | |
5 | } | 5 |
| |
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.7 |
Clones location | Clones are in the same method |
Number of node comparisons | 17 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 32.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
54 | if (saveConfig.saveBytes()) |
| 71 | if (saveConfig.saveLatency()) | |||||||||||||||||||||||||||
55 | field = CSV_BYTES; |
| 72 | field = CSV_LATENCY; | |||||||||||||||||||||||||||
56 | text = parts[i++]; | 73 | text = parts[i++]; | ||||||||||||||||||||||||||||
57 | result.setBytes(Integer.parseInt(text)); |
| 74 | result.setLatency(Long.parseLong(text)); |
Row | Violation |
---|---|
1 | Expression Integer.parseInt(text) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression Long.parseLong(text) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Type int of variable Integer.parseInt(text) does not match with type long of variable Long.parseLong(text) |
4 | Expression Integer cannot be unified with expression Long , because common superclass java.lang.Number does not declare member(s) public static int parseInt(java.lang.String) throws java.lang.NumberFormatException, public static long parseLong(java.lang.String) throws java.lang.NumberFormatException |
5 | Expression result.setBytes(Integer.parseInt(text)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression result.setLatency(Long.parseLong(text)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression result.setBytes(Integer.parseInt(text)) is a void method call, and thus it cannot be parameterized |
8 | Expression result.setLatency(Long.parseLong(text)) is a void method call, and thus it cannot be parameterized |
9 | Clone fragment #1 returns variables field, text, i , while Clone fragment #2 returns variables field, text, i |