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