/* generic situations
344111
public static void badParamExAssertTrue(boolean cond, IApiError apiError) throws Http400Exception {
		if (!cond) {
			throw new Http400Exception(apiError != null ? apiError : new GenericApiError());
		}
	}
663199
public static <T, U> SameType<T> of(TreeNode<T> expected, TreeDef<U> treeDef, U actual, Function<? super U, ? extends T> mapper) {
		return of(TreeNode.treeDef(), expected, treeDef, actual).mapToSame(TreeNode::getContent, mapper);
	}
748588
private static boolean hasGenerics(Parameter[] param) {
        if (param.length == 0) return false;
        for (Parameter parameter : param) {
            ClassNode type = parameter.getType();
            if (hasGenerics(type)) return true;
        }
        return false;
    }
1152769
def generic_add(a, b):
    print
    """"""
    logger.info('Called generic_add({}, {})'.format(a, b))
    return a + b
1149293
static <T> Object[] arguments(final Class<T> klass, final T instance,
                                  final Class<?>[] types,
                                  final String[] literals)
            throws ReflectiveOperationException {
        final Object[] arguments = new Object[literals.length];
        for (int i = 0; i < literals.length; i++) {
            if ("null".equals(literals[i])) {
                arguments[i] = null;
                continue;
            }
            if (literals[i].startsWith(":")) {
                final String name = literals[i].substring(1);
                final Field field = field(klass, name);
                if (!field.isAccessible()) {
                    field.setAccessible(true);
                }
                arguments[i] = field.get(instance);
                continue;
            }
            if (types[i] == String.class) {
                arguments[i] = literals[i];
                continue;
            }
            if (types[i].isPrimitive()) {
                types[i] = wrapper(types[i]);
            }
            arguments[i] = types[i]
                    .getMethod("valueOf", String.class)
                    .invoke(null, literals[i]);
        }
        return arguments;
    }
1072208
public static <T> SameType<T> of(TreeDef<T> treeDef, T expected, T actual) {
		return of(treeDef, expected, treeDef, actual).mapToSame(Function.identity(), Function.identity());
	}
877771
function aspectTo(target, type, method, fn, context) {
        var oriMethod = target[method];

        if (oriMethod) {
            if (type === 'before') {
                target[method] = function () {
                    // abort support
                    if (fn.apply(context || fn, arguments) !== false) {
                        oriMethod.apply(this, arguments);
                    }
                };
            }
            else if (type === 'after') {
                target[method] = function () {
                    oriMethod.apply(this, arguments);
                    fn.apply(context || fn, arguments);
                };
            }
        }

        return target;
    }
931766
void expectString(Node n, JSType type, String msg) {
    if (!type.matchesStringContext()) {
      mismatch(n, msg, type, STRING_TYPE);
    }
  }
33034
public void specify(Type value) {
        if (value instanceof GenericArrayType) {
            this.specify = ((GenericArrayType) value).getGenericComponentType();
        } else if (value instanceof Class && ((Class) value).isArray()) {
            this.specify = ((Class) value).getComponentType();
        } else {
            this.specify = value;
        }
    }
1020310
static final Context context(Element match, int matchIndex, int matchSize) {
        return new DefaultContext(match, matchIndex, matchSize);
    }
1238721
def generic_add(a, b):
    """"""
    logger.debug('Called generic_add({}, {})'.format(a, b))
    return a + b
1173287
function (type, exp1, exp2) {
      var result;

      switch (type) {
        case '=':
          result = (exp1 === exp2);
          break;

        case '>':
          result = (exp1 > exp2);
          break;

        case '<':
          result = (exp1 < exp2);
          break;

        case '>=':
          result = (exp1 >= exp2);
          break;

        case '<=':
          result = (exp1 === exp2);
          break;

        case '<>':
          result = (exp1 != exp2);
          break;

        case 'NOT':
          result = (exp1 != exp2);
          break;
      }

      return result;
    }
109218
public <T> T invoke(Context context, Class<T> classOfT, Type genericType) {
        T t = null;
        try {
            final String content = context.body();
            if (content == null || content.length() == 0) {
                return null;
            }
            if (genericType != null) {
                t = json.mapper().readValue(content,
                        json.mapper().constructType(genericType));
            } else {
                t = json.mapper().readValue(content, classOfT);
            }
        } catch (IOException e) {
            LOGGER.error(ERROR, e);
        }

        return t;
    }
102207
public void setGenericity(String v) {
    if (Event_Type.featOkTst && ((Event_Type)jcasType).casFeat_genericity == null)
      jcasType.jcas.throwFeatMissing("genericity", "de.julielab.jules.types.ace.Event");
    jcasType.ll_cas.ll_setStringValue(addr, ((Event_Type)jcasType).casFeatCode_genericity, v);}
279318
function(fs, subset) {
        for (var i = 0; i < fs.length; i++) {
            for (var j = 0; j < subset.length; j++) {
                if ((subset[j] !== undefined) && (fs[i].equivalentTo(subset[j]))) {
                    fs[i].causedBy = this.uniquesCausedBy(fs[i].causedBy, subset[j].causedBy);
                    fs[i].consequences = fs[i].consequences.concat(subset[j].consequences);
                    subset[j].doPropagate(fs[i]);                                                            
                    delete subset[j];
                }
            }
        }
        for (i = 0; i < subset.length; i++) {
            if (subset[i] !== undefined) fs.push(subset[i]);
        }
    }
893808
public void setGenericKeywords(java.util.Collection<String> genericKeywords) {
        if (genericKeywords == null) {
            this.genericKeywords = null;
            return;
        }

        this.genericKeywords = new java.util.ArrayList<String>(genericKeywords);
    }
1122561
function isInSomeParsingContext() {
            for (var kind = 0; kind < 26 /* Count */; kind++) {
                if (parsingContext & (1 << kind)) {
                    if (isListElement(kind, /*inErrorRecovery*/ true) || isListTerminator(kind)) {
                        return true;
                    }
                }
            }
            return false;
        }