Questions you need to ask yourself:

 - Did you cite your sources? 

Although the topic of plagiarism crosses different fields, not all fields are the same. Writing a program is not the same as writing an essay. Although both share similar components of thought, grammar = tabs/spaces, nouns = objects, prepositions = pointers, etc. Functionally they are different. As part of your assignment, did you cite that you got the sections of code from an open source library? Even if it wasn't a formal citation, then perhaps within the comments linking to the library?

 - How many ways can a person realistically complete a given goal? 

If the task was to sum a list of integers. Would it be plagiarism if 10 programmers' code used sum(object)? 

> a common algorithm for chaining that I can explain thoroughly

This is where you need to argue that there is a point where a given piece of code has become common information, but you need to demonstrate that it is in fact, common. A non-expert would not have the background knowledge to presume that what you say is correct. You would need to provide examples. (Think of Hello World, who really 'owns' it?)

 - [Patenting Software is complicated][1]

IANAL, but it would appear that the actual law itself is complicated. 

> Over 30% of the class has been reported for academic integrity violations on projects over the semester, and the newly graduated professor doesn't seem to think himself or his assignments are the problem.

A professor of computer science is not a lawyer, but he or she certainly has the capability of understanding computer science questions and ask him or herself whether or not there is malicious intent involved. If the plagiarism claims can be addressed with a simple document where you cite your sources (libraries, open source projects, github repos), then the claims should go down. 

**Knowledge and learning doesn't happen in a vacuum.**


----------

> Thanks for this. Like I said before, citing code is foreign to me (and I've been programming since age 8), and I did NOT (but SHOULD have) cited those lines. Forgetting to cite two lines and committing plagiarism on the whole project are two different things, though, especially on a project of this size. How would you address that?

	
You make the argument that the current tests to determine plagiarism (such as in english) does not work well when it comes to programming and scripting. The degree of documentation is functionally different. In an essay, citation is to demonstrate where you got the idea from. In an program, it is to document how the snippet of code will help you achieve your goals. The purpose shifts from 'giving credit where it is due' to 'how is this going to help'

With this in mind, look at "hello world". It is a universally known introduction to programming languages. But no experienced programmer needs to 'cite it' to understand it. It has become 'common' across all languages. However a specific compiler in C that will allow it to control a robot arm, is not common enough for a experienced (regardless of language) programmer to recognize it easily, hence the need for documentation.

As far as the case itself, you can make the argument that your actions don't constitute the traditional definitions and test for plagiarism. But don't expect that your audience (fellow peers) would understand given the severity and the credentials of the plaintiff (your professor). Another avenue would be to argue how the severity of the punishment -100% is not consistent with the scope of the alleged plagiarism. It is alleged, not proven.

	
To fail a student unilaterally based off of plagiarism would and should be appealed to a 'higher authority' or at the least, reviewed by a panel of knowledgeable individuals (versus laypeople). You stated that this class has an (in my opinion, enormous) percentage of plagiarism claims. While I don't have stats for back up my statement, 30% is ridiculously high. In my academic career, plagiarism was an RARE occurrence. So another point you can make is whether or not the professor is misapplying the concept traditional plagiarism to a field where it is fundamentally different.

  [1]: http://www.ipwatchdog.com/2013/02/16/a-guide-to-patenting-software-getting-started/id=35629/