GetInitField.
@param bConstantsNotVariables If true, return constants; if false, return only variables
770880
public String getInitField(FieldData recFieldData, boolean bConstantsNotVariables, boolean bThinConstants)
    {
        boolean bConstantValue = false;
        boolean bValidThinConstant = true;
        String strInitField = recFieldData.getField(FieldData.INITIAL_VALUE).getString();
        if (strInitField != null) if (strInitField.length() > 0)
        {
            if (strInitField.charAt(0) == '\"')
                bConstantValue = true;  // This is a constant value (a string)
            if (Character.isDigit(strInitField.charAt(0)))
                bConstantValue = true;  // This is a constant value (a number)
            if ((strInitField.equalsIgnoreCase("true")) || (strInitField.equalsIgnoreCase("false")))
                bConstantValue = true;  // This is a constant value (a number)
            if (strInitField.startsWith("new "))
                bConstantValue = true;  // This is a constant value (an object)
            if (strInitField.indexOf('.') != -1)
                if (strInitField.lastIndexOf('(') <= 1) // Not found or a class cast.
                    if (!Utility.isNumeric(strInitField))
                {
                    bConstantValue = true;  // This is a constant value (a member constant - not a function call)
                    bValidThinConstant = false;
                }
        }
        if (bConstantsNotVariables != bConstantValue)
            strInitField = DBConstants.BLANK;          // Not asking for this type of value
        if (bThinConstants)
            if (!bValidThinConstant)
                strInitField = DBConstants.BLANK;          // Not asking for this type of value
        return strInitField;
    }
970399
Reference getInitializingReferenceForConstants() {
    int size = references.size();
    for (int i = 0; i < size; i++) {
      if (isInitializingDeclarationAt(i) || isInitializingAssignmentAt(i)) {
        return references.get(i);
      }
    }
    return null;
  }
168382
public static DynamicVariableSet fromVariables(VariableNumMap variables) {
    return new DynamicVariableSet(variables, Collections.<String> emptyList(),
        Collections.<DynamicVariableSet> emptyList(), new int[0]);
  }
670799
public FieldInitializationReport initialize() {
        final AccessibilityChanger changer = new AccessibilityChanger();
        changer.enableAccess(field);

        try {
            return acquireFieldInstance();
        } catch(IllegalAccessException e) {
            throw new MockitoException("Problems initializing field '" + field.getName() + "' of type '" + field.getType().getSimpleName() + "'", e);
        } finally {
            changer.safelyDisableAccess(field);
        }
    }
158037
def get_variable_ddi(name, shape, initial_value, dtype=tf.float32, init=False,
                     trainable=True):
  """"""
  # If init is a tf bool: w is assigned dynamically at runtime.
  # If init is a python bool: then w is determined during graph construction.
  w = tf.get_variable(name, shape, dtype, None, trainable=trainable)
  if isinstance(init, bool):
    if init:
      return assign(w, initial_value)
    return w
  else:
    return tf.cond(init, lambda: assign(w, initial_value), lambda: w)
359827
public static List<Integer> createListOfNonExistentFields(List<String> list, JavacNode type, boolean excludeStandard, boolean excludeTransient) {
		boolean[] matched = new boolean[list.size()];
		
		for (JavacNode child : type.down()) {
			if (list.isEmpty()) break;
			if (child.getKind() != Kind.FIELD) continue;
			JCVariableDecl field = (JCVariableDecl)child.get();
			if (excludeStandard) {
				if ((field.mods.flags & Flags.STATIC) != 0) continue;
				if (field.name.toString().startsWith("$")) continue;
			}
			if (excludeTransient && (field.mods.flags & Flags.TRANSIENT) != 0) continue;
			
			int idx = list.indexOf(child.getName());
			if (idx > -1) matched[idx] = true;
		}
		
		ListBuffer<Integer> problematic = new ListBuffer<Integer>();
		for (int i = 0 ; i < list.size() ; i++) {
			if (!matched[i]) problematic.append(i);
		}
		
		return problematic.toList();
	}
