nus-yam/ex-repair huggingface dataset:
Program: 35377
Project: 35377
Buggy source:
@Test public void testLocation_POST(){
  JSONObject json=new JSONObject();
  JSONArray jTravellers=new JSONArray();
  json.put("String_Node_Str",jTravellers);
  JSONObject jTraveller=new JSONObject();
  jTraveller.put("String_Node_Str","String_Node_Str");
  jTravellers.put(jTraveller);
  jTraveller.put("String_Node_Str",new JSONArray().put(8.7).put("String_Node_Str"));
  given().body(json.toString()).when().post(getEndPointName()).then().body("String_Node_Str",is(302)).statusCode(400);
}

Fixed version (ground truth):
@Test public void testLocation_POST(){
  JSONObject json=new JSONObject();
  JSONArray jTravellers=new JSONArray();
  json.put("String_Node_Str",jTravellers);
  JSONObject jTraveller=new JSONObject();
  jTraveller.put("String_Node_Str","String_Node_Str");
  jTravellers.put(jTraveller);
  jTraveller.put("String_Node_Str",new JSONArray().put(8.7).put("String_Node_Str"));
  given().body(json.toString()).when().post(getEndPointName()).then().body("String_Node_Str",is(IsochronesErrorCodes.INVALID_PARAMETER_FORMAT)).statusCode(400);
}
Program: 35378
Project: 35378
Buggy source:
@Test public void testTooManyIntervals(){
  given().param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().body("String_Node_Str",is(304)).statusCode(400);
}

Fixed version (ground truth):
@Test public void testTooManyIntervals(){
  given().param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().body("String_Node_Str",is(IsochronesErrorCodes.PARAMETER_VALUE_EXCEEDS_MAXIMUM)).statusCode(400);
}
Program: 35379
Project: 35379
Buggy source:
@Test public void testRangeInput(){
  given().param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().body("String_Node_Str",is(302)).statusCode(400);
}

Fixed version (ground truth):
@Test public void testRangeInput(){
  given().param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().body("String_Node_Str",is(IsochronesErrorCodes.INVALID_PARAMETER_FORMAT)).statusCode(400);
}
Program: 35380
Project: 35380
Buggy source:
@Test public void testLocationType_POST(){
  JSONObject json=new JSONObject();
  JSONArray jTravellers=new JSONArray();
  json.put("String_Node_Str",jTravellers);
  JSONObject jTraveller=new JSONObject();
  jTraveller.put("String_Node_Str","String_Node_Str");
  jTravellers.put(jTraveller);
  jTraveller.put("String_Node_Str",new JSONArray().put(8.7).put("String_Node_Str"));
  jTraveller.put("String_Node_Str","String_Node_Str");
  given().body(json.toString()).when().post(getEndPointName()).then().body("String_Node_Str",is(303)).statusCode(400);
}

Fixed version (ground truth):
@Test public void testLocationType_POST(){
  JSONObject json=new JSONObject();
  JSONArray jTravellers=new JSONArray();
  json.put("String_Node_Str",jTravellers);
  JSONObject jTraveller=new JSONObject();
  jTraveller.put("String_Node_Str","String_Node_Str");
  jTravellers.put(jTraveller);
  jTraveller.put("String_Node_Str",new JSONArray().put(8.7).put("String_Node_Str"));
  jTraveller.put("String_Node_Str","String_Node_Str");
  given().body(json.toString()).when().post(getEndPointName()).then().body("String_Node_Str",is(IsochronesErrorCodes.INVALID_PARAMETER_VALUE)).statusCode(400);
}
Program: 35381
Project: 35381
Buggy source:
@Test public void testTravellers_POST(){
  JSONObject json=new JSONObject();
  json.put("String_Node_Str",new JSONArray());
  given().body(json.toString()).when().post(getEndPointName()).then().body("String_Node_Str",is(301)).statusCode(400);
}

Fixed version (ground truth):
@Test public void testTravellers_POST(){
  JSONObject json=new JSONObject();
  json.put("String_Node_Str",new JSONArray());
  given().body(json.toString()).when().post(getEndPointName()).then().body("String_Node_Str",is(IsochronesErrorCodes.MISSING_PARAMETER)).statusCode(400);
}
Program: 35382
Project: 35382
Buggy source:
@Test public void testTooManyLocations(){
  given().param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().body("String_Node_Str",is(304)).statusCode(400);
}

Fixed version (ground truth):
@Test public void testTooManyLocations(){
  given().param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().body("String_Node_Str",is(IsochronesErrorCodes.PARAMETER_VALUE_EXCEEDS_MAXIMUM)).statusCode(400);
}
Program: 35383
Project: 35383
Buggy source:
@Test public void testProfile_POST(){
  JSONObject json=new JSONObject();
  JSONArray jTravellers=new JSONArray();
  json.put("String_Node_Str",jTravellers);
  JSONObject jTraveller=new JSONObject();
  jTraveller.put("String_Node_Str","String_Node_Str");
  jTravellers.put(jTraveller);
  given().body(json.toString()).when().post(getEndPointName()).then().body("String_Node_Str",is(303)).statusCode(400);
}

