Program: 29058
Project: 29058
Buggy source:
public List listJMSDestinations(String tgtName,String destType) throws Exception {
  logger.log(Level.FINE,"String_Node_Str");
  MQJMXConnectorInfo mqInfo=getMQJMXConnectorInfo(target,config,serverContext,domain,connectorRuntime);
  try {
    MBeanServerConnection mbsc=mqInfo.getMQMBeanServerConnection();
    ObjectName on=new ObjectName(DESTINATION_MANAGER_CONFIG_MBEAN_NAME);
    String[] signature=null;
    Object[] params=null;
    ObjectName[] dests=(ObjectName[])mbsc.invoke(on,"String_Node_Str",params,signature);
    if ((dests != null) && (dests.length > 0)) {
      List<JMSDestinationInfo> jmsdi=new ArrayList<JMSDestinationInfo>();
      for (int i=0; i < dests.length; i++) {
        on=dests[i];
        String jdiType=toStringLabel(on.getKeyProperty("String_Node_Str"));
        String jdiName=on.getKeyProperty("String_Node_Str");
        if ((jdiName != null) && (jdiName.length() > 1)) {
          if (jdiName.indexOf('"') == 0) {
            jdiName=jdiName.substring(1);
          }
          if (jdiName.lastIndexOf('"') == (jdiName.length() - 1)) {
            jdiName=jdiName.substring(0,jdiName.lastIndexOf('"'));
          }
        }
        JMSDestinationInfo jdi=new JMSDestinationInfo(jdiName,jdiType);
        if (destType == null) {
          jmsdi.add(jdi);
        }
 else         if (destType.equals(JMS_DEST_TYPE_TOPIC) || destType.equals(JMS_DEST_TYPE_QUEUE)) {
          if (jdiType.equalsIgnoreCase(destType)) {
            jmsdi.add(jdi);
          }
        }
      }
      return jmsdi;
    }
  }
 catch (  Exception e) {
    logAndHandleException(e,"String_Node_Str");
  }
 finally {
    try {
      if (mqInfo != null) {
        mqInfo.closeMQMBeanServerConnection();
      }
    }
 catch (    Exception e) {
      handleException(e);
    }
  }
  return null;
}

Fixed version (ground truth):
public List listJMSDestinations(String tgtName,String destType) throws Exception {
  logger.log(Level.FINE,"String_Node_Str");
  MQJMXConnectorInfo mqInfo=getMQJMXConnectorInfo(target,config,serverContext,domain,connectorRuntime);
  try {
    MBeanServerConnection mbsc=mqInfo.getMQMBeanServerConnection();
    ObjectName on=new ObjectName(DESTINATION_MANAGER_CONFIG_MBEAN_NAME);
    ObjectName[] dests=(ObjectName[])mbsc.invoke(on,"String_Node_Str",null,null);
    if ((dests != null) && (dests.length > 0)) {
      List<JMSDestinationInfo> jmsdi=new ArrayList<JMSDestinationInfo>();
      for (int i=0; i < dests.length; i++) {
        on=dests[i];
        String jdiType=toStringLabel(on.getKeyProperty("String_Node_Str"));
        String jdiName=on.getKeyProperty("String_Node_Str");
        if ((jdiName != null) && (jdiName.length() > 1)) {
          if (jdiName.indexOf('"') == 0) {
            jdiName=jdiName.substring(1);
          }
          if (jdiName.lastIndexOf('"') == (jdiName.length() - 1)) {
            jdiName=jdiName.substring(0,jdiName.lastIndexOf('"'));
          }
        }
        JMSDestinationInfo jdi=new JMSDestinationInfo(jdiName,jdiType);
        if (destType == null) {
          jmsdi.add(jdi);
        }
 else         if (destType.equals(JMS_DEST_TYPE_TOPIC) || destType.equals(JMS_DEST_TYPE_QUEUE)) {
          if (jdiType.equalsIgnoreCase(destType)) {
            jmsdi.add(jdi);
          }
        }
      }
      return jmsdi;
    }
  }
 catch (  Exception e) {
    logAndHandleException(e,"String_Node_Str");
  }
 finally {
    try {
      if (mqInfo != null) {
        mqInfo.closeMQMBeanServerConnection();
      }
    }
 catch (    Exception e) {
      handleException(e);
    }
  }
  return null;
}