public Set<FrequentSequence> mineClosedSequences(TaskMonitor monitor) {
		globallyFrequentItems = database.getGloballyFrequentItems(minSupport);
		monitor.setMaximum(globallyFrequentItems.size());
		for (FrequentSequenceItem gfItem : globallyFrequentItems) {
			if (monitor.isCancelled()) {
				break;
			}
			monitor.incrementProgress(1);
			List<SequenceItem> singletonFrequentItem = new ArrayList<SequenceItem>();
			singletonFrequentItem.add(gfItem.getItem());
			ProjectedDatabase projectedDatabase =
				new ProjectedDatabase(database, singletonFrequentItem);
			Set<FrequentSequenceItem> backwardExtensionItems =
				projectedDatabase.getBackwardExtensionItems();
			if (backwardExtensionItems.size() == 0) {
				bide(projectedDatabase, monitor);
			}
		}
		return frequentClosedSequences;
	}
Mine the database for closed sequences.

@param monitor
@return The discovered sequences
Ghidra/Features/BytePatterns/src/main/java/ghidra/closedpatternmining/ClosedSequenceMiner.java