Program: 30408
Project: 30408
Buggy source:
public void postConstruct(){
  for (  Config config : configs.getConfig()) {
    SecurityService service=config.getSecurityService();
    if (service != null) {
      upgradeJACCProvider(service);
    }
    populateSSLElement(config);
  }
  String instanceRoot=env.getInstanceRoot().getAbsolutePath();
  File genPolicyDir=new File(instanceRoot,DIR_GENERATED_POLICY);
  if (genPolicyDir != null) {
    File[] applicationDirs=genPolicyDir.listFiles();
    if (applicationDirs != null) {
      for (      File policyDir : applicationDirs) {
        deleteFile(genPolicyDir);
      }
    }
  }
  for (  Config config : configs.getConfig()) {
    SecurityService service=config.getSecurityService();
    List<AuthRealm> authRealms=service.getAuthRealm();
    try {
      for (      AuthRealm authRealm : authRealms) {
        if (JDBC_REALM_CLASSNAME.equals(authRealm.getClassname())) {
          Property digestAlgoProp=authRealm.getProperty(PARAM_DIGEST_ALGORITHM);
          if (digestAlgoProp != null) {
            String digestAlgo=digestAlgoProp.getValue();
            if (digestAlgo == null || digestAlgo.isEmpty()) {
              digestAlgoProp.setValue("String_Node_Str");
            }
          }
 else {
            ConfigSupport.apply(new SingleConfigCode<AuthRealm>(){
              public Object run(              AuthRealm updatedAuthRealm) throws PropertyVetoException, TransactionFailure {
                Property prop1=updatedAuthRealm.createChild(Property.class);
                prop1.setName(PARAM_DIGEST_ALGORITHM);
                prop1.setValue("String_Node_Str");
                updatedAuthRealm.getProperty().add(prop1);
                return null;
              }
            }
,authRealm);
          }
        }
      }
    }
 catch (    PropertyVetoException pve) {
      _logger.log(Level.SEVERE,"String_Node_Str",pve);
      throw new RuntimeException(pve);
    }
catch (    TransactionFailure tf) {
      _logger.log(Level.SEVERE,"String_Node_Str",tf);
      throw new RuntimeException(tf);
    }
  }
  if (requiresSecureAdmin()) {
    _logger.log(Level.WARNING,localStrings.getLocalString("String_Node_Str","String_Node_Str" + "String_Node_Str"));
  }
  for (  Config config : configs.getConfig()) {
    AdminService service=config.getAdminService();
    for (    JmxConnector jmxConnector : service.getJmxConnector()) {
      Ssl sslElement=jmxConnector.getSsl();
      if (sslElement != null) {
        try {
          ConfigSupport.apply(new SingleConfigCode<Ssl>(){
            public Object run(            Ssl ssl) throws PropertyVetoException, TransactionFailure {
              ssl.setClassname(GF_SSL_IMPL_NAME);
              return null;
            }
          }
,sslElement);
        }
 catch (        TransactionFailure tf) {
          _logger.log(Level.SEVERE,"String_Node_Str",tf);
          throw new RuntimeException(tf);
        }
      }
    }
  }
}

Fixed version (ground truth):
public void postConstruct(){
  for (  Config config : configs.getConfig()) {
    SecurityService service=config.getSecurityService();
    if (service != null) {
      upgradeJACCProvider(service);
    }
    populateSSLElement(config);
  }
  String instanceRoot=env.getInstanceRoot().getAbsolutePath();
  File genPolicyDir=new File(instanceRoot,DIR_GENERATED_POLICY);
  if (genPolicyDir != null) {
    File[] applicationDirs=genPolicyDir.listFiles();
    if (applicationDirs != null) {
      for (      File policyDir : applicationDirs) {
        deleteFile(policyDir);
      }
    }
  }
  for (  Config config : configs.getConfig()) {
    SecurityService service=config.getSecurityService();
    List<AuthRealm> authRealms=service.getAuthRealm();
    try {
      for (      AuthRealm authRealm : authRealms) {
        if (JDBC_REALM_CLASSNAME.equals(authRealm.getClassname())) {
          Property digestAlgoProp=authRealm.getProperty(PARAM_DIGEST_ALGORITHM);
          if (digestAlgoProp != null) {
            String digestAlgo=digestAlgoProp.getValue();
            if (digestAlgo == null || digestAlgo.isEmpty()) {
              digestAlgoProp.setValue("String_Node_Str");
            }
          }
 else {
            ConfigSupport.apply(new SingleConfigCode<AuthRealm>(){
              public Object run(              AuthRealm updatedAuthRealm) throws PropertyVetoException, TransactionFailure {
                Property prop1=updatedAuthRealm.createChild(Property.class);
                prop1.setName(PARAM_DIGEST_ALGORITHM);
                prop1.setValue("String_Node_Str");
                updatedAuthRealm.getProperty().add(prop1);
                return null;
              }
            }
,authRealm);
          }
        }
      }
    }
 catch (    PropertyVetoException pve) {
      _logger.log(Level.SEVERE,"String_Node_Str",pve);
      throw new RuntimeException(pve);
    }
catch (    TransactionFailure tf) {
      _logger.log(Level.SEVERE,"String_Node_Str",tf);
      throw new RuntimeException(tf);
    }
  }
  if (requiresSecureAdmin()) {
    _logger.log(Level.WARNING,localStrings.getLocalString("String_Node_Str","String_Node_Str" + "String_Node_Str"));
  }
  for (  Config config : configs.getConfig()) {
    AdminService service=config.getAdminService();
    for (    JmxConnector jmxConnector : service.getJmxConnector()) {
      Ssl sslElement=jmxConnector.getSsl();
      if (sslElement != null) {
        try {
          ConfigSupport.apply(new SingleConfigCode<Ssl>(){
            public Object run(            Ssl ssl) throws PropertyVetoException, TransactionFailure {
              ssl.setClassname(GF_SSL_IMPL_NAME);
              return null;
            }
          }
,sslElement);
        }
 catch (        TransactionFailure tf) {
          _logger.log(Level.SEVERE,"String_Node_Str",tf);
          throw new RuntimeException(tf);
        }
      }
    }
  }
}