Auto names are used for autogenerated indexes or anonymous constraints.
979258
public HsqlName newAutoName(String prefix, HsqlName schema,
                                HsqlName parent, int type) {

        HsqlName name = newAutoName(prefix, (String) null, schema, parent,
                                    type);

        return name;
    }
1143396
private void createIndexes(Table t) {
        for (String indexName : t.getIndexHoldersByName().keySet()) {
            if (!indexName.startsWith("PRIMARY")) {
                createIndex(t, t.getIndexHolderByName(indexName));
            }
        }
    }
735228
private void createIndex(String tableName, String indexName, String... fieldNames)
    {
        StringBuilder builder = new StringBuilder();
        builder.append("CREATE INDEX IF NOT EXISTS ");
        builder.append(indexName);
        builder.append(" ON ");
        builder.append(tableName);
        builder.append(Constants.OPEN_ROUND_BRACKET);
        for (String fieldName : fieldNames)
        {
            builder.append(fieldName);
            builder.append(Constants.COMMA);
        }
        builder.deleteCharAt(builder.length() - 1);
        builder.append(Constants.CLOSE_ROUND_BRACKET);
        StatementResult result = tableAPI.executeSync(builder.toString());
        if (!result.isSuccessful())
        {
            throw new SchemaGenerationException("Unable to CREATE Index with Index Name [" + indexName
                    + "] for table [" + tableName + "]");
        }
    }
1026428
private NameAndTypeConstant parseNameAndTypeConstant(int index)
    throws IOException
  {
    int nameIndex = readShort();
    int descriptorIndex = readShort();

    return new NameAndTypeConstant(_class.getConstantPool(), index,
                                   nameIndex, descriptorIndex);
  }
161159
public static Mapping<BigInteger> bigInt(Constraint... constraints) {
        return new FieldMapping(
                InputMode.SINGLE,
                mkSimpleConverter(s ->
                    isEmptyStr(s) ? BigInteger.ZERO : new BigInteger(s)
                ), new MappingMeta(MAPPING_BIG_INTEGER, BigInteger.class)
            ).constraint(checking(BigInteger::new, "error.bigint", true))
                .constraint(constraints);
        }
601058
function validateNoMissingNames(ast) {
    var errors = [];
    var names = {};
    if (ast.locals) {
      names = Object.keys(ast.locals).reduce(function (accum, k) { // start with locals
        accum[k] = true;
        return accum;
      }, names);
    }
    ast.inParams.reduce(function (accum, p) {  // add input params
      accum[p] = true;
      return accum;
    }, names);
    ast.tasks.reduce(function (accum, t) { // add task outputs
      return t.out.reduce(function (innerAccum, p) {
        innerAccum[p] = true;
        return innerAccum;
      }, accum);
    }, names);

    // now we have all possible provided vars, check task inputs are accounted for
    ast.tasks.reduce(function (accum, t) {  // for all tasks
      return t.a.reduce(function (innerAccum, p) { // for all in params, except property
        if (!isLiteralOrProp(p) && !names[p]) innerAccum.push(sprintf(MISSING_INPUTS, p)); // add error if missing
        return innerAccum;
      }, accum);
    }, errors);

    // now check the final task outputs
    ast.outTask.a.reduce(function (accum, p) { // for final task out params
      if (!isLiteralOrProp(p) && !names[p]) accum.push(sprintf(MISSING_INPUTS, p)); // add error if missing
      return accum;
    }, errors);
    return errors;
  }
1060722
private IndexingRule getApplicableIndexingRule(NodeData state)
   {
      List<IndexingRule> rules = null;
      List<IndexingRule> r = configElements.get(state.getPrimaryTypeName());
      if (r != null)
      {
         rules = new ArrayList<IndexingRule>();
         rules.addAll(r);
      }

      InternalQName[] mixTypes = state.getMixinTypeNames();
      for (InternalQName mixType : mixTypes)
      {
         r = configElements.get(mixType);
         if (r != null)
         {
            if (rules == null)
            {
               rules = new ArrayList<IndexingRule>();
            }
            rules.addAll(r);
         }
      }

      if (rules != null)
      {
         for (IndexingRule ir : rules)
         {
            if (ir.appliesTo(state))
            {
               return ir;
            }
         }
      }

      // no applicable rule
      return null;
   }
140155
def auto_model_name_recognize(model_name):
    
    name_list = model_name.split('-')
    return ''.join(['%s%s' % (name[0].upper(), name[1:]) for name in name_list])
807793
static public HsqlName getAutoColumnName(int i) {

        if (i < autoColumnNames.length) {
            return autoColumnNames[i];
        }

        return new HsqlName(staticManager, makeAutoColumnName("C_", i), 0, false);
    }
