try { Method setLocationM = proxy.getClass().getMethod( "setLocation", new Class[] {Location.class}); if (setLocationM != null) { setLocationM.invoke(proxy, new Object[] {getLocation()}); } } catch (NoSuchMethodException e) { // ignore this if the class being used as a task does not have // a set location method. } catch (Exception ex) { log("Error setting location in " + proxy.getClass(), Project.MSG_ERR); throw new BuildException(ex);
try { Method setProjectM = proxy.getClass().getMethod( "setProject", new Class[] {Project.class}); if (setProjectM != null) { setProjectM.invoke(proxy, new Object[] {getProject()}); } } catch (NoSuchMethodException e) { // ignore this if the class being used as a task does not have // a set project method. } catch (Exception ex) { log("Error setting project in " + proxy.getClass(), Project.MSG_ERR); throw new BuildException(ex);
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/TaskAdapter.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/TaskAdapter.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
try {
1
try {
2
            Method setLocationM = proxy.getClass().getMethod(
2
            Method setProjectM = proxy.getClass().getMethod(
3
                "setLocation", new Class[] {Location.class});
3
                "setProject", new Class[] {Project.class});
4
            if (setLocationM != null) {
4
            if (setProjectM != null) {
5
                setLocationM.invoke(proxy, new Object[] {getLocation()});
5
                setProjectM.invoke(proxy, new Object[] {getProject()});
6
            }
6
            }
7
        } catch (NoSuchMethodException e) {
7
        } catch (NoSuchMethodException e) {
8
            // ignore this if the class being used as a task does not have
8
            // ignore this if the class being used as a task does not have
9
            // a set location method.
9
            // a set project method.
10
        } catch (Exception ex) {
10
        } catch (Exception ex) {
11
            log("Error setting location in " + proxy.getClass(),
11
            log("Error setting project in " + proxy.getClass(),
12
                Project.MSG_ERR);
12
                Project.MSG_ERR);
13
            throw new BuildException(ex);
13
            throw new BuildException(ex);
14
        
14
        
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