nus-yam/ex-repair huggingface dataset:
Program: 92285
Project: 92285
Buggy source:
@Override public boolean isCompleted(ITmfDataRequest<T> request,T data,int nbRead){
  boolean requestCompleted=super.isCompleted(request,data,nbRead);
  if (!requestCompleted && request instanceof ITmfEventRequest<?>) {
    ITmfTimestamp endTime=((ITmfEventRequest<?>)request).getRange().getEndTime();
    return data.getTimestamp().compareTo(endTime,false) > 0;
  }
  return requestCompleted;
}

Fixed version (ground truth):
@Override public synchronized boolean isCompleted(){
  return super.isCompleted() || request.isCompleted();
}
Program: 92286
Project: 92286
Buggy source:
@TmfSignalHandler public void experimentRangeUpdated(TmfExperimentRangeUpdatedSignal signal){
  if (signal.getExperiment() != fCurrentExperiment) {
    return;
  }
  boolean drawTimeRangeHistogram=fExperimentStartTime == 0;
  TmfTimeRange fullRange=signal.getRange();
  fExperimentStartTime=fullRange.getStartTime().getValue();
  fExperimentEndTime=fullRange.getEndTime().getValue();
  fFullTraceHistogram.setFullRange(fExperimentStartTime,fExperimentEndTime);
  fTimeRangeHistogram.setFullRange(fExperimentStartTime,fExperimentEndTime);
  if (drawTimeRangeHistogram) {
    fCurrentTimestamp=fExperimentStartTime;
    fCurrentEventTimeControl.setValue(fCurrentTimestamp);
    fFullTraceHistogram.setTimeRange(fExperimentStartTime,INITIAL_WINDOW_SPAN);
    fTimeRangeHistogram.setTimeRange(fExperimentStartTime,INITIAL_WINDOW_SPAN);
    sendTimeRangeRequest(fExperimentStartTime,fExperimentStartTime + INITIAL_WINDOW_SPAN);
  }
  sendFullRangeRequest(fullRange);
}

Fixed version (ground truth):
@TmfSignalHandler public void experimentRangeUpdated(TmfExperimentRangeUpdatedSignal signal){
  if (signal.getExperiment() != fCurrentExperiment) {
    return;
  }
  boolean drawTimeRangeHistogram=fExperimentStartTime == 0;
  TmfTimeRange fullRange=signal.getRange();
  fExperimentStartTime=fullRange.getStartTime().normalize(0,-9).getValue();
  fExperimentEndTime=fullRange.getEndTime().normalize(0,-9).getValue();
  fFullTraceHistogram.setFullRange(fExperimentStartTime,fExperimentEndTime);
  fTimeRangeHistogram.setFullRange(fExperimentStartTime,fExperimentEndTime);
  if (drawTimeRangeHistogram) {
    fCurrentTimestamp=fExperimentStartTime;
    fCurrentEventTimeControl.setValue(fCurrentTimestamp);
    fFullTraceHistogram.setTimeRange(fExperimentStartTime,INITIAL_WINDOW_SPAN);
    fTimeRangeHistogram.setTimeRange(fExperimentStartTime,INITIAL_WINDOW_SPAN);
    sendTimeRangeRequest(fExperimentStartTime,fExperimentStartTime + INITIAL_WINDOW_SPAN);
  }
  sendFullRangeRequest(fullRange);
}
Program: 92287
Project: 92287
Buggy source:
@TmfSignalHandler public void currentTimeUpdated(TmfTimeSynchSignal signal){
  assert(signal != null);
  ITmfTimestamp currentTime=signal.getCurrentTime();
  fCurrentTimestamp=currentTime.getValue();
  fFullTraceHistogram.setCurrentEvent(fCurrentTimestamp);
  fTimeRangeHistogram.setCurrentEvent(fCurrentTimestamp);
  fCurrentEventTimeControl.setValue(fCurrentTimestamp);
}

Fixed version (ground truth):
@TmfSignalHandler public void currentTimeUpdated(TmfTimeSynchSignal signal){
  assert(signal != null);
  ITmfTimestamp currentTime=signal.getCurrentTime();
  fCurrentTimestamp=currentTime.normalize(0,-9).getValue();
  fFullTraceHistogram.setCurrentEvent(fCurrentTimestamp);
  fTimeRangeHistogram.setCurrentEvent(fCurrentTimestamp);
  fCurrentEventTimeControl.setValue(fCurrentTimestamp);
}
Program: 92288
Project: 92288
Buggy source:
private TmfTimeRange updateExperimentTimeRange(TmfExperiment<ITmfEvent> experiment){
  fExperimentStartTime=0;
  fExperimentEndTime=0;
  fCurrentTimestamp=0;
  TmfTimeRange timeRange=fCurrentExperiment.getTimeRange();
  if (!timeRange.equals(TmfTimeRange.NULL_RANGE)) {
    fExperimentStartTime=timeRange.getStartTime().getValue();
    fExperimentEndTime=timeRange.getEndTime().getValue();
    fCurrentTimestamp=fExperimentStartTime;
  }
  return timeRange;
}

Fixed version (ground truth):
private TmfTimeRange updateExperimentTimeRange(TmfExperiment<ITmfEvent> experiment){
  fExperimentStartTime=0;
  fExperimentEndTime=0;
  fCurrentTimestamp=0;
  TmfTimeRange timeRange=fCurrentExperiment.getTimeRange();
  if (!timeRange.equals(TmfTimeRange.NULL_RANGE)) {
    fExperimentStartTime=timeRange.getStartTime().normalize(0,-9).getValue();
    fExperimentEndTime=timeRange.getEndTime().normalize(0,-9).getValue();
    fCurrentTimestamp=fExperimentStartTime;
  }
  return timeRange;
}
Program: 92289
Project: 92289
Buggy source:
@TmfSignalHandler public void timeRangeUpdated(TmfRangeSynchSignal signal){
  assert(signal != null);
  if (fCurrentExperiment != null) {
    fWindowStartTime=signal.getCurrentRange().getStartTime().getValue();
    fWindowEndTime=signal.getCurrentRange().getEndTime().getValue();
    fWindowSpan=fWindowEndTime - fWindowStartTime;
    sendTimeRangeRequest(fWindowStartTime,fWindowEndTime);
    fFullTraceHistogram.setTimeRange(fWindowStartTime,fWindowSpan);
    fTimeSpanControl.setValue(fWindowSpan);
  }
}

