***********************************************************************
503278
void quietlyCloseConnection(final Connection connection, final String closureReason)
   {
      if (connection != null) {
         try {
            logger.debug("{} - Closing connection {}: {}", poolName, connection, closureReason);

            try {
               setNetworkTimeout(connection, SECONDS.toMillis(15));
            }
            catch (SQLException e) {
               // ignore
            }
            finally {
               connection.close(); // continue with the close even if setNetworkTimeout() throws
            }
         }
         catch (Exception e) {
            logger.debug("{} - Closing connection {} failed", poolName, connection, e);
         }
      }
   }
410957
@Override
  public void aggregate()
  {
    final ArrayOfDoublesSketch update = selector.getObject();
    if (update == null) {
      return;
    }
    synchronized (this) {
      union.update(update);
    }
  }
633961
public function init()
    {
        $this->idAttribute = '_id';
        $this->idAttributeType = static::$idTypeAutoIncrement;
        if ($this->skipInit) {
            return;
        }
        $this->initEntityEvents();
        parent::init();
    }
1367861
public function merge($data) {

		if (! is_array($data)) {
			$data = $this->makeArray($data);
		}
		
		$this->_data = array_merge($this->_data, $data);
	}
214326
public function run()
    {
        if (!is_array($rules = $this->getRules())) {
            $rules = $this->convertToArray($rules);
        }

        if (!is_array($datas = $this->getDatas())) {
            $datas = $this->convertToArray($datas);
        }

        foreach ($rules as $key => $rule) {
            $parsedRules = explode("|", $rule);

            foreach ($parsedRules as $parsedRule) {
                $required = $this->handleRule($parsedRule, $key, $datas);

                if ($required !== null && $required === false) {
                    break;
                }
            }
        }
    }
821868
void execute() {

        String sCmd = null;

        if (4096 <= ifHuge.length()) {
            sCmd = ifHuge;
        } else {
            sCmd = txtCommand.getText();
        }

        if (sCmd.startsWith("-->>>TEST<<<--")) {
            testPerformance();

            return;
        }

        String[] g = new String[1];

        lTime = System.currentTimeMillis();

        try {
            if (sStatement == null) {
                return;
            }

            sStatement.execute(sCmd);

            lTime = System.currentTimeMillis() - lTime;

            int r = sStatement.getUpdateCount();

            if (r == -1) {
                formatResultSet(sStatement.getResultSet());
            } else {
                g[0] = "update count";

                gResult.setHead(g);

                g[0] = String.valueOf(r);

                gResult.addRow(g);
            }

            addToRecent(txtCommand.getText());
        } catch (SQLException e) {
            lTime = System.currentTimeMillis() - lTime;
            g[0]  = "SQL Error";

            gResult.setHead(g);

            String s = e.getMessage();

            s    += " / Error Code: " + e.getErrorCode();
            s    += " / State: " + e.getSQLState();
            g[0] = s;

            gResult.addRow(g);
        }

        updateResult();
        System.gc();
    }
1323653
private void checkIndices(int row, int col) {
        if (row < 0 || col < 0 || row >= rows || col >= cols) {
            throw new IndexOutOfBoundsException();
        }
    }
378752
int doOne(int bid, int tid, int aid, int delta) {
	int aBalance = 0;

	if (Conn == null) {
	    bench.incrementFailedTransactionCount();
	    return 0;
	}
	try {
	    if (Benchmark.prepared_stmt) {
		pstmt1.setInt(1,delta);
		pstmt1.setInt(2,aid);
		pstmt1.executeUpdate();
		pstmt1.clearWarnings();

		pstmt2.setInt(1,aid);
		ResultSet RS = pstmt2.executeQuery();
		pstmt2.clearWarnings();

		while (RS.next()) {
		    aBalance = RS.getInt(1);
		}

		pstmt3.setInt(1,delta);
		pstmt3.setInt(2,tid);
		pstmt3.executeUpdate();
		pstmt3.clearWarnings();

		pstmt4.setInt(1,delta);
		pstmt4.setInt(2,bid);
		pstmt4.executeUpdate();
		pstmt4.clearWarnings();

		pstmt5.setInt(1,tid);
		pstmt5.setInt(2,bid);
		pstmt5.setInt(3,aid);
		pstmt5.setInt(4,delta);
		pstmt5.executeUpdate();
		pstmt5.clearWarnings();
	    } else {
		Statement Stmt = Conn.createStatement();

		String Query = "UPDATE accounts";
		Query += " SET Abalance = Abalance + " + delta;
		Query += " WHERE Aid = " + aid;

		Stmt.executeUpdate(Query);
		Stmt.clearWarnings();

		Query = "SELECT Abalance";
		Query += " FROM accounts";
		Query += " WHERE Aid = " + aid;

		ResultSet RS = Stmt.executeQuery(Query);
		Stmt.clearWarnings();

		while (RS.next()) {
		    aBalance = RS.getInt(1);
		}

		Query = "UPDATE tellers";
		Query += " SET Tbalance = Tbalance + " + delta;
		Query += " WHERE Tid = " + tid;

		Stmt.executeUpdate(Query);
		Stmt.clearWarnings();

		Query = "UPDATE branches";
		Query += " SET Bbalance = Bbalance + " + delta;
		Query += " WHERE Bid = " + bid;

		Stmt.executeUpdate(Query);
		Stmt.clearWarnings();

		Query = "INSERT INTO history(Tid, Bid, Aid, delta)";
		Query += " VALUES (";
		Query += tid + ",";
		Query += bid + ",";
		Query += aid + ",";
		Query += delta + ")";

		Stmt.executeUpdate(Query);
		Stmt.clearWarnings();

		Stmt.close();
	    }

	    if (Benchmark.transactions) {
		Conn.commit();
	    }
	    return aBalance;
	} catch (java.lang.Exception e) {
	    if (Benchmark.verbose) {
		System.out.println("Transaction failed: "
				   + e.getMessage());
		e.printStackTrace();
	    }
	    bench.incrementFailedTransactionCount();
	    if (Benchmark.transactions) {
		try {
		    Conn.rollback();
		} catch (SQLException e1) {
		}
	    }
	}
	return 0;
    }
