nus-yam/ex-repair huggingface dataset:
Program: 172809
Project: 172809
Buggy source:
private void create() throws IOException {
  if (isCreate) {
    return;
  }
  ICompressor compressor=FindCompressor.get(columnBinary.compressorClassName);
  byte[] binary=compressor.decompress(columnBinary.binary,binaryStart,binaryLength);
  column=new PrimitiveColumn(columnBinary.columnType,columnBinary.columnName);
  IDicManager dicManager=new RangeDoubleDicManager(primitiveObjectConnector,ByteBuffer.wrap(binary).asDoubleBuffer());
  column.setCellManager(new BufferDirectCellManager(ColumnType.INTEGER,dicManager,columnBinary.rowCount));
  isCreate=true;
}

Fixed version (ground truth):
private void create() throws IOException {
  if (isCreate) {
    return;
  }
  ICompressor compressor=FindCompressor.get(columnBinary.compressorClassName);
  byte[] binary=compressor.decompress(columnBinary.binary,binaryStart,binaryLength);
  column=new PrimitiveColumn(columnBinary.columnType,columnBinary.columnName);
  IDicManager dicManager=new RangeDoubleDicManager(primitiveObjectConnector,ByteBuffer.wrap(binary).asDoubleBuffer());
  column.setCellManager(new BufferDirectCellManager(columnBinary.columnType,dicManager,columnBinary.rowCount));
  isCreate=true;
}
Program: 172810
Project: 172810
Buggy source:
private void create() throws IOException {
  if (isCreate) {
    return;
  }
  ICompressor compressor=FindCompressor.get(columnBinary.compressorClassName);
  byte[] binary=compressor.decompress(columnBinary.binary,binaryStart,binaryLength);
  column=new PrimitiveColumn(columnBinary.columnType,columnBinary.columnName);
  IDicManager dicManager=new RangeFloatDicManager(primitiveObjectConnector,ByteBuffer.wrap(binary).asFloatBuffer());
  column.setCellManager(new BufferDirectCellManager(ColumnType.INTEGER,dicManager,columnBinary.rowCount));
  isCreate=true;
}

Fixed version (ground truth):
private void create() throws IOException {
  if (isCreate) {
    return;
  }
  ICompressor compressor=FindCompressor.get(columnBinary.compressorClassName);
  byte[] binary=compressor.decompress(columnBinary.binary,binaryStart,binaryLength);
  column=new PrimitiveColumn(columnBinary.columnType,columnBinary.columnName);
  IDicManager dicManager=new RangeFloatDicManager(primitiveObjectConnector,ByteBuffer.wrap(binary).asFloatBuffer());
  column.setCellManager(new BufferDirectCellManager(columnBinary.columnType,dicManager,columnBinary.rowCount));
  isCreate=true;
}
Program: 172811
Project: 172811
Buggy source:
private void create() throws IOException {
  if (isCreate) {
    return;
  }
  ICompressor compressor=FindCompressor.get(columnBinary.compressorClassName);
  byte[] binary=compressor.decompress(columnBinary.binary,binaryStart,binaryLength);
  column=new PrimitiveColumn(columnBinary.columnType,columnBinary.columnName);
  IDicManager dicManager=new RangeLongDicManager(primitiveObjectConnector,ByteBuffer.wrap(binary).asLongBuffer());
  column.setCellManager(new BufferDirectCellManager(ColumnType.INTEGER,dicManager,columnBinary.rowCount));
  isCreate=true;
}

Fixed version (ground truth):
private void create() throws IOException {
  if (isCreate) {
    return;
  }
  ICompressor compressor=FindCompressor.get(columnBinary.compressorClassName);
  byte[] binary=compressor.decompress(columnBinary.binary,binaryStart,binaryLength);
  column=new PrimitiveColumn(columnBinary.columnType,columnBinary.columnName);
  IDicManager dicManager=new RangeLongDicManager(primitiveObjectConnector,ByteBuffer.wrap(binary).asLongBuffer());
  column.setCellManager(new BufferDirectCellManager(ColumnType.LONG,dicManager,columnBinary.rowCount));
  isCreate=true;
}
Program: 172812
Project: 172812
Buggy source:
private void create() throws IOException {
  if (isCreate) {
    return;
  }
  ICompressor compressor=FindCompressor.get(columnBinary.compressorClassName);
  byte[] binary=compressor.decompress(columnBinary.binary,binaryStart,binaryLength);
  column=new PrimitiveColumn(columnBinary.columnType,columnBinary.columnName);
  IDicManager dicManager=new RangeShortDicManager(primitiveObjectConnector,ByteBuffer.wrap(binary).asShortBuffer());
  column.setCellManager(new BufferDirectCellManager(ColumnType.INTEGER,dicManager,columnBinary.rowCount));
  isCreate=true;
}

Fixed version (ground truth):
private void create() throws IOException {
  if (isCreate) {
    return;
  }
  ICompressor compressor=FindCompressor.get(columnBinary.compressorClassName);
  byte[] binary=compressor.decompress(columnBinary.binary,binaryStart,binaryLength);
  column=new PrimitiveColumn(columnBinary.columnType,columnBinary.columnName);
  IDicManager dicManager=new RangeShortDicManager(primitiveObjectConnector,ByteBuffer.wrap(binary).asShortBuffer());
  column.setCellManager(new BufferDirectCellManager(ColumnType.SHORT,dicManager,columnBinary.rowCount));
  isCreate=true;
}
Program: 172813
Project: 172813
Buggy source:
private void create() throws IOException {
  if (isCreate) {
    return;
  }
  ICompressor compressor=FindCompressor.get(columnBinary.compressorClassName);
  byte[] binary=compressor.decompress(columnBinary.binary,binaryStart,binaryLength);
  ByteBuffer wrapBuffer=ByteBuffer.wrap(binary);
  PrimitiveObject[] dicArray=new PrimitiveObject[columnBinary.rowCount];
  for (int i=0; i < columnBinary.rowCount; i++) {
    int objLength=wrapBuffer.getInt();
    dicArray[i]=primitiveObjectConnector.convert(PrimitiveType.STRING,new UTF8BytesLinkObj(binary,wrapBuffer.position(),objLength));
    wrapBuffer.position(wrapBuffer.position() + objLength);
  }
  column=new PrimitiveColumn(columnBinary.columnType,columnBinary.columnName);
  IDicManager dicManager=new RangeStringDicManager(dicArray);
  column.setCellManager(new BufferDirectCellManager(ColumnType.INTEGER,dicManager,columnBinary.rowCount));
  isCreate=true;
}

