Program: 39084
Project: 39084
Buggy source:
public void openFile(String filename){
  currentFileName=ctx.getHomeDirectory().getAbsolutePath() + "String_Node_Str" + filename+ "String_Node_Str";
  String text=new String();
  String str;
  try {
    BufferedReader in=new BufferedReader(new FileReader(currentFileName));
    try {
      while ((str=in.readLine()) != null) {
        text=text + str + "String_Node_Str";
      }
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
    try {
      in.close();
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
 catch (  FileNotFoundException e) {
    KOptionPane.showMessageDialog(null,i18n.getString("String_Node_Str"),new MessageDialogListener(){
      public void onClose(){
      }
    }
);
    e.printStackTrace();
    return;
  }
  if (text.startsWith(aes_start)) {
    current_encrypted=true;
    read_only=true;
    tmp_text=text;
    KOptionPane.showInputDialog(ctx.getRootContainer(),i18n.getString("String_Node_Str"),"String_Node_Str",new InputDialogListener(){
      public void onClose(      String arg0){
        if (arg0 == null) {
          current_password=null;
          current_encrypted=false;
          return;
        }
 else         current_password=arg0;
        if (tmp_text.length() < aes_start.length() + 2) {
          tmp_text="String_Node_Str";
          read_only=false;
        }
 else         if (tmp_text != null && current_encrypted)         try {
          tmp_text=tmp_text.substring(aes_start.length(),tmp_text.indexOf("String_Node_Str",aes_start.length()) + 2);
          try {
            String decrypted=new String(decrypt(1,current_password,fromBase64(tmp_text)));
            tmp_text=decrypted;
            read_only=false;
          }
 catch (          Exception e) {
            e.printStackTrace();
            tmp_text=i18n.getString("String_Node_Str");
          }
        }
 catch (        Exception e) {
          e.printStackTrace();
        }
        plainText.setText(tmp_text);
        plainText.repaint();
        textEdit.setText(tmp_text);
        textEdit.repaint();
        tmp_text=null;
      }
    }
);
  }
 else {
    current_encrypted=false;
    current_password=null;
    read_only=false;
  }
  this.newItem.setEnabled(false);
  this.newItem.setEnabled(false);
  ctx.getRootContainer().remove(this.homeMenu);
  ctx.getRootContainer().remove(this.northPanel);
  ctx.getRootContainer().remove(this.pageLabel);
  if (current_encrypted)   plainText.setText(text);
 else   plainText.setText("String_Node_Str");
  ctx.getRootContainer().add(plainText);
  plainText.requestFocus();
  ctx.setSubTitle(filename);
}

Fixed version (ground truth):
public void openFile(String filename){
  currentFileName=ctx.getHomeDirectory().getAbsolutePath() + "String_Node_Str" + filename+ "String_Node_Str";
  String text=new String();
  String str;
  try {
    BufferedReader in=new BufferedReader(new FileReader(currentFileName));
    try {
      while ((str=in.readLine()) != null) {
        text=text + str + "String_Node_Str";
      }
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
    try {
      in.close();
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
 catch (  FileNotFoundException e) {
    KOptionPane.showMessageDialog(null,i18n.getString("String_Node_Str"),new MessageDialogListener(){
      public void onClose(){
      }
    }
);
    e.printStackTrace();
    return;
  }
  if (text.startsWith(aes_start)) {
    current_encrypted=true;
    read_only=true;
    tmp_text=text;
    KOptionPane.showInputDialog(ctx.getRootContainer(),i18n.getString("String_Node_Str"),"String_Node_Str",new InputDialogListener(){
      public void onClose(      String arg0){
        if (arg0 == null) {
          current_password=null;
          current_encrypted=false;
          return;
        }
 else         current_password=arg0;
        if (tmp_text.length() < aes_start.length() + 2) {
          tmp_text="String_Node_Str";
          read_only=false;
        }
 else         if (tmp_text != null && current_encrypted)         try {
          tmp_text=tmp_text.substring(aes_start.length(),tmp_text.indexOf("String_Node_Str",aes_start.length()) + 2);
          try {
            String decrypted=new String(decrypt(1,current_password,fromBase64(tmp_text)));
            tmp_text=decrypted;
            read_only=false;
          }
 catch (          Exception e) {
            e.printStackTrace();
            tmp_text=i18n.getString("String_Node_Str");
          }
        }
 catch (        Exception e) {
          e.printStackTrace();
        }
        plainText.setText(tmp_text);
        plainText.repaint();
        textEdit.setText(tmp_text);
        textEdit.repaint();
        tmp_text=null;
      }
    }
);
  }
 else {
    current_encrypted=false;
    current_password=null;
    read_only=false;
  }
  this.newItem.setEnabled(false);
  this.newItem.setEnabled(false);
  ctx.getRootContainer().remove(this.homeMenu);
  ctx.getRootContainer().remove(this.northPanel);
  ctx.getRootContainer().remove(this.pageLabel);
  if (!current_encrypted)   plainText.setText(text);
 else   plainText.setText("String_Node_Str");
  ctx.getRootContainer().add(plainText);
  plainText.requestFocus();
  ctx.setSubTitle(filename);
}