Program: 12538
Project: 12538
Buggy source:
@Override public void randomDisplayTick(IBlockState state,World world,BlockPos pos,Random rand){
  final TileEntity te=world.getTileEntity(pos);
  if (te instanceof CupolaTE) {
    final CupolaTE cupola=(CupolaTE)te;
    if (cupola.isActive()) {
      final float effectX=pos.getX() + 0.5f;
      final float effectY=pos.getY() + 0.5f + rand.nextFloat() * 5.0f / 16.0f;
      final float effectZ=pos.getZ() + 0.5f;
      final float edgeOffset=0.52f;
      final float widthOffset=rand.nextFloat() * 0.6f - 0.3f;
      final IBlockState metadata=world.getBlockState(pos);
      final EnumFacing orientation=(EnumFacing)metadata.getValue(BlockDirectional.FACING);
switch (orientation) {
case SOUTH:
        world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL,effectX + widthOffset,effectY,effectZ - edgeOffset,0.0d,0.0d,0.0d);
      world.spawnParticle(EnumParticleTypes.FLAME,effectX + widthOffset,effectY,effectZ - edgeOffset,0.0d,0.0d,0.0d);
    break;
case WEST:
  world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL,effectX + edgeOffset,effectY,effectZ + widthOffset,0.0d,0.0d,0.0d);
world.spawnParticle(EnumParticleTypes.FLAME,effectX + edgeOffset,effectY,effectZ + widthOffset,0.0d,0.0d,0.0d);
break;
case NORTH:
world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL,effectX + widthOffset,effectY,effectZ + edgeOffset,0.0d,0.0d,0.0d);
world.spawnParticle(EnumParticleTypes.FLAME,effectX + widthOffset,effectY,effectZ + edgeOffset,0.0d,0.0d,0.0d);
break;
case EAST:
world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL,effectX - edgeOffset,effectY,effectZ + widthOffset,0.0d,0.0d,0.0d);
world.spawnParticle(EnumParticleTypes.FLAME,effectX - edgeOffset,effectY,effectZ + widthOffset,0.0d,0.0d,0.0d);
}
renderSmokeOnTop(world,pos,rand);
}
}
}

Fixed version (ground truth):
@Override public void randomDisplayTick(IBlockState state,World world,BlockPos pos,Random rand){
  final TileEntity te=world.getTileEntity(pos);
  if (te instanceof CupolaTE) {
    final CupolaTE cupola=(CupolaTE)te;
    if (cupola.isActive()) {
      final float effectX=pos.getX() + 0.5f;
      final float effectY=pos.getY() + 0.5f + rand.nextFloat() * 5.0f / 16.0f;
      final float effectZ=pos.getZ() + 0.5f;
      final float edgeOffset=0.52f;
      final float widthOffset=rand.nextFloat() * 0.6f - 0.3f;
      final IBlockState metadata=world.getBlockState(pos);
      final EnumFacing orientation=(EnumFacing)metadata.getValue(DIRECTION);
switch (orientation) {
case SOUTH:
        world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL,effectX + widthOffset,effectY,effectZ - edgeOffset,0.0d,0.0d,0.0d);
      world.spawnParticle(EnumParticleTypes.FLAME,effectX + widthOffset,effectY,effectZ - edgeOffset,0.0d,0.0d,0.0d);
    break;
case WEST:
  world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL,effectX + edgeOffset,effectY,effectZ + widthOffset,0.0d,0.0d,0.0d);
world.spawnParticle(EnumParticleTypes.FLAME,effectX + edgeOffset,effectY,effectZ + widthOffset,0.0d,0.0d,0.0d);
break;
case NORTH:
world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL,effectX + widthOffset,effectY,effectZ + edgeOffset,0.0d,0.0d,0.0d);
world.spawnParticle(EnumParticleTypes.FLAME,effectX + widthOffset,effectY,effectZ + edgeOffset,0.0d,0.0d,0.0d);
break;
case EAST:
world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL,effectX - edgeOffset,effectY,effectZ + widthOffset,0.0d,0.0d,0.0d);
world.spawnParticle(EnumParticleTypes.FLAME,effectX - edgeOffset,effectY,effectZ + widthOffset,0.0d,0.0d,0.0d);
}
renderSmokeOnTop(world,pos,rand);
}
}
}