nus-yam/ex-repair huggingface dataset:
Program: 109111
Project: 109111
Buggy source:
/** 
 * Instantiates a new abstract transformer.
 * @param data the data
 * @param hierarchies the hierarchies
 */
public AbstractTransformer(final int[][] data,final GeneralizationHierarchy[] hierarchies,final int[] sensitiveValues,final IntArrayDictionary dictionarySensValue,final IntArrayDictionary dictionarySensFreq,final ARXConfiguration config){
  this.config=config;
  this.data=data;
  this.hierarchies=hierarchies;
  this.sensitiveValues=sensitiveValues;
  this.dictionarySensValue=dictionarySensValue;
  this.dictionarySensFreq=dictionarySensFreq;
  this.ssStepWidth=config.getSnapshotLength();
  this.requirements=config.getRequirements();
  dimensions=data[0].length;
  int arraySizes=15;
  if (dimensions > arraySizes) {
    arraySizes=dimensions;
  }
  stateIndexArray=new int[arraySizes];
  columnIndexArray=new int[arraySizes];
  columnMapArray=new int[arraySizes][][];
  map=new int[hierarchies.length][][];
  for (int i=0; i < hierarchies.length; i++) {
    map[i]=hierarchies[i].getArray();
  }
}

Fixed version (ground truth):
/** 
 * Instantiates a new abstract transformer.
 * @param data the data
 * @param hierarchies the hierarchies
 */
public AbstractTransformer(final int[][] data,final GeneralizationHierarchy[] hierarchies,final int[] sensitiveValues,final IntArrayDictionary dictionarySensValue,final IntArrayDictionary dictionarySensFreq,final ARXConfiguration config){
  this.config=config;
  this.data=data;
  this.hierarchies=hierarchies;
  this.sensitiveValues=sensitiveValues;
  this.dictionarySensValue=dictionarySensValue;
  this.dictionarySensFreq=dictionarySensFreq;
  ssStepWidth=config.getSnapshotLength();
  requirements=config.getRequirements();
  dimensions=data[0].length;
  int arraySizes=15;
  if (dimensions > arraySizes) {
    arraySizes=dimensions;
  }
  stateIndexArray=new int[arraySizes];
  columnIndexArray=new int[arraySizes];
  columnMapArray=new int[arraySizes][][];
  map=new int[hierarchies.length][][];
  for (int i=0; i < hierarchies.length; i++) {
    map[i]=hierarchies[i].getArray();
  }
}
Program: 109112
Project: 109112
Buggy source:
@Override protected void processSnapshot(){
  startIndex*=ssStepWidth;
  stopIndex*=ssStepWidth;
  for (int i=startIndex; i < stopIndex; i+=ssStepWidth) {
    intuple=data[snapshot[i]];
    outtuple=buffer[snapshot[i]];
    outtuple[outindex0]=idindex0[intuple[index0]][stateindex0];
switch (requirements) {
case ARXConfiguration.REQUIREMENT_COUNTER:
      groupify.addSnapshot(outtuple,snapshot[i],snapshot[i + 1],null,null,-1);
    break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_SECONDARY_COUNTER:
  groupify.addSnapshot(outtuple,snapshot[i],snapshot[i + 1],null,null,snapshot[i + 2]);
break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_SECONDARY_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
groupify.addSnapshot(outtuple,snapshot[i],snapshot[i + 1],dictionarySensValue.get(snapshot[i + 3]),dictionarySensFreq.get(snapshot[i + 4]),snapshot[i + 2]);
break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
groupify.addSnapshot(outtuple,snapshot[i],snapshot[i + 1],dictionarySensValue.get(snapshot[i + 2]),dictionarySensFreq.get(snapshot[i + 3]),-1);
break;
default :
throw new RuntimeException("String_Node_Str" + requirements);
}
}
}

Fixed version (ground truth):
@Override protected void processSnapshot(){
  startIndex*=ssStepWidth;
  stopIndex*=ssStepWidth;
  for (int i=startIndex; i < stopIndex; i+=ssStepWidth) {
    intuple=data[snapshot[i]];
    outtuple=buffer[snapshot[i]];
    outtuple[outindex0]=idindex0[intuple[index0]][stateindex0];
switch (requirements) {
case ARXConfiguration.REQUIREMENT_COUNTER:
      groupify.addSnapshot(outtuple,snapshot[i],snapshot[i + 1],null,null,-1);
    break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_SECONDARY_COUNTER:
  groupify.addSnapshot(outtuple,snapshot[i],snapshot[i + 1],null,null,snapshot[i + 2]);
break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_SECONDARY_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
groupify.addSnapshot(outtuple,snapshot[i],snapshot[i + 1],dictionarySensValue.get(snapshot[i + 3]),dictionarySensFreq.get(snapshot[i + 4]),snapshot[i + 2]);
break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
case ARXConfiguration.REQUIREMENT_DISTRIBUTION:
groupify.addSnapshot(outtuple,snapshot[i],snapshot[i + 1],dictionarySensValue.get(snapshot[i + 2]),dictionarySensFreq.get(snapshot[i + 3]),-1);
break;
default :
throw new RuntimeException("String_Node_Str" + requirements);
}
}
}
Program: 109113
Project: 109113
Buggy source:
@Override protected void processGroupify(){
  int processed=0;
  while (element != null) {
    intuple=data[element.representant];
    outtuple=buffer[element.representant];
    outtuple[outindex0]=idindex0[intuple[index0]][stateindex0];
switch (requirements) {
case ARXConfiguration.REQUIREMENT_COUNTER:
      groupify.addGroupify(outtuple,element.representant,element.count,null,-1);
    break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_SECONDARY_COUNTER:
  groupify.addGroupify(outtuple,element.representant,element.count,null,element.pcount);
break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_SECONDARY_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
groupify.addGroupify(outtuple,element.representant,element.count,element.distribution,element.pcount);
break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
groupify.addGroupify(outtuple,element.representant,element.count,element.distribution,-1);
break;
default :
throw new RuntimeException("String_Node_Str" + requirements);
}
processed++;
if (processed == numElements) {
return;
}
element=element.nextOrdered;
}
}

Fixed version (ground truth):
@Override protected void processGroupify(){
  int processed=0;
  while (element != null) {
    intuple=data[element.representant];
    outtuple=buffer[element.representant];
    outtuple[outindex0]=idindex0[intuple[index0]][stateindex0];
switch (requirements) {
case ARXConfiguration.REQUIREMENT_COUNTER:
      groupify.addGroupify(outtuple,element.representant,element.count,null,-1);
    break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_SECONDARY_COUNTER:
  groupify.addGroupify(outtuple,element.representant,element.count,null,element.pcount);
break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_SECONDARY_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
groupify.addGroupify(outtuple,element.representant,element.count,element.distribution,element.pcount);
break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
case ARXConfiguration.REQUIREMENT_DISTRIBUTION:
groupify.addGroupify(outtuple,element.representant,element.count,element.distribution,-1);
break;
default :
throw new RuntimeException("String_Node_Str" + requirements);
}
processed++;
if (processed == numElements) {
return;
}
element=element.nextOrdered;
}
}
Program: 109114
Project: 109114
Buggy source:
@Override protected void processAll(){
  for (int i=startIndex; i < stopIndex; i++) {
    intuple=data[i];
    outtuple=buffer[i];
    outtuple[outindex0]=idindex0[intuple[index0]][stateindex0];
switch (requirements) {
case ARXConfiguration.REQUIREMENT_COUNTER:
      groupify.addAll(outtuple,i,1,-1,-1);
    break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_SECONDARY_COUNTER:
  groupify.addAll(outtuple,i,1,-1,1);
break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_SECONDARY_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
groupify.addAll(outtuple,i,1,sensitiveValues[i],1);
break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
groupify.addAll(outtuple,i,1,sensitiveValues[i],-1);
break;
default :
throw new RuntimeException("String_Node_Str" + requirements);
}
}
}

Fixed version (ground truth):
@Override protected void processAll(){
  for (int i=startIndex; i < stopIndex; i++) {
    intuple=data[i];
    outtuple=buffer[i];
    outtuple[outindex0]=idindex0[intuple[index0]][stateindex0];
switch (requirements) {
case ARXConfiguration.REQUIREMENT_COUNTER:
      groupify.addAll(outtuple,i,1,-1,-1);
    break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_SECONDARY_COUNTER:
  groupify.addAll(outtuple,i,1,-1,1);
break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_SECONDARY_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
groupify.addAll(outtuple,i,1,sensitiveValues[i],1);
break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
case ARXConfiguration.REQUIREMENT_DISTRIBUTION:
groupify.addAll(outtuple,i,1,sensitiveValues[i],-1);
break;
default :
throw new RuntimeException("String_Node_Str" + requirements);
}
}
}
Program: 109115
Project: 109115
Buggy source:
@Override protected void processSnapshot(){
  startIndex*=ssStepWidth;
  stopIndex*=ssStepWidth;
  for (int i=startIndex; i < stopIndex; i+=ssStepWidth) {
    intuple=data[snapshot[i]];
    outtuple=buffer[snapshot[i]];
    outtuple[outindex0]=idindex0[intuple[index0]][stateindex0];
    outtuple[outindex1]=idindex1[intuple[index1]][stateindex1];
switch (requirements) {
case ARXConfiguration.REQUIREMENT_COUNTER:
      groupify.addSnapshot(outtuple,snapshot[i],snapshot[i + 1],null,null,-1);
    break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_SECONDARY_COUNTER:
  groupify.addSnapshot(outtuple,snapshot[i],snapshot[i + 1],null,null,snapshot[i + 2]);
break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_SECONDARY_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
groupify.addSnapshot(outtuple,snapshot[i],snapshot[i + 1],dictionarySensValue.get(snapshot[i + 3]),dictionarySensFreq.get(snapshot[i + 4]),snapshot[i + 2]);
break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
groupify.addSnapshot(outtuple,snapshot[i],snapshot[i + 1],dictionarySensValue.get(snapshot[i + 2]),dictionarySensFreq.get(snapshot[i + 3]),-1);
break;
default :
throw new RuntimeException("String_Node_Str" + requirements);
}
}
}

Fixed version (ground truth):
@Override protected void processSnapshot(){
  startIndex*=ssStepWidth;
  stopIndex*=ssStepWidth;
  for (int i=startIndex; i < stopIndex; i+=ssStepWidth) {
    intuple=data[snapshot[i]];
    outtuple=buffer[snapshot[i]];
    outtuple[outindex0]=idindex0[intuple[index0]][stateindex0];
    outtuple[outindex1]=idindex1[intuple[index1]][stateindex1];
switch (requirements) {
case ARXConfiguration.REQUIREMENT_COUNTER:
      groupify.addSnapshot(outtuple,snapshot[i],snapshot[i + 1],null,null,-1);
    break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_SECONDARY_COUNTER:
  groupify.addSnapshot(outtuple,snapshot[i],snapshot[i + 1],null,null,snapshot[i + 2]);
break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_SECONDARY_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
groupify.addSnapshot(outtuple,snapshot[i],snapshot[i + 1],dictionarySensValue.get(snapshot[i + 3]),dictionarySensFreq.get(snapshot[i + 4]),snapshot[i + 2]);
break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
case ARXConfiguration.REQUIREMENT_DISTRIBUTION:
groupify.addSnapshot(outtuple,snapshot[i],snapshot[i + 1],dictionarySensValue.get(snapshot[i + 2]),dictionarySensFreq.get(snapshot[i + 3]),-1);
break;
default :
throw new RuntimeException("String_Node_Str" + requirements);
}
}
}
Program: 109116
Project: 109116
Buggy source:
@Override protected void processGroupify(){
  int processed=0;
  while (element != null) {
    intuple=data[element.representant];
    outtuple=buffer[element.representant];
    outtuple[outindex0]=idindex0[intuple[index0]][stateindex0];
    outtuple[outindex1]=idindex1[intuple[index1]][stateindex1];
switch (requirements) {
case ARXConfiguration.REQUIREMENT_COUNTER:
      groupify.addGroupify(outtuple,element.representant,element.count,null,-1);
    break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_SECONDARY_COUNTER:
  groupify.addGroupify(outtuple,element.representant,element.count,null,element.pcount);
break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_SECONDARY_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
groupify.addGroupify(outtuple,element.representant,element.count,element.distribution,element.pcount);
break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
groupify.addGroupify(outtuple,element.representant,element.count,element.distribution,-1);
break;
default :
throw new RuntimeException("String_Node_Str" + requirements);
}
processed++;
if (processed == numElements) {
return;
}
element=element.nextOrdered;
}
}

Fixed version (ground truth):
@Override protected void processGroupify(){
  int processed=0;
  while (element != null) {
    intuple=data[element.representant];
    outtuple=buffer[element.representant];
    outtuple[outindex0]=idindex0[intuple[index0]][stateindex0];
    outtuple[outindex1]=idindex1[intuple[index1]][stateindex1];
switch (requirements) {
case ARXConfiguration.REQUIREMENT_COUNTER:
      groupify.addGroupify(outtuple,element.representant,element.count,null,-1);
    break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_SECONDARY_COUNTER:
  groupify.addGroupify(outtuple,element.representant,element.count,null,element.pcount);
break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_SECONDARY_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
groupify.addGroupify(outtuple,element.representant,element.count,element.distribution,element.pcount);
break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
case ARXConfiguration.REQUIREMENT_DISTRIBUTION:
groupify.addGroupify(outtuple,element.representant,element.count,element.distribution,-1);
break;
default :
throw new RuntimeException("String_Node_Str" + requirements);
}
processed++;
if (processed == numElements) {
return;
}
element=element.nextOrdered;
}
}
Program: 109117
Project: 109117
Buggy source:
@Override protected void processAll(){
  for (int i=startIndex; i < stopIndex; i++) {
    intuple=data[i];
    outtuple=buffer[i];
    outtuple[outindex0]=idindex0[intuple[index0]][stateindex0];
    outtuple[outindex1]=idindex1[intuple[index1]][stateindex1];
switch (requirements) {
case ARXConfiguration.REQUIREMENT_COUNTER:
      groupify.addAll(outtuple,i,1,-1,-1);
    break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_SECONDARY_COUNTER:
  groupify.addAll(outtuple,i,1,-1,1);
break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_SECONDARY_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
groupify.addAll(outtuple,i,1,sensitiveValues[i],1);
break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
groupify.addAll(outtuple,i,1,sensitiveValues[i],-1);
break;
default :
throw new RuntimeException("String_Node_Str" + requirements);
}
}
}

Fixed version (ground truth):
@Override protected void processAll(){
  for (int i=startIndex; i < stopIndex; i++) {
    intuple=data[i];
    outtuple=buffer[i];
    outtuple[outindex0]=idindex0[intuple[index0]][stateindex0];
    outtuple[outindex1]=idindex1[intuple[index1]][stateindex1];
switch (requirements) {
case ARXConfiguration.REQUIREMENT_COUNTER:
      groupify.addAll(outtuple,i,1,-1,-1);
    break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_SECONDARY_COUNTER:
  groupify.addAll(outtuple,i,1,-1,1);
break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_SECONDARY_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
groupify.addAll(outtuple,i,1,sensitiveValues[i],1);
break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
case ARXConfiguration.REQUIREMENT_DISTRIBUTION:
groupify.addAll(outtuple,i,1,sensitiveValues[i],-1);
break;
default :
throw new RuntimeException("String_Node_Str" + requirements);
}
}
}
Program: 109118
Project: 109118
Buggy source:
@Override protected void processSnapshot(){
  startIndex*=ssStepWidth;
  stopIndex*=ssStepWidth;
  for (int i=startIndex; i < stopIndex; i+=ssStepWidth) {
    intuple=data[snapshot[i]];
    outtuple=buffer[snapshot[i]];
    outtuple[outindex0]=idindex0[intuple[index0]][stateindex0];
    outtuple[outindex1]=idindex1[intuple[index1]][stateindex1];
    outtuple[outindex2]=idindex2[intuple[index2]][stateindex2];
switch (requirements) {
case ARXConfiguration.REQUIREMENT_COUNTER:
      groupify.addSnapshot(outtuple,snapshot[i],snapshot[i + 1],null,null,-1);
    break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_SECONDARY_COUNTER:
  groupify.addSnapshot(outtuple,snapshot[i],snapshot[i + 1],null,null,snapshot[i + 2]);
break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_SECONDARY_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
groupify.addSnapshot(outtuple,snapshot[i],snapshot[i + 1],dictionarySensValue.get(snapshot[i + 3]),dictionarySensFreq.get(snapshot[i + 4]),snapshot[i + 2]);
break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
groupify.addSnapshot(outtuple,snapshot[i],snapshot[i + 1],dictionarySensValue.get(snapshot[i + 2]),dictionarySensFreq.get(snapshot[i + 3]),-1);
break;
default :
throw new RuntimeException("String_Node_Str" + requirements);
}
}
}

Fixed version (ground truth):
@Override protected void processSnapshot(){
  startIndex*=ssStepWidth;
  stopIndex*=ssStepWidth;
  for (int i=startIndex; i < stopIndex; i+=ssStepWidth) {
    intuple=data[snapshot[i]];
    outtuple=buffer[snapshot[i]];
    outtuple[outindex0]=idindex0[intuple[index0]][stateindex0];
    outtuple[outindex1]=idindex1[intuple[index1]][stateindex1];
    outtuple[outindex2]=idindex2[intuple[index2]][stateindex2];
switch (requirements) {
case ARXConfiguration.REQUIREMENT_COUNTER:
      groupify.addSnapshot(outtuple,snapshot[i],snapshot[i + 1],null,null,-1);
    break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_SECONDARY_COUNTER:
  groupify.addSnapshot(outtuple,snapshot[i],snapshot[i + 1],null,null,snapshot[i + 2]);
break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_SECONDARY_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
groupify.addSnapshot(outtuple,snapshot[i],snapshot[i + 1],dictionarySensValue.get(snapshot[i + 3]),dictionarySensFreq.get(snapshot[i + 4]),snapshot[i + 2]);
break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
case ARXConfiguration.REQUIREMENT_DISTRIBUTION:
groupify.addSnapshot(outtuple,snapshot[i],snapshot[i + 1],dictionarySensValue.get(snapshot[i + 2]),dictionarySensFreq.get(snapshot[i + 3]),-1);
break;
default :
throw new RuntimeException("String_Node_Str" + requirements);
}
}
}
Program: 109119
Project: 109119
Buggy source:
@Override protected void processGroupify(){
  int processed=0;
  while (element != null) {
    intuple=data[element.representant];
    outtuple=buffer[element.representant];
    outtuple[outindex0]=idindex0[intuple[index0]][stateindex0];
    outtuple[outindex1]=idindex1[intuple[index1]][stateindex1];
    outtuple[outindex2]=idindex2[intuple[index2]][stateindex2];
switch (requirements) {
case ARXConfiguration.REQUIREMENT_COUNTER:
      groupify.addGroupify(outtuple,element.representant,element.count,null,-1);
    break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_SECONDARY_COUNTER:
  groupify.addGroupify(outtuple,element.representant,element.count,null,element.pcount);
break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_SECONDARY_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
groupify.addGroupify(outtuple,element.representant,element.count,element.distribution,element.pcount);
break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
groupify.addGroupify(outtuple,element.representant,element.count,element.distribution,-1);
break;
default :
throw new RuntimeException("String_Node_Str" + requirements);
}
processed++;
if (processed == numElements) {
return;
}
element=element.nextOrdered;
}
}

Fixed version (ground truth):
@Override protected void processGroupify(){
  int processed=0;
  while (element != null) {
    intuple=data[element.representant];
    outtuple=buffer[element.representant];
    outtuple[outindex0]=idindex0[intuple[index0]][stateindex0];
    outtuple[outindex1]=idindex1[intuple[index1]][stateindex1];
    outtuple[outindex2]=idindex2[intuple[index2]][stateindex2];
switch (requirements) {
case ARXConfiguration.REQUIREMENT_COUNTER:
      groupify.addGroupify(outtuple,element.representant,element.count,null,-1);
    break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_SECONDARY_COUNTER:
  groupify.addGroupify(outtuple,element.representant,element.count,null,element.pcount);
break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_SECONDARY_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
groupify.addGroupify(outtuple,element.representant,element.count,element.distribution,element.pcount);
break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
case ARXConfiguration.REQUIREMENT_DISTRIBUTION:
groupify.addGroupify(outtuple,element.representant,element.count,element.distribution,-1);
break;
default :
throw new RuntimeException("String_Node_Str" + requirements);
}
processed++;
if (processed == numElements) {
return;
}
element=element.nextOrdered;
}
}
Program: 109120
Project: 109120
Buggy source:
@Override protected void processAll(){
  for (int i=startIndex; i < stopIndex; i++) {
    intuple=data[i];
    outtuple=buffer[i];
    outtuple[outindex0]=idindex0[intuple[index0]][stateindex0];
    outtuple[outindex1]=idindex1[intuple[index1]][stateindex1];
    outtuple[outindex2]=idindex2[intuple[index2]][stateindex2];
switch (requirements) {
case ARXConfiguration.REQUIREMENT_COUNTER:
      groupify.addAll(outtuple,i,1,-1,-1);
    break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_SECONDARY_COUNTER:
  groupify.addAll(outtuple,i,1,-1,1);
break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_SECONDARY_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
groupify.addAll(outtuple,i,1,sensitiveValues[i],1);
break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
groupify.addAll(outtuple,i,1,sensitiveValues[i],-1);
break;
default :
throw new RuntimeException("String_Node_Str" + requirements);
}
}
}

Fixed version (ground truth):
@Override protected void processAll(){
  for (int i=startIndex; i < stopIndex; i++) {
    intuple=data[i];
    outtuple=buffer[i];
    outtuple[outindex0]=idindex0[intuple[index0]][stateindex0];
    outtuple[outindex1]=idindex1[intuple[index1]][stateindex1];
    outtuple[outindex2]=idindex2[intuple[index2]][stateindex2];
switch (requirements) {
case ARXConfiguration.REQUIREMENT_COUNTER:
      groupify.addAll(outtuple,i,1,-1,-1);
    break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_SECONDARY_COUNTER:
  groupify.addAll(outtuple,i,1,-1,1);
break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_SECONDARY_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
groupify.addAll(outtuple,i,1,sensitiveValues[i],1);
break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
case ARXConfiguration.REQUIREMENT_DISTRIBUTION:
groupify.addAll(outtuple,i,1,sensitiveValues[i],-1);
break;
default :
throw new RuntimeException("String_Node_Str" + requirements);
}
}
}
Program: 109121
Project: 109121
Buggy source:
/** 
 * Removes a snapshot
 * @param node
 */
private final void removeHistoryEntry(final Node node){
  final int[] snapshot=nodeToSnapshot.remove(node);
switch (requirements) {
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_SECONDARY_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
    for (int i=0; i < snapshot.length; i+=config.getSnapshotLength()) {
      dictionarySensValue.decrementRefCount(snapshot[i + 3]);
      dictionarySensFreq.decrementRefCount(snapshot[i + 4]);
    }
  break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
for (int i=0; i < snapshot.length; i+=config.getSnapshotLength()) {
  dictionarySensValue.decrementRefCount(snapshot[i + 2]);
  dictionarySensFreq.decrementRefCount(snapshot[i + 3]);
}
default :
throw new RuntimeException("String_Node_Str" + requirements);
}
}

Fixed version (ground truth):
/** 
 * Removes a snapshot
 * @param node
 */
private final void removeHistoryEntry(final Node node){
  final int[] snapshot=nodeToSnapshot.remove(node);
switch (requirements) {
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_SECONDARY_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
    for (int i=0; i < snapshot.length; i+=config.getSnapshotLength()) {
      dictionarySensValue.decrementRefCount(snapshot[i + 3]);
      dictionarySensFreq.decrementRefCount(snapshot[i + 4]);
    }
  break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
for (int i=0; i < snapshot.length; i+=config.getSnapshotLength()) {
  dictionarySensValue.decrementRefCount(snapshot[i + 2]);
  dictionarySensFreq.decrementRefCount(snapshot[i + 3]);
}
}
}
Program: 109122
Project: 109122
Buggy source:
/** 
 * Creates a generic snapshot for all criteria
 * @param g the g
 * @return the int[]
 */
