Default implementation for backwards compatibility.
425660
@Override
    public D newDocument(String id, int expiry, T content, long cas, MutationToken mutationToken) {
        LOGGER.warn("This transcoder ({}) does not support mutation tokens - this method is a " +
            "stub and needs to be implemented on custom transcoders.", this.getClass().getSimpleName());
        return newDocument(id, expiry, content, cas);
    }
336480
public void isEqualToDefaultInstance() {
    if (actual() == null) {
      failWithoutActual(
          simpleFact(
              lenientFormat(
                  "Not true that %s is a default proto instance. It is null.", actualAsString())));
    } else if (!actual().equals(actual().getDefaultInstanceForType())) {
      failWithoutActual(
          simpleFact(
              lenientFormat(
                  "Not true that %s is a default proto instance. It has set values.",
                  actualAsString())));
    }
  }
1005112
public static String getDefaultCompilerId( String sbtVersion, String playVersion )
    {
        String result = null;
        if ( sbtVersion != null && !sbtVersion.isEmpty() )
        {
            if ( sbtVersion.equals( "0.13" ) || sbtVersion.startsWith( "0.13." ) )
            {
                result = "sbt013";
            }
            else if ( sbtVersion.equals( "0.12" ) || sbtVersion.startsWith( "0.12." ) )
            {
                result = "sbt012";
            }
        }
        if ( result == null )
        {
            if ( playVersion != null && !playVersion.isEmpty() )
            {
                if ( playVersion.startsWith( "2.1." ) || playVersion.startsWith( "2.1-" ) )
                {
                    result = "sbt012";
                }
            }
        }
        if ( result == null )
        {
            result = "sbt013"; // use latest version
        }
        return result;
    }
1367800
def GetDefault(self, fd=None, default=None):
    """"""
    if callable(self.default):
      return self.default(fd)

    if self.default is not None:
      # We can't return mutable objects here or the default might change for all
      # objects of this class.
      if isinstance(self.default, rdfvalue.RDFValue):
        default = self.default.Copy()
        default.attribute_instance = self
        return self(default)
      else:
        return self(self.default)

    if isinstance(default, rdfvalue.RDFValue):
      default = default.Copy()
      default.attribute_instance = self

    return default
239291
static BinaryStorage defaultConfig() {
        // By default binaries are not stored on disk
        EditableDocument binaries = Schematic.newDocument();
        binaries.set(RepositoryConfiguration.FieldName.TYPE, RepositoryConfiguration.FieldValue.BINARY_STORAGE_TYPE_TRANSIENT);
        return new BinaryStorage(binaries);
    }
1120108
function fixDefaultChecked( elem ) {
	if ( rcheckableType.test( elem.type ) ) {
		elem.defaultChecked = elem.checked;
	}
}
27519
def implementations(interface, recurse=True, abstract=False):
    """"""
    result = []
    find_implementations(interface, recurse, abstract, result)
    return result
252053
def setdefault (self, key, def_val=None):
        """"""
        if key in self:
            return self[key]
        self[key] = def_val
        return def_val
140726
function compatMaxage(opts) {
  if (opts) {
    opts.maxage = opts.maxage === undefined
      ? opts.maxAge
      : opts.maxage;
    delete opts.maxAge;
  }
}
628593
static NativeType getDefaultConversion(Type t) {
        if( t instanceof Class ) {
            Class<?> c = (Class<?>)t;
            NativeType r = defaultConversions.get(c);
            if(r!=null) return r;

            if(Com4jObject.class.isAssignableFrom(c))
                return NativeType.ComObject;
            if(Enum.class.isAssignableFrom(c))
                return NativeType.Int32;
            if(Buffer.class.isAssignableFrom(c))
                return NativeType.PVOID;
            if(Calendar.class.isAssignableFrom(c))
                return NativeType.Date;
            if(BigDecimal.class.isAssignableFrom(c))
                return NativeType.Currency;
            if(c.isArray())
                return NativeType.SafeArray;
        }

        if( t instanceof ParameterizedType ) {
            ParameterizedType p = (ParameterizedType) t;
            if( p.getRawType()==Holder.class ) {
                // let p=Holder<V>
                Type v = p.getActualTypeArguments()[0];
                Class<?> c = (v instanceof Class) ? (Class<?>)v : null;
                if(c!=null) {
                  if(Com4jObject.class.isAssignableFrom(c))
                    return NativeType.ComObject_ByRef;
                  if(String.class==c)
                    return NativeType.BSTR_ByRef;
                  if(Integer.class==c || Enum.class.isAssignableFrom(c))
                    return NativeType.Int32_ByRef;
                  if(Boolean.class==c)
                    return NativeType.VariantBool_ByRef;
                  if(Buffer.class.isAssignableFrom(c))
                    return NativeType.PVOID_ByRef;
                  if(Double.class.isAssignableFrom(c))
                    return NativeType.Double_ByRef;
                  if(c.isArray())
                    return NativeType.SafeArray_ByRef;
                }
                if(v instanceof GenericArrayType){
                  return NativeType.SafeArray_ByRef;
                }
            }
            if( p.getRawType()==Iterator.class ) {
                return NativeType.ComObject;
            }
        }

        throw new IllegalAnnotationException("no default conversion available for "+t);
    }
192937
def choice_default_loader(self, pk):
        """"""
        try:
            obj = Choice.objects.get(pk=pk)
        except Choice.DoesNotExist:
            return None
        else:
            self.choice_default_add_related_pks(obj)
            return obj
1061729
def default(self):
        """"""

        import ambry.bundle.default_files as df
        import os

        path = os.path.join(os.path.dirname(df.__file__), self.file_name)

        if six.PY2:
            with open(path, 'rb') as f:
                return f.read()
        else:
            # py3
            with open(path, 'rt', encoding='utf-8') as f:
                return f.read()
1203698
private static Object defaultForType(Class<?> type)
    {
        if (!type.isPrimitive()) {
            return null;
        }
        if (type.equals(boolean.class)) {
            return false;
        }
        if (type.equals(long.class)) {
            return (long) 0L;
        }
        if (type.equals(int.class)) {
            return (int) 0;
        }
        if (type.equals(short.class)) {
            return (short) 0;
        }
        if (type.equals(byte.class)) {
            return (byte) 0;
        }
        if (type.equals(char.class)) {
            return (char) '\u0000';
        }
        if (type.equals(float.class)) {
            return (float) 0.0f;
        }
        if (type.equals(double.class)) {
            return (double) 0.0d;
        }
        // should never happen
        throw new IllegalStateException("Unknown primitive type: " + type.getName());
    }
988645
def default_bg(self) -> Tuple[int, int, int]:
        """"""
        color = self._console_data.back
        return color.r, color.g, color.b
1033272
@Override
    public R visitVersion(VersionTree node, P p) {
        return defaultAction(node, p);
    }
1360932
function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
  if (_.isArray(objValue)) { // don't merge arrays
    return srcValue;
  } else if (_.isObject(objValue) && objValue._mergeStrategy == 'replace') {
    if (_.isObject(srcValue)) {
      Object.defineProperty(srcValue, '_mergeStrategy', {
        value: 'replace', configurable: true
      });
    }
    return srcValue;
  }
  else if (_.isObject(srcValue) && srcValue._mergeStrategy == 'replace') {
    return srcValue;
  }
  return undefined;
}
240131
def setdefault (self, key, *args):
        """"""
        assert isinstance(key, basestring)
        return dict.setdefault(self, key.lower(), *args)