File path: /emf-2.4.1/src/org/eclipse/emf/ecore/resource/impl/ResourceImpl.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/resource/impl/ResourceImpl.java | |||
Method name: EList
|
Method name: EList
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | if (errors == null)↵ | 1 | if (warnings == null)↵ | |
2 | {↵ | 2 | {↵ | |
3 | errors =↵ | 3 | warnings =↵ | |
4 | new NotifyingListImpl<Diagnostic>()↵ | 4 | new NotifyingListImpl<Diagnostic>()↵ | |
5 | {↵ | 5 | {↵ | |
6 | private static final long serialVersionUID = 1L;↵ | 6 | private static final long serialVersionUID = 1L;↵ | |
7 | @Override↵ | 7 | @Override↵ | |
8 | protected boolean isNotificationRequired()↵ | 8 | protected boolean isNotificationRequired()↵ | |
9 | {↵ | 9 | {↵ | |
10 | return ResourceImpl.this.eNotificationRequired();↵ | 10 | return ResourceImpl.this.eNotificationRequired();↵ | |
11 | }↵ | 11 | }↵ | |
12 | @Override↵ | 12 | @Override↵ | |
13 | public Object getNotifier()↵ | 13 | public Object getNotifier()↵ | |
14 | {↵ | 14 | {↵ | |
15 | return ResourceImpl.this;↵ | 15 | return ResourceImpl.this;↵ | |
16 | }↵ | 16 | }↵ | |
17 | @Override↵ | 17 | @Override↵ | |
18 | public int getFeatureID()↵ | 18 | public int getFeatureID()↵ | |
19 | {↵ | 19 | {↵ | |
20 | return RESOURCE__ERRORS;↵ | 20 | return RESOURCE__WARNINGS;↵ | |
21 | }↵ | 21 | }↵ | |
22 | };↵ | 22 | };↵ | |
23 | }↵ | 23 | }↵ | |
24 | return errors; | 24 | return warnings; | |
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 | 5 |
Number of mapped statements | 3 |
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 | if (errors == null) |
| 1 | if (warnings == null) | |||||||||||||||
2 | errors = new NotifyingListImpl<Diagnostic>() {...}; |
| 2 | warnings = new NotifyingListImpl<Diagnostic>() {...}; | |||||||||||||||
3 | return errors; |
| 3 | return warnings; |
Row | Violation |
---|---|
1 | Expression errors is a field being modified, and thus it cannot be parameterized |
2 | Expression warnings is a field being modified, and thus it cannot be parameterized |
3 | Expression errors cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression warnings cannot be parameterized, because it has dependencies to/from statements that will be extracted |