Program: 180349
Project: 180349
Buggy source:
@Override public SpawnedDataBlock spawn(OrthogonalSpace space,InitialSampling initialSampling){
  if (space.getDimension() != initialSampling.getDimension()) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  float[] distance=new float[space.getDimension()];
  int numOfSeeds=1;
  for (int dim=0; dim < space.getDimension(); dim++) {
    if (initialSampling.getNumberOfSamples(dim) > 1) {
      distance[dim]=space.getSize(dim) / (initialSampling.getNumberOfSamples(dim) - 1);
    }
 else {
      distance[dim]=0;
    }
    numOfSeeds*=initialSampling.getNumberOfSamples(dim);
  }
  List<Trajectory> seeds=new ArrayList<Trajectory>(numOfSeeds / 2);
  List<Trajectory> secondarySeeds=new ArrayList<Trajectory>(numOfSeeds / 2);
  List<Trajectory> allSeeds=new ArrayList<Trajectory>(numOfSeeds);
  Map<Trajectory,Boolean> allSeedsMap=new HashMap<Trajectory,Boolean>(numOfSeeds);
  Map<Trajectory,List<Trajectory>> neighborhoodLists=new HashMap<Trajectory,List<Trajectory>>(numOfSeeds / 2);
  Trajectory minBoundsTrajectory=new PointTrajectory(space.getMinBounds());
  allSeeds.add(minBoundsTrajectory);
  allSeedsMap.put(minBoundsTrajectory,Boolean.FALSE);
  neighborhoodLists.put(minBoundsTrajectory,new ArrayList<Trajectory>());
  for (int dim=0; dim < space.getDimension(); dim++) {
    int numOfOldSeeds=allSeeds.size();
    for (int seed=0; seed < numOfOldSeeds; seed++) {
      Trajectory toBeNeighbor=allSeeds.get(seed);
      for (int sample=1; sample < initialSampling.getNumberOfSamples(dim); sample++) {
        float[] newPoint=allSeeds.get(seed).getFirstPoint().toArrayCopy();
        newPoint[dim]+=sample * distance[dim];
        Trajectory newTrajectory=new PointTrajectory(new ArrayPoint(allSeeds.get(seed).getFirstPoint().getTime(),newPoint));
        allSeeds.add(newTrajectory);
        allSeedsMap.put(newTrajectory,!allSeedsMap.get(toBeNeighbor));
        neighborhoodLists.put(newTrajectory,new ArrayList<Trajectory>());
        neighborhoodLists.get(toBeNeighbor).add(newTrajectory);
        toBeNeighbor=newTrajectory;
      }
    }
  }
  for (  Entry<Trajectory,Boolean> entry : allSeedsMap.entrySet()) {
    if (entry.getValue()) {
      seeds.add(entry.getKey());
    }
 else {
      secondarySeeds.add(entry.getKey());
      for (      Trajectory master : neighborhoodLists.get(entry.getKey())) {
        neighborhoodLists.get(master).add(entry.getKey());
      }
      neighborhoodLists.remove(entry.getKey());
    }
  }
  final Map<Point,DataBlock<Trajectory>> neighborhoodDataBlocks=new HashMap<Point,DataBlock<Trajectory>>(neighborhoodLists.size());
  for (  Trajectory key : neighborhoodLists.keySet()) {
    neighborhoodDataBlocks.put(key.getFirstPoint(),new ListDataBlock<Trajectory>(neighborhoodLists.get(key)));
  }
  return new SpawnedDataBlockWrapper(new ListDataBlock<Trajectory>(seeds),new AbstractConfiguration(initialSampling,space){
    private TrajectoryNeighborhood trajectoryNeighborhood=new MapTrajectoryNeighborhood(neighborhoodDataBlocks);
    public int getStartIndex(    int index,    int neighborIndex){
      return 0;
    }
    public TrajectoryNeighborhood getNeighborhood(){
      return trajectoryNeighborhood;
    }
  }
,new ListDataBlock<Trajectory>(secondarySeeds));
}

