Program: 75795
Project: 75795
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;
    if (procedureName.indexOf("String_Node_Str") > 0) {
      schemaPattern=procedureName.substring(0,procedureName.indexOf("String_Node_Str"));
      procedureNamePattern=procedureName.substring(procedureName.indexOf("String_Node_Str") + 1);
    }
    if (schemaPattern != null) {
      schemaList=new ArrayList();
      schemaList.add(schemaPattern);
    }
 else {
      schemaList=createSchemaList(metaData.getSchemas());
    }
    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=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);
      }
    }
  }
 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();
    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.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 {
      schemaList=createSchemaList(metaData.getSchemas());
    }
    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);
      }
    }
  }
 catch (  SQLException e) {
  }
  return paramMetaDataList;
}