Program: 145323
Project: 145323
Buggy source:
protected void setWidgetValue(Object o){
  if (o instanceof Vector) {
    Vector data=reverseVector((Vector)o);
    int numPoints=data.size();
    int scaledRes=resolution / numPoints;
    chartXPointsArray=new Integer[numPoints];
    chartYPointsArray=new Integer[numPoints];
    Long minDate=null;
    Long maxDate=null;
    Integer minVal=null;
    Integer maxVal=null;
    Enumeration en=data.elements();
    while (en.hasMoreElements()) {
      DateValueTuple tuple=(DateValueTuple)en.nextElement();
      long time=tuple.date.getTime();
      if (minDate == null || minDate.longValue() > time) {
        minDate=new Long(time);
      }
      if (maxDate == null || maxDate.longValue() < time) {
        maxDate=new Long(time);
      }
      int val=tuple.value;
      if (minVal == null || minVal.intValue() > val) {
        minVal=new Integer(val);
      }
      if (maxVal == null || maxVal.intValue() < val) {
        maxVal=new Integer(val);
      }
    }
    long dateSpan=maxDate.longValue() - minDate.longValue();
    int valSpan=maxVal.intValue() - minVal.intValue();
    long dateRes=dateSpan / numPoints;
    int valRes=valSpan / numPoints;
    Vector xpoints=new Vector();
    Vector ypoints=new Vector();
    en=data.elements();
    while (en.hasMoreElements()) {
      DateValueTuple tuple=(DateValueTuple)en.nextElement();
      long time=tuple.date.getTime();
      System.out.println("String_Node_Str" + time);
      long timeUnit=(time - minDate.longValue()) * scaledRes;
      System.out.println("String_Node_Str" + timeUnit);
      System.out.println("String_Node_Str" + dateRes);
      long scaledTime=(timeUnit / dateRes);
      System.out.println("String_Node_Str" + scaledTime);
      int intScaled=(int)scaledTime;
      System.out.println("String_Node_Str" + intScaled);
      int finalTime=intScaled;
      System.out.println("String_Node_Str" + finalTime);
      Integer xPoint=new Integer(finalTime);
      Integer val=new Integer(tuple.value);
      xpoints.addElement(xPoint);
      ypoints.addElement(val);
    }
    xpoints.copyInto(chartXPointsArray);
    ypoints.copyInto(chartYPointsArray);
    chart.resetData();
    applyTemplate();
    applyData();
  }
}

Fixed version (ground truth):
protected void setWidgetValue(Object o){
  if (o instanceof Vector) {
    Vector data=reverseVector((Vector)o);
    int numPoints=data.size();
    int scaledRes=resolution / numPoints;
    chartXPointsArray=new Integer[numPoints];
    chartYPointsArray=new Integer[numPoints];
    Long minDate=null;
    Long maxDate=null;
    Integer minVal=null;
    Integer maxVal=null;
    Enumeration en=data.elements();
    while (en.hasMoreElements()) {
      DateValueTuple tuple=(DateValueTuple)en.nextElement();
      long time=tuple.date.getTime();
      if (minDate == null || minDate.longValue() > time) {
        minDate=new Long(time);
      }
      if (maxDate == null || maxDate.longValue() < time) {
        maxDate=new Long(time);
      }
      int val=tuple.value;
      if (minVal == null || minVal.intValue() > val) {
        minVal=new Integer(val);
      }
      if (maxVal == null || maxVal.intValue() < val) {
        maxVal=new Integer(val);
      }
    }
    long dateSpan=maxDate.longValue() - minDate.longValue();
    int valSpan=maxVal.intValue() - minVal.intValue();
    long dateRes=dateSpan / numPoints;
    int valRes=valSpan / numPoints;
    Vector xpoints=new Vector();
    Vector ypoints=new Vector();
    en=data.elements();
    while (en.hasMoreElements()) {
      DateValueTuple tuple=(DateValueTuple)en.nextElement();
      long time=tuple.date.getTime();
      long timeUnit=(time - minDate.longValue()) * scaledRes;
      long scaledTime=(timeUnit / dateRes);
      int intScaled=(int)scaledTime;
      int finalTime=intScaled;
      Integer xPoint=new Integer(finalTime);
      Integer val=new Integer(tuple.value);
      xpoints.addElement(xPoint);
      ypoints.addElement(val);
    }
    xpoints.copyInto(chartXPointsArray);
    ypoints.copyInto(chartYPointsArray);
    chart.resetData();
    applyTemplate();
    applyData();
  }
}