Program: 39949
Project: 39949
Buggy source:
@Override public SecurityComponents createSecurityComponents(){
  Binding binding=new Binding();
  binding.setVariable("String_Node_Str",this);
  BeanBuilder builder=new BeanBuilder(Jenkins.getInstance().pluginManager.uberClassLoader);
  String fileName;
  if (getLDAPURL() != null) {
    fileName="String_Node_Str";
  }
 else {
    fileName="String_Node_Str";
  }
  try {
    File override=new File(Jenkins.getInstance().getRootDir(),fileName);
    builder.parse(override.exists() ? new AutoCloseInputStream(new FileInputStream(override)) : getClass().getResourceAsStream(fileName),binding);
  }
 catch (  FileNotFoundException e) {
    throw new Error("String_Node_Str" + fileName,e);
  }
  WebApplicationContext appContext=builder.createApplicationContext();
  if (getLDAPURL() == null) {
    proxyTemplate=new ReverseProxySearchTemplate();
    return new SecurityComponents(findBean(AuthenticationManager.class,appContext),new ReverseProxyUserDetailsService(appContext));
  }
 else {
    ldapTemplate=new LdapTemplate(findBean(InitialDirContextFactory.class,appContext));
    if (groupMembershipFilter != null || groupNameAttribute != null) {
      ProxyLDAPAuthoritiesPopulator authoritiesPopulator=findBean(ProxyLDAPAuthoritiesPopulator.class,appContext);
      if (groupMembershipFilter != null) {
        authoritiesPopulator.setGroupSearchFilter(groupMembershipFilter);
      }
      if (groupNameAttribute != null) {
        authoritiesPopulator.setGroupRoleAttribute(groupNameAttribute);
      }
    }
    return new SecurityComponents(findBean(AuthenticationManager.class,appContext),new ProxyLDAPUserDetailsService(this,appContext));
  }
}

Fixed version (ground truth):
@Override public SecurityComponents createSecurityComponents() throws DataAccessException {
  Binding binding=new Binding();
  binding.setVariable("String_Node_Str",this);
  BeanBuilder builder=new BeanBuilder(Jenkins.getActiveInstance().pluginManager.uberClassLoader);
  String fileName;
  if (getLDAPURL() != null) {
    fileName="String_Node_Str";
  }
 else {
    fileName="String_Node_Str";
  }
  File override=new File(Jenkins.getActiveInstance().getRootDir(),fileName);
  try (InputStream istream=override.exists() ? new FileInputStream(override) : getClass().getResourceAsStream(fileName)){
    if (istream == null) {
      throw new FileNotFoundException("String_Node_Str" + fileName);
    }
    builder.parse(istream,binding);
  }
 catch (  IOException e) {
    throw new DataAccessResourceFailureException("String_Node_Str" + fileName,e);
  }
  WebApplicationContext appContext=builder.createApplicationContext();
  if (getLDAPURL() == null) {
    proxyTemplate=new ReverseProxySearchTemplate();
    return new SecurityComponents(findBean(AuthenticationManager.class,appContext),new ReverseProxyUserDetailsService(appContext));
  }
 else {
    ldapTemplate=new LdapTemplate(findBean(InitialDirContextFactory.class,appContext));
    if (groupMembershipFilter != null || groupNameAttribute != null) {
      ProxyLDAPAuthoritiesPopulator authoritiesPopulator=findBean(ProxyLDAPAuthoritiesPopulator.class,appContext);
      if (groupMembershipFilter != null) {
        authoritiesPopulator.setGroupSearchFilter(groupMembershipFilter);
      }
      if (groupNameAttribute != null) {
        authoritiesPopulator.setGroupRoleAttribute(groupNameAttribute);
      }
    }
    return new SecurityComponents(findBean(AuthenticationManager.class,appContext),new ProxyLDAPUserDetailsService(this,appContext));
  }
}