Program: 172234
Project: 172234
Buggy source:
/** 
 * Process the security configuration
 * @param config Config
 */
protected void processSecurityConfig(Config config){
  SecurityConfigSection secConfig=new SecurityConfigSection(this);
  try {
    ConfigElement globalACLs=config.getConfigElement("String_Node_Str");
    if (globalACLs != null) {
      AccessControlList acls=processAccessControlList(secConfig,globalACLs);
      if (acls != null)       secConfig.setGlobalAccessControls(acls);
    }
    ConfigElement jceElem=config.getConfigElement("String_Node_Str");
    if (jceElem != null) {
      secConfig.setJCEProvider(jceElem.getValue());
    }
 else {
      secConfig.setJCEProvider("String_Node_Str");
    }
    ConfigElement mapperElem=config.getConfigElement("String_Node_Str");
    if (mapperElem != null) {
      String mapperType=mapperElem.getAttribute("String_Node_Str");
      String mapperClass=null;
      if (mapperType.equalsIgnoreCase("String_Node_Str"))       mapperClass="String_Node_Str";
 else       if (mapperType.equalsIgnoreCase("String_Node_Str"))       mapperClass="String_Node_Str";
 else {
        ConfigElement classElem=mapperElem.getChild("String_Node_Str");
        if (classElem == null)         throw new InvalidConfigurationException("String_Node_Str");
        mapperClass=classElem.getValue();
      }
      secConfig.setShareMapper(mapperClass,mapperElem);
    }
 else {
      if (m_tenantService != null && m_tenantService.isEnabled()) {
        secConfig.setShareMapper("String_Node_Str",new GenericConfigElement("String_Node_Str"));
      }
    }
    ConfigElement domainMappings=config.getConfigElement("String_Node_Str");
    if (domainMappings != null) {
      List<ConfigElement> mappings=domainMappings.getChildren();
      if (mappings != null) {
        DomainMapping mapping=null;
        for (        ConfigElement domainMap : mappings) {
          if (domainMap.getName().equals("String_Node_Str")) {
            String name=domainMap.getAttribute("String_Node_Str");
            if (domainMap.hasAttribute("String_Node_Str")) {
              String subnetStr=domainMap.getAttribute("String_Node_Str");
              String maskStr=domainMap.getAttribute("String_Node_Str");
              int subnet=IPAddress.parseNumericAddress(subnetStr);
              int mask=IPAddress.parseNumericAddress(maskStr);
              if (subnet == 0 || mask == 0)               throw new AlfrescoRuntimeException("String_Node_Str" + name);
              mapping=new SubnetDomainMapping(name,subnet,mask);
            }
 else             if (domainMap.hasAttribute("String_Node_Str")) {
              String rangeFromStr=domainMap.getAttribute("String_Node_Str");
              String rangeToStr=domainMap.getAttribute("String_Node_Str");
              int rangeFrom=IPAddress.parseNumericAddress(rangeFromStr);
              int rangeTo=IPAddress.parseNumericAddress(rangeToStr);
              if (rangeFrom == 0 || rangeTo == 0)               throw new AlfrescoRuntimeException("String_Node_Str" + name);
              mapping=new RangeDomainMapping(name,rangeFrom,rangeTo);
            }
 else             throw new AlfrescoRuntimeException("String_Node_Str");
            secConfig.addDomainMapping(mapping);
          }
        }
      }
    }
  }
 catch (  InvalidConfigurationException ex) {
    throw new AlfrescoRuntimeException(ex.getMessage());
  }
}

Fixed version (ground truth):
/** 
 * Process the security configuration
 * @param config Config
 */
protected void processSecurityConfig(Config config){
  SecurityConfigSection secConfig=new SecurityConfigSection(this);
  try {
    GenericConfigElement params=new GenericConfigElement("String_Node_Str");
    if (config.getConfigElement("String_Node_Str") != null)     params.addChild(new GenericConfigElement("String_Node_Str"));
    secConfig.setAccessControlManager("String_Node_Str",params);
  }
 catch (  Exception ex) {
    throw new AlfrescoRuntimeException("String_Node_Str",ex);
  }
  try {
    ConfigElement globalACLs=config.getConfigElement("String_Node_Str");
    if (globalACLs != null) {
      AccessControlList acls=processAccessControlList(secConfig,globalACLs);
      if (acls != null)       secConfig.setGlobalAccessControls(acls);
    }
    ConfigElement jceElem=config.getConfigElement("String_Node_Str");
    if (jceElem != null) {
      secConfig.setJCEProvider(jceElem.getValue());
    }
 else {
      secConfig.setJCEProvider("String_Node_Str");
    }
    ConfigElement mapperElem=config.getConfigElement("String_Node_Str");
    if (mapperElem != null) {
      String mapperType=mapperElem.getAttribute("String_Node_Str");
      String mapperClass=null;
      if (mapperType.equalsIgnoreCase("String_Node_Str"))       mapperClass="String_Node_Str";
 else       if (mapperType.equalsIgnoreCase("String_Node_Str"))       mapperClass="String_Node_Str";
 else {
        ConfigElement classElem=mapperElem.getChild("String_Node_Str");
        if (classElem == null)         throw new InvalidConfigurationException("String_Node_Str");
        mapperClass=classElem.getValue();
      }
      secConfig.setShareMapper(mapperClass,mapperElem);
    }
 else {
      if (m_tenantService != null && m_tenantService.isEnabled()) {
        secConfig.setShareMapper("String_Node_Str",new GenericConfigElement("String_Node_Str"));
      }
    }
    ConfigElement domainMappings=config.getConfigElement("String_Node_Str");
    if (domainMappings != null) {
      List<ConfigElement> mappings=domainMappings.getChildren();
      if (mappings != null) {
        DomainMapping mapping=null;
        for (        ConfigElement domainMap : mappings) {
          if (domainMap.getName().equals("String_Node_Str")) {
            String name=domainMap.getAttribute("String_Node_Str");
            if (domainMap.hasAttribute("String_Node_Str")) {
              String subnetStr=domainMap.getAttribute("String_Node_Str");
              String maskStr=domainMap.getAttribute("String_Node_Str");
              int subnet=IPAddress.parseNumericAddress(subnetStr);
              int mask=IPAddress.parseNumericAddress(maskStr);
              if (subnet == 0 || mask == 0)               throw new AlfrescoRuntimeException("String_Node_Str" + name);
              mapping=new SubnetDomainMapping(name,subnet,mask);
            }
 else             if (domainMap.hasAttribute("String_Node_Str")) {
              String rangeFromStr=domainMap.getAttribute("String_Node_Str");
              String rangeToStr=domainMap.getAttribute("String_Node_Str");
              int rangeFrom=IPAddress.parseNumericAddress(rangeFromStr);
              int rangeTo=IPAddress.parseNumericAddress(rangeToStr);
              if (rangeFrom == 0 || rangeTo == 0)               throw new AlfrescoRuntimeException("String_Node_Str" + name);
              mapping=new RangeDomainMapping(name,rangeFrom,rangeTo);
            }
 else             throw new AlfrescoRuntimeException("String_Node_Str");
            secConfig.addDomainMapping(mapping);
          }
        }
      }
    }
  }
 catch (  InvalidConfigurationException ex) {
    throw new AlfrescoRuntimeException(ex.getMessage());
  }
}