Program: 70869
Project: 70869
Buggy source:
void testMLCP(MLCP mlcp){
  KKTSolver solver=new KKTSolver();
  if (mlcp.M == null) {
    throw new TestException("String_Node_Str");
  }
  int Mtype=Matrix.INDEFINITE;
  if (mlcp.M.isSymmetric(0)) {
    Mtype=Matrix.SYMMETRIC;
  }
  int sizeM=mlcp.M.rowSize();
  VectorNd vel=new VectorNd(sizeM);
  int sizeG=mlcp.GT != null ? mlcp.GT.colSize() : 0;
  VectorNd Rg=mlcp.Rg != null ? mlcp.Rg : new VectorNd(sizeG);
  VectorNd bg=mlcp.bg != null ? mlcp.bg : new VectorNd(sizeG);
  VectorNd lam=new VectorNd(sizeG);
  int sizeN=mlcp.NT != null ? mlcp.NT.colSize() : 0;
  VectorNd Rn=mlcp.Rn != null ? mlcp.Rn : new VectorNd(sizeN);
  VectorNd bn=mlcp.bn != null ? mlcp.bn : new VectorNd(sizeN);
  VectorNd the=new VectorNd(sizeN);
  int sizeD=mlcp.DT != null ? mlcp.DT.colSize() : 0;
  VectorNd bd=mlcp.bd != null ? mlcp.bd : new VectorNd(sizeD);
  VectorNd phi=new VectorNd(sizeD);
  Status status;
  solver.analyze(mlcp.M,sizeM,mlcp.GT,Mtype);
  if (sizeN == 0) {
    solver.factor(mlcp.M,sizeM,mlcp.GT,Rg);
    status=solver.solve(vel,lam,mlcp.bf,bg);
  }
 else   if (sizeD == 0) {
    solver.factor(mlcp.M,sizeM,mlcp.GT,Rg,mlcp.NT,Rn);
    status=solver.solve(vel,lam,the,mlcp.bf,bg,bn);
  }
 else {
    solver.factor(mlcp.M,sizeM,mlcp.GT,Rg,mlcp.NT,Rn,mlcp.DT);
    status=solver.solve(vel,lam,the,phi,mlcp.bf,bg,bn,bd,mlcp.flim);
  }
  if (status != Status.SOLVED) {
    throw new TestException("String_Node_Str" + status);
  }
  if (mlcp.vel != null) {
    checkResult("String_Node_Str",vel,mlcp.vel);
  }
  if (sizeG != 0 && mlcp.lam != null) {
    checkResult("String_Node_Str",lam,mlcp.lam);
  }
  if (sizeN != 0 && mlcp.the != null) {
    checkResult("String_Node_Str",the,mlcp.the);
  }
  if (sizeD != 0 && mlcp.phi != null) {
    checkResult("String_Node_Str",phi,mlcp.phi);
  }
  checkComplementarity(mlcp.GT,mlcp.NT,mlcp.DT,Rg,Rn,bg,bn,bd,mlcp.flim,vel,lam,the,phi);
  if (verbose && mlcp.name != null && mlcp.name.length() > 0) {
    System.out.println(mlcp.name + "String_Node_Str");
  }
}

Fixed version (ground truth):
void testMLCP(MLCP mlcp){
  KKTSolver solver=new KKTSolver();
  if (mlcp.M == null) {
    throw new TestException("String_Node_Str");
  }
  int Mtype=Matrix.INDEFINITE;
  if (mlcp.M.isSymmetric(0)) {
    Mtype=Matrix.SYMMETRIC;
  }
  int sizeM=mlcp.M.rowSize();
  VectorNd vel=new VectorNd(sizeM);
  int sizeG=mlcp.GT != null ? mlcp.GT.colSize() : 0;
  VectorNd Rg=mlcp.Rg != null ? mlcp.Rg : new VectorNd(sizeG);
  VectorNd bg=mlcp.bg != null ? mlcp.bg : new VectorNd(sizeG);
  VectorNd lam=new VectorNd(sizeG);
  int sizeN=mlcp.NT != null ? mlcp.NT.colSize() : 0;
  VectorNd Rn=mlcp.Rn != null ? mlcp.Rn : new VectorNd(sizeN);
  VectorNd bn=mlcp.bn != null ? mlcp.bn : new VectorNd(sizeN);
  VectorNd the=new VectorNd(sizeN);
  int sizeD=mlcp.DT != null ? mlcp.DT.colSize() : 0;
  VectorNd bd=mlcp.bd != null ? mlcp.bd : new VectorNd(sizeD);
  VectorNd phi=new VectorNd(sizeD);
  Status status;
  solver.analyze(mlcp.M,sizeM,mlcp.GT,Rg,Mtype);
  if (sizeN == 0) {
    solver.factor(mlcp.M,sizeM,mlcp.GT,Rg);
    status=solver.solve(vel,lam,mlcp.bf,bg);
  }
 else   if (sizeD == 0) {
    solver.factor(mlcp.M,sizeM,mlcp.GT,Rg,mlcp.NT,Rn);
    status=solver.solve(vel,lam,the,mlcp.bf,bg,bn);
  }
 else {
    solver.factor(mlcp.M,sizeM,mlcp.GT,Rg,mlcp.NT,Rn,mlcp.DT);
    status=solver.solve(vel,lam,the,phi,mlcp.bf,bg,bn,bd,mlcp.flim);
  }
  if (status != Status.SOLVED) {
    throw new TestException("String_Node_Str" + status);
  }
  if (mlcp.vel != null) {
    checkResult("String_Node_Str",vel,mlcp.vel);
  }
  if (sizeG != 0 && mlcp.lam != null) {
    checkResult("String_Node_Str",lam,mlcp.lam);
  }
  if (sizeN != 0 && mlcp.the != null) {
    checkResult("String_Node_Str",the,mlcp.the);
  }
  if (sizeD != 0 && mlcp.phi != null) {
    checkResult("String_Node_Str",phi,mlcp.phi);
  }
  checkComplementarity(mlcp.GT,mlcp.NT,mlcp.DT,Rg,Rn,bg,bn,bd,mlcp.flim,vel,lam,the,phi);
  if (verbose && mlcp.name != null && mlcp.name.length() > 0) {
    System.out.println(mlcp.name + "String_Node_Str");
  }
}