Program: 39236
Project: 39236
Buggy source:
/** 
 * This should be turned into JUnit tests, but the current tests don't work, and this was written so long ago that I have no idea why.
 * @param args
 */
public static void main(String[] args){
  Parameters.initializeParameterCollections(args);
  lambda=Parameters.parameters.doubleParameter("String_Node_Str");
  LinkedList<Integer> eatTimes=new LinkedList<Integer>();
  eatTimes.add(1);
  eatTimes.add(2);
  eatTimes.add(3);
  eatTimes.add(5);
  eatTimes.add(8);
  eatTimes.add(10);
  eatTimes.add(12);
  eatTimes.add(20);
  eatTimes.add(21);
  LinkedList<Interval<Integer>> usageTimeFrames=new LinkedList<Interval<Integer>>();
  usageTimeFrames.add(new Interval<Integer>(true,0,4,false));
  usageTimeFrames.add(new Interval<Integer>(true,9,12,false));
  usageTimeFrames.add(new Interval<Integer>(true,19,22,false));
  System.out.println("String_Node_Str" + fitness(usageTimeFrames,eatTimes));
  eatTimes.add(200);
  usageTimeFrames.add(new Interval<Integer>(true,30,40,false));
  usageTimeFrames.add(new Interval<Integer>(true,100,130,false));
  usageTimeFrames.add(new Interval<Integer>(true,190,220,false));
  System.out.println("String_Node_Str" + fitness(usageTimeFrames,eatTimes));
  eatTimes.add(220);
  eatTimes.add(221);
  eatTimes.add(222);
  eatTimes.add(223);
  eatTimes.add(224);
  eatTimes.add(225);
  System.out.println("String_Node_Str" + fitness(usageTimeFrames,eatTimes));
  System.out.println("String_Node_Str");
  LinkedList<Interval<Integer>> timeFrames=new LinkedList<Interval<Integer>>();
  timeFrames.add(new Interval<Integer>(true,10,11,false));
  timeFrames.add(new Interval<Integer>(true,13,15,false));
  timeFrames.add(new Interval<Integer>(true,17,20,false));
  timeFrames.add(new Interval<Integer>(true,50,71,false));
  timeFrames.add(new Interval<Integer>(true,90,100,false));
  timeFrames.add(new Interval<Integer>(true,200,220,false));
  ArrayList<Double> plotLine=new ArrayList<Double>();
  for (int i=0; i < 300; i++) {
    LinkedList<Integer> point=new LinkedList<Integer>();
    point.add(i);
    double value=fitness(timeFrames,point);
    plotLine.add(value);
    System.out.println(i + "String_Node_Str" + value);
  }
  Plot.linePlot(new DrawingPanel(600,600,"String_Node_Str"),-0.5,1.5,plotLine,Color.RED);
}

Fixed version (ground truth):
/** 
 * This should be turned into JUnit tests, but the current tests don't work, and this was written so long ago that I have no idea why.
 * @param args
 */
public static void main(String[] args){
  Parameters.initializeParameterCollections(args);
  lambda=Parameters.parameters.doubleParameter("String_Node_Str");
  LinkedList<Integer> eatTimes=new LinkedList<Integer>();
  eatTimes.add(1);
  eatTimes.add(2);
  eatTimes.add(3);
  eatTimes.add(5);
  eatTimes.add(8);
  eatTimes.add(10);
  eatTimes.add(12);
  eatTimes.add(20);
  eatTimes.add(21);
  LinkedList<Interval<Integer>> usageTimeFrames=new LinkedList<Interval<Integer>>();
  usageTimeFrames.add(new Interval<Integer>(true,0,4,false));
  usageTimeFrames.add(new Interval<Integer>(true,9,12,false));
  usageTimeFrames.add(new Interval<Integer>(true,19,22,false));
  System.out.println("String_Node_Str" + fitness(usageTimeFrames,eatTimes));
  eatTimes.add(200);
  usageTimeFrames.add(new Interval<Integer>(true,30,40,false));
  usageTimeFrames.add(new Interval<Integer>(true,100,130,false));
  usageTimeFrames.add(new Interval<Integer>(true,190,220,false));
  System.out.println("String_Node_Str" + fitness(usageTimeFrames,eatTimes));
  eatTimes.add(220);
  eatTimes.add(221);
  eatTimes.add(222);
  eatTimes.add(223);
  eatTimes.add(224);
  eatTimes.add(225);
  System.out.println("String_Node_Str" + fitness(usageTimeFrames,eatTimes));
  System.out.println("String_Node_Str");
  LinkedList<Interval<Integer>> timeFrames=new LinkedList<Interval<Integer>>();
  timeFrames.add(new Interval<Integer>(true,10,11,false));
  timeFrames.add(new Interval<Integer>(true,13,15,false));
  timeFrames.add(new Interval<Integer>(true,17,20,false));
  timeFrames.add(new Interval<Integer>(true,50,71,false));
  timeFrames.add(new Interval<Integer>(true,90,100,false));
  timeFrames.add(new Interval<Integer>(true,200,220,false));
  ArrayList<Double> plotLine=new ArrayList<Double>();
  for (int i=0; i < 300; i++) {
    LinkedList<Integer> point=new LinkedList<Integer>();
    point.add(i);
    double value=fitness(timeFrames,point);
    plotLine.add(value);
    System.out.println(i + "String_Node_Str" + value);
  }
  GraphicsUtil.linePlot(new DrawingPanel(600,600,"String_Node_Str"),-0.5,1.5,plotLine,Color.RED);
}