Program: 9188
Project: 9188
Buggy source:
/** 
 * Constructs a new   {@link org.forgerock.openam.rest.resource.CrestRealmRouter} with routes to each of the CRESTresource endpoints.
 * @return A {@code RealmRouter}.
 */
private CrestRouter createResourceRouter(final Set<String> invalidRealmNames){
  FluentRouter rootRealmRouterDelegate=InjectorHolder.getInstance(LoggingFluentRouter.class);
  FluentRouter rootRealmRouter=new RealmBlackListingFluentRouter(rootRealmRouterDelegate,invalidRealmNames);
  FluentRealmRouter dynamicRealmRouter=rootRealmRouter.dynamically();
  dynamicRealmRouter.route("String_Node_Str").forVersion("String_Node_Str").to(DashboardResource.class);
  dynamicRealmRouter.route("String_Node_Str").forVersion("String_Node_Str").to(ServerInfoResource.class);
  dynamicRealmRouter.route("String_Node_Str").forVersion("String_Node_Str").to(IdentityResourceV1.class,"String_Node_Str").forVersion("String_Node_Str").to(IdentityResourceV2.class,"String_Node_Str");
  dynamicRealmRouter.route("String_Node_Str").forVersion("String_Node_Str").to(IdentityResourceV1.class,"String_Node_Str").forVersion("String_Node_Str").to(IdentityResourceV2.class,"String_Node_Str");
  dynamicRealmRouter.route("String_Node_Str").forVersion("String_Node_Str").to(IdentityResourceV1.class,"String_Node_Str").forVersion("String_Node_Str").to(IdentityResourceV2.class,"String_Node_Str");
  dynamicRealmRouter.route("String_Node_Str").forVersion("String_Node_Str").to(TrustedDevicesResource.class);
  dynamicRealmRouter.route("String_Node_Str").through(ResourceOwnerOrSuperUserAuthzModule.class,ResourceOwnerOrSuperUserAuthzModule.NAME).forVersion("String_Node_Str").to(ResourceSetResource.class);
  dynamicRealmRouter.route("String_Node_Str").through(ResourceOwnerOrSuperUserAuthzModule.class,ResourceOwnerOrSuperUserAuthzModule.NAME).forVersion("String_Node_Str").to(UmaPolicyResource.class);
  dynamicRealmRouter.route("String_Node_Str").forVersion("String_Node_Str").to(AuditHistory.class);
  dynamicRealmRouter.route("String_Node_Str").through(PrivilegeAuthzModule.class,PrivilegeAuthzModule.NAME).forVersion("String_Node_Str").to(PolicyResource.class);
  dynamicRealmRouter.route("String_Node_Str").through(PrivilegeAuthzModule.class,PrivilegeAuthzModule.NAME).forVersion("String_Node_Str").to(ReferralsResourceV1.class);
  dynamicRealmRouter.route("String_Node_Str").through(PrivilegeAuthzModule.class,PrivilegeAuthzModule.NAME).forVersion("String_Node_Str").to(RealmResource.class);
  dynamicRealmRouter.route("String_Node_Str").through(SessionResourceAuthzModule.class,SessionResourceAuthzModule.NAME).forVersion("String_Node_Str").to(SessionResource.class);
  dynamicRealmRouter.route("String_Node_Str").through(PrivilegeAuthzModule.class,PrivilegeAuthzModule.NAME).forVersion("String_Node_Str").to(ApplicationsResource.class);
  dynamicRealmRouter.route("String_Node_Str").through(PrivilegeAuthzModule.class,PrivilegeAuthzModule.NAME).forVersion("String_Node_Str").to(SubjectAttributesResourceV1.class);
  rootRealmRouter.route("String_Node_Str").through(PrivilegeAuthzModule.class,PrivilegeAuthzModule.NAME).forVersion("String_Node_Str").to(ApplicationTypesResource.class);
  dynamicRealmRouter.route("String_Node_Str").through(PrivilegeAuthzModule.class,PrivilegeAuthzModule.NAME).forVersion("String_Node_Str").to(ResourceTypesResource.class);
  rootRealmRouter.route("String_Node_Str").through(PrivilegeAuthzModule.class,PrivilegeAuthzModule.NAME).forVersion("String_Node_Str").to(DecisionCombinersResource.class);
  rootRealmRouter.route("String_Node_Str").through(PrivilegeAuthzModule.class,PrivilegeAuthzModule.NAME).forVersion("String_Node_Str").to(ConditionTypesResource.class);
  rootRealmRouter.route("String_Node_Str").through(PrivilegeAuthzModule.class,PrivilegeAuthzModule.NAME).forVersion("String_Node_Str").to(SubjectTypesResource.class);
  rootRealmRouter.route("String_Node_Str").through(CoreTokenResourceAuthzModule.class,CoreTokenResourceAuthzModule.NAME).forVersion("String_Node_Str").to(CoreTokenResource.class);
  dynamicRealmRouter.route("String_Node_Str").through(AdminOnlyAuthzModule.class,AdminOnlyAuthzModule.NAME).forVersion("String_Node_Str").to(ScriptResource.class);
  VersionBehaviourConfigListener.bindToServiceConfigManager(rootRealmRouter);
  VersionBehaviourConfigListener.bindToServiceConfigManager(dynamicRealmRouter);
  return rootRealmRouterDelegate;
}

Fixed version (ground truth):
/** 
 * Constructs a new   {@link org.forgerock.openam.rest.resource.CrestRealmRouter} with routes to each of the CRESTresource endpoints.
 * @return A {@code RealmRouter}.
 */