Fixed version (ground truth):
private void create() throws IOException {
  if (isCreate) {
    return;
  }
  ICompressor compressor=FindCompressor.get(columnBinary.compressorClassName);
  byte[] binary=compressor.decompress(columnBinary.binary,binaryStart,binaryLength);
  ByteBuffer wrapBuffer=ByteBuffer.wrap(binary);
  PrimitiveObject[] dicArray=new PrimitiveObject[columnBinary.rowCount];
  for (int i=0; i < columnBinary.rowCount; i++) {
    int objLength=wrapBuffer.getInt();
    dicArray[i]=primitiveObjectConnector.convert(PrimitiveType.STRING,new UTF8BytesLinkObj(binary,wrapBuffer.position(),objLength));
    wrapBuffer.position(wrapBuffer.position() + objLength);
  }
  column=new PrimitiveColumn(columnBinary.columnType,columnBinary.columnName);
  IDicManager dicManager=new RangeStringDicManager(dicArray);
  column.setCellManager(new BufferDirectCellManager(columnBinary.columnType,dicManager,columnBinary.rowCount));
  isCreate=true;
}
Program: 172814
Project: 172814
Buggy source:
@DataProvider(name="String_Node_Str") public Object[][] D_T_addRowNotException(){
  return new Object[][]{{ColumnType.UNION,DumpUnionColumnBinaryMaker.class.getName()},{ColumnType.ARRAY,DumpArrayColumnBinaryMaker.class.getName()},{ColumnType.SPREAD,DumpSpreadColumnBinaryMaker.class.getName()},{ColumnType.BOOLEAN,DumpBooleanColumnBinaryMaker.class.getName()},{ColumnType.BYTE,RangeIndexByteColumnBinaryMaker.class.getName()},{ColumnType.BYTES,DumpBytesColumnBinaryMaker.class.getName()},{ColumnType.DOUBLE,RangeIndexDoubleColumnBinaryMaker.class.getName()},{ColumnType.FLOAT,RangeIndexFloatColumnBinaryMaker.class.getName()},{ColumnType.INTEGER,RangeIndexIntegerColumnBinaryMaker.class.getName()},{ColumnType.LONG,RangeIndexLongColumnBinaryMaker.class.getName()},{ColumnType.SHORT,RangeIndexShortColumnBinaryMaker.class.getName()},{ColumnType.STRING,RangeIndexStringToUTF8BytesColumnBinaryMaker.class.getName()},{ColumnType.NULL,UnsupportedColumnBinaryMaker.class.getName()},{ColumnType.EMPTY_ARRAY,UnsupportedColumnBinaryMaker.class.getName()},{ColumnType.EMPTY_SPREAD,UnsupportedColumnBinaryMaker.class.getName()},{ColumnType.UNKNOWN,UnsupportedColumnBinaryMaker.class.getName()}};
}

Fixed version (ground truth):
@DataProvider(name="String_Node_Str") public Object[][] D_T_addRowNotException(){
  return new Object[][]{{ColumnType.UNION,DumpUnionColumnBinaryMaker.class.getName()},{ColumnType.ARRAY,DumpArrayColumnBinaryMaker.class.getName()},{ColumnType.SPREAD,DumpSpreadColumnBinaryMaker.class.getName()},{ColumnType.BOOLEAN,DumpBooleanColumnBinaryMaker.class.getName()},{ColumnType.BYTE,RangeDumpByteColumnBinaryMaker.class.getName()},{ColumnType.BYTES,DumpBytesColumnBinaryMaker.class.getName()},{ColumnType.DOUBLE,RangeIndexDoubleColumnBinaryMaker.class.getName()},{ColumnType.FLOAT,RangeDumpFloatColumnBinaryMaker.class.getName()},{ColumnType.INTEGER,RangeDumpIntegerColumnBinaryMaker.class.getName()},{ColumnType.LONG,RangeIndexLongColumnBinaryMaker.class.getName()},{ColumnType.SHORT,RangeDumpShortColumnBinaryMaker.class.getName()},{ColumnType.STRING,RangeIndexStringToUTF8BytesColumnBinaryMaker.class.getName()},{ColumnType.NULL,UnsupportedColumnBinaryMaker.class.getName()},{ColumnType.EMPTY_ARRAY,UnsupportedColumnBinaryMaker.class.getName()},{ColumnType.EMPTY_SPREAD,UnsupportedColumnBinaryMaker.class.getName()},{ColumnType.UNKNOWN,UnsupportedColumnBinaryMaker.class.getName()}};
}
Program: 172815
Project: 172815
Buggy source:
@Override public boolean next(final NullWritable key,final VectorizedRowBatch outputBatch) throws IOException {
  outputBatch.reset();
  if (!isPartitionSetting) {
    setting.setPartitionValues(outputBatch);
    isPartitionSetting=true;
  }
  if (indexSize <= currentIndex) {
    if (!currentReader.hasNext()) {
      updateCounter(currentReader.getReadStats());
      outputBatch.endOfFile=true;
      isEnd=true;
      return false;
    }
    while (!setSpread()) {
      if (!currentReader.hasNext()) {
        updateCounter(currentReader.getReadStats());
        outputBatch.endOfFile=true;
        isEnd=true;
        return false;
      }
    }
  }
  int maxSize=outputBatch.getMaxSize();
  if (indexSize < currentIndex + maxSize) {
    maxSize=indexSize - currentIndex;
  }
  for (  int colIndex : needColumnIds) {
    assignors[colIndex].setColumnVector(outputBatch.cols[colIndex],currentIndexList,currentIndex,maxSize);
  }
  outputBatch.size=maxSize;
  currentIndex+=maxSize;
  if (indexSize <= currentIndex && !currentReader.hasNext()) {
    outputBatch.endOfFile=true;
  }
  return outputBatch.size > 0;
}

Fixed version (ground truth):
@Override public boolean next(final NullWritable key,final VectorizedRowBatch outputBatch) throws IOException {
  outputBatch.reset();
  setting.setPartitionValues(outputBatch);
  if (indexSize <= currentIndex) {
    if (!currentReader.hasNext()) {
      updateCounter(currentReader.getReadStats());
      outputBatch.endOfFile=true;
      isEnd=true;
      return false;
    }
    while (!setSpread()) {
      if (!currentReader.hasNext()) {
        updateCounter(currentReader.getReadStats());
        outputBatch.endOfFile=true;
        isEnd=true;
        return false;
      }
    }
  }
  int maxSize=outputBatch.getMaxSize();
  if (indexSize < currentIndex + maxSize) {
    maxSize=indexSize - currentIndex;
  }
  for (  int colIndex : needColumnIds) {
    assignors[colIndex].setColumnVector(outputBatch.cols[colIndex],currentIndexList,currentIndex,maxSize);
  }
  outputBatch.size=maxSize;
  currentIndex+=maxSize;
  if (indexSize <= currentIndex && !currentReader.hasNext()) {
    outputBatch.endOfFile=true;
  }
  return outputBatch.size > 0;
}
Program: 172817
Project: 172817
Buggy source:
/** 
 * Return the property value associated with the given key or the defaultValue if the key cannot be resolved.
 * @param key
 * @param defaultValue
 * @return
 */
