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: 7 | Number of AST nodes: 7 | |||
1 | if (saveConfig.saveThreadCounts()) {↵ | 1 | if (saveConfig.saveSampleCount()) {↵ | |
2 | field = CSV_THREAD_COUNT1;↵ | 2 | field = CSV_SAMPLE_COUNT;↵ | |
3 | text = parts[i++];↵ | 3 | text = parts[i++];↵ | |
4 | result.setGroupThreads(Integer.parseInt(text));↵ | 4 | result.setSampleCount(Integer.parseInt(text));↵ | |
5 | ↵ | |||
6 | field = CSV_THREAD_COUNT2;↵ | 5 | field = CSV_ERROR_COUNT;↵ | |
7 | text = parts[i++];↵ | 6 | text = parts[i++];↵ | |
8 | result.setAllThreads(Integer.parseInt(text));↵ | 7 | result.setErrorCount(Integer.parseInt(text));↵ | |
9 | } | 8 |
| |
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) | 1.0 |
Clones location | Clones are in the same method |
Number of node comparisons | 50 |
Number of mapped statements | 7 |
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) | 46.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
58 | if (saveConfig.saveThreadCounts()) |
| 79 | if (saveConfig.saveSampleCount()) | ||||||||||||||
59 | field = CSV_THREAD_COUNT1; |
| 80 | field = CSV_SAMPLE_COUNT; | ||||||||||||||
60 | text = parts[i++]; | 81 | text = parts[i++]; | |||||||||||||||
61 | result.setGroupThreads(Integer.parseInt(text)); |
| 82 | result.setSampleCount(Integer.parseInt(text)); | ||||||||||||||
62 | field = CSV_THREAD_COUNT2; |
| 83 | field = CSV_ERROR_COUNT; | ||||||||||||||
63 | text = parts[i++]; | 84 | text = parts[i++]; | |||||||||||||||
64 | result.setAllThreads(Integer.parseInt(text)); |
| 85 | result.setErrorCount(Integer.parseInt(text)); |
Row | Violation |
---|---|
1 | Expression result.setGroupThreads(Integer.parseInt(text)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression result.setSampleCount(Integer.parseInt(text)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression result.setGroupThreads(Integer.parseInt(text)) is a void method call, and thus it cannot be parameterized |
4 | Expression result.setSampleCount(Integer.parseInt(text)) is a void method call, and thus it cannot be parameterized |
5 | Expression result.setAllThreads(Integer.parseInt(text)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression result.setErrorCount(Integer.parseInt(text)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression result.setAllThreads(Integer.parseInt(text)) is a void method call, and thus it cannot be parameterized |
8 | Expression result.setErrorCount(Integer.parseInt(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 |