Program: 127156
Project: 127156
Buggy source:
public static void setPropertiesForContextMode(ConnectionItem connectionItem,ContextItem contextItem,Set<IConnParamName> paramSet,Map<String,String> map){
  if (connectionItem == null || contextItem == null) {
    return;
  }
  final String label=contextItem.getProperty().getLabel();
  Connection conn=connectionItem.getConnection();
  if (conn instanceof DatabaseConnection) {
    DBConnectionContextUtils.setPropertiesForContextMode(label,(DatabaseConnection)conn,paramSet,map);
  }
 else   if (conn instanceof FileConnection) {
    FileConnectionContextUtils.setPropertiesForContextMode(label,(FileConnection)conn,paramSet);
  }
 else   if (conn instanceof LdifFileConnection) {
    OtherConnectionContextUtils.setLdifFilePropertiesForContextMode(label,(LdifFileConnection)conn);
  }
 else   if (conn instanceof XmlFileConnection) {
    OtherConnectionContextUtils.setXmlFilePropertiesForContextMode(label,(XmlFileConnection)conn);
  }
 else   if (conn instanceof LDAPSchemaConnection) {
    OtherConnectionContextUtils.setLDAPSchemaPropertiesForContextMode(label,(LDAPSchemaConnection)conn);
  }
 else   if (conn instanceof WSDLSchemaConnection) {
    OtherConnectionContextUtils.setWSDLSchemaPropertiesForContextMode(label,(WSDLSchemaConnection)conn);
  }
 else   if (conn instanceof SalesforceSchemaConnection) {
    OtherConnectionContextUtils.setSalesforcePropertiesForContextMode(label,(SalesforceSchemaConnection)conn);
  }
 else   if (conn instanceof GenericSchemaConnection) {
  }
  connectionItem.getConnection().setContextMode(true);
  connectionItem.getConnection().setContextId(contextItem.getProperty().getId());
  connectionItem.getConnection().setContextName(contextItem.getDefaultContext());
}

Fixed version (ground truth):
public static void setPropertiesForContextMode(ConnectionItem connectionItem,ContextItem contextItem,Set<IConnParamName> paramSet,Map<String,String> map){
  if (connectionItem == null || contextItem == null) {
    return;
  }
  final String label=contextItem.getProperty().getLabel();
  Connection conn=connectionItem.getConnection();
  if (conn instanceof DatabaseConnection) {
    DBConnectionContextUtils.setPropertiesForContextMode(label,(DatabaseConnection)conn,contextItem,paramSet,map);
  }
 else   if (conn instanceof FileConnection) {
    FileConnectionContextUtils.setPropertiesForContextMode(label,(FileConnection)conn,paramSet);
  }
 else   if (conn instanceof LdifFileConnection) {
    OtherConnectionContextUtils.setLdifFilePropertiesForContextMode(label,(LdifFileConnection)conn);
  }
 else   if (conn instanceof XmlFileConnection) {
    OtherConnectionContextUtils.setXmlFilePropertiesForContextMode(label,(XmlFileConnection)conn);
  }
 else   if (conn instanceof LDAPSchemaConnection) {
    OtherConnectionContextUtils.setLDAPSchemaPropertiesForContextMode(label,(LDAPSchemaConnection)conn);
  }
 else   if (conn instanceof WSDLSchemaConnection) {
    OtherConnectionContextUtils.setWSDLSchemaPropertiesForContextMode(label,(WSDLSchemaConnection)conn);
  }
 else   if (conn instanceof SalesforceSchemaConnection) {
    OtherConnectionContextUtils.setSalesforcePropertiesForContextMode(label,(SalesforceSchemaConnection)conn);
  }
 else   if (conn instanceof GenericSchemaConnection) {
  }
  connectionItem.getConnection().setContextMode(true);
  connectionItem.getConnection().setContextId(contextItem.getProperty().getId());
  connectionItem.getConnection().setContextName(contextItem.getDefaultContext());
}