While most agree that Stalin made extensive preparations for an eventual war and exploited the military conflict in Europe to his advantage, the assertions that he planned to attack Nazi Germany in the summer of 1941, and that Barbarossa was a preemptive strike by Adolf Hitler, are dismissed by many historians. Still impossible to say for sure
Missed this earlier, so a bit late, but check out this old answer.