nus-yam/ex-repair huggingface dataset:
Program: 19042
Project: 19042
Buggy source:
private void deleteCommon(SMSMenuAction action) throws SMSException {
  SMSMenu.removeMenu(getName(),action);
  List<SMSView> toDelete=new ArrayList<SMSView>();
  for (  SMSView view : SMSView.listViews()) {
    if (view.getMenu() == this) {
      toDelete.add(view);
    }
  }
  for (  SMSView view : toDelete) {
    System.out.println("String_Node_Str" + view.getName());
    view.deletePermanent();
  }
}

Fixed version (ground truth):
private void deleteCommon(SMSMenuAction action) throws SMSException {
  SMSMenu.removeMenu(getName(),action);
}
Program: 19043
Project: 19043
Buggy source:
void deletePermanent(SMSMenuAction action){
  try {
    deleteCommon(action);
    SMSPersistence.unPersist(this);
  }
 catch (  SMSException e) {
    MiscUtil.log(Level.WARNING,"String_Node_Str");
  }
}

Fixed version (ground truth):
void deletePermanent(SMSMenuAction action){
  try {
    deleteCommon(action);
    deleteAllViews();
    SMSPersistence.unPersist(this);
  }
 catch (  SMSException e) {
    MiscUtil.log(Level.WARNING,"String_Node_Str");
  }
}
Program: 19044
Project: 19044
Buggy source:
@Override public void run(){
  loadMenus();
}

Fixed version (ground truth):
@Override public void run(){
  loadMenusAndViews();
}
Program: 19045
Project: 19045
Buggy source:
@Override public void onEnable(){
  description=this.getDescription();
  SMSPersistence.init();
  SMSConfig.init(this);
  PermissionsUtils.setup();
  SMSCommandSigns.setup();
  PluginManager pm=getServer().getPluginManager();
  pm.registerEvent(Event.Type.PLAYER_INTERACT,signListener,Event.Priority.Normal,this);
  pm.registerEvent(Event.Type.PLAYER_ITEM_HELD,signListener,Event.Priority.Normal,this);
  pm.registerEvent(Event.Type.BLOCK_DAMAGE,blockListener,Event.Priority.Normal,this);
  pm.registerEvent(Event.Type.BLOCK_BREAK,blockListener,Event.Priority.Normal,this);
  pm.registerEvent(Event.Type.BLOCK_PHYSICS,blockListener,Event.Priority.Normal,this);
  pm.registerEvent(Event.Type.ENTITY_EXPLODE,entityListener,Event.Priority.Normal,this);
  registerCommands();
  loadMacros();
  MessagePager.setPageCmd("String_Node_Str");
  if (getServer().getScheduler().scheduleSyncDelayedTask(this,new Runnable(){
    @Override public void run(){
      loadMenus();
    }
  }
) == -1) {
    MiscUtil.log(Level.WARNING,"String_Node_Str");
    loadMenus();
  }
  MiscUtil.log(Level.INFO,description.getName() + "String_Node_Str" + description.getVersion()+ "String_Node_Str");
}

Fixed version (ground truth):
@Override public void onEnable(){
  description=this.getDescription();
  SMSPersistence.init();
  SMSConfig.init(this);
  PermissionsUtils.setup();
  SMSCommandSigns.setup();
  PluginManager pm=getServer().getPluginManager();
  pm.registerEvent(Event.Type.PLAYER_INTERACT,signListener,Event.Priority.Normal,this);
  pm.registerEvent(Event.Type.PLAYER_ITEM_HELD,signListener,Event.Priority.Normal,this);
  pm.registerEvent(Event.Type.BLOCK_DAMAGE,blockListener,Event.Priority.Normal,this);
  pm.registerEvent(Event.Type.BLOCK_BREAK,blockListener,Event.Priority.Normal,this);
  pm.registerEvent(Event.Type.BLOCK_PHYSICS,blockListener,Event.Priority.Normal,this);
  pm.registerEvent(Event.Type.ENTITY_EXPLODE,entityListener,Event.Priority.Normal,this);
  registerCommands();
  loadMacros();
  MessagePager.setPageCmd("String_Node_Str");
  if (getServer().getScheduler().scheduleSyncDelayedTask(this,new Runnable(){
    @Override public void run(){
      loadMenusAndViews();
    }
  }
) == -1) {
    MiscUtil.log(Level.WARNING,"String_Node_Str");
    loadMenusAndViews();
  }
  MiscUtil.log(Level.INFO,description.getName() + "String_Node_Str" + description.getVersion()+ "String_Node_Str");
}
Program: 19046
Project: 19046
Buggy source:
@Override public boolean execute(ScrollingMenuSign plugin,Player player,String[] args) throws SMSException {
  PermissionsUtils.requirePerms(player,"String_Node_Str");
  Boolean loadMenus=false;
  Boolean loadMacros=false;
  Boolean loadConfig=false;
  Boolean loadAll=false;
  if (args.length == 0) {
    loadAll=true;
  }
 else {
    for (int i=1; 0 < args.length; i++) {
      if (args[i].equalsIgnoreCase("String_Node_Str")) {
        loadMenus=true;
      }
 else       if (args[i].equalsIgnoreCase("String_Node_Str")) {
        loadMacros=true;
      }
 else       if (args[i].equalsIgnoreCase("String_Node_Str")) {
        loadConfig=true;
      }
    }
  }
  if (loadAll || loadConfig) {
    plugin.getConfiguration().load();
    SMSMenu.updateAllMenus();
  }
  if (loadAll || loadMenus)   plugin.loadMenus();
  if (loadAll || loadMacros)   plugin.loadMacros();
  MiscUtil.statusMessage(player,"String_Node_Str");
  return true;
}