617827
public function initialize()
    {
        if ($this->isInitialize) {
            return ;
        }

        $this->isInitialize = true;

        $this->getEventManager()->trigger(self::EVENT_INITIALIZE, $this);
    }
322635
private void checkColumn(int column) throws SQLException {

        if (column < 1 || column > columnCount) {
            throw Util.sqlException(ErrorCode.JDBC_COLUMN_NOT_FOUND,
                                    String.valueOf(column));
        }
    }
401588
public function Bind()
	{
		if ( ! is_null( $this->_childs ) )
		{
			foreach ( $this->_childs as $node)
			{
				$node->Bind();
			}
		}
	}
418123
function () {
            var t = this.dpop() | 0;
            var n = this.dpop() | 0;
            var ddd = Long.fromInt(n);
            ddd = ddd.mul(Long.fromInt(t));
            this.dpush(ddd.low);
            this.dpush(ddd.high);
        }
845733
public function indexAction()
    {
        $user = $this->userService->getCurrentUser();
        $workspacesArray = [];
        /** @var Workspace $workspace */
        foreach ($this->workspaceRepository->findAll() as $workspace) {

            // FIXME: This check should be implemented through a specialized Workspace Privilege or something similar
            if ($workspace->getOwner() !== null && $workspace->getOwner() !== $user) {
                continue;
            }

            $workspaceArray = [
                'name' => $workspace->getName(),
                'title' => $workspace->getTitle(),
                'description' => $workspace->getDescription(),
                'baseWorkspace' => $workspace->getBaseWorkspace()
            ];
            if ($user !== null) {
                $workspaceArray['readonly'] = !$this->userService->currentUserCanPublishToWorkspace($workspace);
            }
            $workspacesArray[] = $workspaceArray;
        }

        $this->view->assign('workspaces', $workspacesArray);
    }
302387
@Override
    public INDArray toDense() {
        // TODO support view conversion
        INDArray result = Nd4j.zeros(shape());

        switch (data().dataType()) {
            case DOUBLE:
                for (int i = 0; i < length; i++) {
                    int[] idx = getUnderlyingIndicesOf(i).asInt();
                    double value = values.getDouble(i);
                    result.putScalar(idx, value);
                }
                break;
            case FLOAT:
                for (int i = 0; i < length; i++) {
                    int[] idx = getUnderlyingIndicesOf(i).asInt();
                    float value = values.getFloat(i);
                    result.putScalar(idx, value);
                }
                break;
            default:
                throw new UnsupportedOperationException();
        }
        return result;
    }
357945
private int colRefSegments(TypedElementDefinition<?> column) {
        if (column != null && column.getContainer() instanceof UDTDefinition)
            return 2;

        if (!getStrategy().getInstanceFields())
            return 2;

        return 3;
    }
816930
private void doJazziness(View item, int position, int scrollDirection) {
        if (mIsScrolling) {
            if (mOnlyAnimateNewItems && mAlreadyAnimatedItems.contains(position))
                return;

            if (mOnlyAnimateOnFling && !mIsFlingEvent)
                return;

            if (mMaxVelocity > MAX_VELOCITY_OFF && mMaxVelocity < mSpeed)
                return;

            if (mSimulateGridWithList) {
                ViewGroup itemRow = (ViewGroup) item;
                for (int i = 0; i < itemRow.getChildCount(); i++)
                    doJazzinessImpl(itemRow.getChildAt(i), position, scrollDirection);
            } else {
                doJazzinessImpl(item, position, scrollDirection);
            }

            mAlreadyAnimatedItems.add(position);
        }
    }
163931
public function initialize()
    {
        parent::initialize();
        $this->select = new SelectClause($this);
        $this->from   = new FromClause($this);
        $this->group  = new GroupClause($this);
    }