Program: 175841
Project: 175841
Buggy source:
protected void textureGrid(DRectangle allGeom,DRectangle allUV,Matrix4d to3d,MiniFacade mf){
  if (mf != null && mf.texture != null) {
    Grid g=new Grid(.10,allGeom.x,allGeom.getMaxX(),allGeom.y,allGeom.getMaxY());
    MatMeshBuilder mmb=mbs.get("String_Node_Str" + mf.texture,mf.texture);
    for (    FRect w : mf.featureGen.getRects(Feature.WINDOW,Feature.SHOP)) {
      if (allGeom.contains(w))       g.insert(w,new Griddable(){
        @Override public void instance(        DRectangle rect){
          if (w.texture == null)           createInnie(rect,allUV.normalize(rect),to3d,mmb,0.2f);
 else {
            DRectangle r=new DRectangle(ZERO_ONE_UVS);
            double c=(w.height - w.width) / w.height;
            r.x+=c / 2;
            r.width=w.width / w.height;
            createInnie(rect,r,to3d,mbs.get("String_Node_Str" + w.texture,w.texture),0.2f);
          }
        }
      }
);
    }
    for (    FRect w : mf.featureGen.get(Feature.DOOR)) {
      if (allGeom.contains(w))       g.insert(w,new Griddable(){
        @Override public void instance(        DRectangle rect){
          if (w.texture == null)           createInnie(rect,allUV.normalize(rect),to3d,mmb,0.5f);
 else {
            DRectangle r=new DRectangle(ZERO_ONE_UVS);
            double c=(w.height - w.width) / w.height;
            r.x+=c / 2;
            r.width=w.width / w.height;
            createInnie(rect,r,to3d,mbs.get("String_Node_Str" + w.texture,w.texture),0.5f);
          }
        }
      }
);
    }
    for (    FRect w : mf.featureGen.getRects(Feature.MOULDING,Feature.CORNICE,Feature.SILL)) {
      if (allGeom.contains(w))       g.insert(w,new Griddable(){
        @Override public void instance(        DRectangle rect){
          createInnie(rect,allUV.normalize(rect),to3d,mmb,-0.2f);
        }
      }
);
    }
    for (    DRectangle b : mf.featureGen.get(Feature.BALCONY)) {
      if (allGeom.contains(b))       g.insert(b,new Griddable(){
        @Override public void instance(        DRectangle rect){
          createBalcony(rect,to3d,mbs.BALCONY,0.3);
        }
        @Override public boolean noneBehind(){
          return true;
        }
      }
);
    }
    g.instance(new Griddable(){
      @Override public void instance(      DRectangle rect){
        mmb.add(rect,allUV.normalize(rect),to3d);
      }
    }
);
  }
}

Fixed version (ground truth):
protected void textureGrid(DRectangle allGeom,DRectangle allUV,Matrix4d to3d,MiniFacade mf){
  if (mf != null && mf.texture != null) {
    Grid g=new Grid(.10,allGeom.x,allGeom.getMaxX(),allGeom.y,allGeom.getMaxY());
    MatMeshBuilder mmb=mbs.get("String_Node_Str" + mf.texture,mf.texture);
    for (    FRect w : mf.featureGen.getRects(Feature.WINDOW,Feature.SHOP)) {
      if (allGeom.contains(w))       g.insert(w,new Griddable(){
        @Override public void instance(        DRectangle rect){
          if (w.texture == null)           createInnie(rect,allUV.normalize(rect),to3d,mmb,0.2f);
 else           createInnie(rect,normalizeForInset(w),to3d,mbs.get("String_Node_Str" + w.texture,w.texture),0.2f);
        }
      }
);
    }
    for (    FRect w : mf.featureGen.get(Feature.DOOR)) {
      if (allGeom.contains(w))       g.insert(w,new Griddable(){
        @Override public void instance(        DRectangle rect){
          if (w.texture == null)           createInnie(rect,allUV.normalize(rect),to3d,mmb,0.5f);
 else           createInnie(rect,normalizeForInset(w),to3d,mbs.get("String_Node_Str" + w.texture,w.texture),0.5f);
        }
      }
);
    }
    for (    FRect w : mf.featureGen.getRects(Feature.MOULDING,Feature.CORNICE,Feature.SILL)) {
      if (allGeom.contains(w))       g.insert(w,new Griddable(){
        @Override public void instance(        DRectangle rect){
          createInnie(rect,allUV.normalize(rect),to3d,mmb,-0.2f);
        }
      }
);
    }
    for (    DRectangle b : mf.featureGen.get(Feature.BALCONY)) {
      if (allGeom.contains(b))       g.insert(b,new Griddable(){
        @Override public void instance(        DRectangle rect){
          createBalcony(rect,to3d,mbs.BALCONY,0.3);
        }
        @Override public boolean noneBehind(){
          return true;
        }
      }
);
    }
    g.instance(new Griddable(){
      @Override public void instance(      DRectangle rect){
        mmb.add(rect,allUV.normalize(rect),to3d);
      }
    }
);
  }
}