Buggy code:
public static final String MSG_VISUALIZZAZIONE_REPORT = "<seq2seq4repair_space>7<seq2seq4repair_space>-<seq2seq4repair_space>Visualizza<seq2seq4repair_space>Report" ; public static final String MSG_CARICAMENTO = "<seq2seq4repair_space>8<seq2seq4repair_space>-<seq2seq4repair_space>Carica" ; public static final String MSG_SALVATAGGIO = "<seq2seq4repair_space>9<seq2seq4repair_space>-<seq2seq4repair_space>Salva" ; public static final String MSG_USCITA_PROGRAMMA = "10<seq2seq4repair_space>-<seq2seq4repair_space>Esci<seq2seq4repair_space>dal<seq2seq4repair_space>programma." ; public static final String MSG_ERRORE = "L\'opzione<seq2seq4repair_space>inserita<seq2seq4repair_space>e\'<seq2seq4repair_space>inesistente.<seq2seq4repair_space>Inserire<seq2seq4repair_space>un\'opzione<seq2seq4repair_space>valida.\n" ; public static final String MSG_MODELLO_ESISTENTE = "Esiste<seq2seq4repair_space>gia'<seq2seq4repair_space>un<seq2seq4repair_space>modello.<seq2seq4repair_space>Si<seq2seq4repair_space>desidera<seq2seq4repair_space>inserire<seq2seq4repair_space>comunque<seq2seq4repair_space>un<seq2seq4repair_space>nuovo<seq2seq4repair_space>modello?" ; public static final String MSG_NOME_MODELLO = "Inserire<seq2seq4repair_space>il<seq2seq4repair_space>nome<seq2seq4repair_space>del<seq2seq4repair_space>nuovo<seq2seq4repair_space>modello:<seq2seq4repair_space>" ; public static final String MSG_DESCRIZIONE_MODELLO = "Inserire<seq2seq4repair_space>una<seq2seq4repair_space>sintetica<seq2seq4repair_space>descrizione<seq2seq4repair_space>del<seq2seq4repair_space>modello:<seq2seq4repair_space>" ; public static final String MSG_NO_MODELLO = "Errore!<seq2seq4repair_space>Nessun<seq2seq4repair_space>modello<seq2seq4repair_space>inserito." ; public static final String MSG_STAMPA_MOD_CORRENTE = "STAMPA<seq2seq4repair_space>DEL<seq2seq4repair_space>MODELLO<seq2seq4repair_space>CORRENTE\n" ; public static final String MSG_SOVRASCRIVI_TS = "Attenzione,<seq2seq4repair_space>esiste<seq2seq4repair_space>gia'<seq2seq4repair_space>un<seq2seq4repair_space>Test<seq2seq4repair_space>Suite<seq2seq4repair_space>inserito.<seq2seq4repair_space>Si<seq2seq4repair_space>desidera<seq2seq4repair_space>abbandonare<seq2seq4repair_space>tale<seq2seq4repair_space>Test<seq2seq4repair_space>Suite<seq2seq4repair_space>e<seq2seq4repair_space>lavorare<seq2seq4repair_space>su<seq2seq4repair_space>quello<seq2seq4repair_space>nuovo?" ; public static final String MSG_INSERIMENTO_TS_ANNULLATO = "Inserimento<seq2seq4repair_space>Test<seq2seq4repair_space>Suite<seq2seq4repair_space>annulato." ; public static final String MSG_TS = "\n\nCREAZIONE<seq2seq4repair_space>DEL<seq2seq4repair_space>TEST<seq2seq4repair_space>SUITE<seq2seq4repair_space>RELATIVO<seq2seq4repair_space>AL<seq2seq4repair_space>MODELLO<seq2seq4repair_space>%s\n\n" ; public static final String MSG_INS_CLASSE_EQ = "CLASSE<seq2seq4repair_space>DI<seq2seq4repair_space>EQUIVALENZA<seq2seq4repair_space>N.<seq2seq4repair_space>%d<seq2seq4repair_space>-<seq2seq4repair_space>INSERIMENTO<seq2seq4repair_space>INFORMAZIONI" ; public static final String MSG_CARD_CE = "Inserire<seq2seq4repair_space>la<seq2seq4repair_space>cardinalita'<seq2seq4repair_space>relativa<seq2seq4repair_space>alla<seq2seq4repair_space>classe<seq2seq4repair_space>di<seq2seq4repair_space>equivalenza<seq2seq4repair_space>:<seq2seq4repair_space>" ; public static final String MSG_INS_COP = "INSERIMENTO<seq2seq4repair_space>INSIEME<seq2seq4repair_space>DI<seq2seq4repair_space>COPERTURA" ; public static final String MSG_COPPIA_AGGIUNTA = "La<seq2seq4repair_space>coppia<seq2seq4repair_space>(Insieme<seq2seq4repair_space>del<seq2seq4repair_space>Cammino<seq2seq4repair_space>;<seq2seq4repair_space>Valore<seq2seq4repair_space>della<seq2seq4repair_space>Rilevazione)<seq2seq4repair_space>e'<seq2seq4repair_space>stata<seq2seq4repair_space>aggiunta<seq2seq4repair_space>alla<seq2seq4repair_space>classe<seq2seq4repair_space>di<seq2seq4repair_space>equivalenza<seq2seq4repair_space>n.%d" ; public static final String MSG_CONTINUA_SI_NO_COPPIA = "Si<seq2seq4repair_space>desidera<seq2seq4repair_space>inserire<seq2seq4repair_space>un'altra<seq2seq4repair_space>coppia<seq2seq4repair_space>(insieme<seq2seq4repair_space>del<seq2seq4repair_space>cammino<seq2seq4repair_space>;<seq2seq4repair_space>valore<seq2seq4repair_space>della<seq2seq4repair_space>rilevazione)?" ; public static final String MSG_ERRORE_CE = "Errore!<seq2seq4repair_space>E'<seq2seq4repair_space>gia'<seq2seq4repair_space>presente<seq2seq4repair_space>nel<seq2seq4repair_space>Test<seq2seq4repair_space>Suite<seq2seq4repair_space>una<seq2seq4repair_space>classe<seq2seq4repair_space>di<seq2seq4repair_space>equivalenza<seq2seq4repair_space>uguale.<seq2seq4repair_space>Ripetere<seq2seq4repair_space>l'inserimento." ; public static final String MSG_CONTINUA_SI_NO_CE = "Si<seq2seq4repair_space>desidera<seq2seq4repair_space>inserire<seq2seq4repair_space>un'altra<seq2seq4repair_space>classe<seq2seq4repair_space>di<seq2seq4repair_space>equivalenza?" ; public static final String MSG_SALVATAGGIO_TS = "Si<seq2seq4repair_space>desidera<seq2seq4repair_space>salvare<seq2seq4repair_space>il<seq2seq4repair_space>Test<seq2seq4repair_space>Suite<seq2seq4repair_space>inserito?" ; public static final String MSG_NOME_TS = "Che<seq2seq4repair_space>nome<seq2seq4repair_space>si<seq2seq4repair_space>desidera<seq2seq4repair_space>dare<seq2seq4repair_space>al<seq2seq4repair_space>Test<seq2seq4repair_space>Suite?" ; public static final String MSG_SINTESI_TS = "Si<seq2seq4repair_space>desidera<seq2seq4repair_space>vedere<seq2seq4repair_space>una<seq2seq4repair_space>sintesi<seq2seq4repair_space>delle<seq2seq4repair_space>classi<seq2seq4repair_space>di<seq2seq4repair_space>equivalenza<seq2seq4repair_space>e<seq2seq4repair_space>degli<seq2seq4repair_space>insiemi<seq2seq4repair_space>di<seq2seq4repair_space>copertura<seq2seq4repair_space>inseriti\nper<seq2seq4repair_space>il<seq2seq4repair_space>TS<seq2seq4repair_space>corrente?" ; public static final String MSG_NO_TS = "Errore!<seq2seq4repair_space>Nessun<seq2seq4repair_space>Test<seq2seq4repair_space>Suite<seq2seq4repair_space>inserito." ; public static final String MSG_ERRORE_REPORT_1 = "Attenzione!<seq2seq4repair_space>Per<seq2seq4repair_space>creare<seq2seq4repair_space>un<seq2seq4repair_space>report<seq2seq4repair_space>deve<seq2seq4repair_space>essere<seq2seq4repair_space>inserito<seq2seq4repair_space>un<seq2seq4repair_space>modello,<seq2seq4repair_space>un<seq2seq4repair_space>test<seq2seq4repair_space>suite<seq2seq4repair_space>e<seq2seq4repair_space>un<seq2seq4repair_space>insieme<seq2seq4repair_space>delle<seq2seq4repair_space>diagnosi<seq2seq4repair_space>minimali." ; public static final String MSG_ERRORE_REPORT_2 = "Attenzione!<seq2seq4repair_space>Per<seq2seq4repair_space>creare<seq2seq4repair_space>un<seq2seq4repair_space>report<seq2seq4repair_space>e\'<seq2seq4repair_space>necessario<seq2seq4repair_space>associare<seq2seq4repair_space>al<seq2seq4repair_space>Test<seq2seq4repair_space>Suite<seq2seq4repair_space>un<seq2seq4repair_space>insieme<seq2seq4repair_space>delle<seq2seq4repair_space>diagnosi<seq2seq4repair_space>minimali,<seq2seq4repair_space>le<seq2seq4repair_space>relative<seq2seq4repair_space>probabilita\'<seq2seq4repair_space>e<seq2seq4repair_space>distanze<seq2seq4repair_space>e<seq2seq4repair_space>aver<seq2seq4repair_space>caricato<seq2seq4repair_space>il<seq2seq4repair_space>modello<seq2seq4repair_space>corrispondente\na<seq2seq4repair_space>quello<seq2seq4repair_space>del<seq2seq4repair_space>Test<seq2seq4repair_space>Suite." ; public static final String MSG_SOVRASCRIVI_REPORT = "Attenzione,<seq2seq4repair_space>esiste<seq2seq4repair_space>gia'<seq2seq4repair_space>un<seq2seq4repair_space>Report<seq2seq4repair_space>inserito.<seq2seq4repair_space>Si<seq2seq4repair_space>desidera<seq2seq4repair_space>sostituirlo?" ; public static final String MSG_REPORT_INESISTENTE = "Errore.<seq2seq4repair_space>Nessun<seq2seq4repair_space>Report<seq2seq4repair_space>inserito" ; public static final String MSG_INSERIMENTO_REPORT_ANNULLATO = "Inserimento<seq2seq4repair_space>Report<seq2seq4repair_space>annulato." ; public static final String MSG_SALVATAGGIO_REPORT = "Si<seq2seq4repair_space>desidera<seq2seq4repair_space>salvare<seq2seq4repair_space>il<seq2seq4repair_space>Report?" ; public static final String MSG_VISUALIZZA_REPORT = "Si<seq2seq4repair_space>desidera<seq2seq4repair_space>visualizzare<seq2seq4repair_space>il<seq2seq4repair_space>report<seq2seq4repair_space>inserito?" ; public static final String MSG_REPORT_SALVATO = "Il<seq2seq4repair_space>Report<seq2seq4repair_space>e'<seq2seq4repair_space>stato<seq2seq4repair_space>salvato<seq2seq4repair_space>correttamente" ; public static final String MSG_SALVATAGGIO_TESTO_REPORT = "Si<seq2seq4repair_space>desidera<seq2seq4repair_space>salvare<seq2seq4repair_space>il<seq2seq4repair_space>Report<seq2seq4repair_space>in<seq2seq4repair_space>un<seq2seq4repair_space>file<seq2seq4repair_space>di<seq2seq4repair_space>testo?" ; public static final String MSG_REPORT_SALVATO_TESTO = "Il<seq2seq4repair_space>Report<seq2seq4repair_space>e'<seq2seq4repair_space>stato<seq2seq4repair_space>salvato<seq2seq4repair_space>correttamente<seq2seq4repair_space>nel<seq2seq4repair_space>file<seq2seq4repair_space>di<seq2seq4repair_space>testo<seq2seq4repair_space>%s" ; public static final String MSG_TITOLO_MENU_CARICAMENTO = "MENU\'<seq2seq4repair_space>GESTIONE<seq2seq4repair_space>CARICAMENTO\n\nCosa<seq2seq4repair_space>si<seq2seq4repair_space>desidera<seq2seq4repair_space>fare?" ; public static final String MSG_CARICA_MODELLO = "1<seq2seq4repair_space>-<seq2seq4repair_space>Carica<seq2seq4repair_space>un<seq2seq4repair_space>modello<seq2seq4repair_space>esistente" ; public static final String MSG_CARICA_TS = "2<seq2seq4repair_space>-<seq2seq4repair_space>Carica<seq2seq4repair_space>un<seq2seq4repair_space>test<seq2seq4repair_space>suite<seq2seq4repair_space>esistente" ; public static final String MSG_CARICA_REPORT = "3<seq2seq4repair_space>-<seq2seq4repair_space>Carica<seq2seq4repair_space>un<seq2seq4repair_space>report<seq2seq4repair_space>esistente" ; public static final String MSG_ESCI = "4<seq2seq4repair_space>-<seq2seq4repair_space>Ritorna<seq2seq4repair_space>al<seq2seq4repair_space>menu'<seq2seq4repair_space>principale" ; public static final String MSG_NOME_MODELLO_PREESISTENTE = "Nome<seq2seq4repair_space>modello<seq2seq4repair_space>da<seq2seq4repair_space>caricare:<seq2seq4repair_space>" ; public static final String MSG_SOVRASCRIVI_MODELLO = "Attenzione,<seq2seq4repair_space>esiste<seq2seq4repair_space>gia'<seq2seq4repair_space>un<seq2seq4repair_space>modello<seq2seq4repair_space>inserito.<seq2seq4repair_space>Si<seq2seq4repair_space>desidera<seq2seq4repair_space>abbandonare<seq2seq4repair_space>tale<seq2seq4repair_space>modello<seq2seq4repair_space>e<seq2seq4repair_space>lavorare<seq2seq4repair_space>su<seq2seq4repair_space>quello<seq2seq4repair_space>caricato?" ; public static final String MSG_CARICAMENTO_ANNULLATO = "Caricamento<seq2seq4repair_space>annullato." ; public static final String MSG_MODELLO_CARICATO = "Il<seq2seq4repair_space>modello<seq2seq4repair_space>%s<seq2seq4repair_space>e'<seq2seq4repair_space>stato<seq2seq4repair_space>caricato<seq2seq4repair_space>con<seq2seq4repair_space>successo." ; public static final String MSG_NOME_TS_PREESISTENTE = "Nome<seq2seq4repair_space>Test<seq2seq4repair_space>Suite<seq2seq4repair_space>da<seq2seq4repair_space>caricare:<seq2seq4repair_space>" ; public static final String MSG_CARICAMENTO_OK = "Caricamento<seq2seq4repair_space>completato<seq2seq4repair_space>correttamente." ; public static final String MSG_MODELLO_TS_NON_OK = "Attenzione,<seq2seq4repair_space>il<seq2seq4repair_space>Test<seq2seq4repair_space>Suite<seq2seq4repair_space>caricato<seq2seq4repair_space>si<seq2seq4repair_space>riferisce<seq2seq4repair_space>ad<seq2seq4repair_space>un<seq2seq4repair_space>modello<seq2seq4repair_space>diverso<seq2seq4repair_space>da<seq2seq4repair_space>quello<seq2seq4repair_space>presente<seq2seq4repair_space>nel<seq2seq4repair_space>sistema.\nVerra\'<seq2seq4repair_space>caricato<seq2seq4repair_space>il<seq2seq4repair_space>modello<seq2seq4repair_space>corretto<seq2seq4repair_space>per<seq2seq4repair_space>poter<seq2seq4repair_space>eseguire<seq2seq4repair_space>correttamente<seq2seq4repair_space>diagnosi<seq2seq4repair_space>e<seq2seq4repair_space>probabilita\'" ; public static final String MSG_NOME_REPORT_PREESISTENTE = "Nome<seq2seq4repair_space>Report<seq2seq4repair_space>da<seq2seq4repair_space>caricare:<seq2seq4repair_space>" ; public static final String MSG_REPORT_CARICATO = "Il<seq2seq4repair_space>report<seq2seq4repair_space>%s<seq2seq4repair_space>e'<seq2seq4repair_space>stato<seq2seq4repair_space>caricato<seq2seq4repair_space>con<seq2seq4repair_space>successo." ; public static final String MSG_SEGNALAZIONE_REPORT = "Attenzione!<seq2seq4repair_space>Il<seq2seq4repair_space>Report<seq2seq4repair_space>caricato<seq2seq4repair_space>si<seq2seq4repair_space>riferisce<seq2seq4repair_space>ad<seq2seq4repair_space>un<seq2seq4repair_space>Test<seq2seq4repair_space>Suite<seq2seq4repair_space>o<seq2seq4repair_space>ad<seq2seq4repair_space>un<seq2seq4repair_space>Modello<seq2seq4repair_space>diverso<seq2seq4repair_space>da<seq2seq4repair_space>quelli\nattualmente<seq2seq4repair_space>caricati." ; public static final String MSG_VISUALIZZA_REPORT_CARICATO = "Si<seq2seq4repair_space>desidera<seq2seq4repair_space>visualizzare<seq2seq4repair_space>il<seq2seq4repair_space>report<seq2seq4repair_space>caricato?" ; public static final String MSG_TITOLO_MENU_SALVATAGGIO = "MENU\'<seq2seq4repair_space>GESTIONE<seq2seq4repair_space>SALVATAGGIO\n\nCosa<seq2seq4repair_space>si<seq2seq4repair_space>desidera<seq2seq4repair_space>fare?" ; public static final String MSG_SALVATAGGIO_OK = "Il<seq2seq4repair_space>file<seq2seq4repair_space>e'<seq2seq4repair_space>stato<seq2seq4repair_space>salvato<seq2seq4repair_space>con<seq2seq4repair_space>successo" ; public static final String MSG_SALVA_MODELLO = "1<seq2seq4repair_space>-<seq2seq4repair_space>Salva<seq2seq4repair_space>Modello" ; public static final String MSG_SALVA_TS = "2<seq2seq4repair_space>-<seq2seq4repair_space>Salva<seq2seq4repair_space>Test<seq2seq4repair_space>Suite" ; public static final String MSG_SALVA_REPORT = "3<seq2seq4repair_space>-<seq2seq4repair_space>Salva<seq2seq4repair_space>dati<seq2seq4repair_space>in<seq2seq4repair_space>un<seq2seq4repair_space>report<seq2seq4repair_space>completo" ; public static final String MSG_ESCI_1 = "4<seq2seq4repair_space>-<seq2seq4repair_space>Ritorna<seq2seq4repair_space>al<seq2seq4repair_space>menu'<seq2seq4repair_space>principale" ; public static final String MSG_NOME_MODELLO_SALVA = "Che<seq2seq4repair_space>nome<seq2seq4repair_space>si<seq2seq4repair_space>vuole<seq2seq4repair_space>dare<seq2seq4repair_space>al<seq2seq4repair_space>modello<seq2seq4repair_space>da<seq2seq4repair_space>salvare?" ; public static final String MSG_NO_REPORT = "Errore!<seq2seq4repair_space>Nessun<seq2seq4repair_space>Report<seq2seq4repair_space>inserito." ; public static final String MSG_NOME_REPORT = "Che<seq2seq4repair_space>nome<seq2seq4repair_space>si<seq2seq4repair_space>desidera<seq2seq4repair_space>dare<seq2seq4repair_space>al<seq2seq4repair_space>Report?" ; public static final String MSG_SALUTO = "Grazie<seq2seq4repair_space>per<seq2seq4repair_space>aver<seq2seq4repair_space>usato<seq2seq4repair_space>il<seq2seq4repair_space>nostro<seq2seq4repair_space>programma!<seq2seq4repair_space>Arrivederci.\n" ; private String titolo ; public MenuPrincipale ( String _titolo ) { } public void avvia ( ) { } private void crea ( ) { } private void gestisci ( Menu m ) { } private static void inserimentoNuovoModello ( ) { } private static void visualizzaModelloCorrente ( ) { } private static void inserimentoTS ( ) { } private static void visualizzaDiagnosi ( ) { } private static void visualizzaProbabilitaDistanze ( ) { } private static void creazioneReport ( ) { if ( ( Modello . isNull ( ) ) || ( TestSuite . isNull ( ) ) ) System . out . println ( MenuPrincipale . MSG_ERRORE_REPORT_1 ) ; else { if ( ( ( ! ( TestSuite . getInstance ( ) . hasDiagnosi ( ) ) ) || ( ! ( TestSuite . getInstance ( ) . hasProbabilitaDistanze ( ) ) ) ) || ( ! ( TestSuite . getInstance ( ) . getModello ( ) . isEqual ( Modello . getInstance ( ) ) ) ) ) System . out . println ( MenuPrincipale . MSG_ERRORE_REPORT_2 ) ; else { Report nuovo ; boolean esci = false ; if ( ( Report . isNull ( ) ) == false ) if ( Util . yesOrNo ( MenuPrincipale . MSG_SOVRASCRIVI_REPORT ) ) Report . cambiaReport ( null ) ; else { esci = true ; System . out . println ( MenuPrincipale . MSG_INSERIMENTO_REPORT_ANNULLATO ) ; } if ( esci == false ) { String nomeReport = Util . leggiString ( MenuPrincipale . MSG_NOME_REPORT ) ; nuovo = Report . getInstance ( Modello . getInstance ( ) , TestSuite . getInstance ( ) ) ; nuovo . setNome ( nomeReport ) ; boolean salvataggioSiNo = Util . yesOrNo ( MenuPrincipale . MSG_SALVATAGGIO_REPORT ) ; if ( salvataggioSiNo ) { File nomeFile = new File ( nomeReport ) ; Stream . salvaFile ( nomeFile , nuovo , true ) ; System . out . println ( String . format ( MenuPrincipale . MSG_REPORT_SALVATO , nomeReport ) ) ; } boolean salvataggioFileTestoSiNo = Util . yesOrNo ( MenuPrincipale . MSG_SALVATAGGIO_TESTO_REPORT ) ; if ( salvataggioFileTestoSiNo ) { <START_BUG> String nomeFileTesto = nomeReport + ".txt" ; <END_BUG> Stream . scriviSuFile ( nomeFileTesto , nuovo . toString ( ) ) ; System . out . println ( String . format ( MenuPrincipale . MSG_REPORT_SALVATO_TESTO , nomeReport ) ) ; } boolean visualizzaSiNo = Util . yesOrNo ( MenuPrincipale . MSG_VISUALIZZA_REPORT ) ; if ( visualizzaSiNo ) System . out . println ( nuovo . toString ( ) ) ; } } } } private static void visualizzaReport ( ) { } private static void caricamento ( ) { } private static void caricamentoModello ( ) { } private static void caricamentoTS ( ) { } private static void caricamentoReport ( ) { } private static void salvataggio ( ) { } private static void salvataggioModello ( ) { } private static void salvataggioTS ( ) { } private static void salvataggioReport ( ) { } private static void saluta ( ) { } }

Fix:
String nomeFileTesto = nomeReport + ".doc" ;