Program: 167951
Project: 167951
Buggy source:
public ServerEnvironment(Properties props,Map<String,String> env,String serverConfig,boolean standalone){
  this.standalone=standalone;
  if (props == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  String hostName=props.getProperty(HOST_NAME);
  String qualifiedHostName=props.getProperty(QUALIFIED_HOST_NAME);
  if (qualifiedHostName == null) {
    qualifiedHostName=hostName;
    if (qualifiedHostName == null) {
      qualifiedHostName=env.get("String_Node_Str");
    }
    if (qualifiedHostName == null) {
      qualifiedHostName=env.get("String_Node_Str");
    }
    if (qualifiedHostName == null) {
      try {
        qualifiedHostName=InetAddress.getLocalHost().getHostName();
      }
 catch (      UnknownHostException e) {
        qualifiedHostName=null;
      }
    }
    if (qualifiedHostName != null && qualifiedHostName.matches("String_Node_Str")) {
      qualifiedHostName=null;
    }
    if (qualifiedHostName == null) {
      qualifiedHostName="String_Node_Str";
    }
    qualifiedHostName=qualifiedHostName.trim().toLowerCase();
  }
  this.qualifiedHostName=qualifiedHostName;
  if (hostName == null) {
    final int idx=qualifiedHostName.indexOf('.');
    hostName=idx == -1 ? qualifiedHostName : qualifiedHostName.substring(0,idx);
  }
  this.hostName=hostName;
  String serverName=props.getProperty(SERVER_NAME);
  if (serverName == null) {
    serverName=hostName;
  }
  this.serverName=serverName;
  String nodeName=props.getProperty(NODE_NAME);
  if (nodeName == null) {
    nodeName=serverName;
  }
  this.nodeName=nodeName;
  javaExtDirs=getFilesFromProperty(JAVA_EXT_DIRS,props);
  homeDir=getFileFromProperty(HOME_DIR,props);
  if (homeDir == null)   throw new IllegalStateException("String_Node_Str" + HOME_DIR);
  File tmp=getFileFromProperty(MODULES_DIR,props);
  if (tmp == null) {
    tmp=new File(homeDir,"String_Node_Str");
  }
  modulesDir=tmp;
  tmp=getFileFromProperty(SERVER_BASE_DIR,props);
  if (tmp == null) {
    tmp=new File(homeDir,standalone ? "String_Node_Str" : "String_Node_Str" + serverName);
  }
  serverBaseDir=tmp;
  tmp=getFileFromProperty(SERVER_CONFIG_DIR,props);
  if (tmp == null) {
    tmp=new File(serverBaseDir,"String_Node_Str");
  }
  serverConfigurationDir=tmp;
  serverConfigurationFile=standalone ? new ConfigurationFile(serverConfigurationDir,"String_Node_Str",serverConfig) : null;
  tmp=getFileFromProperty(SERVER_DATA_DIR,props);
  if (tmp == null) {
    tmp=new File(serverBaseDir,"String_Node_Str");
  }
  serverDataDir=tmp;
  tmp=getFileFromProperty(SERVER_DEPLOY_DIR,props);
  if (tmp == null) {
    tmp=new File(serverDataDir,"String_Node_Str");
  }
  serverDeployDir=tmp;
  tmp=getFileFromProperty(SERVER_SYSTEM_DEPLOY_DIR,props);
  if (tmp == null) {
    tmp=new File(serverDataDir,"String_Node_Str");
  }
  serverSystemDeployDir=tmp;
  tmp=getFileFromProperty(SERVER_LOG_DIR,props);
  if (tmp == null) {
    tmp=new File(serverBaseDir,"String_Node_Str");
  }
  serverLogDir=tmp;
  tmp=getFileFromProperty(SERVER_TEMP_DIR,props);
  if (tmp == null) {
    tmp=new File(serverBaseDir,"String_Node_Str");
  }
  serverTempDir=tmp;
}

Fixed version (ground truth):
public ServerEnvironment(Properties props,Map<String,String> env,String serverConfig,boolean standalone){
  this.standalone=standalone;
  if (props == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  String hostName=props.getProperty(HOST_NAME);
  String qualifiedHostName=props.getProperty(QUALIFIED_HOST_NAME);
  if (qualifiedHostName == null) {
    qualifiedHostName=hostName;
    if (qualifiedHostName == null) {
      qualifiedHostName=env.get("String_Node_Str");
    }
    if (qualifiedHostName == null) {
      qualifiedHostName=env.get("String_Node_Str");
    }
    if (qualifiedHostName == null) {
      try {
        qualifiedHostName=InetAddress.getLocalHost().getHostName();
      }
 catch (      UnknownHostException e) {
        qualifiedHostName=null;
      }
    }
    if (qualifiedHostName != null && qualifiedHostName.matches("String_Node_Str")) {
      qualifiedHostName=null;
    }
    if (qualifiedHostName == null) {
      qualifiedHostName="String_Node_Str";
    }
    qualifiedHostName=qualifiedHostName.trim().toLowerCase();
  }
  this.qualifiedHostName=qualifiedHostName;
  if (hostName == null) {
    final int idx=qualifiedHostName.indexOf('.');
    hostName=idx == -1 ? qualifiedHostName : qualifiedHostName.substring(0,idx);
  }
  this.hostName=hostName;
  String serverName=props.getProperty(SERVER_NAME);
  if (serverName == null) {
    serverName=hostName;
  }
  this.serverName=serverName;
  String nodeName=props.getProperty(NODE_NAME);
  if (nodeName == null) {
    nodeName=serverName;
  }
  this.nodeName=nodeName;
  javaExtDirs=getFilesFromProperty(JAVA_EXT_DIRS,props);
  homeDir=getFileFromProperty(HOME_DIR,props);
  if (homeDir == null)   throw new IllegalStateException("String_Node_Str" + HOME_DIR);
  File tmp=getFileFromProperty(MODULES_DIR,props);
  if (tmp == null) {
    tmp=new File(homeDir,"String_Node_Str");
  }
  modulesDir=tmp;
  tmp=getFileFromProperty(SERVER_BASE_DIR,props);
  if (tmp == null) {
    tmp=new File(homeDir,standalone ? "String_Node_Str" : "String_Node_Str" + serverName);
  }
  serverBaseDir=tmp;
  tmp=getFileFromProperty(SERVER_CONFIG_DIR,props);
  if (tmp == null) {
    tmp=new File(serverBaseDir,"String_Node_Str");
  }
  serverConfigurationDir=tmp;
  serverConfigurationFile=standalone ? new ConfigurationFile(serverConfigurationDir,"String_Node_Str",serverConfig) : null;
  tmp=getFileFromProperty(SERVER_DATA_DIR,props);
  if (tmp == null) {
    tmp=new File(serverBaseDir,"String_Node_Str");
  }
  serverDataDir=tmp;
  tmp=getFileFromProperty(SERVER_DEPLOY_DIR,props);
  if (tmp == null) {
    tmp=new File(serverDataDir,"String_Node_Str");
  }
  serverDeployDir=tmp;
  tmp=getFileFromProperty(SERVER_LOG_DIR,props);
  if (tmp == null) {
    tmp=new File(serverBaseDir,"String_Node_Str");
  }
  serverLogDir=tmp;
  tmp=getFileFromProperty(SERVER_TEMP_DIR,props);
  if (tmp == null) {
    tmp=new File(serverBaseDir,"String_Node_Str");
  }
  serverTempDir=tmp;
}