Iterator iter = iterationListeners.iterator(); LoopIterationEvent event = new LoopIterationEvent(this, getIterCount()); while (iter.hasNext()) { LoopIterationListener item = (LoopIterationListener) iter.next(); item.iterationStart(event); }
if (getLogger().isDebugEnabled()) { Iterator argsIt = context.getParameterNamesIterator(); while (argsIt.hasNext()) { String name = (String) argsIt.next(); getLogger().debug(name + "=" + context.getParameter(name)); } }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/control/GenericController.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/java/test/SleepTest.java
Method name: void fireIterationStart() Method name: void listParameters(JavaSamplerContext)
Number of AST nodes: 5 Number of AST nodes: 5
1
Iterator iter = iterationListeners.iterator();
1
if (getLogger().isDebugEnabled()) {
2
		LoopIterationEvent event = new LoopIterationEvent(this, getIterCount());
2
			Iterator argsIt = context.getParameterNamesIterator();
3
		while (iter.hasNext()) {
3
			while (argsIt.hasNext()) {
4
			LoopIterationListener item = (LoopIterationListener) iter.next();
4
			
5
			item.iterationStart(event);
5
	String name = (String) argsIt.next();
6
				getLogger().debug(name + "=" + context.getParameter(name));
7
			}
6
		}
8
		}
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 in different classes
Number of node comparisons11
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment4
    Number of unmapped statements in the second code fragment3
    Time elapsed for statement mapping (ms)3.5
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    Iterator iter = iterationListeners.iterator();
                                                                                                  
                                                                                                                  
    2
    Iterator argsIt = context.getParameterNamesIterator();
    2
    LoopIterationEvent event = new LoopIterationEvent(this, getIterCount());
                                                                                                                                                    
    3
    while (iter.hasNext())
    3
    while (iter.hasNext())
    3
    while (argsIt.hasNext())
    Differences
    Expression1Expression2Difference
    iterargsItVARIABLE_NAME_MISMATCH
    3
    while (argsIt.hasNext())
                                                                              
    4
    String name = (String)argsIt.next();
    Preondition Violations
    Unmatched statement String name=(String)argsIt.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    4
    String name = (String)argsIt.next();
    4
    LoopIterationListener item = (LoopIterationListener)iter.next();
    4
    LoopIterationListener item = (LoopIterationListener)iter.next();
    Preondition Violations
    Unmatched statement LoopIterationListener item=(LoopIterationListener)iter.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                                                                      
                                                                                                                                
    5
    getLogger().debug(name + "=" + context.getParameter(name));
    Preondition Violations
    Unmatched statement getLogger().debug(name + "=" + context.getParameter(name)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    5
    getLogger().debug(name + "=" + context.getParameter(name));
    5
    item.iterationStart(event);
    5
    item.iterationStart(event);
    Preondition Violations
    Unmatched statement item.iterationStart(event); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                
    Precondition Violations (4)
    Row Violation
    1Unmatched statement String name=(String)argsIt.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Unmatched statement LoopIterationListener item=(LoopIterationListener)iter.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    3Unmatched statement getLogger().debug(name + "=" + context.getParameter(name)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    4Unmatched statement item.iterationStart(event); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted