TODO assert simplicity
172249
public static <T> T calc(DivisableNumberSystem<T> ns, Polygon2D<T> sp) {
        T two = ns.add(ns.getOne(), ns.getOne());
        return ns.divide(calcDouble(ns, sp), two);
    }
742465
function assertStd (result, std) {
    var message = 'Expected value to match following regexp: ' + std + ', but got: ' + result;

    if (typeof std === 'string' || typeof std === 'number') {
      assert.equal(result && result.code || result, std);
    }
    else if (std instanceof RegExp) {
      assert.isNotNull(result.match(std), message);
    }
    else if (typeof std === 'function') {
      assert.ok(std(result));
    }
    else if (typeof result !== 'string' && result !== null) {
      assert.equal(result.code, 0);
    }
  }
765238
private static void simpleClassTypeSignature(Result sb, TypeMirror type) throws IOException
    {
        switch (type.getKind())
        {
            case DECLARED:
                DeclaredType dt = (DeclaredType) type;
                TypeElement te = (TypeElement) dt.asElement();
                nestedSimpleName(sb, te);
                typeArguments(sb, dt.getTypeArguments());
                break;
            default:
                throw new UnsupportedOperationException(type.getKind()+" unsupported");
        }
    }
617927
function simpleExtend( from, to ) {
		for ( var k in from) {
			if (to[k] == undefined) {
				to[k] = from[k];
			}
		}
		return to;
	}
818946
private static Optional<ICondition> asContainsNone( JsonObject json)
    {
    return
      json.containsKey( HAS_NONE_KEY)
      ? Optional.of( new Not( new ContainsAny( toIdentifiers( json.getJsonArray( HAS_NONE_KEY)))))
      : Optional.empty();
    }
496341
@NonNull
  public static <T> T assertNotNull(T object, String item) {
    if (object == null) {
      throw new NullPointerException(item + " == null");
    }
    return object;
  }
1290223
@SuppressWarnings({ "rawtypes", "unchecked" })
  private <V extends Comparable> void verifyComparable(V value, V minimum, V maximum) {

    if (minimum != null) {
      if (maximum != null) {
        assert ((value.compareTo(minimum) < 0) || (value.compareTo(maximum) > 0));
      } else {
        assert (value.compareTo(minimum) < 0);
      }
    } else if (maximum != null) {
      assert (value.compareTo(maximum) > 0);
    } else {
      throw new NlsNullPointerException("minimum & maximum");
    }
  }
916076
function any (data) {
    if (array(data)) {
      return testArray(data, true);
    }

    assert.object(data);

    return testObject(data, true);
  }
1213249
function(a, end, msg) {
    return assert((this.assertIsString(a, msg) && a.indexOf(end, a.length - end.length) !== -1), msg);
  }
244533
def check_simple(self, checks, radl):
        """"""

        for f in self.features:
            if not isinstance(f, Feature) or f.prop not in checks:
                continue
            f._check(checks[f.prop], radl)
832211
public static void assertNotEmpty(final String string, final StatusType status) {
		RESTAssert.assertNotNull(string, status);
		RESTAssert.assertFalse(string.isEmpty(), status);
	}
166595
function (index, collection) {
        assertType(index, Number);
        assertNotNull(collection);

        if (index !== this.length) {
            validateListIndex(this, index);
        }

        var arr = buffer(collection),
            count = arr.length,
            len = this.length + count;

        this.length = len;

        while (len-- > index) {
            this[len] = this[len - count];
        }

        while (count-- > 0) {
            this[index + count] = arr[count];
        }
    }
1080737
private static Optional<ICondition> asBetween( JsonObject json)
    {
    return
      Optional.of( json)
      .filter( j -> j.containsKey( BETWEEN_KEY))
      .map( j -> j.getJsonObject( BETWEEN_KEY))
      .map( b -> 
        new Between(
          b.containsKey( EXCLUSIVE_MIN_KEY)
          ? new AssertMore( b.getString( PROPERTY_KEY), b.getInt( EXCLUSIVE_MIN_KEY))
          : new AssertNotLess( b.getString( PROPERTY_KEY), b.getInt( MIN_KEY)),

          b.containsKey( EXCLUSIVE_MAX_KEY)
          ? new AssertLess( b.getString( PROPERTY_KEY), b.getInt( EXCLUSIVE_MAX_KEY))
          : new AssertNotMore( b.getString( PROPERTY_KEY), b.getInt( MAX_KEY))));
    }
1039012
function (type, item, hard) {
        if (hard) {
            return harderTypes[type](getType(item), item);
        }
        return (getType(item) === simpleTypes[type]);
    }
87563
public void assertOneOrLess(final String paramName,
            final ParameterList parameters) throws ValidationException {

        if (parameters.getParameters(paramName).size() > 1) {
            throw new ValidationException(ASSERT_ONE_OR_LESS_MESSAGE, new Object[] {paramName});
        }
    }
712288
private int determineSize(List<Match> t) {
        Match firstMatch = t.get(0);
        if (!(firstMatch.token instanceof SimpleToken)) {
            return t.size();
        }
        int charLength = 0;
        for (Match m : t) {
            SimpleToken token = (SimpleToken) m.token;
            charLength += token.getNormalized().length();
        }
        return charLength;
    }
1296911
def is_simple(fun):
    """"""
    seen_load_fast_0 = False
    seen_load_response = False
    seen_call_fun = False

    for instruction in dis.get_instructions(fun):
        if instruction.opname == 'LOAD_FAST' and instruction.arg == 0:
            seen_load_fast_0 = True
            continue

        if instruction.opname == 'LOAD_ATTR' \
           and instruction.argval == 'Response':
            seen_load_response = True
            continue

        if instruction.opname.startswith('CALL_FUNCTION'):
            if seen_call_fun:
                return False

            seen_call_fun = True
            continue

    return seen_call_fun and seen_load_fast_0 and seen_load_response