Program: 28083
Project: 28083
Buggy source:
public static void merge(org.eclipse.microprofile.openapi.annotations.Components from,Components to,boolean override,Map<String,Schema> currentSchemas){
  if (from == null) {
    return;
  }
  if (from.schemas() != null) {
    for (    org.eclipse.microprofile.openapi.annotations.media.Schema schema : from.schemas()) {
      if (schema.name() != null) {
        Schema newSchema=new SchemaImpl();
        SchemaImpl.merge(schema,newSchema,override,currentSchemas);
        to.addSchema(schema.name(),newSchema);
      }
    }
  }
  if (from.callbacks() != null) {
    for (    org.eclipse.microprofile.openapi.annotations.callbacks.Callback callback : from.callbacks()) {
      if (callback != null) {
        if (callback.name() != null) {
          Callback newCallback=new CallbackImpl();
          CallbackImpl.merge(callback,newCallback,override,currentSchemas);
          to.addCallback(callback.name(),newCallback);
        }
      }
    }
  }
  if (from.examples() != null) {
    for (    ExampleObject example : from.examples()) {
      if (example.name() != null) {
        Example newExample=new ExampleImpl();
        ExampleImpl.merge(example,newExample,override);
        to.addExample(example.name(),newExample);
      }
    }
  }
  if (from.headers() != null) {
    for (    org.eclipse.microprofile.openapi.annotations.headers.Header header : from.headers()) {
      if (header.name() != null) {
        Header newHeader=new HeaderImpl();
        HeaderImpl.merge(header,newHeader,override,currentSchemas);
        to.addHeader(header.name(),newHeader);
      }
    }
  }
  if (from.links() != null) {
    for (    org.eclipse.microprofile.openapi.annotations.links.Link link : from.links()) {
      if (link.name() != null) {
        Link newLink=new LinkImpl();
        LinkImpl.merge(link,newLink,override);
        to.addLink(link.name(),newLink);
      }
    }
  }
  if (from.parameters() != null) {
    for (    org.eclipse.microprofile.openapi.annotations.parameters.Parameter parameter : from.parameters()) {
      if (parameter.name() != null) {
        Parameter newParameter=new ParameterImpl();
        ParameterImpl.merge(parameter,newParameter,override,currentSchemas);
        to.addParameter(parameter.name(),newParameter);
      }
    }
  }
  if (from.requestBodies() != null) {
    for (    org.eclipse.microprofile.openapi.annotations.parameters.RequestBody requestBody : from.requestBodies()) {
      if (requestBody.name() != null) {
        RequestBody newRequestBody=new RequestBodyImpl();
        RequestBodyImpl.merge(requestBody,newRequestBody,override,currentSchemas);
        to.addRequestBody(requestBody.name(),newRequestBody);
      }
    }
  }
  if (from.responses() != null) {
    for (    org.eclipse.microprofile.openapi.annotations.responses.APIResponse response : from.responses()) {
      if (response.name() != null) {
        APIResponse newResponse=new APIResponseImpl();
        APIResponseImpl.merge(response,newResponse,override,currentSchemas);
        to.addResponse(response.name(),newResponse);
      }
    }
  }
  if (from.securitySchemes() != null) {
    for (    org.eclipse.microprofile.openapi.annotations.security.SecurityScheme security : from.securitySchemes()) {
      if (security.securitySchemeName() != null) {
        SecurityScheme newSecurity=new SecuritySchemeImpl();
        SecuritySchemeImpl.merge(security,newSecurity,override);
        to.addSecurityScheme(security.securitySchemeName(),newSecurity);
      }
    }
  }
}

Fixed version (ground truth):
public static void merge(org.eclipse.microprofile.openapi.annotations.Components from,Components to,boolean override,Map<String,Schema> currentSchemas){
  if (from == null) {
    return;
  }
  if (from.schemas() != null) {
    for (    org.eclipse.microprofile.openapi.annotations.media.Schema schema : from.schemas()) {
      if (schema.name() != null) {
        Schema newSchema=new SchemaImpl();
        SchemaImpl.merge(schema,newSchema,override,currentSchemas);
        to.addSchema(schema.name(),newSchema);
      }
    }
  }
  if (from.callbacks() != null) {
    for (    org.eclipse.microprofile.openapi.annotations.callbacks.Callback callback : from.callbacks()) {
      if (callback != null && callback.name() != null) {
        Callback newCallback=new CallbackImpl();
        CallbackImpl.merge(callback,newCallback,override,currentSchemas);
        to.addCallback(callback.name(),newCallback);
      }
    }
  }
  if (from.examples() != null) {
    for (    ExampleObject example : from.examples()) {
      if (example.name() != null) {
        Example newExample=new ExampleImpl();
        ExampleImpl.merge(example,newExample,override);
        to.addExample(example.name(),newExample);
      }
    }
  }
  if (from.headers() != null) {
    for (    org.eclipse.microprofile.openapi.annotations.headers.Header header : from.headers()) {
      if (header.name() != null) {
        Header newHeader=new HeaderImpl();
        HeaderImpl.merge(header,newHeader,override,currentSchemas);
        to.addHeader(header.name(),newHeader);
      }
    }
  }
  if (from.links() != null) {
    for (    org.eclipse.microprofile.openapi.annotations.links.Link link : from.links()) {
      if (link.name() != null) {
        Link newLink=new LinkImpl();
        LinkImpl.merge(link,newLink,override);
        to.addLink(link.name(),newLink);
      }
    }
  }
  if (from.parameters() != null) {
    for (    org.eclipse.microprofile.openapi.annotations.parameters.Parameter parameter : from.parameters()) {
      if (parameter.name() != null) {
        Parameter newParameter=new ParameterImpl();
        ParameterImpl.merge(parameter,newParameter,override,currentSchemas);
        to.addParameter(parameter.name(),newParameter);
      }
    }
  }
  if (from.requestBodies() != null) {
    for (    org.eclipse.microprofile.openapi.annotations.parameters.RequestBody requestBody : from.requestBodies()) {
      if (requestBody.name() != null) {
        RequestBody newRequestBody=new RequestBodyImpl();
        RequestBodyImpl.merge(requestBody,newRequestBody,override,currentSchemas);
        to.addRequestBody(requestBody.name(),newRequestBody);
      }
    }
  }
  if (from.responses() != null) {
    for (    org.eclipse.microprofile.openapi.annotations.responses.APIResponse response : from.responses()) {
      if (response.name() != null) {
        APIResponse newResponse=new APIResponseImpl();
        APIResponseImpl.merge(response,newResponse,override,currentSchemas);
        to.addResponse(response.name(),newResponse);
      }
    }
  }
  if (from.securitySchemes() != null) {
    for (    org.eclipse.microprofile.openapi.annotations.security.SecurityScheme security : from.securitySchemes()) {
      if (security.securitySchemeName() != null) {
        SecurityScheme newSecurity=new SecuritySchemeImpl();
        SecuritySchemeImpl.merge(security,newSecurity,override);
        to.addSecurityScheme(security.securitySchemeName(),newSecurity);
      }
    }
  }
}