Program: 34734
Project: 34734
Buggy source:
private OpenAPI processWebModule(Container appContainer,WebModuleInfo moduleInfo){
  ClassLoader appClassloader=moduleInfo.getClassLoader();
  boolean isOASApp=false;
  ConfigProcessor configProcessor=new ConfigProcessor(appClassloader);
  OpenAPI newDocument=null;
  OASModelReader modelReader=OpenAPIUtils.getOASModelReader(appClassloader,configProcessor.getModelReaderClassName());
  if (modelReader != null) {
    try {
      OpenAPI model=modelReader.buildModel();
      if (model != null) {
        isOASApp=true;
        newDocument=model;
      }
    }
 catch (    Throwable e) {
      if (OpenAPIUtils.isEventEnabled(tc)) {
        Tr.event(tc,"String_Node_Str" + e.getMessage());
      }
    }
  }
  String openAPIStaticFile=StaticFileProcessor.getOpenAPIFile(appContainer);
  if (openAPIStaticFile != null) {
    SwaggerParseResult result=new OpenAPIV3Parser().readContents(openAPIStaticFile,newDocument,null,null);
    if (result.getOpenAPI() != null) {
      newDocument=result.getOpenAPI();
      isOASApp=true;
    }
 else {
      Tr.error(tc,"String_Node_Str",moduleInfo.getApplicationInfo().getDeploymentName());
    }
  }
  AnnotationScanner scanner=OpenAPIUtils.creatAnnotationScanner(appClassloader,appContainer);
  if (!configProcessor.isScanDisabled()) {
    Set<String> classNamesToScan=new HashSet<>();
    if (configProcessor.getClassesToScan() != null) {
      classNamesToScan.addAll(configProcessor.getClassesToScan());
    }
    if (configProcessor.getPackagesToScan() != null) {
      Set<String> foundClasses=scanner.getAnnotatedClassesNames();
      for (      String packageName : configProcessor.getPackagesToScan()) {
        for (        String className : foundClasses) {
          if (className.startsWith(packageName)) {
            classNamesToScan.add(className);
          }
        }
      }
    }
    if (classNamesToScan.size() == 0 && scanner.anyAnnotatedClasses()) {
      classNamesToScan.addAll(scanner.getAnnotatedClassesNames());
    }
    if (configProcessor.getClassesToExclude() != null) {
      classNamesToScan.removeAll(configProcessor.getClassesToExclude());
    }
    if (configProcessor.getPackagesToExclude() != null) {
      for (      String packageToExclude : configProcessor.getPackagesToExclude()) {
        Iterator<String> iterator=classNamesToScan.iterator();
        while (iterator.hasNext()) {
          if (iterator.next().startsWith(packageToExclude)) {
            iterator.remove();
          }
        }
      }
    }
    if (classNamesToScan.size() > 0) {
      isOASApp=true;
      Set<Class<?>> classes=new HashSet<>();
      for (      String clazz : classNamesToScan) {
        try {
          classes.add(appClassloader.loadClass(clazz));
        }
 catch (        ClassNotFoundException e) {
          if (OpenAPIUtils.isEventEnabled(tc)) {
            Tr.event(tc,"String_Node_Str" + e.getMessage());
          }
        }
      }
      Reader reader=new Reader(newDocument);
      reader.setApplicationPath(scanner.getURLMapping());
      newDocument=reader.read(classes);
    }
  }
  if (!isOASApp) {
    return null;
  }
  handleServers(newDocument,configProcessor);
  OASFilter oasFilter=OpenAPIUtils.getOASFilter(appClassloader,configProcessor.getOpenAPIFilterClassName());
  if (oasFilter != null) {
    final OpenAPIFilter filter=new OpenAPIFilter(oasFilter);
    try {
      filter.filter(newDocument);
    }
 catch (    Throwable e) {
      if (OpenAPIUtils.isEventEnabled(tc)) {
        Tr.event(tc,"String_Node_Str" + e.getMessage());
      }
    }
  }
  final boolean validating=configProcessor.isValidating();
  if (validating) {
    try {
      validateDocument(newDocument);
    }
 catch (    Throwable e) {
      if (OpenAPIUtils.isEventEnabled(tc)) {
        Tr.event(tc,"String_Node_Str" + e.getMessage());
      }
    }
  }
  return newDocument;
}

