Program: 51014
Project: 51014
Buggy source:
/** 
 * Creates an Olap4jPoolingConnectionFactory.
 * @param olap4jDriverClassName Driver class name
 * @param olap4jDriverConnectionString Connect string
 * @param connectionProperties Connection properties
 * @param maxPerUserConnectionCount max number of connections to createfor every different username
 * @param idleConnectionsCleanupTimeoutMs pooled connections inactivefor longer than this period of time can be cleaned up
 * @param discoverDatasourcesResponse Pre-configured response toDISCOVER_DATASOURCES request, or null
 * @throws ClassNotFoundException if driver class is not found
 */
public Olap4jPoolingConnectionFactory(final String olap4jDriverClassName,final String olap4jDriverConnectionString,final Map<String,String> connectionProperties,final int idleConnectionsCleanupTimeoutMs,final int maxPerUserConnectionCount,final Map<String,Object> discoverDatasourcesResponse) throws ClassNotFoundException {
  Class.forName(olap4jDriverClassName);
  this.maxPerUserConnectionCount=maxPerUserConnectionCount;
  this.idleConnectionsCleanupTimeoutMs=idleConnectionsCleanupTimeoutMs;
  this.olap4jDriverClassName=olap4jDriverClassName;
  this.olap4jDriverConnectionString=olap4jDriverConnectionString;
  this.connProperties=new Properties();
  this.connProperties.putAll(connectionProperties);
  this.discoverDatasourcesResponse=discoverDatasourcesResponse;
  Timer connectionEvictionsTimer=new Timer();
  TimerTask evictionTask=new TimerTask(){
    public void run(){
synchronized (datasourcesPool) {
        for (        BasicDataSource bds : datasourcesPool.values()) {
          try {
            bds.getConnectionPool().evict();
          }
 catch (          Exception e) {
            LOGGER.error("String_Node_Str" + e + "String_Node_Str"+ bds+ "String_Node_Str");
          }
        }
      }
    }
  }
;
  connectionEvictionsTimer.schedule(evictionTask,60000,60 * 1000);
}

Fixed version (ground truth):
/** 
 * Creates an Olap4jPoolingConnectionFactory.
 * @param olap4jDriverClassName Driver class name
 * @param olap4jDriverConnectionString Connect string
 * @param connectionProperties Connection properties
 * @param maxPerUserConnectionCount max number of connections to createfor every different username
 * @param idleConnectionsCleanupTimeoutMs pooled connections inactivefor longer than this period of time can be cleaned up
 * @param discoverDatasourcesResponse Pre-configured response toDISCOVER_DATASOURCES request, or null
 * @throws ClassNotFoundException if driver class is not found
 */
public Olap4jPoolingConnectionFactory(final String olap4jDriverClassName,final String olap4jDriverConnectionString,final Map<String,String> connectionProperties,final int idleConnectionsCleanupTimeoutMs,final int maxPerUserConnectionCount,final Map<String,Object> discoverDatasourcesResponse) throws ClassNotFoundException {
  Class.forName(olap4jDriverClassName);
  this.maxPerUserConnectionCount=maxPerUserConnectionCount;
  this.idleConnectionsCleanupTimeoutMs=idleConnectionsCleanupTimeoutMs;
  this.olap4jDriverClassName=olap4jDriverClassName;
  this.olap4jDriverConnectionString=olap4jDriverConnectionString;
  this.connProperties=new Properties();
  this.connProperties.putAll(connectionProperties);
  this.discoverDatasourcesResponse=discoverDatasourcesResponse;
}