#vulnerable code 
                                public void init() throws DBException
    {
        if ( (getProperties().getProperty("debug")!=null) &&
                (getProperties().getProperty("debug").compareTo("true")==0) )
        {
            _debug=true;
        }

        if (getProperties().containsKey("clientbuffering"))
        {
            _clientSideBuffering = Boolean.parseBoolean(getProperties().getProperty("clientbuffering"));
        }
        if (getProperties().containsKey("writebuffersize"))
        {
            _writeBufferSize = Long.parseLong(getProperties().getProperty("writebuffersize"));
        }
        if ("false".equals(getProperties().getProperty("hbase.usepagefilter", "true"))) {
          _usePageFilter = false;
        }

        _columnFamily = getProperties().getProperty("columnfamily");
        if (_columnFamily == null)
        {
            System.err.println("Error, must specify a columnfamily for HBase table");
            throw new DBException("No columnfamily specified");
        }
      _columnFamilyBytes = Bytes.toBytes(_columnFamily);

      // Terminate right now if table does not exist, since the client
      // will not propagate this error upstream once the workload
      // starts.
      String table = com.yahoo.ycsb.workloads.CoreWorkload.table;
      try
	  {
	      HTable ht = new HTable(config, table);
	      ht.getTableDescriptor();
	  }
      catch (IOException e)
	  {
	      throw new DBException(e);
	  }
    } 
                            #location 36 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                public void init() throws DBException
    {
        if ( (getProperties().getProperty("debug")!=null) &&
                (getProperties().getProperty("debug").compareTo("true")==0) )
        {
            _debug=true;
        }

        if (getProperties().containsKey("clientbuffering"))
        {
            _clientSideBuffering = Boolean.parseBoolean(getProperties().getProperty("clientbuffering"));
        }
        if (getProperties().containsKey("writebuffersize"))
        {
            _writeBufferSize = Long.parseLong(getProperties().getProperty("writebuffersize"));
        }
        if ("false".equals(getProperties().getProperty("hbase.usepagefilter", "true"))) {
          _usePageFilter = false;
        }
        if ("kerberos".equalsIgnoreCase(config.get("hbase.security.authentication"))) {
          config.set("hadoop.security.authentication", "Kerberos");
          UserGroupInformation.setConfiguration(config);
        }
        if ( (getProperties().getProperty("principal")!=null) && (getProperties().getProperty("keytab")!=null) ){
            try {
                UserGroupInformation.loginUserFromKeytab(getProperties().getProperty("principal"), getProperties().getProperty("keytab"));
            } catch (IOException e) {
                System.err.println("Keytab file is not readable or not found");
                throw new DBException(e);
            }
        }
        try {
            _hConn = HConnectionManager.createConnection(config);
        } catch (IOException e) {
            System.err.println("Connection to HBase was not successful");
            throw new DBException(e);  
        }
        _columnFamily = getProperties().getProperty("columnfamily");
        if (_columnFamily == null)
        {
            System.err.println("Error, must specify a columnfamily for HBase table");
            throw new DBException("No columnfamily specified");
        }
      _columnFamilyBytes = Bytes.toBytes(_columnFamily);

      // Terminate right now if table does not exist, since the client
      // will not propagate this error upstream once the workload
      // starts.
      String table = com.yahoo.ycsb.workloads.CoreWorkload.table;
      try
	  {
	      HTableInterface ht = _hConn.getTable(table);
	      ht.getTableDescriptor();
	  }
      catch (IOException e)
	  {
	      throw new DBException(e);
	  }
    }