nus-yam/ex-repair huggingface dataset:
Program: 13760
Project: 13760
Buggy source:
protected AlignerInstance(Mapper.Context context,String bin) throws IOException, URISyntaxException {
  AlignerInstance.context=context;
  header=null;
  containers=HalvadeConf.getMapContainerCount(context.getConfiguration());
  containerMinusTasksLeft=HalvadeConf.lessTasksLeftThanContainers(context.getConfiguration());
  redistribute=HalvadeConf.getRedistribute(context.getConfiguration());
  writableRecord=new SAMRecordWritable();
  writableRegion=new ChromosomeRegion();
  writeableCompactRegion=new GenomeSJ();
  stub=new Text();
  minChrLength=HalvadeConf.getMinChrLength(context.getConfiguration());
  chr=HalvadeConf.getChrList(context.getConfiguration());
  tmpdir=HalvadeConf.getScratchTempDir(context.getConfiguration());
  if (!tmpdir.endsWith("String_Node_Str"))   tmpdir=tmpdir + "String_Node_Str";
  File tmp=new File(tmpdir);
  tmp.mkdirs();
  this.bin=bin;
  threads=HalvadeConf.getMapThreads(context.getConfiguration());
  isPaired=HalvadeConf.getIsPaired(context.getConfiguration());
  Logger.DEBUG("String_Node_Str" + isPaired);
  splitter=new ChromosomeSplitter(HalvadeConf.getSequenceDictionary(context.getConfiguration()),minChrLength,chr);
  keepChrSplitPairs=HalvadeConf.getkeepChrSplitPairs(context.getConfiguration());
  keep=HalvadeConf.getKeepFiles(context.getConfiguration());
}

Fixed version (ground truth):
protected AlignerInstance(Mapper.Context context,String bin) throws IOException, URISyntaxException {
  AlignerInstance.context=context;
  header=null;
  containers=HalvadeConf.getMapContainerCount(context.getConfiguration());
  tasksLeft=HalvadeConf.getMapTasksLeft(context.getConfiguration());
  redistribute=HalvadeConf.getRedistribute(context.getConfiguration());
  writableRecord=new SAMRecordWritable();
  writableRegion=new ChromosomeRegion();
  writeableCompactRegion=new GenomeSJ();
  stub=new Text();
  minChrLength=HalvadeConf.getMinChrLength(context.getConfiguration());
  chr=HalvadeConf.getChrList(context.getConfiguration());
  tmpdir=HalvadeConf.getScratchTempDir(context.getConfiguration());
  if (!tmpdir.endsWith("String_Node_Str"))   tmpdir=tmpdir + "String_Node_Str";
  File tmp=new File(tmpdir);
  tmp.mkdirs();
  this.bin=bin;
  threads=HalvadeConf.getMapThreads(context.getConfiguration());
  isPaired=HalvadeConf.getIsPaired(context.getConfiguration());
  Logger.DEBUG("String_Node_Str" + isPaired);
  splitter=new ChromosomeSplitter(HalvadeConf.getSequenceDictionary(context.getConfiguration()),minChrLength,chr);
  keepChrSplitPairs=HalvadeConf.getkeepChrSplitPairs(context.getConfiguration());
  keep=HalvadeConf.getKeepFiles(context.getConfiguration());
}
Program: 13762
Project: 13762
Buggy source:
protected void getIdleCores(Mapper.Context context) throws IOException {
  if (containerMinusTasksLeft > 0)   threads=6;
}

Fixed version (ground truth):
protected void getIdleCores(Mapper.Context context) throws IOException {
  if (tasksLeft < containers)   threads=6;
}
Program: 13763
Project: 13763
Buggy source:
@Override protected void startAligner(Mapper.Context context) throws IOException, InterruptedException {
  if (redistribute && containerMinusTasksLeft > 0) {
    getIdleCores(context);
    Logger.DEBUG("String_Node_Str" + threads);
  }
  int threadsToUse=threads;
  if (isPaired && threadsToUse > 1)   threadsToUse/=2;
  String[] command1=CommandGenerator.bwaAln(bin,ref,"String_Node_Str",getFileName(tmpdir,taskId,true,1),threadsToUse,alnCustomArgs);
  reads1=new ProcessBuilderWrapper(command1,bin);
  reads1.setThreads(threadsToUse);
  reads1.startProcess(null,System.err);
  if (!reads1.isAlive())   throw new ProcessException("String_Node_Str",reads1.getExitState());
  File file1=new File(getFileName(tmpdir,taskId,false,1));
  if (!file1.exists()) {
    file1.createNewFile();
  }
  fastqFile1=new BufferedWriter(new FileWriter(file1.getAbsoluteFile()));
  if (isPaired) {
    if (threads > 1) {
      String[] command2=CommandGenerator.bwaAln(bin,ref,"String_Node_Str",getFileName(tmpdir,taskId,true,2),threadsToUse,alnCustomArgs);
      reads2=new ProcessBuilderWrapper(command2,bin);
      reads2.setThreads(threadsToUse);
      reads2.startProcess(null,System.err);
      if (!reads2.isAlive())       throw new ProcessException("String_Node_Str",reads2.getExitState());
    }
    File file2=new File(getFileName(tmpdir,taskId,false,2));
    if (!file2.exists()) {
      file2.createNewFile();
    }
    fastqFile2=new BufferedWriter(new FileWriter(file2.getAbsoluteFile()));
  }
}

Fixed version (ground truth):
@Override protected void startAligner(Mapper.Context context) throws IOException, InterruptedException {
  if (redistribute) {
    getIdleCores(context);
    Logger.DEBUG("String_Node_Str" + threads);
  }
  int threadsToUse=threads;
  if (isPaired && threadsToUse > 1)   threadsToUse/=2;
  String[] command1=CommandGenerator.bwaAln(bin,ref,"String_Node_Str",getFileName(tmpdir,taskId,true,1),threadsToUse,alnCustomArgs);
  reads1=new ProcessBuilderWrapper(command1,bin);
  reads1.setThreads(threadsToUse);
  reads1.startProcess(null,System.err);
  if (!reads1.isAlive())   throw new ProcessException("String_Node_Str",reads1.getExitState());
  File file1=new File(getFileName(tmpdir,taskId,false,1));
  if (!file1.exists()) {
    file1.createNewFile();
  }
  fastqFile1=new BufferedWriter(new FileWriter(file1.getAbsoluteFile()));
  if (isPaired) {
    if (threads > 1) {
      String[] command2=CommandGenerator.bwaAln(bin,ref,"String_Node_Str",getFileName(tmpdir,taskId,true,2),threadsToUse,alnCustomArgs);
      reads2=new ProcessBuilderWrapper(command2,bin);
      reads2.setThreads(threadsToUse);
      reads2.startProcess(null,System.err);
      if (!reads2.isAlive())       throw new ProcessException("String_Node_Str",reads2.getExitState());
    }
    File file2=new File(getFileName(tmpdir,taskId,false,2));
    if (!file2.exists()) {
      file2.createNewFile();
    }
    fastqFile2=new BufferedWriter(new FileWriter(file2.getAbsoluteFile()));
  }
}
Program: 13765
Project: 13765
Buggy source:
@Override protected void map(LongWritable key,SAMRecordWritable value,Context context) throws IOException, InterruptedException {
  SAMRecord sam=value.get();
  Logger.DEBUG(sam.getSAMString());
  instance.writePairedSAMRecordToContext(value.get(),false);
}

