Program: 180377
Project: 180377
Buggy source:
protected Configuration<Trajectory> createConfiguration(final float expectedDistance,final int dimension,final TrajectoryNeighborhood<Trajectory> neighborhood){
  return new Configuration<Trajectory>(){
    private float[] distance;
    private float[] getMaxAbsoluteDistance(){
      if (distance == null) {
        distance=new float[dimension];
        for (int dim=0; dim < dimension; dim++) {
          distance[dim]=expectedDistance;
        }
      }
      return distance;
    }
    @Override public TrajectoryNeighborhood<Trajectory> getNeighborhood(){
      return neighborhood;
    }
    public PointDistanceMetric getDistanceMetric(){
      return new PointDistanceMetric(){
        public Distance distance(        float[] first,        float[] second){
          final float[] distance=new float[first.length];
          float maxDistance=0;
          for (int dim=0; dim < first.length; dim++) {
            distance[dim]=Math.abs(first[dim] - second[dim]) / getMaxAbsoluteDistance()[dim];
            if (distance[dim] > maxDistance) {
              maxDistance=distance[dim];
            }
          }
          final float maxDistanceFinal=maxDistance;
          return new LimitedDistance(){
            public boolean isValid(){
              return value() < expectedDistance;
            }
            public boolean isValid(            int dimensionIndex){
              return value(dimensionIndex) < expectedDistance;
            }
            public float value(){
              return maxDistanceFinal;
            }
            public float value(            int dimensionIndex){
              return distance[dimensionIndex];
            }
          }
;
        }
        public Distance distance(        Point first,        Point second){
          return distance(first.toArray(),second.toArray());
        }
      }
;
    }
    public int getStartIndex(    int index,    int neighborIndex){
      return 0;
    }
  }
;
}

Fixed version (ground truth):
protected Configuration<Trajectory> createConfiguration(final float expectedDistance,final int dimension,final TrajectoryNeighborhood<Trajectory> neighborhood){
  return new Configuration<Trajectory>(){
    private float[] distance;
    private float[] getMaxAbsoluteDistance(){
      if (distance == null) {
        distance=new float[dimension];
        for (int dim=0; dim < dimension; dim++) {
          distance[dim]=expectedDistance;
        }
      }
      return distance;
    }
    @Override public TrajectoryNeighborhood<Trajectory> getNeighborhood(){
      return neighborhood;
    }
    public PointDistanceMetric getDistanceMetric(){
      return new PointDistanceMetric(){
        public LimitedDistance distance(        float[] first,        float[] second){
          final float[] distance=new float[first.length];
          float maxDistance=0;
          for (int dim=0; dim < first.length; dim++) {
            distance[dim]=Math.abs(first[dim] - second[dim]) / getMaxAbsoluteDistance()[dim];
            if (distance[dim] > maxDistance) {
              maxDistance=distance[dim];
            }
          }
          final float maxDistanceFinal=maxDistance;
          return new LimitedDistance(){
            public boolean isValid(){
              return value() < expectedDistance;
            }
            public boolean isValid(            int dimensionIndex){
              return value(dimensionIndex) < expectedDistance;
            }
            public float value(){
              return maxDistanceFinal;
            }
            public float value(            int dimensionIndex){
              return distance[dimensionIndex];
            }
          }
;
        }
        public LimitedDistance distance(        Point first,        Point second){
          return distance(first.toArray(),second.toArray());
        }
      }
;
    }
    public int getStartIndex(    int index,    int neighborIndex){
      return 0;
    }
  }
;
}