nus-yam/ex-repair huggingface dataset:
Program: 92676
Project: 92676
Buggy source:
public void initTrace(String path,Class<LttngEvent> eventType,int cacheSize,boolean indexTrace) throws FileNotFoundException {
  initLTTngTrace(path,eventType,cacheSize,indexTrace);
}

Fixed version (ground truth):
public void initTrace(String name,String path,Class<LttngEvent> eventType,int cacheSize,boolean indexTrace) throws FileNotFoundException {
  initLTTngTrace(name,path,eventType,cacheSize,indexTrace);
}
Program: 92677
Project: 92677
Buggy source:
public LTTngTrace(LTTngTrace other) throws Exception {
  this(other.getPath(),other.getTraceLibPath(),false,true);
  this.fCheckpoints=other.fCheckpoints;
  setTimeRange(new TmfTimeRange(new LttngTimestamp(other.getStartTime()),new LttngTimestamp(other.getEndTime())));
}

Fixed version (ground truth):
public LTTngTrace(LTTngTrace other) throws Exception {
  this(other.getName(),other.getPath(),other.getTraceLibPath(),false,true);
  this.fCheckpoints=other.fCheckpoints;
  setTimeRange(new TmfTimeRange(new LttngTimestamp(other.getStartTime()),new LttngTimestamp(other.getEndTime())));
}
Program: 92678
Project: 92678
Buggy source:
private void initLTTngTrace(String path,Class<LttngEvent> eventType,int cacheSize,boolean indexTrace) throws FileNotFoundException {
  super.initTrace(path,eventType,indexTrace);
  try {
    currentJniTrace=JniTraceFactory.getJniTrace(path,traceLibPath,SHOW_LTT_DEBUG_DEFAULT);
  }
 catch (  Exception e) {
    throw new FileNotFoundException(e.getMessage());
  }
  traceTypes=new HashMap<Integer,LttngEventType>();
  traceTypeNames=new Vector<Integer>();
  initialiseEventTypes(currentJniTrace);
  eventTimestamp=new LttngTimestamp();
  eventSource="String_Node_Str";
  this.eventType=new LttngEventType();
  eventContent=new LttngEventContent(currentLttngEvent);
  eventReference=getName();
  currentLttngEvent=new LttngEvent(this,eventTimestamp,eventSource,this.eventType,eventContent,eventReference,null);
  previousLocation=new LttngLocation();
  eventContent.setEvent(currentLttngEvent);
  initializeStreamingMonitor();
}

Fixed version (ground truth):
private void initLTTngTrace(String name,String path,Class<LttngEvent> eventType,int cacheSize,boolean indexTrace) throws FileNotFoundException {
  super.initTrace(name,path,eventType,indexTrace);
  try {
    currentJniTrace=JniTraceFactory.getJniTrace(path,traceLibPath,SHOW_LTT_DEBUG_DEFAULT);
  }
 catch (  Exception e) {
    throw new FileNotFoundException(e.getMessage());
  }
  traceTypes=new HashMap<Integer,LttngEventType>();
  traceTypeNames=new Vector<Integer>();
  initialiseEventTypes(currentJniTrace);
  eventTimestamp=new LttngTimestamp();
  eventSource="String_Node_Str";
  this.eventType=new LttngEventType();
  eventContent=new LttngEventContent(currentLttngEvent);
  eventReference=getName();
  currentLttngEvent=new LttngEvent(this,eventTimestamp,eventSource,this.eventType,eventContent,eventReference,null);
  previousLocation=new LttngLocation();
  eventContent.setEvent(currentLttngEvent);
  initializeStreamingMonitor();
}
Program: 92679
Project: 92679
Buggy source:
@Override public void initTrace(String path,Class<T> eventType,int cacheSize,boolean indexTrace,String name){
  if (indexTrace) {
    initializeStreamingMonitor();
  }
}

Fixed version (ground truth):
@Override public void initTrace(String name,String path,Class<T> eventType,int cacheSize,boolean indexTrace){
  if (indexTrace) {
    initializeStreamingMonitor();
  }
}
Program: 92680
Project: 92680
Buggy source:
public void initTrace(String path,Class<T> eventType,int cacheSize,boolean indexTrace,String name) throws FileNotFoundException ;

Fixed version (ground truth):
public void initTrace(String name,String path,Class<T> eventType,int cacheSize,boolean indexTrace) throws FileNotFoundException ;
Program: 92681
Project: 92681
Buggy source:
/** 
 * @param path
 * @param cacheSize
 * @param indexTrace
 * @throws FileNotFoundException
 */
protected TmfTrace(String name,Class<T> type,String path,int cacheSize,boolean indexTrace) throws FileNotFoundException {
  super();
  fTraceName=name;
  initTrace(path,type,cacheSize,indexTrace);
}

Fixed version (ground truth):
/** 
 * @param path
 * @param cacheSize
 * @param indexTrace
 * @throws FileNotFoundException
 */
protected TmfTrace(String name,Class<T> type,String path,int cacheSize,boolean indexTrace) throws FileNotFoundException {
  super();
  fTraceName=name;
  initTrace(name,path,type,cacheSize,indexTrace);
}
Program: 92682
Project: 92682
Buggy source:
@Override public void initTrace(String path,Class<T> eventType,int cacheSize,boolean indexTrace,String name) throws FileNotFoundException {
  initTmfTrace(path,eventType,cacheSize,indexTrace,name);
}

Fixed version (ground truth):
@Override public void initTrace(String name,String path,Class<T> eventType,int cacheSize,boolean indexTrace) throws FileNotFoundException {
  initTmfTrace(name,path,eventType,cacheSize,indexTrace);
}
Program: 92683
Project: 92683
Buggy source:
private void initTmfTrace(String path,Class<T> eventType,int cacheSize,boolean indexTrace,String name) throws FileNotFoundException {
  fPath=path;
  if (name != null) {
    fTraceName=name;
  }
  if (fTraceName == null) {
    fTraceName="String_Node_Str";
    if (path != null) {
      int sep=path.lastIndexOf(Path.SEPARATOR);
      fTraceName=(sep >= 0) ? path.substring(sep + 1) : path;
    }
  }
  super.init(fTraceName,eventType);
  fIndexPageSize=(cacheSize > 0) ? cacheSize : DEFAULT_INDEX_PAGE_SIZE;
  if (indexTrace)   indexTrace(false);
}

Fixed version (ground truth):
private void initTmfTrace(String name,String path,Class<T> eventType,int cacheSize,boolean indexTrace) throws FileNotFoundException {
  fPath=path;
  if (name != null) {
    fTraceName=name;
  }
  if (fTraceName == null) {
    fTraceName="String_Node_Str";
    if (path != null) {
      int sep=path.lastIndexOf(Path.SEPARATOR);
      fTraceName=(sep >= 0) ? path.substring(sep + 1) : path;
    }
  }
  super.init(fTraceName,eventType);
  fIndexPageSize=(cacheSize > 0) ? cacheSize : DEFAULT_INDEX_PAGE_SIZE;
  if (indexTrace)   indexTrace(false);
}
Program: 92684
Project: 92684
Buggy source:
@Override public String[] getFieldNames(){
  return fFieldNames;
}

