try { Object nestedElement = nc.create(project, parent, null); if (project != null) { project.setProjectReference(nestedElement); } return nestedElement; } catch (IllegalAccessException ie) { // impossible as getMethods should only return public methods throw new BuildException(ie); } catch (InstantiationException ine) { // impossible as getMethods should only return public methods throw new BuildException(ine); } catch (InvocationTargetException ite) { Throwable t = ite.getTargetException(); if (t instanceof BuildException) { throw (BuildException) t; } throw new BuildException(t);
try { nestedCreator.store(parent, nestedObject); } catch (IllegalAccessException ex) { throw new BuildException(ex); } catch (InstantiationException ex) { throw new BuildException(ex); } catch (IllegalArgumentException ex) { if (polyType != null) { throw new BuildException( "Invalid type used " + polyType); } throw ex; } catch (InvocationTargetException ex) { Throwable t = ex.getTargetException(); if (t instanceof BuildException) { throw (BuildException) t; } throw new BuildException(t);
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/IntrospectionHelper.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/IntrospectionHelper.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
try {
1
try {
2
            Object nestedElement = nc.create(project, parent, null);
2
                nested
3
            if (project != null) {
4
                project.setProjectReference(nestedElement);
5
            }
6
            return nestedElement;
3
Creator.store(parent, nestedObject);
4
            } catch (IllegalAccessException ex) {
5
                throw new BuildException(ex);
6
            } catch (InstantiationException ex) {
7
                throw new BuildException(ex);
7
        } catch (IllegalAccessException ie) {
8
            } catch (IllegalArgumentException ex) {
8
            // impossible as getMethods should only return public methods
9
            
10
    if (polyType != null) {
9
            throw new BuildException(ie);
11
                    throw new BuildException(
10
        } catch (InstantiationException ine) {
12
             
11
            // impossible as getMethods should only return public methods
12
            throw new BuildException(ine);
13
           "Invalid type used " + polyType);
14
                }
15
                throw ex;
13
        } catch (InvocationTargetException ite) {
16
            } catch (InvocationTargetException ex) {
14
            Throwable t = ite.getTargetException();
17
                Throwable t = ex.getTargetException();
15
            if (t instanceof BuildException) {
18
                if (t instanceof BuildException) {
16
                throw (BuildException) t;
19
                    throw (BuildException) t;
17
            }
20
                }
18
            throw new BuildException(t);
21
                throw new BuildException(t);
19
        
22
            
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