for (Iterator i = config.supportFileSets.iterator(); i.hasNext();) { FileSet supportFileSet = (FileSet) i.next(); File supportBaseDir = supportFileSet.getDir(project); DirectoryScanner supportScanner = supportFileSet.getDirectoryScanner(project); supportScanner.scan(); String[] supportFiles = supportScanner.getIncludedFiles(); for (int j = 0; j < supportFiles.length; ++j) { ejbFiles.put(supportFiles[j], new File(supportBaseDir, supportFiles[j])); } }
Vector tmp = new Vector(args.size()); for (Enumeration e = args.elements(); e.hasMoreElements();) { ImplementationSpecificArgument arg = ((ImplementationSpecificArgument) e.nextElement()); String[] curr = arg.getParts(getImplementation()); for (int i = 0; i < curr.length; i++) { tmp.addElement(curr[i]); } } String[] res = new String[tmp.size()]; tmp.copyInto(res); return res;
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/util/facade/FacadeTaskHelper.java
Method name: void addSupportClasses(Hashtable) Method name: String[] getArgs()
Number of AST nodes: 8 Number of AST nodes: 9
1
for (Iterator i = config.supportFileSets.iterator(); i.hasNext();) {
1
Vector 
2
            FileSet supportFileSet = (FileSet) i.next();
3
            File supportBaseDir = supportFileSet.getDir(project);
4
            DirectoryScanner supportScanner = supportFileSet.getDirectoryScanner(project);
5
            supportScanner.scan();
6
            String[] supportFiles = supportScanner.getIncludedFiles
2
tmp = new Vector(args.size());
3
        for (Enumeration e = args.elements(); e.hasMoreElements();) {
4
            ImplementationSpecificArgument arg =
5
                ((ImplementationSpecificArgument) e.nextElement());
7
();
6
            String[] curr = arg.getParts(getImplementation());
8
            for (int j = 0; j < supportFiles.length; ++j) {
7
            for (int i = 0; i < curr.length; i++) {
9
                ejbFiles.put(supportFiles[j], new File(supportBaseDir, supportFiles[j]))
8
                tmp.addElement(curr[i]);
9
            }
10
        }
10
;
11
        String[] res = new String[tmp.size()];
11
            }
12
        
12
        }
13
tmp.copyInto(res);
14
        return res;
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.3
Clones locationClones are in different classes
Number of node comparisons1