Comparison of Sequence-to-Sequence and Retrieval Approaches on the Code Summarization and Code Generation Tasks