----------------------------------------------------------------------------------------------
19400
private void handleJobMasterError(final Throwable cause) {
		if (ExceptionUtils.isJvmFatalError(cause)) {
			log.error("Fatal error occurred on JobManager.", cause);
			// The fatal error handler implementation should make sure that this call is non-blocking
			fatalErrorHandler.onFatalError(cause);
		} else {
			jobCompletionActions.jobMasterFailed(cause);
		}
	}
395675
public function init()
    {
        if ($this->widget !== null) {
            $this->widget->init();
        }

        // ensure the widget has an id
        if ($this->widget->id === null) {
            $this->widget->id = $this->widget->getUniqueId();
        }
    }
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);
            }
        }
    }
1315126
public function onBeforeWrite()
    {
        $owner = $this->owner;
        if(!$owner->ID && !$owner->SubsiteID){
            $owner->SubsiteID = Subsite::currentSubsiteID();
        }
        parent::onBeforeWrite();
    }
866837
public function doFinalInitialization()
    {
        if (!$this->isInitialized) {
            foreach ($this->databases as $database) {
                $database->doFinalInitialization();
            }
            $this->isInitialized = true;
        }
    }
1318438
protected function init()
    {
        if (null === $this->items) {
            list($constraints, $sorting, $joins) = $this->translate($this->filter, $this->sorting);

            if (empty($constraints)) {
                $constraints = '';
            } else {
                $constraints = ' WHERE ' . implode(' AND ', $constraints);
            }

            if ($this->prefetch) {
                $this->initEntities($constraints, $this->makeJoins($joins), $this->makeOrderBy($sorting, $joins));
            } else {
                $this->initKeys($constraints, $this->makeJoins($joins), $this->makeOrderBy($sorting, $joins));
            }

            $this->rewind();
        }
    }
859111
private static function init() {
        self::$huffmanLookup = self::huffmanLookupInit();
        self::$huffmanCodes = self::huffmanCodesInit();
        self::$huffmanLengths = self::huffmanLengthsInit();

        foreach (\array_column(self::TABLE, 0) as $index => $name) {
            if (isset(self::$indexMap[$name])) {
                continue;
            }

            self::$indexMap[$name] = $index + 1;
        }
    }
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);
        }
    }
595526
function(){
    var sourceMap = this.sourceMap_;
    var memberMap = this.members_;
    var curMember;
    var newMember;
    var curMemberId;
    var newMemberId;
    var sourceObject;
    var sourceObjectInfo;
    var inserted = [];
    var deleted = [];
    var delta;

    for (var sourceObjectId in sourceMap)
    {
      sourceObjectInfo = sourceMap[sourceObjectId];
      sourceObject = sourceObjectInfo.sourceObject;

      curMember = sourceObjectInfo.member;
      newMember = this.map ? this.map(sourceObject) : sourceObject;

      if (newMember instanceof DataObject == false || this.filter(newMember))
        newMember = null;

      if (!isEqual(curMember, newMember))
      {
        sourceObjectInfo.member = newMember;

        // if here is ref for member already
        if (curMember)
        {
          curMemberId = curMember.basisObjectId;

          // call callback on member ref add
          if (this.removeMemberRef)
            this.removeMemberRef(curMember, sourceObject);

          // decrease ref count
          memberMap[curMemberId]--;
        }

        // if new member exists, update map
        if (newMember)
        {
          newMemberId = newMember.basisObjectId;

          // call callback on member ref add
          if (this.addMemberRef)
            this.addMemberRef(newMember, sourceObject);

          if (newMemberId in memberMap)
          {
            // member is already in map -> increase ref count
            memberMap[newMemberId]++;
          }
          else
          {
            // add to map
            memberMap[newMemberId] = 1;

            // add to delta
            inserted.push(newMember);
          }
        }
      }
    }

    // get deleted delta
    for (curMemberId in this.items_)
      if (memberMap[curMemberId] == 0)
      {
        delete memberMap[curMemberId];
        deleted.push(this.items_[curMemberId]);
      }

    // if any changes, fire event
    if (delta = getDelta(inserted, deleted))
      this.emit_itemsChanged(delta);

    return delta;
  }
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;
    }
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;
	}
763427
public function init()
    {
        parent::init();

        if ($this->tile !== null) {
            $this->tile->init();
        }

        foreach ($this->groups as $group) {
            $group->init();
            // index the group by id if it is not already indexed
            if (!array_key_exists($group->id, $this->groups_by_id)) {
                $this->groups_by_id[$group->id] = $group;
            }
        }
    }
759689
public function init()
    {
        $this->renameTableQueries = array();
        $this->dropCheckQueries = array();
        $this->dropForeignKeyQueries = array();
        $this->dropIndexQueries = array();
        $this->dropPrimaryKeyQueries = array();
        $this->dropColumnQueries = array();
        $this->alterColumnQueries = array();
        $this->createColumnQueries = array();
        $this->createPrimaryKeyQueries = array();
        $this->createIndexQueries = array();
        $this->createForeignKeyQueries = array();
        $this->createCheckQueries = array();
    }
1122260
protected function initialize()
    {
        if (!is_array($this->queryResult)) {
            $this->queryResult = $this->dataMapper->mapToObjects($this->persistenceManager->getObjectDataByQuery($this->query));
        }
    }
132156
public function initialize()
    {
        if ($this->initialized === false) {
            $this->data = $this->cursor->toArray();
        }
        $this->initialized = true;
    }
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);
    }
1107878
public void init() {
    initConfigurators();
    configuratorsBeforeInit();
    initHistoryLevel();
    initExpressionManager();

    if (usingRelationalDatabase) {
      initDataSource();
    }

    initAgendaFactory();
    initHelpers();
    initVariableTypes();
    initBeans();
    initScriptingEngines();
    initClock();
    initBusinessCalendarManager();
    initCommandContextFactory();
    initTransactionContextFactory();
    initCommandExecutors();
    initServices();
    initIdGenerator();
    initBehaviorFactory();
    initListenerFactory();
    initBpmnParser();
    initProcessDefinitionCache();
    initProcessDefinitionInfoCache();
    initKnowledgeBaseCache();
    initJobHandlers();
    initJobManager();
    initAsyncExecutor();

    initTransactionFactory();

    if (usingRelationalDatabase) {
      initSqlSessionFactory();
    }

    initSessionFactories();
    initDataManagers();
    initEntityManagers();
    initHistoryManager();
    initJpa();
    initDeployers();
    initDelegateInterceptor();
    initEventHandlers();
    initFailedJobCommandFactory();
    initEventDispatcher();
    initProcessValidator();
    initDatabaseEventLogging();
    configuratorsAfterInit();
  }