Buggy code:
public class MapRenderingTypes { private static final Log log = PlatformUtil . getLog ( MapRenderingTypes . class ) ; public static final byte RESTRICTION_NO_RIGHT_TURN = 1 ; public static final byte RESTRICTION_NO_LEFT_TURN = 2 ; public static final byte RESTRICTION_NO_U_TURN = 3 ; public static final byte RESTRICTION_NO_STRAIGHT_ON = 4 ; public static final byte RESTRICTION_ONLY_RIGHT_TURN = 5 ; public static final byte RESTRICTION_ONLY_LEFT_TURN = 6 ; public static final byte RESTRICTION_ONLY_STRAIGHT_ON = 7 ; private static char TAG_DELIMETER = '//' ; private String resourceName = null ; private Map < AmenityType , Map < String , String > > amenityTypeNameToTagVal = null ; private Map < String , AmenityType > amenityNameToType = null ; private Map < String , Map < String , String > > amenityAllTypeNameToTagVal = null ; protected Map < String , MapRenderingTypes . MapRulType > types = null ; protected List < MapRenderingTypes . MapRulType > typeList = new ArrayList < MapRenderingTypes . MapRulType > ( ) ; protected MapRenderingTypes . MapRulType nameRuleType ; protected MapRenderingTypes . MapRulType nameEnRuleType ; public MapRenderingTypes ( String fileName ) { } private static MapRenderingTypes DEFAULT_INSTANCE = null ; public static MapRenderingTypes getDefault ( ) { } public Map < String , MapRenderingTypes . MapRulType > getEncodingRuleTypes ( ) { } protected void checkIfInitNeeded ( ) { } public void getAmenityTagValue ( AmenityType type , String subType , StringBuilder tag , StringBuilder value ) { } private Map < AmenityType , Map < String , String > > getAmenityTypeNameToTagVal ( ) { } private Map < String , Map < String , String > > getAmenityAllTypeNameToTagVal ( ) { } public Collection < Map < String , String > > splitTagsIntoDifferentObjects ( final Map < String , String > tags ) { } protected boolean splitIsNeeded ( final Map < String , String > tags ) { } private Collection < Map < String , String > > splitOpenSeaMapsTags ( final Map < String , String > tags ) { } private String openSeaType ( String value ) { } public Map < String , AmenityType > getAmenityNameToType ( ) { } public Collection < String > getAmenitySubCategories ( AmenityType t ) { } public Collection < String > getAmenityAllSubCategories ( AmenityType t ) { } public MapRenderingTypes . MapRulType getTypeByInternalId ( int id ) { } public MapRenderingTypes . MapRulType getAmenityRuleType ( String tag , String val ) { } private String lc ( String a ) { } protected MapRenderingTypes . MapRulType getRuleType ( String tag , String val , boolean poi ) { } public MapRenderingTypes . MapRulType getNameRuleType ( ) { } public MapRenderingTypes . MapRulType getNameEnRuleType ( ) { } public Map < String , String > getAmenityAdditionalInfo ( Map < String , String > tags , AmenityType type , String subtype ) { } public String getAmenitySubtype ( String tag , String val ) { } public String getAmenitySubtypePrefix ( String tag , String val ) { } public AmenityType getAmenityType ( String tag , String val , boolean hasName ) { } public AmenityType getAmenityTypeForRelation ( String tag , String val , boolean hasName ) { } private AmenityType getAmenityType ( String tag , String val , boolean relation , boolean hasName ) { } protected void init ( ) { } protected void parseRouteTagFromXML ( XmlPullParser parser ) { } protected MapRenderingTypes . MapRulType parseTypeFromXML ( XmlPullParser parser , String parentCategory , String poiParentCategory , String poiParentPrefix , String parentOrder ) { } protected MapRenderingTypes . MapRulType parseBaseRuleType ( XmlPullParser parser , String parentCategory , String poiParentCategory , String poiParentPrefix , String parentOrder , boolean filterOnlyMap ) { } protected MapRenderingTypes . MapRulType registerRuleType ( MapRenderingTypes . MapRulType rt ) { String tag = rt . tagValuePattern . tag ; String val = rt . tagValuePattern . value ; String keyVal = MapRenderingTypes . constructRuleKey ( tag , val ) ; if ( types . containsKey ( keyVal ) ) { MapRenderingTypes . MapRulType mapRulType = types . get ( keyVal ) ; if ( ( mapRulType . isAdditional ( ) ) || ( mapRulType . isText ( ) ) ) { rt . id = mapRulType . id ; if ( ( rt . applyToTagValue ) != null ) { if ( ( mapRulType . applyToTagValue ) == null ) { rt . applyToTagValue = null ; } else { rt . applyToTagValue . addAll ( mapRulType . applyToTagValue ) ; <START_BUG> mapRulType . applyToTagValue . add ( rt . tagValuePattern ) ; <END_BUG> } } else { mapRulType . applyToTagValue = null ; } if ( rt . isMain ( ) ) { mapRulType . main = true ; if ( ( rt . minzoom ) != 0 ) { mapRulType . minzoom = Math . max ( rt . minzoom , mapRulType . minzoom ) ; } if ( ( rt . maxzoom ) != 0 ) { mapRulType . maxzoom = Math . min ( rt . maxzoom , mapRulType . maxzoom ) ; } } return mapRulType ; } else { throw new RuntimeException ( ( "Duplicate<seq2seq4repair_space>" + keyVal ) ) ; } } else { rt . id = types . size ( ) ; types . put ( keyVal , rt ) ; typeList . add ( rt ) ; return rt ; } } protected void parseCategoryFromXml ( XmlPullParser parser , String poiParentCategory , String poiParentPrefix ) { } protected static String constructRuleKey ( String tag , String val ) { } protected static String getTagKey ( String tagValue ) { } protected static String getValueKey ( String tagValue ) { } protected static class TagValuePattern { protected String tag ; protected String value ; protected TagValuePattern ( String t , String v ) { } public boolean isApplicable ( Map < String , String > e ) { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object obj ) { } }

Fix:
mapRulType . applyToTagValue . addAll ( rt . applyToTagValue ) ;