Program: 13142
Project: 13142
Buggy source:
/** 
 * Constructs a new managed object set.
 * @param scriptRegistry the script registry
 * @param cryptoService the cryptographic service
 * @param syncRoute a reference to the RouteService on "sync"
 * @param connectionFactory the router connection factory
 * @param config configuration object to use to initialize managed object set.
 * @throws JsonValueException when the configuration is malformed
 * @throws ScriptException when the script configuration is malformed or the script is invalid.
 */
public ManagedObjectSet(final ScriptRegistry scriptRegistry,final CryptoService cryptoService,final AtomicReference<RouteService> syncRoute,ConnectionFactory connectionFactory,JsonValue config) throws JsonValueException, ScriptException {
  this.cryptoService=cryptoService;
  this.syncRoute=syncRoute;
  this.connectionFactory=connectionFactory;
  this.activityLogger=new RouterActivityLogger(connectionFactory);
  name=config.get("String_Node_Str").required().asString();
  if (name.trim().isEmpty() || name.indexOf('{') > 0 | name.indexOf('}') > 0) {
    throw new JsonValueException(config.get("String_Node_Str"),"String_Node_Str");
  }
  this.managedObjectPath=new ResourcePath("String_Node_Str").child(name);
  this.schema=new ManagedObjectSchema(config.get("String_Node_Str").expect(Map.class),scriptRegistry,cryptoService);
  for (  JsonPointer relationship : schema.getRelationshipFields()) {
    final SchemaField field=schema.getField(relationship);
    relationshipProviders.put(relationship,RelationshipProvider.newProvider(connectionFactory,managedObjectPath,field,activityLogger,this));
  }
  for (  ScriptHook hook : ScriptHook.values()) {
    if (config.isDefined(hook.name())) {
      scriptHooks.put(hook,scriptRegistry.takeScript(config.get(hook.name())));
    }
  }
  enforcePolicies=Boolean.parseBoolean(IdentityServer.getInstance().getProperty("String_Node_Str","String_Node_Str"));
  logger.debug("String_Node_Str",name);
}

Fixed version (ground truth):
/** 
 * Constructs a new managed object set.
 * @param scriptRegistry the script registry
 * @param cryptoService the cryptographic service
 * @param syncRoute a reference to the RouteService on "sync"
 * @param connectionFactory the router connection factory
 * @param config configuration object to use to initialize managed object set.
 * @throws JsonValueException when the configuration is malformed
 * @throws ScriptException when the script configuration is malformed or the script is invalid.
 */
public ManagedObjectSet(final ScriptRegistry scriptRegistry,final CryptoService cryptoService,final AtomicReference<RouteService> syncRoute,IDMConnectionFactory connectionFactory,JsonValue config) throws JsonValueException, ScriptException {
  this.cryptoService=cryptoService;
  this.syncRoute=syncRoute;
  this.connectionFactory=connectionFactory;
  this.activityLogger=new RouterActivityLogger(connectionFactory);
  name=config.get("String_Node_Str").required().asString();
  if (name.trim().isEmpty() || name.indexOf('{') > 0 | name.indexOf('}') > 0) {
    throw new JsonValueException(config.get("String_Node_Str"),"String_Node_Str");
  }
  this.managedObjectPath=new ResourcePath("String_Node_Str").child(name);
  this.schema=new ManagedObjectSchema(config.get("String_Node_Str").expect(Map.class),scriptRegistry,cryptoService);
  for (  JsonPointer relationship : schema.getRelationshipFields()) {
    final SchemaField field=schema.getField(relationship);
    relationshipProviders.put(relationship,RelationshipProvider.newProvider(connectionFactory,managedObjectPath,field,activityLogger,this));
  }
  for (  ScriptHook hook : ScriptHook.values()) {
    if (config.isDefined(hook.name())) {
      scriptHooks.put(hook,scriptRegistry.takeScript(config.get(hook.name())));
    }
  }
  enforcePolicies=Boolean.parseBoolean(IdentityServer.getInstance().getProperty("String_Node_Str","String_Node_Str"));
  logger.debug("String_Node_Str",name);
}