Is reusing old code for a new assignment considered self plagiarism? How to protect yourself if you consider it to be, and a group partner does not? I am taking a graduate machine learning course and am working with another student in the class on a final project. In his undergraduate studies, the other student wrote code that accomplished a similar task, and mentioned in our previous meeting that we would be able to leverage much of this code for our current project if we wanted to. I responded that I believe it would constitute textbook cheating and self-plagiarism, but the other student disagrees and believes that re-using the code would not constitute self-plagiarism because he himself wrote it, and it would be redundant to re-write what he had already done.

Now, the course instructors have made it clear that we are not allowed to use any external libraries to perform certain classes of algorithms for this project. This students' prior code would fall under this category of prohibited tools, but he claims that it doesn't qualify because he wrote the code himself (so it is not an "external library"). I believe this is hyperbole, but he disagrees. It is also worth mentioning that this code is licensed under an MIT License, though it is not widely used at all.

It has gotten to the point where I am uncomfortable going forward with the project by re-using his old code, and he does not want to do work on the project that he considers to be redundant. My worry is that if it turns out we're not allowed to reuse the code, then using it could cause us to fail the course and severely negatively affect our reputations. Even if we don't get caught, I personally feel that it would be unethical to copy-paste old code and present it as though it's fresh code for this current project.

I am unsure of how to proceed. I have tried reaching out to the professor of the course some time ago (she has been traveling for some conferences recently and will be for a while) but I have not heard back from her. Additionally, the course TAs have been unwilling to weigh-in on the situation.

I have the following questions:


Is the above situation usually considered to be self plagiarism? Why or why not?
Is the above act typically allowed in an academic setting?
Assuming you are in my position, and consider re-using the code to be cheating and/or unethical, what is the best way to proceed; both in terms of how to make progress on the project, how to compromise with my group mate, and how to protect myself if my group mate refuses to budge.
What should you do?  You should ask the professor politely and without imposing your pre-judgement on whether this is or is not prohibited by the rules of the class.  You are not in a position to make this judgement.  The only person who can give a definitive ruling is the professor who set the rules.

I recommend an approach like:


  My teammate has previously created code that would be very applicable to this project.  Can we use that code, or does it count as an external library, and we should instead write it again as an exercise?


While you are waiting for a response, I would recommend proceeding in two ways in parallel:


You implement a new version of the library from scratch, while
Your partner builds upon the existing library.


That way, you get the educational value of building the library, rather than using the pre-existing library, and your partner can push on ahead without either of you being stalled while waiting for the result.