Program: 180071
Project: 180071
Buggy source:
@Override public synchronized void run(){
  boolean running=true;
  int savedelay=0;
  while (running) {
    if (newgravellist.size() == 0) {
      if (debug) {
        System.out.println("String_Node_Str");
      }
      if (savefarm) {
        saveBlocks();
        savedelay=0;
      }
      try {
        wait();
      }
 catch (      InterruptedException e) {
      }
    }
    try {
      wait(10000);
    }
 catch (    InterruptedException e) {
    }
    Iterator<Entry<String,ClayDelay>> listing=newgravellist.entrySet().iterator();
    while (listing.hasNext()) {
      ClayDelay blockupdate=(ClayDelay)listing.next().getValue();
      boolean isloaded=blockupdate.getBlock().getWorld().isChunkLoaded(blockupdate.getBlock().getChunk());
      if (isloaded || loadchunks) {
        if (!isloaded) {
          if (debug) {
            System.out.println("String_Node_Str");
          }
          blockupdate.getBlock().getWorld().loadChunk(blockupdate.getBlock().getChunk());
        }
        if (blockupdate.getBlock().getTypeId() == GRAVEL && (mcmmomode || blockupdate.getBlock().getRelative(BlockFace.DOWN).getTypeId() == activateblock)) {
          boolean alreadyupdated=false;
          if (waterenabled && lavaenabled) {
            if (hasBlockNextTo(blockupdate.getBlock(),FLOWINGWATER,WATER,FLOWINGLAVA,LAVA)) {
              blockupdate.upDelay(generator.nextInt(2));
              if (debug) {
                System.out.println("String_Node_Str" + blockupdate.getDelay());
              }
              alreadyupdated=true;
            }
          }
 else           if (waterenabled) {
            if (hasBlockNextTo(blockupdate.getBlock(),FLOWINGWATER,WATER)) {
              blockupdate.upDelay(generator.nextInt(2));
              if (debug) {
                System.out.println("String_Node_Str" + blockupdate.getDelay());
              }
              alreadyupdated=true;
            }
          }
 else           if (lavaenabled) {
            if (hasBlockNextTo(blockupdate.getBlock(),FLOWINGLAVA,LAVA)) {
              blockupdate.upDelay(generator.nextInt(2));
              if (debug) {
                System.out.println("String_Node_Str" + blockupdate.getDelay());
              }
              alreadyupdated=true;
            }
          }
          if (alreadyupdated == false) {
            if (debug) {
              System.out.println("String_Node_Str");
            }
            listing.remove();
          }
 else           if (blockupdate.getDelay() >= farmdelay || (blockupdate.getInTime() + (10000 * maxfarmdelay)) <= System.currentTimeMillis()) {
            listing.remove();
            int rand=generator.nextInt(10000);
            if (graveltoclaychance == 100.0) {
              doneblocks.add(blockupdate.getBlock());
              if (customdrops) {
                blockupdate.resetTimeIn();
                clayblocks.put(compileBlockString(blockupdate.getBlock()),blockupdate);
                saveClayBlocks();
              }
            }
 else             if (rand >= (10000.0 - (graveltoclaychance * 100.0))) {
              doneblocks.add(blockupdate.getBlock());
              if (customdrops) {
                blockupdate.resetTimeIn();
                clayblocks.put(compileBlockString(blockupdate.getBlock()),blockupdate);
                saveClayBlocks();
              }
            }
            if (debug) {
              System.out.println("String_Node_Str" + newgravellist.size() + "String_Node_Str");
            }
          }
        }
 else {
          listing.remove();
          if (debug) {
            System.out.println("String_Node_Str" + newgravellist.size() + "String_Node_Str");
          }
        }
      }
 else       if (loadchunks) {
        blockupdate.getBlock().getWorld().loadChunk(blockupdate.getBlock().getChunk());
      }
    }
    savedelay++;
    if (savefarm && savedelay >= 10) {
      saveBlocks();
      savedelay=0;
    }
  }
}