Fixed version (ground truth):
@Test public void testProfile_POST(){
  JSONObject json=new JSONObject();
  JSONArray jTravellers=new JSONArray();
  json.put("String_Node_Str",jTravellers);
  JSONObject jTraveller=new JSONObject();
  jTraveller.put("String_Node_Str","String_Node_Str");
  jTravellers.put(jTraveller);
  given().body(json.toString()).when().post(getEndPointName()).then().body("String_Node_Str",is(IsochronesErrorCodes.INVALID_PARAMETER_VALUE)).statusCode(400);
}
Program: 35384
Project: 35384
Buggy source:
@SuppressWarnings("String_Node_Str") private static void initInternal(File configFile,String outputPath,boolean stdOut) throws IOException {
  List<Appender> appenders=new ArrayList<Appender>();
  Enumeration apps=LogManager.getRootLogger().getAllAppenders();
  while (apps.hasMoreElements()) {
    Appender appender=(Appender)apps.nextElement();
    if (!(appender instanceof ConsoleAppender || appender instanceof FileAppender))     appenders.add(appender);
  }
  Properties lprops=new Properties();
  lprops.load(new FileInputStream(configFile));
  LogManager.resetConfiguration();
  if (lprops.getProperty("String_Node_Str") == null)   lprops.put("String_Node_Str",outputPath);
  PropertyConfigurator.configure(lprops);
  if (!stdOut) {
    apps=org.apache.log4j.Logger.getRootLogger().getAllAppenders();
    while (apps.hasMoreElements()) {
      Appender appender=(Appender)apps.nextElement();
      if (appender instanceof org.apache.log4j.ConsoleAppender) {
        org.apache.log4j.Logger.getRootLogger().removeAppender(appender);
      }
    }
  }
  for (  Appender appender : appenders)   LogManager.getRootLogger().addAppender(appender);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private static void initInternal(File configFile,String outputPath,boolean stdOut) throws IOException {
  List<Appender> appenders=new ArrayList<Appender>();
  Enumeration apps=LogManager.getRootLogger().getAllAppenders();
  while (apps.hasMoreElements()) {
    Appender appender=(Appender)apps.nextElement();
    if (!(appender instanceof ConsoleAppender || appender instanceof FileAppender))     appenders.add(appender);
  }
  Properties lprops=new Properties();
  try (FileInputStream in=new FileInputStream(configFile)){
    ;
    lprops.load(in);
  }
   LogManager.resetConfiguration();
  if (lprops.getProperty("String_Node_Str") == null)   lprops.put("String_Node_Str",outputPath);
  PropertyConfigurator.configure(lprops);
  if (!stdOut) {
    apps=org.apache.log4j.Logger.getRootLogger().getAllAppenders();
    while (apps.hasMoreElements()) {
      Appender appender=(Appender)apps.nextElement();
      if (appender instanceof org.apache.log4j.ConsoleAppender) {
        org.apache.log4j.Logger.getRootLogger().removeAppender(appender);
      }
    }
  }
  for (  Appender appender : appenders)   LogManager.getRootLogger().addAppender(appender);
}
Program: 35385
Project: 35385
Buggy source:
public String getRoundabout(int exitNumber,String wayName){
  boolean isWayNull=Helper.isEmpty(wayName);
  String str=isWayNull ? _actionRoundaboutDefault : _actionRoundaboutName;
  if (isWayNull)   return str.replace("String_Node_Str",_numerals[exitNumber]);
 else   return str.replace("String_Node_Str",_numerals[exitNumber]).replace("String_Node_Str",wayName);
}

Fixed version (ground truth):
public String getRoundabout(int exitNumber,String wayName){
  boolean isWayNull=Helper.isEmpty(wayName);
  String str=isWayNull ? _actionRoundaboutDefault : _actionRoundaboutName;
  boolean isExitNull=(exitNumber == 0);
  if (isExitNull)   str=str.replace("String_Node_Str","String_Node_Str");
 else   str=str.replace("String_Node_Str",_numerals[exitNumber]);
  if (isWayNull)   return str;
 else   return str.replace("String_Node_Str",wayName);
}
Program: 35387
Project: 35387
Buggy source:
public void init(){
  if (edgesCount > 0)   throw new AssertionError("String_Node_Str");
  Directory d=new RAMDirectory();
  this.orsEdges=d.find("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * initializes the extended storage to be empty - required for testing purposes as the ext_storage aren't created at the time tests are run
 */
public void init(){
  if (edgesCount > 0)   throw new AssertionError("String_Node_Str");
  Directory d=new RAMDirectory();
  this.orsEdges=d.find("String_Node_Str");
}
Program: 35388
Project: 35388
Buggy source:
public ResultsValidationTest(){
  addParameter("String_Node_Str","String_Node_Str");
  addParameter("String_Node_Str","String_Node_Str");
  addParameter("String_Node_Str","String_Node_Str");
  addParameter("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
public ResultsValidationTest(){
  addParameter("String_Node_Str","String_Node_Str");
  addParameter("String_Node_Str","String_Node_Str");
  addParameter("String_Node_Str","String_Node_Str");
  addParameter("String_Node_Str","String_Node_Str");
  addParameter("String_Node_Str","String_Node_Str");
  addParameter("String_Node_Str","String_Node_Str");
  addParameter("String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  addParameter("String_Node_Str",new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"});
}
Program: 35389
Project: 35389
Buggy source:
/** 
 * initializes the extended storage by giving the base graph
 * @param graph
 * @param dir
 */
@Override public void init(Graph graph,Directory dir){
  if (edgesCount > 0)   throw new AssertionError("String_Node_Str");
  this.orsEdges=dir.find("String_Node_Str");
}

Fixed version (ground truth):
public void init(){
  if (edgesCount > 0)   throw new AssertionError("String_Node_Str");
  Directory d=new RAMDirectory();
  this.orsEdges=d.find("String_Node_Str");
}
Program: 35390
Project: 35390
Buggy source:
public BordersGraphStorageTest(){
  _storage=new BordersGraphStorage();
  _storage.create(1);
}

Fixed version (ground truth):
public BordersGraphStorageTest(){
  _storage=new BordersGraphStorage();
  _storage.init();
  _storage.create(1);
}
Program: 35392
Project: 35392
Buggy source:
public AppConfig(){
  URL url=RoutingProfileManager.class.getClassLoader().getResource("String_Node_Str");
  File file=new File(url.getPath());
  _config=ConfigFactory.parseFile(file);
  File graphsDir=new File("String_Node_Str");
  File[] md5Files=graphsDir.listFiles(new FileFilter(){
    public boolean accept(    File pathname){
      return pathname.getName().endsWith("String_Node_Str");
    }
  }
);
  if (md5Files.length == 1) {
    try {
      osm_md5_hash=FileUtility.readFile(md5Files[0].toString()).trim();
    }
 catch (    IOException e) {
      LOGGER.error(e);
    }
  }
}

Fixed version (ground truth):
public AppConfig(){
  URL url=RoutingProfileManager.class.getClassLoader().getResource("String_Node_Str");
  File file=new File(url.getPath());
  _config=ConfigFactory.parseFile(file);
  File graphsDir=new File("String_Node_Str");
  File[] md5Files=graphsDir.listFiles(new FileFilter(){
    public boolean accept(    File pathname){
      return pathname.getName().endsWith("String_Node_Str");
    }
  }
);
  if (md5Files != null && md5Files.length == 1) {
    try {
      osm_md5_hash=FileUtility.readFile(md5Files[0].toString()).trim();
    }
 catch (    IOException e) {
      LOGGER.error(e);
    }
  }
}
Program: 35395
Project: 35395
Buggy source:
public AppConfig(){
  URL url=RoutingProfileManager.class.getClassLoader().getResource("String_Node_Str");
  File file=new File(url.getPath());
  _config=ConfigFactory.parseFile(file);
  File graphsDir=new File("String_Node_Str");
  File[] md5Files=graphsDir.listFiles(new FileFilter(){
    public boolean accept(    File pathname){
      return pathname.getName().endsWith("String_Node_Str");
    }
  }
);
  if (md5Files != null && md5Files.length == 1) {
    try {
      osm_md5_hash=FileUtility.readFile(md5Files[0].toString()).trim();
    }
 catch (    IOException e) {
      LOGGER.error(e);
    }
  }
}

Fixed version (ground truth):
public AppConfig(){
  URL url=RoutingProfileManager.class.getClassLoader().getResource("String_Node_Str");
  File file=new File(url.getPath());
  _config=ConfigFactory.parseFile(file);
  File graphsDir=new File(getServiceParameter("String_Node_Str","String_Node_Str"));
  File[] md5Files=graphsDir.listFiles(new FileFilter(){
    public boolean accept(    File pathname){
      return pathname.getName().endsWith("String_Node_Str");
    }
  }
);
  if (md5Files != null && md5Files.length == 1) {
    try {
      osm_md5_hash=FileUtility.readFile(md5Files[0].toString()).trim();
    }
 catch (    IOException e) {
      LOGGER.error(e);
    }
  }
}
Program: 35398
Project: 35398
Buggy source:
/** 
 * Applies tags of nodes that lie on a way onto the way itself so that they are regarded in the following storage building process. E.g. a maxheight tag on a node will be treated like a maxheight tag on the way the node belongs to.
 * @param map  a map that projects node ids onto a property map
 * @param way	the way to process
 */
@Override protected void onProcessEdge(ReaderWay way,EdgeIteratorState edge){
  if (enrichInstructions && Helper.isEmpty(way.getTag("String_Node_Str")) && Helper.isEmpty(way.getTag("String_Node_Str"))) {
    try {
    }
 catch (    Exception ex) {
    }
  }
  try {
    if ((tmcEdges != null) && (osmId2EdgeIds != null)) {
      String highwayValue=way.getTag("String_Node_Str");
      if (!Helper.isEmpty(highwayValue)) {
        for (int i=0; i < TMC_ROAD_TYPES.length; i++) {
          if (TMC_ROAD_TYPES[i].equalsIgnoreCase(highwayValue)) {
            tmcEdges.put(edge.getEdge(),way.getId());
            if (osmId2EdgeIds.containsKey(way.getId())) {
              osmId2EdgeIds.get(way.getId()).add(edge.getEdge());
            }
 else {
              ArrayList<Integer> edgeIds=new ArrayList<Integer>();
              edgeIds.add(edge.getEdge());
              osmId2EdgeIds.put(way.getId(),edgeIds);
            }
            break;
          }
        }
      }
    }
    _procCntx.processEdge(way,edge);
  }
 catch (  Exception ex) {
    LOGGER.warning(ex.getMessage() + "String_Node_Str" + way.getId());
  }
}

Fixed version (ground truth):
@Override protected void onProcessEdge(ReaderWay way,EdgeIteratorState edge){
  if (enrichInstructions && Helper.isEmpty(way.getTag("String_Node_Str")) && Helper.isEmpty(way.getTag("String_Node_Str"))) {
    try {
    }
 catch (    Exception ex) {
    }
  }
  try {
    if ((tmcEdges != null) && (osmId2EdgeIds != null)) {
      String highwayValue=way.getTag("String_Node_Str");
      if (!Helper.isEmpty(highwayValue)) {
        for (int i=0; i < TMC_ROAD_TYPES.length; i++) {
          if (TMC_ROAD_TYPES[i].equalsIgnoreCase(highwayValue)) {
            tmcEdges.put(edge.getEdge(),way.getId());
            if (osmId2EdgeIds.containsKey(way.getId())) {
              osmId2EdgeIds.get(way.getId()).add(edge.getEdge());
            }
 else {
              ArrayList<Integer> edgeIds=new ArrayList<Integer>();
              edgeIds.add(edge.getEdge());
              osmId2EdgeIds.put(way.getId(),edgeIds);
            }
            break;
          }
        }
      }
    }
    _procCntx.processEdge(way,edge);
  }
 catch (  Exception ex) {
    LOGGER.warning(ex.getMessage() + "String_Node_Str" + way.getId());
  }
}
Program: 35399
Project: 35399
Buggy source:
/** 
 * Applies tags of nodes that lie on a way onto the way itself so that they are regarded in the following storage building process. E.g. a maxheight tag on a node will be treated like a maxheight tag on the way the node belongs to.
 * @param map  a map that projects node ids onto a property map
 * @param way	the way to process
 */
@Override public void applyNodeTagsToWay(HashMap<Long,Map<String,Object>> map,ReaderWay way){
  LongArrayList osmNodeIds=way.getNodes();
  int size=osmNodeIds.size();
  if (size > 2) {
    for (int i=1; i < size - 1; i++) {
      long nodeId=osmNodeIds.get(i);
      if (map.containsKey(nodeId)) {
        java.util.Iterator<Entry<String,Object>> it=map.get(nodeId).entrySet().iterator();
        while (it.hasNext()) {
          Map.Entry<String,Object> pairs=it.next();
          String key=pairs.getKey();
          String value=pairs.getValue().toString();
          if (hgv_tags.contains(key))           way.setTag(key,value);
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Applies tags of nodes that lie on a way onto the way itself so that they are regarded in the following storage building process. E.g. a maxheight tag on a node will be treated like a maxheight tag on the way the node belongs to.
 * @param map  a map that projects node ids onto a property map
 * @param way	the way to process
 */
@Override public void applyNodeTagsToWay(HashMap<Long,Map<String,Object>> map,ReaderWay way){
  LongArrayList osmNodeIds=way.getNodes();
  int size=osmNodeIds.size();
  if (size > 2) {
    for (int i=1; i < size - 1; i++) {
      long nodeId=osmNodeIds.get(i);
      if (map.containsKey(nodeId)) {
        java.util.Iterator<Entry<String,Object>> it=map.get(nodeId).entrySet().iterator();
        while (it.hasNext()) {
          Map.Entry<String,Object> pairs=it.next();
          String key=pairs.getKey();
          String value=pairs.getValue().toString();
          way.setTag(key,value);
        }
      }
    }
  }
}
Program: 35400
Project: 35400
Buggy source:
/** 
 * Applies tags of nodes that lie on a way onto the way itself so that they are regarded in the following storage building process. E.g. a maxheight tag on a node will be treated like a maxheight tag on the way the node belongs to.
 * @param map  a map that projects node ids onto a property map
 * @param way	the way to process
 */
@Override protected void onProcessEdge(ReaderWay way,EdgeIteratorState edge){
  if (enrichInstructions && Helper.isEmpty(way.getTag("String_Node_Str")) && Helper.isEmpty(way.getTag("String_Node_Str"))) {
    try {
    }
 catch (    Exception ex) {
    }
  }
  try {
    if ((tmcEdges != null) && (osmId2EdgeIds != null)) {
      String highwayValue=way.getTag("String_Node_Str");
      if (!Helper.isEmpty(highwayValue)) {
        for (int i=0; i < TMC_ROAD_TYPES.length; i++) {
          if (TMC_ROAD_TYPES[i].equalsIgnoreCase(highwayValue)) {
            tmcEdges.put(edge.getEdge(),way.getId());
            if (osmId2EdgeIds.containsKey(way.getId())) {
              osmId2EdgeIds.get(way.getId()).add(edge.getEdge());
            }
 else {
              ArrayList<Integer> edgeIds=new ArrayList<Integer>();
              edgeIds.add(edge.getEdge());
              osmId2EdgeIds.put(way.getId(),edgeIds);
            }
            break;
          }
        }
      }
    }
    _procCntx.processEdge(way,edge);
  }
 catch (  Exception ex) {
    LOGGER.warning(ex.getMessage() + "String_Node_Str" + way.getId());
  }
}

Fixed version (ground truth):
@Override protected void onProcessEdge(ReaderWay way,EdgeIteratorState edge){
  if (enrichInstructions && Helper.isEmpty(way.getTag("String_Node_Str")) && Helper.isEmpty(way.getTag("String_Node_Str"))) {
    try {
    }
 catch (    Exception ex) {
    }
  }
  try {
    if ((tmcEdges != null) && (osmId2EdgeIds != null)) {
      String highwayValue=way.getTag("String_Node_Str");
      if (!Helper.isEmpty(highwayValue)) {
        for (int i=0; i < TMC_ROAD_TYPES.length; i++) {
          if (TMC_ROAD_TYPES[i].equalsIgnoreCase(highwayValue)) {
            tmcEdges.put(edge.getEdge(),way.getId());
            if (osmId2EdgeIds.containsKey(way.getId())) {
              osmId2EdgeIds.get(way.getId()).add(edge.getEdge());
            }
 else {
              ArrayList<Integer> edgeIds=new ArrayList<Integer>();
              edgeIds.add(edge.getEdge());
              osmId2EdgeIds.put(way.getId(),edgeIds);
            }
            break;
          }
        }
      }
    }
    _procCntx.processEdge(way,edge);
  }
 catch (  Exception ex) {
    LOGGER.warning(ex.getMessage() + "String_Node_Str" + way.getId());
  }
}
Program: 35402
Project: 35402
Buggy source:
@Override public boolean accept(EdgeIteratorState edgeIterState){
  int adj=edgeIterState.getAdjNode();
  if (baseNode >= maxNodes || adj >= maxNodes)   return true;
  if (baseNodeLevel <= graph.getLevel(adj))   return edgeIterState.isBackward(encoder);
 else   return false;
}

Fixed version (ground truth):
@Override public boolean accept(EdgeIteratorState edgeIterState){
  int adj=edgeIterState.getAdjNode();
  if (baseNode >= maxNodes || adj >= maxNodes || baseNodeLevel <= graph.getLevel(adj))   return edgeIterState.isBackward(encoder);
 else   return false;
}
Program: 35403
Project: 35403
Buggy source:
@Override public boolean accept(EdgeIteratorState edgeIterState){
  int adj=edgeIterState.getAdjNode();
  if (baseNode >= maxNodes || adj >= maxNodes)   return true;
  if (baseNodeLevel <= graph.getLevel(adj))   return edgeIterState.isForward(encoder);
 else   return false;
}

Fixed version (ground truth):
@Override public boolean accept(EdgeIteratorState edgeIterState){
  int adj=edgeIterState.getAdjNode();
  if (baseNode >= maxNodes || adj >= maxNodes || baseNodeLevel <= graph.getLevel(adj))   return edgeIterState.isForward(encoder);
 else   return false;
}
Program: 35404
Project: 35404
Buggy source:
public MatrixResult computeMatrix(MatrixRequest req) throws Exception {
  RoutingProfile rp=_routeProfiles.getRouteProfile(req.getProfileType(),true);
  if (rp == null)   throw new InternalServerException(MatrixErrorCodes.UNKNOWN,"String_Node_Str");
  return rp.computeMatrix(req);
}

Fixed version (ground truth):
public MatrixResult computeMatrix(MatrixRequest req) throws Exception {
  RoutingProfile rp=_routeProfiles.getRouteProfile(req.getProfileType(),!req.getFlexibleMode());
  if (rp == null)   throw new InternalServerException(MatrixErrorCodes.UNKNOWN,"String_Node_Str");
  return rp.computeMatrix(req);
}
Program: 35405
Project: 35405
Buggy source:
private static Coordinate[] getLocations(Coordinate[] locations,int[] index,String elemName) throws Exception {
  Coordinate[] res=new Coordinate[index.length];
  for (int i=0; i < index.length; i++) {
    int idx=index[i];
    if (idx < 0 || idx >= locations.length)     throw new ParameterOutOfRangeException(MatrixErrorCodes.INVALID_PARAMETER_FORMAT,elemName,Integer.toString(idx),Integer.toString(locations.length));
    res[i]=locations[idx];
  }
  return res;
}

Fixed version (ground truth):
private static Coordinate[] getLocations(Coordinate[] locations,int[] index,String elemName) throws Exception {
  Coordinate[] res=new Coordinate[index.length];
  for (int i=0; i < index.length; i++) {
    int idx=index[i];
    if (idx < 0 || idx >= locations.length)     throw new ParameterOutOfRangeException(MatrixErrorCodes.INVALID_PARAMETER_FORMAT,elemName,Integer.toString(idx),Integer.toString(locations.length - 1));
    res[i]=locations[idx];
  }
  return res;
}
Program: 35407
Project: 35407
Buggy source:
public void initLMAlgoFactoryDecorator(){
  if (lmFactoryDecorator.hasWeightings())   return;
  for (  FlagEncoder encoder : encodingManager.fetchEdgeEncoders()) {
    for (    String lmWeightingStr : lmFactoryDecorator.getWeightingsAsStrings()) {
      Weighting weighting=createWeighting(new HintsMap(lmWeightingStr),encoder,null);
      lmFactoryDecorator.addWeighting(weighting);
    }
  }
}

Fixed version (ground truth):
public void initLMAlgoFactoryDecorator(){
  if (lmFactoryDecorator.hasWeightings())   return;
  for (  FlagEncoder encoder : encodingManager.fetchEdgeEncoders()) {
    for (    String lmWeightingStr : lmFactoryDecorator.getWeightingsAsStrings()) {
      Weighting weighting=createWeighting(new HintsMap(lmWeightingStr),traversalMode,encoder,null);
      lmFactoryDecorator.addWeighting(weighting);
    }
  }
}
Program: 35408
Project: 35408
Buggy source:
public void initCHAlgoFactoryDecorator(){
  if (!chFactoryDecorator.hasWeightings()) {
    for (    FlagEncoder encoder : encodingManager.fetchEdgeEncoders()) {
      for (      String chWeightingStr : chFactoryDecorator.getWeightingsAsStrings()) {
        Weighting weighting=createWeighting(new HintsMap(chWeightingStr),encoder,null);
        chFactoryDecorator.addWeighting(weighting);
      }
    }
  }
}

Fixed version (ground truth):
public void initCHAlgoFactoryDecorator(){
  if (!chFactoryDecorator.hasWeightings()) {
    for (    FlagEncoder encoder : encodingManager.fetchEdgeEncoders()) {
      for (      String chWeightingStr : chFactoryDecorator.getWeightingsAsStrings()) {
        Weighting weighting=createWeighting(new HintsMap(chWeightingStr),traversalMode,encoder,null);
        chFactoryDecorator.addWeighting(weighting);
      }
    }
  }
}
Program: 35410
Project: 35410
Buggy source:
public Weighting createWeighting(HintsMap hintsMap,FlagEncoder encoder,Graph gh,LocationIndex locationIndex,GraphHopperStorage graphStorage){
  String weightingStr=hintsMap.getWeighting().toLowerCase();
  Weighting weighting=null;
  if (encoder.supports(GenericWeighting.class)) {
    weighting=new GenericWeighting((com.graphhopper.routing.util.DataFlagEncoder)encoder,hintsMap);
  }
 else   if ("String_Node_Str".equalsIgnoreCase(weightingStr)) {
    weighting=new ShortestWeighting(encoder,hintsMap);
  }
 else   if ("String_Node_Str".equalsIgnoreCase(weightingStr) || weightingStr.isEmpty()) {
    if (encoder.supports(PriorityWeighting.class))     weighting=new PriorityWeighting(encoder,hintsMap);
 else     weighting=new FastestWeighting(encoder,hintsMap);
  }
 else   if ("String_Node_Str".equalsIgnoreCase(weightingStr)) {
    if (encoder.supports(CurvatureWeighting.class))     weighting=new CurvatureWeighting(encoder,hintsMap);
  }
 else   if ("String_Node_Str".equalsIgnoreCase(weightingStr)) {
    weighting=new ShortFastestWeighting(encoder,hintsMap);
  }
  if (weighting == null)   throw new IllegalArgumentException("String_Node_Str" + weighting + "String_Node_Str");
  if (hintsMap.has(Routing.BLOCK_AREA)) {
    String blockAreaStr=hintsMap.get(Parameters.Routing.BLOCK_AREA,"String_Node_Str");
    GraphEdgeIdFinder.BlockArea blockArea=new GraphEdgeIdFinder(gh,locationIndex).parseBlockArea(blockAreaStr,new DefaultEdgeFilter(encoder));
    return new BlockAreaWeighting(weighting,blockArea);
  }
  return weighting;
}

Fixed version (ground truth):
public Weighting createWeighting(HintsMap hintsMap,TraversalMode tMode,FlagEncoder encoder,Graph gh,LocationIndex locationIndex,GraphHopperStorage graphStorage){
  String weightingStr=hintsMap.getWeighting().toLowerCase();
  Weighting weighting=null;
  if (encoder.supports(GenericWeighting.class)) {
    weighting=new GenericWeighting((com.graphhopper.routing.util.DataFlagEncoder)encoder,hintsMap);
  }
 else   if ("String_Node_Str".equalsIgnoreCase(weightingStr)) {
    weighting=new ShortestWeighting(encoder,hintsMap);
  }
 else   if ("String_Node_Str".equalsIgnoreCase(weightingStr) || weightingStr.isEmpty()) {
    if (encoder.supports(PriorityWeighting.class))     weighting=new PriorityWeighting(encoder,hintsMap);
 else     weighting=new FastestWeighting(encoder,hintsMap);
  }
 else   if ("String_Node_Str".equalsIgnoreCase(weightingStr)) {
    if (encoder.supports(CurvatureWeighting.class))     weighting=new CurvatureWeighting(encoder,hintsMap);
  }
 else   if ("String_Node_Str".equalsIgnoreCase(weightingStr)) {
    weighting=new ShortFastestWeighting(encoder,hintsMap);
  }
  if (weighting == null)   throw new IllegalArgumentException("String_Node_Str" + weighting + "String_Node_Str");
  if (hintsMap.has(Routing.BLOCK_AREA)) {
    String blockAreaStr=hintsMap.get(Parameters.Routing.BLOCK_AREA,"String_Node_Str");
    GraphEdgeIdFinder.BlockArea blockArea=new GraphEdgeIdFinder(gh,locationIndex).parseBlockArea(blockAreaStr,new DefaultEdgeFilter(encoder));
    return new BlockAreaWeighting(weighting,blockArea);
  }
  return weighting;
}
Program: 35411
Project: 35411
Buggy source:
public Weighting createWeighting(HintsMap hintsMap,FlagEncoder encoder,Graph graph,LocationIndex index,GraphHopperStorage graphStorage);

Fixed version (ground truth):
public Weighting createWeighting(HintsMap hintsMap,TraversalMode tMode,FlagEncoder encoder,Graph graph,LocationIndex index,GraphHopperStorage graphStorage);
Program: 35413
Project: 35413
Buggy source:
@Test public void testIntersections(){
  given().param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().body("String_Node_Str",is(true)).body("String_Node_Str",is(true)).body("String_Node_Str",is(3)).body("String_Node_Str",is("String_Node_Str")).body("String_Node_Str",is("String_Node_Str")).body("String_Node_Str",is("String_Node_Str")).body("String_Node_Str",is("String_Node_Str")).body("String_Node_Str",is("String_Node_Str")).body("String_Node_Str",is("String_Node_Str")).body("String_Node_Str",is(26)).body("String_Node_Str",is(2)).body("String_Node_Str",is(true)).body("String_Node_Str",is(5256049.5f)).body("String_Node_Str",is(0)).body("String_Node_Str",is(0)).body("String_Node_Str",is(1)).body("String_Node_Str",is(0)).statusCode(200);
}

Fixed version (ground truth):
@Test public void testIntersections(){
  given().param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().body("String_Node_Str",is(true)).body("String_Node_Str",is(true)).body("String_Node_Str",is(3)).body("String_Node_Str",is("String_Node_Str")).body("String_Node_Str",is("String_Node_Str")).body("String_Node_Str",is("String_Node_Str")).body("String_Node_Str",is("String_Node_Str")).body("String_Node_Str",is("String_Node_Str")).body("String_Node_Str",is("String_Node_Str")).body("String_Node_Str",is(28)).body("String_Node_Str",is(2)).body("String_Node_Str",is(true)).body("String_Node_Str",is(5846232.5f)).body("String_Node_Str",is(0)).body("String_Node_Str",is(0)).body("String_Node_Str",is(1)).body("String_Node_Str",is(0)).statusCode(200);
}
Program: 35414
Project: 35414
Buggy source:
@Test public void testReachfactorAndArea(){
  given().param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().body("String_Node_Str",is(true)).body("String_Node_Str",is(true)).body("String_Node_Str",is(1.4087912E7f)).body("String_Node_Str",is(0.1453f)).statusCode(200);
}

Fixed version (ground truth):
@Test public void testReachfactorAndArea(){
  given().param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().body("String_Node_Str",is(true)).body("String_Node_Str",is(true)).body("String_Node_Str",is(1.4704981E7f)).body("String_Node_Str",is(0.1517f)).statusCode(200);
}
Program: 35415
Project: 35415
Buggy source:
@Test public void testPolygon(){
  given().param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().body("String_Node_Str",is(true)).body("String_Node_Str",is(true)).body("String_Node_Str",is(30)).body("String_Node_Str",is(2)).body("String_Node_Str",is(8.684177f)).body("String_Node_Str",is(49.423034f)).body("String_Node_Str",hasItems(8.663306f,49.409462f,8.695987f,49.43984f)).body("String_Node_Str",is("String_Node_Str")).body("String_Node_Str",is("String_Node_Str")).body("String_Node_Str",is(0)).body("String_Node_Str",is(400)).statusCode(200);
}

Fixed version (ground truth):
@Test public void testPolygon(){
  given().param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().body("String_Node_Str",is(true)).body("String_Node_Str",is(true)).body("String_Node_Str",is(31)).body("String_Node_Str",is(2)).body("String_Node_Str",is(8.684177f)).body("String_Node_Str",is(49.423034f)).body("String_Node_Str",hasItems(8.662622f,49.409115f,8.695995f,49.440483f)).body("String_Node_Str",is("String_Node_Str")).body("String_Node_Str",is("String_Node_Str")).body("String_Node_Str",is(0)).body("String_Node_Str",is(400)).statusCode(200);
}
Program: 35416
Project: 35416
Buggy source:
@Test public void testExtrasDetails(){
  given().param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str","String_Node_Str").param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str",getParameter("String_Node_Str")).when().get(getEndPointName()).then().assertThat().body("String_Node_Str",is(true)).body("String_Node_Str",is(true)).body("String_Node_Str",is(35)).body("String_Node_Str",is(533)).body("String_Node_Str",is(452)).body("String_Node_Str",is(339)).statusCode(200);
}

Fixed version (ground truth):
@Test public void testExtrasDetails(){
  given().param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str","String_Node_Str").param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str",getParameter("String_Node_Str")).when().get(getEndPointName()).then().assertThat().body("String_Node_Str",is(true)).body("String_Node_Str",is(true)).body("String_Node_Str",is(35)).body("String_Node_Str",is(533)).body("String_Node_Str",is(452)).body("String_Node_Str",is(346)).statusCode(200);
}
Program: 35417
Project: 35417
Buggy source:
@Test public void testSteps(){
  given().param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str","String_Node_Str").param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str",getParameter("String_Node_Str")).when().get(getEndPointName()).then().assertThat().body("String_Node_Str",is(true)).body("String_Node_Str",is(true)).body("String_Node_Str",is(true)).body("String_Node_Str",is(46)).body("String_Node_Str",is(31)).statusCode(200);
}

Fixed version (ground truth):
@Test public void testSteps(){
  given().param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str","String_Node_Str").param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str",getParameter("String_Node_Str")).when().get(getEndPointName()).then().assertThat().body("String_Node_Str",is(true)).body("String_Node_Str",is(true)).body("String_Node_Str",is(true)).body("String_Node_Str",is(46)).body("String_Node_Str",is(30)).statusCode(200);
}
Program: 35418
Project: 35418
Buggy source:
@Test public void testStepsDetails(){
  given().param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str","String_Node_Str").param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str",getParameter("String_Node_Str")).when().get(getEndPointName()).then().assertThat().body("String_Node_Str",is(true)).body("String_Node_Str",is(true)).body("String_Node_Str",is(true)).body("String_Node_Str",is(46)).body("String_Node_Str",is(31)).body("String_Node_Str",is(511.4f)).body("String_Node_Str",is(230.1f)).body("String_Node_Str",is(11)).body("String_Node_Str",is("String_Node_Str")).body("String_Node_Str",is(303.2f)).body("String_Node_Str",is(60.6f)).body("String_Node_Str",is(5)).body("String_Node_Str",is("String_Node_Str")).statusCode(200);
}

Fixed version (ground truth):
@Test public void testStepsDetails(){
  given().param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str","String_Node_Str").param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str",getParameter("String_Node_Str")).when().get(getEndPointName()).then().assertThat().body("String_Node_Str",is(true)).body("String_Node_Str",is(true)).body("String_Node_Str",is(true)).body("String_Node_Str",is(46)).body("String_Node_Str",is(30)).body("String_Node_Str",is(511.4f)).body("String_Node_Str",is(230.1f)).body("String_Node_Str",is(11)).body("String_Node_Str",is("String_Node_Str")).body("String_Node_Str",is(303.2f)).body("String_Node_Str",is(60.6f)).body("String_Node_Str",is(5)).body("String_Node_Str",is("String_Node_Str")).statusCode(200);
}
Program: 35419
Project: 35419
Buggy source:
public List<ExtraSummaryItem> getSummary(DistanceUnit units,boolean sort) throws Exception {
  List<ExtraSummaryItem> summary=new ArrayList<ExtraSummaryItem>();
  if (_segments.size() > 0) {
    Comparator<ExtraSummaryItem> comp=(    ExtraSummaryItem a,    ExtraSummaryItem b) -> {
      return Double.compare(b.getAmount(),a.getAmount());
    }
;
    double totalDist=0.0;
    Map<Integer,Double> stats=new HashMap<Integer,Double>();
    for (    RouteSegmentItem seg : _segments) {
      Double value=stats.get(seg.getValue());
      if (value == null)       stats.put(seg.getValue(),seg.getDistance());
 else {
        value+=seg.getDistance();
        stats.put(seg.getValue(),value);
      }
      totalDist+=seg.getDistance();
    }
    if (totalDist != 0.0) {
      int unitDecimals=FormatUtility.getUnitDecimals(units);
      for (      Map.Entry<Integer,Double> entry : stats.entrySet()) {
        ExtraSummaryItem esi=new ExtraSummaryItem(entry.getKey(),FormatUtility.roundToDecimals(DistanceUnitUtil.convert(entry.getValue(),DistanceUnit.Meters,units),unitDecimals),FormatUtility.roundToDecimals(entry.getValue() * 100.0 / totalDist,2));
        summary.add(esi);
      }
      if (sort)       summary.sort(comp);
    }
  }
  return summary;
}

Fixed version (ground truth):
public List<ExtraSummaryItem> getSummary(DistanceUnit units,boolean sort) throws Exception {
  List<ExtraSummaryItem> summary=new ArrayList<ExtraSummaryItem>();
  if (_segments.size() > 0) {
    Comparator<ExtraSummaryItem> comp=(    ExtraSummaryItem a,    ExtraSummaryItem b) -> {
      return Double.compare(b.getAmount(),a.getAmount());
    }
;
    double totalDist=0.0;
    Map<Integer,Double> stats=new HashMap<Integer,Double>();
    for (    RouteSegmentItem seg : _segments) {
      Double value=stats.get(seg.getValue());
      if (value == null)       stats.put(seg.getValue(),seg.getDistance());
 else {
        value+=seg.getDistance();
        stats.put(seg.getValue(),value);
      }
      totalDist+=seg.getDistance();
    }
    if (totalDist != 0.0) {
      int unitDecimals=FormatUtility.getUnitDecimals(units);
      for (      Map.Entry<Integer,Double> entry : stats.entrySet()) {
        Double value=entry.getValue() / _factor;
        ExtraSummaryItem esi=new ExtraSummaryItem(entry.getKey(),FormatUtility.roundToDecimals(DistanceUnitUtil.convert(value,DistanceUnit.Meters,units),unitDecimals),FormatUtility.roundToDecimals(value * 100.0 / totalDist,2));
        summary.add(esi);
      }
      if (sort)       summary.sort(comp);
    }
  }
  return summary;
}
Program: 35424
Project: 35424
Buggy source:
public SteepnessExtraInfoBuilder(RouteExtraInfo extraInfo){
  super(extraInfo);
  _distCalc=new DistanceCalcEarth();
}

Fixed version (ground truth):
public SteepnessExtraInfoBuilder(RouteExtraInfo extraInfo){
  super(extraInfo);
  _distCalc=Helper.DIST_EARTH;
}
Program: 35425
Project: 35425
Buggy source:
public void addSegment(double value,int valueIndex,PointList geom,double dist,boolean lastEdge){
}

Fixed version (ground truth):
public void addSegment(double value,int valueIndex,PointList geom,double dist,boolean lastEdge){
  _lastEdge=lastEdge;
}
Program: 35427
Project: 35427
Buggy source:
public void setFlexibleMode(boolean _flexibleMode){
  this._flexibleMode=_flexibleMode;
}

Fixed version (ground truth):
public void setFlexibleMode(boolean flexibleMode){
  _flexibleMode=flexibleMode;
}
Program: 35428
Project: 35428
Buggy source:
public static int getMaximumRange(int profileType,TravelRangeType range){
  Integer res=0;
switch (range) {
case Distance:
    res=profileMaxRangeDistances.get(profileType);
  if (res == null)   res=maximumRangeDistance;
break;
case Time:
res=profileMaxRangeTimes.get(profileType);
if (res == null) res=maximumRangeTime;
break;
}
return res;
}

Fixed version (ground truth):
public static int getMaximumRange(int profileType,TravelRangeType range){
  Integer res=0;
switch (range) {
case Distance:
    res=maximumRangeDistance;
  if (profileMaxRangeDistances != null && profileMaxRangeDistances.containsKey(profileType)) {
    res=profileMaxRangeDistances.get(profileType);
  }
break;
case Time:
res=maximumRangeTime;
if (profileMaxRangeTimes != null && profileMaxRangeTimes.containsKey(profileType)) {
res=profileMaxRangeTimes.get(profileType);
}
break;
}
return res;
}
Program: 35432
Project: 35432
Buggy source:
private boolean parseCSVrow(String row,String[] rowValues){
  if (Helper.isEmpty(row))   return false;
  int pos=row.indexOf(',');
  if (pos > 0) {
    rowValues[0]=row.substring(0,pos).trim();
    rowValues[1]=row.substring(pos + 1,row.length()).trim();
    if (Helper.isEmpty(rowValues[0]) || Helper.isEmpty(rowValues[1]))     return false;
    return true;
  }
 else   return false;
}

Fixed version (ground truth):
private boolean parseCSVrow(String row,char separator,String[] rowValues){
  if (Helper.isEmpty(row))   return false;
  int pos=row.indexOf(separator);
  if (pos > 0) {
    rowValues[0]=row.substring(0,pos).trim();
    rowValues[1]=row.substring(pos + 1,row.length()).trim();
    if (Helper.isEmpty(rowValues[0]) || Helper.isEmpty(rowValues[1]))     return false;
    return true;
  }
 else   return false;
}
Program: 35433
Project: 35433
Buggy source:
private void readGreenIndicesFromCSV(String csvFile) throws IOException {
  BufferedReader csvBuffer=null;
  try {
    String row;
    csvBuffer=new BufferedReader(new FileReader(csvFile));
    csvBuffer.readLine();
    String[] rowValues=new String[2];
    while ((row=csvBuffer.readLine()) != null) {
      if (!parseCSVrow(row,rowValues))       continue;
      _greenIndices.put(Long.parseLong(rowValues[0]),Double.parseDouble(rowValues[1]));
    }
  }
 catch (  IOException openFileEx) {
    openFileEx.printStackTrace();
    throw openFileEx;
  }
 finally {
    if (csvBuffer != null)     csvBuffer.close();
  }
}

Fixed version (ground truth):
private void readGreenIndicesFromCSV(String csvFile) throws IOException {
  BufferedReader csvBuffer=null;
  try {
    String row;
    csvBuffer=new BufferedReader(new FileReader(csvFile));
    row=csvBuffer.readLine();
    char separator=row.contains("String_Node_Str") ? ';' : ',';
    String[] rowValues=new String[2];
    while ((row=csvBuffer.readLine()) != null) {
      if (!parseCSVrow(row,separator,rowValues))       continue;
      _greenIndices.put(Long.parseLong(rowValues[0]),Double.parseDouble(rowValues[1]));
    }
  }
 catch (  IOException openFileEx) {
    openFileEx.printStackTrace();
    throw openFileEx;
  }
 finally {
    if (csvBuffer != null)     csvBuffer.close();
  }
}
Program: 35434
Project: 35434
Buggy source:
/** 
 * @param weightToPrioMap associate a weight with every priority. This sorted map allowssubclasses to 'insert' more important priorities as well as overwrite determined priorities.
 */
protected void collect(OSMWay way,TreeMap<Double,Integer> weightToPrioMap){
  String highway=way.getTag("String_Node_Str");
  if (way.hasTag("String_Node_Str","String_Node_Str"))   weightToPrioMap.put(100d,PREFER.getValue());
  double maxSpeed=getMaxSpeed(way);
  if (safeHighwayTags.contains(highway) || maxSpeed > 0 && maxSpeed <= 20) {
    weightToPrioMap.put(40d,PREFER.getValue());
    if (way.hasTag("String_Node_Str",intendedValues)) {
      if (way.hasTag("String_Node_Str","String_Node_Str"))       weightToPrioMap.put(40d,REACH_DEST.getValue());
 else       weightToPrioMap.put(40d,UNCHANGED.getValue());
    }
  }
 else   if (maxSpeed > 50 || avoidHighwayTags.contains(highway)) {
    if (way.hasTag("String_Node_Str","String_Node_Str"))     weightToPrioMap.put(45d,WORST.getValue());
 else     if (way.hasTag("String_Node_Str","String_Node_Str"))     weightToPrioMap.put(45d,REACH_DEST.getValue());
 else     weightToPrioMap.put(45d,AVOID_AT_ALL_COSTS.getValue());
  }
  if (way.hasTag("String_Node_Str","String_Node_Str") || way.hasTag("String_Node_Str","String_Node_Str"))   weightToPrioMap.put(44d,AVOID_IF_POSSIBLE.getValue());
}

Fixed version (ground truth):
/** 
 * @param weightToPrioMap associate a weight with every priority. This sorted map allowssubclasses to 'insert' more important priorities as well as overwrite determined priorities.
 */
protected void collect(OSMWay way,TreeMap<Double,Integer> weightToPrioMap){
  String highway=way.getTag("String_Node_Str");
  if (way.hasTag("String_Node_Str","String_Node_Str"))   weightToPrioMap.put(100d,PREFER.getValue());
  double maxSpeed=getMaxSpeed(way);
  if (safeHighwayTags.contains(highway) || maxSpeed > 0 && maxSpeed <= 20) {
    weightToPrioMap.put(40d,PREFER.getValue());
    if (way.hasTag("String_Node_Str",intendedValues)) {
      if (way.hasTag("String_Node_Str","String_Node_Str"))       weightToPrioMap.put(40d,REACH_DEST.getValue());
 else       weightToPrioMap.put(40d,UNCHANGED.getValue());
    }
  }
 else   if (maxSpeed > 50 || avoidHighwayTags.contains(highway)) {
    if (maxSpeed > 0 && maxSpeed <= 30) {
      if (way.hasTag("String_Node_Str","String_Node_Str") || way.hasTag("String_Node_Str","String_Node_Str"))       weightToPrioMap.put(40d,PREFER.getValue());
 else       weightToPrioMap.put(40d,UNCHANGED.getValue());
    }
 else {
      if (way.hasTag("String_Node_Str","String_Node_Str"))       weightToPrioMap.put(45d,WORST.getValue());
 else       if (way.hasTag("String_Node_Str","String_Node_Str") || way.hasTag("String_Node_Str","String_Node_Str"))       weightToPrioMap.put(45d,REACH_DEST.getValue());
 else       weightToPrioMap.put(45d,AVOID_AT_ALL_COSTS.getValue());
    }
  }
  if (way.hasTag("String_Node_Str","String_Node_Str") || way.hasTag("String_Node_Str","String_Node_Str"))   weightToPrioMap.put(44d,AVOID_IF_POSSIBLE.getValue());
}