nus-yam/ex-repair huggingface dataset:
Program: 92137
Project: 92137
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) {
    context=nextEventContext.clone();
    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.dispose();
    context=nextEventContext.clone();
    event=getNext(nextEventContext);
  }
  nextEventContext.dispose();
  if (event == null) {
    context.setLocation(null);
    context.setRank(ITmfContext.UNKNOWN_RANK);
  }
  return context;
}
Program: 92138
Project: 92138
Buggy source:
@Override public synchronized CustomTxtEvent getNext(final ITmfContext context){
  final ITmfContext savedContext=context.clone();
  final CustomTxtEvent event=parse(context);
  if (event != null) {
    updateAttributes(savedContext,event.getTimestamp());
    context.increaseRank();
  }
  return event;
}

Fixed version (ground truth):
@Override public synchronized CustomTxtEvent getNext(final ITmfContext context){
  final ITmfContext savedContext=new TmfContext(context.getLocation(),context.getRank());
  final CustomTxtEvent event=parse(context);
  if (event != null) {
    updateAttributes(savedContext,event.getTimestamp());
    context.increaseRank();
  }
  return event;
}
Program: 92139
Project: 92139
Buggy source:
@Override public synchronized CustomXmlEvent getNext(final ITmfContext context){
  final ITmfContext savedContext=context.clone();
  final CustomXmlEvent event=parse(context);
  if (event != null) {
    updateAttributes(savedContext,event.getTimestamp());
    context.increaseRank();
  }
  return event;
}

Fixed version (ground truth):
@Override public synchronized CustomXmlEvent getNext(final ITmfContext context){
  final ITmfContext savedContext=new TmfContext(context.getLocation(),context.getRank());
  final CustomXmlEvent event=parse(context);
  if (event != null) {
    updateAttributes(savedContext,event.getTimestamp());
    context.increaseRank();
  }
  return event;
}
Program: 92141
Project: 92141
Buggy source:
@Override public void handleCompleted(){
  super.handleCompleted();
  if (fTrace == null) {
    return;
  }
  ITmfTimestamp timestamp=ts;
  if (timestamp.compareTo(fTrace.getStartTime(),true) == -1) {
    timestamp=fTrace.getStartTime();
  }
  if (timestamp.compareTo(fTrace.getEndTime(),true) == 1) {
    timestamp=fTrace.getEndTime();
  }
  final ITmfContext context=fTrace.seekEvent(timestamp);
  final long rank=context.getRank();
  fSelectedRank=rank;
  fTable.getDisplay().asyncExec(new Runnable(){
    @Override public void run(){
      if (fTable.isDisposed()) {
        return;
      }
      int index=(int)rank;
      if (fTable.isDisposed()) {
        return;
      }
      if (fTable.getData(Key.FILTER_OBJ) != null) {
        index=fCache.getFilteredEventIndex(rank) + 1;
      }
      fTable.setSelection(index + 1);
      fRawViewer.selectAndReveal(rank);
    }
  }
);
}

Fixed version (ground truth):
@Override public void handleCompleted(){
  super.handleCompleted();
  if (fTrace == null) {
    return;
  }
  ITmfTimestamp timestamp=ts;
  if (timestamp.compareTo(fTrace.getStartTime(),true) == -1) {
    timestamp=fTrace.getStartTime();
  }
  if (timestamp.compareTo(fTrace.getEndTime(),true) == 1) {
    timestamp=fTrace.getEndTime();
  }
  final ITmfContext context=fTrace.seekEvent(timestamp);
  final long rank=context.getRank();
  context.dispose();
  fSelectedRank=rank;
  fTable.getDisplay().asyncExec(new Runnable(){
    @Override public void run(){
      if (fTable.isDisposed()) {
        return;
      }
      int index=(int)rank;
      if (fTable.isDisposed()) {
        return;
      }
      if (fTable.getData(Key.FILTER_OBJ) != null) {
        index=fCache.getFilteredEventIndex(rank) + 1;
      }
      fTable.setSelection(index + 1);
      fRawViewer.selectAndReveal(rank);
    }
  }
);
}
Program: 92142
Project: 92142
Buggy source:
/** 
 * Adds a view list of managed view list. 
 * @param viewId Id of SD view to add and to manage
 */
public void add(String viewId){
  if (fViews.isEmpty()) {
    initialize();
  }
  if (!fViews.contains(viewId)) {
    fViews.add(viewId);
  }
}

Fixed version (ground truth):
/** 
 * Adds a view list of managed view list.
 * @param viewId Id of SD view to add and to manage
 */
public void add(String viewId){
  if (fViews.isEmpty()) {
    initialize();
  }
  if (!fViews.contains(viewId)) {
    fViews.add(viewId);
  }
}
Program: 92143
Project: 92143
Buggy source:
/** 
 * Enable / disable find action
 * @param enabled <code>true</code> for enabling else <code>false</code>  
 */
public void setFindEnabled(boolean enabled){
  if (fFindForKeyBinding != null) {
    fFindForKeyBinding.setEnabled(enabled);
  }
}

Fixed version (ground truth):
/** 
 * Enable / disable find action
 * @param enabled <code>true</code> for enabling else <code>false</code>
 */
public void setFindEnabled(boolean enabled){
  if (fFindForKeyBinding != null) {
    fFindForKeyBinding.setEnabled(enabled);
  }
}
Program: 92144
Project: 92144
Buggy source:
private void dispose(){
  IHandlerService service=(IHandlerService)PlatformUI.getWorkbench().getActiveWorkbenchWindow().getService(IHandlerService.class);
  for (  IHandlerActivation activation : fHandlerActivations) {
    service.deactivateHandler(activation);
  }
  fGoToMessageForKeyBinding=null;
  fFindForKeyBinding=null;
  fMoveUpForKeyBinding=null;
  fMoveDownForKeyBinding=null;
  fMoveLeftForKeyBinding=null;
  fMoveRightForKeyBinding=null;
  fShowNodeStartForKeyBinding=null;
  fShowNodeEndForKeyBinding=null;
}

