File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/util/accesslog/TCLogParser.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/util/accesslog/SharedTCLogParser.java | |||
Method name: int parse(BufferedReader, TestElement, int)
|
Method name: int parse(FileServer, TestElement, int)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | while (line != null) {↵ | 1 | while (line != null) {↵ | |
2 | if (line.length() > 0) {↵ | 2 | if (line.length() > 0) {↵ | |
3 | actualCount += this.parseLine(line, el);↵ | 3 | actualCount += this.parseLine(line, el);↵ | |
4 | }↵ | 4 | }↵ | |
5 | // we check the count to see if we have exceeded↵ | 5 | // we check the count to see if we have exceeded↵ | |
6 | // the number of lines to parse. There's no way↵ | 6 | // the number of lines to parse. There's no way↵ | |
7 | // to know where to stop in the file. Therefore↵ | 7 | // to know where to stop in the file. Therefore↵ | |
8 | // we use break to escape the while loop when↵ | 8 | // we use break to escape the while loop when↵ | |
9 | // we've reached the count.↵ | 9 | // we've reached the count.↵ | |
10 | if (parseCount != -1 && actualCount >= parseCount) {↵ | 10 | if (parseCount != -1 && actualCount >= parseCount) {↵ | |
11 | break;↵ | 11 | break;↵ | |
12 | }↵ | 12 | }↵ | |
13 | line = breader.readLine();↵ | 13 | line = breader.readLine(FILENAME);↵ | |
14 | } | 14 |
| |
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.6 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 18 |
Number of mapped statements | 5 |
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) | 104.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||
---|---|---|---|---|---|---|---|---|
5 | while (line != null) | 5 | while (line != null) | |||||
6 | if (line.length() > 0) | 6 | if (line.length() > 0) | |||||
7 | actualCount += this.parseLine(line, el); | 7 | actualCount += this.parseLine(line, el); | |||||
8 | if (parseCount != -1 && actualCount >= parseCount) | 8 | if (parseCount != -1 && actualCount >= parseCount) | |||||
9 | break; | 9 | break; | |||||
|
| 10 | line = breader.readLine(FILENAME); | |||||
10 | line = breader.readLine(); |
| |
Row | Violation |
---|---|
1 | Unmatched statement line=breader.readLine(FILENAME); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement line=breader.readLine(FILENAME); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
3 | Unmatched statement line=breader.readLine(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Unmatched statement line=breader.readLine(); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
5 | Clone fragment #1 returns variables line, actualCount , while Clone fragment #2 returns variables line, actualCount |