nus-yam/ex-repair huggingface dataset:
Program: 94427
Project: 94427
Buggy source:
protected void handleShowImageStart(final ID id,final String fromUser,final ImageWrapper imageWrapper){
  final Display display=localGUI.getTextControl().getDisplay();
  display.asyncExec(new Runnable(){
    public void run(){
      ShowImageShell showImageShell=(ShowImageShell)shells.get(id);
      if (showImageShell == null) {
        showImageShell=new ShowImageShell(display,id,new DisposeListener(){
          public void widgetDisposed(          DisposeEvent e){
            shells.remove(id);
          }
        }
);
        shells.put(id,showImageShell);
      }
      showImageShell.initialize(Messages.EclipseCollabSharedObject_SCREEN_CAPTURE_FROM + fromUser,imageWrapper);
      showImageShell.open();
    }
  }
);
}

Fixed version (ground truth):
protected void handleShowImageStart(final ID id,final String fromUser,final ImageWrapper imageWrapper){
  final Display display=localGUI.getTextControl().getDisplay();
  display.asyncExec(new Runnable(){
    public void run(){
      ShowImageShell showImageShell=(ShowImageShell)shells.get(id);
      if (showImageShell == null) {
        showImageShell=new ShowImageShell(display,id,new DisposeListener(){
          public void widgetDisposed(          DisposeEvent e){
            shells.remove(id);
          }
        }
);
        shells.put(id,showImageShell);
      }
      showImageShell.initialize(Messages.bind(Messages.EclipseCollabSharedObject_SCREEN_CAPTURE_FROM,fromUser),imageWrapper);
      showImageShell.open();
    }
  }
);
}
Program: 94428
Project: 94428
Buggy source:
private void launchFile(String fileName){
  try {
    Program.launch(fileName);
  }
 catch (  final IllegalArgumentException e1) {
    ClientPlugin.log(MessageLoader.getString("String_Node_Str") + localFile,e1);
    Display.getDefault().asyncExec(new Runnable(){
      public void run(){
        MessageDialog.openInformation(null,MessageLoader.getString(MessageLoader.getString("String_Node_Str")),MessageLoader.getString(NLS.bind(MessageLoader.getString("String_Node_Str"),localFile.getAbsolutePath(),e1.getMessage())));
      }
    }
);
  }
}

Fixed version (ground truth):
private void launchFile(String fileName){
  try {
    Program.launch(fileName);
  }
 catch (  final IllegalArgumentException e1) {
    ClientPlugin.log(MessageLoader.getFormattedString("String_Node_Str",localFile),e1);
    Display.getDefault().asyncExec(new Runnable(){
      public void run(){
        MessageDialog.openInformation(null,MessageLoader.getString(MessageLoader.getString("String_Node_Str")),MessageLoader.getString(NLS.bind(MessageLoader.getString("String_Node_Str"),localFile.getAbsolutePath(),e1.getMessage())));
      }
    }
);
  }
}
Program: 94429
Project: 94429
Buggy source:
public IContainer createContainer(String containerTypeDescriptionName,ID containerID) throws ContainerCreateException {
  return createContainer(getDescriptionByName(containerTypeDescriptionName),new Object[]{containerID});
}

Fixed version (ground truth):
public IContainer createContainer(String containerTypeDescriptionName,ID containerID) throws ContainerCreateException {
  return createContainer(getDescriptionByNameWithException(containerTypeDescriptionName),new Object[]{containerID});
}
Program: 94430
Project: 94430
Buggy source:
protected ID getIDFromArg(Object arg) throws IDCreateException {
  if (arg == null)   throw new IDCreateException(Messages.getString("String_Node_Str"));
  if (arg instanceof ID)   return (ID)arg;
  if (arg instanceof String) {
    String val=(String)arg;
    if (val.equals("String_Node_Str")) {
      return IDFactory.getDefault().createGUID();
    }
    return IDFactory.getDefault().createStringID(val);
  }
 else   if (arg instanceof Integer) {
    return IDFactory.getDefault().createGUID(((Integer)arg).intValue());
  }
 else   return IDFactory.getDefault().createGUID();
}

Fixed version (ground truth):
protected ID getIDFromArg(Object arg) throws IDCreateException {
  if (arg == null)   throw new IDCreateException(Messages.getString("String_Node_Str"));
  String val=null;
  if (arg instanceof StringID)   return (ID)arg;
 else   if (arg instanceof GUID)   val=((GUID)arg).getName();
 else   if (arg instanceof URIID)   val=((URIID)arg).toURI().toString();
 else   if (arg instanceof LongID)   val=((LongID)arg).getName();
  if (arg instanceof String)   val=(String)arg;
  if (arg instanceof Integer)   val=IDFactory.getDefault().createGUID(((Integer)arg).intValue()).getName();
  if (val == null)   val=IDFactory.getDefault().createGUID().getName();
  return IDFactory.getDefault().createStringID(val);
}
Program: 94431
Project: 94431
Buggy source:
protected GenericContainerArgs getClientArgs(String[] argDefaults,Object[] args) throws IDCreateException {
  ID newID=null;
  Integer ka=null;
  if (argDefaults != null && argDefaults.length > 0) {
    if (argDefaults.length == 2) {
      newID=getIDFromArg(argDefaults[0]);
      ka=getIntegerFromArg(argDefaults[1]);
    }
 else     ka=getIntegerFromArg(argDefaults[0]);
  }
  if (args != null && args.length > 0) {
    if (args.length == 2) {
      newID=getIDFromArg(args[0]);
      ka=getIntegerFromArg(args[1]);
    }
 else     ka=getIntegerFromArg(args[0]);
  }
  if (newID == null)   newID=IDFactory.getDefault().createGUID();
  if (ka == null)   ka=new Integer(0);
  return new GenericContainerArgs(newID,ka);
}