Fixed version (ground truth):
@Override protected void map(LongWritable key,SAMRecordWritable value,Context context) throws IOException, InterruptedException {
  SAMRecord sam=value.get();
  try {
    String s=sam.getSAMString();
  }
 catch (  StringIndexOutOfBoundsException e) {
    Logger.DEBUG("String_Node_Str");
    Logger.DEBUG(sam.getReadName() + "String_Node_Str" + sam.getReadString());
    throw e;
  }
  instance.writePairedSAMRecordToContext(value.get(),false);
}
Program: 13767
Project: 13767
Buggy source:
@Override protected void setup(Context context) throws IOException, InterruptedException {
  super.setup(context);
  isFirstAttempt=taskId.endsWith("String_Node_Str");
  isRNA=HalvadeConf.getIsRNA(context.getConfiguration());
  scc=HalvadeConf.getSCC(context.getConfiguration(),isRNA);
  sec=HalvadeConf.getSEC(context.getConfiguration(),isRNA);
  gff=HalvadeFileUtils.downloadGFF(context,taskId);
  exomeBedFile=HalvadeConf.getBed(context.getConfiguration());
  useBedTools=HalvadeConf.getUseBedTools(context.getConfiguration());
  useUnifiedGenotyper=HalvadeConf.getUseUnifiedGenotyper(context.getConfiguration());
  redistribute=HalvadeConf.getRedistribute(context.getConfiguration());
  containers=HalvadeConf.getMapContainerCount(context.getConfiguration());
  tasksLeft=Integer.parseInt(context.getConfiguration().get("String_Node_Str")) - taskNr;
  if (redistribute && tasksLeft < containers) {
    threads=6;
  }
}

Fixed version (ground truth):
@Override protected void setup(Context context) throws IOException, InterruptedException {
  super.setup(context);
  isFirstAttempt=taskId.endsWith("String_Node_Str");
  isRNA=HalvadeConf.getIsRNA(context.getConfiguration());
  scc=HalvadeConf.getSCC(context.getConfiguration(),isRNA);
  sec=HalvadeConf.getSEC(context.getConfiguration(),isRNA);
  try {
    gff=HalvadeFileUtils.downloadGFF(context,taskId);
  }
 catch (  URISyntaxException ex) {
    Logger.EXCEPTION(ex);
    throw new InterruptedException("String_Node_Str");
  }
  exomeBedFile=HalvadeConf.getBed(context.getConfiguration());
  useBedTools=HalvadeConf.getUseBedTools(context.getConfiguration());
  useUnifiedGenotyper=HalvadeConf.getUseUnifiedGenotyper(context.getConfiguration());
  redistribute=HalvadeConf.getRedistribute(context.getConfiguration());
  containers=HalvadeConf.getMapContainerCount(context.getConfiguration());
  tasksLeft=Integer.parseInt(context.getConfiguration().get("String_Node_Str")) - taskNr;
  if (redistribute && tasksLeft < containers) {
    threads=6;
  }
}
Program: 13768
Project: 13768
Buggy source:
protected String downloadGFF(TaskInputOutputContext context,String id){
}

Fixed version (ground truth):
public static String downloadGFF(TaskInputOutputContext context,String id) throws IOException, URISyntaxException {
  Configuration conf=context.getConfiguration();
  String refDir=HalvadeConf.getRefDirOnScratch(conf);
  if (!refDir.endsWith("String_Node_Str"))   refDir=refDir + "String_Node_Str";
  HalvadeFileLock lock=new HalvadeFileLock(context,refDir,GFF_LOCK);
  String gffFile=null;
  String gffSuffix=null;
  try {
    lock.getLock();
    ByteBuffer bytes=ByteBuffer.allocate(4);
    if (lock.read(bytes) > 0) {
      bytes.flip();
      long val=bytes.getInt();
      if (val == DEFAULT_LOCK_VAL)       Logger.DEBUG("String_Node_Str" + val);
 else {
        Logger.INFO("String_Node_Str");
        String gff=HalvadeConf.getGff(context.getConfiguration());
        FileSystem fs=FileSystem.get(new URI(gff),conf);
        int si=gff.lastIndexOf('.');
        if (si > 0)         gffSuffix=gff.substring(si);
 else         throw new InterruptedException("String_Node_Str" + gff);
        gffFile=findFile(refDir,gffSuffix,false);
        if (gffFile == null)         gffFile=refDir + id;
        attemptDownloadFileFromHDFS(context,fs,gff,gffFile + gffSuffix,RETRIES);
        Logger.INFO("String_Node_Str");
        bytes.clear();
        bytes.putInt(DEFAULT_LOCK_VAL).flip();
        lock.forceWrite(bytes);
      }
    }
 else {
      Logger.INFO("String_Node_Str");
      String gff=HalvadeConf.getGff(context.getConfiguration());
      FileSystem fs=FileSystem.get(new URI(gff),conf);
      int si=gff.lastIndexOf('.');
      if (si > 0)       gffSuffix=gff.substring(si);
 else       throw new InterruptedException("String_Node_Str" + gff);
      gffFile=findFile(refDir,gffSuffix,false);
      if (gffFile == null)       gffFile=refDir + id;
      attemptDownloadFileFromHDFS(context,fs,gff,gffFile + gffSuffix,RETRIES);
      Logger.INFO("String_Node_Str");
      bytes.clear();
      bytes.putInt(DEFAULT_LOCK_VAL).flip();
      lock.forceWrite(bytes);
    }
  }
 catch (  InterruptedException ex) {
    Logger.EXCEPTION(ex);
  }
 finally {
    lock.releaseLock();
  }
  if (gffFile == null)   gffFile=findFile(refDir,"String_Node_Str",false);
  return gffFile + "String_Node_Str";
}
Program: 13771
Project: 13771
Buggy source:
public void runFeatureCounts(String gff,String bam,String count) throws InterruptedException, IOException {
  long startTime=System.currentTimeMillis();
  String customArgs=HalvadeConf.getCustomArgs(context.getConfiguration(),"String_Node_Str","String_Node_Str");
  String[] command=CommandGenerator.featureCounts(bin,gff,bam,count,customArgs);
  long estimatedTime=runProcessAndWait("String_Node_Str",GetStringVector(command));
  if (context != null)   context.getCounter(HalvadeCounters.TIME_FEATURECOUNTS).increment(estimatedTime);
}