911381
def get_initial(self, *args, **kwargs):
        
        initial = {}
        for field in self.fields:
            value = None
            if hasattr(self.user, field):
                value = getattr(self.user, field)
            if hasattr(self.profile, field):
                value = getattr(self.profile, field)
            if value:
                initial.update({
                    field: value
                })

        if hasattr(self.profile, 'dob'):
            dob = self.profile.dob
            if dob:
                if 'dob_day' in self.fields:
                    initial.update({
                        'dob_day': dob.day
                    })
                if 'dob_month' in self.fields:
                    initial.update({
                        'dob_month': dob.month
                    })
                if 'dob_year' in self.fields:
                    initial.update({
                        'dob_year': dob.year
                    })

        return initial
587683
private static String getEnumAnnotationFieldName(IAnnotationBinding annotation, String varName) {
        if (annotation == null) {
            throw new NullPointerException();
        }
        if (varName == null) {
            throw new NullPointerException();
        }
        for (IMemberValuePairBinding value : annotation.getDeclaredMemberValuePairs()) {
            if (value.getName() != null && value.getName().equals(varName)) {
                assert value.getValue() != null; // annotation value cannot be null
                assert value.getValue() instanceof IVariableBinding;
                IVariableBinding varBinding = (IVariableBinding) value.getValue();
                assert varBinding.isEnumConstant();
                return varBinding.getName();
            }
        }
        return null;
    }
884735
public final void variableInitializer() throws RecognitionException {
		int variableInitializer_StartIndex = input.index();

		try {
			if ( state.backtracking>0 && alreadyParsedRule(input, 44) ) { return; }

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:495:5: ( arrayInitializer | expression )
			int alt60=2;
			int LA60_0 = input.LA(1);
			if ( (LA60_0==121) ) {
				alt60=1;
			}
			else if ( ((LA60_0 >= CharacterLiteral && LA60_0 <= DecimalLiteral)||LA60_0==FloatingPointLiteral||(LA60_0 >= HexLiteral && LA60_0 <= Identifier)||(LA60_0 >= OctalLiteral && LA60_0 <= StringLiteral)||LA60_0==29||LA60_0==36||(LA60_0 >= 40 && LA60_0 <= 41)||(LA60_0 >= 44 && LA60_0 <= 45)||LA60_0==53||LA60_0==65||LA60_0==67||(LA60_0 >= 70 && LA60_0 <= 71)||LA60_0==77||(LA60_0 >= 79 && LA60_0 <= 80)||LA60_0==82||LA60_0==85||LA60_0==92||LA60_0==94||(LA60_0 >= 97 && LA60_0 <= 98)||LA60_0==105||LA60_0==108||LA60_0==111||LA60_0==115||LA60_0==118||LA60_0==126) ) {
				alt60=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return;}
				NoViableAltException nvae =
					new NoViableAltException("", 60, 0, input);
				throw nvae;
			}

			switch (alt60) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:495:7: arrayInitializer
					{
					pushFollow(FOLLOW_arrayInitializer_in_variableInitializer1507);
					arrayInitializer();
					state._fsp--;
					if (state.failed) return;
					}
					break;
				case 2 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:496:9: expression
					{
					pushFollow(FOLLOW_expression_in_variableInitializer1517);
					expression();
					state._fsp--;
					if (state.failed) return;
					}
					break;

			}
		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
			if ( state.backtracking>0 ) { memoize(input, 44, variableInitializer_StartIndex); }

		}
	}
726741
public final Variable getVariable(int variableNum) {
    int index = getVariableIndex(variableNum);
    if (index >= 0) {
      return vars[index];
    } else {
      return null;
    }
  }
