Path lookupPath = new Path(getTask().getProject()); lookupPath.setLocation(classjar); Path classpath = getCombinedClasspath(); if (classpath != null) { lookupPath.append(classpath); } return getTask().getProject().createClassLoader(lookupPath);
Path lookupPath = new Path(getTask().getProject()); lookupPath.setLocation(classjar); Path classpath = getCombinedClasspath(); if (classpath != null) { lookupPath.append(classpath); } return getTask().getProject().createClassLoader(lookupPath);
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java
Method name: ClassLoader getClassLoaderFromJar(File) Method name: ClassLoader getClassLoaderFromJar(File)
Number of AST nodes: 6 Number of AST nodes: 6
1
Path lookupPath = new Path(getTask().getProject());
1
Path lookupPath = new Path(getTask().getProject());
2
        lookupPath.setLocation(classjar);
2
        lookupPath.setLocation(classjar);
3
        Path classpath = getCombinedClasspath();
3
        Path classpath = getCombinedClasspath();
4
        if (classpath != null) {
4
        if (classpath != null) {
5
            lookupPath.append(classpath);
5
            lookupPath.append(classpath);
6
        }
6
        }
7
        return getTask().getProject().createClassLoader(lookupPath);
7
        return getTask().getProject().createClassLoader(lookupPath);
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.1
Clones locationClones are in different classes having the same super class
Number of node comparisons12
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.3
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    1
    Path lookupPath = new Path(getTask().getProject());
    1
    Path lookupPath = new Path(getTask().getProject());
    2
    lookupPath.setLocation(classjar);
    2
    lookupPath.setLocation(classjar);
    3
    Path classpath = getCombinedClasspath();
    3
    Path classpath = getCombinedClasspath();
    4
    if (classpath != null)
    4
    if (classpath != null)
    5
    lookupPath.append(classpath);
    5
    lookupPath.append(classpath);
    6
    return getTask().getProject().createClassLoader(lookupPath);
    6
    return getTask().getProject().createClassLoader(lookupPath);
    Precondition Violations (0)
    Row Violation