I use a few lines of code, say a method or two from an open source project. The methods are quite simple (5-6 lines) and not something that could be considered intellectual property.
Since the methods are quite simple, can I change the contents and say that the code is mine ? It would almost be like changing what a few print statements say, but not that simple.
If I should not, then how do I acknowledge the author when I use a bit of his code in my code ?