nus-yam/ex-repair huggingface dataset:
Program: 35873
Project: 35873
Buggy source:
@Override protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
  MenuItem menuItem=(MenuItem)param.args[0];
  setIds(SettingsClazz);
  if (menuItem.getItemId() == MENU_ID_SHOWPASSWORD) {
    final Context context=(Context)((PreferenceFragment)param.thisObject).getActivity();
    int selectedListPosition=((AdapterContextMenuInfo)menuItem.getMenuInfo()).position;
    PreferenceFragment wifiPreferenceFragment=((PreferenceFragment)param.thisObject);
    View rawListView=wifiPreferenceFragment.getView().findViewById(android.R.id.list);
    if (!(rawListView instanceof ListView)) {
      throw new RuntimeException("String_Node_Str");
    }
    ListView mList=(ListView)rawListView;
    Preference pref=(Preference)mList.getAdapter().getItem(selectedListPosition);
    final String ssid=pref.getTitle().toString();
    if (DBG)     Log.v(TAG,"String_Node_Str" + ssid);
    new NetworkParser(new NetworkListener(){
      @Override public void onParserDone(      List<Network> networkList){
        for (        Network network : networkList) {
          if (DBG) {
            Log.v(TAG,"String_Node_Str" + network.getSsid());
            Log.v(TAG,"String_Node_Str" + network.getPassword());
          }
          if (network.getSsid().equals(ssid)) {
            getDialog(context,ssid,network.getPassword()).show();
            break;
          }
        }
      }
    }
).execute();
    param.setResult(true);
  }
}

Fixed version (ground truth):
@Override protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
  MenuItem menuItem=(MenuItem)param.args[0];
  setIds(SettingsClazz);
  if (menuItem.getItemId() == MENU_ID_SHOWPASSWORD) {
    final Context context=(Context)((PreferenceFragment)param.thisObject).getActivity();
    int selectedListPosition=((AdapterContextMenuInfo)menuItem.getMenuInfo()).position;
    PreferenceFragment wifiPreferenceFragment=((PreferenceFragment)param.thisObject);
    View rawListView=wifiPreferenceFragment.getView().findViewById(android.R.id.list);
    if (!(rawListView instanceof ListView)) {
      throw new RuntimeException("String_Node_Str");
    }
    ListView mList=(ListView)rawListView;
    Preference pref=(Preference)mList.getAdapter().getItem(selectedListPosition);
    final String ssid=pref.getTitle().toString();
    if (DBG)     XposedBridge.log(TAG + "String_Node_Str" + ssid);
    new NetworkParser(new NetworkListener(){
      @Override public void onParserDone(      List<Network> networkList){
        for (        Network network : networkList) {
          if (DBG) {
            XposedBridge.log(TAG + "String_Node_Str" + network.getSsid());
            XposedBridge.log(TAG + "String_Node_Str" + network.getPassword());
          }
          if (network.getSsid().equals(ssid)) {
            getDialog(context,ssid,network.getPassword()).show();
            break;
          }
        }
      }
    }
).execute();
    param.setResult(true);
  }
}
Program: 35874
Project: 35874
Buggy source:
@Override public void onParserDone(List<Network> networkList){
  for (  Network network : networkList) {
    if (DBG) {
      Log.v(TAG,"String_Node_Str" + network.getSsid());
      Log.v(TAG,"String_Node_Str" + network.getPassword());
    }
    if (network.getSsid().equals(ssid)) {
      Toast.makeText(context,network.getPassword(),Toast.LENGTH_LONG).show();
      break;
    }
  }
}

Fixed version (ground truth):
@Override public void onParserDone(List<Network> networkList){
  for (  Network network : networkList) {
    if (DBG) {
      Log.v(TAG,"String_Node_Str" + network.getSsid());
      Log.v(TAG,"String_Node_Str" + network.getPassword());
    }
    if (network.getSsid().equals(ssid)) {
      getDialog(context,ssid,network.getPassword()).show();
      break;
    }
  }
}
Program: 35876
Project: 35876
Buggy source:
@Override protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
  MenuItem menuItem=(MenuItem)param.args[0];
  if (menuItem.getItemId() == MENU_ID_SHOWPASSWORD) {
    final Context context=(Context)((PreferenceFragment)param.thisObject).getActivity();
    int selectedListPosition=((AdapterContextMenuInfo)menuItem.getMenuInfo()).position;
    PreferenceFragment wifiPreferenceFragment=((PreferenceFragment)param.thisObject);
    View rawListView=wifiPreferenceFragment.getView().findViewById(android.R.id.list);
    if (!(rawListView instanceof ListView)) {
      throw new RuntimeException("String_Node_Str");
    }
    ListView mList=(ListView)rawListView;
    Preference pref=(Preference)mList.getAdapter().getItem(selectedListPosition);
    final String ssid=pref.getTitle().toString();
    if (DBG)     Log.v(TAG,"String_Node_Str" + ssid);
    new NetworkParser(new NetworkListener(){
      @Override public void onParserDone(      List<Network> networkList){
        for (        Network network : networkList) {
          if (DBG) {
            Log.v(TAG,"String_Node_Str" + network.getSsid());
            Log.v(TAG,"String_Node_Str" + network.getPassword());
          }
          if (network.getSsid().equals(ssid)) {
            Toast.makeText(context,network.getPassword(),Toast.LENGTH_LONG).show();
            break;
          }
        }
      }
    }
).execute();
    param.setResult(true);
  }
}

Fixed version (ground truth):
@Override protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
  MenuItem menuItem=(MenuItem)param.args[0];
  setIds(SettingsClazz);
  if (menuItem.getItemId() == MENU_ID_SHOWPASSWORD) {
    final Context context=(Context)((PreferenceFragment)param.thisObject).getActivity();
    int selectedListPosition=((AdapterContextMenuInfo)menuItem.getMenuInfo()).position;
    PreferenceFragment wifiPreferenceFragment=((PreferenceFragment)param.thisObject);
    View rawListView=wifiPreferenceFragment.getView().findViewById(android.R.id.list);
    if (!(rawListView instanceof ListView)) {
      throw new RuntimeException("String_Node_Str");
    }
    ListView mList=(ListView)rawListView;
    Preference pref=(Preference)mList.getAdapter().getItem(selectedListPosition);
    final String ssid=pref.getTitle().toString();
    if (DBG)     Log.v(TAG,"String_Node_Str" + ssid);
    new NetworkParser(new NetworkListener(){
      @Override public void onParserDone(      List<Network> networkList){
        for (        Network network : networkList) {
          if (DBG) {
            Log.v(TAG,"String_Node_Str" + network.getSsid());
            Log.v(TAG,"String_Node_Str" + network.getPassword());
          }
          if (network.getSsid().equals(ssid)) {
            getDialog(context,ssid,network.getPassword()).show();
            break;
          }
        }
      }
    }
).execute();
    param.setResult(true);
  }
}
Program: 35877
Project: 35877
Buggy source:
private String findImageId(Id id){
  String imageTag=repo.tag(id);
  logger.debug("String_Node_Str",id,imageTag);
  List<Image> images=docker.listImagesCmd().exec();
  for (  Image i : images) {
    for (    String tag : i.getRepoTags()) {
      if (tag.startsWith(imageTag + "String_Node_Str")) {
        logger.debug("String_Node_Str",new Object[]{i.getId(),tag,id.toString(),imageTag});
        return i.getId();
      }
    }
  }
  logger.debug("String_Node_Str" + id + "String_Node_Str"+ imageTag+ "String_Node_Str");
  return null;
}

