Program: 92235
Project: 92235
Buggy source:
/** 
 * Perform the request for an experiment and populates the statistics tree with event.
 * @param experiment experiment for which we need the statistics data.
 * @param timeRange to request
 */
@SuppressWarnings("String_Node_Str") protected void requestData(final TmfExperiment<?> experiment,TmfTimeRange timeRange){
  if (experiment != null) {
    if (checkUpdateBusy(timeRange)) {
      return;
    }
    int index=0;
    for (    TmfStatisticsTreeNode node : ((TmfStatisticsTreeNode)fTreeViewer.getInput()).getChildren()) {
      index+=(int)node.getValue().nbEvents;
    }
    fRequest=new TmfEventRequest<ITmfEvent>(ITmfEvent.class,timeRange,index,TmfDataRequest.ALL_DATA,getIndexPageSize(),ExecutionType.BACKGROUND){
      @Override public void handleData(      ITmfEvent data){
        super.handleData(data);
        if (data != null) {
          AbsTmfStatisticsTree statisticsData=TmfStatisticsTreeRootFactory.getStatTree(getTreeID(experiment.getName()));
          final String traceName=data.getTrace().getName();
          ITmfExtraEventInfo extraInfo=new ITmfExtraEventInfo(){
            @Override public String getTraceName(){
              if (traceName == null) {
                return Messages.TmfStatisticsView_UnknownTraceName;
              }
              return traceName;
            }
          }
;
          statisticsData.registerEvent(data,extraInfo);
          statisticsData.increase(data,extraInfo,1);
          if ((getNbRead() % getInputChangedRefresh()) == 0) {
            modelInputChanged(false);
          }
        }
      }
      @Override public void handleSuccess(){
        super.handleSuccess();
        modelInputChanged(true);
        waitCursor(false);
      }
      @Override public void handleFailure(){
        super.handleFailure();
        modelIncomplete(experiment.getName());
      }
      @Override public void handleCancel(){
        super.handleCancel();
        modelIncomplete(experiment.getName());
      }
    }
;
    ((TmfExperiment<ITmfEvent>)experiment).sendRequest(fRequest);
    waitCursor(true);
  }
}

Fixed version (ground truth):
/** 
 * Perform the request for an experiment and populates the statistics tree with event.
 * @param experiment experiment for which we need the statistics data.
 * @param timeRange to request
 */
@SuppressWarnings("String_Node_Str") protected void requestData(final TmfExperiment<?> experiment,TmfTimeRange timeRange){
  if (experiment != null) {
    if (checkUpdateBusy(timeRange)) {
      return;
    }
    int index=0;
    for (    TmfStatisticsTreeNode node : ((TmfStatisticsTreeNode)fTreeViewer.getInput()).getChildren()) {
      index+=(int)node.getValue().nbEvents;
    }
    fRequest=new TmfEventRequest<ITmfEvent>(ITmfEvent.class,timeRange,index,TmfDataRequest.ALL_DATA,getIndexPageSize(),ExecutionType.BACKGROUND){
      private final AbsTmfStatisticsTree statisticsData=TmfStatisticsTreeRootFactory.getStatTree(getTreeID(experiment.getName()));
      @Override public void handleData(      ITmfEvent data){
        super.handleData(data);
        if (data != null) {
          final String traceName=data.getTrace().getName();
          ITmfExtraEventInfo extraInfo=new ITmfExtraEventInfo(){
            @Override public String getTraceName(){
              if (traceName == null) {
                return Messages.TmfStatisticsView_UnknownTraceName;
              }
              return traceName;
            }
          }
;
          statisticsData.registerEvent(data,extraInfo);
          statisticsData.increase(data,extraInfo,1);
          if ((getNbRead() % getInputChangedRefresh()) == 0) {
            modelInputChanged(false);
          }
        }
      }
      @Override public void handleSuccess(){
        super.handleSuccess();
        modelInputChanged(true);
        waitCursor(false);
      }
      @Override public void handleFailure(){
        super.handleFailure();
        modelIncomplete(experiment.getName());
      }
      @Override public void handleCancel(){
        super.handleCancel();
        modelIncomplete(experiment.getName());
      }
    }
;
    ((TmfExperiment<ITmfEvent>)experiment).sendRequest(fRequest);
    waitCursor(true);
  }
}