Initialize Defects4J (download the project repositories and external libraries, which are not included in the git repository for size purposes and to avoid redundancies):
export PATH=$PATH:"path2defects4j"/framework/bin (“path2defects4j” points to the directory to which you cloned Defects4J; it looks like “/user/yourComputerUserName/desktop/defects4j”.)
Check installation:
defects4j info -p Lang
On some platforms such as Windows, you might need to use perl "fullpath"\defects4j where these instructions say to use defects4j.
如果执行defects4j info -p Lang报错:
1
Can't locate DBI.pm in @INC (you may need to install the DBI module)
Building and testing Safe-Hole-0.14 Building Safe-Hole Error: no compiler detected to compile 'lib/Safe/Hole.c'. Aborting -> FAIL Installing Safe::Hole failed.
$ defects4j info -p Lang -b 1 Determine revision date.................................................... OK Summary of configuration for Project: Lang -------------------------------------------------------------------------------- Script dir: /data/yyf-zwn/APR_multi_agent/datasets/defects4j-master/framework Base dir: /data/yyf-zwn/APR_multi_agent/datasets/defects4j-master Major root: /data/yyf-zwn/APR_multi_agent/datasets/defects4j-master/major Repo dir: /data/yyf-zwn/APR_multi_agent/datasets/defects4j-master/project_repos -------------------------------------------------------------------------------- Project ID: Lang Program: commons-lang Build file: /data/yyf-zwn/APR_multi_agent/datasets/defects4j-master/framework/projects/Lang/Lang.build.xml -------------------------------------------------------------------------------- Vcs: Vcs::Git Repository: /data/yyf-zwn/APR_multi_agent/datasets/defects4j-master/project_repos/commons-lang.git Commit db: /data/yyf-zwn/APR_multi_agent/datasets/defects4j-master/framework/projects/Lang/active-bugs.csv Number of bugs: 61 --------------------------------------------------------------------------------
Summary for Bug: Lang-1 -------------------------------------------------------------------------------- Revision ID (fixed version): d1a45e9738de5b3e299bb51e987565dcce55fee6 -------------------------------------------------------------------------------- Revision date (fixed version): 2013-07-26 01:03:52 +0000 -------------------------------------------------------------------------------- Bug report id: LANG-747 -------------------------------------------------------------------------------- Bug report url: https://issues.apache.org/jira/browse/LANG-747 -------------------------------------------------------------------------------- Root cause in triggering tests: - org.apache.commons.lang3.math.NumberUtilsTest::TestLang747 --> java.lang.NumberFormatException: For input string: "80000000" -------------------------------------------------------------------------------- List of modified sources: - org.apache.commons.lang3.math.NumberUtils --------------------------------------------------------------------------------