Code Monkey home page Code Monkey logo

bee-tool's Introduction

License: GPL v3 Install App

What is BEE?

BEE is an open-source GitHub app that analyzes the issues that users submit to GitHub repositories. BEE supports issues written in any form, any format, and for any software system.

BEE focuses on analyzing three elements in bug reports (i.e., issues that describe software bugs):

  • The system's observed (unexpected) behavior (OB)
  • The system's expected behavior (EB)
  • The steps to reproduce the bug (S2R)

What are BEE's features?

BEE provides three main features:

  • Detect the type of an issue: a bug report, an enhancement, or a question
  • Detect when the OB, EB, and/or S2R are not provided by the user in their bug reports.
  • Structure bug descriptions, by identifying and labeling the sentences that describe the OB, EB, and/or S2R

BEE can be installed as an GitHub app on any GitHub repository. BEE also offers a public web API for identification of the OB, EB, and S2R in any piece of text

A video demonstration of BEE can found here.

Why do I need BEE?

BEE is meant to help users provide better bug reports, increase the productivity of developers, and help researchers in their investigations.

As a developer, you can use BEE to:

  1. prioritize and manage incoming issues in your software projects
  2. check whether bug reports are complete or incomplete
  3. prompt reporters to provide the missing information when bug reports are incomplete
  4. easily understand and spot the main elements in bug descriptions (the OB, EB, and S2R)
  5. automate issue/bug report analysis or develop new tools using BEE's web API

As a researcher, you can use BEE's web API to investigate bug descriptions and to automate tasks that rely on them, such as bug reproduction, localization, duplicate detection, bug report quality assessment, etc.

How do I use BEE?

Using BEE is simple. All you need to do is adding BEE to your GitHub repositories by following this link. Once installed, BEE will analyze any incoming issue within your repositories.

Besides, you can use BEE's web API in your script, app, or tool, by sending an HTTP POST request to http://rocco.cs.wm.edu:21203/api, in the following format:

{
   "text":"I experienced a crash when opening the settings menu"
}

The API would return a response with the sentences labeled as OB, EB, and/or S2R if they convey these elements:

{
   "code":200,
   "status":"success",
   "bug_report":{
      "0":{
         "text":"I experienced a crash when opening the settings menu",
         "labels":[
            "OB",
            "S2R"
         ]
      }
   }
}

How does BEE work?

BEE is implemented using Node.js, under the following architecture:

