public void characters(char[] buf, int start, int count) { wrapper.addText(buf, start, count); } /** * Handles the start of an element within a target. Task containers * will always use another task handler, and all other tasks * will always use a nested element handler. * * @param name The name of the element being started. * Will not be <code>null</code>. * @param attrs Attributes of the element being started. * Will not be <code>null</code>. * * @exception SAXParseException if an error occurs when initialising * the appropriate child handler */ public void startElement(String name, AttributeList attrs) throws SAXParseException { if (task instanceof TaskContainer) { // task can contain other tasks - no other nested elements possible new TaskHandler(helperImpl, this, (TaskContainer) task, wrapper, target).init(name, attrs); } else { new NestedElementHandler(helperImpl, this, task, wrapper, target).init(name, attrs);
public void characters(char[] buf, int start, int count) { childWrapper.addText(buf, start, count); } /** * Handles the start of an element within this one. Task containers * will always use a task handler, and all other elements * will always use another nested element handler. * * @param name The name of the element being started. * Will not be <code>null</code>. * @param attrs Attributes of the element being started. * Will not be <code>null</code>. * * @exception SAXParseException if an error occurs when initialising * the appropriate child handler */ public void startElement(String name, AttributeList attrs) throws SAXParseException { if (child instanceof TaskContainer) { // taskcontainer nested element can contain other tasks - no other // nested elements possible new TaskHandler(helperImpl, this, (TaskContainer) child, childWrapper, target).init(name, attrs); } else { new NestedElementHandler(helperImpl, this, child, childWrapper, target).init(name, attrs);
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/helper/ProjectHelperImpl.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/helper/ProjectHelperImpl.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public void characters(char[] buf, int start, int count) {
1
public void characters(char[] buf, int start, int count) {
2
            wrapper.addText(buf, start, count);
2
            childWrapper.addText(buf, start, count);
3
        }
3
        }
4
        /**
4
        /**
5
         * Handles the start of an element within a target. Task containers
5
         * Handles the start of an element within this one. Task containers
6
         * will always use another task handler, and all other tasks
6
         * will always use a task handler, and all other elements
7
         * will always use a nested element handler.
7
         * will always use another nested element handler.
8
         *
8
         *
9
         * @param name The name of the element being started.
9
         * @param name The name of the element being started.
10
         *            Will not be <code>null</code>.
10
         *            Will not be <code>null</code>.
11
         * @param attrs Attributes of the element being started.
11
         * @param attrs Attributes of the element being started.
12
         *              Will not be <code>null</code>.
12
         *              Will not be <code>null</code>.
13
         *
13
         *
14
         * @exception SAXParseException if an error occurs when initialising
14
         * @exception SAXParseException if an error occurs when initialising
15
         *                              the appropriate child handler
15
         *                              the appropriate child handler
16
         */
16
         */
17
        public void startElement(String name, AttributeList attrs) throws SAXParseException {
17
        public void startElement(String name, AttributeList attrs) throws SAXParseException {
18
            if (task instanceof TaskContainer) {
18
            if (child instanceof TaskContainer) {
19
                // task can contain other tasks - no other
19
                // taskcontainer nested element can contain other tasks - no other
20
 nested elements possible
20
                // nested elements possible
21
                new TaskHandler(helperImpl, this, (TaskContainer) task,
21
                new TaskHandler(helperImpl, this, (TaskContainer) child,
22
                    wrapper, target).init(name, attrs);
22
                    childWrapper, target).init(name, attrs);
23
            } else {
23
            } else {
24
                new NestedElementHandler(helperImpl, this, task,
24
                new NestedElementHandler(helperImpl, this, child,
25
                    wrapper, target).init(name, attrs);
25
                    childWrapper, target).init(name, attrs);
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