nus-yam/ex-repair huggingface dataset:
Program: 63389
Project: 63389
Buggy source:
protected String getRunCommand(Combination combination){
  List commands=getCommandForCombination(combination);
  return checkoutCommands.add(new ShellCommands(commands)).toSingleShellCommand();
}

Fixed version (ground truth):
protected String getRunCommand(Combination combination){
  List commands=getCommandForCombination(combination);
  return new ShellCommands().add(checkoutCommands).add(new ShellCommands(commands)).toSingleShellCommand();
}
Program: 63390
Project: 63390
Buggy source:
@Test public void should_run_parallel_build_of_the_combination_if_command_is_parallized() throws Exception {
  DockerImageBuildConfiguration dockerImageBuildConfiguration=new DockerImageBuildConfiguration(of("String_Node_Str","String_Node_Str","String_Node_Str",of("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str")),"String_Node_Str",new ShellCommands());
  Assert.assertTrue(dockerImageBuildConfiguration.isParallized());
  ShellCommands shellCommands=dockerImageBuildConfiguration.toShellCommands(new Combination(of("String_Node_Str","String_Node_Str")));
  Assert.assertEquals("String_Node_Str",shellCommands.get(0));
}

Fixed version (ground truth):
@Test public void should_run_parallel_build_of_the_combination_if_command_is_parallized() throws Exception {
  DockerImageBuildConfiguration dockerImageBuildConfiguration=new DockerImageBuildConfiguration(of("String_Node_Str","String_Node_Str","String_Node_Str",of("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str")),"String_Node_Str",new ShellCommands());
  Assert.assertTrue(dockerImageBuildConfiguration.isParallized());
  ShellCommands shellCommandsForTwoSubBuild=dockerImageBuildConfiguration.toShellCommands(new Combination(of("String_Node_Str","String_Node_Str")));
  ShellCommands shellCommandsForOneSubBuild=dockerImageBuildConfiguration.toShellCommands(new Combination(of("String_Node_Str","String_Node_Str")));
  Assert.assertEquals("String_Node_Str",shellCommandsForTwoSubBuild.get(0));
  Assert.assertEquals("String_Node_Str",shellCommandsForOneSubBuild.get(0));
}
Program: 63391
Project: 63391
Buggy source:
protected void exportDeployKeysIfPrivateRepo(BuildListener listener,Launcher launcher) throws IOException, InterruptedException {
  if (isPrivateRepo()) {
    DeployKeyPair deployKeyPair=new GithubDeployKeyRepository().get(getGithubRepoUrl());
    WorkspaceFileExporter.WorkspaceFile privateKeyFile=new WorkspaceFileExporter.WorkspaceFile("String_Node_Str",deployKeyPair.privateKey,"String_Node_Str");
    WorkspaceFileExporter.WorkspaceFile publicKeyFile=new WorkspaceFileExporter.WorkspaceFile("String_Node_Str",deployKeyPair.privateKey,"String_Node_Str");
    new WorkspaceFileExporter(publicKeyFile,WorkspaceFileExporter.Operation.CREATE).perform((AbstractBuild)this,launcher,listener);
    new WorkspaceFileExporter(privateKeyFile,WorkspaceFileExporter.Operation.CREATE).perform((AbstractBuild)this,launcher,listener);
  }
}

Fixed version (ground truth):
protected void exportDeployKeysIfPrivateRepo(BuildListener listener,Launcher launcher) throws IOException, InterruptedException {
  if (isPrivateRepo()) {
    DeployKeyPair deployKeyPair=SetupConfig.get().getGithubDeployKeyRepository().get(getGithubRepoUrl());
    WorkspaceFileExporter.WorkspaceFile privateKeyFile=new WorkspaceFileExporter.WorkspaceFile("String_Node_Str",deployKeyPair.privateKey,"String_Node_Str");
    WorkspaceFileExporter.WorkspaceFile publicKeyFile=new WorkspaceFileExporter.WorkspaceFile("String_Node_Str",deployKeyPair.privateKey,"String_Node_Str");
    new WorkspaceFileExporter(publicKeyFile,WorkspaceFileExporter.Operation.CREATE).perform((AbstractBuild)this,launcher,listener);
    new WorkspaceFileExporter(privateKeyFile,WorkspaceFileExporter.Operation.CREATE).perform((AbstractBuild)this,launcher,listener);
  }
}
Program: 63392
Project: 63392
Buggy source:
public boolean isPrivateRepo(){
  return new GithubDeployKeyRepository().hasDeployKey(getGithubRepoUrl());
}

Fixed version (ground truth):
public boolean isPrivateRepo(){
  return SetupConfig.get().getGithubDeployKeyRepository().hasDeployKey(getGithubRepoUrl());
}
Program: 63393
Project: 63393
Buggy source:
public void processGitHubPayload(String payloadData){
  final Payload payload=makePayload(payloadData);
  LOGGER.info("String_Node_Str" + payload.getPusher());
  if (payload.needsBuild()) {
    LOGGER.info("String_Node_Str" + payload.getProjectUrl());
    for (    final AbstractProject<?,?> job : makeDynamicProjectRepo().getJobsFor(payload.getProjectUrl())) {
      LOGGER.info("String_Node_Str" + job.getName());
      queue.execute(new Runnable(){
        @Override public void run(){
          StringParameterValue branch=new StringParameterValue("String_Node_Str",payload.getBranch());
          job.scheduleBuild(0,payload.getCause(),new NoDuplicatesParameterAction(branch));
        }
      }
);
    }
  }
}

Fixed version (ground truth):
public void processGitHubPayload(String payloadData){
  SecurityContextHolder.getContext().setAuthentication(ACL.SYSTEM);
  final Payload payload=makePayload(payloadData);
  LOGGER.info("String_Node_Str" + payload.getPusher());
  if (payload.needsBuild()) {
    LOGGER.info("String_Node_Str" + payload.getProjectUrl());
    for (    final AbstractProject<?,?> job : makeDynamicProjectRepo().getJobsFor(payload.getProjectUrl())) {
      LOGGER.info("String_Node_Str" + job.getName());
      queue.execute(new Runnable(){
        @Override public void run(){
          StringParameterValue branch=new StringParameterValue("String_Node_Str",payload.getBranch());
          job.scheduleBuild(0,payload.getCause(),new NoDuplicatesParameterAction(branch));
        }
      }
);
    }
  }
}
Program: 63394
Project: 63394
Buggy source:
public void processGitHubPayload(String payloadData){
  SecurityContextHolder.getContext().setAuthentication(ACL.SYSTEM);
  final Payload payload=makePayload(payloadData);
  LOGGER.info("String_Node_Str" + payload.getPusher());
  if (payload.needsBuild()) {
    LOGGER.info("String_Node_Str" + payload.getProjectUrl());
    for (    final AbstractProject<?,?> job : makeDynamicProjectRepo().getJobsFor(payload.getProjectUrl())) {
      LOGGER.info("String_Node_Str" + job.getName());
      queue.execute(new Runnable(){
        @Override public void run(){
          StringParameterValue branch=new StringParameterValue("String_Node_Str",payload.getBranch());
          job.scheduleBuild(0,payload.getCause(),new NoDuplicatesParameterAction(branch));
        }
      }
);
    }
  }
}

