npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

bugfinder-framework

v10.1.0

Published

Framework used to research bug correlations to quantifications of software artefacts and automatically find bugs with machine learning methods

Downloads

4

Readme

BugFinder-Framework

This is a framework dedicated to automating finding bugs in source artefacts based on measurements and machine learning algorithms.

This framework´s main use case is researching correlations between measurements and bug occurrence. It addresses reusability, modifiability and portability (adaptability, installibility and replaceability) of components needed to research correlations between source artefact measurements and bug occurrence.

Different researchers should be able to exchange components of the bugfinder program and therefore be able to distribute research among researchers world wide. With all needed components given you should be able to automatically analyse code and find localities with high bug probability.

Table of Contents

Quick start

The best way to start is to clone the bugFinder repository and make changes there.
You can change components for locality-recording, locality-preprocessing, quantification, annotation and preprocessing.

Introduction

The whole process beginning with recording until classification of localities is designed with a pipeline: Machine_Learning_Pipeline

This project supports the learning phase. This framework defines all interfaces for each step of the pipeline. Researchers want to develop or use others´ implementation of the components needed to realise this machine learning pipeline. Please see the main repository: bugFinder repository for whole documentation.

Recording by example

All used examples in the following documentations are already implemented and ready to use.

Record all features. F.e. record all Lines Of Code for each file in each Commit.

  1. You first need to record all localities, CommitPaths, of a repository. A CommitPath is a path in a commit.

  2. After that you can preprocess your CommitPaths. For example filtering all the paths you do not want to quantify, like .txt-, .md-files and only keep CommitPaths with paths in src ending with .ts.

  3. After that you want to quantify your CommitPaths, f.e. with the SonarQubeQuantifier. Therefore getting a map of CommitPaths to SonarQubeMeasurements.

  4. You might also want to annotate your localities so that you have labels needed for suppervised learning algorithms. You can label your CommitPaths with analyzing the Commit-message for semantic key words like "bug, fix, error, fail" indicating a correction of a bug.

Now you have a database of localities, quantifications (features) and annotations (classes).

Preprocessing by example

Preprocess your data from the recording phase.

F.e.: Find the last 3 changes of a CommitPath with a bug indicating commit message. Those changes are localities by them self: CommitPaths. Now you can analyse the changes made before a CommitPath got a bug. F.e. the max. added Lines Of Code in a change.

In the training phase you might find statistical correlation between the amount of lines of codes added in one single change and the likelyhood of a bug beeing fixed later in that file. Therefore indicating a bug added in that file.

Training

Training is give by a template project: @see bugFinder-machineLearning
You want to train a model to be able to predict bugs using the dataset generated by the previous steps.

Component realisations available

You can find different components realisations open source on github and npm. Search for bugfinder-*

Shared

DB

Recording

LocalityRecorder (and therefore localities)

npm search: bugfinder-localityrecorder-*

LocalityPreprocessors

npm search: bugfinder-$LOCALITY_CLASS-localityPreprocessor-*

Quantifier

npm search: bugfinder-$LOCALITY_CLASS-quantifier-*

Annotator

npm search: bugfinder-$LOCALITY_CLASS-annotator-*

Preprocessor

npm search: bugfinder-$LOCALITY_CLASS-$ANNOTATION_TYPE-$QUANTIFICATION_TYPE-preprocessor-*

Machine Learning