Program: 188564
Project: 188564
Buggy source:
/** 
 * Start ApacheDS.
 */
private static void startApacheDS(){
  rodaApacheDSDataDirectory=RodaCoreFactory.getDataPath().resolve(RodaConstants.CORE_LDAP_FOLDER);
  try {
    final Configuration rodaConfig=RodaCoreFactory.getRodaConfiguration();
    final boolean ldapStartServer=rodaConfig.getBoolean("String_Node_Str",false);
    final int ldapPort=rodaConfig.getInt("String_Node_Str",RodaConstants.CORE_LDAP_DEFAULT_PORT);
    final String ldapBaseDN=rodaConfig.getString("String_Node_Str","String_Node_Str");
    final String ldapPeopleDN=rodaConfig.getString("String_Node_Str","String_Node_Str");
    final String ldapGroupsDN=rodaConfig.getString("String_Node_Str","String_Node_Str");
    final String ldapRolesDN=rodaConfig.getString("String_Node_Str","String_Node_Str");
    final String ldapAdminDN=rodaConfig.getString("String_Node_Str","String_Node_Str");
    final String ldapAdminPassword=rodaConfig.getString("String_Node_Str","String_Node_Str");
    final String ldapPasswordDigestAlgorithm=rodaConfig.getString("String_Node_Str","String_Node_Str");
    final List<String> ldapProtectedUsers=RodaUtils.copyList(rodaConfig.getList("String_Node_Str"));
    final List<String> ldapProtectedGroups=RodaUtils.copyList(rodaConfig.getList("String_Node_Str"));
    final String rodaGuestDN=rodaConfig.getString("String_Node_Str","String_Node_Str");
    final String rodaAdminDN=rodaConfig.getString("String_Node_Str","String_Node_Str");
    final String rodaAdministratorsDN=rodaConfig.getString("String_Node_Str","String_Node_Str");
    RodaCoreFactory.ldapUtility=new LdapUtility(ldapStartServer,ldapPort,ldapBaseDN,ldapPeopleDN,ldapGroupsDN,ldapRolesDN,ldapAdminDN,ldapAdminPassword,ldapPasswordDigestAlgorithm,ldapProtectedUsers,ldapProtectedGroups,rodaGuestDN,rodaAdminDN,rodaApacheDSDataDirectory);
    ldapUtility.setRODAAdministratorsDN(rodaAdministratorsDN);
    UserUtility.setLdapUtility(ldapUtility);
    if (!Files.exists(rodaApacheDSDataDirectory)) {
      Files.createDirectories(rodaApacheDSDataDirectory);
      final List<String> ldifFileNames=Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str");
      final List<String> ldifs=new ArrayList<>();
      for (      String ldifFileName : ldifFileNames) {
        final InputStream ldifInputStream=RodaCoreFactory.getConfigurationFileAsStream(RodaConstants.CORE_LDAP_FOLDER + "String_Node_Str" + ldifFileName);
        ldifs.add(IOUtils.toString(ldifInputStream,RodaConstants.DEFAULT_ENCODING));
        RodaUtils.closeQuietly(ldifInputStream);
      }
      RodaCoreFactory.ldapUtility.initDirectoryService(ldifs);
      indexUsersAndGroupsFromLDAP();
    }
 else {
      RodaCoreFactory.ldapUtility.initDirectoryService();
    }
    createRoles(rodaConfig);
  }
 catch (  final Exception e) {
    LOGGER.error("String_Node_Str",e);
    instantiatedWithoutErrors=false;
  }
}

Fixed version (ground truth):
/** 
 * Start ApacheDS.
 */
private static void startApacheDS(){
  rodaApacheDSDataDirectory=RodaCoreFactory.getDataPath().resolve(RodaConstants.CORE_LDAP_FOLDER);
  try {
    final Configuration rodaConfig=RodaCoreFactory.getRodaConfiguration();
    final boolean ldapStartServer=rodaConfig.getBoolean("String_Node_Str",false);
    final int ldapPort=rodaConfig.getInt("String_Node_Str",RodaConstants.CORE_LDAP_DEFAULT_PORT);
    final String ldapBaseDN=rodaConfig.getString("String_Node_Str","String_Node_Str");
    final String ldapPeopleDN=rodaConfig.getString("String_Node_Str","String_Node_Str");
    final String ldapGroupsDN=rodaConfig.getString("String_Node_Str","String_Node_Str");
    final String ldapRolesDN=rodaConfig.getString("String_Node_Str","String_Node_Str");
    final String ldapAdminDN=rodaConfig.getString("String_Node_Str","String_Node_Str");
    final String ldapAdminPassword=rodaConfig.getString("String_Node_Str","String_Node_Str");
    final String ldapPasswordDigestAlgorithm=rodaConfig.getString("String_Node_Str","String_Node_Str");
    final List<String> ldapProtectedUsers=RodaUtils.copyList(rodaConfig.getList("String_Node_Str"));
    final List<String> ldapProtectedGroups=RodaUtils.copyList(rodaConfig.getList("String_Node_Str"));
    final String rodaGuestDN=rodaConfig.getString("String_Node_Str","String_Node_Str");
    final String rodaAdminDN=rodaConfig.getString("String_Node_Str","String_Node_Str");
    final String rodaAdministratorsDN=rodaConfig.getString("String_Node_Str","String_Node_Str");
    RodaCoreFactory.ldapUtility=new LdapUtility(ldapStartServer,ldapPort,ldapBaseDN,ldapPeopleDN,ldapGroupsDN,ldapRolesDN,ldapAdminDN,ldapAdminPassword,ldapPasswordDigestAlgorithm,ldapProtectedUsers,ldapProtectedGroups,rodaGuestDN,rodaAdminDN,rodaApacheDSDataDirectory);
    ldapUtility.setRODAAdministratorsDN(rodaAdministratorsDN);
    UserUtility.setLdapUtility(ldapUtility);
    if (!Files.exists(rodaApacheDSDataDirectory)) {
      Files.createDirectories(rodaApacheDSDataDirectory);
      final List<String> ldifFileNames=Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str");
      final List<String> ldifs=new ArrayList<>();
      for (      String ldifFileName : ldifFileNames) {
        final InputStream ldifInputStream=RodaCoreFactory.getConfigurationFileAsStream(RodaConstants.CORE_LDAP_FOLDER + "String_Node_Str" + ldifFileName);
        ldifs.add(IOUtils.toString(ldifInputStream,RodaConstants.DEFAULT_ENCODING));
        RodaUtils.closeQuietly(ldifInputStream);
      }
      RodaCoreFactory.ldapUtility.initDirectoryService(ldifs);
      indexUsersAndGroupsFromLDAP();
    }
 else {
      RodaCoreFactory.ldapUtility.initDirectoryService();
    }
    createRoles(rodaConfig);
    indexUsersAndGroupsFromLDAP();
  }
 catch (  final Exception e) {
    LOGGER.error("String_Node_Str",e);
    instantiatedWithoutErrors=false;
  }
}