File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xml/type/util/XMLTypeValidator.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xml/type/util/XMLTypeValidator.java | |||
Method name: boolean validateENTITIES_MinLength(List>, DiagnosticChain, Map
|
Method name: boolean validateNMTOKENS_MinLength(List>, DiagnosticChain, Map
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | int length = entities.size();↵ | 1 | int length = nmtokens.size();↵ | |
2 | boolean result = length >= 1;↵ | 2 | boolean result = length >= 1;↵ | |
3 | if (!result && diagnostics != null)↵ | 3 | if (!result && diagnostics != null)↵ | |
4 | reportMinLengthViolation(XMLTypePackage.Literals.ENTITIES, entities, length, 1, diagnostics, context);↵ | 4 | reportMinLengthViolation(XMLTypePackage.Literals.NMTOKENS, nmtokens, length, 1, diagnostics, context);↵ | |
5 | return result; | 5 |
| |
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 declared in the same class |
Number of node comparisons | 13 |
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) | 0.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | int length = entities.size(); |
| 1 | int length = nmtokens.size(); | |||||||||||||||||
2 | boolean result = length >= 1; | 2 | boolean result = length >= 1; | ||||||||||||||||||
3 | if (!result && diagnostics != null) | 3 | if (!result && diagnostics != null) | ||||||||||||||||||
4 | reportMinLengthViolation(XMLTypePackage.Literals.ENTITIES, entities, length, 1, diagnostics, context); |
| 4 | reportMinLengthViolation(XMLTypePackage.Literals.NMTOKENS, nmtokens, length, 1, diagnostics, context); | |||||||||||||||||
5 | return result; | 5 | return result; |
Row | Violation |
---|---|
1 | Type java.util.List<> of variable entities does not match with type java.util.List<> of variable nmtokens |
2 | Type java.util.List<> of variable entities does not match with type java.util.List<> of variable nmtokens |