Skip to main content

README

PyConCodeSe is a bug localisation tool: given a bug report it suggests 10 code files that may contain the bug.

For PyConCodeSe to work it needs a Tree-sitter grammar to parse your code (we currently support Java, C#, PHP and Rust) and the spaCy library to parse the bug report and any natural language text in the code.

After installing the software as per the following instructions, you will need to edit a configuration file for each code repo. The configuration tells PyConCodeSe where your code and your bug reports are.

Installation

You need at least Python 3.11 to run PyConCodeSe and we strongly recommend you install it in a virtual environment. On Unix (incl. macOS) you would type in a terminal something like:

python3.11 -m venv venv
source venv/bin/activate

to create and activate a virtual environment in subfolder venv of your current folder. Next, type

pip install -i py-concodese

to install everything in the current environment and create the main executable script pyconcodese. Finally, set up spaCy with

python -m spacy download en_core_web_sm

Now you can run pyconcodese from any folder, as long as you have the virtual environment activated.

Configuration

When running PyConCodeSe, if there's no file config.toml in the current folder, you're prompted to create one with example values.

pyconcodese 

The PyConcodese config file 'config.toml' was not found in this path. 
 Do you want to copy an example file here? [y/N]y
Example config.toml file copied in the current directory.  
 Please make sure you change the fields accordingly

Open the configuration file and edit the paths of the various folders:

[py-concodese]
# the next 3 can be the root directory of the application if you wish (e.g.)
# the directory that you would like to store the sqlite database(s) in
sqlite_path = "/tmp/Pyconcodese"
# the directory that you would like to store the vsm data folders in
vsm_path = "/tmp/Pyconcodese"
# where to store output files generated by the application
output_path = "/tmp/Pyconcodese"
derby_path = "/tmp/Pyconcodese/derby"


[dataset]
bug_repository_file = "/tmp/Pyconcodese/bug_repository_file.xml"
src_path = "/tmp/Pyconcodese"

The config.toml file will be created with the current path prefilled as a starting point for all these values.

Dataset format

The dataset (bug reports) that you want to use should be in a particular format. Necessary fields that should be present in the dataset are: issue_id, issue_summary, issue_description, issue_status and files_changed.

The following examples show the correct format in which the dataset should be aligned:

Json version

{
    "closed_issues": {
        "1": {
            "issue_id": "#3085",
            "issue_summary": "Missing PR_SET_PTRACER_ANY",
            "issue_description": "JonathanWoollett-Light…..search=PR_SET_PTRACER_ANY).",
            "issue_status": "Closed",
            "files_changed": [
                [
                    "1",
                    "libc-test/semver/fuchsia.txt"
                ],
                [
                    "1",
                    "libc-test/semver/linux.txt"
                ],
                [ 
                    "1", 
                    "src/fuchsia/mod.rs" 
                ], 
                [ 
                    "1", 
                    "src/unix/linux_like/emscripten/mod.rs" 
                ], 
                [ 
                    "1", 
                    "src/unix/linux_like/linux/mod.rs" 
                ] 
            ] 
        }, 
        "437": { 
            "issue_id": "#100", 
            "issue_summary": "Outdated MIPS toolchain", 
            "issue_description": "Contributor…..further.", 
            "issue_status": "Closed", 
            "issue_reporting_time": "", 
            "fixed_by": "#114", 
            "files_changed": [ 
                [ 
                    "1", 
                    "src/unix/notbsd/linux/mips.rs" 
                ], 
                [ 
                    "1", 
                    "src/unix/notbsd/linux/mod.rs" 
                ], 
                [ 
                    "1", 
                    "src/unix/notbsd/linux/musl.rs" 
                ], 
                [ 
                    "1", 
                    "src/unix/notbsd/linux/other/mod.rs" 
                ] 
            ] 
        } 
    } 
} 

XML version

<?xml version="1.0" encoding="ISO-8859-1"?>

<bugrepository name="SWT">
  <bug id="88829" opendate="2005-03-22 20:41:00" fixdate="2005-04-06 17:05:00">
    <buginformation>
      <summary>Table.setColumnOrder() may not fire enough Move events</summary>
      <description>- start with five columns, all different widths - do Table.setColumnOrder(new int[] {4,1,2,3,0}); - SWT.Move events are fired for columns 0 and 4 because they swapped positions -&amp;gt; but Move should have been fired for all of the columns since the width of the first displayed column changed, and therefore all of the other columns are auto-shifted accordingly</description>
    </buginformation>
    <fixedFiles>
      <file>org.eclipse.swt.widgets.Table.java</file>
    </fixedFiles>
  </bug>
  <bug id="90018" opendate="2005-04-01 14:40:00" fixdate="2005-04-05 08:14:00">
    <buginformation>
      <summary>Native tooltips left around on CTabFolder</summary>
      <description>Hover over the PartStack CTabFolder inside eclipse until some native tooltip is displayed. For example, the maximize button. When the tooltip appears, change perspectives using the keybinding. the CTabFolder gets hidden, but its tooltip is permanently displayed and never goes away. Even if that CTabFolder is disposed (I'm assuming) when the perspective is closed.</description>
    </buginformation>
    <fixedFiles>
      <file>org.eclipse.swt.custom.CTabFolder.java</file>
    </fixedFiles>
  </bug>
</bugrepository>

Metadata

Release files for py-concodese 3.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for py-concodese 3.1.0
File Size Uploaded Provenance Actions
py_concodese-3.1.0.tar.gz 14.8 MB Without provenance Details for py_concodese-3.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for py-concodese 3.1.0
File Interpreter ABI Platform Actions
py_concodese-3.1.0-py3-none-any.whl Python 3 none any Details for py_concodese-3.1.0-py3-none-any.whl

Total release size: 29.6 MB

Release files / py_concodese-3.1.0.tar.gz

Download URL py_concodese-3.1.0.tar.gz
Size 14.8 MB
Tags Source
SHA-256 checksum
How to use checksums
400fa8d70ffd23414e8c9ed458234080a1d806878a7c6263e2a2562b89363b94
BLAKE2b-256 checksum
How to use checksums
5aad2715bc3b0cf1a05947d4c5641903558bdc35c32659765ccbd5eaca7ab6b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.0

Release files / py_concodese-3.1.0-py3-none-any.whl

Download URL py_concodese-3.1.0-py3-none-any.whl
Size 14.8 MB
Tags Python 3
SHA-256 checksum
How to use checksums
0bc467eebe4f3a658ee21494734f8f28c379e117277810ba616789fd39c02b26
BLAKE2b-256 checksum
How to use checksums
61974fb61eb64a9912090a407a58a469982e217f51f6d2ee7a5d9c184da680c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.0

Security for py-concodese 3.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page