Refactoring different type of param to reduce duplicate code
If I understand your question correctly I would refactor your method by implementing the template pattern in an OO or functional way whatever suits you best. Look at this excellent article for more information on the two options http://www.codeproject.com/KB/architecture/TMDPvsLambda.aspx.

This you'll be able to avoid duplicating your code while still being able to have different behaviors.