Fixed version (ground truth):
@Override public boolean execute(ScrollingMenuSign plugin,Player player,String[] args) throws SMSException {
  PermissionsUtils.requirePerms(player,"String_Node_Str");
  Boolean loadMenus=false;
  Boolean loadMacros=false;
  Boolean loadConfig=false;
  Boolean loadAll=false;
  if (args.length == 0) {
    loadAll=true;
  }
 else {
    for (int i=1; 0 < args.length; i++) {
      if (args[i].equalsIgnoreCase("String_Node_Str")) {
        loadMenus=true;
      }
 else       if (args[i].equalsIgnoreCase("String_Node_Str")) {
        loadMacros=true;
      }
 else       if (args[i].equalsIgnoreCase("String_Node_Str")) {
        loadConfig=true;
      }
    }
  }
  if (loadAll || loadConfig) {
    plugin.getConfiguration().load();
    SMSMenu.updateAllMenus();
  }
  if (loadAll || loadMenus)   plugin.loadMenusAndViews();
  if (loadAll || loadMacros)   plugin.loadMacros();
  MiscUtil.statusMessage(player,"String_Node_Str");
  return true;
}
Program: 19047
Project: 19047
Buggy source:
void removeSignFromMenu(Location loc,MenuRemoveAction action) throws SMSNoSuchMenuException {
  String menuName=getMenuNameAt(loc);
  if (menuName != null) {
    SMSMenu menu=getMenu(menuName);
    if (action == MenuRemoveAction.DESTROY_SIGN) {
      menu.destroySign(loc);
    }
 else     if (action == MenuRemoveAction.BLANK_SIGN) {
      menu.blankSign(loc);
    }
    menu.removeSign(loc);
    menuLocations.remove(loc);
  }
}

Fixed version (ground truth):
void removeSignFromMenu(Location loc,MenuRemoveAction action) throws SMSNoSuchMenuException {
  String menuName=getMenuNameAt(loc);
  if (menuName != null) {
    SMSMenu menu=getMenu(menuName);
    if (action == MenuRemoveAction.DESTROY_SIGN) {
      menu.destroySign(loc);
    }
 else     if (action == MenuRemoveAction.BLANK_SIGN) {
      menu.blankSign(loc);
    }
    menu.removeSign(loc);
  }
  menuLocations.remove(loc);
}
Program: 19048
Project: 19048
Buggy source:
private void createSMSMenu(Player player,String[] args){
  if (args.length < 2) {
    plugin.error_message(player,"String_Node_Str");
    plugin.error_message(player,"String_Node_Str");
    return;
  }
  String menuName=args[1];
  if (plugin.getMenu(menuName) != null) {
    plugin.error_message(player,"String_Node_Str" + menuName + "String_Node_Str");
    return;
  }
  Location loc=null;
  String owner="String_Node_Str";
  if (player != null) {
    Block b=player.getTargetBlock(null,3);
    if (b.getType() == Material.SIGN_POST && b.getType() == Material.WALL_SIGN) {
      if (plugin.getMenuName(b.getLocation()) != null) {
        plugin.error_message(player,"String_Node_Str");
        return;
      }
      owner=player.getName();
      loc=b.getLocation();
    }
  }
  SMSMenu menu=null;
  if (args.length == 4 && args[2].equals("String_Node_Str")) {
    SMSMenu otherMenu=plugin.getMenu(args[3]);
    if (otherMenu == null) {
      plugin.error_message(player,"String_Node_Str" + args[3] + "String_Node_Str");
      return;
    }
    menu=new SMSMenu(otherMenu,menuName,owner,loc);
  }
 else   if (args.length >= 3) {
    String menuTitle=plugin.parseColourSpec(player,combine(args,2));
    menu=new SMSMenu(menuName,menuTitle,owner,loc);
  }
  plugin.addMenu(menuName,menu,true);
  plugin.status_message(player,"String_Node_Str" + menuName);
}

Fixed version (ground truth):
private void createSMSMenu(Player player,String[] args){
  if (args.length < 2) {
    plugin.error_message(player,"String_Node_Str");
    plugin.error_message(player,"String_Node_Str");
    return;
  }
  String menuName=args[1];
  if (plugin.getMenu(menuName) != null) {
    plugin.error_message(player,"String_Node_Str" + menuName + "String_Node_Str");
    return;
  }
  Location loc=null;
  String owner="String_Node_Str";
  if (player != null) {
    Block b=player.getTargetBlock(null,3);
    if (b.getType() == Material.SIGN_POST || b.getType() == Material.WALL_SIGN) {
      if (plugin.getMenuName(b.getLocation()) != null) {
        plugin.error_message(player,"String_Node_Str");
        return;
      }
      owner=player.getName();
      loc=b.getLocation();
    }
  }
  SMSMenu menu=null;
  if (args.length == 4 && args[2].equals("String_Node_Str")) {
    SMSMenu otherMenu=plugin.getMenu(args[3]);
    if (otherMenu == null) {
      plugin.error_message(player,"String_Node_Str" + args[3] + "String_Node_Str");
      return;
    }
    menu=new SMSMenu(otherMenu,menuName,owner,loc);
  }
 else   if (args.length >= 3) {
    String menuTitle=plugin.parseColourSpec(player,combine(args,2));
    menu=new SMSMenu(menuName,menuTitle,owner,loc);
  }
  plugin.addMenu(menuName,menu,true);
  plugin.status_message(player,"String_Node_Str" + menuName);
}
Program: 19049
Project: 19049
Buggy source:
private void setTitle(Player player,String[] args){
  if (args.length < 3) {
    plugin.error_message(player,"String_Node_Str");
    return;
  }
  plugin.setTitle(player,args[1],args[2]);
}

Fixed version (ground truth):
private void setTitle(Player player,String[] args){
  if (args.length < 3) {
    plugin.error_message(player,"String_Node_Str");
    return;
  }
  plugin.setTitle(player,args[1],combine(args,2));
}
Program: 19050
Project: 19050
Buggy source:
private void createSMSSign(Player player,String[] args){
  if (onConsole(player))   return;
  Block b=player.getTargetBlock(null,3);
  if (args.length < 2) {
    plugin.error_message(player,"String_Node_Str");
    plugin.error_message(player,"String_Node_Str");
    return;
  }
  String menuName=args[1];
  if (b.getType() != Material.SIGN_POST && b.getType() != Material.WALL_SIGN) {
    plugin.error_message(player,"String_Node_Str");
    return;
  }
  if (plugin.getMenu(menuName) != null) {
    plugin.error_message(player,"String_Node_Str" + menuName + "String_Node_Str");
    return;
  }
  if (plugin.getMenuName(b.getLocation()) != null) {
    plugin.error_message(player,"String_Node_Str");
    return;
  }
  SMSMenu menu=null;
  if (args.length == 4 && args[2].equals("String_Node_Str")) {
    SMSMenu otherMenu=plugin.getMenu(args[3]);
    if (otherMenu == null) {
      plugin.error_message(player,"String_Node_Str" + args[3] + "String_Node_Str");
      return;
    }
    menu=new SMSMenu(otherMenu,menuName,player.getName(),b.getLocation());
  }
 else   if (args.length >= 3) {
    String menuTitle=combine(args,2);
    menuTitle=plugin.parseColourSpec(player,menuTitle);
    menu=new SMSMenu(menuName,menuTitle,player.getName(),b.getLocation());
  }
  plugin.addMenu(menuName,menu,true);
  plugin.status_message(player,"String_Node_Str" + menuName);
}

