Program: 167820
Project: 167820
Buggy source:
private void registerTransformers1_0_0(SubsystemRegistration registration){
  final TransformersSubRegistration transformers=registration.registerModelTransformers(ModelVersion.create(1,0,0),new AbstractSubsystemTransformer(SUBSYSTEM_NAME){
    @Override protected ModelNode transformModel(    TransformationContext context,    ModelNode model){
      boolean showModel=model.get(CommonAttributes.EXPOSE_MODEL,CommonAttributes.RESOLVED).isDefined();
      ModelNode result=model.clone();
      result.get(CommonAttributes.SHOW_MODEL).set(showModel);
      return result;
    }
  }
);
  TransformersSubRegistration expressions=transformers.registerSubResource(ExposeModelResourceExpression.INSTANCE.getPathElement());
  expressions.discardOperations(ADD,REMOVE,WRITE_ATTRIBUTE_OPERATION,READ_ATTRIBUTE_OPERATION);
  TransformersSubRegistration resolved=transformers.registerSubResource(ExposeModelResourceResolved.INSTANCE.getPathElement());
  resolved.discardOperations(WRITE_ATTRIBUTE_OPERATION);
  resolved.registerOperationTransformer(ADD,new AbstractOperationTransformer(){
    @Override protected ModelNode transform(    TransformationContext context,    PathAddress address,    ModelNode operation){
      ModelNode node=new ModelNode();
      node.get(OP).set(WRITE_ATTRIBUTE_OPERATION);
      node.get(OP_ADDR).set(address.subAddress(0,address.size() - 1).toModelNode());
      node.get(NAME).set(CommonAttributes.SHOW_MODEL);
      node.get(VALUE).set(true);
      return node;
    }
  }
);
  resolved.registerOperationTransformer(REMOVE,new AbstractOperationTransformer(){
    @Override protected ModelNode transform(    TransformationContext context,    PathAddress address,    ModelNode operation){
      ModelNode node=new ModelNode();
      node.get(OP).set(WRITE_ATTRIBUTE_OPERATION);
      node.get(OP_ADDR).set(address.subAddress(0,address.size() - 1).toModelNode());
      node.get(NAME).set(CommonAttributes.SHOW_MODEL);
      node.get(VALUE).set(false);
      return node;
    }
  }
);
  resolved.registerOperationTransformer(READ_ATTRIBUTE_OPERATION,new OperationTransformer(){
    @Override public TransformedOperation transformOperation(    final TransformationContext context,    final PathAddress address,    final ModelNode operation){
      return new TransformedOperation(null,new OperationResultTransformer(){
        @Override public ModelNode transformResult(        ModelNode result){
          if (operation.get(NAME).asString().equals(CommonAttributes.DOMAIN_NAME)) {
            result.get(RESULT).set(CommonAttributes.DEFAULT_RESOLVED_DOMAIN);
          }
          result.get(OUTCOME).set(SUCCESS);
          result.get(RESULT);
          return result;
        }
      }
);
    }
  }
);
}

Fixed version (ground truth):
private void registerTransformers1_0_0(SubsystemRegistration registration){
  final TransformersSubRegistration transformers=registration.registerModelTransformers(ModelVersion.create(1,0,0),new AbstractSubsystemTransformer(SUBSYSTEM_NAME){
    @Override protected ModelNode transformModel(    TransformationContext context,    ModelNode model){
      boolean showModel=model.get(CommonAttributes.EXPOSE_MODEL,CommonAttributes.RESOLVED).isDefined();
      ModelNode result=model.clone();
      result.get(CommonAttributes.SHOW_MODEL).set(showModel);
      result.remove(CommonAttributes.EXPOSE_MODEL);
      return result;
    }
  }
);
  TransformersSubRegistration expressions=transformers.registerSubResource(ExposeModelResourceExpression.INSTANCE.getPathElement());
  expressions.discardOperations(ADD,REMOVE,WRITE_ATTRIBUTE_OPERATION,READ_ATTRIBUTE_OPERATION);
  TransformersSubRegistration resolved=transformers.registerSubResource(ExposeModelResourceResolved.INSTANCE.getPathElement());
  resolved.discardOperations(WRITE_ATTRIBUTE_OPERATION);
  resolved.registerOperationTransformer(ADD,new AbstractOperationTransformer(){
    @Override protected ModelNode transform(    TransformationContext context,    PathAddress address,    ModelNode operation){
      ModelNode node=new ModelNode();
      node.get(OP).set(WRITE_ATTRIBUTE_OPERATION);
      node.get(OP_ADDR).set(address.subAddress(0,address.size() - 1).toModelNode());
      node.get(NAME).set(CommonAttributes.SHOW_MODEL);
      node.get(VALUE).set(true);
      return node;
    }
  }
);
  resolved.registerOperationTransformer(REMOVE,new AbstractOperationTransformer(){
    @Override protected ModelNode transform(    TransformationContext context,    PathAddress address,    ModelNode operation){
      ModelNode node=new ModelNode();
      node.get(OP).set(WRITE_ATTRIBUTE_OPERATION);
      node.get(OP_ADDR).set(address.subAddress(0,address.size() - 1).toModelNode());
      node.get(NAME).set(CommonAttributes.SHOW_MODEL);
      node.get(VALUE).set(false);
      return node;
    }
  }
);
  resolved.registerOperationTransformer(READ_ATTRIBUTE_OPERATION,new OperationTransformer(){
    @Override public TransformedOperation transformOperation(    final TransformationContext context,    final PathAddress address,    final ModelNode operation){
      return new TransformedOperation(null,new OperationResultTransformer(){
        @Override public ModelNode transformResult(        ModelNode result){
          if (operation.get(NAME).asString().equals(CommonAttributes.DOMAIN_NAME)) {
            result.get(RESULT).set(CommonAttributes.DEFAULT_RESOLVED_DOMAIN);
          }
          result.get(OUTCOME).set(SUCCESS);
          result.get(RESULT);
          return result;
        }
      }
);
    }
  }
);
}