Program: 74140
Project: 74140
Buggy source:
/** 
 * get parameter metadata from database matadata
 */
private java.util.List getCallableParamMetaData(){
  java.util.List paramMetaDataList=new ArrayList();
  try {
    DatabaseMetaData metaData=conn.getMetaData();
    String cataLog=conn.getCatalog();
    String schemaPattern=null;
    ArrayList schemaList=null;
    String columnNamePattern=null;
    String procedureNamePattern=procedureName;
    String packagePattern="String_Node_Str";
    if (procedureName.indexOf("String_Node_Str") > 0) {
      schemaPattern=procedureName.substring(0,procedureName.lastIndexOf("String_Node_Str"));
      procedureNamePattern=procedureName.substring(procedureName.lastIndexOf("String_Node_Str") + 1);
    }
    if (!metaData.supportsCatalogsInProcedureCalls() && schemaPattern != null && schemaPattern.indexOf("String_Node_Str") != -1) {
      packagePattern=schemaPattern.substring(schemaPattern.lastIndexOf("String_Node_Str") + 1);
      schemaPattern=schemaPattern.substring(0,schemaPattern.lastIndexOf("String_Node_Str"));
    }
    if (schemaPattern != null) {
      schemaList=new ArrayList();
      schemaList.add(schemaPattern);
    }
 else {
      java.sql.ResultSet rs=metaData.getSchemas();
      schemaList=createSchemaList(rs);
      rs.close();
    }
    if (schemaList == null || schemaList.size() == 0) {
      if (schemaList == null)       schemaList=new ArrayList();
      schemaList.add("String_Node_Str");
      columnNamePattern="String_Node_Str";
    }
    for (int i=0; i < schemaList.size(); i++) {
      java.sql.ResultSet rs=null;
      if (packagePattern.trim().length() > 0)       rs=metaData.getProcedureColumns(packagePattern,schemaList.get(i).toString(),procedureNamePattern,columnNamePattern);
 else       rs=metaData.getProcedureColumns(cataLog,schemaList.get(i).toString(),procedureNamePattern,columnNamePattern);
      while (rs.next()) {
        ParameterDefn p=new ParameterDefn();
        p.setParamName(rs.getString("String_Node_Str"));
        p.setParamInOutType(rs.getInt("String_Node_Str"));
        p.setParamType(rs.getInt("String_Node_Str"));
        p.setParamTypeName(rs.getString("String_Node_Str"));
        p.setPrecision(rs.getInt("String_Node_Str"));
        p.setScale(rs.getInt("String_Node_Str"));
        p.setIsNullable(rs.getInt("String_Node_Str"));
        if (p.getParamType() == Types.OTHER)         correctParamType(p);
        if (p.getParamInOutType() != 5)         paramMetaDataList.add(p);
      }
      rs.close();
    }
  }
 catch (  SQLException e) {
  }
  return paramMetaDataList;
}

Fixed version (ground truth):
/** 
 * get parameter metadata from database matadata
 */
private java.util.List getCallableParamMetaData(){
  java.util.List paramMetaDataList=new ArrayList();
  try {
    DatabaseMetaData metaData=conn.getMetaData();
    String cataLog=conn.getCatalog();
    ArrayList schemaList=null;
    String columnNamePattern=null;
    String procedureNamePattern=this.paramUtil.getProcedureName();
    String packagePattern="String_Node_Str";
    String schemaPattern=this.paramUtil.getSchemaName();
    if (!metaData.supportsCatalogsInProcedureCalls()) {
      packagePattern=this.paramUtil.getPackageName();
    }
    if (schemaPattern != null) {
      schemaList=new ArrayList();
      schemaList.add(schemaPattern);
    }
 else {
      java.sql.ResultSet rs=metaData.getSchemas();
      schemaList=createSchemaList(rs);
      rs.close();
    }
    if (schemaList == null || schemaList.size() == 0) {
      if (schemaList == null)       schemaList=new ArrayList();
      schemaList.add("String_Node_Str");
      columnNamePattern="String_Node_Str";
    }
    for (int i=0; i < schemaList.size(); i++) {
      java.sql.ResultSet rs=null;
      if (packagePattern.trim().length() > 0)       rs=metaData.getProcedureColumns(packagePattern,schemaList.get(i).toString(),procedureNamePattern,columnNamePattern);
 else       rs=metaData.getProcedureColumns(cataLog,schemaList.get(i).toString(),procedureNamePattern,columnNamePattern);
      while (rs.next()) {
        ParameterDefn p=new ParameterDefn();
        p.setParamName(rs.getString("String_Node_Str"));
        p.setParamInOutType(rs.getInt("String_Node_Str"));
        p.setParamType(rs.getInt("String_Node_Str"));
        p.setParamTypeName(rs.getString("String_Node_Str"));
        p.setPrecision(rs.getInt("String_Node_Str"));
        p.setScale(rs.getInt("String_Node_Str"));
        p.setIsNullable(rs.getInt("String_Node_Str"));
        if (p.getParamType() == Types.OTHER)         correctParamType(p);
        if (p.getParamInOutType() != 5)         paramMetaDataList.add(p);
      }
      rs.close();
    }
  }
 catch (  SQLException e) {
  }
catch (  JDBCException ex) {
  }
  return paramMetaDataList;
}