anchor.diff:  		    end,
       case is_mod_name(TargetModName) of 
   	true -> {filename:join([filename:dirname(CurrentFName), TargetModName++".erl"]), TargetModName};
  -	_  -> ErrMsg
  +	_  -> throw(ErrMsg)
       end.
       
     
  
positive.code: %% libary modules. 2) the undo process should remove the newly created file.
  %%  
  %% =====================================================================
  -spec(move_fun/7::(filename(),integer(),integer(), string(), atom(),[dir()], integer())
          -> {ok, [filename()]} | {error, string()}).
  
  move_fun(FName, Line, Col, TargetModorFileName, CreateNewFile, SearchPaths, TabWidth) ->
      move_fun(FName, Line, Col, TargetModorFileName, CreateNewFile, SearchPaths, TabWidth, emacs).
  
  
  -spec(move_fun_eclipse/7::(filename(),integer(),integer(), string(), atom(),[dir()], integer())
          ->  {ok, [{filename(), filename(), string()}]} | {error, string()}).
  
  move_fun_eclipse(FName, Line, Col, TargetModorFileName, CreateNewFile, SearchPaths, TabWidth) ->
      move_fun(FName, Line, Col, TargetModorFileName, CreateNewFile, SearchPaths, TabWidth, eclipse).
  
negative.code:     case UsedRecords of 
  	[] -> true;
  	_ ->
  	    {ok, {_, Info}} =refac_util:parse_annotate_file(FileName,false, SearchPaths, TabWidth),
  	    case lists:keysearch(records, 1, Info) of
  		{value, {records, RecordDefs}} -> 
  		    UsedRecordDefs = [{Name, lists:keysort(1,[{F, format(FDef)} || {F, FDef} <-Fields])}
  				      || {Name, Fields} <-RecordDefs, lists:member(Name, UsedRecords)],
  		    case length(UsedRecords) > length(UsedRecordDefs) of 
  			true ->
  			    UnDefinedUsedRecords = UsedRecords -- [Name || {Name, _Fields} <- UsedRecordDefs],
  			    ?wrangler_io("\nThe following records are used by the function to be moved, but not defined:~p\n", [UnDefinedUsedRecords]),
  			    throw({error, "There are undefined records used by the function to be moved."});
  			_ -> {ok, {_, Info1}} = refac_util:parse_annotate_file(TargetFileName, false, SearchPaths, TabWidth),
  			     case lists:keysearch(records,1, Info1) of 
  				 {value, {records, RecordDefsInTargetFile}} ->
  				     UsedRecordDefsInTargetFile = [{Name, lists:keysort(1,[{F, format(FDef)} || {F, FDef} <-Fields])}
  								   || {Name, Fields} <-RecordDefsInTargetFile,
  								      lists:member(Name, UsedRecords)],
  				     case length(UsedRecords) > length(UsedRecordDefsInTargetFile) of 
  					 true -> throw({error, "Some records used by the function are not defined in the taret file."});
  					 _ -> case lists:keysort(1, UsedRecordDefs) == lists:keysort(1, UsedRecordDefsInTargetFile) of 
  						  true ->true;
  						  _  -> throw({error,  "Moving this function could change program semantics because of different record definitions."})
  					      end
  				     end;
  				 _ ->throw({error, "Some record(s) used by the function to be moved are not defined in the target file."})
  			     end
  		    end;
  		_ ->
  		    throw({error, "Refactoring failed because of incomplete information about the record(s) used by this function."})
  	    end
      end.
  					
  