Program: 51824
Project: 51824
Buggy source:
@Override protected void paintComponent(Graphics g){
  Graphics2D g2=(Graphics2D)g;
  g2.clearRect(0,0,getWidth(),getHeight());
  RenderingHints renderHints=new RenderingHints(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
  renderHints.put(RenderingHints.KEY_RENDERING,RenderingHints.VALUE_RENDER_QUALITY);
  g2.setRenderingHints(renderHints);
  xStart=timeScaleIconWidth + margin;
  xEnd=getWidth() - timeScaleIconWidth - margin;
  if (currentTickerX == -1)   currentTickerX=xStart;
  initActivities();
  paintTimeScale(g2);
  g2.drawString("String_Node_Str" + FORMATTER.format(globalStartTime),0,getFontMetrics(getFont()).getHeight());
  String endtimeString="String_Node_Str" + FORMATTER.format(globalEndTime);
  g2.drawString(endtimeString,getWidth() - getFontMetrics(getFont()).charsWidth(endtimeString.toCharArray(),0,endtimeString.length()),getFontMetrics(getFont()).getHeight());
  long hoursDiff=(globalEndTime.getTime() - globalStartTime.getTime()) / (60 * 60 * 1000) % 24;
  long minDiff=(globalEndTime.getTime() - globalStartTime.getTime()) / (60 * 1000) % 60;
  String totalDurationText="String_Node_Str" + String.format("String_Node_Str",Long.toString(hoursDiff)).replace(' ','0') + "String_Node_Str"+ String.format("String_Node_Str",Long.toString(minDiff)).replace(' ','0');
  g2.drawString(totalDurationText,getWidth() - getFontMetrics(getFont()).charsWidth(totalDurationText.toCharArray(),0,totalDurationText.length()),getFontMetrics(getFont()).getHeight() * 2);
  int yStart=20;
  activityWidgets.clear();
  for (int group=0; group < activityMap.size(); group++) {
    List<ActivityWrapper> list=activityMap.get(group);
    int level=list.get(0).level;
    for (    ActivityWrapper aw : list) {
      if (level != aw.level) {
        for (        DecisionWrapper dw : getDecisions(group,level)) {
          paintDecision(g2,dw,yStart);
        }
        yStart+=50;
        level=aw.level;
      }
      paintActivity(g2,aw.activityComponent,yStart);
    }
    yStart+=65;
    drawActivityDivider(g2,yStart);
  }
  paintTrend(g2,"String_Node_Str",getHeight() - (2 * timeScaleHeight + 15),timeseries.get(0));
  paintTrend(g2,"String_Node_Str",getHeight() - (2 * timeScaleHeight + 75),timeseries.get(1));
  if (showVeriticalTickLine && currentTickerX >= xStart)   paintVeriticalTickLine(g2);
}

Fixed version (ground truth):
@Override protected void paintComponent(Graphics g){
  Graphics2D g2=(Graphics2D)g;
  g2.clearRect(0,0,getWidth(),getHeight());
  RenderingHints renderHints=new RenderingHints(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
  renderHints.put(RenderingHints.KEY_RENDERING,RenderingHints.VALUE_RENDER_QUALITY);
  g2.setRenderingHints(renderHints);
  xStart=timeScaleIconWidth + margin;
  xEnd=getWidth() - timeScaleIconWidth - margin;
  if (currentTickerX == -1)   currentTickerX=xStart;
  initActivities();
  if (globalStartTime == null || globalEndTime == null || ((globalEndTime.getTime() - globalStartTime.getTime()) == 0))   return;
  paintTimeScale(g2);
  g2.drawString("String_Node_Str" + FORMATTER.format(globalStartTime),0,getFontMetrics(getFont()).getHeight());
  String endtimeString="String_Node_Str" + FORMATTER.format(globalEndTime);
  g2.drawString(endtimeString,getWidth() - getFontMetrics(getFont()).charsWidth(endtimeString.toCharArray(),0,endtimeString.length()),getFontMetrics(getFont()).getHeight());
  String totalDurationText="String_Node_Str" + getFormattedDurationText(globalStartTime,globalEndTime);
  g2.drawString(totalDurationText,getWidth() - getFontMetrics(getFont()).charsWidth(totalDurationText.toCharArray(),0,totalDurationText.length()),getFontMetrics(getFont()).getHeight() * 2);
  int yStart=20;
  activityWidgets.clear();
  for (int group=0; group < activityMap.size(); group++) {
    List<ActivityWrapper> list=activityMap.get(group);
    int level=list.get(0).level;
    for (    ActivityWrapper aw : list) {
      if (level != aw.level) {
        for (        DecisionWrapper dw : getDecisions(group,level)) {
          paintDecision(g2,dw,yStart);
        }
        yStart+=50;
        level=aw.level;
      }
      paintActivity(g2,aw.activityComponent,yStart);
    }
    for (    DecisionWrapper dw : getDecisions(group,level)) {
      paintDecision(g2,dw,yStart);
    }
    yStart+=65;
    drawActivityDivider(g2,yStart);
  }
  paintTrend(g2,"String_Node_Str",getHeight() - (2 * timeScaleHeight + 20),timeseries.get(0));
  paintTrend(g2,"String_Node_Str",getHeight() - (2 * timeScaleHeight + 80),timeseries.get(1));
  if (showVeriticalTickLine && currentTickerX >= xStart)   paintVeriticalTickLine(g2);
}