anchor.diff:  %%
   -module(gen_composite_refac).
   
  --export([init_composite_refac/2,get_next_command/2, input_par_prompts/1]).
  +-export([init_composite_refac/2,
  +         get_next_command/1, 
  +         input_par_prompts/1]).
   
   -export([behaviour_info/1]).
   
  
positive.code: -spec behaviour_info(atom()) ->[{atom(), arity()}].
  behaviour_info(callbacks) ->
      [{composite_refac,1}, {input_par_prompts, 0}].
  
  
  input_par_prompts(CallBackMod) ->
      Res =input_pars_1(CallBackMod),
  
negative.code:                             Cmds;
                         true -> [Cmds]
                      end,
              try start_cmd_server(lists:flatten(Cmds1))
              catch
                  E1:E2 ->
                      erlang:error({E1,E2})
              end
      end.
  
  start_cmd_server(Cmds) ->
      wrangler_backup_server:reset_backups(),
      wrangler_cmd_server:start_link([Cmds]).
  
  stop_cmd_server() ->
      wrangler_cmd_server:stop().
     
  get_next_command(PrevResult) ->
      Cmd=wrangler_cmd_server:get_next_command(PrevResult),
      case Cmd of 
          {ok, none, _ChangedFiles, [error, _Reason]} ->
              stop_cmd_server(),
              wrangler_backup_server:recover_backups(),
              Cmd;
          {ok, none, _ChangedFiles, _Msg} ->
              stop_cmd_server(),
              {ok, PreviewPairs}=wrangler_backup_server:recover_backups(),
              wrangler_preview_server:add_files({PreviewPairs, ""}),
              Cmd;
          _ ->
              Cmd
      end.
      
  