public <T extends Enum<T>>T getEnum(String key,T defaultValue){
  final Optional<T> optional=getEnum(key,defaultValue.getClass());
  if (optional.isPresent()) {
    return optional.get();
  }
  return defaultValue;
}

Fixed version (ground truth):
/** 
 * Return the property value associated with the given key or the defaultValue if the key cannot be resolved.
 * @param key
 * @param defaultValue
 * @return
 */
public <T extends Enum<T>>T getEnum(String key,T defaultValue){
  final Optional<T> optional=getEnum(key,(Class<T>)defaultValue.getClass());
  if (optional.isPresent()) {
    return optional.get();
  }
  return defaultValue;
}
Program: 172822
Project: 172822
Buggy source:
private static boolean checkFlag(Player player,Faction playerFaction,Faction chunkFaction,FactionFlagTypes flagType){
  if (playerFaction.Alliances.contains(chunkFaction.Name)) {
    return chunkFaction.Flags.get(FactionMemberType.ALLY).get(flagType);
  }
  FactionMemberType memberType=PlayerManager.getFactionMemberType(player,playerFaction);
  return chunkFaction.Flags.get(memberType).get(flagType);
}

Fixed version (ground truth):
private static boolean checkFlag(Player player,Faction playerFaction,Faction chunkFaction,FactionFlagTypes flagType){
  if (playerFaction.Name.equals(chunkFaction.Name)) {
    FactionMemberType memberType=PlayerManager.getFactionMemberType(player,playerFaction);
    return chunkFaction.Flags.get(memberType).get(flagType);
  }
 else   if (playerFaction.Alliances.contains(chunkFaction.Name)) {
    return chunkFaction.Flags.get(FactionMemberType.ALLY).get(flagType);
  }
 else {
    return false;
  }
}
Program: 172823
Project: 172823
Buggy source:
@Override public CommandResult execute(CommandSource source,CommandContext context) throws CommandException {
  if (source instanceof Player) {
    Player player=(Player)source;
    if (EagleFactions.AdminList.contains(player.getUniqueId())) {
      EagleFactions.AdminList.remove(player.getUniqueId());
      player.sendMessage(Text.of(PluginInfo.PluginPrefix,TextColors.GOLD,PluginMessages.ADMIN_MODE,TextColors.WHITE,"String_Node_Str" + PluginMessages.HAS_BEEN_TURNED + "String_Node_Str",TextColors.GOLD,PluginMessages.ON));
      return CommandResult.success();
    }
 else {
      EagleFactions.AdminList.add(player.getUniqueId());
      player.sendMessage(Text.of(PluginInfo.PluginPrefix,TextColors.GOLD,PluginMessages.ADMIN_MODE,TextColors.WHITE,"String_Node_Str" + PluginMessages.HAS_BEEN_TURNED + "String_Node_Str",TextColors.GOLD,PluginMessages.OFF));
      return CommandResult.success();
    }
  }
 else {
    source.sendMessage(Text.of(PluginInfo.ErrorPrefix,TextColors.RED,PluginMessages.ONLY_IN_GAME_PLAYERS_CAN_USE_THIS_COMMAND));
  }
  return CommandResult.success();
}

Fixed version (ground truth):
@Override public CommandResult execute(CommandSource source,CommandContext context) throws CommandException {
  if (source instanceof Player) {
    Player player=(Player)source;
    if (EagleFactions.AdminList.contains(player.getUniqueId())) {
      EagleFactions.AdminList.remove(player.getUniqueId());
      player.sendMessage(Text.of(PluginInfo.PluginPrefix,TextColors.GOLD,PluginMessages.ADMIN_MODE,TextColors.WHITE,"String_Node_Str" + PluginMessages.HAS_BEEN_TURNED + "String_Node_Str",TextColors.GOLD,PluginMessages.OFF));
      return CommandResult.success();
    }
 else {
      EagleFactions.AdminList.add(player.getUniqueId());
      player.sendMessage(Text.of(PluginInfo.PluginPrefix,TextColors.GOLD,PluginMessages.ADMIN_MODE,TextColors.WHITE,"String_Node_Str" + PluginMessages.HAS_BEEN_TURNED + "String_Node_Str",TextColors.GOLD,PluginMessages.ON));
      return CommandResult.success();
    }
  }
 else {
    source.sendMessage(Text.of(PluginInfo.ErrorPrefix,TextColors.RED,PluginMessages.ONLY_IN_GAME_PLAYERS_CAN_USE_THIS_COMMAND));
  }
  return CommandResult.success();
}
Program: 172827
Project: 172827
Buggy source:
@Listener public void onBlockPlace(ChangeBlockEvent.Place event,@Root Player player){
  if (!EagleFactions.AdminList.contains(player.getUniqueId())) {
    String playerFactionName=FactionLogic.getFactionName(player.getUniqueId());
    for (    Transaction<BlockSnapshot> transaction : event.getTransactions()) {
      World world=player.getWorld();
      Vector3i claim=transaction.getFinal().getLocation().get().getChunkPosition();
      if (FactionLogic.isClaimed(world.getUniqueId(),claim)) {
        if (FactionLogic.getFactionNameByChunk(world.getUniqueId(),claim).equals("String_Node_Str") && player.hasPermission("String_Node_Str")) {
          return;
        }
 else         if (FactionLogic.getFactionNameByChunk(world.getUniqueId(),claim).equals("String_Node_Str") && player.hasPermission("String_Node_Str")) {
          return;
        }
 else         if (FactionLogic.getFactionNameByChunk(world.getUniqueId(),claim).equals(playerFactionName)) {
          return;
        }
 else {
          event.setCancelled(true);
          player.sendMessage(Text.of(PluginInfo.ErrorPrefix,TextColors.RED,"String_Node_Str"));
          return;
        }
      }
 else       return;
    }
  }
  return;
}