Fixed version (ground truth):
private void createSMSSign(Player player,String[] args){
  if (onConsole(player))   return;
  Block b=player.getTargetBlock(null,3);
  if (args.length < 2) {
    plugin.error_message(player,"String_Node_Str");
    plugin.error_message(player,"String_Node_Str");
    return;
  }
  String menuName=args[1];
  if (b.getType() != Material.SIGN_POST && b.getType() != Material.WALL_SIGN) {
    plugin.error_message(player,"String_Node_Str");
    return;
  }
  if (plugin.getMenu(menuName) != null) {
    plugin.error_message(player,"String_Node_Str" + menuName + "String_Node_Str");
    return;
  }
  if (plugin.getMenuName(b.getLocation()) != null) {
    plugin.error_message(player,"String_Node_Str");
    return;
  }
  SMSMenu menu=null;
  if (args.length == 4 && args[2].equals("String_Node_Str")) {
    SMSMenu otherMenu=plugin.getMenu(args[3]);
    if (otherMenu == null) {
      plugin.error_message(player,"String_Node_Str" + args[3] + "String_Node_Str");
      return;
    }
    menu=new SMSMenu(otherMenu,menuName,player.getName(),b.getLocation());
  }
 else   if (args.length >= 3) {
    String menuTitle=plugin.parseColourSpec(player,combine(args,2));
    menu=new SMSMenu(menuName,menuTitle,player.getName(),b.getLocation());
  }
  plugin.addMenu(menuName,menu,true);
  plugin.status_message(player,"String_Node_Str" + menuName);
}
Program: 19051
Project: 19051
Buggy source:
@Override public void onBlockBreak(BlockBreakEvent event){
  Block b=event.getBlock();
  if (b.getType() != Material.SIGN_POST && b.getType() != Material.WALL_SIGN) {
    return;
  }
  String menuName=plugin.getMenuName(b.getLocation());
  if (menuName == null) {
    return;
  }
  Player p=event.getPlayer();
  plugin.removeMenu(menuName,ScrollingMenuSign.MenuRemoveAction.DO_NOTHING);
  plugin.status_message(p,"String_Node_Str" + menuName);
}

Fixed version (ground truth):
@Override public void onBlockBreak(BlockBreakEvent event){
  Block b=event.getBlock();
  Player p=event.getPlayer();
  if (b.getType() == Material.SIGN_POST || b.getType() == Material.WALL_SIGN) {
    String menuName=plugin.getMenuName(b.getLocation());
    if (menuName != null) {
      plugin.removeMenu(menuName,ScrollingMenuSign.MenuRemoveAction.DO_NOTHING);
      plugin.status_message(p,"String_Node_Str" + menuName);
    }
  }
}
Program: 19052
Project: 19052
Buggy source:
@Override public void onBlockPhysics(BlockPhysicsEvent event){
  Block b=event.getBlock();
  if (b.getType() != Material.SIGN_POST && b.getType() != Material.WALL_SIGN) {
    return;
  }
  String menuName=plugin.getMenuName(b.getLocation());
  if (menuName == null) {
    return;
  }
  plugin.removeMenu(menuName,ScrollingMenuSign.MenuRemoveAction.DO_NOTHING);
}

Fixed version (ground truth):
@Override public void onBlockPhysics(BlockPhysicsEvent event){
  Block b=event.getBlock();
  if (b.getType() == Material.SIGN_POST || b.getType() == Material.WALL_SIGN) {
    String menuName=plugin.getMenuName(b.getLocation());
    if (menuName != null) {
      Sign s=(Sign)b.getState().getData();
      Block attachedBlock=b.getFace(s.getAttachedFace());
      if (attachedBlock.getTypeId() == 0) {
        plugin.removeMenu(menuName,MenuRemoveAction.DO_NOTHING);
      }
    }
  }
}
Program: 19054
Project: 19054
Buggy source:
@Test public void testCreateService() throws Exception {
  assertTrue(service.createAsset());
  service.createAsset();
  assertTrue(service.addAsset());
  assertNotNull(service.getId());
  assertNotNull(service.getGovernanceArtifact());
}

Fixed version (ground truth):
@Test public void testCreateService() throws Exception {
  assertTrue(service.createAsset());
  assertTrue(service.addAsset());
  assertNotNull(service.getId());
  assertNotNull(service.getGovernanceArtifact());
}
Program: 19055
Project: 19055
Buggy source:
@Test public void testLock() throws Exception {
  service.createAsset();
  String assetId=service.getId();
  service.lockAsset();
  service.save();
  ServiceManager serviceManager=new ServiceManager(registry);
  Service updatedService=serviceManager.getService(assetId);
  assertEquals("String_Node_Str",updatedService.getAttribute(AssetConstants.TURMERIC_LOCK));
}

Fixed version (ground truth):
@Test public void testLock() throws Exception {
  service.createAsset();
  service.addAsset();
  String assetId=service.getId();
  service.lockAsset();
  service.save();
  ServiceManager serviceManager=new ServiceManager(registry);
  Service updatedService=serviceManager.getService(assetId);
  assertEquals("String_Node_Str",updatedService.getAttribute(AssetConstants.TURMERIC_LOCK));
}
Program: 19056
Project: 19056
Buggy source:
@Test public void testunLock() throws Exception {
  service.createAsset();
  String assetId=service.getId();
  service.unlock();
  service.save();
  ServiceManager serviceManager=new ServiceManager(registry);
  Service updatedService=serviceManager.getService(assetId);
  assertEquals("String_Node_Str",updatedService.getAttribute(AssetConstants.TURMERIC_LOCK));
}

Fixed version (ground truth):
@Test public void testunLock() throws Exception {
  service.createAsset();
  service.addAsset();
  String assetId=service.getId();
  service.unlock();
  service.save();
  ServiceManager serviceManager=new ServiceManager(registry);
  Service updatedService=serviceManager.getService(assetId);
  assertEquals("String_Node_Str",updatedService.getAttribute(AssetConstants.TURMERIC_LOCK));
}
Program: 19057
Project: 19057
Buggy source:
/** 
 * @author csubhash
 * @param exception
 * @return returns a message parsed error data object
 */
