public Mapper createMapper() throws BuildException { if (mapperElement != null) { throw new BuildException("Cannot define more than one mapper", getLocation()); } mapperElement = new Mapper(getProject()); return mapperElement; } /** * Add a nested filenamemapper. * @param fileNameMapper the mapper to add. * @since Ant 1.6.3 */ public void add(FileNameMapper fileNameMapper) { createMapper().add(fileNameMapper);
public Mapper createMapper() throws BuildException { if (mapperElement != null) { throw new BuildException("Cannot define more than one mapper", getLocation()); } mapperElement = new Mapper(getProject()); return mapperElement; } /** * Add a nested FileNameMapper. * @param fileNameMapper the mapper to add. * @since Ant 1.6.3 */ public void add(FileNameMapper fileNameMapper) { createMapper().add(fileNameMapper);
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Copy.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/ExecuteOn.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public Mapper createMapper() throws BuildException {
1
public Mapper createMapper() throws BuildException {
2
        if (mapperElement != null) {
2
        if (mapperElement != null) {
3
            throw new BuildException("Cannot define more than one mapper",
3
            throw new BuildException("Cannot define more than one mapper",
4
                                     getLocation());
4
                                     getLocation());
5
        }
5
        }
6
        mapperElement = new Mapper(getProject());
6
        mapperElement = new Mapper(getProject());
7
        return mapperElement;
7
        return mapperElement;
8
    }
8
    }
9
    /**
9
    /**
10
     * Add a nested filenamemapper.
10
     * Add a nested FileNameMapper.
11
     * @param fileNameMapper the mapper to add.
11
     * @param fileNameMapper the mapper to add.
12
     * @since Ant 1.6.3
12
     * @since Ant 1.6.3
13
     */
13
     */
14
    public void add(FileNameMapper fileNameMapper) {
14
    public void add(FileNameMapper fileNameMapper) {
15
        createMapper().add(fileNameMapper);
15
        createMapper().add(fileNameMapper);
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