CPD Results

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

Duplications

FileLine
org/jdtaus/mojo/resource/model/ModelManager.java155
org/jdtaus/mojo/resource/model/ModelManager.java188
                bundleHash = 37 * bundleHash + message.getName().hashCode();

                for ( final Iterator t = message.getTemplate().getText().
                    iterator(); t.hasNext(); )
                {
                    final Text text = (Text) t.next();
                    bundleHash = 37 * bundleHash + text.getLanguage().hashCode();
                    bundleHash = 37 * bundleHash + text.getValue().hashCode();
                }

                if ( message.getArguments() != null )
                {
                    for ( final Iterator a = message.getArguments().
                        getArgument().iterator(); a.hasNext(); )
                    {
                        final Argument argument = (Argument) a.next();
                        bundleHash = 37 * bundleHash + argument.getName().
                            hashCode();

                        bundleHash = 37 * bundleHash + argument.getType().
                            toString().hashCode();

                    }
                }
            }
FileLine
org/jdtaus/mojo/resource/model/ModelManager.java250
org/jdtaus/mojo/resource/model/ModelManager.java279
                final Message message = (Message) it.next();
                for ( final Iterator t = message.getTemplate().getText().
                    iterator(); t.hasNext(); )
                {
                    final Text text = (Text) t.next();
                    final String language = text.getLanguage().toLowerCase();

                    Properties bundleProperties =
                        (Properties) properties.get( language );

                    if ( bundleProperties == null )
                    {
                        bundleProperties = new Properties();
                        properties.put( language, bundleProperties );
                    }

                    bundleProperties.setProperty( message.getName(),
                        text.getValue() );

                }
            }