File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/XMLLoadImpl.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/XMLLoadImpl.java | |||
Method name: void load(XMLResource, InputStream, Map,?>)
|
Method name: void load(XMLResource, InputSource, Map,?>)
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | if (Boolean.TRUE.equals(options.get(XMLResource.OPTION_USE_LEXICAL_HANDLER)))↵ | 1 | if (Boolean.TRUE.equals(options.get(XMLResource.OPTION_USE_LEXICAL_HANDLER)))↵ | |
2 | {↵ | 2 | {↵ | |
3 | if (parserProperties == null || parserProperties.get(SAX_LEXICAL_PROPERTY) == null) ↵ | 3 | if (parserProperties == null || parserProperties.get(SAX_LEXICAL_PROPERTY) == null) ↵ | |
4 | {↵ | 4 | {↵ | |
5 | parser.setProperty(SAX_LEXICAL_PROPERTY, handler);↵ | 5 | parser.setProperty(SAX_LEXICAL_PROPERTY, handler);↵ | |
6 | }↵ | 6 | }↵ | |
7 | }↵ | 7 | }↵ | |
8 | ↵ | 8 | ↵ | |
9 | parser.parse(inputSource, handler);↵ | 9 | parser.parse(inputSource, handler);↵ | |
10 | ↵ | |||
11 | // release parser back to the pool↵ | 10 | // release parser back to the pool↵ | |
12 | if (pool != null)↵ | 11 | if (pool != null)↵ | |
13 | {↵ | 12 | {↵ | |
14 | pool.release(parser, parserFeatures, parserProperties, Boolean.TRUE.equals(options.get(XMLResource.OPTION_USE_LEXICAL_HANDLER)));↵ | 13 | pool.release(parser, parserFeatures, parserProperties, Boolean.TRUE.equals(options.get(XMLResource.OPTION_USE_LEXICAL_HANDLER)));↵ | |
15 | pool.releaseDefaultHandler((XMLDefaultHandler)handler, options);↵ | 14 | pool.releaseDefaultHandler((XMLDefaultHandler)handler, options);↵ | |
16 | }↵ | 15 | }↵ | |
17 | ↵ | |||
18 | helper = null;↵ | 16 | helper = null;↵ | |
19 | handleErrors(); | 17 |
| |
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.9 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 20 |
Number of mapped statements | 9 |
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) | 10.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
44 | if (Boolean.TRUE.equals(options.get(XMLResource.OPTION_USE_LEXICAL_HANDLER))) |
| 22 | if (Boolean.TRUE.equals(options.get(XMLResource.OPTION_USE_LEXICAL_HANDLER))) | |||||||||||||||||||
45 | if (parserProperties == null || parserProperties.get(SAX_LEXICAL_PROPERTY) == null) |
| 23 | if (parserProperties == null || parserProperties.get(SAX_LEXICAL_PROPERTY) == null) | |||||||||||||||||||
46 | parser.setProperty(SAX_LEXICAL_PROPERTY, handler); | 24 | parser.setProperty(SAX_LEXICAL_PROPERTY, handler); | ||||||||||||||||||||
47 | parser.parse(inputSource, handler); | 25 | parser.parse(inputSource, handler); | ||||||||||||||||||||
48 | if (pool != null) | 26 | if (pool != null) | ||||||||||||||||||||
49 | pool.release(parser, parserFeatures, parserProperties, Boolean.TRUE.equals(options.get(XMLResource.OPTION_USE_LEXICAL_HANDLER))); |
| 27 | pool.release(parser, parserFeatures, parserProperties, Boolean.TRUE.equals(options.get(XMLResource.OPTION_USE_LEXICAL_HANDLER))); | |||||||||||||||||||
50 | pool.releaseDefaultHandler((XMLDefaultHandler)handler, options); |
| 28 | pool.releaseDefaultHandler((XMLDefaultHandler)handler, options); | |||||||||||||||||||
51 | helper = null; | 29 | helper = null; | ||||||||||||||||||||
52 | handleErrors(); | 30 | handleErrors(); |
Row | Violation |
---|---|
1 | Type of variable options.get(XMLResource.OPTION_USE_LEXICAL_HANDLER) does not match with type of variable options.get(XMLResource.OPTION_USE_LEXICAL_HANDLER) |
2 | Type java.util.Map<,> of variable options does not match with type java.util.Map<,> of variable options |
3 | Type java.util.Map<java.lang.String,> of variable parserProperties does not match with type java.util.Map<java.lang.String,> of variable parserProperties |
4 | Type of variable parserProperties.get(SAX_LEXICAL_PROPERTY) does not match with type of variable parserProperties.get(SAX_LEXICAL_PROPERTY) |
5 | Type java.util.Map<java.lang.String,> of variable parserProperties does not match with type java.util.Map<java.lang.String,> of variable parserProperties |
6 | Type java.util.Map<java.lang.String,> of variable parserProperties does not match with type java.util.Map<java.lang.String,> of variable parserProperties |
7 | Type java.util.Map<,> of variable options does not match with type java.util.Map<,> of variable options |