Query a name for the relative index value to be added into the
        source map name field (optional 5th element).
425805
def update(self, name):
        

        if name is None:
            return

        if name not in self._names:
            # add the name if it isn't already tracked
            self._names[name] = len(self._names)

        result = self._names[name] - self._current
        self._current = self._names[name]
        return result
469023
@Override
    public int getIndex(String qName)
    {
        int cix = qName.indexOf(':');
        int acount = mContext.getAttributeCount();
        if (cix < 0) { // no prefix
            for (int i = 0; i < acount; ++i) {
                if (qName.equals(mContext.getAttributeLocalName(i))) {
                    String prefix = mContext.getAttributePrefix(i);
                    if (prefix == null || prefix.length() == 0) {
                        return i;
                    }
                }
            }
        } else {
            String prefix = qName.substring(0, cix);
            String ln = qName.substring(cix+1);

            for (int i = 0; i < acount; ++i) {
                if (ln.equals(mContext.getAttributeLocalName(i))) {
                    String p2 = mContext.getAttributePrefix(i);
                    if (p2 != null && prefix.equals(p2)) {
                        return i;
                    }
                }
            }
        }
        return -1;
    }
302285
private int assertPresentAndGetIndex(String name) {
        int index = this.propertySourceList.indexOf(PropertySource.named(name));
        if (index == -1) {
            throw new IllegalArgumentException("PropertySource named '" + name + "' does not exist");
        }
        return index;
    }
318929
public void addName(String name)
   {
      if (names.contains(name))
      {
         throw new IllegalArgumentException("already contains: " + name);
      }
      indexes.add(name);
      names.add(name);
      dirty = true;
   }
555378
private int findIndexForName(String[] fieldNames, String searchName)
    {
        for(int i = 0; i < fieldNames.length; i++)
        {
            if(searchName.equals(fieldNames[i]))
            {
                return i;
            }
        }
        throw new PersistenceBrokerException("Can't find field name '" + searchName +
                "' in given array of field names");
    }
1082334
@Pure
	public int getDBFFieldIndex(String name) {
		assert name != null;
		if (this.fieldCount != -1) {
			try {
				int i = 0;
				for (final DBaseFileField field : this.fields) {
					if (field != null && name.equals(field.getName())) {
						return i;
					}
					++i;
				}
			} catch (Exception exception) {
				//
			}
		}
		return -1;
	}
360739
def has_index(self, name):
        
        name = self._normalize_identifier(name)

        return name in self._indexes
636982
public void ensureIndex(DBObject keys, String name) throws MongoException {
        ensureIndex(keys, name, false);
    }
589593
public IndexQueryBuilder setIndex(String indexName) {
        Preconditions.checkArgument(StringUtils.isNotBlank(indexName));
        this.indexName=indexName;
        return this;
    }
871715
private static GroupName nameFromObjectName(ObjectName obj_name, NamedResolverMap resolvedMap) {
        String name = obj_name.getKeyProperty("name");
        String type = obj_name.getKeyProperty("type");
        String domain = obj_name.getDomain();

        Map<String, MetricValue> tags = obj_name.getKeyPropertyList().entrySet().stream()
                .filter((entry) -> !entry.getKey().equals("name"))
                .filter((entry) -> !entry.getKey().equals("type"))
                .map(Tag::valueOf)
                .collect(Collectors.toMap((Tag t) -> t.getName(), (Tag t) -> t.getValue()));

        final List<String> path = new ArrayList<>();
        if (name != null) {
            path.addAll(Arrays.asList(name.split("\\.")));
        } else if (type != null) {
            path.addAll(Arrays.asList(domain.split("\\.")));
            path.add(type);
        } else {
            path.addAll(Arrays.asList(domain.split("\\.")));
        }
        return resolvedMap.getGroupName(path, tags);
    }
964157
@When("^I index a document in the index named '(.+?)' using the mapping named '(.+?)' with key '(.+?)' and value '(.+?)'$")
    public void indexElasticsearchDocument(String indexName, String mappingName, String key, String value) throws Exception {
        ArrayList<XContentBuilder> mappingsource = new ArrayList<XContentBuilder>();
        XContentBuilder builder = jsonBuilder().startObject().field(key, value).endObject();
        mappingsource.add(builder);
        commonspec.getElasticSearchClient().createMapping(indexName, mappingName, mappingsource);
    }
1049597
def reference_extra_field(self, field, index):
        """"""
        ref_data = self.reference_data(index)
        extra_fields = ref_data["extra"].split("\n")
        field_id = field + ":"
        matched = next((x for x in extra_fields if x.startswith(field_id)), None)
        if matched:
            return matched.replace(field_id, "", 1).strip()
        else:
            return ""
88338
private int otherIndex(int i) {
        IDoubleBondStereochemistry element = (IDoubleBondStereochemistry) queryElements[i];
        return queryMap.get(element.getStereoBond().getOther(query.getAtom(i)));
    }
666502
@Pure
	public String getDBFFieldName(int index) {
		if (this.fieldCount != -1) {
			try {
				final DBaseFileField field = this.fields.get(index);
				if (field != null) {
					return field.getName();
				}
			} catch (Exception exception) {
				//
			}
		}
		return null;
	}
469924
def add_attribute(name, index=nil)
      attr_mapping = CsvMapper::AttributeMap.new(name.to_sym, index, @context)
      self.mapped_attributes << attr_mapping
      attr_mapping
    end
834058
public String getLocalName(int index) {
    if (index < 0 || index >= indexSet.size())
      return null;
    return attributes.getLocalName(indexSet.get(index));
  }
910918
private IndexMetadata buildModernIndex(
      CqlIdentifier keyspaceId, CqlIdentifier tableId, AdminRow row) {
    CqlIdentifier name = CqlIdentifier.fromInternal(row.getString("index_name"));
    IndexKind kind = IndexKind.valueOf(row.getString("kind"));
    Map<String, String> options = row.getMapOfStringToString("options");
    String target = options.get("target");
    return new DefaultIndexMetadata(keyspaceId, tableId, name, kind, target, options);
  }