------------------------------------------------------------------------------------------------
322267
public function postTranslation(Request $request)
    {


        $form = FormBuilder::create(get_class($this->form), [
            'model' => $this->model
        ]);


        if ($form->hasError()) {
            return $form->validateAndRedirectBack();
        }

        $result = $this->beforeSave();

        if ($result != null) {
            return $result;
        }

        $result = $this->save($this->dataToSave($request), $request);

        if ($this->isTranslatableModel()) {
            $this->saveTranslation($request->get('translation_iso'), $request->get('translation_id_source'));
        }

        if ($result != null) {
            return $result;
        }

        return redirect()->to(action($this->getControllerNameForAction().'@getIndex'));
    }
138043
private void calcOffsets()
    {
        //Find the longest line
        int rowidx[] = new int[rows.size()];
        int maxCells = 0;
        for (int r = 0; r < rows.size(); r++)
        {
            int count = rows.elementAt(r).getCellCount();
            if (count > maxCells) maxCells = count;
            rowidx[r] = 0;
            rows.elementAt(r).rewind();
        }
        
        //determine the cell positions
        int col = 0;
        boolean cell_found = true;
        while (cell_found)
        {
            cell_found = false;
            int r = 0;
            while (r < rows.size())
            {
                TableRowBox row = rows.elementAt(r);
                if (row.hasNext())
                {
                    cell_found = true;
                    if (rowidx[r] <= col) //we are not in the middle of some colspan for this row
                    {
                        //get the current element
                        TableCellBox cell = row.next();
                        //set the new position
                        cell.setCellPosition(rowidx[r], r);
                        //move the row indices
                        for (int nr = r; nr < r + cell.getRowspan(); nr++)
                        {
                            if (nr < rows.size())
                            {
                                rowidx[nr] += cell.getColspan();
                                if (rowidx[nr] > numCols) numCols = rowidx[nr]; 
                            }
                            else
                                cell.rowspan--;
                        }
                        r += cell.getRowspan();
                    }
                    else
                        r++;
                }
                else
                    r++;
            }
            col++;
        }    
        //build the cell array
        for (int i = 0; i < rows.size(); i++)
            rows.elementAt(i).rewind();
        cells = new TableCellBox[numCols][rows.size()];
        for (int c = 0; c < maxCells; c++)
        {
            for (int r = 0; r < rows.size(); r++)
            {
                TableRowBox row = rows.elementAt(r);
                if (row.hasNext())
                {
                    TableCellBox cell = row.next();
                    if (cell.getRow() + cell.getRowspan() > rows.size())
                        cell.setRowspan(rows.size() - cell.getRow());
                    if (cell.getColumn() + cell.getColspan() > numCols)
                        cell.setColspan(numCols - cell.getColumn());
                    
                    int endrow = cell.getRow() + cell.getRowspan();
                    int endcol = cell.getColumn() + cell.getColspan();
                    //add it to the mesh
                    for (int nr = cell.getRow(); nr < endrow; nr++)
                        for (int nc = cell.getColumn(); nc < endcol; nc++)
                            cells[nc][nr] = cell;
                }
            }
        }
    }
1330427
private void init( List<T> list ) {
		this.list = list;
		indexes = new int[ list.size() ];
		counters = new int[ list.size() ];

		for( int i = 0; i < indexes.length ; i++ ) {
			counters[i] = indexes[i] = i;
		}

		total = 1;
		for( int i = 2; i <= indexes.length ; i++ ) {
			total *= i;
		}

		permutation = 0;
	}
1142451
public function index()
    {
        $index = $this->getIndexName();

        $this->assertTrue(
            $this->table->hasIndex($index), "The {$this->name} column is not indexed."
        );

        $this->assertTrue(
            $this->table->getIndex($index)->isSimpleIndex(), "The {$this->name} column is not a simple index."
        );
    }
536938
public function initialize()
    {

        $this->length = null;
        $this->life = null;
        $this->autoApprove = false;
        $this->expires = null;

    }
