Program: 43039
Project: 43039
Buggy source:
public void processFile(String fpath,double maxDecimationError,double reduceFactor) throws Exception {
  long t0=currentTimeMillis();
  WingedEdgeTriangleMesh mesh=loadMesh(fpath);
  printf("String_Node_Str",(currentTimeMillis() - t0));
  t0=currentTimeMillis();
  int orig_fcount=mesh.getFaceCount();
  int fcount=orig_fcount;
  System.out.println("String_Node_Str" + fcount);
  MeshExporter.writeMeshSTL(mesh,fmt("String_Node_Str",fcount));
  printf("String_Node_Str",fcount,mesh.getVertexCount(),mesh.getEdgeCount());
  printf("String_Node_Str",mesh.getFaceCount(),mesh.getVertexCount(),mesh.getEdgeCount());
  assertTrue("String_Node_Str",TestWingedEdgeTriangleMesh.isManifold(mesh));
  MeshDecimator md=new MeshDecimator();
  md.setMaxCollapseError(maxDecimationError);
  int target;
  int current;
  while (true) {
    target=mesh.getTriangleCount() / 2;
    System.out.println("String_Node_Str" + target);
    t0=currentTimeMillis();
    printf("String_Node_Str");
    md.processMesh(mesh,target);
    printf("String_Node_Str",(currentTimeMillis() - t0));
    fcount=mesh.getFaceCount();
    current=mesh.getFaceCount();
    System.out.println("String_Node_Str" + current);
    if (current >= target * 1.25) {
      System.out.println("String_Node_Str");
      break;
    }
  }
  MeshExporter.writeMeshSTL(mesh,fmt("String_Node_Str",fcount));
  assertTrue("String_Node_Str",mesh.getFaceCount() < reduceFactor * orig_fcount);
}

Fixed version (ground truth):
public void processFile(String fpath,double maxDecimationError,double reduceFactor) throws Exception {
  long t0=currentTimeMillis();
  WingedEdgeTriangleMesh mesh=loadMesh(fpath);
  printf("String_Node_Str",(currentTimeMillis() - t0));
  t0=currentTimeMillis();
  int orig_fcount=mesh.getFaceCount();
  int fcount=orig_fcount;
  System.out.println("String_Node_Str" + fcount);
  MeshExporter.writeMeshSTL(mesh,fmt("String_Node_Str",fcount));
  printf("String_Node_Str",fcount,mesh.getVertexCount(),mesh.getEdgeCount());
  printf("String_Node_Str",mesh.getFaceCount(),mesh.getVertexCount(),mesh.getEdgeCount());
  assertTrue("String_Node_Str",TestWingedEdgeTriangleMesh.isManifold(mesh));
  MeshDecimator md=new MeshDecimator();
  md.setMaxCollapseError(maxDecimationError);
  int target;
  int current;
  while (true) {
    target=mesh.getTriangleCount() / 2;
    System.out.println("String_Node_Str" + target);
    t0=currentTimeMillis();
    printf("String_Node_Str");
    md.processMesh(mesh,target);
    printf("String_Node_Str",(currentTimeMillis() - t0));
    fcount=mesh.getFaceCount();
    assertTrue("String_Node_Str",verifyVertices(mesh));
    assertTrue("String_Node_Str",TestWingedEdgeTriangleMesh.verifyStructure(mesh,true));
    assertTrue("String_Node_Str",TestWingedEdgeTriangleMesh.isManifold(mesh));
    printf("String_Node_Str",(currentTimeMillis() - t0));
    current=mesh.getFaceCount();
    System.out.println("String_Node_Str" + current);
    if (current >= target * 1.25) {
      System.out.println("String_Node_Str");
      break;
    }
  }
  MeshExporter.writeMeshSTL(mesh,fmt("String_Node_Str",fcount));
  assertTrue("String_Node_Str",mesh.getFaceCount() < reduceFactor * orig_fcount);
}