If you're writing a research paper in computer science or another technical discipline, you may want to include source code in your research sources, such as code you find in a GitHub repository. Generally, you should include enough information in your list of references at the end of your paper to enable your reader to locate the code and review it for themselves. However, the specific format of your citation will vary depending on which citation guide you use. In the computer sciences, Institute of Electrical and Electronics Engineers (IEEE), Association for Computing Machinery (ACM), and Council of Science Editors (CSE) citation styles are most commonly used.

Method 1
Method 1 of 3:

IEEE

  1. 1
    Start your entry with the name of the author of the code. If the author is an individual, type their last name, followed by a comma, then their first initial. Do not place a period after the initial. If the code is produced by a company or institution, use that name as the name of the author.[1]
    • Example: Facebook
    • If you're having a hard time finding the author of a GitHub repository, look on the copyright page. List the entity that owns the copyright as the author.
  2. 2
    Provide the date the code was created. Place the date in parentheses after the name of the author. Do not place any punctuation after the closing parenthesis. Use the copyright date if you can't find a specific date the code was created.[2]
    • Example: Facebook (2020)
    Advertisement
  3. 3
    Include the title of the program or source code and identify the type. Type the title of the program from the ReadMe file. Copy the capitalization used by the authors to identify the code, since it may have significance. Use the description "Source code" for a GitHub repository, enclosed in square brackets. Place a period after the closing square brackets.[3]
    • Example: Facebook (2020) Recoil [Source code].
  4. 4
    Close with the URL where the code can be found. For a GitHub repository, your URL will be the basic URL for the repository. Place a period at the end of the URL to close your entry.[4]
    • Example: Facebook (2020) Recoil [Source code]. https://github.com/facebookexperimental/Recoil.

    IEEE Reference List Format: AuthorLast, I (Year) Title of Code (Version #.#) [Source code]. URL.

  5. 5
    Use a bracketed number to refer to the entry in your Reference List. In-text citations aren't necessary in IEEE style. Instead, refer to the source by a number in square brackets. You'll use the same number each time you reference that source in your paper.[5]
    • When you create your Reference List, list the sources in the order they appear in your paper, using the same numbers that you used throughout your paper. It can help to keep a list of sources as you're writing, so you'll know which source is attached to which number.
  6. Advertisement
Method 2
Method 2 of 3:

ACM

  1. 1
    Start your References entry with the name of the author. Type the name of the author of the code in first-name, last-name format. If the code or repository is owned by a company or institution, that company or institution is usually considered the author.[6]
    • Example: Hoanh An.
  2. 2
    Provide the year the repository was created. If you can't find an exact year the repository was created, use the copyright year instead. Type the year after the author, followed by a period.[7]
    • Example: Hoanh An. 2019.
  3. 3
    Add the title of the program. Type the title of the program in sentence case, capitalizing the first word and any proper nouns in the title. If there's a subtitle, place a colon after the title and type the subtitle in sentence case. Place a period at the end.[8]
    • Example: Hoanh An. 2019. Ultimate Go study guide.
  4. 4
    Close with the URL for the repository and the year you accessed it. Type the full URL for the repository, followed by a period. Then, add the year you accessed the repository in parentheses. Place a period outside the closing parenthesis.[9]
    • Example: Hoanh An. 2019. Ultimate Go study guide. https://github.com/hoanhan101/ultimate-go. (2020).

    ACM References Format:

    AuthorFirst Author Last. Year. Title of program. URL. (AccessYear).

  5. 5
    Use a number in square brackets for your in-text citations. ACM references are listed in the order they are cited in your paper. At the end of any sentence in which you reference the code, type a sequential number in square brackets. Use the same number for that source whenever you reference the same code.[10]
    • If you reference multiple sources in the same sentence, include each of the numbers in the same set of square brackets, separated by commas.
  6. Advertisement
Method 3
Method 3 of 3:

CSE

  1. 1
    Start your Bibliography entry with the name of the author. Type the last name of the author, followed by a comma, then the author's first initial. If you're having a hard time finding the author, look at the copyright page — the person or institution who owns the rights to the code is considered the author.[11]
    • Example: Palmer, J.
  2. 2
    Add the year of publication or release. The year of publication or release is typically also listed on the copyright page. Type the year after the name of the author, then place a period after the year.[12]
    • Example: Palmer, J. 2017.
  3. 3
    Include the title of the program or repository. Type the title in sentence case, capitalizing only the first word and any proper nouns. If the title has code in it, copy the capitalization used in the title. For a subtitle, place a colon after the title and then type the subtitle in sentence case. Placed a period at the end.[13]
    • Example: Palmer, J. 2017. Formik: Build forms in React, without the tears.
  4. 4
    Provide the location and name of the publisher. For a GitHub repository, GitHub, located in San Francisco, California, is considered the publisher. Type the city first with the state abbreviation "CA" in parentheses, followed by a colon. Then, type the name of the publisher, followed by a semi-colon.[14]
    • Example: Palmer, J. 2017. Formik: Build forms in React, without the tears. San Francisco (CA): GitHub;
  5. 5
    Close with your date of access and the URL. Inside square brackets, type the word "accessed" then add the date you last accessed the code in year-month-day format. Abbreviate all months to 3 letters. Place a period after the closing square bracket. Add the URL for the repository, then place a period at the end.[15]
    • Example: Palmer, J. 2017. Formik: Build forms in React, without the tears. San Francisco (CA): GitHub; [accessed 2020 May 16]. https://github.com/jaredpalmer/formik.

    CSE Bibliography Format:

    Author A. Year. Title of program. San Francisco (CA): GitHub; [accessed Year Mon Day]. URL.

  6. 6
    Cite your sources in-text following 1 of 3 in-text citation systems. While most style and format guides have a single preferred method of in-text citation, CSE has 3 that are equally acceptable. Which one you use depends on the requirements of your instructor or advisor, academic department, or publication. Your choices are:[16]
    • Citation-name: Superscript numbers identify in-text citations. Each number corresponds to a reference in your alphabetized Bibliography at the end of your paper.
    • Citation-sequence: Superscript numbers identify in-text citations. The Bibliography at the end of your paper is listed in the order the references appear as citations in your paper.
    • Name-year: Use parenthetical in-text citations with the name of the author and the year the source was published. The Bibliography at the end of your paper is in alphabetical order.
  7. Advertisement

About This Article

Jennifer Mueller, JD
Co-authored by:
Doctor of Law, Indiana University
This article was co-authored by wikiHow staff writer, Jennifer Mueller, JD. Jennifer Mueller is a wikiHow Content Creator. She specializes in reviewing, fact-checking, and evaluating wikiHow's content to ensure thoroughness and accuracy. Jennifer holds a JD from Indiana University Maurer School of Law in 2006. This article has been viewed 87,214 times.
6 votes - 83%
Co-authors: 3
Updated: July 26, 2022
Views: 87,214
Categories: Research Papers
Advertisement