CloneSet121


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
23210.996method_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
123183
E:/TSE/Projects-CloneDR/columba-1.4-src/mail/src/main/java/org/columba/mail/gui/composer/AttachmentController.java
223320
E:/TSE/Projects-CloneDR/columba-1.4-src/mail/src/main/java/org/columba/mail/gui/composer/ComposerModel.java
Next
Last
Clone Instance
1
Line Count
23
Source Line
183
Source File
E:/TSE/Projects-CloneDR/columba-1.4-src/mail/src/main/java/org/columba/mail/gui/composer/AttachmentController.java

/**
 * Attaches a file to the email as an attachment. This method accepts only
 * files and not directories.
 * 
 * @param file
 *            the file to attach to the email.
 */
public void addFileAttachment(File file) {
  if (file.isFile()) {
    String mimetype = ColumbaDesktop.getInstance().getMimeType(file);
    MimeHeader header = new MimeHeader(mimetype.substring(0, mimetype.indexOf('/')), mimetype.substring(mimetype.indexOf('/') + 1));
    header.putContentParameter("name", file.getName());
    header.setContentDisposition("attachment");
    header.putDispositionParameter("filename", file.getName());
    header.setContentTransferEncoding("base64");
    try {
      LocalMimePart mimePart = new LocalMimePart(header, new FileSource(file));
      view.add(mimePart);
    }
    catch (IOException
           e) {
      LOG.warning("Could not add the file \'" + file + "\' to the attachment list, due to:" + e);
    }
  }
}


First
Previous
Clone Instance
2
Line Count
23
Source Line
320
Source File
E:/TSE/Projects-CloneDR/columba-1.4-src/mail/src/main/java/org/columba/mail/gui/composer/ComposerModel.java

public void addFileAttachment(File file) {
  if (file.isFile()) {
    String mimetype = ColumbaDesktop.getInstance().getMimeType(file);
    MimeHeader header = new MimeHeader(mimetype.substring(0, mimetype.indexOf('/')), mimetype.substring(mimetype.indexOf('/') + 1));
    header.putContentParameter("name", file.getName());
    header.setContentDisposition("attachment");
    header.putDispositionParameter("filename", file.getName());
    header.setContentTransferEncoding("base64");
    try {
      LocalMimePart mimePart = new LocalMimePart(header, new FileSource(file));
      attachments.add(mimePart);
    }
    catch (IOException
           e) {
      LOG.warning("Could not add the file \'" + file + "\' to the attachment list, due to:" + e);
    }
  }
}


Clone AbstractionParameter Count: 1Parameter Bindings

/**
         * Attaches a file to the email as an attachment. This method accepts only
         * files and not directories.
         * 
         * @param file
         *            the file to attach to the email.
         */
public void addFileAttachment(File file) {
  if (file.isFile()) {
    String mimetype = ColumbaDesktop.getInstance().getMimeType(file);
    MimeHeader header = new MimeHeader(mimetype.substring(0, mimetype.indexOf('/')), mimetype.substring(mimetype.indexOf('/') + 1));
    header.putContentParameter("name", file.getName());
    header.setContentDisposition("attachment");
    header.putDispositionParameter("filename", file.getName());
    header.setContentTransferEncoding("base64");
    try {
      LocalMimePart mimePart = new LocalMimePart(header, new FileSource(file));
       [[#variablef377340]].add(mimePart);
    }
    catch (IOException
           e) {
      LOG.warning("Could not add the file \'" + file + "\' to the attachment list, due to:" + e);
    }
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#f377340]]
view 
12[[#f377340]]
attachments