File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/mail/MailMessageTest.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/email/PlainMailer.java | |||
Method name: void run()
|
Method name: void send()
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | e = replyToList.elements();↵ | 1 | e = replyToList.elements();↵ | |
2 | while (e.hasMoreElements()) {↵ | 2 | while (e.hasMoreElements()) {↵ | |
3 | msg.replyto(e.nextElement().toString());↵ | 3 | mailMessage.replyto(e.nextElement().toString());↵ | |
4 | }↵ | 4 | ↵ | |
5 | ↵ | 5 | }↵ | |
6 | e = toList.elements();↵ | 6 | e = toList.elements();↵ | |
7 | while (e.hasMoreElements()) {↵ | 7 | while (e.hasMoreElements()) {↵ | |
8 | msg.to(e.nextElement().toString());↵ | 8 | mailMessage.to(e.nextElement().toString());↵ | |
9 | }↵ | 9 | }↵ | |
10 | e = ccList.elements();↵ | 10 | e = ccList.elements();↵ | |
11 | while (e.hasMoreElements()) {↵ | 11 | while (e.hasMoreElements()) {↵ | |
12 | msg.cc(e.nextElement().toString());↵ | 12 | mailMessage.cc(e.nextElement().toString());↵ | |
13 | } | 13 |
| |
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.4 |
Clones location | Clones are in different classes |
Number of node comparisons | 37 |
Number of mapped statements | 9 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 102.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
13 | e = replyToList.elements(); | 5 | e = replyToList.elements(); | |||||||||||
14 | while (e.hasMoreElements()) | 6 | while (e.hasMoreElements()) | |||||||||||
15 | msg.replyto(e.nextElement().toString()); |
| 7 | mailMessage.replyto(e.nextElement().toString()); | ||||||||||
16 | e = toList.elements(); | 8 | e = toList.elements(); | |||||||||||
17 | while (e.hasMoreElements()) | 9 | while (e.hasMoreElements()) | |||||||||||
18 | msg.to(e.nextElement().toString()); |
| 10 | mailMessage.to(e.nextElement().toString()); | ||||||||||
19 | e = ccList.elements(); | 11 | e = ccList.elements(); | |||||||||||
20 | while (e.hasMoreElements()) | 12 | while (e.hasMoreElements()) | |||||||||||
21 | msg.cc(e.nextElement().toString()); |
| 13 | mailMessage.cc(e.nextElement().toString()); |
Row | Violation |
---|---|
1 | The refactoring of the clones is infeasible, because classes org.apache.tools.mail.MailMessageTest.ClientThread and org.apache.tools.ant.taskdefs.email.PlainMailer do not have a common superclass |