In some cases, the writer has a choice of forms; in others, s/he must use only one form or the other. It depends on what collocates with the specific adjective, noun or verb: interested in bringing -- 'to bring' is not possible. helped him in laying -- 'to lay' is also possible tardiness in executing -- 'to execute' is not possible takes pride in doing -- 'to do' is not possible were the only one in siding -- 'to side' is better ('in siding' is questionable; I wouldn't use it).
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.