Program: 58058
Project: 58058
Buggy source:
@Override public boolean execute(final PlotPlayer plr,final String... args){
  if (args.length < 1) {
    sendMessage(plr,C.SCHEMATIC_MISSING_ARG);
    return true;
  }
  final String arg=args[0].toLowerCase();
  final String file;
  final Schematic schematic;
switch (arg) {
case "String_Node_Str":
{
      if (plr == null) {
        PlotSquared.log(C.IS_CONSOLE.s());
        return false;
      }
      if (!Permissions.hasPermission(plr,"String_Node_Str")) {
        MainUtil.sendMessage(plr,C.NO_PERMISSION,"String_Node_Str");
        return false;
      }
      if (args.length < 2) {
        sendMessage(plr,C.SCHEMATIC_MISSING_ARG);
        break;
      }
      final Location loc=plr.getLocation();
      final Plot plot=MainUtil.getPlot(loc);
      if (plot == null) {
        sendMessage(plr,C.NOT_IN_PLOT);
        break;
      }
      if (this.running) {
        MainUtil.sendMessage(plr,"String_Node_Str");
        return false;
      }
      final String file2=args[1];
      this.running=true;
      this.counter=0;
      TaskManager.runTaskAsync(new Runnable(){
        @Override public void run(){
          final Schematic schematic=SchematicHandler.manager.getSchematic(file2);
          if (schematic == null) {
            sendMessage(plr,C.SCHEMATIC_INVALID,"String_Node_Str");
            SchematicCmd.this.running=false;
            return;
          }
          final int x;
          final int z;
          final Plot plot2=MainUtil.getPlot(loc);
          final Dimension dem=schematic.getSchematicDimension();
          final Location bot=MainUtil.getPlotBottomLoc(loc.getWorld(),plot2.id).add(1,0,1);
          final int length2=MainUtil.getPlotWidth(loc.getWorld(),plot2.id);
          if ((dem.getX() > length2) || (dem.getZ() > length2)) {
            sendMessage(plr,C.SCHEMATIC_INVALID,String.format("String_Node_Str",dem.getX(),dem.getZ(),length2));
            SchematicCmd.this.running=false;
            return;
          }
          if ((dem.getX() != length2) || (dem.getZ() != length2)) {
            final Location loc=plr.getLocation();
            x=Math.min(length2 - dem.getX(),loc.getX() - bot.getX());
            z=Math.min(length2 - dem.getZ(),loc.getZ() - bot.getZ());
          }
 else {
            x=0;
            z=0;
          }
          final DataCollection[] b=schematic.getBlockCollection();
          final int sy=BlockManager.manager.getHeighestBlock(bot);
          final int WIDTH=schematic.getSchematicDimension().getX();
          final int LENGTH=schematic.getSchematicDimension().getZ();
          final Location l1;
          if (!(schematic.getSchematicDimension().getY() == BukkitUtil.getMaxHeight(loc.getWorld()))) {
            l1=bot.add(0,sy - 1,0);
          }
 else {
            l1=bot;
          }
          final int blen=b.length - 1;
          SchematicCmd.this.task=TaskManager.runTaskRepeat(new Runnable(){
            @Override public void run(){
              boolean result=false;
              while (!result) {
                final int start=SchematicCmd.this.counter * 5000;
                if (start > blen) {
                  SchematicHandler.manager.pasteStates(schematic,plot,0,0);
                  sendMessage(plr,C.SCHEMATIC_PASTE_SUCCESS);
                  MainUtil.update(plr.getLocation());
                  SchematicCmd.this.running=false;
                  PlotSquared.TASK.cancelTask(SchematicCmd.this.task);
                  return;
                }
                final int end=Math.min(start + 5000,blen);
                result=SchematicHandler.manager.pastePart(loc.getWorld(),b,l1,x,z,start,end,WIDTH,LENGTH);
                SchematicCmd.this.counter++;
              }
            }
          }
,1);
        }
      }
);
      break;
    }
case "String_Node_Str":
{
    if (plr == null) {
      PlotSquared.log(C.IS_CONSOLE.s());
      return false;
    }
    if (!Permissions.hasPermission(plr,"String_Node_Str")) {
      MainUtil.sendMessage(plr,C.NO_PERMISSION,"String_Node_Str");
      return false;
    }
    if (args.length < 2) {
      sendMessage(plr,C.SCHEMATIC_MISSING_ARG);
      break;
    }
    file=args[1];
    schematic=SchematicHandler.manager.getSchematic(file);
    if (schematic == null) {
      sendMessage(plr,C.SCHEMATIC_INVALID,"String_Node_Str");
      break;
    }
    final Location loc=plr.getLocation();
    final int l1=schematic.getSchematicDimension().getX();
    final int l2=schematic.getSchematicDimension().getZ();
    final Plot plot=MainUtil.getPlot(loc);
    final int length=MainUtil.getPlotWidth(loc.getWorld(),plot.id);
    if ((l1 < length) || (l2 < length)) {
      sendMessage(plr,C.SCHEMATIC_INVALID,String.format("String_Node_Str",l1,l2,length));
      break;
    }
    sendMessage(plr,C.SCHEMATIC_VALID);
    break;
  }
case "String_Node_Str":
case "String_Node_Str":
{
  if (plr != null) {
    MainUtil.sendMessage(plr,C.NOT_CONSOLE);
    return false;
  }
  if (args.length != 2) {
    MainUtil.sendMessage(null,"String_Node_Str");
    return false;
  }
  final HashMap<PlotId,Plot> plotmap=PlotSquared.getPlots(args[1]);
  if ((plotmap == null) || (plotmap.size() == 0)) {
    MainUtil.sendMessage(null,"String_Node_Str");
    return false;
  }
  if (this.running) {
    MainUtil.sendMessage(null,"String_Node_Str");
    return false;
  }
  PlotSquared.log("String_Node_Str");
  PlotSquared.log("String_Node_Str" + plotmap.size() + "String_Node_Str");
  final String worldname=args[1];
  final Collection<Plot> values=plotmap.values();
  this.plots=values.toArray(new Plot[values.size()]);
  this.running=true;
  this.counter=0;
  this.task=TaskManager.runTaskRepeat(new Runnable(){
    @Override public void run(){
      if (SchematicCmd.this.counter >= SchematicCmd.this.plots.length) {
        PlotSquared.log("String_Node_Str");
        SchematicCmd.this.running=false;
        PlotSquared.TASK.cancelTask(SchematicCmd.this.task);
        return;
      }
      final Plot plot=SchematicCmd.this.plots[SchematicCmd.this.counter];
      final CompoundTag sch=SchematicHandler.manager.getCompoundTag(worldname,plot.id);
      final String o=UUIDHandler.getName(plot.owner);
      final String owner=o == null ? "String_Node_Str" : o;
      if (sch == null) {
        MainUtil.sendMessage(null,"String_Node_Str" + plot.id);
      }
 else {
        TaskManager.runTaskAsync(new Runnable(){
          @Override public void run(){
            MainUtil.sendMessage(null,"String_Node_Str" + plot.id);
            final boolean result=SchematicHandler.manager.save(sch,Settings.SCHEMATIC_SAVE_PATH + "String_Node_Str" + plot.id.x+ "String_Node_Str"+ plot.id.y+ "String_Node_Str"+ worldname+ "String_Node_Str"+ owner+ "String_Node_Str");
            if (!result) {
              MainUtil.sendMessage(null,"String_Node_Str" + plot.id);
            }
 else {
              MainUtil.sendMessage(null,"String_Node_Str" + plot.id);
            }
          }
        }
);
      }
      SchematicCmd.this.counter++;
    }
  }
,20);
  break;
}
case "String_Node_Str":
case "String_Node_Str":
{
if (!Permissions.hasPermission(plr,"String_Node_Str")) {
  MainUtil.sendMessage(plr,C.NO_PERMISSION,"String_Node_Str");
  return false;
}
if (this.running) {
  MainUtil.sendMessage(plr,"String_Node_Str");
  return false;
}
final String world;
final Plot p2;
if (plr != null) {
  final Location loc=plr.getLocation();
  final Plot plot=MainUtil.getPlot(loc);
  if (plot == null) {
    return !sendMessage(plr,C.NOT_IN_PLOT);
  }
  if (!plot.isAdded(plr.getUUID())) {
    sendMessage(plr,C.NO_PLOT_PERMS);
    return false;
  }
  p2=plot;
  world=loc.getWorld();
}
 else {
  if (args.length == 3) {
    try {
      world=args[0];
      final String[] split=args[2].split("String_Node_Str");
      final PlotId i=new PlotId(Integer.parseInt(split[0]),Integer.parseInt(split[1]));
      if ((PlotSquared.getPlots(world) == null) || (PlotSquared.getPlots(world).get(i) == null)) {
        MainUtil.sendMessage(null,"String_Node_Str");
        return false;
      }
      p2=PlotSquared.getPlots(world).get(i);
    }
 catch (    final Exception e) {
      MainUtil.sendMessage(null,"String_Node_Str");
      return false;
    }
  }
 else {
    MainUtil.sendMessage(null,"String_Node_Str");
    return false;
  }
}
this.plots=new Plot[]{p2};
this.running=true;
this.counter=0;
this.task=TaskManager.runTaskRepeat(new Runnable(){
  @Override public void run(){
    if (SchematicCmd.this.counter >= SchematicCmd.this.plots.length) {
      PlotSquared.log("String_Node_Str");
      SchematicCmd.this.running=false;
      PlotSquared.TASK.cancelTask(SchematicCmd.this.task);
      return;
    }
    final Plot plot=SchematicCmd.this.plots[SchematicCmd.this.counter];
    final CompoundTag sch=SchematicHandler.manager.getCompoundTag(world,plot.id);
    final String o=UUIDHandler.getName(plot.owner);
    final String owner=o == null ? "String_Node_Str" : o;
    if (sch == null) {
      MainUtil.sendMessage(plr,"String_Node_Str" + plot.id);
    }
 else {
      TaskManager.runTaskAsync(new Runnable(){
        @Override public void run(){
          MainUtil.sendMessage(plr,"String_Node_Str" + plot.id);
          final boolean result=SchematicHandler.manager.save(sch,Settings.SCHEMATIC_SAVE_PATH + "String_Node_Str" + plot.id.x+ "String_Node_Str"+ plot.id.y+ "String_Node_Str"+ world+ "String_Node_Str"+ owner.trim()+ "String_Node_Str");
          if (!result) {
            MainUtil.sendMessage(plr,"String_Node_Str" + plot.id);
          }
 else {
            MainUtil.sendMessage(plr,"String_Node_Str" + plot.id);
          }
        }
      }
);
    }
    SchematicCmd.this.counter++;
  }
}
,60);
break;
}
default :
{
sendMessage(plr,C.SCHEMATIC_MISSING_ARG);
break;
}
}
return true;
}

