Used to do the common work of computeChangeSet and recomputeSingleDocumentChangeSet
558112
private function computeOrRecomputeChangeSet(ClassMetadata $class, object $document, bool $recompute = false) : void
    {
        $oid           = spl_object_hash($document);
        $actualData    = $this->getDocumentActualData($document);
        $isNewDocument = ! isset($this->originalDocumentData[$oid]);
        if ($isNewDocument) {
            // Document is either NEW or MANAGED but not yet fully persisted (only has an id).
            // These result in an INSERT.
            $this->originalDocumentData[$oid] = $actualData;
            $changeSet                        = [];
            foreach ($actualData as $propName => $actualValue) {
                /* At this PersistentCollection shouldn't be here, probably it
                 * was cloned and its ownership must be fixed
                 */
                if ($actualValue instanceof PersistentCollectionInterface && $actualValue->getOwner() !== $document) {
                    $actualData[$propName] = $this->fixPersistentCollectionOwnership($actualValue, $document, $class, $propName);
                    $actualValue           = $actualData[$propName];
                }
                // ignore inverse side of reference relationship
                if (isset($class->fieldMappings[$propName]['reference']) && $class->fieldMappings[$propName]['isInverseSide']) {
                    continue;
                }
                $changeSet[$propName] = [null, $actualValue];
            }
            $this->documentChangeSets[$oid] = $changeSet;
        } else {
            if ($class->isReadOnly) {
                return;
            }
            // Document is "fully" MANAGED: it was already fully persisted before
            // and we have a copy of the original data
            $originalData           = $this->originalDocumentData[$oid];
            $isChangeTrackingNotify = $class->isChangeTrackingNotify();
            if ($isChangeTrackingNotify && ! $recompute && isset($this->documentChangeSets[$oid])) {
                $changeSet = $this->documentChangeSets[$oid];
            } else {
                $changeSet = [];
            }

            $gridFSMetadataProperty = null;

            if ($class->isFile) {
                try {
                    $gridFSMetadata         = $class->getFieldMappingByDbFieldName('metadata');
                    $gridFSMetadataProperty = $gridFSMetadata['fieldName'];
                } catch (MappingException $e) {
                }
            }

            foreach ($actualData as $propName => $actualValue) {
                // skip not saved fields
                if ((isset($class->fieldMappings[$propName]['notSaved']) && $class->fieldMappings[$propName]['notSaved'] === true) ||
                    ($class->isFile && $propName !== $gridFSMetadataProperty)) {
                    continue;
                }

                $orgValue = $originalData[$propName] ?? null;

                // skip if value has not changed
                if ($orgValue === $actualValue) {
                    if (! $actualValue instanceof PersistentCollectionInterface) {
                        continue;
                    }

                    if (! $actualValue->isDirty() && ! $this->isCollectionScheduledForDeletion($actualValue)) {
                        // consider dirty collections as changed as well
                        continue;
                    }
                }

                // if relationship is a embed-one, schedule orphan removal to trigger cascade remove operations
                if (isset($class->fieldMappings[$propName]['embedded']) && $class->fieldMappings[$propName]['type'] === 'one') {
                    if ($orgValue !== null) {
                        $this->scheduleOrphanRemoval($orgValue);
                    }
                    $changeSet[$propName] = [$orgValue, $actualValue];
                    continue;
                }

                // if owning side of reference-one relationship
                if (isset($class->fieldMappings[$propName]['reference']) && $class->fieldMappings[$propName]['type'] === 'one' && $class->fieldMappings[$propName]['isOwningSide']) {
                    if ($orgValue !== null && $class->fieldMappings[$propName]['orphanRemoval']) {
                        $this->scheduleOrphanRemoval($orgValue);
                    }

                    $changeSet[$propName] = [$orgValue, $actualValue];
                    continue;
                }

                if ($isChangeTrackingNotify) {
                    continue;
                }

                // ignore inverse side of reference relationship
                if (isset($class->fieldMappings[$propName]['reference']) && $class->fieldMappings[$propName]['isInverseSide']) {
                    continue;
                }

                // Persistent collection was exchanged with the "originally"
                // created one. This can only mean it was cloned and replaced
                // on another document.
                if ($actualValue instanceof PersistentCollectionInterface && $actualValue->getOwner() !== $document) {
                    $actualValue = $this->fixPersistentCollectionOwnership($actualValue, $document, $class, $propName);
                }

                // if embed-many or reference-many relationship
                if (isset($class->fieldMappings[$propName]['type']) && $class->fieldMappings[$propName]['type'] === 'many') {
                    $changeSet[$propName] = [$orgValue, $actualValue];
                    /* If original collection was exchanged with a non-empty value
                     * and $set will be issued, there is no need to $unset it first
                     */
                    if ($actualValue && $actualValue->isDirty() && CollectionHelper::usesSet($class->fieldMappings[$propName]['strategy'])) {
                        continue;
                    }
                    if ($orgValue !== $actualValue && $orgValue instanceof PersistentCollectionInterface) {
                        $this->scheduleCollectionDeletion($orgValue);
                    }
                    continue;
                }

                // skip equivalent date values
                if (isset($class->fieldMappings[$propName]['type']) && $class->fieldMappings[$propName]['type'] === 'date') {
                    /** @var DateType $dateType */
                    $dateType      = Type::getType('date');
                    $dbOrgValue    = $dateType->convertToDatabaseValue($orgValue);
                    $dbActualValue = $dateType->convertToDatabaseValue($actualValue);

                    $orgTimestamp    = $dbOrgValue instanceof UTCDateTime ? $dbOrgValue->toDateTime()->getTimestamp() : null;
                    $actualTimestamp = $dbActualValue instanceof UTCDateTime ? $dbActualValue->toDateTime()->getTimestamp() : null;

                    if ($orgTimestamp === $actualTimestamp) {
                        continue;
                    }
                }

                // regular field
                $changeSet[$propName] = [$orgValue, $actualValue];
            }
            if ($changeSet) {
                $this->documentChangeSets[$oid] = isset($this->documentChangeSets[$oid])
                    ? $changeSet + $this->documentChangeSets[$oid]
                    : $changeSet;

                $this->originalDocumentData[$oid] = $actualData;
                $this->scheduleForUpdate($document);
            }
        }

        // Look for changes in associations of the document
        $associationMappings = array_filter(
            $class->associationMappings,
            static function ($assoc) {
                return empty($assoc['notSaved']);
            }
        );

        foreach ($associationMappings as $mapping) {
            $value = $class->reflFields[$mapping['fieldName']]->getValue($document);

            if ($value === null) {
                continue;
            }

            $this->computeAssociationChanges($document, $mapping, $value);

            if (isset($mapping['reference'])) {
                continue;
            }

            $values = $mapping['type'] === ClassMetadata::ONE ? [$value] : $value->unwrap();

            foreach ($values as $obj) {
                $oid2 = spl_object_hash($obj);

                if (isset($this->documentChangeSets[$oid2])) {
                    if (empty($this->documentChangeSets[$oid][$mapping['fieldName']])) {
                        // instance of $value is the same as it was previously otherwise there would be
                        // change set already in place
                        $this->documentChangeSets[$oid][$mapping['fieldName']] = [$value, $value];
                    }

                    if (! $isNewDocument) {
                        $this->scheduleForUpdate($document);
                    }

                    break;
                }
            }
        }
    }
114660
@Override
  public Future<? extends List<Pair<SpecExecutor.Verb, Spec>>> changedSpecs() {
    List<Pair<SpecExecutor.Verb, Spec>> changesSpecs = new ArrayList<>();

    try {
      Pair<SpecExecutor.Verb, Spec> specPair = _jobSpecQueue.take();
      _metrics.jobSpecDeqCount.incrementAndGet();
      do {
        changesSpecs.add(specPair);

        // if there are more elements then pass them along in this call
        specPair = _jobSpecQueue.poll();
      } while (specPair != null);
    } catch (InterruptedException e) {
      Thread.currentThread().interrupt();
    }

    return new CompletedFuture(changesSpecs, null);
  }
881947
@Override
    protected ChangeSet getFilteredChangeSet(ChangeSet changeSet) {
        changeSet = super.getFilteredChangeSet(changeSet);
        if (changeSet != null && !changeSet.isEmpty() && xmlFlatteningEnabled && reindexItemsOnComponentUpdates) {
            List<String> createdFiles = changeSet.getCreatedFiles();
            List<String> updatedFiles = changeSet.getUpdatedFiles();
            List<String> deletedFiles = changeSet.getDeletedFiles();
            List<String> newUpdatedFiles = new ArrayList<>(updatedFiles);

            if (CollectionUtils.isNotEmpty(createdFiles)) {
                for (String path : createdFiles) {
                    if (isComponent(path)) {
                        addItemsThatIncludeComponentToUpdatedFiles(path, createdFiles, newUpdatedFiles, deletedFiles);
                    }
                }
            }

            if (CollectionUtils.isNotEmpty(updatedFiles)) {
                for (String path : updatedFiles) {
                    if (isComponent(path)) {
                        addItemsThatIncludeComponentToUpdatedFiles(path, createdFiles, newUpdatedFiles, deletedFiles);
                    }
                }
            }


            if (CollectionUtils.isNotEmpty(deletedFiles)) {
                for (String path : deletedFiles) {
                    if (isComponent(path)) {
                        addItemsThatIncludeComponentToUpdatedFiles(path, createdFiles, newUpdatedFiles, deletedFiles);
                    }
                }
            }

            return new ChangeSet(createdFiles, newUpdatedFiles, deletedFiles);
        } else {
            return changeSet;
        }
    }
