----- public static methods -----
964355
public static Iterable<GraphObject> map(final Iterable<Object> src) {

		return Iterables.map((Object t) -> {

			if (t instanceof GraphObject) {
				return (GraphObject)t;
			}

			if (t instanceof Map) {

				return Function.toGraphObjectMap((Map)t);
			}

			throw new ClassCastException(t.getClass() + " cannot be cast to " + GraphObject.class.getName());

		}, src);

	}
904234
public static void generateSQLForStaticQuery(final SQLiteModelMethod method, MethodSpec.Builder methodBuilder) {
		methodBuilder.addComment("generate static SQL for statement");
		JQLChecker checker = JQLChecker.getInstance();

		// replace the table name, other pieces will be removed
		String sql = checker.replace(method, method.jql, new JQLReplacerListenerImpl(method) {

			@Override
			public String onColumnNameToUpdate(String columnName) {
				return onColumnName(columnName);
			}

			@Override
			public String onColumnName(String columnName) {
				SQLProperty tempProperty = method.getEntity().get(columnName);

				AssertKripton.assertTrueOrUnknownPropertyInJQLException(tempProperty != null, method, columnName);

				return tempProperty.columnName;
			}

			@Override
			public String onBindParameter(String bindParameterName, boolean inStatement) {
				return "?";
			}
		});

		methodBuilder.addStatement("String _sql=$S", sql);
	}
989480
@Override
    public void visitCode(Code obj) {
        if (Values.STATIC_INITIALIZER.equals(getMethod().getName())) {
            state = State.SAW_NOTHING;
            super.visitCode(obj);
        }
    }
542390
private void process() {
    metadataBuilder = ConstructorMetadata.newBuilder().setClazz(clazz);
    MethodHandle mh = IntrospectionUtils.findDefaultConstructor(clazz);
    if (mh != null) {
      metadataBuilder.setConstructionStrategy(ConstructorMetadata.ConstructionStrategy.CLASSIC)
          .setConstructorMethodHandle(mh);
      // We have everything we need for the classic pattern with a default
      // constructor and accessor/mutator methods, more validations will
      // follow.
      return;
    }
    // Now we check for Builder pattern usage
    mh = findNewBuilderMethod(clazz);
    if (mh == null) {
      final String pattern = "Class %s requires a public no-arg constructor or a public static "
          + "method that returns a corresponding Builder instance. The name of the static method "
          + "can either be %s or %s";
      String error = String.format(pattern, clazz.getName(), METHOD_NAME_NEW_BUILDER,
          METHOD_NAME_BUILDER);
      throw new UnsupportedConstructionStrategyException(error);
    }
    Class<?> builderClass = mh.type().returnType();
    metadataBuilder.setConstructionStrategy(ConstructorMetadata.ConstructionStrategy.BUILDER)
        .setConstructorMethodHandle(mh).setBuilderClass(builderClass);
    MethodHandle buildMethodHandle = IntrospectionUtils.findInstanceMethod(builderClass,
        METHOD_NAME_BUILD, clazz);
    if (buildMethodHandle == null) {
      String pattern = "Class %s requires a public instance method, %s, with a return type of %s";
      throw new EntityManagerException(
          String.format(pattern, builderClass.getName(), METHOD_NAME_BUILD, clazz));
    }
    metadataBuilder.setBuildMethodHandle(buildMethodHandle);
  }
307151
static Method checkTimeMethod(Method timeMethod) throws InvalidBenchmarkException {
    checkArgument(isTimeMethod(timeMethod));
    Class<?>[] parameterTypes = timeMethod.getParameterTypes();
    if (!Arrays.equals(parameterTypes, new Class<?>[] {int.class})
        && !Arrays.equals(parameterTypes, new Class<?>[] {long.class})) {
      throw new InvalidBenchmarkException(
          "Microbenchmark methods must accept a single int parameter: " + timeMethod.getName());
    }

    // Static technically doesn't hurt anything, but it's just the completely wrong idea
    if (Util.isStatic(timeMethod)) {
      throw new InvalidBenchmarkException(
          "Microbenchmark methods must not be static: " + timeMethod.getName());
    }
    return timeMethod;
  }
1088163
@Override
    public void visitCode(final Code obj) {
        if (sourceLines == null) {
            return;
        }

        if (isAbstract) {
            return;
        }

        if (Values.STATIC_INITIALIZER.equals(methodName) || Values.CONSTRUCTOR.equals(methodName)) {
            return;
        }

        int methodStart = srcLineAnnotation.getStartLine() - 2;
        int methodLine = methodStart;
        String line;
        while ((methodLine >= 0) && (methodLine < sourceLines.length)) {
            line = sourceLines[methodLine];
            if (line.indexOf(methodName) >= 0) {
                break;
            }
            methodLine--;
        }

        if (methodLine < 0) {
            return;
        }

        for (int i = methodLine; i <= methodStart; i++) {
            if ((i < 0) || (i >= sourceLines.length)) {
                return;
            }
            line = sourceLines[i];
            if (line.indexOf("final") >= 0) {
                return;
            }
        }

        changedParms = new BitSet();
        super.visitCode(obj);

        BugInstance bi = null;
        for (int i = 0; i < firstLocalReg; i++) {
            if (changedParms.get(i)) {
                changedParms.clear(i);
                continue;
            }

            String parmName = getRegisterName(obj, i);
            if (bi == null) {
                bi = new BugInstance(this, BugType.FP_FINAL_PARAMETERS.name(), LOW_PRIORITY).addClass(this).addMethod(this).addSourceLine(this, 0);
                bugReporter.reportBug(bi);
            }
            bi.addString(parmName);
        }
        changedParms = null;
    }
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);

        }

    }
