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