268794
@Override
	public void sawOpcode(final int seen) {
		try {
			stack.precomputation(this);

			if (seen == Const.INVOKEINTERFACE) {
				processInvokeInterface();
			} else if (seen == Const.INVOKEVIRTUAL) {
				processInvokeVirtual();
			} else if ((seen == Const.ARETURN) && (stack.getStackDepth() > 0)) {
				OpcodeStack.Item item = stack.getStackItem(0);
				XField field = item.getXField();
				if (field != null) {
					String fieldName = field.getName();
					fieldsReported.remove(fieldName);
					if (fieldsReported.isEmpty()) {
						throw new StopOpcodeParsingException();
					}
				}
			}
		} finally {
			stack.sawOpcode(this, seen);
		}
	}
1336771
protected void modified(Map<String, Object> newProperties) throws Exception {
        final boolean trace = TraceComponent.isAnyTracingEnabled();
        if (trace && tc.isEntryEnabled())
            Tr.entry(this, tc, "modified", newProperties);
        boolean reCreateNeeded = false;

        lock.writeLock().lock();
        try {
            properties = newProperties;
            if (pm != null) {
                try {
                    processServerPoolManagerProperties(null, newProperties);
                } catch (IllegalStateException e1) {
                    if (trace && tc.isDebugEnabled())
                        Tr.debug(this, tc, "modify failed, retrying", CommonFunction.stackTraceToString(e1));
                    try {
                        processServerPoolManagerProperties(null, newProperties);
                    } catch (IllegalStateException e2) {
                        reCreateNeeded = true;
                        if (trace && tc.isDebugEnabled())
                            Tr.debug(this, tc, "retry failed", CommonFunction.stackTraceToString(e2));
                    }
                }
            }
        } finally {
            lock.writeLock().unlock();
        }

        if (reCreateNeeded)
            try {
                setChanged();
                notifyObservers();
            } catch (Throwable x) {
                FFDCFilter.processException(x, getClass().getName(), "402", this);
                if (trace && tc.isDebugEnabled())
                    Tr.debug(this, tc, x.getMessage(), CommonFunction.stackTraceToString(x));
            }

        if (trace && tc.isEntryEnabled())
            Tr.exit(this, tc, "modified");
    }
