Program: 51013
Project: 51013
Buggy source:
public OlapConnection getConnection(String catalog,String schema,String roleName,Properties props) throws SQLException {
  final String user=props.getProperty(JDBC_USER);
  final String pwd=props.getProperty(JDBC_PASSWORD);
  final String dataSourceKey=user + "String_Node_Str" + pwd;
  BasicDataSource bds;
synchronized (datasourcesPool) {
    bds=datasourcesPool.get(dataSourceKey);
    if (bds == null) {
      bds=new BasicDataSource(){
{
          connectionProperties.putAll(connProperties);
        }
      }
;
      bds.setDefaultReadOnly(true);
      bds.setDriverClassName(olap4jDriverClassName);
      bds.setPassword(pwd);
      bds.setUsername(user);
      bds.setUrl(olap4jDriverConnectionString);
      bds.setPoolPreparedStatements(false);
      bds.setMaxIdle(maxPerUserConnectionCount);
      bds.setMaxActive(maxPerUserConnectionCount);
      bds.setMinEvictableIdleTimeMillis(idleConnectionsCleanupTimeoutMs);
      bds.setAccessToUnderlyingConnectionAllowed(true);
      bds.setInitialSize(1);
      if (catalog != null) {
        bds.setDefaultCatalog(catalog);
      }
      datasourcesPool.put(dataSourceKey,bds);
    }
  }
  Connection connection=bds.getConnection();
  DelegatingConnection dc=(DelegatingConnection)connection;
  Connection underlyingOlapConnection=dc.getInnermostDelegate();
  OlapConnection olapConnection=unwrap(underlyingOlapConnection,OlapConnection.class);
  if (LOGGER.isDebugEnabled()) {
    LOGGER.debug("String_Node_Str" + olapConnection + "String_Node_Str"+ connection+ "String_Node_Str"+ dataSourceKey);
  }
  if (catalog != null) {
    olapConnection.setCatalog(catalog);
  }
  if (schema != null) {
    olapConnection.setSchema(schema);
  }
  if (roleName != null) {
    olapConnection.setRoleName(roleName);
  }
  return createDelegatingOlapConnection(connection,olapConnection);
}

Fixed version (ground truth):
public OlapConnection getConnection(String catalog,String schema,String roleName,Properties props) throws SQLException {
  final String user=props.getProperty(JDBC_USER);
  final String pwd=props.getProperty(JDBC_PASSWORD);
  final String dataSourceKey=user + "String_Node_Str" + pwd;
  BasicDataSource bds;
synchronized (datasourcesPool) {
    bds=datasourcesPool.get(dataSourceKey);
    if (bds == null) {
      bds=new BasicDataSource(){
{
          connectionProperties.putAll(connProperties);
        }
      }
;
      bds.setDefaultReadOnly(true);
      bds.setDriverClassName(olap4jDriverClassName);
      bds.setPassword(pwd);
      bds.setUsername(user);
      bds.setUrl(olap4jDriverConnectionString);
      bds.setPoolPreparedStatements(false);
      bds.setMaxIdle(maxPerUserConnectionCount);
      bds.setMaxActive(maxPerUserConnectionCount);
      bds.setMinEvictableIdleTimeMillis(idleConnectionsCleanupTimeoutMs);
      bds.setAccessToUnderlyingConnectionAllowed(true);
      bds.setInitialSize(1);
      bds.setTimeBetweenEvictionRunsMillis(60000);
      if (catalog != null) {
        bds.setDefaultCatalog(catalog);
      }
      datasourcesPool.put(dataSourceKey,bds);
    }
  }
  Connection connection=bds.getConnection();
  DelegatingConnection dc=(DelegatingConnection)connection;
  Connection underlyingOlapConnection=dc.getInnermostDelegate();
  OlapConnection olapConnection=unwrap(underlyingOlapConnection,OlapConnection.class);
  if (LOGGER.isDebugEnabled()) {
    LOGGER.debug("String_Node_Str" + olapConnection + "String_Node_Str"+ connection+ "String_Node_Str"+ dataSourceKey);
  }
  if (catalog != null) {
    olapConnection.setCatalog(catalog);
  }
  if (schema != null) {
    olapConnection.setSchema(schema);
  }
  if (roleName != null) {
    olapConnection.setRoleName(roleName);
  }
  return createDelegatingOlapConnection(connection,olapConnection);
}