<commit_before>
% input: Module
%
% op: ejabberd / msync version
%
% e.g.: ./erl_expect -sname ejabberd@sdb-ali-hangzhou-ejabberd3 -setcookie 'LTBEXKHWOCIRRSEUNSYS' common/status.erl

echo(off),
[ModuleBinary] =  Args,
Module = list_to_atom(ModuleBinary),
{_M, _B, Path} = code:get_object_code(msync),
io:format("~p ~n", [Path]).<commit_msg>fix bug of get code path<commit_after>
% input: Module
%
% op: ejabberd / msync version
%
% e.g.: ./erl_expect -sname ejabberd@sdb-ali-hangzhou-ejabberd3 -setcookie 'LTBEXKHWOCIRRSEUNSYS' common/get_code_path.erl /Users/zhangchao/work/github.com/erl_tool/common/a.txt /Users/zhangchao/work/github.com/erl_tool/common/b.txt
% File Like This
% msync.
% msync_c2s_handler.
% app_config.

echo(off),
[File, OutFile] = Args,
NodeName = erlang:atom_to_binary(node(), utf8),
[_, Domain] = binary:split(NodeName, <<"@">>),
{ok, ModuleList} = file:consult(File),
{ok, FD} = file:open(OutFile, [write, append]),

lists:map(fun(Module) ->
                  {_M, _B, Path} = code:get_object_code(Module),
                  B = <<Domain/binary, ":", (list_to_binary(Path))/binary>>,
                  io:format(FD, "~s~n", [erlang:binary_to_list(B)])
          end, ModuleList).
{'fraction_non_alphanumeric': 0.17330016583747926, 'fraction_numerical': 0.003316749585406302, 'mean_word_length': 4.247826086956522, 'pattern_counts': {'":': 1, '<': 7, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4591714', 'n_tokens_mistral': 498, 'n_tokens_neox': 483, 'n_words': 82}