Program: 70727
Project: 70727
Buggy source:
private void createForceJacobian(){
  MechModel mechMod=(MechModel)myMech;
  int[] target_idx=new int[myForceTargets.size()];
  int idx=0;
  int cons_ind=0;
  System.out.println(mechMod.bodyConnectors().size());
  SparseBlockMatrix GT=new SparseBlockMatrix();
  VectorNd dg=new VectorNd();
  mechMod.getBilateralConstraints(GT,dg);
  System.out.println(GT.colSize());
  System.out.println(GT.rowSize());
  System.out.println(GT.getSize());
  System.out.println(GT.numBlocks());
  System.out.println(GT.getBlock(0,0));
  System.out.println(GT.getBlock(0,1));
  System.out.println(GT.getBlock(0,2));
  System.out.println(GT.getBlock(1,0));
  int[] constraint_blocksize=new int[mechMod.bodyConnectors().size()];
  for (int i=0; i < myForceTargets.size(); i++) {
    cons_ind=0;
    for (int j=0; j < mechMod.bodyConnectors().size(); j++) {
      System.out.println(mechMod.bodyConnectors().get(j).getName());
      if (mechMod.bodyConnectors().get(j).getName() == myForceTargets.get(i).getName()) {
        target_idx[idx]=cons_ind;
        idx++;
      }
      if (mechMod.bodyConnectors().get(j).isEnabled() == true) {
        System.out.println(mechMod.bodyConnectors().get(j).numBilateralConstraints());
        constraint_blocksize[cons_ind]=mechMod.bodyConnectors().get(j).numBilateralConstraints();
        cons_ind++;
      }
    }
  }
  int[] dynsize=new int[cons_ind];
  Arrays.fill(dynsize,1);
  myForJacobian=new SparseBlockMatrix(new int[0],constraint_blocksize);
  for (int i=0; i < myForceTargets.size(); i++) {
    ForceTarget target=myForceTargets.get(i);
    target.addForceJacobian(myForJacobian,i,target_idx[i]);
  }
}

Fixed version (ground truth):
private void createForceJacobian(){
  MechModel mechMod=(MechModel)myMech;
  int[] target_idx=new int[myForceTargets.size()];
  int idx=0;
  int cons_ind=0;
  System.out.println(mechMod.bodyConnectors().size());
  SparseBlockMatrix GT=new SparseBlockMatrix();
  VectorNd dg=new VectorNd();
  mechMod.getBilateralConstraints(GT,dg);
  System.out.println(GT.colSize());
  System.out.println(GT.rowSize());
  System.out.println(GT.getSize());
  System.out.println(GT.numBlocks());
  System.out.println(GT.getBlock(0,0));
  System.out.println(GT.getBlock(0,1));
  System.out.println(GT.getBlock(0,2));
  System.out.println(GT.getBlock(1,0));
  int[] constraint_blocksize=new int[mechMod.bodyConnectors().size()];
  for (int i=0; i < myForceTargets.size(); i++) {
    cons_ind=0;
    for (int j=0; j < mechMod.bodyConnectors().size(); j++) {
      if (myForceTargets.get(i).getName().startsWith(mechMod.bodyConnectors().get(j).getName())) {
        target_idx[idx]=cons_ind;
        idx++;
      }
      if (mechMod.bodyConnectors().get(j).isEnabled() == true) {
        System.out.println(mechMod.bodyConnectors().get(j).numBilateralConstraints());
        constraint_blocksize[cons_ind]=mechMod.bodyConnectors().get(j).numBilateralConstraints();
        cons_ind++;
      }
    }
  }
  int[] dynsize=new int[cons_ind];
  Arrays.fill(dynsize,1);
  myForJacobian=new SparseBlockMatrix(new int[0],constraint_blocksize);
  for (int i=0; i < myForceTargets.size(); i++) {
    ForceTarget target=myForceTargets.get(i);
    target.addForceJacobian(myForJacobian,i,target_idx[i]);
  }
}