Program: 39253
Project: 39253
Buggy source:
/** 
 * Full substrate without dead neurons for specific mazes
 * @return
 */
public List<Substrate> getSubstrateInformationFromScratch(){
  List<Substrate> localSubs=new ArrayList<Substrate>();
  Pair<Integer,Integer> subSize=new Pair<>(MS_PAC_MAN_SUBSTRATE_WIDTH,MS_PAC_MAN_SUBSTRATE_HEIGHT);
  Pair<Integer,Integer> processSize=new Pair<>(10,10);
  Substrate pillSubstrate=new Substrate(subSize,Substrate.INPUT_SUBSTRATE,new Triple<Integer,Integer,Integer>(0,0,0),"String_Node_Str");
  localSubs.add(pillSubstrate);
  Substrate powerPillSubstrate;
  if (Parameters.parameters.booleanParameter("String_Node_Str")) {
    powerPillSubstrate=new Substrate(subSize,Substrate.INPUT_SUBSTRATE,new Triple<Integer,Integer,Integer>(1,0,0),"String_Node_Str");
  }
 else {
    powerPillSubstrate=new Substrate(new Pair<Integer,Integer>(2,2),Substrate.INPUT_SUBSTRATE,new Triple<Integer,Integer,Integer>(1,0,0),"String_Node_Str");
  }
  localSubs.add(powerPillSubstrate);
  if (Parameters.parameters.booleanParameter("String_Node_Str")) {
    Substrate threatSubstrate=new Substrate(subSize,Substrate.INPUT_SUBSTRATE,new Triple<Integer,Integer,Integer>(2,0,0),"String_Node_Str");
    Substrate edibleSubstrate=new Substrate(subSize,Substrate.INPUT_SUBSTRATE,new Triple<Integer,Integer,Integer>(4,0,0),"String_Node_Str");
    localSubs.add(threatSubstrate);
    localSubs.add(edibleSubstrate);
  }
 else {
    Substrate ghostSubstrate=new Substrate(subSize,Substrate.INPUT_SUBSTRATE,new Triple<Integer,Integer,Integer>(2,0,0),"String_Node_Str");
    localSubs.add(ghostSubstrate);
    localSubs.add(ghostSubstrate);
  }
  Substrate pacManSubstrate=new Substrate(subSize,Substrate.INPUT_SUBSTRATE,new Triple<Integer,Integer,Integer>(3,0,0),"String_Node_Str");
  localSubs.add(pacManSubstrate);
  Substrate processSubstrate;
  if (Parameters.parameters.booleanParameter("String_Node_Str")) {
    processSubstrate=new Substrate(subSize,Substrate.PROCCESS_SUBSTRATE,new Triple<Integer,Integer,Integer>(0,1,0),"String_Node_Str");
  }
 else {
    processSubstrate=new Substrate(processSize,Substrate.PROCCESS_SUBSTRATE,new Triple<Integer,Integer,Integer>(0,1,0),"String_Node_Str");
  }
  Substrate outputSubstrate;
  if (Parameters.parameters.booleanParameter("String_Node_Str")) {
    outputSubstrate=new Substrate(subSize,Substrate.OUTPUT_SUBSTRATE,new Triple<Integer,Integer,Integer>(0,2,0),"String_Node_Str");
  }
 else {
    outputSubstrate=new Substrate(new Pair<Integer,Integer>(3,3),Substrate.OUTPUT_SUBSTRATE,new Triple<Integer,Integer,Integer>(0,2,0),"String_Node_Str");
    outputSubstrate.addDeadNeuron(0,0);
    outputSubstrate.addDeadNeuron(2,0);
    outputSubstrate.addDeadNeuron(1,1);
    outputSubstrate.addDeadNeuron(0,2);
    outputSubstrate.addDeadNeuron(2,2);
  }
  localSubs.add(processSubstrate);
  localSubs.add(outputSubstrate);
  return localSubs;
}

