nus-yam/ex-repair huggingface dataset:
Program: 19619
Project: 19619
Buggy source:
public static void moveItems(Inventory iFrom,Inventory iTo,IntMap through){
  ItemStack[] from=iFrom.getContents();
  ItemStack[] to=iTo.getContents();
  int i1, i2;
  for (i1=0; i1 < from.length; i1++) {
    if (from[i1] == null) {
      continue;
    }
    int mapAmount=through.getInt(from[i1].getType(),(byte)from[i1].getDurability());
    int startAmount=from[i1].getAmount();
    if (mapAmount == 0 || mapAmount == Integer.MIN_VALUE) {
      continue;
    }
    int amountToMove=(mapAmount == Integer.MAX_VALUE ? startAmount : mapAmount);
    from[i1].setAmount(from[i1].getAmount() - amountToMove + 1);
    for (i2=0; i2 < to.length; i2++) {
      if (to[i2] == null) {
        to[i2]=from[i1].clone();
        to[i2].setAmount(amountToMove);
        amountToMove=0;
        break;
      }
 else       if (to[i2].getTypeId() == from[i1].getTypeId() && to[i2].getDurability() == from[i1].getDurability() && to[i2].getAmount() < 64) {
        if (amountToMove + to[i2].getAmount() > 64) {
          amountToMove+=to[i2].getAmount() - 64;
          to[i2].setAmount(64);
        }
 else {
          to[i2].setAmount(amountToMove + to[i2].getAmount());
          amountToMove=0;
        }
        break;
      }
    }
    from[i1].setAmount(from[i1].getAmount() + amountToMove - 1);
    through.setInt(from[i1].getType(),(byte)from[i1].getDurability(),amountToMove);
  }
  iTo.setContents(to);
  iFrom.setContents(from);
}

Fixed version (ground truth):
public static void moveItems(Inventory iFrom,Inventory iTo,IntMap through){
  ItemStack[] from=iFrom.getContents();
  ItemStack[] to=iTo.getContents();
  int i1, i2;
  for (i1=0; i1 < from.length; i1++) {
    if (from[i1] == null) {
      continue;
    }
    int mapAmount=through.getInt(from[i1].getType(),(byte)from[i1].getDurability());
    int startAmount=from[i1].getAmount();
    if (mapAmount == 0 || mapAmount == Integer.MIN_VALUE) {
      continue;
    }
    int amountToMove=(mapAmount == Integer.MAX_VALUE ? startAmount : mapAmount);
    from[i1].setAmount(from[i1].getAmount() - amountToMove + 1);
    for (i2=0; i2 < to.length; i2++) {
      if (to[i2] == null) {
        to[i2]=from[i1].clone();
        to[i2].setAmount(amountToMove);
        amountToMove=0;
        break;
      }
 else       if (to[i2].getTypeId() == from[i1].getTypeId() && to[i2].getDurability() == from[i1].getDurability() && to[i2].getAmount() < 64) {
        if (amountToMove + to[i2].getAmount() > 64) {
          amountToMove+=to[i2].getAmount() - 64;
          to[i2].setAmount(64);
          i1--;
        }
 else {
          to[i2].setAmount(amountToMove + to[i2].getAmount());
          amountToMove=0;
        }
        break;
      }
    }
    from[i1].setAmount(from[i1].getAmount() + amountToMove - 1);
    through.setInt(from[i1].getType(),(byte)from[i1].getDurability(),amountToMove);
  }
  iTo.setContents(to);
  iFrom.setContents(from);
}
Program: 19620
Project: 19620
Buggy source:
private static int getIntIndex(Material m,byte data){
switch (data) {
case 0:
    return m.ordinal();
default :
switch (m) {
case SAPLING:
    if (data < 3)     return materialSize + (int)data;
 else     return -1;
case LOG:
  if (data < 3)   return materialSize + (int)data + 2;
 else   return -1;
case LEAVES:
if (data < 3) return materialSize + (int)data + 4;
 else return -1;
case WOOL:
if (data < 16) return materialSize + (int)data + 19;
 else return -1;
case INK_SACK:
if (data < 16) return materialSize + (int)data + 34;
 else return -1;
case COAL:
if (data < 2) return materialSize + (int)data + 49;
 else return -1;
default :
return m.ordinal();
}
}
}

Fixed version (ground truth):
private static int getIntIndex(Material m,byte data){
  if (m == null) {
    return -1;
  }
switch (data) {
case 0:
    return m.ordinal();
default :
switch (m) {
case SAPLING:
    if (data < 3)     return materialSize + (int)data;
 else     return -1;
case LOG:
  if (data < 3)   return materialSize + (int)data + 2;
 else   return -1;
case LEAVES:
if (data < 3) return materialSize + (int)data + 4;
 else return -1;
case WOOL:
if (data < 16) return materialSize + (int)data + 19;
 else return -1;
case INK_SACK:
if (data < 16) return materialSize + (int)data + 34;
 else return -1;
case COAL:
if (data < 2) return materialSize + (int)data + 49;
 else return -1;
case STEP:
if (data < 4) return materialSize + (int)data + 50;
 else return -1;
default :
return m.ordinal();
}
}
}
Program: 19622
Project: 19622
Buggy source:
/** 
 * Sets a range of the IntMap prevents multiple calls to IntMap and back
 */