Fixed version (ground truth):
private void dispose(){
  IWorkbenchWindow window=PlatformUI.getWorkbench().getActiveWorkbenchWindow();
  if (window == null) {
    return;
  }
  IHandlerService service=(IHandlerService)window.getService(IHandlerService.class);
  for (  IHandlerActivation activation : fHandlerActivations) {
    service.deactivateHandler(activation);
  }
  fGoToMessageForKeyBinding=null;
  fFindForKeyBinding=null;
  fMoveUpForKeyBinding=null;
  fMoveDownForKeyBinding=null;
  fMoveLeftForKeyBinding=null;
  fMoveRightForKeyBinding=null;
  fShowNodeStartForKeyBinding=null;
  fShowNodeEndForKeyBinding=null;
}
Program: 92145
Project: 92145
Buggy source:
/** 
 * Constructor 
 */
protected KeyBindingsManager(){
}

Fixed version (ground truth):
/** 
 * Constructor
 */
protected KeyBindingsManager(){
}
Program: 92146
Project: 92146
Buggy source:
/** 
 * Set the view in all supported actions 
 * @param view to set in global actions
 */
public void setSdView(SDView view){
  if (!fViews.isEmpty()) {
    fGoToMessageForKeyBinding.setView(view);
    fFindForKeyBinding.setView(view);
    fMoveUpForKeyBinding.setView(view);
    fMoveDownForKeyBinding.setView(view);
    fMoveLeftForKeyBinding.setView(view);
    fMoveRightForKeyBinding.setView(view);
    fShowNodeStartForKeyBinding.setView(view);
    fShowNodeEndForKeyBinding.setView(view);
  }
}

Fixed version (ground truth):
/** 
 * Set the view in all supported actions
 * @param view to set in global actions
 */
public void setSdView(SDView view){
  if (!fViews.isEmpty()) {
    fGoToMessageForKeyBinding.setView(view);
    fFindForKeyBinding.setView(view);
    fMoveUpForKeyBinding.setView(view);
    fMoveDownForKeyBinding.setView(view);
    fMoveLeftForKeyBinding.setView(view);
    fMoveRightForKeyBinding.setView(view);
    fShowNodeStartForKeyBinding.setView(view);
    fShowNodeEndForKeyBinding.setView(view);
  }
}
Program: 92147
Project: 92147
Buggy source:
@Override public void dispose(){
  super.dispose();
  fLock.lock();
  try {
    PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService().removePostSelectionListener(this);
    fView.setSDFindProvider(null);
    fView.setSDPagingProvider(null);
    fView.setSDFilterProvider(null);
    fView=null;
  }
  finally {
    fLock.unlock();
  }
}

Fixed version (ground truth):
@Override public void dispose(){
  super.dispose();
  fLock.lock();
  try {
    IWorkbenchWindow window=PlatformUI.getWorkbench().getActiveWorkbenchWindow();
    if (window != null) {
      window.getSelectionService().removePostSelectionListener(this);
    }
    fView.setSDFindProvider(null);
    fView.setSDPagingProvider(null);
    fView.setSDFilterProvider(null);
    fView=null;
  }
  finally {
    fLock.unlock();
  }
}
Program: 92148
Project: 92148
Buggy source:
public TmfStringLocation(TmfStringLocation other){
  super(other.getLocationInfo());
}

Fixed version (ground truth):
/** 
 * @param other the other location
 */
public TmfStringLocation(TmfStringLocation other){
  super(other.getLocationInfo());
}
Program: 92149
Project: 92149
Buggy source:
@Override public TmfStringLocation clone(){
  return new TmfStringLocation((String)getLocationInfo());
}

Fixed version (ground truth):
@Override public TmfStringLocation clone(){
  TmfStringLocation clone=null;
  clone=(TmfStringLocation)super.clone();
  return clone;
}
Program: 92150
Project: 92150
Buggy source:
@Override public abstract TmfLocation clone();

Fixed version (ground truth):
@Override public TmfLocation clone(){
  TmfLocation clone=null;
  try {
    clone=(TmfLocation)super.clone();
    clone.fLocationInfo=cloneLocationInfo();
  }
 catch (  CloneNotSupportedException e) {
  }
  return clone;
}
Program: 92151
Project: 92151
Buggy source:
@Override public TmfLongLocation clone(){
  return new TmfLongLocation((Long)getLocationInfo());
}

Fixed version (ground truth):
@Override public TmfLongLocation clone(){
  TmfLongLocation clone=null;
  clone=(TmfLongLocation)super.clone();
  return clone;
}
Program: 92152
Project: 92152
Buggy source:
@Override public TmfTimestampLocation clone(){
  return new TmfTimestampLocation((ITmfTimestamp)getLocationInfo());
}

Fixed version (ground truth):
@Override public TmfTimestampLocation clone(){
  TmfTimestampLocation clone=null;
  clone=(TmfTimestampLocation)super.clone();
  return clone;
}
Program: 92153
Project: 92153
Buggy source:
@Override public TmfStringLocation clone(){
  TmfStringLocation clone=null;
  clone=(TmfStringLocation)super.clone();
  return clone;
}

Fixed version (ground truth):
@Override public TmfStringLocation clone(){
  return (TmfStringLocation)super.clone();
}
Program: 92154
Project: 92154
Buggy source:
@Override public TmfLongLocation clone(){
  TmfLongLocation clone=null;
  clone=(TmfLongLocation)super.clone();
  return clone;
}

Fixed version (ground truth):
@Override public TmfLongLocation clone(){
  return (TmfLongLocation)super.clone();
}
Program: 92155
Project: 92155
Buggy source:
@Override public TmfTimestampLocation clone(){
  TmfTimestampLocation clone=null;
  clone=(TmfTimestampLocation)super.clone();
  return clone;
}

Fixed version (ground truth):
@Override public TmfTimestampLocation clone(){
  return (TmfTimestampLocation)super.clone();
}
Program: 92157
Project: 92157
Buggy source:
/** 
 * @param config
 * @return the name of the host in which the config's project is stored
 */
private static String getHostName(ILaunchConfiguration config){
  String projectName=null;
  try {
    projectName=config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME,"String_Node_Str");
  }
 catch (  CoreException e) {
    return null;
  }
  if (projectName == null) {
    return null;
  }
  IProject project=ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
  if (project == null) {
    return null;
  }
  return project.getLocationURI().getHost();
}