Fixed version (ground truth):
public void runFeatureCounts(String gff,String bam,String count,int threads) throws InterruptedException, IOException {
  String customArgs=HalvadeConf.getCustomArgs(context.getConfiguration(),"String_Node_Str","String_Node_Str");
  String[] command=CommandGenerator.featureCounts(bin,gff,bam,count,threads,customArgs);
  long estimatedTime=runProcessAndWait("String_Node_Str",command);
  if (context != null)   context.getCounter(HalvadeCounters.TIME_FEATURECOUNTS).increment(estimatedTime);
}
Program: 13772
Project: 13772
Buggy source:
private void getBestDistribution(Configuration conf){
  if (mapsPerContainer == -1)   mapsPerContainer=Math.min(Math.max(vcores / VCORES_MAP_TASK,1),Math.max(mem / MEM_MAP_TASK,1));
  if (reducersPerContainer == -1)   reducersPerContainer=Math.min(Math.max(vcores / VCORES_REDUCE_TASK,1),Math.max(mem / MEM_REDUCE_TASK,1));
  mappers=Math.max(1,nodes * mapsPerContainer);
  mthreads=Math.max(1,vcores / mapsPerContainer);
  GATKCPUThreads=Math.max(1,vcores / reducersPerContainer);
  GATKdataThreads=Math.max(1,vcores / reducersPerContainer);
  int mmem=Math.min(mem * 1024,mem * 1024 / mapsPerContainer);
  int rmem=Math.min(mem * 1024,((SWAP_EXTRA + mem) * 1024 / reducersPerContainer));
  be.ugent.intec.halvade.utils.Logger.DEBUG("String_Node_Str" + mapsPerContainer + "String_Node_Str"+ mthreads+ "String_Node_Str"+ mmem+ "String_Node_Str"+ reducersPerContainer+ "String_Node_Str"+ GATKCPUThreads+ "String_Node_Str"+ rmem+ "String_Node_Str");
  conf.set("String_Node_Str","String_Node_Str" + mthreads);
  conf.set("String_Node_Str","String_Node_Str" + mmem);
  conf.set("String_Node_Str","String_Node_Str" + GATKCPUThreads);
  conf.set("String_Node_Str","String_Node_Str" + rmem);
  conf.set("String_Node_Str","String_Node_Str" + 1.0);
  reducers=(int)(coverage * REDUCE_TASKS_FACTOR * nodes* reducersPerContainer);
}

Fixed version (ground truth):
private void getBestDistribution(Configuration conf){
  if (mapsPerContainer == -1)   mapsPerContainer=Math.min(Math.max(vcores / VCORES_MAP_TASK,1),Math.max(mem / MEM_MAP_TASK,1));
  if (reducersPerContainer == -1)   reducersPerContainer=Math.min(Math.max(vcores / VCORES_REDUCE_TASK,1),Math.max(mem / MEM_REDUCE_TASK,1));
  mappers=Math.max(1,nodes * mapsPerContainer);
  mthreads=Math.max(1,vcores / mapsPerContainer);
  GATKCPUThreads=Math.max(1,vcores / reducersPerContainer);
  GATKdataThreads=Math.max(1,vcores / reducersPerContainer);
  int mmem=Math.min(mem * 1024,mem * 1024 / mapsPerContainer);
  int rmem=Math.min(mem * 1024,((SWAP_EXTRA + mem) * 1024 / reducersPerContainer));
  be.ugent.intec.halvade.utils.Logger.DEBUG("String_Node_Str" + mapsPerContainer + "String_Node_Str"+ mthreads+ "String_Node_Str"+ mmem+ "String_Node_Str"+ reducersPerContainer+ "String_Node_Str"+ GATKCPUThreads+ "String_Node_Str"+ rmem+ "String_Node_Str");
  conf.set("String_Node_Str","String_Node_Str" + mthreads);
  conf.set("String_Node_Str","String_Node_Str" + mmem);
  conf.set("String_Node_Str","String_Node_Str" + GATKCPUThreads);
  conf.set("String_Node_Str","String_Node_Str" + rmem);
  conf.set("String_Node_Str","String_Node_Str" + 1.0);
  reducers=(int)(coverage * REDUCE_TASKS_FACTOR);
}
Program: 13777
Project: 13777
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_main);
  final SampleItem parent=new SampleItem("String_Node_Str",new SampleItem("String_Node_Str",new SampleItem("String_Node_Str",SampleItem.SampleItemType.DEVICE)),new SampleItem("String_Node_Str",new SampleItem("String_Node_Str",SampleItem.SampleItemType.STACK_LAYOUT),new SampleItem("String_Node_Str",SampleItem.SampleItemType.FLOW_LAYOUT),new SampleItem("String_Node_Str",SampleItem.SampleItemType.TAGS_VIEW),new SampleItem("String_Node_Str",SampleItem.SampleItemType.FLIPPER_VIEW),new SampleItem("String_Node_Str",SampleItem.SampleItemType.PROGRESS_VIEW),new SampleItem("String_Node_Str",SampleItem.SampleItemType.SCALE_VIEW)),new SampleItem("String_Node_Str",SampleItem.SampleItemType.CAMERA),new SampleItem("String_Node_Str",SampleItem.SampleItemType.DIALOG));
  if (getSupportFragmentManager().findFragmentByTag(TAG_LIST_FRAGMENT) == null) {
    final SampleListFragment fragment=SampleListFragment.newInstance(parent,false);
    getSupportFragmentManager().beginTransaction().replace(R.id.id_common_fragment,fragment,TAG_LIST_FRAGMENT).commit();
  }
  final View view=findViewById(R.id.id_common_fragment);
  view.postDelayed(new Runnable(){
    @Override public void run(){
      startActivityAsStack(createSampleIntent(SampleItem.SampleItemType.SCALE_VIEW));
    }
  }
,100);
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_main);
  final SampleItem parent=new SampleItem("String_Node_Str",new SampleItem("String_Node_Str",new SampleItem("String_Node_Str",SampleItem.SampleItemType.DEVICE)),new SampleItem("String_Node_Str",new SampleItem("String_Node_Str",SampleItem.SampleItemType.STACK_LAYOUT),new SampleItem("String_Node_Str",SampleItem.SampleItemType.FLOW_LAYOUT),new SampleItem("String_Node_Str",SampleItem.SampleItemType.TAGS_VIEW),new SampleItem("String_Node_Str",SampleItem.SampleItemType.FLIPPER_VIEW),new SampleItem("String_Node_Str",SampleItem.SampleItemType.PROGRESS_VIEW),new SampleItem("String_Node_Str",SampleItem.SampleItemType.SCALE_VIEW)),new SampleItem("String_Node_Str",SampleItem.SampleItemType.CAMERA),new SampleItem("String_Node_Str",SampleItem.SampleItemType.DIALOG));
  if (getSupportFragmentManager().findFragmentByTag(TAG_LIST_FRAGMENT) == null) {
    final SampleListFragment fragment=SampleListFragment.newInstance(parent,false);
    getSupportFragmentManager().beginTransaction().replace(R.id.id_common_fragment,fragment,TAG_LIST_FRAGMENT).commit();
  }
  final View view=findViewById(R.id.id_common_fragment);
  view.postDelayed(new Runnable(){
    @Override public void run(){
      startActivityAsStack(createSampleIntent(SampleItem.SampleItemType.FLOW_LAYOUT));
    }
  }
,100);
}
Program: 13778
Project: 13778
Buggy source:
@Override public void run(){
  startActivityAsStack(createSampleIntent(SampleItem.SampleItemType.SCALE_VIEW));
}

