Program: 91828
Project: 91828
Buggy source:
@Override protected void updateData(long start,long end,int nb,IProgressMonitor monitor){
  try {
    if (getTrace() == null || fModule == null) {
      return;
    }
    fModule.waitForInitialization();
    ITmfStateSystem ss=fModule.getStateSystem();
    if (ss == null) {
      return;
    }
    double[] xvalues=getXAxis(start,end,nb);
    setXAxis(xvalues);
    boolean complete=false;
    long currentEnd=start;
    while (!complete && currentEnd < end) {
      if (monitor.isCanceled()) {
        return;
      }
      complete=ss.waitUntilBuilt(BUILD_UPDATE_TIMEOUT);
      currentEnd=ss.getCurrentEndTime();
      List<Integer> tidQuarks=ss.getSubAttributes(-1,false);
      long traceStart=getStartTime();
      long traceEnd=getEndTime();
      long offset=this.getTimeOffset();
      for (      int quark : tidQuarks) {
        fYValues.put(quark,new double[xvalues.length]);
        fMemoryQuarks.put(quark,ss.getQuarkRelative(quark,UstMemoryStrings.UST_MEMORY_MEMORY_ATTRIBUTE));
        int procNameQuark=ss.getQuarkRelative(quark,UstMemoryStrings.UST_MEMORY_PROCNAME_ATTRIBUTE);
        try {
          ITmfStateValue procnameValue=ss.querySingleState(start,procNameQuark).getStateValue();
          String procname=new String();
          if (!procnameValue.isNull()) {
            procname=procnameValue.unboxStr();
          }
          fSeriesName.put(quark,new String(procname + ' ' + '('+ ss.getAttributeName(quark)+ ')').trim());
        }
 catch (        TimeRangeException e) {
          fSeriesName.put(quark,'(' + ss.getAttributeName(quark) + ')');
        }
      }
      double yvalue=0.0;
      for (int i=0; i < xvalues.length; i++) {
        if (monitor.isCanceled()) {
          return;
        }
        double x=xvalues[i];
        long time=(long)x + offset;
        time=time < traceStart ? traceStart : time;
        time=time > traceEnd ? traceEnd : time;
        for (        int quark : tidQuarks) {
          try {
            yvalue=ss.querySingleState(time,fMemoryQuarks.get(quark)).getStateValue().unboxLong() / BYTES_TO_KB;
            fYValues.get(quark)[i]=yvalue;
          }
 catch (          TimeRangeException e) {
            fYValues.get(quark)[i]=0;
          }
        }
      }
      for (      int quark : tidQuarks) {
        setSeries(fSeriesName.get(quark),fYValues.get(quark));
      }
      updateDisplay();
    }
  }
 catch (  AttributeNotFoundException|StateValueTypeException|StateSystemDisposedException e) {
    Activator.logError("String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Override protected void updateData(long start,long end,int nb,IProgressMonitor monitor){
  try {
    if (getTrace() == null || fModule == null) {
      return;
    }
    fModule.waitForInitialization();
    ITmfStateSystem ss=fModule.getStateSystem();
    if (ss == null) {
      return;
    }
    double[] xvalues=getXAxis(start,end,nb);
    setXAxis(xvalues);
    boolean complete=false;
    long currentEnd=start;
    while (!complete && currentEnd < end) {
      if (monitor.isCanceled()) {
        return;
      }
      complete=ss.waitUntilBuilt(BUILD_UPDATE_TIMEOUT);
      currentEnd=ss.getCurrentEndTime();
      List<Integer> tidQuarks=ss.getSubAttributes(-1,false);
      long traceStart=getStartTime();
      long traceEnd=getEndTime();
      long offset=this.getTimeOffset();
      for (      int quark : tidQuarks) {
        fYValues.put(quark,new double[xvalues.length]);
        fMemoryQuarks.put(quark,ss.getQuarkRelative(quark,UstMemoryStrings.UST_MEMORY_MEMORY_ATTRIBUTE));
        int procNameQuark=ss.getQuarkRelative(quark,UstMemoryStrings.UST_MEMORY_PROCNAME_ATTRIBUTE);
        try {
          ITmfStateValue procnameValue=ss.querySingleState(start,procNameQuark).getStateValue();
          String procname=new String();
          if (!procnameValue.isNull()) {
            procname=procnameValue.unboxStr();
          }
          fSeriesName.put(quark,new String(procname + ' ' + '('+ ss.getAttributeName(quark)+ ')').trim());
        }
 catch (        TimeRangeException e) {
          fSeriesName.put(quark,'(' + ss.getAttributeName(quark) + ')');
        }
      }
      double yvalue=0.0;
      for (int i=0; i < xvalues.length; i++) {
        if (monitor.isCanceled()) {
          return;
        }
        double x=xvalues[i];
        long time=(long)x + offset;
        time=time < traceStart ? traceStart : time;
        time=time > traceEnd ? traceEnd : time;
        for (        int quark : tidQuarks) {
          try {
            yvalue=ss.querySingleState(time,fMemoryQuarks.get(quark)).getStateValue().unboxLong() / BYTES_TO_KB;
            fYValues.get(quark)[i]=yvalue;
          }
 catch (          TimeRangeException e) {
            fYValues.get(quark)[i]=0;
          }
        }
      }
      for (      int quark : tidQuarks) {
        setSeries(fSeriesName.get(quark),fYValues.get(quark));
      }
      updateDisplay();
    }
  }
 catch (  AttributeNotFoundException|StateValueTypeException e) {
    Activator.logError("String_Node_Str",e);
  }
catch (  StateSystemDisposedException e) {
  }
}