ensure the attribute itself has been initialized...
359052
def define_attr_logger_attribute(attribute)
      instance_variable_set(:"@#{attribute}", []) unless instance_variable_get(:"@#{attribute}")
      return if instance_variable_get(:"@#{attribute}").respond_to?(:<<)
      raise InvalidAttributeValue, "invalid type for attribute #{attribute}: #{send(attribute).class}"
    end
1252793
private void initAttribute(Object pAttrval) {
        if (pAttrval instanceof String) {
            attributeNames = EscapeUtil.split((String) pAttrval,EscapeUtil.CSV_ESCAPE,",");
            multiAttributeMode = attributeNames.size() > 1;
        } else if (pAttrval instanceof Collection) {
            Collection<String> attributes = (Collection<String>) pAttrval;
            if (attributes.size() == 1 && attributes.iterator().next() == null) {
                attributeNames = null;
                multiAttributeMode = false;
            } else {
                attributeNames = new ArrayList<String>(attributes);
                multiAttributeMode = true;
            }
        } else if (pAttrval == null) {
            attributeNames = null;
            multiAttributeMode = false;
        } else {
            throw new IllegalArgumentException("Attribute names must be either a String, Collection or null (and not " + pAttrval.getClass() + ")");
        }
    }
385848
void checkInitialized(Logger pLogger)
            throws ELException {
        if (!mInitialized) {
            synchronized (this) {
                if (!mInitialized) {
                    initialize(pLogger);
                    mInitialized = true;
                }
            }
        }
    }
528862
private void initializeAttrs(AttributeSet attrs) {
    TypedArray attributes = getContext().obtainStyledAttributes(attrs, R.styleable.draggable_panel);
    this.topFragmentHeight =
        attributes.getDimensionPixelSize(R.styleable.draggable_panel_top_fragment_height,
            DEFAULT_TOP_FRAGMENT_HEIGHT);
    this.xScaleFactor =
        attributes.getFloat(R.styleable.draggable_panel_x_scale_factor, DEFAULT_SCALE_FACTOR);
    this.yScaleFactor =
        attributes.getFloat(R.styleable.draggable_panel_y_scale_factor, DEFAULT_SCALE_FACTOR);
    this.topFragmentMarginRight =
        attributes.getDimensionPixelSize(R.styleable.draggable_panel_top_fragment_margin_right,
            DEFAULT_TOP_FRAGMENT_MARGIN);
    this.topFragmentMarginBottom =
        attributes.getDimensionPixelSize(R.styleable.draggable_panel_top_fragment_margin_bottom,
            DEFAULT_TOP_FRAGMENT_MARGIN);
    this.enableHorizontalAlphaEffect =
        attributes.getBoolean(R.styleable.draggable_panel_enable_horizontal_alpha_effect,
            DEFAULT_ENABLE_HORIZONTAL_ALPHA_EFFECT);
    this.enableClickToMaximize =
        attributes.getBoolean(R.styleable.draggable_panel_enable_click_to_maximize_panel,
            DEFAULT_ENABLE_CLICK_TO_MAXIMIZE);
    this.enableClickToMinimize =
        attributes.getBoolean(R.styleable.draggable_panel_enable_click_to_minimize_panel,
            DEFAULT_ENABLE_CLICK_TO_MINIMIZE);
    this.enableTouchListener =
        attributes.getBoolean(R.styleable.draggable_panel_enable_touch_listener_panel,
            DEFAULT_ENABLE_TOUCH_LISTENER);
    attributes.recycle();
  }