private final int[] createSnapshot(final IHashGroupify g){
  final int[] data=new int[g.size() * config.getSnapshotLength()];
  int index=0;
  HashGroupifyEntry m=g.getFirstEntry();
  while (m != null) {
    data[index]=m.representant;
    data[index + 1]=m.count;
switch (requirements) {
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_SECONDARY_COUNTER:
      data[index + 2]=m.pcount;
    break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_SECONDARY_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
  data[index + 2]=m.pcount;
Distribution fSet=m.distribution;
fSet.pack();
data[index + 3]=dictionarySensValue.probe(fSet.getPackedElements());
data[index + 4]=dictionarySensFreq.probe(fSet.getPackedFrequency());
break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
fSet=m.distribution;
fSet.pack();
data[index + 2]=dictionarySensValue.probe(fSet.getPackedElements());
data[index + 3]=dictionarySensFreq.probe(fSet.getPackedFrequency());
default :
throw new RuntimeException("String_Node_Str" + requirements);
}
index+=config.getSnapshotLength();
m=m.nextOrdered;
}
return data;
}

Fixed version (ground truth):
/** 
 * Creates a generic snapshot for all criteria
 * @param g the g
 * @return the int[]
 */
private final int[] createSnapshot(final IHashGroupify g){
  final int[] data=new int[g.size() * config.getSnapshotLength()];
  int index=0;
  HashGroupifyEntry m=g.getFirstEntry();
  while (m != null) {
    data[index]=m.representant;
    data[index + 1]=m.count;
switch (requirements) {
case ARXConfiguration.REQUIREMENT_COUNTER:
      break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_SECONDARY_COUNTER:
    data[index + 2]=m.pcount;
  break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_SECONDARY_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
data[index + 2]=m.pcount;
Distribution fSet=m.distribution;
fSet.pack();
data[index + 3]=dictionarySensValue.probe(fSet.getPackedElements());
data[index + 4]=dictionarySensFreq.probe(fSet.getPackedFrequency());
break;
case ARXConfiguration.REQUIREMENT_COUNTER | ARXConfiguration.REQUIREMENT_DISTRIBUTION:
fSet=m.distribution;
fSet.pack();
data[index + 2]=dictionarySensValue.probe(fSet.getPackedElements());
data[index + 3]=dictionarySensFreq.probe(fSet.getPackedFrequency());
default :
throw new RuntimeException("String_Node_Str" + requirements);
}
index+=config.getSnapshotLength();
m=m.nextOrdered;
}
return data;
}
Program: 109123
Project: 109123
Buggy source:
/** 
 * Returns a sorted array of integer docIds given the corresponding key.
 * @param docIdsKey The lookup key.
 * @return Not null
 */
protected DocsEnum lookupDocIds(Object docIdsKey){
  return (DocsEnum)docIdsKey;
}

Fixed version (ground truth):
/** 
 * Returns a sorted array of integer docIds given the corresponding key.
 * @param docIdsKey The lookup key.
 * @return Not null
 */
protected IntsRef lookupDocIds(Object docIdsKey){
  return (IntsRef)docIdsKey;
}
Program: 109124
Project: 109124
Buggy source:
TermPrefixCursor(TermsEnum termsEnum,Bits liveDocs){
  this.termsEnum=termsEnum;
  this.liveDocs=liveDocs;
}

Fixed version (ground truth):
TermPrefixCursor(TermsEnum termsEnum,Bits liveDocs,Map<BytesRef,IntsRef> docIdsCache){
  this.termsEnum=termsEnum;
  this.liveDocs=liveDocs;
  this.docIdsCache=docIdsCache;
}
Program: 109125
Project: 109125
Buggy source:
/** 
 * Seeks to prefixBuf or the next prefix of it. Sets docsEnum. 
 */
private boolean seekPrefix() throws IOException {
  TermsEnum.SeekStatus seekStatus=termsEnum.seekCeil(prefixBuf);
  docsEnum=null;
switch (seekStatus) {
case END:
    return false;
case FOUND:
  docsEnum=termsEnum.docs(liveDocs,docsEnum,DocsEnum.FLAG_NONE);
if (liveDocs == null) return true;
if (docsEnum.nextDoc() != DocsEnum.NO_MORE_DOCS) {
docsEnum=termsEnum.docs(liveDocs,docsEnum,DocsEnum.FLAG_NONE);
return true;
}
docsEnum=null;
if (termsEnum.next() == null) {
return false;
}
case NOT_FOUND:
BytesRef teTerm=termsEnum.term();
if (teTerm.length > prefixBuf.length) {
for (int i=0; i < prefixBuf.length; i++) {
if (prefixBuf.bytes[prefixBuf.offset + i] != teTerm.bytes[teTerm.offset + i]) return false;
}
if (teTerm.bytes[teTerm.offset + prefixBuf.length] != SEPARATOR_CHAR) return false;
return true;
}
return false;
}
throw new IllegalStateException(seekStatus.toString());
}

Fixed version (ground truth):
/** 
 * Seeks to prefixBuf or the next term that is prefixed by prefixBuf plus the separator char. Sets docIds. 
 */
private boolean seekPrefix() throws IOException {
  TermsEnum.SeekStatus seekStatus=termsEnum.seekCeil(prefixBuf);
  docIds=null;
switch (seekStatus) {
case END:
    return false;
case FOUND:
  docsEnum=termsEnum.docs(liveDocs,docsEnum,DocsEnum.FLAG_NONE);
docIds=docsEnumToIntsRef(docsEnum);
if (docIds.length > 0) {
return true;
}
docIds=null;
if (termsEnum.next() == null) {
return false;
}
case NOT_FOUND:
BytesRef teTerm=termsEnum.term();
if (teTerm.length > prefixBuf.length) {
for (int i=0; i < prefixBuf.length; i++) {
if (prefixBuf.bytes[prefixBuf.offset + i] != teTerm.bytes[teTerm.offset + i]) return false;
}
if (teTerm.bytes[teTerm.offset + prefixBuf.length] != SEPARATOR_CHAR) return false;
return true;
}
return false;
}
throw new IllegalStateException(seekStatus.toString());
}
Program: 109126
Project: 109126
Buggy source:
/** 
 * Appends the separator char (if not the first) plus the given word to the prefix buffer, then seeks to it. If false is returned, then the advance failed, after which this cursor should be considered void.  The {{word}} BytesRef is considered temporary. 
 */
