private ProgramFragment createFragment(ProgramModule root, CodeBlock block) {
		boolean done = false;
		int index = 0;
		String baseName = block.getName();
		String name = baseName;
		while (!done) {

			try {
				return root.createFragment(name);
			}
			catch (DuplicateNameException e) {
				++index;
				name = baseName + "(" + index + ")";
			}
		}
		return null;
	}
Create a fragment with the name as the name of the given block; append a
one-up number if we get a DuplicateNameException.

@param root parent module
@param block code block
@return Fragment new fragment
Ghidra/Features/Base/src/main/java/ghidra/app/cmd/module/SubroutineModelCmd.java