Program: 70390
Project: 70390
Buggy source:
@Override public void specificCopy() throws CopyException {
  logger.debug(DBG_PREFIX + "String_Node_Str" + getName());
  LinkedList<MultiURI> targetURIs=tgtLoc.getURIs();
  LinkedList<URI> selectedTargetURIs=new LinkedList<>();
  for (  MultiURI uri : targetURIs) {
    try {
      URI internalURI=(URI)uri.getInternalURI(GATAdaptor.ID);
      if (internalURI != null) {
        selectedTargetURIs.add(internalURI);
      }
    }
 catch (    UnstartedNodeException une) {
      throw new GATCopyException(une);
    }
  }
  if (selectedTargetURIs.isEmpty()) {
    logger.error(DBG_PREFIX + ERR_NO_TGT_URI);
    throw new GATCopyException(ERR_NO_TGT_URI);
  }
  LinkedList<MultiURI> sourceURIs;
  LinkedList<URI> selectedSourceURIs=new LinkedList<>();
synchronized (srcData) {
    if (srcLoc != null) {
      sourceURIs=srcLoc.getURIs();
      for (      MultiURI uri : sourceURIs) {
        try {
          URI internalURI=(URI)uri.getInternalURI(GATAdaptor.ID);
          if (internalURI != null) {
            selectedSourceURIs.add(internalURI);
          }
        }
 catch (        UnstartedNodeException une) {
          throw new GATCopyException(une);
        }
      }
    }
    sourceURIs=srcData.getURIs();
    for (    MultiURI uri : sourceURIs) {
      try {
        URI internalURI=(URI)uri.getInternalURI(GATAdaptor.ID);
        if (internalURI != null) {
          selectedSourceURIs.add(internalURI);
        }
      }
 catch (      UnstartedNodeException une) {
        throw new GATCopyException(une);
      }
    }
    if (selectedSourceURIs.isEmpty()) {
      if (srcData.isInMemory()) {
        try {
          srcData.writeToStorage();
          sourceURIs=srcData.getURIs();
          for (          MultiURI uri : sourceURIs) {
            URI internalURI=(URI)uri.getInternalURI(GATAdaptor.ID);
            if (internalURI != null) {
              selectedSourceURIs.add(internalURI);
            }
          }
        }
 catch (        Exception e) {
          logger.fatal("String_Node_Str",e);
          throw new GATCopyException(ERR_NO_SRC_URI);
        }
      }
 else {
        throw new GATCopyException(ERR_NO_SRC_URI);
      }
    }
  }
  GATInvocationException exception=new GATInvocationException("String_Node_Str");
  for (  URI src : selectedSourceURIs) {
    for (    URI tgt : selectedTargetURIs) {
      try {
        if (logger.isDebugEnabled()) {
          logger.debug("String_Node_Str" + src + "String_Node_Str"+ tgt);
        }
        URI gatSrc=new URI(DataLocation.Protocol.ANY_URI.getSchema() + src.getHost() + "String_Node_Str"+ src.getPath());
        URI gatTgt=new URI(DataLocation.Protocol.ANY_URI.getSchema() + tgt.getHost() + "String_Node_Str"+ tgt.getPath());
        if (logger.isDebugEnabled()) {
          logger.debug("String_Node_Str" + gatSrc + "String_Node_Str"+ gatTgt);
        }
        doCopy(gatSrc,gatTgt);
      }
 catch (      Exception e) {
        exception.add("String_Node_Str",e);
        logger.warn("String_Node_Str",e);
        continue;
      }
      return;
    }
  }
  if (!(this.reason instanceof WorkersDebugInfoCopyTransferable)) {
    ErrorManager.error("String_Node_Str" + srcData.getName() + "String_Node_Str",exception);
  }
  throw new GATCopyException(exception);
}

Fixed version (ground truth):
@Override public void specificCopy() throws CopyException {
  logger.debug(DBG_PREFIX + "String_Node_Str" + getName());
  LinkedList<MultiURI> targetURIs=tgtLoc.getURIs();
  LinkedList<URI> selectedTargetURIs=new LinkedList<>();
  for (  MultiURI uri : targetURIs) {
    try {
      URI internalURI=(URI)uri.getInternalURI(GATAdaptor.ID);
      if (internalURI != null) {
        selectedTargetURIs.add(internalURI);
      }
    }
 catch (    UnstartedNodeException une) {
      throw new GATCopyException(une);
    }
  }
  if (selectedTargetURIs.isEmpty()) {
    logger.error(DBG_PREFIX + ERR_NO_TGT_URI);
    throw new GATCopyException(ERR_NO_TGT_URI);
  }
  logger.debug(DBG_PREFIX + "String_Node_Str");
  LinkedList<MultiURI> sourceURIs;
  LinkedList<URI> selectedSourceURIs=new LinkedList<>();
synchronized (srcData) {
    if (srcLoc != null) {
      sourceURIs=srcLoc.getURIs();
      for (      MultiURI uri : sourceURIs) {
        try {
          URI internalURI=(URI)uri.getInternalURI(GATAdaptor.ID);
          if (internalURI != null) {
            selectedSourceURIs.add(internalURI);
          }
        }
 catch (        UnstartedNodeException une) {
          logger.error(DBG_PREFIX + "String_Node_Str");
          throw new GATCopyException(une);
        }
      }
    }
    sourceURIs=srcData.getURIs();
    for (    MultiURI uri : sourceURIs) {
      try {
        URI internalURI=(URI)uri.getInternalURI(GATAdaptor.ID);
        if (internalURI != null) {
          selectedSourceURIs.add(internalURI);
        }
      }
 catch (      UnstartedNodeException une) {
        logger.error(DBG_PREFIX + "String_Node_Str" + getName());
        throw new GATCopyException(une);
      }
    }
    if (selectedSourceURIs.isEmpty()) {
      if (srcData.isInMemory()) {
        logger.debug("String_Node_Str" + getName() + "String_Node_Str");
        try {
          srcData.writeToStorage();
          sourceURIs=srcData.getURIs();
          for (          MultiURI uri : sourceURIs) {
            URI internalURI=(URI)uri.getInternalURI(GATAdaptor.ID);
            if (internalURI != null) {
              selectedSourceURIs.add(internalURI);
            }
          }
        }
 catch (        Exception e) {
          logger.fatal("String_Node_Str",e);
          throw new GATCopyException(ERR_NO_SRC_URI);
        }
      }
 else {
        logger.error(DBG_PREFIX + ERR_NO_SRC_URI);
        throw new GATCopyException(ERR_NO_SRC_URI);
      }
    }
  }
  GATInvocationException exception=new GATInvocationException("String_Node_Str");
  for (  URI src : selectedSourceURIs) {
    for (    URI tgt : selectedTargetURIs) {
      try {
        if (logger.isDebugEnabled()) {
          logger.debug("String_Node_Str" + src + "String_Node_Str"+ tgt);
        }
        URI gatSrc=new URI(DataLocation.Protocol.ANY_URI.getSchema() + src.getHost() + "String_Node_Str"+ src.getPath());
        URI gatTgt=new URI(DataLocation.Protocol.ANY_URI.getSchema() + tgt.getHost() + "String_Node_Str"+ tgt.getPath());
        if (logger.isDebugEnabled()) {
          logger.debug("String_Node_Str" + gatSrc + "String_Node_Str"+ gatTgt);
        }
        doCopy(gatSrc,gatTgt);
      }
 catch (      Exception e) {
        exception.add("String_Node_Str",e);
        logger.warn("String_Node_Str",e);
        continue;
      }
      return;
    }
  }
  if (!(this.reason instanceof WorkersDebugInfoCopyTransferable)) {
    ErrorManager.error("String_Node_Str" + srcData.getName() + "String_Node_Str",exception);
  }
  throw new GATCopyException(exception);
}