You will be presented with documentation blocks extracted from API reference documentation (Javadocs and the like). For each block, you will be also presented with the name of its corresponding package/namespace, class, method, or field. Your task is to read each block carefully and evaluate where the block contains knowledge of the different types described below. Apply the following rules when doing so:
[Something removed here]
that indicate left-out nested documentation blocks).
Read (and re-read whenever needed) the following descriptions very carefully. They explain how to recognize each knowledge type.
Describes what the API does (or does not do) in terms of functionality or features. The block describes what happens when the API is used (a field value is set, or a method is called). This also includes specified behavior such as what an element does, given special input values (for example, null).
Functionality and behavior knowledge can also be found in the description of parameters (e.g., what the element does in response to a specific input), return values (e.g., what the API element returns), and thrown exceptions.
Only rate this type as true if the block contains information that actually adds to what is obvious given the complete signature of the API element associated with the block. If a description of functionality only repeats the name of the method or field, it does not contain this type of knowledge and you should rate it as false, and instead rate the knowledge type non-information as true. For example, this would be the case if the documentation for a method called getTitle was
Similarly for constructors, if the documentation simply states "Constructs a new X", "Instantiates a new object", or something similar the value is false (with non-information coded as true). In some cases non-information will be phrased to look like a description of functionality, for examples with sentences that start with verbs like "gets", "adds", "determines", "initializes". Carefully read the name and signature of the API element and only assign a value of true for this knowledge type if the block adds something to the description of the element.
However, if any other details are provided, rate this type as true. For example:
Should get a value of true because of the additional information about the value of the message field.
Mentioning that a value can be obtained from a field, property, or getter method does not constitute a description of functionality, except the API performs some additional functions when the value is accessed. For example, the block below does not represent a description of functionality. The Non-information type for this block should be rated as true.
Note IMPORTANT: Description of functionality is not limited to the functionality of the element associated with the block, but the API as a whole. However, if the block explains a sequence of method calls or creation of particular objects (e.g. events) code this as Control-Flow. For example, if setting the value of a field results in some perceived behavior by the framework, this knowledge counts as functionality. If the block describes a resulting sequence of method calls or events fired, this is control flow. If the block contains both, then both should be coded as true.
Explains the meaning of terms used to name or describe an API element, or describes a design or domain concepts used or implemented by the API. Code this knowledge type with a value of true if an explanation of concepts is provided, with some useful details. The sentences below show an example of a description of the concept of "secure sockets".
Note: Basic description of the parameters does not represent concept description, such as
In this case, the knowledge type Non-Information should be set to true.
Specifies what users are allowed / not allowed to do with the API element, in particular any caller-created condition that will raise an exception. Directives are clear contracts. For example how callers must deal with return values, what is permitted by implementers of abstract elements, limitations on the sequences in which API elements may be accessed, or any explicit mention of the input values that are allowed (or not allowed) for an API element (e.g. parameters values for methods or values that can be assigned to fields).
In Python, mentioning the required type of a parameter (as opposed to other constraints on the parameter value) is not considered a directive, unless a forbidden type is mentioned explicitly or the term "must"/"has to" etc is used.
In contrast to Patterns, directives represent specific contracts or constraints on how to use a specific element and the API.
Explains the purpose of providing an element or the rationale of a certain design decision. Typically, this is information that answers a "why" question: Why is this element provided by the API? Why is it this designed this way? Why would we want to use this? This includes in which context an API element can (or should) be used, or the advantages of using the element.
Note: Descriptions of cases, where an element (such as a field) is used by the API, fall under either Functionality or Control-Flow, as appropriate. Note also that sometimes the difference between purpose and functionality can be confused. For example, for a method drawCircle(int r) the description "draws a circle of radius r" could be interpreted as "the purpose is to draw a circle", or "this method should be used to draw a circle". For this study this is not the correct interpretation. Only code a value of true for purpose if the block contains a description of the purpose that is not self-evident from the method"s functionality.
Describes quality attributes of the API, also known as non-functional requirements, for example, the performance or security implications of using the API element (or related elements), such as resources consumed or the execution time of a method. Also code with a value of true if the block provides information about API"s internal implementation that is only indirectly related to its observable behavior. For example, indicates the main data structures and algorithms employed.
Describes how the API (or the framework) manages the flow of control, for example by stating what events cause a certain callback to be triggered, or by listing the order in which API methods will be automatically called by the framework itself. Wherever you find a clear description of the sequence of methods that result in calling an API, code control-flow knowledge as true (see Functionality).
Note: Descriptions of how the programmer should organize the control-flow of their code when using the API do not apply here. Instead, see the knowledge types Patterns, Functionality, or Example.
Describes the internal organization of a compound element (for example important classes, fields, or methods), information about type hierarchies, how elements are related to each other, or the static properties of an element. Basically, structural knowledge is knowledge about how different API elements related to each other.
Note: Pointers to other sections of the reference documentation of the API (element names, hyperlinks, manually-added "see also" references) can also represent structural information if they indicate how elements relate to each other or what their properties are. (For references to elements in other APIs or to other documents, see the variable References.) For example, a note such as the following contains structural knowledge because it indicates another API element similar to the one documented:
However, simply adding a link to another part of the API does not automatically provide structural knowledge if it is not also mentioned why or how this element is related, or its role in the structure of the API. For example
The first link simply points to a collection of constant definition: it does not say anything about how API elements are organized; The second link simply indicates the presence of another method that could be of interest to the programmer, it does not indicate how it relates to the current block. Both of these references should not be marked as structural knowledge.
Only evaluate structural information contained in the block: do not evaluate any automatically generated information, such as the structural information contained in the declaration of an element (e.g. extends MyInterface), or generated links such as "specified by". Be careful. Do not consider any information that is directly derived from the element name, declaring elements, or signature.
Describes how to accomplish specific outcomes with the API, for example, how to implement a certain scenario, how can the behavior of an element be customized, how can the abstract class be implemented, and how some values can be obtained or some objects created.
Note: This knowledge type is different from Purpose in that it describes how to do things, not why elements should be used. It is also different from Directives in that it provides guidelines and "how tos". In contrast to Directives, patterns information provides general hints on how to achieve various outcomes with the API, not usage rules and constraints.
The block provides code examples of how to use and combine elements to implement certain functionality or design outcomes.
Note: Code example can also be scripts or other machine instructions. They can be found with patterns but sometimes also without. Similarly, patterns can be enhanced with code example, but can also be found without.
The block contains knowledge about various aspects related to the environment in which the API is used, but not the API directly. For example, compatibility issues, differences between API versions, licensing information. For links to other documents use the Reference types instead.
In Python, a phrase such as "Changed in version x.y:" is always classified as environment; the subsequent text may or may not be.
The block includes any pointer to external documents, either in the form of hyperlinks, tagged "see also" reference, or mentions of other documents (such as standards or manuals). External documents are any documents except pages in the reference documentation of the Framework currently studied (Java or .NET).
In Python, any hyperlink into the Glossary is considered an External Reference.
Rate this knowledge as true if the block contains any complete sentence of self-contained fragment of text that provides only uninformative boilerplate text. Common examples include restating the name of the API element without adding any detail, or stating the obvious. Another common case is where the information to explain the return value just restates the information in the rest of the block. However, if a single sentence contains both uninformative and informative text, we consider that the uninformative part of the sentence is only context for the informative part, and in this case you should not rate it as non-information.
Note: Non-Information is not mutually
exclusive with Functionality knowledge. If the block only restates
the name of a method, rate Functionality as false and Non-information as
true. If the block provides a true description of the functionality, but just
restates this information for example with the return tag, then rate
Functionality as true and Non-information as true. In brief, rate
Non-information as true whenever a block contains complete sentences
or self-contained text fragments that provides no
information.
The next example shows a combination of directive (the first sentence) and non-information (the second sentence). Although the first sentence provides a directive (do not use this method in your code), the second sentence is just a re-statement of the method"s name. This block would receive a value of true for both the directive and the non-information types.
Do not evaluate the name of the method. However, you need to read and understand the name to be able to evaluate the documentation.
Please ignore/do not evaluate the following automatically generated sections and blocks:
[Something removed here]