Program: 58036
Project: 58036
Buggy source:
/** 
 * This part is a fucking mess. - Refer to a proper tutorial if you would like to learn how to make a world generator
 */
@Override public short[][] generateChunk(final World world,RegionWrapper region,final PseudoRandom random,final int cx,final int cz,final BiomeGrid biomes,final short[][] result){
  if (this.doState) {
    final int prime=13;
    int h=1;
    h=(prime * h) + cx;
    h=(prime * h) + cz;
    this.state=h;
  }
  if (this.plotworld.PLOT_BEDROCK) {
    for (short x=0; x < 16; x++) {
      for (short z=0; z < 16; z++) {
        setBlock(this.result,x,0,z,(short)7);
      }
    }
  }
  if (region != null) {
    final int X=cx << 4;
    final int Z=cz << 4;
    int sx=((X) % this.size);
    int sz=((Z) % this.size);
    if (sx < 0) {
      sx+=this.size;
    }
    if (sz < 0) {
      sz+=this.size;
    }
    for (short x=0; x < 16; x++) {
      for (short z=0; z < 16; z++) {
        if (biomes != null) {
          biomes.setBiome(x,z,this.biome);
        }
        if (contains(region,x,z)) {
          for (short y=1; y < this.plotheight; y++) {
            setBlock(this.result,x,y,z,this.filling);
          }
          setBlock(this.result,x,this.plotheight,z,this.plotfloors);
          final PlotLoc loc=new PlotLoc((short)(X + x),(short)(Z + z));
          final HashMap<Short,Short> blocks=plotworld.G_SCH.get(loc);
          if (blocks != null) {
            for (            final Entry<Short,Short> entry : blocks.entrySet()) {
              setBlock(this.result,x,this.plotheight + entry.getKey(),z,entry.getValue());
            }
          }
        }
      }
    }
    return this.result;
  }
  int sx=((cx << 4) % this.size);
  int sz=((cz << 4) % this.size);
  if (sx < 0) {
    sx+=this.size;
  }
  if (sz < 0) {
    sz+=this.size;
  }
  for (short x=0; x < 16; x++) {
    for (short z=0; z < 16; z++) {
      if (biomes != null) {
        biomes.setBiome(x,z,this.biome);
      }
      final int absX=((sx + x) % this.size);
      final int absZ=((sz + z) % this.size);
      final boolean gx=absX > this.pathWidthLower;
      final boolean gz=absZ > this.pathWidthLower;
      final boolean lx=absX < this.pathWidthUpper;
      final boolean lz=absZ < this.pathWidthUpper;
      if (gx && gz && lx&& lz) {
        for (short y=1; y < this.plotheight; y++) {
          setBlock(this.result,x,y,z,this.filling);
        }
        setBlock(this.result,x,this.plotheight,z,this.plotfloors);
        if (this.plotworld.PLOT_SCHEMATIC) {
          final PlotLoc loc=new PlotLoc((short)absX,(short)absZ);
          final HashMap<Short,Short> blocks=this.plotworld.G_SCH.get(loc);
          if (blocks != null) {
            for (            final Entry<Short,Short> entry : blocks.entrySet()) {
              setBlock(this.result,x,this.plotheight + entry.getKey(),z,entry.getValue());
            }
          }
        }
      }
 else {
        if (((absX >= this.pathWidthLower) && (absX <= this.pathWidthUpper) && (absZ >= this.pathWidthLower)&& (absZ <= this.pathWidthUpper))) {
          for (short y=1; y <= this.wallheight; y++) {
            setBlock(this.result,x,y,z,this.wallfilling);
          }
          if (!this.plotworld.ROAD_SCHEMATIC_ENABLED) {
            setBlock(this.result,x,this.wallheight + 1,z,this.wall);
          }
        }
 else {
          for (short y=1; y <= this.roadheight; y++) {
            setBlock(this.result,x,y,z,this.roadblock);
          }
        }
        if (this.plotworld.ROAD_SCHEMATIC_ENABLED) {
          final PlotLoc loc=new PlotLoc((short)absX,(short)absZ);
          final HashMap<Short,Short> blocks=this.plotworld.G_SCH.get(loc);
          if (blocks != null) {
            for (            final Entry<Short,Short> entry : blocks.entrySet()) {
              setBlock(this.result,x,this.roadheight + entry.getKey(),z,entry.getValue());
            }
          }
        }
      }
    }
  }
  return this.result;
}

