Program: 33625
Project: 33625
Buggy source:
/** 
 * Constructor using credentials and cluster config.
 * @param credentials the credentials.
 * @param config The cluster configuration.
 */
public DeepConnection(ICredentials credentials,ConnectorClusterConfig config){
  if (credentials != null) {
  }
  Map<String,String> clusterOptions=config.getClusterOptions();
  ExtractorConfig<Cells> extractorconfig=new ExtractorConfig<>(Cells.class);
  Map<String,Serializable> values=new HashMap<>();
  if (clusterOptions.get(ExtractorConstants.HOSTS) != null) {
    values.put(ExtractorConstants.HOSTS,clusterOptions.get(ExtractorConstants.HOSTS));
    String[] hosts=ConnectorParser.hosts(clusterOptions.get(ExtractorConstants.HOSTS));
    values.put(ExtractorConstants.HOST,hosts[0]);
  }
 else {
    values.put(ExtractorConstants.HOST,clusterOptions.get(ExtractorConstants.HOST));
  }
  if (clusterOptions.get(ExtractorConstants.PORTS) != null) {
    values.put(ExtractorConstants.PORTS,clusterOptions.get(ExtractorConstants.PORTS));
    String[] ports=ConnectorParser.ports(clusterOptions.get(ExtractorConstants.PORTS));
    values.put(ExtractorConstants.PORT,ports[0]);
  }
 else {
    values.put(ExtractorConstants.PORT,clusterOptions.get(ExtractorConstants.PORT));
  }
  if (clusterOptions.get(ExtractorConstants.HDFS_SCHEMA) != null) {
    values.put(ExtractorConstants.HDFS_SCHEMA,clusterOptions.get(ExtractorConstants.HDFS_SCHEMA));
  }
  if (clusterOptions.get(ExtractorConstants.HDFS_FILE_SEPARATOR) != null) {
    values.put(ExtractorConstants.HDFS_FILE_SEPARATOR,clusterOptions.get(ExtractorConstants.HDFS_FILE_SEPARATOR));
  }
  if (clusterOptions.get(ExtractorConstants.HDFS_FILE_PATH) != null) {
    values.put(ExtractorConstants.HDFS_FILE_PATH,clusterOptions.get(ExtractorConstants.HDFS_FILE_PATH));
  }
  extractorconfig.setValues(values);
  ClusterProperties clusterProperties=new ClusterProperties();
  String dataBaseName=config.getDataStoreName().getName();
  extractorconfig.setExtractorImplClassName(clusterProperties.getValue("String_Node_Str" + dataBaseName + "String_Node_Str"+ ExtractorConstants.INNERCLASS));
  extractorConfig=extractorconfig;
  configProperties=ConnectionConfiguration.getConfigProperties();
  deepSparkContext=ConnectionConfiguration.getDeepContext();
  isConnect=true;
}

Fixed version (ground truth):
/** 
 * Constructor using credentials and cluster config.
 * @param credentials the credentials.
 * @param config The cluster configuration.
 */
public DeepConnection(ICredentials credentials,ConnectorClusterConfig config) throws ConnectionException {
  if (credentials != null) {
  }
  Map<String,String> clusterOptions=config.getClusterOptions();
  ExtractorConfig<Cells> extractorconfig=new ExtractorConfig<>(Cells.class);
  Map<String,Serializable> values=new HashMap<>();
  if (clusterOptions.get(ExtractorConstants.HOSTS) != null) {
    values.put(ExtractorConstants.HOSTS,clusterOptions.get(ExtractorConstants.HOSTS));
    String[] hosts=ConnectorParser.hosts(clusterOptions.get(ExtractorConstants.HOSTS));
    values.put(ExtractorConstants.HOST,hosts[0]);
  }
 else {
    values.put(ExtractorConstants.HOST,clusterOptions.get(ExtractorConstants.HOST));
  }
  if (clusterOptions.get(ExtractorConstants.PORTS) != null) {
    values.put(ExtractorConstants.PORTS,clusterOptions.get(ExtractorConstants.PORTS));
    String[] ports=ConnectorParser.ports(clusterOptions.get(ExtractorConstants.PORTS));
    values.put(ExtractorConstants.PORT,ports[0]);
  }
 else {
    values.put(ExtractorConstants.PORT,clusterOptions.get(ExtractorConstants.PORT));
  }
  if (clusterOptions.get(ExtractorConstants.HDFS_SCHEMA) != null) {
    values.put(ExtractorConstants.HDFS_SCHEMA,clusterOptions.get(ExtractorConstants.HDFS_SCHEMA));
  }
  if (clusterOptions.get(ExtractorConstants.HDFS_FILE_SEPARATOR) != null) {
    values.put(ExtractorConstants.HDFS_FILE_SEPARATOR,clusterOptions.get(ExtractorConstants.HDFS_FILE_SEPARATOR));
  }
  if (clusterOptions.get(ExtractorConstants.HDFS_FILE_PATH) != null) {
    values.put(ExtractorConstants.HDFS_FILE_PATH,clusterOptions.get(ExtractorConstants.HDFS_FILE_PATH));
  }
  extractorconfig.setValues(values);
  ClusterProperties clusterProperties=new ClusterProperties();
  String dataBaseName=config.getDataStoreName().getName();
  String extractorImplClassName=clusterProperties.getValue("String_Node_Str" + dataBaseName + "String_Node_Str"+ DeepConnectorConstants.INNERCLASS);
  if (extractorImplClassName == null) {
    throw new ConnectionException("String_Node_Str");
  }
  extractorconfig.setExtractorImplClassName(extractorImplClassName);
  extractorConfig=extractorconfig;
  configProperties=ConnectionConfiguration.getConfigProperties();
  deepSparkContext=ConnectionConfiguration.getDeepContext();
  isConnect=true;
}