--------------------------------------------------------------------------------------------
558960
@Override
	public int compareTo(ValueArray<ByteValue> o) {
		ByteValueArray other = (ByteValueArray) o;

		int min = Math.min(position, other.position);
		for (int i = 0; i < min; i++) {
			int cmp = Byte.compare(data[i], other.data[i]);

			if (cmp != 0) {
				return cmp;
			}
		}

		return Integer.compare(position, other.position);
	}
720769
protected void onColumn(EntityMetadata m, boolean isRelation, List<String> relations, List<Object> entities,
        List<Column> columns, List<AbstractManagedType> subManagedType, ByteBuffer key) {
        if (!columns.isEmpty()) {
            Object id = PropertyAccessorHelper.getObject(m.getIdAttribute().getJavaType(), key.array());
            ThriftRow tr = new ThriftRow(id, m.getTableName(), columns, new ArrayList<SuperColumn>(0),
                new ArrayList<CounterColumn>(0), new ArrayList<CounterSuperColumn>(0));
            Object o = null;

            if (!subManagedType.isEmpty()) {
                for (AbstractManagedType subEntity : subManagedType) {
                    EntityMetadata subEntityMetadata =
                        KunderaMetadataManager.getEntityMetadata(kunderaMetadata, subEntity.getJavaType());

                    o = getDataHandler().populateEntity(tr, subEntityMetadata, KunderaCoreUtils.getEntity(o),
                        subEntityMetadata.getRelationNames(), isRelation);
                    if (o != null) {
                        break;
                    }
                }
            } else {
                o = getDataHandler().populateEntity(tr, m, KunderaCoreUtils.getEntity(o), relations, isRelation);
            }

            if (log.isInfoEnabled()) {
                log.info("Populating data for entity of clazz {} and row key {}.", m.getEntityClazz(), tr.getId());
            }

            if (o != null) {
                entities.add(o);
            }
        }
    }
449111
public function initialize(Table $table)
    {
        $this->table = $table;
        $this->table->setData($this->getData());
    }
