File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/update/gui/UpdateSummaryTable.java | File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/update/gui/UpdateSummaryTable.java | |||
Method name: void setReleaseVersionWillChange(boolean)
|
Method name: void setReleaseVersionWillChange(boolean)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | while (i.hasNext()) {↵ | 1 | while (i.hasNext()) {↵ | |
2 | ArtifactStatus status = i.next();↵ | 2 | ArtifactStatus status = i.next();↵ | |
3 | if (status.isInstalled()) {↵ | 3 | if (status.is↵ | |
4 | status.setArtifactAction(ArtifactAction.INSTALL↵ | 4 | CoreArtifact()) {↵ | |
5 | );↵ | 5 | i.remove();↵ | |
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.1 |
Clones location | Clones are in the same method |
Number of node comparisons | 8 |
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) | 0.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | while (i.hasNext()) | 8 | while (i.hasNext()) | |||||||||||||
5 | ArtifactStatus status = i.next(); | 9 | ArtifactStatus status = i.next(); | |||||||||||||
6 | if (status.isInstalled()) |
| 10 | if (status.isCoreArtifact()) | ||||||||||||
7 | status.setArtifactAction(ArtifactAction.INSTALL); |
| | |||||||||||||
| 11 | i.remove(); |
Row | Violation |
---|---|
1 | Expression status.isInstalled() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression status.isCoreArtifact() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement status.setArtifactAction(ArtifactAction.INSTALL); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Clone fragment #1 returns variables status , while Clone fragment #2 returns variables |