Fixed version (ground truth):
/** 
 * This part is a fucking mess. - Refer to a proper tutorial if you would like to learn how to make a world generator
 */
public void generateChunk(final World world,RegionWrapper region,final PseudoRandom random,final int cx,final int cz,final BiomeGrid biomes){
  if (this.plotworld.PLOT_BEDROCK) {
    for (short x=0; x < 16; x++) {
      for (short z=0; z < 16; z++) {
        setBlock(x,0,z,(short)7);
      }
    }
  }
  if (region != null) {
    final int X=cx << 4;
    final int Z=cz << 4;
    int sx=((X) % this.size);
    int sz=((Z) % this.size);
    if (sx < 0) {
      sx+=this.size;
    }
    if (sz < 0) {
      sz+=this.size;
    }
    for (short x=0; x < 16; x++) {
      for (short z=0; z < 16; z++) {
        if (biomes != null) {
          biomes.setBiome(x,z,this.biome);
        }
        if (contains(region,x,z)) {
          for (short y=1; y < this.plotheight; y++) {
            setBlock(x,y,z,this.filling);
          }
          setBlock(x,this.plotheight,z,this.plotfloors);
          final PlotLoc loc=new PlotLoc((short)(X + x),(short)(Z + z));
          final HashMap<Short,Short> blocks=plotworld.G_SCH.get(loc);
          if (blocks != null) {
            for (            final Entry<Short,Short> entry : blocks.entrySet()) {
              setBlock(x,this.plotheight + entry.getKey(),z,entry.getValue());
            }
          }
        }
      }
    }
    return;
  }
  int sx=((cx << 4) % this.size);
  int sz=((cz << 4) % this.size);
  if (sx < 0) {
    sx+=this.size;
  }
  if (sz < 0) {
    sz+=this.size;
  }
  for (short x=0; x < 16; x++) {
    for (short z=0; z < 16; z++) {
      if (biomes != null) {
        biomes.setBiome(x,z,this.biome);
      }
      final int absX=((sx + x) % this.size);
      final int absZ=((sz + z) % this.size);
      final boolean gx=absX > this.pathWidthLower;
      final boolean gz=absZ > this.pathWidthLower;
      final boolean lx=absX < this.pathWidthUpper;
      final boolean lz=absZ < this.pathWidthUpper;
      if (gx && gz && lx&& lz) {
        for (short y=1; y < this.plotheight; y++) {
          setBlock(x,y,z,this.filling);
        }
        setBlock(x,this.plotheight,z,this.plotfloors);
        if (this.plotworld.PLOT_SCHEMATIC) {
          final PlotLoc loc=new PlotLoc((short)absX,(short)absZ);
          final HashMap<Short,Short> blocks=this.plotworld.G_SCH.get(loc);
          if (blocks != null) {
            for (            final Entry<Short,Short> entry : blocks.entrySet()) {
              setBlock(x,this.plotheight + entry.getKey(),z,entry.getValue());
            }
          }
        }
      }
 else {
        if (((absX >= this.pathWidthLower) && (absX <= this.pathWidthUpper) && (absZ >= this.pathWidthLower)&& (absZ <= this.pathWidthUpper))) {
          for (short y=1; y <= this.wallheight; y++) {
            setBlock(x,y,z,this.wallfilling);
          }
          if (!this.plotworld.ROAD_SCHEMATIC_ENABLED) {
            setBlock(x,this.wallheight + 1,z,this.wall);
          }
        }
 else {
          for (short y=1; y <= this.roadheight; y++) {
            setBlock(x,y,z,this.roadblock);
          }
        }
        if (this.plotworld.ROAD_SCHEMATIC_ENABLED) {
          final PlotLoc loc=new PlotLoc((short)absX,(short)absZ);
          final HashMap<Short,Short> blocks=this.plotworld.G_SCH.get(loc);
          if (blocks != null) {
            for (            final Entry<Short,Short> entry : blocks.entrySet()) {
              setBlock(x,this.roadheight + entry.getKey(),z,entry.getValue());
            }
          }
        }
      }
    }
  }
  return;
}