File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xml/type/impl/XMLTypeFactoryImpl.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xml/type/impl/XMLTypeFactoryImpl.java | |||
Method name: String convertENTITIESBaseToString(EDataType, Object)
|
Method name: String convertNMTOKENSBaseToString(EDataType, Object)
|
|||
Number of AST nodes: 10 | Number of AST nodes: 10 | |||
1 | if (instanceValue == null) return null;↵ | 1 | if (instanceValue == null) return null;↵ | |
2 | List<?> list = (List<?>)instanceValue;↵ | 2 | List<?> list = (List<?>)instanceValue;↵ | |
3 | if (list.isEmpty()) return "";↵ | 3 | if (list.isEmpty()) return "";↵ | |
4 | StringBuffer result = new StringBuffer();↵ | 4 | StringBuffer result = new StringBuffer();↵ | |
5 | for (Iterator<?> i = list.iterator(); i.hasNext(); )↵ | 5 | for (Iterator<?> i = list.iterator(); i.hasNext(); )↵ | |
6 | {↵ | 6 | {↵ | |
7 | result.append(convertENTITYToString(XMLTypePackage.Literals.ENTITY, i.next()));↵ | 7 | result.append(convertNMTOKENToString(XMLTypePackage.Literals.NMTOKEN, i.next()));↵ | |
8 | result.append(' ');↵ | 8 | result.append(' ');↵ | |
9 | }↵ | 9 | }↵ | |
10 | return result.substring(0, result.length() - 1); | 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.4 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 19 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (instanceValue == null) | 1 | if (instanceValue == null) | ||||||||||||
2 | return null; | 2 | return null; | ||||||||||||
| 3 | List<?> list = (List<?>)instanceValue; | |||||||||||||
3 | List<?> list = (List<?>)instanceValue; | | |||||||||||||
4 | if (list.isEmpty()) |
| 4 | if (list.isEmpty()) | |||||||||||
5 | return ""; | 5 | return ""; |
Row | Violation |
---|---|
1 | Type java.util.List<> of variable list does not match with type java.util.List<> of variable list |