Fixed version (ground truth):
protected GenericContainerArgs getClientArgs(String[] argDefaults,Object[] args) throws IDCreateException {
  ID newID=null;
  Integer ka=null;
  if (argDefaults != null && argDefaults.length > 0) {
    if (argDefaults.length == 2) {
      newID=getIDFromArg(argDefaults[0]);
      ka=getIntegerFromArg(argDefaults[1]);
    }
 else     ka=getIntegerFromArg(argDefaults[0]);
  }
  if (args != null && args.length > 0) {
    if (args.length == 2) {
      newID=getIDFromArg(args[0]);
      ka=getIntegerFromArg(args[1]);
    }
 else     ka=getIntegerFromArg(args[0]);
  }
  if (newID == null)   newID=IDFactory.getDefault().createStringID(IDFactory.getDefault().createGUID().getName());
  if (ka == null)   ka=new Integer(0);
  return new GenericContainerArgs(newID,ka);
}
Program: 94432
Project: 94432
Buggy source:
protected GenericContainerArgs getServerArgs(String[] argDefaults,Object[] args) throws IDCreateException {
  ID newID=null;
  Integer ka=null;
  if (argDefaults != null && argDefaults.length > 0) {
    if (argDefaults.length == 2) {
      newID=getIDFromArg(argDefaults[0]);
      ka=getIntegerFromArg(argDefaults[1]);
    }
 else     newID=getIDFromArg(argDefaults[0]);
  }
  if (args != null && args.length > 0) {
    if (args.length == 2) {
      newID=getIDFromArg(args[0]);
      ka=getIntegerFromArg(args[1]);
    }
 else     newID=getIDFromArg(args[0]);
  }
  if (newID == null)   newID=IDFactory.getDefault().createGUID();
  if (ka == null)   ka=new Integer(0);
  return new GenericContainerArgs(newID,ka);
}

Fixed version (ground truth):
protected GenericContainerArgs getServerArgs(String[] argDefaults,Object[] args) throws IDCreateException {
  ID newID=null;
  Integer ka=null;
  if (argDefaults != null && argDefaults.length > 0) {
    if (argDefaults.length == 2) {
      newID=getIDFromArg(argDefaults[0]);
      ka=getIntegerFromArg(argDefaults[1]);
    }
 else     newID=getIDFromArg(argDefaults[0]);
  }
  if (args != null && args.length > 0) {
    if (args.length == 2) {
      newID=getIDFromArg(args[0]);
      ka=getIntegerFromArg(args[1]);
    }
 else     newID=getIDFromArg(args[0]);
  }
  if (newID == null)   newID=IDFactory.getDefault().createStringID(IDFactory.getDefault().createGUID().getName());
  if (ka == null)   ka=new Integer(0);
  return new GenericContainerArgs(newID,ka);
}
Program: 94435
Project: 94435
Buggy source:
protected IStatus getFinalStatus(Throwable exception1){
  if (exception1 == null)   return new Status(IStatus.OK,Activator.getDefault().getBundle().getSymbolicName(),0,Messages.AbstractRetrieveFileTransfer_Status_Transfer_Completed_OK,null);
 else   if (exception1 instanceof UserCancelledException)   return new Status(IStatus.CANCEL,Activator.PLUGIN_ID,FILETRANSFER_ERRORCODE,Messages.AbstractRetrieveFileTransfer_Exception_User_Cancelled,exception1);
 else   return new Status(IStatus.ERROR,Activator.PLUGIN_ID,FILETRANSFER_ERRORCODE,Messages.AbstractRetrieveFileTransfer_Status_Transfer_Exception,exception1);
}

Fixed version (ground truth):
protected IStatus getFinalStatus(Throwable exception1){
  if (exception1 == null)   return new Status(IStatus.OK,Activator.PLUGIN_ID,0,Messages.AbstractRetrieveFileTransfer_Status_Transfer_Completed_OK,null);
 else   if (exception1 instanceof UserCancelledException)   return new Status(IStatus.CANCEL,Activator.PLUGIN_ID,FILETRANSFER_ERRORCODE,Messages.AbstractRetrieveFileTransfer_Exception_User_Cancelled,exception1);
 else   return new Status(IStatus.ERROR,Activator.PLUGIN_ID,FILETRANSFER_ERRORCODE,Messages.AbstractRetrieveFileTransfer_Status_Transfer_Exception,exception1);
}
Program: 94436
Project: 94436
Buggy source:
private IRemoteServiceContainer[] findRemoteServiceContainers(ServiceReference serviceReference,String[] remoteInterfaces,String[] remoteConfigurationType,String[] remoteRequiresIntents){
  Activator activator=Activator.getDefault();
  if (activator == null)   return null;
  IHostContainerFinder[] finders=activator.getHostRemoteServiceContainerFinders();
  if (finders == null) {
    logError("String_Node_Str","String_Node_Str");
    return null;
  }
  Map rsContainers=new HashMap();
  for (int i=0; i < finders.length; i++) {
    IRemoteServiceContainer[] candidates=finders[i].findHostContainers(serviceReference,remoteInterfaces,remoteConfigurationType,remoteRequiresIntents);
    if (candidates != null) {
      for (int j=0; j < candidates.length; j++) {
        ID containerID=candidates[i].getContainer().getID();
        if (containerID != null)         rsContainers.put(containerID,candidates[i]);
      }
    }
  }
  List results=new ArrayList();
  for (Iterator i=rsContainers.keySet().iterator(); i.hasNext(); )   results.add(rsContainers.get(i.next()));
  return (IRemoteServiceContainer[])results.toArray(new IRemoteServiceContainer[]{});
}

Fixed version (ground truth):
private IRemoteServiceContainer[] findRemoteServiceContainers(ServiceReference serviceReference,String[] remoteInterfaces,String[] remoteConfigurationType,String[] remoteRequiresIntents){
  Activator activator=Activator.getDefault();
  if (activator == null)   return null;
  IHostContainerFinder[] finders=activator.getHostRemoteServiceContainerFinders();
  if (finders == null) {
    logError("String_Node_Str","String_Node_Str");
    return null;
  }
  Map rsContainers=new HashMap();
  for (int i=0; i < finders.length; i++) {
    IRemoteServiceContainer[] candidates=finders[i].findHostContainers(serviceReference,remoteInterfaces,remoteConfigurationType,remoteRequiresIntents);
    if (candidates != null) {
      for (int j=0; j < candidates.length; j++) {
        ID containerID=candidates[j].getContainer().getID();
        if (containerID != null)         rsContainers.put(containerID,candidates[j]);
      }
    }
  }
  List results=new ArrayList();
  for (Iterator i=rsContainers.keySet().iterator(); i.hasNext(); )   results.add(rsContainers.get(i.next()));
  return (IRemoteServiceContainer[])results.toArray(new IRemoteServiceContainer[]{});
}
Program: 94437
Project: 94437
Buggy source:
protected Collection findRemoteContainersSatisfyingRequiredIntents(String[] remoteRequiresIntents){
  List results=new ArrayList();
  IContainer[] containers=Activator.getDefault().getContainerManager().getAllContainers();
  if (containers == null || containers.length == 0)   return null;
  for (int i=0; i < containers.length; i++) {
    IRemoteServiceContainerAdapter adapter=(IRemoteServiceContainerAdapter)containers[i].getAdapter(IRemoteServiceContainerAdapter.class);
    if (adapter == null)     continue;
    ContainerTypeDescription description=Activator.getDefault().getContainerManager().getContainerTypeDescription(containers[i].getID());
    if (description == null)     continue;
    List supportedIntents=Arrays.asList(description.getSupportedIntents());
    boolean hasIntents=true;
    if (remoteRequiresIntents != null) {
      for (int j=0; j < remoteRequiresIntents.length; j++) {
        if (!supportedIntents.contains(remoteRequiresIntents[j]))         hasIntents=false;
      }
    }
    if (hasIntents) {
      trace("String_Node_Str","String_Node_Str" + containers[i].getID());
      results.add(new RemoteServiceContainer(containers[i],adapter));
    }
 else {
      trace("String_Node_Str","String_Node_Str" + containers[i].getID() + "String_Node_Str"+ supportedIntents);
    }
  }
  return results;
}

Fixed version (ground truth):
protected Collection findRemoteContainersSatisfyingRequiredIntents(String[] remoteRequiresIntents){
  List results=new ArrayList();
  IContainer[] containers=Activator.getDefault().getContainerManager().getAllContainers();
  if (containers == null || containers.length == 0)   return results;
  for (int i=0; i < containers.length; i++) {
    IRemoteServiceContainerAdapter adapter=(IRemoteServiceContainerAdapter)containers[i].getAdapter(IRemoteServiceContainerAdapter.class);
    if (adapter == null)     continue;
    ContainerTypeDescription description=Activator.getDefault().getContainerManager().getContainerTypeDescription(containers[i].getID());
    if (description == null)     continue;
    List supportedIntents=Arrays.asList(description.getSupportedIntents());
    boolean hasIntents=true;
    if (remoteRequiresIntents != null) {
      for (int j=0; j < remoteRequiresIntents.length; j++) {
        if (!supportedIntents.contains(remoteRequiresIntents[j]))         hasIntents=false;
      }
    }
    if (hasIntents) {
      trace("String_Node_Str","String_Node_Str" + containers[i].getID());
      results.add(new RemoteServiceContainer(containers[i],adapter));
    }
 else {
      trace("String_Node_Str","String_Node_Str" + containers[i].getID() + "String_Node_Str"+ supportedIntents);
    }
  }
  return results;
}
Program: 94441
Project: 94441
Buggy source:
public String getUsernameAtHost(){
  if (getUsername().indexOf(USER_HOST_DELIMITER) != -1)   return getUsername();
 else   return getUsername() + USER_HOST_DELIMITER + getHostname()+ ((getPort() == -1) ? "String_Node_Str" : "String_Node_Str" + getPort());
}

Fixed version (ground truth):
public String getUsernameAtHost(){
  String username=getUsername();
  String hostname=getHostname();
  int semiColonIdx=hostname.indexOf(';');
  if (semiColonIdx != -1) {
    hostname=hostname.substring(0,semiColonIdx);
  }
  return username + USER_HOST_DELIMITER + hostname+ ((getPort() == -1) ? "String_Node_Str" : "String_Node_Str" + getPort());
}
Program: 94443
Project: 94443
Buggy source:
protected void openStreams() throws IncomingFileTransferException {
  int code=-1;
  try {
    setupAuthentication();
    connect();
    setRequestHeaderValues();
    setCompressionRequestHeader();
    setInputStream(getDecompressedStream());
    code=getResponseCode();
    if (code == HttpURLConnection.HTTP_PARTIAL || code == HttpURLConnection.HTTP_OK) {
      getResponseHeaderValues();
      fireReceiveStartEvent();
    }
 else     if (code == HttpURLConnection.HTTP_NOT_FOUND) {
      throw new IncomingFileTransferException(NLS.bind("String_Node_Str",getRemoteFileURL().toString()),code);
    }
 else     if (code == HttpURLConnection.HTTP_UNAUTHORIZED) {
      throw new IncomingFileTransferException("String_Node_Str",code);
    }
 else     if (code == HttpURLConnection.HTTP_FORBIDDEN) {
      throw new IncomingFileTransferException("String_Node_Str",code);
    }
 else     if (code == HttpURLConnection.HTTP_PROXY_AUTH) {
      throw new IncomingFileTransferException("String_Node_Str",code);
    }
 else {
      throw new IncomingFileTransferException(NLS.bind("String_Node_Str",new Integer(code)),code);
    }
  }
 catch (  final Exception e) {
    IncomingFileTransferException except=(e instanceof IncomingFileTransferException) ? (IncomingFileTransferException)e : new IncomingFileTransferException(NLS.bind(Messages.UrlConnectionRetrieveFileTransfer_EXCEPTION_COULD_NOT_CONNECT,getRemoteFileURL().toString()),e,code);
    hardClose();
    throw except;
  }
}

Fixed version (ground truth):
protected void openStreams() throws IncomingFileTransferException {
  int code=-1;
  try {
    setupAuthentication();
    connect();
    setRequestHeaderValues();
    setCompressionRequestHeader();
    setInputStream(getDecompressedStream());
    code=getResponseCode();
    if (isHTTP()) {
      if (code == HttpURLConnection.HTTP_PARTIAL || code == HttpURLConnection.HTTP_OK) {
        fireReceiveStartEvent();
      }
 else       if (code == HttpURLConnection.HTTP_NOT_FOUND) {
        throw new IncomingFileTransferException(NLS.bind("String_Node_Str",getRemoteFileURL().toString()),code);
      }
 else       if (code == HttpURLConnection.HTTP_UNAUTHORIZED) {
        throw new IncomingFileTransferException("String_Node_Str",code);
      }
 else       if (code == HttpURLConnection.HTTP_FORBIDDEN) {
        throw new IncomingFileTransferException("String_Node_Str",code);
      }
 else       if (code == HttpURLConnection.HTTP_PROXY_AUTH) {
        throw new IncomingFileTransferException("String_Node_Str",code);
      }
 else {
        throw new IncomingFileTransferException(NLS.bind("String_Node_Str",new Integer(code)),code);
      }
    }
 else {
      fireReceiveStartEvent();
    }
  }
 catch (  final Exception e) {
    IncomingFileTransferException except=(e instanceof IncomingFileTransferException) ? (IncomingFileTransferException)e : new IncomingFileTransferException(NLS.bind(Messages.UrlConnectionRetrieveFileTransfer_EXCEPTION_COULD_NOT_CONNECT,getRemoteFileURL().toString()),e,code);
    hardClose();
    throw except;
  }
}
Program: 94444
Project: 94444
Buggy source:
public List getNamespaces(){
  Trace.entering(Activator.PLUGIN_ID,IdentityDebugOptions.METHODS_ENTERING,IDFactory.class,"String_Node_Str");
  return new ArrayList(namespaces.values());
}

Fixed version (ground truth):
public List getNamespaces(){
  Trace.entering(Activator.PLUGIN_ID,IdentityDebugOptions.METHODS_ENTERING,IDFactory.class,"String_Node_Str");
  initialize();
  return new ArrayList(namespaces.values());
}
Program: 94445
Project: 94445
Buggy source:
protected final static boolean containsNamespace0(Namespace n){
  if (n == null)   return false;
  return namespaces.containsKey(n.getName());
}

Fixed version (ground truth):
public final static boolean containsNamespace0(Namespace n){
  if (n == null)   return false;
  return namespaces.containsKey(n.getName());
}
Program: 94446
Project: 94446
Buggy source:
public Namespace removeNamespace(Namespace n) throws SecurityException {
  Trace.entering(Activator.PLUGIN_ID,IdentityDebugOptions.METHODS_ENTERING,IDFactory.class,"String_Node_Str",n);
  if (n == null)   return null;
  checkPermission(new NamespacePermission(n.toString(),NamespacePermission.REMOVE_NAMESPACE));
  Namespace result=removeNamespace0(n);
  Trace.exiting(Activator.PLUGIN_ID,IdentityDebugOptions.METHODS_EXITING,IDFactory.class,"String_Node_Str",result);
  return result;
}

Fixed version (ground truth):
public Namespace removeNamespace(Namespace n) throws SecurityException {
  if (n == null)   return null;
  Trace.entering(Activator.PLUGIN_ID,IdentityDebugOptions.METHODS_ENTERING,IDFactory.class,"String_Node_Str",n);
  checkPermission(new NamespacePermission(n.toString(),NamespacePermission.REMOVE_NAMESPACE));
  initialize();
  Namespace result=removeNamespace0(n);
  Trace.exiting(Activator.PLUGIN_ID,IdentityDebugOptions.METHODS_EXITING,IDFactory.class,"String_Node_Str",result);
  return result;
}
Program: 94447
Project: 94447
Buggy source:
public static IIDFactory getDefault(){
  return instance;
}

Fixed version (ground truth):
public synchronized static IIDFactory getDefault(){
  return instance;
}
Program: 94448
Project: 94448
Buggy source:
public boolean containsNamespace(Namespace namespace) throws SecurityException {
  Trace.entering(Activator.PLUGIN_ID,IdentityDebugOptions.METHODS_ENTERING,IDFactory.class,"String_Node_Str",namespace);
  if (namespace == null)   return false;
  checkPermission(new NamespacePermission(namespace.toString(),NamespacePermission.CONTAINS_NAMESPACE));
  boolean result=containsNamespace0(namespace);
  Trace.exiting(Activator.PLUGIN_ID,IdentityDebugOptions.METHODS_EXITING,IDFactory.class,"String_Node_Str",new Boolean(result));
  return result;
}

Fixed version (ground truth):
public boolean containsNamespace(Namespace namespace) throws SecurityException {
  if (namespace == null)   return false;
  Trace.entering(Activator.PLUGIN_ID,IdentityDebugOptions.METHODS_ENTERING,IDFactory.class,"String_Node_Str",namespace);
  checkPermission(new NamespacePermission(namespace.toString(),NamespacePermission.CONTAINS_NAMESPACE));
  initialize();
  boolean result=containsNamespace0(namespace);
  Trace.exiting(Activator.PLUGIN_ID,IdentityDebugOptions.METHODS_EXITING,IDFactory.class,"String_Node_Str",new Boolean(result));
  return result;
}
Program: 94449
Project: 94449
Buggy source:
protected final static Namespace addNamespace0(Namespace namespace){
  if (namespace == null)   return null;
  return (Namespace)namespaces.put(namespace.getName(),namespace);
}

Fixed version (ground truth):
public final static Namespace addNamespace0(Namespace namespace){
  if (namespace == null)   return null;
  return (Namespace)namespaces.put(namespace.getName(),namespace);
}
Program: 94450
Project: 94450
Buggy source:
public Namespace addNamespace(Namespace namespace) throws SecurityException {
  if (namespace == null)   return null;
  Trace.entering(Activator.PLUGIN_ID,IdentityDebugOptions.METHODS_ENTERING,IDFactory.class,"String_Node_Str",namespace);
  checkPermission(new NamespacePermission(namespace.toString(),NamespacePermission.ADD_NAMESPACE));
  Namespace result=addNamespace0(namespace);
  Trace.exiting(Activator.PLUGIN_ID,IdentityDebugOptions.METHODS_EXITING,IDFactory.class,"String_Node_Str",result);
  return result;
}

Fixed version (ground truth):
public Namespace addNamespace(Namespace namespace) throws SecurityException {
  if (namespace == null)   return null;
  Trace.entering(Activator.PLUGIN_ID,IdentityDebugOptions.METHODS_ENTERING,IDFactory.class,"String_Node_Str",namespace);
  checkPermission(new NamespacePermission(namespace.toString(),NamespacePermission.ADD_NAMESPACE));
  initialize();
  Namespace result=addNamespace0(namespace);
  Trace.exiting(Activator.PLUGIN_ID,IdentityDebugOptions.METHODS_EXITING,IDFactory.class,"String_Node_Str",result);
  return result;
}
Program: 94451
Project: 94451
Buggy source:
public Namespace getNamespaceByName(String name) throws SecurityException {
  Trace.entering(Activator.PLUGIN_ID,IdentityDebugOptions.METHODS_ENTERING,IDFactory.class,"String_Node_Str",name);
  Namespace result=getNamespace0(name);
  Trace.exiting(Activator.PLUGIN_ID,IdentityDebugOptions.METHODS_EXITING,IDFactory.class,"String_Node_Str",result);
  return result;
}

Fixed version (ground truth):
public Namespace getNamespaceByName(String name) throws SecurityException {
  Trace.entering(Activator.PLUGIN_ID,IdentityDebugOptions.METHODS_ENTERING,IDFactory.class,"String_Node_Str",name);
  initialize();
  Namespace result=getNamespace0(name);
  Trace.exiting(Activator.PLUGIN_ID,IdentityDebugOptions.METHODS_EXITING,IDFactory.class,"String_Node_Str",result);
  return result;
}
Program: 94452
Project: 94452
Buggy source:
public Namespace getNamespace(Namespace namespace) throws SecurityException {
  Trace.entering(Activator.PLUGIN_ID,IdentityDebugOptions.METHODS_ENTERING,IDFactory.class,"String_Node_Str",namespace);
  if (namespace == null)   return null;
  checkPermission(new NamespacePermission(namespace.toString(),NamespacePermission.GET_NAMESPACE));
  Namespace result=getNamespace0(namespace);
  Trace.exiting(Activator.PLUGIN_ID,IdentityDebugOptions.METHODS_EXITING,IDFactory.class,"String_Node_Str",result);
  return result;
}

Fixed version (ground truth):
public Namespace getNamespace(Namespace namespace) throws SecurityException {
  if (namespace == null)   return null;
  Trace.entering(Activator.PLUGIN_ID,IdentityDebugOptions.METHODS_ENTERING,IDFactory.class,"String_Node_Str",namespace);
  checkPermission(new NamespacePermission(namespace.toString(),NamespacePermission.GET_NAMESPACE));
  initialize();
  Namespace result=getNamespace0(namespace);
  Trace.exiting(Activator.PLUGIN_ID,IdentityDebugOptions.METHODS_EXITING,IDFactory.class,"String_Node_Str",result);
  return result;
}
Program: 94453
Project: 94453
Buggy source:
public void log(IStatus status){
  final LogService logService=getLogService();
  if (logService != null) {
    logService.log(LogHelper.getLogCode(status),LogHelper.getLogMessage(status),status.getException());
  }
}

Fixed version (ground truth):
public void log(IStatus status){
  if (this.context == null)   return;
  final LogService logService=getLogService();
  if (logService != null) {
    logService.log(LogHelper.getLogCode(status),LogHelper.getLogMessage(status),status.getException());
  }
}
Program: 94454
Project: 94454
Buggy source:
public void stop(BundleContext ctxt) throws Exception {
  plugin=null;
  this.context=null;
  final IExtensionRegistry registry=getExtensionRegistry();
  if (registry != null) {
    registry.removeRegistryChangeListener(registryChangeListener);
  }
  if (urlConnectionModifier != null) {
    urlConnectionModifier.dispose();
    urlConnectionModifier=null;
  }
  if (extensionRegistryTracker != null) {
    extensionRegistryTracker.close();
    extensionRegistryTracker=null;
  }
  if (fileTransferServiceRegistration != null) {
    fileTransferServiceRegistration.unregister();
    fileTransferServiceRegistration=null;
  }
  if (adapterManagerTracker != null) {
    adapterManagerTracker.close();
    adapterManagerTracker=null;
  }
  if (proxyServiceTracker != null) {
    proxyServiceTracker.close();
    proxyServiceTracker=null;
  }
  this.context=null;
  if (this.retrieveFileTransferProtocolMap != null) {
    this.retrieveFileTransferProtocolMap.clear();
    this.retrieveFileTransferProtocolMap=null;
  }
  if (this.sendFileTransferProtocolMap != null) {
    this.sendFileTransferProtocolMap.clear();
    this.sendFileTransferProtocolMap=null;
  }
  if (this.browseFileTransferProtocolMap != null) {
    this.browseFileTransferProtocolMap.clear();
    this.browseFileTransferProtocolMap=null;
  }
}

Fixed version (ground truth):
public void stop(BundleContext ctxt) throws Exception {
  final IExtensionRegistry registry=getExtensionRegistry();
  if (registry != null) {
    registry.removeRegistryChangeListener(registryChangeListener);
  }
  if (urlConnectionModifier != null) {
    urlConnectionModifier.dispose();
    urlConnectionModifier=null;
  }
  if (extensionRegistryTracker != null) {
    extensionRegistryTracker.close();
    extensionRegistryTracker=null;
  }
  if (fileTransferServiceRegistration != null) {
    fileTransferServiceRegistration.unregister();
    fileTransferServiceRegistration=null;
  }
  if (adapterManagerTracker != null) {
    adapterManagerTracker.close();
    adapterManagerTracker=null;
  }
  if (proxyServiceTracker != null) {
    proxyServiceTracker.close();
    proxyServiceTracker=null;
  }
  if (this.retrieveFileTransferProtocolMap != null) {
    this.retrieveFileTransferProtocolMap.clear();
    this.retrieveFileTransferProtocolMap=null;
  }
  if (this.sendFileTransferProtocolMap != null) {
    this.sendFileTransferProtocolMap.clear();
    this.sendFileTransferProtocolMap=null;
  }
  if (this.browseFileTransferProtocolMap != null) {
    this.browseFileTransferProtocolMap.clear();
    this.browseFileTransferProtocolMap=null;
  }
synchronized (this) {
    this.context=null;
  }
  plugin=null;
}
Program: 94455
Project: 94455
Buggy source:
protected synchronized LogService getLogService(){
  if (this.context == null)   return null;
  if (logServiceTracker == null) {
    logServiceTracker=new ServiceTracker(this.context,LogService.class.getName(),null);
    logServiceTracker.open();
  }
  return (LogService)logServiceTracker.getService();
}

Fixed version (ground truth):
protected LogService getLogService(){
synchronized (this) {
    if (this.context == null)     return null;
    if (logServiceTracker == null) {
      logServiceTracker=new ServiceTracker(this.context,LogService.class.getName(),null);
      logServiceTracker.open();
    }
    return (LogService)logServiceTracker.getService();
  }
}
Program: 94456
Project: 94456
Buggy source:
protected LogService getLogService(){
  if (logServiceTracker == null) {
    logServiceTracker=new ServiceTracker(this.context,LogService.class.getName(),null);
    logServiceTracker.open();
  }
  return (LogService)logServiceTracker.getService();
}

Fixed version (ground truth):
protected synchronized LogService getLogService(){
  if (this.context == null)   return null;
  if (logServiceTracker == null) {
    logServiceTracker=new ServiceTracker(this.context,LogService.class.getName(),null);
    logServiceTracker.open();
  }
  return (LogService)logServiceTracker.getService();
}
Program: 94457
Project: 94457
Buggy source:
public boolean removeChannel(ID channelID){
  if (channelID == null || channelID.equals(getID()))   return false;
  ISharedObject o=getContext().getSharedObjectManager().removeSharedObject(channelID);
  return (o != null);
}

Fixed version (ground truth):
public boolean removeChannel(ID channelID){
  if (channelID == null || channelID.equals(getID()))   return false;
  ISharedObject o=getContext().getSharedObjectManager().removeSharedObject(channelID);
  if (o != null && o instanceof IChannel) {
    ((IChannel)o).dispose();
    return true;
  }
  return false;
}
Program: 94458
Project: 94458
Buggy source:
/** 
 * Returns the last modified time for this file, or   {@link #NONE}if the file does not exist or the last modified time could not be computed. <p> The time is represented as the number of Universal Time (UT)  milliseconds since the epoch (00:00:00 GMT, January 1, 1970). </p>
 * @return the last modified time for this file, or {@link #NONE}
 */
public long getLastModified();

Fixed version (ground truth):
/** 
 * Returns the last modified time for this file, or   {@link #NO_LAST_MODIFIED }if the file does not exist or the last modified time could not be computed. <p> The time is represented as the number of Universal Time (UT)  milliseconds since the epoch (00:00:00 GMT, January 1, 1970). </p>
 * @return the last modified time for this file, or {@link #NO_LAST_MODIFIED } if file does not exist or last modified not known or could not be computed.
 */
public long getLastModified();
Program: 94459
Project: 94459
Buggy source:
/** 
 * Returns the length of this file, or   {@link #NONE}if the file does not exist, is a directory, or the length could not be computed.
 * @return the length of this file, or {@link #NONE}
 */
public long getLength();

Fixed version (ground truth):
/** 
 * Returns the length of this file, or   {@link #NO_LENGTH}if the file does not exist, is a directory, or the length could not be computed.
 * @return the length of this file, or {@link #NO_LENGTH}
 */
public long getLength();
Program: 94460
Project: 94460
Buggy source:
private Compression getCompressionResponseHeader(){
  String encoding=urlConnection.getContentEncoding();
  if (null == encoding) {
    return Compression.NONE;
  }
 else   if (encoding.equalsIgnoreCase(CONTENT_ENCODING_GZIP)) {
    return Compression.GZIP;
  }
  return Compression.NONE;
}

Fixed version (ground truth):
private Compression getCompressionResponseHeader(){
  String encoding=urlConnection.getContentEncoding();
  if (null == encoding) {
    return Compression.NONE;
  }
 else   if (encoding.equalsIgnoreCase(CONTENT_ENCODING_GZIP) && !targetHasGzSuffix(remoteFileName)) {
    return Compression.GZIP;
  }
  return Compression.NONE;
}
Program: 94461
Project: 94461
Buggy source:
private boolean includeRCSAForDescription(IContainer container,IRemoteServiceContainerAdapter adapter,ID endpointID,ServiceEndpointDescription description){
  if (endpointID.equals(container.getID()))   return false;
  String connectNamespaceName=(String)description.getProperty(Constants.SERVICE_CONNECT_ID_NAMESPACE);
  if (connectNamespaceName != null) {
    Namespace namespace=container.getConnectNamespace();
    if (namespace != null && namespace.getName().equals(connectNamespaceName))     return true;
  }
  return true;
}

Fixed version (ground truth):
private boolean includeRCSAForDescription(IContainer container,IRemoteServiceContainerAdapter adapter,ID endpointID,ServiceEndpointDescription description){
  if (endpointID.equals(container.getID()))   return false;
  String connectNamespaceName=(String)description.getProperty(ECFServicePublication.PROP_KEY_ENDPOINT_CONTAINERID_NAMESPACE);
  if (connectNamespaceName != null) {
    Namespace namespace=container.getConnectNamespace();
    if (namespace != null && namespace.getName().equals(connectNamespaceName))     return true;
  }
  return false;
}
Program: 94463
Project: 94463
Buggy source:
public void testReceiveGzipWithGZFile() throws Exception {
  File f=File.createTempFile("String_Node_Str","String_Node_Str");
  FileOutputStream fos=new FileOutputStream(f);
  System.out.println(f);
  ECFTransport.getInstance().download("String_Node_Str",fos,new NullProgressMonitor());
  fos.close();
  if (f != null) {
    System.out.println(f.length());
    assertTrue("String_Node_Str",f.length() < 50000);
  }
}

Fixed version (ground truth):
public void testReceiveGzipWithGZFile() throws Exception {
  File f=File.createTempFile("String_Node_Str","String_Node_Str");
  FileOutputStream fos=new FileOutputStream(f);
  System.out.println(f);
  ECFTransport.getInstance().download(HTTP_RETRIEVE_GZFILE,fos,new NullProgressMonitor());
  fos.close();
  if (f != null) {
    System.out.println(f.length());
    assertTrue("String_Node_Str",f.length() < 50000);
  }
}
Program: 94464
Project: 94464
Buggy source:
protected int getClientCount(){
  return 2;
}

Fixed version (ground truth):
protected int getClientCount(){
  return 1;
}
Program: 94465
Project: 94465
Buggy source:
public void testAddSharedObject() throws Exception {
  final IContainer client0Container=getClient(0);
  assertNotNull(client0Container);
  ISharedObjectContainer socontainer=(ISharedObjectContainer)client0Container.getAdapter(ISharedObjectContainer.class);
  final ISharedObjectManager manager=socontainer.getSharedObjectManager();
  assertNotNull(manager);
  final ID id=manager.addSharedObject(IDFactory.getDefault().createStringID("String_Node_Str"),new TestSharedObject(TEST_USERNAME0),null);
  assertNotNull(id);
  final ISharedObject sharedObject=manager.getSharedObject(id);
  assertNotNull(sharedObject);
  sleep(3000);
  for (int clientIndex=0; clientIndex < getClientCount(); clientIndex++) {
    socontainer=(ISharedObjectContainer)getClient(clientIndex).getAdapter(ISharedObjectContainer.class);
    ISharedObject sharedObj=socontainer.getSharedObjectManager().getSharedObject(IDFactory.getDefault().createStringID("String_Node_Str"));
    if (sharedObj != null) {
      System.out.println("String_Node_Str" + sharedObj.toString());
    }
  }
}

Fixed version (ground truth):
public void testAddSharedObject() throws Exception {
  final IContainer client0Container=getClient(0);
  assertNotNull(client0Container);
  ISharedObjectContainer socontainer=(ISharedObjectContainer)client0Container.getAdapter(ISharedObjectContainer.class);
  final ISharedObjectManager manager=socontainer.getSharedObjectManager();
  assertNotNull(manager);
  final ID id=manager.addSharedObject(IDFactory.getDefault().createStringID("String_Node_Str"),new TestSharedObject(TEST_USERNAME0),null);
  assertNotNull(id);
  final ISharedObject sharedObject=manager.getSharedObject(id);
  assertNotNull(sharedObject);
  sleep(3000);
}
Program: 94466
Project: 94466
Buggy source:
public void testAddTwoSharedObjects() throws Exception {
  final IContainer client0Container=getClient(0);
  assertNotNull(client0Container);
  ISharedObjectContainer socontainer=(ISharedObjectContainer)client0Container.getAdapter(ISharedObjectContainer.class);
  final ISharedObjectManager manager=socontainer.getSharedObjectManager();
  assertNotNull(manager);
  final ID id0=manager.addSharedObject(IDFactory.getDefault().createStringID("String_Node_Str"),new TestSharedObject(TEST_USERNAME0),null);
  assertNotNull(id0);
  final ID id1=manager.addSharedObject(IDFactory.getDefault().createStringID("String_Node_Str"),new TestSharedObject(TEST_USERNAME1),null);
  assertNotNull(id1);
  final ISharedObject sharedObject0=manager.getSharedObject(id0);
  assertNotNull(sharedObject0);
  final ISharedObject sharedObject1=manager.getSharedObject(id1);
  assertNotNull(sharedObject1);
  sleep(3000);
  for (int clientIndex=0; clientIndex < getClientCount(); clientIndex++) {
    socontainer=(ISharedObjectContainer)getClient(clientIndex).getAdapter(ISharedObjectContainer.class);
    ISharedObject sharedObj=socontainer.getSharedObjectManager().getSharedObject(IDFactory.getDefault().createStringID("String_Node_Str"));
    if (sharedObj != null) {
      System.out.println("String_Node_Str" + sharedObj.toString());
    }
    sharedObj=socontainer.getSharedObjectManager().getSharedObject(IDFactory.getDefault().createStringID("String_Node_Str"));
    if (sharedObj != null) {
      System.out.println("String_Node_Str" + sharedObj.toString());
    }
  }
}

Fixed version (ground truth):
public void testAddTwoSharedObjects() throws Exception {
  final IContainer client0Container=getClient(0);
  assertNotNull(client0Container);
  ISharedObjectContainer socontainer=(ISharedObjectContainer)client0Container.getAdapter(ISharedObjectContainer.class);
  final ISharedObjectManager manager=socontainer.getSharedObjectManager();
  assertNotNull(manager);
  final ID id0=manager.addSharedObject(IDFactory.getDefault().createStringID("String_Node_Str"),new TestSharedObject(TEST_USERNAME0),null);
  assertNotNull(id0);
  final ID id1=manager.addSharedObject(IDFactory.getDefault().createStringID("String_Node_Str"),new TestSharedObject(TEST_USERNAME1),null);
  assertNotNull(id1);
  final ISharedObject sharedObject0=manager.getSharedObject(id0);
  assertNotNull(sharedObject0);
  final ISharedObject sharedObject1=manager.getSharedObject(id1);
  assertNotNull(sharedObject1);
  sleep(3000);
}
Program: 94467
Project: 94467
Buggy source:
public boolean processEvent(Event event){
  if (event instanceof ISharedObjectActivatedEvent) {
    if (isPrimary() && isConnected()) {
      TestSharedObject.this.replicateToRemoteContainers(null);
    }
  }
  return false;
}

Fixed version (ground truth):
public boolean processEvent(Event event){
  if (event instanceof ISharedObjectActivatedEvent) {
    ISharedObjectActivatedEvent ae=(ISharedObjectActivatedEvent)event;
    if (ae.getActivatedID().equals(getID()) && isConnected()) {
      TestSharedObject.this.replicateToRemoteContainers(null);
    }
  }
  return false;
}
Program: 94468
Project: 94468
Buggy source:
protected void initialize() throws SharedObjectInitException {
  super.initialize();
  if (isPrimary()) {
    addEventProcessor(new IEventProcessor(){
      public boolean processEvent(      Event event){
        if (event instanceof ISharedObjectActivatedEvent) {
          if (isPrimary() && isConnected()) {
            TestSharedObject.this.replicateToRemoteContainers(null);
          }
        }
        return false;
      }
    }
);
    System.out.println("String_Node_Str" + getContext().getLocalContainerID() + "String_Node_Str"+ name);
  }
 else {
    name=(String)getConfig().getProperties().get(NAME_PROPERTY);
    System.out.println("String_Node_Str" + getContext().getLocalContainerID() + "String_Node_Str"+ name);
  }
}

Fixed version (ground truth):
protected void initialize() throws SharedObjectInitException {
  super.initialize();
  if (isPrimary()) {
    addEventProcessor(new IEventProcessor(){
      public boolean processEvent(      Event event){
        if (event instanceof ISharedObjectActivatedEvent) {
          ISharedObjectActivatedEvent ae=(ISharedObjectActivatedEvent)event;
          if (ae.getActivatedID().equals(getID()) && isConnected()) {
            TestSharedObject.this.replicateToRemoteContainers(null);
          }
        }
        return false;
      }
    }
);
    System.out.println("String_Node_Str" + getContext().getLocalContainerID() + "String_Node_Str"+ name);
  }
 else {
    name=(String)getConfig().getProperties().get(NAME_PROPERTY);
    System.out.println("String_Node_Str" + getContext().getLocalContainerID() + "String_Node_Str"+ name);
  }
}
Program: 94469
Project: 94469
Buggy source:
public String getTargetRelativePath(){
  return targetPath;
}

Fixed version (ground truth):
public String getTargetRelativePath(){
  return targetRelativePath;
}
Program: 94470
Project: 94470
Buggy source:
public void setTargetHostByURL(String url){
  this.targetURL=url;
  this.targetPath=getPathFromURL(targetURL);
  String host=getHostFromURL(targetURL);
  int port=getPortFromURL(targetURL);
  if (HttpClientRetrieveFileTransfer.urlUsesHttps(targetURL)) {
    ISSLSocketFactoryModifier sslSocketFactoryModifier=Activator.getDefault().getSSLSocketFactoryModifier();
    if (sslSocketFactoryModifier == null) {
      sslSocketFactoryModifier=new HttpClientDefaultSSLSocketFactoryModifier();
    }
    SecureProtocolSocketFactory psf=new ECFHttpClientSecureProtocolSocketFactory(sslSocketFactoryModifier,source,socketListener);
    Protocol sslProtocol=new Protocol(HttpClientRetrieveFileTransfer.HTTPS,(ProtocolSocketFactory)psf,port);
    Trace.trace(Activator.PLUGIN_ID,"String_Node_Str" + host + "String_Node_Str"+ port);
    hostConfiguration.setHost(host,port,sslProtocol);
  }
 else {
    ProtocolSocketFactory psf=new ECFHttpClientProtocolSocketFactory(SocketFactory.getDefault(),source,socketListener);
    Protocol protocol=new Protocol(HttpClientRetrieveFileTransfer.HTTP,psf,port);
    Trace.trace(Activator.PLUGIN_ID,"String_Node_Str" + host + "String_Node_Str"+ port);
    hostConfiguration.setHost(host,port,protocol);
  }
}