621687
@SuppressWarnings({"unchecked", "rawtypes"})
    @Override
    protected void initWorkplaceRequestValues(CmsWorkplaceSettings settings, HttpServletRequest request) {

        super.initWorkplaceRequestValues(settings, request);
        Map dialogMap = (Map)getDialogObject();
        if (dialogMap != null) {
            dialogMap.put(PARAM_SEARCH_PARAMS, m_searchParams);
            dialogMap.put(PARAM_SEARCH_OBJECT, m_search);
        }
    }
747808
public function init(): void
    {
        parent::init();

        if ($this->default !== '' && $this->default !== null && !is_array($this->default)) {
            try {
                $default = Json::decode($this->default);

                if (is_array($default)) {
                    $this->default = $default;
                }
            } catch (InvalidArgumentException $exception) {}
        }
    }
1374179
public function process()
    {
        parent::process();

        if ($this->value === null) {
            return;
        }

        $float_value = $this->getNumericValue($this->value);

        if ($float_value === null) {
            $this->addMessage($this->getValidationMessage('float'));
        } else {
            $this->value = $float_value;
        }
    }
306261
void generateValidationChecks(
            final CtClass ctClass,
            final StringBuilder validationChecksCode,
            final StringBuilder staticInitializerCode,
            final List<String> staticFields) {

        for (final CtField ctField : ctClass.getDeclaredFields()) {
            for (final Object annotationObject : ctField.getAvailableAnnotations()) {
                final Annotation annotation = (Annotation) annotationObject;
                if (ANNOTATIONS.contains(annotation.annotationType())) {
                    final Constraint constraint = annotation.annotationType().getAnnotation(Constraint.class);
                    final Class<? extends AnnotationCheck<? extends Annotation>> checkClass = constraint.checkWith();
                    final String checkType = checkClass.getName();
                    final String checkName = getCheckName(ctField.getName(), checkType);
                    final String fieldName = ctField.getName();

                    // Define the member for the check
                    staticFields.add(generateCheckFieldDeclaration(checkType, checkName));

                    // Define the member for the field context
                    staticFields.add(generateFieldContextDeclaration(ctClass.getName(), checkName, fieldName));

                    // Write the check initializer code
                    staticInitializerCode.append(
                            generateCheckInitializer(
                                    ctClass.getName(),
                                    checkName,
                                    fieldName,
                                    annotation.annotationType().getName()));

                    // Write the validation code
                    validationChecksCode.append(generateValidation(
                            annotation,
                            checkType,
                            checkName,
                            fieldName));
                }
            }
        }
    }
1353988
private void created() {
        String t = getTheme();
        if (t != null && !t.isEmpty()) setTheme(t);
    }
288403
@Override
    public MethodVisitor visitMethod(int access, String name, String desc, String signature, String exceptions[]) {
        // skip static initializers
        if (name.equals("<clinit>")) {
            return null;
        }

        MethodInfoImpl methodInfo = new MethodInfoImpl(name, desc, exceptions, access, classInfo);

        if (name.equals("<init>")) {
            constructorInfos.add(methodInfo);
        } else {
            methodInfos.add(methodInfo);
        }

        if (logParms != null) {
            logParms[1] = name;
            logParms[2] = methodInfo.getHashText();
        }

        methodVisitor.setMethodInfo(methodInfo);
        return methodVisitor;
    }
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);
    });
  }
340663
static void forEachColumnInContentValue(MethodSpec.Builder methodBuilder, final SQLiteModelMethod method, String columnSetString, boolean generateColumnNameCheck, OnColumnListener listener) {
		methodBuilder.beginControlFlow("for (String columnName:$L)", columnSetString);
		if (generateColumnNameCheck) {
			methodBuilder.beginControlFlow("if (!$L.contains(columnName))", method.contentProviderMethodName + "ColumnSet");
			methodBuilder.addStatement("throw new $T(String.format(\"For URI '$L', column '%s' does not exists in table '%s' or can not be defined in this $L operation\", columnName, $S ))",
					KriptonRuntimeException.class, method.contentProviderUriTemplate, method.jql.operationType, method.getEntity().getTableName());
			methodBuilder.endControlFlow();
		}
		if (listener != null)
			listener.onColumnCheck(methodBuilder, "columnName");
		methodBuilder.endControlFlow();
	}
1270365
public static void main(String[] s) {
		JFrame frame = new JFrame("JSpinField");
		frame.getContentPane().add(new JSpinField());
		frame.pack();
		frame.setVisible(true);
	}
1348497
@Override
    public void visitMethod(final Method obj) {
        methodName = obj.getName();
        methodIsStatic = obj.isStatic();
    }