36

I copied (and failed to cite) two lines of code from the OpenJDK source for an undergraduate Data Structures project. Yet, the code comparison shows an alarming amount (40%) of similarity. Here is the side-by-side comparison with my file.

Based on these grounds, my professor wants to give me a -100% on the assignment, which would bring down my overall grade by 15% total, probably causing me to not make the C-wall (depending on how well I do on the final exam). For this reason (and my conscious), I decided to appeal.

However, I believe that most of the similarity in the report comes from my copying of lines 142-152:

static int hash(int h) {
    h ^= (h >>> 20) ^ (h >>> 12);
    return h ^ (h >>> 7) ^ (h >>> 4);
}

I did not cite these two lines, but I did intend to delete them later.

In fact, this whole function can be removed without affecting the program at all, which results in this file comparison.

Then, only lines 114-126 are a problem:

MyEntry<K, V>[] newArr = new MyEntry[newSize];
// Copy
for (int i = 0; i < data.length; i++) {
    MyEntry<K, V> e = data[i];
    if (e != null) {
        data[i] = null;
        do {
            MyEntry<K, V> next = e.next;
            int j = e.hash % newSize;
            e.next = newArr[j];
            newArr[j] = e;
            e = next;
        } while (e != null);

However, this snippet is my own. I wrote these lines without referencing HashMap.java, and this is a common algorithm for chaining that I can explain thoroughly, and have known about for years.

Yes, I know the fact I copied the other two lines compromises my integrity and made the 20% into 40% to begin with, so how can I prove this?

I'm not sure how to defend this whole case before a Student Conduct Board who knows very little about programming. My board hearing is in a month. Does these two snippets of code constitute plagiarism of my entire project? Is -15% to my overall grade fair?

Sidenotes:

  • Our projects are pretty extensive since we aren't allowed to use java.util.* (like 1k+ lines for each project in 8 days), and I did not copy any other code. I'd say the actual data structure implementation is only meant to take about 1/5 our time spent per project.
  • 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. I should have caught onto the warning before this last project of the semester...
6
  • Comments are not for extended discussion; this conversation has been moved to chat.
    – ff524
    Commented Dec 7, 2017 at 15:57
  • 5
    This is the type of mess that made me leave academia.
    – T. Sar
    Commented Dec 7, 2017 at 17:27
  • 2
    I want to point out that this piece in dispute is verbatim here and here.
    – Gryph
    Commented Dec 7, 2017 at 17:53
  • 1
    @Gryph There is a bigger dispute, see the chat referenced above. Commented Dec 7, 2017 at 19:06
  • Some of the newer comments suggest that you haven't picked up on the cultural norms regarding plagiarism in the West. So I dunno if this might be completely off-base, but one reason someone might not know the norms here is if they're from Asia, e.g. an international student or an immigrant who's returned to school as an adult. Someone who grew up in Asia could understandably have picked up some of their cultural norms about plagiarism during their early education, which are very different from Western norms. This wouldn't get you off-the-hook, but it might be a mitigating factor.
    – Nat
    Commented Dec 9, 2017 at 14:22

10 Answers 10

61

It appears strongly likely that you did plagiarise, and if this is the case you'd be better to proceed by recognising your mistake than continuing to argue.

Looking at your code, there is a great deal that appears to have been taken from the HashMap.java file. I strongly suspect that you began with this code and then modified it to produce your code, or closely followed it as a template when writing your own. The highlighted code sections have picked up some of this, but other sections closely resemble the other file too, although with slightly altered comments and ordering.

If this is the case, then the code you have shown us is not your own original work but actually a plagiarised version of HashMap.java. Leaving in the two lines which are unconnected is a smoking gun of the link that is likely to be conclusive to the panel. Your point that they are unnecessary will actually count against you because you will be unable to explain why they are there at all. And whether this was your intent or not, it is likely that the panel (and your professor) will see your changed comments and ordering as an attempt to cover up your tracks and conceal your plagiarism from automated tools.

The panel is more likely to show leniency towards a student who appears to at least be contrite, and recognises that they've made a mistake, than a student who denies wrong-doing in the face of apparently very strong evidence.

17
  • 1
    Oh, I'm not denying using it as a reference, which is allowed in the syllabus. My claim is that I forgot to cite/didn't see the need to cite, because I am new to academia, the assignment lended itself to it, and I'm used to treating assignments like this in regards to hobbiest projects that can borrow freely from GPL code, not academia ones that forbid its use. The claims my professor brought against me only pointed to the MOSS, though, not the file as a whole, so that is why I only ask about the two lines. Commented Dec 7, 2017 at 18:14
  • 1
    I do actually have a good reason for writing those lines to begin with. We had to hash a lot of two character strings (i.e. "AB"). Without the auxiliary hash function, there were a lot of collisions, and I was afraid my code would time out in the automated grading, which would delay development a LOT based on how our automated Jenkins grader works. I included it because once I learned how it worked I thought it was cool, and my project could use it. Yes, I feel contrite now, realizing that academia has different standards, that really weren't made clear to me. Commented Dec 7, 2017 at 18:18
  • 15
    @TheSmartWon, I would recommend that in the future, even for hobbyist projects where you aren't intending to disseminate the code, you should still cite code you have borrowed from elsewhere. If you decide later to publish or sell your code, without these citations, you might forget what was borrowed and from where (and run the risk of violating the license).
    – PersonX
    Commented Dec 7, 2017 at 19:32
  • 7
    @TheSmartWon 1) The MOSS identified a lot more than just two lines. 2) you should know that copying code you are meant to write yourself is cheating on an assignment, that's just common sense, 3) you did not write those lines, and 4) I don't believe you actually were afraid of it timing out. To me that statement smells like more attempted covering up. Commented Dec 7, 2017 at 22:24
  • 2
    @TheSmartWon 1) The same one that identifies 3 further sections? 2) "using a source and making some modifications" is not "writing it yourself". 4) Your reason to lie is to try to avoid punishment. it is a normal response to do everything you can to make it look like you should not be punished. An engineer also would not use a function just because s/he "thought it looked cool". You also already know that assignments need to be your own work; if you are unable to remember not to hand in other peoples' work then you have a problem. Commented Dec 7, 2017 at 23:54
