File path: /sql12/test/src/net/sourceforge/squirrel_sql/client/update/downloader/event/DownloadStatusEventTest.java | File path: /sql12/test/src/net/sourceforge/squirrel_sql/client/update/downloader/event/DownloadStatusEventTest.java | |||
Method name: void testGetSetException()
|
Method name: void testGetSetFilename()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | classUnderTest = new DownloadStatusEvent(DownloadEventType.DOWNLOAD_COMPLETED);↵ | 1 | classUnderTest = new DownloadStatusEvent(DownloadEventType.DOWNLOAD_COMPLETED);↵ | |
2 | Exception expected = new Exception("something exceptional");↵ | 2 | String filename = "somefilename";↵ | |
3 | classUnderTest.setException(expected);↵ | 3 | classUnderTest.setFilename(filename);↵ | |
4 | assertEquals(expected, classUnderTest.getException()); | 4 | assertEquals(filename, classUnderTest.getFilename()); | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 11 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||
---|---|---|---|---|---|---|---|
1 | classUnderTest = new DownloadStatusEvent(DownloadEventType.DOWNLOAD_COMPLETED); | 1 | classUnderTest = new DownloadStatusEvent(DownloadEventType.DOWNLOAD_COMPLETED); | ||||
| 2 | String filename = "somefilename"; | |||||
2 | Exception expected = new Exception("something exceptional"); | | |||||
|
| 3 | classUnderTest.setFilename(filename); | ||||
3 | classUnderTest.setException(expected); |
| | ||||
| 4 | assertEquals(filename, classUnderTest.getFilename()); | |||||
4 | assertEquals(expected, classUnderTest.getException()); | |
Row | Violation |
---|---|
1 | Unmatched statement classUnderTest.setFilename(filename); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Unmatched statement classUnderTest.setException(expected); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |