Program: 177273
Project: 177273
Buggy source:
private void blockChanged(int x,int y,int z,BlockMaterial newMaterial,short newData,BlockMaterial oldMaterial,short oldData,Cause<?> cause){
  queueDirty();
  x&=BLOCKS.MASK;
  y&=BLOCKS.MASK;
  z&=BLOCKS.MASK;
  int rx=x + getBlockX();
  int ry=y + getBlockY();
  int rz=z + getBlockZ();
  if (Spout.getEngine().getPlatform() == Platform.CLIENT) {
    int maxBlock=Chunk.BLOCKS.SIZE - 1;
    if (x == 0) {
      SpoutChunk c=getRegion().getLocalChunk(this,-1,0,0,LoadOption.NO_LOAD);
      if (c != null) {
        c.touchBlock(maxBlock,y,z);
      }
    }
 else     if (x == maxBlock) {
      SpoutChunk c=getRegion().getLocalChunk(this,+1,0,0,LoadOption.NO_LOAD);
      if (c != null) {
        c.touchBlock(0,y,z);
      }
    }
    if (y == 0) {
      SpoutChunk c=getRegion().getLocalChunk(this,0,-1,0,LoadOption.NO_LOAD);
      if (c != null) {
        c.touchBlock(x,maxBlock,z);
      }
    }
 else     if (y == maxBlock) {
      SpoutChunk c=getRegion().getLocalChunk(this,0,+1,0,LoadOption.NO_LOAD);
      if (c != null) {
        c.touchBlock(x,0,z);
      }
    }
    if (z == 0) {
      SpoutChunk c=getRegion().getLocalChunk(this,0,0,-1,LoadOption.NO_LOAD);
      if (c != null) {
        c.touchBlock(x,y,maxBlock);
      }
    }
 else     if (z == maxBlock) {
      SpoutChunk c=getRegion().getLocalChunk(this,0,0,1,LoadOption.NO_LOAD);
      if (c != null) {
        c.touchBlock(x,y,0);
      }
    }
  }
  if (newMaterial instanceof DynamicMaterial) {
    if (oldMaterial instanceof DynamicMaterial) {
      if (!oldMaterial.isCompatibleWith(newMaterial) || !newMaterial.isCompatibleWith(oldMaterial)) {
        parentRegion.resetDynamicBlock(rx,ry,rz);
      }
    }
 else {
      parentRegion.resetDynamicBlock(rx,ry,rz);
    }
  }
  if (this.isPopulated()) {
    EffectRange physicsRange=newMaterial.getPhysicsRange(newData);
    queueBlockPhysics(x,y,z,physicsRange,oldMaterial);
    if (newMaterial != oldMaterial) {
      EffectRange destroyRange=oldMaterial.getDestroyRange(oldData);
      if (destroyRange != physicsRange) {
        queueBlockPhysics(x,y,z,destroyRange,oldMaterial);
      }
    }
  }
  if (this.isPopulated()) {
    SpoutWorld world=this.getWorld();
    int oldheight=column.getSurfaceHeight(x,z);
    int wy=x + this.getBlockY();
    column.notifyBlockChange(x,wy,z);
    int wx=x + this.getBlockX();
    int wz=z + this.getBlockZ();
    int newheight=column.getSurfaceHeight(x,z);
    if (newheight > oldheight) {
      for (y=oldheight; y < newheight; y++) {
        world.setBlockSkyLight(wx,y + 1,wz,(byte)0,cause);
      }
    }
 else     if (newheight < oldheight) {
      for (y=newheight; y < oldheight; y++) {
        world.setBlockSkyLight(wx,y + 1,wz,(byte)15,cause);
      }
    }
 else     if (lightStore instanceof ServerLightStore) {
      ((ServerLightStore)lightStore).addSkyLightUpdates(x,y,z,0);
      ((ServerLightStore)lightStore).addSkyLightOperation(wx,wy,wz,SpoutWorldLighting.REFRESH);
    }
    if (newMaterial.getOpacity() != oldMaterial.getOpacity() || newMaterial.getLightLevel(newData) != oldMaterial.getLightLevel(oldData)) {
      this.setBlockLight(x,y,z,newMaterial.getLightLevel(newData),cause);
    }
  }
  setModified();
}

Fixed version (ground truth):
private void blockChanged(int x,int y,int z,BlockMaterial newMaterial,short newData,BlockMaterial oldMaterial,short oldData,Cause<?> cause){
  queueDirty();
  x&=BLOCKS.MASK;
  y&=BLOCKS.MASK;
  z&=BLOCKS.MASK;
  int rx=x + getBlockX();
  int ry=y + getBlockY();
  int rz=z + getBlockZ();
  if (Spout.getEngine().getPlatform() == Platform.CLIENT) {
    int maxBlock=Chunk.BLOCKS.SIZE - 1;
    if (x == 0) {
      SpoutChunk c=getRegion().getLocalChunk(this,-1,0,0,LoadOption.NO_LOAD);
      if (c != null) {
        c.touchBlock(maxBlock,y,z);
      }
    }
 else     if (x == maxBlock) {
      SpoutChunk c=getRegion().getLocalChunk(this,+1,0,0,LoadOption.NO_LOAD);
      if (c != null) {
        c.touchBlock(0,y,z);
      }
    }
    if (y == 0) {
      SpoutChunk c=getRegion().getLocalChunk(this,0,-1,0,LoadOption.NO_LOAD);
      if (c != null) {
        c.touchBlock(x,maxBlock,z);
      }
    }
 else     if (y == maxBlock) {
      SpoutChunk c=getRegion().getLocalChunk(this,0,+1,0,LoadOption.NO_LOAD);
      if (c != null) {
        c.touchBlock(x,0,z);
      }
    }
    if (z == 0) {
      SpoutChunk c=getRegion().getLocalChunk(this,0,0,-1,LoadOption.NO_LOAD);
      if (c != null) {
        c.touchBlock(x,y,maxBlock);
      }
    }
 else     if (z == maxBlock) {
      SpoutChunk c=getRegion().getLocalChunk(this,0,0,1,LoadOption.NO_LOAD);
      if (c != null) {
        c.touchBlock(x,y,0);
      }
    }
  }
  if (newMaterial instanceof DynamicMaterial) {
    if (oldMaterial instanceof DynamicMaterial) {
      if (!oldMaterial.isCompatibleWith(newMaterial) || !newMaterial.isCompatibleWith(oldMaterial)) {
        parentRegion.resetDynamicBlock(rx,ry,rz);
      }
    }
 else {
      parentRegion.resetDynamicBlock(rx,ry,rz);
    }
  }
  if (this.isPopulated()) {
    EffectRange physicsRange=newMaterial.getPhysicsRange(newData);
    queueBlockPhysics(x,y,z,physicsRange,oldMaterial);
    if (newMaterial != oldMaterial) {
      EffectRange destroyRange=oldMaterial.getDestroyRange(oldData);
      if (destroyRange != physicsRange) {
        queueBlockPhysics(x,y,z,destroyRange,oldMaterial);
      }
    }
  }
  if (this.isPopulated()) {
    SpoutWorld world=this.getWorld();
    int oldheight=column.getSurfaceHeight(x,z);
    int wy=y + this.getBlockY();
    column.notifyBlockChange(x,wy,z);
    int wx=x + this.getBlockX();
    int wz=z + this.getBlockZ();
    int newheight=column.getSurfaceHeight(x,z);
    if (newheight > oldheight) {
      for (y=oldheight; y < newheight; y++) {
        world.setBlockSkyLight(wx,y + 1,wz,(byte)0,cause);
      }
    }
 else     if (newheight < oldheight) {
      for (y=newheight; y < oldheight; y++) {
        world.setBlockSkyLight(wx,y + 1,wz,(byte)15,cause);
      }
    }
 else     if (lightStore instanceof ServerLightStore) {
      ((ServerLightStore)lightStore).addSkyLightUpdates(x,y,z,0);
      ((ServerLightStore)lightStore).addSkyLightOperation(wx,wy,wz,SpoutWorldLighting.REFRESH);
    }
    if (newMaterial.getOpacity() != oldMaterial.getOpacity() || newMaterial.getLightLevel(newData) != oldMaterial.getLightLevel(oldData)) {
      this.setBlockLight(x,y,z,newMaterial.getLightLevel(newData),cause);
    }
  }
  setModified();
}