Fixed version (ground truth):
public void processGitHubPayload(String payloadData){
  SecurityContextHolder.getContext().setAuthentication(ACL.SYSTEM);
  final Payload payload=makePayload(payloadData);
  LOGGER.info("String_Node_Str" + payload.getPusher());
  if (payload.needsBuild()) {
    LOGGER.info("String_Node_Str" + payload.getProjectUrl());
    for (    final AbstractProject<?,?> job : makeDynamicProjectRepo().getJobsFor(payload.getProjectUrl())) {
      LOGGER.info("String_Node_Str" + job.getName());
      queue.execute(new Runnable(){
        @Override public void run(){
          job.scheduleBuild(0,payload.getCause(),new NoDuplicatesParameterAction(getParametersValues(job,payload.getBranch())));
        }
      }
);
    }
  }
}
Program: 63395
Project: 63395
Buggy source:
@Override public void run(){
  StringParameterValue branch=new StringParameterValue("String_Node_Str",payload.getBranch());
  job.scheduleBuild(0,payload.getCause(),new NoDuplicatesParameterAction(branch));
}

Fixed version (ground truth):
@Override public void run(){
  job.scheduleBuild(0,payload.getCause(),new NoDuplicatesParameterAction(getParametersValues(job,payload.getBranch())));
}
Program: 63396
Project: 63396
Buggy source:
public NoDuplicatesParameterAction(StringParameterValue parameterValue){
  super(parameterValue);
}

Fixed version (ground truth):
public NoDuplicatesParameterAction(List<ParameterValue> parametersValues){
  super(parametersValues);
}
Program: 63397
Project: 63397
Buggy source:
@Test public void should_authenticate_as_SYSTEM() throws IOException, InterruptedException {
  StaplerRequest request=mock(StaplerRequest.class);
  when(request.getParameter("String_Node_Str")).thenReturn("String_Node_Str");
  verifyBuildTrigger(request);
  Assert.assertEquals(ACL.SYSTEM,SecurityContextHolder.getContext().getAuthentication());
}

Fixed version (ground truth):
@Test public void should_authenticate_as_SYSTEM() throws IOException, InterruptedException {
  StaplerRequest request=mock(StaplerRequest.class);
  DynamicProject project=mock(DynamicProject.class);
  when(request.getParameter("String_Node_Str")).thenReturn("String_Node_Str");
  kickOffBuildTrigger(request,project);
  Assert.assertEquals(ACL.SYSTEM,SecurityContextHolder.getContext().getAuthentication());
}
Program: 63398
Project: 63398
Buggy source:
@Test public void should_get_payload_from_post_if_post() throws IOException, InterruptedException {
  StaplerRequest request=mock(StaplerRequest.class);
  when(request.getParameter("String_Node_Str")).thenReturn(null);
  when(request.getMethod()).thenReturn("String_Node_Str");
  doReturn("String_Node_Str").when(githubWebhook).getRequestPayload(request);
  verifyBuildTrigger(request);
}

Fixed version (ground truth):
@Test public void should_get_payload_from_post_if_post() throws IOException, InterruptedException {
  StaplerRequest request=mock(StaplerRequest.class);
  when(request.getParameter("String_Node_Str")).thenReturn("String_Node_Str");
  when(request.getMethod()).thenReturn("String_Node_Str");
  DynamicProject project=mock(DynamicProject.class);
  ParametersDefinitionProperty paramDefinition=mock(ParametersDefinitionProperty.class);
  when(project.getProperty(ParametersDefinitionProperty.class)).thenReturn(paramDefinition);
  kickOffBuildTrigger(request,project);
  verify(project).scheduleBuild(eq(0),any(GithubCause.class),any(ParametersAction.class));
}
Program: 63399
Project: 63399
Buggy source:
@Test public void should_trigger_builds_for_payload() throws IOException, InterruptedException {
  StaplerRequest request=mock(StaplerRequest.class);
  when(request.getParameter("String_Node_Str")).thenReturn("String_Node_Str");
  verifyBuildTrigger(request);
}

Fixed version (ground truth):
@Test public void should_trigger_builds_for_payload() throws IOException, InterruptedException {
  StaplerRequest request=mock(StaplerRequest.class);
  when(request.getParameter("String_Node_Str")).thenReturn("String_Node_Str");
  DynamicProject project=mock(DynamicProject.class);
  ParametersDefinitionProperty paramDefinition=mock(ParametersDefinitionProperty.class);
  when(project.getProperty(ParametersDefinitionProperty.class)).thenReturn(paramDefinition);
  kickOffBuildTrigger(request,project);
  verify(project).scheduleBuild(eq(0),any(GithubCause.class),any(ParametersAction.class));
}
Program: 63400
Project: 63400
Buggy source:
@Override public Result runSubBuild(Combination combination,BuildExecutionContext buildExecutionContext,BuildListener listener) throws IOException, InterruptedException {
  return new ShellScriptRunner(buildExecutionContext,listener).runScript(buildConfiguration.toShellCommands(combination));
}

