convenience methods
12106
@Override
	public void setAll(boolean value) {
		checkMutable();
		if (value) {
			performAdjSet(start, finish);
		} else {
			performAdjClear(start, finish);
		}
	}
898664
private void mergeMethodHandleStore(final int index, final MethodHandle methodHandle) {
        localVariables.merge(index, new MethodHandle(methodHandle), Element::merge);
    }
13387
public void method2() {
        Engine engine = null;
        String configurationFile = "/ObstacleAvoidance.fll";
        URL url = SimpleDimmer.class.getResource(configurationFile);
        try {
            engine = new FllImporter().fromFile(new File(url.toURI()));
        } catch (Exception ex) {
            FuzzyLite.logger().log(Level.SEVERE, ex.toString(), ex);
        }

        FuzzyLite.logger().info(new FldExporter().toString(engine));
    }
83570
function methodCall( $elems, methodName, args ) {
    var returnValue;
    var pluginMethodStr = '$().' + namespace + '("' + methodName + '")';

    $elems.each( function( i, elem ) {
      // get instance
      var instance = $.data( elem, namespace );
      if ( !instance ) {
        logError( namespace + ' not initialized. Cannot call methods, i.e. ' +
          pluginMethodStr );
        return;
      }

      var method = instance[ methodName ];
      if ( !method || methodName.charAt(0) == '_' ) {
        logError( pluginMethodStr + ' is not a valid method' );
        return;
      }

      // apply method, get return value
      var value = method.apply( instance, args );
      // set return value if value is returned, use only first value
      returnValue = returnValue === undefined ? value : returnValue;
    });

    return returnValue !== undefined ? returnValue : $elems;
  }
43427
def collection_check_boxes(method, collection, value_method, text_method, options = {}, html_options = {})
      bootstrap = form_bootstrap.scoped(options.delete(:bootstrap))
      return super if bootstrap.disabled

      content = "".html_safe
      unless options[:include_hidden] == false
        content << hidden_field(method, multiple: true, value: "")
      end

      args = [bootstrap, :check_box, method, collection, value_method, text_method, options, html_options]
      content << draw_choices(*args) do |m, v, opts|
        opts[:multiple]       = true
        opts[:include_hidden] = false
        ActionView::Helpers::FormBuilder.instance_method(:check_box).bind(self).call(m, opts, v)
      end
    end
985049
private void fillMethods(final SQLiteDaoDefinition currentDaoDefinition, Element daoElement) {
		final One<Boolean> methodWithAnnotation=new One<Boolean>(false);
		
		// create method for dao
		SqlBuilderHelper.forEachMethods((TypeElement) daoElement, new MethodFoundListener() {

			@Override
			public void onMethod(ExecutableElement element) {
				if (excludedMethods.contains(element.getSimpleName().toString()))
					return;

				methodWithAnnotation.value0=false;
				final List<ModelAnnotation> annotationList = new ArrayList<>();

				// optional annotations
				final List<ModelAnnotation> supportAnnotationList = new ArrayList<>();

				AnnotationUtility.forEachAnnotations(element, new AnnotationFoundListener() {

					@Override
					public void onAcceptAnnotation(Element element, String annotationClassName,
							Map<String, String> attributes) {

						if // @formatter:off
						(annotationClassName.equals(BindSqlInsert.class.getCanonicalName())
								|| annotationClassName.equals(BindSqlUpdate.class.getCanonicalName())
								|| annotationClassName.equals(BindSqlDelete.class.getCanonicalName())
								|| annotationClassName.equals(BindSqlSelect.class.getCanonicalName())
								|| annotationClassName.equals(BindContentProviderEntry.class.getCanonicalName()))
						// @formatter:on
						{
							if (!annotationClassName.equals(BindContentProviderEntry.class.getCanonicalName())) {
								methodWithAnnotation.value0=true;	
							}
							
							ModelAnnotation annotation = new ModelAnnotation(annotationClassName, attributes);
							annotationList.add(annotation);
						}
						// we don't insert annotation

					}
				});
										
				annotationList.addAll(supportAnnotationList);
				final SQLiteModelMethod currentMethod = new SQLiteModelMethod(currentDaoDefinition, element,
						annotationList);
				
				AssertKripton.assertTrueOrInvalidMethodSignException(methodWithAnnotation.value0,  currentMethod, "method must be annotated with @%s, @%s, @%s or @%s",
						BindSqlSelect.class.getSimpleName(),
						BindSqlInsert.class.getSimpleName(),
						BindSqlUpdate.class.getSimpleName(),
						BindSqlDelete.class.getSimpleName());
						// annotated", currentDaoDefinition.getName(),
						// element.getSimpleName());

				addWithCheckMethod(currentDaoDefinition, currentMethod);
			}

			private void addWithCheckMethod(SQLiteDaoDefinition currentDaoDefinition, SQLiteModelMethod newMethod) {
				SQLiteModelMethod oldMethod = currentDaoDefinition.findPropertyByName(newMethod.getName());

				// ASSERT: same name and same number
				if (oldMethod != null && oldMethod.getParameters().size() == newMethod.getParameters().size()) {
					boolean sameParameters = true;
					for (int i = 0; i < oldMethod.getParameters().size(); i++) {
						if (!oldMethod.getParameters().get(i).value1.equals(newMethod.getParameters().get(i).value1)) {
							sameParameters = false;
							break;
						}
					}

					AssertKripton.failWithInvalidMethodSignException(sameParameters, newMethod,
							"conflict between generated method and declared method.");
				}

				// add method
				currentDaoDefinition.add(newMethod);

			}

		});
	}
