Skip to content

Commit

Permalink
update 19 bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
zzhfocus committed Jul 16, 2021
1 parent af0ed35 commit b2e1717
Show file tree
Hide file tree
Showing 1,967 changed files with 56,600 additions and 7 deletions.
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Notably, each bug is composed of a buggy version, a fixed version, a concise pat

# Contents of growingBugs
To date, growingBugs contains
**`1183`** bugs
**`1218`** bugs
from open-source Java projects.

| | Project ID | Project name | SubProject name |Number of bugs | Bug IDs |
Expand All @@ -18,7 +18,7 @@ from open-source Java projects.
| 7 | Csv | commons-csv | | 17 | 1-17 |
| 8 | Gson | gson | | 18 | 1-18 |
| 9 | JacksonCore | jackson-core | | 29 | 1-26,28-30 |
| 10 | JacksonDatabind | jackson-databind | | 156 | 1-156 |
| 10 | JacksonDatabind | jackson-databind | | 155 | 1-119,121-156 |
| 11 | JacksonXml | jackson-dataformat-xml | | 12 | 1-12 |
| 12 | Jsoup | jsoup | | 93 | 1-93 |
| 13 | JxPath | commons-jxpath | | 22 | 1-22 |
Expand Down Expand Up @@ -76,6 +76,22 @@ from open-source Java projects.
| 65 | JacksonDataformatBinary_smile | jackson-dataformats-binary-smile | smile | 2 | 1-2 |
| 66 | JacksonModuleAfterburner | jackson-module-afterburner | | 3 | 1-3 |
| 67 | Woodstox | woodstox | | 7 | 1-7 |
| 68 | MetaModel_core | MetaModel-core | core | 9 | 1-9 |
| 69 | MetaModel_csv | MetaModel-csv | csv | 1 | 1 |
| 70 | MetaModel_excel | MetaModel-excel | excel | 1 | 1 |
| 71 | MetaModel_jdbc | MetaModel-jdbc | jdbc | 3 | 1-3 |
| 72 | MetaModel_pojo | MetaModel-pojo | pojo | 1 | 1 |
| 73 | MetaModel_salesforce | MetaModel-salesforce | salesforce | 1 | 1 |
| 74 | Wink_common | wink-common | wink-common | 4 | 1-4 |
| 75 | Xbean_naming | xbean-naming | xbean-naming | 1 | 1 |
| 76 | James_project_server_container_core | james-project-server-container-core | server/container/core | 1 | 1 |
| 77 | Johnzon_core | johnzon-core | johnzon-core | 11 | 1-11 |
| 78 | Nifi_mock | nifi-mock | nifi-mock | 2 | 1-2 |
| 79 | Rat_core | apache-rat-core | apache-rat-core | 1 | 1 |
| 80 | Rat_plugin | apache-rat-plugin | apache-rat-plugin | 1 | 1 |
| 81 | Tez_common | tez-common | tez-common | 1 | 1 |
| 82 | Tinkerpop_gremlin_core | gremlin-core | gremlin-core | 1 | 1 |
| 83 | Webbeans_web | webbeans-web | webbeans-web | 1 | 1 |

# Setting up GrowingBugs