295878
public final void variableInitializer() throws RecognitionException {
		try {
			// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:626:5: ( arrayInitializer | expression )
			int alt76=2;
			int LA76_0 = input.LA(1);
			if ( (LA76_0==LEFT_CURLY) ) {
				alt76=1;
			}
			else if ( (LA76_0==BOOL||(LA76_0 >= DECIMAL && LA76_0 <= DECR)||LA76_0==FLOAT||LA76_0==HEX||(LA76_0 >= ID && LA76_0 <= INCR)||(LA76_0 >= LEFT_PAREN && LA76_0 <= LESS)||LA76_0==MINUS||LA76_0==NEGATION||LA76_0==NULL||LA76_0==PLUS||(LA76_0 >= STAR && LA76_0 <= TIME_INTERVAL)) ) {
				alt76=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return;}
				NoViableAltException nvae =
					new NoViableAltException("", 76, 0, input);
				throw nvae;
			}

			switch (alt76) {
				case 1 :
					// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:626:7: arrayInitializer
					{
					pushFollow(FOLLOW_arrayInitializer_in_variableInitializer3638);
					arrayInitializer();
					state._fsp--;
					if (state.failed) return;
					}
					break;
				case 2 :
					// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:627:13: expression
					{
					pushFollow(FOLLOW_expression_in_variableInitializer3652);
					expression();
					state._fsp--;
					if (state.failed) return;
					}
					break;

			}
		}

		catch (RecognitionException re) {
		    throw re;
		}

		finally {
			// do for sure before leaving
		}
	}
598802
private boolean vForVariable(String loopVariablesDefinition, TemplateParserContext context) {
    Matcher matcher = VFOR_VARIABLE.matcher(loopVariablesDefinition);
    if (matcher.matches()) {
      initLoopVariable(matcher.group(1), matcher.group(2), context);
      indexVariableInfo = null;
      return true;
    }

    return false;
  }
27400
private void initAnnotatedFields() {
        final Set<Field> hiddenFields = Reflections.getHiddenFields(beanClass);
        inject(hiddenFields);

        final Set<Field> inheritedFields = Reflections.getInheritedFields(beanClass);
        inject(inheritedFields);

        final Set<Field> ownFields = Reflections.getOwnFields(beanClass);
        inject(ownFields);
    }
1311358
public int getPositionStart(ModificationFeature mf)
	{
		Set vals = SITE_ACC.getValueFromBean(mf);

		if (!vals.isEmpty())
		{
			return ((Integer) vals.iterator().next());
		}

		vals = INTERVAL_BEGIN_ACC.getValueFromBean(mf);

		if (!vals.isEmpty())
		{
			return ((Integer) vals.iterator().next());
		}

		return -1;
	}
875324
function getInstanceInitExpression(initInstanceVars) {
  let expressions = initInstanceVars.map((mv) => {
    let name = mv.name.literalToken;
    return parseExpression `this.${name} = ${mv.initializer}`;
  });
  return createCommaExpression(expressions);
}
625183
private static int getFieldModifiers(VariableElement var) {
    int modifiers = ElementUtil.fromModifierSet(var.getModifiers());
    if (ElementUtil.isSynthetic(var)) {
      modifiers |= ElementUtil.ACC_SYNTHETIC;
    }
    if (ElementUtil.isEnumConstant(var)) {
      modifiers |= ElementUtil.ACC_ENUM;
    }
    return modifiers;
  }
689833
protected static function _initFields()
    {
        $className = get_called_class();
        $optionsMask = [
            'type' => null,
            'length' => null,
            'primary' => null,
            'unique' => null,
            'autoincrement' => null,
            'notnull' => null,
            'unsigned' => null,
            'default' => null,
            'values' => null,
        ];

        // apply default values to field definitions
        if (!empty(static::$_classFields[$className])) {
            $fields = [];

            foreach (static::$_classFields[$className] as $field => $options) {
                if (is_string($field)) {
                    if (is_array($options)) {
                        $fields[$field] = array_merge($optionsMask, static::$fieldDefaults, ['columnName' => $field], $options);
                    } elseif (is_string($options)) {
                        $fields[$field] = array_merge($optionsMask, static::$fieldDefaults, ['columnName' => $field, 'type' => $options]);
                    } elseif ($options == null) {
                        continue;
                    }
                } elseif (is_string($options)) {
                    $field = $options;
                    $fields[$field] = array_merge($optionsMask, static::$fieldDefaults, ['columnName' => $field]);
                }

                if ($field == 'Class') {
                    // apply Class enum values
                    $fields[$field]['values'] = static::$subClasses;
                }

                if (!isset($fields[$field]['blankisnull']) && empty($fields[$field]['notnull'])) {
                    $fields[$field]['blankisnull'] = true;
                }

                if ($fields[$field]['autoincrement']) {
                    $fields[$field]['primary'] = true;
                }
            }

            static::$_classFields[$className] = $fields;
        }
    }