nus-yam/ex-repair huggingface dataset:
Program: 80876
Project: 80876
Buggy source:
private boolean reloadTablists(){
  TabListManager tabListManager=new TabListManager(this);
  if (!tabListManager.loadTabLists()) {
    return true;
  }
  tabLists=tabListManager;
  return false;
}

Fixed version (ground truth):
private boolean reloadTablists(){
  failIfNotMainThread();
  TabListManager tabListManager=new TabListManager(this);
  if (!tabListManager.loadTabLists()) {
    return true;
  }
  tabLists=tabListManager;
  return false;
}
Program: 80877
Project: 80877
Buggy source:
/** 
 * Reloads most settings of the plugin
 */
public boolean reload(){
  try {
    requestedUpdateInterval=null;
    config=new ConfigManager(plugin);
    placeholderManager.reload();
    if (reloadTablists())     return false;
    fakePlayerManager.reload();
    resendTabLists();
    restartRefreshThread();
    placeholderAPIHook.onLoad();
  }
 catch (  IOException ex) {
    plugin.getLogger().log(Level.WARNING,"String_Node_Str",ex);
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Reloads most settings of the plugin
 */
public boolean reload(){
  if (!resendThread.isInMainThread()) {
    AtomicReference<Boolean> ref=new AtomicReference<>(null);
    resendThread.execute(() -> {
      ref.set(reload());
    }
);
    while (ref.get() == null) {
      try {
        Thread.sleep(10);
      }
 catch (      InterruptedException ignored) {
        return false;
      }
    }
    return ref.get();
  }
  failIfNotMainThread();
  try {
    requestedUpdateInterval=null;
    config=new ConfigManager(plugin);
    placeholderManager.reload();
    if (reloadTablists())     return false;
    fakePlayerManager.reload();
    resendTabLists();
    restartRefreshThread();
    placeholderAPIHook.onLoad();
  }
 catch (  IOException ex) {
    plugin.getLogger().log(Level.WARNING,"String_Node_Str",ex);
  }
  return true;
}
Program: 80878
Project: 80878
Buggy source:
/** 
 * Getter for an instance of the PlayerManager. For internal use only.
 * @return an instance of the PlayerManager or null
 */
public PlayerManager constructPlayerManager(ProxiedPlayer viewer){
  return new PlayerManagerImpl(this,playerProviders,viewer);
}

Fixed version (ground truth):
/** 
 * Getter for an instance of the PlayerManager. For internal use only.
 * @return an instance of the PlayerManager or null
 */
public PlayerManager constructPlayerManager(ProxiedPlayer viewer){
  failIfNotMainThread();
  return new PlayerManagerImpl(this,playerProviders,viewer);
}
Program: 80879
Project: 80879
Buggy source:
public void registerPlaceholderProvider0(PlaceholderProvider placeholderProvider){
  getPlaceholderManager0().internalRegisterPlaceholderProvider(placeholderProvider);
  reloadTablists();
}

Fixed version (ground truth):
public void registerPlaceholderProvider0(PlaceholderProvider placeholderProvider){
  getPlaceholderManager0().internalRegisterPlaceholderProvider(placeholderProvider);
  runInMainThread(this::reloadTablists);
}
Program: 80880
Project: 80880
Buggy source:
public void add(ProxiedPlayer player){
  if (!set.contains(player)) {
    set.add(player);
    queue.add(player);
  }
}

Fixed version (ground truth):
public void add(ProxiedPlayer player){
  lock.lock();
  try {
    if (!set.contains(player)) {
      set.add(player);
      queue.add(player);
      condition.signal();
    }
  }
  finally {
    lock.unlock();
  }
}
Program: 80881
Project: 80881
Buggy source:
@Override public void run(){
  while (true) {
    try {
      if (queue.isEmpty()) {
        set.clear();
      }
      ProxiedPlayer player=queue.take();
      set.remove(player);
      Object tabList=BungeeTabListPlus.getTabList(player);
      if (tabList instanceof PlayerTablistHandler) {
        if (player.getServer() != null) {
          PlayerTablistHandler tablistHandler=(PlayerTablistHandler)tabList;
          update(tablistHandler);
        }
      }
    }
 catch (    InterruptedException ex) {
      break;
    }
catch (    Throwable th) {
      BungeeTabListPlus.getInstance().reportError(th);
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  lock.lock();
  try {
    while (true) {
      try {
        while (!tasks.isEmpty()) {
          tasks.poll().run();
        }
        while (!queue.isEmpty()) {
          ProxiedPlayer player=queue.poll();
          set.remove(player);
          Object tabList=BungeeTabListPlus.getTabList(player);
          if (tabList instanceof PlayerTablistHandler) {
            if (player.getServer() != null) {
              PlayerTablistHandler tablistHandler=(PlayerTablistHandler)tabList;
              update(tablistHandler);
            }
          }
        }
        set.clear();
        condition.await(1,TimeUnit.SECONDS);
      }
 catch (      InterruptedException ex) {
        break;
      }
catch (      Throwable th) {
        BungeeTabListPlus.getInstance().reportError(th);
      }
    }
  }
  finally {
    lock.unlock();
  }
}
Program: 80882
Project: 80882
Buggy source:
@SneakyThrows private BukkitData getPlayerDataCache(UUID uuid){
  return playerInformation.get(uuid,BukkitData::new);
}

Fixed version (ground truth):
@SneakyThrows private BukkitData getPlayerDataCache(UUID uuid){
  plugin.failIfNotMainThread();
  return playerInformation.get(uuid,BukkitData::new);
}
Program: 80883
Project: 80883
Buggy source:
public BukkitBridge(BungeeTabListPlus plugin){
  this.plugin=plugin;
  plugin.getProxy().getPluginManager().registerListener(plugin.getPlugin(),this);
  plugin.getProxy().getScheduler().schedule(plugin.getPlugin(),this::checkForThirdPartyVariables,2,2,TimeUnit.SECONDS);
  plugin.getProxy().getScheduler().schedule(plugin.getPlugin(),playerInformation::cleanUp,10,10,TimeUnit.SECONDS);
}

Fixed version (ground truth):
public BukkitBridge(BungeeTabListPlus plugin){
  this.plugin=plugin;
  plugin.getProxy().getPluginManager().registerListener(plugin.getPlugin(),this);
  plugin.getProxy().getScheduler().schedule(plugin.getPlugin(),() -> plugin.runInMainThread(this::checkForThirdPartyVariables),2,2,TimeUnit.SECONDS);
  plugin.getProxy().getScheduler().schedule(plugin.getPlugin(),playerInformation::cleanUp,10,10,TimeUnit.SECONDS);
}
Program: 80885
Project: 80885
Buggy source:
private BukkitData getServerDataCache(String serverName){
  if (!serverInformation.containsKey(serverName)) {
    serverInformation.putIfAbsent(serverName,new BukkitData());
  }
  return serverInformation.get(serverName);
}

Fixed version (ground truth):
private BukkitData getServerDataCache(String serverName){
  plugin.failIfNotMainThread();
  if (!serverInformation.containsKey(serverName)) {
    serverInformation.putIfAbsent(serverName,new BukkitData());
  }
  return serverInformation.get(serverName);
}
Program: 80886
Project: 80886
Buggy source:
public PlaceholderAPIHook(BungeeTabListPlus bungeeTabListPlus){
  this.bungeeTabListPlus=bungeeTabListPlus;
  bungeeTabListPlus.getPlugin().getProxy().getScheduler().schedule(bungeeTabListPlus.getPlugin(),this::askServersForPlaceholders,2,2,TimeUnit.SECONDS);
}

Fixed version (ground truth):
public PlaceholderAPIHook(BungeeTabListPlus bungeeTabListPlus){
  this.bungeeTabListPlus=bungeeTabListPlus;
  bungeeTabListPlus.getPlugin().getProxy().getScheduler().schedule(bungeeTabListPlus.getPlugin(),() -> bungeeTabListPlus.runInMainThread(this::askServersForPlaceholders),2,2,TimeUnit.SECONDS);
}
Program: 80889
Project: 80889
Buggy source:
@Override public Slot getSlotAt(TabListContext context,int pos,int size){
  int column=pos % context.getColumns();
  int sizePerCol=size / ConfigManager.getCols();
  int columnPos=(pos + ConfigManager.getCols() - 1) / ConfigManager.getCols();
  PlayerColumn playerColumn=pc[column];
  if (playerColumn != null) {
    int span=1;
    while (column + span < pc.length && pc[column + span] != null && pc[column + span - 1].filter.equals(pc[column + span].filter)) {
      span++;
    }
    int pre=1;
    while (column - pre >= 0 && pc[column - pre] != null && playerColumn.filter.equals(pc[column - pre].filter)) {
      pre++;
    }
    pre--;
    span+=pre;
    columnPos=columnPos * span + pre;
    return playerColumn.getSlotAt(context,columnPos,sizePerCol * span);
  }
  return null;
}

Fixed version (ground truth):
@Override public Slot getSlotAt(TabListContext context,int pos,int size){
  int column=pos % context.getColumns();
  int sizePerCol=size / ConfigManager.getCols();
  int columnPos=pos / ConfigManager.getCols();
  PlayerColumn playerColumn=pc[column];
  if (playerColumn != null) {
    int span=1;
    while (column + span < pc.length && pc[column + span] != null && pc[column + span - 1].filter.equals(pc[column + span].filter)) {
      span++;
    }
    int pre=1;
    while (column - pre >= 0 && pc[column - pre] != null && playerColumn.filter.equals(pc[column - pre].filter)) {
      pre++;
    }
    pre--;
    span+=pre;
    columnPos=columnPos * span + pre;
    return playerColumn.getSlotAt(context,columnPos,sizePerCol * span);
  }
  return null;
}
Program: 80890
Project: 80890
Buggy source:
static boolean compareVersions(String newVersion,String runningVersion){
  boolean usesDevBuild=false;
  if (runningVersion.endsWith("String_Node_Str")) {
    usesDevBuild=true;
    runningVersion=runningVersion.replace("String_Node_Str","String_Node_Str");
  }
  String[] current=runningVersion.split("String_Node_Str");
  String[] latest=newVersion.split("String_Node_Str");
  int i=0;
  boolean higher=false;
  boolean equal=true;
  for (; i < current.length && i < latest.length; i++) {
    if (Integer.valueOf(current[i]) < Integer.valueOf(latest[i])) {
      higher=true;
      break;
    }
 else     if (Objects.equals(Integer.valueOf(current[i]),Integer.valueOf(latest[i]))) {
      equal=true;
    }
 else {
      equal=false;
      break;
    }
  }
  boolean updateAvailable=false;
  if (higher) {
    updateAvailable=true;
  }
  if (equal) {
    if (current.length < latest.length) {
      updateAvailable=true;
    }
 else     if (usesDevBuild) {
      updateAvailable=true;
    }
  }
  return updateAvailable;
}

Fixed version (ground truth):
static boolean compareVersions(String newVersion,String runningVersion){
  boolean usesDevBuild=false;
  if (runningVersion.endsWith("String_Node_Str")) {
    usesDevBuild=true;
    runningVersion=runningVersion.replace("String_Node_Str","String_Node_Str");
  }
  String[] current=runningVersion.split("String_Node_Str");
  String[] latest=newVersion.split("String_Node_Str");
  int i=0;
  boolean higher=false;
  boolean equal=true;
  for (; i < current.length && i < latest.length; i++) {
    if (Integer.valueOf(current[i]) < Integer.valueOf(latest[i])) {
      higher=true;
      break;
    }
 else     if (Objects.equals(Integer.valueOf(current[i]),Integer.valueOf(latest[i]))) {
      equal=true;
    }
 else {
      equal=false;
      break;
    }
  }
  boolean updateAvailable=false;
  if (higher) {
    updateAvailable=true;
  }
  if (equal) {
    if (current.length < latest.length) {
      updateAvailable=true;
    }
 else     if (current.length == latest.length && usesDevBuild) {
      updateAvailable=true;
    }
  }
  return updateAvailable;
}
Program: 80891
Project: 80891
Buggy source:
@Test public void testCompareVersions() throws Exception {
  Assert.assertTrue(UpdateChecker.compareVersions("String_Node_Str","String_Node_Str"));
  Assert.assertTrue(UpdateChecker.compareVersions("String_Node_Str","String_Node_Str"));
  Assert.assertTrue(UpdateChecker.compareVersions("String_Node_Str","String_Node_Str"));
  Assert.assertTrue(UpdateChecker.compareVersions("String_Node_Str","String_Node_Str"));
  Assert.assertTrue(UpdateChecker.compareVersions("String_Node_Str","String_Node_Str"));
  Assert.assertFalse(UpdateChecker.compareVersions("String_Node_Str","String_Node_Str"));
  Assert.assertFalse(UpdateChecker.compareVersions("String_Node_Str","String_Node_Str"));
  Assert.assertFalse(UpdateChecker.compareVersions("String_Node_Str","String_Node_Str"));
  Assert.assertFalse(UpdateChecker.compareVersions("String_Node_Str","String_Node_Str"));
  Assert.assertFalse(UpdateChecker.compareVersions("String_Node_Str","String_Node_Str"));
}

Fixed version (ground truth):
@Test public void testCompareVersions() throws Exception {
  Assert.assertTrue(UpdateChecker.compareVersions("String_Node_Str","String_Node_Str"));
  Assert.assertTrue(UpdateChecker.compareVersions("String_Node_Str","String_Node_Str"));
  Assert.assertTrue(UpdateChecker.compareVersions("String_Node_Str","String_Node_Str"));
  Assert.assertTrue(UpdateChecker.compareVersions("String_Node_Str","String_Node_Str"));
  Assert.assertTrue(UpdateChecker.compareVersions("String_Node_Str","String_Node_Str"));
  Assert.assertFalse(UpdateChecker.compareVersions("String_Node_Str","String_Node_Str"));
  Assert.assertFalse(UpdateChecker.compareVersions("String_Node_Str","String_Node_Str"));
  Assert.assertFalse(UpdateChecker.compareVersions("String_Node_Str","String_Node_Str"));
  Assert.assertFalse(UpdateChecker.compareVersions("String_Node_Str","String_Node_Str"));
  Assert.assertFalse(UpdateChecker.compareVersions("String_Node_Str","String_Node_Str"));
  Assert.assertFalse(UpdateChecker.compareVersions("String_Node_Str","String_Node_Str"));
}
Program: 80893
Project: 80893
Buggy source:
public String getSuffix(IPlayer player){
  String suffix=null;
  Plugin p=plugin.getProxy().getPluginManager().getPlugin("String_Node_Str");
  if (p != null) {
    BungeePerms bp=BungeePerms.getInstance();
    try {
      PermissionsManager pm=bp.getPermissionsManager();
      if (pm != null) {
        User user=pm.getUser(player.getName());
        if (user != null) {
          suffix=pm.getMainGroup(user).getSuffix();
        }
      }
    }
 catch (    NullPointerException ex) {
      BungeeTabListPlus.getInstance().getLogger().log(Level.SEVERE,"String_Node_Str",ex);
    }
catch (    Throwable th) {
      BungeeTabListPlus.getInstance().reportError(th);
    }
  }
  Optional<String> vsuffix=plugin.getBridge().getPlayerInformation(player,Values.Player.Vault.Suffix);
  String mode=plugin.getConfigManager().getMainConfig().permissionSource;
  if (mode.equalsIgnoreCase("String_Node_Str")) {
    return suffix;
  }
 else   if (mode.equalsIgnoreCase("String_Node_Str")) {
    return vsuffix.orElse("String_Node_Str");
  }
  if (suffix != null) {
    return suffix;
  }
  if (vsuffix.isPresent()) {
    return vsuffix.get();
  }
  return "String_Node_Str";
}

Fixed version (ground truth):
public String getSuffix(IPlayer player){
  String suffix=null;
  Plugin p=plugin.getProxy().getPluginManager().getPlugin("String_Node_Str");
  if (p != null) {
    BungeePerms bp=BungeePerms.getInstance();
    try {
      PermissionsManager pm=bp.getPermissionsManager();
      if (pm != null) {
        User user=pm.getUser(player.getName());
        if (user != null) {
          Group group=pm.getMainGroup(user);
          if (group != null) {
            suffix=group.getSuffix();
          }
        }
      }
    }
 catch (    NullPointerException ex) {
      BungeeTabListPlus.getInstance().getLogger().log(Level.SEVERE,"String_Node_Str",ex);
    }
catch (    Throwable th) {
      BungeeTabListPlus.getInstance().reportError(th);
    }
  }
  Optional<String> vsuffix=plugin.getBridge().getPlayerInformation(player,Values.Player.Vault.Suffix);
  String mode=plugin.getConfigManager().getMainConfig().permissionSource;
  if (mode.equalsIgnoreCase("String_Node_Str")) {
    return suffix;
  }
 else   if (mode.equalsIgnoreCase("String_Node_Str")) {
    return vsuffix.orElse("String_Node_Str");
  }
  if (suffix != null) {
    return suffix;
  }
  if (vsuffix.isPresent()) {
    return vsuffix.get();
  }
  return "String_Node_Str";
}
Program: 80894
Project: 80894
Buggy source:
public String getPrefix(IPlayer player){
  String bpprefix=null;
  Plugin p=plugin.getProxy().getPluginManager().getPlugin("String_Node_Str");
  if (p != null) {
    BungeePerms bp=BungeePerms.getInstance();
    try {
      PermissionsManager pm=bp.getPermissionsManager();
      if (pm != null) {
        User user=pm.getUser(player.getName());
        if (user != null) {
          bpprefix=pm.getMainGroup(user).getPrefix();
        }
      }
    }
 catch (    NullPointerException ex) {
      BungeeTabListPlus.getInstance().getLogger().log(Level.SEVERE,"String_Node_Str",ex);
    }
catch (    Throwable th) {
      BungeeTabListPlus.getInstance().reportError(th);
    }
  }
  String bprefix=plugin.getConfigManager().getMainConfig().prefixes.get(getMainGroup(player));
  Optional<String> vprefix=plugin.getBridge().getPlayerInformation(player,Values.Player.Vault.Prefix);
  String mode=plugin.getConfigManager().getMainConfig().permissionSource;
  if (mode.equalsIgnoreCase("String_Node_Str")) {
    return bpprefix != null ? bpprefix : "String_Node_Str";
  }
 else   if (mode.equalsIgnoreCase("String_Node_Str")) {
    return vprefix.isPresent() ? vprefix.get() : "String_Node_Str";
  }
 else   if (mode.equalsIgnoreCase("String_Node_Str")) {
    return bprefix != null ? bprefix : "String_Node_Str";
  }
  if (bprefix != null) {
    return bprefix;
  }
  if (bpprefix != null) {
    return bpprefix;
  }
  if (vprefix.isPresent()) {
    return vprefix.get();
  }
  return "String_Node_Str";
}

Fixed version (ground truth):
public String getPrefix(IPlayer player){
  String bpprefix=null;
  Plugin p=plugin.getProxy().getPluginManager().getPlugin("String_Node_Str");
  if (p != null) {
    BungeePerms bp=BungeePerms.getInstance();
    try {
      PermissionsManager pm=bp.getPermissionsManager();
      if (pm != null) {
        User user=pm.getUser(player.getName());
        if (user != null) {
          Group mainGroup=pm.getMainGroup(user);
          if (mainGroup != null) {
            bpprefix=mainGroup.getPrefix();
          }
        }
      }
    }
 catch (    NullPointerException ex) {
      BungeeTabListPlus.getInstance().getLogger().log(Level.SEVERE,"String_Node_Str",ex);
    }
catch (    Throwable th) {
      BungeeTabListPlus.getInstance().reportError(th);
    }
  }
  String bprefix=plugin.getConfigManager().getMainConfig().prefixes.get(getMainGroup(player));
  Optional<String> vprefix=plugin.getBridge().getPlayerInformation(player,Values.Player.Vault.Prefix);
  String mode=plugin.getConfigManager().getMainConfig().permissionSource;
  if (mode.equalsIgnoreCase("String_Node_Str")) {
    return bpprefix != null ? bpprefix : "String_Node_Str";
  }
 else   if (mode.equalsIgnoreCase("String_Node_Str")) {
    return vprefix.isPresent() ? vprefix.get() : "String_Node_Str";
  }
 else   if (mode.equalsIgnoreCase("String_Node_Str")) {
    return bprefix != null ? bprefix : "String_Node_Str";
  }
  if (bprefix != null) {
    return bprefix;
  }
  if (bpprefix != null) {
    return bpprefix;
  }
  if (vprefix.isPresent()) {
    return vprefix.get();
  }
  return "String_Node_Str";
}
Program: 80895
Project: 80895
Buggy source:
public String getDisplayPrefix(IPlayer player){
  String display=null;
  Plugin p=plugin.getProxy().getPluginManager().getPlugin("String_Node_Str");
  if (p != null) {
    BungeePerms bp=BungeePerms.getInstance();
    try {
      PermissionsManager pm=bp.getPermissionsManager();
      if (pm != null) {
        User user=pm.getUser(player.getName());
        if (user != null) {
          display=pm.getMainGroup(user).getDisplay();
        }
      }
    }
 catch (    NullPointerException ex) {
      BungeeTabListPlus.getInstance().getLogger().log(Level.SEVERE,"String_Node_Str",ex);
    }
catch (    Throwable th) {
      BungeeTabListPlus.getInstance().reportError(th);
    }
  }
  if (display == null) {
    display="String_Node_Str";
  }
  return display;
}

Fixed version (ground truth):
public String getDisplayPrefix(IPlayer player){
  String display=null;
  Plugin p=plugin.getProxy().getPluginManager().getPlugin("String_Node_Str");
  if (p != null) {
    BungeePerms bp=BungeePerms.getInstance();
    try {
      PermissionsManager pm=bp.getPermissionsManager();
      if (pm != null) {
        User user=pm.getUser(player.getName());
        if (user != null) {
          Group group=pm.getMainGroup(user);
          if (group != null) {
            display=group.getDisplay();
          }
        }
      }
    }
 catch (    NullPointerException ex) {
      BungeeTabListPlus.getInstance().getLogger().log(Level.SEVERE,"String_Node_Str",ex);
    }
catch (    Throwable th) {
      BungeeTabListPlus.getInstance().reportError(th);
    }
  }
  if (display == null) {
    display="String_Node_Str";
  }
  return display;
}
Program: 80897
Project: 80897
Buggy source:
private void update(PlayerTablistHandler tablistHandler){
  if (tablistHandler.getPlayer().getServer() != null) {
    if (BungeeTabListPlus.getInstance().getConfigManager().getMainConfig().excludeServers.contains(tablistHandler.getPlayer().getServer().getInfo().getName()) || tablistHandler.isExcluded()) {
      tablistHandler.unload();
      return;
    }
  }
  ITabListProvider tlp=BungeeTabListPlus.getInstance().getTabListManager().getTabListForPlayer(tablistHandler.getPlayer());
  if (tlp == null) {
    tablistHandler.exclude();
    tablistHandler.unload();
    return;
  }
  ITabList tabList=new TabList();
  try {
    tlp.fillTabList(tablistHandler.getPlayer(),tabList);
  }
 catch (  LayoutException ex) {
    BungeeTabListPlus.getInstance().getLogger().log(Level.WARNING,"String_Node_Str",ex);
  }
catch (  Throwable th) {
    BungeeTabListPlus.getInstance().getLogger().log(Level.SEVERE,"String_Node_Str",th);
  }
  tablistHandler.sendTablist(tabList);
}

Fixed version (ground truth):
private void update(PlayerTablistHandler tablistHandler){
  if (tablistHandler.getPlayer().getServer() != null) {
    if (BungeeTabListPlus.getInstance().getConfigManager().getMainConfig().excludeServers.contains(tablistHandler.getPlayer().getServer().getInfo().getName()) || tablistHandler.isExcluded()) {
      tablistHandler.unload();
      return;
    }
  }
  ITabListProvider tlp=BungeeTabListPlus.getInstance().getTabListManager().getTabListForPlayer(tablistHandler.getPlayer());
  if (tlp == null) {
    tablistHandler.exclude();
    tablistHandler.unload();
    return;
  }
  ITabList tabList=new TabList();
  TabListContext context=new TabListContextImpl(tabList.getRows(),tabList.getColumns(),tablistHandler.getPlayer(),BungeeTabListPlus.getInstance().constructPlayerManager());
  try {
    tlp.fillTabList(tablistHandler.getPlayer(),tabList,context);
  }
 catch (  LayoutException ex) {
    BungeeTabListPlus.getInstance().getLogger().log(Level.WARNING,"String_Node_Str",ex);
  }
catch (  Throwable th) {
    BungeeTabListPlus.getInstance().getLogger().log(Level.SEVERE,"String_Node_Str",th);
  }
  tablistHandler.sendTablist(tabList,context);
}
Program: 80898
Project: 80898
Buggy source:
void fillTabList(ProxiedPlayer player,ITabList ITabList) throws LayoutException ;

Fixed version (ground truth):
void fillTabList(ProxiedPlayer player,ITabList ITabList,TabListContext context) throws LayoutException ;
Program: 80899
Project: 80899
Buggy source:
String getReplacement(ProxiedPlayer viewer,List<ServerInfo> servers,String args);

Fixed version (ground truth):
String getReplacement(ProxiedPlayer viewer,List<ServerInfo> servers,String args,TabListContext context);
Program: 80900
Project: 80900
Buggy source:
String getReplacement(ProxiedPlayer viewer,String args);

Fixed version (ground truth):
String getReplacement(ProxiedPlayer viewer,String args,TabListContext context);
Program: 80901
Project: 80901
Buggy source:
private void checkServer(List<String> filter){
  for (  String s : filter) {
    if (plugin.getPlayerManager().isServer(s)) {
      plugin.getLogger().warning(ChatColor.RED + "String_Node_Str");
    }
    if (s.equalsIgnoreCase("String_Node_Str")) {
      plugin.getLogger().warning(ChatColor.RED + "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
private void checkServer(List<String> filter){
  for (  String s : filter) {
    if (plugin.isServer(s)) {
      plugin.getLogger().warning(ChatColor.RED + "String_Node_Str");
    }
    if (s.equalsIgnoreCase("String_Node_Str")) {
      plugin.getLogger().warning(ChatColor.RED + "String_Node_Str");
    }
  }
}
Program: 80902
Project: 80902
Buggy source:
@Override public int compare(String s1,String s2){
  int p1=plugin.getPlayerManager().getServerPlayerCount(s1,player,plugin.getConfigManager().getMainConfig().showPlayersInGamemode3);
  int p2=plugin.getPlayerManager().getServerPlayerCount(s2,player,plugin.getConfigManager().getMainConfig().showPlayersInGamemode3);
  if (p1 < p2) {
    return 1;
  }
  if (p1 > p2) {
    return -1;
  }
  return s1.compareTo(s2);
}

Fixed version (ground truth):
@Override public int compare(String s1,String s2){
  int p1=context.getPlayerManager().getServerPlayerCount(s1,player,plugin.getConfigManager().getMainConfig().showPlayersInGamemode3);
  int p2=context.getPlayerManager().getServerPlayerCount(s2,player,plugin.getConfigManager().getMainConfig().showPlayersInGamemode3);
  if (p1 < p2) {
    return 1;
  }
  if (p1 > p2) {
    return -1;
  }
  return s1.compareTo(s2);
}
Program: 80905
Project: 80905
Buggy source:
public TabListContextImpl(int rows,int columns,ProxiedPlayer player){
  this.rows=rows;
  this.columns=columns;
  this.size=rows * columns;
  this.player=player;
}

Fixed version (ground truth):
public TabListContextImpl(int rows,int columns,ProxiedPlayer player,PlayerManager playerManager){
  this.rows=rows;
  this.columns=columns;
  this.playerManager=playerManager;
  this.size=rows * columns;
  this.player=player;
}
Program: 80906
Project: 80906
Buggy source:
public PlayerManager(BungeeTabListPlus plugin,Collection<IPlayerProvider> playerProviders){
  this.plugin=plugin;
  this.playerProviders=playerProviders;
}

Fixed version (ground truth):
public PlayerManager(BungeeTabListPlus plugin,Collection<IPlayerProvider> playerProviders){
  this.plugin=plugin;
  this.players=ImmutableList.copyOf(Iterables.concat(Collections2.transform(playerProviders,IPlayerProvider::getPlayers)));
}
Program: 80907
Project: 80907
Buggy source:
public int getServerPlayerCount(String server,ProxiedPlayer viewer,boolean includeSuspectors){
  int num=0;
  Iterable<IPlayer> players=Iterables.concat(Collections2.transform(playerProviders,new Function<IPlayerProvider,Collection<? extends IPlayer>>(){
    @Override public Collection<? extends IPlayer> apply(    IPlayerProvider iPlayerProvider){
      return iPlayerProvider.getPlayers();
    }
  }
));
  for (  IPlayer p : players) {
    Optional<ServerInfo> s=p.getServer();
    if (s.isPresent()) {
      if (s.get().getName().equalsIgnoreCase(server) && !BungeeTabListPlus.isHidden(p,viewer) && (includeSuspectors || p.getGameMode() != 3)) {
        num++;
      }
    }
  }
  return num;
}

Fixed version (ground truth):
public int getServerPlayerCount(String server,ProxiedPlayer viewer,boolean includeSuspectors){
  int num=0;
  for (  IPlayer p : players) {
    Optional<ServerInfo> s=p.getServer();
    if (s.isPresent()) {
      if (s.get().getName().equalsIgnoreCase(server) && !BungeeTabListPlus.isHidden(p,viewer) && (includeSuspectors || p.getGameMode() != 3)) {
        num++;
      }
    }
  }
  return num;
}
Program: 80909
Project: 80909
Buggy source:
public int getGlobalPlayerCount(ProxiedPlayer viewer,boolean includeSuspectors){
  int num=0;
  Iterable<IPlayer> players=Iterables.concat(Collections2.transform(playerProviders,new Function<IPlayerProvider,Collection<? extends IPlayer>>(){
    @Override public Collection<? extends IPlayer> apply(    IPlayerProvider iPlayerProvider){
      return iPlayerProvider.getPlayers();
    }
  }
));
  for (  IPlayer p : players) {
    if (!BungeeTabListPlus.isHidden(p,viewer) && (includeSuspectors || p.getGameMode() != 3)) {
      num++;
    }
  }
  return num;
}

Fixed version (ground truth):
public int getGlobalPlayerCount(ProxiedPlayer viewer,boolean includeSuspectors){
  int num=0;
  for (  IPlayer p : players) {
    if (!BungeeTabListPlus.isHidden(p,viewer) && (includeSuspectors || p.getGameMode() != 3)) {
      num++;
    }
  }
  return num;
}
Program: 80910
Project: 80910
Buggy source:
private void validateShowTo(TabListConfig config){
  String showTo=config.showTo;
  if (showTo.equalsIgnoreCase("String_Node_Str")) {
    return;
  }
  if (showTo.equalsIgnoreCase("String_Node_Str")) {
    return;
  }
  if (showTo.equalsIgnoreCase("String_Node_Str")) {
    return;
  }
  String s[]=showTo.split("String_Node_Str");
  if (s.length != 2) {
    invalidShowTo(config);
  }
  if (s[0].equalsIgnoreCase("String_Node_Str")) {
    if (s[1].contains("String_Node_Str")) {
      invalidShowTo(config);
    }
    return;
  }
  if (s[0].equalsIgnoreCase("String_Node_Str")) {
    return;
  }
  if (s[0].equalsIgnoreCase("String_Node_Str")) {
    if (s[1].contains("String_Node_Str")) {
      invalidShowTo(config);
    }
    if (plugin.getPlayerManager().isServer(s[1])) {
      return;
    }
 else {
      invalidShowTo(config);
    }
  }
  if (s[0].equalsIgnoreCase("String_Node_Str")) {
    for (    String sv : s[1].split("String_Node_Str")) {
      if (!plugin.getPlayerManager().isServer(sv)) {
        invalidShowTo(config);
      }
    }
    return;
  }
  if (s[0].equalsIgnoreCase("String_Node_Str")) {
    if (s[1].contains("String_Node_Str")) {
      invalidShowTo(config);
    }
    return;
  }
  if (s[0].equals("String_Node_Str")) {
    return;
  }
  invalidShowTo(config);
}

Fixed version (ground truth):
private void validateShowTo(TabListConfig config){
  String showTo=config.showTo;
  if (showTo.equalsIgnoreCase("String_Node_Str")) {
    return;
  }
  if (showTo.equalsIgnoreCase("String_Node_Str")) {
    return;
  }
  if (showTo.equalsIgnoreCase("String_Node_Str")) {
    return;
  }
  String s[]=showTo.split("String_Node_Str");
  if (s.length != 2) {
    invalidShowTo(config);
  }
  if (s[0].equalsIgnoreCase("String_Node_Str")) {
    if (s[1].contains("String_Node_Str")) {
      invalidShowTo(config);
    }
    return;
  }
  if (s[0].equalsIgnoreCase("String_Node_Str")) {
    return;
  }
  if (s[0].equalsIgnoreCase("String_Node_Str")) {
    if (s[1].contains("String_Node_Str")) {
      invalidShowTo(config);
    }
    if (plugin.isServer(s[1])) {
      return;
    }
 else {
      invalidShowTo(config);
    }
  }
  if (s[0].equalsIgnoreCase("String_Node_Str")) {
    for (    String sv : s[1].split("String_Node_Str")) {
      if (!plugin.isServer(sv)) {
        invalidShowTo(config);
      }
    }
    return;
  }
  if (s[0].equalsIgnoreCase("String_Node_Str")) {
    if (s[1].contains("String_Node_Str")) {
      invalidShowTo(config);
    }
    return;
  }
  if (s[0].equals("String_Node_Str")) {
    return;
  }
  invalidShowTo(config);
}
Program: 80912
Project: 80912
Buggy source:
public static int getTabSize(){
  return ProxyServer.getInstance().getConfigurationAdapter().getListeners().iterator().next().getTabListSize();
}

Fixed version (ground truth):
public static int getTabSize(){
  return ProxyServer.getInstance().getConfig().getListeners().iterator().next().getTabListSize();
}
Program: 80913
Project: 80913
Buggy source:
protected final void update(Player player,V dataAggregator,B boundType,String subchannel){
  Map<Value<?>,Object> newData=new ConcurrentHashMap<>();
  requestedData.parallelStream().forEach(value -> {
    dataAggregator.getValue(value,boundType).ifPresent(data -> newData.put(value,data));
  }
);
  Map<String,Object> delta=new HashMap<>();
  for (  Map.Entry<Value<?>,Object> entry : sentData.entrySet()) {
    if (!newData.containsKey(entry.getKey())) {
      delta.put(entry.getKey().getId(),null);
    }
 else     if (!newData.get(entry.getKey()).equals(entry.getValue())) {
      delta.put(entry.getKey().getId(),newData.get(entry.getKey()));
    }
  }
  for (  Map.Entry<Value<?>,Object> entry : newData.entrySet()) {
    if (!sentData.containsKey(entry.getKey())) {
      delta.put(entry.getKey().getId(),entry.getValue());
    }
  }
  for (  Map.Entry<String,Object> entry : delta.entrySet()) {
    if (entry.getValue() == null) {
      onErrorValueNotAvailable(entry.getKey());
    }
  }
  if (!delta.isEmpty()) {
    sendInformation(subchannel,delta,player);
  }
  sentData=newData;
}

Fixed version (ground truth):
protected final void update(Player player,V dataAggregator,B boundType,String subchannel){
  Map<Value<?>,Object> newData=new ConcurrentHashMap<>();
  requestedData.parallelStream().forEach(value -> {
    dataAggregator.getValue(value,boundType).ifPresent(data -> newData.put(value,data));
  }
);
  Map<String,Object> delta=new HashMap<>();
  for (  Map.Entry<Value<?>,Object> entry : sentData.entrySet()) {
    if (!newData.containsKey(entry.getKey())) {
      delta.put(entry.getKey().getId(),null);
    }
 else     if (!Objects.equals(newData.get(entry.getKey()),entry.getValue())) {
      delta.put(entry.getKey().getId(),newData.get(entry.getKey()));
    }
  }
  for (  Map.Entry<Value<?>,Object> entry : newData.entrySet()) {
    if (!sentData.containsKey(entry.getKey())) {
      delta.put(entry.getKey().getId(),entry.getValue());
    }
  }
  for (  Map.Entry<String,Object> entry : delta.entrySet()) {
    if (entry.getValue() == null) {
      onErrorValueNotAvailable(entry.getKey());
    }
  }
  if (!delta.isEmpty()) {
    sendInformation(subchannel,delta,player);
  }
  sentData=newData;
}
Program: 80914
Project: 80914
Buggy source:
protected final void update(Player player,V dataAggregator,B boundType,String subchannel){
  Map<Value<?>,Object> newData=new HashMap<>();
  requestedData.parallelStream().forEach(value -> {
    dataAggregator.getValue(value,boundType).ifPresent(data -> newData.put(value,data));
  }
);
  Map<String,Object> delta=new HashMap<>();
  for (  Map.Entry<Value<?>,Object> entry : sentData.entrySet()) {
    if (!newData.containsKey(entry.getKey())) {
      delta.put(entry.getKey().getId(),null);
    }
 else     if (!newData.get(entry.getKey()).equals(entry.getValue())) {
      delta.put(entry.getKey().getId(),newData.get(entry.getKey()));
    }
  }
  for (  Map.Entry<Value<?>,Object> entry : newData.entrySet()) {
    if (!sentData.containsKey(entry.getKey())) {
      delta.put(entry.getKey().getId(),entry.getValue());
    }
  }
  for (  Map.Entry<String,Object> entry : delta.entrySet()) {
    if (entry.getValue() == null) {
      onErrorValueNotAvailable(entry.getKey());
    }
  }
  if (!delta.isEmpty()) {
    sendInformation(subchannel,delta,player);
  }
  sentData=newData;
}

Fixed version (ground truth):
protected final void update(Player player,V dataAggregator,B boundType,String subchannel){
  Map<Value<?>,Object> newData=new ConcurrentHashMap<>();
  requestedData.parallelStream().forEach(value -> {
    dataAggregator.getValue(value,boundType).ifPresent(data -> newData.put(value,data));
  }
);
  Map<String,Object> delta=new HashMap<>();
  for (  Map.Entry<Value<?>,Object> entry : sentData.entrySet()) {
    if (!newData.containsKey(entry.getKey())) {
      delta.put(entry.getKey().getId(),null);
    }
 else     if (!newData.get(entry.getKey()).equals(entry.getValue())) {
      delta.put(entry.getKey().getId(),newData.get(entry.getKey()));
    }
  }
  for (  Map.Entry<Value<?>,Object> entry : newData.entrySet()) {
    if (!sentData.containsKey(entry.getKey())) {
      delta.put(entry.getKey().getId(),entry.getValue());
    }
  }
  for (  Map.Entry<String,Object> entry : delta.entrySet()) {
    if (entry.getValue() == null) {
      onErrorValueNotAvailable(entry.getKey());
    }
  }
  if (!delta.isEmpty()) {
    sendInformation(subchannel,delta,player);
  }
  sentData=newData;
}
Program: 80915
Project: 80915
Buggy source:
public String getSuffix(IPlayer player){
  String suffix=null;
  Plugin p=plugin.getProxy().getPluginManager().getPlugin("String_Node_Str");
  if (p != null) {
    BungeePerms bp=BungeePerms.getInstance();
    try {
      User user=bp.getPermissionsManager().getUser(player.getName());
      if (user != null) {
        suffix=bp.getPermissionsManager().getMainGroup(user).getSuffix();
      }
    }
 catch (    NullPointerException ex) {
      BungeeTabListPlus.getInstance().getLogger().log(Level.SEVERE,"String_Node_Str",ex);
    }
catch (    Throwable th) {
      BungeeTabListPlus.getInstance().reportError(th);
    }
  }
  Optional<String> vsuffix=plugin.getBridge().getPlayerInformation(player,Values.Player.Vault.Suffix);
  String mode=plugin.getConfigManager().getMainConfig().permissionSource;
  if (mode.equalsIgnoreCase("String_Node_Str")) {
    return suffix;
  }
 else   if (mode.equalsIgnoreCase("String_Node_Str")) {
    return vsuffix.orElse("String_Node_Str");
  }
  if (suffix != null) {
    return suffix;
  }
  if (vsuffix.isPresent()) {
    return vsuffix.get();
  }
  return "String_Node_Str";
}

Fixed version (ground truth):
public String getSuffix(IPlayer player){
  String suffix=null;
  Plugin p=plugin.getProxy().getPluginManager().getPlugin("String_Node_Str");
  if (p != null) {
    BungeePerms bp=BungeePerms.getInstance();
    try {
      PermissionsManager pm=bp.getPermissionsManager();
      if (pm != null) {
        User user=pm.getUser(player.getName());
        if (user != null) {
          suffix=pm.getMainGroup(user).getSuffix();
        }
      }
    }
 catch (    NullPointerException ex) {
      BungeeTabListPlus.getInstance().getLogger().log(Level.SEVERE,"String_Node_Str",ex);
    }
catch (    Throwable th) {
      BungeeTabListPlus.getInstance().reportError(th);
    }
  }
  Optional<String> vsuffix=plugin.getBridge().getPlayerInformation(player,Values.Player.Vault.Suffix);
  String mode=plugin.getConfigManager().getMainConfig().permissionSource;
  if (mode.equalsIgnoreCase("String_Node_Str")) {
    return suffix;
  }
 else   if (mode.equalsIgnoreCase("String_Node_Str")) {
    return vsuffix.orElse("String_Node_Str");
  }
  if (suffix != null) {
    return suffix;
  }
  if (vsuffix.isPresent()) {
    return vsuffix.get();
  }
  return "String_Node_Str";
}
Program: 80916
Project: 80916
Buggy source:
public String getPrefix(IPlayer player){
  String bpprefix=null;
  Plugin p=plugin.getProxy().getPluginManager().getPlugin("String_Node_Str");
  if (p != null) {
    BungeePerms bp=BungeePerms.getInstance();
    try {
      User user=bp.getPermissionsManager().getUser(player.getName());
      if (user != null) {
        bpprefix=bp.getPermissionsManager().getMainGroup(user).getPrefix();
      }
    }
 catch (    NullPointerException ex) {
      BungeeTabListPlus.getInstance().getLogger().log(Level.SEVERE,"String_Node_Str",ex);
    }
catch (    Throwable th) {
      BungeeTabListPlus.getInstance().reportError(th);
    }
  }
  String bprefix=plugin.getConfigManager().getMainConfig().prefixes.get(getMainGroup(player));
  Optional<String> vprefix=plugin.getBridge().getPlayerInformation(player,Values.Player.Vault.Prefix);
  String mode=plugin.getConfigManager().getMainConfig().permissionSource;
  if (mode.equalsIgnoreCase("String_Node_Str")) {
    return bpprefix != null ? bpprefix : "String_Node_Str";
  }
 else   if (mode.equalsIgnoreCase("String_Node_Str")) {
    return vprefix.isPresent() ? vprefix.get() : "String_Node_Str";
  }
 else   if (mode.equalsIgnoreCase("String_Node_Str")) {
    return bprefix != null ? bprefix : "String_Node_Str";
  }
  if (bprefix != null) {
    return bprefix;
  }
  if (bpprefix != null) {
    return bpprefix;
  }
  if (vprefix.isPresent()) {
    return vprefix.get();
  }
  return "String_Node_Str";
}

Fixed version (ground truth):
public String getPrefix(IPlayer player){
  String bpprefix=null;
  Plugin p=plugin.getProxy().getPluginManager().getPlugin("String_Node_Str");
  if (p != null) {
    BungeePerms bp=BungeePerms.getInstance();
    try {
      PermissionsManager pm=bp.getPermissionsManager();
      if (pm != null) {
        User user=pm.getUser(player.getName());
        if (user != null) {
          bpprefix=pm.getMainGroup(user).getPrefix();
        }
      }
    }
 catch (    NullPointerException ex) {
      BungeeTabListPlus.getInstance().getLogger().log(Level.SEVERE,"String_Node_Str",ex);
    }
catch (    Throwable th) {
      BungeeTabListPlus.getInstance().reportError(th);
    }
  }
  String bprefix=plugin.getConfigManager().getMainConfig().prefixes.get(getMainGroup(player));
  Optional<String> vprefix=plugin.getBridge().getPlayerInformation(player,Values.Player.Vault.Prefix);
  String mode=plugin.getConfigManager().getMainConfig().permissionSource;
  if (mode.equalsIgnoreCase("String_Node_Str")) {
    return bpprefix != null ? bpprefix : "String_Node_Str";
  }
 else   if (mode.equalsIgnoreCase("String_Node_Str")) {
    return vprefix.isPresent() ? vprefix.get() : "String_Node_Str";
  }
 else   if (mode.equalsIgnoreCase("String_Node_Str")) {
    return bprefix != null ? bprefix : "String_Node_Str";
  }
  if (bprefix != null) {
    return bprefix;
  }
  if (bpprefix != null) {
    return bpprefix;
  }
  if (vprefix.isPresent()) {
    return vprefix.get();
  }
  return "String_Node_Str";
}
Program: 80918
Project: 80918
Buggy source:
public int comparePlayers(IPlayer p1,IPlayer p2){
  Plugin p=plugin.getProxy().getPluginManager().getPlugin("String_Node_Str");
  if (p != null) {
    BungeePerms bp=BungeePerms.getInstance();
    try {
      User u1=bp.getPermissionsManager().getUser(p1.getName());
      User u2=bp.getPermissionsManager().getUser(p2.getName());
      if (u1 != null && u2 != null) {
        Group g1=bp.getPermissionsManager().getMainGroup(u1);
        Group g2=bp.getPermissionsManager().getMainGroup(u2);
        if (g1 != null && g2 != null) {
          int r1=g1.getRank();
          int r2=g2.getRank();
          if (r1 > r2) {
            return -1;
          }
          if (r2 > r1) {
            return 1;
          }
          return 0;
        }
      }
    }
 catch (    Throwable th) {
      BungeeTabListPlus.getInstance().reportError(th);
    }
  }
  if (p1 instanceof BungeePlayer && p2 instanceof BungeePlayer) {
    int i=0;
    for (    String group : ((BungeePlayer)p1).getPlayer().getGroups()) {
      if (!group.equals("String_Node_Str")) {
        i=1;
      }
    }
    int j=0;
    for (    String group : ((BungeePlayer)p2).getPlayer().getGroups()) {
      if (!group.equals("String_Node_Str")) {
        j=1;
      }
    }
    if (i > j) {
      return -1;
    }
    if (j > i) {
      return 1;
    }
  }
  return 0;
}

Fixed version (ground truth):
public int comparePlayers(IPlayer p1,IPlayer p2){
  Plugin p=plugin.getProxy().getPluginManager().getPlugin("String_Node_Str");
  if (p != null) {
    BungeePerms bp=BungeePerms.getInstance();
    try {
      PermissionsManager pm=bp.getPermissionsManager();
      if (pm != null) {
        User u1=pm.getUser(p1.getName());
        User u2=pm.getUser(p2.getName());
        if (u1 != null && u2 != null) {
          Group g1=pm.getMainGroup(u1);
          Group g2=pm.getMainGroup(u2);
          if (g1 != null && g2 != null) {
            int r1=g1.getRank();
            int r2=g2.getRank();
            if (r1 > r2) {
              return -1;
            }
            if (r2 > r1) {
              return 1;
            }
            return 0;
          }
        }
      }
    }
 catch (    Throwable th) {
      BungeeTabListPlus.getInstance().reportError(th);
    }
  }
  if (p1 instanceof BungeePlayer && p2 instanceof BungeePlayer) {
    int i=0;
    for (    String group : ((BungeePlayer)p1).getPlayer().getGroups()) {
      if (!group.equals("String_Node_Str")) {
        i=1;
      }
    }
    int j=0;
    for (    String group : ((BungeePlayer)p2).getPlayer().getGroups()) {
      if (!group.equals("String_Node_Str")) {
        j=1;
      }
    }
    if (i > j) {
      return -1;
    }
    if (j > i) {
      return 1;
    }
  }
  return 0;
}
Program: 80919
Project: 80919
Buggy source:
public String getDisplayPrefix(IPlayer player){
  String display=null;
  Plugin p=plugin.getProxy().getPluginManager().getPlugin("String_Node_Str");
  if (p != null) {
    BungeePerms bp=BungeePerms.getInstance();
    try {
      User user=bp.getPermissionsManager().getUser(player.getName());
      if (user != null) {
        display=bp.getPermissionsManager().getMainGroup(user).getDisplay();
      }
    }
 catch (    NullPointerException ex) {
      BungeeTabListPlus.getInstance().getLogger().log(Level.SEVERE,"String_Node_Str",ex);
    }
catch (    Throwable th) {
      BungeeTabListPlus.getInstance().reportError(th);
    }
  }
  if (display == null) {
    display="String_Node_Str";
  }
  return display;
}

Fixed version (ground truth):
public String getDisplayPrefix(IPlayer player){
  String display=null;
  Plugin p=plugin.getProxy().getPluginManager().getPlugin("String_Node_Str");
  if (p != null) {
    BungeePerms bp=BungeePerms.getInstance();
    try {
      PermissionsManager pm=bp.getPermissionsManager();
      if (pm != null) {
        User user=pm.getUser(player.getName());
        if (user != null) {
          display=pm.getMainGroup(user).getDisplay();
        }
      }
    }
 catch (    NullPointerException ex) {
      BungeeTabListPlus.getInstance().getLogger().log(Level.SEVERE,"String_Node_Str",ex);
    }
catch (    Throwable th) {
      BungeeTabListPlus.getInstance().reportError(th);
    }
  }
  if (display == null) {
    display="String_Node_Str";
  }
  return display;
}
Program: 80920
Project: 80920
Buggy source:
public int comparePlayers(IPlayer p1,IPlayer p2){
  Plugin p=plugin.getProxy().getPluginManager().getPlugin("String_Node_Str");
  if (p != null) {
    BungeePerms bp=BungeePerms.getInstance();
    try {
      Group g1=bp.getPermissionsManager().getMainGroup(bp.getPermissionsManager().getUser(p1.getName()));
      Group g2=bp.getPermissionsManager().getMainGroup(bp.getPermissionsManager().getUser(p2.getName()));
      int r1=g1.getRank();
      int r2=g2.getRank();
      if (r1 > r2) {
        return -1;
      }
      if (r2 > r1) {
        return 1;
      }
      return 0;
    }
 catch (    Throwable th) {
      BungeeTabListPlus.getInstance().reportError(th);
    }
  }
  if (p1 instanceof BungeePlayer && p2 instanceof BungeePlayer) {
    int i=0;
    for (    String group : ((BungeePlayer)p1).getPlayer().getGroups()) {
      if (!group.equals("String_Node_Str")) {
        i=1;
      }
    }
    int j=0;
    for (    String group : ((BungeePlayer)p2).getPlayer().getGroups()) {
      if (!group.equals("String_Node_Str")) {
        j=1;
      }
    }
    if (i > j) {
      return -1;
    }
    if (j > i) {
      return 1;
    }
  }
  return 0;
}

Fixed version (ground truth):
public int comparePlayers(IPlayer p1,IPlayer p2){
  Plugin p=plugin.getProxy().getPluginManager().getPlugin("String_Node_Str");
  if (p != null) {
    BungeePerms bp=BungeePerms.getInstance();
    try {
      User u1=bp.getPermissionsManager().getUser(p1.getName());
      User u2=bp.getPermissionsManager().getUser(p2.getName());
      if (u1 != null && u2 != null) {
        Group g1=bp.getPermissionsManager().getMainGroup(u1);
        Group g2=bp.getPermissionsManager().getMainGroup(u2);
        if (g1 != null && g2 != null) {
          int r1=g1.getRank();
          int r2=g2.getRank();
          if (r1 > r2) {
            return -1;
          }
          if (r2 > r1) {
            return 1;
          }
          return 0;
        }
      }
    }
 catch (    Throwable th) {
      BungeeTabListPlus.getInstance().reportError(th);
    }
  }
  if (p1 instanceof BungeePlayer && p2 instanceof BungeePlayer) {
    int i=0;
    for (    String group : ((BungeePlayer)p1).getPlayer().getGroups()) {
      if (!group.equals("String_Node_Str")) {
        i=1;
      }
    }
    int j=0;
    for (    String group : ((BungeePlayer)p2).getPlayer().getGroups()) {
      if (!group.equals("String_Node_Str")) {
        j=1;
      }
    }
    if (i > j) {
      return -1;
    }
    if (j > i) {
      return 1;
    }
  }
  return 0;
}