Fixed version (ground truth):
@Override public synchronized void run(){
  boolean running=true;
  int savedelay=0;
  while (running) {
    if (newgravellist.size() == 0) {
      if (debug) {
        System.out.println("String_Node_Str");
      }
      if (savefarm) {
        saveBlocks();
        savedelay=0;
      }
      try {
        wait();
      }
 catch (      InterruptedException e) {
      }
    }
    try {
      wait(10000);
    }
 catch (    InterruptedException e) {
    }
    Iterator<Entry<String,ClayDelay>> listing=newgravellist.entrySet().iterator();
    if (debug) {
      System.out.println("String_Node_Str" + newgravellist.size() + "String_Node_Str");
    }
    while (listing.hasNext()) {
      ClayDelay blockupdate=(ClayDelay)listing.next().getValue();
      boolean isloaded=blockupdate.getBlock().getWorld().isChunkLoaded(blockupdate.getBlock().getChunk());
      if (isloaded) {
        if (blockupdate.getBlock().getTypeId() == GRAVEL && (mcmmomode || blockupdate.getBlock().getRelative(BlockFace.DOWN).getTypeId() == activateblock)) {
          boolean alreadyupdated=false;
          if (waterenabled && lavaenabled) {
            if (hasBlockNextTo(blockupdate.getBlock(),FLOWINGWATER,WATER,FLOWINGLAVA,LAVA)) {
              blockupdate.upDelay(generator.nextInt(2));
              if (debug) {
                System.out.println("String_Node_Str" + blockupdate.getDelay());
              }
              alreadyupdated=true;
            }
          }
 else           if (waterenabled) {
            if (hasBlockNextTo(blockupdate.getBlock(),FLOWINGWATER,WATER)) {
              blockupdate.upDelay(generator.nextInt(2));
              if (debug) {
                System.out.println("String_Node_Str" + blockupdate.getDelay());
              }
              alreadyupdated=true;
            }
          }
 else           if (lavaenabled) {
            if (hasBlockNextTo(blockupdate.getBlock(),FLOWINGLAVA,LAVA)) {
              blockupdate.upDelay(generator.nextInt(2));
              if (debug) {
                System.out.println("String_Node_Str" + blockupdate.getDelay());
              }
              alreadyupdated=true;
            }
          }
          if (alreadyupdated == false) {
            if (debug) {
              System.out.println("String_Node_Str");
            }
            if (loadchunks) {
              removeBlockFromChunk(blockupdate.getBlock());
            }
            listing.remove();
          }
 else           if (blockupdate.getDelay() >= farmdelay || (blockupdate.getInTime() + (10000 * maxfarmdelay)) <= System.currentTimeMillis()) {
            if (loadchunks) {
              removeBlockFromChunk(blockupdate.getBlock());
            }
            listing.remove();
            int rand=generator.nextInt(10000);
            if (graveltoclaychance == 100.0) {
              doneblocks.add(blockupdate.getBlock());
              if (customdrops) {
                blockupdate.resetTimeIn();
                clayblocks.put(compileBlockString(blockupdate.getBlock()),blockupdate);
                saveClayBlocks();
              }
            }
 else             if (rand >= (10000.0 - (graveltoclaychance * 100.0))) {
              doneblocks.add(blockupdate.getBlock());
              if (customdrops) {
                blockupdate.resetTimeIn();
                clayblocks.put(compileBlockString(blockupdate.getBlock()),blockupdate);
                saveClayBlocks();
              }
            }
            if (debug) {
              System.out.println("String_Node_Str" + newgravellist.size() + "String_Node_Str");
            }
          }
        }
 else {
          if (loadchunks) {
            removeBlockFromChunk(blockupdate.getBlock());
          }
          listing.remove();
          if (debug) {
            System.out.println("String_Node_Str" + newgravellist.size() + "String_Node_Str");
          }
        }
      }
 else       if (loadchunks) {
        blockupdate.getBlock().getWorld().loadChunk(blockupdate.getBlock().getChunk());
      }
    }
    savedelay++;
    if (savefarm && savedelay >= 10) {
      saveBlocks();
      savedelay=0;
    }
  }
}