439749
def _get_operations(self, context):
        """"""
        #Most of the time, the real-time update is going to fire with
        #incomplete statements that don't result in any changes being made
        #to the module instances. The SequenceMatches caches hashes for the
        #second argument. Logically, we want to turn the cached version into
        #the buffer version; however, the buffer is the string that keeps 
        #changing.

        #in order to optimize the real-time update, we *switch* the two strings
        #when we set the sequence and then fix the references on the operations
        #after the fact.
        if context.module.changed or self.unset:
            self.matcher.set_seq2(context.cachedstr)
            self.unset = False
            #Set the changed flag back to false now that the sequencer has
            #reloaded it.
            context.module.changed = False
        self.matcher.set_seq1(context.bufferstr)

        opcodes = self.matcher.get_opcodes()
        result = []

        #Index i keeps track of how many operations were actually added because
        #they constituted a change we need to take care of.
        i = 0
        for code in opcodes:
            if code[0] != "equal":
                #Replacements don't have a mode change. All of the operations
                #switch the order of the line indices for the two strings.
                if code[0] == "insert":
                    newcode = ("delete", code[3], code[4], code[1], code[2])
                elif code[0] == "delete":
                    newcode = ("insert", code[3], code[4], code[1], code[2])
                else:
                    newcode = ("replace", code[3], code[4], code[1], code[2])

                op = Operation(context, self.parser, newcode, i)
                result.append(op)
                i += 1

        return result
106316
def transient_change_diff(self, transient_appeared, transient_gone, *class_build_args, **class_build_kwargs):
        

        to_add = set(regexes_match_sublist(self.transients_args, transient_appeared))
        lost_matches = {n for n in self.transients if find_first_regex_match(n, self.transients_args) is None}
        to_remove = set(transient_gone) | lost_matches  # we stop interfacing with lost transient OR lost matches

        return self.update_transients(
            add_names=to_add,
            remove_names=to_remove,
            *class_build_args,
            **class_build_kwargs
        )
1350037
private void sawMethodOpcode(int seen) {
        boolean isSyncCollection = false;
        try {
            stack.mergeJumps(this);
            isSyncCollection = isSyncCollectionCreation(seen);

            switch (seen) {
                case Const.INVOKEVIRTUAL:
                case Const.INVOKEINTERFACE:
                    String methodName = getNameConstantOperand();
                    if (modifyingMethods.contains(methodName)) {
                        String signature = getSigConstantOperand();
                        int parmCount = SignatureUtils.getNumParameters(signature);
                        if (stack.getStackDepth() > parmCount) {
                            OpcodeStack.Item item = stack.getStackItem(parmCount);
                            XField field = item.getXField();
                            if (field != null) {
                                collectionFields.remove(field.getName());
                            } else {
                                int reg = item.getRegisterNumber();
                                if (reg >= 0) {
                                    Integer register = Integer.valueOf(reg);
                                    String fName = aliases.get(register);
                                    if (fName != null) {
                                        collectionFields.remove(fName);
                                        aliases.remove(register);
                                    }
                                }
                            }
                        }
                    }
                    removeCollectionParameters();
                break;

                case Const.INVOKESTATIC:
                    removeCollectionParameters();
                break;

                case Const.ARETURN:
                    if (stack.getStackDepth() > 0) {
                        OpcodeStack.Item item = stack.getStackItem(0);
                        XField field = item.getXField();
                        if (field != null) {
                            collectionFields.remove(field.getName());
                        }
                    }
                break;

                case Const.PUTFIELD:
                case Const.PUTSTATIC:
                    String fieldName = getNameConstantOperand();
                    collectionFields.remove(fieldName);
                break;

                case Const.GOTO:
                case Const.GOTO_W:
                    if (stack.getStackDepth() > 0) {
                        OpcodeStack.Item item = stack.getStackItem(0);
                        XField field = item.getXField();
                        if (field != null) {
                            collectionFields.remove(field.getName());
                        }
                    }
                break;
                default:
                break;
            }
        } finally {
            TernaryPatcher.pre(stack, seen);
            stack.sawOpcode(this, seen);
            TernaryPatcher.post(stack, seen);
            if (isSyncCollection && (stack.getStackDepth() > 0)) {
                OpcodeStack.Item item = stack.getStackItem(0);
                item.setUserValue(Boolean.TRUE);
            }
        }

    }
