anchor.diff:  process_filter(Tags, EC2Tags, tag) ->
       orddict:filter(fun(_, TagL) ->
           % do any of the tags for an instance match a single requirement
  -        lists:any(fun(#ec2_tag{key = Key, value = Value}) ->
  +        lists:any(fun({Key, Value}) ->
               case orddict:find(Key, Tags) of
                   {ok, []} ->
                       true;
  
positive.code: preprocess(L, Type) ->
      preprocess_set([{'OR', L}], Type).
  
  tags_merge_f_values(_, _, []) ->
      [?ERLCLOUD_TAG_VALUE_NULL];
  tags_merge_f_values(_, V1, V2) ->
      lists:umerge(V1, V2).
  
  tags_merge_f_value1(K, [], D2) ->
      tags_merge_f_value1(K, [?ERLCLOUD_TAG_VALUE_NULL], D2);
  tags_merge_f_value1(K, V1, D2) ->
      orddict:update(K, fun(V2) ->
                         tags_merge_f_values(K, V1, V2)
                     end, V1, D2).
  
  tags_merge_f(D1, D2) ->
      orddict:fold(fun tags_merge_f_value1/3, D2, D1).
  
  tags_merge([], Lookup) ->
      Lookup;
  tags_merge([{'AND', L1} | L0], Lookup) ->
      tags_merge(L0, tags_merge(L1, Lookup));
  tags_merge([{'OR', L1} | L0], Lookup) ->
      tags_merge(L0, tags_merge(L1, Lookup));
  tags_merge([Tags | L0], Lookup) ->
      tags_merge(L0, tags_merge_f(Tags, Lookup)).
  
  tags_merge(L) ->
      orddict:to_list(tags_merge(L, orddict:new())).
  
  tags_filter(Merged) ->
      {Keys, Values} = lists:foldl(fun({K0, V0}, {K1, V1}) ->
          {lists:umerge(K1, [K0]), lists:umerge(V1, V0)}
      end, {[], []}, Merged),
      if
          Values == [] ->
              [{key, Keys}];
          true ->
              [{key, Keys}, {value, Values}]
      end.
  
  process_filter(Group, EC2Instances, group) ->
      lists:filter(fun(Reservation) ->
          {_, InstancesSet} = lists:keyfind(instances_set, 1, Reservation),
  
negative.code: -include_lib("eunit/include/eunit.hrl").
  
  logic_case1_tags() ->
      [[{instances_set,
         [[{instance_id, "A1"},
           {tag_set,
            [[{key, "A"}, {value, "A"}]]}],
          [{instance_id, "A2"},
           {tag_set,
            [[{key, "A"}, {value, "B"}]]}]]}],
       [{instances_set,
         [[{instance_id, "B1"},
           {tag_set,
            [[{key, "B"}, {value, "A"}]]}]]}],
       [{instances_set,
         [[{instance_id, "C1"},
           {tag_set,
            [[{key, "C"}, {value, "A"}]]}],
          [{instance_id, "C2"},
           {tag_set,
            [[{key, "C"}, {value, "B"}]]}],
          [{instance_id, "C3"},
           {tag_set,
            [[{key, "C"}, {value, "C"}]]}],
          [{instance_id, "C4"},
           {tag_set,
            [[{key, "C"}, {value, "C"}]]}],
          [{instance_id, "C5"},
           {tag_set,
            [[{key, "C"}, {value, "C"}]]}]]}]].
  
  logic_case1_tags_preprocess(TagsInput) ->
      true = is_list(TagsInput),
  