Copying/pasting code from open source projects it's considered fair use. Come on, who doesn't do that?
I mean, sure you don't copy an entire file, but you tend to copy a snippet, or in the end you look at how is done and you done the exact same way (that is the same of copying it!)
I would say there is not a problem in there.