log.debug("setParameter - Collection.size=" + parameters.size()); values = parameters.toArray(); if (log.isDebugEnabled()) { for (int i = 0; i < parameters.size(); i++) { log.debug("i:" + ((CompoundVariable) values[i]).execute()); } } checkParameterCount(parameters, 2); /* * Need to reset the containers for repeated runs; about the only way * for functions to detect that a run is starting seems to be the * setParameters() call. */ FileWrapper.clearAll();
log.debug("setParameter - Collection.size=" + parameters.size()); values = parameters.toArray(); if (log.isDebugEnabled()) { for (int i = 0; i < parameters.size(); i++) { log.debug("i:" + ((CompoundVariable) values[i]).execute()); } } checkParameterCount(parameters, 2); /* * Need to reset the containers for repeated runs; about the only way * for functions to detect that a run is starting seems to be the * setParameters() call. */ XPathWrapper.clearAll();
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/functions/CSVRead.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/functions/XPath.java
Method name: void setParameters(Collection) Method name: void setParameters(Collection)
Number of AST nodes: 7 Number of AST nodes: 7
1
log.debug("setParameter - Collection.size=" + parameters.size());
1
log.debug("setParameter - Collection.size=" + parameters.size());
2
		values = parameters.toArray();
2
		values = parameters.toArray();
3
		if (log.isDebugEnabled()) {
3
		if (log.isDebugEnabled()) {
4
			for (int i = 0; i < parameters.size(); i++) {
4
			for (int i = 0; i < parameters.size(); i++) {
5
				log.debug("i:" + ((CompoundVariable) values[i]).execute());
5
				log.debug("i:" + ((CompoundVariable) values[i]).execute());
6
			}
6
			}
7
		}
7
		}
8
		checkParameterCount(parameters, 2);
8
		checkParameterCount(parameters, 2);
9
		/*
9
		/*
10
		 * Need to reset the containers for repeated runs; about the only way
10
		 * Need to reset the containers for repeated runs; about the only way
11
		 * for functions to detect that a run is starting seems to be the
11
		 * for functions to detect that a run is starting seems to be the
12
		 * setParameters() call.
12
		 * setParameters() call.
13
		 */
13
		 */
14
		FileWrapper.clearAll();
14
		XPathWrapper.clearAll();
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.3
Clones locationClones are in different classes having the same super class
Number of node comparisons15
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements7
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)6.9
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    log.debug("setParameter - Collection.size=" + parameters.size());
    1
    log.debug("setParameter - Collection.size=" + parameters.size());
    2
    values = parameters.toArray();
    2
    values = parameters.toArray();
    3
    if (log.isDebugEnabled())
    3
    if (log.isDebugEnabled())
    4
    for (int i = 0; i < parameters.size(); i++)
    4
    for (int i = 0; i < parameters.size(); i++)
    5
    log.debug("i:" + ((CompoundVariable)values[i]).execute());
    5
    log.debug("i:" + ((CompoundVariable)values[i]).execute());
    6
    checkParameterCount(parameters, 2);
    6
    checkParameterCount(parameters, 2);
    7
    FileWrapper.clearAll();
    7
    FileWrapper.clearAll();
    7
    XPathWrapper.clearAll();
    Differences
    Expression1Expression2Difference
    org.apache.jmeter.functions.FileWrapperorg.apache.jmeter.functions.XPathWrapperVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.apache.jmeter.functions.FileWrapper does not match with type org.apache.jmeter.functions.XPathWrapper
    • Make classes org.apache.jmeter.functions.FileWrapper and org.apache.jmeter.functions.XPathWrapper extend a common superclass
    7
    XPathWrapper.clearAll();
    Precondition Violations (1)
    Row Violation
    1Type org.apache.jmeter.functions.FileWrapper does not match with type org.apache.jmeter.functions.XPathWrapper