if (base != null) { try { URL baseURL = new URL(base); entryCopy = new ResourceLocation(); entryCopy.setBase(baseURL); } catch (MalformedURLException ex) { // ignore } }
if (base != null) { try { URL baseURL = new URL(base); entryCopy = new ResourceLocation(); entryCopy.setBase(baseURL); } catch (MalformedURLException ex) { // ignore } }
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: Source resolve(String, String) Method name: Source resolve(String, String)
Number of AST nodes: 5 Number of AST nodes: 5
1
if (base != null) {
1
if (base != null) {
2
                    try {
2
                    try {
3
                        URL baseURL = new URL(base);
3
                        URL baseURL = new URL(base);
4
                        entryCopy = new ResourceLocation();
4
                        entryCopy = new ResourceLocation();
5
                        entryCopy.setBase(baseURL);
5
                        entryCopy.setBase(baseURL);
6
                    } catch (MalformedURLException ex) {
6
                    } catch (MalformedURLException ex) {
7
                        // ignore
7
                        // ignore
8
                    }
8
                    }
9
                }
9
                }
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.2
Clones locationClones are in the same java file
Number of node comparisons18
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements5
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.9
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    7
    if (base != null)
    8
    if (base != null)
    8
    try
    9
    try
    9
    URL baseURL = new URL(base);
    10
    URL baseURL = new URL(base);
    10
    entryCopy = new ResourceLocation();
    11
    entryCopy = new ResourceLocation();
    11
    entryCopy.setBase(baseURL);
    12
    entryCopy.setBase(baseURL);
    Precondition Violations (0)
    Row Violation