CloneSet195


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
32201.000method_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
132419
E:/TSE/Projects-CloneDR/columba-1.4-src/mail/src/main/java/org/columba/mail/folder/command/PrintMessageCommand.java
232363
E:/TSE/Projects-CloneDR/columba-1.4-src/mail/src/main/java/org/columba/mail/folder/command/SaveMessageBodyAsCommand.java
Next
Last
Clone Instance
1
Line Count
32
Source Line
419
Source File
E:/TSE/Projects-CloneDR/columba-1.4-src/mail/src/main/java/org/columba/mail/folder/command/PrintMessageCommand.java

/**
 * Private utility to decode the message body with the proper charset
 *
 * @param bodyPart
 *            The body of the message
 * @return Decoded message body
 * @author Karl Peder Olesen (karlpeder), 20030601
 */
private String getDecodedMessageBody() throws IOException {
  int encoding = bodyHeader.getContentTransferEncoding();
  switch (encoding) {
    case MimeHeader.QUOTED_PRINTABLE:
      {
        bodyStream = new QuotedPrintableDecoderInputStream(bodyStream);
        break;
      }
    case MimeHeader.BASE64:
      {
        bodyStream = new Base64DecoderInputStream(bodyStream);
        break;
      }
  }
  // First determine which charset to use
  if (charset == null) {
    try {
      // get charset from message
      charset = Charset.forName(bodyHeader.getContentParameter("charset"));
    }
    catch (Exception
           ex) {
      // decode using default charset
      charset = Charset.forName(System.getProperty("file.encoding"));
    }
  }
  bodyStream = new CharsetDecoderInputStream(bodyStream, charset);
  return StreamUtils.readCharacterStream(bodyStream).toString();
}


First
Previous
Clone Instance
2
Line Count
32
Source Line
363
Source File
E:/TSE/Projects-CloneDR/columba-1.4-src/mail/src/main/java/org/columba/mail/folder/command/SaveMessageBodyAsCommand.java

/**
 * Private utility to decode the message body with the proper charset
 *
 * @param bodyPart
 *            The body of the message
 * @return Decoded message body
 * @author Karl Peder Olesen (karlpeder), 20030601
 */
private String getDecodedMessageBody() throws IOException {
  int encoding = bodyHeader.getContentTransferEncoding();
  switch (encoding) {
    case MimeHeader.QUOTED_PRINTABLE:
      {
        bodyStream = new QuotedPrintableDecoderInputStream(bodyStream);
        break;
      }
    case MimeHeader.BASE64:
      {
        bodyStream = new Base64DecoderInputStream(bodyStream);
        break;
      }
  }
  // First determine which charset to use
  if (charset == null) {
    try {
      // get charset from message
      charset = Charset.forName(bodyHeader.getContentParameter("charset"));
    }
    catch (Exception
           ex) {
      // decode using default charset
      charset = Charset.forName(System.getProperty("file.encoding"));
    }
  }
  bodyStream = new CharsetDecoderInputStream(bodyStream, charset);
  return StreamUtils.readCharacterStream(bodyStream).toString();
}


Clone AbstractionParameter Count: 0Parameter Bindings

/**
     * Private utility to decode the message body with the proper charset
     *
     * @param bodyPart
     *            The body of the message
     * @return Decoded message body
     * @author Karl Peder Olesen (karlpeder), 20030601
     */
private String getDecodedMessageBody() throws IOException {
  int encoding = bodyHeader.getContentTransferEncoding();
  switch (encoding) {
    case MimeHeader.QUOTED_PRINTABLE:
      {
        bodyStream = new QuotedPrintableDecoderInputStream(bodyStream);
        break;
      }
    case MimeHeader.BASE64:
      {
        bodyStream = new Base64DecoderInputStream(bodyStream);
        break;
      }
  }
  // First determine which charset to use
  if (charset == null) {
    try {
      // get charset from message
      charset = Charset.forName(bodyHeader.getContentParameter("charset"));
    }
    catch (Exception
           ex) {
      // decode using default charset
      charset = Charset.forName(System.getProperty("file.encoding"));
    }
  }
  bodyStream = new CharsetDecoderInputStream(bodyStream, charset);
  return StreamUtils.readCharacterStream(bodyStream).toString();
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None