50

The title of your question "does two lines of copied code constitute plagiarism", isn't exactly accurate, in my opinion.

I think that you will have a very hard time arguing that this isn't/wasn't plagiarism. The similarities between your code and HashMap.java don't end at the two lines or at a single "common algorithm".

1) You picked the exact same default capacity and load factor:

 /** Has to be a power of 2 */
 private static final int DEFAULT_CAPACITY = 16;

 /** The load factor */
 private static final float DEFAULT_LOAD_FACTOR = 0.75f;

versus

 // The default initial capacity - MUST be a power of two.
 static final int DEFAULT_INITIAL_CAPACITY = 16;

 // The load factor used when none specified in constructor.
 static final float DEFAULT_LOAD_FACTOR = 0.75f;

In fact, the "Has to be a power of 2" comment already means you are caught red-handed, because, there is, in fact, no good reason to require that the capacity is a power of two in your code. The fact that the size is a power of two is only used for an optimization in the HashMap.java version of the code, and this optimization isn't used in your code. You are probably lucky the student conduct board doesn't know much about programming.

2) The two get methods are very similar:

public V get(K key) {
    if (key == null)
        return null;
    int hash = key.hashCode() % data.length;
    // System.out.printf("Getting %d %d %s\n", key.hashCode(), hash,
    // key.toString());
    for (MyEntry<K, V> e = data[hash]; e != null; e = e.next) {
        if (e.hash == hash && (e.getKey() == key || key.equals(e.getKey())))
            return e.getValue();
    }

    return null;
}

versus

public V get(Object key) {
    if (key == null)
        return getForNullKey();
    int hash = hash(key.hashCode());
    for (Entry<K,V> e = table[indexFor(hash, table.length)];
         e != null;
         e = e.next) {
        Object k;
        if (e.hash == hash && ((k = e.key) == key || key.equals(k)))
            return e.value;
    }
    return null;
}

It seems strange that you both picked the exact same, very specific way to do the key comparison (first comparing the hashes, then the pointers of the keys and then finally using key.equals).