Fixed version (ground truth):
/** 
 * Full substrate without dead neurons for specific mazes
 * @return
 */
public List<Substrate> getSubstrateInformationFromScratch(){
  List<Substrate> localSubs=new ArrayList<Substrate>();
  Pair<Integer,Integer> subSize=new Pair<>(MS_PAC_MAN_SUBSTRATE_WIDTH,MS_PAC_MAN_SUBSTRATE_HEIGHT);
  Pair<Integer,Integer> processSize=new Pair<>(10,10);
  Substrate pillSubstrate=new Substrate(subSize,Substrate.INPUT_SUBSTRATE,new Triple<Integer,Integer,Integer>(0,0,0),"String_Node_Str");
  localSubs.add(pillSubstrate);
  Substrate powerPillSubstrate;
  if (Parameters.parameters.booleanParameter("String_Node_Str")) {
    powerPillSubstrate=new Substrate(subSize,Substrate.INPUT_SUBSTRATE,new Triple<Integer,Integer,Integer>(1,0,0),"String_Node_Str");
  }
 else {
    powerPillSubstrate=new Substrate(new Pair<Integer,Integer>(2,2),Substrate.INPUT_SUBSTRATE,new Triple<Integer,Integer,Integer>(1,0,0),"String_Node_Str");
  }
  localSubs.add(powerPillSubstrate);
  if (Parameters.parameters.booleanParameter("String_Node_Str")) {
    Substrate threatSubstrate=new Substrate(subSize,Substrate.INPUT_SUBSTRATE,new Triple<Integer,Integer,Integer>(2,0,0),"String_Node_Str");
    Substrate edibleSubstrate=new Substrate(subSize,Substrate.INPUT_SUBSTRATE,new Triple<Integer,Integer,Integer>(4,0,0),"String_Node_Str");
    localSubs.add(threatSubstrate);
    localSubs.add(edibleSubstrate);
  }
 else {
    Substrate ghostSubstrate=new Substrate(subSize,Substrate.INPUT_SUBSTRATE,new Triple<Integer,Integer,Integer>(2,0,0),"String_Node_Str");
    localSubs.add(ghostSubstrate);
  }
  Substrate pacManSubstrate=new Substrate(subSize,Substrate.INPUT_SUBSTRATE,new Triple<Integer,Integer,Integer>(3,0,0),"String_Node_Str");
  localSubs.add(pacManSubstrate);
  Substrate processSubstrate;
  if (Parameters.parameters.booleanParameter("String_Node_Str")) {
    processSubstrate=new Substrate(subSize,Substrate.PROCCESS_SUBSTRATE,new Triple<Integer,Integer,Integer>(0,1,0),"String_Node_Str");
  }
 else {
    processSubstrate=new Substrate(processSize,Substrate.PROCCESS_SUBSTRATE,new Triple<Integer,Integer,Integer>(0,1,0),"String_Node_Str");
  }
  Substrate outputSubstrate;
  if (Parameters.parameters.booleanParameter("String_Node_Str")) {
    outputSubstrate=new Substrate(subSize,Substrate.OUTPUT_SUBSTRATE,new Triple<Integer,Integer,Integer>(0,2,0),"String_Node_Str");
  }
 else {
    outputSubstrate=new Substrate(new Pair<Integer,Integer>(3,3),Substrate.OUTPUT_SUBSTRATE,new Triple<Integer,Integer,Integer>(0,2,0),"String_Node_Str");
    outputSubstrate.addDeadNeuron(0,0);
    outputSubstrate.addDeadNeuron(2,0);
    outputSubstrate.addDeadNeuron(1,1);
    outputSubstrate.addDeadNeuron(0,2);
    outputSubstrate.addDeadNeuron(2,2);
  }
  localSubs.add(processSubstrate);
  localSubs.add(outputSubstrate);
  return localSubs;
}