## Summary of duplicated code

This page summarizes the code fragments that have been found to be replicated in the code. Only those fragments longer than 30 lines of code are shown.

# duplications | Total lines | Total tokens | Approx # bytes
--- | --- | --- | ---
1 | 33 | 239 | 956

You expand and collapse the code fragments using the + buttons. You can also navigate to the source code by clicking on the file names.

ID | Files | Lines
1 |
/home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/RuleReferenceTest.java | line 32
/home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/RuleReferenceTest.java | line 68
| # lines : 33
| public void testOverride() { final StringProperty PROPERTY1_DESCRIPTOR = new StringProperty("property1", "Test property", null, 0f); MockRule rule = new MockRule(); rule.definePropertyDescriptor(PROPERTY1_DESCRIPTOR); rule.setLanguage(LanguageRegistry.getLanguage(Dummy2LanguageModule.NAME)); rule.setName("name1"); rule.setProperty(PROPERTY1_DESCRIPTOR, "value1"); rule.setMessage("message1"); rule.setDescription("description1"); rule.addExample("example1"); rule.setExternalInfoUrl("externalInfoUrl1"); rule.setPriority(RulePriority.HIGH); final StringProperty PROPERTY2_DESCRIPTOR = new StringProperty("property2", "Test property", null, 0f); RuleReference ruleReference = new RuleReference(); ruleReference.setRule(rule); ruleReference.definePropertyDescriptor(PROPERTY2_DESCRIPTOR); ruleReference.setLanguage(LanguageRegistry.getLanguage(DummyLanguageModule.NAME)); ruleReference .setMinimumLanguageVersion(LanguageRegistry.getLanguage(DummyLanguageModule.NAME).getVersion("1.3")); ruleReference .setMaximumLanguageVersion(LanguageRegistry.getLanguage(DummyLanguageModule.NAME).getVersion("1.7")); ruleReference.setDeprecated(true); ruleReference.setName("name2"); ruleReference.setProperty(PROPERTY1_DESCRIPTOR, "value2"); ruleReference.setProperty(PROPERTY2_DESCRIPTOR, "value3"); ruleReference.setMessage("message2"); ruleReference.setDescription("description2"); ruleReference.addExample("example2"); ruleReference.setExternalInfoUrl("externalInfoUrl2"); ruleReference.setPriority(RulePriority.MEDIUM_HIGH); validateOverriddenValues(PROPERTY1_DESCRIPTOR, PROPERTY2_DESCRIPTOR, ruleReference);