File path: /columba-1.4-src/core/src/main/java/org/columba/core/tagging/TagManager.java | File path: /columba-1.4-src/core/src/main/java/org/columba/core/association/AssociationStore.java | |||
Method name: TagManager getInstance()
|
Method name: AssociationStore getInstance()
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if (instance == null) {↵ | 1 | if (instance == null) {↵ | |
2 | synchronized (TagManager.class) {↵ | 2 | synchronized (AssociationStore.class) {↵ | |
3 | if (instance == null)↵ | 3 | if (instance == null)↵ | |
4 | instance = new TagManager();↵ | 4 | instance = new AssociationStore();↵ | |
5 | }↵ | 5 | }↵ | |
6 | }↵ | 6 | }↵ | |
7 | return instance; | 7 |
| |
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.5 |
Clones location | Clones are in different classes |
Number of node comparisons | 7 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 1.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (instance == null) |
| 1 | if (instance == null) | |||||||||||
2 | synchronized (TagManager.class) |
| 2 | synchronized (AssociationStore.class) | |||||||||||
3 | if (instance == null) |
| 3 | if (instance == null) | |||||||||||
|
| 4 | instance = new AssociationStore(); | ||||||||||||
4 | instance = new TagManager(); |
| | ||||||||||||
|
| 5 | return instance; | ||||||||||||
5 | return instance; |
| |
Row | Violation |
---|---|
1 | Type org.columba.core.tagging.TagManager of variable instance does not match with type org.columba.core.association.AssociationStore of variable instance |
2 | Type org.columba.core.tagging.TagManager of variable instance does not match with type org.columba.core.association.AssociationStore of variable instance |
3 | Unmatched statement instance=new AssociationStore(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
4 | Unmatched statement instance=new TagManager(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
5 | Unmatched statement instance=new TagManager(); 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 |
6 | Unmatched return instance; |
7 | Unmatched return instance; |
8 | The refactoring of the clones is infeasible, because classes org.columba.core.tagging.TagManager and org.columba.core.association.AssociationStore do not have a common superclass |