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