File path: /sql12/test/src/net/sourceforge/squirrel_sql/test/TestUtil.java | File path: /sql12/test/src/net/sourceforge/squirrel_sql/test/TestUtil.java | |||
Method name: TaskThreadPool getEasyMockTaskThreadPool()
|
Method name: SessionManager getEasyMockSessionManager()
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | TaskThreadPool result = createMock(TaskThreadPool.class);↵ | 1 | SessionManager result = createMock(SessionManager.class);↵ | |
2 | result.addTask(isA(Runnable.class));↵ | 2 | result.addAllowedSchemaChecker(isA(IAllowedSchemaChecker.class));↵ | |
3 | expectLastCall().anyTimes();↵ | 3 | expectLastCall().anyTimes();↵ | |
4 | replay(result);↵ | 4 | replay(result);↵ | |
5 | return result; | 5 |
| |
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.0 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 25 |
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) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | SessionManager result = createMock(SessionManager.class); | |||||||||||||||||||||||||||
1 | TaskThreadPool result = createMock(TaskThreadPool.class); | | |||||||||||||||||||||||||||
2 | result.addTask(isA(Runnable.class)); |
| 2 | result.addAllowedSchemaChecker(isA(IAllowedSchemaChecker.class)); | |||||||||||||||||||||||||
3 | expectLastCall().anyTimes(); | 3 | expectLastCall().anyTimes(); | ||||||||||||||||||||||||||
4 | replay(result); |
| 4 | replay(result); | |||||||||||||||||||||||||
|
| 5 | return result; | ||||||||||||||||||||||||||
5 | return result; | |
Row | Violation |
---|---|
1 | Type java.lang.Runnable of variable isA(Runnable.class) does not match with type net.sourceforge.squirrel_sql.client.session.IAllowedSchemaChecker of variable isA(IAllowedSchemaChecker.class) |
2 | Expression result.addTask(isA(Runnable.class)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression result.addAllowedSchemaChecker(isA(IAllowedSchemaChecker.class)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression result.addTask(isA(Runnable.class)) is a void method call, and thus it cannot be parameterized |
5 | Expression result.addAllowedSchemaChecker(isA(IAllowedSchemaChecker.class)) is a void method call, and thus it cannot be parameterized |
6 | Type net.sourceforge.squirrel_sql.fw.util.TaskThreadPool of variable result does not match with type net.sourceforge.squirrel_sql.client.session.SessionManager of variable result |
7 | Type net.sourceforge.squirrel_sql.fw.util.TaskThreadPool of variable result does not match with type net.sourceforge.squirrel_sql.client.session.SessionManager of variable result |
8 | Unmatched return result; |