Fixed version (ground truth):
private String findImageId(Id id){
  String imageTag=repo.tag(id);
  logger.debug("String_Node_Str",id,imageTag);
  List<Image> images=docker.listImagesCmd().exec();
  for (  Image image : images) {
    for (    String tag : image.getRepoTags()) {
      if (imageTag.contains("String_Node_Str") && tag.equals(imageTag) || tag.startsWith(imageTag + "String_Node_Str")) {
        logger.debug("String_Node_Str",image.getId(),tag,id,imageTag);
        return image.getId();
      }
    }
  }
  logger.debug("String_Node_Str" + id + "String_Node_Str"+ imageTag+ "String_Node_Str");
  return null;
}
Program: 35878
Project: 35878
Buggy source:
@Test public void whenWeCleanThenAllContainersAreDeleted() throws Exception {
  orchestrator.clean(new Id("String_Node_Str"));
  int numContainersBefore=getNumContainers();
  orchestrator.build(new Id("String_Node_Str"));
  orchestrator.clean(new Id("String_Node_Str"));
  assertEquals(numContainersBefore,getNumContainers());
}

Fixed version (ground truth):
@Test public void whenWeCleanThenAllContainersAreDeleted() throws Exception {
  orchestrator.clean(new Id("String_Node_Str"));
  int numContainersBefore=getNumContainers();
  orchestrator.build(new Id("String_Node_Str"));
  try {
    orchestrator.clean(new Id("String_Node_Str"));
  }
 catch (  OrchestrationException e) {
    assertTrue(runningOnCircleCi());
    return;
  }
  int expectedNumContainers=numContainersBefore + (runningOnCircleCi() ? 1 : 0);
  assertEquals(expectedNumContainers,getNumContainers());
}
Program: 35879
Project: 35879
Buggy source:
@Test public void whenWeCleanThenAllImagesAreDeleted() throws Exception {
  int numImagesBefore=getNumImages();
  orchestrator.build(new Id("String_Node_Str"));
  orchestrator.clean(new Id("String_Node_Str"));
  int numImagesAfter=getNumImages();
  assertEquals(numImagesBefore,numImagesAfter);
}

