Program: 131699
Project: 131699
Buggy source:
@Override public double[][] getScores(DmvProblemNode node){
  if (scores == null) {
    idm=node.getIdm();
    scores=new double[idm.getNumConds()][];
    deltaSum=new double[idm.getNumConds()][][];
    numObserved=new int[idm.getNumConds()][][];
    for (int c=0; c < idm.getNumConds(); c++) {
      scores[c]=new double[idm.getNumParams(c)];
      deltaSum[c]=new double[idm.getNumParams(c)][2];
      numObserved[c]=new int[idm.getNumParams(c)][2];
    }
  }
  CptBounds origBounds=node.getBounds();
  double parentBound=node.getOptimisticBound();
  for (int c=0; c < idm.getNumConds(); c++) {
    for (int m=0; m < idm.getNumParams(c); m++) {
      if (numObserved[c][m][0] < RELIABILITY_THRESHOLD || numObserved[c][m][1] < RELIABILITY_THRESHOLD) {
        node.setAsActiveNode();
        List<CptBoundsDeltaList> deltas=varSplitter.split(origBounds,new VariableId(c,m));
        List<ProblemNode> children=node.branch(deltas);
        assert(children.size() == 2);
        for (int lu=0; lu < 2; lu++) {
          if (numObserved[c][m][lu] < RELIABILITY_THRESHOLD) {
            DmvProblemNode child=(DmvProblemNode)children.get(lu);
            assert(child.getDeltas().getPrimary().getLu().getAsInt() == lu);
            child.setAsActiveNode();
            double cBound=child.getOptimisticBound();
            double cDelta=parentBound - cBound;
            deltaSum[c][m][lu]+=cDelta;
            numObserved[c][m][lu]++;
            String name=node.getIdm().getName(c,m);
            log.trace(String.format("String_Node_Str",c,m,lu,name,cDelta));
          }
        }
        updateScore(c,m);
        node.setAsActiveNode();
      }
    }
  }
  CptBoundsDelta primaryDelta=node.getDeltas().getPrimary();
  if (primaryDelta != null) {
    int c=primaryDelta.getC();
    int m=primaryDelta.getM();
    int lu=primaryDelta.getLu().getAsInt();
    deltaSum[c][m][lu]+=node.getParent().getOptimisticBound() - node.getOptimisticBound();
    numObserved[c][m][lu]++;
    updateScore(c,m);
  }
  return scores;
}

Fixed version (ground truth):
@Override public double[][] getScores(DmvProblemNode node){
  if (scores == null) {
    idm=node.getIdm();
    scores=new double[idm.getNumConds()][];
    deltaSum=new double[idm.getNumConds()][][];
    numObserved=new int[idm.getNumConds()][][];
    for (int c=0; c < idm.getNumConds(); c++) {
      scores[c]=new double[idm.getNumParams(c)];
      deltaSum[c]=new double[idm.getNumParams(c)][2];
      numObserved[c]=new int[idm.getNumParams(c)][2];
    }
  }
  CptBounds origBounds=node.getBounds();
  double parentBound=node.getOptimisticBound();
  for (int c=0; c < idm.getNumConds(); c++) {
    for (int m=0; m < idm.getNumParams(c); m++) {
      if (numObserved[c][m][0] < RELIABILITY_THRESHOLD || numObserved[c][m][1] < RELIABILITY_THRESHOLD) {
        node.setAsActiveNode();
        List<CptBoundsDeltaList> deltas=varSplitter.split(origBounds,new VariableId(c,m));
        List<ProblemNode> children=node.branch(deltas);
        assert(children.size() == 2);
        for (int lu=0; lu < 2; lu++) {
          if (numObserved[c][m][lu] < RELIABILITY_THRESHOLD) {
            DmvProblemNode child=(DmvProblemNode)children.get(lu);
            assert(child.getDeltas().getPrimary().getLu().getAsInt() == lu);
            child.setAsActiveNode();
            double cBound=child.getOptimisticBound();
            double cDelta=parentBound - cBound;
            deltaSum[c][m][lu]+=cDelta;
            numObserved[c][m][lu]++;
            String name=idm.getName(c,m);
            log.trace(String.format("String_Node_Str",c,m,lu,name,cDelta));
          }
        }
        updateScore(c,m);
        node.setAsActiveNode();
      }
    }
  }
  CptBoundsDelta primaryDelta=node.getDeltas().getPrimary();
  if (primaryDelta != null) {
    int c=primaryDelta.getC();
    int m=primaryDelta.getM();
    int lu=primaryDelta.getLu().getAsInt();
    deltaSum[c][m][lu]+=node.getParent().getOptimisticBound() - node.getOptimisticBound();
    numObserved[c][m][lu]++;
    updateScore(c,m);
  }
  return scores;
}