Fixed version (ground truth):
@Override public void run(){
  startActivityAsStack(createSampleIntent(SampleItem.SampleItemType.FLOW_LAYOUT));
}
Program: 13779
Project: 13779
Buggy source:
@Override public void onViewCreated(@NonNull View view,@Nullable Bundle savedInstanceState){
  super.onViewCreated(view,savedInstanceState);
  final LayoutInflater inflater=LayoutInflater.from(getContext());
  final String[] messages=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  final FlowLayout flowLayout1=view.findViewById(R.id.fragment_sample_flow_layout_flow1);
  for (  String s : messages) {
    final TextView tv=(TextView)inflater.inflate(R.layout.item_textview_rounded,flowLayout1,false);
    tv.setText(s);
    flowLayout1.addView(tv);
  }
}

Fixed version (ground truth):
@Override public void onViewCreated(@NonNull View view,@Nullable Bundle savedInstanceState){
  super.onViewCreated(view,savedInstanceState);
  final LayoutInflater inflater=LayoutInflater.from(getContext());
  final String[] messages=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  final FlowLayout flowLayout1=view.findViewById(R.id.fragment_sample_flow_layout_flow1);
  for (  String s : messages) {
    final TextView tv=(TextView)inflater.inflate(R.layout.item_textview_rounded,flowLayout1,false);
    tv.setText(s);
    flowLayout1.addView(tv);
  }
}
Program: 13780
Project: 13780
Buggy source:
public String relativeTimeShort(final Context context,final long currentTime,final long time){
  final long secondsDelta=time - currentTime;
  if (secondsDelta < 0) {
    return timeAgoShort(context,-secondsDelta);
  }
 else {
    return "String_Node_Str";
  }
}

Fixed version (ground truth):
public String relativeTimeShort(final Context context,final long currentTime,final long time){
  final long secondsDelta=time - currentTime;
  if (secondsDelta < 0) {
    return timeAgoShort(context,-secondsDelta);
  }
 else {
    return context.getResources().getString(R.string.time_ago_short_now);
  }
}
Program: 13781
Project: 13781
Buggy source:
private void showContent(){
  mContentView.animate().alpha(1.0f).setDuration(300).start();
}

Fixed version (ground truth):
private void showContent(){
  if (mContentView != null) {
    mContentView.animate().alpha(1.0f).setDuration(300).start();
  }
}
Program: 13782
Project: 13782
Buggy source:
public void destroy(final Activity activity,final boolean animated){
  if (animated) {
    mContentView.animate().alpha(0).setDuration(150).setListener(new AnimationEndListener(){
      @Override public void onAnimationEndOrCanceled(      Animator animation){
        animate().alpha(0).setDuration(300).setListener(new AnimationEndListener(){
          @Override public void onAnimationEndOrCanceled(          Animator animation){
            removeView(mContentView);
            mContentView=null;
            if (activity != null) {
              ((ViewGroup)activity.getWindow().getDecorView()).removeView(ActivityOverlayView.this);
            }
          }
        }
).start();
      }
    }
).start();
  }
 else {
    removeView(mContentView);
    mContentView=null;
    if (activity != null) {
      ((ViewGroup)activity.getWindow().getDecorView()).removeView(ActivityOverlayView.this);
    }
  }
}

Fixed version (ground truth):
public void destroy(final Activity activity,final boolean animated){
  if (mContentView == null) {
    return;
  }
  if (animated) {
    mContentView.animate().alpha(0).setDuration(150).setListener(new AnimationEndListener(){
      @Override public void onAnimationEndOrCanceled(      Animator animation){
        animate().alpha(0).setDuration(300).setListener(new AnimationEndListener(){
          @Override public void onAnimationEndOrCanceled(          Animator animation){
            removeView(mContentView);
            mContentView=null;
            if (activity != null) {
              ((ViewGroup)activity.getWindow().getDecorView()).removeView(ActivityOverlayView.this);
            }
          }
        }
).start();
      }
    }
).start();
  }
 else {
    removeView(mContentView);
    mContentView=null;
    if (activity != null) {
      ((ViewGroup)activity.getWindow().getDecorView()).removeView(ActivityOverlayView.this);
    }
  }
}
Program: 13783
Project: 13783
Buggy source:
@Override protected void onMeasure(int widthMeasureSpec,int heightMeasureSpec){
  final int width=MeasureSpec.getSize(widthMeasureSpec);
  setMeasuredDimension(width,width);
}

Fixed version (ground truth):
@Override protected void onMeasure(int widthMeasureSpec,int heightMeasureSpec){
  final int width=MeasureSpec.getSize(widthMeasureSpec);
  setMeasuredDimension(width,width);
  for (int i=0; i < getChildCount(); i++) {
    View v=getChildAt(i);
    v.measure(MeasureSpec.makeMeasureSpec(width,MeasureSpec.AT_MOST),MeasureSpec.makeMeasureSpec(width,MeasureSpec.AT_MOST));
  }
}
Program: 13784
Project: 13784
Buggy source:
public void setTimeFormat(final String timeFormat){
  final StringBuilder sb=new StringBuilder();
  boolean shouldIgnore=false;
  for (int i=0; i < timeFormat.length(); ) {
    if (shouldIgnore) {
      sb.append(timeFormat.charAt(i));
      i++;
    }
    if (timeFormat.charAt(i) == '\'') {
      shouldIgnore=!shouldIgnore;
      i++;
    }
 else     if (timeFormat.startsWith(DAY_PLACEHOLDER,i)) {
      sb.append("String_Node_Str");
      i+=2;
    }
 else     if (timeFormat.startsWith(HOUR_PLACEHOLDER,i)) {
      sb.append("String_Node_Str");
      i+=2;
    }
 else     if (timeFormat.startsWith(MINUTE_PLACEHOLDER,i)) {
      sb.append("String_Node_Str");
      i+=2;
    }
 else     if (timeFormat.startsWith(SECOND_PLACEHOLDER,i)) {
      sb.append("String_Node_Str");
      i+=2;
    }
 else {
      sb.append(timeFormat.charAt(i));
      i++;
    }
  }
  mTimeFormat=sb.toString();
}