205943
private static Method getMethod(String methodName, Class<?> clazz, Class<?>... args) {
        Method method;
        try {
            method = clazz.getMethod(methodName, args);
        } catch (NoSuchMethodException e1) {
            method = null;
        }
        return method;
    }
1179120
public void perform() {
		log.info(toString());

		WebElement element = finder.find();

		switch (stepMode) {
			case CHECK_VALUE:
				String checkValue = retrieveValue();
				if (checkTrafo != null) {
					checkValue = checkTrafo.trafo(checkValue);
				}
				checkValue(element, checkValue);
				break;

			case CHECK_DEFAULT:
				checkState(defaultsProvider != null, "No DefaultsProvider set when StepMode is CHECK_DEFAULT.");
				checkValue(element, defaultsProvider.get(element, dataSet, dataKey, dataIndex));
				break;

			case SET_VALUE:
				String setValue = retrieveValue();
				if (setTrafo != null) {
					setValue = setTrafo.trafo(setValue);
				}

				if (element.getTagName().equalsIgnoreCase(WebConstants.SELECT)) {

					Select select = new Select(element);
					// First check if a matching value can be found
					List<WebElement> options = select.getOptions();
					boolean found = false;
					for (WebElement option : options) {
						String optionValue = option.getAttribute(WebConstants.VALUE);
						if (StringUtils.equals(optionValue, setValue)) {
							/*
							 * WebElement with matching value could be found --> we are finished
							 */
							found = true;
							select.selectByValue(setValue);
							break;
						}
					}

					if (!found) {
						/*
						 * Fallback: look for a WebElement with a matching visible text
						 */
						for (WebElement option : options) {
							String visibleText = option.getText();
							if (StringUtils.equals(visibleText, setValue)) {
								/*
								 * WebElement with matching value could be found --> we are finished
								 */
								found = true;
								select.selectByVisibleText(setValue);
								break;
							}
						}
					}

					if (!found) {
						throw new JFunkException("Could not find a matching option element in " + element + " , By: "
								+ finder.getBy());
					}

				} else if (WebConstants.INPUT.equalsIgnoreCase(element.getTagName())
						&& WebConstants.RADIO.equals(element.getAttribute(WebConstants.TYPE))) {

					List<WebElement> elements = finder.findAll();
					for (WebElement webElement : elements) {
						String elVal = webElement.getAttribute(WebConstants.VALUE);
						if (elVal.equals(setValue) && !webElement.isSelected()) {
							webElement.click();
						}
					}

				} else if (WebConstants.CHECKBOX.equals(element.getAttribute(WebConstants.TYPE))) {

					if (Boolean.valueOf(setValue) && !element.isSelected() || !Boolean.valueOf(setValue) && element.isSelected()) {
						element.click();
					}

				} else {

					if (element.getAttribute("readonly") == null || element.getAttribute("readonly").equals("false")) {
						element.clear();
						element.sendKeys(setValue);
					} else {
						log.warn("Element is invisible or disabled, value cannot be set");
					}

				}
				break;

			case NONE:
				// do nothing
				break;

			default:
				throw new IllegalArgumentException("Unhandled StepMode=" + stepMode);
		}
	}
663345
def method_missing(meth, *args, &block)
      meth_str = meth.to_s

      if /^(\w+)\=$/.match(meth_str)
        _set($1, *args, &block)
      elsif args.length > 0 || block_given?
        _add(meth, *args, &block)
      elsif /^(\w+)\?$/.match(meth_str)
        !!_get($1)
      else
        _get_or_create_namespace(meth)
      end
    end
