Returns the default flags for a Type-3 message created in response
to the given Type-2 message in the current environment.

@param tc
context to use
@param type2
The Type-2 message.
@return An <code>int</code> containing the default flags.
10446
public static int getDefaultFlags ( CIFSContext tc, Type2Message type2 ) {
        if ( type2 == null )
            return getDefaultFlags(tc);
        int flags = NTLMSSP_NEGOTIATE_NTLM | NTLMSSP_NEGOTIATE_VERSION;
        flags |= type2.getFlag(NTLMSSP_NEGOTIATE_UNICODE) ? NTLMSSP_NEGOTIATE_UNICODE : NTLMSSP_NEGOTIATE_OEM;
        return flags;
    }
1073381
@Override
    public int getDefaultPort() {
        try {
            Integer result = (Integer) _getDefaultPort.invoke(getInstance(), (Object[]) null);
            return result.intValue();
        } catch (Exception e) {
            FFDCFilter.processException(e, getClass().getName(), "getDefaultPort");
            return 0;
        }
    }
717407
public static int getDefaultFlags ( CIFSContext tc ) {
        return NTLMSSP_NEGOTIATE_NTLM | NTLMSSP_NEGOTIATE_VERSION
                | ( tc.getConfig().isUseUnicode() ? NTLMSSP_NEGOTIATE_UNICODE : NTLMSSP_NEGOTIATE_OEM );
    }
1005465
public Packet setPacketType(Packet.Type type) {
        int nonTypeFlags = flags & (~FLAG_TYPE0 & ~FLAG_TYPE1 & ~FLAG_TYPE2);
        resetFlagsTo(type.headerEncoding | nonTypeFlags);
        return this;
    }
1106812
private TypeArgSignature getTypeArgSignature(Type type) {
		if (type instanceof WildcardType) {
			WildcardType wildcardType = (WildcardType) type;
			Type lowerBound = wildcardType.getLowerBounds().length == 0 ? null
					: wildcardType.getLowerBounds()[0];
			Type upperBound = wildcardType.getUpperBounds().length == 0 ? null
					: wildcardType.getUpperBounds()[0];

			if (lowerBound == null && Object.class.equals(upperBound)) {
				return new TypeArgSignature(
						TypeArgSignature.UNBOUNDED_WILDCARD,
						(FieldTypeSignature) getFullTypeSignature(upperBound));
			} else if (lowerBound == null && upperBound != null) {
				return new TypeArgSignature(
						TypeArgSignature.UPPERBOUND_WILDCARD,
						(FieldTypeSignature) getFullTypeSignature(upperBound));
			} else if (lowerBound != null) {
				return new TypeArgSignature(
						TypeArgSignature.LOWERBOUND_WILDCARD,
						(FieldTypeSignature) getFullTypeSignature(lowerBound));
			} else {
				throw new RuntimeException("Invalid type");
			}
		} else {
			return new TypeArgSignature(TypeArgSignature.NO_WILDCARD,
					(FieldTypeSignature) getFullTypeSignature(type));
		}
	}
366148
@SuppressWarnings("unchecked")
    public static <T> T getJlsDefaultValue(Class<T> type) {
        if(!type.isPrimitive()) {
           return null;
        }
        return (T) JLS_PRIMITIVE_DEFAULT_VALUES.get(type);
    }
803244
public static <D>
	ScoreAssociation<D> defaultScore( Class<D> tupleType ) {
		if( NccFeature.class.isAssignableFrom(tupleType) ) {
			return (ScoreAssociation)new ScoreAssociateNccFeature();
		} else if( TupleDesc_F64.class.isAssignableFrom(tupleType) ) {
			return (ScoreAssociation)new ScoreAssociateEuclideanSq_F64();
		} else if( tupleType == TupleDesc_F32.class ) {
			return (ScoreAssociation)new ScoreAssociateEuclideanSq_F32();
		} else if( tupleType == TupleDesc_U8.class ) {
			return (ScoreAssociation)new ScoreAssociateSad_U8();
		} else if( tupleType == TupleDesc_B.class  ) {
			return (ScoreAssociation)new ScoreAssociateHamming_B();
		} else {
			throw new IllegalArgumentException("Unknown tuple type: "+tupleType);
		}
	}
