JMeterContext context = getThreadContext(); String inputVariable = getInputVal() + getSeparator() + (loopCount + 1); if (context.getVariables().getObject(inputVariable) != null) { log.debug("ForEach resultstring eofArgs= false"); return false; } log.debug("ForEach resultstring eofArgs= true"); return true;
JMeterContext context = getThreadContext(); String inputVariable = getInputVal() + getSeparator() + "1";// $NON-NLS-1$ if (context.getVariables().getObject(inputVariable) != null) { return false; } if (log.isDebugEnabled()) { log.debug("No entries found - null first entry: " + inputVariable); } return true;
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/control/ForeachController.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/control/ForeachController.java
Method name: boolean endOfArguments() Method name: boolean emptyList()
Number of AST nodes: 7 Number of AST nodes: 7
1
JMeterContext context = getThreadContext();
1
JMeterContext context = getThreadContext();
2
		String inputVariable = getInputVal() + getSeparator() + (loopCount + 1);
2
		String inputVariable = getInputVal() + getSeparator() + "1";// $NON-NLS-1$
3
		if (context.getVariables().getObject(inputVariable) != null) {
3
		if (context.getVariables().getObject(inputVariable) != null) {
4
			log.debug("ForEach resultstring eofArgs= false");
4
			return false;
5
			return false;
5
		
6
		}
7
		log.debug("ForEach resultstring eofArgs= true");
6
}
7
		if (log.isDebugEnabled()) {
8
			log.debug("No entries found - null first entry: " + inputVariable);
9
		}
8
		return true;
10
		return true;
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.2
Clones locationClones are declared in the same class
Number of node comparisons19
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment3
    Number of unmapped statements in the second code fragment3
    Time elapsed for statement mapping (ms)0.7
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    JMeterContext context = getThreadContext();
    1
    JMeterContext context = getThreadContext();
                                                                                                                              
    2
    String inputVariable = getInputVal() + getSeparator() + "1";
    2
    String inputVariable = getInputVal() + getSeparator() + (loopCount + 1);
                                                                                                                                                      
    3
    if (context.getVariables().getObject(inputVariable) != null)
    3
    if (context.getVariables().getObject(inputVariable) != null)
    4
    log.debug("ForEach resultstring eofArgs= false");
                                                                                                            
    5
    return false;
    4
    return false;
                                                          
    5
    if (log.isDebugEnabled())
                                                                                                                                                
    6
    log.debug("No entries found - null first entry: " + inputVariable);
    6
    log.debug("ForEach resultstring eofArgs= true");
                                                                                                          
    7
    return true;
    7
    return true;
    Precondition Violations (0)
    Row Violation