Fixed version (ground truth):
@Override public SpawnedDataBlock spawn(OrthogonalSpace space,InitialSampling initialSampling){
  if (space.getDimension() != initialSampling.getDimension()) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  float[] distance=new float[space.getDimension()];
  int numOfSeeds=1;
  for (int dim=0; dim < space.getDimension(); dim++) {
    if (initialSampling.getNumberOfSamples(dim) > 1) {
      distance[dim]=space.getSize(dim) / (initialSampling.getNumberOfSamples(dim) - 1);
    }
 else {
      distance[dim]=0;
    }
    numOfSeeds*=initialSampling.getNumberOfSamples(dim);
  }
  List<Trajectory> seeds=new ArrayList<>(numOfSeeds / 2);
  List<Trajectory> secondarySeeds=new ArrayList<>(numOfSeeds / 2);
  List<Trajectory> allSeeds=new ArrayList<>(numOfSeeds);
  Map<Trajectory,Boolean> allSeedsMap=new HashMap<>(numOfSeeds);
  Map<Trajectory,List<Trajectory>> neighborhoodLists=new HashMap<>(numOfSeeds / 2);
  Trajectory minBoundsTrajectory=new PointTrajectory(space.getMinBounds());
  allSeeds.add(minBoundsTrajectory);
  allSeedsMap.put(minBoundsTrajectory,Boolean.FALSE);
  neighborhoodLists.put(minBoundsTrajectory,new ArrayList<Trajectory>());
  for (int dim=0; dim < space.getDimension(); dim++) {
    int numOfOldSeeds=allSeeds.size();
    for (int seed=0; seed < numOfOldSeeds; seed++) {
      Trajectory toBeNeighbor=allSeeds.get(seed);
      for (int sample=1; sample < initialSampling.getNumberOfSamples(dim); sample++) {
        float[] newPoint=allSeeds.get(seed).getFirstPoint().toArrayCopy();
        newPoint[dim]+=sample * distance[dim];
        Trajectory newTrajectory=new PointTrajectory(new ArrayPoint(allSeeds.get(seed).getFirstPoint().getTime(),newPoint));
        allSeeds.add(newTrajectory);
        boolean primary=!allSeedsMap.get(toBeNeighbor);
        if (primary) {
          seeds.add(newTrajectory);
        }
        allSeedsMap.put(newTrajectory,primary);
        neighborhoodLists.put(newTrajectory,new ArrayList<Trajectory>());
        neighborhoodLists.get(toBeNeighbor).add(newTrajectory);
        toBeNeighbor=newTrajectory;
      }
    }
  }
  for (  Entry<Trajectory,Boolean> entry : allSeedsMap.entrySet()) {
    if (!entry.getValue()) {
      secondarySeeds.add(entry.getKey());
      for (      Trajectory master : neighborhoodLists.get(entry.getKey())) {
        neighborhoodLists.get(master).add(entry.getKey());
      }
      neighborhoodLists.remove(entry.getKey());
    }
  }
  final Map<Point,DataBlock<Trajectory>> neighborhoodDataBlocks=new HashMap<Point,DataBlock<Trajectory>>(neighborhoodLists.size());
  for (  Trajectory key : neighborhoodLists.keySet()) {
    neighborhoodDataBlocks.put(key.getFirstPoint(),new ListDataBlock<Trajectory>(neighborhoodLists.get(key)));
  }
  return new SpawnedDataBlockWrapper(new ListDataBlock<Trajectory>(seeds),new AbstractConfiguration(initialSampling,space){
    private TrajectoryNeighborhood trajectoryNeighborhood=new MapTrajectoryNeighborhood(neighborhoodDataBlocks);
    public int getStartIndex(    int index,    int neighborIndex){
      return 0;
    }
    public TrajectoryNeighborhood getNeighborhood(){
      return trajectoryNeighborhood;
    }
  }
,new ListDataBlock<Trajectory>(secondarySeeds));
}