Program: 124922
Project: 124922
Buggy source:
private void setHCatalogRepositoryValue(HCatalogConnection connection,INode node,String repositoryValue){
  if (EHCatalogRepositoryToComponent.DISTRIBUTION.getRepositoryValue().equals(repositoryValue)) {
    String value=ComponentToRepositoryProperty.getParameterValue(connection,node,EHCatalogRepositoryToComponent.DISTRIBUTION.getParameterName());
    if (value != null) {
      connection.setDistribution(value);
    }
  }
 else   if (EHCatalogRepositoryToComponent.HCAT_VERSION.getRepositoryValue().equals(repositoryValue)) {
    String value=ComponentToRepositoryProperty.getParameterValue(connection,node,EHCatalogRepositoryToComponent.HCAT_VERSION.getParameterName());
    if (value != null) {
      connection.setHcatVersion(value);
    }
  }
 else   if (EHCatalogRepositoryToComponent.TEMPLETON_HOST.getRepositoryValue().equals(repositoryValue)) {
    String value=ComponentToRepositoryProperty.getParameterValue(connection,node,EHCatalogRepositoryToComponent.TEMPLETON_HOST.getParameterName());
    if (value != null) {
      connection.setHostName(value);
    }
  }
 else   if (EHCatalogRepositoryToComponent.TEMPLETON_PORT.getRepositoryValue().equals(repositoryValue)) {
    String value=ComponentToRepositoryProperty.getParameterValue(connection,node,EHCatalogRepositoryToComponent.TEMPLETON_PORT.getParameterName());
    if (value != null) {
      connection.setPort(value);
    }
  }
 else   if (EHCatalogRepositoryToComponent.DATABASE_NAME.getRepositoryValue().equals(repositoryValue)) {
    String value=ComponentToRepositoryProperty.getParameterValue(connection,node,EHCatalogRepositoryToComponent.DATABASE_NAME.getParameterName());
    if (value != null) {
      connection.setDatabase(value);
    }
  }
 else   if (EHCatalogRepositoryToComponent.USERNAME.getRepositoryValue().equals(repositoryValue)) {
    String value=ComponentToRepositoryProperty.getParameterValue(connection,node,EHCatalogRepositoryToComponent.USERNAME.getParameterName());
    if (value != null) {
      connection.setUserName(value);
    }
  }
}

Fixed version (ground truth):
private void setHCatalogRepositoryValue(HCatalogConnection connection,INode node,IElementParameter param){
  if (EHCatalogRepositoryToComponent.DISTRIBUTION.getRepositoryValue().equals(param.getRepositoryValue())) {
    String value=ComponentToRepositoryProperty.getParameterValue(connection,node,param);
    if (value != null) {
      connection.setDistribution(value);
    }
  }
 else   if (EHCatalogRepositoryToComponent.HCAT_VERSION.getRepositoryValue().equals(param.getRepositoryValue())) {
    String value=ComponentToRepositoryProperty.getParameterValue(connection,node,param);
    if (value != null) {
      connection.setHcatVersion(value);
    }
  }
 else   if (EHCatalogRepositoryToComponent.TEMPLETON_HOST.getRepositoryValue().equals(param.getRepositoryValue())) {
    String value=ComponentToRepositoryProperty.getParameterValue(connection,node,param);
    if (value != null) {
      connection.setHostName(value);
    }
  }
 else   if (EHCatalogRepositoryToComponent.TEMPLETON_PORT.getRepositoryValue().equals(param.getRepositoryValue())) {
    String value=ComponentToRepositoryProperty.getParameterValue(connection,node,param);
    if (value != null) {
      connection.setPort(value);
    }
  }
 else   if (EHCatalogRepositoryToComponent.DATABASE_NAME.getRepositoryValue().equals(param.getRepositoryValue())) {
    String value=ComponentToRepositoryProperty.getParameterValue(connection,node,param);
    if (value != null) {
      connection.setDatabase(value);
    }
  }
 else   if (EHCatalogRepositoryToComponent.USERNAME.getRepositoryValue().equals(param.getRepositoryValue())) {
    String value=ComponentToRepositoryProperty.getParameterValue(connection,node,param);
    if (value != null) {
      connection.setUserName(value);
    }
  }
}