3) ...as is the put-method:

public MyEntry<K, V> put(K key, V value) {
    int hash = key.hashCode();
    // System.out.printf("Adding %d %d %s\n", key.hashCode(), hash, key.toString());
    int i = hash % data.length;

    // Collisions
    for (MyEntry<K, V> e = data[i]; e != null; e = e.next) {
        if (e.hash == hash && (e.getKey() == key || key.equals(e.getKey()))) {
            MyEntry<K, V> old = e;
            e.setValue(value);
            return old;
        }
    }

    addEntry(hash, key, value, i);

    return null;
}

versus

public V put(K key, V value) {
    if (key == null)
        return putForNullKey(value);
    int hash = hash(key.hashCode());
    int i = indexFor(hash, table.length);
    for (Entry<K,V> e = table[i]; e != null; e = e.next) {
        Object k;
        if (e.hash == hash && ((k = e.key) == key || key.equals(k))) {
            V oldValue = e.value;
            e.value = value;
            e.recordAccess(this);
            return oldValue;
        }
    }

    modCount++;
    addEntry(hash, key, value, i);
    return null;
}

4) ...as are the add and grow-methods:

void addEntry(int hash, K key, V value, int bucketIndex) {
    MyEntry<K, V> e = data[bucketIndex];
    data[bucketIndex] = new MyEntry<>(hash, key, value, e);
    keyList.add(key);

    if (size++ >= threshold)
        grow();
}

/**
 * Grows the array 2x current size
 */
private void grow() {
    int newSize = 2 * data.length;

    @SuppressWarnings("unchecked")

    MyEntry<K, V>[] newArr = new MyEntry[newSize];
    // Copy
    for (int i = 0; i < data.length; i++) {
        MyEntry<K, V> e = data[i];
        if (e != null) {
            data[i] = null;
            do {
                MyEntry<K, V> next = e.next;
                int j = e.hash % newSize;

                e.next = newArr[j];
                newArr[j] = e;
                e = next;
            } while (e != null);
        }
    }

    data = newArr;
    threshold = (int) (newSize * DEFAULT_LOAD_FACTOR);
}

versus

void addEntry(int hash, K key, V value, int bucketIndex) {
    Entry<K,V> e = table[bucketIndex];
    table[bucketIndex] = new Entry<>(hash, key, value, e);
    if (size++ >= threshold)
        resize(2 * table.length);
}

void transfer(Entry[] newTable) {
    Entry[] src = table;

    int newCapacity = newTable.length;
    for (int j = 0; j < src.length; j++) {
        Entry<K,V> e = src[j];
        if (e != null) {
            src[j] = null;
            do {
                Entry<K,V> next = e.next;
                int i = indexFor(e.hash, newCapacity);

                e.next = newTable[i];
                newTable[i] = e;
                e = next;
            } while (e != null);
        }
    }
}

Of course, a HashTable is a fairly common data structure and there are only so many ways to implement a given algorithm. However, the two copied lines show that you did definitely use HashTable.java as a starting point for your own implementation, and the further similarities in the design, illogical comments and code structure would lead one to believe that you did take more than just a little "inspiration" from HashTable.java.

Note that both your and their put and get methods use a for-loop to iterate over a linked list, whereas the grow/transfer methods uses a while-loop to do the same. It seems strange that both pieces of code would make this same decision independently.

Our projects are pretty extensive since we aren't allowed to use java.util.* (like 1k+ lines for each project in 8 days), and I did not copy any other code. I'd say the actual data structure implementation is only meant to take about 1/5 our time spent per project.

It seems clear that you weren't allowed to use HashMap.java, and that, if you had wanted to use a hash table, you'd need to implement your own. By copying large parts of HashMap.java you've tried to circumvent this restriction. "It's only a small part of the project" doesn't take away the fact that you took code, that was not your own work, and tried to pass it off as your own (even though the expectation was that you'd write this part of the assignment yourself).

