Program: 40901
Project: 40901
Buggy source:
/** 
 * Changes the endpoints of all WSDL files used by the given WS-BPEL 2.0 Process
 * @param processFiles a list of files containing the complete content of a Apache ODE WS-BPEL 2.0zip file
 * @param csarId the identifier of the CSAR where this process/plan is declared
 * @return true if every WSDL file used by the process was updated (if needed) with endpoints fromthe openTOSCA Core, else false
 */
public boolean changeEndpoints(final List<File> processFiles,final CSARID csarId){
  this.csarId=csarId;
  Map<QName,List<File>> unchangedFiles=null;
  final File deployXml=getDeployXML(processFiles);
  if (deployXml == null) {
    ODEEndpointUpdater.LOG.error("String_Node_Str");
    return false;
  }
  try {
    final List<QName> portsInDeployXml=getInvokedDeployXMLPorts(deployXml);
    if (!portsInDeployXml.isEmpty()) {
      for (      final QName portType : portsInDeployXml) {
        ODEEndpointUpdater.LOG.debug("String_Node_Str",portType);
      }
    }
 else {
      ODEEndpointUpdater.LOG.debug("String_Node_Str");
      return true;
    }
    final Map<QName,List<File>> changeMap=getWSDLtoChange(portsInDeployXml,getAllWSDLFiles(processFiles));
    unchangedFiles=this.updateInvokedWSDLAddresses(changeMap);
  }
 catch (  final JAXBException e) {
    ODEEndpointUpdater.LOG.error("String_Node_Str",e);
  }
catch (  final WSDLException e) {
    ODEEndpointUpdater.LOG.error("String_Node_Str",e);
  }
  try {
    final List<QName> portsInDeployXml=getProvidedDeployXMLPorts(deployXml);
    final Map<QName,List<File>> changeMap=getWSDLtoChange(portsInDeployXml,getAllWSDLFiles(processFiles));
    unchangedFiles.putAll(this.updateProvidedWSDLAddresses(changeMap));
  }
 catch (  final JAXBException e) {
    e.printStackTrace();
  }
catch (  final WSDLException e) {
    e.printStackTrace();
  }
  for (  final QName portType : unchangedFiles.keySet()) {
    ODEEndpointUpdater.LOG.warn("String_Node_Str",portType.toString());
    for (    final File file : unchangedFiles.get(portType)) {
      ODEEndpointUpdater.LOG.warn("String_Node_Str",file.toPath().toString(),portType.toString());
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Changes the endpoints of all WSDL files used by the given WS-BPEL 2.0 Process
 * @param processFiles a list of files containing the complete content of a Apache ODE WS-BPEL 2.0zip file
 * @param csarId the identifier of the CSAR where this process/plan is declared
 * @return true if every WSDL file used by the process was updated (if needed) with endpoints fromthe openTOSCA Core, else false
 */
public boolean changeEndpoints(final List<File> processFiles,final CSARID csarId){
  this.csarId=csarId;
  final Map<QName,List<File>> unchangedFiles=new HashMap<>();
  final File deployXml=getDeployXML(processFiles);
  if (deployXml == null) {
    ODEEndpointUpdater.LOG.error("String_Node_Str");
    return false;
  }
  try {
    final List<QName> portsInDeployXml=getInvokedDeployXMLPorts(deployXml);
    if (!portsInDeployXml.isEmpty()) {
      for (      final QName portType : portsInDeployXml) {
        ODEEndpointUpdater.LOG.debug("String_Node_Str",portType);
      }
      final Map<QName,List<File>> changeMap=getWSDLtoChange(portsInDeployXml,getAllWSDLFiles(processFiles));
      unchangedFiles.putAll(this.updateInvokedWSDLAddresses(changeMap));
    }
 else {
      ODEEndpointUpdater.LOG.debug("String_Node_Str");
    }
  }
 catch (  final JAXBException e) {
    ODEEndpointUpdater.LOG.error("String_Node_Str",e);
  }
catch (  final WSDLException e) {
    ODEEndpointUpdater.LOG.error("String_Node_Str",e);
  }
  try {
    final List<QName> portsInDeployXml=getProvidedDeployXMLPorts(deployXml);
    final Map<QName,List<File>> changeMap=getWSDLtoChange(portsInDeployXml,getAllWSDLFiles(processFiles));
    unchangedFiles.putAll(this.updateProvidedWSDLAddresses(changeMap));
  }
 catch (  final JAXBException e) {
    e.printStackTrace();
  }
catch (  final WSDLException e) {
    e.printStackTrace();
  }
  for (  final QName portType : unchangedFiles.keySet()) {
    ODEEndpointUpdater.LOG.warn("String_Node_Str",portType.toString());
    for (    final File file : unchangedFiles.get(portType)) {
      ODEEndpointUpdater.LOG.warn("String_Node_Str",file.toPath().toString(),portType.toString());
    }
  }
  return true;
}