Program: 102183
Project: 102183
Buggy source:
void setConnectionProperties(){
  Properties props=new Properties();
  currentProvider=null;
  if (useModelCheckBox.getSelection()) {
    if (selectedModelResource != null) {
      try {
        IConnectionInfoProvider provider=getProvider(selectedModelResource);
        if (provider != null) {
          currentProvider=provider;
          IConnectionProfile modelCP=provider.getConnectionProfile(selectedModelResource);
          props=provider.getTeiidRelatedProperties(modelCP);
        }
      }
 catch (      ModelWorkspaceException e) {
        DqpUiConstants.UTIL.log(e);
      }
catch (      Exception e) {
      }
    }
  }
 else   if (profileWorker.getConnectionProfile() != null) {
    try {
      IConnectionInfoProvider provider=getProvider(profileWorker.getConnectionProfile());
      if (provider != null) {
        currentProvider=provider;
        props=provider.getTeiidRelatedProperties(profileWorker.getConnectionProfile());
      }
    }
 catch (    ModelWorkspaceException e) {
      DqpUiConstants.UTIL.log(e);
    }
catch (    Exception e) {
      DqpUiConstants.UTIL.log(e);
    }
  }
  if (props != null && !props.isEmpty()) {
    teiidDataSourceProperties=props;
    Collection<StringKeyValuePair> propsColl=new ArrayList<StringKeyValuePair>();
    for (    Object key : props.keySet()) {
      String keyStr=(String)key;
      String value=props.getProperty((String)key);
      if (keyStr.equalsIgnoreCase(PASSWORD)) {
        value=HIDDEN_PASSWORD;
      }
      propsColl.add(new StringKeyValuePair(keyStr,value));
    }
    propsViewer.setInput(propsColl);
  }
 else {
    teiidDataSourceProperties.clear();
    propsViewer.setInput(new ArrayList<StringKeyValuePair>());
  }
  validateInputs();
}

Fixed version (ground truth):
void setConnectionProperties(){
  Properties props=new Properties();
  currentProvider=null;
  if (useModelCheckBox.getSelection()) {
    if (selectedModelResource != null) {
      try {
        IConnectionInfoProvider provider=getProvider(selectedModelResource);
        if (provider != null) {
          currentProvider=provider;
          IConnectionProfile modelCP=provider.getConnectionProfile(selectedModelResource);
          props=provider.getTeiidRelatedProperties(modelCP);
          connRequiresPassword=provider.requiresPassword(provider.getConnectionProfile(selectedModelResource));
        }
      }
 catch (      ModelWorkspaceException e) {
        DqpUiConstants.UTIL.log(e);
      }
catch (      Exception e) {
      }
    }
  }
 else   if (profileWorker.getConnectionProfile() != null) {
    try {
      IConnectionInfoProvider provider=getProvider(profileWorker.getConnectionProfile());
      if (provider != null) {
        currentProvider=provider;
        props=provider.getTeiidRelatedProperties(profileWorker.getConnectionProfile());
        connRequiresPassword=provider.requiresPassword(profileWorker.getConnectionProfile());
      }
    }
 catch (    ModelWorkspaceException e) {
      DqpUiConstants.UTIL.log(e);
    }
catch (    Exception e) {
      DqpUiConstants.UTIL.log(e);
    }
  }
  if (props != null && !props.isEmpty()) {
    teiidDataSourceProperties=props;
    Collection<StringKeyValuePair> propsColl=new ArrayList<StringKeyValuePair>();
    for (    Object key : props.keySet()) {
      String keyStr=(String)key;
      String value=props.getProperty((String)key);
      if (keyStr.equalsIgnoreCase(PASSWORD)) {
        value=HIDDEN_PASSWORD;
      }
      propsColl.add(new StringKeyValuePair(keyStr,value));
    }
    propsViewer.setInput(propsColl);
  }
 else {
    teiidDataSourceProperties.clear();
    propsViewer.setInput(new ArrayList<StringKeyValuePair>());
  }
  validateInputs();
}