Program: 35393
Project: 35393
Buggy source:
/** 
 * Creates an edges filter which accepts both direction of the specified vehicle.
 */
public HeavyVehicleEdgeFilter(FlagEncoder encoder,boolean in,boolean out,int vehicleType,VehicleParameters vehicleParams,GraphStorage graphStorage){
  this.encoder=encoder;
  this.in=in;
  this.out=out;
  this.hasHazmat=VehicleLoadCharacteristicsFlags.isSet(vehicleParams.getLoadCharacteristics(),VehicleLoadCharacteristicsFlags.HAZMAT);
  float[] vehicleAttrs=new float[VehicleDimensionRestrictions.Count];
  vehicleAttrs[VehicleDimensionRestrictions.MaxHeight]=(float)vehicleParams.getHeight();
  vehicleAttrs[VehicleDimensionRestrictions.MaxWidth]=(float)vehicleParams.getWidth();
  vehicleAttrs[VehicleDimensionRestrictions.MaxWeight]=(float)vehicleParams.getWeight();
  vehicleAttrs[VehicleDimensionRestrictions.MaxLength]=(float)vehicleParams.getLength();
  vehicleAttrs[VehicleDimensionRestrictions.MaxAxleLoad]=(float)vehicleParams.getAxleload();
  ArrayList<Integer> idx=new ArrayList<Integer>();
  for (int i=0; i < VehicleDimensionRestrictions.Count; i++) {
    float value=vehicleAttrs[i];
    if (value > 0) {
      idx.add(i);
    }
  }
  retValues=new double[5];
  Integer[] indexValues=idx.toArray(new Integer[idx.size()]);
  this.restrictionValues=vehicleAttrs;
  this.restCount=indexValues == null ? 0 : indexValues.length;
  this.indexValues=indexValues;
  this.vehicleType=vehicleType;
  this.buffer=new byte[10];
  if (this.encoder instanceof HeavyVehicleFlagEncoder) {
  }
  this.gsHeavyVehicles=GraphStorageUtils.getGraphExtension(graphStorage,HeavyVehicleAttributesGraphStorage.class);
}

Fixed version (ground truth):
/** 
 * Creates an edges filter which accepts both direction of the specified vehicle.
 */
public HeavyVehicleEdgeFilter(FlagEncoder encoder,boolean in,boolean out,int vehicleType,VehicleParameters vehicleParams,GraphStorage graphStorage){
  this.encoder=encoder;
  this.in=in;
  this.out=out;
  this.hasHazmat=VehicleLoadCharacteristicsFlags.isSet(vehicleParams.getLoadCharacteristics(),VehicleLoadCharacteristicsFlags.HAZMAT);
  float[] vehicleAttrs=new float[VehicleDimensionRestrictions.Count];
  vehicleAttrs[VehicleDimensionRestrictions.MaxHeight]=(float)vehicleParams.getHeight();
  vehicleAttrs[VehicleDimensionRestrictions.MaxWidth]=(float)vehicleParams.getWidth();
  vehicleAttrs[VehicleDimensionRestrictions.MaxWeight]=(float)vehicleParams.getWeight();
  vehicleAttrs[VehicleDimensionRestrictions.MaxLength]=(float)vehicleParams.getLength();
  vehicleAttrs[VehicleDimensionRestrictions.MaxAxleLoad]=(float)vehicleParams.getAxleload();
  ArrayList<Integer> idx=new ArrayList<Integer>();
  ArrayList<Integer> idxl=new ArrayList<Integer>();
  for (int i=0; i < VehicleDimensionRestrictions.Count; i++) {
    float value=vehicleAttrs[i];
    if (value > 0) {
      idx.add(i);
      idxl.add(i);
    }
  }
  retValues=new double[5];
  Integer[] indexValues=idx.toArray(new Integer[idx.size()]);
  Integer[] indexLocs=idxl.toArray(new Integer[idxl.size()]);
  this.restrictionValues=vehicleAttrs;
  this.restCount=indexValues == null ? 0 : indexValues.length;
  this.indexValues=indexValues;
  this.indexLocs=indexLocs;
  this.vehicleType=vehicleType;
  this.buffer=new byte[10];
  if (this.encoder instanceof HeavyVehicleFlagEncoder) {
  }
  this.gsHeavyVehicles=GraphStorageUtils.getGraphExtension(graphStorage,HeavyVehicleAttributesGraphStorage.class);
}