Program: 35421
Project: 35421
Buggy source:
public ExtraInfoProcessor(ORSGraphHopper graphHopper,RoutingRequest req) throws Exception {
  _profileType=req.getSearchParameters().getProfileType();
  int extraInfo=req.getExtraInfo();
  if (RouteExtraInfoFlag.isSet(extraInfo,RouteExtraInfoFlag.WayCategory)) {
    _extWayCategory=GraphStorageUtils.getGraphExtension(graphHopper.getGraphHopperStorage(),WayCategoryGraphStorage.class);
    if (_extWayCategory == null)     throw new Exception("String_Node_Str");
    _wayCategoryInfo=new RouteExtraInfo("String_Node_Str");
    _wayCategoryInfoBuilder=new SimpleRouteExtraInfoBuilder(_wayCategoryInfo);
  }
  if (RouteExtraInfoFlag.isSet(extraInfo,RouteExtraInfoFlag.Surface) || RouteExtraInfoFlag.isSet(extraInfo,RouteExtraInfoFlag.WayType)) {
    _extWaySurface=GraphStorageUtils.getGraphExtension(graphHopper.getGraphHopperStorage(),WaySurfaceTypeGraphStorage.class);
    if (_extWaySurface == null)     throw new Exception("String_Node_Str");
    if (RouteExtraInfoFlag.isSet(extraInfo,RouteExtraInfoFlag.Surface)) {
      _surfaceInfo=new RouteExtraInfo("String_Node_Str");
      _surfaceInfoBuilder=new SimpleRouteExtraInfoBuilder(_surfaceInfo);
    }
    if (RouteExtraInfoFlag.isSet(extraInfo,RouteExtraInfoFlag.WayType)) {
      _wayTypeInfo=new RouteExtraInfo("String_Node_Str");
      _wayTypeInfoBuilder=new SimpleRouteExtraInfoBuilder(_wayTypeInfo);
    }
  }
  if (RouteExtraInfoFlag.isSet(extraInfo,RouteExtraInfoFlag.Steepness)) {
    _steepnessInfo=new RouteExtraInfo("String_Node_Str");
    _steepnessInfoBuilder=new SteepnessExtraInfoBuilder(_steepnessInfo);
  }
  if (RouteExtraInfoFlag.isSet(extraInfo,RouteExtraInfoFlag.Suitability)) {
    _waySuitabilityInfo=new RouteExtraInfo("String_Node_Str");
    _waySuitabilityInfoBuilder=new SimpleRouteExtraInfoBuilder(_waySuitabilityInfo);
  }
  if (RouteExtraInfoFlag.isSet(extraInfo,RouteExtraInfoFlag.AvgSpeed)) {
    _avgSpeedInfo=new RouteExtraInfo("String_Node_Str");
    _avgSpeedInfo.setFactor(10);
    _avgSpeedInfoBuilder=new SimpleRouteExtraInfoBuilder(_avgSpeedInfo);
  }
  if (RouteExtraInfoFlag.isSet(extraInfo,RouteExtraInfoFlag.Tollways)) {
    _extTollways=GraphStorageUtils.getGraphExtension(graphHopper.getGraphHopperStorage(),TollwaysGraphStorage.class);
    if (_extTollways == null)     throw new Exception("String_Node_Str");
    _tollwaysInfo=new RouteExtraInfo("String_Node_Str");
    _tollwaysInfoBuilder=new SimpleRouteExtraInfoBuilder(_tollwaysInfo);
    _tollwayExtractor=new TollwayExtractor(_extTollways,req.getSearchParameters().getVehicleType(),req.getSearchParameters().getProfileParameters());
  }
  if (RouteExtraInfoFlag.isSet(extraInfo,RouteExtraInfoFlag.TrailDifficulty)) {
    _extTrailDifficulty=GraphStorageUtils.getGraphExtension(graphHopper.getGraphHopperStorage(),TrailDifficultyScaleGraphStorage.class);
    _extHillIndex=GraphStorageUtils.getGraphExtension(graphHopper.getGraphHopperStorage(),HillIndexGraphStorage.class);
    _trailDifficultyInfo=new RouteExtraInfo("String_Node_Str");
    _trailDifficultyInfoBuilder=new SimpleRouteExtraInfoBuilder(_trailDifficultyInfo);
  }
  if (RouteExtraInfoFlag.isSet(extraInfo,RouteExtraInfoFlag.Green)) {
    _extGreenIndex=GraphStorageUtils.getGraphExtension(graphHopper.getGraphHopperStorage(),GreenIndexGraphStorage.class);
    if (_extGreenIndex == null)     throw new Exception("String_Node_Str");
    _greenInfo=new RouteExtraInfo("String_Node_Str");
    _greenInfoBuilder=new SimpleRouteExtraInfoBuilder(_greenInfo);
  }
  if (RouteExtraInfoFlag.isSet(extraInfo,RouteExtraInfoFlag.Noise)) {
    _extNoiseIndex=GraphStorageUtils.getGraphExtension(graphHopper.getGraphHopperStorage(),NoiseIndexGraphStorage.class);
    if (_extNoiseIndex == null)     throw new Exception("String_Node_Str");
    _noiseInfo=new RouteExtraInfo("String_Node_Str");
    _noiseInfoBuilder=new SimpleRouteExtraInfoBuilder(_noiseInfo);
  }
  buffer=new byte[4];
}

