Program: 94462
Project: 94462
Buggy source:
protected void testReceiveHttp(String url) throws Exception {
  assertNotNull(transferInstance);
  final IFileTransferListener listener=new IFileTransferListener(){
    public void handleTransferEvent(    IFileTransferEvent event){
      if (event instanceof IIncomingFileTransferReceiveResumedEvent) {
        try {
          IIncomingFileTransferReceiveResumedEvent rse=(IIncomingFileTransferReceiveResumedEvent)event;
          session=rse.receive(outs);
        }
 catch (        Exception e) {
          fail(e.getLocalizedMessage());
        }
      }
 else       if (event instanceof IIncomingFileTransferReceiveStartEvent) {
        IIncomingFileTransferReceiveStartEvent rse=(IIncomingFileTransferReceiveStartEvent)event;
        try {
          incomingFile=new File(FILENAME);
          outs=new FileOutputStream(incomingFile);
          session=rse.receive(outs);
          pausable=(IFileTransferPausable)session.getAdapter(IFileTransferPausable.class);
          if (pausable == null)           fail("String_Node_Str");
        }
 catch (        IOException e) {
          fail(e.getLocalizedMessage());
        }
      }
 else       if (event instanceof IIncomingFileTransferReceiveDataEvent) {
        System.out.println("String_Node_Str" + event);
      }
 else       if (event instanceof IIncomingFileTransferReceivePausedEvent) {
        System.out.println("String_Node_Str" + event);
      }
 else       if (event instanceof IIncomingFileTransferReceiveDoneEvent) {
        closeOutputStream();
        System.out.println("String_Node_Str" + event);
synchronized (notify) {
          notify.notify();
        }
      }
    }
  }
;
  transferInstance.sendRetrieveRequest(FileIDFactory.getDefault().createFileID(transferInstance.getRetrieveNamespace(),url),listener,null);
  if (pausable != null) {
    Thread.sleep(1000);
    System.out.println("String_Node_Str" + pausable.pause());
    System.out.println("String_Node_Str" + PAUSE_TIME / 1000 + "String_Node_Str");
    Thread.sleep(PAUSE_TIME);
    final boolean success=pausable.resume();
    System.out.println("String_Node_Str" + success);
    if (!success) {
      System.out.println("String_Node_Str" + session);
      final Exception e=session.getException();
      System.out.println("String_Node_Str" + e);
      if (e != null)       e.printStackTrace();
      System.out.println("String_Node_Str" + session.isDone());
      return;
    }
    System.out.println();
  }
synchronized (notify) {
    notify.wait();
  }
  final Exception e=session.getException();
  if (e != null)   throw e;
}

Fixed version (ground truth):
protected void testReceiveHttp(String url) throws Exception {
  assertNotNull(transferInstance);
  final IFileTransferListener listener=new IFileTransferListener(){
    public void handleTransferEvent(    IFileTransferEvent event){
      if (event instanceof IIncomingFileTransferReceiveResumedEvent) {
        try {
          IIncomingFileTransferReceiveResumedEvent rse=(IIncomingFileTransferReceiveResumedEvent)event;
          session=rse.receive(outs);
        }
 catch (        Exception e) {
          fail(e.getLocalizedMessage());
        }
      }
 else       if (event instanceof IIncomingFileTransferReceiveStartEvent) {
        IIncomingFileTransferReceiveStartEvent rse=(IIncomingFileTransferReceiveStartEvent)event;
        try {
          incomingFile=new File(FILENAME);
          outs=new FileOutputStream(incomingFile);
          session=rse.receive(outs);
          pausable=(IFileTransferPausable)session.getAdapter(IFileTransferPausable.class);
          if (pausable == null)           fail("String_Node_Str");
        }
 catch (        IOException e) {
          fail(e.getLocalizedMessage());
        }
      }
 else       if (event instanceof IIncomingFileTransferReceiveDataEvent) {
        System.out.println("String_Node_Str" + event);
      }
 else       if (event instanceof IIncomingFileTransferReceivePausedEvent) {
        System.out.println("String_Node_Str" + event);
      }
 else       if (event instanceof IIncomingFileTransferReceiveDoneEvent) {
        closeOutputStream();
        System.out.println("String_Node_Str" + event);
synchronized (notify) {
          notify.notify();
        }
      }
    }
  }
;
  transferInstance.sendRetrieveRequest(FileIDFactory.getDefault().createFileID(transferInstance.getRetrieveNamespace(),url),listener,null);
  if (pausable != null) {
    Thread.sleep(500);
    System.out.println("String_Node_Str" + pausable.pause());
    System.out.println("String_Node_Str" + PAUSE_TIME / 1000 + "String_Node_Str");
    Thread.sleep(PAUSE_TIME);
    final boolean success=pausable.resume();
    System.out.println("String_Node_Str" + success);
    if (!success) {
      System.out.println("String_Node_Str" + session);
      final Exception e=session.getException();
      System.out.println("String_Node_Str" + e);
      if (e != null)       e.printStackTrace();
      System.out.println("String_Node_Str" + session.isDone());
      return;
    }
    System.out.println();
  }
synchronized (notify) {
    notify.wait();
  }
  final Exception e=session.getException();
  if (e != null)   throw e;
}