Fixed version (ground truth):
@Test public void whenWeCleanThenAllImagesAreDeleted() throws Exception {
  int numImagesBefore=getNumImages();
  orchestrator.build(new Id("String_Node_Str"));
  orchestrator.clean(new Id("String_Node_Str"));
  int expectedNumImages=numImagesBefore + (runningOnCircleCi() ? 1 : 0);
  int numImagesAfter=getNumImages();
  assertEquals(expectedNumImages,numImagesAfter);
}
Program: 35880
Project: 35880
Buggy source:
@Test public void whenWeCleanThenOnlyContainersAreDeleted() throws Exception {
  int numContainersBefore=getNumContainers();
  int numImagesBefore=getNumImages();
  orchestrator.build(new Id("String_Node_Str"));
  orchestrator.clean(new Id("String_Node_Str"),CleanFlag.CONTAINER_ONLY);
  assertEquals(numContainersBefore,getNumContainers());
  int expectedNumImages=numImagesBefore + 1;
  assertEquals(expectedNumImages,getNumImages());
  orchestrator.clean(new Id("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void whenWeCleanThenOnlyContainersAreDeleted() throws Exception {
  int numContainersBefore=getNumContainers();
  int numImagesBefore=getNumImages();
  orchestrator.build(new Id("String_Node_Str"));
  orchestrator.clean(new Id("String_Node_Str"),CleanFlag.CONTAINER_ONLY);
  int expectedNumContainers=numContainersBefore + (runningOnCircleCi() ? 1 : 0);
  assertEquals(expectedNumContainers,getNumContainers());
  int expectedNumImages=numImagesBefore + 1;
  assertEquals(expectedNumImages,getNumImages());
  orchestrator.clean(new Id("String_Node_Str"));
}
Program: 35881
Project: 35881
Buggy source:
@Before public void setUp() throws Exception {
  docker=DockerClientBuilder.getInstance(DockerClientConfig.createDefaultConfigBuilder().build()).build();
  orchestrator=DockerOrchestrator.builder().docker(docker).src(src).workDir(workDir).rootDir(projDir).user("String_Node_Str").properties(properties()).project("String_Node_Str").buildFlags(EnumSet.of(BuildFlag.REMOVE_INTERMEDIATE_IMAGES)).permissionErrorTolerant(true).definitionFilter(new DefinitionFilter(){
    @Override public boolean test(    final Id id,    @SuppressWarnings("String_Node_Str") final Conf conf){
      return !new Id("String_Node_Str").equals(id);
    }
  }
).build();
  orchestrator.clean();
}

Fixed version (ground truth):
@Before public void setUp() throws Exception {
  System.out.println("String_Node_Str" + runningOnCircleCi());
  docker=DockerClientBuilder.getInstance(DockerClientConfig.createDefaultConfigBuilder().build()).build();
  orchestrator=DockerOrchestrator.builder().docker(docker).src(src).workDir(workDir).rootDir(projDir).user("String_Node_Str").properties(properties()).project("String_Node_Str").buildFlags(EnumSet.of(BuildFlag.REMOVE_INTERMEDIATE_IMAGES)).permissionErrorTolerant(true).definitionFilter(new DefinitionFilter(){
    @Override public boolean test(    final Id id,    @SuppressWarnings("String_Node_Str") final Conf conf){
      return !new Id("String_Node_Str").equals(id);
    }
  }
).build();
  orchestrator.clean();
}
Program: 35882
Project: 35882
Buggy source:
private void removeContainer(Container existingContainer){
  try {
    docker.removeContainerCmd(existingContainer.getId()).withForce().withRemoveVolumes(true).exec();
  }
 catch (  InternalServerErrorException e) {
    if (permissionErrorTolerant && isPermissionError(e)) {
      logger.warn(String.format("String_Node_Str",e));
    }
 else {
      throw e;
    }
  }
}

Fixed version (ground truth):
private void removeContainer(Container existingContainer){
  logger.info("String_Node_Str" + existingContainer.getId());
  try {
    docker.removeContainerCmd(existingContainer.getId()).withForce().withRemoveVolumes(true).exec();
  }
 catch (  InternalServerErrorException e) {
    if (permissionErrorTolerant && isPermissionError(e)) {
      logger.warn(String.format("String_Node_Str",e));
    }
 else {
      throw e;
    }
  }
}
Program: 35883
Project: 35883
Buggy source:
private void cleanContainer(final Id id){
  if (id == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  stop(id);
  logger.info("String_Node_Str" + id);
  for (  Container container : findAllContainers(id)) {
    logger.info("String_Node_Str" + container.getId());
    try {
      removeContainer(container);
    }
 catch (    DockerException e) {
      throw new OrchestrationException(e);
    }
  }
}

Fixed version (ground truth):
private void cleanContainer(final Id id){
  if (id == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  stop(id);
  logger.info("String_Node_Str" + id);
  for (  Container container : findAllContainers(id)) {
    try {
      removeContainer(container);
    }
 catch (    DockerException e) {
      throw new OrchestrationException(e);
    }
  }
}
Program: 35884
Project: 35884
Buggy source:
@Test public void whenWeCleanThenAllContainersAreDeleted() throws Exception {
  orchestrator.clean(new Id("String_Node_Str"));
  final List<Container> expectedContainers=docker.listContainersCmd().withShowAll(true).exec();
  orchestrator.build(new Id("String_Node_Str"));
  try {
    orchestrator.clean(new Id("String_Node_Str"));
  }
 catch (  OrchestrationException e) {
    assertTrue(runningOnCircleCi());
    return;
  }
  int expectedSize=expectedContainers.size() + (runningOnCircleCi() ? 1 : 0);
  assertEquals(expectedSize,docker.listContainersCmd().withShowAll(true).exec().size());
}

Fixed version (ground truth):
@Test public void whenWeCleanThenAllContainersAreDeleted() throws Exception {
  orchestrator.clean(new Id("String_Node_Str"));
  int numContainersBefore=getNumContainers();
  orchestrator.build(new Id("String_Node_Str"));
  try {
    orchestrator.clean(new Id("String_Node_Str"));
  }
 catch (  OrchestrationException e) {
    assertTrue(runningOnCircleCi());
    return;
  }
  int expectedNumContainers=numContainersBefore + (runningOnCircleCi() ? 1 : 0);
  assertEquals(expectedNumContainers,getNumContainers());
}
Program: 35885
Project: 35885
Buggy source:
@Test public void whenWeCleanThenAllImagesAreDeleted() throws Exception {
  final List<Image> expectedImages=docker.listImagesCmd().exec();
  orchestrator.build(new Id("String_Node_Str"));
  orchestrator.clean(new Id("String_Node_Str"));
  int expectedSize=expectedImages.size() + (runningOnCircleCi() ? 1 : 0);
  assertEquals(expectedSize,docker.listImagesCmd().exec().size());
}

Fixed version (ground truth):
@Test public void whenWeCleanThenAllImagesAreDeleted() throws Exception {
  int numImagesBefore=getNumImages();
  orchestrator.build(new Id("String_Node_Str"));
  orchestrator.clean(new Id("String_Node_Str"));
  int expectedNumImages=numImagesBefore + (runningOnCircleCi() ? 1 : 0);
  int numImagesAfter=getNumImages();
  assertEquals(expectedNumImages,numImagesAfter);
}
Program: 35886
Project: 35886
Buggy source:
@Test public void whenWeCleanThenOnlyContainersAreDeleted() throws Exception {
  final List<Container> expectedContainers=docker.listContainersCmd().withShowAll(true).exec();
  final List<Image> expectedImages=docker.listImagesCmd().exec();
  orchestrator.build(new Id("String_Node_Str"));
  orchestrator.clean(new Id("String_Node_Str"),CleanFlag.CONTAINER_ONLY);
  int expectedContainersSize=expectedContainers.size() + (runningOnCircleCi() ? 1 : 0);
  assertEquals(expectedContainersSize,docker.listContainersCmd().withShowAll(true).exec().size());
  int expectedImageSize=expectedImages.size() + 1;
  assertEquals(expectedImageSize,docker.listImagesCmd().exec().size());
  orchestrator.clean(new Id("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void whenWeCleanThenOnlyContainersAreDeleted() throws Exception {
  int numContainersBefore=getNumContainers();
  int numImagesBefore=getNumImages();
  orchestrator.build(new Id("String_Node_Str"));
  orchestrator.clean(new Id("String_Node_Str"),CleanFlag.CONTAINER_ONLY);
  int expectedNumContainers=numContainersBefore + (runningOnCircleCi() ? 1 : 0);
  assertEquals(expectedNumContainers,getNumContainers());
  int expectedNumImages=numImagesBefore + 1;
  assertEquals(expectedNumImages,getNumImages());
  orchestrator.clean(new Id("String_Node_Str"));
}
Program: 35887
Project: 35887
Buggy source:
@Before public void setUp() throws Exception {
  System.out.println("String_Node_Str" + runningOnCircleCi());
  docker=DockerClientBuilder.getInstance(DockerClientConfig.createDefaultConfigBuilder().build()).build();
  orchestrator=DockerOrchestrator.builder().docker(docker).src(src).workDir(workDir).rootDir(projDir).user("String_Node_Str").properties(properties()).project("String_Node_Str").buildFlags(EnumSet.of(BuildFlag.REMOVE_INTERMEDIATE_IMAGES)).permissionErrorTolerant(true).definitionFilter(new DefinitionFilter(){
    @Override public boolean test(    final Id id,    @SuppressWarnings("String_Node_Str") final Conf conf){
      return !new Id("String_Node_Str").equals(id);
    }
  }
).build();
}

Fixed version (ground truth):
@Before public void setUp() throws Exception {
  System.out.println("String_Node_Str" + runningOnCircleCi());
  docker=DockerClientBuilder.getInstance(DockerClientConfig.createDefaultConfigBuilder().build()).build();
  orchestrator=DockerOrchestrator.builder().docker(docker).src(src).workDir(workDir).rootDir(projDir).user("String_Node_Str").properties(properties()).project("String_Node_Str").buildFlags(EnumSet.of(BuildFlag.REMOVE_INTERMEDIATE_IMAGES)).permissionErrorTolerant(true).definitionFilter(new DefinitionFilter(){
    @Override public boolean test(    final Id id,    @SuppressWarnings("String_Node_Str") final Conf conf){
      return !new Id("String_Node_Str").equals(id);
    }
  }
).build();
  orchestrator.clean();
}
Program: 35888
Project: 35888
Buggy source:
@Test public void whenWeCleanThenAllContainersAreDeleted() throws Exception {
  orchestrator.clean(new Id("String_Node_Str"));
  int numContainersBefore=getNumContainers();
  orchestrator.build(new Id("String_Node_Str"));
  try {
    orchestrator.clean(new Id("String_Node_Str"));
  }
 catch (  OrchestrationException e) {
    assertTrue(runningOnCircleCi());
    return;
  }
  int expectedNumContainers=numContainersBefore + (runningOnCircleCi() ? 1 : 0);
  assertEquals(expectedNumContainers,getNumContainers());
}

Fixed version (ground truth):
@Test public void whenWeCleanThenAllContainersAreDeleted() throws Exception {
  orchestrator.clean(new Id("String_Node_Str"));
  int numContainersBefore=getNumContainers();
  orchestrator.build(new Id("String_Node_Str"));
  orchestrator.clean(new Id("String_Node_Str"));
  assertEquals(numContainersBefore,getNumContainers());
}
Program: 35889
Project: 35889
Buggy source:
@Test public void whenWeCleanThenAllImagesAreDeleted() throws Exception {
  int numImagesBefore=getNumImages();
  orchestrator.build(new Id("String_Node_Str"));
  orchestrator.clean(new Id("String_Node_Str"));
  int expectedNumImages=numImagesBefore + (runningOnCircleCi() ? 1 : 0);
  int numImagesAfter=getNumImages();
  assertEquals(expectedNumImages,numImagesAfter);
}

Fixed version (ground truth):
@Test public void whenWeCleanThenAllImagesAreDeleted() throws Exception {
  int numImagesBefore=getNumImages();
  orchestrator.build(new Id("String_Node_Str"));
  orchestrator.clean(new Id("String_Node_Str"));
  int numImagesAfter=getNumImages();
  assertEquals(numImagesBefore,numImagesAfter);
}
Program: 35890
Project: 35890
Buggy source:
@Test public void whenWeCleanThenOnlyContainersAreDeleted() throws Exception {
  int numContainersBefore=getNumContainers();
  int numImagesBefore=getNumImages();
  orchestrator.build(new Id("String_Node_Str"));
  orchestrator.clean(new Id("String_Node_Str"),CleanFlag.CONTAINER_ONLY);
  int expectedNumContainers=numContainersBefore + (runningOnCircleCi() ? 1 : 0);
  assertEquals(expectedNumContainers,getNumContainers());
  int expectedNumImages=numImagesBefore + 1;
  assertEquals(expectedNumImages,getNumImages());
  orchestrator.clean(new Id("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void whenWeCleanThenOnlyContainersAreDeleted() throws Exception {
  int numContainersBefore=getNumContainers();
  int numImagesBefore=getNumImages();
  orchestrator.build(new Id("String_Node_Str"));
  orchestrator.clean(new Id("String_Node_Str"),CleanFlag.CONTAINER_ONLY);
  assertEquals(numContainersBefore,getNumContainers());
  int expectedNumImages=numImagesBefore + 1;
  assertEquals(expectedNumImages,getNumImages());
  orchestrator.clean(new Id("String_Node_Str"));
}
Program: 35891
Project: 35891
Buggy source:
@Before public void setUp() throws Exception {
  System.out.println("String_Node_Str" + runningOnCircleCi());
  docker=DockerClientBuilder.getInstance(DockerClientConfig.createDefaultConfigBuilder().build()).build();
  orchestrator=DockerOrchestrator.builder().docker(docker).src(src).workDir(workDir).rootDir(projDir).user("String_Node_Str").properties(properties()).project("String_Node_Str").buildFlags(EnumSet.of(BuildFlag.REMOVE_INTERMEDIATE_IMAGES)).permissionErrorTolerant(true).definitionFilter(new DefinitionFilter(){
    @Override public boolean test(    final Id id,    @SuppressWarnings("String_Node_Str") final Conf conf){
      return !new Id("String_Node_Str").equals(id);
    }
  }
).build();
  orchestrator.clean();
}

Fixed version (ground truth):
@Before public void setUp() throws Exception {
  docker=DockerClientBuilder.getInstance(DockerClientConfig.createDefaultConfigBuilder().build()).build();
  orchestrator=DockerOrchestrator.builder().docker(docker).src(src).workDir(workDir).rootDir(projDir).user("String_Node_Str").properties(properties()).project("String_Node_Str").buildFlags(EnumSet.of(BuildFlag.REMOVE_INTERMEDIATE_IMAGES)).permissionErrorTolerant(true).definitionFilter(new DefinitionFilter(){
    @Override public boolean test(    final Id id,    @SuppressWarnings("String_Node_Str") final Conf conf){
      return !new Id("String_Node_Str").equals(id);
    }
  }
).build();
  orchestrator.clean();
}
Program: 35892
Project: 35892
Buggy source:
private void copyFileEntry(final File destDir,File fileEntry) throws IOException {
  LOGGER.info("String_Node_Str" + fileEntry);
  if (fileEntry.isDirectory()) {
    copyDirectoryToDirectory(fileEntry,destDir);
  }
 else {
    final Path targetPath;
    if (destDir.isDirectory()) {
      targetPath=destDir.toPath().resolve(fileEntry.toPath().getFileName());
    }
 else {
      targetPath=destDir.toPath();
    }
    Files.copy(fileEntry.toPath(),targetPath,StandardCopyOption.COPY_ATTRIBUTES,StandardCopyOption.REPLACE_EXISTING);
  }
}

Fixed version (ground truth):
private void copyFileEntry(final File destDir,File fileEntry) throws IOException {
  LOGGER.info("String_Node_Str" + fileEntry);
  if (fileEntry.isDirectory()) {
    copyDirectoryToDirectory(fileEntry,new File(destDir,fileEntry.getName()));
  }
 else {
    final Path targetPath;
    if (destDir.isDirectory()) {
      targetPath=destDir.toPath().resolve(fileEntry.toPath().getFileName());
    }
 else {
      targetPath=destDir.toPath();
    }
    Files.copy(fileEntry.toPath(),targetPath,StandardCopyOption.COPY_ATTRIBUTES,StandardCopyOption.REPLACE_EXISTING);
  }
}
Program: 35894
Project: 35894
Buggy source:
private void healthCheck(Id id){
  final HealthChecks healthChecks=conf(id).getHealthChecks();
  for (  Pattern pattern : healthChecks.getLogPatterns()) {
    waitFor(id,pattern);
  }
  for (  Ping ping : healthChecks.getPings()) {
    waitFor(id,ping);
  }
}

Fixed version (ground truth):
private void healthCheck(Id id){
  final HealthChecks healthChecks=conf(id).getHealthChecks();
  for (  LogPattern pattern : healthChecks.getLogPatterns()) {
    waitFor(id,pattern);
  }
  for (  Ping ping : healthChecks.getPings()) {
    waitFor(id,ping);
  }
}
Program: 35895
Project: 35895
Buggy source:
List<Id> ids(boolean reverse){
  final List<Id> in=new LinkedList<>(confs.keySet());
  final Map<Id,List<Id>> links=new HashMap<>();
  for (  Id id : in) {
    links.put(id,com.alexecollins.docker.orchestration.util.Links.ids(confs.get(id).getLinks()));
  }
  final List<Id> out=sort(links);
  if (reverse) {
    Collections.reverse(out);
  }
  return out;
}

Fixed version (ground truth):
List<Id> ids(boolean reverse){
  final Map<Id,List<Id>> links=new LinkedHashMap<>();
  for (  Id id : confs.keySet()) {
    links.put(id,com.alexecollins.docker.orchestration.util.Links.ids(confs.get(id).getLinks()));
  }
  final List<Id> out=sort(links);
  if (reverse) {
    Collections.reverse(out);
  }
  return out;
}
Program: 35896
Project: 35896
Buggy source:
private void startContainer(String idOfContainerToStart,final Id id){
  try {
    StartContainerCmd start=docker.startContainerCmd(idOfContainerToStart);
    prepareHostConfig(id,start);
    start.exec();
  }
 catch (  DockerException e) {
    logger.error("String_Node_Str" + idOfContainerToStart,e);
    throw new OrchestrationException(e);
  }
}

Fixed version (ground truth):
private void startContainer(String idOfContainerToStart,final Id id){
  try {
    StartContainerCmd start=docker.startContainerCmd(idOfContainerToStart);
    start.exec();
  }
 catch (  DockerException e) {
    logger.error("String_Node_Str" + idOfContainerToStart,e);
    throw new OrchestrationException(e);
  }
}
Program: 35897
Project: 35897
Buggy source:
private String createNewContainer(Id id) throws DockerException {
  Conf conf=conf(id);
  CreateContainerCmd createCmd=docker.createContainerCmd(repo.findImageId(id));
  createCmd.withName(repo.containerName(id));
  logger.info("String_Node_Str" + conf.getEnv());
  createCmd.withEnv(asEnvList(conf.getEnv()));
  CreateContainerResponse response=createCmd.exec();
  return response.getId();
}

Fixed version (ground truth):
private String createNewContainer(Id id) throws DockerException {
}
Program: 35898
Project: 35898
Buggy source:
private void prepareHostConfig(Id id,StartContainerCmd config){
}

Fixed version (ground truth):
private CreateContainerCmd prepareHostConfig(Id id){
}
Program: 35899
Project: 35899
Buggy source:
public Map<String,String> getIPAddresses(){
  Map<String,String> idToIpAddressMap=new HashMap<>();
  for (  Id id : ids()) {
    Conf conf=repo.conf(id);
    if (conf.isExposeContainerIp()) {
      String containerName=repo.containerName(id);
      InspectContainerResponse containerInspectResponse=docker.inspectContainerCmd(containerName).exec();
      idToIpAddressMap.put(id.toString(),containerInspectResponse.getNetworkSettings().getIpAddress());
    }
  }
  return idToIpAddressMap;
}

Fixed version (ground truth):
public Map<String,String> getIPAddresses(){
  Map<String,String> idToIpAddressMap=new HashMap<>();
  for (  Id id : ids()) {
    Conf conf=repo.conf(id);
    if (inclusive(id) && conf.isExposeContainerIp()) {
      String containerName=repo.containerName(id);
      InspectContainerResponse containerInspectResponse=docker.inspectContainerCmd(containerName).exec();
      idToIpAddressMap.put(id.toString(),containerInspectResponse.getNetworkSettings().getIpAddress());
    }
  }
  return idToIpAddressMap;
}
Program: 35901
Project: 35901
Buggy source:
@Test public void testParseNetworkErrorCantRetry() throws VolleyError {
  when(requeuePolicy.shouldRequeue(any(NetworkResponse.class))).thenReturn(true);
  final RetryPolicy retryPolicy=mock(RetryPolicy.class);
  doThrow(VolleyError.class).when(retryPolicy).retry(any(VolleyError.class));
  when(request.getRetryPolicy()).thenReturn(retryPolicy);
  final VolleyError error=mock(VolleyError.class);
  final VolleyError volleyError=decorator.parseNetworkError(error);
  assertNotNull(volleyError);
  verify(requeuePolicy,never()).executeBeforeRequeueing(any(Listener.class),any(ErrorListener.class));
}

Fixed version (ground truth):
@Test public void testParseNetworkErrorCantRetry() throws VolleyError {
  when(requeuePolicy.shouldRequeue(any(NetworkResponse.class))).thenReturn(Boolean.TRUE);
  final RetryPolicy retryPolicy=mock(RetryPolicy.class);
  doThrow(VolleyError.class).when(retryPolicy).retry(any(VolleyError.class));
  when(request.getRetryPolicy()).thenReturn(retryPolicy);
  final VolleyError error=mock(VolleyError.class);
  final VolleyError volleyError=decorator.parseNetworkError(error);
  assertNotNull(volleyError);
  verify(requeuePolicy,never()).executeBeforeRequeueing(any(Listener.class),any(ErrorListener.class));
}
Program: 35902
Project: 35902
Buggy source:
@SuppressWarnings("String_Node_Str") @Test public void testParseNetworkErrorRequeue() throws VolleyError {
  when(requeuePolicy.shouldRequeue(any(NetworkResponse.class))).thenReturn(true);
  final RetryPolicy retryPolicy=mock(RetryPolicy.class);
  when(request.getRetryPolicy()).thenReturn(retryPolicy);
  final RequestQueue queue=mock(RequestQueue.class);
  decorator.setRequestQueue(queue);
  final VolleyError error=mock(VolleyError.class);
  decorator.parseNetworkError(error);
  verify(retryPolicy).retry(any(VolleyError.class));
  final ArgumentCaptor<Listener> listener=ArgumentCaptor.forClass(Listener.class);
  final ArgumentCaptor<ErrorListener> errorListener=ArgumentCaptor.forClass(ErrorListener.class);
  verify(requeuePolicy).executeBeforeRequeueing(listener.capture(),errorListener.capture());
  errorListener.getValue().onErrorResponse(error);
  verify(queue,never()).add(decorator);
  listener.getValue().onResponse(new Object());
  verify(queue).add(decorator);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Test public void testParseNetworkErrorRequeue() throws VolleyError {
  when(requeuePolicy.shouldRequeue(any(NetworkResponse.class))).thenReturn(Boolean.TRUE);
  final RetryPolicy retryPolicy=mock(RetryPolicy.class);
  when(request.getRetryPolicy()).thenReturn(retryPolicy);
  final RequestQueue queue=mock(RequestQueue.class);
  decorator.setRequestQueue(queue);
  final VolleyError error=mock(VolleyError.class);
  decorator.parseNetworkError(error);
  verify(retryPolicy).retry(any(VolleyError.class));
  final ArgumentCaptor<Listener> listener=ArgumentCaptor.forClass(Listener.class);
  final ArgumentCaptor<ErrorListener> errorListener=ArgumentCaptor.forClass(ErrorListener.class);
  verify(requeuePolicy).executeBeforeRequeueing(listener.capture(),errorListener.capture());
  errorListener.getValue().onErrorResponse(error);
  verify(queue,never()).add(decorator);
  listener.getValue().onResponse(new Object());
  verify(queue).add(decorator);
}
Program: 35903
Project: 35903
Buggy source:
@Test public void testAddHeader() throws AuthFailureError {
  assertThat(request.getHeaders(),not(Matchers.<String,String>hasKey(CUSTOM_HEADER)));
  request.addHeader(CUSTOM_HEADER,CUSTOM_HEADER_VALUE);
  assertThat(request.getHeaders(),Matchers.<String,String>hasKey(CUSTOM_HEADER));
}

Fixed version (ground truth):
@SuppressFBWarnings(value="String_Node_Str",justification="String_Node_Str") @Test public void testAddHeader() throws AuthFailureError {
  assumeThat(request.getHeaders(),not(Matchers.<String,String>hasKey(CUSTOM_HEADER)));
  request.addHeader(CUSTOM_HEADER,CUSTOM_HEADER_VALUE);
  assertThat(request.getHeaders(),Matchers.<String,String>hasKey(CUSTOM_HEADER));
}
Program: 35904
Project: 35904
Buggy source:
@Test(expected=IllegalArgumentException.class) public void testSaveIllegalMethod(){
  final Map<String,String> resourceParams=new HashMap<>();
  resourceParams.put(RESOURCE_PARAM_USER_ID,RESOURCE_VALUE_USER_ID);
  @SuppressWarnings({"String_Node_Str","String_Node_Str","String_Node_Str"}) final Request<Object> request=restResource.saveObject(Request.Method.DELETE,resourceParams,new DummyListener<>(),null,new Object());
}

Fixed version (ground truth):
@Test(expected=IllegalArgumentException.class) public void testSaveIllegalMethod(){
  final Map<String,String> resourceParams=new HashMap<>();
  resourceParams.put(RESOURCE_PARAM_USER_ID,RESOURCE_VALUE_USER_ID);
  restResource.saveObject(Request.Method.DELETE,resourceParams,new DummyListener<>(),null,new Object());
}
Program: 35905
Project: 35905
Buggy source:
public String getElementsKey(){
  return elementsKey;
}

Fixed version (ground truth):
@NonNull public String getElementsKey(){
  return elementsKey;
}
Program: 35906
Project: 35906
Buggy source:
public JSONArrayRequestDecorator(final Request<T> request,final int method,final String url,final String elementsKey){
  super(request,method,url);
  this.elementsKey=elementsKey;
}

Fixed version (ground truth):
public JSONArrayRequestDecorator(@NonNull final Request<T> request,final int method,@NonNull final String url,@NonNull final String elementsKey){
  super(request,method,url);
  this.elementsKey=elementsKey;
}
Program: 35907
Project: 35907
Buggy source:
public T getObject(){
  return object;
}

Fixed version (ground truth):
@NonNull public T getObject(){
  return object;
}
Program: 35908
Project: 35908
Buggy source:
public MaybeRequestDecorator(final Request<T> request,final int method,final String url,final T object){
  super(request,method,url);
  this.object=object;
}

Fixed version (ground truth):
public MaybeRequestDecorator(@NonNull final Request<T> request,final int method,@NonNull final String url,@NonNull final T object){
  super(request,method,url);
  this.object=object;
}
Program: 35909
Project: 35909
Buggy source:
@Override public Request<?> setRetryPolicy(final RetryPolicy retryPolicy){
  if (request != null) {
    request.setRetryPolicy(retryPolicy);
  }
  return super.setRetryPolicy(retryPolicy);
}

Fixed version (ground truth):
@SuppressFBWarnings(value="String_Node_Str",justification="String_Node_Str") @Override public Request<?> setRetryPolicy(final RetryPolicy retryPolicy){
  if (request != null) {
    request.setRetryPolicy(retryPolicy);
  }
  return super.setRetryPolicy(retryPolicy);
}
Program: 35910
Project: 35910
Buggy source:
public RequestDecorator(final Request<T> request,final int method,final String url){
  super(method,url,null);
  this.request=request;
}

Fixed version (ground truth):
public RequestDecorator(@NonNull final Request<T> request,final int method,@NonNull final String url){
  super(method,url,null);
  this.request=request;
}
Program: 35911
Project: 35911
Buggy source:
@Override public Request<?> setRetryPolicy(final RetryPolicy retryPolicy){
  if (wrapped != null) {
    wrapped.setRetryPolicy(retryPolicy);
  }
  return super.setRetryPolicy(retryPolicy);
}

Fixed version (ground truth):
@SuppressFBWarnings(value="String_Node_Str",justification="String_Node_Str") @Override public Request<?> setRetryPolicy(final RetryPolicy retryPolicy){
  if (wrapped != null) {
    wrapped.setRetryPolicy(retryPolicy);
  }
  return super.setRetryPolicy(retryPolicy);
}
Program: 35912
Project: 35912
Buggy source:
@Override protected VolleyError parseNetworkError(final VolleyError volleyError){
  final NetworkResponse response=volleyError.networkResponse;
  if (requeuePolicy.shouldRequeue(response)) {
    try {
      wrapped.getRetryPolicy().retry(new VolleyError("String_Node_Str"));
    }
 catch (    final VolleyError e) {
      return e;
    }
    requeuePolicy.executeBeforeRequeueing(new Listener<Object>(){
      @Override public void onResponse(      final Object arg0){
        queue.add(RequeueAfterRequestDecorator.this);
      }
    }
,new ErrorListener(){
      @Override public void onErrorResponse(      final VolleyError error){
        Log.e(VolleyLog.TAG,"String_Node_Str",error.getCause());
      }
    }
);
    return null;
  }
  return super.parseNetworkError(volleyError);
}

Fixed version (ground truth):
@Nullable @Override protected VolleyError parseNetworkError(final VolleyError volleyError){
  final NetworkResponse response=volleyError.networkResponse;
  if (requeuePolicy.shouldRequeue(response)) {
    try {
      wrapped.getRetryPolicy().retry(new VolleyError("String_Node_Str"));
    }
 catch (    final VolleyError e) {
      return e;
    }
    requeuePolicy.executeBeforeRequeueing(new Listener<Object>(){
      @Override public void onResponse(      final Object arg0){
        queue.add(RequeueAfterRequestDecorator.this);
      }
    }
,new ErrorListener(){
      @Override public void onErrorResponse(      final VolleyError error){
        Log.e(VolleyLog.TAG,"String_Node_Str",error.getCause());
      }
    }
);
    return null;
  }
  return super.parseNetworkError(volleyError);
}
Program: 35913
Project: 35913
Buggy source:
/** 
 * Private constructor. Call   {@link RequeueAfterRequestDecorator#wrap(Request,RequeuePolicy)} instead.
 * @see {@link RequeueAfterRequestDecorator#wrap(Request,RequeuePolicy)}
 */
private RequeueAfterRequestDecorator(final Request<T> request,final RequeuePolicy requeuePolicy){
  super(request.getMethod(),request.getUrl(),null);
  wrapped=request;
  this.requeuePolicy=requeuePolicy;
}

Fixed version (ground truth):
/** 
 * Private constructor. Call   {@link RequeueAfterRequestDecorator#wrap(Request,RequeuePolicy)} instead.
 * @see {@link RequeueAfterRequestDecorator#wrap(Request,RequeuePolicy)}
 */
private RequeueAfterRequestDecorator(@NonNull final Request<T> request,@NonNull final RequeuePolicy requeuePolicy){
  super(request.getMethod(),request.getUrl(),null);
  wrapped=request;
  this.requeuePolicy=requeuePolicy;
}
Program: 35914
Project: 35914
Buggy source:
/** 
 * Wraps a request to extend it's retry functionality.
 * @param request the request to wrap.
 * @param requeuePolicy the interface to define retry.
 * @return the request.
 */
public static <T>RequeueAfterRequestDecorator<T> wrap(final Request<T> request,final RequeuePolicy requeuePolicy){
  return new RequeueAfterRequestDecorator<T>(request,requeuePolicy);
}

Fixed version (ground truth):
/** 
 * Wraps a request to extend it's retry functionality.
 * @param request the request to wrap.
 * @param requeuePolicy the interface to define retry.
 * @return the request.
 */
public static <T>RequeueAfterRequestDecorator<T> wrap(@NonNull final Request<T> request,@NonNull final RequeuePolicy requeuePolicy){
  return new RequeueAfterRequestDecorator<T>(request,requeuePolicy);
}
Program: 35915
Project: 35915
Buggy source:
/** 
 * In case   {@link RequeuePolicy#shouldRequeue(NetworkResponse)} returns true, this method will be called.Providing listeners which are in charge of requeueing the request in case of success.
 * @param successCallback notify this listener in case of success.
 * @param errorCallback notify this listener in case of failure.
 */
void executeBeforeRequeueing(Listener<?> successCallback,ErrorListener errorCallback);

Fixed version (ground truth):
/** 
 * In case   {@link RequeuePolicy#shouldRequeue(NetworkResponse)} returns true, this method will be called.Providing listeners which are in charge of requeueing the request in case of success.
 * @param successCallback notify this listener in case of success.
 * @param errorCallback notify this listener in case of failure.
 */
void executeBeforeRequeueing(@NonNull Listener<?> successCallback,@NonNull ErrorListener errorCallback);
Program: 35916
Project: 35916
Buggy source:
/** 
 * Define a condition whether this request should retry or not.
 * @param networkResponse the given response of the first request.
 * @return true if should retry, false otherwise.
 */
boolean shouldRequeue(NetworkResponse networkResponse);

Fixed version (ground truth):
/** 
 * Define a condition whether this request should retry or not.
 * @param networkResponse the given response of the first request.
 * @return true if should retry, false otherwise.
 */
boolean shouldRequeue(@Nullable NetworkResponse networkResponse);
Program: 35917
Project: 35917
Buggy source:
@Override public ImageContainer get(final String requestUrl,final ImageListener imageListener,final int maxWidth,final int maxHeight){
  if (requestUrl == null) {
    final ImageContainer container=new ImageContainer(null,requestUrl,null,null);
    imageListener.onResponse(container,true);
    return container;
  }
  return super.get(requestUrl,imageListener,maxWidth,maxHeight);
}

Fixed version (ground truth):
@Override public ImageContainer get(final String requestUrl,final ImageListener imageListener,final int maxWidth,final int maxHeight){
  if (requestUrl == null) {
    final ImageContainer container=new ImageContainer(null,null,null,null);
    imageListener.onResponse(container,true);
    return container;
  }
  return super.get(requestUrl,imageListener,maxWidth,maxHeight);
}
Program: 35918
Project: 35918
Buggy source:
public NullSafeImageLoader(final RequestQueue queue,final ImageCache imageCache){
  super(queue,imageCache);
}

Fixed version (ground truth):
public NullSafeImageLoader(@NonNull final RequestQueue queue,@NonNull final ImageCache imageCache){
  super(queue,imageCache);
}
Program: 35919
Project: 35919
Buggy source:
/** 
 * Creates a new EmptyResponseRequest instance
 * @param method The request method, {@see Method}
 * @param url The url to be requested.
 * @param listener The listener for success.
 * @param errListener The listener for errors.
 * @param jsonBody The contents of the json to be sent in the request's body.
 */
public EmptyResponseRequest(final int method,final String url,final Listener<Void> listener,final ErrorListener errListener,final String jsonBody){
  super(method,url,listener,errListener,jsonBody);
}

Fixed version (ground truth):
/** 
 * Creates a new EmptyResponseRequest instance
 * @param method The request method, {@see Method}
 * @param url The url to be requested.
 * @param listener The listener for success.
 * @param errListener The listener for errors.
 * @param jsonBody The contents of the json to be sent in the request's body.
 */
public EmptyResponseRequest(final int method,@NonNull final String url,@NonNull final Listener<Void> listener,@Nullable final ErrorListener errListener,@Nullable final String jsonBody){
  super(method,url,listener,errListener,jsonBody);
}
Program: 35920
Project: 35920
Buggy source:
public GsonRequest(final int method,final String url,final Gson gson,final Type clazz,final Listener<T> listener,final ErrorListener errListener,final String jsonBody){
  super(method,url,listener,errListener,jsonBody);
  this.gson=gson;
  this.clazz=clazz;
}

Fixed version (ground truth):
public GsonRequest(final int method,@NonNull final String url,@NonNull final Gson gson,@NonNull final Type clazz,@NonNull final Listener<T> listener,@Nullable final ErrorListener errListener,@Nullable final String jsonBody){
  super(method,url,listener,errListener,jsonBody);
  this.gson=gson;
  this.clazz=clazz;
}
Program: 35921
Project: 35921
Buggy source:
@Override public byte[] getBody() throws AuthFailureError {
  return json == null ? null : json.getBytes();
}

Fixed version (ground truth):
@SuppressFBWarnings(value={"String_Node_Str","String_Node_Str"},justification="String_Node_Str") @Nullable @Override public byte[] getBody() throws AuthFailureError {
  return json == null ? null : json.getBytes();
}
Program: 35922
Project: 35922
Buggy source:
/** 
 * Creates a new RfcCompliantListenableRequest instance
 * @param method The request method, {@see Method}
 * @param url The url to be requested.
 * @param listener The listener for success.
 * @param errListener The listener for errors.
 * @param jsonBody The contents of the json to be sent in the request's body.
 */
public JsonRfcCompliantListenableRequest(final int method,final String url,final Listener<T> listener,final ErrorListener errListener,final String jsonBody){
  super(method,url,listener,errListener);
  this.json=jsonBody;
  headers=new HashMap<String,String>();
}

Fixed version (ground truth):
/** 
 * Creates a new RfcCompliantListenableRequest instance
 * @param method The request method, {@see Method}
 * @param url The url to be requested.
 * @param listener The listener for success.
 * @param errListener The listener for errors.
 * @param jsonBody The contents of the json to be sent in the request's body.
 */
public JsonRfcCompliantListenableRequest(final int method,@NonNull final String url,@NonNull final Listener<T> listener,@Nullable final ErrorListener errListener,@Nullable final String jsonBody){
  super(method,url,listener,errListener);
  this.json=jsonBody;
  headers=new HashMap<String,String>();
}
Program: 35923
Project: 35923
Buggy source:
/** 
 * Creates a new ListenableRequest instance
 * @param method The request method, {@see Method}
 * @param url The url to be requested.
 * @param listener The listener for success.
 * @param errListener The listener for errors.
 */
public ListenableRequest(final int method,final String url,final Listener<T> listener,final ErrorListener errListener){
  super(method,url,errListener);
  this.listener=listener;
}

Fixed version (ground truth):
/** 
 * Creates a new ListenableRequest instance
 * @param method The request method, {@see Method}
 * @param url The url to be requested.
 * @param listener The listener for success.
 * @param errListener The listener for errors.
 */
public ListenableRequest(final int method,@NonNull final String url,@NonNull final Listener<T> listener,@Nullable final ErrorListener errListener){
  super(method,url,errListener);
  this.listener=listener;
}
Program: 35924
Project: 35924
Buggy source:
/** 
 * Creates a new RfcCompliantListenableRequest instance
 * @param method The request method, {@see Method}
 * @param url The url to be requested.
 * @param listener The listener for success.
 * @param errListener The listener for errors.
 */
public RfcCompliantListenableRequest(final int method,final String url,final Listener<T> listener,final ErrorListener errListener){
  super(method,url,listener,errListener);
  if (method == Method.DEPRECATED_GET_OR_POST) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  setShouldCache(method == Method.GET || method == Method.HEAD);
}

Fixed version (ground truth):
/** 
 * Creates a new RfcCompliantListenableRequest instance
 * @param method The request method, {@see Method}
 * @param url The url to be requested.
 * @param listener The listener for success.
 * @param errListener The listener for errors.
 */
public RfcCompliantListenableRequest(final int method,@NonNull final String url,@NonNull final Listener<T> listener,@Nullable final ErrorListener errListener){
  super(method,url,listener,errListener);
  if (method == Method.DEPRECATED_GET_OR_POST) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  setShouldCache(method == Method.GET || method == Method.HEAD);
}
Program: 35925
Project: 35925
Buggy source:
@Override public byte[] getBody() throws AuthFailureError {
  if (bitmap == null) {
    return null;
  }
  final ByteArrayOutputStream bos=new ByteArrayOutputStream();
  try {
    bos.write(String.format(MULTIPART_HEAD,filename).getBytes());
    bitmap.compress(CompressFormat.JPEG,100,bos);
    bos.write(MULTIPART_TAIL.getBytes());
  }
 catch (  final IOException e) {
    Log.wtf("String_Node_Str","String_Node_Str",e);
  }
  return bos.toByteArray();
}

Fixed version (ground truth):
@SuppressFBWarnings(value={"String_Node_Str","String_Node_Str","String_Node_Str"},justification="String_Node_Str" + "String_Node_Str") @Override public byte[] getBody() throws AuthFailureError {
  final ByteArrayOutputStream bos=new ByteArrayOutputStream();
  try {
    bos.write(String.format(MULTIPART_HEAD,filename).getBytes());
    bitmap.compress(CompressFormat.JPEG,100,bos);
    bos.write(MULTIPART_TAIL.getBytes());
  }
 catch (  final IOException e) {
    Log.wtf("String_Node_Str","String_Node_Str",e);
  }
  return bos.toByteArray();
}