392999
private int gatherInfo(LblTree aT, int postorder) {
		int currentSize = 0;
		int childrenCount = 0;
		int descSizes = 0;
		int krSizesSum = 0;
		int revkrSizesSum = 0;
		int preorder = preorderTmp;

		int heavyChild = -1;
		int leftChild = -1;
		int rightChild = -1;
		int weight = -1;
		int maxWeight = -1;
		int currentPostorder = -1;
		int oldHeavyChild = -1;

		ArrayList<Integer> heavyRelSubtreesTmp = new ArrayList<>();
		ArrayList<Integer> leftRelSubtreesTmp = new ArrayList<>();
		ArrayList<Integer> rightRelSubtreesTmp = new ArrayList<>();

		ArrayList<Integer> childrenPostorders = new ArrayList<>();

		preorderTmp++;

		// enumerate over children of current node
		for (Enumeration<?> e = aT.children(); e.hasMoreElements(); ) {
			childrenCount++;

			postorder = gatherInfo((LblTree) e.nextElement(), postorder);

			childrenPostorders.add(postorder);

			currentPostorder = postorder;

			// heavy path
			weight = sizeTmp + 1;
			if (weight >= maxWeight) {
				maxWeight = weight;
				oldHeavyChild = heavyChild;
				heavyChild = currentPostorder;
			} else {
				heavyRelSubtreesTmp.add(currentPostorder);
			}
			if (oldHeavyChild != -1) {
				heavyRelSubtreesTmp.add(oldHeavyChild);
				oldHeavyChild = -1;
			}

			// left path
			if (childrenCount == 1) {
				leftChild = currentPostorder;
			} else {
				leftRelSubtreesTmp.add(currentPostorder);
			}

			// right path
			rightChild = currentPostorder;
			if (e.hasMoreElements()) {
				rightRelSubtreesTmp.add(currentPostorder);
			}

			// subtree size
			currentSize += 1 + sizeTmp;

			descSizes += descSizesTmp;

			if (childrenCount > 1) {
				krSizesSum += krSizesSumTmp + sizeTmp + 1;
			} else {
				krSizesSum += krSizesSumTmp;
				nodeType[LEFT][currentPostorder] = true;
			}

			if (e.hasMoreElements()) {
				revkrSizesSum += revkrSizesSumTmp + sizeTmp + 1;
			} else {
				revkrSizesSum += revkrSizesSumTmp;
				nodeType[RIGHT][currentPostorder] = true;
			}
		}

		postorder++;

		// postorder
		aT.setTmpData(postorder);

		int currentDescSizes = descSizes + currentSize + 1;
		info[POST2_DESC_SUM][postorder] =
				(currentSize + 1) * (currentSize + 1 + 3) / 2 - currentDescSizes;
		info[POST2_KR_SUM][postorder] = krSizesSum + currentSize + 1;
		info[POST2_REV_KR_SUM][postorder] = revkrSizesSum + currentSize + 1;

		// POST2_LABEL
		// labels[rootNumber] = ld.store(aT.getLabel());
		info[POST2_LABEL][postorder] = ld.store(aT.getLabel());

		// POST2_PARENT
		for (Integer i : childrenPostorders) {
			info[POST2_PARENT][i] = postorder;
		}

		// POST2_SIZE
		info[POST2_SIZE][postorder] = currentSize + 1;
		if (currentSize == 0) {
			leafCount++;
		}

		// POST2_PRE
		info[POST2_PRE][postorder] = preorder;

		// PRE2_POST
		info[PRE2_POST][preorder] = postorder;

		// RPOST2_POST
		info[RPOST2_POST][treeSize - 1 - preorder] = postorder;

		// heavy path
		if (heavyChild != -1) {
			paths[HEAVY][postorder] = heavyChild;
			nodeType[HEAVY][heavyChild] = true;

			if (leftChild < heavyChild && heavyChild < rightChild) {
				info[POST2_STRATEGY][postorder] = BOTH;
			} else if (heavyChild == leftChild) {
				info[POST2_STRATEGY][postorder] = RIGHT;
			} else if (heavyChild == rightChild) {
				info[POST2_STRATEGY][postorder] = LEFT;
			}
		} else {
			info[POST2_STRATEGY][postorder] = RIGHT;
		}

		// left path
		if (leftChild != -1) {
			paths[LEFT][postorder] = leftChild;
		}
		// right path
		if (rightChild != -1) {
			paths[RIGHT][postorder] = rightChild;
		}

		// heavy/left/right relevant subtrees
		relSubtrees[HEAVY][postorder] = toIntArray(heavyRelSubtreesTmp);
		relSubtrees[RIGHT][postorder] = toIntArray(rightRelSubtreesTmp);
		relSubtrees[LEFT][postorder] = toIntArray(leftRelSubtreesTmp);

		descSizesTmp = currentDescSizes;
		sizeTmp = currentSize;
		krSizesSumTmp = krSizesSum;
		revkrSizesSumTmp = revkrSizesSum;

		return postorder;
	}
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);
    }
523925
public function initialize()
    {
        $this->data = new stdClass();
        $this->data->ownId = null;
        $this->data->orders = [];
    }
617827
public function initialize()
    {
        if ($this->isInitialize) {
            return ;
        }

        $this->isInitialize = true;

        $this->getEventManager()->trigger(self::EVENT_INITIALIZE, $this);
    }
835651
public function count() {
		if ($this->count === null) {
			$groupPart = $this->select->getPart(Select::GROUP);
			
			$select = empty($groupPart)
				? $this->prepareSelect(clone $this->select)
				: $this->prepareSubquerySelect(clone $this->select);
			
			$this->count = (int) $select->query(PDO::FETCH_OBJ)->fetch()->{self::COUNT_COLUMN};
		}
		
		return $this->count;
	}
536938
public function initialize()
    {

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

    }
