File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/util/accesslog/LogFilter.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/util/accesslog/LogFilter.java | |||
Method name: boolean incPattern(String)
|
Method name: boolean incFile(String)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | this.USEFILE = false;↵ | 1 | this.USEFILE = false;↵ | |
2 | for (int idx = 0; idx < this.INCPATTERNS.size(); idx++) {↵ | 2 | for (int idx = 0; idx < this.INCFILE.length; idx++) {↵ | |
3 | if (JMeterUtils.getMatcher().contains(text, (Pattern) this.INCPATTERNS.get(idx))) {↵ | 3 | if (text.indexOf(this.INCFILE[idx]) > -1) {↵ | |
4 | this.USEFILE = true;↵ | 4 | this.USEFILE = true;↵ | |
5 | break;↵ | 5 | break;↵ | |
6 | }↵ | 6 | }↵ | |
7 | }↵ | 7 | }↵ | |
8 | return this.USEFILE; | 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) | 0.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 4 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 1.8 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | this.USEFILE = false; | 1 | this.USEFILE = false; | |||||||||||
2 | for (int idx = 0; idx < this.INCPATTERNS.size(); idx++) |
| 2 | for (int idx = 0; idx < this.INCFILE.length; idx++) | ||||||||||
|
| 3 | if (text.indexOf(this.INCFILE[idx]) > -1) | |||||||||||
|
| 4 | this.USEFILE = true; | |||||||||||
|
| 5 | break; | |||||||||||
3 | if (JMeterUtils.getMatcher().contains(text, (Pattern)this.INCPATTERNS.get(idx))) |
| | |||||||||||
4 | this.USEFILE = true; |
| | |||||||||||
5 | break; |
| | |||||||||||
6 | return this.USEFILE; | 6 | return this.USEFILE; |
Row | Violation |
---|---|
1 | Unmatched statement if(text.indexOf(this.INCFILE[idx]) > -1) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement this.USEFILE=true; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched break; |
4 | Unmatched statement if(JMeterUtils.getMatcher().contains(text,(Pattern)this.INCPATTERNS.get(idx))) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
5 | Unmatched statement this.USEFILE=true; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
6 | Unmatched break; |