----- private methods -----
425866
private void assertInitialized() {

		if (!services.isShuttingDown() && !services.isShutdownDone()) {

			// wait for service layer to be initialized
			while (!services.isInitialized()) {

				try { Thread.sleep(1000); } catch (Throwable t) {}
			}
		}
	}
720944
public void usage(GlobalMetadata global)
    {
        StringBuilder stringBuilder = new StringBuilder();
        usage(global, stringBuilder);
        System.out.println(stringBuilder.toString());
    }
226984
@Override
	protected void unserializeFrom(RawDataBuffer in)
    {
        super.unserializeFrom(in);
        sessionId = new IntegerID(in.readInt());   
    }
727730
@Override
    public void onXml(ClientProperties cp)
    {
        hsmd.onInitialize();
        if (cp != null)
        {
            hsmd.setClientProperties(cp);
        }
    }
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();
    }
339503
private static void forEachFields(SQLiteModelMethod method, OnPropertyListener listener) {
		for (SQLProperty item : method.getEntity().getCollection()) {
			listener.onProperty(item);
		}
	}
648982
public synchronized void putAll(Map<? extends String, ? extends XAttribute> t) {
		if(t.size() > 0) {
			if(backingStore == null) {
				try {
					backingStore = backingStoreClass.newInstance();
				} catch (Exception e) {
					// Fuckup
					e.printStackTrace();
				}
			}
			backingStore.putAll(t);
		}
	}
237611
void handleRepeatableAnnotations(final Set<String> allRepeatableAnnotationNames) {
        if (annotationInfo != null) {
            annotationInfo.handleRepeatableAnnotations(allRepeatableAnnotationNames, getClassInfo(),
                    RelType.METHOD_ANNOTATIONS, RelType.CLASSES_WITH_METHOD_ANNOTATION);
        }
        if (parameterAnnotationInfo != null) {
            for (int i = 0; i < parameterAnnotationInfo.length; i++) {
                final AnnotationInfo[] pai = parameterAnnotationInfo[i];
                if (pai != null && pai.length > 0) {
                    boolean hasRepeatableAnnotation = false;
                    for (final AnnotationInfo ai : pai) {
                        if (allRepeatableAnnotationNames.contains(ai.getName())) {
                            hasRepeatableAnnotation = true;
                            break;
                        }
                    }
                    if (hasRepeatableAnnotation) {
                        final AnnotationInfoList aiList = new AnnotationInfoList(pai.length);
                        for (final AnnotationInfo ai : pai) {
                            aiList.add(ai);
                        }
                        // There is currently no RelType.CLASSES_WITH_METHOD_PARAMETER_ANNOTATION, so set
                        // RelType values to null
                        aiList.handleRepeatableAnnotations(allRepeatableAnnotationNames, getClassInfo(), null,
                                null);
                        parameterAnnotationInfo[i] = aiList.toArray(new AnnotationInfo[0]);
                    }
                }
            }
        }
    }
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);
			}
		}
	}
1228963
private void onSuperClass(Class<?> clazz, List<Field> keys)
    {

        Class<?> superClass = clazz.getSuperclass();
        if (superClass != null
                && (superClass.isAnnotationPresent(MappedSuperclass.class) || superClass
                        .isAnnotationPresent(Entity.class)))
        {

            while (superClass != null
                    && (superClass.isAnnotationPresent(MappedSuperclass.class) || superClass
                            .isAnnotationPresent(Entity.class)))
            {
                for (Field field : superClass.getDeclaredFields())
                {

//                    if (checkValidField(field))
//                    {

                        onIdField(field, superClass);
                        if (field.isAnnotationPresent(Id.class))
                        {
                            keys.add(field);
                            // validate @GeneratedValue annotation if given
                            if (field.isAnnotationPresent(GeneratedValue.class))
                            {
                                validateGeneratedValueAnnotation(superClass, field);
                            }
                        }
                        else if (field.isAnnotationPresent(EmbeddedId.class))
                        {
                            keys.add(field);
                        }

                   // }
                }

                if (keys.size() > 0)
                {
                    onEntityKey(keys, superClass);
                    break;
                }
                superClass = superClass.getSuperclass();

            }
        }

        onEntityKey(keys, clazz);

    }
168780
public static void checkUnusedParameters(SQLiteModelMethod method, Set<String> usedMethodParameters, TypeName excludedClasses) {
		int paramsCount = method.getParameters().size();
		int usedCount = usedMethodParameters.size();

		if (paramsCount > usedCount) {
			StringBuilder sb = new StringBuilder();
			String separator = "";
			for (Pair<String, TypeName> item : method.getParameters()) {
				if (excludedClasses != null && item.value1.equals(excludedClasses)) {
					usedCount++;
				} else {
					if (!usedMethodParameters.contains(item.value0)) {
						sb.append(separator + "'" + item.value0 + "'");
						separator = ", ";
					}
				}
			}

			if (paramsCount > usedCount) {
				throw (new InvalidMethodSignException(method, "unused parameter(s) " + sb.toString()));
			}
		}
	}
1113251
public void setPrivateSkillIds(java.util.Collection<String> privateSkillIds) {
        if (privateSkillIds == null) {
            this.privateSkillIds = null;
            return;
        }

        this.privateSkillIds = new java.util.ArrayList<String>(privateSkillIds);
    }
26029
@Override
  public void update(final long value) {
    count.incrementAndGet();
    int index = (int) (value / binWidth);
    if (index >= numBins) {
      index = numBins - 1;
    }
    values.incrementAndGet(index);
  }
274438
private void processPropDefaultValues() {
    getMethodsWithAnnotation(component, PropDefault.class).forEach(method -> {
      PropDefault propValidator = method.getAnnotation(PropDefault.class);

      String exposedMethodName = exposeExistingJavaMethodToJs(method);
      String propertyName = propValidator.value();
      optionsBuilder.addStatement("options.addJavaPropDefaultValue(p.$L, $S)",
          exposedMethodName,
          propertyName);
    });
  }
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. ");
    }

  }
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);
    }
283920
public void init(Digits annotation, PropertyMetadata propertyMetadata)
    {
        m_integerDigits = (annotation.integerDigits()==null)?-1:Integer.parseInt(annotation.integerDigits());
        m_fractionalDigits = (annotation.fractionalDigits()==null)?-1:Integer.parseInt(annotation.fractionalDigits());
        m_propertyMetadata = propertyMetadata;
        m_message = annotation.message();
    }