File path: /apache-ant-1.7.0/src/org/apache/tools/ant/helper/ProjectHelper2.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/helper/ProjectHelper2.java | |||
Method name: void onStartElement(String, String, String, Attributes, AntXMLContext)
|
Method name: void onStartElement(String, String, String, Attributes, AntXMLContext)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | String attrUri = attrs.getURI(i);↵ | 1 | String attrUri = attrs.getURI(i);↵ | |
2 | if (attrUri != null↵ | 2 | if (attrUri != null↵ | |
3 | && !attrUri.equals("")↵ | 3 | && !attrUri.equals("")↵ | |
4 | && !attrUri.equals(uri)) {↵ | 4 | && !attrUri.equals(uri)) {↵ | |
5 | continue; // Ignore attributes from unknown uris↵ | 5 | continue; // Ignore attributes from unknown uris↵ | |
6 | }↵ | 6 | }↵ | |
7 | String key = attrs.getLocalName(i);↵ | 7 | String key = attrs.getLocalName(i);↵ | |
8 | String value = attrs.getValue(i); | 8 |
| |
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.5 |
Clones location | Clones are in the same java file |
Number of node comparisons | 14 |
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) | 4.3 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |||||||
---|---|---|---|---|---|---|---|---|---|---|
6 | String attrUri = attrs.getURI(i); | 9 | String attrUri = attrs.getURI(i); | |||||||
7 | if (attrUri != null && !attrUri.equals("") && !attrUri.equals(uri)) | 10 | if (attrUri != null && !attrUri.equals("") && !attrUri.equals(uri)) | |||||||
8 | continue; |
| 11 | continue; | ||||||
9 | String key = attrs.getLocalName(i); | 12 | String key = attrs.getLocalName(i); | |||||||
10 | String value = attrs.getValue(i); | 13 | String value = attrs.getValue(i); |
Row | Violation |
---|---|
1 | Statement continue; without innermost loop |
2 | Statement continue; without innermost loop |
3 | Clone fragment #1 returns variables key, value , while Clone fragment #2 returns variables key, value |