----- private methods -----
977497
private void rebuildNodeIndex(final String entityType) {

		final NodeFactory nodeFactory       = new NodeFactory(SecurityContext.getSuperUserInstance());
		final DatabaseService graphDb       = (DatabaseService) arguments.get("graphDb");
		Iterator<AbstractNode> nodeIterator = null;

		nodeIterator = Iterables.map(nodeFactory, graphDb.getNodesByTypeProperty(entityType)).iterator();

		if (entityType == null) {

			info("Node type not set or no entity class found. Starting (re-)indexing all nodes");

		} else {

			info("Starting (re-)indexing all nodes of type {}", entityType);
		}

		long count = bulkGraphOperation(securityContext, nodeIterator, 1000, "RebuildNodeIndex", new BulkGraphOperation<AbstractNode>() {

			@Override
			public boolean handleGraphObject(SecurityContext securityContext, AbstractNode node) {

				node.addToIndex();

				return true;
			}

			@Override
			public void handleThrowable(SecurityContext securityContext, Throwable t, AbstractNode node) {
				logger.warn("Unable to index node {}: {}", new Object[]{node, t.getMessage()});
			}

			@Override
			public void handleTransactionFailure(SecurityContext securityContext, Throwable t) {
				logger.warn("Unable to index node: {}", t.getMessage());
			}
		});

		info("Done with (re-)indexing {} nodes", count);
	}
346201
@Nullable
	@Override
	public String getMapping(Method method) {

		String key = key(method.getDeclaringClass(), method);

		return MAPPINGS.computeIfAbsent(key, __ -> delegate.getMapping(method));
	}
1093377
@SuppressWarnings( "unchecked" )
    protected void processParametersOfMethodDeclaration( MethodDeclaration methodDeclaration,
                                                         MethodMetadata methodMetadata ) {
        for (SingleVariableDeclaration singleVariableDeclaration : (List<SingleVariableDeclaration>)methodDeclaration.parameters()) {
            Type type = singleVariableDeclaration.getType();

            if (type.isPrimitiveType()) {
                FieldMetadata primitiveFieldMetadata = processVariableDeclaration(singleVariableDeclaration, type);
                methodMetadata.getParameters().add(primitiveFieldMetadata);
            }
            if (type.isParameterizedType()) {
                FieldMetadata parameterizedTypeFieldMetadata = processVariableDeclaration(singleVariableDeclaration, type);
                methodMetadata.getParameters().add(parameterizedTypeFieldMetadata);
            }
            if (type.isQualifiedType()) {
                // TODO
            }
            if (type.isSimpleType()) {
                FieldMetadata simpleTypeFieldMetadata = processVariableDeclaration(singleVariableDeclaration, type);
                methodMetadata.getParameters().add(simpleTypeFieldMetadata);
            }
            if (type.isArrayType()) {
                FieldMetadata arrayTypeFieldMetadata = processVariableDeclaration(singleVariableDeclaration, type);
                methodMetadata.getParameters().add(arrayTypeFieldMetadata);
            }
            if (type.isWildcardType()) {
                // TODO
            }
        }

    }
83206
@Override
	protected void unserializeFrom(RawDataBuffer in)
    {
        super.unserializeFrom(in);
        sessionId = new IntegerID(in.readInt());
        consumerId = new IntegerID(in.readInt());
        message = MessageSerializer.unserializeFrom(in, false);
        donePrefetching = in.readBoolean();
    }
1043719
public void process() {
		try {
			Enumeration<URL> urls = Thread.currentThread().getContextClassLoader().getResources("META-INF/persistence.xml");
			XMLInputFactory factory = XMLInputFactory.newInstance();
			List<String> persistenceUnits = new ArrayList<String>();
			
			while (urls.hasMoreElements()) {
				URL url = urls.nextElement();
				XMLStreamReader reader = factory.createXMLStreamReader(url.openStream());
				
				while (reader.hasNext()) {
					if (reader.next() == XMLStreamConstants.START_ELEMENT 
							&& reader.getName().getLocalPart().equals("persistence-unit")) {
						for (int i = 0; i < reader.getAttributeCount(); i++) {
							if (reader.getAttributeLocalName(i).equals("name")) {
								persistenceUnits.add(reader.getAttributeValue(i));
								break;
							}
						}
					}
				}
			}
			
			this.persistenceUnits = persistenceUnits;
		} catch (Exception e) {
			logger.error("Failed to parse persistence.xml", e);
		}
	}
693762
@Override
	protected void doLinking() {
		IParseResult parseResult = getParseResult();
		if (parseResult == null || parseResult.getRootASTElement() == null)
			return;

		XtextLinker castedLinker = (XtextLinker) getLinker();
		castedLinker.discardGeneratedPackages(parseResult.getRootASTElement());
	}
1155430
static void validateDeferredIdAllocation(Object entity) {
    IdentifierMetadata identifierMetadata = EntityIntrospector.getIdentifierMetadata(entity);
    if (identifierMetadata.getDataType() == DataType.STRING) {
      throw new EntityManagerException(
          "Deferred ID allocation is not applicable for entities with String identifiers. ");
    }

  }
