if (resFile.exists() && resFile.canRead()) { try { source = new InputSource(new FileInputStream(resFile)); String sysid = JAXPUtils.getSystemId(resFile); source.setSystemId(sysid); log("catalog entry matched a readable file: '" + sysid + "'", Project.MSG_DEBUG); } catch (IOException ex) { // ignore } }
if (is != null) { source = new InputSource(is); URL entryURL = loader.getResource(matchingEntry.getLocation()); String sysid = entryURL.toExternalForm(); source.setSystemId(sysid); log("catalog entry matched a resource in the classpath: '" + sysid + "'", Project.MSG_DEBUG); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/XMLCatalog.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/XMLCatalog.java
Method name: InputSource filesystemLookup(ResourceLocation) Method name: InputSource classpathLookup(ResourceLocation)
Number of AST nodes: 6 Number of AST nodes: 6
1
if (resFile.exists() && resFile.canRead()) {
1
if (
2
                    try {
3
                        source = new InputSource(new FileInputStream(resFile));
4
                        String sysid = JAXPUtils.getSystemId(resFile);
5
         
2
is != null) {
3
            source = new InputSource(is);
4
            URL entryURL = loader.getResource(matchingEntry.getLocation());
5
            String sysid = entryURL.toExternalForm();
6
               source.setSystemId(sysid);
6
            source.setSystemId(sysid);
7
                        log("catalog entry matched a readable file: '"
7
            log("catalog entry matched a re
8
            
8
source in the classpath: '"
9
                + sysid + "'", Project.MSG_DEBUG);
9
                + sysid + "'", Project.MSG_DEBUG);
10
                    } catch (IOException ex) {
11
                        // ignore
12
                    }
13
                }
10
        }
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 locationClones are declared in the same class
Number of node comparisons1