boolean advance(BytesRef word) throws IOException {
  if (prefixBuf == null) {
    prefixBuf=word;
    if (seekPrefix()) {
      prefixBuf=new BytesRef(64);
      prefixBuf.copyBytes(word);
      return true;
    }
 else {
      prefixBuf=null;
      return false;
    }
  }
 else {
    prefixBuf.grow(1 + word.length);
    prefixBuf.bytes[prefixBuf.length++]=SEPARATOR_CHAR;
    prefixBuf.append(word);
    return seekPrefix();
  }
}

Fixed version (ground truth):
/** 
 * Appends the separator char (if not the first) plus the given word to the prefix buffer, then seeks to it. If the seek fails, false is returned and this cursor can be re-used as if in a new state.  The {{word}} BytesRef is considered temporary. 
 */
boolean advance(BytesRef word) throws IOException {
}
Program: 109127
Project: 109127
Buggy source:
public void testTypical() throws IOException {
  String NYC="String_Node_Str";
  TokenStream stream=new WhitespaceTokenizer(TEST_VERSION_CURRENT,new StringReader(NYC));
  ConcatenateFilter filter=new ConcatenateFilter(stream);
  assertTokenStreamContents(filter,new String[]{NYC},new int[]{0},new int[]{NYC.length()},new String[]{"String_Node_Str"},new int[]{1},null,NYC.length(),true);
}

Fixed version (ground truth):
public void testTypical() throws IOException {
  String NYC="String_Node_Str";
  TokenStream stream=new WhitespaceTokenizer(TEST_VERSION_CURRENT,new StringReader(NYC));
  ConcatenateFilter filter=new ConcatenateFilter(stream);
  try {
    assertTokenStreamContents(filter,new String[]{NYC},new int[]{0},new int[]{NYC.length()},new String[]{"String_Node_Str"},new int[]{1},null,NYC.length(),true);
  }
 catch (  AssertionError e) {
    if (!e.getMessage().equals("String_Node_Str"))     throw e;
  }
}
Program: 109128
Project: 109128
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setTheme(SettingUtility.getTheme());
  GlobalContext.setActivity(this);
  setContentView(R.layout.activity_main);
  ViewPager pager=(ViewPager)findViewById(R.id.pager);
  pager.setAdapter(new MyPagerAdapter(getSupportFragmentManager()));
  LinePageIndicator mIndicator=(LinePageIndicator)findViewById(R.id.indicator);
  if (SettingUtility.isLightTheme()) {
    mIndicator.setBackgroundColor(Color.WHITE);
  }
  mIndicator.setViewPager(pager);
  if (SettingUtility.enableGTask()) {
    mIndicator.setCurrentItem(1);
  }
  MyUtils.deleteContinueTimes(this);
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setTheme(SettingUtility.getTheme());
  GlobalContext.setActivity(this);
  setContentView(R.layout.activity_main);
  ViewPager pager=(ViewPager)findViewById(R.id.pager);
  pager.setAdapter(new MyPagerAdapter(getSupportFragmentManager()));
  LinePageIndicator mIndicator=(LinePageIndicator)findViewById(R.id.indicator);
  if (SettingUtility.isLightTheme()) {
    mIndicator.setBackgroundColor(Color.WHITE);
  }
  mIndicator.setViewPager(pager);
  mIndicator.setCurrentItem(1);
  MyUtils.deleteContinueTimes(this);
}
Program: 109129
Project: 109129
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  GlobalContext.setActivity(this);
  setContentView(R.layout.preference_activity);
  initCre();
  getListView().setItemsCanFocus(true);
  if (!SettingUtility.isADRemoved()) {
    LinearLayout layout=(LinearLayout)findViewById(R.id.ad_view);
    adsMogoLayout=new AdsMogoLayout(this,"String_Node_Str",false);
    adsMogoLayout.downloadIsShowDialog=true;
    layout.addView(adsMogoLayout);
  }
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  GlobalContext.setActivity(this);
  setContentView(R.layout.preference_activity);
  getListView().setItemsCanFocus(true);
  if (!SettingUtility.isADRemoved()) {
    LinearLayout layout=(LinearLayout)findViewById(R.id.ad_view);
    adsMogoLayout=new AdsMogoLayout(this,"String_Node_Str",false);
    adsMogoLayout.downloadIsShowDialog=true;
    layout.addView(adsMogoLayout);
  }
}
Program: 109130
Project: 109130
Buggy source:
@Override public boolean onPreferenceClick(Preference preference){
  chooseAccount();
  return false;
}

Fixed version (ground truth):
@Override public boolean onPreferenceClick(Preference preference){
  return false;
}
Program: 109132
Project: 109132
Buggy source:
@Override public Fragment getItem(int position){
  if (position == (SettingUtility.enableGTask() ? 1 : 0)) {
    Fragment fragment=new MainFragment();
    return fragment;
  }
 else   if (position == (SettingUtility.enableGTask() ? 2 : 1)) {
    Fragment fragment=new RecordFragment();
    return fragment;
  }
 else {
    Fragment fragment=new TaskListFragment();
    return fragment;
  }
}

Fixed version (ground truth):
@Override public Fragment getItem(int position){
  if (position == 1) {
    Fragment fragment=new MainFragment();
    return fragment;
  }
 else   if (position == 2) {
    Fragment fragment=new RecordFragment();
    return fragment;
  }
 else {
    Fragment fragment=new TaskListFragment();
    return fragment;
  }
}
Program: 109133
Project: 109133
Buggy source:
@Override public int getCount(){
  return SettingUtility.enableGTask() ? 3 : 2;
}