1010844
private void processComputed() {
    getMethodsWithAnnotation(component, Computed.class).forEach(method -> {
      ComputedKind kind = ComputedKind.GETTER;
      if ("void".equals(method.getReturnType().toString())) {
        kind = ComputedKind.SETTER;
      }

      String exposedMethodName = exposeExistingJavaMethodToJs(method);
      String fieldName = computedPropertyNameToFieldName(getComputedPropertyName(method));
      TypeMirror propertyType = getComputedPropertyTypeFromMethod(method);
      fieldsWithNameExposed.add(new ExposedField(fieldName, propertyType));
      optionsBuilder.addStatement(
          "options.addJavaComputed(p.$L, $T.getFieldName(this, () -> this.$L = $L), $T.$L)",
          exposedMethodName,
          VueGWTTools.class,
          fieldName,
          getFieldMarkingValueForType(propertyType),
          ComputedKind.class,
          kind
      );
    });

    addFieldsForComputedMethod(component, new HashSet<>());
  }
469670
@Override
    public void configurationChanged() {

        HashSet<Param> changedParams = new HashSet();

        // read dynamic parameters
        for (Param param : parameters) {

            if (! param.isStatic()) {

                // preserve current value
                Object oldValue = param.getValue();

                // read new value
                readAndValidateParameter(param);

                // get if parameter value had changed
                if (! ConfigUtil.equalValues(oldValue, param.getValue())) {
                    changedParams.add(param);
                }
            }

        }

        // invoke listeners for all changed parameters
        if (! changedParams.isEmpty()) {

            for (ConfigChangeListener listener : configChangeListeners) {
                listener.configurationChanged(changedParams);
            }

        }

    }
1282566
function convertData(objectBody, objectChange) {
    const keysChange = Object.keys(objectChange);
    let objectReturn = {};
    keysChange.map(keyChange => {
        let changeOption = objectChange[keyChange];
        let valueKeyReturn = getValueChangeOption(objectBody, keyChange, changeOption, objectReturn);
        if(valueKeyReturn !== undefined && valueKeyReturn !== null){
            objectReturn[keyChange] = valueKeyReturn;
        }
        return keyChange;
    });
    return objectReturn;
}
286571
static AbstractConfigValue makeReplacement(ResolveContext context, List<AbstractConfigValue> stack, int skipping) {
        List<AbstractConfigValue> subStack = stack.subList(skipping, stack.size());

        if (subStack.isEmpty()) {
            if (ConfigImpl.traceSubstitutionsEnabled())
                ConfigImpl.trace(context.depth(), "Nothing else in the merge stack, replacing with null");
            return null;
        } else {
            // generate a new merge stack from only the remaining items
            AbstractConfigValue merged = null;
            for (AbstractConfigValue v : subStack) {
                if (merged == null)
                    merged = v;
                else
                    merged = merged.withFallback(v);
            }
            return merged;
        }
    }
363645
function(oldItem, newItem) {
      if(data.operations) {
        for(var i = 0; i < data.operations.length; i++) {
          var operation = data.operations[i];
          if(newItem && newItem[operation.field] !== undefined || oldItem && oldItem[operation.field] !== undefined) {
            opsToolbox[operation.operation].recompute(operations[operation.field], operation, oldItem, newItem);
          }
        }
      }
    }
620398
@Override
    protected void onDataChanged() {
        super.onDataChanged();

        int currentAngle = 0;
        int index = 0;
        int size = mPieData.size();

        for (PieModel model : mPieData) {
            int endAngle = (int) (currentAngle + model.getValue() * 360.f / mTotalValue);
            if(index == size-1) {
                endAngle = 360;
            }

            model.setStartAngle(currentAngle);
            model.setEndAngle(endAngle);
            currentAngle = model.getEndAngle();
            index++;
        }
        calcCurrentItem();
        onScrollFinished();
    }
1099698
function interpolation5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {
    var different = bindingUpdated4(v0, v1, v2, v3);
    different = bindingUpdated(v4) || different;
    return different ?
        prefix + stringify$1(v0) + i0 + stringify$1(v1) + i1 + stringify$1(v2) + i2 + stringify$1(v3) + i3 +
            stringify$1(v4) + suffix :
        NO_CHANGE;
}
511851
@Override
    public void stateChanged(ChangeEvent e) {
        log.debug("getting new collector");
        collector = (CorrectedResultCollector) createTestElement();
        if (collector instanceof CorrectedResultCollector) {
            setUpFiltering((CorrectedResultCollector) collector);
        }
        collector.loadExistingFile();
    }
326010
public ChangeSet read(final InputSource in) throws SAXException,
                                                  IOException {
        return (ChangeSet) this.parser.read( in );
    }