Skip to Main Content

Computer science: Plagiarism

Plagiarism

The Icelandic Web of Science (Vísindavefur HÍ) defines plagiarism as “representing another's original work as one's own”. Plagiarism thus extends not only to taking credit for written works of others but all original works, such as texts, computer code, performed or painted works of art, photographs, all sorts of design, be they architecture or knitted work ....

Plagiarism is subject to the Icelandic Copyright Act No. 73/1972 and penalties stipulated therein. The Copyright Act applies to original works that are considered published, that is, when copies of a work with proper permission from the author are offered for sale, loan, or rent, or are distributed in some quantity to the public via other means.

RU greatly emphasizes high-quality scholarly work and integrity as stated in RU codes and rules. 

RU Project Work Codes of Conduct requires students to respect copyright and that all projects submitted by a student shall be his or her original work and that each submitted project shall be unique. All reuse of projects, whether within a course, between courses, or between study programs, is not permitted unless otherwise noted.

In addition, the 8th paragraph of RU code of ethics states as follows: "We respect intellectual property rights, do not take credit for the work of others and always cite the sources we use in accordance with accepted scientific practices."

RU Study and examination rules affirm the emphasis on respect for copyright: "Reykjavik University requires that your projects be your original work. This means that the work you do is your own from beginning to end without assistance from others, and you never copy others' text or work and present it as your own. References shall always be cited and rules on working with references also apply to the copying of a student's own work.

Each submitted project shall be unique. All reuse of projects, whether within a course, between courses, or between study programs, is not permitted unless otherwise noted."

The university uses Turnitin plagiarism detection software which enables users to spot plagiarism and/or wrong references and citing of sources.

When writing computer code the same principles for plagiarism apply as anywhere else.  When computer code is borrowed and minor details that do not affect the code function are changed, it does not make the code yours.
The program below appears on page 118 of the textbook Algorithms in C by Robert Sedgewick, published by Addison-Wesley in 1990.

Source: quicksort (int a [ ], int l, int r)
     {
         int v, i, j, t;
         if (r > l)
            {
               v = a [ r ]; i = l-1; j = r;
               
               for ( ; ; )
                   {
                      while (a [++i ] < v) ;
                      while (a [--j] > v);
                      if (i >= j) break;
                      t = a [i]; a [i] = a [j]; a [j] = t;
                   }
               t = a [i]; a [i] = a [r]; a [r] = t;
               quicksort (a, l, i-1);
               quicksort (a, i+1, r);
            }
     }

Plagiarized example 1 of the program above:

mysort (int data[], int x, int y){
(B)=(A);}
   int pivot;
   int i, j;
   int temp;
   
   if (y > x){
       pivot = data[y]; i = x-1; j = r;
       while (1){
           while (data [++i] < pivot);
           while (data [--j] > pivot);
           if (i >= j) break;
           temp = data [i]; data [i] = data [y]; data [y] = temp;
       }
       temp = data [i]; data [i] = data [y]; data [y] = temp;
       mysort (data, x, i-1);
       mysort (data, i + 1, y);
   }
}

Source: Avoiding plagiarism: Writing computer code (University of Pennsylvania).

This is a case of plagiarism because the exact structure of the original program has been used but only minor details changed that do not affect the function of the program at all. The code might seem different to a layman but it's function is not.

The original code was altered as follows:

  • Names of variables have been changed: a, l, r, v and t are changed to data, x, y, pivot and temp (respectively)
  • The construct for (;;) was replaced with the equivalent construct while (1)
  • The name of the procedure quicksort was changed to mysort
  • The indentation and the division of the program elements were changed between lines

Plagiarized example 2 of the program above:

#define Swap(A,B) { temp=(A); (A)=(B); (B)=A;}

void mysort (const int* data, int x, int y){
   int temp;
   while (y > x){
      int pivot = data[y];
      int i = x-1;
      int j = r;
      while (1){
         while (data [++i] < pivot){/*do nothing*/}
         while (data --j] > pivot){/*do nothing*/}
         if (i >= j) break;
         swap (data [i], data [y];
         }
swap (data [i], data [j];
         mysort (data, x, i-1);
         x = i+1;
    }
}

Source: Avoiding plagiarism: Writing computer code (University of Pennsylvania).
 

This is also a case of plagiarism, because although more changes have been made than in the previous example (improvements even), this code is clearly derived from the original program in the textbook. Such a modification can be compared to paraphrasing text from a reference book without citing the source.

Brian Martin professor of social sciences at the University of Wollongong and longtime president of "Whistleblowers Australia" defines several types of plagiarism:

  • Word for word plagiarism: The copying of phrases or passages out of a published work without using quotation marks, without acknowledging the source, or both.
  • Paraphrasing plagiarism: The changing of some of the words in phrases or passages, but not enough, with or without acknowledging the source.
  • Plagiarism of secondary sources: When a reference is given to original materials and even quoting original material but that original source has not been looked up, but obtained from a secondary source.
  • Plagiarism of the form of a source: The original source is looked up and cited, but the secondary source is used in the text without citing the secondary source.
  • Plagiarism of ideas: The most common of plagiarisms. An original thought or idea from another is used without citing the source or author.
  • Plagiarism of authorship: The putting of a name to someone else's work.
  • Institutionalized plagiarism: Politicians, famous sports figure, business executive or movie star gives a speech, writes a book or newspaper column but the actual writing is done by someone elsa, i.e. ghostwriting, honorary authorship. 
    Martin, B. (1994). Plagiarism: A misplaced emphasis. Journal of Information Ethics, 3(2), 36-47. Retrieved October 31. 2016 from http://bmartin.cc/pubs/94jie.pdf 
  • Self-plagiarism: A paper is reused, in the same course, another course or another study program without permission or proper citation. RU rules do not allow the reuse of papers in any way, shape or form without permission. It is therefore not allowed to use a bachelor final paper for a masters theses without due permission and citations.

According to the reference standard of the American Psychological Association (APA) each journal article is supposed to add to the knowledge in a specific field, and it is frowned upon when a journal article is published in more than one journal.


Example of an indirect quotation (for direct quotations see the relevant reference standard APA, IEEE or OSCOLA):

Original text from the book Story of Mexico by Conrad Stein, published by Morgan Reynolds in Greensboro N.C. in 2007: "For more than 10,000 years men have lived where now is Mexico. The first tribes were groups of hunters who killed giant mammoths on the plateau. Around 700 AC the hunters learned to grow corn. The hunting societies of Mexico slowly became agricultural societies. Agriculture had the effect that the societies stabilized and civilization was developed."

Indirect quotation (incomplete): For the last 10,000 years Mexico has been populated. Giant mammoths were killed by hunters on the plateau. Long before the birth of Christ the hunters learned to grow corn and the hunting societies became agricultural societies which brought stability and civilization developed.

When an indirect quotation is written it is not enough to change a few words. You need to borrow the idea and put it in to your own words and cite appropriately i.e. APA parentheses with the author name and publication year; IEEE a number in square brackets; OSCOLA a number in superscript and a footnote.


The main components in the original text:

  • The first tribes in Mexico were hunters
  • After learning to grow corn the hunters became farmers
  • Agriculture was the main reason for the development of civilization

Indirect quotation (the idea is borrowed and rephrased and cited properly): The first tribes in Mexico were hunters. After learning to grow corn the hunting tribes became farmers whereas grain farming and agriculture were very important in the development of civilization in Mexico.