Fixed version (ground truth):
@Override public int getCount(){
  return 3;
}
Program: 109134
Project: 109134
Buggy source:
@Override public void onActivityResult(int requestCode,int resultCode,Intent data){
  super.onActivityResult(requestCode,resultCode,data);
switch (requestCode) {
case REQUEST_GOOGLE_PLAY_SERVICES:
    if (resultCode == Activity.RESULT_OK) {
      try {
        haveGooglePlayServices();
      }
 catch (      IOException e) {
        e.printStackTrace();
      }
    }
 else {
      checkGooglePlayServicesAvailable();
    }
  break;
case REQUEST_AUTHORIZATION:
if (resultCode == Activity.RESULT_OK) {
  SyncDBTasks.run(this);
}
 else {
  chooseAccount();
}
break;
case REQUEST_ACCOUNT_PICKER:
if (resultCode == Activity.RESULT_OK && data != null && data.getExtras() != null) {
String accountName=data.getExtras().getString(AccountManager.KEY_ACCOUNT_NAME);
if (accountName != null) {
credential.setSelectedAccountName(accountName);
SettingUtility.setAccountName(accountName);
SyncDBTasks.run(this);
}
}
break;
}
}

Fixed version (ground truth):
@Override public void onActivityResult(int requestCode,int resultCode,Intent data){
  super.onActivityResult(requestCode,resultCode,data);
switch (requestCode) {
case REQUEST_GOOGLE_PLAY_SERVICES:
    if (resultCode == Activity.RESULT_OK) {
      syncTask();
    }
 else {
      checkGooglePlayServicesAvailable();
    }
  break;
case REQUEST_AUTHORIZATION:
if (resultCode == Activity.RESULT_OK) {
  FragmentAsyncTask.run(this);
}
 else {
  chooseAccount();
}
break;
case REQUEST_ACCOUNT_PICKER:
if (resultCode == Activity.RESULT_OK && data != null && data.getExtras() != null) {
String accountName=data.getExtras().getString(AccountManager.KEY_ACCOUNT_NAME);
if (accountName != null) {
credential.setSelectedAccountName(accountName);
SettingUtility.setAccountName(accountName);
FragmentAsyncTask.run(this);
}
}
break;
}
}
Program: 109135
Project: 109135
Buggy source:
@Override public boolean onLongClick(View arg0){
  SyncDBTasks.run(TaskListFragment.this);
  return true;
}

Fixed version (ground truth):
@Override public boolean onLongClick(View arg0){
  chooseAccount();
  return true;
}
Program: 109136
Project: 109136
Buggy source:
private void initView(){
  TextView tv_title=(TextView)rootView.findViewById(R.id.tv_title_task);
  ImageButton addTaskBTN=(ImageButton)rootView.findViewById(R.id.btn_add_task);
  listView=(ListView)rootView.findViewById(R.id.list_task);
  Typeface roboto=Typeface.createFromAsset(getActivity().getAssets(),"String_Node_Str");
  tv_title.setTypeface(roboto);
  tv_title.setText("String_Node_Str");
  Boolean isLightTheme=SettingUtility.isLightTheme();
  if (isLightTheme) {
    tv_title.setTextColor(Color.BLACK);
    rootView.setBackgroundColor(Color.WHITE);
    addTaskBTN.setBackgroundColor(Color.argb(1,0,0,0));
    addTaskBTN.setImageResource(R.drawable.new_btn_gray);
  }
  addTaskBTN.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View v){
      TaskDialogFragment dialog=new TaskDialogFragment();
      dialog.initDialog(TaskListFragment.this);
      dialog.show(getFragmentManager(),"String_Node_Str");
    }
  }
);
  addTaskBTN.setOnLongClickListener(new OnLongClickListener(){
    @Override public boolean onLongClick(    View arg0){
      SyncDBTasks.run(TaskListFragment.this);
      return true;
    }
  }
);
}

Fixed version (ground truth):
private void initView(){
  TextView tv_title=(TextView)rootView.findViewById(R.id.tv_title_task);
  ImageButton addTaskBTN=(ImageButton)rootView.findViewById(R.id.btn_add_task);
  listView=(ListView)rootView.findViewById(R.id.list_task);
  Typeface roboto=Typeface.createFromAsset(getActivity().getAssets(),"String_Node_Str");
  tv_title.setTypeface(roboto);
  tv_title.setText("String_Node_Str");
  Boolean isLightTheme=SettingUtility.isLightTheme();
  if (isLightTheme) {
    tv_title.setTextColor(Color.BLACK);
    rootView.setBackgroundColor(Color.WHITE);
    addTaskBTN.setBackgroundColor(Color.argb(1,0,0,0));
    addTaskBTN.setImageResource(R.drawable.new_btn_gray);
  }
  addTaskBTN.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View v){
      TaskDialogFragment dialog=new TaskDialogFragment();
      dialog.initDialog(TaskListFragment.this);
      dialog.show(getFragmentManager(),"String_Node_Str");
    }
  }
);
  if (SettingUtility.enableGTask()) {
    addTaskBTN.setOnLongClickListener(new OnLongClickListener(){
      @Override public boolean onLongClick(      View arg0){
        chooseAccount();
        return true;
      }
    }
);
  }
}
Program: 109137
Project: 109137
Buggy source:
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  rootView=inflater.inflate(R.layout.fragment_task,container,false);
  initView();
  showGoogleTask();
  return rootView;
}

Fixed version (ground truth):
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  rootView=inflater.inflate(R.layout.fragment_task,container,false);
  initView();
  refreshView();
  initGoogleTask();
  return rootView;
}
Program: 109138
Project: 109138
Buggy source:
/** 
 * @param configuredMetricPathPrefix Prefix to add to the metric keys. May be null, in which case servers.your_hostname will be used.
 */
public ZabbixMetricMessageBuilder(@Nullable String hostName){
  this.hostName=hostName;
}

Fixed version (ground truth):
/** 
 * @param hostName hostname of the zabbix server
 */
public ZabbixMetricMessageBuilder(@Nullable String hostName){
  this.hostName=hostName;
}
Program: 109139
Project: 109139
Buggy source:
/** 
 * Builds a metric string to send to a Graphite instance.
 * @return The metric string without trailing newline
 */