321417
public static void printCode(Method[] methods) {
        for (Method m : methods) {
            System.out.println(m);
            Code code = m.getCode();
            if (code != null) {
                System.out.println(code);
            }

        }
    }
336217
void writeBindingGetter(Key<?> key, Binding binding, GinScope scope,
      List<InjectorMethod> helperMethodsOutput) {
    Context bindingContext = binding.getContext();

    SourceSnippetBuilder getterBuilder = new SourceSnippetBuilder();
    SourceSnippet creationStatements;
    String getter = nameGenerator.getGetterMethodName(key);

    String typeName;
    try {
      typeName = ReflectUtil.getSourceName(key.getTypeLiteral());

      creationStatements = binding.getCreationStatements(nameGenerator, helperMethodsOutput);
    } catch (NoSourceNameException e) {
      errorManager.logError("Error trying to write getter for [%s] -> [%s];"
          + " binding declaration: %s", e, key, binding, bindingContext);
      return;
    }

    // Name of the field that we might need.
    String field = nameGenerator.getSingletonFieldName(key);

    switch (scope) {
      case EAGER_SINGLETON:
        initializeEagerSingletonsBody.append("// Eager singleton bound at:\n");
        appendBindingContextCommentToMethod(bindingContext, initializeEagerSingletonsBody);
        initializeEagerSingletonsBody.append(getter).append("();\n");
        // !break
        //CHECKSTYLE_OFF
      case SINGLETON:
        //CHECKSTYLE_OFF
        writer.println("private " + typeName + " " + field + " = null;");
        writer.println();
        getterBuilder.append(String.format("\nif (%s == null) {\n", field))
            .append(creationStatements).append("\n")
            .append(String.format("    %s = result;\n", field))
            .append("}\n")
            .append(String.format("return %s;\n", field));
        break;

      case NO_SCOPE:
        sourceWriteUtil.writeBindingContextJavadoc(writer, bindingContext, key);

        getterBuilder.append(creationStatements).append("\n").append("return result;\n");
        break;

      default:
        throw new IllegalStateException();
    }

    outputMethod(SourceSnippets.asMethod(false, String.format("public %s %s()", typeName, getter),
        fragmentPackageName.toString(), getterBuilder.build()));
  }
123325
def method_missing(name, *args, &blk)
      if name.to_s =~ /^default_(.*)=$/
        @default_options[$1.to_sym] = args.first
      elsif name.to_s =~ /=$/
        @dirty_options[$`.to_sym] = args.first
      elsif @default_options.key?(name)
        dirty_or_db_setting_or_default(name)
      else
        super
      end
    end
1354091
def method_missing(sym, *args, &block)
      type = sym.to_s
      if type.start_with?('_') && args.empty? && block.nil?
        constant = Object.const_get(type[1..-1])
        type(constant)
      else
        super
      end
    end
409693
private String getMethodArgs(Method m)
    {
        StringBuffer sb = new StringBuffer();
        Class [] argTypes = m.getParameterTypes();
        for (int i = 0; i < argTypes.length; i++)
        {
            if (i != 0) sb.append(",");
            sb.append(argTypes[i].toString());
        }
        return sb.toString();
    }
498688
function() {
    this._super();

    if (!this._options.implicit) {
      this.overrideProperty('<plural>', 'collection');
      this.overrideProperty('<singular>Objects', 'objectsQuery');
      this.addHelper('create<Singular>', 'createObject');
      this.addHelper('add<Singular>', 'addObjects');
      this.addHelper('add<Plural>', 'addObjects');
      this.addHelper('remove<Singular>', 'removeObjects');
      this.addHelper('remove<Plural>', 'removeObjects');
      this.addHelper('clear<Plural>', 'clearObjects');
      this.overrideMethod('init', 'initialize');
      this.overrideMethod('_dependents', 'dependents');
      this.overrideMethod('_reliants', 'reliants');
      this.overrideMethod('_postsave', 'postsave');
    }
  }
107192
private String createMethodSignature(Method method)
   {
      StringBuilder sb = new StringBuilder();
      sb.append("(");
      for (Class<?> type : method.getParameterTypes())
      {
         sb.append(getTypeString(type));
      }
      sb.append(")");
      Class<?> type = method.getReturnType();
      if (type.getName().equals("void"))
      {
         sb.append("V");
      }
      else
      {
         sb.append(getTypeString(type));
      }
      return sb.toString();
   }
501255
private static String createSig(Method m) {
        return m.getName() + ':' + MethodDesc.forMethod(m).getDescriptor();
    }