public static CommonErrorData parseGeneralExceptionMessage(Exception exception){
  StackTraceElement[] stackTraceElements=exception.getStackTrace();
  int index=0;
  String exceptionClass=exception.getClass().getCanonicalName();
  String fileName=stackTraceElements[index].getFileName();
  String className=stackTraceElements[index].getClassName();
  String methodName=stackTraceElements[index].getMethodName();
  String lineNo=new Integer(stackTraceElements[index].getLineNumber()).toString();
  String message=exception.getMessage();
  String[] params=new String[]{exceptionClass,fileName,className,methodName,lineNo,message};
  CommonErrorData errorData=ErrorDataFactory.createErrorData(ErrorConstants.UNKNOWN_EXCEPTION,ErrorConstants.ERRORDOMAIN,params);
  return errorData;
}

Fixed version (ground truth):
/** 
 * @author csubhash
 * @param exception
 * @return returns a message parsed error data object
 */
public static CommonErrorData parseGeneralExceptionMessage(Exception exception){
  StackTraceElement[] stackTraceElements=exception.getStackTrace();
  int index=0;
  String exceptionClass=exception.getClass().getCanonicalName();
  String fileName=stackTraceElements[index].getFileName();
  String className=stackTraceElements[index].getClassName();
  String methodName=stackTraceElements[index].getMethodName();
  String lineNo=Integer.valueOf(stackTraceElements[index].getLineNumber()).toString();
  String message=exception.getMessage();
  String[] params=new String[]{exceptionClass,fileName,className,methodName,lineNo,message};
  CommonErrorData errorData=ErrorDataFactory.createErrorData(ErrorConstants.UNKNOWN_EXCEPTION,ErrorConstants.ERRORDOMAIN,params);
  return errorData;
}
Program: 19058
Project: 19058
Buggy source:
@Test @Ignore public void updateReplaceTest() throws Exception {
  boolean clean=false;
  try {
    RemoteRegistry wso2=RSProviderUtil.getRegistry();
    clean=!wso2.resourceExists(resources[0]);
  }
 catch (  RegistryException e) {
  }
  assumeTrue(clean);
  CreateCompleteAssetResponse response=createAsset();
  assertEquals(AckValue.SUCCESS,response.getAck());
  assertEquals(null,response.getErrorMessage());
  UpdateAssetArtifactsResponse responseUpdate=replaceAsset(response.getAssetKey().getAssetId());
  assertEquals(AckValue.SUCCESS,responseUpdate.getAck());
  assertEquals(null,responseUpdate.getErrorMessage());
  AssetInfo assetInfo=getAsset(response.getAssetKey().getAssetId());
  List<ArtifactInfo> artifacts=assetInfo.getArtifactInfo();
  assertTrue(artifacts != null);
  assertEquals(1,artifacts.size());
  ArtifactInfo artifactInfo=artifacts.get(0);
  assertEquals("String_Node_Str" + assetName + "String_Node_Str",artifactInfo.getArtifact().getArtifactName());
  assertEquals("String_Node_Str",artifactInfo.getArtifact().getArtifactCategory());
  assertEquals(ArtifactValueType.URL,artifactInfo.getArtifact().getArtifactValueType());
  assertEquals(new String((baseUrl + assetName + "String_Node_Str").getBytes("String_Node_Str")),new String(artifactInfo.getArtifactDetail()));
  assertEquals("String_Node_Str",artifactInfo.getContentType());
}

Fixed version (ground truth):
@Test public void updateReplaceTest() throws Exception {
  boolean clean=false;
  try {
    RemoteRegistry wso2=RSProviderUtil.getRegistry();
    clean=!wso2.resourceExists(resources[0]);
  }
 catch (  RegistryException e) {
  }
  assertTrue(clean);
  CreateCompleteAssetResponse response=createAsset();
  assertEquals(AckValue.SUCCESS,response.getAck());
  assertEquals(null,response.getErrorMessage());
  UpdateAssetArtifactsResponse responseUpdate=replaceAsset(response.getAssetKey().getAssetId());
  assertEquals(AckValue.SUCCESS,responseUpdate.getAck());
  assertEquals(null,responseUpdate.getErrorMessage());
  AssetInfo assetInfo=getAsset(response.getAssetKey().getAssetId());
  List<ArtifactInfo> artifacts=assetInfo.getArtifactInfo();
  assertTrue(artifacts != null);
  assertEquals(1,artifacts.size());
  ArtifactInfo artifactInfo=artifacts.get(0);
  assertEquals("String_Node_Str" + assetName + "String_Node_Str",artifactInfo.getArtifact().getArtifactName());
  assertEquals("String_Node_Str",artifactInfo.getArtifact().getArtifactCategory());
  assertEquals(ArtifactValueType.URL,artifactInfo.getArtifact().getArtifactValueType());
  assertEquals(new String((baseUrl + assetName + "String_Node_Str").getBytes("String_Node_Str")),new String(artifactInfo.getArtifactDetail()));
  assertEquals("String_Node_Str",artifactInfo.getContentType());
}
Program: 19060
Project: 19060
Buggy source:
private static CreateCompleteAssetRequest getCreateCompleteAssetRequest(CreateAndSubmitAssetRequest createAndSubmitAssetRequest){
  CreateCompleteAssetRequest createCompleteAssetRequest=new CreateCompleteAssetRequest();
  createCompleteAssetRequest.setAssetInfo(createAndSubmitAssetRequest.getAssetInfo());
  createCompleteAssetRequest.setCaptureTemplateName(createAndSubmitAssetRequest.getCaptureTemplateName());
  return createCompleteAssetRequest;
}

Fixed version (ground truth):
private static CreateCompleteAssetRequest getCreateCompleteAssetRequest(CreateAndSubmitAssetRequest createAndSubmitAssetRequest){
  CreateCompleteAssetRequest createCompleteAssetRequest=new CreateCompleteAssetRequest();
  createCompleteAssetRequest.setAssetInfo(createAndSubmitAssetRequest.getAssetInfo());
  return createCompleteAssetRequest;
}
Program: 19064
Project: 19064
Buggy source:
@Command(aliases={"String_Node_Str"},usage="String_Node_Str",desc="String_Node_Str",min=1,max=1) @CommandPermissions(value={"String_Node_Str","String_Node_Str","String_Node_Str"}) public void unbanip(CommandContext args,LocalPlayer sender) throws CommandException, BouncerException {
  String toUnban=args.getString(0);
  if (!NetUtils.isIPAddress(toUnban)) {
    throw new CommandException("String_Node_Str");
  }
  RemoveBanEvent removeBanEvent=new RemoveBanEvent(BanType.IP,sender,toUnban);
  MCBEventHandler.callEvent(removeBanEvent);
  if (removeBanEvent.isCancelled()) {
    return;
  }
  toUnban=removeBanEvent.getUser();
  sender=removeBanEvent.getIssuer();
  boolean success=false;
  String error="String_Node_Str";
  try {
    controller.getAPI().removeIPBan(toUnban);
    controller.getLogger().info(sender.getName() + "String_Node_Str" + toUnban);
    success=true;
  }
 catch (  APIException e) {
    error=e.getMessage();
  }
  BanRemovedEvent banRemovedEvent=new BanRemovedEvent(BanType.IP,sender,toUnban,success,error);
  MCBEventHandler.callEvent(banRemovedEvent);
  if (success) {
    controller.getServer().messageMods(ChatColor.GREEN + toUnban + "String_Node_Str"+ sender.getName()+ "String_Node_Str");
  }
 else {
    sender.sendMessage(ChatColor.RED + error);
  }
}

