Program: 945
Project: 945
Buggy source:
@Override public void createOrLoadChunk(Vector3i chunkPos){
  ChunkImpl chunk=nearCache.get(chunkPos);
  if (chunk == null) {
    PerformanceMonitor.startActivity("String_Node_Str");
    if (preparingChunks.add(chunkPos)) {
      if (nearCache.get(chunkPos) != null) {
        preparingChunks.remove(chunkPos);
      }
 else       if (storageManager.containsChunkStoreFor(chunkPos)) {
        pipeline.doTask(new AbstractChunkTask(pipeline,chunkPos,this){
          @Override public String getName(){
            return "String_Node_Str";
          }
          @Override public void run(){
            ChunkStore chunkStore=storageManager.loadChunkStore(getPosition());
            ChunkImpl chunk=chunkStore.getChunk();
            try {
              chunk.lock();
              if (nearCache.putIfAbsent(getPosition(),chunkStore.getChunk()) != null) {
                logger.warn("String_Node_Str",getPosition());
              }
              preparingChunks.remove(getPosition());
              if (chunk.getChunkState() == ChunkImpl.State.INTERNAL_LIGHT_GENERATION_PENDING) {
                InternalLightProcessor.generateInternalLighting(chunk);
                chunk.deflate();
                chunk.setChunkState(ChunkImpl.State.COMPLETE);
                readyChunks.offer(new ReadyChunkInfo(chunk.getPos(),createBatchBlockEventMappings(chunk),chunkStore));
              }
 else {
                pipeline.requestReview(Region3i.createFromCenterExtents(getPosition(),ChunkConstants.SECOND_PASS_EXTENTS));
              }
            }
  finally {
              chunk.unlock();
            }
          }
        }
);
      }
 else {
        pipeline.doTask(new AbstractChunkTask(pipeline,chunkPos,this){
          @Override public String getName(){
            return "String_Node_Str";
          }
          @Override public void run(){
            ChunkImpl chunk=new ChunkImpl(getPosition());
            generator.createChunk(chunk);
            if (nearCache.putIfAbsent(getPosition(),chunk) != null) {
              logger.warn("String_Node_Str",getPosition());
            }
            preparingChunks.remove(getPosition());
            pipeline.requestReview(Region3i.createFromCenterExtents(getPosition(),ChunkConstants.SECOND_PASS_EXTENTS));
          }
        }
);
      }
    }
    PerformanceMonitor.endActivity();
  }
}

Fixed version (ground truth):
@Override public void createOrLoadChunk(Vector3i chunkPos){
  ChunkImpl chunk=nearCache.get(chunkPos);
  if (chunk == null) {
    PerformanceMonitor.startActivity("String_Node_Str");
    if (preparingChunks.add(chunkPos)) {
      if (nearCache.get(chunkPos) != null) {
        preparingChunks.remove(chunkPos);
      }
 else       if (storageManager.containsChunkStoreFor(chunkPos)) {
        pipeline.doTask(new AbstractChunkTask(pipeline,chunkPos,this){
          @Override public String getName(){
            return "String_Node_Str";
          }
          @Override public void run(){
            ChunkStore chunkStore=storageManager.loadChunkStore(getPosition());
            ChunkImpl chunk=chunkStore.getChunk();
            try {
              chunk.lock();
              if (nearCache.putIfAbsent(getPosition(),chunkStore.getChunk()) != null) {
                logger.warn("String_Node_Str",getPosition());
              }
              preparingChunks.remove(getPosition());
              if (chunk.getChunkState() == ChunkImpl.State.INTERNAL_LIGHT_GENERATION_PENDING) {
                InternalLightProcessor.generateInternalLighting(chunk);
                chunk.deflate();
                chunk.setChunkState(ChunkImpl.State.COMPLETE);
                readyChunks.offer(new ReadyChunkInfo(chunk.getPos(),createBatchBlockEventMappings(chunk),chunkStore));
              }
 else {
                pipeline.requestReview(Region3i.createFromCenterExtents(getPosition(),ChunkConstants.GENERATION_EXTENTS));
              }
            }
  finally {
              chunk.unlock();
            }
          }
        }
);
      }
 else {
        pipeline.doTask(new AbstractChunkTask(pipeline,chunkPos,this){
          @Override public String getName(){
            return "String_Node_Str";
          }
          @Override public void run(){
            ChunkImpl chunk=new ChunkImpl(getPosition());
            generator.createChunk(chunk);
            if (nearCache.putIfAbsent(getPosition(),chunk) != null) {
              logger.warn("String_Node_Str",getPosition());
            }
            preparingChunks.remove(getPosition());
            pipeline.requestReview(Region3i.createFromCenterExtents(getPosition(),ChunkConstants.GENERATION_EXTENTS));
          }
        }
);
      }
    }
    PerformanceMonitor.endActivity();
  }
}