955076
public T visitTypeSpecifier(TypeSpecifier elm, C context) {
        if (elm instanceof NamedTypeSpecifier) return visitNamedTypeSpecifier((NamedTypeSpecifier)elm, context);
        else if (elm instanceof IntervalTypeSpecifier) return visitIntervalTypeSpecifier((IntervalTypeSpecifier)elm, context);
        else if (elm instanceof ListTypeSpecifier) return visitListTypeSpecifier((ListTypeSpecifier)elm, context);
        else if (elm instanceof TupleTypeSpecifier) return visitTupleTypeSpecifier((TupleTypeSpecifier)elm, context);
        else return null;
    }
854627
@Override
	public JvmType getType() {
		if (this.type == null) {
//			// make sure scoping has taken place and installed an IJvmTypeProvider
//			if (returnType != null)
//				returnType.getType();
			JvmType newType = TypesFactory.eINSTANCE.createJvmVoid();
			((InternalEObject)newType).eSetProxyURI(computeTypeUri(isProcedure()));
			type = (JvmType) eResolveProxy((InternalEObject) newType);
		}
		return super.getType();
	}
1186763
public MtasDataItemNumberComparator<Double> getCompareValue2() {
    switch (sortType) {
    case CodecUtil.STATS_TYPE_SUMOFLOGS:
      return new MtasDataItemNumberComparator<>(valueSumOfLogs, sortDirection);
    case CodecUtil.STATS_TYPE_MEAN:
    case CodecUtil.STATS_TYPE_GEOMETRICMEAN:
    case CodecUtil.STATS_TYPE_STANDARDDEVIATION:
    case CodecUtil.STATS_TYPE_VARIANCE:
    case CodecUtil.STATS_TYPE_POPULATIONVARIANCE:
    case CodecUtil.STATS_TYPE_QUADRATICMEAN:
      return new MtasDataItemNumberComparator<>(getValue(sortType),
          sortDirection);
    default:
      return null;
    }
  }
953731
protected void flagsDefault(IntsRef edgeFlags, boolean forward, boolean backward) {
        if (forward)
            speedEncoder.setDecimal(false, edgeFlags, speedDefault);
        if (backward)
            speedEncoder.setDecimal(true, edgeFlags, speedDefault);
        accessEnc.setBool(false, edgeFlags, forward);
        accessEnc.setBool(true, edgeFlags, backward);
    }
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);
    }
