Program: 92361
Project: 92361
Buggy source:
@SuppressWarnings("String_Node_Str") private void selectExperiment(TmfExperiment<?> experiment){
  fStartTime=Long.MAX_VALUE;
  fEndTime=Long.MIN_VALUE;
  fSelectedExperiment=(TmfExperiment<ITmfEvent>)experiment;
  ArrayList<ControlFlowEntry> entryList=new ArrayList<ControlFlowEntry>();
  for (  ITmfTrace<?> trace : experiment.getTraces()) {
    if (trace instanceof CtfKernelTrace) {
      CtfKernelTrace ctfKernelTrace=(CtfKernelTrace)trace;
      IStateSystemQuerier ssq=ctfKernelTrace.getStateSystem();
      long start=ssq.getStartTime();
      long end=ssq.getCurrentEndTime();
      fStartTime=Math.min(fStartTime,start);
      fEndTime=Math.max(fEndTime,end);
      List<Integer> threadQuarks=ssq.getQuarks(Attributes.THREADS,"String_Node_Str");
      for (      int threadQuark : threadQuarks) {
        String threadName=ssq.getAttributeName(threadQuark);
        int threadId=-1;
        try {
          threadId=Integer.parseInt(threadName);
        }
 catch (        NumberFormatException e1) {
          continue;
        }
        if (threadId == 0) {
          continue;
        }
        int execNameQuark=-1;
        try {
          try {
            execNameQuark=ssq.getQuarkRelative(threadQuark,Attributes.EXEC_NAME);
          }
 catch (          AttributeNotFoundException e) {
            continue;
          }
          int ppidQuark=ssq.getQuarkRelative(threadQuark,Attributes.PPID);
          List<ITmfStateInterval> execNameIntervals=ssq.queryHistoryRange(execNameQuark,start,end);
          long birthTime=-1;
          for (          ITmfStateInterval execNameInterval : execNameIntervals) {
            if (!execNameInterval.getStateValue().isNull() && execNameInterval.getStateValue().getType() == 1) {
              String execName=execNameInterval.getStateValue().unboxStr();
              long startTime=execNameInterval.getStartTime();
              long endTime=execNameInterval.getEndTime() + 1;
              if (birthTime == -1) {
                birthTime=startTime;
              }
              int ppid=-1;
              if (ppidQuark != -1) {
                ITmfStateInterval ppidInterval=ssq.querySingleState(startTime,ppidQuark);
                ppid=ppidInterval.getStateValue().unboxInt();
              }
              ControlFlowEntry entry=new ControlFlowEntry(threadQuark,ctfKernelTrace,execName,threadId,ppid,birthTime,startTime,endTime);
              entryList.add(entry);
              entry.addEvent(new TimeEvent(entry,startTime,endTime - startTime));
            }
 else {
              birthTime=-1;
            }
          }
        }
 catch (        AttributeNotFoundException e) {
          e.printStackTrace();
        }
catch (        TimeRangeException e) {
          e.printStackTrace();
        }
catch (        StateValueTypeException e) {
          e.printStackTrace();
        }
      }
    }
    buildTree(entryList);
    refresh(INITIAL_WINDOW_OFFSET);
    ControlFlowEntry[] entries=fEntryList.toArray(new ControlFlowEntry[0]);
    Arrays.sort(entries);
    for (    ControlFlowEntry entry : entries) {
      buildStatusEvents(entry);
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private void selectExperiment(TmfExperiment<?> experiment){
  fStartTime=Long.MAX_VALUE;
  fEndTime=Long.MIN_VALUE;
  fSelectedExperiment=(TmfExperiment<ITmfEvent>)experiment;
  ArrayList<ControlFlowEntry> entryList=new ArrayList<ControlFlowEntry>();
  for (  ITmfTrace<?> trace : experiment.getTraces()) {
    if (trace instanceof CtfKernelTrace) {
      CtfKernelTrace ctfKernelTrace=(CtfKernelTrace)trace;
      IStateSystemQuerier ssq=ctfKernelTrace.getStateSystem();
      long start=ssq.getStartTime();
      long end=ssq.getCurrentEndTime();
      fStartTime=Math.min(fStartTime,start);
      fEndTime=Math.max(fEndTime,end);
      List<Integer> threadQuarks=ssq.getQuarks(Attributes.THREADS,"String_Node_Str");
      for (      int threadQuark : threadQuarks) {
        String threadName=ssq.getAttributeName(threadQuark);
        int threadId=-1;
        try {
          threadId=Integer.parseInt(threadName);
        }
 catch (        NumberFormatException e1) {
          continue;
        }
        if (threadId == 0) {
          continue;
        }
        int execNameQuark=-1;
        try {
          try {
            execNameQuark=ssq.getQuarkRelative(threadQuark,Attributes.EXEC_NAME);
          }
 catch (          AttributeNotFoundException e) {
            continue;
          }
          int ppidQuark=ssq.getQuarkRelative(threadQuark,Attributes.PPID);
          List<ITmfStateInterval> execNameIntervals=ssq.queryHistoryRange(execNameQuark,start,end);
          long birthTime=-1;
          for (          ITmfStateInterval execNameInterval : execNameIntervals) {
            if (!execNameInterval.getStateValue().isNull() && execNameInterval.getStateValue().getType() == 1) {
              String execName=execNameInterval.getStateValue().unboxStr();
              long startTime=execNameInterval.getStartTime();
              long endTime=execNameInterval.getEndTime() + 1;
              if (birthTime == -1) {
                birthTime=startTime;
              }
              int ppid=-1;
              if (ppidQuark != -1) {
                ITmfStateInterval ppidInterval=ssq.querySingleState(startTime,ppidQuark);
                ppid=ppidInterval.getStateValue().unboxInt();
              }
              ControlFlowEntry entry=new ControlFlowEntry(threadQuark,ctfKernelTrace,execName,threadId,ppid,birthTime,startTime,endTime);
              entryList.add(entry);
              entry.addEvent(new TimeEvent(entry,startTime,endTime - startTime));
            }
 else {
              birthTime=-1;
            }
          }
        }
 catch (        AttributeNotFoundException e) {
          e.printStackTrace();
        }
catch (        TimeRangeException e) {
          e.printStackTrace();
        }
catch (        StateValueTypeException e) {
          e.printStackTrace();
        }
      }
    }
    buildTree(entryList);
    refresh(INITIAL_WINDOW_OFFSET);
    ControlFlowEntry[] entries=fEntryList.toArray(new ControlFlowEntry[0]);
    Arrays.sort(entries,fControlFlowEntryComparator);
    for (    ControlFlowEntry entry : entries) {
      buildStatusEvents(entry);
    }
  }
}