void addFileset(FileSet fs) { createAttachments().add(fs); } /** * Creates a Path as container for attachments. Supports any * filesystem resource-collections that way. * @return the path to be configured. * @since Ant 1.7 */ public Path createAttachments() { if (attachments == null) { attachments = new Path(getProject()); } return attachments.createPath();
void setFactoryPathRef(Reference ref) { createFactoryPath().setRefid(ref); } /** * Add a path to the factoryPath attribute. * @return a path to be configured. */ public Path createFactoryPath() { if (factoryPath == null) { factoryPath = new Path(getProject()); } return factoryPath.createPath();
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/email/EmailTask.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Apt.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void addFileset(FileSet fs) {
1
void 
2
        createAttachments().add(fs
2
setFactoryPathRef(Reference ref) {
3
);
3
        createFactoryPath().setRefid(ref);
4
    }
4
    }
5
    /**
5
    /**
6
     * Creates a Path as container for attachments.  Supports any
6
     * Add a path 
7
     * filesystem resource-collections that way.
7
to the factoryPath attribute.
8
     * @return the path to be configured.
8
     * @return a path to be configured.
9
     * @since Ant 1.7
10
     */
9
     */
11
    public Path createAttachments() {
10
    public Path createFactoryPath() {
12
        if (attachments == null) {
11
        if (factoryPath == null) {
13
            attachments = new Path(getProject());
12
            factoryPath = new Path(getProject());
14
        }
13
        }
15
        return attachments.createPath();
14
        return factoryPath.createPath();
16
    
15
    
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