1136189
function(){
        while(this.numPairs>0){
            var pair=this.pairs[--this.numPairs];
            pair.shape1=null;
            pair.shape2=null;
        }
        this.numPairChecks=0;
        this.collectPairs();
    }
1058597
function () {
        while (this.head !== null) {
            var temp = this.head;
            this.head = this.head.next();   // use next() the instead of "_next", otherwise it will loop forever
            temp._list = null;
            temp._next = null;
            temp._prev = null;
        }

        this.head = null;
        this.size = 0;
    }
837178
public function ordering()
    {
        if ($this->orderCallback) {
            call_user_func($this->orderCallback, $this->getQueryBuilder());

            return;
        }

        foreach ($this->request->orderableColumns() as $orderable) {
            $column = $this->getColumnName($orderable['column'], true);

            if ($this->isBlacklisted($column)) {
                continue;
            }

            if (isset($this->columnDef['order'][$column])) {
                $method     = $this->columnDef['order'][$column]['method'];
                $parameters = $this->columnDef['order'][$column]['parameters'];
                $this->compileColumnQuery(
                        $this->getQueryBuilder(), $method, $parameters, $column, $orderable['direction']
                );
            } else {
                if (count(explode('.', $column)) > 1) {
                    $eagerLoads     = $this->getEagerLoads();
                    $parts          = explode('.', $column);
                    $relationColumn = array_pop($parts);
                    $relation       = implode('.', $parts);

                    if (in_array($relation, $eagerLoads)) {
                        $column = $this->joinEagerLoadedColumn($relation, $relationColumn);
                    }
                }
                $direction    = $orderable['direction'];
                $queryBuilder = $this->getQueryBuilder();
                //$fired        = Event::fire('datatables.order.' . $column, [&$queryBuilder, $direction]);
//                if (empty($fired)) {
//                    $this->getQueryBuilder()->orderBy($column, $direction);
//                }
            }
        }
    }
359433
public function commit()
    {
        if ($this->_hasChanges) {
            $this->_getIndexWriter()->commit();

            $this->_updateDocCount();

            $this->_hasChanges = false;
        }
    }
390856
private void initialize()
	{
		this.setLayout(new java.awt.GridBagLayout());
		if (!showBarOnly)
		{
			this.add(getTimeTextField(),			Helpers.getGridBagConstraint(0, 0, 1, 1, java.awt.GridBagConstraints.NONE,	java.awt.GridBagConstraints.WEST, 0.0, 0.0));
			this.add(getTimeLabel(),				Helpers.getGridBagConstraint(1, 0, 1, 1, java.awt.GridBagConstraints.NONE, 			java.awt.GridBagConstraints.WEST, 1.0, 0.0));
			this.add(getKBSField(),					Helpers.getGridBagConstraint(2, 0, 1, 1, java.awt.GridBagConstraints.NONE, 	java.awt.GridBagConstraints.WEST, 0.0, 0.0));
			this.add(getKBSLabel(),					Helpers.getGridBagConstraint(3, 0, 1, 1, java.awt.GridBagConstraints.NONE, 			java.awt.GridBagConstraints.WEST, 1.0, 0.0));
			this.add(getKHZField(),					Helpers.getGridBagConstraint(4, 0, 1, 1, java.awt.GridBagConstraints.NONE, 	java.awt.GridBagConstraints.WEST, 0.0, 0.0));
			this.add(getKHZLabel(),					Helpers.getGridBagConstraint(5, 0, 1, 1, java.awt.GridBagConstraints.NONE, 			java.awt.GridBagConstraints.WEST, 1.0, 0.0));
			this.add(getActiveChannelsTextField(),	Helpers.getGridBagConstraint(6, 0, 1, 1, java.awt.GridBagConstraints.NONE,	java.awt.GridBagConstraints.WEST, 0.0, 0.0));
			this.add(getActiveChannelsLabel(), 		Helpers.getGridBagConstraint(7, 0, 1, 0, java.awt.GridBagConstraints.NONE, 			java.awt.GridBagConstraints.WEST, 1.0, 0.0));
			this.add(getTimeBar(),					Helpers.getGridBagConstraint(0, 1, 1, 0, java.awt.GridBagConstraints.HORIZONTAL, 	java.awt.GridBagConstraints.WEST, 1.0, 0.0));
		}
		else
		{
			this.add(getTimeTextField(),			Helpers.getGridBagConstraint(0, 0, 1, 1, java.awt.GridBagConstraints.NONE,			java.awt.GridBagConstraints.WEST, 0.0, 0.0));
			this.add(getTimeBar(),					Helpers.getGridBagConstraint(1, 0, 1, 0, java.awt.GridBagConstraints.HORIZONTAL, 	java.awt.GridBagConstraints.EAST, 1.0, 0.0));
		}
	}
