File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/SQLExec.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/TraXLiaison.java | |||
Method name: void printResults(ResultSet, PrintStream)
|
Method name: void logError(TransformerException, String)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 6 | |||
1 | String columnValue = rs.getString(col);↵ | |||
2 | if (columnValue != null) {↵ | |||
3 | columnValue = columnValue.trim();↵ | |||
4 | }↵ | |||
5 | if (first) {↵ | |||
6 | first = false↵ | 1 | if (systemid != null) {↵ | |
2 | String url = systemid;↵ | |||
3 | if (url.startsWith("file:")) {↵ | |||
7 | ;↵ | 4 | url = FileUtils.getFileUtils().fromURI(url);↵ | |
8 | } else {↵ | 5 | }↵ | |
9 | line.append(",");↵ | 6 | msg.append(url);↵ | |
10 | }↵ | 7 | ↵ | |
11 | ↵ | 8 | } else {↵ | |
12 | line.append(columnValue); | 9 | msg.append("Unknown file");↵ | |
10 |
| |||
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.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 9 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 4 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.9 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
16 | String columnValue = rs.getString(col); |
| 8 | String url = systemid; | |||||||||||||
17 | if (columnValue != null) |
| | ||||||||||||||
18 | columnValue = columnValue.trim(); |
| | ||||||||||||||
19 | if (first) |
| 9 | if (url.startsWith("file:")) | |||||||||||||
| 10 | url = FileUtils.getFileUtils().fromURI(url); | |||||||||||||||
20 | first = false; |
| | ||||||||||||||
else | | ||||||||||||||||
21 | line.append(","); | |
Row | Violation |
---|---|
1 | Unmatched statement if(columnValue != null) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement columnValue=columnValue.trim(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Expression url.startsWith("file:") cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Unmatched statement first=false; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |