Program: 20086
Project: 20086
Buggy source:
/** 
 */
@Override public ServiceInformations queryWSDLInterfaces(String search,String subProjectId,String visibility) throws Exception {
  CoreSession documentManager=SessionFactory.getSession(request);
  DocumentService documentService=Framework.getService(DocumentService.class);
  boolean searchParamIncluded=false;
  ArrayList<String> parameters=new ArrayList<String>();
  StringBuilder query=new StringBuilder();
  query.append("String_Node_Str");
  if (search != null && !"String_Node_Str".equals(search)) {
    String searchParam="String_Node_Str" + search + "String_Node_Str";
    query.append("String_Node_Str" + "String_Node_Str" + SoaNode.XPATH_SOANAME + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ WsdlInfoFacet.XPATH_WSDL_PORTTYPE_NAME+ "String_Node_Str");
    parameters.add(searchParam);
    parameters.add(searchParam);
    parameters.add(searchParam);
    parameters.add(searchParam);
    searchParamIncluded=true;
  }
  if (subProjectId != null && !"String_Node_Str".equals(subProjectId)) {
    String subProjectCriterias="String_Node_Str";
    DocumentModel subProjectModel=SubprojectServiceImpl.getSubprojectById(documentManager,subProjectId);
    if (subProjectModel != null) {
      subProjectCriterias=SubprojectServiceImpl.buildCriteriaSeenFromSubproject(subProjectModel,visibility);
      if (searchParamIncluded) {
        query.append("String_Node_Str").append(subProjectCriterias);
      }
 else {
        query.append("String_Node_Str").append(subProjectCriterias);
      }
    }
 else {
      throw new Exception("String_Node_Str" + subProjectId + "String_Node_Str");
    }
  }
  String nxqlQuery=NXQLQueryBuilder.getQuery(query.toString(),parameters.toArray(),false,true);
  DocumentModelList soaNodeModelList=documentService.query(documentManager,nxqlQuery,true,false);
  ServiceInformations serviceInformations=new ServiceInformations();
  for (  DocumentModel soaNodeModel : soaNodeModelList) {
    serviceInformations.addServiceInformation(SoaNodeInformationToWSDLInformationMapper.mapToServiceInformation(soaNodeModel,NUXEO_BASE_URL,documentManager));
  }
  return serviceInformations;
}

Fixed version (ground truth):
/** 
 */
@Override public ServiceInformations queryWSDLInterfaces(String search,String subProjectId,String visibility) throws Exception {
  CoreSession documentManager=SessionFactory.getSession(request);
  DocumentService documentService=Framework.getService(DocumentService.class);
  boolean searchParamIncluded=false;
  ArrayList<String> parameters=new ArrayList<String>();
  StringBuilder query=new StringBuilder();
  query.append("String_Node_Str");
  if (search != null && !"String_Node_Str".equals(search)) {
    String searchParam="String_Node_Str" + search + "String_Node_Str";
    query.append("String_Node_Str" + "String_Node_Str" + SoaNode.XPATH_SOANAME + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ WsdlInfoFacet.XPATH_WSDL_PORTTYPE_NAME+ "String_Node_Str");
    parameters.add(searchParam);
    parameters.add(searchParam);
    parameters.add(searchParam);
    parameters.add(searchParam);
    searchParamIncluded=true;
  }
  if (subProjectId != null && !"String_Node_Str".equals(subProjectId)) {
    String subProjectCriterias="String_Node_Str";
    DocumentModel subProjectModel=SubprojectServiceImpl.getSubprojectById(documentManager,subProjectId);
    if (subProjectModel != null) {
      subProjectCriterias=SubprojectServiceImpl.buildCriteriaSeenFromSubproject(subProjectModel);
      if (searchParamIncluded) {
        query.append("String_Node_Str").append(subProjectCriterias);
      }
 else {
        query.append("String_Node_Str").append(subProjectCriterias);
      }
    }
 else {
      throw new Exception("String_Node_Str" + subProjectId + "String_Node_Str");
    }
  }
  String nxqlQuery=NXQLQueryBuilder.getQuery(query.toString(),parameters.toArray(),false,true);
  DocumentModelList soaNodeModelList=documentService.query(documentManager,nxqlQuery,true,false);
  ServiceInformations serviceInformations=new ServiceInformations();
  for (  DocumentModel soaNodeModel : soaNodeModelList) {
    serviceInformations.addServiceInformation(SoaNodeInformationToWSDLInformationMapper.mapToServiceInformation(soaNodeModel,NUXEO_BASE_URL,documentManager));
  }
  return serviceInformations;
}