It can be if you fail to give attribution. Plagiarism isn't just unethical, unprofessional and immoral (not to mention evidence that the plagiarist is an uncreative dullard). It's illegal. How many words or sentences it takes to trigger a complaint is mostly governed by what it takes to prove a violation. The more material copied, the easier that can be. In this situation providing attribution (tooltip when you mouse over the code?) would probably satisfy 9/10 of potential complaints. But big companies usually won't make that kind of minimal effort without being hit upside the metaphorical head with a piece of metaphorical lumber (like with an actual lawsuit).