Program: 35746
Project: 35746
Buggy source:
private boolean route(BlockBuffer buffer,Net net,Net.Terminal source,Net.Terminal dest,boolean reverse){
  if (source.x == dest.x && source.y == dest.y && source.z == dest.z) {
    return true;
  }
  HashMap<Long,Node> explored=new HashMap<Long,Node>();
  PriorityQueue<Node> queue=new PriorityQueue<Node>();
  queue.add(new Node(0,new Net.Wire(source.x,source.y,source.z,false,0),null));
  int count=0;
  while (!queue.isEmpty()) {
    Node node=queue.remove();
    if (isDest(node.wire.x,node.wire.y,node.wire.z,buffer,net,dest)) {
      commitRoute(buffer,net,node,true);
      return true;
    }
    boolean needRepeater=false;
    for (int i=0; i < 12; i++) {
      int x=node.wire.x;
      int y=node.wire.y;
      int z=node.wire.z;
switch (i) {
case 0:
        x++;
      break;
case 1:
    x--;
  break;
case 2:
z++;
break;
case 3:
z--;
break;
case 4:
if (needRepeater) {
break;
}
x++;
y++;
break;
case 5:
x--;
y++;
break;
case 6:
z++;
y++;
break;
case 7:
z--;
y++;
break;
case 8:
x++;
y--;
break;
case 9:
x--;
y--;
break;
case 10:
z++;
y--;
break;
case 11:
z--;
y--;
break;
}
boolean good;
if (isDest(x,y,z,buffer,net,dest)) {
if (y != node.wire.y) {
break;
}
 else {
good=true;
}
}
 else {
good=canPlaceWire(buffer,net,node,dest,x,y,z);
}
if (good) {
int g;
if (i >= 4) {
g=1;
}
 else {
g=1;
}
if (count == debugCutoff) {
buffer.setBlock(x,y,z,Blocks.dirt,0);
}
long hash=getCoordinateHash(buffer,x,y,z);
Node child=explored.get(hash);
if (child != null) {
if (child.cost > node.cost + g) {
queue.remove(child);
child.cost=node.cost + g;
queue.add(child);
}
}
 else {
child=new Node(node.cost + g,new Wire(x,y,z,false,0),node);
queue.add(child);
explored.put(hash,child);
}
}
}
count++;
if (count > debugCutoff) {
log2("String_Node_Str" + node.cost);
commitRoute(buffer,net,node,false);
return true;
}
if (queue.size() > 2000000) {
log2("String_Node_Str");
return false;
}
}
log2("String_Node_Str" + count + "String_Node_Str");
return false;
}

Fixed version (ground truth):
private boolean route(BlockBuffer buffer,Net net,Net.Terminal source,Net.Terminal dest,boolean reverse){
  if (source.x == dest.x && source.y == dest.y && source.z == dest.z) {
    return true;
  }
  HashMap<Long,Node> explored=new HashMap<Long,Node>();
  PriorityQueue<Node> queue=new PriorityQueue<Node>();
  queue.add(new Node(0,new Net.Wire(source.x,source.y,source.z,false,0),null));
  int count=0;
  while (!queue.isEmpty()) {
    Node node=queue.remove();
    if (isDest(node.wire.x,node.wire.y,node.wire.z,buffer,net,dest)) {
      commitRoute(buffer,net,node,true);
      return true;
    }
    boolean nextIsRepeater=node.lengthSinceLastRepeater > 10;
    int min=0;
    int max;
    if (count == 0 || nextIsRepeater) {
      max=4;
    }
 else     if (node.parent != null && node.wire.isRepeater) {
      if (node.parent.wire.x < node.wire.x) {
        min=0;
      }
 else       if (node.parent.wire.x > node.wire.x) {
        min=1;
      }
 else       if (node.parent.wire.z < node.wire.z) {
        min=2;
      }
 else       if (node.parent.wire.z > node.wire.z) {
        min=3;
      }
      max=min + 1;
    }
 else {
      max=12;
    }
    for (int i=min; i < max; i++) {
      int x=node.wire.x;
      int y=node.wire.y;
      int z=node.wire.z;
switch (i) {
case 0:
        x++;
      break;
case 1:
    x--;
  break;
case 2:
z++;
break;
case 3:
z--;
break;
case 4:
x++;
y++;
break;
case 5:
x--;
y++;
break;
case 6:
z++;
y++;
break;
case 7:
z--;
y++;
break;
case 8:
x++;
y--;
break;
case 9:
x--;
y--;
break;
case 10:
z++;
y--;
break;
case 11:
z--;
y--;
break;
}
boolean good;
if (isDest(x,y,z,buffer,net,dest)) {
if (y != node.wire.y) {
break;
}
 else {
good=true;
}
}
 else {
good=canPlaceWire(buffer,net,node,dest,x,y,z);
}
if (good) {
double g;
if (y > node.wire.y) {
g=2;
}
 else if (y < node.wire.y) {
g=1.5;
}
 else {
g=1;
}
if (count == debugCutoff) {
buffer.setBlock(x,y,z,Blocks.dirt,0);
}
long hash=getCoordinateHash(buffer,x,y,z);
Node child=explored.get(hash);
if (child != null) {
if (child.cost > node.cost + g) {
queue.remove(child);
child.cost=node.cost + g;
queue.add(child);
}
}
 else {
child=new Node(node.cost + g,new Wire(x,y,z,nextIsRepeater,0),node);
queue.add(child);
explored.put(hash,child);
}
}
}
count++;
if (count > debugCutoff) {
log2("String_Node_Str" + node.cost);
commitRoute(buffer,net,node,false);
return true;
}
if (queue.size() > 2000000) {
log2("String_Node_Str");
return false;
}
}
log2("String_Node_Str" + count + "String_Node_Str");
return false;
}