File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Exec.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Exec.java | |||
Method name: int run(String)
|
Method name: int run(String)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | String ant = getProject().getProperty(MagicNames.ANT_HOME);↵ | 1 | String ant = getProject().getProperty(MagicNames.ANT_HOME);↵ | |
2 | if (ant == null) {↵ | 2 | if (ant == null) {↵ | |
3 | throw new BuildException("Property '" + MagicNames.ANT_HOME + "' not "↵ | 3 | throw new BuildException("Property '" + MagicNames.ANT_HOME + "' not found",↵ | |
4 | + "found", getLocation());↵ | 4 | getLocation());↵ | |
5 | }↵ | 5 | ↵ | |
6 | ↵ | 6 | }↵ | |
7 | String antRun = getProject().resolveFile(ant + "/bin/antRun.bat").toString();↵ | 7 | String antRun = getProject().resolveFile(ant + "/bin/antRun").toString();↵ | |
8 | ↵ | |||
9 | command = antRun + " " + dir + " " + command; | 8 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.6 |
Clones location | Clones are in the same method |
Number of node comparisons | 17 |
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 2.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
13 | String ant = getProject().getProperty(MagicNames.ANT_HOME); | 18 | String ant = getProject().getProperty(MagicNames.ANT_HOME); | |||||||||||
14 | if (ant == null) | 19 | if (ant == null) | |||||||||||
15 | throw new BuildException("Property '" + MagicNames.ANT_HOME + "' not " + "found", getLocation()); |
| 20 | throw new BuildException("Property '" + MagicNames.ANT_HOME + "' not found", getLocation()); | ||||||||||
16 | String antRun = getProject().resolveFile(ant + "/bin/antRun.bat").toString(); |
| 21 | String antRun = getProject().resolveFile(ant + "/bin/antRun").toString(); | ||||||||||
17 | command = antRun + " " + dir + " " + command; | 22 | command = antRun + " " + dir + " " + command; |
Row | Violation |
---|