Program: 58049
Project: 58049
Buggy source:
@Override public boolean execute(final PlotPlayer plr,final String... args){
  boolean report=false;
  if (args.length == 1) {
    if (args[0].equalsIgnoreCase("String_Node_Str")) {
      report=true;
    }
  }
  final Location loc=plr.getLocation();
  final Plot plot=MainUtil.getPlot(loc);
  if ((plot == null) && !report) {
    return !sendMessage(plr,C.NOT_IN_PLOT);
  }
  if ((plot != null) && !plot.hasOwner()) {
    MainUtil.sendMessage(plr,C.NOT_IN_PLOT);
    return false;
  }
  Integer tier;
  final UUID uuid=UUIDHandler.getUUID(plr);
  if (Permissions.hasPermission(plr,"String_Node_Str")) {
    tier=0;
  }
 else   if ((plot != null) && plot.owner.equals(uuid)) {
    tier=1;
  }
 else   if ((plot != null) && plot.helpers.contains(uuid)) {
    tier=2;
  }
 else   if ((plot != null) && plot.trusted.contains(uuid)) {
    tier=3;
  }
 else {
    tier=4;
  }
  final boolean below;
  if (args.length > 0) {
    below=false;
switch (args[0].toLowerCase()) {
case "String_Node_Str":
      if (tier <= 0) {
        tier=0;
      }
 else {
        MainUtil.sendMessage(plr,C.NO_PERMISSION,"String_Node_Str");
        return false;
      }
    break;
case "String_Node_Str":
  if (tier <= 1) {
    tier=1;
  }
 else {
    MainUtil.sendMessage(plr,C.NO_PERMISSION,"String_Node_Str");
    return false;
  }
break;
case "String_Node_Str":
if (tier <= 2) {
tier=2;
}
 else {
MainUtil.sendMessage(plr,C.NO_PERMISSION,"String_Node_Str");
return false;
}
break;
case "String_Node_Str":
if (tier <= 3) {
tier=3;
}
 else {
MainUtil.sendMessage(plr,C.NO_PERMISSION,"String_Node_Str");
return false;
}
break;
case "String_Node_Str":
if (tier <= 4) {
tier=4;
}
 else {
MainUtil.sendMessage(plr,C.NO_PERMISSION,"String_Node_Str");
return false;
}
break;
case "String_Node_Str":
if (tier <= 0) {
tier=-1;
}
 else {
MainUtil.sendMessage(plr,C.NO_PERMISSION,"String_Node_Str");
return false;
}
break;
default :
MainUtil.sendMessage(plr,C.INVALID_INBOX,Arrays.copyOfRange(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"},Math.max(0,tier),4));
return false;
}
}
 else {
below=true;
}
final String world=loc.getWorld();
final int tier2=tier;
TaskManager.runTaskAsync(new Runnable(){
@Override public void run(){
ArrayList<PlotComment> comments=null;
if (tier2 == -1) {
comments=DBFunc.getComments(world,null,0,false);
}
 else {
comments=plot.settings.getComments(tier2);
}
if (comments == null) {
comments=DBFunc.getComments(world,plot,tier2,below);
plot.settings.setComments(comments);
}
if (args.length == 2) {
final String[] split=args[1].toLowerCase().split("String_Node_Str");
if (!split[0].equals("String_Node_Str")) {
MainUtil.sendMessage(plr,"String_Node_Str");
return;
}
if (split.length > 1) {
try {
final int index=Integer.parseInt(split[1]);
final PlotComment comment=comments.get(index - 1);
DBFunc.removeComment(world,plot,comment);
plot.settings.removeComment(comment);
MainUtil.sendMessage(plr,C.COMMENT_REMOVED,"String_Node_Str");
return;
}
 catch (final Exception e) {
MainUtil.sendMessage(plr,"String_Node_Str");
return;
}
}
for (final PlotComment comment : comments) {
DBFunc.removeComment(world,plot,comment);
}
plot.settings.removeComments(comments);
MainUtil.sendMessage(plr,C.COMMENT_REMOVED,"String_Node_Str");
}
 else {
final List<String> recipients=Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
int count=1;
final StringBuilder message=new StringBuilder();
String prefix="String_Node_Str";
for (final PlotComment comment : comments) {
message.append(prefix).append("String_Node_Str").append(count).append("String_Node_Str").append(recipients.get(tier2 == -1 ? 0 : tier2)).append("String_Node_Str").append(comment.senderName).append("String_Node_Str").append(comment.comment);
prefix="String_Node_Str" + C.PREFIX;
count++;
}
if (comments.size() == 0) {
message.append("String_Node_Str");
}
MainUtil.sendMessage(plr,message.toString());
}
}
}
);
return true;
}

Fixed version (ground truth):
@Override public boolean execute(final PlotPlayer plr,final String... args){
  boolean report=false;
  if (args.length == 1) {
    if (args[0].equalsIgnoreCase("String_Node_Str")) {
      report=true;
    }
  }
  final Location loc=plr.getLocation();
  final Plot plot=MainUtil.getPlot(loc);
  if ((plot == null) && !report) {
    return !sendMessage(plr,C.NOT_IN_PLOT);
  }
  if ((plot != null) && !plot.hasOwner()) {
    MainUtil.sendMessage(plr,C.NOT_IN_PLOT);
    return false;
  }
  Integer tier;
  final UUID uuid=plr.getUUID();
  if (Permissions.hasPermission(plr,"String_Node_Str")) {
    tier=0;
  }
 else   if ((plot != null) && plot.isOwner(uuid)) {
    tier=1;
  }
 else   if ((plot != null) && plot.helpers.contains(uuid)) {
    tier=2;
  }
 else   if ((plot != null) && plot.trusted.contains(uuid)) {
    tier=3;
  }
 else {
    tier=4;
  }
  final boolean below;
  if (args.length > 0) {
    below=false;
switch (args[0].toLowerCase()) {
case "String_Node_Str":
      if (tier <= 0) {
        tier=0;
      }
 else {
        MainUtil.sendMessage(plr,C.NO_PERMISSION,"String_Node_Str");
        return false;
      }
    break;
case "String_Node_Str":
  if (tier <= 1) {
    tier=1;
  }
 else {
    MainUtil.sendMessage(plr,C.NO_PERMISSION,"String_Node_Str");
    return false;
  }
break;
case "String_Node_Str":
if (tier <= 2) {
tier=2;
}
 else {
MainUtil.sendMessage(plr,C.NO_PERMISSION,"String_Node_Str");
return false;
}
break;
case "String_Node_Str":
if (tier <= 3) {
tier=3;
}
 else {
MainUtil.sendMessage(plr,C.NO_PERMISSION,"String_Node_Str");
return false;
}
break;
case "String_Node_Str":
if (tier <= 4) {
tier=4;
}
 else {
MainUtil.sendMessage(plr,C.NO_PERMISSION,"String_Node_Str");
return false;
}
break;
case "String_Node_Str":
if (tier <= 0) {
tier=-1;
}
 else {
MainUtil.sendMessage(plr,C.NO_PERMISSION,"String_Node_Str");
return false;
}
break;
default :
MainUtil.sendMessage(plr,C.INVALID_INBOX,Arrays.copyOfRange(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"},Math.max(0,tier),4));
return false;
}
}
 else {
below=true;
}
final String world=loc.getWorld();
final int tier2=tier;
TaskManager.runTaskAsync(new Runnable(){
@Override public void run(){
ArrayList<PlotComment> comments=null;
if (tier2 == -1) {
comments=DBFunc.getComments(world,null,0,false);
}
 else {
comments=plot.settings.getComments(tier2);
}
if (comments == null) {
comments=DBFunc.getComments(world,plot,tier2,below);
plot.settings.setComments(comments);
}
if (args.length == 2) {
final String[] split=args[1].toLowerCase().split("String_Node_Str");
if (!split[0].equals("String_Node_Str")) {
MainUtil.sendMessage(plr,"String_Node_Str");
return;
}
if (split.length > 1) {
try {
final int index=Integer.parseInt(split[1]);
final PlotComment comment=comments.get(index - 1);
DBFunc.removeComment(world,plot,comment);
plot.settings.removeComment(comment);
MainUtil.sendMessage(plr,C.COMMENT_REMOVED,"String_Node_Str");
return;
}
 catch (final Exception e) {
MainUtil.sendMessage(plr,"String_Node_Str");
return;
}
}
for (final PlotComment comment : comments) {
DBFunc.removeComment(world,plot,comment);
}
plot.settings.removeComments(comments);
MainUtil.sendMessage(plr,C.COMMENT_REMOVED,"String_Node_Str");
}
 else {
final List<String> recipients=Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
int count=1;
final StringBuilder message=new StringBuilder();
String prefix="String_Node_Str";
for (final PlotComment comment : comments) {
message.append(prefix).append("String_Node_Str").append(count).append("String_Node_Str").append(recipients.get(tier2 == -1 ? 0 : tier2)).append("String_Node_Str").append(comment.senderName).append("String_Node_Str").append(comment.comment);
prefix="String_Node_Str" + C.PREFIX;
count++;
}
if (comments.size() == 0) {
message.append("String_Node_Str");
}
MainUtil.sendMessage(plr,message.toString());
}
}
}
);
return true;
}