Fixed version (ground truth):
@TmfSignalHandler public void timeRangeUpdated(TmfRangeSynchSignal signal){
  assert(signal != null);
  if (fCurrentExperiment != null) {
    fWindowStartTime=signal.getCurrentRange().getStartTime().normalize(0,-9).getValue();
    fWindowEndTime=signal.getCurrentRange().getEndTime().normalize(0,-9).getValue();
    fWindowSpan=fWindowEndTime - fWindowStartTime;
    sendTimeRangeRequest(fWindowStartTime,fWindowEndTime);
    fFullTraceHistogram.setTimeRange(fWindowStartTime,fWindowSpan);
    fTimeSpanControl.setValue(fWindowSpan);
  }
}
Program: 92290
Project: 92290
Buggy source:
@TmfSignalHandler public void experimentUpdated(TmfExperimentUpdatedSignal signal){
  if (signal.getExperiment() != fCurrentExperiment) {
    return;
  }
  TmfTimeRange fullRange=signal.getExperiment().getTimeRange();
  fExperimentStartTime=fullRange.getStartTime().getValue();
  fExperimentEndTime=fullRange.getEndTime().getValue();
  fFullTraceHistogram.setFullRange(fExperimentStartTime,fExperimentEndTime);
  fTimeRangeHistogram.setFullRange(fExperimentStartTime,fExperimentEndTime);
}

Fixed version (ground truth):
@TmfSignalHandler public void experimentUpdated(TmfExperimentUpdatedSignal signal){
  if (signal.getExperiment() != fCurrentExperiment) {
    return;
  }
  TmfTimeRange fullRange=signal.getExperiment().getTimeRange();
  fExperimentStartTime=fullRange.getStartTime().normalize(0,-9).getValue();
  fExperimentEndTime=fullRange.getEndTime().normalize(0,-9).getValue();
  fFullTraceHistogram.setFullRange(fExperimentStartTime,fExperimentEndTime);
  fTimeRangeHistogram.setFullRange(fExperimentStartTime,fExperimentEndTime);
}
Program: 92291
Project: 92291
Buggy source:
@Override public ITmfTimestamp normalize(final long offset,final int scale){
  long value=fValue;
  int precision=fPrecision;
  if (fScale == scale && offset == 0) {
    return new TmfTimestamp(this);
  }
  if (fScale != scale) {
    final int scaleDiff=Math.abs(fScale - scale);
    if (scaleDiff >= scalingFactors.length) {
      throw new ArithmeticException("String_Node_Str");
    }
    final long scalingFactor=scalingFactors[scaleDiff];
    if (scale < fScale) {
      value*=scalingFactor;
      precision*=scalingFactor;
    }
 else {
      value/=scalingFactor;
      precision/=scalingFactor;
    }
  }
  if (offset < 0) {
    value=(value < Long.MIN_VALUE - offset) ? Long.MIN_VALUE : value + offset;
  }
 else {
    value=(value > Long.MAX_VALUE - offset) ? Long.MAX_VALUE : value + offset;
  }
  return new TmfTimestamp(value,scale,precision);
}

