File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/XMLResourceImpl.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/XMLResourceImpl.java | |||
Method name: void load(InputSource, Map,?>)
|
Method name: void load(Node, Map,?>)
|
|||
Number of AST nodes: 15 | Number of AST nodes: 15 | |||
1 | if (!isLoaded)↵ | 1 | if (!isLoaded)↵ | |
2 | {↵ | 2 | {↵ | |
3 | Notification notification = setLoaded(true);↵ | 3 | Notification notification = setLoaded(true);↵ | |
4 | isLoading = true;↵ | 4 | isLoading = true;↵ | |
5 | if (errors != null)↵ | 5 | if (errors != null)↵ | |
6 | {↵ | 6 | {↵ | |
7 | errors.clear();↵ | 7 | errors.clear();↵ | |
8 | }↵ | 8 | }↵ | |
9 | if (warnings != null)↵ | 9 | if (warnings != null)↵ | |
10 | {↵ | 10 | {↵ | |
11 | warnings.clear();↵ | 11 | warnings.clear();↵ | |
12 | }↵ | 12 | }↵ | |
13 | try↵ | 13 | try↵ | |
14 | {↵ | 14 | {↵ | |
15 | if (defaultLoadOptions == null || defaultLoadOptions.isEmpty())↵ | 15 | if (defaultLoadOptions == null || defaultLoadOptions.isEmpty())↵ | |
16 | {↵ | 16 | {↵ | |
17 | doLoad(inputSource, options);↵ | 17 | doLoad(node, options);↵ | |
18 | }↵ | 18 | }↵ | |
19 | else if (options == null)↵ | 19 | else if (options == null)↵ | |
20 | {↵ | 20 | {↵ | |
21 | doLoad(inputSource, defaultLoadOptions);↵ | 21 | doLoad(node, defaultLoadOptions);↵ | |
22 | }↵ | 22 | }↵ | |
23 | else↵ | 23 | else↵ | |
24 | {↵ | 24 | {↵ | |
25 | Map<Object, Object> mergedOptions = new HashMap<Object, Object>(defaultLoadOptions);↵ | 25 | Map<Object, Object> mergedOptions = new HashMap<Object, Object>(defaultLoadOptions);↵ | |
26 | mergedOptions.putAll(options);↵ | 26 | mergedOptions.putAll(options);↵ | |
27 | ↵ | 27 | ↵ | |
28 | doLoad(inputSource, mergedOptions);↵ | 28 | doLoad(node, mergedOptions);↵ | |
29 | }↵ | 29 | }↵ | |
30 | }↵ | 30 | }↵ | |
31 | finally↵ | 31 | finally↵ | |
32 | {↵ | 32 | {↵ | |
33 | isLoading = false;↵ | 33 | isLoading = false;↵ | |
34 | if (notification != null)↵ | 34 | if (notification != null)↵ | |
35 | {↵ | 35 | {↵ | |
36 | eNotify(notification);↵ | 36 | eNotify(notification);↵ | |
37 | }↵ | 37 | }↵ | |
38 | ↵ | 38 | ↵ | |
39 | setModified(false);↵ | 39 | setModified(false);↵ | |
40 | } ↵ | 40 | } ↵ | |
41 | } | 41 |
| |
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) | 1.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 63 |
Number of mapped statements | 15 |
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) | 3.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (!isLoaded) | 1 | if (!isLoaded) | |||||||||||||||
2 | Notification notification = setLoaded(true); | 2 | Notification notification = setLoaded(true); | |||||||||||||||
3 | isLoading = true; | 3 | isLoading = true; | |||||||||||||||
4 | if (errors != null) | 4 | if (errors != null) | |||||||||||||||
5 | errors.clear(); | 5 | errors.clear(); | |||||||||||||||
6 | if (warnings != null) | 6 | if (warnings != null) | |||||||||||||||
7 | warnings.clear(); | 7 | warnings.clear(); | |||||||||||||||
8 | try | 8 | try | |||||||||||||||
9 | if (defaultLoadOptions == null || defaultLoadOptions.isEmpty()) | 9 | if (defaultLoadOptions == null || defaultLoadOptions.isEmpty()) | |||||||||||||||
10 | doLoad(inputSource, options); |
| 10 | doLoad(node, options); | ||||||||||||||
11 | else if (options == null) |
| 11 | else if (options == null) | ||||||||||||||
12 | doLoad(inputSource, defaultLoadOptions); |
| 12 | doLoad(node, defaultLoadOptions); | ||||||||||||||
else | else | |||||||||||||||||
13 | Map<Object, Object> mergedOptions = new HashMap<Object, Object>(defaultLoadOptions); | 13 | Map<Object, Object> mergedOptions = new HashMap<Object, Object>(defaultLoadOptions); | |||||||||||||||
14 | mergedOptions.putAll(options); |
| 14 | mergedOptions.putAll(options); | ||||||||||||||
15 | doLoad(inputSource, mergedOptions); |
| 15 | doLoad(node, mergedOptions); |
Row | Violation |
---|---|
1 | Type org.xml.sax.InputSource of variable inputSource does not match with type org.w3c.dom.Node of variable node |
2 | Type java.util.Map<,> of variable options does not match with type java.util.Map<,> of variable options |
3 | Type org.xml.sax.InputSource of variable inputSource does not match with type org.w3c.dom.Node of variable node |
4 | Type java.util.Map<,> of variable options does not match with type java.util.Map<,> of variable options |
5 | Type org.xml.sax.InputSource of variable inputSource does not match with type org.w3c.dom.Node of variable node |