Program: 39142
Project: 39142
Buggy source:
/** 
 * Creates a list of vertexes where cube pixels will be constructed in a shape based on  the CPPN
 * @param cppn network used to modify shape being constructed
 * @param imageWidth width of screen
 * @param imageHeight height of screen
 * @param cubeSize size of cube
 * @param shapeWidth width of shape being constructed (measured in # of cubes in dimension)
 * @param shapeHeight height of shape being constructed (measured in # of cubes in dimension)
 * @param shapeDepth depth of shape being constructed (measured in # of cubes in dimension)
 * @param inputMultipliers determines whether inputs are turned on or off
 * @return List of vertexes denoting center points of all cubes being constructed
 */
public static Pair<List<Vertex>,List<Color>> getVertexesFromCPPN(Network cppn,int imageWidth,int imageHeight,int cubeSize,int shapeWidth,int shapeHeight,int shapeDepth,double[] inputMultipliers,Color color,double time){
  List<Vertex> centers=new ArrayList<>();
  List<Color> colors=new ArrayList<>();
  for (int x=0; x < shapeWidth; x++) {
    for (int y=0; y < shapeHeight; y++) {
      for (int z=0; z < shapeDepth; z++) {
        double[] inputs=get3DObjectCPPNInputs(x,y,z,shapeWidth,shapeHeight,shapeDepth,time);
        for (int i=0; i < inputMultipliers.length; i++) {
          inputs[i]=inputs[i] * inputMultipliers[i];
        }
        double[] output=cppn.process(inputs);
        if (output[0] > 0.1) {
          double actualX=-(cubeSize * shapeWidth / 2.0) + (cubeSize / 2.0) + x * cubeSize + output[THREE_DIMENSIONAL_X_DISPLACEMENT_INDEX];
          double actualY=-(cubeSize * shapeHeight / 2.0) + (cubeSize / 2.0) + y * cubeSize + output[THREE_DIMENSIONAL_Y_DISPLACEMENT_INDEX];
          double actualZ=-(cubeSize * shapeDepth / 2.0) + (cubeSize / 2.0) + z * cubeSize + output[THREE_DIMENSIONAL_Z_DISPLACEMENT_INDEX];
          centers.add(new Vertex(actualX,actualY,actualZ));
          if (color == null) {
            float[] hsb=GraphicsUtil.rangeRestrictHSB(new double[]{output[THREE_DIMENSIONAL_HUE_INDEX],output[THREE_DIMENSIONAL_SATURATION_INDEX],output[THREE_DIMENSIONAL_BRIGHTNESS_INDEX]});
            int rgb=Color.HSBtoRGB(hsb[GraphicsUtil.HUE_INDEX],hsb[GraphicsUtil.SATURATION_INDEX],hsb[GraphicsUtil.BRIGHTNESS_INDEX]);
            Color evolvedColor=new Color(rgb,true);
            colors.add(evolvedColor);
          }
 else {
            colors.add(color);
          }
        }
      }
    }
  }
  return new Pair<>(centers,colors);
}

Fixed version (ground truth):
/** 
 * Creates a list of vertexes where cube pixels will be constructed in a shape based on  the CPPN
 * @param cppn network used to modify shape being constructed
 * @param imageWidth width of screen
 * @param imageHeight height of screen
 * @param cubeSize size of cube
 * @param shapeWidth width of shape being constructed (measured in # of cubes in dimension)
 * @param shapeHeight height of shape being constructed (measured in # of cubes in dimension)
 * @param shapeDepth depth of shape being constructed (measured in # of cubes in dimension)
 * @param inputMultipliers determines whether inputs are turned on or off
 * @return List of vertexes denoting center points of all cubes being constructed
 */
public static Pair<List<Vertex>,List<Color>> getVertexesFromCPPN(Network cppn,int imageWidth,int imageHeight,int cubeSize,int shapeWidth,int shapeHeight,int shapeDepth,double[] inputMultipliers,Color color,double time){
  List<Vertex> centers=new ArrayList<>();
  List<Color> colors=new ArrayList<>();
  for (int x=0; x < shapeWidth; x++) {
    for (int y=0; y < shapeHeight; y++) {
      for (int z=0; z < shapeDepth; z++) {
        double[] inputs=get3DObjectCPPNInputs(x,y,z,shapeWidth,shapeHeight,shapeDepth,time);
        for (int i=0; i < inputMultipliers.length; i++) {
          inputs[i]=inputs[i] * inputMultipliers[i];
        }
        double[] output=cppn.process(inputs);
        if (output[0] > 0.1) {
          double actualX=-(cubeSize * shapeWidth / 2.0) + (cubeSize / 2.0) + x * cubeSize;
          double actualY=-(cubeSize * shapeHeight / 2.0) + (cubeSize / 2.0) + y * cubeSize;
          double actualZ=-(cubeSize * shapeDepth / 2.0) + (cubeSize / 2.0) + z * cubeSize;
          if (output.length > ThreeDimensionalObjectBreederTask.CPPN_NUM_OUTPUTS) {
            actualX+=output[THREE_DIMENSIONAL_X_DISPLACEMENT_INDEX];
            actualY+=output[THREE_DIMENSIONAL_Y_DISPLACEMENT_INDEX];
            actualZ+=output[THREE_DIMENSIONAL_Z_DISPLACEMENT_INDEX];
          }
          centers.add(new Vertex(actualX,actualY,actualZ));
          if (color == null) {
            float[] hsb=GraphicsUtil.rangeRestrictHSB(new double[]{output[THREE_DIMENSIONAL_HUE_INDEX],output[THREE_DIMENSIONAL_SATURATION_INDEX],output[THREE_DIMENSIONAL_BRIGHTNESS_INDEX]});
            int rgb=Color.HSBtoRGB(hsb[GraphicsUtil.HUE_INDEX],hsb[GraphicsUtil.SATURATION_INDEX],hsb[GraphicsUtil.BRIGHTNESS_INDEX]);
            Color evolvedColor=new Color(rgb,true);
            colors.add(evolvedColor);
          }
 else {
            colors.add(color);
          }
        }
      }
    }
  }
  return new Pair<>(centers,colors);
}