Fixed version (ground truth):
@Override public String[] getFieldNames(){
  return Arrays.copyOf(fFieldNames,fFieldNames.length);
}
Program: 92685
Project: 92685
Buggy source:
@Override public ITmfEventField[] getFields(){
  return fFields;
}

Fixed version (ground truth):
@Override public ITmfEventField[] getFields(){
  return (fFields != null) ? Arrays.copyOf(fFields,fFields.length) : null;
}
Program: 92686
Project: 92686
Buggy source:
@Override public boolean equals(Object other){
  if (!(other instanceof LttngLocation)) {
    return false;
  }
  LttngLocation o=(LttngLocation)other;
  return (operationTime.equals(o.operationTime)) && (isLastOperationParse == o.isLastOperationParse) && (isLastOperationReadNext == o.isLastOperationReadNext)&& (isLastOperationSeek == o.isLastOperationSeek);
}

Fixed version (ground truth):
@Override public boolean equals(Object obj){
  if (this == obj) {
    return true;
  }
  if (obj == null) {
    return false;
  }
  if (!(obj instanceof LttngLocation)) {
    return false;
  }
  LttngLocation o=(LttngLocation)obj;
  return (operationTime.equals(o.operationTime)) && (isLastOperationParse == o.isLastOperationParse) && (isLastOperationReadNext == o.isLastOperationReadNext)&& (isLastOperationSeek == o.isLastOperationSeek);
}
Program: 92687
Project: 92687
Buggy source:
/** 
 * @param stime Event Start Time (may be unknown)
 * @param etime Event EndTime (may be unknown)
 * @param eventParent
 * @param type
 * @param duration
 */
public TimeRangeEvent(Long stime,Long etime,TimeRangeComposite eventParent,Type type,String stateMode){
  super(stime,etime,eventParent);
  this.eventType=type;
  this.stateMode=stateMode;
}

Fixed version (ground truth):
/** 
 * @param stime Event Start Time (may be unknown)
 * @param etime Event EndTime (may be unknown)
 * @param eventParent
 * @param type
 * @param duration
 */
public TimeRangeEvent(Long stime,Long etime,TimeRangeComposite eventParent,Type type,String stateMode){
  super(stime,etime,eventParent);
  parent=eventParent;
  this.eventType=type;
  this.stateMode=stateMode;
}
Program: 92688
Project: 92688
Buggy source:
/** 
 * @param cpu
 */
public void setCpu(Long cpu){
  if (cpu != null) {
    this.cpu=cpu;
  }
 else {
    cpu=0L;
  }
}

Fixed version (ground truth):
/** 
 * @param cpu
 */
public void setCpu(Long cpu){
  if (cpu != null) {
    this.cpu=cpu;
  }
 else {
    this.cpu=0L;
  }
}
Program: 92690
Project: 92690
Buggy source:
/** 
 * <p> Handles: LTT_EVENT_EXEC </p> Replace C function "after_fs_exec_hook" in eventhooks.c
 * @return
 */
final ILttngEventProcessor getProcessExecHandler(){
  AbsFlowTRangeUpdate handler=new AbsFlowTRangeUpdate(){
    @Override public boolean process(    LttngEvent trcEvent,    LttngTraceState traceSt){
      LttngProcessState process=traceSt.getRunning_process().get(trcEvent.getCpuId());
      if (process != null) {
        TimeRangeEventProcess localProcess=procContainer.findProcess(process.getPid(),process.getCpu(),traceSt.getTraceId(),process.getCreation_time());
        if (localProcess == null) {
          if ((process.getPid() == 0) || (process.getPid() != process.getPpid())) {
            TmfTimeRange timeRange=traceSt.getContext().getTraceTimeWindow();
            localProcess=addLocalProcess(process,timeRange.getStartTime().getValue(),timeRange.getEndTime().getValue(),traceSt.getTraceId());
          }
 else {
            TraceDebug.debug("String_Node_Str");
          }
        }
 else {
          localProcess.setName(process.getName());
        }
      }
 else {
        TraceDebug.debug("String_Node_Str");
      }
      return false;
    }
  }
;
  return handler;
}

Fixed version (ground truth):
/** 
 * <p> Handles: LTT_EVENT_EXEC </p> Replace C function "after_fs_exec_hook" in eventhooks.c
 * @return
 */