1210726
private void init(Context context, AttributeSet attrs, int defStyle) {
    // Attribute initialization
    final TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.ProgressButton, defStyle,
        R.style.ProgressButton_Pin_Compat);
    final Resources res = getResources();

    mProgress = a.getInteger(R.styleable.ProgressButton_progress, mProgress);
    mMax = a.getInteger(R.styleable.ProgressButton_max, mMax);

    int circleColor = res.getColor(R.color.progress_default_circle_color);
    circleColor = a.getColor(R.styleable.ProgressButton_circleColor, circleColor);
    int progressColor = res.getColor(R.color.progress_default_progress_color);
    progressColor = a.getColor(R.styleable.ProgressButton_progressColor, progressColor);

    int pinnedDrawable =
        a.getResourceId(R.styleable.ProgressButton_pinnedDrawable, R.drawable.pin_progress_pinned);
    mPinnedDrawable = res.getDrawable(pinnedDrawable);
    mPinnedDrawable.setCallback(this);

    int unpinnedDrawable = a.getResourceId(R.styleable.ProgressButton_unpinnedDrawable,
        R.drawable.pin_progress_unpinned);
    mUnpinnedDrawable = res.getDrawable(unpinnedDrawable);
    mUnpinnedDrawable.setCallback(this);

    int shadowDrawable =
        a.getResourceId(R.styleable.ProgressButton_shadowDrawable, R.drawable.pin_progress_shadow);
    mShadowDrawable = res.getDrawable(shadowDrawable);
    mShadowDrawable.setCallback(this);

    mInnerSize = res.getDimensionPixelSize(R.dimen.progress_inner_size);
    mInnerSize = a.getDimensionPixelSize(R.styleable.ProgressButton_innerSize, mInnerSize);

    setChecked(a.getBoolean(R.styleable.ProgressButton_pinned, false));
    setClickable(a.getBoolean(R.styleable.ProgressButton_android_clickable, false));
    setFocusable(a.getBoolean(R.styleable.ProgressButton_android_focusable, false));
    setBackgroundDrawable(a.getDrawable(R.styleable.ProgressButton_android_background));

    mAnimating = a.getBoolean(R.styleable.ProgressButton_animating, mAnimating);
    mAnimationSpeed = a.getInteger(R.styleable.ProgressButton_animationSpeed, mAnimationSpeed);
    mAnimationDelay = a.getInteger(R.styleable.ProgressButton_animationDelay, mAnimationDelay);
    mAnimationStripWidth =
        a.getInteger(R.styleable.ProgressButton_animationStripWidth, mAnimationStripWidth);

    a.recycle();

    mDrawableSize = mShadowDrawable.getIntrinsicWidth();

    mCirclePaint = new Paint();
    mCirclePaint.setColor(circleColor);
    mCirclePaint.setAntiAlias(true);

    mProgressPaint = new Paint();
    mProgressPaint.setColor(progressColor);
    mProgressPaint.setAntiAlias(true);

    if (mAnimating) {
      startAnimating();
    }
  }
1181374
private void initialize(@Nullable final AttributeSet attributeSet) {
        validators = new LinkedHashSet<>();
        listeners = new ListenerList<>();
        setOrientation(VERTICAL);
        inflateView();
        inflateErrorMessageTextViews();
        obtainStyledAttributes(attributeSet);
        setLeftMessage(null, null);
        setRightMessage(null);
    }
109516
protected function initializeAttributes() {

		parent::initializeAttributes();

		$this->attributes['subtype'] = self::SUBTYPE;
		$this->attributes['access_id'] = ACCESS_PUBLIC;
	}
551667
void setInitialAttributes(File file, FileAttribute<?>... attrs) {
    state.checkOpen();
    attributes.setInitialAttributes(file, attrs);
  }
1342816
void initialize() {
        Preconditions.checkState(this.database.get() == null, "%s has already been initialized.", this.logId);

        try {
            clear(true);
            this.database.set(openDatabase());
        } catch (Exception ex) {
            // Make sure we cleanup anything we may have created in case of failure.
            try {
                close();
            } catch (Exception closeEx) {
                ex.addSuppressed(closeEx);
            }

            throw ex;
        }

        log.info("{}: Initialized.", this.logId);
    }
