this.USEFILE = true; boolean exc = false; for (int idx = 0; idx < this.EXCFILE.length; idx++) { if (text.indexOf(this.EXCFILE[idx]) > -1) { exc = true; this.USEFILE = false; break; } } return exc;
this.USEFILE = true; boolean exc = false; for (int idx = 0; idx < this.EXCPATTERNS.size(); idx++) { if (JMeterUtils.getMatcher().contains(text, (Pattern) this.EXCPATTERNS.get(idx))) { exc = true; this.USEFILE = false; break; } } return exc;
Clone fragments detected by clone detection tool
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 excFile(String) Method name: boolean excPattern(String)
Number of AST nodes: 8 Number of AST nodes: 8
1
this.USEFILE = true;
1
this.USEFILE = true;
2
		boolean exc = false;
2
		boolean exc = false;
3
		for (int idx = 0; idx < this.EXCFILE.length; idx++) {
3
		for (int idx = 0; idx < this.EXCPATTERNS.size(); idx++) {
4
			if (text.indexOf(this.EXCFILE[idx]) > -1) {
4
			if (JMeterUtils.getMatcher().contains(text, (Pattern) this.EXCPATTERNS.get(idx))) {
5
				exc = true;
5
				exc = true;
6
				this.USEFILE = false;
6
				this.USEFILE = false;
7
				break;
7
				break;
8
			}
8
			}
9
		}
9
		}
10
		return exc;
10
		return exc;
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are declared in the same class
Number of node comparisons7
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment4
    Number of unmapped statements in the second code fragment4
    Time elapsed for statement mapping (ms)2.3
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    this.USEFILE = true;
    1
    this.USEFILE = true;
    2
    boolean exc = false;
    2
    boolean exc = false;
    3
    for (int idx = 0; idx < this.EXCFILE.length; idx++)
    3
    for (int idx = 0; idx < this.EXCFILE.length; idx++)
    3
    for (int idx = 0; idx < this.EXCPATTERNS.size(); idx++)
    Differences
    Expression1Expression2Difference
    this.EXCFILE.lengththis.EXCPATTERNS.size()TYPE_COMPATIBLE_REPLACEMENT
    3
    for (int idx = 0; idx < this.EXCPATTERNS.size(); idx++)
                                                                                                                                                                      
    4
    if (JMeterUtils.getMatcher().contains(text, (Pattern)this.EXCPATTERNS.get(idx)))
    Preondition Violations
    Unmatched statement if(JMeterUtils.getMatcher().contains(text,(Pattern)this.EXCPATTERNS.get(idx))) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    4
    if (JMeterUtils.getMatcher().contains(text, (Pattern)this.EXCPATTERNS.get(idx)))
                            
    5
    exc = true;
    Preondition Violations
    Unmatched statement exc=true; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    5
    exc = true;
                                                
    6
    this.USEFILE = false;
    Preondition Violations
    Unmatched statement this.USEFILE=false; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    6
    this.USEFILE = false;
                      
    7
    break;
    Preondition Violations
    Unmatched break;
    7
    break;
    4
    if (text.indexOf(this.EXCFILE[idx]) > -1)
    4
    if (text.indexOf(this.EXCFILE[idx]) > -1)
    Preondition Violations
    Unmatched statement if(text.indexOf(this.EXCFILE[idx]) > -1) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                          
    5
    exc = true;
    5
    exc = true;
    Preondition Violations
    Unmatched statement exc=true; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                            
    6
    this.USEFILE = false;
    6
    this.USEFILE = false;
    Preondition Violations
    Unmatched statement this.USEFILE=false; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                
    7
    break;
    7
    break;
    Preondition Violations
    Unmatched break;
                      
    8
    return exc;
    8
    return exc;
    Precondition Violations (9)
    Row Violation
    1Unmatched statement if(JMeterUtils.getMatcher().contains(text,(Pattern)this.EXCPATTERNS.get(idx))) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Unmatched statement exc=true; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    3Unmatched statement this.USEFILE=false; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    4Unmatched break;
    5Unmatched statement if(text.indexOf(this.EXCFILE[idx]) > -1) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    6Unmatched statement exc=true; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    7Unmatched statement this.USEFILE=false; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    8Unmatched break;
    9Clone fragment #1 returns variables idx, exc , while Clone fragment #2 returns variables idx, exc