Fix object identity should be 'is not' case.
967359
def fix_e714(self, result):
        """"""
        (line_index, offset, target) = get_index_offset_contents(result,
                                                                 self.source)

        # to convert once 'is not' -> 'is'
        before_target = target[:offset]
        target = target[offset:]
        match_isnot = COMPARE_NEGATIVE_REGEX_THROUGH.search(target)
        isnot_pos_start, isnot_pos_end = 0, 0
        if match_isnot:
            isnot_pos_start = match_isnot.start(1)
            isnot_pos_end = match_isnot.end()
            target = '{}{} {}'.format(
                target[:isnot_pos_start], 'in', target[isnot_pos_end:])

        match = COMPARE_NEGATIVE_REGEX.search(target)
        if match:
            if match.group(3).startswith('is'):
                pos_start = match.start(1)
                new_target = '{5}{0}{1} {2} {3} {4}'.format(
                    target[:pos_start], match.group(2), match.group(3),
                    match.group(1), target[match.end():], before_target)
                if match_isnot:
                    # revert 'is' -> 'is not'
                    pos_start = isnot_pos_start + offset
                    pos_end = isnot_pos_end + offset - 4     # len('not ')
                    new_target = '{}{} {}'.format(
                        new_target[:pos_start], 'is not', new_target[pos_end:])
                self.source[line_index] = new_target
287008
def _fix_value(self, value):
        
        try:
            return self._castfunc(value)
        except:
            error = "Can't put '{0}' ({1}) into a {2}. Expected a {3} object."
            error = error.format(
                value,                  # Input value
                type(value),            # Type of input value
                type(self),             # Type of collection
                self._type              # Expected type of input value
            )
            six.reraise(TypeError, TypeError(error), sys.exc_info()[-1])
346642
function rename(object, fromKey, toKey) {
  if ((0, _has2.default)(object, fromKey)) {
    object[toKey] = object[fromKey];
    delete object[fromKey];
  }
}
753377
def _ensure_object_id(cls, id):
        """"""
        if isinstance(id, ObjectId):
            return id

        if isinstance(id, basestring) and OBJECTIDEXPR.match(id):
            return ObjectId(id)

        return id
1242366
def _assure_identity(fnc):
    """"""
    def _wrapped(*args, **kwargs):
        if identity is None:
            _create_identity()
        return fnc(*args, **kwargs)
    return _wrapped
140080
function booleanNonStrict(validatedObject, errorText) {
  if (!_.isBoolean(validatedObject)) {
    if (
      !_.isString(validatedObject) ||
      (validatedObject.toLowerCase() !== 'false' && validatedObject.toLowerCase() !== 'true')
    ) {
      throw new ValidationError(errorText || 'Validated object is not Boolean');
    }
  }
  return validatedObject;
}
1051863
public static void notNull(final Object object, final String objectName) {
        if (object == null) {
            throw new IllegalArgumentException("expecting non-null value for " + maskNullArgument(objectName));
        }
    }
297437
def toggle_object_status(self, objname):
        
        o = getattr(self.system, objname)
        o.status = not o.status
        self.system.flush()
        return o.status
270603
private void resetIdentifierType()
  {
    Expression expression = getExpression();
    if( expression == null )
    {
      return;
    }

    Identifier identifier = getIdentifier();
    if( identifier == null )
    {
      return;
    }

    ISymbol symbol = identifier.getSymbol();
    if( symbol.getType() == GosuParserTypes.NULL_TYPE() )
    {
      symbol.setType( expression.getType() );
    }
  }
221650
function isPlainObject(value) {
  return t.binaryExpression(
    "===",
    toFunctionCall(t.identifier("String"), [value]),
    t.stringLiteral("[object Object]")
  );
}
949947
def normalizeInternalObjectType(value, cls, name):
    
    if not isinstance(value, cls):
        raise TypeError("%s must be a %s instance, not %s."
                        % (name, name, type(value).__name__))
    return value
1026799
function fixMultisigOrder (input, transaction, vin) {
  if (input.redeemScriptType !== scriptTypes.MULTISIG || !input.redeemScript) return;
  if (input.pubKeys.length === input.signatures.length) return;

  const unmatched = input.signatures.concat();

  input.signatures = input.pubKeys.map(pubKey => {
    const keyPair = ECPair.fromPublicKeyBuffer(pubKey);
    let match;

    // check for a signature
    unmatched.some((signature, i) => {
      // skip if undefined || OP_0
      if (!signature) return false;

      // TODO: avoid O(n) hashForSignature
      const parsed = ECSignature.parseScriptSignature(signature);
      const hash = transaction.hashForSignature(vin, input.redeemScript, parsed.hashType);

      // skip if signature does not match pubKey
      if (!keyPair.verify(hash, parsed.signature)) return false;

      // remove matched signature from unmatched
      unmatched[i] = undefined;
      match = signature;

      return true;
    });

    return match;
  });
}
837284
def check_obj(keys, name, obj):
    """"""
    msg = validate_obj(keys, obj)

    if msg:
        raise aomi.exceptions.AomiData("object check : %s in %s" % (msg, name))
475788
@Fix(IssueCodes.INVALID_MEMBER_NAME)
	public void fixMemberName(final Issue issue, IssueResolutionAcceptor acceptor) {
		MemberRenameModification.accept(this, issue, acceptor);
		MemberRemoveModification.accept(this, issue, acceptor);
	}
1321597
function fixVarNames(varObj = {}) {
    const reLeadingHyphens = /^-{2}/;

    return Object.keys(varObj).reduce((obj, value) => {
        const key = reLeadingHyphens.test(value) ? value : `--${value.replace(/^-+/, '')}`;

        obj[key] = varObj[value];

        return obj;
    }, {});
}
812987
function booleanFalse(validatedObject, errorText) {
  if (!_.isBoolean(validatedObject) || validatedObject) {
    throw new ValidationError(errorText || 'Validated object is not False');
  }
  return validatedObject;
}
1310895
function isEmptyObject(obj) {
    if (obj === null) {
        return true;
    }
    if (!isObject(obj)) {
        return false;
    }

    for (var key in obj) {
        if (obj.hasOwnProperty(key) && obj[key]) {
            return false;
        }
    }

    return true;
}