Fixed version (ground truth):
@Command(aliases={"String_Node_Str"},usage="String_Node_Str",desc="String_Node_Str",min=1,max=1) @CommandPermissions(value={"String_Node_Str","String_Node_Str","String_Node_Str"}) public void unbanip(CommandContext args,LocalPlayer sender) throws CommandException, BouncerException {
  if (controller.getConfiguration().isIPFunctionsDisabled()) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return;
  }
  String toUnban=args.getString(0);
  if (!NetUtils.isIPAddress(toUnban)) {
    throw new CommandException("String_Node_Str");
  }
  RemoveBanEvent removeBanEvent=new RemoveBanEvent(BanType.IP,sender,toUnban);
  MCBEventHandler.callEvent(removeBanEvent);
  if (removeBanEvent.isCancelled()) {
    return;
  }
  toUnban=removeBanEvent.getUser();
  sender=removeBanEvent.getIssuer();
  boolean success=false;
  String error="String_Node_Str";
  try {
    controller.getAPI().removeIPBan(toUnban);
    controller.getLogger().info(sender.getName() + "String_Node_Str" + toUnban);
    success=true;
  }
 catch (  APIException e) {
    error=e.getMessage();
  }
  BanRemovedEvent banRemovedEvent=new BanRemovedEvent(BanType.IP,sender,toUnban,success,error);
  MCBEventHandler.callEvent(banRemovedEvent);
  if (success) {
    controller.getServer().messageMods(ChatColor.GREEN + toUnban + "String_Node_Str"+ sender.getName()+ "String_Node_Str");
  }
 else {
    sender.sendMessage(ChatColor.RED + error);
  }
}
Program: 19067
Project: 19067
Buggy source:
/** 
 * Adds something to the server
 * @param type Type of item to add. Ban, IPBan, GlobalNote, or Note
 * @param issuer User issuing the addition
 * @param user User to ban/note
 * @param reason Reason for the ban, or the text of the note
 * @return Whether or not the request succeeded
 * @throws NetworkException
 * @throws APIException 
 */
