File path: /emf-2.4.1/src/org/eclipse/emf/mapping/ecore2xml/impl/XMLInfoImpl.java | File path: /emf-2.4.1/src/org/eclipse/emf/mapping/ecore2xml/impl/XMLInfoImpl.java | |||
Method name: void setName(String)
|
Method name: void setTargetNamespace(String)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | String oldName = delegateXMLInfo.getName();↵ | 1 | String oldTargetNamespace = delegateXMLInfo.getTargetNamespace();↵ | |
2 | delegateXMLInfo.setName(newName);↵ | 2 | delegateXMLInfo.setTargetNamespace(newTargetNamespace);↵ | |
3 | if (eNotificationRequired())↵ | 3 | if (eNotificationRequired())↵ | |
4 | eNotify(new ENotificationImpl(this, Notification.SET, Ecore2XMLPackage.XML_INFO__NAME, oldName, newName)); | 4 | eNotify(new ENotificationImpl(this, Notification.SET, Ecore2XMLPackage.XML_INFO__TARGET_NAMESPACE, oldTargetNamespace, newTargetNamespace)); | |
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 | 8 |
Number of mapped statements | 4 |
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) | 1.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | String oldName = delegateXMLInfo.getName(); |
| 1 | String oldTargetNamespace = delegateXMLInfo.getTargetNamespace(); | ||||||||||||||||
2 | delegateXMLInfo.setName(newName); |
| 2 | delegateXMLInfo.setTargetNamespace(newTargetNamespace); | ||||||||||||||||
3 | if (eNotificationRequired()) | 3 | if (eNotificationRequired()) | |||||||||||||||||
4 | eNotify(new ENotificationImpl(this, Notification.SET, Ecore2XMLPackage.XML_INFO__NAME, oldName, newName)); |
| 4 | eNotify(new ENotificationImpl(this, Notification.SET, Ecore2XMLPackage.XML_INFO__TARGET_NAMESPACE, oldTargetNamespace, newTargetNamespace)); |
Row | Violation |
---|---|
1 | Expression delegateXMLInfo.setName(newName) is a void method call, and thus it cannot be parameterized |
2 | Expression delegateXMLInfo.setTargetNamespace(newTargetNamespace) is a void method call, and thus it cannot be parameterized |