Program: 103704
Project: 103704
Buggy source:
/** 
 * Set the <tt>Format</tt> of the media data made available by this <tt>PushBufferStream</tt> to   {@link #captureOutput}.
 * @param format the <tt>Format</tt> of the media data made available bythis <tt>PushBufferStream</tt> to be set to  {@link #captureOutput}
 */
private void setCaptureOutputFormat(Format format){
  VideoFormat videoFormat=(VideoFormat)format;
  Dimension size=videoFormat.getSize();
  if (size == null)   size=new Dimension(DataSource.DEFAULT_WIDTH,DataSource.DEFAULT_HEIGHT);
  NSMutableDictionary pixelBufferAttributes=null;
  if (size != null) {
    if (pixelBufferAttributes == null)     pixelBufferAttributes=new NSMutableDictionary();
    pixelBufferAttributes.setIntForKey(size.width,CVPixelBufferAttributeKey.kCVPixelBufferWidthKey);
    pixelBufferAttributes.setIntForKey(size.height,CVPixelBufferAttributeKey.kCVPixelBufferHeightKey);
  }
  if (format.isSameEncoding(VideoFormat.RGB)) {
    if (pixelBufferAttributes == null)     pixelBufferAttributes=new NSMutableDictionary();
    pixelBufferAttributes.setIntForKey(CVPixelFormatType.kCVPixelFormatType_32ARGB,CVPixelBufferAttributeKey.kCVPixelBufferPixelFormatTypeKey);
  }
 else   if (format.isSameEncoding(VideoFormat.YUV)) {
    if (pixelBufferAttributes == null)     pixelBufferAttributes=new NSMutableDictionary();
    pixelBufferAttributes.setIntForKey(CVPixelFormatType.kCVPixelFormatType_420YpCbCr8Planar,CVPixelBufferAttributeKey.kCVPixelBufferPixelFormatTypeKey);
  }
 else   throw new IllegalArgumentException("String_Node_Str");
  if (pixelBufferAttributes != null)   captureOutput.setPixelBufferAttributes(pixelBufferAttributes);
}

Fixed version (ground truth):
/** 
 * Set the <tt>Format</tt> of the media data made available by this <tt>PushBufferStream</tt> to   {@link #captureOutput}.
 * @param format the <tt>Format</tt> of the media data made available bythis <tt>PushBufferStream</tt> to be set to  {@link #captureOutput}
 */
private void setCaptureOutputFormat(Format format){
  VideoFormat videoFormat=(VideoFormat)format;
  Dimension size=videoFormat.getSize();
  int width;
  int height;
  if (size == null) {
    width=DataSource.DEFAULT_WIDTH;
    height=DataSource.DEFAULT_HEIGHT;
  }
 else {
    width=size.width;
    height=size.height;
  }
  NSMutableDictionary pixelBufferAttributes=null;
  if ((width > 0) && (height > 0)) {
    if (pixelBufferAttributes == null)     pixelBufferAttributes=new NSMutableDictionary();
    pixelBufferAttributes.setIntForKey(width,CVPixelBufferAttributeKey.kCVPixelBufferWidthKey);
    pixelBufferAttributes.setIntForKey(height,CVPixelBufferAttributeKey.kCVPixelBufferHeightKey);
  }
  if (format.isSameEncoding(VideoFormat.RGB)) {
    if (pixelBufferAttributes == null)     pixelBufferAttributes=new NSMutableDictionary();
    pixelBufferAttributes.setIntForKey(CVPixelFormatType.kCVPixelFormatType_32ARGB,CVPixelBufferAttributeKey.kCVPixelBufferPixelFormatTypeKey);
  }
 else   if (format.isSameEncoding(VideoFormat.YUV)) {
    if (pixelBufferAttributes == null)     pixelBufferAttributes=new NSMutableDictionary();
    pixelBufferAttributes.setIntForKey(CVPixelFormatType.kCVPixelFormatType_420YpCbCr8Planar,CVPixelBufferAttributeKey.kCVPixelBufferPixelFormatTypeKey);
  }
 else   throw new IllegalArgumentException("String_Node_Str");
  if (pixelBufferAttributes != null)   captureOutput.setPixelBufferAttributes(pixelBufferAttributes);
}