Fixed version (ground truth):
@Listener public void onBlockPlace(ChangeBlockEvent.Place event,@Root Player player){
  if (!EagleFactions.AdminList.contains(player.getUniqueId())) {
    String playerFactionName=FactionLogic.getFactionName(player.getUniqueId());
    for (    Transaction<BlockSnapshot> transaction : event.getTransactions()) {
      World world=player.getWorld();
      Vector3i claim=transaction.getFinal().getLocation().get().getChunkPosition();
      String chunkFactionName=FactionLogic.getFactionNameByChunk(world.getUniqueId(),claim);
      if (!chunkFactionName.equals("String_Node_Str")) {
        if (chunkFactionName.equals("String_Node_Str") && player.hasPermission(PluginPermissions.SAFE_ZONE_BUILD)) {
          return;
        }
 else         if (chunkFactionName.equals("String_Node_Str") && player.hasPermission(PluginPermissions.WAR_ZONE_BUILD)) {
          return;
        }
 else         if (chunkFactionName.equals(playerFactionName)) {
          return;
        }
 else {
          event.setCancelled(true);
          player.sendMessage(Text.of(PluginInfo.ErrorPrefix,TextColors.RED,"String_Node_Str"));
          return;
        }
      }
    }
  }
  return;
}
Program: 172828
Project: 172828
Buggy source:
@Listener public void onPlayerInteract(InteractBlockEvent.Secondary event,@Root Player player){
  if (!EagleFactions.AdminList.contains(player.getUniqueId())) {
    String playerFactionName=FactionLogic.getFactionName(player.getUniqueId());
    Optional<Location<World>> location=event.getTargetBlock().getLocation();
    if (location.isPresent()) {
      World world=player.getWorld();
      Vector3i claim=location.get().getChunkPosition();
      if (FactionLogic.isClaimed(world.getUniqueId(),claim)) {
        if (FactionLogic.getFactionNameByChunk(world.getUniqueId(),claim).equals("String_Node_Str") && player.hasPermission("String_Node_Str")) {
          return;
        }
 else         if (FactionLogic.getFactionNameByChunk(world.getUniqueId(),claim).equals("String_Node_Str") && player.hasPermission("String_Node_Str")) {
          return;
        }
 else         if (FactionLogic.getFactionNameByChunk(world.getUniqueId(),claim).equals(playerFactionName)) {
          return;
        }
 else {
          event.setCancelled(true);
          player.sendMessage(Text.of(PluginInfo.ErrorPrefix,TextColors.RED,"String_Node_Str"));
          return;
        }
      }
 else {
        return;
      }
    }
  }
}

Fixed version (ground truth):
@Listener public void onPlayerInteract(HandInteractEvent event,@Root Player player){
  if (!EagleFactions.AdminList.contains(player.getUniqueId())) {
    String playerFactionName=FactionLogic.getFactionName(player.getUniqueId());
    if (event.getInteractionPoint().isPresent()) {
      World world=player.getWorld();
      Vector3d vector3d=event.getInteractionPoint().get();
      Location<World> location=new Location(world,vector3d);
      Vector3i claim=location.getChunkPosition();
      String chunkFactionName=FactionLogic.getFactionNameByChunk(world.getUniqueId(),claim);
      if (!chunkFactionName.equals("String_Node_Str")) {
        if (chunkFactionName.equals("String_Node_Str") && player.hasPermission(PluginPermissions.SAFE_ZONE_INTERACT)) {
          return;
        }
 else         if (chunkFactionName.equals("String_Node_Str") && player.hasPermission(PluginPermissions.WAR_ZONE_INTERACT)) {
          return;
        }
 else         if (chunkFactionName.equals(playerFactionName)) {
          return;
        }
 else {
          event.setCancelled(true);
          player.sendMessage(Text.of(PluginInfo.ErrorPrefix,TextColors.RED,"String_Node_Str"));
          return;
        }
      }
    }
  }
}
Program: 172831
Project: 172831
Buggy source:
@Override public CommandResult execute(CommandSource source,CommandContext context) throws CommandException {
  if (source instanceof Player) {
    Player player=(Player)source;
    String playerFactionName=FactionLogic.getFactionName(player.getUniqueId());
    if (playerFactionName != null) {
      if (FactionLogic.getHome(playerFactionName) != null) {
        World world=player.getWorld();
        if (FactionLogic.isHomeInWorld(world.getUniqueId(),playerFactionName)) {
          EagleFactions.getEagleFactions().getLogger().info("String_Node_Str");
          Vector3i home=FactionLogic.getHome(playerFactionName);
          EagleFactions.getEagleFactions().getLogger().info("String_Node_Str");
          player.setLocation(player.getLocation().setPosition(new Vector3d(home.getX(),player.getLocation().getY(),home.getZ())));
          source.sendMessage(Text.of(PluginInfo.PluginPrefix,"String_Node_Str"));
        }
 else {
          source.sendMessage(Text.of(PluginInfo.ErrorPrefix,"String_Node_Str"));
        }
      }
 else {
        source.sendMessage(Text.of(PluginInfo.ErrorPrefix,TextColors.RED,"String_Node_Str"));
      }
    }
 else {
      source.sendMessage(Text.of(PluginInfo.ErrorPrefix,TextColors.RED,"String_Node_Str"));
    }
  }
 else {
    source.sendMessage(Text.of(PluginInfo.ErrorPrefix,TextColors.RED,"String_Node_Str"));
  }
  return CommandResult.success();
}

Fixed version (ground truth):
@Override public CommandResult execute(CommandSource source,CommandContext context) throws CommandException {
  if (source instanceof Player) {
    Player player=(Player)source;
    String playerFactionName=FactionLogic.getFactionName(player.getUniqueId());
    if (playerFactionName != null) {
      if (FactionLogic.getHome(playerFactionName) != null) {
        World world=player.getWorld();
        if (FactionLogic.isHomeInWorld(world.getUniqueId(),playerFactionName)) {
          Vector3i home=FactionLogic.getHome(playerFactionName);
          player.setLocation(player.getLocation().setPosition(new Vector3d(home.getX(),home.getY(),home.getZ())));
          source.sendMessage(Text.of(PluginInfo.PluginPrefix,"String_Node_Str"));
        }
 else {
          source.sendMessage(Text.of(PluginInfo.ErrorPrefix,"String_Node_Str"));
        }
      }
 else {
        source.sendMessage(Text.of(PluginInfo.ErrorPrefix,TextColors.RED,"String_Node_Str"));
      }
    }
 else {
      source.sendMessage(Text.of(PluginInfo.ErrorPrefix,TextColors.RED,"String_Node_Str"));
    }
  }
 else {
    source.sendMessage(Text.of(PluginInfo.ErrorPrefix,TextColors.RED,"String_Node_Str"));
  }
  return CommandResult.success();
}
Program: 172837
Project: 172837
Buggy source:
@Listener public void onChatMessage(MessageChannelEvent.Chat event,@Root Player player){
  if (FactionLogic.getFactionName(player.getUniqueId()) != null) {
    Text fullMessage=event.getMessage();
    Text factionTag=Text.builder().append(Text.of("String_Node_Str",TextColors.GREEN,FactionLogic.getFactionTag(FactionLogic.getFactionName(player.getUniqueId())),TextColors.RESET,"String_Node_Str")).build();
    String message=event.getMessage().toPlain();
    String messages[]=message.split("String_Node_Str");
    String body=messages[1];
    Text header=fullMessage.toBuilder().remove(Text.of(player.getName() + "String_Node_Str")).remove(Text.of(body)).build();
    Text messageToPrint=Text.builder().append(header).append(factionTag).append(Text.of(player.getName() + "String_Node_Str")).append(Text.of(body)).build();
    event.setMessage(messageToPrint);
  }
  return;
}

