void setClasspath(Path classpath) { if (compileClasspath == null) { compileClasspath = classpath; } else { compileClasspath.append(classpath); } } /** * Gets the classpath to be used for this compilation. * @return the class path */ public Path getClasspath() { return compileClasspath; } /** * Adds a path to the classpath. * @return a class path to be configured */ public Path createClasspath() { if (compileClasspath == null) { compileClasspath = new Path(getProject()); } return compileClasspath.createPath(); } /** * Adds a reference to a classpath defined elsewhere. * @param r a reference to a classpath */ public void setClasspathRef(Reference r) { createClasspath().setRefid(r); } /** * Sets the bootclasspath that will be used to compile the classes * against. * @param bootclasspath a path to use as a boot class path (may be more * than one) */ public void setBootclasspath(Path bootclasspath) { if (this.bootclasspath == null) { this.bootclasspath = bootclasspath; } else { this.bootclasspath.append(bootclasspath); } } /** * Gets the bootclasspath that will be used to compile the classes * against. * @return the boot path */ public Path getBootclasspath() { return bootclasspath; } /** * Adds a path to the bootclasspath. * @return a path to be configured */ public Path createBootclasspath() { if (bootclasspath == null) { bootclasspath = new Path(getProject()); } return bootclasspath.createPath();
void setClasspath(Path classpath) { if (compileClasspath == null) { compileClasspath = classpath; } else { compileClasspath.append(classpath); } } /** * Creates a nested classpath element. * @return classpath */ public Path createClasspath() { if (compileClasspath == null) { compileClasspath = new Path(getProject()); } return compileClasspath.createPath(); } /** * Adds to the classpath a reference to * a <path> defined elsewhere. * @param pathRef the reference to add to the classpath */ public void setClasspathRef(Reference pathRef) { createClasspath().setRefid(pathRef); } /** * Gets the classpath. * @return the classpath */ public Path getClasspath() { return compileClasspath; } /** * Flag to enable verification so that the classes * found by the directory match are * checked to see if they implement java.rmi.Remote. * optional; This defaults to false if not set. * @param verify turn on verification for classes */ public void setVerify(boolean verify) { this.verify = verify; } /** * Get verify flag. * @return verify */ public boolean getVerify() { return verify; } /** * Indicates that IIOP compatible stubs should * be generated; optional, defaults to false * if not set. * @param iiop generate IIOP compatible stubs */ public void setIiop(boolean iiop) { this.iiop = iiop; } /** * Gets iiop flags. * @return iiop */ public boolean getIiop() { return iiop; } /** * Set additional arguments for iiop * @param iiopOpts additional arguments for iiop */ public void setIiopopts(String iiopOpts) { this.iiopOpts = iiopOpts; } /** * Gets additional arguments for iiop. * @return iiopOpts */ public String getIiopopts() { return iiopOpts; } /** * Indicates that IDL output should be * generated. This defaults to false * if not set. * @param idl generate IDL output */ public void setIdl(boolean idl) { this.idl = idl; } /** * Gets IDL flags. * @return the idl flag */ public boolean getIdl() { return idl; } /** * pass additional arguments for IDL compile * @param idlOpts additional IDL arguments */ public void setIdlopts(String idlOpts) { this.idlOpts = idlOpts; } /** * Gets additional arguments for idl compile. * @return the idl options */ public String getIdlopts() { return idlOpts; } /** * Gets file list to compile. * @return the list of files to compile. */ public Vector getFileList() { return compileList; } /** * Sets whether or not to include ant's own classpath in this task's * classpath. * Optional; default is <code>true</code>. * @param include if true include ant's classpath */ public void setIncludeantruntime(boolean include) { includeAntRuntime = include; } /** * Gets whether or not the ant classpath is to be included in the * task's classpath. * @return true if ant's classpath is to be included */ public boolean getIncludeantruntime() { return includeAntRuntime; } /** * task's classpath. * Enables or disables including the default run-time * libraries from the executing VM; optional, * defaults to false * @param include if true include default run-time libraries */ public void setIncludejavaruntime(boolean include) { includeJavaRuntime = include; } /** * Gets whether or not the java runtime should be included in this * task's classpath. * @return true if default run-time libraries are included */ public boolean getIncludejavaruntime() { return includeJavaRuntime; } /** * Sets the extension directories that will be used during the * compilation; optional. * @param extDirs the extension directories to be used */ public void setExtdirs(Path extDirs) { if (this.extDirs == null) { this.extDirs = extDirs; } else { this.extDirs.append(extDirs); } } /** * Maybe creates a nested extdirs element. * @return path object to be configured with the extension directories */ public Path createExtdirs() { if (extDirs == null) { extDirs = new Path(getProject()); } return extDirs.createPath();
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Javac.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Rmic.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void setClasspath(Path classpath) {
1
void setClasspath(Path classpath) {
2
        if (compileClasspath == null) {
2
        if (compileClasspath == null) {
3
            compileClasspath = classpath;
3
            compileClasspath = classpath;
4
        } else {
4
        } else {
5
            compileClasspath.append(classpath);
5
            compileClasspath.append(classpath);
6
        }
6
        }
7
    }
7
    }
8
    /**
8
    /**
9
     * Gets the classpath to be used for this compilation.
9
     * Creates a nested classpath element.
10
     * @return the class path
10
     * @return classpath
11
     */
11
     */
12
    public Path getClasspath() {
12
    public Path createClasspath() {
13
        if (compileClasspath == null) {
14
            compileClasspath = new Path(getProject());
15
        }
13
        return compileClasspath;
16
        return compileClasspath.createPath();
14
    }
17
    }
15
    /**
18
    /**
16
     * Adds a path
19
     * Adds to the classpath a reference to
20
     * a <path> defined elsewhere.
17
 to the classpath.
21
     * @param pathRef the reference to add to the classpath
18
     * @return a class path to be configured
22
     */
23
    public void setClasspathRef(Reference pathRef) {
24
        createClasspath().setRefid(pathRef);
25
    }
26
    /**
27
     * Gets the classpath.
28
     * @return the classpath
19
     */
29
     */
20
    public Path createClasspath() {
30
    public Path getClasspath() {
21
        if (compileClasspath == null) {
31
        return compileClasspath
22
            compileClasspath = new Path(getProject());
23
        }
24
        return compileClasspath.createPath();
25
    }
26
    /**
27
     * Adds a reference to a classpath defined elsewhere
32
;
33
    }
34
    /**
35
     * Flag to enable verification so that the classes
36
     * found by the directory match are
37
     * checked to see if they implement java.rmi.Remote.
38
     * optional; This defaults to false if not set.
39
     * @param verify turn on verification for classes
40
     */
41
    public void setVerify(boolean verify) {
42
        this.verify = verify;
43
    }
44
    /**
45
     * Get verify flag.
46
     * @return verify
47
     */
48
    public boolean getVerify() {
49
        return verify;
50
    }
51
    /**
52
     * Indicates that IIOP compatible stubs should
53
     * be generated; optional, defaults to false
28
.
54
     * if not set.
29
     * @param r a reference to a classpath
55
     * @param 
30
     */
31
    public void setClasspathRef(Reference r
56
iiop generate IIOP compatible stubs
57
     */
58
    public void setIiop(boolean iiop) {
59
        this.iiop = iiop;
60
    }
61
    /**
62
     * Gets iiop flags.
63
     * @return iiop
64
     */
32
) {
65
    public boolean getIiop() {
33
        createClasspath().setRefid(r)
66
        return iiop;
67
    }
68
    /**
69
     * Set additional arguments for iiop
70
     * @param iiopOpts additional arguments for iiop
71
     */
72
    public void setIiopopts(String iiopOpts) {
34
;
73
        this.iiopOpts = iiopOpts;
35
    }
74
    }
36
    /**
75
    /**
37
     * Sets the bootclasspath that will be used to compile the clas
76
     * Gets additional arguments for iiop.
77
     * @return iiopOpts
78
     */
79
    public String getIiopopts() {
80
        return iiopOpts;
81
    }
82
    /**
83
     * Indicates that IDL output should be
38
ses
84
     * generated.  This defaults to false
39
     * against.
85
     * if not set.
40
     * @param bootclasspath a path to use as a boot class path (may be more
86
     * @param 
41
     *    
87
idl generate IDL output
88
     */
89
    public void setIdl(boolean idl) {
90
        this.idl = idl;
91
    }
92
    /**
93
     * Gets IDL flags.
94
     * @return the idl flag
95
     */
96
    public boolean getIdl() {
97
        return idl;
98
    }
99
    /**
100
     * pass additional arguments for IDL compile
101
     * @param idlOpts additional IDL arguments
102
     */
103
    public void setIdlopts(String idlOpts) {
104
        this.idlOpts = idlOpts;
105
    }
106
    /**
107
     * Gets additional arguments for idl compile.
108
     * @return the idl options
42
     
109
     */
43
             than one)
110
    
44
     */
45
    public void setBootclasspath(Path bootclasspath) {
46
        if (this.bootclasspath == null) {
47
            this.bootclasspath = bootclasspath;
48
        } else {
49
            this.bootclasspath.append(bootclasspath);
50
        }
111
public String getIdlopts() {
112
        return idlOpts;
113
    }
114
    /**
115
     * Gets file list to compile.
116
     * @return the list of files to compile.
117
     */
118
    public Vector getFileList() {
119
        return compileList;
120
    }
121
    /**
122
     * Sets whether or not to include ant's own classpath in this task's
123
     * classpath.
124
     * Optional; default is <code>true</code>.
125
     * @param include if true include ant's classpath
126
     */
127
    public void setIncludeantruntime(boolean include) {
128
        includeAntRuntime = include;
129
    }
130
    /**
131
     * Gets whether or not the ant classpath is to be included in the
132
     * task's classpath.
133
     * @return true if ant's classpath is to be included
134
     */
135
    public boolean getIncludeantruntime() {
136
        return includeAntRuntime;
137
    }
138
    /**
139
     * task's classpath.
140
     * Enables or disables including the default run-time
141
     * libraries from the executing VM; optional,
142
     * defaults to false
143
     * @param include if true include default run-time libraries
144
     */
145
    public void setIncludejavaruntime(boolean include) {
146
        includeJavaRuntime = include;
51
    }
147
    }
52
    /**
148
    /**
53
     * Gets the bootclasspath that will be used to compile the classes
149
     * Gets 
54
     * against.
55
     * @return the boot path
150
whether or not the java runtime should be included in this
151
     * task's classpath.
152
     * @return true if default run-time libraries are included
153
     */
154
    public boolean getIncludejavaruntime() {
155
        return includeJavaRuntime;
156
    }
157
    /**
158
     * Sets the extension directories that will be used during the
159
     * compilation; optional.
160
     * @param extDirs the extension directories to be used
56
     */
161
     */
57
    public Path getBootclasspath(
162
    public void setExtdirs(Path extDirs) {
58
) {
163
        if (this.extDirs == null) {
59
        return bootclasspath;
164
         
60
    }
61
    /**
62
     * Adds a path to the bootclasspath
165
   this.extDirs = extDirs;
166
        } else {
167
            this.extDirs.append(extDirs);
168
        }
169
    }
170
    /**
63
.
171
     * Maybe creates a nested extdirs element.
64
     * @return a path to be configured
172
     * @return path object to be configured with the extension directories
65
     */
173
     */
66
    public Path createBootclasspath() {
174
    public Path createExtdirs() {
67
        if (bootclasspath == null) {
175
        if (extDirs == null) {
68
            bootclasspath = new Path(getProject());
176
            extDirs = new Path(getProject());
69
        }
177
        }
70
        return bootclasspath.createPath();
178
        return extDirs.createPath();
71
    
179
    
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