1193849
function nameClause(previousExpr, detection ) {
     
      var name = detection[NAME_INDEX],
            
          matchesName = ( !name || name == '*' ) 
                           ?  always
                           :  function(ascent){return headKey(ascent) == name};
     

      return lazyIntersection(matchesName, previousExpr);
   }
471174
public final void qualifiedName() throws RecognitionException {
		int qualifiedName_StartIndex = input.index();

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

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:583:5: ( Identifier ( '.' Identifier )* )
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:583:7: Identifier ( '.' Identifier )*
			{
			match(input,Identifier,FOLLOW_Identifier_in_qualifiedName2123); if (state.failed) return;
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:583:18: ( '.' Identifier )*
			loop83:
			while (true) {
				int alt83=2;
				int LA83_0 = input.LA(1);
				if ( (LA83_0==47) ) {
					alt83=1;
				}

				switch (alt83) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:583:19: '.' Identifier
					{
					match(input,47,FOLLOW_47_in_qualifiedName2126); if (state.failed) return;
					match(input,Identifier,FOLLOW_Identifier_in_qualifiedName2128); if (state.failed) return;
					}
					break;

				default :
					break loop83;
				}
			}

			}

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

		}
	}
236255
protected void setNames(Set<String> names)
   {
      this.names.clear();
      this.indexes.clear();
      this.names.addAll(names);
      this.indexes.addAll(names);
      // new list of indexes if thought to be up to date
      dirty = false;
   }
65298
public final void nameArgument(String name, int index)
    {
        VariableElement lv = getLocalVariable(index);
        if (lv instanceof UpdateableElement)
        {
            UpdateableElement ue = (UpdateableElement) lv;
            ue.setSimpleName(El.getName(name));
        }
        else
        {
            throw new IllegalArgumentException("local variable at index "+index+" cannot be named");
        }
    }
815484
private Pair<DBIDVar, Double> singleIteration(Relation<V> relationx, Relation<? extends NumberVector> relationy) {
    final int dim = RelationUtil.dimensionality(relationx);
    final int dimy = RelationUtil.dimensionality(relationy);
    assert (dim == 2);
    KNNQuery<V> knnQuery = QueryUtil.getKNNQuery(relationx, getDistanceFunction(), k + 1);

    // We need stable indexed DBIDs
    ArrayModifiableDBIDs ids = DBIDUtil.newArray(relationx.getDBIDs());
    // Sort, so we can do a binary search below.
    ids.sort();

    // init F,X,Z
    double[][] X = new double[ids.size()][6];
    double[][] F = new double[ids.size()][ids.size()];
    double[][] Y = new double[ids.size()][dimy];

    {
      int i = 0;
      for(DBIDIter id = ids.iter(); id.valid(); id.advance(), i++) {
        // Fill the data matrix
        {
          V vec = relationx.get(id);
          double la = vec.doubleValue(0);
          double lo = vec.doubleValue(1);
          X[i][0] = 1.0;
          X[i][1] = la;
          X[i][2] = lo;
          X[i][3] = la * lo;
          X[i][4] = la * la;
          X[i][5] = lo * lo;
        }

        {
          final NumberVector vecy = relationy.get(id);
          for(int d = 0; d < dimy; d++) {
            double idy = vecy.doubleValue(d);
            Y[i][d] = idy;
          }
        }

        // Fill the neighborhood matrix F:
        {
          KNNList neighbors = knnQuery.getKNNForDBID(id, k + 1);
          ModifiableDBIDs neighborhood = DBIDUtil.newArray(neighbors.size());
          for(DBIDIter neighbor = neighbors.iter(); neighbor.valid(); neighbor.advance()) {
            if(DBIDUtil.equal(id, neighbor)) {
              continue;
            }
            neighborhood.add(neighbor);
          }
          // Weight object itself positively.
          F[i][i] = 1.0;
          final int nweight = -1 / neighborhood.size();
          // We need to find the index positions of the neighbors,
          // unfortunately.
          for(DBIDIter iter = neighborhood.iter(); iter.valid(); iter.advance()) {
            int pos = ids.binarySearch(iter);
            assert (pos >= 0);
            F[pos][i] = nweight;
          }
        }
      }
    }
    // Estimate the parameter beta
    // Common term that we can save recomputing.
    double[][] common = times(transposeTimesTranspose(X, F), F);
    double[][] b = times(inverse(times(common, X)), times(common, Y));
    // Estimate sigma_0 and sigma:
    // sigma_sum_square = sigma_0*sigma_0 + sigma*sigma
    double[][] sigmaMat = times(F, minusEquals(times(X, b), times(F, Y)));
    final double sigma_sum_square = normF(sigmaMat) / (relationx.size() - 6 - 1);
    final double norm = 1 / FastMath.sqrt(sigma_sum_square);

    // calculate the absolute values of standard residuals
    double[][] E = timesEquals(times(F, minus(Y, times(X, b))), norm);

    DBIDVar worstid = DBIDUtil.newVar();
    double worstscore = Double.NEGATIVE_INFINITY;
    int i = 0;
    for(DBIDIter id = ids.iter(); id.valid(); id.advance(), i++) {
      double err = squareSum(getRow(E, i));
      // double err = Math.abs(E.get(i, 0));
      if(err > worstscore) {
        worstscore = err;
        worstid.set(id);
      }
    }

    return new Pair<>(worstid, FastMath.sqrt(worstscore));
  }