Fixed version (ground truth):
public void setTimeFormat(final String timeFormat){
  final StringBuilder sb=new StringBuilder();
  boolean shouldIgnore=false;
  for (int i=0; i < timeFormat.length(); ) {
    if (timeFormat.charAt(i) == '\'') {
      shouldIgnore=!shouldIgnore;
      i++;
    }
 else     if (shouldIgnore) {
      sb.append(timeFormat.charAt(i));
      i++;
      continue;
    }
 else     if (timeFormat.startsWith(DAY_PLACEHOLDER,i)) {
      sb.append("String_Node_Str");
      i+=2;
    }
 else     if (timeFormat.startsWith(HOUR_PLACEHOLDER,i)) {
      sb.append("String_Node_Str");
      i+=2;
    }
 else     if (timeFormat.startsWith(MINUTE_PLACEHOLDER,i)) {
      sb.append("String_Node_Str");
      i+=2;
    }
 else     if (timeFormat.startsWith(SECOND_PLACEHOLDER,i)) {
      sb.append("String_Node_Str");
      i+=2;
    }
 else {
      sb.append(timeFormat.charAt(i));
      i++;
    }
  }
  mTimeFormat=sb.toString();
}
Program: 13785
Project: 13785
Buggy source:
@Override protected void onSizeChanged(int w,int h,int oldw,int oldh){
  super.onSizeChanged(w,h,oldw,oldh);
  System.out.println("String_Node_Str" + w + "String_Node_Str"+ h);
  final float length=Math.min(w,h);
  final float strokeWidth=length * mProgressRingStrokeRatio;
  mRadius=length / 2 - strokeWidth;
  final float textSize=mRadius / 2;
  mPaint.setStrokeWidth(strokeWidth);
  mProgressRect.left=length / 2 - mRadius - strokeWidth / 2;
  mProgressRect.top=length / 2 - mRadius - strokeWidth / 2;
  mProgressRect.right=length / 2 + mRadius + strokeWidth / 2;
  mProgressRect.bottom=length / 2 + mRadius + strokeWidth / 2;
  mTextPaint.setTextSize(textSize);
  invalidate();
}

Fixed version (ground truth):
@Override protected void onSizeChanged(int w,int h,int oldw,int oldh){
  super.onSizeChanged(w,h,oldw,oldh);
  System.out.println("String_Node_Str" + w + "String_Node_Str"+ h);
  final float length=Math.min(w,h);
  final float strokeWidth=length * mProgressRingStrokeRatio;
  mRadius=length / 2 - strokeWidth;
  final float textSize=mRadius / 2;
  mPaint.setStrokeWidth(strokeWidth);
  mProgressRect.left=w / 2 - mRadius - strokeWidth / 2;
  mProgressRect.top=h / 2 - mRadius - strokeWidth / 2;
  mProgressRect.right=w / 2 + mRadius + strokeWidth / 2;
  mProgressRect.bottom=h / 2 + mRadius + strokeWidth / 2;
  mTextPaint.setTextSize(textSize);
  invalidate();
}
Program: 13786
Project: 13786
Buggy source:
@Override protected void onDraw(final Canvas canvas){
  mPaint.setColor(Color.TRANSPARENT);
  canvas.drawRect(0,0,getMeasuredWidth(),getMeasuredHeight(),mPaint);
  mPaint.setStyle(Paint.Style.FILL);
  mPaint.setColor(mCircleBackgroundColor);
  canvas.drawCircle(getMeasuredWidth(),getMeasuredHeight(),mRadius,mPaint);
  mPaint.setStyle(Paint.Style.STROKE);
  mPaint.setColor(mProgressBaseColor);
  canvas.drawArc(mProgressRect,-90,360 * this.bottomRingProgress,false,mPaint);
  mPaint.setColor(mProgressColor);
  canvas.drawArc(mProgressRect,-90,360 * this.progress,false,mPaint);
  if (mShouldShowPercentage) {
    final String progressText=String.format("String_Node_Str",(int)(this.progress * 100));
    mTextPaint.getTextBounds(progressText,0,progressText.length(),mTextRect);
    canvas.drawText(progressText,getMeasuredWidth() / 2 - (mTextRect.right - mTextRect.left) / 2,getMeasuredHeight() / 2 + (mTextRect.bottom - mTextRect.top) / 2,mTextPaint);
  }
}

Fixed version (ground truth):
@Override protected void onDraw(final Canvas canvas){
  mPaint.setColor(Color.TRANSPARENT);
  canvas.drawRect(0,0,getMeasuredWidth(),getMeasuredHeight(),mPaint);
  mPaint.setStyle(Paint.Style.FILL);
  mPaint.setColor(mCircleBackgroundColor);
  canvas.drawCircle(getMeasuredWidth() / 2,getMeasuredHeight() / 2,mRadius,mPaint);
  mPaint.setStyle(Paint.Style.STROKE);
  mPaint.setColor(mProgressBaseColor);
  canvas.drawArc(mProgressRect,-90,360 * this.bottomRingProgress,false,mPaint);
  mPaint.setColor(mProgressColor);
  canvas.drawArc(mProgressRect,-90,360 * this.progress,false,mPaint);
  if (mShouldShowPercentage) {
    final String progressText=String.format("String_Node_Str",(int)(this.progress * 100));
    mTextPaint.getTextBounds(progressText,0,progressText.length(),mTextRect);
    canvas.drawText(progressText,getMeasuredWidth() / 2 - (mTextRect.right - mTextRect.left) / 2,getMeasuredHeight() / 2 + (mTextRect.bottom - mTextRect.top) / 2,mTextPaint);
  }
}
Program: 13787
Project: 13787
Buggy source:
@Override public int getCount(){
  return mTitlesRes.length;
}

Fixed version (ground truth):
@Override public int getCount(){
  return mDrawablesRes.length;
}
Program: 13788
Project: 13788
Buggy source:
private void calculateLayout(){
  final int childCount=getChildCount();
  float currentLineX=0;
  float currentLineY=0;
  float currentLineMaxHeight=0;
  ArrayList<View> currentLineChildren=new ArrayList<>();
  int i=0;
  while (i < childCount) {
    final View child=getChildAt(i);
    final float childWidth=child.getMeasuredWidth();
    final float childHeight=child.getMeasuredHeight();
    if (currentLineX + mHorizontalSpacing + childWidth < mMaximumWidth || currentLineChildren.size() == 0) {
      currentLineMaxHeight=Math.max(currentLineMaxHeight,childHeight);
      currentLineChildren.add(child);
      currentLineX+=childWidth + mHorizontalSpacing;
      i++;
    }
 else {
      assignLayoutForLine(currentLineChildren,currentLineY,currentLineMaxHeight);
      currentLineChildren.clear();
      currentLineY+=currentLineMaxHeight + mVerticalSpacing;
      currentLineMaxHeight=0;
      currentLineX=0;
    }
  }
  if (currentLineChildren.size() > 0) {
    assignLayoutForLine(currentLineChildren,currentLineY,currentLineMaxHeight);
    currentLineChildren.clear();
    currentLineY+=currentLineMaxHeight;
  }
 else {
    currentLineY-=mVerticalSpacing;
  }
  setMeasuredDimension(mMaximumWidth,(int)currentLineY);
}

