Program: 165969
Project: 165969
Buggy source:
@SubscribeEvent public void onDetonate(ExplosionEvent.Detonate event){
  int id=event.world.provider.dimensionId;
  BlockProtectors blockProtectors=BlockProtectors.getProtectors(event.world);
  Explosion explosion=event.explosion;
  Collection<GlobalCoordinate> protectors=blockProtectors.findProtectors((int)explosion.explosionX,(int)explosion.explosionY,(int)explosion.explosionZ,id,(int)explosion.explosionSize);
  if (protectors.isEmpty()) {
    return;
  }
  List<ChunkPosition> affectedBlocks=event.getAffectedBlocks();
  List<ChunkPosition> toremove=new ArrayList<ChunkPosition>();
  Vec3 explosionVector=Vec3.createVectorHelper(explosion.explosionX,explosion.explosionY,explosion.explosionZ);
  int rf=0;
  for (  GlobalCoordinate protector : protectors) {
    int cx=protector.getCoordinate().getX();
    int cy=protector.getCoordinate().getY();
    int cz=protector.getCoordinate().getZ();
    TileEntity te=event.world.getTileEntity(cx,cy,cz);
    if (te instanceof BlockProtectorTileEntity) {
      BlockProtectorTileEntity blockProtectorTileEntity=(BlockProtectorTileEntity)te;
      for (      ChunkPosition block : affectedBlocks) {
        Coordinate relative=blockProtectorTileEntity.absoluteToRelative(block.chunkPosX,block.chunkPosY,block.chunkPosZ);
        boolean b=blockProtectorTileEntity.isProtected(relative);
        if (b) {
          Vec3 blockVector=Vec3.createVectorHelper(block.chunkPosX,block.chunkPosY,block.chunkPosZ);
          double distanceTo=explosionVector.distanceTo(blockVector);
          int rfneeded=blockProtectorTileEntity.attemptExplosionProtection((float)(distanceTo / explosion.explosionSize),explosion.explosionSize);
          if (rfneeded > 0) {
            toremove.add(block);
            rf+=rfneeded;
          }
 else {
            blockProtectorTileEntity.removeProtection(relative);
          }
        }
      }
    }
  }
  for (  ChunkPosition block : toremove) {
    affectedBlocks.remove(block);
  }
  RFTools.logDebug("String_Node_Str" + rf);
}

Fixed version (ground truth):
@SubscribeEvent public void onDetonate(ExplosionEvent.Detonate event){
  BlockProtectors blockProtectors=BlockProtectors.getProtectors(event.world);
  if (blockProtectors == null) {
    return;
  }
  int id=event.world.provider.dimensionId;
  Explosion explosion=event.explosion;
  Collection<GlobalCoordinate> protectors=blockProtectors.findProtectors((int)explosion.explosionX,(int)explosion.explosionY,(int)explosion.explosionZ,id,(int)explosion.explosionSize);
  if (protectors.isEmpty()) {
    return;
  }
  List<ChunkPosition> affectedBlocks=event.getAffectedBlocks();
  List<ChunkPosition> toremove=new ArrayList<ChunkPosition>();
  Vec3 explosionVector=Vec3.createVectorHelper(explosion.explosionX,explosion.explosionY,explosion.explosionZ);
  int rf=0;
  for (  GlobalCoordinate protector : protectors) {
    int cx=protector.getCoordinate().getX();
    int cy=protector.getCoordinate().getY();
    int cz=protector.getCoordinate().getZ();
    TileEntity te=event.world.getTileEntity(cx,cy,cz);
    if (te instanceof BlockProtectorTileEntity) {
      BlockProtectorTileEntity blockProtectorTileEntity=(BlockProtectorTileEntity)te;
      for (      ChunkPosition block : affectedBlocks) {
        Coordinate relative=blockProtectorTileEntity.absoluteToRelative(block.chunkPosX,block.chunkPosY,block.chunkPosZ);
        boolean b=blockProtectorTileEntity.isProtected(relative);
        if (b) {
          Vec3 blockVector=Vec3.createVectorHelper(block.chunkPosX,block.chunkPosY,block.chunkPosZ);
          double distanceTo=explosionVector.distanceTo(blockVector);
          int rfneeded=blockProtectorTileEntity.attemptExplosionProtection((float)(distanceTo / explosion.explosionSize),explosion.explosionSize);
          if (rfneeded > 0) {
            toremove.add(block);
            rf+=rfneeded;
          }
 else {
            blockProtectorTileEntity.removeProtection(relative);
          }
        }
      }
    }
  }
  for (  ChunkPosition block : toremove) {
    affectedBlocks.remove(block);
  }
  RFTools.logDebug("String_Node_Str" + rf);
}