141097
@SuppressWarnings({ "unchecked", "rawtypes" })
	protected void ensureLocalSpaceDefinition(SpaceID id, Object[] initializationParameters) {
		synchronized (getSpaceRepositoryMutex()) {
			if (!this.spaces.containsKey(id)) {
				createSpaceInstance((Class) id.getSpaceSpecification(), id, false, initializationParameters);
			}
		}
	}
1338628
@Override
  public void from(Map<KEY, VALUE> map) {
    getMap().putAll(nullSafeMap(map));
  }
854768
public void init(Range annotation, PropertyMetadata propertyMetadata)
    {
        m_maxExclusive = getValue(annotation.maxExclusive());
        m_minExclusive = getValue(annotation.minExclusive());
        m_maxInclusive = getValue(annotation.maxInclusive());
        m_minInclusive = getValue(annotation.minInclusive());
        
        m_maxExclusiveMessage = annotation.maxExclusiveMessage();
        m_minExclusiveMessage = annotation.minExclusiveMessage();
        m_maxInclusiveMessage = annotation.maxInclusiveMessage();
        m_minInclusiveMessage = annotation.minInclusiveMessage();
        m_propertyMetadata = propertyMetadata;
    }
771984
private void initHeader(final List<String> currentFields) {
		final Map<String, Integer> localHeaderMap = new LinkedHashMap<>(currentFields.size());
		for (int i = 0; i < currentFields.size(); i++) {
			final String field = currentFields.get(i);
			if (StrUtil.isNotEmpty(field) && false ==localHeaderMap.containsKey(field)) {
				localHeaderMap.put(field, i);
			}
		}
		
		header = new CsvRow(this.lineNo, Collections.unmodifiableMap(localHeaderMap),  Collections.unmodifiableList(currentFields));
	}
257868
public function process()
    {
        parent::process();

        if ($this->value === null) {
            $this->path = array();
        } else {
            $this->path = $this->value;
            $this->value = end($this->path);
        }
    }
285138
@Override
    public void processOtherContent(Wrapper<Content> content) {
        if (parentElement != null) {
            parentElement.addContent(content.getContent());
        }
    }
329908
@Override
    public <O> void set(String key, O value) {
        set(key,value,null,false);
    }
1147173
@Override
    public void visitAnnotation(Annotations arg0) {
        for (AnnotationEntry ae : arg0.getAnnotationEntries()) {
            boolean runtimeVisible = ae.isRuntimeVisible();
            String name = ClassName.fromFieldSignature(ae.getAnnotationType());
            if (name == null) {
                continue;
            }
            name = ClassName.toDottedClassName(name);
            Map<String, ElementValue> map = new HashMap<>();
            for (ElementValuePair ev : ae.getElementValuePairs()) {
                map.put(ev.getNameString(), ev.getValue());
            }
            visitAnnotation(name, map, runtimeVisible);

        }

    }
1319886
public static void set(Headers headers, Object destination) {

    Field[] publicFields;
    Field[] privateFields;
    Field[] fields;

    Class<?> cls = destination.getClass();
    publicFields = cls.getFields();
    privateFields = cls.getDeclaredFields();
    fields = new Field[publicFields.length + privateFields.length];
    System.arraycopy(publicFields, 0, fields, 0, publicFields.length);
    System.arraycopy(privateFields, 0, fields, publicFields.length, privateFields.length);

    for (Field field : fields) {
      Annotation annotation = field.getAnnotation(Header.class);
      if (annotation == null) {
        continue;
      }

      Header httpHeader = (Header) annotation;
      String value = httpHeader.value();
      String setter = httpHeader.setter();
      if (setter.isEmpty()) {
        // assume setter name as 'setFieldName'
        String name = field.getName();
        setter = "set" + name.substring(0, 1).toUpperCase(Locale.US) + name.substring(1);
      }

      try {
        Method setterMethod = cls.getMethod(setter, new Class[]{String.class});
        String valueString = headers.get(value);
        if (valueString != null) {
          setterMethod.invoke(destination, valueString);
        }
      } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException
               | IllegalArgumentException e) {
        LOGGER.log(Level.SEVERE, "exception occured: ", e);
        LOGGER.log(Level.INFO, "setter: " + setter);
        LOGGER.log(Level.INFO, "annotation: " + value);
        LOGGER.log(Level.INFO, "value: " + headers.get(value));
      }
    }
  }
1114492
public void init(ServletRequest request)
    {
        String[] vals = request.getParameterValues(ITEM_PARAM);

        if (vals != null) {
            _retrieveMap = new HashMap();

            for (int i = 0; i < vals.length; i++) {
                String val = vals[i];
                int delimPos = val.indexOf(DELIM);
                if (delimPos != -1) {
                    String expressionToRetrieve = val.substring(0, delimPos);
                    String fieldID = val.substring(delimPos + 1);
                    _retrieveMap.put(fieldID, expressionToRetrieve);
                }
            }
        }

        _callbackFunc = request.getParameter(CALLBACK_PARAM);
    }