848488
public function defineMethods()
    {
        parent::defineMethods();

        if (static::class === self::class) {
            return;
        }

        // Set up accessors for joined items
        if ($manyMany = $this->manyMany()) {
            foreach ($manyMany as $relationship => $class) {
                $this->addWrapperMethod($relationship, 'getManyManyComponents');
            }
        }
        if ($hasMany = $this->hasMany()) {
            foreach ($hasMany as $relationship => $class) {
                $this->addWrapperMethod($relationship, 'getComponents');
            }
        }
        if ($hasOne = $this->hasOne()) {
            foreach ($hasOne as $relationship => $class) {
                $this->addWrapperMethod($relationship, 'getComponent');
            }
        }
        if ($belongsTo = $this->belongsTo()) {
            foreach (array_keys($belongsTo) as $relationship) {
                $this->addWrapperMethod($relationship, 'getComponent');
            }
        }
    }
810772
public function initialize()
    {
        if ($this->initialized || ! $this->association) {
            return;
        }

        $this->doInitialize();

        $this->initialized = true;
    }
1051183
public function init()
    {
        $this->createTableSQLCollector->init();
        $this->dropTableSQLCollector->init();
        $this->alterTableSQLCollector->init();

        $this->dropSequenceQueries = array();
        $this->dropViewQueries = array();
        $this->createViewQueries = array();
        $this->createSequenceQueries = array();
        $this->renameSchemaQueries = array();
    }
836456
public function init()
    {
        parent::init();
        if (!isset($this->translations['yii']) && !isset($this->translations['yii*'])) {
            $this->translations['yii'] = [
                '__class' => PhpMessageSource::class,
                'sourceLanguage' => 'en-US',
                'basePath' => '@yii/messages',
            ];
        }

        if (!isset($this->translations['app']) && !isset($this->translations['app*'])) {
            $this->translations['app'] = [
                '__class' => PhpMessageSource::class,
                'sourceLanguage' => $this->app->sourceLanguage,
                'basePath' => '@app/messages',
            ];
        }
    }
98103
protected function onInit()
    {
        $this->groupColumns = $this->parseGroups(Utility::get($this->params, "by"));
        $this->sumColumns = $this->parseGroups(Utility::get($this->params, "sum"));
        $this->countColumns = $this->parseGroups(Utility::get($this->params, "count"));
        $this->avgColumns = $this->parseGroups(Utility::get($this->params, "avg"));
        $this->minColumns = $this->parseGroups(Utility::get($this->params, "min"));
        $this->maxColumns = $this->parseGroups(Utility::get($this->params, "max"));

        $this->sort = Utility::get($this->params, "sort", true);
        $this->gData = array();
        $this->cData = array();
    }
926579
public void make()
    throws Exception
  {
    for (int i = 0; i < _makeList.size(); i++) {
      Make make = _makeList.get(i);

      make.make();
    }
  }
1372627
protected void initialize() {
        _bcMembershipListeners = new ArrayList<BeanContextMembershipListener>();
        _children = Collections.synchronizedMap(new HashMap<Object, BCChild>());

        _childPcl = new PropertyChangeListener() {
            public void propertyChange(PropertyChangeEvent pce) {
                ControlBeanContextSupport.this.propertyChange(pce);
            }
        };

        _childVcl = new VetoableChangeListener() {
            public void vetoableChange(PropertyChangeEvent pce) throws PropertyVetoException {
                ControlBeanContextSupport.this.vetoableChange(pce);
            }
        };
    }