Fixed version (ground truth):
private OpenAPI processWebModule(Container appContainer,WebModuleInfo moduleInfo){
  ClassLoader appClassloader=moduleInfo.getClassLoader();
  boolean isOASApp=false;
  ConfigProcessor configProcessor=new ConfigProcessor(appClassloader);
  OpenAPI newDocument=null;
  OASModelReader modelReader=OpenAPIUtils.getOASModelReader(appClassloader,configProcessor.getModelReaderClassName());
  if (modelReader != null) {
    try {
      OpenAPI model=modelReader.buildModel();
      if (model != null) {
        isOASApp=true;
        newDocument=model;
      }
    }
 catch (    Throwable e) {
      if (OpenAPIUtils.isEventEnabled(tc)) {
        Tr.event(tc,"String_Node_Str" + e.getMessage());
      }
    }
  }
  String openAPIStaticFile=StaticFileProcessor.getOpenAPIFile(appContainer);
  if (openAPIStaticFile != null) {
    SwaggerParseResult result=new OpenAPIV3Parser().readContents(openAPIStaticFile,newDocument,null,null);
    if (result.getOpenAPI() != null) {
      newDocument=result.getOpenAPI();
      isOASApp=true;
    }
 else {
      Tr.error(tc,"String_Node_Str",moduleInfo.getApplicationInfo().getDeploymentName());
    }
  }
  AnnotationScanner scanner=OpenAPIUtils.creatAnnotationScanner(appClassloader,appContainer);
  if (!configProcessor.isScanDisabled()) {
    Set<String> classNamesToScan=new HashSet<>();
    if (configProcessor.getClassesToScan() != null) {
      classNamesToScan.addAll(configProcessor.getClassesToScan());
    }
    if (configProcessor.getPackagesToScan() != null) {
      Set<String> foundClasses=scanner.getAnnotatedClassesNames();
      for (      String packageName : configProcessor.getPackagesToScan()) {
        for (        String className : foundClasses) {
          if (className.startsWith(packageName)) {
            classNamesToScan.add(className);
          }
        }
      }
    }
    if (classNamesToScan.size() == 0 && scanner.anyAnnotatedClasses()) {
      classNamesToScan.addAll(scanner.getAnnotatedClassesNames());
    }
    if (configProcessor.getClassesToExclude() != null) {
      classNamesToScan.removeAll(configProcessor.getClassesToExclude());
    }
    if (configProcessor.getPackagesToExclude() != null) {
      for (      String packageToExclude : configProcessor.getPackagesToExclude()) {
        Iterator<String> iterator=classNamesToScan.iterator();
        while (iterator.hasNext()) {
          if (iterator.next().startsWith(packageToExclude)) {
            iterator.remove();
          }
        }
      }
    }
    if (classNamesToScan.size() > 0) {
      isOASApp=true;
      Set<Class<?>> classes=new HashSet<>();
      for (      String clazz : classNamesToScan) {
        try {
          classes.add(appClassloader.loadClass(clazz));
        }
 catch (        ClassNotFoundException e) {
          if (OpenAPIUtils.isEventEnabled(tc)) {
            Tr.event(tc,"String_Node_Str" + e.getMessage());
          }
        }
      }
      Reader reader=new Reader(newDocument);
      reader.setApplicationPath(scanner.getURLMapping());
      newDocument=reader.read(classes);
    }
  }
  if (!isOASApp) {
    return null;
  }
  handleServers(newDocument,configProcessor);
  OASFilter oasFilter=OpenAPIUtils.getOASFilter(appClassloader,configProcessor.getOpenAPIFilterClassName());
  if (oasFilter != null) {
    final OpenAPIFilter filter=new OpenAPIFilter(oasFilter);
    try {
      filter.filter(newDocument);
    }
 catch (    Throwable e) {
      if (OpenAPIUtils.isEventEnabled(tc)) {
        Tr.event(tc,"String_Node_Str" + e.getMessage());
      }
    }
  }
  if (newDocument != null && newDocument.getInfo() == null) {
    newDocument.setInfo(new InfoImpl().title("String_Node_Str").version("String_Node_Str"));
  }
  final boolean validating=configProcessor.isValidating();
  if (validating) {
    try {
      validateDocument(newDocument);
    }
 catch (    Throwable e) {
      if (OpenAPIUtils.isEventEnabled(tc)) {
        Tr.event(tc,"String_Node_Str" + e.getMessage());
      }
    }
  }
  return newDocument;
}