Program: 131444
Project: 131444
Buggy source:
@Override public FeatureVector calcObsFeatureVector(int factorId){
  SrlFactor f=(SrlFactor)sfg.getFactor(factorId);
  SrlFactorTemplate ft=f.getFactorType();
  VarSet vars=f.getVars();
  ArrayList<String> obsFeats;
  Alphabet<Feature> alphabet;
  if (ft == SrlFactorTemplate.LINK_ROLE_BINARY || ft == SrlFactorTemplate.LINK_UNARY || ft == SrlFactorTemplate.ROLE_UNARY) {
    Var var=vars.iterator().next();
    int parent;
    int child;
    if (var instanceof LinkVar) {
      parent=((LinkVar)var).getParent();
      child=((LinkVar)var).getChild();
    }
 else {
      parent=((RoleVar)var).getParent();
      child=((RoleVar)var).getChild();
    }
    if (parent == -1) {
      obsFeats=sentFeatExt.fastGetObsFeats(child);
    }
 else {
      obsFeats=sentFeatExt.fastGetObsFeats(parent,child);
    }
  }
 else   if (ft == SrlFactorTemplate.SENSE_UNARY) {
    SenseVar var=(SenseVar)vars.iterator().next();
    int parent=var.getParent();
    obsFeats=sentFeatExt.fastGetObsFeats(parent);
  }
 else {
    throw new RuntimeException("String_Node_Str" + ft);
  }
  alphabet=fts.getTemplate(f).getAlphabet();
  String prefix=getObsVarsStates(f) + "String_Node_Str";
  if (log.isTraceEnabled()) {
    log.trace("String_Node_Str" + obsFeats.size());
  }
  FeatureVector fv=new FeatureVector(obsFeats.size());
  ArrayList<String> biasFeats=new ArrayList<String>();
  biasFeats.add("String_Node_Str");
  if (!"String_Node_Str".equals(prefix)) {
    biasFeats.add(prefix + "String_Node_Str");
  }
  addFeatures(biasFeats,alphabet,"String_Node_Str",fv,true);
  addFeatures(obsFeats,alphabet,prefix,fv,false);
  return fv;
}

Fixed version (ground truth):
@Override public FeatureVector calcObsFeatureVector(int factorId){
  SrlFactor f=(SrlFactor)sfg.getFactor(factorId);
  SrlFactorTemplate ft=f.getFactorType();
  VarSet vars=f.getVars();
  ArrayList<String> obsFeats;
  Alphabet<Feature> alphabet;
  if (ft == SrlFactorTemplate.LINK_ROLE_BINARY || ft == SrlFactorTemplate.LINK_UNARY || ft == SrlFactorTemplate.ROLE_UNARY) {
    Var var=vars.iterator().next();
    int parent;
    int child;
    if (var instanceof LinkVar) {
      parent=((LinkVar)var).getParent();
      child=((LinkVar)var).getChild();
    }
 else {
      parent=((RoleVar)var).getParent();
      child=((RoleVar)var).getChild();
    }
    obsFeats=sentFeatExt.fastGetObsFeats(parent,child);
  }
 else   if (ft == SrlFactorTemplate.SENSE_UNARY) {
    SenseVar var=(SenseVar)vars.iterator().next();
    int parent=var.getParent();
    obsFeats=sentFeatExt.fastGetObsFeats(parent);
  }
 else {
    throw new RuntimeException("String_Node_Str" + ft);
  }
  alphabet=fts.getTemplate(f).getAlphabet();
  String prefix=getObsVarsStates(f) + "String_Node_Str";
  if (log.isTraceEnabled()) {
    log.trace("String_Node_Str" + obsFeats.size());
  }
  FeatureVector fv=new FeatureVector(obsFeats.size());
  ArrayList<String> biasFeats=new ArrayList<String>();
  biasFeats.add("String_Node_Str");
  if (!"String_Node_Str".equals(prefix)) {
    biasFeats.add(prefix + "String_Node_Str");
  }
  addFeatures(biasFeats,alphabet,"String_Node_Str",fv,true);
  addFeatures(obsFeats,alphabet,prefix,fv,false);
  return fv;
}