DevBoon

'

Helping python and java developers by providing various features such as search Query,Error Query,Snippet Query and Completion Query

What is DevBoon?

DevBoon is Visual Studio Code extension, that provides a query engine inorder to help python and java developers so as to decrease development time. The current version only has 4 queries namely Search Query, Error Query, Snippet Query, Completion Query

Features of DevBoon

  1. Search Query

  2. Error Query

  3. Snippet Query

  4. Completion Query

Uses of DevBoon extension

  1. This extension can be used by developers in searching some query within vscode itself so that user doesn't need to switch to browser by providing Youtube videos and StackOverFlow posts based on query input.

  2. This extension can be used by python and java developers whenever some compilation or runtime error occurs on vscode terminal while running python or java file.

  3. This extension can be used by python and java developers inorder to see a useful and correct code snippet based on input query.

  4. This extension can be used by python and java developers inorder to complete incomplete code snippets or functions.

'

Search Query

Introduction

Search Query is a query which helps developers in searching within vscode itself so that user doesn't need to switch to browser by providing Youtube videos and StackOverFlow posts based on query input.

Features

  1. It recommends relevant stackoverflow posts based on input query within vscode.

  2. It recommends relevant youtube videos based on input query within vscode.

How to run

  1. Please note that,In order to run search query ,which is provided by this extension,make sure dev-boon extension is activated by pressing (Ctrl+Shift+A).

  2. Users Can search for their Query directly on our extension’s search box by pressing (Ctrl+Shift+Q). Then user will be given an option ( StackOverFlow or YouTube).

  3. Users can also search for the query selected(hovered) on the editor by pressing (Ctrl+Shift+S) for StackOverFlow posts or (Ctrl+Shift+Y) for YouTube videos.

Design

'

Error Query

Introduction

Error Query is a query which helps developers whenever some compilation or runtime error occurs on vscode terminal while running python or java file.It automatically extracts relevant error message from vscode terminal and tries to recommend relevant Youtube videos and StackOverFlow posts based on extracted query from vscode terminal.

Features

  1. It automatically detects for what type of programming language,posts and videos should be recommended.

  2. It automatically detects and extracts error message occured in vscode terminal.

  3. It recommends relevant stackoverflow posts based on extracted query from vscode terminal within vscode.

  4. It recommends relevant youtube videos based on extracted query from vscode terminal within vscode.

  5. This query only detects runtime and compilation errors of python and java language.

How to run

  1. Please note that,In order to run error query ,which is provided by this extension,make sure dev-boon extension is activated by pressing (Ctrl+Shift+A).

  2. Users can run this query directly on our extension’s search box by pressing (Ctrl+Shift+E). Then user will be given an option ( StackOverFlow or YouTube).

Design

'

Snippet Query

Introduction

Snippet Query is a query which helps developers to generate code snippets from english query.This query automatically detects file type and tries to recommend relevant stackoverflow code snippets and geeksforgeeks code snippets and paste them on vscode editor ,so that user can immediately able to see generated code from input query.

Features

  1. It automatically detects for what type of programming language,code snippets should be recommended.

  2. It uses a model called COCOMO model which is a software sizing algorithm inorder to rank code snippets based on time and effort.

  3. It recommends relevant stackoverflow posts based on extracted query from vscode editor within vscode and automatically paste the most relevant code snippets in vscode editor where the cursor is currently positioned ( along with the link for that code as comment ).

  4. It recommends relevant geeksforgeeks posts based on extracted query from vscode editor within vscode and automatically paste the most relevant code snippets in vscode editor where the cursor is currently positioned ( along with the link for that code as comment ).

  5. It can simultaneously run two or more queries at the same time using threading concept.

  6. This query only generates code snippets of python and java language.

How to run

  1. Please note that,In order to run snippet query ,which is provided by this extension,make sure dev-boon extension is activated by pressing (Ctrl+Shift+A).

  2. Users can run this query directly on our extension’s search box by simply writing an English sentence enclosed in between ? and ? pressing (Ctrl+Shift+N). Then user will be given an option ( StackOverFlow or geeksforgeeks).