public boolean setRange(int startId,byte startdata,int endId,byte enddata,int value){
  if (startdata < -1 || enddata < -1 || startId > endId || (startdata > 0 && !hasDataValue(startId)) || (enddata > 0 && !hasDataValue(endId)) || !isAllowedMaterial(startId,startdata) || !isAllowedMaterial(endId,enddata))   return false;
  if (startId <= endId) {
    if (startdata >= 0 && enddata >= 0) {
      setDataRange(startId,startdata,(byte)15,value);
      startId++;
      setDataRange(endId,(byte)0,enddata,value);
      endId--;
    }
 else     if (startdata == -1 && enddata >= 0) {
      setDataRange(endId,(byte)0,enddata,value);
      endId--;
    }
 else     if (startdata >= 0 && enddata == -1) {
      setDataRange(startId,startdata,(byte)15,value);
      startId++;
    }
    while (startId <= endId) {
      if (hasDataValue(startId)) {
        setDataRange(startId,(byte)0,(byte)15,value);
      }
 else {
        setInt(startId,(byte)0,value);
      }
      do {
        startId++;
      }
 while (!isAllowedMaterial(startId,(byte)0));
    }
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
/** 
 * Sets a range of the IntMap prevents multiple calls to IntMap and back
 */
public boolean setRange(int startId,byte startdata,int endId,byte enddata,int value){
  if (startdata < -1 || enddata < -1 || startId > endId || (startdata > 0 && !hasDataValue(startId)) || (enddata > 0 && !hasDataValue(endId)) || !isAllowedMaterial(startId,startdata) || !isAllowedMaterial(endId,enddata))   return false;
  if (startId < endId) {
    if (startdata >= 0 && enddata >= 0) {
      setDataRange(startId,startdata,(byte)15,value);
      startId++;
      setDataRange(endId,(byte)0,enddata,value);
      endId--;
    }
 else     if (startdata == -1 && enddata >= 0) {
      setDataRange(endId,(byte)0,enddata,value);
      endId--;
    }
 else     if (startdata >= 0 && enddata == -1) {
      setDataRange(startId,startdata,(byte)15,value);
      startId++;
    }
    while (startId <= endId) {
      if (hasDataValue(startId)) {
        setDataRange(startId,(byte)0,(byte)15,value);
      }
 else {
        setInt(startId,(byte)0,value);
      }
      do {
        startId++;
      }
 while (!isAllowedMaterial(startId,(byte)0));
    }
    return true;
  }
 else   if (startId == endId) {
    if (startdata < enddata && hasDataValue(startId)) {
      setDataRange(startId,startdata,enddata,value);
      return true;
    }
    return false;
  }
 else {
    return false;
  }
}
Program: 19623
Project: 19623
Buggy source:
public static Action parseAction(String line){
  if (line.length() > 0) {
    if (Character.isDigit(line.charAt(0)) || line.charAt(0) == '[' || line.charAt(0) == '!') {
      return Action.ITEM;
    }
switch (line.charAt(0)) {
case 'c':
      if (line.equals("String_Node_Str")) {
        return Action.COLLECT;
      }
    return Action.NULL;
case 'd':
  if (line.equals("String_Node_Str")) {
    return Action.DEPOSIT;
  }
return Action.NULL;
case 'a':
if (line.equals("String_Node_Str")) {
return Action.ALL;
}
return Action.NULL;
default :
return Action.NULL;
}
}
 else {
return Action.NULL;
}
}

Fixed version (ground truth):
public static Action parseAction(String line){
  if (line.length() > 0) {
    if (Character.isDigit(line.charAt(0))) {
      return Action.ITEM;
    }
 else {
switch (line.charAt(0)) {
case '[':
case '!':
case 'n':
case 's':
case 'w':
case 'e':
case 'N':
case 'S':
case 'W':
case 'E':
        return Action.ITEM;
default :
    }
  }
switch (line.charAt(0)) {
case 'c':
    if (line.equals("String_Node_Str")) {
      return Action.COLLECT;
    }
  return Action.NULL;
case 'd':
if (line.equals("String_Node_Str")) {
  return Action.DEPOSIT;
}
return Action.NULL;
case 'a':
if (line.equals("String_Node_Str")) {
return Action.ALL;
}
return Action.NULL;
default :
return Action.NULL;
}
}
 else {
return Action.NULL;
}
}
Program: 19625
Project: 19625
Buggy source:
public static HashMap<Action,IntMap> parseSign(Sign sign,Minecart cart,Direction direction){
  log.info("String_Node_Str");
  Action oldAction=Action.NULL;
  HashMap<Action,IntMap> returnData=new HashMap<Action,IntMap>();
  IntMap map;
  for (  String line : sign.getLines()) {
    Action newAction=SignParser.parseAction(line);
    log.info(newAction.toString());
    if (newAction == Action.NULL) {
      continue;
    }
 else     if (newAction != Action.ITEM && newAction != Action.ALL) {
      oldAction=newAction;
      continue;
    }
 else     if (oldAction != Action.NULL) {
switch (oldAction) {
case DEPOSIT:
case COLLECT:
        log.info("String_Node_Str" + oldAction.toString());
      log.info("String_Node_Str" + line);
switch (newAction) {
case ALL:
      if (returnData.containsKey(oldAction)) {
        map=returnData.get(oldAction);
        map.fillAll();
        returnData.put(oldAction,map);
      }
 else {
        map=new IntMap();
        map.fillAll();
        returnData.put(oldAction,map);
      }
    break;
case ITEM:
  IntMap parsed=buildIntMap(line,cart,direction);
if (parsed != null) {
  if (returnData.containsKey(oldAction)) {
    map=returnData.get(oldAction);
    map.combine(parsed);
    returnData.put(oldAction,map);
  }
 else {
    if (parsed != null)     returnData.put(oldAction,parsed);
  }
}
break;
default :
break;
}
break;
default :
break;
}
}
 else {
continue;
}
}
return returnData;
}

Fixed version (ground truth):
public static HashMap<Action,IntMap> parseSign(Sign sign,Minecart cart,Direction direction){
  log.info("String_Node_Str");
  Bukkit.getServer().broadcastMessage("String_Node_Str" + direction.toString());
  Action oldAction=Action.NULL;
  HashMap<Action,IntMap> returnData=new HashMap<Action,IntMap>();
  IntMap map;
  for (  String line : sign.getLines()) {
    removeBrackets(line);
    Action newAction=SignParser.parseAction(line);
    log.info(newAction.toString());
    if (newAction == Action.NULL) {
      continue;
    }
 else     if (newAction != Action.ITEM && newAction != Action.ALL) {
      oldAction=newAction;
      continue;
    }
 else     if (oldAction != Action.NULL) {
switch (oldAction) {
case DEPOSIT:
case COLLECT:
        log.info("String_Node_Str" + oldAction.toString());
      log.info("String_Node_Str" + line);
switch (newAction) {
case ALL:
      if (returnData.containsKey(oldAction)) {
        map=returnData.get(oldAction);
        map.fillAll();
        returnData.put(oldAction,map);
      }
 else {
        map=new IntMap();
        map.fillAll();
        returnData.put(oldAction,map);
      }
    break;
case ITEM:
  IntMap parsed=buildIntMap(line,cart,direction);
if (parsed != null) {
  if (returnData.containsKey(oldAction)) {
    map=returnData.get(oldAction);
    map.combine(parsed);
    returnData.put(oldAction,map);
  }
 else {
    if (parsed != null)     returnData.put(oldAction,parsed);
  }
}
break;
default :
break;
}
break;
default :
break;
}
}
 else {
continue;
}
}
return returnData;
}
Program: 19626
Project: 19626
Buggy source:
/** 
 * Checks whereather the cart is moving at a very small pace and needs to be stopped to prevent unnececary server load.
 * @param cart
 * @return true if the cart was stopped, false if nothing was changed.
 */
public static final boolean stoppedSlowCart(Minecart cart,Vector velocity){
switch (Direction.getVerticalDirection(velocity)) {
case DOWN:
case UP:
    return false;
}
if (MathUtil.abs(velocity.getX()) < min_movement && MathUtil.abs(velocity.getZ()) < min_movement) {
  velocity.setX(0);
  velocity.setZ(0);
  cart.setVelocity(velocity);
  return true;
}
return false;
}

Fixed version (ground truth):
/** 
 * Checks whereather the cart is moving at a very small pace and needs to be stopped to prevent unnececary server load.
 * @param cart
 * @return true if the cart was stopped, false if nothing was changed.
 */
public static final boolean stoppedSlowCart(Minecart cart,Vector velocity){
switch (Direction.getVerticalDirection(cart.getLocation())) {
case DOWN:
case UP:
    return false;
}
if (MathUtil.abs(velocity.getX()) < min_movement && MathUtil.abs(velocity.getZ()) < min_movement) {
  velocity.setX(0);
  velocity.setZ(0);
  cart.setVelocity(velocity);
  return true;
}
return false;
}
Program: 19627
Project: 19627
Buggy source:
public static Action parseAction(String line){
  if (line.length() > 0) {
    if (Character.isDigit(line.charAt(0))) {
      return Action.ITEM;
    }
 else {
switch (line.charAt(0)) {
case '[':
case '!':
case 'n':
case 's':
case 'w':
case 'e':
case 'N':
case 'S':
case 'W':
case 'E':
        return Action.ITEM;
default :
    }
  }
switch (line.charAt(0)) {
case 'c':
    if (line.equals("String_Node_Str")) {
      return Action.COLLECT;
    }
  return Action.NULL;
case 'd':
if (line.equals("String_Node_Str")) {
  return Action.DEPOSIT;
}
return Action.NULL;
case 'a':
if (line.equals("String_Node_Str")) {
return Action.ALL;
}
return Action.NULL;
default :
return Action.NULL;
}
}
 else {
return Action.NULL;
}
}

Fixed version (ground truth):
public static Action parseAction(String line){
  if (line == null) {
    return Action.NULL;
  }
  if (line.length() > 0) {
    if (Character.isDigit(line.charAt(0))) {
      return Action.ITEM;
    }
 else {
switch (line.charAt(0)) {
case '[':
case '!':
case 'n':
case 's':
case 'w':
case 'e':
case 'N':
case 'S':
case 'W':
case 'E':
        return Action.ITEM;
default :
    }
  }
switch (line.charAt(0)) {
case 'c':
    if (line.equals("String_Node_Str")) {
      return Action.COLLECT;
    }
  return Action.NULL;
case 'd':
if (line.equals("String_Node_Str")) {
  return Action.DEPOSIT;
}
return Action.NULL;
case 'a':
if (line.equals("String_Node_Str")) {
return Action.ALL;
}
return Action.NULL;
default :
return Action.NULL;
}
}
 else {
return Action.NULL;
}
}
Program: 19628
Project: 19628
Buggy source:
public static Action parseAction(String line){
  if (line == null) {
    return Action.NULL;
  }
  if (line.length() > 0) {
    if (Character.isDigit(line.charAt(0))) {
      return Action.ITEM;
    }
 else {
switch (line.charAt(0)) {
case '[':
case '!':
case 'n':
case 's':
case 'w':
case 'e':
case 'N':
case 'S':
case 'W':
case 'E':
        return Action.ITEM;
default :
    }
  }
switch (line.charAt(0)) {
case 'c':
    if (line.equals("String_Node_Str")) {
      return Action.COLLECT;
    }
  return Action.NULL;
case 'd':
if (line.equals("String_Node_Str")) {
  return Action.DEPOSIT;
}
return Action.NULL;
case 'a':
if (line.equals("String_Node_Str")) {
return Action.ALL;
}
return Action.NULL;
default :
return Action.NULL;
}
}
 else {
return Action.NULL;
}
}

Fixed version (ground truth):
public static Action parseAction(String line){
  if (line == null) {
    return Action.NULL;
  }
  line=line.toLowerCase();
  if (line.length() > 0) {
    if (Character.isDigit(line.charAt(0))) {
      return Action.ITEM;
    }
 else {
switch (line.charAt(0)) {
case '[':
case '!':
case 'n':
case 's':
case 'w':
case 'e':
case 'N':
case 'S':
case 'W':
case 'E':
        return Action.ITEM;
default :
    }
  }
switch (line.charAt(0)) {
case 'c':
    if (line.equals("String_Node_Str")) {
      return Action.COLLECT;
    }
  return Action.NULL;
case 'd':
if (line.equals("String_Node_Str")) {
  return Action.DEPOSIT;
}
return Action.NULL;
case 'a':
if (line.equals("String_Node_Str")) {
return Action.ALL;
}
return Action.NULL;
default :
return Action.NULL;
}
}
 else {
return Action.NULL;
}
}
Program: 19630
Project: 19630
Buggy source:
public boolean setInt(int id,byte data,int value){
  Bukkit.getServer().broadcastMessage("String_Node_Str");
  if (hasDataValue(id) && data == (byte)-1) {
    setDataRange(id,(byte)0,(byte)15,value);
    Bukkit.getServer().broadcastMessage("String_Node_Str" + id);
  }
 else {
    int intLocation=IntMap.getIntIndex(id,data);
    if (intLocation == -1) {
      return false;
    }
    mapData[intLocation]=value;
    Bukkit.getServer().broadcastMessage("String_Node_Str" + mapData[intLocation] + "String_Node_Str");
  }
  return true;
}

Fixed version (ground truth):
public boolean setInt(int id,byte data,int value){
  if (hasDataValue(id) && data == (byte)-1) {
    setDataRange(id,(byte)0,(byte)15,value);
  }
 else {
    int intLocation=IntMap.getIntIndex(id,data);
    if (intLocation == -1) {
      return false;
    }
    mapData[intLocation]=value;
  }
  return true;
}
Program: 19631
Project: 19631
Buggy source:
private static int getIntIndex(Material m,byte data){
switch (data) {
case 0:
    return m.ordinal();
default :
switch (m) {
case SAPLING:
    if (data < 3)     return materialSize + (int)data;
 else     return -1;
case LOG:
  if (data < 3)   return materialSize + (int)data + 2;
 else   return -1;
case LEAVES:
if (data < 3) return materialSize + (int)data + 4;
 else return -1;
case WOOL:
if (data < 15) return materialSize + (int)data + 18;
 else return -1;
case INK_SACK:
if (data < 15) return materialSize + (int)data + 32;
 else return -1;
default :
return m.ordinal();
}
}
}

Fixed version (ground truth):
private static int getIntIndex(Material m,byte data){
switch (data) {
case 0:
    return m.ordinal();
default :
switch (m) {
case SAPLING:
    if (data < 3)     return materialSize + (int)data;
 else     return -1;
case LOG:
  if (data < 3)   return materialSize + (int)data + 2;
 else   return -1;
case LEAVES:
if (data < 3) return materialSize + (int)data + 4;
 else return -1;
case WOOL:
if (data < 16) return materialSize + (int)data + 19;
 else return -1;
case INK_SACK:
if (data < 16) return materialSize + (int)data + 34;
 else return -1;
default :
return m.ordinal();
}
}
}
Program: 19632
Project: 19632
Buggy source:
private IntMap(int[] data){
  if (data.length != 537) {
    mapData=new int[537];
  }
 else {
    mapData=data;
  }
}

Fixed version (ground truth):
private IntMap(int[] data){
  if (data.length != (materialSize + 49)) {
    mapData=new int[materialSize + 49];
  }
 else {
    mapData=data;
  }
}
Program: 19634
Project: 19634
Buggy source:
public static HashMap<Action,IntMap> parseSign(Sign sign,Minecart cart,Direction direction){
  log.info("String_Node_Str");
  Bukkit.getServer().broadcastMessage("String_Node_Str" + direction.toString());
  Action oldAction=Action.NULL;
  HashMap<Action,IntMap> returnData=new HashMap<Action,IntMap>();
  IntMap map;
  for (  String line : sign.getLines()) {
    removeBrackets(line);
    Action newAction=SignParser.parseAction(line);
    log.info(newAction.toString());
    if (newAction == Action.NULL) {
      continue;
    }
 else     if (newAction != Action.ITEM && newAction != Action.ALL) {
      oldAction=newAction;
      continue;
    }
 else     if (oldAction != Action.NULL) {
switch (oldAction) {
case DEPOSIT:
case COLLECT:
        log.info("String_Node_Str" + oldAction.toString());
      log.info("String_Node_Str" + line);
switch (newAction) {
case ALL:
      if (returnData.containsKey(oldAction)) {
        map=returnData.get(oldAction);
        map.fillAll();
        returnData.put(oldAction,map);
      }
 else {
        map=new IntMap();
        map.fillAll();
        returnData.put(oldAction,map);
      }
    break;
case ITEM:
  IntMap parsed=buildIntMap(line,cart,direction);
if (parsed != null) {
  if (returnData.containsKey(oldAction)) {
    map=returnData.get(oldAction);
    map.combine(parsed);
    returnData.put(oldAction,map);
  }
 else {
    if (parsed != null)     returnData.put(oldAction,parsed);
  }
}
break;
default :
break;
}
break;
default :
break;
}
}
 else {
continue;
}
}
return returnData;
}

Fixed version (ground truth):
public static HashMap<Action,IntMap> parseSign(Sign sign,Minecart cart,Direction direction){
  Action oldAction=Action.NULL;
  HashMap<Action,IntMap> returnData=new HashMap<Action,IntMap>();
  IntMap map;
  for (  String line : sign.getLines()) {
    removeBrackets(line);
    Action newAction=SignParser.parseAction(line);
    if (newAction == Action.NULL) {
      continue;
    }
 else     if (newAction != Action.ITEM && newAction != Action.ALL) {
      oldAction=newAction;
      continue;
    }
 else     if (oldAction != Action.NULL) {
switch (oldAction) {
case DEPOSIT:
case COLLECT:
switch (newAction) {
case ALL:
          if (returnData.containsKey(oldAction)) {
            map=returnData.get(oldAction);
            map.fillAll();
            returnData.put(oldAction,map);
          }
 else {
            map=new IntMap();
            map.fillAll();
            returnData.put(oldAction,map);
          }
        break;
case ITEM:
      IntMap parsed=buildIntMap(line,direction);
    if (parsed != null) {
      if (returnData.containsKey(oldAction)) {
        map=returnData.get(oldAction);
        map.combine(parsed);
        returnData.put(oldAction,map);
      }
 else {
        if (parsed != null)         returnData.put(oldAction,parsed);
      }
    }
  break;
default :
break;
}
break;
default :
break;
}
}
 else {
continue;
}
}
return returnData;
}
Program: 19638
Project: 19638
Buggy source:
/** 
 * Sets a range of the IntMap prevents multiple calls to IntMap and back
 */
public boolean setRange(int startId,byte startdata,int endId,byte enddata,int value){
  if (startdata < 0 || enddata < 0 || startId < endId || (startdata > 0 && !hasDataValue(startId)) || (enddata > 0 && !hasDataValue(endId)) || !isAllowedMaterial(startId,startdata) || !isAllowedMaterial(endId,enddata))   return false;
  if (startId < endId) {
    if (startdata != 0) {
      setDataRange(startId,startdata,(byte)15,value);
      startId++;
    }
    if (enddata != 0) {
      setDataRange(endId,(byte)0,enddata,value);
      endId--;
    }
    while (startId <= endId) {
      if (hasDataValue(startId)) {
        setDataRange(startId,(byte)0,(byte)15,value);
      }
 else {
        setInt(startId,(byte)0,value);
      }
      do {
        startId++;
      }
 while (!isAllowedMaterial(startId,(byte)0));
    }
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
/** 
 * Sets a range of the IntMap prevents multiple calls to IntMap and back
 */
public boolean setRange(int startId,byte startdata,int endId,byte enddata,int value){
  if (startdata < 0 || enddata < 0 || startId > endId || (startdata > 0 && !hasDataValue(startId)) || (enddata > 0 && !hasDataValue(endId)) || !isAllowedMaterial(startId,startdata) || !isAllowedMaterial(endId,enddata))   return false;
  if (startId <= endId) {
    if (startdata != 0 && enddata != 0) {
      setDataRange(startId,startdata,(byte)15,value);
      startId++;
      setDataRange(endId,(byte)0,enddata,value);
      endId--;
    }
 else     if (startdata == 0 && enddata != 0) {
      setDataRange(endId,(byte)0,enddata,value);
      endId--;
    }
 else     if (startdata != 0 && enddata == 0) {
      setDataRange(startId,startdata,(byte)15,value);
      startId++;
    }
    while (startId <= endId) {
      if (hasDataValue(startId)) {
        setDataRange(startId,(byte)0,(byte)15,value);
      }
 else {
        setInt(startId,(byte)0,value);
      }
      do {
        startId++;
      }
 while (!isAllowedMaterial(startId,(byte)0));
    }
    return true;
  }
 else {
    return false;
  }
}
Program: 19639
Project: 19639
Buggy source:
public boolean setInt(int id,byte data,int value){
  int intLocation=IntMap.getIntIndex(id,data);
  Bukkit.getServer().broadcastMessage("String_Node_Str");
  if (intLocation == -1) {
    return false;
  }
  mapData[intLocation]=value;
  Bukkit.getServer().broadcastMessage("String_Node_Str" + mapData[intLocation] + "String_Node_Str");
  return true;
}

Fixed version (ground truth):
public boolean setInt(int id,byte data,int value){
  Bukkit.getServer().broadcastMessage("String_Node_Str");
  if (hasDataValue(id) && data == (byte)0) {
    setDataRange(id,(byte)0,(byte)15,value);
    Bukkit.getServer().broadcastMessage("String_Node_Str" + id);
  }
 else {
    int intLocation=IntMap.getIntIndex(id,data);
    if (intLocation == -1) {
      return false;
    }
    mapData[intLocation]=value;
    Bukkit.getServer().broadcastMessage("String_Node_Str" + mapData[intLocation] + "String_Node_Str");
  }
  return true;
}
Program: 19641
Project: 19641
Buggy source:
private void parseSign(Sign sign,Minecart cart,Direction direction){
  if (SignParser.checkStorageCart(cart)) {
    StorageMinecart storageCart=(StorageMinecart)cart;
    HashMap<SignParser.Action,IntMap> dataMap=SignParser.parseSign(sign,storageCart);
    List<Chest> chests;
    for (    Map.Entry<SignParser.Action,IntMap> entry : dataMap.entrySet()) {
      if (entry.getValue() == null)       continue;
switch (entry.getKey()) {
case COLLECT:
        chests=ChestUtil.getChestsAroundBlock(sign.getBlock(),1);
      for (      Chest c : chests) {
        c.getInventory().setContents(ChestUtil.putItems(c.getInventory().getContents(),(ContainerBlock)storageCart,entry.getValue()));
      }
    break;
case DEPOSIT:
  chests=ChestUtil.getChestsAroundBlock(sign.getBlock(),1);
for (Chest c : chests) {
  storageCart.getInventory().setContents(ChestUtil.putItems(storageCart.getInventory().getContents(),(ContainerBlock)c,entry.getValue()));
}
break;
}
}
}
}

Fixed version (ground truth):
private void parseSign(Sign sign,Minecart cart,Direction direction){
  HashMap<SignParser.Action,IntMap> dataMap=SignParser.parseSign(sign,cart,direction);
  if (SignParser.checkStorageCart(cart)) {
    StorageMinecart storageCart=(StorageMinecart)cart;
    List<Chest> chests;
    for (    Map.Entry<SignParser.Action,IntMap> entry : dataMap.entrySet()) {
      if (entry.getValue() == null)       continue;
switch (entry.getKey()) {
case COLLECT:
        chests=ChestUtil.getChestsAroundBlock(sign.getBlock(),1);
      for (      Chest c : chests) {
        ChestUtil.moveItems(c.getInventory(),storageCart.getInventory(),entry.getValue());
      }
    break;
case DEPOSIT:
  chests=ChestUtil.getChestsAroundBlock(sign.getBlock(),1);
for (Chest c : chests) {
  ChestUtil.moveItems(storageCart.getInventory(),c.getInventory(),entry.getValue());
}
break;
}
}
}
}
Program: 19643
Project: 19643
Buggy source:
public static HashMap<Action,IntMap> parseSign(Sign sign,Minecart cart){
  Bukkit.getServer().broadcastMessage("String_Node_Str");
  Action oldAction=Action.NULL;
  HashMap<Action,IntMap> returnData=new HashMap<Action,IntMap>();
  IntMap map;
  for (  String line : sign.getLines()) {
    Action newAction=SignParser.parseAction(line);
    Bukkit.getServer().broadcastMessage(newAction.toString());
    if (newAction == Action.NULL) {
      continue;
    }
 else     if (newAction != Action.ITEM) {
      oldAction=newAction;
      continue;
    }
 else     if (oldAction != Action.NULL) {
switch (oldAction) {
case DEPOSIT:
case COLLECT:
        Bukkit.getServer().broadcastMessage("String_Node_Str" + oldAction.toString());
      Bukkit.getServer().broadcastMessage("String_Node_Str" + line);
    IntMap parsed=buildIntMap(line,cart);
  if (parsed != null) {
    if (returnData.containsKey(oldAction)) {
      map=returnData.get(oldAction);
      map.combine(parsed);
      returnData.put(oldAction,map);
    }
 else {
      returnData.put(oldAction,parsed);
    }
  }
break;
default :
break;
}
}
 else {
continue;
}
}
return returnData;
}

Fixed version (ground truth):
public static HashMap<Action,IntMap> parseSign(Sign sign,Minecart cart,Direction direction){
  Bukkit.getServer().broadcastMessage("String_Node_Str");
  Action oldAction=Action.NULL;
  HashMap<Action,IntMap> returnData=new HashMap<Action,IntMap>();
  IntMap map;
  for (  String line : sign.getLines()) {
    Action newAction=SignParser.parseAction(line);
    Bukkit.getServer().broadcastMessage(newAction.toString());
    if (newAction == Action.NULL) {
      continue;
    }
 else     if (newAction != Action.ITEM) {
      oldAction=newAction;
      continue;
    }
 else     if (oldAction != Action.NULL) {
switch (oldAction) {
case DEPOSIT:
case COLLECT:
        Bukkit.getServer().broadcastMessage("String_Node_Str" + oldAction.toString());
      Bukkit.getServer().broadcastMessage("String_Node_Str" + line);
    IntMap parsed=buildIntMap(line,cart,direction);
  if (parsed != null) {
    if (returnData.containsKey(oldAction)) {
      map=returnData.get(oldAction);
      map.combine(parsed);
      returnData.put(oldAction,map);
    }
 else {
      if (parsed != null)       returnData.put(oldAction,parsed);
    }
  }
break;
default :
break;
}
}
 else {
continue;
}
}
return returnData;
}
Program: 19644
Project: 19644
Buggy source:
public static ItemStack[] putItems(ItemStack[] from,ContainerBlock containerBlock,IntMap through){
  ItemStack[] to=containerBlock.getInventory().getContents();
  for (int i1=0; i1 < from.length; i1++) {
    if (from[i1] == null)     continue;
    int mapAmount=through.amount(from[i1].getType(),(byte)from[i1].getDurability());
    int startAmount=from[i1].getAmount();
    if (mapAmount == 0)     continue;
    if (mapAmount == Integer.MAX_VALUE || from[i1].getAmount() < mapAmount) {
      for (int i2=0; i2 < to.length; i2++) {
        if (to[i2] == null) {
          to[i2]=from[i1];
          from[i1]=null;
          break;
        }
 else         if (to[i2].getTypeId() == from[i1].getTypeId() && to[i2].getDurability() == from[i1].getDurability() && to[i2].getAmount() < 64) {
          if ((from[i1].getAmount() + to[i2].getAmount()) > 64) {
            from[i1].setAmount((to[i2].getAmount() + from[i1].getAmount()) - 64);
            to[i2].setAmount(64);
          }
 else {
            to[i2].setAmount(to[i2].getAmount() + from[i1].getAmount());
            from[i1]=null;
          }
          break;
        }
      }
      if (mapAmount != Integer.MAX_VALUE) {
        if (from[i1] == null) {
          through.setInt(from[i1].getType(),(byte)from[i1].getDurability(),mapAmount - startAmount);
        }
 else {
          through.setInt(from[i1].getType(),(byte)from[i1].getDurability(),mapAmount - startAmount + from[i1].getAmount());
        }
      }
    }
 else {
      from[i1].setAmount(from[i1].getAmount() - mapAmount);
      for (int i2=0; i2 < to.length; i2++) {
        if (to[i2] == null) {
          to[i2]=from[i1];
          to[i2].setAmount(mapAmount);
          mapAmount=0;
          break;
        }
 else         if (to[i2].getTypeId() == from[i1].getTypeId() && to[i2].getDurability() == from[i1].getDurability() && to[i2].getAmount() < 64) {
          if (mapAmount + to[i2].getAmount() > 64) {
            to[i2].setAmount(64);
            mapAmount=(mapAmount + to[i2].getAmount()) - 64;
          }
 else {
            to[i2].setAmount(mapAmount + to[i2].getAmount());
            mapAmount=0;
          }
          break;
        }
      }
      if (mapAmount != 0) {
        from[i1].setAmount(from[i1].getAmount() + mapAmount);
      }
      through.setInt(from[i1].getType(),(byte)from[i1].getDurability(),mapAmount);
    }
  }
  containerBlock.getInventory().setContents(to);
  return from;
}

Fixed version (ground truth):
public static ItemStack[] putItems(ItemStack from,ContainerBlock containerBlock){
  ItemStack[] stacks={from};
  return putItems(stacks,containerBlock);
}
Program: 19645
Project: 19645
Buggy source:
public void onBlockRedstoneChange(BlockRedstoneEvent event){
}

Fixed version (ground truth):
public void onBlockRedstoneChange(BlockRedstoneEvent event){
  if (event.getNewCurrent() == event.getOldCurrent() || event.getNewCurrent() > 0 & event.getOldCurrent() > 0)   return;
  ArrayList<Block> blockList=BlockMapper.mapBlocks(event.getBlock(),1,Material.POWERED_RAIL);
  for (  Block b : blockList) {
    if ((b.getData() & 0x8) == 0) {
      if (plugin.lockedMinecarts.containsKey(b)) {
        TweakMinecart cart=plugin.lockedMinecarts.get(b);
        plugin.lockedMinecarts.remove(b);
        cart.start();
        cart.boost();
      }
    }
  }
}
Program: 19646
Project: 19646
Buggy source:
public void onVehicleMove(VehicleMoveEvent event){
  if (event.getVehicle() instanceof Minecart) {
    if (tweakMinecarts.containsKey(event.getVehicle())) {
      TweakMinecart cart=tweakMinecarts.get(event.getVehicle());
      if (lockedMinecarts.containsValue(cart)) {
        cart.stop();
      }
    }
 else     if (event.getFrom().getBlock().equals(event.getTo().getBlock())) {
      return;
    }
 else {
      if (event.getTo().getBlock().getType() == Material.POWERED_RAIL) {
        TweakMinecart cart;
        if (tweakMinecarts.containsKey(event.getVehicle())) {
          cart=tweakMinecarts.get(event.getVehicle());
        }
 else {
          cart=new TweakMinecart((Minecart)event.getVehicle());
          tweakMinecarts.put((Minecart)event.getVehicle(),cart);
        }
        Block rail=event.getTo().getBlock();
        if ((rail.getData() & 0x8) > 0) {
          log.info("String_Node_Str");
        }
 else {
          log.info("String_Node_Str");
          cart.stop();
          lockedMinecarts.put(rail,cart);
        }
      }
    }
  }
}

Fixed version (ground truth):
public void onVehicleMove(VehicleMoveEvent event){
  if (event.getVehicle() instanceof Minecart) {
    if (plugin.tweakMinecarts.containsKey(event.getVehicle())) {
      TweakMinecart cart=plugin.tweakMinecarts.get(event.getVehicle());
      if (plugin.lockedMinecarts.containsValue(cart)) {
        cart.stop();
        cart.getCart().teleport(event.getFrom());
        return;
      }
    }
    if (event.getFrom().getBlock().equals(event.getTo().getBlock())) {
      return;
    }
    if (event.getTo().getBlock().getType() == Material.POWERED_RAIL) {
      TweakMinecart cart;
      if (plugin.tweakMinecarts.containsKey(event.getVehicle())) {
        cart=plugin.tweakMinecarts.get(event.getVehicle());
      }
 else {
        cart=new TweakMinecart((Minecart)event.getVehicle());
        plugin.tweakMinecarts.put((Minecart)event.getVehicle(),cart);
      }
      Block rail=event.getTo().getBlock();
      if ((rail.getData() & 0x8) > 0) {
        cart.boost();
      }
 else {
        cart.stop();
        plugin.lockedMinecarts.put(rail,cart);
      }
    }
  }
}
Program: 19647
Project: 19647
Buggy source:
public static void main(String[] args) throws Exception {
  if (args.length == 0) {
    System.out.println("String_Node_Str");
    return;
  }
  File file=new File(args[0]);
  if (!file.exists()) {
    System.out.println("String_Node_Str");
    return;
  }
  SassParser parser=new SassParser(new FileInputStream(file));
  SassSheet sheet=parser.parse();
  SassSheet copy=sheet.copy();
  SassSheetEvaluator evaluator=new SassSheetEvaluator();
  evaluator.addFunction("String_Node_Str",new IFunction(){
    public IPropertyValue evaluate(    List<IPropertyValue> params) throws EvaluationException {
      if ("String_Node_Str".equals(((DefaultPropertyValue)params.get(0)).getValue())) {
        return new DefaultPropertyValue("String_Node_Str");
      }
 else {
        return new DefaultPropertyValue("String_Node_Str");
      }
    }
  }
);
  evaluator.evaluate(copy);
  SassSheetSerializer serializer=new SassSheetSerializer(System.out);
  serializer.render(copy);
}

Fixed version (ground truth):
public static void main(String[] args) throws Exception {
  if (args.length == 0) {
    System.out.println("String_Node_Str");
    return;
  }
  File file=new File(args[0]);
  if (!file.exists()) {
    System.out.println("String_Node_Str");
    return;
  }
  SassParser parser=new SassParser(new FileInputStream(file));
  SassSheet sheet=parser.parse();
  Map<String,INode> variables=sheet.getVariables();
  Map<String,INode> newVariables=new LinkedHashMap<String,INode>();
  newVariables.put("String_Node_Str",new NumberPropertyValue(new BigDecimal(2)));
  newVariables.putAll(variables);
  for (  Map.Entry<String,INode> entry : newVariables.entrySet()) {
    System.out.println(entry.getKey() + "String_Node_Str" + entry.getValue());
  }
  sheet.setVariables(newVariables);
  SassSheet copy=sheet.copy();
  SassSheetEvaluator evaluator=new SassSheetEvaluator();
  evaluator.addFunction("String_Node_Str",new IFunction(){
    public IPropertyValue evaluate(    List<IPropertyValue> params) throws EvaluationException {
      if ("String_Node_Str".equals(((DefaultPropertyValue)params.get(0)).getValue())) {
        return new NumberPropertyValue("String_Node_Str");
      }
 else       if ("String_Node_Str".equals(((DefaultPropertyValue)params.get(0)).getValue())) {
        return new DefaultPropertyValue("String_Node_Str");
      }
 else {
        return new DefaultPropertyValue("String_Node_Str");
      }
    }
  }
);
  evaluator.evaluate(copy);
  SassSheetSerializer serializer=new SassSheetSerializer(System.out);
  serializer.render(copy);
}
Program: 19648
Project: 19648
Buggy source:
public IPropertyValue evaluate(List<IPropertyValue> params) throws EvaluationException {
  if ("String_Node_Str".equals(((DefaultPropertyValue)params.get(0)).getValue())) {
    return new DefaultPropertyValue("String_Node_Str");
  }
 else {
    return new DefaultPropertyValue("String_Node_Str");
  }
}

Fixed version (ground truth):
public IPropertyValue evaluate(List<IPropertyValue> params) throws EvaluationException {
  if ("String_Node_Str".equals(((DefaultPropertyValue)params.get(0)).getValue())) {
    return new NumberPropertyValue("String_Node_Str");
  }
 else   if ("String_Node_Str".equals(((DefaultPropertyValue)params.get(0)).getValue())) {
    return new DefaultPropertyValue("String_Node_Str");
  }
 else {
    return new DefaultPropertyValue("String_Node_Str");
  }
}
Program: 19649
Project: 19649
Buggy source:
public static void main(String[] args) throws Exception {
  if (args.length == 0) {
    System.out.println("String_Node_Str");
    return;
  }
  File file=new File(args[0]);
  if (!file.exists()) {
    System.out.println("String_Node_Str");
    return;
  }
  SassParser parser=new SassParser(new FileInputStream(file));
  SassSheet sheet=parser.parse();
  SassSheet copy=sheet.copy();
  SassSheetEvaluator evaluator=new SassSheetEvaluator();
  evaluator.addFunction("String_Node_Str",new IFunction(){
    public IPropertyValue evaluate(    List<IPropertyValue> params) throws EvaluationException {
      return new DefaultPropertyValue("String_Node_Str");
    }
  }
);
  evaluator.evaluate(copy);
  SassSheetSerializer serializer=new SassSheetSerializer(System.out);
  serializer.render(copy);
}

Fixed version (ground truth):
public static void main(String[] args) throws Exception {
  if (args.length == 0) {
    System.out.println("String_Node_Str");
    return;
  }
  File file=new File(args[0]);
  if (!file.exists()) {
    System.out.println("String_Node_Str");
    return;
  }
  SassParser parser=new SassParser(new FileInputStream(file));
  SassSheet sheet=parser.parse();
  SassSheet copy=sheet.copy();
  SassSheetEvaluator evaluator=new SassSheetEvaluator();
  evaluator.addFunction("String_Node_Str",new IFunction(){
    public IPropertyValue evaluate(    List<IPropertyValue> params) throws EvaluationException {
      return params.get(0);
    }
  }
);
  evaluator.evaluate(copy);
  SassSheetSerializer serializer=new SassSheetSerializer(System.out);
  serializer.render(copy);
}
Program: 19650
Project: 19650
Buggy source:
public IPropertyValue evaluate(List<IPropertyValue> params) throws EvaluationException {
  return new DefaultPropertyValue("String_Node_Str");
}

Fixed version (ground truth):
public IPropertyValue evaluate(List<IPropertyValue> params) throws EvaluationException {
  return params.get(0);
}
Program: 19651
Project: 19651
Buggy source:
private void processRule(Rule rule) throws EvaluationException {
  for (  IncludeDirective include : rule.getIncludes()) {
    Mixin mixin=mixins.get(include.getMixinName());
    if (mixin == null) {
      throw new EvaluationException("String_Node_Str" + include.getMixinName() + "String_Node_Str");
    }
    rule.addSubRules(mixin.getSubRules());
    for (    Property property : mixin.getProperties()) {
      List<INode> newValues=new ArrayList<INode>();
      for (      INode value : property.getValues()) {
        newValues.add(evaluator.evaluate(value,mixin.getParameterMap(include)));
      }
      property.setValues(newValues);
    }
    rule.addProperties(mixin.getProperties());
  }
  for (  Property property : rule.getProperties()) {
    List<INode> newValues=new ArrayList<INode>();
    for (    INode value : property.getValues()) {
      newValues.add(evaluator.evaluate(value,variables));
    }
    property.setValues(newValues);
  }
  rule.setIncludes(new ArrayList<IncludeDirective>());
  ruleList.add(rule);
  for (  Rule subrule : rule.getSubRules()) {
    processRule(subrule);
  }
  rule.setSubRules(new ArrayList<Rule>());
}

Fixed version (ground truth):
private void processRule(Rule rule) throws EvaluationException {
  for (  IncludeDirective include : rule.getIncludes()) {
    Mixin mixin=mixins.get(include.getMixinName());
    if (mixin == null) {
      throw new EvaluationException("String_Node_Str" + include.getMixinName() + "String_Node_Str");
    }
    mixin=mixin.copy();
    reduceMixin(mixin,mixin.getParameterMap(include));
    rule.addSubRules(mixin.getSubRules());
    rule.addProperties(mixin.getProperties());
  }
  for (  Property property : rule.getProperties()) {
    List<INode> newValues=new ArrayList<INode>();
    for (    INode value : property.getValues()) {
      newValues.add(evaluator.evaluate(value,variables));
    }
    property.setValues(newValues);
  }
  rule.setIncludes(new ArrayList<IncludeDirective>());
  ruleList.add(rule);
  for (  Rule subrule : rule.getSubRules()) {
    processRule(subrule);
  }
  rule.setSubRules(new ArrayList<Rule>());
}
Program: 19652
Project: 19652
Buggy source:
@Override public IPropertyValue addOp(StringPropertyValue value2) throws EvaluationException {
  String v1=value1.getValue();
  String v2=value2.getValue();
  return new StringPropertyValue(v2 + v1,value2.getQuoteType());
}

Fixed version (ground truth):
@Override public IPropertyValue addOp(NumberPropertyValue value2) throws EvaluationException {
  String v1=value1.getValue();
  if ("String_Node_Str".equals(v1)) {
  }
 else   if ("String_Node_Str".equals(v1)) {
  }
 else   if ("String_Node_Str".equals(v1)) {
  }
 else {
    throw new EvaluationException("String_Node_Str");
  }
  BigDecimal v2=value2.getValue();
  return new DimensionPropertyValue(v2,v1);
}
Program: 19653
Project: 19653
Buggy source:
private static void scan(List results,File directory){
  if (directory.canRead()) {
    File files[]=directory.listFiles();
    for (int i=0; i < files.length; i++) {
      File file=files[i];
      if (file.isDirectory() && !isLink(file)) {
        scan(results,file);
      }
 else {
        if (file.getName().equals("String_Node_Str")) {
          System.out.println("String_Node_Str" + file);
          results.add(file);
        }
      }
    }
  }
 else {
    System.out.println("String_Node_Str" + directory);
  }
}

Fixed version (ground truth):
private static void scan(List results,File directory){
  if (directory.canRead()) {
    File files[]=directory.listFiles();
    if (files != null) {
      for (int i=0; i < files.length; i++) {
        File file=files[i];
        if (file.isDirectory() && !isLink(file)) {
          scan(results,file);
        }
 else {
          if (file.getName().equals("String_Node_Str")) {
            System.out.println("String_Node_Str" + file);
            results.add(file);
          }
        }
      }
    }
  }
 else {
    System.out.println("String_Node_Str" + directory);
  }
}
Program: 19654
Project: 19654
Buggy source:
@PostConstruct private void update(){
  number=Integer.valueOf(session.get("String_Node_Str"));
  smallest=Integer.valueOf(session.get("String_Node_Str"));
  biggest=Integer.valueOf(session.get("String_Node_Str"));
  remainingGuesses=Integer.valueOf(session.get("String_Node_Str"));
}

Fixed version (ground truth):
@PostConstruct private void update(){
  number=getInSession("String_Node_Str");
  smallest=getInSession("String_Node_Str");
  biggest=getInSession("String_Node_Str");
  remainingGuesses=getInSession("String_Node_Str");
}
Program: 19655
Project: 19655
Buggy source:
/** 
 * This method allows followers to rate their leaders' decisions. The rating is based only on the external strategy followed by the group.
 * @param none
 * @return A map structure containing new trust values for every member of the current panel of the group that this agent belongs to
 */
@Override protected Map<String,Double> updateTrustAfterLeadersHunt(){
  String groupID=getDataModel().getGroupId();
  if (groupID == null)   return null;
  List<String> currentPanel=getConn().getGroupById(groupID).getPanel();
  if (currentPanel.isEmpty() || (currentPanel.contains(getDataModel().getId())))   return null;
  AgentType groupStrategy=getConn().getGroupById(groupID).getGroupStrategy();
  AgentType followerStrategy=getConn().getGroupById(getDataModel().getName()).getGroupStrategy();
  int population=getConn().getGroupById(groupID).getMemberList().size();
  double rating=1 / population;
  Map<String,Double> newTrustValues=new HashMap<String,Double>();
  for (  String panelMember : currentPanel) {
    if (getDataModel().getTrust(panelMember) != null) {
      if (followerStrategy == groupStrategy) {
        double currentTrustForPanelMember=getDataModel().getTrust(panelMember);
        currentTrustForPanelMember=scale(currentTrustForPanelMember,1,rating);
        newTrustValues.put(panelMember,currentTrustForPanelMember);
      }
 else {
        double currentTrustForPanelMember=getDataModel().getTrust(panelMember);
        currentTrustForPanelMember=scale(currentTrustForPanelMember,-1,rating);
        newTrustValues.put(panelMember,currentTrustForPanelMember);
      }
    }
  }
  return newTrustValues;
}

Fixed version (ground truth):
/** 
 * This method allows followers to rate their leaders' decisions. The rating is based only on the external strategy followed by the group.
 * @param none
 * @return A map structure containing new trust values for every member of the current panel of the group that this agent belongs to
 */
@Override protected Map<String,Double> updateTrustAfterLeadersHunt(){
  return null;
}
Program: 19656
Project: 19656
Buggy source:
@Override public int compare(Tuple<AgentType,Double> o1,Tuple<AgentType,Double> o2){
  Double v1=o1.getValue();
  Double v2=o2.getValue();
  return (v1 > v2 ? -1 : 1);
}

Fixed version (ground truth):
@Override public int compare(String o1,String o2){
  return (r.nextBoolean() ? -1 : 1);
}