Fixed version (ground truth):
@Override public ITmfTimestamp normalize(final long offset,final int scale){
  long value=fValue;
  int precision=fPrecision;
  if (fScale == scale && offset == 0) {
    return new TmfTimestamp(this);
  }
  if (this.equals(BIG_BANG) || this.equals(BIG_CRUNCH)) {
    return this;
  }
  if (fScale != scale) {
    final int scaleDiff=Math.abs(fScale - scale);
    if (scaleDiff >= scalingFactors.length) {
      throw new ArithmeticException("String_Node_Str");
    }
    final long scalingFactor=scalingFactors[scaleDiff];
    if (scale < fScale) {
      value*=scalingFactor;
      precision*=scalingFactor;
    }
 else {
      value/=scalingFactor;
      precision/=scalingFactor;
    }
  }
  if (offset < 0) {
    value=(value < Long.MIN_VALUE - offset) ? Long.MIN_VALUE : value + offset;
  }
 else {
    value=(value > Long.MAX_VALUE - offset) ? Long.MAX_VALUE : value + offset;
  }
  return new TmfTimestamp(value,scale,precision);
}
Program: 92294
Project: 92294
Buggy source:
@SuppressWarnings("String_Node_Str") public void testGetLocationRatio() throws Exception {
  ITmfContext context=fExperiment.seekEvent((ITmfLocation)null);
  double ratio=fExperiment.getLocationRatio(context.getLocation());
  assertEquals("String_Node_Str",0.0,ratio);
  context=fExperiment.seekEvent(NB_EVENTS / 2);
  ratio=fExperiment.getLocationRatio(context.getLocation());
  assertEquals("String_Node_Str",(double)(NB_EVENTS / 2) / NB_EVENTS,ratio);
  context=fExperiment.seekEvent(NB_EVENTS - 1);
  ratio=fExperiment.getLocationRatio(context.getLocation());
  assertEquals("String_Node_Str",(double)(NB_EVENTS - 1) / NB_EVENTS,ratio);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public void testGetLocationRatio() throws Exception {
  ITmfContext context=fExperiment.seekEvent((ITmfLocation)null);
  double ratio=fExperiment.getLocationRatio(context.getLocation());
  context=fExperiment.seekEvent(ratio);
  double ratio2=fExperiment.getLocationRatio(context.getLocation());
  assertEquals("String_Node_Str",ratio,ratio2);
  context=fExperiment.seekEvent(NB_EVENTS / 2);
  ratio=fExperiment.getLocationRatio(context.getLocation());
  context=fExperiment.seekEvent(ratio);
  ratio2=fExperiment.getLocationRatio(context.getLocation());
  assertEquals("String_Node_Str",ratio,ratio2);
  context=fExperiment.seekEvent(NB_EVENTS - 1);
  ratio=fExperiment.getLocationRatio(context.getLocation());
  context=fExperiment.seekEvent(ratio);
  ratio2=fExperiment.getLocationRatio(context.getLocation());
  assertEquals("String_Node_Str",ratio,ratio2);
}
Program: 92295
Project: 92295
Buggy source:
@Override @SuppressWarnings("String_Node_Str") public String toString(){
  StringBuilder result=new StringBuilder("String_Node_Str");
  TmfRankedLocation[] locations=((TmfLocationArray)getLocation()).getLocations();
  for (  TmfRankedLocation location : locations) {
    result.append("String_Node_Str" + location + "String_Node_Str");
  }
  result.append("String_Node_Str");
  return result.toString();
}

Fixed version (ground truth):
@Override @SuppressWarnings("String_Node_Str") public String toString(){
  StringBuilder result=new StringBuilder("String_Node_Str");
  ITmfLocation<? extends Comparable<?>>[] locations=((TmfLocationArray)getLocation()).getLocations();
  for (  ITmfLocation<?> location : locations) {
    result.append("String_Node_Str" + location + "String_Node_Str");
  }
  result.append("String_Node_Str");
  return result.toString();
}
Program: 92296
Project: 92296
Buggy source:
@Override public TmfLocationArray clone(){
  TmfRankedLocation[] clones=new TmfRankedLocation[fLocations.length];
  for (int i=0; i < fLocations.length; i++) {
    TmfRankedLocation location=fLocations[i];
    clones[i]=(location != null) ? location.clone() : null;
  }
  return new TmfLocationArray(clones);
}

Fixed version (ground truth):
@Override public TmfLocationArray clone(){
  ITmfLocation<? extends Comparable<?>>[] clones=(ITmfLocation<? extends Comparable<?>>[])new ITmfLocation<?>[fLocations.length];
  for (int i=0; i < fLocations.length; i++) {
    ITmfLocation<?> location=fLocations[i];
    clones[i]=(location != null) ? location.clone() : null;
  }
  return new TmfLocationArray(clones);
}
Program: 92297
Project: 92297
Buggy source:
/** 
 * The standard constructor
 * @param locations the locations
 */
public TmfRankedLocation[] getLocations(){
  return fLocations;
}

Fixed version (ground truth):
/** 
 * The standard constructor
 * @param locations the locations
 */
public ITmfLocation<? extends Comparable<?>>[] getLocations(){
  return fLocations;
}
Program: 92298
Project: 92298
Buggy source:
@Override public int compareTo(TmfLocationArray o){
  for (int i=0; i < fLocations.length; i++) {
    TmfRankedLocation l1=fLocations[i];
    TmfRankedLocation l2=o.fLocations[i];
    int result=l1.compareTo(l2);
    if (result != 0) {
      return result;
    }
  }
  return 0;
}

Fixed version (ground truth):
@Override @SuppressWarnings({"String_Node_Str","String_Node_Str"}) public int compareTo(TmfLocationArray o){
  for (int i=0; i < fLocations.length; i++) {
    ITmfLocation<? extends Comparable> l1=(ITmfLocation<? extends Comparable>)fLocations[i].getLocation();
    ITmfLocation<? extends Comparable> l2=(ITmfLocation<? extends Comparable>)o.fLocations[i].getLocation();
    int result=l1.getLocation().compareTo(l2.getLocation());
    if (result != 0) {
      return result;
    }
  }
  return 0;
}
Program: 92299
Project: 92299
Buggy source:
/** 
 * The standard constructor
 * @param locations the locations
 */
public TmfLocationArray(TmfRankedLocation[] locations){
  fLocations=locations;
}

Fixed version (ground truth):
/** 
 * The standard constructor
 * @param locations the locations
 */
public TmfLocationArray(ITmfLocation<? extends Comparable<?>>[] locations){
  fLocations=locations;
}
Program: 92300
Project: 92300
Buggy source:
protected void startFilterThread(){
synchronized (fFilterSyncObj) {
    if (fFilterThread != null) {
      fFilterThread.cancel();
    }
    final ITmfFilterTreeNode filter=(ITmfFilterTreeNode)fTable.getData(Key.FILTER_OBJ);
    fFilterThread=new FilterThread(filter);
    fFilterThread.start();
  }
}

Fixed version (ground truth):
protected void startFilterThread(){
synchronized (fFilterSyncObj) {
    final ITmfFilterTreeNode filter=(ITmfFilterTreeNode)fTable.getData(Key.FILTER_OBJ);
    if (fFilterThread == null || fFilterThread.filter != filter) {
      if (fFilterThread != null) {
        fFilterThread.cancel();
        fFilterThreadResume=false;
      }
      fFilterThread=new FilterThread(filter);
      fFilterThread.start();
    }
 else {
      fFilterThreadResume=true;
    }
  }
}
Program: 92301
Project: 92301
Buggy source:
protected void stopFilterThread(){
synchronized (fFilterSyncObj) {
    if (fFilterThread != null) {
      fFilterThread.cancel();
    }
  }
}

Fixed version (ground truth):
protected void stopFilterThread(){
synchronized (fFilterSyncObj) {
    if (fFilterThread != null) {
      fFilterThread.cancel();
      fFilterThread=null;
      fFilterThreadResume=false;
    }
  }
}
Program: 92302
Project: 92302
Buggy source:
@Override protected synchronized ITmfContext armRequest(final ITmfDataRequest<T> request){
  if (request instanceof ITmfEventRequest<?> && !TmfTimestamp.BIG_BANG.equals(((ITmfEventRequest<T>)request).getRange().getStartTime()) && request.getIndex() == 0) {
    final ITmfContext context=seekEvent(((ITmfEventRequest<T>)request).getRange().getStartTime());
    ((ITmfEventRequest<T>)request).setStartIndex((int)context.getRank());
    return context;
  }
  if ((fExperimentContext != null) && fExperimentContext.getRank() == request.getIndex()) {
    return fExperimentContext;
  }
  return seekEvent(request.getIndex());
}

Fixed version (ground truth):
@Override protected synchronized ITmfContext armRequest(final ITmfDataRequest<T> request){
  if (fTraces == null) {
    return null;
  }
  if (request instanceof ITmfEventRequest<?> && !TmfTimestamp.BIG_BANG.equals(((ITmfEventRequest<T>)request).getRange().getStartTime()) && request.getIndex() == 0) {
    final ITmfContext context=seekEvent(((ITmfEventRequest<T>)request).getRange().getStartTime());
    ((ITmfEventRequest<T>)request).setStartIndex((int)context.getRank());
    return context;
  }
  if ((fExperimentContext != null) && fExperimentContext.getRank() == request.getIndex()) {
    return fExperimentContext;
  }
  return seekEvent(request.getIndex());
}
Program: 92304
Project: 92304
Buggy source:
@Override public synchronized ITmfContext seekEvent(final ITmfTimestamp timestamp){
  if (timestamp == null) {
    ITmfContext context=seekEvent((ITmfLocation<?>)null);
    context.setRank(0);
    return context;
  }
  ITmfContext context=fIndexer.seekIndex(timestamp);
  final ITmfContext nextEventContext=context.clone();
  ITmfEvent event=getNext(nextEventContext);
  while (event != null && event.getTimestamp().compareTo(timestamp,false) < 0) {
    getNext(context);
    event=getNext(nextEventContext);
  }
  if (event == null) {
    context.setLocation(null);
    context.setRank(ITmfContext.UNKNOWN_RANK);
  }
  return context;
}

Fixed version (ground truth):
@Override public synchronized ITmfContext seekEvent(final ITmfTimestamp timestamp){
  if (timestamp == null) {
    ITmfContext context=seekEvent((ITmfLocation<?>)null);
    context.setRank(0);
    return context;
  }
  ITmfContext context=fIndexer.seekIndex(timestamp);
  final ITmfContext nextEventContext=context.clone();
  ITmfEvent event=getNext(nextEventContext);
  while (event != null && event.getTimestamp().compareTo(timestamp,false) < 0) {
    context=nextEventContext.clone();
    event=getNext(nextEventContext);
  }
  if (event == null) {
    context.setLocation(null);
    context.setRank(ITmfContext.UNKNOWN_RANK);
  }
  return context;
}
Program: 92306
Project: 92306
Buggy source:
/** 
 * Method readNextEvent.
 * @param context ITmfContext
 * @return CtfTmfEvent
 * @see org.eclipse.linuxtools.tmf.core.trace.ITmfTrace#getNext(ITmfContext)
 */
@Override public synchronized CtfTmfEvent getNext(final ITmfContext context){
  CtfTmfEvent event=null;
  if (context instanceof CtfTmfLightweightContext) {
    CtfTmfLightweightContext ctfContext=(CtfTmfLightweightContext)context;
    event=ctfContext.getCurrentEvent();
    if (event != null) {
      updateAttributes(context,event.getTimestamp());
      ctfContext.advance();
      ctfContext.increaseRank();
    }
  }
  return event;
}

Fixed version (ground truth):
/** 
 * Method readNextEvent.
 * @param context ITmfContext
 * @return CtfTmfEvent
 * @see org.eclipse.linuxtools.tmf.core.trace.ITmfTrace#getNext(ITmfContext)
 */
@Override public synchronized CtfTmfEvent getNext(final ITmfContext context){
  CtfTmfEvent event=null;
  if (context instanceof CtfTmfLightweightContext) {
    if (CtfLocation.INVALID_LOCATION.equals(context.getLocation())) {
      return null;
    }
    CtfTmfLightweightContext ctfContext=(CtfTmfLightweightContext)context;
    event=ctfContext.getCurrentEvent();
    if (event != null) {
      updateAttributes(context,event.getTimestamp());
      ctfContext.advance();
      ctfContext.increaseRank();
    }
  }
  return event;
}
Program: 92307
Project: 92307
Buggy source:
@Override protected synchronized void initialize(final IResource resource,final String path,final Class<LttngEvent> eventType) throws TmfTraceException {
  try {
    currentJniTrace=JniTraceFactory.getJniTrace(path,traceLibPath,SHOW_LTT_DEBUG_DEFAULT);
  }
 catch (  final Exception e) {
    throw new TmfTraceException(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);
  setParser((ITmfEventParser<LttngEvent>)this);
  setCacheSize(CHECKPOINT_PAGE_SIZE);
  initializeStreamingMonitor();
}

Fixed version (ground truth):
@Override protected synchronized void initialize(final IResource resource,final String path,final Class<LttngEvent> eventType) throws TmfTraceException {
  try {
    IProject project=resource.getProject();
    traceLibPath=(project != null) ? TraceHelper.getTraceLibDirFromProject(project) : null;
    currentJniTrace=JniTraceFactory.getJniTrace(path,traceLibPath,SHOW_LTT_DEBUG_DEFAULT);
  }
 catch (  final Exception e) {
    throw new TmfTraceException(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);
  setParser((ITmfEventParser<LttngEvent>)this);
  setCacheSize(CHECKPOINT_PAGE_SIZE);
  initializeStreamingMonitor();
}
Program: 92308
Project: 92308
Buggy source:
@Override @SuppressWarnings("String_Node_Str") public synchronized T getNext(ITmfContext context){
  if (!(context instanceof TmfExperimentContext)) {
    return null;
  }
  TmfExperimentContext expContext=(TmfExperimentContext)context;
  final int lastTrace=expContext.getLastTrace();
  if (lastTrace != TmfExperimentContext.NO_TRACE) {
    final ITmfContext traceContext=expContext.getContexts()[lastTrace];
    TmfExperimentLocation location=(TmfExperimentLocation)expContext.getLocation();
    if (location != null) {
      location.getLocation().getLocations()[lastTrace]=traceContext.getLocation().clone();
    }
    expContext.getEvents()[lastTrace]=fTraces[lastTrace].getNext(traceContext);
    expContext.setLastTrace(TmfExperimentContext.NO_TRACE);
  }
  int trace=TmfExperimentContext.NO_TRACE;
  ITmfTimestamp timestamp=TmfTimestamp.BIG_CRUNCH;
  for (int i=0; i < fTraces.length; i++) {
    final ITmfEvent event=expContext.getEvents()[i];
    if (event != null && event.getTimestamp() != null) {
      final ITmfTimestamp otherTS=event.getTimestamp();
      if (otherTS.compareTo(timestamp,true) < 0) {
        trace=i;
        timestamp=otherTS;
      }
    }
  }
  T event=null;
  if (trace != TmfExperimentContext.NO_TRACE) {
    event=(T)expContext.getEvents()[trace];
    if (event != null) {
      updateAttributes(expContext,event.getTimestamp());
      expContext.increaseRank();
      expContext.setLastTrace(trace);
      fExperimentContext=expContext;
      processEvent(event);
    }
  }
  return event;
}

Fixed version (ground truth):
@Override @SuppressWarnings("String_Node_Str") public synchronized T getNext(ITmfContext context){
  if (!(context instanceof TmfExperimentContext)) {
    return null;
  }
  if (fTraces == null) {
    return null;
  }
  TmfExperimentContext expContext=(TmfExperimentContext)context;
  final int lastTrace=expContext.getLastTrace();
  if (lastTrace != TmfExperimentContext.NO_TRACE) {
    final ITmfContext traceContext=expContext.getContexts()[lastTrace];
    TmfExperimentLocation location=(TmfExperimentLocation)expContext.getLocation();
    if (location != null) {
      location.getLocation().getLocations()[lastTrace]=traceContext.getLocation().clone();
    }
    expContext.getEvents()[lastTrace]=fTraces[lastTrace].getNext(traceContext);
    expContext.setLastTrace(TmfExperimentContext.NO_TRACE);
  }
  int trace=TmfExperimentContext.NO_TRACE;
  ITmfTimestamp timestamp=TmfTimestamp.BIG_CRUNCH;
  for (int i=0; i < fTraces.length; i++) {
    final ITmfEvent event=expContext.getEvents()[i];
    if (event != null && event.getTimestamp() != null) {
      final ITmfTimestamp otherTS=event.getTimestamp();
      if (otherTS.compareTo(timestamp,true) < 0) {
        trace=i;
        timestamp=otherTS;
      }
    }
  }
  T event=null;
  if (trace != TmfExperimentContext.NO_TRACE) {
    event=(T)expContext.getEvents()[trace];
    if (event != null) {
      updateAttributes(expContext,event.getTimestamp());
      expContext.increaseRank();
      expContext.setLastTrace(trace);
      fExperimentContext=expContext;
      processEvent(event);
    }
  }
  return event;
}
Program: 92309
Project: 92309
Buggy source:
@Override public void mouseUp(MouseEvent event){
  if (fMouseDown) {
    fMouseDown=false;
    ((HistogramView)fParentView).updateTimeRange(fRangeStartTime,fRangeStartTime + fZoom.getDuration());
  }
}

Fixed version (ground truth):
@Override public void mouseUp(MouseEvent event){
  if (fMouseDown) {
    fMouseDown=false;
    if (event.x == fStartPosition) {
      super.mouseDown(event);
      return;
    }
    ((HistogramView)fParentView).updateTimeRange(fRangeStartTime,fRangeStartTime + fZoom.getDuration());
  }
}
Program: 92310
Project: 92310
Buggy source:
@Override public void mouseDown(MouseEvent event){
  long timestamp=getTimestamp(event.x);
  if ((timestamp < fZoom.getStartTime()) || (timestamp > fZoom.getEndTime())) {
    super.mouseDown(event);
    return;
  }
  fMouseDown=true;
  fStartPosition=event.x;
}

Fixed version (ground truth):
@Override public void mouseDown(MouseEvent event){
  fMouseDown=true;
  fStartPosition=event.x;
}
Program: 92311
Project: 92311
Buggy source:
@SuppressWarnings("String_Node_Str") private synchronized static ITmfTrace<LttngEvent>[] setupTrace(final String path){
  if (fTestTraces == null) {
    fTestTraces=new ITmfTrace[1];
    try {
      final URL location=FileLocator.find(FrameworkUtil.getBundle(LTTngExperimentTest.class),new Path(path),null);
      final File testfile=new File(FileLocator.toFileURL(location).toURI());
      final LTTngTrace trace=new LTTngTrace(null,testfile.getPath(),true);
      fTestTraces[0]=trace;
    }
 catch (    final URISyntaxException e) {
      e.printStackTrace();
    }
catch (    final IOException e) {
      e.printStackTrace();
    }
catch (    final Exception e) {
      e.printStackTrace();
    }
  }
  return fTestTraces;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private synchronized static ITmfTrace<LttngEvent>[] setupTrace(final String path){
  if (fTestTraces == null) {
    fTestTraces=new ITmfTrace[1];
    try {
      final URL location=FileLocator.find(FrameworkUtil.getBundle(LTTngExperimentTest.class),new Path(path),null);
      final File testfile=new File(FileLocator.toFileURL(location).toURI());
      final LTTngTrace trace=new LTTngTrace(null,testfile.getPath(),false);
      fTestTraces[0]=trace;
    }
 catch (    final URISyntaxException e) {
      e.printStackTrace();
    }
catch (    final IOException e) {
      e.printStackTrace();
    }
catch (    final Exception e) {
      e.printStackTrace();
    }
  }
  return fTestTraces;
}
Program: 92312
Project: 92312
Buggy source:
public void testEmptyTmfTraceIndexing() throws Exception {
  assertEquals("String_Node_Str",ITmfTrace.DEFAULT_TRACE_CACHE_SIZE,fEmptyTrace.getCacheSize());
  assertEquals("String_Node_Str",0,fEmptyTrace.getNbEvents());
  assertEquals("String_Node_Str",TmfTimestamp.BIG_CRUNCH,fEmptyTrace.getTimeRange().getStartTime());
  assertEquals("String_Node_Str",TmfTimestamp.BIG_BANG,fEmptyTrace.getTimeRange().getEndTime());
  assertEquals("String_Node_Str",TmfTimestamp.BIG_CRUNCH,fEmptyTrace.getStartTime());
  assertEquals("String_Node_Str",TmfTimestamp.BIG_BANG,fEmptyTrace.getEndTime());
  List<TmfCheckpoint> checkpoints=fEmptyTrace.getIndexer().getCheckpoints();
  int pageSize=fEmptyTrace.getCacheSize();
  assertTrue("String_Node_Str",checkpoints != null);
  assertEquals("String_Node_Str",0,checkpoints.size());
  for (int i=0; i < checkpoints.size(); i++) {
    TmfCheckpoint checkpoint=checkpoints.get(i);
    TmfContext context=new TmfContext(checkpoint.getLocation(),i * pageSize);
    ITmfEvent event=fEmptyTrace.parseEvent(context);
    assertTrue(context.getRank() == i * pageSize);
    assertTrue((checkpoint.getTimestamp().compareTo(event.getTimestamp(),false) == 0));
  }
}

Fixed version (ground truth):
public void testEmptyTmfTraceIndexing() throws Exception {
  assertEquals("String_Node_Str",ITmfTrace.DEFAULT_TRACE_CACHE_SIZE,fEmptyTrace.getCacheSize());
  assertEquals("String_Node_Str",0,fEmptyTrace.getNbEvents());
  assertEquals("String_Node_Str",TmfTimestamp.BIG_CRUNCH,fEmptyTrace.getTimeRange().getStartTime());
  assertEquals("String_Node_Str",TmfTimestamp.BIG_BANG,fEmptyTrace.getTimeRange().getEndTime());
  assertEquals("String_Node_Str",TmfTimestamp.BIG_CRUNCH,fEmptyTrace.getStartTime());
  assertEquals("String_Node_Str",TmfTimestamp.BIG_BANG,fEmptyTrace.getEndTime());
  List<ITmfCheckpoint> checkpoints=fEmptyTrace.getIndexer().getCheckpoints();
  int pageSize=fEmptyTrace.getCacheSize();
  assertTrue("String_Node_Str",checkpoints != null);
  assertEquals("String_Node_Str",0,checkpoints.size());
  for (int i=0; i < checkpoints.size(); i++) {
    ITmfCheckpoint checkpoint=checkpoints.get(i);
    TmfContext context=new TmfContext(checkpoint.getLocation(),i * pageSize);
    ITmfEvent event=fEmptyTrace.parseEvent(context);
    assertTrue(context.getRank() == i * pageSize);
    assertTrue((checkpoint.getTimestamp().compareTo(event.getTimestamp(),false) == 0));
  }
}
Program: 92313
Project: 92313
Buggy source:
public void testTmfTraceIndexing() throws Exception {
  assertEquals("String_Node_Str",BLOCK_SIZE,fTrace.getCacheSize());
  assertEquals("String_Node_Str",NB_EVENTS,fTrace.getNbEvents());
  assertEquals("String_Node_Str",1,fTrace.getTimeRange().getStartTime().getValue());
  assertEquals("String_Node_Str",NB_EVENTS,fTrace.getTimeRange().getEndTime().getValue());
  assertEquals("String_Node_Str",1,fTrace.getStartTime().getValue());
  assertEquals("String_Node_Str",NB_EVENTS,fTrace.getEndTime().getValue());
  List<TmfCheckpoint> checkpoints=fTrace.getIndexer().getCheckpoints();
  int pageSize=fTrace.getCacheSize();
  assertTrue("String_Node_Str",checkpoints != null);
  assertEquals("String_Node_Str",NB_EVENTS / BLOCK_SIZE,checkpoints.size());
  for (int i=0; i < checkpoints.size(); i++) {
    TmfCheckpoint checkpoint=checkpoints.get(i);
    TmfContext context=new TmfContext(checkpoint.getLocation(),i * pageSize);
    ITmfEvent event=fTrace.parseEvent(context);
    assertTrue(context.getRank() == i * pageSize);
    assertTrue((checkpoint.getTimestamp().compareTo(event.getTimestamp(),false) == 0));
  }
}

Fixed version (ground truth):
public void testTmfTraceIndexing() throws Exception {
  assertEquals("String_Node_Str",BLOCK_SIZE,fTrace.getCacheSize());
  assertEquals("String_Node_Str",NB_EVENTS,fTrace.getNbEvents());
  assertEquals("String_Node_Str",1,fTrace.getTimeRange().getStartTime().getValue());
  assertEquals("String_Node_Str",NB_EVENTS,fTrace.getTimeRange().getEndTime().getValue());
  assertEquals("String_Node_Str",1,fTrace.getStartTime().getValue());
  assertEquals("String_Node_Str",NB_EVENTS,fTrace.getEndTime().getValue());
  List<ITmfCheckpoint> checkpoints=fTrace.getIndexer().getCheckpoints();
  int pageSize=fTrace.getCacheSize();
  assertTrue("String_Node_Str",checkpoints != null);
  assertEquals("String_Node_Str",NB_EVENTS / BLOCK_SIZE,checkpoints.size());
  for (int i=0; i < checkpoints.size(); i++) {
    ITmfCheckpoint checkpoint=checkpoints.get(i);
    TmfContext context=new TmfContext(checkpoint.getLocation(),i * pageSize);
    ITmfEvent event=fTrace.parseEvent(context);
    assertTrue(context.getRank() == i * pageSize);
    assertTrue((checkpoint.getTimestamp().compareTo(event.getTimestamp(),false) == 0));
  }
}
Program: 92314
Project: 92314
Buggy source:
public List<TmfCheckpoint> getCheckpoints(){
  return getTraceIndex();
}

Fixed version (ground truth):
public List<ITmfCheckpoint> getCheckpoints(){
  return getTraceIndex();
}
Program: 92316
Project: 92316
Buggy source:
@Override protected synchronized void setUp() throws Exception {
  super.setUp();
  setupTrace(DIRECTORY + File.separator + TEST_STREAM1,DIRECTORY + File.separator + TEST_STREAM2);
  if (fExperiment == null) {
    fExperiment=new TmfExperimentStub<TmfEvent>(EXPERIMENT,fTestTraces,BLOCK_SIZE);
    fExperiment.getIndexer().buildIndex(0,TmfTimeRange.ETERNITY,true);
  }
}

Fixed version (ground truth):
@Override protected synchronized void setUp() throws Exception {
  super.setUp();
  if (fExperiment == null) {
    setupTrace(DIRECTORY + File.separator + TEST_STREAM1,DIRECTORY + File.separator + TEST_STREAM2);
    fExperiment=new TmfExperimentStub<TmfEvent>(EXPERIMENT,fTestTraces,BLOCK_SIZE);
    fExperiment.getIndexer().buildIndex(0,TmfTimeRange.ETERNITY,true);
  }
}
Program: 92317
Project: 92317
Buggy source:
@Override protected void tearDown() throws Exception {
  super.tearDown();
  fExperiment.dispose();
  fExperiment=null;
}

Fixed version (ground truth):
@Override protected void tearDown() throws Exception {
  super.tearDown();
  fExperiment.dispose();
  fExperiment=null;
  fTestTraces=null;
}
Program: 92318
Project: 92318
Buggy source:
public List<TmfCheckpoint> getCheckpoints(){
  return getTraceIndex();
}

Fixed version (ground truth):
public List<ITmfCheckpoint> getCheckpoints(){
  return getTraceIndex();
}
Program: 92319
Project: 92319
Buggy source:
/** 
 * @return the trace index
 */
protected List<TmfCheckpoint> getTraceIndex(){
  return fTraceIndex;
}

Fixed version (ground truth):
/** 
 * @return the trace index
 */
protected List<ITmfCheckpoint> getTraceIndex(){
  return fTraceIndex;
}
Program: 92321
Project: 92321
Buggy source:
/** 
 * Position the trace at the given checkpoint
 * @param checkpoint the checkpoint index
 * @return the corresponding context
 */
private ITmfContext seekCheckpoint(final int checkpoint){
  ITmfLocation<?> location=null;
  int index=checkpoint;
synchronized (fTraceIndex) {
    if (!fTraceIndex.isEmpty()) {
      if (index >= fTraceIndex.size()) {
        index=fTraceIndex.size() - 1;
      }
      location=fTraceIndex.get(index).getLocation();
    }
  }
  final ITmfContext context=fTrace.seekEvent(location);
  context.setRank((long)index * fCheckpointInterval);
  return context;
}

Fixed version (ground truth):
/** 
 * Position the trace at the given checkpoint
 * @param checkpoint the checkpoint index
 * @return the corresponding context
 */
private ITmfContext seekCheckpoint(final int checkpoint){
  ITmfLocation<?> location=null;
  int index=0;
synchronized (fTraceIndex) {
    if (!fTraceIndex.isEmpty()) {
      index=checkpoint;
      if (index >= fTraceIndex.size()) {
        index=fTraceIndex.size() - 1;
      }
      location=fTraceIndex.get(index).getLocation();
    }
  }
  final ITmfContext context=fTrace.seekEvent(location);
  context.setRank((long)index * fCheckpointInterval);
  return context;
}
Program: 92322
Project: 92322
Buggy source:
/** 
 * Full trace indexer
 * @param trace the trace to index
 * @param interval the checkpoints interval
 */
public TmfCheckpointIndexer(final ITmfTrace<ITmfEvent> trace,final int interval){
  fTrace=trace;
  fCheckpointInterval=interval;
  fTraceIndex=new ArrayList<TmfCheckpoint>();
  fIsIndexing=false;
}

Fixed version (ground truth):
/** 
 * Full trace indexer
 * @param trace the trace to index
 * @param interval the checkpoints interval
 */
public TmfCheckpointIndexer(final ITmfTrace<ITmfEvent> trace,final int interval){
  fTrace=trace;
  fCheckpointInterval=interval;
  fTraceIndex=new ArrayList<ITmfCheckpoint>();
  fIsIndexing=false;
}
Program: 92323
Project: 92323
Buggy source:
public CustomEventContent(CustomEvent parent,String content){
  super(ITmfEventField.ROOT_FIELD_ID,content);
}

Fixed version (ground truth):
public CustomEventContent(CustomEvent parent,StringBuffer content){
  super(ITmfEventField.ROOT_FIELD_ID,content);
}
Program: 92324
Project: 92324
Buggy source:
DataRequest(Class<T> dataType,int start,int nbRequested){
  super(dataType,start,nbRequested);
  fRank=start;
  fIndex=index;
}

Fixed version (ground truth):
DataRequest(Class<T> dataType,ITmfFilter filter,int start,int nbRequested){
  super(dataType,start,nbRequested);
  fFilter=filter;
  fRank=start;
  fIndex=index;
}
Program: 92326
Project: 92326
Buggy source:
public synchronized void storeEvent(ITmfEvent event,long rank,int index){
  if (fCacheStartIndex == fCacheEndIndex) {
    fCacheStartIndex=index;
    fCacheEndIndex=index;
  }
  if (index == fCacheEndIndex) {
    int i=index - fCacheStartIndex;
    if (i < fCache.length) {
      fCache[i]=new CachedEvent(event.clone(),rank);
      fCacheEndIndex++;
    }
  }
  if ((fFilter != null) && ((index % fCache.length) == 0)) {
    int i=index / fCache.length;
    fFilterIndex.add(i,Integer.valueOf((int)rank));
  }
}

Fixed version (ground truth):
public synchronized void storeEvent(ITmfEvent event,long rank,int index){
  if (index == fCacheEndIndex) {
    int i=index - fCacheStartIndex;
    if (i < fCache.length) {
      fCache[i]=new CachedEvent(event.clone(),rank);
      fCacheEndIndex++;
    }
  }
  if ((fFilter != null) && ((index % fCache.length) == 0)) {
    int i=index / fCache.length;
    fFilterIndex.add(i,Integer.valueOf((int)rank));
  }
}
Program: 92329
Project: 92329
Buggy source:
@Override public void run(){
  if (fTable.isDisposed())   return;
  int topIndex=fTable.getTopIndex();
  if (topIndex != 0) {
    fTableTopEventRank+=topIndex;
    refreshTable();
    fSlider.setSelection(fTableTopEventRank);
    fTable.setTopIndex(0);
  }
}

Fixed version (ground truth):
@Override public void run(){
  if (fTable.isDisposed()) {
    return;
  }
  int topIndex=fTable.getTopIndex();
  if (topIndex != 0) {
    fTableTopEventRank+=topIndex;
    refreshTable();
    fSlider.setSelection(fTableTopEventRank);
    fTable.setTopIndex(0);
  }
}
Program: 92330
Project: 92330
Buggy source:
/** 
 * Update the rows and selected item
 */
private void handleTableSelection(){
  int selectedRow=fTable.getSelectionIndices()[0];
  if (selectedRow < fFrozenRowCount) {
    fSelectedEventRank=selectedRow;
  }
 else {
    fSelectedEventRank=fTableTopEventRank + selectedRow;
  }
  if (selectedRow >= fFullyVisibleRows) {
    final Display display=fTable.getDisplay();
    Thread thread=new Thread("String_Node_Str"){
      @Override public void run(){
        try {
          Thread.sleep(600);
        }
 catch (        InterruptedException e) {
        }
        display.asyncExec(new Runnable(){
          @Override public void run(){
            if (fTable.isDisposed())             return;
            int topIndex=fTable.getTopIndex();
            if (topIndex != 0) {
              fTableTopEventRank+=topIndex;
              refreshTable();
              fSlider.setSelection(fTableTopEventRank);
              fTable.setTopIndex(0);
            }
          }
        }
);
      }
    }
;
    thread.start();
  }
}

Fixed version (ground truth):
/** 
 * Update the rows and selected item
 */
private void handleTableSelection(){
  int selectedRow=fTable.getSelectionIndices()[0];
  if (selectedRow < fFrozenRowCount) {
    fSelectedEventRank=selectedRow;
  }
 else {
    fSelectedEventRank=fTableTopEventRank + selectedRow;
  }
  if (selectedRow >= fFullyVisibleRows) {
    final Display display=fTable.getDisplay();
    Thread thread=new Thread("String_Node_Str"){
      @Override public void run(){
        try {
          Thread.sleep(600);
        }
 catch (        InterruptedException e) {
        }
        display.asyncExec(new Runnable(){
          @Override public void run(){
            if (fTable.isDisposed()) {
              return;
            }
            int topIndex=fTable.getTopIndex();
            if (topIndex != 0) {
              fTableTopEventRank+=topIndex;
              refreshTable();
              fSlider.setSelection(fTableTopEventRank);
              fTable.setTopIndex(0);
            }
          }
        }
);
      }
    }
;
    thread.start();
  }
}
Program: 92331
Project: 92331
Buggy source:
@Override public void controlResized(ControlEvent event){
  resize();
}

Fixed version (ground truth):
@Override public void controlResized(ControlEvent event){
  resize();
  if (fTableItemCount > 0) {
    fSlider.setThumb(Math.max(1,Math.min(fTableRows,fFullyVisibleRows)));
  }
}
Program: 92332
Project: 92332
Buggy source:
public Control createTableEditorControl(Class<? extends Control> control){
  try {
    return (Control)control.getConstructor(Composite.class,int.class).newInstance(new Object[]{fTable,SWT.NONE});
  }
 catch (  Exception e) {
    Activator.getDefault().logError("String_Node_Str",e);
  }
  return null;
}

Fixed version (ground truth):
public Control createTableEditorControl(Class<? extends Control> control){
  try {
    return control.getConstructor(Composite.class,int.class).newInstance(new Object[]{fTable,SWT.NONE});
  }
 catch (  Exception e) {
    Activator.getDefault().logError("String_Node_Str",e);
  }
  return null;
}
Program: 92333
Project: 92333
Buggy source:
public CustomTxtTrace(final IResource resource,final CustomTxtTraceDefinition definition,final String path,final int pageSize) throws TmfTraceException {
  super(resource,CustomTxtEvent.class,path,(pageSize > 0) ? pageSize : DEFAULT_CACHE_SIZE);
  fDefinition=definition;
  fEventType=new CustomTxtEventType(fDefinition);
}

Fixed version (ground truth):
public CustomTxtTrace(final IResource resource,final CustomTxtTraceDefinition definition,final String path,final int pageSize) throws TmfTraceException {
  super(resource,CustomTxtEvent.class,path,(pageSize > 0) ? pageSize : DEFAULT_CACHE_SIZE);
  fDefinition=definition;
  fEventType=new CustomTxtEventType(fDefinition);
  indexTrace(false);
}
Program: 92334
Project: 92334
Buggy source:
public CustomXmlTrace(final IResource resource,final CustomXmlTraceDefinition definition,final String path,final int pageSize) throws TmfTraceException {
  super(null,CustomXmlEvent.class,path,(pageSize > 0) ? pageSize : DEFAULT_CACHE_SIZE);
  fDefinition=definition;
  fEventType=new CustomXmlEventType(fDefinition);
  fRecordInputElement=getRecordInputElement(fDefinition.rootInputElement);
}

Fixed version (ground truth):
public CustomXmlTrace(final IResource resource,final CustomXmlTraceDefinition definition,final String path,final int pageSize) throws TmfTraceException {
  super(null,CustomXmlEvent.class,path,(pageSize > 0) ? pageSize : DEFAULT_CACHE_SIZE);
  fDefinition=definition;
  fEventType=new CustomXmlEventType(fDefinition);
  fRecordInputElement=getRecordInputElement(fDefinition.rootInputElement);
  indexTrace(false);
}
Program: 92336
Project: 92336
Buggy source:
/** 
 * You must dispose the color setting when it is no longer required.
 */
public ColorSetting(RGB foreground,RGB background,int tickColorIndex,ITmfFilterTreeNode filter){
  fForegroundRGB=foreground;
  fBackgroundRGB=background;
  fTickColorIndex=tickColorIndex;
  fFilter=filter;
  Display display=Display.getDefault();
  fForegroundColor=new Color(display,fForegroundRGB);
  fBackgroundColor=new Color(display,fBackgroundRGB);
  fDimmedForegroundColor=new Color(display,ColorUtil.blend(fForegroundRGB,fBackgroundRGB));
  fDimmedBackgroundColor=new Color(display,ColorUtil.blend(fBackgroundRGB,display.getSystemColor(SWT.COLOR_LIST_BACKGROUND).getRGB()));
}

Fixed version (ground truth):
/** 
 * Constructor You must dispose the color setting when it is no longer required.
 */
public ColorSetting(RGB foreground,RGB background,RGB tickColorRGB,ITmfFilterTreeNode filter){
  fForegroundRGB=foreground;
  fBackgroundRGB=background;
  fTickColorRGB=tickColorRGB;
  fFilter=filter;
  Display display=Display.getDefault();
  fForegroundColor=new Color(display,fForegroundRGB);
  fBackgroundColor=new Color(display,fBackgroundRGB);
  fDimmedForegroundColor=new Color(display,ColorUtil.blend(fForegroundRGB,fBackgroundRGB));
  fDimmedBackgroundColor=new Color(display,ColorUtil.blend(fBackgroundRGB,display.getSystemColor(SWT.COLOR_LIST_BACKGROUND).getRGB()));
  fTickColor=new Color(display,fTickColorRGB);
}
Program: 92337
Project: 92337
Buggy source:
/** 
 * @param foreground the foreground to set
 */
public void setForegroundRGB(RGB foreground){
  fForegroundRGB=foreground;
  fForegroundColor.dispose();
  fDimmedForegroundColor.dispose();
  Display display=Display.getDefault();
  fForegroundColor=new Color(display,fForegroundRGB);
  fDimmedForegroundColor=new Color(display,ColorUtil.blend(fForegroundRGB,fBackgroundRGB));
}

Fixed version (ground truth):
/** 
 * Sets the foreground RGB value
 * @param foreground the foreground to set
 */
public void setForegroundRGB(RGB foreground){
  fForegroundRGB=foreground;
  fForegroundColor.dispose();
  fDimmedForegroundColor.dispose();
  Display display=Display.getDefault();
  fForegroundColor=new Color(display,fForegroundRGB);
  fDimmedForegroundColor=new Color(display,ColorUtil.blend(fForegroundRGB,fBackgroundRGB));
}
Program: 92338
Project: 92338
Buggy source:
/** 
 * @return the foreground color
 */
public Color getForegroundColor(){
  return fForegroundColor;
}

Fixed version (ground truth):
/** 
 * Returns the foreground color.
 * @return the foreground color
 */
public Color getForegroundColor(){
  return fForegroundColor;
}
Program: 92339
Project: 92339
Buggy source:
/** 
 * @return the dimmed background color
 */
public Color getDimmedBackgroundColor(){
  return fDimmedBackgroundColor;
}

Fixed version (ground truth):
/** 
 * Returns the dimmed background color.
 * @return the dimmed background color
 */
public Color getDimmedBackgroundColor(){
  return fDimmedBackgroundColor;
}
Program: 92340
Project: 92340
Buggy source:
/** 
 * @return the foreground
 */
public RGB getForegroundRGB(){
  return fForegroundRGB;
}

Fixed version (ground truth):
/** 
 * Returns foreground RGB value.
 * @return the foreground RGB
 */
public RGB getForegroundRGB(){
  return fForegroundRGB;
}
Program: 92341
Project: 92341
Buggy source:
/** 
 * @return the background color
 */
public Color getBackgroundColor(){
  return fBackgroundColor;
}

Fixed version (ground truth):
/** 
 * Returns the background color.
 * @return the background color
 */
public Color getBackgroundColor(){
  return fBackgroundColor;
}
Program: 92342
Project: 92342
Buggy source:
/** 
 * @return the background
 */
public RGB getBackgroundRGB(){
  return fBackgroundRGB;
}

Fixed version (ground truth):
/** 
 * Returns the background RGB value.
 * @return the background RGB
 */
public RGB getBackgroundRGB(){
  return fBackgroundRGB;
}
Program: 92343
Project: 92343
Buggy source:
/** 
 * @param background the background to set
 */
public void setBackgroundRGB(RGB background){
  fBackgroundRGB=background;
  fBackgroundColor.dispose();
  fDimmedBackgroundColor.dispose();
  Display display=Display.getDefault();
  fBackgroundColor=new Color(display,fBackgroundRGB);
  fDimmedBackgroundColor=new Color(display,ColorUtil.blend(fBackgroundRGB,display.getSystemColor(SWT.COLOR_LIST_BACKGROUND).getRGB()));
}

Fixed version (ground truth):
/** 
 * Sets the background RGB value.
 * @param background the background to set
 */
public void setBackgroundRGB(RGB background){
  fBackgroundRGB=background;
  fBackgroundColor.dispose();
  fDimmedBackgroundColor.dispose();
  Display display=Display.getDefault();
  fBackgroundColor=new Color(display,fBackgroundRGB);
  fDimmedBackgroundColor=new Color(display,ColorUtil.blend(fBackgroundRGB,display.getSystemColor(SWT.COLOR_LIST_BACKGROUND).getRGB()));
}
Program: 92344
Project: 92344
Buggy source:
/** 
 * @param filter the filter to set
 */
public void setFilter(ITmfFilterTreeNode filter){
  fFilter=filter;
}

Fixed version (ground truth):
/** 
 * Sets the filter implementation.
 * @param filter the filter to set
 */
public void setFilter(ITmfFilterTreeNode filter){
  fFilter=filter;
}
Program: 92345
Project: 92345
Buggy source:
/** 
 * @return the filter
 */
public ITmfFilterTreeNode getFilter(){
  return fFilter;
}

Fixed version (ground truth):
/** 
 * Returns the filter implementation.
 * @return the filter
 */
public ITmfFilterTreeNode getFilter(){
  return fFilter;
}
Program: 92346
Project: 92346
Buggy source:
/** 
 * @return the dimmed foreground color
 */
public Color getDimmedForegroundColor(){
  return fDimmedForegroundColor;
}

Fixed version (ground truth):
/** 
 * Returns the dimmed foreground color.
 * @return the dimmed foreground color
 */
public Color getDimmedForegroundColor(){
  return fDimmedForegroundColor;
}
Program: 92347
Project: 92347
Buggy source:
/** 
 * Dispose the color setting resources
 */
public void dispose(){
  fForegroundColor.dispose();
  fBackgroundColor.dispose();
  fDimmedForegroundColor.dispose();
  fDimmedBackgroundColor.dispose();
}

Fixed version (ground truth):
/** 
 * Dispose the color setting resources
 */
public void dispose(){
  fForegroundColor.dispose();
  fBackgroundColor.dispose();
  fDimmedForegroundColor.dispose();
  fDimmedBackgroundColor.dispose();
  fTickColor.dispose();
}