final String[] arguments = new String[m_arguments.length + 1]; System.arraycopy(m_arguments, 0, arguments, 0, m_arguments.length); arguments[m_arguments.length] = argument; m_arguments = arguments;
String[] newpkg = new String[pkgs.length + 1]; System.arraycopy(pkgs,0,newpkg,0,pkgs.length); newpkg[pkgs.length] = pkg; pkgs = newpkg;
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/commons/cli/avalon/CLOption.java File path: /jakarta-jmeter-2.3.2/src/junit/org/apache/jmeter/protocol/java/control/gui/ClassFilter.java
Method name: void addArgument(String) Method name: void addPackage(String)
Number of AST nodes: 4 Number of AST nodes: 4
1
final String[] arguments = new String[m_arguments.length + 1];
1
String[] newpkg = new String[pkgs.length + 1];
2
			System.arraycopy(m_arguments, 0, arguments, 0, m_arguments.length);
2
        System.arraycopy(pkgs,0,
3
			arguments[m_arguments.length] = argument;
4
			m_arguments = arguments
3
newpkg,0,pkgs.length);
4
        newpkg[pkgs.length] = pkg;
5
;
5
        pkgs = newpkg;
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.0
Clones locationClones are in different classes
Number of node comparisons10
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                                                                  
    1
    String[] newpkg = new String[pkgs.length + 1];
    3
    final String[] arguments = new String[m_arguments.length + 1];
                                                                                                                                  
    4
    System.arraycopy(m_arguments, 0, arguments, 0, m_arguments.length);
    4
    System.arraycopy(m_arguments, 0, arguments, 0, m_arguments.length);
    2
    System.arraycopy(pkgs, 0, newpkg, 0, pkgs.length);
    Differences
    Expression1Expression2Difference
    m_argumentspkgsVARIABLE_NAME_MISMATCH
    argumentsnewpkgVARIABLE_NAME_MISMATCH
    m_argumentspkgsVARIABLE_NAME_MISMATCH
    2
    System.arraycopy(pkgs, 0, newpkg, 0, pkgs.length);
    5
    arguments[m_arguments.length] = argument;
    5
    arguments[m_arguments.length] = argument;
    3
    newpkg[pkgs.length] = pkg;
    Differences
    Expression1Expression2Difference
    argumentsnewpkgVARIABLE_NAME_MISMATCH
    m_argumentspkgsVARIABLE_NAME_MISMATCH
    argumentpkgVARIABLE_NAME_MISMATCH
    3
    newpkg[pkgs.length] = pkg;
    6
    m_arguments = arguments;
    6
    m_arguments = arguments;
    4
    pkgs = newpkg;
    Differences
    Expression1Expression2Difference
    m_argumentspkgsVARIABLE_NAME_MISMATCH
    argumentsnewpkgVARIABLE_NAME_MISMATCH
    4
    pkgs = newpkg;
    Precondition Violations (0)
    Row Violation