Return field for given name, or defaultVal if not found

@param name
@return
518436
public String getField(String name, String defaultVal) {
		int index = getFieldIndex(name);
		return (isInRange(index) ? this.fields.get(index) : defaultVal);
	}
996452
public String getString(String name, String defaultValue) {
      return getAs(name, String.class, defaultValue);
   }
460312
public String getOutputProperty(String name) {
        String val = getOutputPropertyNonDefault(name);
        // If no explicit value, try to get the default value
        if (val == null)
            val = getOutputPropertyDefault(name);
        return val;
        
    }
327248
public VarValueDef getValue( Object name)
    {
    int i = findValue( name);
    return i >= 0? values_.get(i) : null;
    }
775733
public String getHeader(@NotNull final String name, String defaultValue) {
        if (headers().contains(name)) {
            return getHeader(name);
        } else {
            return defaultValue;
        }
    }
771932
public FieldValue evaluate(FieldName name){
		Map<FieldName, FieldValue> values = getValues();

		FieldValue value = values.getOrDefault(name, EvaluationContext.UNDECLARED_VALUE);
		if(value != EvaluationContext.UNDECLARED_VALUE){
			return value;
		}

		return resolve(name);
	}
1054530
public static String get(String name, String defaultValue) {
		return StrUtil.nullToDefault(get(name, false), defaultValue);
	}
460611
def get_default(name, value):
    """"""
    return os.environ.get('EXAMPLE_{}'.format(name.upper()), value)
1150904
public Field field(String name) {
    for (Field field : declaredFields) {
      if (field.name().equals(name)) {
        return field;
      }
    }
    for (OneOf oneOf : oneOfs) {
      for (Field field : oneOf.fields()) {
        if (field.name().equals(name)) {
          return field;
        }
      }
    }
    return null;
  }
122408
@Override
    @SuppressWarnings("StringEquality")
    public Object getField(String name) throws UnresolvedException{
        if(name=="status")
            return status;
        else
            return super.getField(name);
    }
316484
static void checkDefaultValueIsLegal(Field field,
                                                              List<Message> messages,
                                                              String name) {
        if(field == null) {
            throw new IllegalArgumentException("Field must be non-null. Name=" + name);
        }

        if(field.defaultValue() != null) {
            // Get the type schema. If this is a UNION, the default must be of
            // the leading type
            Schema fieldSchema = field.schema();
            if(fieldSchema.getType() == Schema.Type.UNION) {
                fieldSchema = fieldSchema.getTypes().get(0);
            }

            // Get the default value
            JsonNode defaultJson = field.defaultValue();

            String expectedVal = checkDefaultJson(defaultJson, field.schema());

            if(expectedVal != null) {
                messages.add(new Message(Level.ERROR, "Illegal default value for field " + name
                                                      + ". The default must be of type "
                                                      + expectedVal + "."));
            }
        }
    }
643437
public static Object getFieldValue(Object obj, String name) {
        Class<?> clazz = obj.getClass();
        try {
            Field f = clazz.getDeclaredField(name);
            return f.get(obj);
        }
        catch (Exception e) {
            return null;
        }
    }
1279205
public String getFirst(String name, String defaultValue)
    {
        String value = getFirst(name);
        if (value == null) {
            value = defaultValue;
        }
        return value;
    }
220238
public Object getFieldDefaultValue(TypeElement type, String name) {
		return this.defaultValues.computeIfAbsent(type, this::resolveFieldValues)
				.get(name);
	}
447789
public String getString(String name, String defaultVal){
        if(this.configuration.containsKey(name)){
            return this.configuration.getString(name);
        } else {
            return defaultVal;
        }
    }
954940
public static long getLong(String name, long defaultVal){
        if(getConfiguration().containsKey(name)){
            return getConfiguration().getLong(name);
        } else {
            return defaultVal;
        }
    }
119609
private static Field getLabelField(final String name) {
        try {
            Field f = Label.class.getDeclaredField(name);
            f.setAccessible(true);
            return f;
        } catch (NoSuchFieldException e) {
            return null;
        }
    }