File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/folder/virtual/VirtualFolder.java | File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/folder/virtual/VirtualFolder.java | |||
Method name: void releaseLock(Object)
|
Method name: boolean tryToGetLock(Object)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | while (it.hasMoreChildren()) {↵ | 1 | while (success && it.hasMoreChildren()) {↵ | |
2 | IMailFolder next = it.nextChild();↵ | 2 | IMailFolder next = it.nextChild();↵ | |
3 | if (!(next instanceof VirtualFolder)↵ | 3 | if (!(next instanceof VirtualFolder)↵ | |
4 | && (next instanceof IMailbox)) {↵ | 4 | && (next instanceof IMailbox)) {↵ | |
5 | next.releaseLock(locker);↵ | 5 | success &= next.tryToGetLock(locker);↵ | |
6 | }↵ | 6 | }↵ | |
7 | } | 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 declared in the same class |
Number of node comparisons | 9 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 38.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6 | while (it.hasMoreChildren()) |
| 8 | while (success && it.hasMoreChildren()) | ||||||||||||
7 | IMailFolder next = it.nextChild(); | 9 | IMailFolder next = it.nextChild(); | |||||||||||||
8 | if (!(next instanceof VirtualFolder) && (next instanceof IMailbox)) | 10 | if (!(next instanceof VirtualFolder) && (next instanceof IMailbox)) | |||||||||||||
9 | next.releaseLock(locker); |
| | |||||||||||||
|
| 11 | success &= next.tryToGetLock(locker); |
Row | Violation |
---|---|
1 | Expression it.hasMoreChildren() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression success && it.hasMoreChildren() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement next.releaseLock(locker); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Unmatched statement success&=next.tryToGetLock(locker); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |