File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Manifest.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/util/depend/AbstractAnalyzer.java | |||
Method name: void storeAttribute(Attribute)
|
Method name: void addRootClass(String)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 4 | |||
1 | if (attribute == null) {↵ | 1 | if (className == null) {↵ | |
2 | return;↵ | 2 | return;↵ | |
3 | }↵ | 3 | }↵ | |
4 | String attributeKey = attribute.getKey();↵ | 4 | ↵ | |
5 | attributes.put(attributeKey, attribute);↵ | |||
6 | if (!attributeIndex.contains(attributeKey)) {↵ | |||
7 | attributeIndex.addElement(attributeKey);↵ | |||
8 | ↵ | 5 | if (!rootClasses.contains(className)) {↵ | |
6 | rootClasses.addElement(className);↵ | |||
9 | } | 7 |
| |
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.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 13 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.8 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (attribute == null) |
| 1 | if (className == null) | ||||||||||||||
2 | return; | 2 | return; | |||||||||||||||
3 | String attributeKey = attribute.getKey(); | | ||||||||||||||||
4 | attributes.put(attributeKey, attribute); | | ||||||||||||||||
5 | if (!attributeIndex.contains(attributeKey)) |
| 3 | if (!rootClasses.contains(className)) | ||||||||||||||
6 | attributeIndex.addElement(attributeKey); |
| 4 | rootClasses.addElement(className); |
Row | Violation |
---|---|
1 | Type org.apache.tools.ant.taskdefs.Manifest.Attribute of variable attribute does not match with type java.lang.String of variable className |