Program: 61351
Project: 61351
Buggy source:
@Override public IRStatistics evaluate(RecommenderBuilder recommenderBuilder,DataModelBuilder dataModelBuilder,DataModel dataModel,Rescorer<Long> rescorer,int at,double relevanceThreshold,double evaluationPercentage) throws TasteException {
  if (recommenderBuilder == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (dataModel == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (at < 1) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (Double.isNaN(evaluationPercentage) || evaluationPercentage <= 0.0 || evaluationPercentage > 1.0) {
    throw new IllegalArgumentException("String_Node_Str" + evaluationPercentage);
  }
  if (Double.isNaN(relevanceThreshold)) {
    throw new IllegalArgumentException("String_Node_Str" + evaluationPercentage);
  }
  int numItems=dataModel.getNumItems();
  RunningAverage precision=new FullRunningAverage();
  RunningAverage recall=new FullRunningAverage();
  RunningAverage fallOut=new FullRunningAverage();
  LongPrimitiveIterator it=dataModel.getUserIDs();
  while (it.hasNext()) {
    long userID=it.nextLong();
    if (random.nextDouble() < evaluationPercentage) {
      long start=System.currentTimeMillis();
      FastIDSet relevantItemIDs=new FastIDSet(at);
      PreferenceArray prefs=dataModel.getPreferencesFromUser(userID);
      int size=prefs.length();
      if (size < 2 * at) {
        continue;
      }
      double theRelevanceThreshold=Double.isNaN(relevanceThreshold) ? computeThreshold(prefs) : relevanceThreshold;
      prefs.sortByValueReversed();
      for (int i=0; i < size && relevantItemIDs.size() < at; i++) {
        if (prefs.getValue(i) >= theRelevanceThreshold) {
          relevantItemIDs.add(prefs.getItemID(i));
        }
      }
      int numRelevantItems=relevantItemIDs.size();
      if (numRelevantItems > 0) {
        FastByIDMap<PreferenceArray> trainingUsers=new FastByIDMap<PreferenceArray>(dataModel.getNumUsers());
        LongPrimitiveIterator it2=dataModel.getUserIDs();
        while (it2.hasNext()) {
          processOtherUser(userID,relevantItemIDs,trainingUsers,it2.nextLong(),dataModel);
        }
        DataModel trainingModel=dataModelBuilder == null ? new GenericDataModel(trainingUsers) : dataModelBuilder.buildDataModel(trainingUsers);
        Recommender recommender=recommenderBuilder.buildRecommender(trainingModel);
        try {
          trainingModel.getPreferencesFromUser(userID);
        }
 catch (        NoSuchUserException nsee) {
          continue;
        }
        int intersectionSize=0;
        List<RecommendedItem> recommendedItems=recommender.recommend(userID,at,rescorer);
        for (        RecommendedItem recommendedItem : recommendedItems) {
          if (relevantItemIDs.contains(recommendedItem.getItemID())) {
            intersectionSize++;
          }
        }
        int numRecommendedItems=recommendedItems.size();
        if (numRecommendedItems > 0) {
          precision.addDatum((double)intersectionSize / (double)numRecommendedItems);
        }
        recall.addDatum((double)intersectionSize / (double)numRelevantItems);
        if (numRelevantItems < size) {
          fallOut.addDatum((double)(numRecommendedItems - intersectionSize) / (double)(numItems - numRelevantItems));
        }
        long end=System.currentTimeMillis();
        log.info("String_Node_Str" + userID + "String_Node_Str"+ (end - start)+ "String_Node_Str");
        log.info("String_Node_Str",new Object[]{precision.getAverage(),recall.getAverage(),fallOut.getAverage()});
      }
    }
  }
  return new IRStatisticsImpl(precision.getAverage(),recall.getAverage(),fallOut.getAverage());
}

Fixed version (ground truth):
@Override public IRStatistics evaluate(RecommenderBuilder recommenderBuilder,DataModelBuilder dataModelBuilder,DataModel dataModel,Rescorer<Long> rescorer,int at,double relevanceThreshold,double evaluationPercentage) throws TasteException {
  if (recommenderBuilder == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (dataModel == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (at < 1) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (Double.isNaN(evaluationPercentage) || evaluationPercentage <= 0.0 || evaluationPercentage > 1.0) {
    throw new IllegalArgumentException("String_Node_Str" + evaluationPercentage);
  }
  int numItems=dataModel.getNumItems();
  RunningAverage precision=new FullRunningAverage();
  RunningAverage recall=new FullRunningAverage();
  RunningAverage fallOut=new FullRunningAverage();
  LongPrimitiveIterator it=dataModel.getUserIDs();
  while (it.hasNext()) {
    long userID=it.nextLong();
    if (random.nextDouble() < evaluationPercentage) {
      long start=System.currentTimeMillis();
      FastIDSet relevantItemIDs=new FastIDSet(at);
      PreferenceArray prefs=dataModel.getPreferencesFromUser(userID);
      int size=prefs.length();
      if (size < 2 * at) {
        continue;
      }
      double theRelevanceThreshold=Double.isNaN(relevanceThreshold) ? computeThreshold(prefs) : relevanceThreshold;
      prefs.sortByValueReversed();
      for (int i=0; i < size && relevantItemIDs.size() < at; i++) {
        if (prefs.getValue(i) >= theRelevanceThreshold) {
          relevantItemIDs.add(prefs.getItemID(i));
        }
      }
      int numRelevantItems=relevantItemIDs.size();
      if (numRelevantItems > 0) {
        FastByIDMap<PreferenceArray> trainingUsers=new FastByIDMap<PreferenceArray>(dataModel.getNumUsers());
        LongPrimitiveIterator it2=dataModel.getUserIDs();
        while (it2.hasNext()) {
          processOtherUser(userID,relevantItemIDs,trainingUsers,it2.nextLong(),dataModel);
        }
        DataModel trainingModel=dataModelBuilder == null ? new GenericDataModel(trainingUsers) : dataModelBuilder.buildDataModel(trainingUsers);
        Recommender recommender=recommenderBuilder.buildRecommender(trainingModel);
        try {
          trainingModel.getPreferencesFromUser(userID);
        }
 catch (        NoSuchUserException nsee) {
          continue;
        }
        int intersectionSize=0;
        List<RecommendedItem> recommendedItems=recommender.recommend(userID,at,rescorer);
        for (        RecommendedItem recommendedItem : recommendedItems) {
          if (relevantItemIDs.contains(recommendedItem.getItemID())) {
            intersectionSize++;
          }
        }
        int numRecommendedItems=recommendedItems.size();
        if (numRecommendedItems > 0) {
          precision.addDatum((double)intersectionSize / (double)numRecommendedItems);
        }
        recall.addDatum((double)intersectionSize / (double)numRelevantItems);
        if (numRelevantItems < size) {
          fallOut.addDatum((double)(numRecommendedItems - intersectionSize) / (double)(numItems - numRelevantItems));
        }
        long end=System.currentTimeMillis();
        log.info("String_Node_Str" + userID + "String_Node_Str"+ (end - start)+ "String_Node_Str");
        log.info("String_Node_Str",new Object[]{precision.getAverage(),recall.getAverage(),fallOut.getAverage()});
      }
    }
  }
  return new IRStatisticsImpl(precision.getAverage(),recall.getAverage(),fallOut.getAverage());
}