1117483
function (next) {

            // index creation options
            var body = {
                settings: {
                    number_of_shards : 3,
                    number_of_replicas : 2,
                    analysis: {
                        // analyzer definitions go here
                        analyzer: {
                            // default analyzer used for search & indexing
                            default: {
                                tokenizer: 'uax_url_email',
                                // indexing/search analysis:
                                // - trims leading/trailing whitespace
                                // - is case-insensitive
                                // - transforms non ascii characters into ascii character equivalents
                                // - splits on word/number boundaries and other delimiter rules
                                filter: [ 'trim', 'lowercase', 'asciifolding', 'word_delimiter_1' ]
                            },
                            // analyzer to use in indexing for autocomplete - we want ngrams of our data to be indexed
                            autocomplete_index: {
                                type: 'custom',
                                // use our own own ngram tokenizer
                                tokenizer: 'autocomplete_ngram',
                                filter: [ 'trim', 'lowercase', 'asciifolding', 'word_delimiter_1' ]
                            },
                            // analyzer to use in analyzing autocomplete search queries (don't generate ngrams from search queries)
                            autocomplete_search: {
                                type: 'custom',
                                tokenizer: 'keyword',
                                filter: [ 'trim', 'lowercase', 'asciifolding' ]
                            }
                        },
                        // filter definitions go here
                        filter: {
                            // custom word_delimiter filter to preserve original input as well as tokenize it
                            word_delimiter_1: {
                                type: 'word_delimiter',
                                preserve_original: true
                            }
                        },
                        // tokenizer definitions go here
                        tokenizer: {
                            // tokenizer to use for generating ngrams of our indexed data
                            autocomplete_ngram: {
                                type: 'edgeNGram',
                                // min and max ngram length
                                min_gram: 1,
                                max_gram: 50,
                                // generate ngrams that start from the front of the token only (eg. c, ca, cat)
                                side: 'front'
                            }
                        }
                    }
                }
            }

            // if non-default mapping info was defined on the schema (e.g. autocomplete), apply the mappings to the index
            body.mappings = {}
            body.mappings[options.type] = indexMap

            // console.log('mapping for', options.type, util.inspect(indexMap, true, 10, true))

            var reqOpts = {
                method: 'PUT',
                url: versionedUri,
                body: JSON.stringify(body)
            }

            if(options.auth) {
                reqOpts.auth = {
                    user: options.auth.user,
                    pass: options.auth.password,
                    sendImmediately: false
                };
            }

            // console.log('versionedUri', versionedUri)

            helpers.backOffRequest(reqOpts, function (err, res, body) {
                if (err) {
                    return cb(err)
                }

                if (!helpers.elasticsearchBodyOk(body)) {
                    var error = new Error('Unexpected index creation reply: '+util.inspect(body, true, 10, true))
                    error.body = body

                    return next(error)
                }

                return next()
            })
        }
