File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/condition/ContainsTest.java | File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/condition/EqualsTest.java | |||
Method name: void testCaseSensitive()
|
Method name: void testCaseSensitive()
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | Contains con = new Contains();↵ | 1 | Equals eq = new Equals();↵ | |
2 | con.setString("abc");↵ | 2 | eq.setArg1("a");↵ | |
3 | con.setSubstring("A");↵ | 3 | eq.setArg2("A");↵ | |
4 | assertTrue(!con.eval());↵ | 4 | assertTrue(!eq.eval());↵ | |
5 | con.setCasesensitive(false);↵ | 5 | eq.setCasesensitive(false);↵ | |
6 | assertTrue(con.eval()); | 6 | assertTrue(eq.eval()); | |
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 in different classes having the same super class |
Number of node comparisons | 34 |
Number of mapped statements | 3 |
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 | Equals eq = new Equals(); | ||||||||||||||||
1 | Contains con = new Contains(); | | ||||||||||||||||
| 2 | eq.setArg1("a"); | ||||||||||||||||
2 | con.setString("abc"); | | ||||||||||||||||
| 3 | eq.setArg2("A"); | ||||||||||||||||
3 | con.setSubstring("A"); | | ||||||||||||||||
4 | assertTrue(!con.eval()); |
| 4 | assertTrue(!eq.eval()); | ||||||||||||||
5 | con.setCasesensitive(false); |
| 5 | eq.setCasesensitive(false); | ||||||||||||||
6 | assertTrue(con.eval()); |
| 6 | assertTrue(eq.eval()); |
Row | Violation |
---|---|
1 | Type org.apache.tools.ant.taskdefs.condition.Contains of variable con does not match with type org.apache.tools.ant.taskdefs.condition.Equals of variable eq |
2 | Type org.apache.tools.ant.taskdefs.condition.Contains of variable con does not match with type org.apache.tools.ant.taskdefs.condition.Equals of variable eq |
3 | Type org.apache.tools.ant.taskdefs.condition.Contains of variable con does not match with type org.apache.tools.ant.taskdefs.condition.Equals of variable eq |