Fixed version (ground truth):
@Override public boolean execute(final PlotPlayer plr,final String... args){
  if (args.length < 1) {
    sendMessage(plr,C.SCHEMATIC_MISSING_ARG);
    return true;
  }
  final String arg=args[0].toLowerCase();
  final String file;
  final Schematic schematic;
switch (arg) {
case "String_Node_Str":
{
      if (plr == null) {
        PlotSquared.log(C.IS_CONSOLE.s());
        return false;
      }
      if (!Permissions.hasPermission(plr,"String_Node_Str")) {
        MainUtil.sendMessage(plr,C.NO_PERMISSION,"String_Node_Str");
        return false;
      }
      if (args.length < 2) {
        sendMessage(plr,C.SCHEMATIC_MISSING_ARG);
        break;
      }
      final Location loc=plr.getLocation();
      final Plot plot=MainUtil.getPlot(loc);
      if (plot == null) {
        sendMessage(plr,C.NOT_IN_PLOT);
        break;
      }
      if (this.running) {
        MainUtil.sendMessage(plr,"String_Node_Str");
        return false;
      }
      final String file2=args[1];
      this.running=true;
      this.counter=0;
      TaskManager.runTaskAsync(new Runnable(){
        @Override public void run(){
          final Schematic schematic=SchematicHandler.manager.getSchematic(file2);
          if (schematic == null) {
            sendMessage(plr,C.SCHEMATIC_INVALID,"String_Node_Str");
            SchematicCmd.this.running=false;
            return;
          }
          final int x;
          final int z;
          final Plot plot2=MainUtil.getPlot(loc);
          final Dimension dem=schematic.getSchematicDimension();
          final Location bot=MainUtil.getPlotBottomLoc(loc.getWorld(),plot2.id).add(1,0,1);
          final int length2=MainUtil.getPlotWidth(loc.getWorld(),plot2.id);
          if ((dem.getX() > length2) || (dem.getZ() > length2)) {
            sendMessage(plr,C.SCHEMATIC_INVALID,String.format("String_Node_Str",dem.getX(),dem.getZ(),length2));
            SchematicCmd.this.running=false;
            return;
          }
          if ((dem.getX() != length2) || (dem.getZ() != length2)) {
            final Location loc=plr.getLocation();
            x=Math.min(length2 - dem.getX(),loc.getX() - bot.getX());
            z=Math.min(length2 - dem.getZ(),loc.getZ() - bot.getZ());
          }
 else {
            x=0;
            z=0;
          }
          final DataCollection[] b=schematic.getBlockCollection();
          final int sy=BlockManager.manager.getHeighestBlock(bot);
          final int WIDTH=schematic.getSchematicDimension().getX();
          final int LENGTH=schematic.getSchematicDimension().getZ();
          final Location l1;
          if (!(schematic.getSchematicDimension().getY() == BukkitUtil.getMaxHeight(loc.getWorld()))) {
            l1=bot.add(0,sy - 1,0);
          }
 else {
            l1=bot;
          }
          final int blen=b.length - 1;
          SchematicCmd.this.task=TaskManager.runTaskRepeat(new Runnable(){
            @Override public void run(){
              boolean result=false;
              while (!result) {
                final int start=SchematicCmd.this.counter * 5000;
                if (start > blen) {
                  SchematicHandler.manager.pasteStates(schematic,plot,0,0);
                  sendMessage(plr,C.SCHEMATIC_PASTE_SUCCESS);
                  MainUtil.update(plr.getLocation());
                  SchematicCmd.this.running=false;
                  PlotSquared.TASK.cancelTask(SchematicCmd.this.task);
                  return;
                }
                final int end=Math.min(start + 5000,blen);
                result=SchematicHandler.manager.pastePart(loc.getWorld(),b,l1,x,z,start,end,WIDTH,LENGTH);
                SchematicCmd.this.counter++;
              }
            }
          }
,1);
        }
      }
);
      break;
    }
case "String_Node_Str":
{
    if (plr == null) {
      PlotSquared.log(C.IS_CONSOLE.s());
      return false;
    }
    if (!Permissions.hasPermission(plr,"String_Node_Str")) {
      MainUtil.sendMessage(plr,C.NO_PERMISSION,"String_Node_Str");
      return false;
    }
    if (args.length < 2) {
      sendMessage(plr,C.SCHEMATIC_MISSING_ARG);
      break;
    }
    file=args[1];
    schematic=SchematicHandler.manager.getSchematic(file);
    if (schematic == null) {
      sendMessage(plr,C.SCHEMATIC_INVALID,"String_Node_Str");
      break;
    }
    final Location loc=plr.getLocation();
    final int l1=schematic.getSchematicDimension().getX();
    final int l2=schematic.getSchematicDimension().getZ();
    final Plot plot=MainUtil.getPlot(loc);
    final int length=MainUtil.getPlotWidth(loc.getWorld(),plot.id);
    if ((l1 < length) || (l2 < length)) {
      sendMessage(plr,C.SCHEMATIC_INVALID,String.format("String_Node_Str",l1,l2,length));
      break;
    }
    sendMessage(plr,C.SCHEMATIC_VALID);
    break;
  }
case "String_Node_Str":
case "String_Node_Str":
{
  if (plr != null) {
    MainUtil.sendMessage(plr,C.NOT_CONSOLE);
    return false;
  }
  if (args.length != 2) {
    MainUtil.sendMessage(null,"String_Node_Str");
    return false;
  }
  final HashMap<PlotId,Plot> plotmap=PlotSquared.getPlots(args[1]);
  if ((plotmap == null) || (plotmap.size() == 0)) {
    MainUtil.sendMessage(null,"String_Node_Str");
    return false;
  }
  if (this.running) {
    MainUtil.sendMessage(null,"String_Node_Str");
    return false;
  }
  PlotSquared.log("String_Node_Str");
  PlotSquared.log("String_Node_Str" + plotmap.size() + "String_Node_Str");
  final String worldname=args[1];
  final Collection<Plot> values=plotmap.values();
  this.plots=values.toArray(new Plot[values.size()]);
  this.running=true;
  this.counter=0;
  this.task=TaskManager.runTaskRepeat(new Runnable(){
    @Override public void run(){
      if (SchematicCmd.this.counter >= SchematicCmd.this.plots.length) {
        PlotSquared.log("String_Node_Str");
        SchematicCmd.this.running=false;
        PlotSquared.TASK.cancelTask(SchematicCmd.this.task);
        return;
      }
      final Plot plot=SchematicCmd.this.plots[SchematicCmd.this.counter];
      final CompoundTag sch=SchematicHandler.manager.getCompoundTag(worldname,plot.id);
      final String o=UUIDHandler.getName(plot.owner_);
      final String owner=o == null ? "String_Node_Str" : o;
      if (sch == null) {
        MainUtil.sendMessage(null,"String_Node_Str" + plot.id);
      }
 else {
        TaskManager.runTaskAsync(new Runnable(){
          @Override public void run(){
            MainUtil.sendMessage(null,"String_Node_Str" + plot.id);
            final boolean result=SchematicHandler.manager.save(sch,Settings.SCHEMATIC_SAVE_PATH + "String_Node_Str" + plot.id.x+ "String_Node_Str"+ plot.id.y+ "String_Node_Str"+ worldname+ "String_Node_Str"+ owner+ "String_Node_Str");
            if (!result) {
              MainUtil.sendMessage(null,"String_Node_Str" + plot.id);
            }
 else {
              MainUtil.sendMessage(null,"String_Node_Str" + plot.id);
            }
          }
        }
);
      }
      SchematicCmd.this.counter++;
    }
  }
,20);
  break;
}
case "String_Node_Str":
case "String_Node_Str":
{
if (!Permissions.hasPermission(plr,"String_Node_Str")) {
  MainUtil.sendMessage(plr,C.NO_PERMISSION,"String_Node_Str");
  return false;
}
if (this.running) {
  MainUtil.sendMessage(plr,"String_Node_Str");
  return false;
}
final String world;
final Plot p2;
if (plr != null) {
  final Location loc=plr.getLocation();
  final Plot plot=MainUtil.getPlot(loc);
  if (plot == null) {
    return !sendMessage(plr,C.NOT_IN_PLOT);
  }
  if (!plot.isAdded(plr.getUUID())) {
    sendMessage(plr,C.NO_PLOT_PERMS);
    return false;
  }
  p2=plot;
  world=loc.getWorld();
}
 else {
  if (args.length == 3) {
    try {
      world=args[0];
      final String[] split=args[2].split("String_Node_Str");
      final PlotId i=new PlotId(Integer.parseInt(split[0]),Integer.parseInt(split[1]));
      if ((PlotSquared.getPlots(world) == null) || (PlotSquared.getPlots(world).get(i) == null)) {
        MainUtil.sendMessage(null,"String_Node_Str");
        return false;
      }
      p2=PlotSquared.getPlots(world).get(i);
    }
 catch (    final Exception e) {
      MainUtil.sendMessage(null,"String_Node_Str");
      return false;
    }
  }
 else {
    MainUtil.sendMessage(null,"String_Node_Str");
    return false;
  }
}
this.plots=new Plot[]{p2};
this.running=true;
this.counter=0;
this.task=TaskManager.runTaskRepeat(new Runnable(){
  @Override public void run(){
    if (SchematicCmd.this.counter >= SchematicCmd.this.plots.length) {
      PlotSquared.log("String_Node_Str");
      SchematicCmd.this.running=false;
      PlotSquared.TASK.cancelTask(SchematicCmd.this.task);
      return;
    }
    final Plot plot=SchematicCmd.this.plots[SchematicCmd.this.counter];
    final CompoundTag sch=SchematicHandler.manager.getCompoundTag(world,plot.id);
    final String o=UUIDHandler.getName(plot.owner_);
    final String owner=o == null ? "String_Node_Str" : o;
    if (sch == null) {
      MainUtil.sendMessage(plr,"String_Node_Str" + plot.id);
    }
 else {
      TaskManager.runTaskAsync(new Runnable(){
        @Override public void run(){
          MainUtil.sendMessage(plr,"String_Node_Str" + plot.id);
          final boolean result=SchematicHandler.manager.save(sch,Settings.SCHEMATIC_SAVE_PATH + "String_Node_Str" + plot.id.x+ "String_Node_Str"+ plot.id.y+ "String_Node_Str"+ world+ "String_Node_Str"+ owner.trim()+ "String_Node_Str");
          if (!result) {
            MainUtil.sendMessage(plr,"String_Node_Str" + plot.id);
          }
 else {
            MainUtil.sendMessage(plr,"String_Node_Str" + plot.id);
          }
        }
      }
);
    }
    SchematicCmd.this.counter++;
  }
}
,60);
break;
}
default :
{
sendMessage(plr,C.SCHEMATIC_MISSING_ARG);
break;
}
}
return true;
}