Fixed version (ground truth):
/** 
 * @param config
 * @return the name of the host in which the config's project is stored
 */
private static String getHostName(ILaunchConfiguration config){
  String projectName=null;
  try {
    projectName=config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME,"String_Node_Str");
  }
 catch (  CoreException e) {
    return null;
  }
  if (projectName.equals("String_Node_Str")) {
    return null;
  }
  IProject project=ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
  if (project == null) {
    return null;
  }
  return project.getLocationURI().getHost();
}
Program: 92158
Project: 92158
Buggy source:
protected IProject getProject(ILaunchConfiguration config){
  String name=null;
  try {
    name=config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME,EMPTY_STRING);
  }
 catch (  CoreException e) {
    return null;
  }
  if (name == null) {
    return null;
  }
  return ResourcesPlugin.getWorkspace().getRoot().getProject(name);
}

Fixed version (ground truth):
protected IProject getProject(ILaunchConfiguration config){
  String name=null;
  try {
    name=config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME,EMPTY_STRING);
  }
 catch (  CoreException e) {
    return null;
  }
  if (name.equals(EMPTY_STRING)) {
    return null;
  }
  return ResourcesPlugin.getWorkspace().getRoot().getProject(name);
}
Program: 92159
Project: 92159
Buggy source:
/** 
 * Returns a map of name and value providing additional information to display in the tool tip for this event.
 * @param event the time event
 * @return a map of tool tip information
 */
public Map<String,String> getEventHoverToolTipInfo(ITimeEvent event);

Fixed version (ground truth):
/** 
 * Returns a map of name and value providing additional information to display in the tool tip for this event.
 * @param event the time event
 * @param hoverTime the time corresponding to the mouse hover position
 * @return a map of tool tip information
 * @since 2.0
 */
public Map<String,String> getEventHoverToolTipInfo(ITimeEvent event,long hoverTime);
Program: 92161
Project: 92161
Buggy source:
@Override public void handleData(final ITmfEvent event){
  super.handleData(event);
  if (event != null) {
    final ITmfTimestamp timestamp=event.getTimestamp();
    if (startTime == null) {
      startTime=timestamp.clone();
    }
    lastTime=timestamp.clone();
    if ((getNbRead() % fCheckpointInterval) == 0) {
      updateTraceStatus();
    }
  }
}

Fixed version (ground truth):
@Override public void handleData(final ITmfEvent event){
  super.handleData(event);
  if (event != null) {
    if ((getNbRead() % fCheckpointInterval) == 0) {
      updateTraceStatus();
    }
  }
}
Program: 92162
Project: 92162
Buggy source:
private void updateTraceStatus(){
  if (getNbRead() != 0) {
    signalNewTimeRange(startTime,lastTime);
  }
}

Fixed version (ground truth):
private void updateTraceStatus(){
  if (fTrace.getNbEvents() > 0) {
    signalNewTimeRange(fTrace.getStartTime(),fTrace.getEndTime());
  }
}
Program: 92163
Project: 92163
Buggy source:
public void testTmfCoalescedDataRequestIndexNbRequested(){
  TmfCoalescedDataRequest<TmfEvent> request=new TmfCoalescedDataRequest<TmfEvent>(TmfEvent.class,10,100);
  assertEquals("String_Node_Str",fRequestCount++,request.getRequestId());
  assertEquals("String_Node_Str",TmfEvent.class,request.getDataType());
  assertEquals("String_Node_Str",10,request.getIndex());
  assertEquals("String_Node_Str",100,request.getNbRequested());
  assertFalse("String_Node_Str",request.isCompleted());
  assertFalse("String_Node_Str",request.isFailed());
  assertFalse("String_Node_Str",request.isCancelled());
  assertEquals("String_Node_Str",0,request.getNbRead());
}

Fixed version (ground truth):
public void testTmfCoalescedDataRequestIndexNbRequested(){
  TmfCoalescedDataRequest<TmfEvent> request=new TmfCoalescedDataRequest<TmfEvent>(TmfEvent.class,10,100);
  assertEquals("String_Node_Str",fRequestCount++,request.getRequestId());
  assertEquals("String_Node_Str",ITmfEvent.class,request.getDataType());
  assertEquals("String_Node_Str",10,request.getIndex());
  assertEquals("String_Node_Str",100,request.getNbRequested());
  assertFalse("String_Node_Str",request.isCompleted());
  assertFalse("String_Node_Str",request.isFailed());
  assertFalse("String_Node_Str",request.isCancelled());
  assertEquals("String_Node_Str",0,request.getNbRead());
}
Program: 92164
Project: 92164
Buggy source:
public void testTmfCoalescedDataRequestIndexNbEventsBlocksize(){
  TmfCoalescedDataRequest<TmfEvent> request=new TmfCoalescedDataRequest<TmfEvent>(TmfEvent.class,10,100,200);
  assertEquals("String_Node_Str",fRequestCount++,request.getRequestId());
  assertEquals("String_Node_Str",TmfEvent.class,request.getDataType());
  assertEquals("String_Node_Str",10,request.getIndex());
  assertEquals("String_Node_Str",100,request.getNbRequested());
  assertFalse("String_Node_Str",request.isCompleted());
  assertFalse("String_Node_Str",request.isFailed());
  assertFalse("String_Node_Str",request.isCancelled());
  assertEquals("String_Node_Str",0,request.getNbRead());
}

Fixed version (ground truth):
public void testTmfCoalescedDataRequestIndexNbEventsBlocksize(){
  TmfCoalescedDataRequest<TmfEvent> request=new TmfCoalescedDataRequest<TmfEvent>(TmfEvent.class,10,100,200);
  assertEquals("String_Node_Str",fRequestCount++,request.getRequestId());
  assertEquals("String_Node_Str",ITmfEvent.class,request.getDataType());
  assertEquals("String_Node_Str",10,request.getIndex());
  assertEquals("String_Node_Str",100,request.getNbRequested());
  assertFalse("String_Node_Str",request.isCompleted());
  assertFalse("String_Node_Str",request.isFailed());
  assertFalse("String_Node_Str",request.isCancelled());
  assertEquals("String_Node_Str",0,request.getNbRead());
}
Program: 92165
Project: 92165
Buggy source:
public void testTmfCoalescedDataRequestIndex(){
  TmfCoalescedDataRequest<TmfEvent> request=new TmfCoalescedDataRequest<TmfEvent>(TmfEvent.class,10);
  assertEquals("String_Node_Str",fRequestCount++,request.getRequestId());
  assertEquals("String_Node_Str",TmfEvent.class,request.getDataType());
  assertEquals("String_Node_Str",10,request.getIndex());
  assertEquals("String_Node_Str",TmfDataRequest.ALL_DATA,request.getNbRequested());
  assertFalse("String_Node_Str",request.isCompleted());
  assertFalse("String_Node_Str",request.isFailed());
  assertFalse("String_Node_Str",request.isCancelled());
  assertEquals("String_Node_Str",0,request.getNbRead());
}

