try { listeners.addElement(args[i + 1]); i++; } catch (ArrayIndexOutOfBoundsException aioobe) { String msg = "You must specify a classname when " + "using the -listener argument"; throw new BuildException(msg); }
try { buildFile = new File(args[i + 1].replace('/', File.separatorChar)); i++; } catch (ArrayIndexOutOfBoundsException aioobe) { String msg = "You must specify a buildfile when " + "using the -buildfile argument"; throw new BuildException(msg); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/Main.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/Main.java
Method name: void processArgs(String[]) Method name: void processArgs(String[])
Number of AST nodes: 3 Number of AST nodes: 3
1
try {
1
try {
2
                    listeners.addElement(args[i + 1]);
2
                    buildFile = new File(args[i + 1].replace('/', File.separatorChar));
3
                    i++;
3
                    i++;
4
                } catch (ArrayIndexOutOfBoundsException aioobe) {
4
                } catch (ArrayIndexOutOfBoundsException aioobe) {
5
                    String msg = "You must specify a classname when "
5
                    String msg = "You must specify a buildfile when "
6
                        + "using the -listener argument";
6
                        + "using the -buildfile argument";
7
                    throw new BuildException(msg);
7
                    throw new BuildException(msg);
8
                }
8
                }
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.3
Clones locationClones are in the same method
Number of node comparisons11
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)1.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    43
    try
    43
    try
    39
    try
    Differences
    Expression1Expression2Difference
    "You must specify a classname when ""You must specify a buildfile when "LITERAL_VALUE_MISMATCH
    "using the -listener argument""using the -buildfile argument"LITERAL_VALUE_MISMATCH
    39
    try
                                                                                                                                            
    40
    buildFile = new File(args[i + 1].replace('/', File.separatorChar));
    44
    listeners.addElement(args[i + 1]);
                                                                                
    45
    i++;
    41
    i++;
    Precondition Violations (0)
    Row Violation