File path: /apache-ant-1.7.0/src/org/apache/tools/ant/Project.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/SubAnt.java | |||
Method name: void executeSortedTargets(Vector)
|
Method name: void execute()
|
|||
Number of AST nodes: 9 | Number of AST nodes: 10 | |||
1 | if (thrownException != null) {↵ | |||
2 | if (thrownException instanceof BuildException) {↵ | 1 | if (thrownException instanceof BuildException) {↵ | |
3 | log(curtarget,↵ | 2 | ↵ | |
4 | "Target '" + curtarget.getName()↵ | |||
5 | ↵ | 3 | log("File '" + file↵ | |
6 | + "' failed with message '"↵ | 4 | + "' failed with message '"↵ | |
7 | + thrownException.getMessage() + "'.", MSG_ERR);↵ | 5 | + thrownException.getMessage() + "'.", Project.MSG_ERR);↵ | |
8 | // only the first build exception is reported↵ | 6 | // only the first build exception is reported↵ | |
9 | if (buildException == null) {↵ | 7 | if (buildException == null) {↵ | |
10 | buildException = (BuildException) thrownException;↵ | 8 | buildException = (BuildException) thrownException;↵ | |
11 | }↵ | 9 | ↵ | |
12 | ↵ | 10 | }↵ | |
13 | } else {↵ | 11 | } else {↵ | |
14 | log(curtarget,↵ | 12 | ↵ | |
15 | "Target '" + curtarget.getName()↵ | |||
16 | ↵ | 13 | log("Target '" + file↵ | |
17 | + "' failed with message '"↵ | 14 | + "' failed with message '"↵ | |
18 | + thrownException.getMessage() + "'.", MSG_ERR);↵ | 15 | + thrownException.getMessage() + "'.", Project.MSG_ERR);↵ | |
19 | thrownException.printStackTrace(System.err);↵ | 16 | thrownException.printStackTrace(System.err);↵ | |
20 | if (buildException == null) {↵ | 17 | if (buildException == null) {↵ | |
21 | buildException =↵ | 18 | buildException =↵ | |
22 | new BuildException(thrownException);↵ | 19 | new BuildException(thrownException);↵ | |
23 | ↵ | 20 | }↵ | |
24 | }↵ | 21 | }↵ | |
25 | }↵ | 22 | if (verbose && subdirPath != null) {↵ | |
23 | log("Leaving directory: " + subdirPath + "\n", Project.MSG_INFO);↵ | |||
26 | } | 24 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.6 |
Clones location | Clones are in different classes |
Number of node comparisons | 31 |
Number of mapped statements | 8 |
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) | 3.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
18 | if (thrownException instanceof BuildException) | 28 | if (thrownException instanceof BuildException) | |||||||||||||||
19 | log(curtarget, "Target '" + curtarget.getName() + "' failed with message '" + thrownException.getMessage() + "'.", MSG_ERR); |
| 29 | log("File '" + file + "' failed with message '" + thrownException.getMessage() + "'.", Project.MSG_ERR); | ||||||||||||||
20 | if (buildException == null) | 30 | if (buildException == null) | |||||||||||||||
21 | buildException = (BuildException)thrownException; | 31 | buildException = (BuildException)thrownException; | |||||||||||||||
else | else | |||||||||||||||||
22 | log(curtarget, "Target '" + curtarget.getName() + "' failed with message '" + thrownException.getMessage() + "'.", MSG_ERR); |
| 32 | log("Target '" + file + "' failed with message '" + thrownException.getMessage() + "'.", Project.MSG_ERR); | ||||||||||||||
23 | thrownException.printStackTrace(System.err); | 33 | thrownException.printStackTrace(System.err); | |||||||||||||||
24 | if (buildException == null) | 34 | if (buildException == null) | |||||||||||||||
25 | buildException = new BuildException(thrownException); | 35 | buildException = new BuildException(thrownException); |
Row | Violation |
---|---|
1 | Expression log(curtarget,"Target '" + curtarget.getName() + "' failed with message '"+ thrownException.getMessage()+ "'.",MSG_ERR) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression log("File '" + file + "' failed with message '"+ thrownException.getMessage()+ "'.",Project.MSG_ERR) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression log(curtarget,"Target '" + curtarget.getName() + "' failed with message '"+ thrownException.getMessage()+ "'.",MSG_ERR) is a void method call, and thus it cannot be parameterized |
4 | Expression log("File '" + file + "' failed with message '"+ thrownException.getMessage()+ "'.",Project.MSG_ERR) is a void method call, and thus it cannot be parameterized |
5 | Expression log(curtarget,"Target '" + curtarget.getName() + "' failed with message '"+ thrownException.getMessage()+ "'.",MSG_ERR) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression log("Target '" + file + "' failed with message '"+ thrownException.getMessage()+ "'.",Project.MSG_ERR) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression log(curtarget,"Target '" + curtarget.getName() + "' failed with message '"+ thrownException.getMessage()+ "'.",MSG_ERR) is a void method call, and thus it cannot be parameterized |
8 | Expression log("Target '" + file + "' failed with message '"+ thrownException.getMessage()+ "'.",Project.MSG_ERR) is a void method call, and thus it cannot be parameterized |