protected boolean addSomething(String type,String issuer,String user,String reason) throws NetworkException, APIException {
  Response response=this.getAPIURL("String_Node_Str" + type,"String_Node_Str",issuer,user,reason);
  if (response.getContent() != null && response.getContent().length() != 0) {
    JSONNode json=response.getJSONResult();
    if (json == null) {
      throw new APIException("String_Node_Str");
    }
    if (json.getBoolean("String_Node_Str",false)) {
      return true;
    }
 else {
      throw new APIException(json.getString("String_Node_Str"));
    }
  }
  throw new APIException("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Adds something to the server
 * @param type Type of item to add. Ban, IPBan, GlobalNote, or Note
 * @param issuer User issuing the addition
 * @param user User to ban/note
 * @param reason Reason for the ban, or the text of the note
 * @return Whether or not the request succeeded
 * @throws NetworkException
 * @throws APIException 
 */
protected boolean addSomething(String type,String issuer,String user,String reason) throws NetworkException, APIException {
  Response response=this.getAPIURL("String_Node_Str" + type,"String_Node_Str",issuer,user,reason);
  if (response.getContent() != null && response.getContent().length() != 0) {
    JSONNode json=null;
    try {
      json=response.getJSONResult();
    }
 catch (    ParserException e) {
      throw new APIException("String_Node_Str");
    }
    if (json.getBoolean("String_Node_Str",false)) {
      return true;
    }
 else {
      throw new APIException(json.getString("String_Node_Str"));
    }
  }
  throw new APIException("String_Node_Str");
}
Program: 19068
Project: 19068
Buggy source:
/** 
 * Returns a list of all the bans that a user has
 * @param user Username to check
 * @return List of UserBan objects
 * @throws NetworkException
 * @throws APIException 
 */
public List<UserBan> getBans(String user) throws NetworkException, APIException {
  Response response=this.getAPIURL("String_Node_Str","String_Node_Str",user);
  if (response.getContent() != null && response.getContent().length() != 0) {
    JSONNode json=response.getJSONResult();
    if (json == null) {
      throw new APIException("String_Node_Str");
    }
    if (json.getBoolean("String_Node_Str",false)) {
      List<UserBan> bans=new ArrayList<UserBan>();
      for (      MapNode node : json.getMapNodeList("String_Node_Str")) {
        bans.add(new UserBan(node));
      }
      return bans;
    }
 else {
      throw new APIException(json.getString("String_Node_Str"));
    }
  }
  throw new APIException("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Returns a list of all the bans that a user has
 * @param user Username to check
 * @return List of UserBan objects
 * @throws NetworkException
 * @throws APIException 
 */
public List<UserBan> getBans(String user) throws NetworkException, APIException {
  Response response=this.getAPIURL("String_Node_Str","String_Node_Str",user);
  if (response.getContent() != null && response.getContent().length() != 0) {
    JSONNode json=null;
    try {
      json=response.getJSONResult();
    }
 catch (    ParserException e) {
      throw new APIException("String_Node_Str");
    }
    if (json.getBoolean("String_Node_Str",false)) {
      List<UserBan> bans=new ArrayList<UserBan>();
      for (      MapNode node : json.getMapNodeList("String_Node_Str")) {
        bans.add(new UserBan(node));
      }
      return bans;
    }
 else {
      throw new APIException(json.getString("String_Node_Str"));
    }
  }
  throw new APIException("String_Node_Str");
}
Program: 19069
Project: 19069
Buggy source:
/** 
 * Returns a list of all the notes that a user has
 * @param user Username to check
 * @return List of UserNote objects
 * @throws NetworkException
 * @throws APIException 
 */
public List<UserNote> getNotes(String user) throws NetworkException, APIException {
  Response response=this.getAPIURL("String_Node_Str","String_Node_Str",user);
  if (response.getContent() != null && response.getContent().length() != 0) {
    JSONNode json=response.getJSONResult();
    if (json == null) {
      throw new APIException("String_Node_Str");
    }
    if (json.getBoolean("String_Node_Str",false)) {
      List<UserNote> bans=new ArrayList<UserNote>();
      for (      MapNode node : json.getMapNodeList("String_Node_Str")) {
        bans.add(new UserNote(node));
      }
      return bans;
    }
 else {
      throw new APIException(json.getString("String_Node_Str"));
    }
  }
  throw new APIException("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Returns a list of all the notes that a user has
 * @param user Username to check
 * @return List of UserNote objects
 * @throws NetworkException
 * @throws APIException 
 */
public List<UserNote> getNotes(String user) throws NetworkException, APIException {
  Response response=this.getAPIURL("String_Node_Str","String_Node_Str",user);
  if (response.getContent() != null && response.getContent().length() != 0) {
    JSONNode json=null;
    try {
      json=response.getJSONResult();
    }
 catch (    ParserException e) {
      throw new APIException("String_Node_Str");
    }
    if (json.getBoolean("String_Node_Str",false)) {
      List<UserNote> bans=new ArrayList<UserNote>();
      for (      MapNode node : json.getMapNodeList("String_Node_Str")) {
        bans.add(new UserNote(node));
      }
      return bans;
    }
 else {
      throw new APIException(json.getString("String_Node_Str"));
    }
  }
  throw new APIException("String_Node_Str");
}
Program: 19070
Project: 19070
Buggy source:
/** 
 * Returns the reason for something on this server only
 * @param type Type of item to get: Ban, IPBan, or Note
 * @param user Username to check
 * @return Reason for item
 * @throws NetworkException
 * @throws APIException 
 */
protected String getReason(String type,String user) throws NetworkException, APIException {
  Response response=this.getAPIURL("String_Node_Str" + type + "String_Node_Str","String_Node_Str",user);
  if (response.getContent() != null && response.getContent().length() != 0) {
    JSONNode json=response.getJSONResult();
    if (json == null) {
      throw new APIException("String_Node_Str");
    }
    if (json.getBoolean("String_Node_Str",false)) {
      return json.getString("String_Node_Str");
    }
 else {
      throw new APIException(json.getString("String_Node_Str"));
    }
  }
  throw new APIException("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Returns the reason for something on this server only
 * @param type Type of item to get: Ban, IPBan, or Note
 * @param user Username to check
 * @return Reason for item
 * @throws NetworkException
 * @throws APIException 
 */
protected String getReason(String type,String user) throws NetworkException, APIException {
  Response response=this.getAPIURL("String_Node_Str" + type + "String_Node_Str","String_Node_Str",user);
  if (response.getContent() != null && response.getContent().length() != 0) {
    JSONNode json=null;
    try {
      json=response.getJSONResult();
    }
 catch (    ParserException e) {
      throw new APIException("String_Node_Str");
    }
    if (json.getBoolean("String_Node_Str",false)) {
      return json.getString("String_Node_Str");
    }
 else {
      throw new APIException(json.getString("String_Node_Str"));
    }
  }
  throw new APIException("String_Node_Str");
}
Program: 19071
Project: 19071
Buggy source:
/** 
 * Removes something from the server
 * @param type Type of thing to remove. Can be Ban, IPBan, Note
 * @param first User/IP to unban, or note issuer
 * @param second Note ID, if type == note
 * @return Whether or not the request succeeded
 * @throws NetworkException
 * @throws APIException 
 */
protected boolean removeSomething(String type,String first,String second) throws NetworkException, APIException {
  Response response=null;
  if (second != null) {
    response=this.getAPIURL("String_Node_Str" + type,"String_Node_Str",first,second);
  }
 else {
    response=this.getAPIURL("String_Node_Str" + type,"String_Node_Str",first);
  }
  if (response.getContent() != null && response.getContent().length() != 0) {
    JSONNode json=response.getJSONResult();
    if (json == null) {
      throw new APIException("String_Node_Str");
    }
    if (json.getBoolean("String_Node_Str",false)) {
      return true;
    }
 else {
      throw new APIException(json.getString("String_Node_Str"));
    }
  }
  throw new APIException("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Removes something from the server
 * @param type Type of thing to remove. Can be Ban, IPBan, Note
 * @param first User/IP to unban, or note issuer
 * @param second Note ID, if type == note
 * @return Whether or not the request succeeded
 * @throws NetworkException
 * @throws APIException 
 */
protected boolean removeSomething(String type,String first,String second) throws NetworkException, APIException {
  Response response=null;
  if (second != null) {
    response=this.getAPIURL("String_Node_Str" + type,"String_Node_Str",first,second);
  }
 else {
    response=this.getAPIURL("String_Node_Str" + type,"String_Node_Str",first);
  }
  if (response.getContent() != null && response.getContent().length() != 0) {
    JSONNode json=null;
    try {
      json=response.getJSONResult();
    }
 catch (    ParserException e) {
      throw new APIException("String_Node_Str");
    }
    if (json.getBoolean("String_Node_Str",false)) {
      return true;
    }
 else {
      throw new APIException(json.getString("String_Node_Str"));
    }
  }
  throw new APIException("String_Node_Str");
}
Program: 19072
Project: 19072
Buggy source:
/** 
 * Update the last login time of a username
 * @param user Username to update
 * @param ip IP address the user logged in with
 * @return Whether or not the request succeeded
 * @throws NetworkException
 * @throws APIException 
 */
public boolean updateUser(String user,String ip) throws NetworkException, APIException {
  Response response=this.getAPIURL("String_Node_Str","String_Node_Str",user,ip);
  if (response.getContent() != null && response.getContent().length() != 0) {
    JSONNode json=response.getJSONResult();
    if (json == null) {
      throw new APIException("String_Node_Str");
    }
    if (json.getBoolean("String_Node_Str",false)) {
      return true;
    }
 else {
      throw new APIException(json.getString("String_Node_Str"));
    }
  }
  throw new APIException("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Update the last login time of a username
 * @param user Username to update
 * @param ip IP address the user logged in with
 * @return Whether or not the request succeeded
 * @throws NetworkException
 * @throws APIException 
 */
public boolean updateUser(String user,String ip) throws NetworkException, APIException {
  Response response=this.getAPIURL("String_Node_Str","String_Node_Str",user,ip);
  if (response.getContent() != null && response.getContent().length() != 0) {
    JSONNode json=null;
    try {
      json=response.getJSONResult();
    }
 catch (    ParserException e) {
      throw new APIException("String_Node_Str");
    }
    if (json.getBoolean("String_Node_Str",false)) {
      return true;
    }
 else {
      throw new APIException(json.getString("String_Node_Str"));
    }
  }
  throw new APIException("String_Node_Str");
}
Program: 19073
Project: 19073
Buggy source:
/** 
 * Gets the count of something. Type can be one of "Ban", "IPBan", or "Note"
 * @param type
 * @param user
 * @return
 * @throws NetworkException
 * @throws APIException 
 */
protected Integer getTypeCount(String type,String user) throws NetworkException, APIException {
  Response response=this.getAPIURL("String_Node_Str" + type + "String_Node_Str","String_Node_Str",user);
  if (response.getContent() != null && response.getContent().length() != 0) {
    JSONNode json=response.getJSONResult();
    if (json == null) {
      throw new APIException("String_Node_Str");
    }
    if (json.getBoolean("String_Node_Str",false)) {
      return json.getInteger("String_Node_Str",0);
    }
 else {
      throw new APIException(json.getString("String_Node_Str"));
    }
  }
  throw new APIException("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Gets the count of something. Type can be one of "Ban", "IPBan", or "Note"
 * @param type
 * @param user
 * @return
 * @throws NetworkException
 * @throws APIException 
 */
protected Integer getTypeCount(String type,String user) throws NetworkException, APIException {
  Response response=this.getAPIURL("String_Node_Str" + type + "String_Node_Str","String_Node_Str",user);
  if (response.getContent() != null && response.getContent().length() != 0) {
    JSONNode json=null;
    try {
      json=response.getJSONResult();
    }
 catch (    ParserException e) {
      throw new APIException("String_Node_Str");
    }
    if (json.getBoolean("String_Node_Str",false)) {
      return json.getInteger("String_Node_Str",0);
    }
 else {
      throw new APIException(json.getString("String_Node_Str"));
    }
  }
  throw new APIException("String_Node_Str");
}
Program: 19074
Project: 19074
Buggy source:
/** 
 * Returns a list of all the bans that an IP has
 * @param ip IP to check
 * @return List of IPBan objects
 * @throws NetworkException
 * @throws APIException 
 */
public List<IPBan> getIPBans(String ip) throws NetworkException, APIException {
  Response response=this.getAPIURL("String_Node_Str","String_Node_Str",ip);
  if (response.getContent() != null && response.getContent().length() != 0) {
    JSONNode json=response.getJSONResult();
    if (json == null) {
      throw new APIException("String_Node_Str");
    }
    if (json.getBoolean("String_Node_Str",false)) {
      List<IPBan> bans=new ArrayList<IPBan>();
      for (      MapNode node : json.getMapNodeList("String_Node_Str")) {
        bans.add(new IPBan(node));
      }
      return bans;
    }
 else {
      throw new APIException(json.getString("String_Node_Str"));
    }
  }
  throw new APIException("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Returns a list of all the bans that an IP has
 * @param ip IP to check
 * @return List of IPBan objects
 * @throws NetworkException
 * @throws APIException 
 */
public List<IPBan> getIPBans(String ip) throws NetworkException, APIException {
  Response response=this.getAPIURL("String_Node_Str","String_Node_Str",ip);
  if (response.getContent() != null && response.getContent().length() != 0) {
    JSONNode json=null;
    try {
      json=response.getJSONResult();
    }
 catch (    ParserException e) {
      throw new APIException("String_Node_Str");
    }
    if (json.getBoolean("String_Node_Str",false)) {
      List<IPBan> bans=new ArrayList<IPBan>();
      for (      MapNode node : json.getMapNodeList("String_Node_Str")) {
        bans.add(new IPBan(node));
      }
      return bans;
    }
 else {
      throw new APIException(json.getString("String_Node_Str"));
    }
  }
  throw new APIException("String_Node_Str");
}
Program: 19075
Project: 19075
Buggy source:
/** 
 * Returns a list of users who are currently logging in. This is used to prevent people spamming login packets in order to DDoS the server.
 * @return 
 */
public List<String> getCurrentlyLoggingIn(){
  return currentlyLoggingIn;
}

Fixed version (ground truth):
/** 
 * Returns a list of users who are currently logging in. This is used to prevent people spamming login packets in order to DDoS the server.
 * @return 
 */
public HashMap<String,Long> getCurrentlyLoggingIn(){
  return currentlyLoggingIn;
}
Program: 19076
Project: 19076
Buggy source:
public MCBouncer(LocalServer server,LocalConfiguration configuration){
  this.logger=new MCBLogger(this);
  this.server=server;
  this.configuration=configuration;
  commandManager=new CommandManager(this);
  commandManager.register(BanCommands.class);
  commandManager.register(GeneralCommands.class);
  commandManager.register(MCBouncerCommands.class);
  commandManager.register(NoteCommands.class);
  JoinEvent.handlers.register(new JoinListener(),Order.Earliest);
  ChatEvent.handlers.register(new ChatListener(),Order.Earliest);
  CommandEvent.handlers.register(new CommandListener(),Order.Earliest);
  KickEvent.handlers.register(new KickListener(),Order.Earliest);
  LoginEvent.handlers.register(new LoginListener(),Order.Earliest);
  this.api=new MCBouncerAPI(this);
}

Fixed version (ground truth):
public MCBouncer(LocalServer server,LocalConfiguration configuration){
  this.logger=new MCBLogger(this);
  this.server=server;
  this.configuration=configuration;
  commandManager=new CommandManager(this);
  commandManager.register(BanCommands.class);
  commandManager.register(GeneralCommands.class);
  commandManager.register(MCBouncerCommands.class);
  commandManager.register(NoteCommands.class);
  JoinEvent.handlers.register(new JoinListener(),Order.Earliest);
  ChatEvent.handlers.register(new ChatListener(),Order.Earliest);
  BlockBreakEvent.handlers.register(new BlockBreakListener(),Order.Earliest);
  BlockPlaceEvent.handlers.register(new BlockPlaceListener(),Order.Earliest);
  CommandEvent.handlers.register(new CommandListener(),Order.Earliest);
  KickEvent.handlers.register(new KickListener(),Order.Earliest);
  LoginEvent.handlers.register(new LoginListener(),Order.Earliest);
  this.api=new MCBouncerAPI(this);
}
Program: 19077
Project: 19077
Buggy source:
public void onEvent(ChatEvent event){
  List<String> loggedIn=event.getController().getCurrentlyLoggingIn();
  if (loggedIn.contains(event.getUser())) {
    event.setCancelled(true);
  }
}

Fixed version (ground truth):
public void onEvent(ChatEvent event){
  HashMap<String,Long> loggedIn=event.getController().getCurrentlyLoggingIn();
  if (loggedIn.keySet().contains(event.getUser())) {
    event.setCancelled(true);
  }
}
Program: 19078
Project: 19078
Buggy source:
public void onEvent(CommandEvent event){
  List<String> loggedIn=event.getController().getCurrentlyLoggingIn();
  if (loggedIn.contains(event.getUser())) {
    event.setCancelled(true);
  }
}

Fixed version (ground truth):
public void onEvent(CommandEvent event){
  HashMap<String,Long> loggedIn=event.getController().getCurrentlyLoggingIn();
  if (loggedIn.keySet().contains(event.getUser())) {
    event.setCancelled(true);
  }
}
Program: 19079
Project: 19079
Buggy source:
public void onEvent(KickEvent event){
  if (event.getPlayer().equals(event.getController().getLastKickedUser())) {
    event.setCancelled(true);
  }
  if (event.getController().getCurrentlyLoggingIn().contains(event.getPlayer())) {
    event.setCancelled(true);
  }
}

Fixed version (ground truth):
public void onEvent(KickEvent event){
  if (event.getPlayer().equals(event.getController().getLastKickedUser())) {
    event.setCancelled(true);
  }
  if (event.getController().getCurrentlyLoggingIn().keySet().contains(event.getPlayer())) {
    event.setCancelled(true);
  }
}
Program: 19080
Project: 19080
Buggy source:
public void onEvent(LoginEvent event){
  List<String> loggedIn=event.getController().getCurrentlyLoggingIn();
  if (loggedIn.contains(event.getUser())) {
    event.setCancelled(true);
  }
 else {
    loggedIn.add(event.getUser());
  }
}

Fixed version (ground truth):
public void onEvent(LoginEvent event){
  HashMap<String,Long> loggedIn=event.getController().getCurrentlyLoggingIn();
  if (loggedIn.keySet().contains(event.getUser())) {
    if (System.currentTimeMillis() - loggedIn.get(event.getUser()) > 5000) {
      loggedIn.put(event.getUser(),System.currentTimeMillis());
    }
 else {
      event.setCancelled(true);
    }
  }
 else {
    loggedIn.put(event.getUser(),System.currentTimeMillis());
  }
}
Program: 19081
Project: 19081
Buggy source:
public String getSenderName(){
}

Fixed version (ground truth):
public String getSenderName(){
  String senderName="String_Node_Str";
  if (sender instanceof Player) {
    senderName=ChatColor.stripColor(((Player)sender).getName());
  }
  return senderName;
}
Program: 19082
Project: 19082
Buggy source:
public boolean runCommand(){
  if (args.length < 2) {
    return false;
  }
  String playerName=this.getPlayerNameFromArgs(args[0]);
  String note=MCBouncerUtil.getReasonOrDefault(args,MCBouncerUtil.implodeWithoutFirstElement(args,"String_Node_Str"),"String_Node_Str");
  boolean result=MCBouncerUtil.addNote(playerName,this.getSenderName(),note);
  if (result) {
    MCBouncer.log.info(this.getSenderName() + "String_Node_Str" + playerName+ "String_Node_Str"+ note);
    this.sendMessageToSender(ChatColor.GREEN + "String_Node_Str");
  }
 else {
    this.sendMessageToSender(ChatColor.RED + MCBouncerAPI.getError());
  }
  return true;
}

Fixed version (ground truth):
public boolean runCommand(){
  if (args.length < 2) {
    return false;
  }
  String playerName=this.getPlayerNameFromArgs(args[0]);
  if (playerName != null) {
    String note=MCBouncerUtil.getReasonOrDefault(args,MCBouncerUtil.implodeWithoutFirstElement(args,"String_Node_Str"),"String_Node_Str");
    boolean result=MCBouncerUtil.addNote(playerName,this.getSenderName(),note);
    if (result) {
      MCBouncer.log.info(this.getSenderName() + "String_Node_Str" + playerName+ "String_Node_Str"+ note);
      this.sendMessageToSender(ChatColor.GREEN + "String_Node_Str" + playerName+ "String_Node_Str");
    }
 else {
      this.sendMessageToSender(ChatColor.RED + MCBouncerAPI.getError());
    }
  }
  return true;
}
Program: 19083
Project: 19083
Buggy source:
public boolean runCommand(){
  if (args.length < 1) {
    return false;
  }
  String playerName=this.getPlayerNameFromArgs(args[0]);
  String reason=MCBouncerUtil.getReasonOrDefault(args,MCBouncerUtil.implodeWithoutFirstElement(args,"String_Node_Str"),MCBConfiguration.getDefaultReason());
  boolean result=MCBouncerUtil.addBan(playerName,this.getSenderName(),reason);
  if (result) {
    MCBouncer.log.info(this.getSenderName() + "String_Node_Str" + playerName+ "String_Node_Str"+ reason);
    this.sendMessageToSender(ChatColor.GREEN + "String_Node_Str");
  }
 else {
    this.sendMessageToSender(ChatColor.RED + MCBouncerAPI.getError());
  }
  this.kickPlayer(playerName,"String_Node_Str" + reason);
  return true;
}

Fixed version (ground truth):
public boolean runCommand(){
  if (args.length < 1) {
    return false;
  }
  String playerName=this.getPlayerNameFromArgs(args[0]);
  if (playerName != null) {
    String reason=MCBouncerUtil.getReasonOrDefault(args,MCBouncerUtil.implodeWithoutFirstElement(args,"String_Node_Str"),MCBConfiguration.getDefaultReason());
    boolean result=MCBouncerUtil.addBan(playerName,this.getSenderName(),reason);
    if (result) {
      MCBouncer.log.info(this.getSenderName() + "String_Node_Str" + playerName+ "String_Node_Str"+ reason);
      this.sendMessageToSender(ChatColor.GREEN + "String_Node_Str" + playerName+ "String_Node_Str");
    }
 else {
      this.sendMessageToSender(ChatColor.RED + MCBouncerAPI.getError());
    }
    this.kickPlayer(playerName,"String_Node_Str" + reason);
  }
  return true;
}