/*
refillAttrNames
sets attribute names based on what is contained in swappable data
346656
protected void refillAttrNames(Map<Object, Object> swappable) {
        if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
            LoggingUtil.SESSION_LOGGER_WAS.entering(methodClassName, methodNames[REFILL_ATTR_NAMES]);
        }
        if ((swappable != null) && (swappable.size() > 0)) {
            Hashtable tempAttributeNames = new Hashtable();
            Iterator attributeIterator = swappable.keySet().iterator();
            while (attributeIterator.hasNext()) {
                Object key = attributeIterator.next();
                Object val = swappable.get(key);
                if (val instanceof HttpSessionBindingListener) { //EventListener) {
                    tempAttributeNames.put(key, Boolean.TRUE);
                } else {
                    tempAttributeNames.put(key, Boolean.FALSE);
                }
                if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                    LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[REFILL_ATTR_NAMES],
                                                        "added " + key + " with listener value " + tempAttributeNames.get(key));
                }
            }
            _attributeNames = tempAttributeNames;
        }
        if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
            LoggingUtil.SESSION_LOGGER_WAS.exiting(methodClassName, methodNames[REFILL_ATTR_NAMES]);
        }
    }
1272049
private void initializePossibleAttributeNames() {
        final Set<String> possibleAttribNames = new LinkedHashSet<>();

        for (final Map<String, List<Object>> attributeMapForSomeUser : this.backingMap.values()) {
            final Set<String> keySet = attributeMapForSomeUser.keySet();
            possibleAttribNames.addAll(keySet);
        }

        this.possibleUserAttributeNames = Collections.unmodifiableSet(possibleAttribNames);
    }
937942
public void updateDatabaseArtifacts() throws Exception {
        List<ModifiableConfigElement> mofiableElementList = new ArrayList<ModifiableConfigElement>();
        findModifiableConfigElements(this, mofiableElementList);

        for (ModifiableConfigElement element : mofiableElementList) {
            element.modify(this);
        }
    }
66290
function() {
      var t = this,
          writableAttributes = t.get('writableAttributes'),
          writableChanges = {};

      // Add any writable changes
      var probeAttrs = t.toProbeJSON();
      delete probeAttrs.id;
      for (var attrName in probeAttrs) {
        var isWritable = writableAttributes === '*' || writableAttributes.indexOf(attrName) >= 0;
        if (isWritable && !(_.isEqual(t.attributes[attrName], t._probeValues[attrName]))) {
          writableChanges[attrName] = t.attributes[attrName];
        }
      }

      // Pass any writable changes on to control.set()
      if (Monitor._.size(writableChanges)) {
        t.control('set', writableChanges, function(error) {
          if (error) {
            log.error('probeSet', 'Problem setting writable value', writableChanges, t.toMonitorJSON());
          }
        });
      }
    }
991012
private Map<String, Object> cloneAttributes(Map<String, Object> attrs) {

        Map<String, Object> result = new HashMap<String, Object>();
        for (Entry<String, Object> entry : attrs.entrySet()) {
            if (entry.getValue() instanceof CmsJspStandardContextBean) {
                result.put(entry.getKey(), ((CmsJspStandardContextBean)entry.getValue()).createCopy());
            } else if (entry.getValue() instanceof Cloneable) {
                Object clone = null;
                try {
                    clone = ObjectUtils.clone(entry.getValue());
                } catch (Exception e) {
                    LOG.info(e.getMessage(), e);
                }

                result.put(entry.getKey(), clone != null ? clone : entry.getValue());
            } else {
                result.put(entry.getKey(), entry.getValue());
            }

        }

        return result;
    }
675702
public void restoreAttributes()
    {
        String attrName = getScopedName( STORED_ATTRS_ATTR );
        Map savedAttrs = ( Map ) getSession().getAttribute( attrName );

        if ( savedAttrs != null )
        {
            setAttributeMap( savedAttrs );
        }
    }
1092470
function setElAttributes(el, attributes) {
  Object.getOwnPropertyNames(attributes).forEach(function (attrName) {
    var attrValue = attributes[attrName];

    if (attrValue === null || typeof attrValue === 'undefined' || attrValue === false) {
      el.removeAttribute(attrName);
    } else {
      el.setAttribute(attrName, attrValue === true ? '' : attrValue);
    }
  });
}
1186539
public boolean isRecursiveAttrSet(ElemAttributeSet attrSet)
  {

    if (null == m_attrSetStack)
    {
      m_attrSetStack = new Stack();
    }

    if (!m_attrSetStack.empty())
    {
      int loc = m_attrSetStack.search(attrSet);

      if (loc > -1)
      {
        return true;
      }
    }

    return false;
  }
174587
@Override
    public Object[] swapParameters(final Object[] emptyReplacement) {
        Object[] result;
        if (varargs == null) {
            result = params;
            if (emptyReplacement.length >= MAX_PARMS) {
                params = emptyReplacement;
            } else {
                // Bad replacement! Too small, may blow up future 10-arg messages.
                if (argCount <= emptyReplacement.length) {
                    // copy params into the specified replacement array and return that
                    System.arraycopy(params, 0, emptyReplacement, 0, argCount);
                    result = emptyReplacement;
                } else {
                    // replacement array is too small for current content and future content: discard it
                    params = new Object[MAX_PARMS];
                }
            }
        } else {
            // The returned array will be reused by the caller in future swapParameter() calls.
            // Therefore we want to avoid returning arrays with less than 10 elements.
            // If the vararg array is less than 10 params we just copy its content into the specified array
            // and return it. This helps the caller to retain a reusable array of at least 10 elements.
            // NOTE: LOG4J2-1688 unearthed the use case that an application array (not a varargs array) is passed
            // as the argument array. This array should not be modified, so it cannot be passed to the caller
            // who will at some point null out the elements in the array).
            if (argCount <= emptyReplacement.length) {
                result = emptyReplacement;
            } else {
                result = new Object[argCount]; // LOG4J2-1688
            }
            // copy params into the specified replacement array and return that
            System.arraycopy(varargs, 0, result, 0, argCount);
        }
        return result;
    }
621214
private void updateAttributeInBackend(Attribute attr, Attribute updatedAttr) {
    MetaDataService meta = dataService.getMeta();
    meta.getConcreteChildren(attr.getEntity())
        .forEach(
            entityType ->
                meta.getBackend(entityType).updateAttribute(entityType, attr, updatedAttr));
  }
1161181
private void updateAttributesCache(String key, Attributes missAttrs, Attributes cachedAttrs) {
        final String METHODNAME = "updateAttributeCache(key,missAttrs,cachedAttrs)";
        if (missAttrs.size() > 0) {
            boolean newAttr = false; // differentiate between a new entry and an entry we'll update so we change the cache correctly and maintain the creation TTL.
            if (cachedAttrs != null) {
                cachedAttrs = (Attributes) cachedAttrs.clone();
            } else {
                cachedAttrs = new BasicAttributes(true);
                newAttr = true;
            }

            //Set extIdAttrs = iLdapConfigMgr.getExtIds();
            for (NamingEnumeration<?> neu = missAttrs.getAll(); neu.hasMoreElements();) {
                Attribute attr = (Attribute) neu.nextElement();
                // If the size of the attributes is larger than the limit, don not cache it.
                if (!(iAttrsSizeLmit > 0 && attr.size() > iAttrsSizeLmit)) {
                    cachedAttrs.put(attr);
                }
            }
            if (newAttr) {
                getAttributesCache().put(key, cachedAttrs, 1, iAttrsCacheTimeOut, 0, null);
            } else {
                getAttributesCache().put(key, cachedAttrs);
            }
            if (tc.isDebugEnabled()) {
                Tr.debug(tc, METHODNAME + " Update " + iAttrsCacheName + "(size: " + getAttributesCache().size() + " newEntry: " + newAttr + ")\n" + key + ": " + cachedAttrs);
            }
        }
    }
302990
private String getTransformedAttrName(final String attrName) {
        return attrNameMapper.containsKey(attrName) ? attrNameMapper.get(attrName) : attrName;
    }
490551
public synchronized void removeDeferredReferenceData(DeferredReferenceData refData) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "removeDeferredReferenceData", "this=" + this, refData);
        }

        if (deferredReferenceDatas != null) {
            deferredReferenceDatas.remove(refData);
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "removeDeferredReferenceData");
        }
    }
1013446
public void setAttributeNames(java.util.Collection<String> attributeNames) {
        if (attributeNames == null) {
            this.attributeNames = null;
            return;
        }

        this.attributeNames = new java.util.ArrayList<String>(attributeNames);
    }
416416
protected void collectAttributeWithFilteredValues(final Map<String, List<Object>> attributesToRelease, final String attributeName,
                                                      final List<Object> filteredValues) {
        attributesToRelease.put(attributeName, filteredValues);
    }
529712
function(el, attrName, oldValue) {
                    if (can.data(can.$(el), "canHasAttributesBindings")) {
                        return setImmediate(function() {
                            can.trigger(el, {
                                    type: "attributes",
                                    attributeName: attrName,
                                    target: el,
                                    oldValue: oldValue,
                                    bubbles: false
                                }, []);
                        });
                    }
                }
28641
function mapAttrName(node, text, maps, id, nodeId, isComponent)
  {
    var attrs = text.match(__matchAttr),
        mapText,
        mapValues,
        attr,
        title,
        value,
        item,
        len = attrs.length,
        titleMap,
        localMap,
        x = 0,
        lenn,
        i = 0;
    
    for(x;x<len;x++)
    {
      attr = attrs[x].split(':');
      title = attr[0];
      value = attr[1].replace(__replaceSingleQuotes, '');
      
      if(title.match(__matchInsert))
      {
        titleMap = new mapObject({
          local_id: id,
          node_id: nodeId,
          mapIndex: maps.length,
          mapTextIndex: 0,
          text: title,
          maps: maps,
          mapText: [title],
          type: 'attr',
          isInsert: true,
          node: node,
          isAttr: true,
          isPointer: isComponent,
          isProperty: true
        })
        maps.push(titleMap)
        titleMap.mapText = [maps[(maps.length - 1)]];
      }
      else if(title.match(__matchText))
      {
        titleMap = new mapObject({
          local_id: id,
          node_id: nodeId,
          mapIndex: maps.length,
          mapTextIndex: 0,
          text: title,
          maps: maps,
          mapText: [title],
          type: 'attr',
          node: node,
          isAttr: true,
          listener: 'setAttribute',
          local: node,
          isPointer: isComponent,
          isProperty: true
        })
        maps.push(titleMap);
        titleMap.mapText = [maps[(maps.length - 1)]];
      }
      
      mapText = splitText(value);
      mapValues = (titleMap ? titleMap.mapValues : maps);
      lenn = mapText.length;
      i = 0;
      
      for(i;i<lenn;i++)
      {
        item = mapText[i];
        if(item.match(__matchInsert))
        {
          localMap = new mapObject({
            local_id: id,
            node_id: nodeId,
            mapIndex: mapValues.length,
            mapTextIndex: i,
            text: item,
            mapText: mapText,
            maps: mapValues,
            type: 'attr',
            isInsert: true,
            property: title,
            listener: title,
            node: node,
            isAttr: true,
            isPointer: isComponent,
            isPropertyValue: true
          });
          titleMap.mapValues.push(localMap)
        }
        else if(item.match(__matchText))
        {
          localMap = new mapObject({
            local_id: id,
            node_id: nodeId,
            mapIndex: mapValues.length,
            mapTextIndex: i,
            text: item,
            mapText: mapText,
            maps: mapValues,
            type: 'attr',
            property: title,
            listener: title,
            node: node,
            isAttr: true,
            isPointer: isComponent,
            isPropertyValue: true
          });
          titleMap.mapValues.push(localMap)
        }
        else
        {
          localMap = item;
        }
        mapText[i] = localMap;
      }
      titleMap.values = mapText;
    }
  }