Program: 61290
Project: 61290
Buggy source:
@Override public void map(LongWritable userID,VectorWritable vectorWritable,OutputCollector<LongWritable,RecommendedItemsWritable> output,Reporter reporter) throws IOException {
  if ((usersToRecommendFor != null) && !usersToRecommendFor.contains(userID.get())) {
    return;
  }
  Vector userVector=vectorWritable.get();
  Iterator<Vector.Element> userVectorIterator=userVector.iterateNonZero();
  Vector recommendationVector=new RandomAccessSparseVector(Integer.MAX_VALUE,1000);
  while (userVectorIterator.hasNext()) {
    Vector.Element element=userVectorIterator.next();
    int index=element.index();
    Vector columnVector;
    try {
      columnVector=cooccurrenceColumnCache.get(new IntWritable(index));
    }
 catch (    TasteException te) {
      if (te.getCause() instanceof IOException) {
        throw (IOException)te.getCause();
      }
 else {
        throw new IOException(te.getCause());
      }
    }
    if (columnVector != null) {
      if (booleanData) {
        columnVector.addTo(recommendationVector);
      }
 else {
        double value=element.get();
        columnVector.times(value).addTo(recommendationVector);
      }
    }
  }
  Queue<RecommendedItem> topItems=new PriorityQueue<RecommendedItem>(recommendationsPerUser + 1,Collections.reverseOrder());
  Iterator<Vector.Element> recommendationVectorIterator=recommendationVector.iterateNonZero();
  LongWritable itemID=new LongWritable();
  while (recommendationVectorIterator.hasNext()) {
    Vector.Element element=recommendationVectorIterator.next();
    int index=element.index();
    if (userVector.get(index) == 0.0) {
      if (topItems.size() < recommendationsPerUser) {
        indexItemIDMap.get(new IntWritable(index),itemID);
        topItems.add(new GenericRecommendedItem(itemID.get(),(float)element.get()));
      }
 else       if (element.get() > topItems.peek().getValue()) {
        indexItemIDMap.get(new IntWritable(index),itemID);
        topItems.add(new GenericRecommendedItem(itemID.get(),(float)element.get()));
        topItems.poll();
      }
    }
  }
  List<RecommendedItem> recommendations=new ArrayList<RecommendedItem>(topItems.size());
  recommendations.addAll(topItems);
  Collections.sort(recommendations);
  output.collect(userID,new RecommendedItemsWritable(recommendations));
}

Fixed version (ground truth):
@Override public void map(LongWritable userID,VectorWritable vectorWritable,OutputCollector<LongWritable,RecommendedItemsWritable> output,Reporter reporter) throws IOException {
  if ((usersToRecommendFor != null) && !usersToRecommendFor.contains(userID.get())) {
    return;
  }
  Vector userVector=vectorWritable.get();
  Iterator<Vector.Element> userVectorIterator=userVector.iterateNonZero();
  Vector recommendationVector=new RandomAccessSparseVector(Integer.MAX_VALUE,1000);
  while (userVectorIterator.hasNext()) {
    Vector.Element element=userVectorIterator.next();
    int index=element.index();
    Vector columnVector;
    try {
      columnVector=cooccurrenceColumnCache.get(new IntWritable(index));
    }
 catch (    TasteException te) {
      if (te.getCause() instanceof IOException) {
        throw (IOException)te.getCause();
      }
 else {
        throw new IOException(te.getCause());
      }
    }
    if (columnVector != null) {
      if (booleanData) {
        columnVector.addTo(recommendationVector);
      }
 else {
        double value=element.get();
        columnVector.times(value).addTo(recommendationVector);
      }
    }
  }
  Queue<RecommendedItem> topItems=new PriorityQueue<RecommendedItem>(recommendationsPerUser + 1,Collections.reverseOrder(ByValueRecommendedItemComparator.getInstance()));
  Iterator<Vector.Element> recommendationVectorIterator=recommendationVector.iterateNonZero();
  LongWritable itemID=new LongWritable();
  while (recommendationVectorIterator.hasNext()) {
    Vector.Element element=recommendationVectorIterator.next();
    int index=element.index();
    if (userVector.get(index) == 0.0) {
      if (topItems.size() < recommendationsPerUser) {
        LongWritable theItemID=indexItemIDMap.get(new IntWritable(index),itemID);
        if (theItemID != null) {
          topItems.add(new GenericRecommendedItem(theItemID.get(),(float)element.get()));
        }
      }
 else       if (element.get() > topItems.peek().getValue()) {
        LongWritable theItemID=indexItemIDMap.get(new IntWritable(index),itemID);
        if (theItemID != null) {
          topItems.add(new GenericRecommendedItem(theItemID.get(),(float)element.get()));
          topItems.poll();
        }
      }
    }
  }
  List<RecommendedItem> recommendations=new ArrayList<RecommendedItem>(topItems.size());
  recommendations.addAll(topItems);
  Collections.sort(recommendations,ByValueRecommendedItemComparator.getInstance());
  output.collect(userID,new RecommendedItemsWritable(recommendations));
}