Program: 109178
Project: 109178
Buggy source:
static protected void parseOBJ(PApplet parent,BufferedReader reader,ArrayList<OBJFace> faces,ArrayList<OBJMaterial> materials,ArrayList<PVector> coords,ArrayList<PVector> normals,ArrayList<PVector> texcoords){
  Hashtable<String,Integer> mtlTable=new Hashtable<String,Integer>();
  int mtlIdxCur=-1;
  boolean readv, readvn, readvt;
  try {
    readv=readvn=readvt=false;
    String line;
    String gname="String_Node_Str";
    while ((line=reader.readLine()) != null) {
      while (line.contains("String_Node_Str")) {
        line=line.split("String_Node_Str")[0];
        final String s=reader.readLine();
        if (s != null)         line+=s;
      }
      String[] parts=line.split("String_Node_Str");
      if (parts.length > 0) {
        if (parts[0].equals("String_Node_Str")) {
          PVector tempv=new PVector(Float.valueOf(parts[1]).floatValue(),Float.valueOf(parts[2]).floatValue(),Float.valueOf(parts[3]).floatValue());
          coords.add(tempv);
          readv=true;
        }
 else         if (parts[0].equals("String_Node_Str")) {
          PVector tempn=new PVector(Float.valueOf(parts[1]).floatValue(),Float.valueOf(parts[2]).floatValue(),Float.valueOf(parts[3]).floatValue());
          normals.add(tempn);
          readvn=true;
        }
 else         if (parts[0].equals("String_Node_Str")) {
          PVector tempv=new PVector(Float.valueOf(parts[1]).floatValue(),1 - Float.valueOf(parts[2]).floatValue());
          texcoords.add(tempv);
          readvt=true;
        }
 else         if (parts[0].equals("String_Node_Str")) {
        }
 else         if (parts[0].equals("String_Node_Str")) {
          if (parts[1] != null) {
            BufferedReader mreader=parent.createReader(parts[1]);
            if (mreader != null) {
              parseMTL(parent,mreader,materials,mtlTable);
            }
          }
        }
 else         if (parts[0].equals("String_Node_Str")) {
          gname=1 < parts.length ? parts[1] : "String_Node_Str";
        }
 else         if (parts[0].equals("String_Node_Str")) {
          if (parts[1] != null) {
            String mtlname=parts[1];
            if (mtlTable.containsKey(mtlname)) {
              Integer tempInt=mtlTable.get(mtlname);
              mtlIdxCur=tempInt.intValue();
            }
 else {
              mtlIdxCur=-1;
            }
          }
        }
 else         if (parts[0].equals("String_Node_Str")) {
          OBJFace face=new OBJFace();
          face.matIdx=mtlIdxCur;
          face.name=gname;
          for (int i=1; i < parts.length; i++) {
            String seg=parts[i];
            if (seg.indexOf("String_Node_Str") > 0) {
              String[] forder=seg.split("String_Node_Str");
              if (forder.length > 2) {
                if (forder[0].length() > 0 && readv) {
                  face.vertIdx.add(Integer.valueOf(forder[0]));
                }
                if (forder[1].length() > 0 && readvt) {
                  face.texIdx.add(Integer.valueOf(forder[1]));
                }
                if (forder[2].length() > 0 && readvn) {
                  face.normIdx.add(Integer.valueOf(forder[2]));
                }
              }
 else               if (forder.length > 1) {
                if (forder[0].length() > 0 && readv) {
                  face.vertIdx.add(Integer.valueOf(forder[0]));
                }
                if (forder[1].length() > 0) {
                  if (readvt) {
                    face.texIdx.add(Integer.valueOf(forder[1]));
                  }
 else                   if (readvn) {
                    face.normIdx.add(Integer.valueOf(forder[1]));
                  }
                }
              }
 else               if (forder.length > 0) {
                if (forder[0].length() > 0 && readv) {
                  face.vertIdx.add(Integer.valueOf(forder[0]));
                }
              }
            }
 else {
              if (seg.length() > 0 && readv) {
                face.vertIdx.add(Integer.valueOf(seg));
              }
            }
          }
          faces.add(face);
        }
      }
    }
    if (materials.size() == 0) {
      OBJMaterial defMtl=new OBJMaterial();
      materials.add(defMtl);
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
static protected void parseOBJ(PApplet parent,BufferedReader reader,ArrayList<OBJFace> faces,ArrayList<OBJMaterial> materials,ArrayList<PVector> coords,ArrayList<PVector> normals,ArrayList<PVector> texcoords){
  Hashtable<String,Integer> mtlTable=new Hashtable<String,Integer>();
  int mtlIdxCur=-1;
  boolean readv, readvn, readvt;
  try {
    readv=readvn=readvt=false;
    String line;
    String gname="String_Node_Str";
    while ((line=reader.readLine()) != null) {
      line=line.trim();
      if (line.equals("String_Node_Str") || line.indexOf('#') == 0) {
        continue;
      }
      while (line.contains("String_Node_Str")) {
        line=line.split("String_Node_Str")[0];
        final String s=reader.readLine();
        if (s != null)         line+=s;
      }
      String[] parts=line.split("String_Node_Str");
      if (parts.length > 0) {
        if (parts[0].equals("String_Node_Str")) {
          PVector tempv=new PVector(Float.valueOf(parts[1]).floatValue(),Float.valueOf(parts[2]).floatValue(),Float.valueOf(parts[3]).floatValue());
          coords.add(tempv);
          readv=true;
        }
 else         if (parts[0].equals("String_Node_Str")) {
          PVector tempn=new PVector(Float.valueOf(parts[1]).floatValue(),Float.valueOf(parts[2]).floatValue(),Float.valueOf(parts[3]).floatValue());
          normals.add(tempn);
          readvn=true;
        }
 else         if (parts[0].equals("String_Node_Str")) {
          PVector tempv=new PVector(Float.valueOf(parts[1]).floatValue(),1 - Float.valueOf(parts[2]).floatValue());
          texcoords.add(tempv);
          readvt=true;
        }
 else         if (parts[0].equals("String_Node_Str")) {
        }
 else         if (parts[0].equals("String_Node_Str")) {
          if (parts[1] != null) {
            BufferedReader mreader=parent.createReader(parts[1]);
            if (mreader != null) {
              parseMTL(parent,mreader,materials,mtlTable);
            }
          }
        }
 else         if (parts[0].equals("String_Node_Str")) {
          gname=1 < parts.length ? parts[1] : "String_Node_Str";
        }
 else         if (parts[0].equals("String_Node_Str")) {
          if (parts[1] != null) {
            String mtlname=parts[1];
            if (mtlTable.containsKey(mtlname)) {
              Integer tempInt=mtlTable.get(mtlname);
              mtlIdxCur=tempInt.intValue();
            }
 else {
              mtlIdxCur=-1;
            }
          }
        }
 else         if (parts[0].equals("String_Node_Str")) {
          OBJFace face=new OBJFace();
          face.matIdx=mtlIdxCur;
          face.name=gname;
          for (int i=1; i < parts.length; i++) {
            String seg=parts[i];
            if (seg.indexOf("String_Node_Str") > 0) {
              String[] forder=seg.split("String_Node_Str");
              if (forder.length > 2) {
                if (forder[0].length() > 0 && readv) {
                  face.vertIdx.add(Integer.valueOf(forder[0]));
                }
                if (forder[1].length() > 0 && readvt) {
                  face.texIdx.add(Integer.valueOf(forder[1]));
                }
                if (forder[2].length() > 0 && readvn) {
                  face.normIdx.add(Integer.valueOf(forder[2]));
                }
              }
 else               if (forder.length > 1) {
                if (forder[0].length() > 0 && readv) {
                  face.vertIdx.add(Integer.valueOf(forder[0]));
                }
                if (forder[1].length() > 0) {
                  if (readvt) {
                    face.texIdx.add(Integer.valueOf(forder[1]));
                  }
 else                   if (readvn) {
                    face.normIdx.add(Integer.valueOf(forder[1]));
                  }
                }
              }
 else               if (forder.length > 0) {
                if (forder[0].length() > 0 && readv) {
                  face.vertIdx.add(Integer.valueOf(forder[0]));
                }
              }
            }
 else {
              if (seg.length() > 0 && readv) {
                face.vertIdx.add(Integer.valueOf(seg));
              }
            }
          }
          faces.add(face);
        }
      }
    }
    if (materials.size() == 0) {
      OBJMaterial defMtl=new OBJMaterial();
      materials.add(defMtl);
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}