I create a lot of tests using the TestNG framework. I find myself often needing data providers. A data provider supplies test data for a test method. Their structure is often identical. To save myself some time I created a dynamic code snippet for it in IntelliJ.
Here is a picture of how that looks like:

I copied the configuration from IntelliJ and put it in a github gist to share:
https://gist.github.com/pedrocatre/7735326b5c1488df12867a4c729528ef
Now creating data providers is faster and lot less tedious! It saves me a lot of typing.Can you apply the same technique to a code structure you find yourself repeating?