Fixed version (ground truth):
@Listener public void onChatMessage(MessageChannelEvent.Chat event,@Root Player player){
  if (FactionLogic.getFactionName(player.getUniqueId()) != null) {
    Text factionTag=Text.builder().append(Text.of("String_Node_Str",TextColors.GREEN,FactionLogic.getFactionTag(FactionLogic.getFactionName(player.getUniqueId())),TextColors.RESET,"String_Node_Str")).build();
    EagleFactions.getEagleFactions().getLogger().info(factionTag.toPlain());
    Text messageToPrint=Text.builder().append(factionTag).append(event.getMessage()).build();
    event.setMessage(messageToPrint);
  }
  return;
}
Program: 172839
Project: 172839
Buggy source:
public static String getFactionName(UUID playerUUID){
  for (  Object t : FactionLogic.getFactionsNames()) {
    String faction=String.valueOf(t);
    if (faction.equals("String_Node_Str") || faction.equals("String_Node_Str")) {
      continue;
    }
    if (FactionLogic.getMembers(faction).contains(playerUUID.toString())) {
      return faction;
    }
 else     if (FactionLogic.getLeader(faction).equals(playerUUID.toString())) {
      return faction;
    }
 else     if (FactionLogic.getOfficers(faction).contains(playerUUID.toString())) {
      return faction;
    }
  }
  return null;
}

Fixed version (ground truth):
public static String getFactionName(UUID playerUUID){
  for (  Object t : FactionLogic.getFactionsNames()) {
    String faction=String.valueOf(t);
    if (FactionLogic.getMembers(faction).contains(playerUUID.toString())) {
      return faction;
    }
 else     if (FactionLogic.getLeader(faction).equals(playerUUID.toString())) {
      return faction;
    }
 else     if (FactionLogic.getOfficers(faction).contains(playerUUID.toString())) {
      return faction;
    }
  }
  return null;
}
Program: 172840
Project: 172840
Buggy source:
public static String getFactionNameByChunk(Vector3i chunk){
  for (  Object object : getFactionsNames()) {
    String factionName=String.valueOf(object);
    if (getClaims(factionName).contains(chunk.toString())) {
      return factionName;
    }
  }
  return null;
}

