Program: 131389
Project: 131389
Buggy source:
public static void getSrlTrainAssignment(SimpleAnnoSentence sent,JointNlpFactorGraph sfg,VarConfig vc,boolean predictSense,boolean predictPredPos){
  SrlGraph srlGraph=sent.getSrlGraph();
  if (srlGraph == null) {
    return;
  }
  for (int i=0; i < sent.size(); i++) {
    for (int j=0; j < sent.size(); j++) {
      RoleVar roleVar=sfg.getRoleVar(i,j);
      if (roleVar != null && roleVar.getType() != VarType.LATENT) {
        vc.put(roleVar,"String_Node_Str");
      }
    }
  }
  for (  SrlEdge edge : srlGraph.getEdges()) {
    int parent=edge.getPred().getPosition();
    int child=edge.getArg().getPosition();
    String roleName=edge.getLabel();
    RoleVar roleVar=sfg.getRoleVar(parent,child);
    if (roleVar != null && roleVar.getType() != VarType.LATENT) {
      int roleNameIdx=roleVar.getState(roleName);
      if (roleNameIdx == -1) {
        vc.put(roleVar,CorpusStatistics.UNKNOWN_ROLE);
      }
 else {
        vc.put(roleVar,roleNameIdx);
      }
    }
  }
  for (int i=0; i < sent.size(); i++) {
    SenseVar senseVar=sfg.getSenseVar(i);
    if (senseVar != null) {
      if (predictSense && predictPredPos) {
        if (predictPredPos && !sent.isKnownPred(i)) {
          vc.put(senseVar,"String_Node_Str");
        }
 else {
          if (!tryPut(vc,senseVar,srlGraph.getPredAt(i).getLabel())) {
            if (!tryPut(vc,senseVar,CorpusStatistics.UNKNOWN_SENSE)) {
              vc.put(senseVar,0);
            }
          }
        }
      }
 else {
        if (sent.isKnownPred(i)) {
          vc.put(senseVar,CorpusStatistics.UNKNOWN_SENSE);
        }
 else {
          vc.put(senseVar,"String_Node_Str");
        }
      }
    }
  }
}

Fixed version (ground truth):
public static void getSrlTrainAssignment(SimpleAnnoSentence sent,JointNlpFactorGraph sfg,VarConfig vc,boolean predictSense,boolean predictPredPos){
  SrlGraph srlGraph=sent.getSrlGraph();
  if (srlGraph == null) {
    return;
  }
  for (int i=0; i < sent.size(); i++) {
    for (int j=0; j < sent.size(); j++) {
      RoleVar roleVar=sfg.getRoleVar(i,j);
      if (roleVar != null && roleVar.getType() != VarType.LATENT) {
        vc.put(roleVar,"String_Node_Str");
      }
    }
  }
  for (  SrlEdge edge : srlGraph.getEdges()) {
    int parent=edge.getPred().getPosition();
    int child=edge.getArg().getPosition();
    String roleName=edge.getLabel();
    RoleVar roleVar=sfg.getRoleVar(parent,child);
    if (roleVar != null && roleVar.getType() != VarType.LATENT) {
      int roleNameIdx=roleVar.getState(roleName);
      if (roleNameIdx == -1) {
        vc.put(roleVar,CorpusStatistics.UNKNOWN_ROLE);
      }
 else {
        vc.put(roleVar,roleNameIdx);
      }
    }
  }
  for (int i=0; i < sent.size(); i++) {
    SenseVar senseVar=sfg.getSenseVar(i);
    if (senseVar != null) {
      if (predictSense) {
        if (predictPredPos && !sent.isKnownPred(i)) {
          vc.put(senseVar,"String_Node_Str");
        }
 else {
          if (!tryPut(vc,senseVar,srlGraph.getPredAt(i).getLabel())) {
            if (!tryPut(vc,senseVar,CorpusStatistics.UNKNOWN_SENSE)) {
              vc.put(senseVar,0);
            }
          }
        }
      }
 else       if (predictPredPos) {
        if (sent.isKnownPred(i)) {
          vc.put(senseVar,CorpusStatistics.UNKNOWN_SENSE);
        }
 else {
          vc.put(senseVar,"String_Node_Str");
        }
      }
 else {
        throw new IllegalStateException("String_Node_Str");
      }
    }
  }
}