Fixed version (ground truth):
@Override public Result runSubBuild(Combination combination,BuildExecutionContext buildExecutionContext,BuildListener listener) throws IOException, InterruptedException {
  Result buildResult;
  try {
    buildResult=new ShellScriptRunner(buildExecutionContext,listener).runScript(buildConfiguration.toShellCommands(combination));
  }
  finally {
    new ShellScriptRunner(buildExecutionContext,listener).runScript(new ShellCommands().addAll(buildConfiguration.getLinkCleanupCommands()));
  }
  return buildResult;
}
Program: 63401
Project: 63401
Buggy source:
@Override public Result runBuild(DynamicBuild build,BuildExecutionContext buildExecutionContext,Launcher launcher,BuildListener listener) throws IOException, InterruptedException {
  try {
    Map<String,Object> buildEnvironment=build.getEnvironmentWithChangeSet(listener);
    Map config=new GroovyYamlTemplateProcessor(getDotCiYml(build),buildEnvironment).getConfig();
    this.buildConfiguration=getBuildConfiguration(config,build.getBuildId(),buildEnvironment);
    build.setAxisList(buildConfiguration.getAxisList());
    Result result;
    if (buildConfiguration.isParallized()) {
      result=runMultiConfigbuildRunner(build,buildConfiguration,listener,launcher);
    }
 else {
      result=runSubBuild(new Combination(ImmutableMap.of("String_Node_Str","String_Node_Str")),buildExecutionContext,listener);
    }
    runPlugins(build,buildConfiguration.getPlugins(),listener,launcher);
    runNotifiers(build,buildConfiguration.getNotifiers(),listener);
    return result;
  }
 catch (  InterruptedException e) {
    if (buildConfiguration != null && Iterables.isEmpty(buildConfiguration.getLinkCleanupCommands())) {
      ShellCommands cleanupCommands=new ShellCommands();
      cleanupCommands.addAll(buildConfiguration.getLinkCleanupCommands());
      new ShellScriptRunner(buildExecutionContext,listener).runScript(cleanupCommands);
    }
    throw e;
  }
}

Fixed version (ground truth):
@Override public Result runBuild(DynamicBuild build,BuildExecutionContext buildExecutionContext,Launcher launcher,BuildListener listener) throws IOException, InterruptedException {
  Map<String,Object> buildEnvironment=build.getEnvironmentWithChangeSet(listener);
  Map config=new GroovyYamlTemplateProcessor(getDotCiYml(build),buildEnvironment).getConfig();
  this.buildConfiguration=getBuildConfiguration(config,build.getBuildId(),buildEnvironment);
  build.setAxisList(buildConfiguration.getAxisList());
  Result result;
  if (buildConfiguration.isParallized()) {
    result=runMultiConfigbuildRunner(build,buildConfiguration,listener,launcher);
  }
 else {
    result=runSubBuild(new Combination(ImmutableMap.of("String_Node_Str","String_Node_Str")),buildExecutionContext,listener);
  }
  runPlugins(build,buildConfiguration.getPlugins(),listener,launcher);
  runNotifiers(build,buildConfiguration.getNotifiers(),listener);
  return result;
}
Program: 63402
Project: 63402
Buggy source:
public ShellCommands toShellCommands(Combination combination){
  ShellCommands shellCommands=new ShellCommands();
  DockerCommandBuilder dockerRunCommand=dockerCommand("String_Node_Str").flag("String_Node_Str").flag("String_Node_Str").bulkOptions(config.get("String_Node_Str",String.class)).args(getImageName(),"String_Node_Str" + getRunCommand(combination) + "String_Node_Str");
  shellCommands.addAll(linkServicesToRunCommand(dockerRunCommand,config.get("String_Node_Str",List.class)));
  shellCommands.addAll(linkCleanupCommands);
  return shellCommands;
}

Fixed version (ground truth):
public ShellCommands toShellCommands(Combination combination){
  ShellCommands shellCommands=new ShellCommands();
  DockerCommandBuilder dockerRunCommand=dockerCommand("String_Node_Str").flag("String_Node_Str").flag("String_Node_Str").bulkOptions(config.get("String_Node_Str",String.class)).args(getImageName(),"String_Node_Str" + getRunCommand(combination) + "String_Node_Str");
  shellCommands.addAll(linkServicesToRunCommand(dockerRunCommand,config.get("String_Node_Str",List.class)));
  return shellCommands;
}
Program: 63403
Project: 63403
Buggy source:
@Test @Ignore public void should_support_nested_links(){
  DockerImageBuildConfiguration dockerImageBuildConfiguration=new DockerImageBuildConfiguration(of("String_Node_Str","String_Node_Str","String_Node_Str",asList(of("String_Node_Str","String_Node_Str","String_Node_Str",asList(of("String_Node_Str","String_Node_Str")))),"String_Node_Str","String_Node_Str"),"String_Node_Str",new ShellCommands());
  ShellCommands shellCommands=dockerImageBuildConfiguration.toShellCommands(null);
  Assert.assertEquals("String_Node_Str",shellCommands.get(0));
  Assert.assertEquals("String_Node_Str",shellCommands.get(1));
  Assert.assertEquals("String_Node_Str",shellCommands.get(2));
  Assert.assertEquals("String_Node_Str",shellCommands.get(3));
  Assert.assertEquals("String_Node_Str",shellCommands.get(4));
  Assert.assertEquals("String_Node_Str",shellCommands.get(5));
  Assert.assertEquals("String_Node_Str",shellCommands.get(6));
}

Fixed version (ground truth):
@Test public void should_support_nested_links(){
  DockerImageBuildConfiguration dockerImageBuildConfiguration=new DockerImageBuildConfiguration(of("String_Node_Str","String_Node_Str","String_Node_Str",asList(of("String_Node_Str","String_Node_Str","String_Node_Str",asList(of("String_Node_Str","String_Node_Str")))),"String_Node_Str","String_Node_Str"),"String_Node_Str",new ShellCommands());
  ShellCommands shellCommands=dockerImageBuildConfiguration.toShellCommands(null);
  Assert.assertEquals("String_Node_Str",shellCommands.get(0));
  Assert.assertEquals("String_Node_Str",shellCommands.get(1));
  Assert.assertEquals("String_Node_Str",shellCommands.get(2));
  ShellCommands cleanupCommands=new ShellCommands().addAll(dockerImageBuildConfiguration.getLinkCleanupCommands());
  Assert.assertEquals("String_Node_Str",cleanupCommands.get(0));
  Assert.assertEquals("String_Node_Str",cleanupCommands.get(1));
  Assert.assertEquals("String_Node_Str",cleanupCommands.get(2));
  Assert.assertEquals("String_Node_Str",cleanupCommands.get(3));
}
Program: 63404
Project: 63404
Buggy source:
@Test public void should_start_and_link_containers_when_links_are_specified(){
  DockerImageBuildConfiguration dockerImageBuildConfiguration=new DockerImageBuildConfiguration(of("String_Node_Str","String_Node_Str","String_Node_Str",asList(of("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str")),"String_Node_Str","String_Node_Str"),"String_Node_Str",new ShellCommands());
  ShellCommands shellCommands=dockerImageBuildConfiguration.toShellCommands(null);
  Assert.assertEquals("String_Node_Str",shellCommands.get(0));
  Assert.assertEquals("String_Node_Str",shellCommands.get(1));
  Assert.assertEquals("String_Node_Str",shellCommands.get(2));
}