If the assignments were truly unrealistic given the time span allocated, it would have been better to turn in a failing solution. If many students turned in a failing solution, the professor might have considered the possibility that the assignment was too hard. If the plagiarism had gone unnoticed then the professor might have (incorrectly) concluded that the assignment was of appropriate difficulty, penalizing the students who (attempted) to complete the assignment fairly and according to the rules.

The penalties for plagiarism can vary greatly by institution. -100% on your assignment could be heavy handed, but at our institution the penalty could have been anywhere from 0% on the assignment, an automatic fail for the course in question to expulsion from your studies for 12 months. Plagiarism, at most institutions, is treated similarly to cheating on an exam and the punishments might be stringent. If the only punishment were getting 0% on the plagiarized assignment then there would be no harm in "trying" to plagiarize if you'd fail the assignment anyways without resorting to plagiarism.

15
  • 18
    I feel a bit uncomfortable putting large amounts of source code in an answer (doesn't seem on-topic for academia.SE), but this seems the only way to explain to the question-asker how severe the copying is (the statement about "only two lines" seems to downplay it). Commented Dec 7, 2017 at 15:11
  • 5
    Plus of course the inconsistency pointed out by others that the OP claimed the copied part was not even used. Partly this points to a problem because it then makes no sense why it is included in the first place, and as also pointed out, the claim is not even true, pointing to the OP not really understanding the code. Commented Dec 7, 2017 at 15:49
  • 6
    Yep. This student would be toast if they turned in this code in my class.
    – user168715
    Commented Dec 7, 2017 at 17:31
  • 9
    To put it more bluntly, in my opinion these code examples look like copy&paste with some minor refactoring. Whenever a simple for loop is used in the HashTable, the students code uses it too. Whenever a iterator-style for loop is used, the students code uses it too. (the loops with e.next(), I've never encountered this style outside of the jdk in modern code). Even the peculiar style of omitting curly braces after one line if statements and loops is copied.
    – kapex
    Commented Dec 7, 2017 at 17:36
  • 14
    @TheSmartWon 1) Ignorance of the rules regarding plagiarism probably won't make a very convincing argument to the conduct board. 2) You were told you couldn't use anything in java.util.*. To an outside observer, it strongly looks like you basically copied the relevant parts of the source of java.util.HashMap and slightly modified them, no work of your own. Even with a citation that will get you in trouble. 3) Am I correct you're taking a basic data structures course? In that case, you're basically taking "wheel building 101" and reinventing the wheel is exactly what you're meant to do. Commented Dec 7, 2017 at 19:21
26

Plagiarism is passing someone else's work as your own. From what I see, you have passed someone else's work as your own. In your defence, you provide a list of statements:

  • the plagiarised fragment of code is small
  • the plagiarised fragment of code is not necessary
  • the professor's assignments are hard
  • the professor is newly graduated
  • the Student Conduct Board knows little about programming

I can't see how any of them are relevant to the issue in question. The central question is: have you used someone else's work in your own without references. If you did, you plagiarised, and you're facing consequences. Learn the lesson and do not repeat the mistake again.

15
  • 51
    Not all plagiarism is equal, and should not be treated equally. One-size-fits-all punishments are usually a bad idea.
    – aeismail
    Commented Dec 7, 2017 at 0:01
  • 35
    @TheSmartWon You comment "I just don't see it as a big deal" is a very strong argument in favor of a sufficiently severe consequence that you will see it as a big deal in the future. Commented Dec 7, 2017 at 1:36
  • 11
    @TheSmartWon In the real world, understanding and conforming to licensing rules is a really big deal. Incorporating code with incompatible licensing rules in your employer's product could lead to serious legal trouble. Commented Dec 7, 2017 at 3:14
  • 6
    @TheSmartWon The academic world is built on giving credit where it is due. You do not take credit from the works of others. This is why the university considers it a big deal... Commented Dec 7, 2017 at 3:49
  • 10
    @vsz, independent duplication is not plagiarism. Plagiarism is the intentional copying of another's work without proper annotation. Commented Dec 7, 2017 at 6:29
20

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?)

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, citing and documenting your sources 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 and what does it do'.

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. Within the world of Java however, it would be up to you to demonstrate that the code you would be 'common' enough to not be considered to require citation.

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. Until a definitive judgement is made, it is open to debate.

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.