Fixed version (ground truth):
public ExtraInfoProcessor(ORSGraphHopper graphHopper,RoutingRequest req) throws Exception {
  _profileType=req.getSearchParameters().getProfileType();
  _maximumSpeed=req.getSearchParameters().getMaximumSpeed();
  int extraInfo=req.getExtraInfo();
  if (RouteExtraInfoFlag.isSet(extraInfo,RouteExtraInfoFlag.WayCategory)) {
    _extWayCategory=GraphStorageUtils.getGraphExtension(graphHopper.getGraphHopperStorage(),WayCategoryGraphStorage.class);
    if (_extWayCategory == null)     throw new Exception("String_Node_Str");
    _wayCategoryInfo=new RouteExtraInfo("String_Node_Str");
    _wayCategoryInfoBuilder=new SimpleRouteExtraInfoBuilder(_wayCategoryInfo);
  }
  if (RouteExtraInfoFlag.isSet(extraInfo,RouteExtraInfoFlag.Surface) || RouteExtraInfoFlag.isSet(extraInfo,RouteExtraInfoFlag.WayType)) {
    _extWaySurface=GraphStorageUtils.getGraphExtension(graphHopper.getGraphHopperStorage(),WaySurfaceTypeGraphStorage.class);
    if (_extWaySurface == null)     throw new Exception("String_Node_Str");
    if (RouteExtraInfoFlag.isSet(extraInfo,RouteExtraInfoFlag.Surface)) {
      _surfaceInfo=new RouteExtraInfo("String_Node_Str");
      _surfaceInfoBuilder=new SimpleRouteExtraInfoBuilder(_surfaceInfo);
    }
    if (RouteExtraInfoFlag.isSet(extraInfo,RouteExtraInfoFlag.WayType)) {
      _wayTypeInfo=new RouteExtraInfo("String_Node_Str");
      _wayTypeInfoBuilder=new SimpleRouteExtraInfoBuilder(_wayTypeInfo);
    }
  }
  if (RouteExtraInfoFlag.isSet(extraInfo,RouteExtraInfoFlag.Steepness)) {
    _steepnessInfo=new RouteExtraInfo("String_Node_Str");
    _steepnessInfoBuilder=new SteepnessExtraInfoBuilder(_steepnessInfo);
  }
  if (RouteExtraInfoFlag.isSet(extraInfo,RouteExtraInfoFlag.Suitability)) {
    _waySuitabilityInfo=new RouteExtraInfo("String_Node_Str");
    _waySuitabilityInfoBuilder=new SimpleRouteExtraInfoBuilder(_waySuitabilityInfo);
  }
  if (RouteExtraInfoFlag.isSet(extraInfo,RouteExtraInfoFlag.AvgSpeed)) {
    _avgSpeedInfo=new RouteExtraInfo("String_Node_Str");
    _avgSpeedInfo.setFactor(10);
    _avgSpeedInfoBuilder=new SimpleRouteExtraInfoBuilder(_avgSpeedInfo);
  }
  if (RouteExtraInfoFlag.isSet(extraInfo,RouteExtraInfoFlag.Tollways)) {
    _extTollways=GraphStorageUtils.getGraphExtension(graphHopper.getGraphHopperStorage(),TollwaysGraphStorage.class);
    if (_extTollways == null)     throw new Exception("String_Node_Str");
    _tollwaysInfo=new RouteExtraInfo("String_Node_Str");
    _tollwaysInfoBuilder=new SimpleRouteExtraInfoBuilder(_tollwaysInfo);
    _tollwayExtractor=new TollwayExtractor(_extTollways,req.getSearchParameters().getVehicleType(),req.getSearchParameters().getProfileParameters());
  }
  if (RouteExtraInfoFlag.isSet(extraInfo,RouteExtraInfoFlag.TrailDifficulty)) {
    _extTrailDifficulty=GraphStorageUtils.getGraphExtension(graphHopper.getGraphHopperStorage(),TrailDifficultyScaleGraphStorage.class);
    _extHillIndex=GraphStorageUtils.getGraphExtension(graphHopper.getGraphHopperStorage(),HillIndexGraphStorage.class);
    _trailDifficultyInfo=new RouteExtraInfo("String_Node_Str");
    _trailDifficultyInfoBuilder=new SimpleRouteExtraInfoBuilder(_trailDifficultyInfo);
  }
  if (RouteExtraInfoFlag.isSet(extraInfo,RouteExtraInfoFlag.Green)) {
    _extGreenIndex=GraphStorageUtils.getGraphExtension(graphHopper.getGraphHopperStorage(),GreenIndexGraphStorage.class);
    if (_extGreenIndex == null)     throw new Exception("String_Node_Str");
    _greenInfo=new RouteExtraInfo("String_Node_Str");
    _greenInfoBuilder=new SimpleRouteExtraInfoBuilder(_greenInfo);
  }
  if (RouteExtraInfoFlag.isSet(extraInfo,RouteExtraInfoFlag.Noise)) {
    _extNoiseIndex=GraphStorageUtils.getGraphExtension(graphHopper.getGraphHopperStorage(),NoiseIndexGraphStorage.class);
    if (_extNoiseIndex == null)     throw new Exception("String_Node_Str");
    _noiseInfo=new RouteExtraInfo("String_Node_Str");
    _noiseInfoBuilder=new SimpleRouteExtraInfoBuilder(_noiseInfo);
  }
  buffer=new byte[4];
}