Program: 21185
Project: 21185
Buggy source:
public static List<Map<Integer,Double>> getArtifactMaps(BookmarkReader reader,List<Bookmark> userLines,List<Bookmark> testLines,boolean resource,List<Long> timestampList,List<Double> denomList,double dVal,boolean normalize){
  List<Map<Integer,Double>> maps=new ArrayList<Map<Integer,Double>>();
  for (  Bookmark data : userLines) {
    int refID=0;
    if (resource) {
      refID=data.getWikiID();
    }
 else {
      refID=data.getUserID();
    }
    long baselineTimestamp=-1;
    if (refID >= maps.size()) {
      if (resource) {
        baselineTimestamp=1;
      }
 else {
        baselineTimestamp=Utilities.getBaselineTimestamp(testLines,refID,false);
      }
      timestampList.add(baselineTimestamp);
      if (baselineTimestamp != -1) {
        maps.add(addActValue(data,new LinkedHashMap<Integer,Double>(),baselineTimestamp,resource,dVal));
      }
 else {
        maps.add(null);
      }
    }
 else {
      baselineTimestamp=timestampList.get(refID);
      if (baselineTimestamp != -1) {
        addActValue(data,maps.get(refID),baselineTimestamp,resource,dVal);
      }
    }
  }
  for (  Map<Integer,Double> map : maps) {
    double denom=0.0;
    if (map != null) {
      for (      Map.Entry<Integer,Double> entry : map.entrySet()) {
        if (entry != null) {
          double actVal=Math.log(entry.getValue());
          denom+=Math.exp(actVal);
          entry.setValue(actVal);
        }
      }
      denomList.add(denom);
      if (normalize) {
        for (        Map.Entry<Integer,Double> entry : map.entrySet()) {
          if (entry != null) {
            double actVal=Math.exp(entry.getValue());
            entry.setValue(actVal / denom);
          }
        }
      }
    }
  }
  return maps;
}

Fixed version (ground truth):
public static List<Map<Integer,Double>> getArtifactMaps(BookmarkReader reader,List<Bookmark> userLines,List<Bookmark> testLines,boolean resource,List<Long> timestampList,List<Double> denomList,double dVal,boolean normalize){
  List<Map<Integer,Double>> maps=new ArrayList<Map<Integer,Double>>();
  for (  Bookmark data : userLines) {
    int refID=0;
    if (resource) {
      refID=data.getResourceID();
    }
 else {
      refID=data.getUserID();
    }
    long baselineTimestamp=-1;
    if (refID >= maps.size()) {
      if (resource) {
        baselineTimestamp=1;
      }
 else {
        baselineTimestamp=Utilities.getBaselineTimestamp(testLines,refID,false);
      }
      timestampList.add(baselineTimestamp);
      if (baselineTimestamp != -1) {
        maps.add(addActValue(data,new LinkedHashMap<Integer,Double>(),baselineTimestamp,resource,dVal));
      }
 else {
        maps.add(null);
      }
    }
 else {
      baselineTimestamp=timestampList.get(refID);
      if (baselineTimestamp != -1) {
        addActValue(data,maps.get(refID),baselineTimestamp,resource,dVal);
      }
    }
  }
  for (  Map<Integer,Double> map : maps) {
    double denom=0.0;
    if (map != null) {
      for (      Map.Entry<Integer,Double> entry : map.entrySet()) {
        if (entry != null) {
          double actVal=Math.log(entry.getValue());
          denom+=Math.exp(actVal);
          entry.setValue(actVal);
        }
      }
      denomList.add(denom);
      if (normalize) {
        for (        Map.Entry<Integer,Double> entry : map.entrySet()) {
          if (entry != null) {
            double actVal=Math.exp(entry.getValue());
            entry.setValue(actVal / denom);
          }
        }
      }
    }
  }
  return maps;
}