Program: 1331
Project: 1331
Buggy source:
public World(String title,String seed,Player p){
  this.player=p;
  rand=new Random(seed.hashCode());
  pGen1=new PerlinNoise(rand.nextInt());
  pGen2=new PerlinNoise(rand.nextInt());
  pGen3=new PerlinNoise(rand.nextInt());
  final World currentWorld=this;
  chunks=new Chunk[(int)Configuration.viewingDistanceInChunks.x][(int)Configuration.viewingDistanceInChunks.y][(int)Configuration.viewingDistanceInChunks.z];
  updateThread=new Thread(new Runnable(){
    @Override public void run(){
      long timeStart=System.currentTimeMillis();
      Logger.getLogger(this.getClass().getName()).log(Level.INFO,"String_Node_Str");
      for (int x=0; x < Configuration.viewingDistanceInChunks.x; x++) {
        for (int y=0; y < Configuration.viewingDistanceInChunks.y; y++) {
          for (int z=0; z < Configuration.viewingDistanceInChunks.z; z++) {
            Chunk c=new Chunk(currentWorld,new Vector3f(x,y,z));
            chunks[x][y][z]=c;
            c.generate();
            c.populate();
            c.calcSunlight();
            queueChunkForUpdate(c);
          }
        }
      }
      setWorldGenerated(true);
      player.resetPlayer();
      Logger.getLogger(this.getClass().getName()).log(Level.INFO,"String_Node_Str",(System.currentTimeMillis() - timeStart) / 1000d);
      while (true) {
        Chunk c=null;
synchronized (chunkUpdateQueueDL) {
          c=chunkUpdateQueue.peek();
          if (chunkUpdateQueueDL.contains(c)) {
            c=null;
          }
 else {
            chunkUpdateQueue.poll();
          }
        }
        if (c != null) {
          c.calcSunlight();
          c.calcLight();
          c.generateVertexArray();
synchronized (chunkUpdateQueueDL) {
            chunkUpdateQueueDL.add(c);
          }
        }
      }
    }
  }
);
  worldThread=new Thread(new Runnable(){
    @Override public void run(){
      while (true) {
        updateInfWorld();
        if (Helper.getInstance().getTime() - daylightTimer > 20000) {
          daylight-=0.2;
          if (daylight <= 0.4f) {
            daylight=1.0f;
          }
          daylightTimer=Helper.getInstance().getTime();
          updateAllChunks();
        }
      }
    }
  }
);
}

Fixed version (ground truth):
public World(String title,String seed,Player p){
  this.player=p;
  rand=new Random(seed.hashCode());
  pGen1=new PerlinNoise(rand.nextInt());
  pGen2=new PerlinNoise(rand.nextInt());
  pGen3=new PerlinNoise(rand.nextInt());
  final World currentWorld=this;
  chunks=new Chunk[(int)Configuration.viewingDistanceInChunks.x][(int)Configuration.viewingDistanceInChunks.y][(int)Configuration.viewingDistanceInChunks.z];
  updateThread=new Thread(new Runnable(){
    @Override public void run(){
      long timeStart=System.currentTimeMillis();
      Logger.getLogger(this.getClass().getName()).log(Level.INFO,"String_Node_Str");
      for (int x=0; x < Configuration.viewingDistanceInChunks.x; x++) {
        for (int y=0; y < Configuration.viewingDistanceInChunks.y; y++) {
          for (int z=0; z < Configuration.viewingDistanceInChunks.z; z++) {
            Chunk c=new Chunk(currentWorld,new Vector3f(x,y,z));
            chunks[x][y][z]=c;
            c.generate();
            c.populate();
            c.calcSunlight();
            queueChunkForUpdate(c);
          }
        }
      }
      setWorldGenerated(true);
      player.resetPlayer();
      Logger.getLogger(this.getClass().getName()).log(Level.INFO,"String_Node_Str",(System.currentTimeMillis() - timeStart) / 1000d);
      while (true) {
        Chunk c=null;
synchronized (chunkUpdateQueueDL) {
          c=chunkUpdateQueue.peek();
          if (chunkUpdateQueueDL.contains(c)) {
            c=null;
          }
 else {
            chunkUpdateQueue.poll();
          }
        }
        if (c != null) {
          c.calcLight();
          c.generateVertexArray();
synchronized (chunkUpdateQueueDL) {
            chunkUpdateQueueDL.add(c);
          }
        }
      }
    }
  }
);
  worldThread=new Thread(new Runnable(){
    @Override public void run(){
      while (true) {
        updateInfWorld();
        if (Helper.getInstance().getTime() - daylightTimer > 120000) {
          daylight-=0.2;
          if (daylight <= 0.4f) {
            daylight=1.0f;
          }
          daylightTimer=Helper.getInstance().getTime();
          updateAllChunks();
        }
      }
    }
  }
);
}