Vector sources = (Vector) filesets.clone();
if (jar != null) {
//we create a fileset with the source file.
//this lets us combine our logic for handling output directories,
//mapping etc.
FileSet sourceJar = new FileSet();
sourceJar.setProject(getProject());
sourceJar.setFile(jar);
sourceJar.setDir(jar.getParentFile());
sources.add(sourceJar);
}
return sources;
Execute exe = new Execute(streamhandler, null);
exe.setAntRun(getProject());
if (topDir == null) {
topDir = getProject().getBaseDir();
}
exe.setWorkingDirectory(topDir);
exe.setCommandline(toExecute.getCommandline());
return exe;
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/AbstractJarSignerTask.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/Rpm.java
|
Method name: Vector createUnifiedSources()
|
|
Method name: Execute getExecute(Commandline, ExecuteStreamHandler)
|
Number of AST nodes: 8
|
|
Number of AST nodes: 7
|
|
1 | Vector sources = (Vector) filesets.clone();↵ | | |
|
2 | if (jar != null) {↵ | | |
|
3 | //we create a fileset with the source file.↵ | | |
|
4 | //this lets us combine our logic for handling output directories,↵ | | |
|
5 | //mapping etc.↵ | | |
|
6 | FileSet sourceJa↵ | | 1 | Execute exe = new Execute(streamhandler, null);↵
|
|
| | | 2 | exe.setAntRun(getProject());↵
|
7 | r = new FileSet();↵ | | 3 | if (topDir == null) {↵
|
8 | sourceJar.setProject(getProject());↵ | | 4 | topDir = getProject().getBaseDir();↵
|
9 | sourceJar.setFile(jar);↵ | | 5 | ↵
|
10 | sourceJar.setDir(jar.getParentFile()↵ | | 6 | }↵
|
11 | );↵ | | 7 | exe.setWorkingDirectory(topDir);↵
|
|
12 | sources.add(sourceJar);↵ | | 8 | exe.setCommandline(toExecute.getCommandline());↵
|
13 | }↵ | | 9 | ↵
|
14 | return sources; | | 10 | return exe;
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 1 |