571601
private Stream<IndexConstraintNodeInfo> indexesAndConstraintsForNode(Map<String,Object> config) {

        SchemaConfig schemaConfig = new SchemaConfig(config);
        Set<String> includeLabels = schemaConfig.getLabels();
        Set<String> excludeLabels = schemaConfig.getExcludeLabels();

        try ( Statement ignore = tx.acquireStatement() ) {
            TokenRead tokenRead = tx.tokenRead();
            TokenNameLookup tokens = new SilentTokenNameLookup(tokenRead);

            SchemaRead schemaRead = tx.schemaRead();
            Iterable<IndexReference> indexesIterator;
            Iterable<ConstraintDescriptor> constraintsIterator;

            if (includeLabels.isEmpty()) {
                Iterable<IndexReference> allIndex = () -> schemaRead.indexesGetAll();
                indexesIterator = StreamSupport.stream(allIndex.spliterator(),false)
                        .filter(index -> Arrays.stream(index.schema().getEntityTokenIds()).noneMatch(id -> {
                            try {
                                return excludeLabels.contains(tokenRead.nodeLabelName(id));
                            } catch (LabelNotFoundKernelException e) {
                                return false;
                            }
                        })).collect(Collectors.toList());

                Iterable<ConstraintDescriptor> allConstraints = () -> schemaRead.constraintsGetAll();
                constraintsIterator = StreamSupport.stream(allConstraints.spliterator(),false)
                        .filter(constraint -> Arrays.stream(constraint.schema().getEntityTokenIds()).noneMatch(id -> {
                            try {
                                return excludeLabels.contains(tokenRead.nodeLabelName(id));
                            } catch (LabelNotFoundKernelException e) {
                                return false;
                            }
                            }))
                            .collect(Collectors.toList());
            } else {
                constraintsIterator = includeLabels.stream()
                        .filter(label -> !excludeLabels.contains(label) && tokenRead.nodeLabel(label) != -1)
                        .flatMap(label -> {
                            Iterable<ConstraintDescriptor> indexesForLabel = () -> schemaRead.constraintsGetForLabel(tokenRead.nodeLabel(label));
                            return StreamSupport.stream(indexesForLabel.spliterator(), false);
                        })
                        .collect(Collectors.toList());

                indexesIterator = includeLabels.stream()
                        .filter(label -> !excludeLabels.contains(label) && tokenRead.nodeLabel(label) != -1)
                        .flatMap(label -> {
                            Iterable<IndexReference> indexesForLabel = () -> schemaRead.indexesGetForLabel(tokenRead.nodeLabel(label));
                            return StreamSupport.stream(indexesForLabel.spliterator(), false);
                        })
                        .collect(Collectors.toList());
            }


            Stream<IndexConstraintNodeInfo> constraintNodeInfoStream = StreamSupport.stream(constraintsIterator.spliterator(), false)
                    .filter(constraintDescriptor -> constraintDescriptor.type().equals(ConstraintDescriptor.Type.EXISTS))
                    .map(constraintDescriptor -> this.nodeInfoFromConstraintDescriptor(constraintDescriptor, tokens))
                    .sorted(Comparator.comparing(i -> i.label));

            Stream<IndexConstraintNodeInfo> indexNodeInfoStream = StreamSupport.stream(indexesIterator.spliterator(), false)
                    .map(indexReference -> this.nodeInfoFromIndexDefinition(indexReference, schemaRead, tokens))
                    .sorted(Comparator.comparing(i -> i.label));

            return Stream.of(constraintNodeInfoStream, indexNodeInfoStream).flatMap(e -> e);
        }
    }
1360855
public final void createdName() throws RecognitionException {
		int createdName_StartIndex = input.index();

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

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1250:5: ( Identifier ( typeArguments )? ( '.' Identifier ( typeArguments )? )* | primitiveType )
			int alt180=2;
			int LA180_0 = input.LA(1);
			if ( (LA180_0==Identifier) ) {
				alt180=1;
			}
			else if ( (LA180_0==65||LA180_0==67||LA180_0==71||LA180_0==77||LA180_0==85||LA180_0==92||LA180_0==94||LA180_0==105) ) {
				alt180=2;
			}

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

			switch (alt180) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1250:7: Identifier ( typeArguments )? ( '.' Identifier ( typeArguments )? )*
					{
					match(input,Identifier,FOLLOW_Identifier_in_createdName6032); if (state.failed) return;
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1250:18: ( typeArguments )?
					int alt177=2;
					int LA177_0 = input.LA(1);
					if ( (LA177_0==53) ) {
						alt177=1;
					}
					switch (alt177) {
						case 1 :
							// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1250:18: typeArguments
							{
							pushFollow(FOLLOW_typeArguments_in_createdName6034);
							typeArguments();
							state._fsp--;
							if (state.failed) return;
							}
							break;

					}

					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1251:9: ( '.' Identifier ( typeArguments )? )*
					loop179:
					while (true) {
						int alt179=2;
						int LA179_0 = input.LA(1);
						if ( (LA179_0==47) ) {
							alt179=1;
						}

						switch (alt179) {
						case 1 :
							// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1251:10: '.' Identifier ( typeArguments )?
							{
							match(input,47,FOLLOW_47_in_createdName6046); if (state.failed) return;
							match(input,Identifier,FOLLOW_Identifier_in_createdName6048); if (state.failed) return;
							// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1251:25: ( typeArguments )?
							int alt178=2;
							int LA178_0 = input.LA(1);
							if ( (LA178_0==53) ) {
								alt178=1;
							}
							switch (alt178) {
								case 1 :
									// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1251:25: typeArguments
									{
									pushFollow(FOLLOW_typeArguments_in_createdName6050);
									typeArguments();
									state._fsp--;
									if (state.failed) return;
									}
									break;

							}

							}
							break;

						default :
							break loop179;
						}
					}

					}
					break;
				case 2 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1252:7: primitiveType
					{
					pushFollow(FOLLOW_primitiveType_in_createdName6061);
					primitiveType();
					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, 131, createdName_StartIndex); }

		}
	}