Automatic Detection of Interaction Patterns for Parallel Program Analysis and Development