Program: 106400
Project: 106400
Buggy source:
@Override @DB public void updateKeyPairs(){
  String username=System.getProperty("String_Node_Str");
  Boolean devel=Boolean.valueOf(_configDao.getValue("String_Node_Str"));
  if (!username.equalsIgnoreCase("String_Node_Str") || !devel) {
    s_logger.warn("String_Node_Str");
    return;
  }
  String already=_configDao.getValue("String_Node_Str");
  String homeDir=null;
  homeDir=Script.runSimpleBashScript("String_Node_Str" + username);
  if (homeDir == null) {
    throw new CloudRuntimeException("String_Node_Str" + username);
  }
  if (s_logger.isInfoEnabled()) {
    s_logger.info("String_Node_Str");
  }
  if (homeDir != null && homeDir.startsWith("String_Node_Str")) {
    s_logger.error("String_Node_Str" + username + "String_Node_Str");
    throw new CloudRuntimeException("String_Node_Str" + username + "String_Node_Str");
  }
  File privkeyfile=new File(homeDir + "String_Node_Str");
  File pubkeyfile=new File(homeDir + "String_Node_Str");
  if (already == null || already.isEmpty()) {
    if (s_logger.isInfoEnabled()) {
      s_logger.info("String_Node_Str");
    }
    Script.runSimpleBashScript("String_Node_Str" + privkeyfile + "String_Node_Str"+ privkeyfile+ "String_Node_Str"+ privkeyfile+ "String_Node_Str");
    byte[] arr1=new byte[4094];
    try {
      new DataInputStream(new FileInputStream(privkeyfile)).readFully(arr1);
    }
 catch (    EOFException e) {
    }
catch (    Exception e) {
      s_logger.error("String_Node_Str",e);
      throw new CloudRuntimeException("String_Node_Str");
    }
    String privateKey=new String(arr1).trim();
    byte[] arr2=new byte[4094];
    try {
      new DataInputStream(new FileInputStream(pubkeyfile)).readFully(arr2);
    }
 catch (    EOFException e) {
    }
catch (    Exception e) {
      s_logger.warn("String_Node_Str",e);
      throw new CloudRuntimeException("String_Node_Str");
    }
    String publicKey=new String(arr2).trim();
    String insertSql1="String_Node_Str" + "String_Node_Str" + DBEncryptionUtil.encrypt(privateKey) + "String_Node_Str";
    String insertSql2="String_Node_Str" + "String_Node_Str" + DBEncryptionUtil.encrypt(publicKey) + "String_Node_Str";
    Transaction txn=Transaction.currentTxn();
    try {
      PreparedStatement stmt1=txn.prepareAutoCloseStatement(insertSql1);
      stmt1.executeUpdate();
      if (s_logger.isDebugEnabled()) {
        s_logger.debug("String_Node_Str");
      }
    }
 catch (    SQLException ex) {
      s_logger.error("String_Node_Str",ex);
      throw new CloudRuntimeException("String_Node_Str");
    }
    try {
      PreparedStatement stmt2=txn.prepareAutoCloseStatement(insertSql2);
      stmt2.executeUpdate();
      if (s_logger.isDebugEnabled()) {
        s_logger.debug("String_Node_Str");
      }
    }
 catch (    SQLException ex) {
      s_logger.error("String_Node_Str",ex);
      throw new CloudRuntimeException("String_Node_Str");
    }
  }
 else {
    s_logger.info("String_Node_Str");
    if (username.equalsIgnoreCase("String_Node_Str")) {
      s_logger.info("String_Node_Str");
      updateKeyPairsOnDisk(homeDir);
    }
 else {
      s_logger.info("String_Node_Str");
    }
  }
  s_logger.info("String_Node_Str");
  try {
    injectSshKeysIntoSystemVmIsoPatch(pubkeyfile.getAbsolutePath(),privkeyfile.getAbsolutePath());
  }
 catch (  CloudRuntimeException e) {
    if (!devel) {
      throw new CloudRuntimeException(e.getMessage());
    }
  }
}

Fixed version (ground truth):
@Override @DB public void updateKeyPairs(){
  String username=System.getProperty("String_Node_Str");
  Boolean devel=Boolean.valueOf(_configDao.getValue("String_Node_Str"));
  if (!username.equalsIgnoreCase("String_Node_Str") && !devel) {
    s_logger.warn("String_Node_Str");
    return;
  }
  String already=_configDao.getValue("String_Node_Str");
  String homeDir=null;
  homeDir=Script.runSimpleBashScript("String_Node_Str" + username);
  if (homeDir == null) {
    throw new CloudRuntimeException("String_Node_Str" + username);
  }
  if (s_logger.isInfoEnabled()) {
    s_logger.info("String_Node_Str");
  }
  if (homeDir != null && homeDir.startsWith("String_Node_Str")) {
    s_logger.error("String_Node_Str" + username + "String_Node_Str");
    throw new CloudRuntimeException("String_Node_Str" + username + "String_Node_Str");
  }
  File privkeyfile=new File(homeDir + "String_Node_Str");
  File pubkeyfile=new File(homeDir + "String_Node_Str");
  if (already == null || already.isEmpty()) {
    if (s_logger.isInfoEnabled()) {
      s_logger.info("String_Node_Str");
    }
    Script.runSimpleBashScript("String_Node_Str" + privkeyfile + "String_Node_Str"+ privkeyfile+ "String_Node_Str"+ privkeyfile+ "String_Node_Str");
    byte[] arr1=new byte[4094];
    try {
      new DataInputStream(new FileInputStream(privkeyfile)).readFully(arr1);
    }
 catch (    EOFException e) {
    }
catch (    Exception e) {
      s_logger.error("String_Node_Str",e);
      throw new CloudRuntimeException("String_Node_Str");
    }
    String privateKey=new String(arr1).trim();
    byte[] arr2=new byte[4094];
    try {
      new DataInputStream(new FileInputStream(pubkeyfile)).readFully(arr2);
    }
 catch (    EOFException e) {
    }
catch (    Exception e) {
      s_logger.warn("String_Node_Str",e);
      throw new CloudRuntimeException("String_Node_Str");
    }
    String publicKey=new String(arr2).trim();
    String insertSql1="String_Node_Str" + "String_Node_Str" + DBEncryptionUtil.encrypt(privateKey) + "String_Node_Str";
    String insertSql2="String_Node_Str" + "String_Node_Str" + DBEncryptionUtil.encrypt(publicKey) + "String_Node_Str";
    Transaction txn=Transaction.currentTxn();
    try {
      PreparedStatement stmt1=txn.prepareAutoCloseStatement(insertSql1);
      stmt1.executeUpdate();
      if (s_logger.isDebugEnabled()) {
        s_logger.debug("String_Node_Str");
      }
    }
 catch (    SQLException ex) {
      s_logger.error("String_Node_Str",ex);
      throw new CloudRuntimeException("String_Node_Str");
    }
    try {
      PreparedStatement stmt2=txn.prepareAutoCloseStatement(insertSql2);
      stmt2.executeUpdate();
      if (s_logger.isDebugEnabled()) {
        s_logger.debug("String_Node_Str");
      }
    }
 catch (    SQLException ex) {
      s_logger.error("String_Node_Str",ex);
      throw new CloudRuntimeException("String_Node_Str");
    }
  }
 else {
    s_logger.info("String_Node_Str");
    if (username.equalsIgnoreCase("String_Node_Str")) {
      s_logger.info("String_Node_Str");
      updateKeyPairsOnDisk(homeDir);
    }
 else {
      s_logger.info("String_Node_Str");
    }
  }
  s_logger.info("String_Node_Str");
  try {
    injectSshKeysIntoSystemVmIsoPatch(pubkeyfile.getAbsolutePath(),privkeyfile.getAbsolutePath());
  }
 catch (  CloudRuntimeException e) {
    if (!devel) {
      throw new CloudRuntimeException(e.getMessage());
    }
  }
}