File path: /apache-ant-1.7.0/src/org/apache/tools/ant/IntrospectionHelper.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/IntrospectionHelper.java | |||
Method name: Class getAttributeType(String)
|
Method name: Class getElementType(String)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | Class at = (Class) attributeTypes.get(attributeName);↵ | 1 | Class nt = (Class) nestedTypes.get(elementName);↵ | |
2 | if (at == null) {↵ | 2 | if (nt == null) {↵ | |
3 | throw new UnsupportedAttributeException("Class "↵ | 3 | throw new UnsupportedElementException("Class "↵ | |
4 | + bean.getName() + " doesn't support the \""↵ | 4 | + bean.getName() + " doesn't support the nested \""↵ | |
5 | + attributeName + "\" attribute.", attributeName);↵ | 5 | + elementName + "\" element.", elementName);↵ | |
6 | }↵ | 6 | }↵ | |
7 | return at; | 7 | return nt; | |
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.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 8 |
Number of mapped statements | 4 |
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.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Class at = (Class)attributeTypes.get(attributeName); |
| 1 | Class nt = (Class)nestedTypes.get(elementName); | ||||||||||||||||||||||||
2 | if (at == null) |
| 2 | if (nt == null) | ||||||||||||||||||||||||
3 | throw new UnsupportedAttributeException("Class " + bean.getName() + " doesn't support the \"" + attributeName + "\" attribute.", attributeName); |
| 3 | throw new UnsupportedElementException("Class " + bean.getName() + " doesn't support the nested \"" + elementName + "\" element.", elementName); | ||||||||||||||||||||||||
4 | return at; |
| 4 | return nt; |
Row | Violation |
---|---|
1 | Expression new UnsupportedAttributeException("Class " + bean.getName() + " doesn't support the \""+ attributeName+ "\" attribute.",attributeName) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression new UnsupportedElementException("Class " + bean.getName() + " doesn't support the nested \""+ elementName+ "\" element.",elementName) cannot be parameterized, because it has dependencies to/from statements that will be extracted |