Fixed version (ground truth):
public void setTargetHostByURL(String url){
  this.targetURL=url;
  this.targetRelativePath=getTargetRelativePathFromURL(targetURL);
  String host=getHostFromURL(targetURL);
  int port=getPortFromURL(targetURL);
  if (HttpClientRetrieveFileTransfer.urlUsesHttps(targetURL)) {
    ISSLSocketFactoryModifier sslSocketFactoryModifier=Activator.getDefault().getSSLSocketFactoryModifier();
    if (sslSocketFactoryModifier == null) {
      sslSocketFactoryModifier=new HttpClientDefaultSSLSocketFactoryModifier();
    }
    SecureProtocolSocketFactory psf=new ECFHttpClientSecureProtocolSocketFactory(sslSocketFactoryModifier,source,socketListener);
    Protocol sslProtocol=new Protocol(HttpClientRetrieveFileTransfer.HTTPS,(ProtocolSocketFactory)psf,port);
    Trace.trace(Activator.PLUGIN_ID,"String_Node_Str" + host + "String_Node_Str"+ port);
    hostConfiguration.setHost(host,port,sslProtocol);
  }
 else {
    ProtocolSocketFactory psf=new ECFHttpClientProtocolSocketFactory(SocketFactory.getDefault(),source,socketListener);
    Protocol protocol=new Protocol(HttpClientRetrieveFileTransfer.HTTP,psf,port);
    Trace.trace(Activator.PLUGIN_ID,"String_Node_Str" + host + "String_Node_Str"+ port);
    hostConfiguration.setHost(host,port,protocol);
  }
}
Program: 94472
Project: 94472
Buggy source:
protected static String getPathFromURL(String url){
  final int colonSlashSlash=url.indexOf("String_Node_Str");
  if (colonSlashSlash < 0)   return "String_Node_Str";
  final int requestPath=url.indexOf('/',colonSlashSlash + 3);
  if (requestPath < 0)   return "String_Node_Str";
  int end=url.length();
  return url.substring(requestPath,end);
}

Fixed version (ground truth):
protected static String getPathFromURL(String url){
  final int colonSlashSlash=url.indexOf("String_Node_Str");
  if (colonSlashSlash < 0)   return "String_Node_Str";
  final int requestPath=url.indexOf('/',colonSlashSlash + 3);
  if (requestPath < 0)   return "String_Node_Str";
  return cleanExtraSlashesFromPath(url.substring(requestPath));
}
Program: 94474
Project: 94474
Buggy source:
private boolean isZippedResponse(){
  boolean zipped=(null != this.getResponseHeader(CONTENT_ENCODING) && this.getResponseHeader(CONTENT_ENCODING).getValue().equals(CONTENT_ENCODING_GZIP));
  return zipped;
}

Fixed version (ground truth):
private boolean isZippedResponse(){
  boolean contentEncodingGzip=(null != this.getResponseHeader(CONTENT_ENCODING) && this.getResponseHeader(CONTENT_ENCODING).getValue().equals(CONTENT_ENCODING_GZIP));
  Trace.trace(Activator.PLUGIN_ID,"String_Node_Str" + (contentEncodingGzip ? "String_Node_Str" : "String_Node_Str"));
  boolean hasGzSuffix=targetHasGzSuffix(remoteFileName);
  return contentEncodingGzip && !hasGzSuffix;
}
Program: 94475
Project: 94475
Buggy source:
protected static int getPortFromURL(String url){
  final int colonSlashSlash=url.indexOf("String_Node_Str");
  if (colonSlashSlash < 0)   return urlUsesHttps(url) ? HTTPS_PORT : HTTP_PORT;
  final int colonPort=url.indexOf(':',colonSlashSlash + 1);
  if (colonPort < 0)   return urlUsesHttps(url) ? HTTPS_PORT : HTTP_PORT;
  final int requestPath=url.indexOf('/',colonPort + 1);
  int end;
  if (requestPath < 0)   end=url.length();
 else   end=requestPath;
  return Integer.parseInt(url.substring(colonPort + 1,end));
}

Fixed version (ground truth):
protected static int getPortFromURL(String url){
  final int colonSlashSlash=url.indexOf("String_Node_Str");
  if (colonSlashSlash < 0)   return urlUsesHttps(url) ? HTTPS_PORT : HTTP_PORT;
  final int colonPort=url.indexOf(':',colonSlashSlash + 1);
  if (colonPort < 0)   return urlUsesHttps(url) ? HTTPS_PORT : HTTP_PORT;
  if (colonPort > url.indexOf('/',colonSlashSlash + 3))   return urlUsesHttps(url) ? HTTPS_PORT : HTTP_PORT;
  final int requestPath=url.indexOf('/',colonPort + 1);
  int end;
  if (requestPath < 0)   end=url.length();
 else   end=requestPath;
  return Integer.parseInt(url.substring(colonPort + 1,end));
}
Program: 94476
Project: 94476
Buggy source:
public InputStream getResponseBodyAsUnzippedStream() throws IOException {
  gzipReceived=isZippedResponse();
  InputStream input=super.getResponseBodyAsStream();
  try {
    if (gzipReceived) {
      Trace.trace(Activator.PLUGIN_ID,"String_Node_Str");
      return new java.util.zip.GZIPInputStream(input);
    }
  }
 catch (  IOException e) {
    Activator.getDefault().log(new Status(IStatus.WARNING,Activator.PLUGIN_ID,IStatus.WARNING,"String_Node_Str",e));
    throw e;
  }
  return input;
}

Fixed version (ground truth):
public InputStream getResponseBodyAsUnzippedStream() throws IOException {
  gzipReceived=isZippedResponse();
  InputStream input=super.getResponseBodyAsStream();
  try {
    if (gzipReceived) {
      Trace.trace(Activator.PLUGIN_ID,"String_Node_Str");
      return new java.util.zip.GZIPInputStream(input);
    }
    Trace.trace(Activator.PLUGIN_ID,"String_Node_Str");
  }
 catch (  IOException e) {
    Activator.getDefault().log(new Status(IStatus.WARNING,Activator.PLUGIN_ID,IStatus.WARNING,"String_Node_Str",e));
    throw e;
  }
  return input;
}
Program: 94477
Project: 94477
Buggy source:
public String toString(){
  StringBuffer sb=new StringBuffer("String_Node_Str");
  sb.append("String_Node_Str").append(typeDescription).append("String_Node_Str");
  sb.append("String_Node_Str").append(id).append("String_Node_Str");
  sb.append("String_Node_Str").append(homeID).append("String_Node_Str");
  sb.append("String_Node_Str").append(properties).append("String_Node_Str");
  sb.append("String_Node_Str").append(identifier).append("String_Node_Str");
  return sb.toString();
}

Fixed version (ground truth):
public String toString(){
  StringBuffer sb=new StringBuffer("String_Node_Str");
  sb.append("String_Node_Str").append(typeDescription).append("String_Node_Str");
  sb.append("String_Node_Str").append(id).append("String_Node_Str");
  sb.append("String_Node_Str").append(homeID).append("String_Node_Str");
  sb.append("String_Node_Str").append(identifier).append("String_Node_Str");
  return sb.toString();
}