Expand Down
11 changes: 9 additions & 2 deletions framework/bug-mining/bug_mining_projects_info.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,17 @@ AaltoXml aalto-xml https://github.com/FasterXML/aalto-xml.git github FasterXML/a
HttpClient5 httpclient5 https://hub.fastgit.org/apache/httpcomponents-client.git jira HTTPCLIENT /(HTTPCLIENT-\\d+)/mi httpclient5
jackson_modules_java8_datetime jackson-modules-java8-datetime https://hub.fastgit.org/FasterXML/jackson-modules-java8.git github FasterXML/jackson-modules-java8 /Fix(?:es)?\\s*#(\\d+)/mi datetime
JacksonCore jackson-core https://hub.fastgit.org/FasterXML/jackson-core.git github FasterXML/jackson-core /Fix(?:es)?\\s*#(\\d+)/mi .
Pdfbox_pdfbox pdfbox-pdfbox https://hub.fastgit.org/apache/pdfbox.git jira PDFBOX /(PDFBOX-\\d+)/mi pdfbox
Jackrabbit_filevault_vault_core jackrabbit-filevault-vault-core https://hub.fastgit.org/apache/jackrabbit-filevault.git jira JCRVLT /(JCRVLT-\\d+)/mi vault-core
Pdfbox_pdfbox pdfbox-pdfbox https://hub.fastgit.org/apache/pdfbox.git jira PDFBOX /(PDFBOX-\\d+)/mi pdfbox
Storm_client storm-client https://hub.fastgit.org/apache/storm.git jira STORM /(STORM-\\d+)/mi storm-client
James_mime4j_core james-mime4j-core https://hub.fastgit.org/apache/james-mime4j.git jira MIME4J /MIME4J-\\d+/mi core
JacksonDataformatsText_properties jackson-dataformats-text-properties https://hub.fastgit.org/FasterXML/jackson-dataformats-text.git github FasterXML/jackson-dataformats-text /Fix(?:es)?\\s*#(\\d+)/mi properties
JacksonDataformatsText_yaml jackson-dataformats-text-yaml https://hub.fastgit.org/FasterXML/jackson-dataformats-text.git github FasterXML/jackson-dataformats-text /Fix(?:es)?\\s*#(\\d+)/mi yaml
JacksonDataformatBinary_protobuf jackson-dataformats-binary-protobuf https://hub.fastgit.org/FasterXML/jackson-dataformats-binary.git github FasterXML/jackson-dataformats-binary /Fix(?:es)?\\s*#(\\d+)/mi protobuf
James_project_server_container_core james-project-server-container-core https://hub.fastgit.org/apache/james-project.git jira JAMES /(JAMES-\\d+)/mi server/container/core
Johnzon_core johnzon-core https://github.com/apache/johnzon.git jira JOHNZON /(JOHNZON-\\d+)/mi johnzon-core
Nifi_mock nifi-mock https://github.com/apache/nifi.git jira NIFI /(NIFI-\\d+)/mi nifi-mock
Rat_core apache-rat-core https://github.com/apache/creadur-rat.git jira RAT /(RAT-\\d+)/mi apache-rat-core
Rat_plugin apache-rat-plugin https://github.com/apache/creadur-rat.git jira RAT /(RAT-\\d+)/mi apache-rat-plugin
Tez_common tez-common https://github.com/apache/tez.git jira TEZ /(TEZ-\\d+)/mi tez-common
Tinkerpop_gremlin_core gremlin-core https://github.com/apache/tinkerpop.git jira TINKERPOP /(TINKERPOP-\\d+)/mi gremlin-core
Webbeans_web webbeans-web https://github.com/apache/openwebbeans.git jira OWB /(OWB-\\d+)/mi webbeans-web
243 changes: 243 additions & 0 deletions framework/core/Project/James_project_server_container_core.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,243 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2014-2019 René Just, Darioush Jalali, and Defects4J contributors.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#-------------------------------------------------------------------------------

=pod
=head1 NAME
Project::James_project_server_container_core.pm -- L<Project> submodule for james-project-server-container-core.
=head1 DESCRIPTION
This module provides all project-specific configurations and subroutines for the
james-project-server-container-core project.
=cut
package Project::James_project_server_container_core;

use strict;
use warnings;

use Constants;
use Vcs::Git;

our @ISA = qw(Project);
my $PID = "James_project_server_container_core";

sub new {
@_ == 1 or die $ARG_ERROR;
my ($class) = @_;

my $name = "james-project-server-container-core";
my $vcs = Vcs::Git->new($PID,
"$REPO_DIR/$name.git",
"$PROJECTS_DIR/$PID/$BUGS_CSV_ACTIVE",
\&_post_checkout);

return $class->SUPER::new($PID, $name, $vcs);
}

##
## Determines the directory layout for sources and tests
##
#sub determine_layout {
# @_ == 2 or die $ARG_ERROR;
# my ($self, $rev_id) = @_;
# my $dir = $self->{prog_root};

# # Add additional layouts if necessary
# my $result = _ant_layout($dir) // _maven_layout($dir);
# die "Unknown layout for revision: ${rev_id}" unless defined $result;
# return $result;
#}

#
# Post-checkout tasks include, for instance, providing cached build files,
# fixing compilation errors, etc.
#
sub _post_checkout {
my ($self, $rev_id, $work_dir,$SUBPROJ) = @_;
#print("$SUBPROJ !\n");
my $project_dir = "$PROJECTS_DIR/$self->{pid}";
$work_dir.="/$SUBPROJ";
# Check whether ant build file exists
my $build_files_dir = "$PROJECTS_DIR/$PID/build_files/$rev_id";
if (-d "$build_files_dir") {
Utils::exec_cmd("cp -r $build_files_dir/* $work_dir", "Copy generated Ant build file") or die;
}

if (-e "$work_dir/build.xml"){
rename("$work_dir/build.xml", "$work_dir/build.xml".'.bak');
open(IN, '<'."$work_dir/build.xml".'.bak') or die $!;
open(OUT, '>'."$work_dir/build.xml") or die $!;
while(<IN>) {

$_ =~ s/compile-tests/compile\.tests/g;
#$_ =~ s/=src\//=$SUBPROJ\/src\//g;
#$_ =~ s/classesdir/classes\.dir/g;
#$_ =~ s/testclasses\.dir/test\.classes\.dir/g;

#support java8
$_ =~ s/fork="false"/fork="true"/g;
print OUT $_;
}
close(IN);
close(OUT);
}

if (-e "$work_dir/maven-build.xml"){
rename("$work_dir/maven-build.xml", "$work_dir/maven-build.xml".'.bak');
open(IN, '<'."$work_dir/maven-build.xml".'.bak') or die $!;
open(OUT, '>'."$work_dir/maven-build.xml") or die $!;
while(<IN>) {
$_ =~ s/compile-tests/compile\.tests/g;
#$_ =~ s/classesdir/classes\.dir/g;
#$_ =~ s/testclasses\.dir/test\.classes\.dir/g;
#$_ =~ s/src\//$SUBPROJ\/src\//g;
#support java8
$_ =~ s/fork="false"/fork="true"/g;
print OUT $_;
}
close(IN);
close(OUT);
}
if (-e "$work_dir/maven-build.properties"){
rename("$work_dir/maven-build.properties", "$work_dir/maven-build.properties".'.bak');
open(IN, '<'."$work_dir/maven-build.properties".'.bak') or die $!;
open(OUT, '>'."$work_dir/maven-build.properties") or die $!;
while(<IN>) {
$_ =~ s/compile-tests/compile\.tests/g;
#$_ =~ s/=src\//=$SUBPROJ\/src\//g;
#$_ =~ s/classesdir/classes\.dir/g;
#$_ =~ s/testclasses\.dir/test\.classes\.dir/g;

#support java8
$_ =~ s/fork="false"/fork="true"/g;
print OUT $_;
}
close(IN);
close(OUT);
}

#exclude the test you don't need
my $exclude_test1="$work_dir/src/tests/junit/org/apache/tools/ant/taskdefs/xxx.java";
if (-e $exclude_test1){
rename($exclude_test1,$exclude_test1.".bak");
#open(OUT, '>'.$exclude_test1) or die $!;
#my $converted_file = `iconv -f iso-8859-1 -t utf-8 "$exclude_test1.bak"`;
#print OUT $converted_file;
#close(OUT);
}

}


