If you are maintaining an FSF-copyrighted package, please don’t copy in any code without verifying first that we have suitable legal papers for that code.
If you are copying from another FSF-copyrighted package, then we presumably have papers for that package’s own code, but you must check whether the code you are copying is part of an external library; if that is the case, we don’t have papers for it, so you should not copy it. It can’t hurt in any case to double-check with the developer of that package.
When you are copying code for which we do not already have papers, you need to get papers for it. It may be difficult to get the papers if the code was not written as a contribution to your package, but that doesn’t mean it is ok to do without them. If you cannot get papers for the code, you can only use it as an external library (see External Libraries).