Program: 52301
Project: 52301
Buggy source:
/** 
 * Creates a new instance of RadiusAuthentictor, configured with parameters specified within guacamole.properties.
 * @return A new RadiusAuthenticator instance which has been configured with parameters from guacamole.properties, or null if configuration fails.
 */
private RadiusAuthenticator setupRadiusAuthenticator(RadiusClient radiusClient) throws GuacamoleException {
  if (radiusClient == null) {
    logger.error("String_Node_Str");
    logger.debug("String_Node_Str");
    return null;
  }
  RadiusAuthenticator radAuth=radiusClient.getAuthProtocol(confService.getRadiusAuthProtocol());
  if (radAuth == null)   throw new GuacamoleException("String_Node_Str" + confService.getRadiusAuthProtocol());
  if (radAuth instanceof PEAPAuthenticator || radAuth instanceof EAPTLSAuthenticator || radAuth instanceof EAPTTLSAuthenticator) {
    LocalEnvironment guacEnv=new LocalEnvironment();
    String guacHome=guacEnv.getGuacamoleHome();
    String caFile=confService.getRadiusCAFile();
    String caPassword=confService.getRadiusCAPassword();
    String keyFile=confService.getRadiusKeyFile();
    String keyPassword=confService.getRadiusKeyPassword();
    String innerProtocol=confService.getRadiusEAPTTLSInnerProtocol();
    if (caFile != null) {
      ((EAPTLSAuthenticator)radAuth).setCaFile((new File(guacHome,caFile)).toString());
      ((EAPTLSAuthenticator)radAuth).setCaFileType(confService.getRadiusCAType());
      if (caPassword != null)       ((EAPTLSAuthenticator)radAuth).setCaPassword(caPassword);
    }
    if (keyPassword != null)     ((EAPTLSAuthenticator)radAuth).setKeyPassword(keyPassword);
    ((EAPTLSAuthenticator)radAuth).setKeyFile((new File(guacHome,keyFile)).toString());
    ((EAPTLSAuthenticator)radAuth).setKeyFileType(confService.getRadiusKeyType());
    ((EAPTLSAuthenticator)radAuth).setTrustAll(confService.getRadiusTrustAll());
  }
  if (radAuth instanceof EAPTTLSAuthenticator) {
    if (innerProtocol == null)     throw new GuacamoleException("String_Node_Str");
    ((EAPTTLSAuthenticator)radAuth).setInnerProtocol(innerProtocol);
  }
  return radAuth;
}

Fixed version (ground truth):
/** 
 * Creates a new instance of RadiusAuthentictor, configured with parameters specified within guacamole.properties.
 * @return A new RadiusAuthenticator instance which has been configured with parameters from guacamole.properties, or null if configuration fails.
 */
private RadiusAuthenticator setupRadiusAuthenticator(RadiusClient radiusClient) throws GuacamoleException {
  if (radiusClient == null) {
    logger.error("String_Node_Str");
    logger.debug("String_Node_Str");
    return null;
  }
  RadiusAuthenticator radAuth=radiusClient.getAuthProtocol(confService.getRadiusAuthProtocol());
  if (radAuth == null)   throw new GuacamoleException("String_Node_Str" + confService.getRadiusAuthProtocol());
  if (radAuth instanceof PEAPAuthenticator || radAuth instanceof EAPTLSAuthenticator || radAuth instanceof EAPTTLSAuthenticator) {
    LocalEnvironment guacEnv=new LocalEnvironment();
    File guacHome=guacEnv.getGuacamoleHome();
    String caFile=confService.getRadiusCAFile();
    String caPassword=confService.getRadiusCAPassword();
    String keyFile=confService.getRadiusKeyFile();
    String keyPassword=confService.getRadiusKeyPassword();
    if (caFile != null) {
      ((EAPTLSAuthenticator)radAuth).setCaFile((new File(guacHome,caFile)).toString());
      ((EAPTLSAuthenticator)radAuth).setCaFileType(confService.getRadiusCAType());
      if (caPassword != null)       ((EAPTLSAuthenticator)radAuth).setCaPassword(caPassword);
    }
    if (keyPassword != null)     ((EAPTLSAuthenticator)radAuth).setKeyPassword(keyPassword);
    ((EAPTLSAuthenticator)radAuth).setKeyFile((new File(guacHome,keyFile)).toString());
    ((EAPTLSAuthenticator)radAuth).setKeyFileType(confService.getRadiusKeyType());
    ((EAPTLSAuthenticator)radAuth).setTrustAll(confService.getRadiusTrustAll());
  }
  if (radAuth instanceof EAPTTLSAuthenticator) {
    String innerProtocol=confService.getRadiusEAPTTLSInnerProtocol();
    if (innerProtocol == null)     throw new GuacamoleException("String_Node_Str");
    ((EAPTTLSAuthenticator)radAuth).setInnerProtocol(innerProtocol);
  }
  return radAuth;
}