May misused with toItem
185698
@SafeVarargs
    public static Map<String, AttributeValue> asItem(Object... a) {
        if (0 != (a.length % 2)) {
            throw new IllegalArgumentException(
                    "The parameters must be the pairs of property name and value, or Map, or an entity class with getter/setter methods.");
        }

        final Map<String, AttributeValue> item = new LinkedHashMap<>(N.initHashCapacity(a.length / 2));

        for (int i = 0; i < a.length; i++) {
            item.put((String) a[i], attrValueOf(a[++i]));
        }

        return item;
    }
1344826
def maybeparens(lparen, item, rparen):
    """"""
    return item | lparen.suppress() + item + rparen.suppress()
1049888
function(item) {
            if(!item || !item.type || !item.element)
                return false;

            switch(item.type) {
                case 'milestone':
                    return (item.element.hasClass('timeline-milestone'));
                    break;
                case 'smallItem':
                    return (item.element.hasClass('timeline-smallitem'));
                    break;
                case 'bigItem':
                    return (item.element.hasClass('timeline-bigitem'));
                    break;
                default:
                    return false;
                    break;
            }
        }
227815
def items(self, founditems=[]): #pylint: disable=dangerous-default-value
        """"""
        l = []
        for e in self.data:
            if  e not in founditems: #prevent going in recursive loops
                l.append(e)
                if isinstance(e, AbstractElement):
                    l += e.items(l)
        return l
706379
function getItemAsNameVal (item) {
    if (!item) {
      return undefined;
    }

    var locals = {};
    if (ctrl.itemName) {
      locals[ ctrl.itemName ] = item;
    }

    return locals;
  }
388802
def append_item(self, item):
        """"""
        if not isinstance(item, LR0Item):
            raise TypeError
        self.itemlist.append(item)
396092
def moveListItem(L, fromidx, toidx):
    ""
    r = L.pop(fromidx)
    L.insert(toidx, r)
    return toidx
321242
function (args) {
                args.HasError = false;
                args.ErrorMessage = "";

                if (this.Items !== undefined && this.Items.length === 0) {
                    args.HasError = true;
                    args.ErrorMessage = "At least one item must be on invoice.";
                    args.TranslateArgs = { TranslateId: "AnyItem", MessageArgs: undefined };
                    return;
                }
            }
1232367
function _setItemTypeFormatter(oAction) {
			var that = this;

			var oBindingInfo = ManagedObject.bindingParser("{path:''}");
			// Async formatter to set ListItem type depending if the list item context is a correct navigation target (decided by the navigation service).
			oBindingInfo.formatter = function (vValue) {

				var oBindingContext = this.getBindingContext(),
					oModel = this.getModel(),
					sPath;

				if (oBindingContext) {
					sPath = oBindingContext.getPath();
				}

				var mParameters = BindingResolver.resolveValue(oAction.parameters, oModel, sPath);

				if (vValue.__resolved) {
					if (vValue.__enabled) {
						return "Navigation";
					} else {
						return "Inactive";
					}
				}

				if (!vValue.__promise) {
					vValue.__promise = true;
					that._oServiceManager.getService(_getServiceName(oAction.service)).then(function (oNavigationService) {
						if (oNavigationService) {
							oNavigationService
								.enabled({
									parameters: mParameters
								})
								.then(function (bEnabled) {
									vValue.__resolved = true;
									vValue.__enabled = bEnabled;
									that.getModel().checkUpdate(true);
								})
								.catch(function () {
									vValue.__resolved = true;
									vValue.__enabled = false;
								});
						} else {
							vValue.__resolved = true;
							vValue.__enabled = false;
						}
					});
				}
				return "Inactive";
			};
			this._oItemTemplate.bindProperty("type", oBindingInfo);
		}
509946
def set_item(self,item):
        ""
        self.item = self.x.process_one(item)
        yield None
        self.item = None
841261
def _viewEntryItem(self, item=None, *dum):
        
        # if item not set, look for selected items in listview. Only 1 must be selected.
        select = True
        if item is None:
            selected = [item for item in self.etw.iterator(self.etw.Iterator.Selected) if item._ientry is not None]
            if len(selected) != 1:
                return
            item = selected[0]
            select = False;  # already selected
        else:
            # make sure item is open -- the click will cause it to close
            self.etw.expandItem(item)
        # show dialog
        ientry = getattr(item, '_ientry', None)
        if ientry is not None:
            self._viewEntryNumber(ientry, select=select)
296725
function processItemtype(item, processedItems) {
  processedItems.push({
    'id':         md5($(item).html()),
    'name':       $(item).attr('itemtype'),
    'properties': {}
  });

}
1108369
def p_ex_list_item_id(self, p):
        ''
        p[0] = AstExampleRef(self.path, p.lineno(1), p.lexpos(1), p[1])
60495
def OnGetItemAttr(self, item):
        """"""
        if self.indicated > -1 and item == self.indicated:
            return self.indicated_attribute
        return None
400786
def addItem(self, item):
        """"""
        try:
            self.tree.addItem(item)
        except AttributeError, e:
            raise VersionError('Saved versions are immutable')
953789
@Override
    public final boolean lockItemIfAvailable(long lockID) throws SevereMessageStoreException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "lockItemIfAvailable", Long.valueOf(lockID));

        boolean locked = false;
        if (AbstractItem.NO_LOCK_ID == lockID)
        {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                SibTr.exit(this, tc, "lockItemIfAvailable");
            throw new SevereMessageStoreException("invalid lockID - clashes with internal constant NO_LOCK_ID");
        }
        boolean hasBecomeNonReleasable = false;
        synchronized (this)
        {
            if (!isExpired() && isAvailable())
            {
                if (ItemLinkState.STATE_AVAILABLE == _itemLinkState)
                {
                    ListStatistics stats = getParentStatistics();
                    synchronized (stats)
                    {
                        stats.incrementLocked();
                        stats.decrementAvailable();
                    }
                }
                else
                {
                    if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled())
                        SibTr.event(this, tc, "Invalid Item state: " + _itemLinkState);
                    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                        SibTr.exit(this, tc, "lockItemIfAvailable");
                    throw new StateException(_itemLinkState.toString());
                }
                locked = true;
                _lockID = lockID;
                hasBecomeNonReleasable = _declareNotDiscardable(_getItemNoRestore());
                _itemLinkState = ItemLinkState.STATE_LOCKED;
            }
        }
        if (hasBecomeNonReleasable)
        {
            _declareNotReleasable();
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "lockItemIfAvailable", Boolean.valueOf(locked));
        return locked;
    }
1316388
function addIfNotExist(set, item) {
  if (set.has(item)) return true;
  set.add(item);
  return false;
}