File path: /columba-1.4-src/contact/src/test/java/org/columba/addressbook/folder/RemoveContactTest.java | File path: /columba-1.4-src/core/src/test/java/org/columba/core/xml/XmlElementTest.java | |||
Method name: void testRemoveObject()
|
Method name: void testHashcode()
|
|||
Number of AST nodes: 6 | Number of AST nodes: 7 | |||
1 | ContactModel c = new ContactModel();↵ | |||
2 | c.addEmail(new EmailModel("test@test.de", EmailModel.TYPE_HOME));↵ | |||
3 | c↵ | 1 | XmlElement xml1 = new XmlElement();↵ | |
2 | XmlElement xml2 = new XmlElement();↵ | |||
3 | xml1.setName("ONE");↵ | |||
4 | .setNickName("nickname");↵ | 4 | xml2.setName("↵ | |
5 | String uid = getSourceFolder().add(c);↵ | |||
6 | ↵ | |||
7 | getSourceFolder().remove(uid);↵ | |||
8 | assertEquals("folder contact count == 0", 0, getSourceFol↵ | 5 | ONE");↵ | |
6 | xml1.addElement(new XmlElement("child1"));↵ | |||
7 | xml2.addElement(new XmlElement("child1"));↵ | |||
9 | der().count↵ | 8 | assertEquals("The hashcode are not equal", xml2.hashCode(),↵ | |
10 | ()); | 9 | xml1.hashCode()); | |
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 | 39 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 4 |
Number of unmapped statements in the second code fragment | 5 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | XmlElement xml1 = new XmlElement(); | ||||||||||||||||||||||||
1 | ContactModel c = new ContactModel(); | | ||||||||||||||||||||||||
| 2 | XmlElement xml2 = new XmlElement(); | ||||||||||||||||||||||||
| 3 | xml1.setName("ONE"); | ||||||||||||||||||||||||
| 5 | xml1.addElement(new XmlElement("child1")); | ||||||||||||||||||||||||
| 6 | xml2.addElement(new XmlElement("child1")); | ||||||||||||||||||||||||
2 | c.addEmail(new EmailModel("test@test.de", EmailModel.TYPE_HOME)); |
| 7 | assertEquals("The hashcode are not equal", xml2.hashCode(), xml1.hashCode()); | ||||||||||||||||||||||
3 | c.setNickName("nickname"); | | ||||||||||||||||||||||||
4 | String uid = getSourceFolder().add(c); | | ||||||||||||||||||||||||
5 | getSourceFolder().remove(uid); | | ||||||||||||||||||||||||
6 | assertEquals("folder contact count == 0", 0, getSourceFolder().count()); |
| 4 | xml2.setName("ONE"); |
Row | Violation |
---|---|
1 | Expression assertEquals("The hashcode are not equal",xml2.hashCode(),xml1.hashCode()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression c.addEmail(new EmailModel("test@test.de",EmailModel.TYPE_HOME)) is a void method call, and thus it cannot be parameterized |
3 | Expression assertEquals("The hashcode are not equal",xml2.hashCode(),xml1.hashCode()) is a void method call, and thus it cannot be parameterized |
4 | Expression assertEquals("The hashcode are not equal",xml2.hashCode(),xml1.hashCode()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression c.addEmail(new EmailModel("test@test.de",EmailModel.TYPE_HOME)) is a void method call, and thus it cannot be parameterized |
6 | Expression assertEquals("The hashcode are not equal",xml2.hashCode(),xml1.hashCode()) is a void method call, and thus it cannot be parameterized |
7 | Expression assertEquals("folder contact count == 0",0,getSourceFolder().count()) is a void method call, and thus it cannot be parameterized |
8 | Expression xml2.setName("ONE") is a void method call, and thus it cannot be parameterized |
9 | Expression assertEquals("folder contact count == 0",0,getSourceFolder().count()) is a void method call, and thus it cannot be parameterized |
10 | Expression xml2.setName("ONE") is a void method call, and thus it cannot be parameterized |