CPD Results

The following document contains the results of PMD's CPD 5.2.1.

Duplications

File Line
org/jdtaus/banking/util/swing/BankleitzahlTextField.java 132
org/jdtaus/banking/util/swing/KontonummerTextField.java 119
org/jdtaus/banking/util/swing/Referenznummer10TextField.java 119
org/jdtaus/banking/util/swing/Referenznummer11TextField.java 120
                                        Bankleitzahl.parse( b.toString() );
                                    }
                                    catch ( ParseException e )
                                    {
                                        invalidEdit();
                                        return;
                                    }
                                }

                                super.insertString( fb, o, s, a );
                            }

                            public void replace( final FilterBypass fb, final int o, final int l, String s,
                                                 final AttributeSet a ) throws BadLocationException
                            {
                                if ( isValidating() )
                                {
                                    final StringBuffer b = new StringBuffer(
                                        fb.getDocument().getText( 0, fb.getDocument().getLength() ) );

                                    b.delete( o, o + l );

                                    if ( s != null )
                                    {
                                        b.insert( o, s );
                                    }

                                    try
                                    {
File Line
org/jdtaus/banking/util/swing/Referenznummer10TextField.java 96
org/jdtaus/banking/util/swing/Referenznummer11TextField.java 97
                            final Referenznummer10 ref = (Referenznummer10) value;
                            ret = ref.format( getFormat() );
                        }

                        return ret;
                    }

                    protected DocumentFilter getDocumentFilter()
                    {
                        return new DocumentFilter()
                        {

                            public void insertString( final FilterBypass fb, final int o, String s,
                                                      final AttributeSet a ) throws BadLocationException
                            {
                                if ( isValidating() )
                                {
                                    final StringBuffer b = new StringBuffer( fb.getDocument().getLength() + s.length() );
                                    b.append( fb.getDocument().getText( 0, fb.getDocument().getLength() ) );
                                    b.insert( o, s );

                                    try
                                    {
File Line
org/jdtaus/banking/util/swing/BankleitzahlTextField.java 110
org/jdtaus/banking/util/swing/KontonummerTextField.java 97
org/jdtaus/banking/util/swing/Referenznummer10TextField.java 97
org/jdtaus/banking/util/swing/Referenznummer11TextField.java 98
                            ret = blz.format( getFormat() );
                        }

                        return ret;
                    }

                    protected DocumentFilter getDocumentFilter()
                    {
                        return new DocumentFilter()
                        {

                            public void insertString( final FilterBypass fb, final int o, String s,
                                                      final AttributeSet a ) throws BadLocationException
                            {
                                if ( isValidating() )
                                {
                                    final StringBuffer b = new StringBuffer( fb.getDocument().getLength() + s.length() );
                                    b.append( fb.getDocument().getText( 0, fb.getDocument().getLength() ) );
                                    b.insert( o, s );

                                    try
                                    {