System.out.println( "Regex prefix = " + l_prefix ) ;
if (log.isDebugEnabled()) log.debug( "Regex prefix = " + l_prefix ) ;
    public boolean doScan( String a_key, String a_scanType )    {        if ( a_key == null || a_key.trim().equals( "" ) )         {            a_key = null ;        }        if ( a_key == null && a_scanType != DEFAULT_CURSOR )         {            JOptionPane.showMessageDialog( null, "Cannot use a " +                a_scanType + " scan type with a null key constraint.",                "Missing Key Constraint", JOptionPane.ERROR_MESSAGE ) ;            return false ;        }        try         {            NamingEnumeration l_list = null ;            if ( a_scanType == EQUALITY_CURSOR )             {                l_list = m_index.listIndices( a_key ) ;            }             else if ( a_scanType == GREATER_CURSOR )             {                l_list = m_index.listIndices( a_key, true ) ;            }             else if ( a_scanType == LESS_CURSOR )             {                l_list = m_index.listIndices( a_key, false ) ;            }             else if ( a_scanType == REGEX_CURSOR )             {                RE l_regex = StringTools.getRegex( a_key ) ;                int l_starIndex = a_key.indexOf( '*' ) ;                if ( l_starIndex > 0 )                 {                    String l_prefix = a_key.substring( 0, l_starIndex ) ;                    System.out.println( "Regex prefix = " + l_prefix ) ;                    l_list = m_index.listIndices( l_regex, l_prefix ) ;                }                 else                 {                    l_list = m_index.listIndices( l_regex ) ;                }            }             else             {                l_list = m_index.listIndices() ;            }            Object [] l_cols = new Object [2] ;            Object [] l_row = null ;            l_cols[0] = "Keys ( Attribute Value )" ;            l_cols[1] = "Values ( Entry Id )" ;            DefaultTableModel l_model = new DefaultTableModel( l_cols, 0 ) ;            int l_count = 0 ;            while( l_list.hasMore() )            {                IndexRecord l_rec = ( IndexRecord ) l_list.next() ;                l_row = new Object [2] ;                l_row[0] = l_rec.getIndexKey() ;                l_row[1] = l_rec.getEntryId() ;                l_model.addRow( l_row ) ;                l_count++ ;            }            m_resultsTbl.setModel( l_model ) ;            m_resultsPnl.setBorder(                javax.swing.BorderFactory.createTitledBorder(                javax.swing.BorderFactory.createLineBorder(                new java.awt.Color( 153, 153, 153 ), 1 ),                "Scan Results: " + l_count,                javax.swing.border.TitledBorder.LEADING,                javax.swing.border.TitledBorder.TOP,                new java.awt.Font( "SansSerif", 0, 14 ),                new java.awt.Color( 60, 60, 60 ) ) ) ;            if ( isVisible() )             {                validate() ;            }        }         catch ( Exception e )         {            String l_msg = ExceptionUtils.getStackTrace( e );            if ( l_msg.length() > 1024 )             {                l_msg = l_msg.substring( 0, 1024 )                    + "\n. . . TRUNCATED . . ." ;            }            l_msg = "Error while scanning index "                + "on attribute " + m_index.getAttribute() + " using a "                + a_scanType + " cursor type with a key constraint of '"                + a_key + "':\n" + l_msg ;                            JTextArea l_area = new JTextArea() ;            l_area.setText( l_msg ) ;            JOptionPane.showMessageDialog( null, l_area, "Index Scan Error",                    JOptionPane.ERROR_MESSAGE ) ;            return false ;        }        return true ;    }