Another argument you can make is that code citation was never taught/stressed/expected by the professor in the class. You were taught what plagiarism was before, most likely when it came to composing essays, but never taught how it applied to coding. Although this argument might be missing a leg or two (especially in the realm of, you should already know), but how would it be reasonable to hold you accountable for something you've never been taught to look out for?


Thanks, that's a good point to raise. He just uses MOSS from Stanford, like I linked in the OP. I don't know his cutoff of percentage similarity before he accuses people.

A plagiarism detector like that is a Tool to lend credence that X was plagiarized, a tool among many. It is by no means a end-all be-all test to determine plagiarism.

Take a breath-analyzer test for DUI's for example, if I ate Poppy Seeds and tested positive, would there be extenuating factors? If all your professor is using to determine plagiarism is a tool, ask whether or not tools can be flawed.

Although this is more rhetoric and logic than programming, I am sure no one can ever claim that a program is perfect. (Except COBOL, because it is 100% perfect) So if it is indeed the only metric that your professor is using, what's the possibility for false positives? Would it be just to unfairly punish students if a program determined that they cheated?

With this said, read your student handbook if you can have an academic adviser through the process. Also contact your ombudsmen services if your school has one. This office can arbitrate issues such as this if the institution allows for it.

In my opinion, a panel of fellow students (without legal or programming backgrounds) would not be best suited to determine if programming plagiarism occurred.


Clarify, is -100% actually 0%? Or is your professor not only giving you a 0% for the assignment, but also further penalizing you an additional amount? I.e. A+B+C=100 (A=20,B=20,C=60), a 0% on A would mean total 80%, a -100% on A would mean total of 40%. - Bluebird

He is further penalizing me an additional amount. I would not be receiving a zero on the project (which my grade could afford), but actually my overall grade is being hurt MORE than the 7% the project is worth. –TheSmartWon

Tricky thing here... (given the update) if the board finds in your favor, this does not mean that the professor would treat you as he/she would other students moving forward. You may find yourself under even closer scrutiny.


@user2264247 He looked at the MOSS with me for about 5 minutes today (exactly the one I posted in the OP), and he only focused on that hash function. He did not even know what the function did before we talked, so I don't think he previously reviewed it. Him and his colleague (idk why she was in the room) stated, that because I copied two lines, my whole program is guilty of plagiarism and that they would accuse me. They really didn't seem to think twice or care about it, probably due to the large number of cases they go through. – TheSmartWon

@FrankFYC That colleague and him also publish papers together, and teach companion courses. They are good friends. It's just his name accusing me on the "integrity violation report", but I'll raise that point for sure. I have no idea what she was doing in the room, all she did was quickly dismiss all my arguments that my professor might otherwise have listened to. It brought her joy to prove me wrong on every point I raised, it was kind of sadistic. I was like another insect trapped in their web! – TheSmartWon

If this was the United States. Read about FERPA. I am not an expert, but I would presume that if your professor allowed another faculty member to see your grades, it would be a violation. This might be the act that blows up in their face. If you are in the US, make sure to establish the fact that both professors were in the same room as you when you discussed the report.

Please see aeismail's answer to a question.

Given the number of other cases, would you presume that the other professor was in those cases as well? As in, the other professor was privy to other student's grade?

They can deny it all they want, but if more than one student claims that both professors were in the room, this would be in effect, a class action (ha, pardon the pun) issue.

Document everything, and set up an appointment with your university's FERPA Coordinator (like a dept. set up to receive FERPA complaints).

