When using computer code from another source you should:
In describing the class PluginProxyUtil in the Apache Project source code, the developer cites the source as a post in a forum and includes the URL, author and date:
* A utility class that gives applets the ability to detect proxy host settings.
* This was adapted from a post from Chris Forster on 20030227 to a Sun Java
* forum here:
(Source: Apache Project source code http://svn.apache.org retrieved in July 2019.)
In the function OutputTraceToStream in the Google Chrome stack_trace_win source code, the developer cites the source code as the Microsoft Developer Network and includes a URL:
// Code adapted from MSDN example:
(Source: https://github.com/adobe/chromium/blob/master/base/debug/stack_trace_win.cc retrieved in July 2019.)
At the top of the Google Chrome stack_trace_win source file, note the copyright and reference to the open source license:
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
If you incorporate this code into a program, you should follow the terms outlined in The Chromium Authors' open source license file, which is shown below. While this license only requires that you duplicate the copyright and license if you are redistributing the code, it is good practice to always duplicate the copyright in your code, and/or store the license in a file with the code. This way, if you want to redistribute the code later, intellectual property reviewing becomes much easier.
// Copyright (c) 2014 The Chromium Authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
//* Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//* Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
//* Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
(Source: The Chromium Authors license file https://src.chromium.org/viewvc/chrome/trunk/src/LICENSE retrieved in July 2019.)
(These examples are taken from Academic Integrity at MIT: A handbook for students. https://integrity.mit.edu/handbook/writing-code)
There are no guidelines for referencing computer or source code. The Library is using the guidelines for computer programs.
Author. Title of work [source code]. Version. Location: Publisher; Year of publication [cited Year Month Day]. Available from: URL
Smith, P. GraphicsEditor [source code]. Version 3.0. [place unknown]: Graph1; 2020 [cited 2021 January 15]. Available from: http://Graph1.com/GraphicsEd