Buggy code:
public class Phoebe extends JFrame implements KeyListener { private class Keyword { private String regex ; private String result ; public Keyword ( String regex , String result ) { } public String getRegex ( ) { } public String getResult ( ) { } } private List < Phoebe . Keyword > commands = new ArrayList < Phoebe . Keyword > ( ) ; private List < Phoebe . Keyword > textReplies = new ArrayList < Phoebe . Keyword > ( ) ; private Timer timer = new Timer ( ) ; private final String NAME = "Phoebe" ; private String currUserResp = "" ; private String prevUserResp = "" ; private String prevPhoebeResp = "" ; private String pendingCommand = "" ; private Hashtable < String , String > generalPrograms = new Hashtable < String , String > ( ) ; private Hashtable < String , String > windowsPrograms = new Hashtable < String , String > ( ) ; private Hashtable < String , String > linuxPrograms = new Hashtable < String , String > ( ) ; private JPanel panel = new JPanel ( ) ; private JTextArea conversation = new JTextArea ( 20 , 50 ) ; private JTextArea input = new JTextArea ( 1 , 50 ) ; private JScrollPane scroll = new JScrollPane ( conversation , JScrollPane . VERTICAL_SCROLLBAR_AS_NEEDED , JScrollPane . HORIZONTAL_SCROLLBAR_NEVER ) ; public Phoebe ( ) { } public void keyPressed ( KeyEvent e ) { } public void keyReleased ( KeyEvent e ) { } public void keyTyped ( KeyEvent e ) { } private void respond ( String prompt ) { } private void pickAction ( String action , String prompt ) { } private void textReply ( String prompt ) { } private void exit ( ) { } private void addTextReply ( ) { } private void tellTime ( String prompt ) { } private void promptGen ( String prompt ) { String response = "" ; String idea = "" ; try { URL google = new URL ( "http:////ineedaprompt.com?api&prompt[]=noun&prompt[]=verb&prompt[]=adjective&prompt[]=adverb&prompt[]=location&prompt[]=noun" ) ; BufferedReader br = new BufferedReader ( new InputStreamReader ( google . openStream ( ) ) ) ; String currLine = "" ; while ( ( currLine = br . readLine ( ) ) != null ) { idea += currLine ; } br . close ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } if ( prompt . contains ( "bored" ) ) { if ( ! ( prevPhoebeResp . contains ( "If<seq2seq4repair_space>you're<seq2seq4repair_space>bored,<seq2seq4repair_space>write<seq2seq4repair_space>a<seq2seq4repair_space>story!<seq2seq4repair_space>Here's<seq2seq4repair_space>a<seq2seq4repair_space>prompt" ) ) ) { response = "If<seq2seq4repair_space>you're<seq2seq4repair_space>bored,<seq2seq4repair_space>write<seq2seq4repair_space>a<seq2seq4repair_space>story!<seq2seq4repair_space>Here's<seq2seq4repair_space>a<seq2seq4repair_space>prompt:<seq2seq4repair_space>" + idea ; } else { response = "Here's<seq2seq4repair_space>another<seq2seq4repair_space>prompt:<seq2seq4repair_space>" + idea ; } } else <START_BUG> if ( prompt . contains ( "ideas" ) ) { <END_BUG> if ( ! ( prevPhoebeResp . contains ( "If<seq2seq4repair_space>you<seq2seq4repair_space>need<seq2seq4repair_space>an<seq2seq4repair_space>idea,<seq2seq4repair_space>here's<seq2seq4repair_space>a<seq2seq4repair_space>prompt" ) ) ) { response = "If<seq2seq4repair_space>you<seq2seq4repair_space>need<seq2seq4repair_space>an<seq2seq4repair_space>idea,<seq2seq4repair_space>here's<seq2seq4repair_space>a<seq2seq4repair_space>prompt:<seq2seq4repair_space>" + idea ; } else { response = "Here's<seq2seq4repair_space>another<seq2seq4repair_space>prompt:<seq2seq4repair_space>" + idea ; } } out ( response , true ) ; prevPhoebeResp = response ; } private void programOpenAlgorithm ( String prompt ) { } private void siteCloseAlgorithm ( String prompt ) { } private void googleSearch ( String prompt ) { } private void openProgram ( String path , boolean web ) { } private void closeBrowsers ( ) { } private void out ( String phrase , boolean phoebe ) { } private List < Phoebe . Keyword > readFile ( String filename ) { } private void saveFile ( List < Phoebe . Keyword > list , String filename ) { } public static void main ( String [ ] args ) { } }

Fix:
if ( ( prompt . contains ( "idea" ) ) || ( prompt . contains ( "block" ) ) ) {