633961
public function init()
    {
        $this->idAttribute = '_id';
        $this->idAttributeType = static::$idTypeAutoIncrement;
        if ($this->skipInit) {
            return;
        }
        $this->initEntityEvents();
        parent::init();
    }
1024039
public function initializeObject()
    {
        if ($this->cache->has('rulesets') && $this->cache->has('rulesetsIndices')) {
            $this->rulesets = $this->cache->get('rulesets');
            $this->rulesetsIndices = $this->cache->get('rulesetsIndices');
        } else {
            $this->generateRulesets();
            $this->cache->set('rulesets', $this->rulesets);
            $this->cache->set('rulesetsIndices', $this->rulesetsIndices);
        }
    }
948326
protected void initialize() {
		rows = cols = (int)Math.sqrt(matrix.length);
		map = new int[levels];
		for (int i = 0; i < levels; i++) {
			int v = 255 * i / (levels-1);
			map[i] = v;
		}
		div = new int[256];
		mod = new int[256];
		int rc = (rows*cols+1);
		for (int i = 0; i < 256; i++) {
			div[i] = (levels-1)*i / 256;
			mod[i] = i*rc/256;
		}
	}
328211
public function initialize()
    {
        if (true === $this->hasBeenInitialized) {
            return;
        }

        $this->hasBeenInitialized = true;

        foreach ($this->service as $service) {
            list($serviceClassName, $serviceOptions) = $this->manageServiceData($service);

            $this->serviceInstances[$serviceClassName] = $this->getServiceInstance($serviceClassName, $serviceOptions);
        }
    }
1070336
public function initialize()
    {
        $this->hasMany('id', UserPasswordChange::class, 'user_id', [
            'alias' => 'PasswordChanges',
            'foreignKey' => [
                'action' => Relation::ACTION_CASCADE,
            ],
        ]);

        $this->hasMany('id', UserPasswordReset::class, 'user_id', [
            'alias' => 'PasswordResets',
            'foreignKey' => [
                'action' => Relation::ACTION_CASCADE,
            ],
        ]);

        $this->hasMany('id', UserLoginHistory::class, 'user_id', [
            'alias' => 'LoginHistory',
            'foreignKey' => [
                'action' => Relation::ACTION_CASCADE,
            ],
        ]);

        $this->belongsTo("user_type_id", UserType::class, "id", [
            "alias" => "UserType",
            "foreignKey" => [
                "allowNulls" => true,
                "message" => "The user type specified is invalid!"
            ],
        ]);
    }
132156
public function initialize()
    {
        if ($this->initialized === false) {
            $this->data = $this->cursor->toArray();
        }
        $this->initialized = true;
    }
662729
function Context() {
	/**
	 * @member {Object}
	 * @property {Object} client
	 * @property {Object<Call>} client.map - map from call name and call id
	 * @property {Array<Call>} client.list
	 * @property {Object} server
	 * @property {Object<Call>} server.map - map from call name and call id
	 * @property {Array<Call>} server.list
	 * @private
	 */
	this._calls = {
		client: {
			map: Object.create(null),
			list: []
		},
		server: {
			map: Object.create(null),
			list: []
		}
	}

	/**
	 * @member {Object}
	 * @property {Object} client
	 * @property {Object<Message>} client.map - map from message name and message id
	 * @property {Array<Message>} client.list
	 * @property {Object} server
	 * @property {Object<Message>} server.map - map from message name and message id
	 * @property {Array<Message>} server.list
	 * @private
	 */
	this._messages = {
		client: {
			map: Object.create(null),
			list: []
		},
		server: {
			map: Object.create(null),
			list: []
		}
	}
}
928537
private function _initialize()
    {
        $params = $this->getParameters();
        if ($params !== null) {
            for ($i = 0, $_i = count($params); $i < $_i; $i++) {
                if (self::FUNCTION_KEY == $params[$i]->getName()) {
                    $this->function = (string) $params[$i]->getValue();
                    break;
                }
            }
        }
    }