void addConfiguredInputMapper(Mapper inputMapper) { if (isReference()) { throw noChildrenAllowed(); } if (this.inputMapper != null) { if (usingInput) { throw new BuildException("attribute \"input\"" + " cannot coexist with a nested <inputmapper>"); } else { throw new BuildException("Cannot have > 1 <inputmapper>"); } } this.inputMapper = inputMapper; } /** * Add the output file mapper. * @param outputMapper <code>Mapper</code>. */ public void addConfiguredOutputMapper(Mapper outputMapper) { if (isReference()) { throw noChildrenAllowed(); } if (this.outputMapper != null) { if (usingOutput) { throw new BuildException("attribute \"output\"" + " cannot coexist with a nested <outputmapper>"); } else { throw new BuildException("Cannot have > 1 <outputmapper>"); } } this.outputMapper = outputMapper;
void addConfiguredOutputMapper(Mapper outputMapper) { if (isReference()) { throw noChildrenAllowed(); } if (this.outputMapper != null) { if (usingOutput) { throw new BuildException("attribute \"output\"" + " cannot coexist with a nested <outputmapper>"); } else { throw new BuildException("Cannot have > 1 <outputmapper>"); } } this.outputMapper = outputMapper; } /** * Add the error file mapper. * @param errorMapper <code>Mapper</code>. */ public void addConfiguredErrorMapper(Mapper errorMapper) { if (isReference()) { throw noChildrenAllowed(); } if (this.errorMapper != null) { if (usingError) { throw new BuildException("attribute \"error\"" + " cannot coexist with a nested <errormapper>"); } else { throw new BuildException("Cannot have > 1 <errormapper>"); } } this.errorMapper = errorMapper;
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/RedirectorElement.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/RedirectorElement.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void addConfiguredInputMapper(Mapper inputMapper) {
1
void addConfiguredOutputMapper(Mapper outputMapper) {
2
        if (isReference()) {
2
        if (isReference()) {
3
            throw noChildrenAllowed();
3
            throw noChildrenAllowed();
4
        }
4
        }
5
        if (this.inputMapper != null) {
5
        if (this.outputMapper != null) {
6
            if (usingInput) {
6
            if (usingOutput) {
7
                throw new BuildException("attribute \"input\""
7
                throw new BuildException("attribute \"output\""
8
                    + " cannot coexist with a nested <inputmapper>");
8
                    + " cannot coexist with a nested <outputmapper>");
9
            } else {
9
            } else {
10
                throw new BuildException("Cannot have > 1 <inputmapper>");
10
                throw new BuildException("Cannot have > 1 <outputmapper>");
11
            }
11
            }
12
        }
12
        }
13
        this.inputMapper = inputMapper;
13
        this.outputMapper = outputMapper;
14
    }
14
    }
15
    /**
15
    /**
16
     * Add the output file mapper.
16
     * Add the error file mapper.
17
     * @param outputMapper   <code>Mapper</code>.
17
     * @param errorMapper   <code>Mapper</code>.
18
     */
18
     */
19
    public void addConfiguredOutputMapper(Mapper outputMapper) {
19
    public void addConfiguredErrorMapper(Mapper errorMapper) {
20
        if (isReference()) {
20
        if (isReference()) {
21
            throw noChildrenAllowed();
21
            throw noChildrenAllowed();
22
        }
22
        }
23
        if (this.outputMapper != null) {
23
        if (this.errorMapper != null) {
24
            if (usingOutput) {
24
            if (usingError) {
25
                throw new BuildException("attribute \"output\""
25
                throw new BuildException("attribute \"error\""
26
                    + " cannot coexist with a nested <outputmapper>");
26
                    + " cannot coexist with a nested <errormapper>");
27
            } else {
27
            } else {
28
                throw new BuildException("Cannot have > 1 <outputmapper>");
28
                throw new BuildException("Cannot have > 1 <errormapper>");
29
            }
29
            }
30
        }
30
        }
31
        this.outputMapper = outputMapper;
31
        this.errorMapper = errorMapper;
32
    
32
    
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