CloneSet909


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
28201.000class_body_declarations[3]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
130112
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/chart/encoders/SunJPEGEncoderAdapter.java
22882
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/chart/encoders/SunPNGEncoderAdapter.java
Next
Last
Clone Instance
1
Line Count
30
Source Line
112
Source File
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/chart/encoders/SunJPEGEncoderAdapter.java

/**
 * Returns <code>false</code> always, indicating that this encoder does not
 * encode alpha transparency.
 *
 * @return <code>false</code>.
 */
public boolean isEncodingAlpha() {
  return false;
}

/**
 * Set whether the encoder should encode alpha transparency (this is not 
 * supported for JPEG, so this method does nothing).
 *
 * @param encodingAlpha  ignored.
 */
public void setEncodingAlpha(boolean encodingAlpha) {
//  No op
}

/**
 * Encodes an image in JPEG format.
 *
 * @param bufferedImage  the image to be encoded (<code>null</code> not 
 *     permitted).
 * 
 * @return The byte[] that is the encoded image.
 * 
 * @throws IOException if there is an I/O problem.
 * @throws NullPointerException if <code>bufferedImage</code> is 
 *     <code>null</code>.
 */
public byte[] encode(BufferedImage bufferedImage) throws IOException {
  ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
  encode(bufferedImage, outputStream);
  return outputStream.toByteArray();
}


First
Previous
Clone Instance
2
Line Count
28
Source Line
82
Source File
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/chart/encoders/SunPNGEncoderAdapter.java

/**
 * Get whether the encoder should encode alpha transparency (always false).
 *
 * @return Whether the encoder is encoding alpha transparency.
 */
public boolean isEncodingAlpha() {
  return false;
}

/**
 * Set whether the encoder should encode alpha transparency (not 
 * supported in this ImageEncoder).
 *
 * @param encodingAlpha  Whether the encoder should encode alpha 
 *                       transparency.
 */
public void setEncodingAlpha(boolean encodingAlpha) {
//  No op
}

/**
 * Encodes an image in PNG format.
 *
 * @param bufferedImage  The image to be encoded.
 * 
 * @return The byte[] that is the encoded image.
 * 
 * @throws IOException
 */
public byte[] encode(BufferedImage bufferedImage) throws IOException {
  ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
  encode(bufferedImage, outputStream);
  return outputStream.toByteArray();
}


Clone AbstractionParameter Count: 0Parameter Bindings

/**
     * Get whether the encoder should encode alpha transparency (always false).
     *
     * @return Whether the encoder is encoding alpha transparency.
     */
/**
     * Returns <code>false</code> always, indicating that this encoder does not
     * encode alpha transparency.
     *
     * @return <code>false</code>.
     */
public boolean isEncodingAlpha() {
  return false;
}

/**
     * Set whether the encoder should encode alpha transparency (not 
     * supported in this ImageEncoder).
     *
     * @param encodingAlpha  Whether the encoder should encode alpha 
     *                       transparency.
     */
/**
     * Set whether the encoder should encode alpha transparency (this is not 
     * supported for JPEG, so this method does nothing).
     *
     * @param encodingAlpha  ignored.
     */
public void setEncodingAlpha(boolean encodingAlpha) {
//  No op
}

/**
     * Encodes an image in PNG format.
     *
     * @param bufferedImage  The image to be encoded.
     * 
     * @return The byte[] that is the encoded image.
     * 
     * @throws IOException
     */
/**
     * Encodes an image in JPEG format.
     *
     * @param bufferedImage  the image to be encoded (<code>null</code> not 
     *     permitted).
     * 
     * @return The byte[] that is the encoded image.
     * 
     * @throws IOException if there is an I/O problem.
     * @throws NullPointerException if <code>bufferedImage</code> is 
     *     <code>null</code>.
     */
public byte[] encode(BufferedImage bufferedImage) throws IOException {
  ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
  encode(bufferedImage, outputStream);
  return outputStream.toByteArray();
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None