for (int i = groups; i <= previous; i++){ buf.append(i); vars.remove(buf.toString());// remove the remaining _gn vars buf.setLength(pfxlen); }
name.append(parent_name); name.append(cur.getName()); name.append(seperator); buildNodesModel(cur, name.toString(), level);
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/extractor/RegexExtractor.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/control/gui/ModuleControllerGui.java
Method name: void saveGroups(JMeterVariables, String, MatchResult) Method name: void buildNodesModel(JMeterTreeNode, String, int)
Number of AST nodes: 4 Number of AST nodes: 4
1
for (int i = groups; i <= previous; i++){
2
            buf.append(i);
3
            vars.remove(buf.toString());// remove the remaining _gn vars
4
            buf.setLength(pfxlen);            
5
        }
1
name.append(parent_name);
2
					name.append(cur.getName());
3
					name.append(seperator);
4
					buildNodesModel(cur, name.toString(), level);
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.0
Clones locationClones are in different classes
Number of node comparisons14
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
                                                              
    10
    name.append(parent_name);
    Preondition Violations
    Unmatched statement name.append(parent_name); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    10
    name.append(parent_name);
                                                                  
    11
    name.append(cur.getName());
    17
    buf.append(i);
    17
    buf.append(i);
    12
    name.append(seperator);
    Differences
    Expression1Expression2Difference
    iseperatorVARIABLE_NAME_MISMATCH
    intjava.lang.StringVARIABLE_TYPE_MISMATCH
    bufnameVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type int of variable i does not match with type java.lang.String of variable seperator
    12
    name.append(seperator);
    18
    vars.remove(buf.toString());
    18
    vars.remove(buf.toString());
    Preondition Violations
    Unmatched statement vars.remove(buf.toString()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                    
    19
    buf.setLength(pfxlen);
    19
    buf.setLength(pfxlen);
    13
    buildNodesModel(cur, name.toString(), level);
    Differences
    Expression1Expression2Difference
    setLengthbuildNodesModelMETHOD_INVOCATION_NAME_MISMATCH
    buf.setLength(pfxlen)buildNodesModel(cur,name.toString(),level)ARGUMENT_NUMBER_MISMATCH
    bufMISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression buf.setLength(pfxlen) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression buildNodesModel(cur,name.toString(),level) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method buildNodesModel
    Expression buf.setLength(pfxlen) is a void method call, and thus it cannot be parameterized
    Expression buildNodesModel(cur,name.toString(),level) is a void method call, and thus it cannot be parameterized
    Expression buf.setLength(pfxlen) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression buildNodesModel(cur,name.toString(),level) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method buildNodesModel
    Expression buf.setLength(pfxlen) is a void method call, and thus it cannot be parameterized
    Expression buildNodesModel(cur,name.toString(),level) is a void method call, and thus it cannot be parameterized
    13
    buildNodesModel(cur, name.toString(), level);
    Precondition Violations (11)
    Row Violation
    1Unmatched statement name.append(parent_name); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Type int of variable i does not match with type java.lang.String of variable seperator
    3Unmatched statement vars.remove(buf.toString()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    4Expression buf.setLength(pfxlen) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression buildNodesModel(cur,name.toString(),level) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression buf.setLength(pfxlen) is a void method call, and thus it cannot be parameterized
    7Expression buildNodesModel(cur,name.toString(),level) is a void method call, and thus it cannot be parameterized
    8Expression buf.setLength(pfxlen) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9Expression buildNodesModel(cur,name.toString(),level) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10Expression buf.setLength(pfxlen) is a void method call, and thus it cannot be parameterized
    11Expression buildNodesModel(cur,name.toString(),level) is a void method call, and thus it cannot be parameterized