Program: 28085
Project: 28085
Buggy source:
public static void merge(OpenAPIDefinition from,OpenAPI to,boolean override){
  if (isAnnotationNull(from)) {
    return;
  }
  if (!isAnnotationNull(from.info())) {
    if (to.getInfo() == null) {
      to.setInfo(new InfoImpl());
    }
    InfoImpl.merge(from.info(),to.getInfo(),override);
  }
  if (from.servers() != null) {
    for (    org.eclipse.microprofile.openapi.annotations.servers.Server server : from.servers()) {
      if (!isAnnotationNull(server)) {
        Server newServer=new ServerImpl();
        ServerImpl.merge(server,newServer,true);
        if (!to.getServers().contains(newServer)) {
          to.addServer(newServer);
        }
      }
    }
  }
  if (!isAnnotationNull(from.externalDocs())) {
    if (to.getExternalDocs() == null) {
      to.setExternalDocs(new ExternalDocumentationImpl());
    }
    ExternalDocumentationImpl.merge(from.externalDocs(),to.getExternalDocs(),override);
  }
  if (from.security() != null) {
    for (    org.eclipse.microprofile.openapi.annotations.security.SecurityRequirement requirement : from.security()) {
      if (!isAnnotationNull(requirement)) {
        SecurityRequirement newRequirement=new SecurityRequirementImpl();
        SecurityRequirementImpl.merge(requirement,newRequirement,override);
        if (!to.getSecurity().contains(newRequirement)) {
          to.addSecurityRequirement(newRequirement);
        }
      }
    }
  }
  if (from.tags() != null) {
    for (    org.eclipse.microprofile.openapi.annotations.tags.Tag tag : from.tags()) {
      if (!isAnnotationNull(tag)) {
        if (to.getTags() == null) {
          to.setTags(new ArrayList<>());
        }
        Tag newTag=new TagImpl();
        TagImpl.merge(tag,newTag,override);
        to.addTag(newTag);
      }
    }
  }
  ComponentsImpl.merge(from.components(),to.getComponents(),override,null);
}

Fixed version (ground truth):
public static void merge(OpenAPIDefinition from,OpenAPI to,boolean override){
  if (isAnnotationNull(from)) {
    return;
  }
  if (!isAnnotationNull(from.info())) {
    if (to.getInfo() == null) {
      to.setInfo(new InfoImpl());
    }
    InfoImpl.merge(from.info(),to.getInfo(),override);
  }
  if (from.servers() != null) {
    for (    org.eclipse.microprofile.openapi.annotations.servers.Server server : from.servers()) {
      if (!isAnnotationNull(server)) {
        Server newServer=new ServerImpl();
        ServerImpl.merge(server,newServer,true);
        if (!to.getServers().contains(newServer)) {
          to.addServer(newServer);
        }
      }
    }
  }
  if (!isAnnotationNull(from.externalDocs())) {
    if (to.getExternalDocs() == null) {
      to.setExternalDocs(new ExternalDocumentationImpl());
    }
    ExternalDocumentationImpl.merge(from.externalDocs(),to.getExternalDocs(),override);
  }
  if (from.security() != null) {
    for (    org.eclipse.microprofile.openapi.annotations.security.SecurityRequirement requirement : from.security()) {
      if (!isAnnotationNull(requirement)) {
        SecurityRequirement newRequirement=new SecurityRequirementImpl();
        SecurityRequirementImpl.merge(requirement,newRequirement);
        if (!to.getSecurity().contains(newRequirement)) {
          to.addSecurityRequirement(newRequirement);
        }
      }
    }
  }
  if (from.tags() != null) {
    for (    org.eclipse.microprofile.openapi.annotations.tags.Tag tag : from.tags()) {
      if (!isAnnotationNull(tag)) {
        if (to.getTags() == null) {
          to.setTags(new ArrayList<>());
        }
        Tag newTag=new TagImpl();
        TagImpl.merge(tag,newTag,override);
        to.addTag(newTag);
      }
    }
  }
  ComponentsImpl.merge(from.components(),to.getComponents(),override,null);
}