Program: 173712
Project: 173712
Buggy source:
private void populateRevenueCalculator(){
  for (int id=0; id < rcVertices.size(); id++) {
    NetworkVertex v=rcVertices.get(id);
    v.addToRevenueCalculator(rc,id);
    for (int trainId=0; trainId < trains.size(); trainId++) {
      NetworkTrain train=trains.get(trainId);
      rc.setVertexValue(id,trainId,getVertexValue(v,train,phase));
    }
    List<NetworkVertex> neighbors=Graphs.neighborListOf(rcGraph,v);
    int j=0, neighborsArray[]=new int[neighbors.size()];
    for (    NetworkVertex n : neighbors) {
      neighborsArray[j++]=rcVertices.indexOf(n);
    }
    Arrays.sort(neighborsArray,0,j);
    int[] edgesArray=new int[j];
    for (int e=0; e < j; e++) {
      NetworkVertex n=rcVertices.get(neighborsArray[e]);
      edgesArray[e]=rcEdges.indexOf(rcGraph.getEdge(v,n));
    }
    rc.setVertexNeighbors(id,neighborsArray,edgesArray);
  }
  int startVertexId=0, sv[]=new int[startVertices.size()];
  for (  NetworkVertex startVertex : startVertices) {
    sv[startVertexId++]=rcVertices.indexOf(startVertex);
  }
  Arrays.sort(sv);
  rc.setStartVertexes(sv);
  for (int id=0; id < rcEdges.size(); id++) {
    NetworkEdge e=rcEdges.get(id);
    boolean greedy=e.isGreedy();
    int distance=e.getDistance();
    rc.setEdge(id,greedy,distance);
  }
  for (int id=0; id < trains.size(); id++) {
    NetworkTrain train=trains.get(id);
    train.addToRevenueCalculator(rc,id);
  }
  for (  VertexVisit visit : vertexVisitSets) {
    int j=0, setArray[]=new int[visit.set.size()];
    for (    NetworkVertex n : visit.set) {
      setArray[j++]=rcVertices.indexOf(n);
    }
    rc.setVisitSet(setArray);
  }
  log.info("String_Node_Str" + rcVertices);
  int id=0;
  for (  RevenueBonus bonus : revenueBonuses) {
    if (bonus.addToRevenueCalculator(rc,id,rcVertices,trains,phase))     id++;
  }
  rc.setDynamicModifiers(dynamicModifiers != null);
}

Fixed version (ground truth):
private void populateRevenueCalculator(){
  for (int id=0; id < rcVertices.size(); id++) {
    NetworkVertex v=rcVertices.get(id);
    v.addToRevenueCalculator(rc,id);
    for (int trainId=0; trainId < trains.size(); trainId++) {
      NetworkTrain train=trains.get(trainId);
      rc.setVertexValue(id,trainId,getVertexValue(v,train,phase));
    }
    List<NetworkVertex> neighbors=Graphs.neighborListOf(rcGraph,v);
    int j=0, neighborsArray[]=new int[neighbors.size()];
    for (    NetworkVertex n : neighbors) {
      neighborsArray[j++]=rcVertices.indexOf(n);
    }
    Arrays.sort(neighborsArray,0,j);
    int[] edgesArray=new int[j];
    for (int e=0; e < j; e++) {
      NetworkVertex n=rcVertices.get(neighborsArray[e]);
      edgesArray[e]=rcEdges.indexOf(rcGraph.getEdge(v,n));
    }
    rc.setVertexNeighbors(id,neighborsArray,edgesArray);
  }
  int startVertexId=0, sv[]=new int[startVertices.size()];
  for (  NetworkVertex startVertex : startVertices) {
    sv[startVertexId++]=rcVertices.indexOf(startVertex);
  }
  Arrays.sort(sv);
  rc.setStartVertexes(sv);
  for (int id=0; id < rcEdges.size(); id++) {
    NetworkEdge e=rcEdges.get(id);
    boolean greedy=e.isGreedy();
    int distance=e.getDistance();
    rc.setEdge(id,greedy,distance);
  }
  for (int id=0; id < trains.size(); id++) {
    NetworkTrain train=trains.get(id);
    train.addToRevenueCalculator(rc,id);
  }
  for (  VertexVisit visit : vertexVisitSets) {
    int j=0, setArray[]=new int[visit.set.size()];
    for (    NetworkVertex n : visit.set) {
      setArray[j++]=rcVertices.indexOf(n);
    }
    rc.setVisitSet(setArray);
  }
  log.info("String_Node_Str" + rcVertices);
  int id=0;
  for (  RevenueBonus bonus : revenueBonuses) {
    if (bonus.addToRevenueCalculator(rc,id,rcVertices,trains,phase))     id++;
  }
  rc.setDynamicModifiers(!dynamicModifiers.isEmpty());
}