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 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(); }
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 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 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 setClasspathRef(Reference r) {
13
        createClasspath().setRefid(pathRef);
13
        createClasspath().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
17
bootclasspath that will be used to compile the classes
18
     * against.
19
     * @param bootclasspath a path to use as a boot class path (may be more
51
     */
20
     *
52
    public boolean getIiop() {
21
    
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
22
                  than one)
23
     */
24
    public void setBootclasspath(Path bootclasspath) {
25
        if (this.bootclasspath == null) {
91
;
26
            this.bootclasspath = bootclasspath;
92
    }
27
    
93
    /**
28
    
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;
29
} else {
30
            this.bootclasspath.append(bootclasspath);
31
        }
115
    }
32
    }
116
    /**
33
    /**
117
     * Gets whether or not the ant classpath is to be included in the
34
     * Gets 
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
35
the bootclasspath that will be used to compile the classes
36
     * against.
37
     * @return the boot path
38
     */
140
() {
39
    public Path getBootclasspath() {
141
        return includeJavaRuntime;
40
        return bootclasspath;
142
    }
41
    }
143
    /**
42
    /**
144
     * Sets the extension directories that will be used during the
43
     * 
145
     * compilation; optional.
146
     * @param extDirs the extension directories to be used
147
     */
148
    public void setExtdirs(Path extDirs) {
149
        if (this.extDirs == null) {
150
            this.extDirs = extDirs;
151
        } else {
152
            this.extDirs.append(extDirs);
153
        }
154
    }
155
    /**
156
     * Maybe creates a nested extdirs element.
44
Adds a path to the bootclasspath.
157
     * @return path object to be configured with the extension directories
45
     * @return a path to be configured
158
     */
46
     */
159
    public Path createExtdirs() {
47
    public Path createBootclasspath() {
160
        if (extDirs == null) {
48
        if (bootclasspath == null) {
161
            extDirs = new Path(getProject());
49
            bootclasspath = new Path(getProject());
162
        }
50
        }
163
        return extDirs.createPath();
51
        return bootclasspath.createPath();
164
    }
52
    }
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