----- private methods -----
163312
private void listFolder(final StructrShellCommand parent, final Iterable<AbstractFile> folder) throws FrameworkException, IOException {

		boolean hasContents = false;

		for (final AbstractFile child : folder) {

			if (parent.isAllowed(child, Permission.read, false)) {

				hasContents = true;

				if (child instanceof Folder) {

					term.setBold(true);
					term.setTextColor(4);
					term.print(child.getName() + "  ");
					term.setTextColor(7);
					term.setBold(false);

				} else {

					term.print(child.getName() + "  ");
				}
			}
		}

		if (hasContents) {
			term.println();
		}
	}
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));
	}
903120
@Override
    protected void processAnnotations(Object instance)
            throws IllegalAccessException, InvocationTargetException, NamingException
    {

        if (context == null)
        {
            // No resource injection
            return;
        }

        checkAnnotation(instance.getClass(), instance);

        /* 
         * May be only check non private fields and methods
         * for @Resource (JSR 250), if used all superclasses MUST be examined
         * to discover all uses of this annotation.
         */

        Class superclass = instance.getClass().getSuperclass();
        while (superclass != null && (!superclass.equals(Object.class)))
        {
            checkAnnotation(superclass, instance);
            superclass = superclass.getSuperclass();
        } 
    }
1262855
@Override
    public void process(final NeedleContext context) {
        Set<String> objectsUnderTestIds = context.getObjectsUnderTestIds();
        for (String objectUnderTestId : objectsUnderTestIds) {
            ObjectUnderTest objectUnderTestAnnotation = context.getObjectUnderTestAnnotation(objectUnderTestId);
            if (objectUnderTestAnnotation != null && objectUnderTestAnnotation.postConstruct()) {
                try {
                    process(context.getObjectUnderTest(objectUnderTestId));
                } catch (ObjectUnderTestInstantiationException e) {
                    throw new RuntimeException(e);
                }
            }
        }
    }
1270730
@Override
  public void run() {
    List<CompactionVerifier> verifiers = this.suite.getMapReduceVerifiers();
    for (CompactionVerifier verifier : verifiers) {
      if (!verifier.verify(dataset).isSuccessful()) {
        log.error("Verification {} for {} is not passed.", verifier.getName(), dataset.datasetURN());
        this.onMRTaskComplete (false, new IOException("Compaction verification for MR is failed"));
        return;
      }
    }

    super.run();
  }
369115
@Override
	public Void visitAnnotation(AnnotationMirror a, String p) {
		if (AnnotationAttributeType.INDEXES.getValue().equals(p)) {
			inTasks = true;
		}

		if (inTasks) {
			currentValue = new Pair<List<String>, Boolean>(new ArrayList<String>(), false);
			for (Map.Entry<? extends ExecutableElement, ? extends AnnotationValue> entry : a.getElementValues().entrySet()) {
				String key = entry.getKey().getSimpleName().toString();
				entry.getValue().accept(this, key);
			}
			indexes.add(currentValue);
		}

		if (AnnotationAttributeType.INDEXES.getValue().equals(p)) {
			inTasks = false;
		}

		return null;
	}
267660
@Override
    public void visit(PrimitiveParameter primitiveParameter) {
        PrimitiveParameter copy = new PrimitiveParameter(primitiveParameter.getId(), this.uniqueId != null ? this.uniqueId : primitiveParameter.getUniqueId());
        copy.setCreateDate(this.createDate != null ? this.createDate : primitiveParameter.getCreateDate());
        copy.setUpdateDate(this.updateDate != null ? this.updateDate : primitiveParameter.getUpdateDate());
        copy.setDeleteDate(this.deleteDate != null ? this.deleteDate : primitiveParameter.getDeleteDate());
        copy.setDownloadDate(this.downloadDate != null ? this.downloadDate : primitiveParameter.getDownloadDate());
        copy.setInterval(primitiveParameter.getInterval());
        copy.setSourceSystem(this.sourceSystem != null ? this.sourceSystem : primitiveParameter.getSourceSystem());
        if (this.references != null) {
            for (String refName : this.references.keySet()) {
                copy.setReferences(refName, this.references.get(refName));
            }
        } else {
            for (String refName : primitiveParameter.getReferenceNames()) {
                copy.setReferences(refName, primitiveParameter.getReferences(refName));
            }
        }
        if (this.properties != null) {
            for (String propName : this.properties.keySet()) {
                copy.setProperty(propName, this.properties.get(propName));
            }
        } else {
            for (String propName : primitiveParameter.getPropertyNames()) {
                copy.setProperty(propName, primitiveParameter.getProperty(propName));
            }
        }
        copy.setValue(primitiveParameter.getValue());
        this.theCopy = copy;
    }
