File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/BasicExtendedMetaData.java | File path: /emf-2.4.1/src/org/eclipse/emf/importer/rose/builder/UnitTreeBuilder.java | |||
Method name: EClassifier getType(String)
|
Method name: void traverseObject(String, RoseNode, UnitTreeNode)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 6 | |||
1 | EClassifier eClassifier = eClassifiers.get(i);↵ | |||
2 | ↵ | 1 | if (fileNameNode != null)↵ | |
2 | {↵ | |||
3 | String eClassifierName = getName(eClassifier);↵ | 3 | String ↵ | |
4 | EClassifier conflictingEClassifier = nameToClassifierMap.put(eClassifierName, eClassifier);↵ | |||
5 | if (conflictingEClassifier != null && conflictingEClassifier != eClassifier)↵ | |||
6 | {↵ | |||
7 | nameToClassifierMap.put(eClassifierName, conflictingEClassifier);↵ | |||
8 | ↵ | 4 | fileNameNodeValue = fileNameNode.getValue();↵ | |
5 | String fileName = roseUtil.resolveFileName(fileNameNodeValue);↵ | |||
6 | UnitTreeNode unitTreeNode = new UnitTreeNode(objName, quid, fileName);↵ | |||
7 | unitNode.addNode(unitTreeNode);↵ | |||
8 | roseUtil.createRoseUnitTreeAndTable(fileNameNodeValue, unitTreeNode);↵ | |||
9 | } | 9 |
| |
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.4 |
Clones location | Clones are in different classes |
Number of node comparisons | 13 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 4 |
Number of unmapped statements in the second code fragment | 5 |
Time elapsed for statement mapping (ms) | 2.2 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
20 | EClassifier eClassifier = eClassifiers.get(i); |
| | ||||||||||||||||||
21 | String eClassifierName = getName(eClassifier); |
| | ||||||||||||||||||
22 | EClassifier conflictingEClassifier = nameToClassifierMap.put(eClassifierName, eClassifier); |
| | ||||||||||||||||||
23 | if (conflictingEClassifier != null && conflictingEClassifier != eClassifier) |
| 22 | if (fileNameNode != null) | |||||||||||||||||
|
| 23 | String fileNameNodeValue = fileNameNode.getValue(); | ||||||||||||||||||
|
| 24 | String fileName = roseUtil.resolveFileName(fileNameNodeValue); | ||||||||||||||||||
24 | nameToClassifierMap.put(eClassifierName, conflictingEClassifier); |
| | ||||||||||||||||||
|
| 25 | UnitTreeNode unitTreeNode = new UnitTreeNode(objName, quid, fileName); | ||||||||||||||||||
|
| 26 | unitNode.addNode(unitTreeNode); | ||||||||||||||||||
|
| 27 | roseUtil.createRoseUnitTreeAndTable(fileNameNodeValue, unitTreeNode); |
Row | Violation |
---|---|
1 | Unmatched statement EClassifier eClassifier=eClassifiers.get(i); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement String eClassifierName=getName(eClassifier); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
3 | Unmatched statement EClassifier conflictingEClassifier=nameToClassifierMap.put(eClassifierName,eClassifier); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Expression conflictingEClassifier != null && conflictingEClassifier != eClassifier cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Unmatched statement String fileNameNodeValue=fileNameNode.getValue(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
6 | Unmatched statement String fileName=roseUtil.resolveFileName(fileNameNodeValue); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
7 | Unmatched statement nameToClassifierMap.put(eClassifierName,conflictingEClassifier); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
8 | Unmatched statement UnitTreeNode unitTreeNode=new UnitTreeNode(objName,quid,fileName); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
9 | Unmatched statement unitNode.addNode(unitTreeNode); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
10 | Unmatched statement roseUtil.createRoseUnitTreeAndTable(fileNameNodeValue,unitTreeNode); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
11 | Unmatched statement roseUtil.createRoseUnitTreeAndTable(fileNameNodeValue,unitTreeNode); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
12 | The refactoring of the clones is infeasible, because the number of macthed statements is equal to zero |