Program: 48764
Project: 48764
Buggy source:
private String getMaprActiveJobTrackerIp(final String maprNodeIP,final String clusterName){
  String activeJobTrackerIp="String_Node_Str";
  String errorMsg="String_Node_Str";
  JSch jsch=new JSch();
  String sshUser=Configuration.getString("String_Node_Str","String_Node_Str");
  int sshPort=Configuration.getInt("String_Node_Str",22);
  String prvKeyFile=Configuration.getString("String_Node_Str","String_Node_Str");
  ChannelExec channel=null;
  try {
    Session session=jsch.getSession(sshUser,maprNodeIP,sshPort);
    jsch.addIdentity(prvKeyFile);
    java.util.Properties config=new java.util.Properties();
    config.put("String_Node_Str","String_Node_Str");
    session.setConfig(config);
    session.setTimeout(15000);
    session.connect();
    logger.debug("String_Node_Str");
    channel=(ChannelExec)session.openChannel("String_Node_Str");
    if (channel != null) {
      logger.debug("String_Node_Str");
      StringBuffer buff=new StringBuffer();
      String cmd="String_Node_Str";
      logger.debug("String_Node_Str" + cmd);
      channel.setPty(true);
      channel.setCommand("String_Node_Str" + cmd);
      BufferedReader in=new BufferedReader(new InputStreamReader(channel.getInputStream()));
      channel.connect();
      if (!canChannelConnect(channel)) {
        errorMsg="String_Node_Str";
        logger.error(errorMsg);
        throw BddException.INTERNAL(null,errorMsg);
      }
      while (true) {
        String line=in.readLine();
        buff.append(line);
        logger.debug("String_Node_Str" + line);
        if (channel.isClosed()) {
          int exitStatus=channel.getExitStatus();
          logger.debug("String_Node_Str" + exitStatus);
          break;
        }
      }
      in.close();
      Pattern ipPattern=Pattern.compile(Constants.IP_PATTERN);
      Matcher matcher=ipPattern.matcher(buff.toString());
      if (matcher.find()) {
        activeJobTrackerIp=matcher.group();
      }
 else {
        errorMsg="String_Node_Str" + clusterName;
        logger.error(errorMsg);
        throw BddException.INTERNAL(null,errorMsg);
      }
    }
 else {
      errorMsg="String_Node_Str";
      logger.error(errorMsg);
      throw BddException.INTERNAL(null,errorMsg);
    }
  }
 catch (  JSchException e) {
    errorMsg="String_Node_Str" + e.getMessage();
    logger.error(errorMsg);
    throw BddException.INTERNAL(null,errorMsg);
  }
catch (  IOException e) {
    errorMsg="String_Node_Str" + e.getMessage();
    logger.error(errorMsg);
    throw BddException.INTERNAL(null,errorMsg);
  }
 finally {
    channel.disconnect();
  }
  return activeJobTrackerIp;
}

Fixed version (ground truth):
private String getMaprActiveJobTrackerIp(final String maprNodeIP,final String clusterName){
  String activeJobTrackerIp="String_Node_Str";
  String errorMsg="String_Node_Str";
  JSch jsch=new JSch();
  String sshUser=Configuration.getString("String_Node_Str","String_Node_Str");
  int sshPort=Configuration.getInt("String_Node_Str",22);
  String prvKeyFile=Configuration.getString("String_Node_Str","String_Node_Str");
  Session session=null;
  ChannelExec channel=null;
  BufferedReader in=null;
  try {
    session=jsch.getSession(sshUser,maprNodeIP,sshPort);
    jsch.addIdentity(prvKeyFile);
    java.util.Properties config=new java.util.Properties();
    config.put("String_Node_Str","String_Node_Str");
    session.setConfig(config);
    session.setTimeout(15000);
    session.connect();
    logger.debug("String_Node_Str");
    channel=(ChannelExec)session.openChannel("String_Node_Str");
    if (channel != null) {
      logger.debug("String_Node_Str");
      StringBuffer buff=new StringBuffer();
      String cmd="String_Node_Str";
      logger.debug("String_Node_Str" + cmd);
      channel.setPty(true);
      channel.setCommand("String_Node_Str" + cmd);
      in=new BufferedReader(new InputStreamReader(channel.getInputStream()));
      channel.connect();
      if (!canChannelConnect(channel)) {
        errorMsg="String_Node_Str";
        logger.error(errorMsg);
        throw BddException.INTERNAL(null,errorMsg);
      }
      while (true) {
        String line=in.readLine();
        buff.append(line);
        logger.debug("String_Node_Str" + line);
        if (channel.isClosed()) {
          int exitStatus=channel.getExitStatus();
          logger.debug("String_Node_Str" + exitStatus);
          break;
        }
      }
      Pattern ipPattern=Pattern.compile(Constants.IP_PATTERN);
      Matcher matcher=ipPattern.matcher(buff.toString());
      if (matcher.find()) {
        activeJobTrackerIp=matcher.group();
      }
 else {
        errorMsg="String_Node_Str" + clusterName;
        logger.error(errorMsg);
        throw BddException.INTERNAL(null,errorMsg);
      }
    }
 else {
      errorMsg="String_Node_Str";
      logger.error(errorMsg);
      throw BddException.INTERNAL(null,errorMsg);
    }
  }
 catch (  JSchException e) {
    errorMsg="String_Node_Str" + e.getMessage();
    logger.error(errorMsg);
    throw BddException.INTERNAL(null,errorMsg);
  }
catch (  IOException e) {
    errorMsg="String_Node_Str" + e.getMessage();
    logger.error(errorMsg);
    throw BddException.INTERNAL(null,errorMsg);
  }
 finally {
    if (channel != null && channel.isConnected()) {
      channel.disconnect();
    }
    if (session != null && session.isConnected()) {
      session.disconnect();
    }
    if (in != null) {
      try {
        in.close();
      }
 catch (      IOException e) {
        errorMsg="String_Node_Str" + e.getMessage();
        logger.error(errorMsg);
      }
    }
  }
  return activeJobTrackerIp;
}