String uri = normalizeURI(entry.getEntryArg(0)); String altURI = normalizeURI(entry.getEntryArg(1)); if (resolver == null) { catalogManager.debug .message(1, "Internal Error: null ApacheCatalogResolver"); } else { resolver.addURIEntry(uri, altURI, base); }
if (propertyValue.indexOf("FILE.") == 0) { // The property is the name of a file. We are testing // a location attribute, so we need to resolve the given // file name in the provided folder. String fileName = propertyValue.substring(5, propertyValue.length()); File f = new File(workingDir, fileName); propertyValue = f.getAbsolutePath(); } assertEquals(assertMsg, propertyValue, xmlValue);
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/resolver/ApacheCatalog.java File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/XmlPropertyTest.java
Method name: void addEntry(CatalogEntry) Method name: void ensureProperties(String, File, File, Project, Properties)
Number of AST nodes: 5 Number of AST nodes: 5
1
String uri = normalizeURI(entry.getEntryArg(0));
2
            String altURI = normalizeURI(entry.getEntryArg(1));
3
            if (res
1
if (propertyValue.indexOf("FILE.") == 0) {
2
                    // The property is the name of a file.  We are testing
3
                    // a location attribute, so we need to resolve the given
4
olver == null) {
4
                    // file name in the provided folder
5
.
5
                catalogManager.debug
6
                    String fileName =
6
                    .message(1, "Internal Error: null ApacheCatalogResolver");
7
                    
7
            } else {
8
                resolver.addURIEntry(uri, altURI, base);
9
            }
8
    propertyValue.substring(5, propertyValue.length());
9
                    File f = new File(workingDir, fileName);
10
                    propertyValue = f.getAbsolutePath();
11
                }
12
                assertEquals(assertMsg, propertyValue, xmlValue);
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.1
Clones locationClones are in different classes
Number of node comparisons1