Fixed version (ground truth):
public static String getFactionNameByChunk(Vector3i chunk){
  for (  Object object : getFactionsNames()) {
    String factionName=String.valueOf(object);
    if (getClaims(factionName).contains(chunk.toString())) {
      return factionName;
    }
  }
  return "String_Node_Str";
}
Program: 172843
Project: 172843
Buggy source:
public static boolean createFaction(String factionName,UUID playerUUID){
  try {
    ConfigAccess.setValueAndSave(factionsConfig,new Object[]{"String_Node_Str",factionName,"String_Node_Str"},(playerUUID.toString()));
    ConfigAccess.setValueAndSave(factionsConfig,new Object[]{"String_Node_Str",factionName,"String_Node_Str"},new ArrayList<String>());
    ConfigAccess.setValueAndSave(factionsConfig,new Object[]{"String_Node_Str",factionName,"String_Node_Str"},"String_Node_Str");
    ConfigAccess.setValueAndSave(factionsConfig,new Object[]{"String_Node_Str",factionName,"String_Node_Str"},new ArrayList<String>());
    ConfigAccess.setValueAndSave(factionsConfig,new Object[]{"String_Node_Str",factionName,"String_Node_Str"},new ArrayList<String>());
    ConfigAccess.setValueAndSave(factionsConfig,new Object[]{"String_Node_Str",factionName,"String_Node_Str"},new ArrayList<String>());
    ConfigAccess.setValueAndSave(factionsConfig,new Object[]{"String_Node_Str",factionName,"String_Node_Str"},false);
  }
 catch (  Exception exception) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
public static boolean createFaction(String factionName,UUID playerUUID){
  try {
    ConfigAccess.setValueAndSave(factionsConfig,new Object[]{"String_Node_Str",factionName,"String_Node_Str"},(playerUUID.toString()));
    ConfigAccess.setValueAndSave(factionsConfig,new Object[]{"String_Node_Str",factionName,"String_Node_Str"},new ArrayList<String>());
    ConfigAccess.setValueAndSave(factionsConfig,new Object[]{"String_Node_Str",factionName,"String_Node_Str"},"String_Node_Str");
    ConfigAccess.setValueAndSave(factionsConfig,new Object[]{"String_Node_Str",factionName,"String_Node_Str"},new ArrayList<String>());
    ConfigAccess.setValueAndSave(factionsConfig,new Object[]{"String_Node_Str",factionName,"String_Node_Str"},new ArrayList<String>());
    ConfigAccess.setValueAndSave(factionsConfig,new Object[]{"String_Node_Str",factionName,"String_Node_Str"},new ArrayList<String>());
    ConfigAccess.setValueAndSave(factionsConfig,new Object[]{"String_Node_Str",factionName,"String_Node_Str"},false);
    ConfigAccess.setValueAndSave(factionsConfig,new Object[]{"String_Node_Str",factionName,"String_Node_Str"},new ArrayList<Chunk>());
  }
 catch (  Exception exception) {
    return false;
  }
  return true;
}
Program: 172844
Project: 172844
Buggy source:
public static Faction getFaction(String factionName){
  ConfigurationNode leaderNode=ConfigAccess.getConfig(factionsConfig).getNode("String_Node_Str",factionName,"String_Node_Str");
  Object leaderUUID=leaderNode.getValue();
  Faction faction=new Faction(factionName,UUID.fromString(leaderUUID.toString()));
  faction.Members=getMembers(factionName);
  faction.Officers=getOfficers(factionName);
  faction.Enemies=getEnemies(factionName);
  faction.Alliances=getAlliances(factionName);
  faction.Power=PowerService.getFactionPower(faction);
  return faction;
}

Fixed version (ground truth):
public static Faction getFaction(String factionName){
  ConfigurationNode leaderNode=ConfigAccess.getConfig(factionsConfig).getNode("String_Node_Str",factionName,"String_Node_Str");
  Object leaderUUID=leaderNode.getValue();
  Faction faction=new Faction(factionName,UUID.fromString(leaderUUID.toString()));
  faction.Members=getMembers(factionName);
  faction.Officers=getOfficers(factionName);
  faction.Enemies=getEnemies(factionName);
  faction.Alliances=getAlliances(factionName);
  faction.Claims=getClaims(factionName);
  faction.Power=PowerService.getFactionPower(faction);
  return faction;
}
Program: 172845
Project: 172845
Buggy source:
public static BigDecimal getFactionMaxPower(Faction faction){
  BigDecimal factionMaxPower=BigDecimal.ZERO;
  if (faction.Leader != null) {
    factionMaxPower.add(PowerService.getPlayerMaxPower(faction.Leader));
  }
  if (faction.Officers != null && !faction.Officers.isEmpty()) {
    for (    String officer : faction.Officers) {
      factionMaxPower.add(PowerService.getPlayerMaxPower(UUID.fromString(officer)));
    }
  }
  if (faction.Members != null && !faction.Members.isEmpty()) {
    for (    String member : faction.Members) {
      factionMaxPower.add(PowerService.getPlayerMaxPower(UUID.fromString(member)));
    }
  }
  return factionMaxPower;
}

Fixed version (ground truth):
public static BigDecimal getFactionMaxPower(Faction faction){
  BigDecimal factionMaxPower=BigDecimal.ZERO;
  if (faction.Leader != null) {
    factionMaxPower=factionMaxPower.add(PowerService.getPlayerMaxPower(faction.Leader));
  }
  if (faction.Officers != null && !faction.Officers.isEmpty()) {
    for (    String officer : faction.Officers) {
      factionMaxPower=factionMaxPower.add(PowerService.getPlayerMaxPower(UUID.fromString(officer)));
    }
  }
  if (faction.Members != null && !faction.Members.isEmpty()) {
    for (    String member : faction.Members) {
      factionMaxPower=factionMaxPower.add(PowerService.getPlayerMaxPower(UUID.fromString(member)));
    }
  }
  return factionMaxPower;
}
Program: 172846
Project: 172846
Buggy source:
public static BigDecimal getFactionPower(Faction faction){
  BigDecimal factionPower=BigDecimal.ZERO;
  if (faction.Leader != null) {
    factionPower.add(getPlayerPower(faction.Leader));
  }
  if (faction.Officers != null && !faction.Officers.isEmpty()) {
    for (    String officer : faction.Officers) {
      BigDecimal officerPower=getPlayerPower(UUID.fromString(officer));
      factionPower.add(officerPower);
    }
  }
  if (faction.Members != null && !faction.Members.isEmpty()) {
    for (    String member : faction.Members) {
      BigDecimal memberPower=getPlayerPower(UUID.fromString(member));
      factionPower.add(memberPower);
    }
  }
  return factionPower;
}

Fixed version (ground truth):
public static BigDecimal getFactionPower(Faction faction){
  BigDecimal factionPower=BigDecimal.ZERO;
  if (faction.Leader != null) {
    factionPower=factionPower.add(getPlayerPower(faction.Leader));
    EagleFactions.getEagleFactions().getLogger().info("String_Node_Str" + getPlayerPower(faction.Leader).toString());
    EagleFactions.getEagleFactions().getLogger().info("String_Node_Str" + factionPower.toString());
  }
  if (faction.Officers != null && !faction.Officers.isEmpty()) {
    for (    String officer : faction.Officers) {
      BigDecimal officerPower=getPlayerPower(UUID.fromString(officer));
      factionPower=factionPower.add(officerPower);
    }
  }
  if (faction.Members != null && !faction.Members.isEmpty()) {
    for (    String member : faction.Members) {
      BigDecimal memberPower=getPlayerPower(UUID.fromString(member));
      factionPower=factionPower.add(memberPower);
    }
  }
  EagleFactions.getEagleFactions().getLogger().info(factionPower.toString());
  return factionPower;
}
Program: 172847
Project: 172847
Buggy source:
public static void increasePower(UUID playerUUID){
  Task.Builder taskBuilder=Sponge.getScheduler().createTaskBuilder();
  taskBuilder.execute(new Runnable(){
    @Override public void run(){
      if (!PlayerService.isPlayerOnline(playerUUID))       return;
      if (PowerService.getPlayerPower(playerUUID).add(MainLogic.getPowerIncrement()).doubleValue() < PowerService.getPlayerMaxPower(playerUUID).doubleValue()) {
        EagleFactions.getEagleFactions().getLogger().info("String_Node_Str");
        EagleFactions.getEagleFactions().getLogger().info(String.valueOf(PowerService.getPlayerPower(playerUUID)));
        EagleFactions.getEagleFactions().getLogger().info("String_Node_Str");
        EagleFactions.getEagleFactions().getLogger().info(String.valueOf(MainLogic.getPowerIncrement()));
        PowerService.addPower(playerUUID,false);
        EagleFactions.getEagleFactions().getLogger().info("String_Node_Str");
        EagleFactions.getEagleFactions().getLogger().info(String.valueOf(PowerService.getPlayerPower(playerUUID)));
        increasePower(playerUUID);
      }
 else {
        PowerService.setPower(playerUUID,PowerService.getPlayerMaxPower(playerUUID));
        increasePower(playerUUID);
      }
    }
  }
).delay(1,TimeUnit.MINUTES).name("String_Node_Str").submit(Sponge.getPluginManager().getPlugin(PluginInfo.Id).get().getInstance().get());
}

Fixed version (ground truth):
public static void increasePower(UUID playerUUID){
  Task.Builder taskBuilder=Sponge.getScheduler().createTaskBuilder();
  taskBuilder.execute(new Runnable(){
    @Override public void run(){
      if (!PlayerService.isPlayerOnline(playerUUID))       return;
      if (PowerService.getPlayerPower(playerUUID).add(MainLogic.getPowerIncrement()).doubleValue() < PowerService.getPlayerMaxPower(playerUUID).doubleValue()) {
        PowerService.addPower(playerUUID,false);
        increasePower(playerUUID);
      }
 else {
        PowerService.setPower(playerUUID,PowerService.getPlayerMaxPower(playerUUID));
        increasePower(playerUUID);
      }
    }
  }
).delay(1,TimeUnit.MINUTES).name("String_Node_Str").submit(Sponge.getPluginManager().getPlugin(PluginInfo.Id).get().getInstance().get());
}
Program: 172848
Project: 172848
Buggy source:
@Override public void run(){
  if (!PlayerService.isPlayerOnline(playerUUID))   return;
  if (PowerService.getPlayerPower(playerUUID).add(MainLogic.getPowerIncrement()).doubleValue() < PowerService.getPlayerMaxPower(playerUUID).doubleValue()) {
    EagleFactions.getEagleFactions().getLogger().info("String_Node_Str");
    EagleFactions.getEagleFactions().getLogger().info(String.valueOf(PowerService.getPlayerPower(playerUUID)));
    EagleFactions.getEagleFactions().getLogger().info("String_Node_Str");
    EagleFactions.getEagleFactions().getLogger().info(String.valueOf(MainLogic.getPowerIncrement()));
    PowerService.addPower(playerUUID,false);
    EagleFactions.getEagleFactions().getLogger().info("String_Node_Str");
    EagleFactions.getEagleFactions().getLogger().info(String.valueOf(PowerService.getPlayerPower(playerUUID)));
    increasePower(playerUUID);
  }
 else {
    PowerService.setPower(playerUUID,PowerService.getPlayerMaxPower(playerUUID));
    increasePower(playerUUID);
  }
}

Fixed version (ground truth):
@Override public void run(){
  if (!PlayerService.isPlayerOnline(playerUUID))   return;
  if (PowerService.getPlayerPower(playerUUID).add(MainLogic.getPowerIncrement()).doubleValue() < PowerService.getPlayerMaxPower(playerUUID).doubleValue()) {
    PowerService.addPower(playerUUID,false);
    increasePower(playerUUID);
  }
 else {
    PowerService.setPower(playerUUID,PowerService.getPlayerMaxPower(playerUUID));
    increasePower(playerUUID);
  }
}
Program: 172849
Project: 172849
Buggy source:
public static BigDecimal getPlayerPower(UUID playerUUID){
  Path playerFile=Paths.get(EagleFactions.getEagleFactions().getConfigDir().resolve("String_Node_Str") + "String_Node_Str" + playerUUID.toString()+ "String_Node_Str");
  if (checkIfPlayerExists(playerUUID)) {
    try {
      ConfigurationLoader<CommentedConfigurationNode> configLoader=HoconConfigurationLoader.builder().setPath(playerFile).build();
      CommentedConfigurationNode playerNode=configLoader.load();
      if (playerNode.getNode("String_Node_Str").getValue() != null) {
        BigDecimal playerPower=new BigDecimal(playerNode.getNode("String_Node_Str").getString());
        return playerPower;
      }
    }
 catch (    Exception exception) {
      exception.printStackTrace();
    }
  }
 else {
    addPlayer(playerUUID);
    return getPlayerPower(playerUUID);
  }
  return BigDecimal.ZERO;
}

Fixed version (ground truth):
public static BigDecimal getPlayerPower(UUID playerUUID){
  Path playerFile=Paths.get(EagleFactions.getEagleFactions().getConfigDir().resolve("String_Node_Str") + "String_Node_Str" + playerUUID.toString()+ "String_Node_Str");
  if (checkIfPlayerExists(playerUUID)) {
    try {
      ConfigurationLoader<CommentedConfigurationNode> configLoader=HoconConfigurationLoader.builder().setPath(playerFile).build();
      CommentedConfigurationNode playerNode=configLoader.load();
      if (playerNode.getNode("String_Node_Str").getValue() != null) {
        BigDecimal playerPower=new BigDecimal(playerNode.getNode("String_Node_Str").getString());
        EagleFactions.getEagleFactions().getLogger().info("String_Node_Str" + playerPower.toString());
        return playerPower;
      }
    }
 catch (    Exception exception) {
      exception.printStackTrace();
    }
  }
 else {
    addPlayer(playerUUID);
    return getPlayerPower(playerUUID);
  }
  return BigDecimal.ZERO;
}
Program: 172850
Project: 172850
Buggy source:
@Override public CommandResult execute(CommandSource source,CommandContext context) throws CommandException {
  Map<List<String>,CommandSpec> commands=EagleFactions.getEagleFactions().Subcommands;
  List<Text> helpList=Lists.newArrayList();
  for (  List<String> aliases : commands.keySet()) {
    CommandSpec commandSpec=commands.get(aliases);
    Text commandHelp=Text.builder().append(Text.builder().append(Text.of(TextColors.AQUA,"String_Node_Str" + aliases.toString().replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str"))).append(Text.of(TextColors.AQUA,"String_Node_Str" + aliases.toString().t)).build()).append(Text.builder().append(Text.of(TextColors.GRAY,"String_Node_Str" + commandSpec.getShortDescription(source).get().toPlain())).build()).build();
    helpList.add(commandHelp);
  }
  PaginationService paginationService=Sponge.getServiceManager().provide(PaginationService.class).get();
  PaginationList.Builder paginationBuilder=paginationService.builder().title(Text.of(TextColors.GREEN,"String_Node_Str")).padding(Text.of("String_Node_Str")).contents(helpList);
  paginationBuilder.sendTo(source);
  return CommandResult.success();
}

Fixed version (ground truth):
@Override public CommandResult execute(CommandSource source,CommandContext context) throws CommandException {
  Map<List<String>,CommandSpec> commands=EagleFactions.getEagleFactions().Subcommands;
  List<Text> helpList=Lists.newArrayList();
  for (  List<String> aliases : commands.keySet()) {
    CommandSpec commandSpec=commands.get(aliases);
    Text commandHelp=Text.builder().append(Text.builder().append(Text.of(TextColors.AQUA,"String_Node_Str" + aliases.toString().replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str"))).build()).append(Text.builder().append(Text.of(TextColors.GRAY,"String_Node_Str" + commandSpec.getShortDescription(source).get().toPlain())).build()).build();
    helpList.add(commandHelp);
  }
  PaginationService paginationService=Sponge.getServiceManager().provide(PaginationService.class).get();
  PaginationList.Builder paginationBuilder=paginationService.builder().title(Text.of(TextColors.GREEN,"String_Node_Str")).padding(Text.of("String_Node_Str")).contents(helpList);
  paginationBuilder.sendTo(source);
  return CommandResult.success();
}
Program: 172852
Project: 172852
Buggy source:
/** 
 * Terminate a job
 * @param jobName the name of the job to terminate
 */
public void terminateJob(String jobName,Config config){
  String statemgrClass=SchedulerContext.stateManagerClass(config);
  if (statemgrClass == null) {
    throw new RuntimeException("String_Node_Str");
  }
  String launcherClass=SchedulerContext.launcherClass(config);
  if (launcherClass == null) {
    throw new RuntimeException("String_Node_Str");
  }
  ILauncher launcher;
  IStateManager statemgr;
  try {
    statemgr=ReflectionUtils.newInstance(statemgrClass);
  }
 catch (  IllegalAccessException|InstantiationException|ClassNotFoundException e) {
    throw new JobSubmissionException(String.format("String_Node_Str",statemgrClass),e);
  }
  try {
    launcher=ReflectionUtils.newInstance(launcherClass);
  }
 catch (  IllegalAccessException|InstantiationException|ClassNotFoundException e) {
    throw new LauncherException(String.format("String_Node_Str",launcherClass),e);
  }
  statemgr.initialize(config);
  updatedConfig=Config.newBuilder().putAll(updatedConfig).put(SchedulerContext.STATE_MANAGER_OBJECT,statemgr).build();
  launcher.initialize(updatedConfig);
  boolean terminated=launcher.terminateJob(jobName);
  if (!terminated) {
    LOG.log(Level.SEVERE,"String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Terminate a job
 * @param jobName the name of the job to terminate
 */
public void terminateJob(String jobName,Config config){
  String statemgrClass=SchedulerContext.stateManagerClass(config);
  if (statemgrClass == null) {
    throw new RuntimeException("String_Node_Str");
  }
  String launcherClass=SchedulerContext.launcherClass(config);
  if (launcherClass == null) {
    throw new RuntimeException("String_Node_Str");
  }
  ILauncher launcher;
  IStateManager statemgr;
  try {
    statemgr=ReflectionUtils.newInstance(statemgrClass);
  }
 catch (  IllegalAccessException|InstantiationException|ClassNotFoundException e) {
    throw new JobSubmissionException(String.format("String_Node_Str",statemgrClass),e);
  }
  try {
    launcher=ReflectionUtils.newInstance(launcherClass);
  }
 catch (  IllegalAccessException|InstantiationException|ClassNotFoundException e) {
    throw new LauncherException(String.format("String_Node_Str",launcherClass),e);
  }
  statemgr.initialize(config);
  updatedConfig=Config.newBuilder().putAll(config).put(SchedulerContext.STATE_MANAGER_OBJECT,statemgr).build();
  launcher.initialize(updatedConfig);
  boolean terminated=launcher.terminateJob(jobName);
  if (!terminated) {
    LOG.log(Level.SEVERE,"String_Node_Str");
  }
}
Program: 172853
Project: 172853
Buggy source:
public static void main(String[] args){
  setupOptions();
  Options cmdOptions=null;
  try {
    cmdOptions=setupOptions();
    CommandLineParser parser=new DefaultParser();
    CommandLine cmd=parser.parse(cmdOptions,args);
    Config config=loadConfigurations(cmd);
    LOG.log(Level.INFO,"String_Node_Str");
    String command=cmd.getOptionValue("String_Node_Str");
    executeCommand(config,command);
  }
 catch (  ParseException e) {
    HelpFormatter formatter=new HelpFormatter();
    formatter.printHelp("String_Node_Str",cmdOptions);
    throw new RuntimeException("String_Node_Str",e);
  }
catch (  Throwable t) {
    String msg="String_Node_Str";
    LOG.log(Level.SEVERE,msg,t);
    throw new RuntimeException(msg);
  }
}

Fixed version (ground truth):
public static void main(String[] args){
  setupOptions();
  Options cmdOptions=null;
  try {
    cmdOptions=setupOptions();
    CommandLineParser parser=new DefaultParser();
    CommandLine cmd=parser.parse(cmdOptions,args);
    Config config=loadConfigurations(cmd);
    LOG.log(Level.INFO,"String_Node_Str");
    String command=cmd.getOptionValue("String_Node_Str");
    executeCommand(config,command);
  }
 catch (  ParseException e) {
    HelpFormatter formatter=new HelpFormatter();
    formatter.printHelp("String_Node_Str",cmdOptions);
    throw new RuntimeException("String_Node_Str",e);
  }
catch (  Throwable t) {
    String msg="String_Node_Str";
    LOG.log(Level.SEVERE,msg,t);
    throw new RuntimeException(msg,t);
  }
}
Program: 172854
Project: 172854
Buggy source:
@Override public boolean terminateJob(String jobName){
  return false;
}

Fixed version (ground truth):
@Override public boolean terminateJob(String jobName){
  LOG.log(Level.INFO,"String_Node_Str",StandaloneContext.clusterType(config));
  String jobWorkingDirectory=StandaloneContext.workingDirectory(config);
  Config newConfig=Config.newBuilder().putAll(config).put(SchedulerContext.WORKING_DIRECTORY,jobWorkingDirectory).build();
  IController controller=new StandaloneController(true);
  controller.initialize(newConfig);
  jobWorkingDirectory=Paths.get(jobWorkingDirectory,jobName).toAbsolutePath().toString();
  String jobDescFile=JobUtils.getJobDescriptionFilePath(jobWorkingDirectory,jobName,config);
  JobAPI.Job job=JobUtils.readJobFile(null,jobDescFile);
  return controller.kill(job);
}
Program: 172856
Project: 172856
Buggy source:
private boolean serializeData(Object content,SerializeState state,DataBuffer targetBuffer,MessageType messageType){
  ByteBuffer byteBuffer=targetBuffer.getByteBuffer();
  if (state.getPart() == SerializeState.Part.INIT) {
    int dataLength=DataSerializer.serializeData(content,messageType,state,serializer);
    state.setPart(SerializeState.Part.BODY);
  }
  if (state.getPart() != SerializeState.Part.BODY) {
    return false;
  }
  boolean completed=DataSerializer.copyDataToBuffer(content,messageType,byteBuffer,state,serializer);
  targetBuffer.setSize(byteBuffer.position());
  if (completed) {
    state.setBytesCopied(0);
    state.setBufferNo(0);
    state.setData(null);
    state.setPart(SerializeState.Part.INIT);
    state.setKeySize(0);
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
private boolean serializeData(Object content,SerializeState state,DataBuffer targetBuffer,MessageType messageType){
  ByteBuffer byteBuffer=targetBuffer.getByteBuffer();
  if (state.getPart() == SerializeState.Part.INIT) {
    int dataLength=DataSerializer.serializeData(content,messageType,state,serializer);
    state.setCurretHeaderLength(dataLength);
    state.setPart(SerializeState.Part.BODY);
  }
  if (state.getPart() != SerializeState.Part.BODY) {
    return false;
  }
  boolean completed=DataSerializer.copyDataToBuffer(content,messageType,byteBuffer,state,serializer);
  targetBuffer.setSize(byteBuffer.position());
  if (completed) {
    state.setBytesCopied(0);
    state.setBufferNo(0);
    state.setData(null);
    state.setPart(SerializeState.Part.INIT);
    state.setKeySize(0);
    return true;
  }
 else {
    return false;
  }
}