Found from [#1248].
If a rule reference also specifies the name and the name is different, then the referenced rule should not be changed. Otherwise the reference doesn't work anymore.
Example:
<?xml version="1.0" encoding="UTF-8"?>
<ruleset xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="pmd-eclipse"
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd">
<description>PMD Plugin preferences rule set</description>
<rule name="ChangedNameReplaceHashtableWithMap"
ref="rulesets/java/migrating.xml/ReplaceHashtableWithMap">
</rule>
</ruleset>
Importing this ruleset in eclipse will change the rule to:
<rule name="ChangedNameReplaceHashtableWithMap"
ref="rulesets/java/migrating.xml/ChangedNameReplaceHashtableWithMap">
</rule>
But "rulesets/java/migrating.xml/ChangedNameReplaceHashtableWithMap" doesn't exist.