Fixed version (ground truth):
public void testTmfCoalescedDataRequestIndex(){
  TmfCoalescedDataRequest<TmfEvent> request=new TmfCoalescedDataRequest<TmfEvent>(TmfEvent.class,10);
  assertEquals("String_Node_Str",fRequestCount++,request.getRequestId());
  assertEquals("String_Node_Str",ITmfEvent.class,request.getDataType());
  assertEquals("String_Node_Str",10,request.getIndex());
  assertEquals("String_Node_Str",TmfDataRequest.ALL_DATA,request.getNbRequested());
  assertFalse("String_Node_Str",request.isCompleted());
  assertFalse("String_Node_Str",request.isFailed());
  assertFalse("String_Node_Str",request.isCancelled());
  assertEquals("String_Node_Str",0,request.getNbRead());
}
Program: 92166
Project: 92166
Buggy source:
public void testTmfCoalescedDataRequest(){
  TmfCoalescedDataRequest<TmfEvent> request=new TmfCoalescedDataRequest<TmfEvent>(TmfEvent.class);
  assertEquals("String_Node_Str",fRequestCount++,request.getRequestId());
  assertEquals("String_Node_Str",TmfEvent.class,request.getDataType());
  assertEquals("String_Node_Str",0,request.getIndex());
  assertEquals("String_Node_Str",TmfDataRequest.ALL_DATA,request.getNbRequested());
  assertFalse("String_Node_Str",request.isCompleted());
  assertFalse("String_Node_Str",request.isFailed());
  assertFalse("String_Node_Str",request.isCancelled());
  assertEquals("String_Node_Str",0,request.getNbRead());
}

Fixed version (ground truth):
public void testTmfCoalescedDataRequest(){
  TmfCoalescedDataRequest<TmfEvent> request=new TmfCoalescedDataRequest<TmfEvent>(TmfEvent.class);
  assertEquals("String_Node_Str",fRequestCount++,request.getRequestId());
  assertEquals("String_Node_Str",ITmfEvent.class,request.getDataType());
  assertEquals("String_Node_Str",0,request.getIndex());
  assertEquals("String_Node_Str",TmfDataRequest.ALL_DATA,request.getNbRequested());
  assertFalse("String_Node_Str",request.isCompleted());
  assertFalse("String_Node_Str",request.isFailed());
  assertFalse("String_Node_Str",request.isCancelled());
  assertEquals("String_Node_Str",0,request.getNbRead());
}
Program: 92167
Project: 92167
Buggy source:
public void testTmfCoalescedEventRequestIndexNbRequested(){
  TmfCoalescedEventRequest<TmfEvent> request=new TmfCoalescedEventRequest<TmfEvent>(TmfEvent.class,range1,100);
  assertEquals("String_Node_Str",fRequestCount++,request.getRequestId());
  assertEquals("String_Node_Str",TmfEvent.class,request.getDataType());
  assertEquals("String_Node_Str",range1,request.getRange());
  assertEquals("String_Node_Str",100,request.getNbRequested());
  assertFalse("String_Node_Str",request.isCompleted());
  assertFalse("String_Node_Str",request.isFailed());
  assertFalse("String_Node_Str",request.isCancelled());
  assertEquals("String_Node_Str",0,request.getNbRead());
}

Fixed version (ground truth):
public void testTmfCoalescedEventRequestIndexNbRequested(){
  TmfCoalescedEventRequest<TmfEvent> request=new TmfCoalescedEventRequest<TmfEvent>(TmfEvent.class,range1,100);
  assertEquals("String_Node_Str",fRequestCount++,request.getRequestId());
  assertEquals("String_Node_Str",ITmfEvent.class,request.getDataType());
  assertEquals("String_Node_Str",range1,request.getRange());
  assertEquals("String_Node_Str",100,request.getNbRequested());
  assertFalse("String_Node_Str",request.isCompleted());
  assertFalse("String_Node_Str",request.isFailed());
  assertFalse("String_Node_Str",request.isCancelled());
  assertEquals("String_Node_Str",0,request.getNbRead());
}
Program: 92168
Project: 92168
Buggy source:
public void testTmfCoalescedEventRequest(){
  TmfCoalescedEventRequest<TmfEvent> request=new TmfCoalescedEventRequest<TmfEvent>(TmfEvent.class);
  assertEquals("String_Node_Str",fRequestCount++,request.getRequestId());
  assertEquals("String_Node_Str",TmfEvent.class,request.getDataType());
  assertEquals("String_Node_Str",range1,request.getRange());
  assertEquals("String_Node_Str",TmfDataRequest.ALL_DATA,request.getNbRequested());
  assertFalse("String_Node_Str",request.isCompleted());
  assertFalse("String_Node_Str",request.isFailed());
  assertFalse("String_Node_Str",request.isCancelled());
  assertEquals("String_Node_Str",0,request.getNbRead());
}

