NationalSecurityAgency/ghidra · error · LSHException
Duplicate ${type} entry specified: ${name}
Error message
Duplicate ${type} entry specified: ${name} What it means
checkStrings builds a Set and rejects any name already present (case-sensitive) with LSHException("Duplicate <type> entry specified: <name>").
Source
Thrown at Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/elastic/ElasticDatabase.java:2903
config.info.execats = query.info.execats;
}
generate(config);
response.info = config.info;
}
private static void checkStrings(List<String> list, String type, int limit)
throws LSHException {
if (limit > 0 && list.size() > limit) {
throw new LSHException("Too many " + type + " specified (limit=" +
FunctionTagBSimFilterType.MAX_TAG_COUNT + "): " + list.size());
}
Set<String> names = new HashSet<>();
for (String name : list) {
if (!CategoryRecord.enforceTypeCharacters(name)) {
throw new LSHException("Bad characters in one or more proposed " + type);
}
if (!names.add(name)) {
throw new LSHException("Duplicate " + type + " entry specified: " + name);
}
}
}
/**
* Entry point for the InstallCategoryRequest command:
* Install a new executable category to be managed by the database
* @param query is command parameters
* @throws LSHException if the command is misconfigured
* @throws ElasticException for communication problems with the server
*/
private void fdbInstallCategory(InstallCategoryRequest query)
throws LSHException, ElasticException {
ResponseInfo response = query.installresponse;
if (!CategoryRecord.enforceTypeCharacters(query.type_name)) {
throw new LSHException("Bad characters in proposed category type");
}
if (query.isdatecolumn) {View on GitHub (pinned to d5f144c24d)
Solutions
- Dedupe the list before submission.
- Build the collection with a LinkedHashSet to preserve order while dropping duplicates.
Example fix
// before List<String> cats = merge(cliCats, fileCats); // dupes present query.info.execats = cats; // after List<String> cats = new ArrayList<>(new LinkedHashSet<>(merge(cliCats, fileCats))); query.info.execats = cats;
Defensive patterns
Strategy: validation
Validate before calling
// Detect dupes before sending.
Set<String> seen = new HashSet<>();
for (String n : list) if (!seen.add(n)) throw new IllegalArgumentException("Duplicate: " + n); Type guard
boolean noDupes = list.size() == new HashSet<>(list).size();
Prevention
- Always dedupe merged lists at the seam between sources.
- Decide on a canonical case policy and apply it consistently.
When it happens
Trigger: A category/tag list passed to checkStrings containing the same exact string more than once.
Common situations: Merging multiple config sources (CLI flags plus a file) without dedup; case-sensitive near-duplicates that look different but collide.
Related errors
- Executable
- Expecting privilege option (admin or user)
- host required
- Non-empty dbName required
- Invalid {} dbName: {}
AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14).
Data as JSON: /api/errors/fdf44b062382e0c0.
Report an issue: GitHub.