626334
def ensure_context_attribute_exists(context, name, default_value=None):
    
    if not hasattr(context, name):
        setattr(context, name, default_value)
1249012
def _load_init(self, data, ctx):
        """"""
        if self.shape:
            for self_dim, data_dim in zip(self.shape, data.shape):
                assert self_dim in (0, data_dim), \
                    "Failed loading Parameter '%s' from saved params: " \
                    "shape incompatible expected %s vs saved %s"%(
                        self.name, str(self.shape), str(data.shape))
            self.shape = tuple(i if i != 0 else j for i, j in zip(self.shape, data.shape))
        if self.dtype:
            assert np.dtype(self.dtype).type == data.dtype, \
                "Failed loading Parameter '%s' from saved params: " \
                "dtype incompatible expected %s vs saved %s"%(
                    self.name, str(self.dtype), str(data.dtype))
        if self._stype != data.stype:
            data = data.tostype(self._stype)
        if isinstance(ctx, Context):
            ctx = [ctx]
        if self._data is None:
            if self._deferred_init:
                assert ctx is None or set(ctx) == set(self._deferred_init[1]), \
                    "Failed to load Parameter '%s' on %s because it was " \
                    "previous initialized on %s."%(
                        self.name, str(ctx), str(self.list_ctx()))
                ctx = self._deferred_init[1]
            elif ctx is None:
                ctx = [cpu()]
            self._init_impl(data, ctx)
        else:
            assert ctx is None or set(ctx) == set(self.list_ctx()), \
                "Failed to load Parameter '%s' on %s because it was " \
                "previous initialized on %s."%(
                    self.name, str(ctx), str(self.list_ctx()))
            self.set_data(data)
        self._deferred_init = ()
1175818
def initialize_attributes(parent, inetwork)
      # Set the parent and interface
      write_attribute(:parent, parent)
      write_attribute(:interface, inetwork)

      # Load the interface attributes
      load_interface_attributes(inetwork)

      # Clear dirtiness, since this should only be called initially and
      # therefore shouldn't affect dirtiness
      clear_dirty!

      # But this is an existing record
      existing_record!
    end
287633
def _initialize(self, **resource_attributes):
        
        self._set_attributes(**resource_attributes)
        for attribute, attribute_type in list(self._mapper.items()):
            if attribute in resource_attributes and isinstance(resource_attributes[attribute], dict):
                setattr(self, attribute, attribute_type(**resource_attributes[attribute]))
1119716
def _init(self, *args, **kwargs):
        
        self._init_attr('_deps', None)

        self._init_attr('_ban_optimize', False)
        self._init_attr('_engine', None)
        self._init_attr('_Expr__execution', None)

        self._init_attr('_need_cache', False)
        self._init_attr('_mem_cache', False)

        if '_id' not in kwargs:
            kwargs['_id'] = new_id()

        super(Expr, self)._init(*args, **kwargs)
643175
function assertString(attr, data) {
  if (data === null || data === undefined) {
    return null;
  }

  if (typeof data !== 'string') {
    throw new ParseError(`Attribute ${attr} must be of type "string"`);
  }

  return data;
}
1076973
protected function initAttributes() {
		$vars = get_object_vars($this->_xml->attributes());
			
		$this->_attributes = empty($vars) ? [] : $vars['@attributes'];
	}
983796
def assign_attributes(attrs, initial_setup = false, skip_changes = false)
      attrs = wrap_values(attrs)

      if attrs
        # When doing a mass-assign, we don't validate or save until the end.
        if initial_setup || skip_changes
          Model.no_change_tracking do
            assign_all_attributes(attrs, skip_changes)
          end
        else
          assign_all_attributes(attrs)
        end
      else
        # Assign to empty
        @attributes = {}
      end

      # Trigger and change all
      @deps.changed_all!
      @deps = HashDependency.new

      run_initial_setup(initial_setup)
    end