protected AbstractFileSet getRef(Project p) { dieOnCircularReference(p); Object o = getRefid().getReferencedObject(p); if (o instanceof TarFileSet) { return (AbstractFileSet) o; } else if (o instanceof FileSet) { TarFileSet zfs = new TarFileSet((FileSet) o); configureFileSet(zfs); return zfs; } else { String msg = getRefid().getRefId() + " doesn\'t denote a tarfileset or a fileset"; throw new BuildException(msg);
protected AbstractFileSet getRef(Project p) { dieOnCircularReference(p); Object o = getRefid().getReferencedObject(p); if (o instanceof ZipFileSet) { return (AbstractFileSet) o; } else if (o instanceof FileSet) { ZipFileSet zfs = new ZipFileSet((FileSet) o); configureFileSet(zfs); return zfs; } else { String msg = getRefid().getRefId() + " doesn\'t denote a zipfileset or a fileset"; throw new BuildException(msg);
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/TarFileSet.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/ZipFileSet.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
protected AbstractFileSet getRef(Project p) {
1
protected AbstractFileSet getRef(Project p) {
2
        dieOnCircularReference(p);
2
        dieOnCircularReference(p);
3
        Object o = getRefid().getReferencedObject(p);
3
        Object o = getRefid().getReferencedObject(p);
4
        if (o instanceof TarFileSet) {
4
        if (o instanceof ZipFileSet) {
5
            return (AbstractFileSet) o;
5
            return (AbstractFileSet) o;
6
        } else if (o instanceof FileSet) {
6
        } else if (o instanceof FileSet) {
7
            TarFileSet zfs = new TarFileSet((FileSet) o);
7
            ZipFileSet zfs = new ZipFileSet((FileSet) o);
8
            configureFileSet(zfs);
8
            configureFileSet(zfs);
9
            return zfs;
9
            return zfs;
10
        } else {
10
        } else {
11
            String msg = getRefid().getRefId() + " doesn\'t denote a tarfileset or a fileset";
11
            String msg = getRefid().getRefId() + " doesn\'t denote a zipfileset or a fileset";
12
            throw new BuildException(msg);
12
            throw new BuildException(msg);
13
        
13
        
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0