19
  • 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? Commented Dec 7, 2017 at 1:38
  • 10
    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.
    – Bluebird
    Commented Dec 7, 2017 at 1:51
  • 9
    The copied hash function seems like the only damning thing to me, but it's literally 2 lines of actual code doing a purely mathematical function. If your plagiarism is compared to an essay, this is like forgetting to cite one single quote in the entire essay. In your actual defense, you may want to rely on innocent until proven guilty and not cite these counterpoints unless he actually points to them as reasons for your guilt. (ie hash might be unnoticed, so no reason to add fuel to the fire) He might also end up looking bad if he inadvertently admits considering MOSS as proof.
    – Jay
    Commented Dec 7, 2017 at 2:42
  • 1
    @user2264247 He looked at the MOSS with me for about 5 minutes today (exactly the one I posted in the OP), and he only focused on that hash function. He did not even know what the function did before we talked, so I don't think he previously reviewed it. Him and his colleague (idk why she was in the room) stated, that because I copied two lines, my whole program is guilty of plagiarism and that they would accuse me. They really didn't seem to think twice or care about it, probably due to the large number of cases they go through. Commented Dec 7, 2017 at 2:47
  • 1
    Yeah, a bibunal (two person tribunal) isn't really necessarily an impartial judge. Definitely something to point out.
    – Bluebird
    Commented Dec 7, 2017 at 3:06
10

You might want to withdraw your appeal (if able)