#
# This subroutine is called by the bug-mining framework for each revision during
# the initialization of the project. Example uses are: converting and caching
# build files or other time-consuming tasks, whose results should be cached.
#
sub initialize_revision {
my ($self, $rev_id, $vid,$sub_project) = @_;
$self->SUPER::initialize_revision($rev_id);

my $work_dir = $self->{prog_root};
my $result = _ant_layout($work_dir) // _maven_layout($work_dir);

if (-e "$work_dir/src/main/java" and -e "$work_dir/src/test/java"){
$result = {src=>"src/main/java", test=>"src/test/java"} unless defined $result;
}
elsif (-e "$work_dir/src/main/java" and -e "$work_dir/src/tests/java"){
$result = {src=>"src/main/java", test=>"src/tests/java"} unless defined $result;
}
elsif (-e "$work_dir/src/main" and -e "$work_dir/src/testcases"){
$result = {src=>"src/main", test=>"src/testcases"} unless defined $result;
}
elsif (-e "$work_dir/src/main" and -e "$work_dir/src/tests/junit"){
$result = {src=>"src/main", test=>"src/tests/junit"} unless defined $result;
}
elsif (-e "$work_dir/src/main" and -e "$work_dir/src/tests"){
$result = {src=>"src/main", test=>"src/tests"} unless defined $result;
}
elsif (-e "$work_dir/src/java" and -e "$work_dir/src/test"){
$result = {src=>"src/java", test=>"src/test"} unless defined $result;
}
elsif (-e "$work_dir/src/java" and -e "$work_dir/src/tests"){
$result = {src=>"src/java", test=>"src/tests"} unless defined $result;
}
else {
if (-e "$work_dir"){
system("tree -d $work_dir");
die "Unknown directory layout" unless defined $result;
}
else {
$result = {src=>"$sub_project", test=>"$sub_project"} unless defined $result;
}
}

$self->_add_to_layout_map($rev_id, $result->{src}, $result->{test});
$self->_cache_layout_map(); # Force cache rebuild
}

#
# Distinguish between project layouts and determine src and test directories.
# Each _layout subroutine returns undef if it doesn't match the layout of the
# checked-out version. Otherwise, it returns a hash that provides the src and
# test directory, relative to the working directory.
#

#
# Existing Ant build.xml and default.properties
#
sub _ant_layout {
@_ == 1 or die $ARG_ERROR;
my ($dir) = @_;
my $src = `grep "source.home" $dir/default.properties 2>/dev/null`;
my $test = `grep "test.home" $dir/default.properties 2>/dev/null`;

# Check whether this layout applies to the checked-out version
return undef if ($src eq "" || $test eq "");

$src =~ s/\s*source.home\s*=\s*(\S+)\s*/$1/;
$test=~ s/\s*test.home\s*=\s*(\S+)\s*/$1/;

return {src=>$src, test=>$test};
}

#
# Generated build.xml (from mvn ant:ant) with maven-build.properties
#
sub _maven_layout {
@_ == 1 or die $ARG_ERROR;
my ($dir) = @_;
my $src = `grep "maven.build.srcDir.0" $dir/maven-build.properties 2>/dev/null`;
my $test = `grep "maven.build.testDir.0" $dir/maven-build.properties 2>/dev/null`;

return undef if ($src eq "" || $test eq "");

$src =~ s/\s*maven\.build\.srcDir\.0\s*=\s*(\S+)\s*/$1/;
$test=~ s/\s*maven\.build\.testDir\.0\s*=\s*(\S+)\s*/$1/;

return {src=>$src, test=>$test};
}

1;
Loading

0 comments on commit b2e1717

Please sign in to comment.