1337580
@Override
    public void afterPropertiesSet() throws Exception {
        if (this.jaxbLoader == null && this.mappedXmlResource == null) {
            throw new BeanCreationException("Either the 'jaxbLoader' property or the 'mappedXmlResource' property needs to be set");
        }

        if (this.jaxbLoader == null) {
            this.jaxbLoader = new CachingJaxbLoaderImpl<>(PersonData.class);
            ((CachingJaxbLoaderImpl<PersonData>) this.jaxbLoader).setMappedXmlResource(this.mappedXmlResource);
        }
    }
699672
public void putInt(String key, int i) {
		checkNotNull(key);
		put(key, Integer.toString(i));
	}
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);
		}
	}
384431
@Override
	protected void processFeatureNames(QualifiedName name, NameAcceptor acceptor) {
		QualifiedName methodName = operatorMapping == null? null : operatorMapping.getMethodName(name);
		if (methodName != null) {
			acceptor.accept(methodName.toString(), 2);
			QualifiedName simpleOperator = operatorMapping.getSimpleOperator(name);
			if (simpleOperator != null) {
				QualifiedName simpleMethodName = operatorMapping.getMethodName(simpleOperator);
				if (simpleMethodName != null) {
					acceptor.accept(simpleMethodName.toString(), 3);
				}
			}
		} else {
			acceptor.accept(name.toString(), 1);
			processAsPropertyNames(name, acceptor);
		}
	}
1303455
@Override
    public boolean process(ContentEvent event) {
       
        if (event.isLastEvent() || 
                (instancesCount > 0 && instancesCount% this.sampleFrequency == 0)) {
            if (model.implementsMicroClusterer()) {

                Clustering clustering = model.getMicroClusteringResult();

                ClusteringResultContentEvent resultEvent = new ClusteringResultContentEvent(clustering, event.isLastEvent());

                this.outputStream.put(resultEvent);
            }
        }

        updateStats(event);
        return false;
    }
1197631
private void processProperties(XMLStreamWriter writer, Set<Method> methodSet, Class<?> aClass) throws IntrospectionException, XMLStreamException
   {
      BeanInfo beanInfo = Introspector.getBeanInfo(aClass, aClass.getSuperclass());
      PropertyDescriptor[] propertyDescriptors = beanInfo.getPropertyDescriptors();

      for (int i = 0; i < propertyDescriptors.length; i++)
      {
         PropertyDescriptor propertyDescriptor = propertyDescriptors[i];
         if (propertyDescriptor.getPropertyType() != null)
         {
            String name = propertyDescriptor.getName();
            Method readMethod = propertyDescriptor.getReadMethod();
            Method writeMethod = propertyDescriptor.getWriteMethod();

            String readMethodName = readMethod == null ? null : readMethod.getName();
            String writeMethodName = writeMethod == null ? null : writeMethod.getName();
            addProperty(writer, name, propertyDescriptor.getPropertyType(), readMethodName, writeMethodName);

            if (readMethod != null)
            {
               methodSet.add(readMethod);
            }

            if (writeMethod != null)
            {
               methodSet.add(writeMethod);
            }
         }
         else
         {
            processAmbiguousProperty(writer, methodSet, aClass, propertyDescriptor);
         }
      }
   }
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. ");
    }

  }
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);
    }
202492
@Nullable
  private static Object convertPrimitiveField(Group g, int fieldIndex, boolean binaryAsString)
  {
    PrimitiveType pt = (PrimitiveType) g.getType().getFields().get(fieldIndex);
    if (pt.isRepetition(Type.Repetition.REPEATED) && g.getFieldRepetitionCount(fieldIndex) > 1) {
      List<Object> vals = new ArrayList<>();
      for (int i = 0; i < g.getFieldRepetitionCount(fieldIndex); i++) {
        vals.add(convertPrimitiveField(g, fieldIndex, i, binaryAsString));
      }
      return vals;
    }
    return convertPrimitiveField(g, fieldIndex, 0, binaryAsString);
  }