Design

'

Completion Query

Introduction

Completion Query is a query which helps developers to generate complete code snippets from imcomplete code snippets.It uses a fine-tuned gpt2-large model (which has been trained on downstream dataset).Link of dataset is Algorithms Dataset.For now,this model has been trained on algorithms dataset,which means it can only generate algorithms.

Features

  1. It automatically detects for what type of programming language,code snippets should be recommended.

  2. During fine-tuning of our model,our model uses a concept called Transfer Learning in NLP.

  3. It uses a model called gpt2-large pretrained model from transformers library inorder to automatically generate a complete code snippet from incomplete code snippet.

  4. The model has been designed as a sequential( different layers) model in such a way that it can memorize or summarize rules or patterns of statistically commonly-used codes by the real programmers.

  5. Masked Self Attention mechanism has been used while fine-tuning of model.In this mechanism,all 2-D vectors which point to different locations have been seen differently by machine and thus machine can identify them differently.After that, dot multiplication happens between queries and keys which indicates how much attention a token should pay to another because the dot multiplication.result is larger if two vectors have more similar pointing directions, and vice versa.

  6. In our model,at each layer ,Masked Self Attention mechanism is used.

  7. This query only generates code snippets of python and java language.

How to run

  1. Please note that,In order to run completion query ,which is provided by this extension,make sure dev-boon extension is activated by pressing (Ctrl+Shift+A).

  2. Users can run completion query for the selected query(hovered) on the editor by pressing (Ctrl+Shift+W).

Design

Installation

Setup in your computer (Steps)

  1. Inorder to get started with Dev Boon extension,clone git repository of dev-boon extension by executing command: git clone https://github.com/chirag2706/dev-boon

  2. Now,execute command cd dev-boon

  3. Now,execute command npm install .This command will install all necessary npm packages in your computer.

  4. Now execute command pip3 install -r requirements.txt .This command will install all necessary python packages which are required by flask server.

  5. Now press (Fn + F5) .This command will run dev-boon extension in extension development host.

  6. After extension gets run successfully,Now execute command python3 ./src/backend/main.py .This command will run flask server in background.Wait for 20-30 secs as deployed model takes time to get loaded.

  7. Now,everything is setup and you can run each and every feature of Dev Boon extension.

Setup in your computer using marketplace

Click on DevBoon to download the extension from VS Code marketplace. Now, it will prompt you to install the extension in VS Code

Otherwise, In visual studio code, click (ctrl+shift+x) to open Extensions tab. Now search for dev-boon and install it.But ,one need to run flask server on local computer by following steps described in above.

Download Extension

Source Code of DevBoon

Source code of the extension can be found here - DevBoon

Code Documentation

  1. main.py file with path ./src/backend/main.py

  2. interact.py file with path ./src/backend/interact.py

  3. convert.py file with path ./src/backend/completionQuery/dataset/convert.py

  4. data.py file with path ./src/backend/completionQuery/data.py

  5. model.py file with path ./src/backend/completionQuery/model.py

  6. train.py file with path ./src/backend/completionQuery/train.py

  7. trainer.py file with path ./src/backend/completionQuery/trainer.py

  8. evaluate.py file with path ./src/backend/completionQuery/evaluate.py

  9. AnswerSummarizer.py file with path ./src/backend/ErrorSearchQuery/AnswerSummarizer.py

  10. CommentClassifier.py file with path ./src/backend/ErrorSearchQuery/CommentClassifier.py

  11. StackOverFLowPosts.py file with path ./src/backend/ErrorSearchQuery/StackOverFlowPosts.py

  12. All typescript files are here.

Working Demo

Whole Tool Explaination + Working Demo

Contributors

Chirag Gupta, Sripranav Mannepalli, Sridhar Chimalakonda
Software Engineering Lab
Dept. of Computer Science & Engineering
Indian Institute of Technology Tirupati, Tirupati, India.
cs18b006@iittp.ac.in, cs18b036@iittp.ac.in, ch@iittp.ac.in