Buggy code:
public class InstallDS extends ConsoleApplication { private final PlainTextProgressMessageFormatter formatter = new PlainTextProgressMessageFormatter ( ) ; public static final String TMP_FILE_PREFIX = "opendj-setup-" ; public static final String LOG_FILE_SUFFIX = ".log" ; private enum InstallReturnCode { SUCCESSFUL ( 0 ) , SUCCESSFUL_NOP ( 0 ) , ERROR_UNEXPECTED ( 1 ) , ERROR_USER_DATA ( 2 ) , ERROR_SERVER_ALREADY_INSTALLED ( 3 ) , ERROR_INITIALIZING_SERVER ( 4 ) , ERROR_PASSWORD_LIMIT ( 5 ) , ERROR_USER_CANCELLED ( 6 ) , ERROR_LICENSE_NOT_ACCEPTED ( 7 ) , JAVA_VERSION_INCOMPATIBLE ( 8 ) ; private int returnCode ; private InstallReturnCode ( int returnCode ) { } public int getReturnCode ( ) { } } private enum ConfirmCode { CONTINUE ( 1 ) , PROVIDE_INFORMATION_AGAIN ( 2 ) , PRINT_EQUIVALENT_COMMAND_LINE ( 3 ) , CANCEL ( 3 ) ; private int returnCode ; private ConfirmCode ( int returnCode ) { } public int getReturnCode ( ) { } } public static final int LIMIT_KEYSTORE_PASSWORD_PROMPT = 7 ; private final BackendTypeHelper backendTypeHelper = new BackendTypeHelper ( ) ; private Type lastResetPopulateOption ; private String lastResetBackendType ; private String lastResetImportFile ; private String lastResetRejectedFile ; private String lastResetSkippedFile ; private Integer lastResetNumEntries ; private Boolean lastResetEnableSSL ; private Boolean lastResetEnableStartTLS ; private CertificateType lastResetCertType ; private String lastResetKeyStorePath ; private Boolean lastResetEnableWindowsService ; private Boolean lastResetStartServer ; private static final LocalizedLogger logger = LocalizedLogger . getLoggerForThisClass ( ) ; private InstallDSArgumentParser argParser ; public InstallDS ( PrintStream out , PrintStream err , InputStream in ) { } public static void main ( String [ ] args ) { } public static int mainCLI ( String [ ] args ) { } public static int mainCLI ( String [ ] args , OutputStream outStream , OutputStream errStream , InputStream inStream ) { } public int execute ( String [ ] args ) { } private InstallDS . InstallReturnCode fillUserData ( UserData uData , String [ ] args ) throws UserDataException { } private boolean testJVM ( ) { } private boolean checkLicense ( ) { } private void printStatusCommand ( ) { } private InstallDS . InstallReturnCode printAndReturnErrorCode ( LocalizableMessage message ) { } private void checkInstallStatus ( ) throws InitializationException { } @ Override public boolean isQuiet ( ) { } @ Override public boolean isInteractive ( ) { } @ Override public boolean isMenuDrivenMode ( ) { } @ Override public boolean isScriptFriendly ( ) { } @ Override public boolean isAdvancedMode ( ) { } @ Override public boolean isVerbose ( ) { } private void initializeUserDataWithParser ( UserData uData ) throws UserDataException { } private void setBackendType ( final UserData uData , final List < LocalizableMessage > errorMessages ) { final String filledBackendType = argParser . backendTypeArg . getValue ( ) ; if ( ( backendTypeHelper . retrieveBackendTypeFromName ( filledBackendType ) ) != null ) { uData . setBackendType ( filledBackendType ) ; } else { <START_BUG> errorMessages . add ( ERR_INSTALLDS_NO_SUCH_BACKEND_TYPE . get ( filledBackendType , backendTypeHelper . getBackendTypeNames ( ) ) ) ; <END_BUG> } } private List < String > checkBaseDNs ( List < LocalizableMessage > errorMessages ) { } private void setDirectoryManagerData ( UserData uData , List < LocalizableMessage > errorMessages ) { } private void checkBaseDN ( String baseDN , List < LocalizableMessage > errorMessages ) { } private void setPorts ( UserData uData , List < LocalizableMessage > errorMessages ) { } private void setImportData ( List < String > baseDNs , UserData uData , List < LocalizableMessage > errorMessages ) { } private void setSecurityData ( UserData uData , List < LocalizableMessage > errorMessages ) { } private void checkCertificate ( int sslPort , boolean enableSSL , UserData uData , List < LocalizableMessage > errorMessages ) { } private void checkCanUsePort ( int port , List < LocalizableMessage > errorMessages ) { } private LocalizableMessage getCannotBindErrorMessage ( int port ) { } private void promptIfRequired ( UserData uData ) throws ClientException , UserDataException { } private void promptIfRequiredForDirectoryManager ( UserData uData ) throws ClientException , UserDataException { } private LinkedList < String > promptIfRequiredForDNs ( StringArgument arg , LocalizableMessage promptMsg , boolean includeLineBreak ) throws UserDataException { } private void promptIfRequiredForPortData ( UserData uData ) { } private int promptIfRequiredForPortData ( IntegerArgument portArg , LocalizableMessage promptMsg , Collection < Integer > usedPorts , boolean includeLineBreak ) { } private NewSuffixOptions promptIfRequiredForImportData ( final UserData uData ) throws UserDataException { } private String getOrPromptForBackendType ( ) { } private Menu < Integer > getBackendTypeMenu ( ) { } private int getPromptedBackendTypeIndex ( ) { } private NewSuffixOptions promptIfRequiredForDataOptions ( List < String > baseDNs ) { } private void readImportLdifFile ( final List < String > importLDIFFiles , String defaultValue ) { } private String readValidFilePath ( StringArgument arg , String defaultValue , Arg1 < Object > errCannotWriteFile , Arg0 infoPromptFile ) { } private SecurityOptions promptIfRequiredForSecurityData ( UserData uData ) throws ClientException , UserDataException { } private boolean promptIfRequiredForWindowsService ( ) { } private boolean promptIfRequiredForStartServer ( ) { } public static void checkCertificateInKeystore ( SecurityOptions . CertificateType type , String path , String pwd , String certNickname , Collection < LocalizableMessage > errorMessages , Collection < String > nicknameList ) { } private SecurityOptions createSecurityOptionsPrompting ( SecurityOptions . CertificateType type , boolean enableSSL , boolean enableStartTLS , int ldapsPort ) throws ClientException , UserDataException { } public static boolean containsKeyStorePathErrorMessage ( Collection < LocalizableMessage > msgs ) { } public static boolean containsKeyStorePasswordErrorMessage ( Collection < LocalizableMessage > msgs ) { } public static boolean containsCertNicknameErrorMessage ( Collection < LocalizableMessage > msgs ) { } private int promptForInteger ( LocalizableMessage prompt , Integer defaultValue , Integer lowerBound , Integer upperBound ) { } private String promptForCertificateNickname ( List < String > nicknames ) { } private void printSummary ( UserData uData ) { } private void printEquivalentCommandLine ( UserData uData ) { } private InstallDS . ConfirmCode askForConfirmation ( ) { } private void resetArguments ( UserData uData ) { } private String promptForHostNameIfRequired ( ) { }

Fix:
errorMessages . add ( ERR_INSTALLDS_NO_SUCH_BACKEND_TYPE . get ( filledBackendType , backendTypeHelper . getPrintableBackendTypeNames ( ) ) ) ;