Program: 103800
Project: 103800
Buggy source:
@Override public synchronized void open() throws ResourceUnavailableException {
  int width=0;
  int height=0;
  if (opened)   return;
  if (inputFormat == null)   throw new ResourceUnavailableException("String_Node_Str");
  if (outputFormat == null)   throw new ResourceUnavailableException("String_Node_Str");
  width=(int)((VideoFormat)outputFormat).getSize().getWidth();
  height=(int)((VideoFormat)outputFormat).getSize().getHeight();
  long avcodec=FFMPEG.avcodec_find_encoder(FFMPEG.CODEC_ID_H264);
  avcontext=FFMPEG.avcodec_alloc_context();
  FFMPEG.avcodeccontext_set_pix_fmt(avcontext,FFMPEG.PIX_FMT_YUV420P);
  FFMPEG.avcodeccontext_set_size(avcontext,width,height);
  FFMPEG.avcodeccontext_set_qcompress(avcontext,0.6f);
  int _bitRate=256000;
  FFMPEG.avcodeccontext_set_bit_rate(avcontext,_bitRate);
  FFMPEG.avcodeccontext_set_bit_rate_tolerance(avcontext,_bitRate);
  FFMPEG.avcodeccontext_set_rc_max_rate(avcontext,_bitRate);
  FFMPEG.avcodeccontext_set_sample_aspect_ratio(avcontext,0,0);
  FFMPEG.avcodeccontext_set_thread_count(avcontext,0);
  FFMPEG.avcodeccontext_set_time_base(avcontext,1000,25500);
  FFMPEG.avcodeccontext_set_quantizer(avcontext,10,51,4);
  FFMPEG.avcodeccontext_add_partitions(avcontext,0x111);
  FFMPEG.avcodeccontext_set_mb_decision(avcontext,FFMPEG.FF_MB_DECISION_SIMPLE);
  FFMPEG.avcodeccontext_set_rc_eq(avcontext,"String_Node_Str");
  FFMPEG.avcodeccontext_add_flags(avcontext,FFMPEG.CODEC_FLAG_LOOP_FILTER);
  FFMPEG.avcodeccontext_set_me_method(avcontext,1);
  FFMPEG.avcodeccontext_set_me_subpel_quality(avcontext,6);
  FFMPEG.avcodeccontext_set_me_range(avcontext,16);
  FFMPEG.avcodeccontext_set_me_cmp(avcontext,FFMPEG.FF_CMP_CHROMA);
  FFMPEG.avcodeccontext_set_scenechange_threshold(avcontext,40);
  FFMPEG.avcodeccontext_set_crf(avcontext,0);
  FFMPEG.avcodeccontext_set_rc_buffer_size(avcontext,0);
  FFMPEG.avcodeccontext_set_gop_size(avcontext,IFRAME_INTERVAL);
  FFMPEG.avcodeccontext_set_i_quant_factor(avcontext,1f / 1.4f);
  if (FFMPEG.avcodec_open(avcontext,avcodec) < 0)   throw new RuntimeException("String_Node_Str");
  encFrameLen=(width * height * 3) / 2;
  rawFrameBuffer=FFMPEG.av_malloc(encFrameLen);
  avframe=FFMPEG.avcodec_alloc_frame();
  int size=width * height;
  FFMPEG.avframe_set_data(avframe,rawFrameBuffer,size,size / 4);
  FFMPEG.avframe_set_linesize(avframe,width,height / 2,width / 2);
  encFrameBuffer=new byte[encFrameLen];
  opened=true;
  super.open();
}

Fixed version (ground truth):
@Override public synchronized void open() throws ResourceUnavailableException {
  int width=0;
  int height=0;
  if (opened)   return;
  if (inputFormat == null)   throw new ResourceUnavailableException("String_Node_Str");
  if (outputFormat == null)   throw new ResourceUnavailableException("String_Node_Str");
  width=(int)((VideoFormat)outputFormat).getSize().getWidth();
  height=(int)((VideoFormat)outputFormat).getSize().getHeight();
  long avcodec=FFMPEG.avcodec_find_encoder(FFMPEG.CODEC_ID_H264);
  avcontext=FFMPEG.avcodec_alloc_context();
  FFMPEG.avcodeccontext_set_pix_fmt(avcontext,FFMPEG.PIX_FMT_YUV420P);
  FFMPEG.avcodeccontext_set_size(avcontext,width,height);
  FFMPEG.avcodeccontext_set_qcompress(avcontext,0.6f);
  int _bitRate=256000;
  FFMPEG.avcodeccontext_set_bit_rate(avcontext,_bitRate);
  FFMPEG.avcodeccontext_set_bit_rate_tolerance(avcontext,_bitRate);
  FFMPEG.avcodeccontext_set_rc_max_rate(avcontext,_bitRate);
  FFMPEG.avcodeccontext_set_sample_aspect_ratio(avcontext,0,0);
  FFMPEG.avcodeccontext_set_thread_count(avcontext,0);
  FFMPEG.avcodeccontext_set_time_base(avcontext,1000,25500);
  FFMPEG.avcodeccontext_set_quantizer(avcontext,10,51,4);
  FFMPEG.avcodeccontext_add_partitions(avcontext,0x111);
  FFMPEG.avcodeccontext_set_mb_decision(avcontext,FFMPEG.FF_MB_DECISION_SIMPLE);
  FFMPEG.avcodeccontext_set_rc_eq(avcontext,"String_Node_Str");
  FFMPEG.avcodeccontext_add_flags(avcontext,FFMPEG.CODEC_FLAG_LOOP_FILTER);
  FFMPEG.avcodeccontext_set_me_method(avcontext,1);
  FFMPEG.avcodeccontext_set_me_subpel_quality(avcontext,6);
  FFMPEG.avcodeccontext_set_me_range(avcontext,16);
  FFMPEG.avcodeccontext_set_me_cmp(avcontext,FFMPEG.FF_CMP_CHROMA);
  FFMPEG.avcodeccontext_set_scenechange_threshold(avcontext,40);
  FFMPEG.avcodeccontext_set_crf(avcontext,0);
  FFMPEG.avcodeccontext_set_rc_buffer_size(avcontext,0);
  FFMPEG.avcodeccontext_set_gop_size(avcontext,IFRAME_INTERVAL);
  FFMPEG.avcodeccontext_set_i_quant_factor(avcontext,1f / 1.4f);
  if (FFMPEG.avcodec_open(avcontext,avcodec) < 0)   throw new RuntimeException("String_Node_Str");
  encFrameLen=(width * height * 3) / 2;
  rawFrameBuffer=FFMPEG.av_malloc(encFrameLen);
  avframe=FFMPEG.avcodec_alloc_frame();
  int size=width * height;
  FFMPEG.avframe_set_data(avframe,rawFrameBuffer,size,size / 4);
  FFMPEG.avframe_set_linesize(avframe,width,width / 2,width / 2);
  encFrameBuffer=new byte[encFrameLen];
  opened=true;
  super.open();
}