50545
private static Flags getDefaultFlags() {
    if (defaultFlags != null) {
      return defaultFlags;
    }
    defaultFlags = new Flags();
    defaultFlags.angularPass = false;
    defaultFlags.applyInputSourceMaps = true;
    defaultFlags.assumeFunctionWrapper = false;
    defaultFlags.checksOnly = false;
    defaultFlags.chunk = null;
    defaultFlags.chunkWrapper = null;
    defaultFlags.chunkOutputPathPrefix = "./";
    defaultFlags.compilationLevel = "SIMPLE";
    defaultFlags.createSourceMap = true;
    defaultFlags.dartPass = false;
    defaultFlags.debug = false;
    defaultFlags.define = null;
    defaultFlags.defines = null;
    defaultFlags.dependencyMode = null;
    defaultFlags.entryPoint = null;
    defaultFlags.env = "BROWSER";
    defaultFlags.exportLocalPropertyDefinitions = false;
    defaultFlags.extraAnnotationName = null;
    defaultFlags.externs = null;
    defaultFlags.forceInjectLibraries = null;
    defaultFlags.formatting = null;
    defaultFlags.generateExports = false;
    defaultFlags.hideWarningsFor = null;
    defaultFlags.injectLibraries = true;
    defaultFlags.js = null;
    defaultFlags.jsCode = null;
    defaultFlags.jscompError = null;
    defaultFlags.jscompOff = null;
    defaultFlags.jscompWarning = null;
    defaultFlags.jsModuleRoot = null;
    defaultFlags.jsOutputFile = "compiled.js";
    defaultFlags.languageIn = "ECMASCRIPT_2017";
    defaultFlags.languageOut = "ECMASCRIPT5";
    defaultFlags.moduleResolution = "BROWSER";
    defaultFlags.newTypeInf = false;
    defaultFlags.isolationMode = "NONE";
    defaultFlags.outputWrapper = null;
    defaultFlags.packageJsonEntryNames = null;
    defaultFlags.parseInlineSourceMaps = true;
    defaultFlags.polymerPass = false;
    defaultFlags.polymerVersion = null;
    defaultFlags.preserveTypeAnnotations = false;
    defaultFlags.processClosurePrimitives = true;
    defaultFlags.processCommonJsModules = false;
    defaultFlags.renamePrefixNamespace = null;
    defaultFlags.renameVariablePrefix = null;
    defaultFlags.renaming = true;
    defaultFlags.rewritePolyfills = true;
    defaultFlags.sourceMapIncludeContent = false;
    defaultFlags.strictModeInput = true;
    defaultFlags.tracerMode = "OFF";
    defaultFlags.warningLevel = "DEFAULT";
    defaultFlags.useTypesForOptimization = true;

    return defaultFlags;
  }
324370
private Optional<Pattern> getDefaultValidationPattern(Class javaType) {
        return javaType.isEnum() ?
                Optional.of(createValidationPatternFromEnumType(javaType)) :
                getDefaultPatternIfPrimitive(javaType);
    }
259974
public static DynamicMessage getDefaultInstance(Descriptor type) {
    return new DynamicMessage(type, FieldSet.<FieldDescriptor>emptySet(),
                              UnknownFieldSet.getDefaultInstance());
  }
806569
public Type unboxedTypeOrType(Type t) {
        Type unboxedType = unboxedType(t);
        return unboxedType.hasTag(NONE) ? t : unboxedType;
    }
798650
@Override
  public MtasDataItemNumberComparator<Double> getCompareValue2() {
    createStats();
    switch (sortType) {
    case CodecUtil.STATS_TYPE_SUMOFLOGS:
      return new MtasDataItemNumberComparator<>(
          stats.getN() * Math.log(stats.getGeometricMean()), sortDirection);
    case CodecUtil.STATS_TYPE_MEAN:
      return new MtasDataItemNumberComparator<>(stats.getMean(), sortDirection);
    case CodecUtil.STATS_TYPE_GEOMETRICMEAN:
      return new MtasDataItemNumberComparator<>(stats.getGeometricMean(),
          sortDirection);
    case CodecUtil.STATS_TYPE_STANDARDDEVIATION:
      return new MtasDataItemNumberComparator<>(stats.getStandardDeviation(),
          sortDirection);
    case CodecUtil.STATS_TYPE_VARIANCE:
      return new MtasDataItemNumberComparator<>(stats.getVariance(),
          sortDirection);
    case CodecUtil.STATS_TYPE_POPULATIONVARIANCE:
      return new MtasDataItemNumberComparator<>(stats.getPopulationVariance(),
          sortDirection);
    case CodecUtil.STATS_TYPE_QUADRATICMEAN:
      return new MtasDataItemNumberComparator<>(
          Math.sqrt(stats.getSumsq() / stats.getN()), sortDirection);
    case CodecUtil.STATS_TYPE_KURTOSIS:
      return new MtasDataItemNumberComparator<>(stats.getKurtosis(),
          sortDirection);
    case CodecUtil.STATS_TYPE_MEDIAN:
      return new MtasDataItemNumberComparator<>(stats.getPercentile(50),
          sortDirection);
    case CodecUtil.STATS_TYPE_SKEWNESS:
      return new MtasDataItemNumberComparator<>(stats.getSkewness(),
          sortDirection);
    default:
      return null;
    }
  }