CloneSet107


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
23210.992method_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
12378
E:/TSE/Projects-CloneDR/columba-1.4-src/mail/src/test/java/org/columba/mail/gui/composer/command/ForwardCommandTest.java
22678
E:/TSE/Projects-CloneDR/columba-1.4-src/mail/src/test/java/org/columba/mail/gui/composer/command/ForwardInlineCommandTest.java
Next
Last
Clone Instance
1
Line Count
23
Source Line
78
Source File
E:/TSE/Projects-CloneDR/columba-1.4-src/mail/src/test/java/org/columba/mail/gui/composer/command/ForwardCommandTest.java

public void testForewardWithAttachment() throws Exception {
  String input = FolderTstHelper.getString("0_attachment.eml");
  System.out.println("input=" + input);
  // create stream from string
  InputStream inputStream = FolderTstHelper.getByteArrayInputStream(input);
  // add stream to folder
  Object uid = getSourceFolder().addMessage(inputStream);
  //               create Command reference
  MailFolderCommandReference ref = new MailFolderCommandReference(getSourceFolder(), new Object[] {
                                                                                                    uid
                                                                                                  } );
  // create copy command
  ForwardCommand command = new ForwardCommand(ref);
  //  execute command -> use mock object class as worker which does
  // nothing
  command.execute(NullWorkerStatusController.getInstance());
  // model should contain the data
  ComposerModel model = command.getModel();
  List attachments = model.getAttachments();
  assertEquals("There should be one attachment", 1, attachments.size());
  Object mimePart = attachments.get(0);
  assertEquals("Should be type of StreamableMimePart", true, (mimePart instanceof InputStreamMimePart));
}


First
Previous
Clone Instance
2
Line Count
26
Source Line
78
Source File
E:/TSE/Projects-CloneDR/columba-1.4-src/mail/src/test/java/org/columba/mail/gui/composer/command/ForwardInlineCommandTest.java

public void testForewardWithAttachment() throws Exception {
  String input = FolderTstHelper.getString("0_attachment.eml");
  System.out.println("input=" + input);
  // create stream from string
  InputStream inputStream = FolderTstHelper.getByteArrayInputStream(input);
  // add stream to folder
  Object uid = getSourceFolder().addMessage(inputStream);
  //      create Command reference
  MailFolderCommandReference ref = new MailFolderCommandReference(getSourceFolder(), new Object[] {
                                                                                                    uid
                                                                                                  } );
  // create copy command
  ForwardInlineCommand command = new ForwardInlineCommand(ref);
  //  execute command -> use mock object class as worker which does
  // nothing 
  command.execute(NullWorkerStatusController.getInstance());
  // model should contain the data
  ComposerModel model = command.getModel();
  List attachments = model.getAttachments();
  assertEquals("There should be one attachment", 1, attachments.size());
  Object mimePart = attachments.get(0);
  assertEquals("Should be type of StreamableMimePart", true, (mimePart instanceof InputStreamMimePart));
}


Clone AbstractionParameter Count: 1Parameter Bindings

public void testForewardWithAttachment() throws Exception {
  String input = FolderTstHelper.getString("0_attachment.eml");
  System.out.println("input=" + input);
  // create stream from string
  InputStream inputStream = FolderTstHelper.getByteArrayInputStream(input);
  // add stream to folder
  Object uid = getSourceFolder().addMessage(inputStream);
  //               create Command reference
  //      create Command reference
  MailFolderCommandReference ref = new MailFolderCommandReference(getSourceFolder(), new Object[] {
                                                                                                    uid
                                                                                                  } );
   [[#variablef3ab5a0]] command = new [[#variablef3ab5a0]](ref);
  //  execute command -> use mock object class as worker which does
  // nothing
  // nothing 
  command.execute(NullWorkerStatusController.getInstance());
  // model should contain the data
  ComposerModel model = command.getModel();
  List attachments = model.getAttachments();
  assertEquals("There should be one attachment", 1, attachments.size());
  Object mimePart = attachments.get(0);
  assertEquals("Should be type of StreamableMimePart", true, (mimePart instanceof InputStreamMimePart));
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#f3ab5a0]]
// create copy command
ForwardCommand 
12[[#f3ab5a0]]
// create copy command
ForwardInlineCommand