public String buildMessage(String metricName,Object value,long timestamp){
  String valueToString="String_Node_Str";
  if (value != null) {
    valueToString=value.toString();
  }
  JsonObject jsonValue=new JsonObject();
  jsonValue.add("String_Node_Str",getHostName());
  jsonValue.add("String_Node_Str",metricName);
  jsonValue.add("String_Node_Str",valueToString);
  jsonValue.add("String_Node_Str",timestamp);
  return jsonValue.toString();
}

Fixed version (ground truth):
/** 
 * Builds a metric string to send to a Graphite instance.
 * @return The metric json string without trailing newline
 */
public String buildMessage(String metricName,Object value,long timestamp){
  String valueToString="String_Node_Str";
  if (value != null) {
    valueToString=value.toString();
  }
  JsonObject jsonValue=new JsonObject();
  jsonValue.add("String_Node_Str",getHostName());
  jsonValue.add("String_Node_Str",metricName);
  jsonValue.add("String_Node_Str",valueToString);
  jsonValue.add("String_Node_Str",timestamp);
  return jsonValue.toString();
}
Program: 109140
Project: 109140
Buggy source:
private boolean init(@Nonnull Map<String,String> settings){
  rfc3339.setTimeZone(TimeZone.getTimeZone("String_Node_Str"));
  String projectId=StringUtils2.trimToEmpty(settings.get("String_Node_Str"));
  if (StringUtils2.isNullOrEmpty(projectId)) {
    logger.info("String_Node_Str");
    projectId=getGoogleProjectId();
  }
  if (StringUtils2.isNullOrEmpty(projectId)) {
    logger.log(Level.WARNING,"String_Node_Str");
    return false;
  }
  logger.info("String_Node_Str" + projectId);
  String applicationCredentials=StringUtils2.trimToEmpty(settings.get("String_Node_Str"));
  String serviceAccount=StringUtils2.trimToEmpty(settings.get("String_Node_Str"));
  String serviceAccountKey=StringUtils2.trimToEmpty(settings.get("String_Node_Str"));
  String separator=StringUtils2.trimToEmpty(settings.get("String_Node_Str"));
  this.separator=StringUtils2.isNullOrEmpty(separator) ? "String_Node_Str" : separator;
  String namePrefix=StringUtils2.trimToEmpty(settings.get("String_Node_Str"));
  this.namePrefix=StringUtils2.isNullOrEmpty(namePrefix) ? "String_Node_Str" : namePrefix;
  initStaticLabels(settings);
  return ApiFacade.initConnection(projectId,serviceAccount,serviceAccountKey,applicationCredentials);
}

Fixed version (ground truth):
private boolean init(@Nonnull Map<String,String> settings){
  rfc3339.setTimeZone(TimeZone.getTimeZone("String_Node_Str"));
  cumulativePeriodStart=getNow();
  String projectId=StringUtils2.trimToEmpty(settings.get("String_Node_Str"));
  if (StringUtils2.isNullOrEmpty(projectId)) {
    logger.info("String_Node_Str");
    projectId=getGoogleProjectId();
  }
  if (StringUtils2.isNullOrEmpty(projectId)) {
    logger.log(Level.WARNING,"String_Node_Str");
    return false;
  }
  logger.info("String_Node_Str" + projectId);
  String applicationCredentials=StringUtils2.trimToEmpty(settings.get("String_Node_Str"));
  String serviceAccount=StringUtils2.trimToEmpty(settings.get("String_Node_Str"));
  String serviceAccountKey=StringUtils2.trimToEmpty(settings.get("String_Node_Str"));
  String separator=StringUtils2.trimToEmpty(settings.get("String_Node_Str"));
  this.separator=StringUtils2.isNullOrEmpty(separator) ? "String_Node_Str" : separator;
  String namePrefix=StringUtils2.trimToEmpty(settings.get("String_Node_Str"));
  this.namePrefix=StringUtils2.isNullOrEmpty(namePrefix) ? "String_Node_Str" : namePrefix;
  initStaticLabels(settings);
  return ApiFacade.initConnection(projectId,serviceAccount,serviceAccountKey,applicationCredentials);
}
Program: 109141
Project: 109141
Buggy source:
private void setFromFile(String credentialsFileLocation){
  try {
    JsonObject object=Json.parse(new InputStreamReader(new FileInputStream(credentialsFileLocation))).asObject();
    this.serviceAccount=object.get("String_Node_Str").asString();
    this.privateKey=getPrivateKeyFromString(object.get("String_Node_Str").asString());
  }
 catch (  IOException e) {
    logger.log(Level.SEVERE,"String_Node_Str" + credentialsFileLocation + "String_Node_Str"+ e.getMessage(),e);
  }
}

Fixed version (ground truth):
private void setFromFile(String credentialsFileLocation){
  try {
    JsonObject object=Json.parse(new InputStreamReader(new FileInputStream(credentialsFileLocation),"String_Node_Str")).asObject();
    this.serviceAccount=object.get("String_Node_Str").asString();
    this.privateKey=getPrivateKeyFromString(object.get("String_Node_Str").asString());
  }
 catch (  IOException e) {
    logger.log(Level.SEVERE,"String_Node_Str" + credentialsFileLocation + "String_Node_Str"+ e.getMessage(),e);
  }
}
Program: 109142
Project: 109142
Buggy source:
private byte[] signSHA256withRSA(String value){
  byte[] result=null;
  try {
    Signature signature=Signature.getInstance("String_Node_Str");
    signature.initSign(this.privateKey);
    signature.update(value.getBytes());
    result=signature.sign();
  }
 catch (  Exception var7) {
    logger.log(Level.SEVERE,var7.getMessage(),var7);
  }
  return result;
}

Fixed version (ground truth):
private byte[] signSHA256withRSA(String value){
  byte[] result=null;
  try {
    Signature signature=Signature.getInstance("String_Node_Str");
    signature.initSign(this.privateKey);
    signature.update(value.getBytes(Charset.forName("String_Node_Str")));
    result=signature.sign();
  }
 catch (  Exception var7) {
    logger.log(Level.SEVERE,var7.getMessage(),var7);
  }
  return result;
}