At first glance, your argument looks entirely reasonable. This is, if you copied two lines of code (assuming that such was allowed) but simply failed to include a citation or forgot to remove it (as you've claimed), then that could basically be chalked up to an honest mistake, on-par with a typo. Such a mistake would be unfortunate, but hardly merit major punishment.

However, as others have noted, a closer look at the code makes it look like you completely copied the original code and then went out of your way to try to obfuscate that fact. This causes all sympathy to go out-the-window; if anything, you may be getting off too lightly.

But, then there's your appeal. The appeal itself appears to be based in a dishonest premise, much like this question does. It looks like you're lying to the honor council!

Such a lie would seem to be grounds for further punishment. This is, first there was the cheating - the severity of which you've now called attention to - and then also the apparently fraudulent defense.

I don't know what to tell you. On the one hand, this is pretty gross and it might actually be better if you learned your lesson now. But as an answer to this question, assuming that you're trying to minimize punishment, it'd seem like you might want to exit the appeal and leave things alone, rather than risk making them worse.

Reference: Regarding the right to not self-incriminate

In the American legal system, it's sometimes thought that defendants can claim innocence without further penalty if that claim is later found to be false. This follows from the Fifth Amendment to the US Constitution which grants protection against self-incrimination.

The funny part about this is that, if you watch a lot of Law-&-Order-type shows (as many Americans do), you may be used to the idea that defendants can lie about not being guilty without penalty, which one might be inclined to apply to other court-like settings, e.g. an honor council review.

The thing is that honor councils aren't courts of law; the right to not self-incriminate doesn't apply. So if you lie in your defense to an honor council, you're still lying before the exact people who'll judge you for that exact misconduct.

Edit: Went to fact-check myself on this point, and it appears that the Supreme Court ruled that lying in one's own defense can increase sentences:

The Supreme Court ruled unanimously today that criminal defendants who take the stand and testify falsely in their own defense may constitutionally be subjected to additional prison time for obstructing justice.

The decision overturned a ruling by a Federal appeals court in Richmond, which held in 1991 that the Constitution bars judges from imposing an additional sentence under Federal guidelines as punishment for "a disbelieved denial of guilt under oath."

-"Court Says False Testimony Can Bring Longer Sentence", NYTimes (1993).

So, apparently defendants can be penalized for lying in their own defense even in US courts.

9

There may be not many reasonable algorithms which implement chaining, but there are literally billions of possible 32-bit hash algorithms. There's no point in claiming that one of them in particular is "common knowledge", or that it's released under GPL, or that you were about to remove it. If you did remove it, your case would look completely different, and I would argue you should be claiming independent duplication. In your current position I don't think you can convince anyone that you have picked the same hash algorithm independently from OpenJDK.

So I believe your best option is to recognize the wrongdoing, then argue that the amount of actually plagiarized code is relatively small and the penalty your professor wants to put in place is disproportionate.

7

I have both experience in teaching (and handling plagiarism) and software patenting/litigation.

I've graded clusters of homework all showing the same error or the same imperfection. I've seen students not able to start their IDE coming up with concise and expert homework solutions, where all the variable had names like "theCounter", "variableA" and "myself", but other than that, their author looked like already having 10 years of experience in the field, and clearly not in need of an undergraduate degree.

A software patent case may be reduced to proving that a single line like "x=0" has been plagiarized. This includes proving motive, people (the fact that company A has attracted people from company B) and state of the art at the time of the alleged plagiarizing (and not now, when the proposed approach is obvious for everybody). Software patent trials are not sterile discussions on how the Smith–Waterman algorithm performed on plaintiff's and defendant's code.

In your case, it seems that you at least "looked" at OpenJDK code before starting yours. Irrefutable evidence is the hash function: the probability to replicate this by chance, according to Mr. Data and C-3PO, is one in 67 trillion-billions. It is further clear that you were not looking for a hash function, but for a hash map implementation. Searching "hash function for strings" or "hash function for strings java" does not yield a result from OpenJDK.

Once you have seen the OpenJDK implementation of hashMap, the problem was straight forward to you. From all the possible ways of approaching the hashMap, conscious or not, you have chosen the one from OpenJDK, because you were terribly biased.

Your code comments are useless. Commenting "length" as "the length" proves that you didn't comprehend the problem, and commenting was intended here to merely fulfill a grading requirement. You waste grader's time. Correct would be: "hash = the Hash of the element to be searched", "Length: the size of the hash table" "returns the position in the hash table of specified length for the element of hash h. It never exceeds the length minus one". Further, you say "get returns the value at the index", which is blatantly wrong for a hash map. Get would return the value at the key. Mixing key and index is a "capital offense" if you do data structures.

My judgement here would be "guilty as charged". You didn't spent time thinking of the solution, but you took an existing solution and probably implemented independently. It defeated the purpose of the homework, which was intended to make you think data structures. Citing OpenJDK source would only make your guilt more obvious (a classic case of self-incrimination during defense). It's like being given a Math problem and you end up citing the book and page showing a solution of the problem. You did a good search job, but the intent of the problem was to make you solve it.

1
6

Other answers have addressed the philosophical/moral questions such as "Is it plagiarism?" "Is it wrong?" etc. But - I would argue you should be focusing on the practical problem at hand, which is:

I'm not sure how to defend this whole case before a Student Conduct Board.

So you have a case to argue...


First, read up on the legally-relevant documents:

  • Student disciplinary regulations
  • Student council procedures
  • Lists of external laws that officially apply
  • Exact statement of the charges against you
  • Precedent - past student conduct board decisions on such matters.
  • Session protocols from past student conduct board sessions (if they're available, which may not be the case).

Then determine if you are allowed, and whether it's a good idea, to be represented by someone: A laywer; a law student; a member of faculty; a student council member etc. If that's available to you, you should at least consult one (even if you don't end up bringing them along) - they surely have more experience than you.

Now, determine if you really want to argue "this part of what I copied doesn't constitute plagiarism". Maybe you could make that argument, I don't know. Even to laymen - if you have enough time (which you may not), you may be able to explain how programs are compiled from source code and how some code is not really used. You could present examples of what seems like plagiarism but is in fact nearly-identical code written independently by different people.

Frankly, I doubt this would get you very far ahead considering the circumstances. Even if you are right theoretically (a question about which I'm not commenting), and even if you could explain this to the board - it might not want to hear such an argument.

On the other hand, I would guess (baselessly!) that a more convincing argument might be something like (brief summary):

I'm very sorry for what I've done and do not deny it was disallowed, inappropriate and immoral.
I was tempted to plagiarize because of ABC, which, while not excusing my behavior, has also led 30% of the class to be tempted to plagiarize, suggesting an objective problem in addition to my personal failing.
I've made amends in ways XYZ.
In cases C1 and C2, which I argue are comparable, the penalty was much lower.
Finally, I would like the board to take my personal circumstances DEF into account when considering this case.
I will abide by any decision the board renders.

and leave it at that.

2
  • 2
    The question is the title asks "is it a plagiarism?" and not "how do I defend my case?" The problem, imho, is that student does not accept the fact was a plagiarism and tends to dismiss it as "not a big deal". This position, imho, is not worth defending. Commented Dec 7, 2017 at 13:38
  • @DmitrySavostyanov: OP asked several questions, and the one in the title is not the only one. I agree, he seems to be trying to dismiss what he did as "not a big deal", but he has a long time to contend with the moral dilemma, and just one month to prepare for his hearing. I claim that that should be a focus. Hopefully it will also help him stop dancing around what he did.
    – einpoklum
    Commented Dec 7, 2017 at 13:43
2

You should definitely protest the proposed punishment, because many institutions do not allow for such a punishment as the one your professor wants to assess. (In other words, your instructor can't give you a grade of -100%, or any grade less than zero for a given part of your grade.)

On the matter of copying code as plagiarism, that's a much thornier claim. Using somebody else's code is a problem, but if there really isn't another way to do something, then how do you claim plagiarism? Plagiarism doesn't extend to "obvious" statements. For instance, it's not plagiarism if two calculus textbooks solve an integral using a series of equations in the same way, because basically it's the only way you can do it. On the other hand, if you write a bunch of text around it that's the same, then you've committed plagiarism.

5
  • 9
    I don't think "[at most institutions] your instructor can't give you a grade of -100%, or any grade less than zero for a given part of your grade" is really true. I don't think it's uncommon for the penalty for plagiarizing to be more than the assignment is "worth".
    – ff524
    Commented Dec 7, 2017 at 0:02
  • 6
    The regulations of "most institutions" are irrelevant. Only the regulations of this institution matter in this case. Staff members are usually aware of the rules, but if this particular punishment goes beyond what's allowed, it can be appealed (but not the plagiarism case itself). Commented Dec 7, 2017 at 0:06
  • 2
    I've changed "most" to "many"—but it's certainly worth checking. I know I've had proposed penalties substantially reduced, and couldn't even assign a "0" on an exam because of cheating.
    – aeismail
    Commented Dec 7, 2017 at 0:06
  • 1
    @DmitrySavostyanov: I'm aware that other institutions' policies are irrelevant, but I'm providing the OP with a reason why an appeal should be considered, even if he's admitted to plagiarism. (And he can argue that the plagiarism is certainly not as severe as alleged, which may make a difference).
    – aeismail
    Commented Dec 7, 2017 at 0:07
  • @aeismail: It seems to me that your latest comment above would make a better answer than your answer. If the penalty assigned by the instructor exceeds what the institution's policy allows, then the OP should certainly object to it. If not (and they definitely should find out beforehand), all they can argue is that it's not in proportion to the severity of the offense, which in any case will be a subjective call in the end. Commented Dec 7, 2017 at 13:14
2

Plagiarism is a difficult topic in computer science, as there is only a limited number of code pieces that lead to the same result, and only one of them can be considered an optimal solution.

You in fact did copy the code from the Java libs, both the actual code and the naming of variables suggest that. Therefore it would have been your duty to cite this properly. In this strict point of view your professor is correct, and probably he is also correct in the other cases you mentioned. If many people make mistakes, it still is the problem of the one person making the mistake, not the one correcting it.

If it is ethical is however an entirely different topic.

When programming complex functions it is good practice to not re-invent the wheel, but instead use existing, well-tested code from others. However - as from the linked article - "reinventing the wheel is often necessary in order to work around software licensing incompatibilities"

If you had the specific order to not copy existing code and you failed to obey that order, the issue is on your side. Software patenting is a severe problem in the United States, several smaller companies went bankrupt because of it, larger companies own certain patents only to use them to counter-sue should the be sued (see Apple vs Samsung). Essentially software patents have transformed to a kind of weapon that can be used to erase unwanted competition from the market. Therefore it is important for any software developer (in your country) to be able to detect and work around such licensing issues.

I do not know the intentions of your professor, but it might be possible, that he added that clause specifically because he is aware of the consequences of 'code-stealing', and his harsh reaction is a way to teach you to avoid those issues in situations where it would really hurt.

In other, not so narrow-minded parts of the world, software patents or 'plagiarism' as in your case are much less of a problem. This means that in other countries your work could have been considered differently, some might have even reduced your points for not copying existing code (unnecessary reinvention of the wheel). But you are not living in "other countries" so also from an ethical point of view your professor might be harsh but he is still correct.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .