The ConDec Jira plug-in offers a feature that automatically classifies text either as relevant decision knowledge elements or as irrelevant. The text classifier consists of a binary and a fine-grained classifier.
Ground truth data is needed to train and evaluate the text classifier. ConDec installs two default training files: one rather small one and one with the data used for the NLP4RE'21 paper.
To reproduce the results from the NLP4RE'21 paper do the following steps:
- Install the version 2.3.2 of the ConDec Jira plug-in and activate the plug-in for a Jira project.
- Navigate to the text classification settings page (see section below).
- Choose the training file CONDEC-NLP4RE2021.csv.
- Set the machine-learning algorithm to Logistic Regression for both the binary and fine-grained classifiers.
- Run 10-fold cross-validation (you need to set k to 10).
- ConDec writes evaluation results to a text file. The output file will be similar to evaluation-results-CONDEC-NLP4RE2021-LR-10fold. The results might differ a little bit because of the random undersampling that we did to balance the training data.
Basic descriptive statistics on ground truth files can be calculated using the R file training-data-analysis.r.
The classifier predicts whether the textual parts in the Jira issue description, comments, or commit messages are relevant decision knowledge elements and, if yes, it annotates the parts accordingly. ConDec performs the automatic annotation directly in the text of the Jira issue description and comments when developers save textual changes. Besides, ConDec offers a dedicated view for text classification. In the text classification view, developers manually approve the classification result, i.e., developers decide whether the annotations are correct or not. Developers can trigger the automatic text classification using the Auto-Classify button.
Text classification view with three sentences not yet manually approved/validated
The text classifier can be trained and evaluated directly in Jira.
Configuration view for the automatic text classifier
The following class diagram gives an overview of relevant backend classes for this feature. The class TextClassifier is responsible for processing the text of the description and comments of a Jira issue. It uses a classifier type, ground-truth data, as well as some configuration information in order to classify the text. The ClassificationManagerForJiraIssueText calls the TextClassifier to classify the text. The JiraTextExtractionEventListener is used for online learning, so that the classifier can learn while in use. Developers manually approve classifications by setting them as "validated". Any time a validated element is added, the classifier learns.
Overview class diagram for the automatic text classification
The Java code for the automatic text classification can be found here:
The UI code for the automatic text classification can be found here:
- Velocity templates for configuration and evaluation
- Velocity template for text classification view
- JavaScript code for text classification
In the following, important decision knowledge regarding the automatic text classification feature is listed. The knowledge was exported via ConDec's knowledge export feature starting from the user sub-tasks ST: Continuously document decision knowledge in Jira, ST: Set up rationale management process, and ST: Evaluate the performance of algorithms and "smart features". Decision knowledge elements that belong to the decision group text classification and that are directly and indirectly (transitively) linked to the sub-tasks are shown.
-
ST: Continuously document decision knowledge in Jira (CONDEC-188)
How to manually classify text as an decision knowledge element?
How to enable the user to manually classify parts/sentences of Jira issue comments and description into the knowledge types activated for the project?
How can we update knowledge elements from Jira issue text after the text was edited by the user?
How can we get the part of text from database while creating a colored decision knowledge macro in Jira issue text?
Which decision knowledge types do we enable for manual annotation in Jira issue text?
How to identify invalid parts of text in database?
How to deal with an updated Jira issue description or comment?
Update the existing elements in database if the number of total elements does not decrease!
Update the existing elements in database if the number of total elements stays the same!
Reread decision knowledge elements from Jira issue description or comment if the user added a new element or deleted an existing element in the text!
How should we deal with Jira issue text annotated with decision knowledge tags that includes text formatting, inner macros, images and so on?
Render text formatting, inner macros, images and so on in knowledge classification macros!
Do not render text formatting, inner macros, images and so on in knowledge classification macros, only render line breaks!
A knowledge element should be formulated in a short easy way so that it is easy to understand without cluttering through images, macros and so on. All other information is context information, which a developer can read from the text.
Is consistent with the graph/tree nodes because there is also nothing rendered.
Popular Jira macros such as code also do not render inner macros.
Where do we show a tree viewer/indented outline with decision knowledge extracted from Jira issue text?
How can we remove the icon's textual representation from Treant nodes?
Which libraries should we use for automatic text classification?
How should we indicate that an automatic classified part of text needs manual approval?
Should we integrate parts of Jira issue description and comments into one database and model class or separate them?
How can we avoid that the parenthesis of the knowledge type macro is escaped in text mode?
How do we determine whether a part of text needs to be classified as relevant or irrelevant wrt. decision knowledge?
We use the attribute "isRelevant" to determine hether a part of text needs to be classified as relevant or irrelevant wrt. decision knowledge!
rejected: The Sentence class (later PartOfJiraIssueText) gets an attribute "isPlainText". This allows to distinguish between plain text and other, like quotes, code, noformat (log files,..), etc. If isPlainText is set to false, these sentence instances will not be passed to the classification functions or labeled on the UI.
How can the system distinguish between a plain text comment and a special formatted comment?
What behavior do we expect when changing the type of decision knowledge in Jira issue text?
How can we build a view for the extracted decision knowledge from Jira issue text (DecXtract)?
Should we do default options/opt-out nudging for the automatic text classifier?
Where should the information about automated text classifications be displayed?
Should we add macro tags when automatically classifying issue comments?
Which information about the automated text classifications should be displayed?
Which attributes should we store for a part of Jira issue text (which can be relevant wrt. decision knowledge or irrelevant)?
rejected: We renamed START_SUBSTRING_COUNT to START_POSITION and END_SUBSTRING_COUNT to END_POSITION as attributes to store a part of Jira issue text!
rejected: I removed the TAGGED_MANUALLY column since it is currently always set to true because of the added macro tags!
rejected: I deleted the ARGUMENT and the USER_ID column (as former attributes to store a part of Jira issue text)!
I made isTaggedFineGrained a derived method that returns true if the knowledge type is not OTHER.
rejected: I renamed the column KNOWLEDGE_TYPE_AS_STRING into TYPE in order to use the same terminology as in the CONDEC_ELEMENT table (as attributes to store a part of Jira issue text)!
We store the following attributes for a part of Jira issue text: id, comment id (0 means documented in description), start and end position in the text, project key of the Jira project, whether it is validated (manually approved), knowledge type, and status!
How can new comments automatically be linked to other decision knowledge?
What should be presented in the Jira issue tab panel for decision knowledge? (CONDEC-401)
We decided to remove the tab panel and add a tab in the ConDec Jira issue module instead!
rejected: We used to show representations with tags, e.g. [issue] ... [/issue]!
We use icons and colors to indicate decision knowledge!
rejected: We used to show a tree viewer in tab panel for decision knowledge!
discarded: We could show the same text as in the comment tab panel!
How to deal with irrelevant parts of Jira issue text in knowledge graph? (CONDEC-362)
rejected: We used to include only relevant parts of text (=decision knowledge elements) into knowledge graph! (CONDEC-365)
Include irrelevant parts of text into knowledge graph! (CONDEC-363)
Add parameter to Graph constructor to specify whether irrelevant sentences should be included! (CONDEC-367)
We decided to add irrelevant parts of text/sentences to the knowledge graph and filter them out per default!
How can we classify text as decision knowledge (or as irrelevant wrt. decision knowledge)?
Which classifier algorithm to choose for automatic text classification?
-
ST: Set up rationale management process (CONDEC-179)
When should the automatic text classifier be enabled?
The automatic text classifier should be enabled by default, as an opt-out nudge!
This would use a lot of computing power, as all text in the project is classified when the classifier is activated
The developers would not need to classify the text manually (even if the rationale manager did not actively activate the text classifier).
The quality of the text classifications is not high enough for this to be useful.
The automatic text classifier should not be enabled by default!
How can we enable the rationale manager to decide whether automatic classification should be enabled?
How can the rationale manager decide s/he wants to use the extraction of decision knowledge elements from Jira issue description and comments (=DecXtract) or not?
rejected: There used to be a toggle on the project settings page to enable/disabled the extraction of decision knowledge elements from Jira issue description and comments (DecXtract)!
Make the extraction of decision knowledge elements from Jira issue description and comments (DecXtract) a default feature of ConDec! It cannot be disabled by the user!
Should we do default options/opt-out nudging for the automatic text classifier?
Should only user-validated data be exported?
-
ST: Evaluate the performance of algorithms and "smart features" (CONDEC-681)
How can the ground truth data for the text classifier be balanced so that it is not biased towards one (or more) classes?
Balance ground truth data for the binary and fine-grained classifiers using random undersampling, split lists of knowledge elements for k-fold cross-validation in such a way that the knowledge type is equally distributed!
Use synthetic minority oversampling technique to balance the ground truth data!
How can a researcher/data scientist evaluate the performance of the automatic text classification?
How can we make the evaluation results of the automatic text classification accessible?
Kleebaum, A., Paech, B., Johanssen, J. O., & Bruegge, B. (2021). Continuous Rationale Identification in Issue Tracking and Version Control Systems. In REFSQ-2021 Workshops, OpenRE, Posters and Tools Track, and Doctoral Symposium (p. 9). Essen/Virtual: CEUR-WS.org. https://doi.org/10.11588/heidok.00029966