Fixed version (ground truth):
@Test public void should_start_and_link_containers_when_links_are_specified(){
  DockerImageBuildConfiguration dockerImageBuildConfiguration=new DockerImageBuildConfiguration(of("String_Node_Str","String_Node_Str","String_Node_Str",asList(of("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str")),"String_Node_Str","String_Node_Str"),"String_Node_Str",new ShellCommands());
  ShellCommands shellCommands=dockerImageBuildConfiguration.toShellCommands(null);
  Assert.assertEquals("String_Node_Str",shellCommands.get(0));
  Assert.assertEquals("String_Node_Str",shellCommands.get(1));
  Assert.assertEquals("String_Node_Str",dockerImageBuildConfiguration.getLinkCleanupCommands().get(1));
}
Program: 63405
Project: 63405
Buggy source:
@Test public void should_start_and_linked_containers_with_run_params_if_specified(){
  DockerImageBuildConfiguration dockerImageBuildConfiguration=new DockerImageBuildConfiguration(of("String_Node_Str","String_Node_Str","String_Node_Str",asList(of("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str")),"String_Node_Str","String_Node_Str"),"String_Node_Str",new ShellCommands());
  ShellCommands shellCommands=dockerImageBuildConfiguration.toShellCommands(null);
  Assert.assertEquals("String_Node_Str",shellCommands.get(0));
  Assert.assertEquals("String_Node_Str",shellCommands.get(1));
  Assert.assertEquals("String_Node_Str",shellCommands.get(2));
}

Fixed version (ground truth):
@Test public void should_start_and_linked_containers_with_run_params_if_specified(){
  DockerImageBuildConfiguration dockerImageBuildConfiguration=new DockerImageBuildConfiguration(of("String_Node_Str","String_Node_Str","String_Node_Str",asList(of("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str")),"String_Node_Str","String_Node_Str"),"String_Node_Str",new ShellCommands());
  ShellCommands shellCommands=dockerImageBuildConfiguration.toShellCommands(null);
  Assert.assertEquals("String_Node_Str",shellCommands.get(0));
  Assert.assertEquals("String_Node_Str",shellCommands.get(1));
  Assert.assertEquals("String_Node_Str",dockerImageBuildConfiguration.getLinkCleanupCommands().get(1));
}
Program: 63406
Project: 63406
Buggy source:
@Test public void should_generate_key_pair() throws Exception {
  DeployKeyGenerator.DeployKeyPair keyPair=new DeployKeyGenerator().generateKeyPair();
  Assert.notNull(keyPair.publicKey);
  Assert.notNull(keyPair.privateKey);
}

Fixed version (ground truth):
@Test public void should_generate_key_pair() throws Exception {
  DeployKeyPair keyPair=new DeployKeyGenerator().generateKeyPair();
  Assert.notNull(keyPair.publicKey);
  Assert.notNull(keyPair.privateKey);
}
Program: 63407
Project: 63407
Buggy source:
public void setLayouter(BuildConfiguration buildConfiguration){
  AxisList axisList=new AxisList(new Axis("String_Node_Str","String_Node_Str"));
  if (buildConfiguration.isMultiLanguageVersions() && buildConfiguration.isMultiScript()) {
    axisList=new AxisList(new Axis("String_Node_Str",buildConfiguration.getLanguageVersions()),new Axis("String_Node_Str",buildConfiguration.getScriptKeys()));
  }
  if (buildConfiguration.isMultiLanguageVersions()) {
    axisList=new AxisList(new Axis("String_Node_Str",buildConfiguration.getLanguageVersions()));
  }
  if (buildConfiguration.isMultiScript()) {
    axisList=new AxisList(new Axis("String_Node_Str",buildConfiguration.getScriptKeys()));
  }
  DynamicBuildLayouter dynamicBuildLayouter=new DynamicBuildLayouter(axisList,dynamicBuild);
  for (  DynamicBuildLayoutListener dynamicBuildLayoutListener : dynamicBuildLayoutListeners) {
    dynamicBuildLayoutListener.setDyanamicBuildLayouter(dynamicBuildLayouter);
  }
}

Fixed version (ground truth):
public void setLayouter(BuildConfiguration buildConfiguration){
  AxisList axisList=new AxisList(new Axis("String_Node_Str","String_Node_Str"));
  if (buildConfiguration.isMultiLanguageVersions() && buildConfiguration.isMultiScript()) {
    axisList=new AxisList(new Axis("String_Node_Str",buildConfiguration.getLanguageVersions()),new Axis("String_Node_Str",buildConfiguration.getScriptKeys()));
  }
 else   if (buildConfiguration.isMultiLanguageVersions()) {
    axisList=new AxisList(new Axis("String_Node_Str",buildConfiguration.getLanguageVersions()));
  }
 else   if (buildConfiguration.isMultiScript()) {
    axisList=new AxisList(new Axis("String_Node_Str",buildConfiguration.getScriptKeys()));
  }
  DynamicBuildLayouter dynamicBuildLayouter=new DynamicBuildLayouter(axisList,dynamicBuild);
  for (  DynamicBuildLayoutListener dynamicBuildLayoutListener : dynamicBuildLayoutListeners) {
    dynamicBuildLayoutListener.setDyanamicBuildLayouter(dynamicBuildLayouter);
  }
}
Program: 63408
Project: 63408
Buggy source:
public Object getState(String state){
  try {
    return Enum.<Enum>valueOf((Class<Enum>)Class.forName("String_Node_Str"),state);
  }
 catch (  ClassNotFoundException e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
public Object getState(String state){
  try {
    return Enum.valueOf((Class<Enum>)Class.forName("String_Node_Str"),state);
  }
 catch (  ClassNotFoundException e) {
    throw new RuntimeException(e);
  }
}
Program: 63411
Project: 63411
Buggy source:
/** 
 * Wrap Collections.sort so we can fallback to a non-stable quicksort if we're running on JDK7+ 
 */
public static <T extends Comparable<? super T>>void sort(List<T> list){
  if (useQuickSort) {
    QuickSort.sort(list);
  }
 else {
    Collections.sort(list);
  }
}

Fixed version (ground truth):
/** 
 * Wrap Collections.sort so we can fallback to a non-stable quicksort if we're running on JDK7+
 */
public static <T extends Comparable<? super T>>void sort(List<T> list){
  if (useQuickSort) {
    QuickSort.sort(list);
  }
 else {
    Collections.sort(list);
  }
}
Program: 63412
Project: 63412
Buggy source:
public static Rectangle bounds(Collection<? extends Shape> shapes){
  if (shapes.isEmpty()) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  Iterator<? extends Shape> iter=shapes.iterator();
  Rectangle rv=new Rectangle();
  rv.setRect(iter.next().getBounds2D());
  do {
    Rectangle2D.union(iter.next().getBounds2D(),rv,rv);
  }
 while (iter.hasNext());
  return rv;
}

Fixed version (ground truth):
public static Rectangle bounds(Collection<? extends Shape> shapes){
  if (shapes.isEmpty()) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  Iterator<? extends Shape> iter=shapes.iterator();
  Rectangle rv=new Rectangle();
  rv.setRect(iter.next().getBounds2D());
  while (iter.hasNext()) {
    Rectangle2D.union(iter.next().getBounds2D(),rv,rv);
  }
  return rv;
}
Program: 63413
Project: 63413
Buggy source:
@Override public int compare(Ruling a,Ruling b){
  return (int)(!Utils.feq(a.getPosition(),b.getPosition()) ? a.getPosition() - b.getPosition() : a.getStart() - b.getStart());
}

Fixed version (ground truth):
@Override public int compare(SortObject a,SortObject b){
  int rv;
  if (Utils.feq(a.position,b.position)) {
    if (a.type == SOType.VERTICAL && b.type == SOType.HLEFT) {
      rv=1;
    }
 else     if (a.type == SOType.VERTICAL && b.type == SOType.HRIGHT) {
      rv=-1;
    }
 else     if (a.type == SOType.HLEFT && b.type == SOType.VERTICAL) {
      rv=-1;
    }
 else     if (a.type == SOType.HRIGHT && b.type == SOType.VERTICAL) {
      rv=1;
    }
 else {
      rv=java.lang.Double.compare(a.position,b.position);
    }
  }
 else {
    return java.lang.Double.compare(a.position,b.position);
  }
  return rv;
}
Program: 63414
Project: 63414
Buggy source:
public static List<Ruling> collapseOrientedRulings(List<Ruling> lines,int expandAmount){
  ArrayList<Ruling> rv=new ArrayList<Ruling>();
  if (lines.size() == 0) {
    return rv;
  }
  Collections.sort(lines,new Comparator<Ruling>(){
    @Override public int compare(    Ruling a,    Ruling b){
      return (int)(!Utils.feq(a.getPosition(),b.getPosition()) ? a.getPosition() - b.getPosition() : a.getStart() - b.getStart());
    }
  }
);
  rv.add(lines.remove(0));
  for (  Ruling next_line : lines) {
    Ruling last=rv.get(rv.size() - 1);
    if (Utils.feq(next_line.getPosition(),last.getPosition()) && last.nearlyIntersects(next_line,expandAmount)) {
      last.setStart(next_line.getStart() < last.getStart() ? next_line.getStart() : last.getStart());
      last.setEnd(next_line.getEnd() < last.getEnd() ? last.getEnd() : next_line.getEnd());
    }
 else     if (next_line.length() == 0) {
      continue;
    }
 else {
      rv.add(next_line);
    }
  }
  return rv;
}

Fixed version (ground truth):
public static List<Ruling> collapseOrientedRulings(List<Ruling> lines,int expandAmount){
}
Program: 63415
Project: 63415
Buggy source:
@Override public int compare(Point2D.Float o1,Point2D.Float o2){
  if (o1.equals(o2)) {
    return 0;
  }
  if (o1.getY() == o2.getY()) {
    return Double.compare(o1.getX(),o2.getX());
  }
 else {
    return Double.compare(o1.getY(),o2.getY());
  }
}

Fixed version (ground truth):
@Override public int compare(Line2D.Float o1,Line2D.Float o2){
  if (o1.equals(o2)) {
    return 0;
  }
  if (o1.x1 == o2.x1) {
    return Float.compare(o1.y1,o2.y1);
  }
 else {
    return Float.compare(o1.x1,o2.x1);
  }
}
Program: 63418
Project: 63418
Buggy source:
private boolean useCustomQuickSort(){
  String[] versionComponents=System.getProperty("String_Node_Str").split("String_Node_Str");
  int javaMajorVersion=Integer.parseInt(versionComponents[0]);
  int javaMinorVersion=Integer.parseInt(versionComponents[1]);
  boolean is16orLess=javaMajorVersion == 1 && javaMinorVersion <= 6;
  return !is16orLess;
}

Fixed version (ground truth):
private boolean useCustomQuickSort(){
  String[] versionComponents=System.getProperty("String_Node_Str").split("String_Node_Str");
  int javaMajorVersion=Integer.parseInt(versionComponents[0]);
  int javaMinorVersion=Integer.parseInt(versionComponents[1]);
  boolean is16orLess=javaMajorVersion == 1 && javaMinorVersion <= 6;
  String useLegacySort=System.getProperty("String_Node_Str");
  return !is16orLess || (useLegacySort != null && useLegacySort.equals("String_Node_Str"));
}
Program: 63419
Project: 63419
Buggy source:
@Override protected void onSizeChanged(int w,int h,int oldw,int oldh){
  super.onSizeChanged(w,h,oldw,oldh);
  destination.top=0;
  destination.bottom=h;
  if (getAdapter() != null)   calculateParallaxParameters();
}

Fixed version (ground truth):
@Override protected void onSizeChanged(int w,int h,int oldw,int oldh){
  super.onSizeChanged(w,h,oldw,oldh);
  destination.top=0;
  destination.bottom=h;
  if (getAdapter() != null && bitmap != null)   calculateParallaxParameters();
}
Program: 63420
Project: 63420
Buggy source:
void initialize(boolean deleteFiles) throws IOException {
  close();
  if (deleteFiles) {
    deleteFiles();
  }
  String mode=READ_OPTION + WRITE_OPTION + (syncWrites ? SYNC_OPTION : NOSYNC_OPTION);
  messageFileWriter=new RandomAccessFile(msgFileName,mode);
  messageFileReader=new RandomAccessFile(msgFileName,READ_OPTION);
  senderSequenceNumberFile=new RandomAccessFile(senderSeqNumFileName,mode);
  targetSequenceNumberFile=new RandomAccessFile(targetSeqNumFileName,mode);
  initializeCache();
}

Fixed version (ground truth):
void initialize(boolean deleteFiles) throws IOException {
  if (deleteFiles) {
    closeAndDeleteFiles();
  }
 else {
    close();
  }
  String mode=READ_OPTION + WRITE_OPTION + (syncWrites ? SYNC_OPTION : NOSYNC_OPTION);
  messageFileWriter=new RandomAccessFile(msgFileName,mode);
  messageFileReader=new RandomAccessFile(msgFileName,READ_OPTION);
  senderSequenceNumberFile=new RandomAccessFile(senderSeqNumFileName,mode);
  targetSequenceNumberFile=new RandomAccessFile(targetSeqNumFileName,mode);
  initializeCache();
}
Program: 63421
Project: 63421
Buggy source:
protected void tearDown() throws Exception {
  super.tearDown();
  FileStore fileStore=(FileStore)getStore();
  try {
    fileStore.deleteFiles();
  }
 catch (  IOException e) {
    System.err.println(e.getMessage());
  }
}

Fixed version (ground truth):
protected void tearDown() throws Exception {
  super.tearDown();
  FileStore fileStore=(FileStore)getStore();
  try {
    fileStore.closeAndDeleteFiles();
  }
 catch (  IOException e) {
    System.err.println(e.getMessage());
  }
}
Program: 63422
Project: 63422
Buggy source:
public JdbcLog(SessionSettings settings,SessionID sessionID,DataSource ds) throws SQLException, ClassNotFoundException, ConfigError, FieldConvertError {
  this.sessionID=sessionID;
  dataSource=ds == null ? JdbcUtil.getDataSource(settings,sessionID) : ds;
  logHeartbeats=!settings.isSetting(SETTING_JDBC_LOG_HEARTBEATS) || settings.getBool(SETTING_JDBC_LOG_HEARTBEATS);
  setLogHeartbeats(logHeartbeats);
  if (settings.isSetting(SETTING_LOG_OUTGOING_TABLE)) {
    outgoingMessagesTableName=settings.getString(sessionID,SETTING_LOG_OUTGOING_TABLE);
  }
 else {
    outgoingMessagesTableName=DEFAULT_MESSAGES_LOG_TABLE;
  }
  if (settings.isSetting(SETTING_LOG_INCOMING_TABLE)) {
    incomingMessagesTableName=settings.getString(sessionID,SETTING_LOG_INCOMING_TABLE);
  }
 else {
    incomingMessagesTableName=DEFAULT_MESSAGES_LOG_TABLE;
  }
  if (settings.isSetting(SETTING_LOG_EVENT_TABLE)) {
    eventTableName=settings.getString(sessionID,SETTING_LOG_EVENT_TABLE);
  }
 else {
    eventTableName=DEFAULT_EVENT_LOG_TABLE;
  }
  if (settings.isSetting(sessionID,SETTING_JDBC_SESSION_ID_DEFAULT_PROPERTY_VALUE)) {
    defaultSessionIdPropertyValue=settings.getString(sessionID,SETTING_JDBC_SESSION_ID_DEFAULT_PROPERTY_VALUE);
  }
 else {
    defaultSessionIdPropertyValue=SessionID.NOT_SET;
  }
  extendedSessionIdSupported=determineSessionIdSupport(dataSource,outgoingMessagesTableName);
  createCachedSql();
}

Fixed version (ground truth):
public JdbcLog(SessionSettings settings,SessionID sessionID,DataSource ds) throws SQLException, ClassNotFoundException, ConfigError, FieldConvertError {
  this.sessionID=sessionID;
  dataSource=ds == null ? JdbcUtil.getDataSource(settings,sessionID) : ds;
  logHeartbeats=!settings.isSetting(sessionID,SETTING_JDBC_LOG_HEARTBEATS) || settings.getBool(sessionID,SETTING_JDBC_LOG_HEARTBEATS);
  setLogHeartbeats(logHeartbeats);
  if (settings.isSetting(sessionID,SETTING_LOG_OUTGOING_TABLE)) {
    outgoingMessagesTableName=settings.getString(sessionID,SETTING_LOG_OUTGOING_TABLE);
  }
 else {
    outgoingMessagesTableName=DEFAULT_MESSAGES_LOG_TABLE;
  }
  if (settings.isSetting(sessionID,SETTING_LOG_INCOMING_TABLE)) {
    incomingMessagesTableName=settings.getString(sessionID,SETTING_LOG_INCOMING_TABLE);
  }
 else {
    incomingMessagesTableName=DEFAULT_MESSAGES_LOG_TABLE;
  }
  if (settings.isSetting(sessionID,SETTING_LOG_EVENT_TABLE)) {
    eventTableName=settings.getString(sessionID,SETTING_LOG_EVENT_TABLE);
  }
 else {
    eventTableName=DEFAULT_EVENT_LOG_TABLE;
  }
  if (settings.isSetting(sessionID,SETTING_JDBC_SESSION_ID_DEFAULT_PROPERTY_VALUE)) {
    defaultSessionIdPropertyValue=settings.getString(sessionID,SETTING_JDBC_SESSION_ID_DEFAULT_PROPERTY_VALUE);
  }
 else {
    defaultSessionIdPropertyValue=SessionID.NOT_SET;
  }
  extendedSessionIdSupported=determineSessionIdSupport(dataSource,outgoingMessagesTableName);
  createCachedSql();
}
Program: 63423
Project: 63423
Buggy source:
protected void logoutAllSessions(boolean forceDisconnect){
  log.info("String_Node_Str");
  if (sessions == null) {
    log.error("String_Node_Str");
    return;
  }
  for (  Session session : sessions.values()) {
    try {
      session.logout();
    }
 catch (    Throwable e) {
      logError(session.getSessionID(),null,"String_Node_Str",e);
    }
  }
  if (isLoggedOn()) {
    if (forceDisconnect) {
      for (      Session session : sessions.values()) {
        try {
          if (session.isLoggedOn()) {
            session.disconnect("String_Node_Str",false);
          }
        }
 catch (        Throwable e) {
          logError(session.getSessionID(),null,"String_Node_Str",e);
        }
      }
    }
 else {
      waitForLogout();
    }
  }
}

Fixed version (ground truth):
protected void logoutAllSessions(boolean forceDisconnect){
  log.info("String_Node_Str");
  if (sessions == null) {
    log.error("String_Node_Str");
    return;
  }
  for (  Session session : sessions.values()) {
    try {
      session.logout();
    }
 catch (    Throwable e) {
      logError(session.getSessionID(),null,"String_Node_Str",e);
    }
  }
  if (anyLoggedOn()) {
    if (forceDisconnect) {
      for (      Session session : sessions.values()) {
        try {
          if (session.isLoggedOn()) {
            session.disconnect("String_Node_Str",false);
          }
        }
 catch (        Throwable e) {
          logError(session.getSessionID(),null,"String_Node_Str",e);
        }
      }
    }
 else {
      waitForLogout();
    }
  }
}
Program: 63425
Project: 63425
Buggy source:
/** 
 * Logs out from session and closes the network connection.
 * @param reason the reason why the session is disconnected
 * @param logError set to true if this disconnection is an error
 * @throws IOException IO error
 */
public void disconnect(String reason,boolean logError) throws IOException {
  try {
synchronized (responderLock) {
      if (!hasResponder()) {
        if (!ENCOUNTERED_END_OF_STREAM.equals(reason)) {
          getLog().onEvent("String_Node_Str" + reason);
        }
        return;
      }
      final String msg="String_Node_Str" + reason;
      if (logError) {
        getLog().onErrorEvent(msg);
      }
 else {
        log.info("String_Node_Str" + getSessionID() + "String_Node_Str"+ msg);
      }
      responder.disconnect();
      setResponder(null);
    }
    final boolean logonReceived=state.isLogonReceived();
    final boolean logonSent=state.isLogonSent();
    if (logonReceived || logonSent) {
      try {
        application.onLogout(sessionID);
      }
 catch (      final Throwable t) {
        logApplicationException("String_Node_Str",t);
      }
      stateListener.onLogout();
    }
    if (!state.isInitiator()) {
      setEnabled(true);
    }
  }
  finally {
    state.setLogonReceived(false);
    state.setLogonSent(false);
    state.setLogoutSent(false);
    state.setLogoutReceived(false);
    state.setResetReceived(false);
    state.setResetSent(false);
    state.clearQueue();
    state.clearLogoutReason();
    state.setResendRange(0,0);
    if (resetOnDisconnect) {
      resetState();
    }
  }
}

Fixed version (ground truth):
/** 
 * Logs out from session and closes the network connection.
 * @param reason the reason why the session is disconnected
 * @param logError set to true if this disconnection is an error
 * @throws IOException IO error
 */
public void disconnect(String reason,boolean logError) throws IOException {
  try {
    final boolean logonReceived=state.isLogonReceived();
    final boolean logonSent=state.isLogonSent();
synchronized (responderLock) {
      if (!hasResponder()) {
        if (!ENCOUNTERED_END_OF_STREAM.equals(reason)) {
          getLog().onEvent("String_Node_Str" + reason);
        }
        return;
      }
      final String msg="String_Node_Str" + reason;
      if (logError) {
        getLog().onErrorEvent(msg);
      }
 else {
        log.info("String_Node_Str" + getSessionID() + "String_Node_Str"+ msg);
      }
      responder.disconnect();
      setResponder(null);
    }
    if (logonReceived || logonSent) {
      try {
        application.onLogout(sessionID);
      }
 catch (      final Throwable t) {
        logApplicationException("String_Node_Str",t);
      }
      stateListener.onLogout();
    }
    if (!state.isInitiator()) {
      setEnabled(true);
    }
  }
  finally {
    state.setLogonReceived(false);
    state.setLogonSent(false);
    state.setLogoutSent(false);
    state.setLogoutReceived(false);
    state.setResetReceived(false);
    state.setResetSent(false);
    state.clearQueue();
    state.clearLogoutReason();
    state.setResendRange(0,0);
    if (resetOnDisconnect) {
      resetState();
    }
  }
}
Program: 63426
Project: 63426
Buggy source:
public void onLogon(SessionID sessionId){
  super.onLogon(sessionId);
  logonLatch.countDown();
}

Fixed version (ground truth):
public void onLogon(){
}
Program: 63430
Project: 63430
Buggy source:
private void sendMessage(SessionID sessionID,Message message){
  try {
    Session.sendToTarget(message,sessionID);
  }
 catch (  SessionNotFound e) {
    log.error(e.getMessage(),e);
  }
}

Fixed version (ground truth):
private void sendMessage(SessionID sessionID,Message message){
  try {
    Session session=Session.lookupSession(sessionID);
    if (session == null) {
      throw new SessionNotFound(sessionID.toString());
    }
    DataDictionary dataDictionary=session.getDataDictionary();
    if (dataDictionary != null) {
      try {
        session.getDataDictionary().validate(message,true);
      }
 catch (      Exception e) {
        LogUtil.logThrowable(sessionID,"String_Node_Str" + e.getMessage(),e);
        return;
      }
    }
    session.send(message);
  }
 catch (  SessionNotFound e) {
    log.error(e.getMessage(),e);
  }
}
Program: 63431
Project: 63431
Buggy source:
public void onMessage(quickfix.fix44.NewOrderSingle order,SessionID sessionID) throws FieldNotFound, UnsupportedMessageType, IncorrectTagValue {
  try {
    validateOrder(order);
    OrderQty orderQty=order.getOrderQty();
    Price price=getPrice(order);
    quickfix.fix43.ExecutionReport accept=new quickfix.fix43.ExecutionReport(genOrderID(),genExecID(),new ExecType(ExecType.FILL),new OrdStatus(OrdStatus.NEW),order.getSide(),new LeavesQty(0),new CumQty(0),new AvgPx(0));
    accept.set(order.getClOrdID());
    sendMessage(sessionID,accept);
    if (isOrderExecutable(order,price)) {
      quickfix.fix44.ExecutionReport executionReport=new quickfix.fix44.ExecutionReport(genOrderID(),genExecID(),new ExecType(ExecType.FILL),new OrdStatus(OrdStatus.FILLED),order.getSide(),new LeavesQty(0),new CumQty(orderQty.getValue()),new AvgPx(price.getValue()));
      executionReport.set(order.getClOrdID());
      executionReport.set(order.getSymbol());
      executionReport.set(orderQty);
      executionReport.set(new LastQty(orderQty.getValue()));
      executionReport.set(new LastPx(price.getValue()));
      sendMessage(sessionID,executionReport);
    }
  }
 catch (  RuntimeException e) {
    LogUtil.logThrowable(sessionID,e.getMessage(),e);
  }
}

Fixed version (ground truth):
public void onMessage(quickfix.fix44.NewOrderSingle order,SessionID sessionID) throws FieldNotFound, UnsupportedMessageType, IncorrectTagValue {
  try {
    validateOrder(order);
    OrderQty orderQty=order.getOrderQty();
    Price price=getPrice(order);
    quickfix.fix44.ExecutionReport accept=new quickfix.fix44.ExecutionReport(genOrderID(),genExecID(),new ExecType(ExecType.FILL),new OrdStatus(OrdStatus.NEW),order.getSide(),new LeavesQty(order.getOrderQty().getValue()),new CumQty(0),new AvgPx(0));
    accept.set(order.getClOrdID());
    accept.set(order.getSymbol());
    sendMessage(sessionID,accept);
    if (isOrderExecutable(order,price)) {
      quickfix.fix44.ExecutionReport executionReport=new quickfix.fix44.ExecutionReport(genOrderID(),genExecID(),new ExecType(ExecType.FILL),new OrdStatus(OrdStatus.FILLED),order.getSide(),new LeavesQty(0),new CumQty(orderQty.getValue()),new AvgPx(price.getValue()));
      executionReport.set(order.getClOrdID());
      executionReport.set(order.getSymbol());
      executionReport.set(orderQty);
      executionReport.set(new LastQty(orderQty.getValue()));
      executionReport.set(new LastPx(price.getValue()));
      sendMessage(sessionID,executionReport);
    }
  }
 catch (  RuntimeException e) {
    LogUtil.logThrowable(sessionID,e.getMessage(),e);
  }
}
Program: 63432
Project: 63432
Buggy source:
public void run(){
  try {
    MsgType msgType=new MsgType();
    if (isAvailable) {
      if (isMissingField) {
        sendBusinessReject(message,BusinessRejectReason.CONDITIONALLY_REQUIRED_FIELD_MISSING,"String_Node_Str");
      }
 else       if (message.getHeader().isSetField(DeliverToCompID.FIELD)) {
        sendSessionReject(message,SessionRejectReason.COMPID_PROBLEM);
      }
 else       if (message.getHeader().getField(msgType).valueEquals("String_Node_Str")) {
        executionReport(message,sessionID);
      }
 else       if (message.getHeader().getField(msgType).valueEquals("String_Node_Str")) {
        cancelReject(message,sessionID);
      }
 else {
        sendBusinessReject(message,BusinessRejectReason.UNSUPPORTED_MESSAGE_TYPE,"String_Node_Str");
      }
    }
 else {
      sendBusinessReject(message,BusinessRejectReason.APPLICATION_NOT_AVAILABLE,"String_Node_Str");
    }
  }
 catch (  Exception e) {
    System.out.println(e);
  }
}

Fixed version (ground truth):
public void run(){
  try {
    MsgType msgType=new MsgType();
    if (isAvailable) {
      if (isMissingField) {
        sendBusinessReject(message,BusinessRejectReason.CONDITIONALLY_REQUIRED_FIELD_MISSING,"String_Node_Str");
      }
 else       if (message.getHeader().isSetField(DeliverToCompID.FIELD)) {
        sendSessionReject(message,SessionRejectReason.COMPID_PROBLEM);
      }
 else       if (message.getHeader().getField(msgType).valueEquals("String_Node_Str")) {
        executionReport(message,sessionID);
      }
 else       if (message.getHeader().getField(msgType).valueEquals("String_Node_Str")) {
        cancelReject(message,sessionID);
      }
 else {
        sendBusinessReject(message,BusinessRejectReason.UNSUPPORTED_MESSAGE_TYPE,"String_Node_Str");
      }
    }
 else {
      sendBusinessReject(message,BusinessRejectReason.APPLICATION_NOT_AVAILABLE,"String_Node_Str");
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 63434
Project: 63434
Buggy source:
public void onMessage(quickfix.fix44.NewOrderSingle order,SessionID sessionID) throws FieldNotFound, UnsupportedMessageType, IncorrectTagValue {
  validateOrder(order);
  OrderQty orderQty=order.getOrderQty();
  Price price=getPrice(order);
  quickfix.fix43.ExecutionReport accept=new quickfix.fix43.ExecutionReport(genOrderID(),genExecID(),new ExecType(ExecType.FILL),new OrdStatus(OrdStatus.NEW),order.getSide(),new LeavesQty(0),new CumQty(0),new AvgPx(0));
  accept.set(order.getClOrdID());
  sendMessage(sessionID,accept);
  if (isOrderExecutable(order,price)) {
    quickfix.fix44.ExecutionReport executionReport=new quickfix.fix44.ExecutionReport(genOrderID(),genExecID(),new ExecType(ExecType.FILL),new OrdStatus(OrdStatus.FILLED),order.getSide(),new LeavesQty(0),new CumQty(orderQty.getValue()),new AvgPx(price.getValue()));
    executionReport.set(order.getClOrdID());
    executionReport.set(order.getSymbol());
    executionReport.set(orderQty);
    executionReport.set(new LastQty(orderQty.getValue()));
    executionReport.set(new LastPx(price.getValue()));
    sendMessage(sessionID,executionReport);
  }
}

Fixed version (ground truth):
public void onMessage(quickfix.fix44.NewOrderSingle order,SessionID sessionID) throws FieldNotFound, UnsupportedMessageType, IncorrectTagValue {
  try {
    validateOrder(order);
    OrderQty orderQty=order.getOrderQty();
    Price price=getPrice(order);
    quickfix.fix43.ExecutionReport accept=new quickfix.fix43.ExecutionReport(genOrderID(),genExecID(),new ExecType(ExecType.FILL),new OrdStatus(OrdStatus.NEW),order.getSide(),new LeavesQty(0),new CumQty(0),new AvgPx(0));
    accept.set(order.getClOrdID());
    sendMessage(sessionID,accept);
    if (isOrderExecutable(order,price)) {
      quickfix.fix44.ExecutionReport executionReport=new quickfix.fix44.ExecutionReport(genOrderID(),genExecID(),new ExecType(ExecType.FILL),new OrdStatus(OrdStatus.FILLED),order.getSide(),new LeavesQty(0),new CumQty(orderQty.getValue()),new AvgPx(price.getValue()));
      executionReport.set(order.getClOrdID());
      executionReport.set(order.getSymbol());
      executionReport.set(orderQty);
      executionReport.set(new LastQty(orderQty.getValue()));
      executionReport.set(new LastPx(price.getValue()));
      sendMessage(sessionID,executionReport);
    }
  }
 catch (  RuntimeException e) {
    LogUtil.logThrowable(sessionID,e.getMessage(),e);
  }
}
Program: 63435
Project: 63435
Buggy source:
/** 
 * Predicate for determining if a field is valid for a given message type.
 * @param msgType the message type
 * @param field the tag
 * @return true if field is defined for message, false otherwise.
 */
public boolean isMsgField(String msgType,int field){
  Set fields=(Set)messageFields.get(msgType);
  return fields != null & fields.contains(new Integer(field));
}

Fixed version (ground truth):
/** 
 * Predicate for determining if a field is valid for a given message type.
 * @param msgType the message type
 * @param field the tag
 * @return true if field is defined for message, false otherwise.
 */
public boolean isMsgField(String msgType,int field){
  Set fields=(Set)messageFields.get(msgType);
  return fields != null && fields.contains(new Integer(field));
}