Fixed version (ground truth):
public void testTmfCoalescedEventRequest(){
  TmfCoalescedEventRequest<TmfEvent> request=new TmfCoalescedEventRequest<TmfEvent>(TmfEvent.class);
  assertEquals("String_Node_Str",fRequestCount++,request.getRequestId());
  assertEquals("String_Node_Str",ITmfEvent.class,request.getDataType());
  assertEquals("String_Node_Str",range1,request.getRange());
  assertEquals("String_Node_Str",TmfDataRequest.ALL_DATA,request.getNbRequested());
  assertFalse("String_Node_Str",request.isCompleted());
  assertFalse("String_Node_Str",request.isFailed());
  assertFalse("String_Node_Str",request.isCancelled());
  assertEquals("String_Node_Str",0,request.getNbRead());
}
Program: 92169
Project: 92169
Buggy source:
public void testTmfCoalescedEventRequestIndex(){
  TmfCoalescedEventRequest<TmfEvent> request=new TmfCoalescedEventRequest<TmfEvent>(TmfEvent.class,range1);
  assertEquals("String_Node_Str",fRequestCount++,request.getRequestId());
  assertEquals("String_Node_Str",TmfEvent.class,request.getDataType());
  assertEquals("String_Node_Str",range1,request.getRange());
  assertEquals("String_Node_Str",TmfDataRequest.ALL_DATA,request.getNbRequested());
  assertFalse("String_Node_Str",request.isCompleted());
  assertFalse("String_Node_Str",request.isFailed());
  assertFalse("String_Node_Str",request.isCancelled());
  assertEquals("String_Node_Str",0,request.getNbRead());
}

Fixed version (ground truth):
public void testTmfCoalescedEventRequestIndex(){
  TmfCoalescedEventRequest<TmfEvent> request=new TmfCoalescedEventRequest<TmfEvent>(TmfEvent.class,range1);
  assertEquals("String_Node_Str",fRequestCount++,request.getRequestId());
  assertEquals("String_Node_Str",ITmfEvent.class,request.getDataType());
  assertEquals("String_Node_Str",range1,request.getRange());
  assertEquals("String_Node_Str",TmfDataRequest.ALL_DATA,request.getNbRequested());
  assertFalse("String_Node_Str",request.isCompleted());
  assertFalse("String_Node_Str",request.isFailed());
  assertFalse("String_Node_Str",request.isCancelled());
  assertEquals("String_Node_Str",0,request.getNbRead());
}
Program: 92170
Project: 92170
Buggy source:
public void testTmfCoalescedEventRequestIndexNbEventsBlocksize(){
  TmfCoalescedEventRequest<TmfEvent> request=new TmfCoalescedEventRequest<TmfEvent>(TmfEvent.class,range1,100,200);
  assertEquals("String_Node_Str",fRequestCount++,request.getRequestId());
  assertEquals("String_Node_Str",TmfEvent.class,request.getDataType());
  assertEquals("String_Node_Str",range1,request.getRange());
  assertEquals("String_Node_Str",100,request.getNbRequested());
  assertFalse("String_Node_Str",request.isCompleted());
  assertFalse("String_Node_Str",request.isFailed());
  assertFalse("String_Node_Str",request.isCancelled());
  assertEquals("String_Node_Str",0,request.getNbRead());
}

Fixed version (ground truth):
public void testTmfCoalescedEventRequestIndexNbEventsBlocksize(){
  TmfCoalescedEventRequest<TmfEvent> request=new TmfCoalescedEventRequest<TmfEvent>(TmfEvent.class,range1,100,200);
  assertEquals("String_Node_Str",fRequestCount++,request.getRequestId());
  assertEquals("String_Node_Str",ITmfEvent.class,request.getDataType());
  assertEquals("String_Node_Str",range1,request.getRange());
  assertEquals("String_Node_Str",100,request.getNbRequested());
  assertFalse("String_Node_Str",request.isCompleted());
  assertFalse("String_Node_Str",request.isFailed());
  assertFalse("String_Node_Str",request.isCancelled());
  assertEquals("String_Node_Str",0,request.getNbRead());
}
Program: 92171
Project: 92171
Buggy source:
/** 
 * Request 'n' events of a given type from the given index (given priority). Events are returned in blocks of the given size.
 * @param dataType the requested data type
 * @param index the index of the first event to retrieve
 * @param nbRequested the number of events requested
 * @param blockSize the number of events per block
 * @param priority the requested execution priority
 */
public TmfCoalescedDataRequest(Class<T> dataType,long index,int nbRequested,int blockSize,ExecutionType priority){
  super(dataType,index,nbRequested,blockSize,priority);
}

Fixed version (ground truth):
/** 
 * Request 'n' events of a given type from the given index (given priority). Events are returned in blocks of the given size.
 * @param dataType the requested data type
 * @param index the index of the first event to retrieve
 * @param nbRequested the number of events requested
 * @param blockSize the number of events per block
 * @param priority the requested execution priority
 */
@SuppressWarnings("String_Node_Str") public TmfCoalescedDataRequest(Class<T> dataType,long index,int nbRequested,int blockSize,ExecutionType priority){
  super((Class<T>)ITmfEvent.class,index,nbRequested,blockSize,priority);
}
Program: 92172
Project: 92172
Buggy source:
/** 
 * Request 'n' events of a given type for the given time range (given priority). Events are returned in blocks of the given size.
 * @param dataType the requested data type
 * @param range the time range of the requested events
 * @param index the index of the first event to retrieve
 * @param nbRequested the number of events requested
 * @param blockSize the number of events per block
 * @param priority the requested execution priority
 */
public TmfCoalescedEventRequest(Class<T> dataType,TmfTimeRange range,long index,int nbRequested,int blockSize,ExecutionType priority){
  super(dataType,index,nbRequested,blockSize,priority);
  fRange=range;
  if (Tracer.isRequestTraced()) {
    String type=getClass().getName();
    type=type.substring(type.lastIndexOf('.') + 1);
    @SuppressWarnings("String_Node_Str") String message="String_Node_Str" + (getExecType() == ITmfDataRequest.ExecutionType.BACKGROUND ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ type+ "String_Node_Str"+ getIndex()+ "String_Node_Str"+ getNbRequested()+ "String_Node_Str"+ getRange()+ "String_Node_Str"+ getDataType().getSimpleName();
    Tracer.traceRequest(this,message);
  }
}

Fixed version (ground truth):
/** 
 * Request 'n' events of a given type for the given time range (given priority). Events are returned in blocks of the given size.
 * @param dataType the requested data type
 * @param range the time range of the requested events
 * @param index the index of the first event to retrieve
 * @param nbRequested the number of events requested
 * @param blockSize the number of events per block
 * @param priority the requested execution priority
 */
@SuppressWarnings("String_Node_Str") public TmfCoalescedEventRequest(Class<T> dataType,TmfTimeRange range,long index,int nbRequested,int blockSize,ExecutionType priority){
  super((Class<T>)ITmfEvent.class,index,nbRequested,blockSize,priority);
  fRange=range;
  if (Tracer.isRequestTraced()) {
    String type=getClass().getName();
    type=type.substring(type.lastIndexOf('.') + 1);
    @SuppressWarnings("String_Node_Str") String message="String_Node_Str" + (getExecType() == ITmfDataRequest.ExecutionType.BACKGROUND ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ type+ "String_Node_Str"+ getIndex()+ "String_Node_Str"+ getNbRequested()+ "String_Node_Str"+ getRange()+ "String_Node_Str"+ getDataType().getSimpleName();
    Tracer.traceRequest(this,message);
  }
}
Program: 92173
Project: 92173
Buggy source:
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) @Override public void run(){
  while (!fExecutor.isShutdown()) {
    final TmfExperiment experiment=TmfExperiment.getCurrentExperiment();
    if (experiment != null) {
      @SuppressWarnings("String_Node_Str") final TmfEventRequest request=new TmfEventRequest(TmfEvent.class,TmfTimeRange.ETERNITY,0,ExecutionType.FOREGROUND){
        @Override public void handleCompleted(){
          updateJniTrace();
        }
      }
;
      experiment.sendRequest(request);
      try {
        request.waitForCompletion();
      }
 catch (      final InterruptedException e) {
      }
    }
 else     updateJniTrace();
    try {
      Thread.sleep(LTTNG_STREAMING_INTERVAL);
    }
 catch (    final InterruptedException e) {
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) @Override public void run(){
  while (!executorIsShutdown()) {
    final TmfExperiment experiment=TmfExperiment.getCurrentExperiment();
    if (experiment != null) {
      @SuppressWarnings("String_Node_Str") final TmfEventRequest request=new TmfEventRequest(TmfEvent.class,TmfTimeRange.ETERNITY,0,ExecutionType.FOREGROUND){
        @Override public void handleCompleted(){
          updateJniTrace();
        }
      }
;
      experiment.sendRequest(request);
      try {
        request.waitForCompletion();
      }
 catch (      final InterruptedException e) {
      }
    }
 else     updateJniTrace();
    try {
      Thread.sleep(LTTNG_STREAMING_INTERVAL);
    }
 catch (    final InterruptedException e) {
    }
  }
}
Program: 92176
Project: 92176
Buggy source:
/** 
 * @since 1.1
 */
private Composite getTabFolderComposite(){
  if (counterSubTabs[0] == null) {
    return null;
  }
 else {
    Composite c=counterSubTabs[0].getTabTopContainer();
    while (c != null && !(c instanceof TabFolder)) {
      c=c.getParent();
    }
    return c.getParent();
  }
}

Fixed version (ground truth):
/** 
 * @since 1.1
 */
private Composite getTabFolderComposite(){
  if (counterSubTabs.length == 0 || counterSubTabs[0] == null) {
    return null;
  }
 else {
    Composite c=counterSubTabs[0].getTabTopContainer();
    while (c != null && !(c instanceof TabFolder)) {
      c=c.getParent();
    }
    return c.getParent();
  }
}
Program: 92177
Project: 92177
Buggy source:
@Override public void setFocus(){
}

Fixed version (ground truth):
@Override public void setFocus(){
  if (masterComposite != null) {
    masterComposite.setFocus();
  }
}
Program: 92178
Project: 92178
Buggy source:
/** 
 * gets the clock if there is only one. (this is 100% of the use cases as of June 2012)
 * @return the clock
 */
public final CTFClock getClock(){
  if (clocks.size() == 1) {
    if (singleClock == null) {
      singleClock=clocks.get(clocks.keySet().toArray()[0]);
      singleOffset=(Long)getClock().getProperty("String_Node_Str");
    }
    return singleClock;
  }
  return null;
}

Fixed version (ground truth):
/** 
 * gets the clock if there is only one. (this is 100% of the use cases as of June 2012)
 * @return the clock
 */
public final CTFClock getClock(){
  if (clocks.size() == 1) {
    if (singleClock == null) {
      singleClock=clocks.get(clocks.keySet().toArray()[0]);
      if (singleClock.getProperty(OFFSET) != null) {
        singleOffset=(Long)getClock().getProperty(OFFSET);
      }
 else {
        singleClock.addAttribute(OFFSET,0);
      }
    }
    return singleClock;
  }
  return null;
}
Program: 92182
Project: 92182
Buggy source:
/** 
 * Select an event
 * @param n 1 to enable, -1 to disable
 */
public void selectEvent(int n){
  if (null == _timeProvider) {
    return;
  }
  ITimeGraphEntry trace=getSelectedTrace();
  if (trace == null) {
    return;
  }
  long selectedTime=_timeProvider.getSelectedTime();
  long endTime=_timeProvider.getEndTime();
  ITimeEvent nextEvent;
  if (-1 == n && selectedTime > endTime) {
    nextEvent=Utils.findEvent(trace,selectedTime,0);
  }
 else {
    nextEvent=Utils.findEvent(trace,selectedTime,n);
  }
  if (null == nextEvent && -1 == n) {
    nextEvent=Utils.getFirstEvent(trace);
  }
  if (null != nextEvent) {
    long nextTime=nextEvent.getTime();
    if (nextTime <= selectedTime && n == 1) {
      nextTime=nextEvent.getTime() + nextEvent.getDuration();
      if (nextTime > endTime) {
        nextTime=endTime;
      }
    }
    _timeProvider.setSelectedTimeNotify(nextTime,true);
    fireSelectionChanged();
  }
 else   if (1 == n) {
    _timeProvider.setSelectedTimeNotify(endTime,true);
    fireSelectionChanged();
  }
}

Fixed version (ground truth):
/** 
 * Select an event
 * @param n 1 for next event, -1 for previous event
 */
public void selectEvent(int n){
  if (null == _timeProvider) {
    return;
  }
  ITimeGraphEntry trace=getSelectedTrace();
  if (trace == null) {
    return;
  }
  long selectedTime=_timeProvider.getSelectedTime();
  long endTime=_timeProvider.getEndTime();
  ITimeEvent nextEvent;
  if (-1 == n && selectedTime > endTime) {
    nextEvent=Utils.findEvent(trace,selectedTime,0);
  }
 else {
    nextEvent=Utils.findEvent(trace,selectedTime,n);
  }
  if (null == nextEvent && -1 == n) {
    nextEvent=Utils.getFirstEvent(trace);
  }
  if (null != nextEvent) {
    long nextTime=nextEvent.getTime();
    if (nextTime <= selectedTime && n == 1) {
      nextTime=nextEvent.getTime() + nextEvent.getDuration();
      if (nextTime > endTime) {
        nextTime=endTime;
      }
    }
 else     if (n == -1) {
      if (nextEvent.getTime() + nextEvent.getDuration() < selectedTime) {
        nextTime=nextEvent.getTime() + nextEvent.getDuration();
      }
    }
    _timeProvider.setSelectedTimeNotify(nextTime,true);
    fireSelectionChanged();
  }
 else   if (1 == n) {
    _timeProvider.setSelectedTimeNotify(endTime,true);
    fireSelectionChanged();
  }
}
Program: 92183
Project: 92183
Buggy source:
@Override public void handleData(T data){
  super.handleData(data);
  if (getClass() == TmfCoalescedDataRequest.class) {
    long index=getNbRead();
    for (    ITmfDataRequest<T> request : fRequests) {
      if (!request.isCompleted()) {
        if (request.getDataType().isInstance(data)) {
          long start=request.getIndex();
          long end=start + request.getNbRequested() - 1;
          if (index >= start && index < end) {
            request.handleData(data);
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
@Override public void handleData(T data){
  super.handleData(data);
  if (getClass() == TmfCoalescedDataRequest.class) {
    long index=getIndex() + getNbRead();
    for (    ITmfDataRequest<T> request : fRequests) {
      if (!request.isCompleted()) {
        if (request.getDataType().isInstance(data)) {
          long start=request.getIndex();
          long end=start + request.getNbRequested() - 1;
          if (index >= start && index < end) {
            request.handleData(data);
          }
        }
      }
    }
  }
}
Program: 92184
Project: 92184
Buggy source:
@Override public void handleData(T data){
  super.handleData(data);
  for (  ITmfDataRequest<T> request : fRequests) {
    if (data == null) {
      request.handleData(null);
    }
 else {
      if (request instanceof TmfEventRequest<?>) {
        TmfEventRequest<T> req=(TmfEventRequest<T>)request;
        if (!req.isCompleted() && (getNbRead() > request.getIndex())) {
          ITmfTimestamp ts=data.getTimestamp();
          if (req.getRange().contains(ts)) {
            if (req.getDataType().isInstance(data)) {
              req.handleData(data);
            }
          }
        }
      }
 else {
        TmfDataRequest<T> req=(TmfDataRequest<T>)request;
        if (!req.isCompleted()) {
          if (req.getDataType().isInstance(data)) {
            req.handleData(data);
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
@Override public void handleData(T data){
  super.handleData(data);
  for (  ITmfDataRequest<T> request : fRequests) {
    if (data == null) {
      request.handleData(null);
    }
 else {
      if (request instanceof TmfEventRequest<?>) {
        TmfEventRequest<T> req=(TmfEventRequest<T>)request;
        if (!req.isCompleted() && (getIndex() + getNbRead() > request.getIndex())) {
          ITmfTimestamp ts=data.getTimestamp();
          if (req.getRange().contains(ts)) {
            if (req.getDataType().isInstance(data)) {
              req.handleData(data);
            }
          }
        }
      }
 else {
        TmfDataRequest<T> req=(TmfDataRequest<T>)request;
        if (!req.isCompleted()) {
          if (req.getDataType().isInstance(data)) {
            req.handleData(data);
          }
        }
      }
    }
  }
}
Program: 92185
Project: 92185
Buggy source:
/** 
 * Method seek. Seeks to a given timestamp
 * @param timestamp long the timestamp in ns (utc)
 * @return boolean
 */
@Override public boolean seek(final long timestamp){
  boolean ret=false;
  final long offsetTimestamp=timestamp - this.getTrace().getOffset();
  if (offsetTimestamp < 0) {
    ret=super.seek(timestamp);
  }
 else {
    ret=super.seek(offsetTimestamp);
  }
  if (ret) {
    curLocation.setLocation(getCurrentEvent().getTimestampValue());
  }
 else {
    curLocation=NULL_LOCATION;
  }
  return ret;
}

Fixed version (ground truth):
/** 
 * Method seek. Seeks to a given timestamp
 * @param timestamp long the timestamp in ns (utc)
 * @return boolean
 */
@Override public boolean seek(final long timestamp){
  boolean ret=false;
  final long offsetTimestamp=timestamp - this.getTrace().getOffset();
  if (offsetTimestamp < 0) {
    ret=super.seek(0L);
  }
 else {
    ret=super.seek(offsetTimestamp);
  }
  if (ret) {
    curLocation.setLocation(getCurrentEvent().getTimestampValue());
  }
 else {
    curLocation=NULL_LOCATION;
  }
  return ret;
}
Program: 92186
Project: 92186
Buggy source:
@Override public void widgetSelected(SelectionEvent e){
  for (  CTabItem item : tabgroup.getItems()) {
    item.dispose();
  }
  providerId=providerCombo.getText();
  tabs=ProfileLaunchConfigurationTabGroup.getTabGroupProviderFromId(providerId).getProfileTabs();
  for (  ILaunchConfigurationTab tab : tabs) {
    CTabItem item=new CTabItem(tabgroup,SWT.NONE);
    item.setText(tab.getName());
    item.setImage(tab.getImage());
    tab.createControl(tabgroup);
    item.setControl(tab.getControl());
  }
  initializeFrom(initial);
  top.layout();
}

Fixed version (ground truth):
@Override public void widgetSelected(SelectionEvent e){
  for (  CTabItem item : tabgroup.getItems()) {
    item.dispose();
  }
  providerId=providerCombo.getText();
  tabs=ProfileLaunchConfigurationTabGroup.getTabGroupProviderFromId(providerId).getProfileTabs();
  for (  ILaunchConfigurationTab tab : tabs) {
    tab.setLaunchConfigurationDialog(getLaunchConfigurationDialog());
    CTabItem item=new CTabItem(tabgroup,SWT.NONE);
    item.setText(tab.getName());
    item.setImage(tab.getImage());
    tab.createControl(tabgroup);
    item.setControl(tab.getControl());
  }
  initializeFrom(initial);
  top.layout();
}
Program: 92187
Project: 92187
Buggy source:
public void createControl(Composite parent){
  top=new Composite(parent,SWT.NONE);
  setControl(top);
  top.setLayout(new GridLayout(1,true));
  providerCombo=new Combo(top,SWT.READ_ONLY);
  providerCombo.setItems(ProfileLaunchConfigurationTabGroup.getTabGroupIdsForType("String_Node_Str"));
  final CTabFolder tabgroup=new CTabFolder(top,SWT.NONE);
  providerCombo.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      for (      CTabItem item : tabgroup.getItems()) {
        item.dispose();
      }
      providerId=providerCombo.getText();
      tabs=ProfileLaunchConfigurationTabGroup.getTabGroupProviderFromId(providerId).getProfileTabs();
      for (      ILaunchConfigurationTab tab : tabs) {
        CTabItem item=new CTabItem(tabgroup,SWT.NONE);
        item.setText(tab.getName());
        item.setImage(tab.getImage());
        tab.createControl(tabgroup);
        item.setControl(tab.getControl());
      }
      initializeFrom(initial);
      top.layout();
    }
  }
);
}

Fixed version (ground truth):
public void createControl(Composite parent){
  top=new Composite(parent,SWT.NONE);
  setControl(top);
  top.setLayout(new GridLayout(1,true));
  providerCombo=new Combo(top,SWT.READ_ONLY);
  providerCombo.setItems(ProfileLaunchConfigurationTabGroup.getTabGroupIdsForType("String_Node_Str"));
  final CTabFolder tabgroup=new CTabFolder(top,SWT.NONE);
  providerCombo.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      for (      CTabItem item : tabgroup.getItems()) {
        item.dispose();
      }
      providerId=providerCombo.getText();
      tabs=ProfileLaunchConfigurationTabGroup.getTabGroupProviderFromId(providerId).getProfileTabs();
      for (      ILaunchConfigurationTab tab : tabs) {
        tab.setLaunchConfigurationDialog(getLaunchConfigurationDialog());
        CTabItem item=new CTabItem(tabgroup,SWT.NONE);
        item.setText(tab.getName());
        item.setImage(tab.getImage());
        tab.createControl(tabgroup);
        item.setControl(tab.getControl());
      }
      initializeFrom(initial);
      top.layout();
    }
  }
);
}
Program: 92188
Project: 92188
Buggy source:
public void runCoalescedRequest(long startIndex) throws Exception {
  fTrace=setupTrace(DIRECTORY + File.separator + TEST_STREAM);
  TmfSignalManager.register(this);
  TmfTestTriggerSignal signal=new TmfTestTriggerSignal(this,startIndex,false);
  TmfSignalManager.dispatchSignal(signal);
  request1.waitForCompletion();
  request2.waitForCompletion();
  request3.waitForCompletion();
  try {
    assertEquals("String_Node_Str",NB_EVENTS - startIndex,requestedEvents1.size());
    assertTrue("String_Node_Str",request1.isCompleted());
    assertFalse("String_Node_Str",request1.isCancelled());
    assertEquals("String_Node_Str",NB_EVENTS - startIndex,requestedEvents2.size());
    assertTrue("String_Node_Str",request2.isCompleted());
    assertFalse("String_Node_Str",request2.isCancelled());
    assertEquals("String_Node_Str",NB_EVENTS - startIndex,requestedEvents3.size());
    assertTrue("String_Node_Str",request3.isCompleted());
    assertFalse("String_Node_Str",request3.isCancelled());
    for (int i=0; i < NB_EVENTS - startIndex; i++) {
      assertEquals("String_Node_Str",i + 1 + startIndex,requestedEvents1.get(i).getTimestamp().getValue());
      assertEquals("String_Node_Str",i + 1 + startIndex,requestedEvents2.get(i).getTimestamp().getValue());
      assertEquals("String_Node_Str",i + 1 + startIndex,requestedEvents3.get(i).getTimestamp().getValue());
    }
  }
  finally {
    TmfSignalManager.deregister(this);
    fTrace.dispose();
    fTrace=null;
  }
}

Fixed version (ground truth):
public void runCoalescedRequest(long startIndex) throws Exception {
  fTrace=setupTrace(DIRECTORY + File.separator + TEST_STREAM);
  TmfSignalManager.register(this);
  TmfTestTriggerSignal signal=new TmfTestTriggerSignal(this,startIndex,false);
  TmfSignalManager.dispatchSignal(signal);
  request1.waitForCompletion();
  request2.waitForCompletion();
  request3.waitForCompletion();
  try {
    assertEquals("String_Node_Str",NB_EVENTS,requestedEvents1.size());
    assertTrue("String_Node_Str",request1.isCompleted());
    assertFalse("String_Node_Str",request1.isCancelled());
    assertEquals("String_Node_Str",NB_EVENTS,requestedEvents2.size());
    assertTrue("String_Node_Str",request2.isCompleted());
    assertFalse("String_Node_Str",request2.isCancelled());
    assertEquals("String_Node_Str",NB_EVENTS,requestedEvents3.size());
    assertTrue("String_Node_Str",request3.isCompleted());
    assertFalse("String_Node_Str",request3.isCancelled());
    for (int i=0; i < NB_EVENTS; i++) {
      assertEquals("String_Node_Str",i + 1 + request1.getIndex(),requestedEvents1.get(i).getTimestamp().getValue());
      assertEquals("String_Node_Str",i + 1 + request2.getIndex(),requestedEvents2.get(i).getTimestamp().getValue());
      assertEquals("String_Node_Str",i + 1 + request3.getIndex(),requestedEvents3.get(i).getTimestamp().getValue());
    }
  }
  finally {
    TmfSignalManager.deregister(this);
    fTrace.dispose();
    fTrace=null;
  }
}