/* --- Private methods ---
323656
private void reduceDependencies(Map<ResolvedFolder, AbstractDependencyResolver> topFolderResolverMap) {
        //reduce the dependencies and duplicates files
        Set<String> topFolders = new HashSet<>();
        topFolderResolverMap.entrySet().forEach((resolverEntry) -> topFolders.addAll(resolverEntry.getKey().getTopFoldersFound().keySet()));

        // Take all resolvers and their folders
        for (Map.Entry<ResolvedFolder, AbstractDependencyResolver> entry : topFolderResolverMap.entrySet()) {
            AbstractDependencyResolver resolver = entry.getValue();
            ResolvedFolder resolvedFolder = entry.getKey();
            if (resolver != null && resolvedFolder != null) {
                // All folders of the current resolver (top folders and sub folders)
                Set<String> foldersFound = resolvedFolder.getTopFoldersFound().keySet();
                // Get the relevant folders for the current resolver (can be all folders or top folders only ...)
                Collection<String> foldersForResolver = resolver.getRelevantScannedFolders(foldersFound);
                // Remove all the irrelevant folders
                resolvedFolder.getTopFoldersFound().keySet().removeIf(folder -> !foldersForResolver.contains(folder));
            }
        }

    }
211833
@Deprecated
    public void dump(java.io.PrintStream out) {
        if (out == null) {
            out = System.out;
        }
        this.fRData.dump(out);
    }
680751
@Requires({
     "types != null",
     "sources != null",
     "types.size() == sources.size()"
  })
  protected void dumpSources(List<TypeModel> types,
                             List<SyntheticJavaFile> sources) {
    Iterator<TypeModel> itType = types.iterator();
    Iterator<SyntheticJavaFile> itFile = sources.iterator();
    while (itType.hasNext() && itFile.hasNext()) {
      TypeModel type = itType.next();
      SyntheticJavaFile file = itFile.next();
      DebugUtils.dump(type.getName().getBinaryName(),
                      file.getCharContent(true).toString().getBytes(),
                      Kind.SOURCE);
    }
  }
912935
public void readExternal(ObjectInput in) throws IOException,
			ClassNotFoundException {
		super.readExternal(in);
		String messageString = in.readUTF();
		try {
			message = SipFactoryImpl.messageFactory.createResponse(messageString);
		} catch (ParseException e) {
			throw new IllegalArgumentException("Message " + messageString + " previously serialized could not be reparsed", e);
		}
		boolean isOriginalRequestSerialized = in.readBoolean();
		if (isOriginalRequestSerialized) {
			originalRequest = (SipServletRequestImpl) in.readObject();
		}
		boolean isProxyBranchSerialized = in.readBoolean();
		if (isProxyBranchSerialized) {
			proxyBranch = (ProxyBranchImpl) in.readObject();
		}
		isProxiedResponse = in.readBoolean();
		isResponseForwardedUpstream = in.readBoolean();
		isAckGenerated = in.readBoolean();
		isPrackGenerated = in.readBoolean();
		hasBeenReceived = in.readBoolean();
	}
1064377
private void parse()
   {
      template = text;
      if (StringUtils.isEmptyTrimmed(template))
         return;
      int index = 0;
      while (template.indexOf("${") != -1)
      {
         int from = template.lastIndexOf("${");
         int to = template.indexOf("}", from + 2);
         if (to == -1)
         {
            template = text;
            complex = false;
            entities.clear();
            return;
         }

         int dv = template.indexOf(":", from + 2);
         if (dv != -1 && dv > to)
         {
            dv = -1;
         }
         String systemProperty = null;
         String defaultValue = null;
         String s = template.substring(from + 2, to);
         if ("/".equals(s))
         {
            systemProperty = File.separator;
         }
         else if (":".equals(s))
         {
            systemProperty = File.pathSeparator;
            dv = -1;
         }
         else
         {
            systemProperty = SecurityActions.getSystemProperty(s);
         }

         if (dv != -1)
         {
            s = template.substring(from + 2, dv);
            systemProperty = SecurityActions.getSystemProperty(s);
            defaultValue = template.substring(dv + 1, to);
         }
         String prefix = "";
         String postfix = "";
         String key = StringUtils.createKey(index++);
         updateComplex(defaultValue);
         entities.put(key, new Expression(s, defaultValue, systemProperty));

         if (from != 0)
         {
            prefix = template.substring(0, from);
         }
         if (to + 1 < template.length())
         {
            postfix = template.substring(to + 1);
         }
         template = prefix + key + postfix;
      }
      updateComplex(template);
   }
1370710
public void readExternal(ObjectInput in) throws IOException,
                                            ClassNotFoundException {
        super.readExternal( in );
        sink = (ObjectSinkPropagator) in.readObject();
        alphaNodeHashingThreshold = in.readInt();
        source = ( ObjectSource ) in.readObject();
    }
389142
@Override
    public String getString(@NonNull String key) {
        if (key == null) { throw new IllegalArgumentException("key cannot be null."); }

        final int index = indexForColumnName(key);
        return index >= 0 ? getString(index) : null;
    }
485647
private void _ws() throws
      IOException
  {
    builder.type = Type.S;
    // no need to preserve exact whitespace
    // but append an S char to keep the token
    // contract of always having a value
    builder.append(' ');
    reader.forward(NOT_WHITESPACE);

    if (debug)
    {
      int nxt = reader.peek();
      checkArgument(WHITESPACE.matches((char) reader.curChar));
      if (nxt > -1)
      {
        checkArgument(NOT_WHITESPACE.matches((char) nxt));
      }
    }
  }
1032257
public void detail(MethodNode methodNode, MethodAttributes attrs, StringBuilder output) {
        Validate.notNull(methodNode);
        Validate.notNull(attrs);
        Validate.notNull(output);

        int methodId = attrs.getSignature().getMethodId();

        output.append("Class Name: ").append(attrs.getSignature().getClassName().replace('/', '.')).append('\n');
        output.append("Method Name: ").append(attrs.getSignature().getMethodName()).append('\n');
        output.append("Method Params: ").append(attrs.getSignature().getMethodDescriptor()).append('\n');
        output.append("Method Return: ").append(attrs.getSignature().getReturnType()).append('\n');
        output.append("Method ID: ").append(methodId).append('\n');
        output.append("------------------------------------\n");

        UnmodifiableList<ContinuationPoint> cps = attrs.getContinuationPoints();
        for (int i = 0; i < cps.size(); i++) {
            ContinuationPoint cp = cps.get(i);

            int line = cp.getLineNumber() == null ? -1 : cp.getLineNumber();
            String header = String.format("Continuation Point ID: %-4d Line: %-4d Type: %s",
                    i,
                    line,
                    cp.getClass().getSimpleName());
            output.append(header).append('\n');

            // Check out PackStateGenerators class for how things are organized. Brief overview follows...
            // container[0] has local variables that are bytes/shorts/ints
            // container[1] has local variables that are floats
            // container[2] has local variables that are longs
            // container[3] has local variables that are doubles
            // container[4] has local variables that are Objects
            // container[5] has operands that are bytes/shorts/ints
            // container[6] has operands that are floats
            // container[7] has operands that are longs
            // container[8] has operands that are doubles
            // container[9] has operands that are Objects
            detailLocals(cp, methodNode, output);
            detailOperands(cp, output);

            output.append('\n');
        }
        
        output.append('\n');
    }
82160
private void putPropertyStrings(Service s) {
        String type = s.getType();
        String algorithm = s.getAlgorithm();
        // use super() to avoid permission check and other processing
        super.put(type + "." + algorithm, s.getClassName());
        for (String alias : s.getAliases()) {
            super.put(ALIAS_PREFIX + type + "." + alias, algorithm);
        }
        for (Map.Entry<UString,String> entry : s.attributes.entrySet()) {
            String key = type + "." + algorithm + " " + entry.getKey();
            super.put(key, entry.getValue());
        }
        if (registered) {
            Security.increaseVersion();
        }
    }
809985
public static void extractPlaceholders(ClassNode node, Map<String, GenericsType> map) {
        if (node == null) return;

        if (node.isArray()) {
            extractPlaceholders(node.getComponentType(), map);
            return;
        }

        if (!node.isUsingGenerics() || !node.isRedirectNode()) return;
        GenericsType[] parameterized = node.getGenericsTypes();
        if (parameterized == null || parameterized.length == 0) return;
        GenericsType[] redirectGenericsTypes = node.redirect().getGenericsTypes();
        if (redirectGenericsTypes==null) redirectGenericsTypes = parameterized;
        for (int i = 0; i < redirectGenericsTypes.length; i++) {
            GenericsType redirectType = redirectGenericsTypes[i];
            if (redirectType.isPlaceholder()) {
                String name = redirectType.getName();
                if (!map.containsKey(name)) {
                    GenericsType value = parameterized[i];
                    map.put(name, value);
                    if (value.isWildcard()) {
                        ClassNode lowerBound = value.getLowerBound();
                        if (lowerBound!=null) {
                            extractPlaceholders(lowerBound, map);
                        }
                        ClassNode[] upperBounds = value.getUpperBounds();
                        if (upperBounds!=null) {
                            for (ClassNode upperBound : upperBounds) {
                                extractPlaceholders(upperBound, map);
                            }
                        }
                    } else if (!value.isPlaceholder()) {
                        extractPlaceholders(value.getType(), map);
                    }
                }
            }
        }
    }
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);
    });
  }
466762
public void readExternal(ObjectInput in) throws IOException,
			ClassNotFoundException {
		if(logger.isDebugEnabled()) {
            logger.debug("readExternal");
        }

		super.readExternal(in);
		String messageString = in.readUTF();
		try {
			message = SipFactoryImpl.messageFactory.createRequest(messageString);
		} catch (ParseException e) {
			throw new IllegalArgumentException("Message " + messageString + " previously serialized could not be reparsed", e);
		}
		boolean isLinkedRequestSerialized = in.readBoolean();
		if (isLinkedRequestSerialized) {
			linkedRequest = (SipServletRequestImpl) in.readObject();
		}
		createDialog = in.readBoolean();
		String routingDirectiveString = in.readUTF();
		if(!routingDirectiveString.equals("")) {
			routingDirective = SipApplicationRoutingDirective.valueOf(routingDirectiveString);
		}
		String routingStateString = in.readUTF();
		if(!routingStateString.equals("")) {
			routingState = RoutingState.valueOf(routingStateString);
		}
		boolean isRoutingRegionSet = in.readBoolean();
		if(isRoutingRegionSet) {
			routingRegion = (SipApplicationRoutingRegion) in.readObject();
		}
		isInitial = in.readBoolean();
		if(logger.isDebugEnabled()) {
            logger.debug("readExternal - isInitial=" + isInitial);
        }
		isFinalResponseGenerated = in.readBoolean();
		is1xxResponseGenerated = in.readBoolean();
	}
219062
public void putNull(String key) {
		if (this.compiledStatement != null) {
			compiledStatement.bindNull(compiledStatementBindIndex++);
		} else if (values != null) {
			values.putNull(key);
			return;
		}

		names.add(key);
		// values.putNull(key);
		args.add(null);
		valueType.add(ParamType.NULL);
	}
233814
private void moveToNext(final int i) {
    final int next = iterators.length + i;
    timestamps[i] = timestamps[next];
    values[i] = values[next];
    //LOG.debug("Moving #" + next + " -> #" + i
    //          + ((timestamps[i] & FLAG_FLOAT) == FLAG_FLOAT
    //             ? " float " + Double.longBitsToDouble(values[i])
    //             : " long " + values[i])
    //          + " @ time " + (timestamps[i] & TIME_MASK));
    final SeekableView it = iterators[i];
    if (it.hasNext()) {
      putDataPoint(next, it.next());
    } else {
      endReached(i);
    }
  }
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);
		}
	}
960490
private static String[] getObjValues(Object source, String... fieldnames) throws Exception {
        String[] results = new String[fieldnames.length];
        Field field;
        String value;
        Object obj;
        for (int i = 0; i < fieldnames.length; i++) {
            field = FieldUtil.getField(source, fieldnames[i]);
            if (field == null) {
                continue;
            }
            obj = field.get(source);
            if (obj == null) {
                value = "";
            } else if (obj instanceof Date) {
                value = DateUtil.smartFormat((Date) obj);
            } else {
                value = String.valueOf(obj);
            }
            results[i] = value;
        }
        return results;
    }