CPD Results
The following document contains the results of PMD's CPD 5.2.3.
Duplications
File |
Line |
org/jomc/model/modlet/DefaultModelValidator.java |
1400 |
org/jomc/model/modlet/DefaultModelValidator.java |
3343 |
moduleOfImpl.getName(), m.getName(), t.getLanguage(),
message != null && message.length() > 0 ? " " + message : "" );
}
if ( validationContext.isValidateJava() )
{
try
{
new MessageFormat( t.getValue(), new Locale( t.getLanguage() ) );
}
catch ( final IllegalArgumentException e )
{
final String message = getMessage( e );
if ( validationContext.getModelContext().isLoggable( Level.FINE ) )
{
validationContext.getModelContext().log( Level.FINE, message, e );
}
addDetail( validationContext.getReport(), |
File |
Line |
org/jomc/model/modlet/DefaultModelValidator.java |
1466 |
org/jomc/model/modlet/DefaultModelValidator.java |
1612 |
moduleOfImpl.getName(), m.getName(),
overriddenImplementation.getIdentifier(),
moduleOfMessage.getName(), getNodePathString( overriddenMessage ) );
}
}
retainFinalNodes( overriddenMessages );
for ( final InheritanceModel.Node<Message> overriddenMessage : overriddenMessages )
{
Implementation overriddenImplementation = overriddenMessage.getImplementation();
if ( overriddenMessage.getClassDeclaration() != null )
{
overriddenImplementation = overriddenMessage.getClassDeclaration();
}
final Module moduleOfMessage = validationContext.getModuleOfImplementation(
overriddenImplementation.getIdentifier() );
addDetail( validationContext.getReport(),
"IMPLEMENTATION_MESSAGE_INHERITANCE_CONSTRAINT",
Level.SEVERE, new ObjectFactory().createImplementation( impl ),
"implementationMessageFinalConstraint", impl.getIdentifier(),
moduleOfImpl.getName(), m.getName(), |
File |
Line |
org/jomc/model/modlet/DefaultModelValidator.java |
552 |
org/jomc/model/modlet/DefaultModelValidator.java |
1400 |
org/jomc/model/modlet/DefaultModelValidator.java |
3344 |
"moduleMessageTemplateMimeTypeConstraint", m.getName(), msg.getName(),
t.getLanguage(),
message != null && message.length() > 0 ? " " + message : "" );
}
if ( validationContext.isValidateJava() )
{
try
{
new MessageFormat( t.getValue(), new Locale( t.getLanguage() ) );
}
catch ( final IllegalArgumentException e )
{
final String message = getMessage( e );
if ( validationContext.getModelContext().isLoggable( Level.FINE ) )
{
validationContext.getModelContext().log( Level.FINE, message, e );
}
addDetail( validationContext.getReport(), "MODULE_MESSAGE_TEMPLATE_CONSTRAINT", |
File |
Line |
org/jomc/model/modlet/DefaultModelProcessor.java |
156 |
org/jomc/model/modlet/DefaultModelProvider.java |
190 |
public DefaultModelProcessor()
{
super();
}
/**
* Gets a flag indicating the processor is enabled by default.
* <p>
* The default enabled flag is controlled by system property
* {@code org.jomc.model.modlet.DefaultModelProcessor.defaultEnabled} holding a value indicating the processor is
* enabled by default. If that property is not set, the {@code true} default is returned.
* </p>
*
* @return {@code true}, if the processor is enabled by default; {@code false}, if the processor is disabled by
* default.
*
* @see #setDefaultEnabled(java.lang.Boolean)
*/
public static boolean isDefaultEnabled()
{
if ( defaultEnabled == null )
{
defaultEnabled =
Boolean.valueOf( System.getProperty( DEFAULT_ENABLED_PROPERTY_NAME,
System.getProperty( DEPRECATED_DEFAULT_ENABLED_PROPERTY_NAME,
Boolean.toString( DEFAULT_ENABLED ) ) ) );
}
return defaultEnabled;
}
/**
* Sets the flag indicating the processor is enabled by default.
*
* @param value The new value of the flag indicating the processor is enabled by default or {@code null}.
*
* @see #isDefaultEnabled()
*/
public static void setDefaultEnabled( final Boolean value )
{
defaultEnabled = value;
}
/**
* Gets a flag indicating the processor is enabled.
*
* @return {@code true}, if the processor is enabled; {@code false}, if the processor is disabled.
*
* @see #isDefaultEnabled()
* @see #setEnabled(java.lang.Boolean)
*/
public final boolean isEnabled()
{
if ( this.enabled == null )
{
this.enabled = isDefaultEnabled();
}
return this.enabled;
}
/**
* Sets the flag indicating the processor is enabled.
*
* @param value The new value of the flag indicating the processor is enabled or {@code null}.
*
* @see #isEnabled()
*/
public final void setEnabled( final Boolean value )
{
this.enabled = value;
}
/**
* Gets the default location searched for transformer resources.
* <p>
* The default transformer location is controlled by system property
* {@code org.jomc.model.modlet.DefaultModelProcessor.defaultTransformerLocation} holding the location to search for
* transformer resources by default. If that property is not set, the {@code META-INF/jomc.xsl} default is
* returned.
* </p>
*
* @return The location searched for transformer resources by default.
*
* @see #setDefaultTransformerLocation(java.lang.String)
*/
public static String getDefaultTransformerLocation() |
File |
Line |
org/jomc/model/modlet/DefaultModelValidator.java |
1449 |
org/jomc/model/modlet/DefaultModelValidator.java |
1595 |
if ( !( m.isOverride() || overriddenMessages.isEmpty() ) )
{
for ( final InheritanceModel.Node<Message> overriddenMessage : overriddenMessages )
{
Implementation overriddenImplementation = overriddenMessage.getImplementation();
if ( overriddenMessage.getClassDeclaration() != null )
{
overriddenImplementation = overriddenMessage.getClassDeclaration();
}
final Module moduleOfMessage =
validationContext.getModuleOfImplementation(
overriddenImplementation.getIdentifier() );
addDetail( validationContext.getReport(), "IMPLEMENTATION_MESSAGE_OVERRIDE_WARNING",
Level.WARNING, new ObjectFactory().createImplementation( impl ),
"implementationMessageOverrideWarning", impl.getIdentifier(),
moduleOfImpl.getName(), m.getName(), |
File |
Line |
org/jomc/model/modlet/DefaultModelValidator.java |
808 |
org/jomc/model/modlet/DefaultModelValidator.java |
1786 |
org/jomc/model/modlet/DefaultModelValidator.java |
3031 |
org/jomc/model/modlet/DefaultModelValidator.java |
3598 |
"modulePropertyJavaVariableNameConstraint", m.getName(), p.getName(),
message != null && message.length() > 0 ? " " + message : "" );
}
try
{
p.getJavaValue( validationContext.getModelContext().getClassLoader() );
}
catch ( final ModelObjectException e )
{
final String message = getMessage( e );
if ( validationContext.getModelContext().isLoggable( Level.FINE ) )
{
validationContext.getModelContext().log( Level.FINE, message, e );
}
addDetail( validationContext.getReport(), "MODULE_PROPERTY_JAVA_VALUE_CONSTRAINT", |