final ILttngEventProcessor getProcessExecHandler(){
  AbsFlowTRangeUpdate handler=new AbsFlowTRangeUpdate(){
    @Override public boolean process(    LttngEvent trcEvent,    LttngTraceState traceSt){
      LttngProcessState process=traceSt.getRunning_process().get(trcEvent.getCpuId());
      if (process != null) {
        TimeRangeEventProcess localProcess=procContainer.findProcess(process.getPid(),process.getCpu(),traceSt.getTraceId(),process.getCreation_time());
        if (localProcess == null) {
          if (process.getPid().equals(0) || !process.getPid().equals(process.getPpid())) {
            TmfTimeRange timeRange=traceSt.getContext().getTraceTimeWindow();
            localProcess=addLocalProcess(process,timeRange.getStartTime().getValue(),timeRange.getEndTime().getValue(),traceSt.getTraceId());
          }
 else {
            TraceDebug.debug("String_Node_Str");
          }
        }
 else {
          localProcess.setName(process.getName());
        }
      }
 else {
        TraceDebug.debug("String_Node_Str");
      }
      return false;
    }
  }
;
  return handler;
}
Program: 92691
Project: 92691
Buggy source:
@Override public boolean process(LttngEvent trcEvent,LttngTraceState traceSt){
  int first_cpu;
  int nb_cpus;
  Long pid_in=getAFieldLong(trcEvent,traceSt,Fields.LTT_FIELD_PID);
  if (pid_in != null) {
    if (pid_in == 0L) {
      first_cpu=0;
      nb_cpus=traceSt.getNumberOfCPUs();
    }
 else {
      first_cpu=ANY_CPU.intValue();
      nb_cpus=ANY_CPU.intValue() + 1;
    }
    for (int cpu=first_cpu; cpu < nb_cpus; cpu++) {
      LttngProcessState process_in=lttv_state_find_process(traceSt,Long.valueOf(cpu),pid_in);
      if (process_in != null) {
        TimeRangeEventProcess localProcess=procContainer.findProcess(process_in.getPid(),process_in.getCpu(),traceSt.getTraceId(),process_in.getCreation_time());
        if (localProcess == null) {
          if ((process_in.getPid() == 0) || (process_in.getPid() != process_in.getPpid())) {
            TmfTimeRange timeRange=traceSt.getContext().getTraceTimeWindow();
            localProcess=addLocalProcess(process_in,timeRange.getStartTime().getValue(),timeRange.getEndTime().getValue(),traceSt.getTraceId());
          }
 else {
            TraceDebug.debug("String_Node_Str");
          }
        }
        localProcess.setName(process_in.getName());
        localProcess.setPpid(process_in.getPpid());
        localProcess.setTgid(process_in.getTgid());
      }
 else {
        TraceDebug.debug("String_Node_Str");
      }
    }
  }
 else {
    TraceDebug.debug("String_Node_Str");
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean process(LttngEvent trcEvent,LttngTraceState traceSt){
  int first_cpu;
  int nb_cpus;
  Long pid_in=getAFieldLong(trcEvent,traceSt,Fields.LTT_FIELD_PID);
  if (pid_in != null) {
    if (pid_in == 0L) {
      first_cpu=0;
      nb_cpus=traceSt.getNumberOfCPUs();
    }
 else {
      first_cpu=ANY_CPU.intValue();
      nb_cpus=ANY_CPU.intValue() + 1;
    }
    for (int cpu=first_cpu; cpu < nb_cpus; cpu++) {
      LttngProcessState process_in=lttv_state_find_process(traceSt,Long.valueOf(cpu),pid_in);
      if (process_in != null) {
        TimeRangeEventProcess localProcess=procContainer.findProcess(process_in.getPid(),process_in.getCpu(),traceSt.getTraceId(),process_in.getCreation_time());
        if (localProcess == null) {
          if (process_in.getPid().equals(0) || !process_in.getPid().equals(process_in.getPpid())) {
            TmfTimeRange timeRange=traceSt.getContext().getTraceTimeWindow();
            localProcess=addLocalProcess(process_in,timeRange.getStartTime().getValue(),timeRange.getEndTime().getValue(),traceSt.getTraceId());
          }
 else {
            TraceDebug.debug("String_Node_Str");
            return false;
          }
        }
        localProcess.setName(process_in.getName());
        localProcess.setPpid(process_in.getPpid());
        localProcess.setTgid(process_in.getTgid());
      }
 else {
        TraceDebug.debug("String_Node_Str");
      }
    }
  }
 else {
    TraceDebug.debug("String_Node_Str");
  }
  return false;
}
Program: 92692
Project: 92692
Buggy source:
/** 
 * <p> LTT_EVENT_THREAD_BRAND </p> Replace C function "after_user_generic_thread_brand_hook" in eventhooks.c
 * @return
 */
final ILttngEventProcessor GetThreadBrandHandler(){
  AbsFlowTRangeUpdate handler=new AbsFlowTRangeUpdate(){
    @Override public boolean process(    LttngEvent trcEvent,    LttngTraceState traceSt){
      LttngProcessState process=traceSt.getRunning_process().get(trcEvent.getCpuId());
      if (process != null) {
        TimeRangeEventProcess localProcess=procContainer.findProcess(process.getPid(),process.getCpu(),traceSt.getTraceId(),process.getCreation_time());
        if (localProcess == null) {
          if ((process.getPid() == 0) || (process.getPid() != process.getPpid())) {
            TmfTimeRange timeRange=traceSt.getContext().getTraceTimeWindow();
            localProcess=addLocalProcess(process,timeRange.getStartTime().getValue(),timeRange.getEndTime().getValue(),traceSt.getTraceId());
          }
 else {
            TraceDebug.debug("String_Node_Str");
          }
        }
 else {
          localProcess.setBrand(process.getBrand());
        }
      }
 else {
        TraceDebug.debug("String_Node_Str");
      }
      return false;
    }
  }
;
  return handler;
}

Fixed version (ground truth):
/** 
 * <p> LTT_EVENT_THREAD_BRAND </p> Replace C function "after_user_generic_thread_brand_hook" in eventhooks.c
 * @return
 */
final ILttngEventProcessor GetThreadBrandHandler(){
  AbsFlowTRangeUpdate handler=new AbsFlowTRangeUpdate(){
    @Override public boolean process(    LttngEvent trcEvent,    LttngTraceState traceSt){
      LttngProcessState process=traceSt.getRunning_process().get(trcEvent.getCpuId());
      if (process != null) {
        TimeRangeEventProcess localProcess=procContainer.findProcess(process.getPid(),process.getCpu(),traceSt.getTraceId(),process.getCreation_time());
        if (localProcess == null) {
          if (process.getPid().equals(0) || !process.getPid().equals(process.getPpid())) {
            TmfTimeRange timeRange=traceSt.getContext().getTraceTimeWindow();
            localProcess=addLocalProcess(process,timeRange.getStartTime().getValue(),timeRange.getEndTime().getValue(),traceSt.getTraceId());
          }
 else {
            TraceDebug.debug("String_Node_Str");
          }
        }
 else {
          localProcess.setBrand(process.getBrand());
        }
      }
 else {
        TraceDebug.debug("String_Node_Str");
      }
      return false;
    }
  }
;
  return handler;
}
Program: 92693
Project: 92693
Buggy source:
/** 
 * <p> Handles: LTT_EVENT_PROCESS_EXIT </p> Replace C function "after_process_exit_hook" in eventhooks.c
 * @return
 */
final ILttngEventProcessor getProcessExitHandler(){
  AbsFlowTRangeUpdate handler=new AbsFlowTRangeUpdate(){
    @Override public boolean process(    LttngEvent trcEvent,    LttngTraceState traceSt){
      LttngProcessState process=traceSt.getRunning_process().get(trcEvent.getCpuId());
      if (process != null) {
        TimeRangeEventProcess localProcess=procContainer.findProcess(process.getPid(),process.getCpu(),traceSt.getTraceId(),process.getCreation_time());
        if (localProcess == null) {
          if ((process.getPid() == 0) || (process.getPid() != process.getPpid())) {
            TmfTimeRange timeRange=traceSt.getContext().getTraceTimeWindow();
            localProcess=addLocalProcess(process,timeRange.getStartTime().getValue(),timeRange.getEndTime().getValue(),traceSt.getTraceId());
          }
 else {
            TraceDebug.debug("String_Node_Str");
          }
        }
      }
 else {
        TraceDebug.debug("String_Node_Str");
      }
      return false;
    }
  }
;
  return handler;
}

Fixed version (ground truth):
/** 
 * <p> Handles: LTT_EVENT_PROCESS_EXIT </p> Replace C function "after_process_exit_hook" in eventhooks.c
 * @return
 */
final ILttngEventProcessor getProcessExitHandler(){
  AbsFlowTRangeUpdate handler=new AbsFlowTRangeUpdate(){
    @Override public boolean process(    LttngEvent trcEvent,    LttngTraceState traceSt){
      LttngProcessState process=traceSt.getRunning_process().get(trcEvent.getCpuId());
      if (process != null) {
        TimeRangeEventProcess localProcess=procContainer.findProcess(process.getPid(),process.getCpu(),traceSt.getTraceId(),process.getCreation_time());
        if (localProcess == null) {
          if (process.getPid().equals(0) || !process.getPid().equals(process.getPpid())) {
            TmfTimeRange timeRange=traceSt.getContext().getTraceTimeWindow();
            localProcess=addLocalProcess(process,timeRange.getStartTime().getValue(),timeRange.getEndTime().getValue(),traceSt.getTraceId());
          }
 else {
            TraceDebug.debug("String_Node_Str");
          }
        }
      }
 else {
        TraceDebug.debug("String_Node_Str");
      }
      return false;
    }
  }
;
  return handler;
}
Program: 92695
Project: 92695
Buggy source:
/** 
 * <p> Handles: LTT_EVENT_PROCESS_FORK </p> Replace C function "after_process_fork_hook" in eventhooks.c <p> Fields: LTT_FIELD_CHILD_PID </p>
 * @return
 */
final ILttngEventProcessor getProcessForkHandler(){
  AbsFlowTRangeUpdate handler=new AbsFlowTRangeUpdate(){
    @Override public boolean process(    LttngEvent trcEvent,    LttngTraceState traceSt){
      Long child_pid=getAFieldLong(trcEvent,traceSt,Fields.LTT_FIELD_CHILD_PID);
      LttngProcessState process_child=lttv_state_find_process(traceSt,trcEvent.getCpuId(),child_pid);
      if (process_child != null) {
        TimeRangeEventProcess localProcess=procContainer.findProcess(process_child.getPid(),process_child.getCpu(),traceSt.getTraceId(),process_child.getCreation_time());
        if (localProcess == null) {
          if ((child_pid == 0) || (child_pid != process_child.getPpid())) {
            TmfTimeRange timeRange=traceSt.getContext().getTraceTimeWindow();
            localProcess=addLocalProcess(process_child,timeRange.getStartTime().getValue(),timeRange.getEndTime().getValue(),traceSt.getTraceId());
          }
 else {
            TraceDebug.debug("String_Node_Str");
          }
        }
 else {
          localProcess.setPpid(process_child.getPpid());
          localProcess.setTgid(process_child.getTgid());
        }
      }
 else {
        TraceDebug.debug("String_Node_Str");
      }
      return false;
    }
  }
;
  return handler;
}

Fixed version (ground truth):
/** 
 * <p> Handles: LTT_EVENT_PROCESS_FORK </p> Replace C function "after_process_fork_hook" in eventhooks.c <p> Fields: LTT_FIELD_CHILD_PID </p>
 * @return
 */
final ILttngEventProcessor getProcessForkHandler(){
  AbsFlowTRangeUpdate handler=new AbsFlowTRangeUpdate(){
    @Override public boolean process(    LttngEvent trcEvent,    LttngTraceState traceSt){
      Long child_pid=getAFieldLong(trcEvent,traceSt,Fields.LTT_FIELD_CHILD_PID);
      LttngProcessState process_child=lttv_state_find_process(traceSt,trcEvent.getCpuId(),child_pid);
      if (process_child != null) {
        TimeRangeEventProcess localProcess=procContainer.findProcess(process_child.getPid(),process_child.getCpu(),traceSt.getTraceId(),process_child.getCreation_time());
        if (localProcess == null) {
          if (child_pid.equals(0) || !child_pid.equals(process_child.getPpid())) {
            TmfTimeRange timeRange=traceSt.getContext().getTraceTimeWindow();
            localProcess=addLocalProcess(process_child,timeRange.getStartTime().getValue(),timeRange.getEndTime().getValue(),traceSt.getTraceId());
          }
 else {
            TraceDebug.debug("String_Node_Str");
          }
        }
 else {
          localProcess.setPpid(process_child.getPpid());
          localProcess.setTgid(process_child.getTgid());
        }
      }
 else {
        TraceDebug.debug("String_Node_Str");
      }
      return false;
    }
  }
;
  return handler;
}
Program: 92696
Project: 92696
Buggy source:
@Override public boolean equals(Object obj){
  boolean isSame=false;
  if (obj instanceof ProcessKey) {
    ProcessKey procKey=(ProcessKey)obj;
    if (valueRef != null) {
      if ((procKey.getPid().equals(valueRef.getPid())) && (procKey.getTraceId().equals(valueRef.getTraceID())) && (procKey.getCreationtime().equals(valueRef.getCreationTime()))) {
        if (valueRef.getPid().longValue() == 0L && !procKey.getCpuId().equals(valueRef.getCpu())) {
          isSame=false;
        }
 else {
          isSame=true;
        }
      }
    }
 else {
      if ((procKey.getPid().equals(this.pid)) && (procKey.getTraceId().equals(this.traceId)) && (procKey.getCreationtime().equals(this.creationtime))) {
        if (this.pid.longValue() == 0L && !procKey.getCpuId().equals(this.cpuId)) {
          isSame=false;
        }
 else {
          isSame=true;
        }
      }
    }
  }
 else {
    TraceDebug.debug("String_Node_Str" + obj.getClass().toString());
  }
  return isSame;
}

Fixed version (ground truth):
@Override public boolean equals(Object obj){
  if (obj == this)   return true;
  if (obj == null)   return false;
  boolean isSame=false;
  if (obj instanceof ProcessKey) {
    ProcessKey procKey=(ProcessKey)obj;
    if (valueRef != null) {
      if ((procKey.getPid().equals(valueRef.getPid())) && (procKey.getTraceId().equals(valueRef.getTraceID())) && (procKey.getCreationtime().equals(valueRef.getCreationTime()))) {
        if (valueRef.getPid().longValue() == 0L && !procKey.getCpuId().equals(valueRef.getCpu())) {
          isSame=false;
        }
 else {
          isSame=true;
        }
      }
    }
 else {
      if ((procKey.getPid().equals(this.pid)) && (procKey.getTraceId().equals(this.traceId)) && (procKey.getCreationtime().equals(this.creationtime))) {
        if (this.pid.longValue() == 0L && !procKey.getCpuId().equals(this.cpuId)) {
          isSame=false;
        }
 else {
          isSame=true;
        }
      }
    }
  }
 else {
    TraceDebug.debug("String_Node_Str" + obj.getClass().toString());
  }
  return isSame;
}
Program: 92697
Project: 92697
Buggy source:
/** 
 * Paints the horizontal ticks.
 * @param y The y coordinate where to draw the axis.
 */
public void paintHorizontalTicks(int y){
  if (fXMin >= 0L && fXMin >= 0L) {
    int nbTicks=(int)(getWidth()) / MAX_WIDTH_BETWEEN_TICKS + 1;
    for (int i=0; i < nbTicks; i++) {
      if (i % fDrawLabelEachNTicks == 0) {
        int x=i * MAX_WIDTH_BETWEEN_TICKS + fPadding + fVerticalAxisOffset;
        fAxisImage.drawLine(x,y,x,y + 3);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Paints the horizontal ticks.
 * @param y The y coordinate where to draw the axis.
 */
public void paintHorizontalTicks(int y){
  if (fXMin >= 0L && fXMax >= 0L) {
    int nbTicks=(int)(getWidth()) / MAX_WIDTH_BETWEEN_TICKS + 1;
    for (int i=0; i < nbTicks; i++) {
      if (i % fDrawLabelEachNTicks == 0) {
        int x=i * MAX_WIDTH_BETWEEN_TICKS + fPadding + fVerticalAxisOffset;
        fAxisImage.drawLine(x,y,x,y + 3);
      }
    }
  }
}
Program: 92698
Project: 92698
Buggy source:
/** 
 * Paints the vertical axis ticks.
 * @param x The x-coordinate where to draw the ticks.
 */
public void paintVerticalTicks(int x){
  if (fYMin != 0L && fYMin != 0L) {
    int nbTicks=(int)(getHeight() / MAX_HEIGHT_BETWEEN_TICKS + 1);
    for (int i=0; i < nbTicks; i++) {
      int y=fClientArea.height - fPadding - fHorizontalAxisYOffset- i * MAX_HEIGHT_BETWEEN_TICKS;
      fAxisImage.drawLine(x - 3,y,x,y);
    }
  }
}

Fixed version (ground truth):
/** 
 * Paints the vertical axis ticks.
 * @param x The x-coordinate where to draw the ticks.
 */
public void paintVerticalTicks(int x){
  if (fYMin != 0L && fYMax != 0L) {
    int nbTicks=(int)(getHeight() / MAX_HEIGHT_BETWEEN_TICKS + 1);
    for (int i=0; i < nbTicks; i++) {
      int y=fClientArea.height - fPadding - fHorizontalAxisYOffset- i * MAX_HEIGHT_BETWEEN_TICKS;
      fAxisImage.drawLine(x - 3,y,x,y);
    }
  }
}
Program: 92699
Project: 92699
Buggy source:
@Override public boolean equals(Object obj){
  boolean isSame=false;
  if (obj instanceof ResourceKey) {
    if (valueRef != null) {
      if ((((ResourceKey)obj).getResourceId().equals(valueRef.getResourceId())) && (((ResourceKey)obj).getTraceId().equals(valueRef.getTraceId())) && (((ResourceKey)obj).getType().equals(valueRef.getType()))) {
        isSame=true;
      }
    }
 else {
      if ((((ResourceKey)obj).getResourceId().equals(this.resourceId)) && (((ResourceKey)obj).getTraceId().equals(this.traceId)) && (((ResourceKey)obj).getType().equals(this.type))) {
        isSame=true;
      }
    }
  }
 else {
    TraceDebug.debug("String_Node_Str" + obj.getClass().toString());
  }
  return isSame;
}

Fixed version (ground truth):
@Override public boolean equals(Object obj){
  if (obj == this)   return true;
  if (obj == null)   return false;
  boolean isSame=false;
  if (obj instanceof ResourceKey) {
    if (valueRef != null) {
      if ((((ResourceKey)obj).getResourceId().equals(valueRef.getResourceId())) && (((ResourceKey)obj).getTraceId().equals(valueRef.getTraceId())) && (((ResourceKey)obj).getType().equals(valueRef.getType()))) {
        isSame=true;
      }
    }
 else {
      if ((((ResourceKey)obj).getResourceId().equals(this.resourceId)) && (((ResourceKey)obj).getTraceId().equals(this.traceId)) && (((ResourceKey)obj).getType().equals(this.type))) {
        isSame=true;
      }
    }
  }
 else {
    TraceDebug.debug("String_Node_Str" + obj.getClass().toString());
  }
  return isSame;
}
Program: 92700
Project: 92700
Buggy source:
@Override public boolean equals(Object o){
  return Arrays.equals(fArray,((FixedArray)o).fArray);
}

Fixed version (ground truth):
@Override public boolean equals(Object o){
  if (o == this)   return true;
  if (o == null)   return false;
  return Arrays.equals(fArray,((FixedArray)o).fArray);
}
Program: 92701
Project: 92701
Buggy source:
@Override public boolean equals(Object obj){
  ProcessKey procKey=(ProcessKey)obj;
  if (procKey.fPid != this.fPid) {
    return false;
  }
  if (procKey.fCreationTime != this.fCreationTime) {
    return false;
  }
  if (((procKey.fPid == 0L) && (procKey.fCpuId != this.fCpuId))) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean equals(Object obj){
  if (obj == this)   return true;
  if (obj == null)   return false;
  ProcessKey procKey=(ProcessKey)obj;
  if (procKey.fPid != this.fPid) {
    return false;
  }
  if (procKey.fCreationTime != this.fCreationTime) {
    return false;
  }
  if (((procKey.fPid == 0L) && (procKey.fCpuId != this.fCpuId))) {
    return false;
  }
  return true;
}
Program: 92703
Project: 92703
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public void experimentRangeUpdated(TmfExperimentRangeUpdatedSignal signal){
  TmfExperiment<LttngEvent> experiment=(TmfExperiment<LttngEvent>)signal.getExperiment();
  if (experiment != fSelectedExperiment.getValue()) {
    return;
  }
synchronized (fCheckPointUpdateSyncObj) {
    if (fCheckPointUpdateBusy) {
      fCheckPointUpdatePending=true;
      fCheckPointUpdateRange=signal.getRange();
      return;
    }
 else {
      fCheckPointUpdateBusy=true;
    }
  }
  if (fStateCheckPointRequest != null && !fStateCheckPointRequest.isCompleted()) {
    fStateCheckPointRequest.cancel();
  }
  fStateCheckPointRequest=buildCheckPoints(experiment,signal.getRange(),fInitial);
  fInitial=false;
  if (fStateCheckPointRequest == null) {
synchronized (fCheckPointUpdateSyncObj) {
      fCheckPointUpdateBusy=false;
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public void experimentRangeUpdated(TmfExperimentRangeUpdatedSignal signal){
  TmfExperiment<LttngEvent> experiment=(TmfExperiment<LttngEvent>)signal.getExperiment();
  if (fSelectedExperiment == null || experiment != fSelectedExperiment.getValue()) {
    return;
  }
synchronized (fCheckPointUpdateSyncObj) {
    if (fCheckPointUpdateBusy) {
      fCheckPointUpdatePending=true;
      fCheckPointUpdateRange=signal.getRange();
      return;
    }
 else {
      fCheckPointUpdateBusy=true;
    }
  }
  if (fStateCheckPointRequest != null && !fStateCheckPointRequest.isCompleted()) {
    fStateCheckPointRequest.cancel();
  }
  fStateCheckPointRequest=buildCheckPoints(experiment,signal.getRange(),fInitial);
  fInitial=false;
  if (fStateCheckPointRequest == null) {
synchronized (fCheckPointUpdateSyncObj) {
      fCheckPointUpdateBusy=false;
    }
  }
}
Program: 92704
Project: 92704
Buggy source:
@TmfSignalHandler public void experimentRangeUpdated(TmfExperimentRangeUpdatedSignal signal){
  indexExperiment(false,(int)fNbEvents,signal.getRange());
}

Fixed version (ground truth):
@TmfSignalHandler public void experimentRangeUpdated(TmfExperimentRangeUpdatedSignal signal){
  if (signal.getExperiment() == this) {
    indexExperiment(false,(int)fNbEvents,signal.getRange());
  }
}
Program: 92705
Project: 92705
Buggy source:
public void testConstructors(){
  LttngEvent testEvent=null;
  LttngEventContent testContent=null;
  LttngEventContent testContent2=null;
  LttngEventField[] testFields=new LttngEventField[1];
  testFields[0]=new LttngEventField("String_Node_Str");
  try {
    testContent=new LttngEventContent();
  }
 catch (  Exception e) {
    fail("String_Node_Str");
  }
  try {
    testContent=new LttngEventContent(testEvent);
  }
 catch (  Exception e) {
    fail("String_Node_Str");
  }
  try {
    HashMap<String,LttngEventField> parsedContent=new HashMap<String,LttngEventField>();
    testContent=new LttngEventContent(testEvent,parsedContent);
  }
 catch (  Exception e) {
    fail("String_Node_Str");
  }
  try {
    testContent=new LttngEventContent(testEvent);
    testContent2=new LttngEventContent(testContent);
  }
 catch (  Exception e) {
    fail("String_Node_Str");
  }
}

Fixed version (ground truth):
public void testConstructors(){
  LttngEvent testEvent=null;
  LttngEventContent testContent=null;
  @SuppressWarnings("String_Node_Str") LttngEventContent testContent2=null;
  LttngEventField[] testFields=new LttngEventField[1];
  testFields[0]=new LttngEventField("String_Node_Str");
  try {
    testContent=new LttngEventContent();
  }
 catch (  Exception e) {
    fail("String_Node_Str");
  }
  try {
    testContent=new LttngEventContent(testEvent);
  }
 catch (  Exception e) {
    fail("String_Node_Str");
  }
  try {
    HashMap<String,LttngEventField> parsedContent=new HashMap<String,LttngEventField>();
    testContent=new LttngEventContent(testEvent,parsedContent);
  }
 catch (  Exception e) {
    fail("String_Node_Str");
  }
  try {
    testContent=new LttngEventContent(testEvent);
    testContent2=new LttngEventContent(testContent);
  }
 catch (  Exception e) {
    fail("String_Node_Str");
  }
}
Program: 92706
Project: 92706
Buggy source:
public void testConstructors(){
  LttngEventContent testContent=null;
  LttngEventField testField=null;
  @SuppressWarnings("String_Node_Str") LttngEventField testField2=null;
  try {
    testField=new LttngEventField("String_Node_Str","String_Node_Str");
  }
 catch (  Exception e) {
    fail("String_Node_Str");
  }
  try {
    testField=new LttngEventField("String_Node_Str","String_Node_Str");
    testField2=new LttngEventField(testField);
  }
 catch (  Exception e) {
    fail("String_Node_Str");
  }
}

Fixed version (ground truth):
public void testConstructors(){
  LttngEventField testField=null;
  @SuppressWarnings("String_Node_Str") LttngEventField testField2=null;
  try {
    testField=new LttngEventField("String_Node_Str","String_Node_Str");
  }
 catch (  Exception e) {
    fail("String_Node_Str");
  }
  try {
    testField=new LttngEventField("String_Node_Str","String_Node_Str");
    testField2=new LttngEventField(testField);
  }
 catch (  Exception e) {
    fail("String_Node_Str");
  }
}
Program: 92707
Project: 92707
Buggy source:
/** 
 * Provide a stateManager instance per trace
 * @return
 */
public static IStateTraceManager getManager(ITmfTrace trace){
  String traceUniqueId=trace.getName();
  if (traceUniqueId == null) {
    return null;
  }
  if (instanceBook.containsKey(traceUniqueId)) {
    return instanceBook.get(traceUniqueId);
  }
  IStateTraceManager manager=null;
  Long id=0L;
  LTTngTreeNode parent=null;
  try {
    manager=new StateTraceManager(id,parent,traceUniqueId,trace);
  }
 catch (  LttngStateException e) {
    e.printStackTrace();
  }
  instanceBook.put(traceUniqueId,manager);
  return manager;
}

Fixed version (ground truth):
/** 
 * Provide a stateManager instance per trace
 * @return
 */
public static IStateTraceManager getManager(ITmfTrace<?> trace){
  String traceUniqueId=trace.getName();
  if (traceUniqueId == null) {
    return null;
  }
  if (instanceBook.containsKey(traceUniqueId)) {
    return instanceBook.get(traceUniqueId);
  }
  IStateTraceManager manager=null;
  Long id=0L;
  LTTngTreeNode parent=null;
  try {
    manager=new StateTraceManager(id,parent,traceUniqueId,trace);
  }
 catch (  LttngStateException e) {
    e.printStackTrace();
  }
  instanceBook.put(traceUniqueId,manager);
  return manager;
}
Program: 92708
Project: 92708
Buggy source:
/** 
 * TODO: Not used for the time being, for experiment selection test cases for package state.experiment
 */
public void testSetTraceSelection(){
  String logName="String_Node_Str";
}

Fixed version (ground truth):
/** 
 * TODO: Not used for the time being, for experiment selection test cases for package state.experiment
 */
public void testSetTraceSelection(){
}
Program: 92710
Project: 92710
Buggy source:
/** 
 * Trigger the Analysis and sequential control of the events.
 * @param e
 */
private void handleIncomingData(LttngEvent e){
  long eventTime=e.getTimestamp().getValue();
  ITmfTrace inTrace=e.getTrace();
  LttngTraceState traceModel=traceToTraceStateModel.get(inTrace);
  updateSynEvent(e);
  if (eventTime >= dispatchTime && eventIndex >= dispatchIndex) {
    syntheticEvent.setSequenceInd(SequenceInd.BEFORE);
    fmainRequest.handleData(syntheticEvent);
    syntheticEvent.setSequenceInd(SequenceInd.UPDATE);
    fstateUpdateProcessor.process(syntheticEvent,traceModel);
    syntheticEvent.setSequenceInd(SequenceInd.AFTER);
    fmainRequest.handleData(syntheticEvent);
  }
 else {
    syntheticEvent.setSequenceInd(SequenceInd.UPDATE);
    fstateUpdateProcessor.process(syntheticEvent,traceModel);
  }
  eventIndex++;
}

Fixed version (ground truth):
/** 
 * Trigger the Analysis and sequential control of the events.
 * @param e
 */
private void handleIncomingData(LttngEvent e){
  long eventTime=e.getTimestamp().getValue();
  ITmfTrace<?> inTrace=e.getTrace();
  LttngTraceState traceModel=traceToTraceStateModel.get(inTrace);
  updateSynEvent(e);
  if (eventTime >= dispatchTime && eventIndex >= dispatchIndex) {
    syntheticEvent.setSequenceInd(SequenceInd.BEFORE);
    fmainRequest.handleData(syntheticEvent);
    syntheticEvent.setSequenceInd(SequenceInd.UPDATE);
    fstateUpdateProcessor.process(syntheticEvent,traceModel);
    syntheticEvent.setSequenceInd(SequenceInd.AFTER);
    fmainRequest.handleData(syntheticEvent);
  }
 else {
    syntheticEvent.setSequenceInd(SequenceInd.UPDATE);
    fstateUpdateProcessor.process(syntheticEvent,traceModel);
  }
  eventIndex++;
}
Program: 92711
Project: 92711
Buggy source:
/** 
 * Create a synthetic event from the received new reference, if the reference is the same there is no need for a new instance if this is the first event for this request, call start handler
 * @param e
 * @return
 */
private LttngSyntheticEvent updateSynEvent(LttngEvent e){
  if ((syntheticEvent == null) || (syntheticEvent.getBaseEvent() != e)) {
    syntheticEvent=new LttngSyntheticEvent(e);
  }
  ITmfTrace inTrace=e.getTrace();
  LttngTraceState traceModel=traceToTraceStateModel.get(inTrace);
  syntheticEvent.setTraceModel(traceModel);
  if (!startIndSent) {
    TraceDebug.debug("String_Node_Str" + Thread.currentThread().getName());
    handleProviderStarted(traceModel);
    startIndSent=true;
  }
  return syntheticEvent;
}

Fixed version (ground truth):
/** 
 * Create a synthetic event from the received new reference, if the reference is the same there is no need for a new instance if this is the first event for this request, call start handler
 * @param e
 * @return
 */
private LttngSyntheticEvent updateSynEvent(LttngEvent e){
  if ((syntheticEvent == null) || (syntheticEvent.getBaseEvent() != e)) {
    syntheticEvent=new LttngSyntheticEvent(e);
  }
  ITmfTrace<?> inTrace=e.getTrace();
  LttngTraceState traceModel=traceToTraceStateModel.get(inTrace);
  syntheticEvent.setTraceModel(traceModel);
  if (!startIndSent) {
    TraceDebug.debug("String_Node_Str" + Thread.currentThread().getName());
    handleProviderStarted(traceModel);
    startIndSent=true;
  }
  return syntheticEvent;
}
Program: 92712
Project: 92712
Buggy source:
public void setReference(String reference){
  fReference=reference;
}

Fixed version (ground truth):
@Override public void setReference(String reference){
  fReference=reference;
}
Program: 92713
Project: 92713
Buggy source:
public Object getNodeType(){
  return ftype;
}

Fixed version (ground truth):
@Override public Object getNodeType(){
  return ftype;
}
Program: 92714
Project: 92714
Buggy source:
@Override public void experimentSelected_prep(TmfExperiment<LttngEvent> experiment){
  if (fSelectedExperiment != null) {
    clearExperimentNode(fSelectedExperiment);
    fSelectedExperiment=null;
  }
  LTTngTreeNode experimentNode=null;
  if (experiment != null) {
    experimentNode=getChildByName(experiment.getName());
    if (experimentNode != null && experimentNode.getValue() != experiment) {
      clearExperimentNode(experimentNode);
      experimentNode=null;
    }
    if (experimentNode == null) {
      experimentNode=new LTTngTreeNode(getNextUniqueId(),this,experiment.getName(),experiment);
      addChild(experimentNode);
    }
    ITmfTrace[] rtraces=experiment.getTraces();
    String traceName;
    LTTngTreeNode traceStateManagerNode;
    for (    ITmfTrace rtrace : rtraces) {
      traceName=rtrace.getName();
      traceStateManagerNode=experimentNode.getChildByName(traceName);
      if (traceStateManagerNode == null) {
        traceStateManagerNode=StateManagerFactory.getManager(rtrace,experimentNode);
        experimentNode.addChild(traceStateManagerNode);
      }
    }
    LttngCoreProviderFactory.reset(experimentNode);
    fSelectedExperiment=experimentNode;
  }
}

Fixed version (ground truth):
@Override public void experimentSelected_prep(TmfExperiment<LttngEvent> experiment){
  if (fSelectedExperiment != null) {
    clearExperimentNode(fSelectedExperiment);
    fSelectedExperiment=null;
  }
  LTTngTreeNode experimentNode=null;
  if (experiment != null) {
    experimentNode=getChildByName(experiment.getName());
    if (experimentNode != null && experimentNode.getValue() != experiment) {
      clearExperimentNode(experimentNode);
      experimentNode=null;
    }
    if (experimentNode == null) {
      experimentNode=new LTTngTreeNode(getNextUniqueId(),this,experiment.getName(),experiment);
      addChild(experimentNode);
    }
    ITmfTrace<?>[] rtraces=experiment.getTraces();
    String traceName;
    LTTngTreeNode traceStateManagerNode;
    for (    ITmfTrace<?> rtrace : rtraces) {
      traceName=rtrace.getName();
      traceStateManagerNode=experimentNode.getChildByName(traceName);
      if (traceStateManagerNode == null) {
        traceStateManagerNode=StateManagerFactory.getManager(rtrace,experimentNode);
        experimentNode.addChild(traceStateManagerNode);
      }
    }
    LttngCoreProviderFactory.reset(experimentNode);
    fSelectedExperiment=experimentNode;
  }
}
Program: 92716
Project: 92716
Buggy source:
@Override public void handleData(LttngEvent event){
  super.handleData(event);
  if (event != null) {
    fCheckPointNbEventsHandled++;
    ITmfTrace trace=event.getTrace();
    StateTraceHelper helper=ftraceToManagerMap.get(trace);
    if (helper != null) {
      helper.incrementNumberRead();
      LttngSyntheticEvent synEvent=updateSynEvent(event,helper.getTraceModel());
      helper.getStateManager().handleEvent(synEvent,helper.getNumberRead());
    }
 else {
      TraceDebug.debug("String_Node_Str" + trace.getName());
    }
  }
}

Fixed version (ground truth):
@Override public void handleData(LttngEvent event){
  super.handleData(event);
  if (event != null) {
    fCheckPointNbEventsHandled++;
    ITmfTrace<?> trace=event.getTrace();
    StateTraceHelper helper=ftraceToManagerMap.get(trace);
    if (helper != null) {
      helper.incrementNumberRead();
      LttngSyntheticEvent synEvent=updateSynEvent(event,helper.getTraceModel());
      helper.getStateManager().handleEvent(synEvent,helper.getNumberRead());
    }
 else {
      TraceDebug.debug("String_Node_Str" + trace.getName());
    }
  }
}
Program: 92717
Project: 92717
Buggy source:
/** 
 * @param traceUniqueId
 * @param experiment
 * @return
 */
public static LTTngTreeNode getManager(ITmfTrace rtrace,LTTngTreeNode experiment){
  if (rtrace == null) {
    return null;
  }
  String traceUniqueId=rtrace.getName();
  if (traceUniqueId == null) {
    return null;
  }
  LTTngTreeNode managerNode=null;
  managerNode=experiment.getChildByName(traceUniqueId);
  if (managerNode != null && managerNode instanceof IStateTraceManager) {
    return managerNode;
  }
  StateTraceManager manager=null;
  try {
    manager=new StateTraceManager(experiment.getNextUniqueId(),experiment,traceUniqueId,rtrace);
    if (ftraceCheckPointInterval != null) {
      manager.setCheckPointInterval(ftraceCheckPointInterval);
    }
  }
 catch (  LttngStateException e) {
    e.printStackTrace();
  }
  experiment.addChild(manager);
  return manager;
}

Fixed version (ground truth):
/** 
 * @param traceUniqueId
 * @param experiment
 * @return
 */
public static LTTngTreeNode getManager(ITmfTrace<?> rtrace,LTTngTreeNode experiment){
  if (rtrace == null) {
    return null;
  }
  String traceUniqueId=rtrace.getName();
  if (traceUniqueId == null) {
    return null;
  }
  LTTngTreeNode managerNode=null;
  managerNode=experiment.getChildByName(traceUniqueId);
  if (managerNode != null && managerNode instanceof IStateTraceManager) {
    return managerNode;
  }
  StateTraceManager manager=null;
  try {
    manager=new StateTraceManager(experiment.getNextUniqueId(),experiment,traceUniqueId,rtrace);
    if (ftraceCheckPointInterval != null) {
      manager.setCheckPointInterval(ftraceCheckPointInterval);
    }
  }
 catch (  LttngStateException e) {
    e.printStackTrace();
  }
  experiment.addChild(manager);
  return manager;
}
Program: 92718
Project: 92718
Buggy source:
/** 
 * Remove previously registered managers
 * @param traceUniqueId
 */
public static void removeManager(ITmfTrace rtrace,LTTngTreeNode rexperiment){
  if (rtrace != null && rexperiment != null && rexperiment.getValue() instanceof TmfExperiment<?>) {
    LTTngTreeNode childToremove=rexperiment.getChildByName(rtrace.getName());
    if (childToremove != null) {
      rexperiment.removeChild(childToremove);
    }
  }
 else {
    TraceDebug.debug("String_Node_Str" + rtrace.getName());
  }
}

Fixed version (ground truth):
/** 
 * Remove previously registered managers
 * @param traceUniqueId
 */
public static void removeManager(ITmfTrace<?> rtrace,LTTngTreeNode rexperiment){
  if (rtrace != null && rexperiment != null && rexperiment.getValue() instanceof TmfExperiment<?>) {
    LTTngTreeNode childToremove=rexperiment.getChildByName(rtrace.getName());
    if (childToremove != null) {
      rexperiment.removeChild(childToremove);
    }
  }
 else {
    TraceDebug.debug("String_Node_Str" + rtrace.getName());
  }
}
Program: 92719
Project: 92719
Buggy source:
@TmfSignalHandler public void experimentRangeUpdated(TmfExperimentRangeUpdatedSignal signal){
  if (signal.getExperiment() == this) {
    indexExperiment(false,(int)fNbEvents,signal.getRange());
  }
}

Fixed version (ground truth):
@Override @TmfSignalHandler public void experimentRangeUpdated(TmfExperimentRangeUpdatedSignal signal){
  if (signal.getExperiment() == this) {
    indexExperiment(false,(int)fNbEvents,signal.getRange());
  }
}
Program: 92720
Project: 92720
Buggy source:
@Override public void run(){
  while (!fExecutor.isShutdown()) {
    TmfExperiment<?> experiment=TmfExperiment.getCurrentExperiment();
    if (experiment != null) {
      final TmfEventRequest request=new TmfEventRequest<TmfEvent>(TmfEvent.class,TmfTimeRange.Eternity,0,ExecutionType.FOREGROUND){
        @Override public void handleCompleted(){
          updateJniTrace();
        }
      }
;
synchronized (experiment) {
        experiment.sendRequest(request);
      }
      try {
        request.waitForCompletion();
      }
 catch (      InterruptedException e) {
        e.printStackTrace();
      }
    }
 else {
      updateJniTrace();
    }
    try {
      Thread.sleep(LTTNG_STREAMING_INTERVAL);
    }
 catch (    InterruptedException e) {
      e.printStackTrace();
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public void run(){
  while (!fExecutor.isShutdown()) {
    TmfExperiment<?> experiment=TmfExperiment.getCurrentExperiment();
    if (experiment != null) {
      @SuppressWarnings("String_Node_Str") final TmfEventRequest request=new TmfEventRequest<TmfEvent>(TmfEvent.class,TmfTimeRange.Eternity,0,ExecutionType.FOREGROUND){
        @Override public void handleCompleted(){
          updateJniTrace();
        }
      }
;
synchronized (experiment) {
        experiment.sendRequest(request);
      }
      try {
        request.waitForCompletion();
      }
 catch (      InterruptedException e) {
        e.printStackTrace();
      }
    }
 else {
      updateJniTrace();
    }
    try {
      Thread.sleep(LTTNG_STREAMING_INTERVAL);
    }
 catch (    InterruptedException e) {
      e.printStackTrace();
    }
  }
}
Program: 92721
Project: 92721
Buggy source:
public void initTrace(String name,String path,Class<LttngEvent> eventType,int cacheSize,boolean indexTrace) throws FileNotFoundException {
  initLTTngTrace(name,path,eventType,cacheSize,indexTrace);
}

Fixed version (ground truth):
@Override public void initTrace(String name,String path,Class<LttngEvent> eventType,int cacheSize,boolean indexTrace) throws FileNotFoundException {
  initLTTngTrace(name,path,eventType,cacheSize,indexTrace);
}