Program: 57927
Project: 57927
Buggy source:
@EventHandler(priority=EventPriority.HIGHEST,ignoreCancelled=true) public void onBigBoom(EntityExplodeEvent event){
  Location location=BukkitUtil.getLocation(event.getLocation());
  PlotArea area=location.getPlotArea();
  if (area == null) {
    if (!PS.get().hasPlotArea(location.getWorld())) {
      return;
    }
    Iterator<Block> iterator=event.blockList().iterator();
    while (iterator.hasNext()) {
      iterator.next();
      if (location.getPlotArea() != null) {
        iterator.remove();
      }
    }
    return;
  }
  Plot plot=area.getOwnedPlot(location);
  if (plot != null) {
    if (plot.getFlag(Flags.EXPLOSION).isPresent() && plot.getFlag(Flags.EXPLOSION).get()) {
      List<MetadataValue> meta=event.getEntity().getMetadata("String_Node_Str");
      Plot origin;
      if (meta.isEmpty()) {
        origin=plot;
      }
 else {
        origin=(Plot)meta.get(0).value();
      }
      if (this.lastRadius != 0) {
        List<Entity> nearby=event.getEntity().getNearbyEntities(this.lastRadius,this.lastRadius,this.lastRadius);
        for (        Entity near : nearby) {
          if (near instanceof TNTPrimed || near.getType() == EntityType.MINECART_TNT) {
            if (!near.hasMetadata("String_Node_Str")) {
              near.setMetadata("String_Node_Str",new FixedMetadataValue((Plugin)PS.get().IMP,plot));
            }
          }
        }
        this.lastRadius=0;
      }
      Iterator<Block> iterator=event.blockList().iterator();
      while (iterator.hasNext()) {
        Block block=iterator.next();
        location=BukkitUtil.getLocation(block.getLocation());
        if (!area.contains(location.getX(),location.getZ()) || !origin.equals(area.getOwnedPlot(location))) {
          iterator.remove();
        }
      }
      return;
    }
  }
  event.setCancelled(true);
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.HIGHEST,ignoreCancelled=true) public void onBigBoom(EntityExplodeEvent event){
  Location location=BukkitUtil.getLocation(event.getLocation());
  PlotArea area=location.getPlotArea();
  if (area == null) {
    if (!PS.get().hasPlotArea(location.getWorld())) {
      return;
    }
    Iterator<Block> iterator=event.blockList().iterator();
    while (iterator.hasNext()) {
      iterator.next();
      if (location.getPlotArea() != null) {
        iterator.remove();
      }
    }
    return;
  }
  Plot plot=area.getOwnedPlot(location);
  if (plot != null) {
    Optional<Boolean> flag=plot.getFlag(Flags.EXPLOSION);
    if (flag.isPresent() && flag.get()) {
      List<MetadataValue> meta=event.getEntity().getMetadata("String_Node_Str");
      Plot origin;
      if (meta.isEmpty()) {
        origin=plot;
      }
 else {
        origin=(Plot)meta.get(0).value();
      }
      if (this.lastRadius != 0) {
        List<Entity> nearby=event.getEntity().getNearbyEntities(this.lastRadius,this.lastRadius,this.lastRadius);
        for (        Entity near : nearby) {
          if (near instanceof TNTPrimed || near.getType() == EntityType.MINECART_TNT) {
            if (!near.hasMetadata("String_Node_Str")) {
              near.setMetadata("String_Node_Str",new FixedMetadataValue((Plugin)PS.get().IMP,plot));
            }
          }
        }
        this.lastRadius=0;
      }
      Iterator<Block> iterator=event.blockList().iterator();
      while (iterator.hasNext()) {
        Block block=iterator.next();
        location=BukkitUtil.getLocation(block.getLocation());
        if (!area.contains(location.getX(),location.getZ()) || !origin.equals(area.getOwnedPlot(location))) {
          iterator.remove();
        }
      }
      return;
    }
  }
  event.setCancelled(true);
}