Program: 166742
Project: 166742
Buggy source:
private void drawEvent(long t,List<Events.InferenceEvent> v,float y,int maxItemsPerCycle){
  if (v.isEmpty()) {
    return;
  }
  float itemScale=Math.min(timeScale / maxItemsPerCycle,yScale / maxItemsPerCycle);
  float x=t;
  y+=yScale / maxItemsPerCycle / 2f;
  for (  Events.InferenceEvent i : v) {
    if (!include(i)) {
      continue;
    }
    Class c=i.getType();
    if (i instanceof NARTrace.TaskEvent) {
      NARTrace.TaskEvent te=(NARTrace.TaskEvent)i;
      float p=te.priority;
{
        l.fill(256f * NARSwing.hashFloat(c.hashCode()),200f,200f);
switch (te.type) {
case Add:
          triangleHorizontal(i,te.task,p * itemScale,x,y,1.0f);
        break;
case Remove:
      triangleHorizontal(i,te.task,p * itemScale,x,y,-1.0f);
    break;
}
}
}
 else if (i instanceof NARTrace.OutputEvent) {
NARTrace.OutputEvent te=(NARTrace.OutputEvent)i;
float p=0.5f;
if (te.signal.length > 0) {
if (te.signal[0] instanceof Item) {
  Item ii=(Item)te.signal[0];
  if (ii.budget != null) {
    p=ii.getPriority();
  }
 else {
    p=0.5f;
  }
}
}
float ph=0.5f + 0.5f * p;
l.fill(256f * NARSwing.hashFloat(te.channel.hashCode()),100f + 100f * ph,255f * ph);
if (te.channel.equals(Output.IN.class)) {
triangleHorizontal(i,te.signal,ph * itemScale,x,y,1.0f);
}
 else if (te.channel.equals(Output.OUT.class)) {
triangleHorizontal(i,te.signal,ph * itemScale,x,y,1.0f);
}
 else {
rect(i,te.signal,ph * itemScale,x,y);
}
}
 else {
l.fill(256f * NARSwing.hashFloat(c.hashCode()),200f,200f);
rect(i,null,0.75f * itemScale,x,y);
}
x+=1.0 / v.size();
y+=yScale / maxItemsPerCycle;
}
}

Fixed version (ground truth):
private void drawEvent(long t,List<Events.InferenceEvent> v,float y,int maxItemsPerCycle){
  if (v.isEmpty()) {
    return;
  }
  float itemScale=Math.min(timeScale / maxItemsPerCycle,yScale / maxItemsPerCycle);
  float x=t;
  y+=yScale / maxItemsPerCycle / 2f;
  for (  Events.InferenceEvent i : v) {
    if (!include(i)) {
      continue;
    }
    Class c=i.getType();
    if (i instanceof NARTrace.TaskEvent) {
      NARTrace.TaskEvent te=(NARTrace.TaskEvent)i;
      float p=te.priority;
{
        l.g.fill(256f * Video.hashFloat(c.hashCode()),200f,200f);
switch (te.type) {
case Add:
          triangleHorizontal(i,te.task,p * itemScale,x,y,1.0f);
        break;
case Remove:
      triangleHorizontal(i,te.task,p * itemScale,x,y,-1.0f);
    break;
}
}
}
 else if (i instanceof NARTrace.OutputEvent) {
NARTrace.OutputEvent te=(NARTrace.OutputEvent)i;
float p=0.5f;
if (te.signal.length > 0) {
if (te.signal[0] instanceof Item) {
  Item ii=(Item)te.signal[0];
  if (ii.budget != null) {
    p=ii.getPriority();
  }
 else {
    p=0.5f;
  }
}
}
float ph=0.5f + 0.5f * p;
l.g.fill(256f * Video.hashFloat(te.channel.hashCode()),100f + 100f * ph,255f * ph);
if (te.channel.equals(Output.IN.class)) {
triangleHorizontal(i,te.signal,ph * itemScale,x,y,1.0f);
}
 else if (te.channel.equals(Output.OUT.class)) {
triangleHorizontal(i,te.signal,ph * itemScale,x,y,1.0f);
}
 else {
rect(i,te.signal,ph * itemScale,x,y);
}
}
 else {
l.g.fill(256f * Video.hashFloat(c.hashCode()),200f,200f);
rect(i,null,0.75f * itemScale,x,y);
}
x+=1.0 / v.size();
y+=yScale / maxItemsPerCycle;
}
}