<<

NAME

d4j-query -- query the metadata for a project to obtain CSV-formatted results.

SYNOPSIS

  d4j-query -p pid [-q query] [-o output_file] [-H] [-D|-A]

DESCRIPTION

This script is intended to query the metadata for a project to obtain information that would be useful for automation or analysis of the framework. A user-provided list of columns determines what data is returned. By default, the list of available active bug IDs is returned.

OPTIONS

-p pid

The ID of the project for which metadata is requested. A project ID must be provided to use this utility.

-q query

A comma-separated list of fields, encased in quotation marks. For example, -q "bug.id,report.id" returns the list of bug IDs and issue tracker IDs for the requested system.

-o output_file

A file to output the extracted CSV to. By default, prints to the screen.

-H

List the available fields.

-D

Include only deprecated bugs. By default, only active bugs are queried. Cannot be used in conjunction with "all bugs" (-A).

-A

Include both active and deprecated bugs. By default, only active bugs are queried. Cannot be used in conjunction with "only deprecated bugs" (-D).

EXAMPLES

-d4j-query -p Collections

Returns the list of active bug IDs for project Collections.

-d4j-query -p Collections -H

Returns the list of available fields that can be queried.

-d4j-query -p Collections -q "revision.buggy,classes.modified"

Returns all active bug IDs, and for each, the revision hash of the buggy version and the list of modified classes.

-d4j-query -p Collections -q "revision.buggy,classes.modified" -D

Returns all deprecated bug IDs, and for each, the revision hash of the buggy version and the list of modified classes.

-d4j-query -p Collections -q "revision.buggy,classes.modified" -A

Returns all bug IDs (active and deprecated), and for each, the revision hash of the buggy version and the list of modified classes.

-d4j-query -p Collections -q "deprecated.reason" -A

Returns all bug IDs (active and deprecated) along with the reason for deprecation. For active bugs, the deprecation reason will be "NA", as those bugs do not have values for that field.

<<