private CrestRouter createResourceRouter(final Set<String> invalidRealmNames){
  FluentRouter rootRealmRouterDelegate=InjectorHolder.getInstance(LoggingFluentRouter.class);
  FluentRouter rootRealmRouter=new RealmBlackListingFluentRouter(rootRealmRouterDelegate,invalidRealmNames);
  FluentRealmRouter dynamicRealmRouter=rootRealmRouter.dynamically();
  dynamicRealmRouter.route("String_Node_Str").forVersion("String_Node_Str").to(DashboardResource.class);
  dynamicRealmRouter.route("String_Node_Str").forVersion("String_Node_Str").to(ServerInfoResource.class);
  dynamicRealmRouter.route("String_Node_Str").forVersion("String_Node_Str").to(InjectorHolder.getInstance(UmaConfigurationResource.class));
  dynamicRealmRouter.route("String_Node_Str").forVersion("String_Node_Str").to(IdentityResourceV1.class,"String_Node_Str").forVersion("String_Node_Str").to(IdentityResourceV2.class,"String_Node_Str");
  dynamicRealmRouter.route("String_Node_Str").forVersion("String_Node_Str").to(IdentityResourceV1.class,"String_Node_Str").forVersion("String_Node_Str").to(IdentityResourceV2.class,"String_Node_Str");
  dynamicRealmRouter.route("String_Node_Str").forVersion("String_Node_Str").to(IdentityResourceV1.class,"String_Node_Str").forVersion("String_Node_Str").to(IdentityResourceV2.class,"String_Node_Str");
  dynamicRealmRouter.route("String_Node_Str").forVersion("String_Node_Str").to(TrustedDevicesResource.class);
  dynamicRealmRouter.route("String_Node_Str").through(ResourceOwnerOrSuperUserAuthzModule.class,ResourceOwnerOrSuperUserAuthzModule.NAME).forVersion("String_Node_Str").to(ResourceSetResource.class);
  dynamicRealmRouter.route("String_Node_Str").through(UmaPolicyResourceAuthzFilter.class,UmaPolicyResourceAuthzFilter.NAME).forVersion("String_Node_Str").to(UmaPolicyResource.class);
  dynamicRealmRouter.route("String_Node_Str").through(ResourceOwnerOrSuperUserAuthzModule.class,ResourceOwnerOrSuperUserAuthzModule.NAME).forVersion("String_Node_Str").to(AuditHistory.class);
  dynamicRealmRouter.route("String_Node_Str").through(PrivilegeAuthzModule.class,PrivilegeAuthzModule.NAME).forVersion("String_Node_Str").to(PolicyResource.class);
  dynamicRealmRouter.route("String_Node_Str").through(PrivilegeAuthzModule.class,PrivilegeAuthzModule.NAME).forVersion("String_Node_Str").to(ReferralsResourceV1.class);
  dynamicRealmRouter.route("String_Node_Str").through(PrivilegeAuthzModule.class,PrivilegeAuthzModule.NAME).forVersion("String_Node_Str").to(RealmResource.class);
  dynamicRealmRouter.route("String_Node_Str").through(SessionResourceAuthzModule.class,SessionResourceAuthzModule.NAME).forVersion("String_Node_Str").to(SessionResource.class);
  dynamicRealmRouter.route("String_Node_Str").through(PrivilegeAuthzModule.class,PrivilegeAuthzModule.NAME).forVersion("String_Node_Str").to(ApplicationsResource.class);
  dynamicRealmRouter.route("String_Node_Str").through(PrivilegeAuthzModule.class,PrivilegeAuthzModule.NAME).forVersion("String_Node_Str").to(SubjectAttributesResourceV1.class);
  rootRealmRouter.route("String_Node_Str").through(PrivilegeAuthzModule.class,PrivilegeAuthzModule.NAME).forVersion("String_Node_Str").to(ApplicationTypesResource.class);
  dynamicRealmRouter.route("String_Node_Str").through(PrivilegeAuthzModule.class,PrivilegeAuthzModule.NAME).forVersion("String_Node_Str").to(ResourceTypesResource.class);
  rootRealmRouter.route("String_Node_Str").through(PrivilegeAuthzModule.class,PrivilegeAuthzModule.NAME).forVersion("String_Node_Str").to(DecisionCombinersResource.class);
  rootRealmRouter.route("String_Node_Str").through(PrivilegeAuthzModule.class,PrivilegeAuthzModule.NAME).forVersion("String_Node_Str").to(ConditionTypesResource.class);
  rootRealmRouter.route("String_Node_Str").through(PrivilegeAuthzModule.class,PrivilegeAuthzModule.NAME).forVersion("String_Node_Str").to(SubjectTypesResource.class);
  rootRealmRouter.route("String_Node_Str").through(CoreTokenResourceAuthzModule.class,CoreTokenResourceAuthzModule.NAME).forVersion("String_Node_Str").to(CoreTokenResource.class);
  dynamicRealmRouter.route("String_Node_Str").through(AdminOnlyAuthzModule.class,AdminOnlyAuthzModule.NAME).forVersion("String_Node_Str").to(ScriptResource.class);
  VersionBehaviourConfigListener.bindToServiceConfigManager(rootRealmRouter);
  VersionBehaviourConfigListener.bindToServiceConfigManager(dynamicRealmRouter);
  return rootRealmRouterDelegate;
}