The main components of BEE are the following:

  • GitHub Controller: it handles the communication with GitHub and controls how other BEE components interact.
  • Web API Controller: it is the web interface and controller of BEE's API.
  • Issue Classifier: it classifies a GitHub issue as a bug, an enhancement, or a question. The classifier is a multi-class linear neural model based on fastText.
  • Sentence Classifier: it classifies each sentence of a bug report as OB, EB, or S2R (i.e., the sentence describes any of these elements. Three binary Support Vector Machines (SVMs) implemented on SVM light are used for sentence classification. The Stanford CoreNLP library is used to preprocess the bug report.
  • Missing Elements Detector: based on sentence classification, it detects if a bug report lacks the OB, EB, and S2R.

How can I contribute to BEE?

We are more than happy to receive your contributions (any kind of contributions). If you have an idea of a feature or enhancement, or if you find a bug, please open an issue (or a pull request). If you have questions, feel free to contact us: Yang Song (ysong10 at email.wm.edu) & Oscar Chaparro (oscarch at wm.edu)

How do I customize and run BEE on my server?

First, fork the repository and make sure you:

  • use java 8
  • install nodejs-v8.3.x. and npm to compile/install dependencies
  • create and register a Github App of your own and install it in your repositories

After cloning the forked repo, create a .env file in the src folder and set the right environment variables as described here. This is the format of the file:

GITHUB_APP_ID = xxxxx
GITHUB_PRIVATE_KEY = "-----BEGIN RSA PRIVATE KEY-----
...
HkVN9...
...
-----BEGIN RSA PRIVATE KEY-----"
GITHUB_WEBHOOK_SECRET = xxx (optional)
PORT = xxxx

Download Stanford CoreNLP 3.9.0 and run the server it provides:

# Run the server using all jars in the current directory (e.g., the CoreNLP home directory), 
java -mx4g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer -port 9000 -timeout 15000

CoreNLP connects by default via StanfordCoreNLPServer, using port 9000. You can use a different port if you want.

Install the dependencies and run the app:

# Install dependencies
npm install

# Run the app server
npm start

You may need to use ngrok to expose your app to the Internet (see this article from information).

Note: the binary files for OB, EB, and S2R in /github-app/models can be executed on Linux(64-bit). If you want to run it on other systems, you can download the binaries from here, and then train your own OB, EB, and S2R models.

License

BEE is an open-source GitHub app that analyzes the issues that users submit to GitHub repositories.
Copyright (C) 2020 Yang Song, Oscar Chaparro

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

Reference Work

Who develops BEE?

BEE is developed by Yang Song and Oscar Chaparro from the College of William & Mary.

bee-tool's People

Contributors

ojcchar avatar ysong10 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

bee-tool's Issues

API Response is not classifying issue as Question Label

I was working with the BEE API and wanted to see it running. So I watched your video.

Screenshot from 2020-11-19 22-27-33

As seen in the above image, this issue is being classified as Question by BEE. But when I do a POST request with the same issue, the response is,

Screenshot from 2020-11-19 22-31-11

Can you please give me some examples where the API could classify the issue as Question and Enhancement.

Not working like you showed

Hi,I have downloaded the application by your provided link,but when i test in my repositories, it doesn't work as you showed.

Bad results that I get.

OB:
I train the model using your method that you describe in the paper(BEE: A Tool for Structuring and Analyzing Bug Reports),but the result is bad, for example, the recall and precision of the eb-model is about 70% and 55% respectively.
EB:
I want to get the results described in your paper.
S2R:
First of all, I use the dict.txt to encode the sentences.Then I divide the eb-sentences into 10 folds and separate the sentences according to positive and negative examples for each fold.Futhermore,I use the upsampling.java to generate extral positive sentences.Finally I merge the positive sentences, smote_positive sentences and negative sentences.
The following is my method of training
(1)I use svm_learn.exe to train the model on Windows system(E:/SVM/svm_light_windows64/svm_learn.exe -z c -c 0.2 E:/SVM/svm_light_windows64/sentence/dataEB/train/_all_train_0.dat E:/SVM/svm_light_windows64/sentence/EB/02/00_model)
(2)I use svm_classify.exe to evaluate the model on Windows system(E:/SVM/svm_light_windows64/svm_classify.exe E:/SVM/svm_light_windows64/sentence/dataEB/_valid_0.dat E:/SVM/svm_light_windows64/sentence/EB/02/00_model E:/SVM/svm_light_windows64/sentence/EB/02/00_valid_result
)

BEE's API fails to process issues

I get the errors below when trying to process the issues calling BEE's API using Java.

I suspect those issues are long and the API throws errors.

The API should check for the length of the incoming text, and if it is too long, it should return a controlled error in its JSON response clearly stating the problem.

  • Error for bug report elasticsearch 102: Unexpected end of file from server
  • Error for bug report elasticsearch 123: Unexpected end of file from server
  • Error for bug report julia 595: Unexpected end of file from server
  • Error for bug report rails 795: Unexpected end of file from server
  • Error for bug report brackets 1152: Unexpected end of file from server
  • Error for bug report elasticsearch 1172: Unexpected end of file from server
  • Error for bug report elasticsearch 1428: Unexpected end of file from server
  • Error for bug report rails 1992: Unexpected end of file from server
  • Error for bug report elasticsearch 1510: Unexpected end of file from server
  • Error for bug report elasticsearch 1582: Unexpected end of file from server
  • Error for bug report julia 2242: Unexpected end of file from server
  • Error for bug report rails 2463: Unexpected end of file from server
  • Error for bug report elasticsearch 1800: Unexpected end of file from server
  • Error for bug report elasticsearch 2073: Unexpected end of file from server
  • Error for bug report julia 3005: Unexpected end of file from server
  • Error for bug report julia 3619: Unexpected end of file from server
  • Error for bug report brackets 4699: Unexpected end of file from server
  • Error for bug report brackets 4764: Unexpected end of file from server
  • Error for bug report brackets 4798: Unexpected end of file from server
  • Error for bug report elasticsearch 3300: Unexpected end of file from server
  • Error for bug report brackets 5965: Unexpected end of file from server
  • Error for bug report elasticsearch 3950: Unexpected end of file from server
  • Error for bug report elasticsearch 4334: Unexpected end of file from server
  • Error for bug report elasticsearch 4547: Unexpected end of file from server
  • Error for bug report brackets 7647: Unexpected end of file from server
  • Error for bug report brackets 7822: Unexpected end of file from server
  • Error for bug report rails 10978: Unexpected end of file from server
  • Error for bug report julia 9923: Unexpected end of file from server
  • Error for bug report julia 10185: Unexpected end of file from server
  • Error for bug report elasticsearch 8477: Unexpected end of file from server
  • Error for bug report rails 14485: Unexpected end of file from server
  • Error for bug report julia 11340: Error code 500: Unexpected error: StatusCodeError: 500 - "CoreNLP request timed out. Your document may be too long."
  • java.lang.RuntimeException: Error code 500: Unexpected error: StatusCodeError: 500 - "CoreNLP request timed out. Your document may be too long."
  • Error for bug report brackets 11923: Unexpected end of file from server
  • Error for bug report rails 17407: Unexpected end of file from server
  • Error for bug report brackets 12316: Unexpected end of file from server
  • Error for bug report elasticsearch 10315: Unexpected end of file from server
  • Error for bug report rails 18143: Unexpected end of file from server
  • Error for bug report rails 18154: Unexpected end of file from server
  • Error for bug report elasticsearch 10708: Unexpected end of file from server
  • Error for bug report elasticsearch 11673: Unexpected end of file from server
  • Error for bug report elasticsearch 13368: Unexpected end of file from server
  • Error for bug report julia 20289: Error code 500: Unexpected error: StatusCodeError: 500 - "CoreNLP request timed out. Your document may be too long."
  • java.lang.RuntimeException: Error code 500: Unexpected error: StatusCodeError: 500 - "CoreNLP request timed out. Your document may be too long."
  • Error for bug report elasticsearch 15930: Unexpected end of file from server
  • Error for bug report rails 27141: Unexpected end of file from server
  • Error for bug report rails 27811: Unexpected end of file from server
  • Error for bug report elasticsearch 17574: Unexpected end of file from server
  • Error for bug report elasticsearch 18044: Unexpected end of file from server
  • Error for bug report elasticsearch 18121: Unexpected end of file from server
  • Error for bug report elasticsearch 19785: Unexpected end of file from server
  • Error for bug report elasticsearch 22221: Unexpected end of file from server
  • Error for bug report rails 35181: Unexpected end of file from server
  • Error for bug report rails 35488: Unexpected end of file from server
  • Error for bug report julia 31656: Unexpected end of file from server
  • Error for bug report elasticsearch 24153: Error code 500: Unexpected error: TypeError: Cannot read property 'tokens' of undefined
  • java.lang.RuntimeException: Error code 500: Unexpected error: TypeError: Cannot read property 'tokens' of undefined
  • Error for bug report elasticsearch 24172: Error code 500: Unexpected error: StatusCodeError: 500 - "CoreNLP request timed out. Your document may be too long."
  • java.lang.RuntimeException: Error code 500: Unexpected error: StatusCodeError: 500 - "CoreNLP request timed out. Your document may be too long."
  • Error for bug report elasticsearch 25238: Unexpected end of file from server
  • Error for bug report elasticsearch 25390: Unexpected end of file from server
  • Error for bug report elasticsearch 27081: Unexpected end of file from server
  • Error for bug report elasticsearch 28062: Error code 500: Unexpected error: StatusCodeError: 500 - "CoreNLP request timed out. Your document may be too long."
  • java.lang.RuntimeException: Error code 500: Unexpected error: StatusCodeError: 500 - "CoreNLP request timed out. Your document may be too long."
  • Error for bug report elasticsearch 39093: Error code 500: Unexpected error: StatusCodeError: 500 - "CoreNLP request timed out. Your document may be too long."
  • java.lang.RuntimeException: Error code 500: Unexpected error: StatusCodeError: 500 - "CoreNLP request timed out. Your document may be too long."

Question

Question:
I can't download the depedence(group: 'seers', name: 'text-analyzer', version:'1.2') that you use in your code. Then I search the mvnrepository.com to find, but I can't find it.
I would appreciated it if you can please tell me how to find the depedence.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.