Fixed version (ground truth):
private void calculateLayout(){
  final int childCount=getChildCount();
  float currentLineX=0;
  float currentLineY=0;
  float currentLineMaxHeight=0;
  ArrayList<View> currentLineChildren=new ArrayList<>();
  int i=0;
  while (i < childCount) {
    final View child=getChildAt(i);
    if (child.getVisibility() == View.GONE) {
      i++;
      continue;
    }
    final float childWidth=child.getMeasuredWidth();
    final float childHeight=child.getMeasuredHeight();
    if (currentLineX + mHorizontalSpacing + childWidth < mMaximumWidth || currentLineChildren.size() == 0) {
      currentLineMaxHeight=Math.max(currentLineMaxHeight,childHeight);
      currentLineChildren.add(child);
      currentLineX+=childWidth + mHorizontalSpacing;
      i++;
    }
 else {
      assignLayoutForLine(currentLineChildren,currentLineY,currentLineMaxHeight);
      currentLineChildren.clear();
      currentLineY+=currentLineMaxHeight + mVerticalSpacing;
      currentLineMaxHeight=0;
      currentLineX=0;
    }
  }
  if (currentLineChildren.size() > 0) {
    assignLayoutForLine(currentLineChildren,currentLineY,currentLineMaxHeight);
    currentLineChildren.clear();
    currentLineY+=currentLineMaxHeight;
  }
 else {
    currentLineY-=mVerticalSpacing;
  }
  setMeasuredDimension(mMaximumWidth,(int)currentLineY);
}
Program: 13789
Project: 13789
Buggy source:
@Override public Dialog onCreateDialog(Bundle savedInstanceState){
  final String title=getArguments().getString(ARG_TITLE);
  final String button1=getArguments().getString(ARG_BUTTON1);
  final String button2=getArguments().getString(ARG_BUTTON2);
  final String text=getArguments().getString(ARG_TEXT);
  final Object attachedObject;
  if (getArguments().containsKey(ARG_OBJECT_S)) {
    attachedObject=getArguments().getSerializable(ARG_OBJECT_S);
  }
 else {
    attachedObject=getArguments().getParcelable(ARG_OBJECT_P);
  }
  final AlertDialog.Builder builder=new AlertDialog.Builder(getActivity()).setIcon(R.drawable.ic_close_black_18dp).setTitle(title).setPositiveButton(button1,new DialogInterface.OnClickListener(){
    @Override public void onClick(    DialogInterface dialog,    int which){
      mCallback.onAlertDialogFragmentButton1Clicked(getTag(),attachedObject);
    }
  }
);
  if (button2 != INVALID_RES) {
    builder.setNegativeButton(button2,new DialogInterface.OnClickListener(){
      @Override public void onClick(      DialogInterface dialog,      int which){
        mCallback.onAlertDialogFragmentButton2Clicked(getTag(),attachedObject);
      }
    }
);
  }
  builder.setMessage(text);
  final Dialog dialog=builder.create();
  dialog.setCanceledOnTouchOutside(getArguments().getBoolean(ARG_CANCELLABLE));
  return dialog;
}

Fixed version (ground truth):
@Override public Dialog onCreateDialog(Bundle savedInstanceState){
  final String title=getArguments().getString(ARG_TITLE);
  final String button1=getArguments().getString(ARG_BUTTON1);
  final String button2=getArguments().getString(ARG_BUTTON2);
  final String text=getArguments().getString(ARG_TEXT);
  final Object attachedObject;
  if (getArguments().containsKey(ARG_OBJECT_S)) {
    attachedObject=getArguments().getSerializable(ARG_OBJECT_S);
  }
 else {
    attachedObject=getArguments().getParcelable(ARG_OBJECT_P);
  }
  final AlertDialog.Builder builder=new AlertDialog.Builder(getActivity()).setIcon(R.drawable.ic_close_black_18dp).setTitle(title).setPositiveButton(button1,new DialogInterface.OnClickListener(){
    @Override public void onClick(    DialogInterface dialog,    int which){
      if (mCallback == null) {
        return;
      }
      mCallback.onAlertDialogFragmentButton1Clicked(getTag(),attachedObject);
    }
  }
);
  if (button2 != INVALID_RES) {
    builder.setNegativeButton(button2,new DialogInterface.OnClickListener(){
      @Override public void onClick(      DialogInterface dialog,      int which){
        if (mCallback == null) {
          return;
        }
        mCallback.onAlertDialogFragmentButton2Clicked(getTag(),attachedObject);
      }
    }
);
  }
  builder.setMessage(text);
  final Dialog dialog=builder.create();
  dialog.setCanceledOnTouchOutside(getArguments().getBoolean(ARG_CANCELLABLE));
  return dialog;
}
Program: 13790
Project: 13790
Buggy source:
@Override public void onClick(DialogInterface dialog,int which){
  mCallback.onAlertDialogFragmentButton2Clicked(getTag(),attachedObject);
}

Fixed version (ground truth):
@Override public void onClick(DialogInterface dialog,int which){
  if (mCallback == null) {
    return;
  }
  mCallback.onAlertDialogFragmentButton2Clicked(getTag(),attachedObject);
}
Program: 13791
Project: 13791
Buggy source:
@Override public void onCancel(DialogInterface dialog){
  super.onCancel(dialog);
  final Object attachedObject;
  if (getArguments().containsKey(ARG_OBJECT_S)) {
    attachedObject=getArguments().getSerializable(ARG_OBJECT_S);
  }
 else {
    attachedObject=getArguments().getParcelable(ARG_OBJECT_P);
  }
  mCallback.onAlertDialogFragmentCanceled(getTag(),attachedObject);
}

Fixed version (ground truth):
@Override public void onCancel(DialogInterface dialog){
  super.onCancel(dialog);
  if (mCallback == null) {
    return;
  }
  final Object attachedObject;
  if (getArguments().containsKey(ARG_OBJECT_S)) {
    attachedObject=getArguments().getSerializable(ARG_OBJECT_S);
  }
 else {
    attachedObject=getArguments().getParcelable(ARG_OBJECT_P);
  }
  mCallback.onAlertDialogFragmentCanceled(getTag(),attachedObject);
}
Program: 13792
Project: 13792
Buggy source:
/** 
 * @param context  context
 * @param attrs    attributes
 * @param defStyle defined style
 */
private void initAttrs(Context context,AttributeSet attrs,int defStyle){
  final TypedArray a=context.obtainStyledAttributes(attrs,R.styleable.RecyclerViewPager,defStyle,0);
  mFlingFactor=a.getFloat(R.styleable.RecyclerViewPager_oh_flingFactor,mFlingFactor);
  mTriggerOffset=a.getFloat(R.styleable.RecyclerViewPager_oh_triggerOffset,mTriggerOffset);
  mSinglePageFling=a.getBoolean(R.styleable.RecyclerViewPager_oh_singlePageFling,mSinglePageFling);
  mOverlapRatio=a.getDimension(R.styleable.RecyclerViewPager_oh_overlap_ratio,mOverlapRatio);
  mOverlapAmount=a.getDimension(R.styleable.RecyclerViewPager_oh_overlap_amount,mOverlapAmount);
  a.recycle();
}

Fixed version (ground truth):
/** 
 * @param context  context
 * @param attrs    attributes
 * @param defStyle defined style
 */
private void initAttrs(Context context,AttributeSet attrs,int defStyle){
  final TypedArray a=context.obtainStyledAttributes(attrs,R.styleable.RecyclerViewPager,defStyle,0);
  mFlingFactor=a.getFloat(R.styleable.RecyclerViewPager_oh_flingFactor,mFlingFactor);
  mTriggerOffset=a.getFloat(R.styleable.RecyclerViewPager_oh_triggerOffset,mTriggerOffset);
  mSinglePageFling=a.getBoolean(R.styleable.RecyclerViewPager_oh_singlePageFling,mSinglePageFling);
  mOverlapRatio=a.getFloat(R.styleable.RecyclerViewPager_oh_overlap_ratio,mOverlapRatio);
  mOverlapAmount=a.getDimension(R.styleable.RecyclerViewPager_oh_overlap_amount,mOverlapAmount);
  a.recycle();
}
Program: 13793
Project: 13793
Buggy source:
public FlexGridViewHolder(View view,final int sizing){
  super(view);
}

Fixed version (ground truth):
public FlexGridViewHolder(View view,final int sizing){
  super(view);
  mSizing=sizing;
  view.setTag(R.id.view_sizing_tag_key,Integer.valueOf(sizing));
}
Program: 13794
Project: 13794
Buggy source:
@Override public int getDecoratedMeasuredHeight(View child){
  return super.getDecoratedMeasuredHeight(child);
}

Fixed version (ground truth):
@Override public int getDecoratedMeasuredHeight(View child){
  final Integer sizing=(Integer)child.getTag(R.id.view_sizing_tag_key);
  if (sizing != null) {
    final int superMeasured=super.getDecoratedMeasuredHeight(child);
    final int childMeasured=child.getMeasuredHeight();
    final int offset=superMeasured - childMeasured;
    if (sizing.intValue() == FlexGridViewHolder.SIZE_SQUARE) {
      return getDecoratedMeasuredWidth(child) + offset;
    }
 else     if (sizing.intValue() > 0) {
      return sizing.intValue() + offset;
    }
  }
  return super.getDecoratedMeasuredHeight(child);
}
Program: 13795
Project: 13795
Buggy source:
@Override public void getItemOffsets(Rect outRect,View view,RecyclerView parent,RecyclerView.State state){
  super.getItemOffsets(outRect,view,parent,state);
  final int position=parent.getChildPosition(view);
  if (parent.getLayoutManager() instanceof GridLayoutManager) {
    final GridLayoutManager.SpanSizeLookup sizeLookUp=((GridLayoutManager)parent.getLayoutManager()).getSpanSizeLookup();
    final int span=((GridLayoutManager)parent.getLayoutManager()).getSpanCount();
    final int groupIndex=sizeLookUp.getSpanGroupIndex(position,span);
    if (groupIndex == 0) {
      outRect.top=mTopContentInset;
    }
 else {
      final int lastRowGroupIndex=sizeLookUp.getSpanGroupIndex(parent.getAdapter().getItemCount() - 1,span);
      if (groupIndex == lastRowGroupIndex) {
        outRect.bottom=mBottomContentInset;
      }
    }
  }
 else {
    if (position == 0) {
      outRect.top=mTopContentInset;
    }
    if (position == parent.getAdapter().getItemCount() - 1) {
      outRect.bottom=mBottomContentInset;
    }
  }
  outRect.left=mItemMargin / 2;
  outRect.right=mItemMargin / 2;
  outRect.top+=mItemMargin / 2;
  outRect.bottom+=mItemMargin / 2;
}

Fixed version (ground truth):
@Override public void getItemOffsets(Rect outRect,View view,RecyclerView parent,RecyclerView.State state){
  super.getItemOffsets(outRect,view,parent,state);
  final int position=parent.getChildAdapterPosition(view);
  if (parent.getLayoutManager() instanceof GridLayoutManager) {
    final GridLayoutManager.SpanSizeLookup sizeLookUp=((GridLayoutManager)parent.getLayoutManager()).getSpanSizeLookup();
    final int span=((GridLayoutManager)parent.getLayoutManager()).getSpanCount();
    final int groupIndex=sizeLookUp.getSpanGroupIndex(position,span);
    if (groupIndex == 0) {
      outRect.top=mTopContentInset;
    }
 else {
      final int lastRowGroupIndex=sizeLookUp.getSpanGroupIndex(parent.getAdapter().getItemCount() - 1,span);
      if (groupIndex == lastRowGroupIndex) {
        outRect.bottom=mBottomContentInset;
      }
    }
  }
 else {
    if (position == 0) {
      outRect.top=mTopContentInset;
    }
    if (position == parent.getAdapter().getItemCount() - 1) {
      outRect.bottom=mBottomContentInset;
    }
  }
  outRect.left=mItemMargin / 2;
  outRect.right=mItemMargin / 2;
  outRect.top+=mItemMargin / 2;
  outRect.bottom+=mItemMargin / 2;
}
Program: 13796
Project: 13796
Buggy source:
@Override public void onClick(View v){
}

Fixed version (ground truth):
@Override public void onClick(View v){
  if (!mAutoTriggerLoading) {
    notifyLoadingStarted(getItemCount() - 1);
    mAutoTriggerLoading=true;
    final ProgressBar progressBar=(ProgressBar)v.findViewById(R.id.view_loading_progress);
    final TextView loadMoreText=(TextView)v.findViewById(R.id.view_loading_load_more_text);
    progressBar.setVisibility(View.VISIBLE);
    loadMoreText.setVisibility(View.INVISIBLE);
  }
}
Program: 13797
Project: 13797
Buggy source:
@Override public ViewHolder onCreateViewHolder(ViewGroup parent,int viewType){
  return null;
}

Fixed version (ground truth):
@Override public ViewHolder onCreateViewHolder(ViewGroup parent,int viewType){
  if (viewType == TYPE_VIEW_LOADING) {
    final LoadingViewHolder holder=new LoadingViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.view_adapter_loading,parent,false));
    holder.itemView.setOnClickListener(this);
    return holder;
  }
 else {
    return mWrappedAdapter.createViewHolder(parent,viewType);
  }
}
Program: 13798
Project: 13798
Buggy source:
@Override public void onBindViewHolder(ViewHolder viewHolder,int position){
}

Fixed version (ground truth):
@Override public void onBindViewHolder(ViewHolder viewHolder,int position){
  if (isLoadingView(position)) {
    @SuppressWarnings("String_Node_Str") final LoadingViewHolder holder=(LoadingViewHolder)viewHolder;
    if (mAutoTriggerLoading) {
      notifyLoadingStarted(position);
    }
    if (holder != null) {
      if (mAutoTriggerLoading) {
        holder.mProgressBar.setVisibility(View.VISIBLE);
        holder.mLoadMoreText.setVisibility(View.INVISIBLE);
      }
 else {
        holder.mProgressBar.setVisibility(View.INVISIBLE);
        holder.mLoadMoreText.setVisibility(View.VISIBLE);
      }
    }
  }
 else {
    mWrappedAdapter.onBindViewHolder(viewHolder,position);
  }
}
Program: 13799
Project: 13799
Buggy source:
@Override public void onScrolled(RecyclerView recyclerView,int dx,int dy){
  super.onScrolled(recyclerView,dx,dy);
  if (dy == 0) {
    final int childHeight=getHeight() - getPaddingTop() - getPaddingBottom()- getOverlapOffset();
    mCurrentScrollY=getCurrentPosition() * childHeight;
  }
 else {
    mCurrentScrollY+=dy;
  }
  if (mPagerScrollListener.get() != null) {
    mPagerScrollListener.get().onPagerScroll(RecyclerViewPager.this,mCurrentScrollY,dy);
  }
}

Fixed version (ground truth):
@Override public void onScrolled(RecyclerView recyclerView,int dx,int dy){
  super.onScrolled(recyclerView,dx,dy);
  if (dy == 0) {
    final int childHeight=getHeight() - getPaddingTop() - getPaddingBottom()- getOverlapOffset();
    mCurrentScrollY=getCurrentPosition() * childHeight;
  }
 else {
    mCurrentScrollY+=dy;
  }
  if (mPagerScrollListener != null && mPagerScrollListener.get() != null) {
    mPagerScrollListener.get().onPagerScroll(RecyclerViewPager.this,mCurrentScrollY,dy);
  }
}
Program: 13802
Project: 13802
Buggy source:
public void run(){
  System.out.println("String_Node_Str");
  while (shouldRun)   try {
    playStream();
  }
 catch (  Exception e) {
  }
}

Fixed version (ground truth):
public void run(){
  if (DEBUG)   System.out.println("String_Node_Str");
  while (shouldRun) {
    try {
      playStream();
    }
 catch (    Exception e) {
      if (DEBUG)       System.out.println("String_Node_Str" + e);
    }
  }
  if (DEBUG)   System.out.println("String_Node_Str");
}
Program: 13804
Project: 13804
Buggy source:
/** 
 * Stop a SignalFlow computation.
 * @param handle computation id
 * @param parameters computation parameter
 */
public void stop(String handle,Map<String,String> parameters);

Fixed version (ground truth):
/** 
 * Stop a SignalFlow computation.
 * @param handle computation id
 * @param parameters computation parameter
 */
void stop(String handle,Map<String,String> parameters);
Program: 13805
Project: 13805
Buggy source:
/** 
 * Keepalive a SignalFlow computation.
 * @param handle computation id
 */
public void keepalive(String handle);

Fixed version (ground truth):
/** 
 * Keep-alive a SignalFlow computation.
 * @param handle computation id
 */
void keepalive(String handle);
Program: 13806
Project: 13806
Buggy source:
/** 
 * Start executing the given SignalFlow program without being attached to the output of the computation.
 * @param program computation written in signalflow language
 * @param parameters computation parameters
 */
public void start(String program,Map<String,String> parameters);

Fixed version (ground truth):
/** 
 * Start executing the given SignalFlow program without being attached to the output of the computation.
 * @param program computation written in signalflow language
 * @param parameters computation parameters
 */
void start(String program,Map<String,String> parameters);
Program: 13807
Project: 13807
Buggy source:
/** 
 * Attach to an existing SignalFlow computation.
 * @param handle computation id
 * @param parameters computation parameters
 * @return An open channel attached to the given computation.
 */
public Channel attach(String handle,Map<String,String> parameters);

Fixed version (ground truth):
/** 
 * Attach to an existing SignalFlow computation.
 * @param handle computation id
 * @param parameters computation parameters
 * @return An open channel attached to the given computation.
 */
Channel attach(String handle,Map<String,String> parameters);
Program: 13808
Project: 13808
Buggy source:
/** 
 * Execute the given SignalFlow program and stream the output back.
 * @param program computation written in signalflow language
 * @param parameters computation parameters
 * @return An open channel attached to the newly started computation.
 */
public Channel execute(String program,Map<String,String> parameters);

Fixed version (ground truth):
/** 
 * Execute the given SignalFlow program and stream the output back.
 * @param program computation written in signalflow language
 * @param parameters computation parameters
 * @return An open channel attached to the newly started computation.
 */
Channel execute(String program,Map<String,String> parameters);
Program: 13809
Project: 13809
Buggy source:
/** 
 * Close this SignalFlow transport.
 * @param code numeric error id
 * @param reason Optional description of why closing
 */
public void close(int code,String reason);

Fixed version (ground truth):
/** 
 * Close this SignalFlow transport.
 * @param code numeric error id
 * @param reason Optional description of why closing
 */
void close(int code,String reason);
Program: 13810
Project: 13810
Buggy source:
/** 
 * Execute a preflight of the given SignalFlow program and stream the output back.
 * @param program computation written in signalflow language
 * @param parameters
 * @return
 */
public Channel preflight(String program,Map<String,String> parameters);

Fixed version (ground truth):
/** 
 * Execute a preflight of the given SignalFlow program and stream the output back.
 * @param program computation written in signalflow language
 * @param parameters computation parameters
 * @return An open channel attached to the newly started preflight computation.
 */
Channel preflight(String program,Map<String,String> parameters);
Program: 13812
Project: 13812
Buggy source:
/** 
 * @Deprecated
 */
T withSourceName(String sourceName);

Fixed version (ground truth):
/** 
 * Tag the metric with a sf_source
 * @param sourceName    Source name for the sf_source
 * @return this
 * @deprecated The use of the build in source parameter is deprecated and discouraged.  Use{@link #withDimension(String,String)} instead.
 */
T withSourceName(String sourceName);
Program: 13814
Project: 13814
Buggy source:
@Override public Long getValue(){
  return customerQueue.size();
}

Fixed version (ground truth):
@Override public Long getValue(){
  return i++;
}