nus-yam/ex-repair huggingface dataset:
Program: 47572
Project: 47572
Buggy source:
@Test public void testEdit() throws Exception {
  try {
    service=new MetadataDatasourceService(new MockSessionAwareMetadataDomainRepository(),new AdministratorAuthorizationPolicy());
    service.add(new MetadataDatasource(getTestDomain("String_Node_Str"),"String_Node_Str",MetadataDatasourceService.TYPE));
    MetadataDatasource datasource=service.get("String_Node_Str");
    assertNotNull(datasource);
    Domain domain=datasource.getDatasource();
    updateTestDomain(domain);
    service.edit(new MetadataDatasource(domain,domain.getId(),MetadataDatasourceService.TYPE));
    service.remove("String_Node_Str");
  }
 catch (  GenericDatasourceServiceException e) {
    assertFalse(true);
  }
  try {
    service.add(new MetadataDatasource(getTestDomain("String_Node_Str"),"String_Node_Str",MetadataDatasourceService.TYPE));
    MetadataDatasource datasource=service.get("String_Node_Str");
    assertNotNull(datasource);
    Domain domain=datasource.getDatasource();
    updateTestDomain(domain);
    service=new MetadataDatasourceService(new MockSessionAwareMetadataDomainRepository(),new NonAdministratorAuthorizationPolicy());
    service.edit(new MetadataDatasource(domain,domain.getId(),MetadataDatasourceService.TYPE));
    assertFalse(true);
  }
 catch (  PentahoAccessControlException e) {
    service=new MetadataDatasourceService(new MockSessionAwareMetadataDomainRepository(),new AdministratorAuthorizationPolicy());
    service.remove("String_Node_Str");
    assertTrue(true);
  }
}

Fixed version (ground truth):
@Test public void testEdit() throws Exception {
  try {
    service=new MetadataDatasourceService(new MockSessionAwareMetadataDomainRepository(),new AdministratorAuthorizationPolicy());
    service.add(new MetadataDatasource(getTestDomain("String_Node_Str"),"String_Node_Str","String_Node_Str",MetadataDatasourceService.TYPE));
    MetadataDatasource datasource=service.get("String_Node_Str");
    assertNotNull(datasource);
    Domain domain=datasource.getDatasource();
    updateTestDomain(domain);
    service.edit(new MetadataDatasource(domain,domain.getId(),domain.getId(),MetadataDatasourceService.TYPE));
    service.remove("String_Node_Str");
  }
 catch (  GenericDatasourceServiceException e) {
    assertFalse(true);
  }
  try {
    service.add(new MetadataDatasource(getTestDomain("String_Node_Str"),"String_Node_Str","String_Node_Str",MetadataDatasourceService.TYPE));
    MetadataDatasource datasource=service.get("String_Node_Str");
    assertNotNull(datasource);
    Domain domain=datasource.getDatasource();
    updateTestDomain(domain);
    service=new MetadataDatasourceService(new MockSessionAwareMetadataDomainRepository(),new NonAdministratorAuthorizationPolicy());
    service.edit(new MetadataDatasource(domain,domain.getId(),domain.getId(),MetadataDatasourceService.TYPE));
    assertFalse(true);
  }
 catch (  PentahoAccessControlException e) {
    service=new MetadataDatasourceService(new MockSessionAwareMetadataDomainRepository(),new AdministratorAuthorizationPolicy());
    service.remove("String_Node_Str");
    assertTrue(true);
  }
}
Program: 47573
Project: 47573
Buggy source:
@Test public void testRemove() throws Exception {
  try {
    service=new MetadataDatasourceService(new MockSessionAwareMetadataDomainRepository(),new AdministratorAuthorizationPolicy());
    service.add(new MetadataDatasource(getTestDomain("String_Node_Str"),"String_Node_Str",MetadataDatasourceService.TYPE));
    MetadataDatasource datasource=service.get("String_Node_Str");
    assertNotNull(datasource);
    service.remove("String_Node_Str");
    MetadataDatasource removedDatasource=service.get("String_Node_Str");
    assertEquals(removedDatasource,null);
  }
 catch (  GenericDatasourceServiceException e) {
    assertFalse(true);
  }
  try {
    service.add(new MetadataDatasource(getTestDomain("String_Node_Str"),"String_Node_Str",MetadataDatasourceService.TYPE));
    MetadataDatasource datasource=service.get("String_Node_Str");
    assertNotNull(datasource);
    service=new MetadataDatasourceService(new MockSessionAwareMetadataDomainRepository(),new NonAdministratorAuthorizationPolicy());
    service.remove("String_Node_Str");
    assertFalse(true);
  }
 catch (  PentahoAccessControlException e) {
    assertTrue(true);
  }
}

Fixed version (ground truth):
@Test public void testRemove() throws Exception {
  try {
    service=new MetadataDatasourceService(new MockSessionAwareMetadataDomainRepository(),new AdministratorAuthorizationPolicy());
    service.add(new MetadataDatasource(getTestDomain("String_Node_Str"),"String_Node_Str","String_Node_Str",MetadataDatasourceService.TYPE));
    MetadataDatasource datasource=service.get("String_Node_Str");
    assertNotNull(datasource);
    service.remove("String_Node_Str");
    MetadataDatasource removedDatasource=service.get("String_Node_Str");
    assertEquals(removedDatasource,null);
  }
 catch (  GenericDatasourceServiceException e) {
    assertFalse(true);
  }
  try {
    service.add(new MetadataDatasource(getTestDomain("String_Node_Str"),"String_Node_Str","String_Node_Str",MetadataDatasourceService.TYPE));
    MetadataDatasource datasource=service.get("String_Node_Str");
    assertNotNull(datasource);
    service=new MetadataDatasourceService(new MockSessionAwareMetadataDomainRepository(),new NonAdministratorAuthorizationPolicy());
    service.remove("String_Node_Str");
    assertFalse(true);
  }
 catch (  PentahoAccessControlException e) {
    assertTrue(true);
  }
}
Program: 47574
Project: 47574
Buggy source:
@Test public void testAdd() throws Exception {
  try {
    service=new MetadataDatasourceService(new MockSessionAwareMetadataDomainRepository(),new AdministratorAuthorizationPolicy());
    service.add(new MetadataDatasource(getTestDomain("String_Node_Str"),"String_Node_Str",MetadataDatasourceService.TYPE));
    MetadataDatasource datasource=service.get("String_Node_Str");
    assertNotNull(datasource);
    service.remove("String_Node_Str");
  }
 catch (  GenericDatasourceServiceException e) {
    assertFalse(true);
  }
  try {
    service=new MetadataDatasourceService(new MockSessionAwareMetadataDomainRepository(),new NonAdministratorAuthorizationPolicy());
    service.add(new MetadataDatasource(getTestDomain("String_Node_Str"),"String_Node_Str",MetadataDatasourceService.TYPE));
    assertFalse(true);
  }
 catch (  PentahoAccessControlException e) {
    assertTrue(true);
  }
}

Fixed version (ground truth):
@Test public void testAdd() throws Exception {
  try {
    service=new MetadataDatasourceService(new MockSessionAwareMetadataDomainRepository(),new AdministratorAuthorizationPolicy());
    service.add(new MetadataDatasource(getTestDomain("String_Node_Str"),"String_Node_Str","String_Node_Str",MetadataDatasourceService.TYPE));
    MetadataDatasource datasource=service.get("String_Node_Str");
    assertNotNull(datasource);
    service.remove("String_Node_Str");
  }
 catch (  GenericDatasourceServiceException e) {
    assertFalse(true);
  }
  try {
    service=new MetadataDatasourceService(new MockSessionAwareMetadataDomainRepository(),new NonAdministratorAuthorizationPolicy());
    service.add(new MetadataDatasource(getTestDomain("String_Node_Str"),"String_Node_Str","String_Node_Str",MetadataDatasourceService.TYPE));
    assertFalse(true);
  }
 catch (  PentahoAccessControlException e) {
    assertTrue(true);
  }
}
Program: 47575
Project: 47575
Buggy source:
/** 
 * Loads a   {@link Domain} from the repository
 * @param domainId       the domain ID of the metadata file to be loaded
 * @param repositoryFile the {@link RepositoryFile} which represents the metadata location
 * @return the loaded metadata {@link Domain} object
 * @throws Exception indicates an error loading the metadata object
 */
public Domain loadDomain(final String domainId,final RepositoryFile repositoryFile) throws Exception {
  final String methodCall="String_Node_Str" + domainId + "String_Node_Str"+ repositoryFile.toString()+ "String_Node_Str";
  logger.debug(methodCall);
  final Domain domain=loadDomainFromRepository(domainId,repositoryFile);
  logger.debug(methodCall + "String_Node_Str" + domain);
  dumpMappings();
  return domain;
}

Fixed version (ground truth):
/** 
 * Loads a   {@link Domain} from the repository
 * @param domainId       the domain ID of the metadata file to be loaded
 * @param xmiFile the {@link RepositoryFile} which represents the metadata location
 * @return the loaded metadata {@link Domain} object
 * @throws Exception indicates an error loading the metadata object
 */
public Domain loadDomain(final String domainId,final RepositoryFile xmiFile) throws Exception {
  final String methodCall="String_Node_Str" + domainId + "String_Node_Str"+ xmiFile.toString()+ "String_Node_Str";
  logger.debug(methodCall);
  final InputStream xmiInputStream=new RepositoryFileInputStream(xmiFile,repository);
  try {
    final Domain domain=getXmiParser().parseXmi(xmiInputStream);
    domain.setId(domainId);
    logger.debug(methodCall + "String_Node_Str" + domain);
    return domain;
  }
  finally {
    xmiInputStream.close();
  }
}
Program: 47576
Project: 47576
Buggy source:
/** 
 * Returns the set of Metadata Domains currently stored in the Unified Repository. The key for the set is the  {@code Domain IDs} and the values is a {@link RepositoryFile} object which will be used to load the{@link Domain} object
 * @return a map of Domain IDs
 * @throws Exception indicates an error loading the map from the repository
 */
public Map<String,RepositoryFile> loadDomainMappingFromRepository() throws Exception {
  logger.debug("String_Node_Str");
  final Map<String,RepositoryFile> mappings=loadMappingFile();
  logger.debug("String_Node_Str" + mappings.size());
  dumpMappings();
  return mappings;
}

Fixed version (ground truth):
/** 
 * Returns the set of Metadata Domains currently stored in the Unified Repository. The key for the set is the  {@code Domain IDs} and the values is a {@link RepositoryFile} object which will be used to load the{@link Domain} object
 * @return a map of Domain IDs
 * @throws Exception indicates an error loading the map from the repository
 */
public Map<String,RepositoryFile> loadDomainMappingFromRepository() throws Exception {
  logger.debug("String_Node_Str");
  final Map<String,RepositoryFile> domainMappings=new TreeMap<String,RepositoryFile>();
  final Properties mappingProperties=getMetadataMappingFile();
  for (  final String domainId : mappingProperties.stringPropertyNames()) {
    final String xmiFileLocation=mappingProperties.getProperty(domainId);
    final RepositoryFile xmiRepositoryFile=repository.getFile(xmiFileLocation);
    domainMappings.put(domainId,xmiRepositoryFile);
  }
  logger.debug("String_Node_Str" + domainMappings.size());
  return domainMappings;
}
Program: 47577
Project: 47577
Buggy source:
/** 
 * Removes the specified Domain ID from the internal repository
 * @param domainId the domain to remove
 * @throws Exception indicates an error removing the domain from the repository
 */
public void removeDomainFromRepository(final String domainId) throws Exception {
  final String methodCall="String_Node_Str" + domainId + "String_Node_Str";
  logger.debug(methodCall);
  final Properties mappingProperties=getMetadataMappingFile();
  final String repoLocation=mappingProperties.getProperty(domainId);
  if (null != repoLocation) {
    logger.debug(methodCall + "String_Node_Str" + repoLocation+ "String_Node_Str");
    mappingProperties.remove(domainId);
    writeMappingPropertiesFiles(mappingProperties);
    logger.debug(methodCall + "String_Node_Str");
    final RepositoryFile metadataFolder=repository.getFile(repoLocation);
    if (null != metadataFolder) {
      logger.debug(methodCall + "String_Node_Str");
      repository.deleteFile(metadataFolder.getId(),messages.getString("String_Node_Str",domainId));
    }
 else {
      logger.debug(methodCall + "String_Node_Str");
    }
  }
 else {
    logger.debug(methodCall + "String_Node_Str");
  }
  logger.debug(methodCall + "String_Node_Str");
  dumpMappings();
}

Fixed version (ground truth):
/** 
 * Removes the specified Domain ID from the internal repository
 * @param domainId the domain to remove
 * @throws Exception indicates an error removing the domain from the repository
 */
public void removeDomainFromRepository(final String domainId) throws Exception {
  final String methodCall="String_Node_Str" + domainId + "String_Node_Str";
  logger.debug(methodCall);
  final Properties mappingProperties=getMetadataMappingFile();
  final String repoLocation=mappingProperties.getProperty(domainId);
  if (null != repoLocation) {
    logger.debug(methodCall + "String_Node_Str" + repoLocation+ "String_Node_Str");
    mappingProperties.remove(domainId);
    writeMappingPropertiesFiles(mappingProperties);
    logger.debug(methodCall + "String_Node_Str");
    final RepositoryFile metadataFolder=repository.getFile(repoLocation);
    if (null != metadataFolder) {
      logger.debug(methodCall + "String_Node_Str");
      repository.deleteFile(metadataFolder.getId(),messages.getString("String_Node_Str",domainId));
    }
 else {
      logger.debug(methodCall + "String_Node_Str");
    }
  }
 else {
    logger.debug(methodCall + "String_Node_Str");
  }
  logger.debug(methodCall + "String_Node_Str");
}
Program: 47581
Project: 47581
Buggy source:
public FileTreeItem(Widget widget){
  super(widget);
}

Fixed version (ground truth):
/** 
 * @param string
 */
public FileTreeItem(String string){
  super(string);
}
Program: 47582
Project: 47582
Buggy source:
public void beforeFetchRepositoryFileTree(){
  WaitPopup.getInstance().setVisible(true);
  if (getSelectedItem() != null) {
    selectedItem=getSelectedItem();
  }
  clear();
  addItem(new TreeItem(Messages.getString("String_Node_Str")));
  WaitPopup.getInstance().setVisible(false);
}

Fixed version (ground truth):
public void beforeFetchRepositoryFileTree(){
  WaitPopup.getInstance().setVisible(true);
  if (getSelectedItem() != null) {
    selectedItem=getSelectedItem();
  }
  clear();
  addItem(new FileTreeItem(Messages.getString("String_Node_Str")));
  WaitPopup.getInstance().setVisible(false);
}
Program: 47583
Project: 47583
Buggy source:
public TreeItem getTrashItem(){
  return trashItem;
}

Fixed version (ground truth):
public FileTreeItem getTrashItem(){
  return trashItem;
}
Program: 47584
Project: 47584
Buggy source:
@GET @Path("String_Node_Str") @Produces({APPLICATION_XML,APPLICATION_JSON}) public List<RepositoryFileDto> doGetGeneratedContent(@PathParam("String_Node_Str") String pathId){
  RepositoryFileDto targetFile=doGetProperties(pathId);
  List<RepositoryFileDto> content=new ArrayList<RepositoryFileDto>();
  if (targetFile != null) {
    String targetFileId=targetFile.getId();
    SessionResource sessionResource=new SessionResource();
    RepositoryFileDto workspaceFolder=repoWs.getFile(sessionResource.doGetCurrentUserDir());
    List<RepositoryFileDto> children=repoWs.getChildren(workspaceFolder.getId());
    for (    RepositoryFileDto child : children) {
      if (!child.isFolder()) {
        Map<String,Serializable> fileMetadata=repository.getFileMetadata(child.getId());
        String creatorId=(String)fileMetadata.get(PentahoJcrConstants.PHO_CONTENTCREATOR);
        if (creatorId != null && creatorId.equals(targetFileId)) {
          content.add(child);
        }
      }
    }
  }
  return content;
}

Fixed version (ground truth):
@GET @Path("String_Node_Str") @Produces({APPLICATION_XML,APPLICATION_JSON}) public List<RepositoryFileDto> doGetGeneratedContent(@PathParam("String_Node_Str") String pathId){
  RepositoryFileDto targetFile=doGetProperties(pathId);
  List<RepositoryFileDto> content=new ArrayList<RepositoryFileDto>();
  if (targetFile != null) {
    String targetFileId=targetFile.getId();
    SessionResource sessionResource=new SessionResource();
    RepositoryFileDto workspaceFolder=repoWs.getFile(sessionResource.doGetCurrentUserDir());
    if (workspaceFolder != null) {
      List<RepositoryFileDto> children=repoWs.getChildren(workspaceFolder.getId());
      for (      RepositoryFileDto child : children) {
        if (!child.isFolder()) {
          Map<String,Serializable> fileMetadata=repository.getFileMetadata(child.getId());
          String creatorId=(String)fileMetadata.get(PentahoJcrConstants.PHO_CONTENTCREATOR);
          if (creatorId != null && creatorId.equals(targetFileId)) {
            content.add(child);
          }
        }
      }
    }
  }
  return content;
}
Program: 47585
Project: 47585
Buggy source:
private void hijackContentArea(IPluginPerspective perspective){
  Window.alert("String_Node_Str" + perspective.getId());
  Frame frame=null;
  for (int i=0; i < MantleApplication.getInstance().getContentDeck().getWidgetCount(); i++) {
    Widget w=MantleApplication.getInstance().getContentDeck().getWidget(i);
    if (w instanceof Frame && perspective.getId().equals(w.getElement().getId())) {
      frame=(Frame)w;
    }
  }
  if (frame == null) {
    frame=new Frame(perspective.getContentUrl());
    frame.getElement().setId(perspective.getId());
    MantleApplication.getInstance().getContentDeck().add(frame);
  }
  MantleApplication.getInstance().getContentDeck().showWidget(MantleApplication.getInstance().getContentDeck().getWidgetIndex(frame));
  final Element frameElement=frame.getElement();
  perspectiveActivated(frameElement);
}

Fixed version (ground truth):
private void hijackContentArea(IPluginPerspective perspective){
  Frame frame=null;
  for (int i=0; i < MantleApplication.getInstance().getContentDeck().getWidgetCount(); i++) {
    Widget w=MantleApplication.getInstance().getContentDeck().getWidget(i);
    if (w instanceof Frame && perspective.getId().equals(w.getElement().getId())) {
      frame=(Frame)w;
    }
  }
  if (frame == null) {
    frame=new Frame(perspective.getContentUrl());
    frame.getElement().setId(perspective.getId());
    MantleApplication.getInstance().getContentDeck().add(frame);
  }
  MantleApplication.getInstance().getContentDeck().showWidget(MantleApplication.getInstance().getContentDeck().getWidgetIndex(frame));
  final Element frameElement=frame.getElement();
  perspectiveActivated(frameElement);
}
Program: 47587
Project: 47587
Buggy source:
private void buildTrash(){
  trashItem=new TreeItem(new LeafItemWidget("String_Node_Str","String_Node_Str"));
  this.addItem(trashItem);
  DOM.setStyleAttribute(trashItem.getElement(),"String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
private void buildTrash(){
  trashItem=new FileTreeItem(new LeafItemWidget("String_Node_Str","String_Node_Str"));
  this.addItem(trashItem);
  DOM.setStyleAttribute(trashItem.getElement(),"String_Node_Str","String_Node_Str");
}
Program: 47589
Project: 47589
Buggy source:
public List<IPluginPerspective> getPluginPerspectives(){
  ArrayList<IPluginPerspective> allowedPerspectives=new ArrayList<IPluginPerspective>();
  for (  IPluginPerspective perspective : pluginPerspectives) {
    ArrayList<String> roles=perspective.getRoles();
    boolean allowed=true;
    if (roles != null || roles.size() > 0) {
      allowed=false;
      for (      String roleName : roles) {
        GrantedAuthorityImpl role=new GrantedAuthorityImpl(roleName);
        allowed=SecurityHelper.isGranted(PentahoSessionHolder.getSession(),role);
        if (allowed) {
          break;
        }
      }
    }
    if (allowed) {
      allowedPerspectives.add(perspective);
    }
  }
  return allowedPerspectives;
}

Fixed version (ground truth):
public List<IPluginPerspective> getPluginPerspectives(){
  ArrayList<IPluginPerspective> allowedPerspectives=new ArrayList<IPluginPerspective>();
  for (  IPluginPerspective perspective : pluginPerspectives) {
    ArrayList<String> roles=perspective.getRoles();
    boolean allowed=true;
    if (roles != null && roles.size() > 0) {
      allowed=false;
      for (      String roleName : roles) {
        GrantedAuthorityImpl role=new GrantedAuthorityImpl(roleName);
        allowed=SecurityHelper.isGranted(PentahoSessionHolder.getSession(),role);
        if (allowed) {
          break;
        }
      }
    }
    if (allowed) {
      allowedPerspectives.add(perspective);
    }
  }
  return allowedPerspectives;
}
Program: 47590
Project: 47590
Buggy source:
AbstractImagePrototype file_url();

Fixed version (ground truth):
ImageResource file_url();
Program: 47591
Project: 47591
Buggy source:
AbstractImagePrototype smallFolder();

Fixed version (ground truth):
ImageResource smallFolder();
Program: 47592
Project: 47592
Buggy source:
AbstractImagePrototype print_32_disabled();

Fixed version (ground truth):
ImageResource print_32_disabled();
Program: 47593
Project: 47593
Buggy source:
AbstractImagePrototype new_report_32();

Fixed version (ground truth):
ImageResource new_report_32();
Program: 47594
Project: 47594
Buggy source:
AbstractImagePrototype backToFirstPage();

Fixed version (ground truth):
ImageResource backToFirstPage();
Program: 47595
Project: 47595
Buggy source:
AbstractImagePrototype run();

Fixed version (ground truth):
ImageResource run();
Program: 47596
Project: 47596
Buggy source:
AbstractImagePrototype saveAs_32_disabled();

Fixed version (ground truth):
ImageResource saveAs_32_disabled();
Program: 47597
Project: 47597
Buggy source:
AbstractImagePrototype smallFolderHover();

Fixed version (ground truth):
ImageResource smallFolderHover();
Program: 47598
Project: 47598
Buggy source:
AbstractImagePrototype horizontalSplitPanelThumb();

Fixed version (ground truth):
ImageResource horizontalSplitPanelThumb();
Program: 47599
Project: 47599
Buggy source:
AbstractImagePrototype plus();

Fixed version (ground truth):
ImageResource plus();
Program: 47600
Project: 47600
Buggy source:
AbstractImagePrototype browser_hide_32();

Fixed version (ground truth):
ImageResource browser_hide_32();
Program: 47601
Project: 47601
Buggy source:
AbstractImagePrototype folder();

Fixed version (ground truth):
ImageResource folder();
Program: 47602
Project: 47602
Buggy source:
AbstractImagePrototype generic_square_32();

Fixed version (ground truth):
ImageResource generic_square_32();
Program: 47603
Project: 47603
Buggy source:
AbstractImagePrototype fileIcon();

Fixed version (ground truth):
ImageResource fileIcon();
Program: 47604
Project: 47604
Buggy source:
AbstractImagePrototype folderHover();

Fixed version (ground truth):
ImageResource folderHover();
Program: 47605
Project: 47605
Buggy source:
AbstractImagePrototype minus();

Fixed version (ground truth):
ImageResource minus();
Program: 47606
Project: 47606
Buggy source:
AbstractImagePrototype save_32();

Fixed version (ground truth):
ImageResource save_32();
Program: 47607
Project: 47607
Buggy source:
AbstractImagePrototype open_32();

Fixed version (ground truth):
ImageResource open_32();
Program: 47608
Project: 47608
Buggy source:
AbstractImagePrototype drop_invalid();

Fixed version (ground truth):
ImageResource drop_invalid();
Program: 47609
Project: 47609
Buggy source:
AbstractImagePrototype update();

Fixed version (ground truth):
ImageResource update();
Program: 47610
Project: 47610
Buggy source:
AbstractImagePrototype file_action();

Fixed version (ground truth):
ImageResource file_action();
Program: 47611
Project: 47611
Buggy source:
AbstractImagePrototype print_32();

Fixed version (ground truth):
ImageResource print_32();
Program: 47612
Project: 47612
Buggy source:
AbstractImagePrototype new_analysis_32();

Fixed version (ground truth):
ImageResource new_analysis_32();
Program: 47613
Project: 47613
Buggy source:
AbstractImagePrototype file();

Fixed version (ground truth):
ImageResource file();
Program: 47614
Project: 47614
Buggy source:
AbstractImagePrototype browser_show_32();

Fixed version (ground truth):
ImageResource browser_show_32();
Program: 47615
Project: 47615
Buggy source:
AbstractImagePrototype backButton();

Fixed version (ground truth):
ImageResource backButton();
Program: 47616
Project: 47616
Buggy source:
AbstractImagePrototype generic_square_32_disabled();

Fixed version (ground truth):
ImageResource generic_square_32_disabled();
Program: 47617
Project: 47617
Buggy source:
AbstractImagePrototype space1x13();

Fixed version (ground truth):
ImageResource space1x13();
Program: 47618
Project: 47618
Buggy source:
AbstractImagePrototype workspace_32();

Fixed version (ground truth):
ImageResource workspace_32();
Program: 47619
Project: 47619
Buggy source:
AbstractImagePrototype saveAs_32();

Fixed version (ground truth):
ImageResource saveAs_32();
Program: 47620
Project: 47620
Buggy source:
AbstractImagePrototype closeTab();

Fixed version (ground truth):
ImageResource closeTab();
Program: 47621
Project: 47621
Buggy source:
AbstractImagePrototype misc();

Fixed version (ground truth):
ImageResource misc();
Program: 47622
Project: 47622
Buggy source:
AbstractImagePrototype verticalSplitPanelThumb();

Fixed version (ground truth):
ImageResource verticalSplitPanelThumb();
Program: 47623
Project: 47623
Buggy source:
AbstractImagePrototype drop_valid();

Fixed version (ground truth):
ImageResource drop_valid();
Program: 47624
Project: 47624
Buggy source:
AbstractImagePrototype fileHover();

Fixed version (ground truth):
ImageResource fileHover();
Program: 47625
Project: 47625
Buggy source:
AbstractImagePrototype file_analysis();

Fixed version (ground truth):
ImageResource file_analysis();
Program: 47626
Project: 47626
Buggy source:
AbstractImagePrototype updateDisabled();

Fixed version (ground truth):
ImageResource updateDisabled();
Program: 47627
Project: 47627
Buggy source:
AbstractImagePrototype file_report();

Fixed version (ground truth):
ImageResource file_report();
Program: 47628
Project: 47628
Buggy source:
AbstractImagePrototype refresh();

Fixed version (ground truth):
ImageResource refresh();
Program: 47629
Project: 47629
Buggy source:
AbstractImagePrototype miscDisabled();

Fixed version (ground truth):
ImageResource miscDisabled();
Program: 47630
Project: 47630
Buggy source:
AbstractImagePrototype save_32_disabled();

Fixed version (ground truth):
ImageResource save_32_disabled();
Program: 47631
Project: 47631
Buggy source:
AbstractImagePrototype closeTabHover();

Fixed version (ground truth):
ImageResource closeTabHover();
Program: 47632
Project: 47632
Buggy source:
AbstractImagePrototype forwardToLastPage();

Fixed version (ground truth):
ImageResource forwardToLastPage();
Program: 47633
Project: 47633
Buggy source:
AbstractImagePrototype forwardButton();

Fixed version (ground truth):
ImageResource forwardButton();
Program: 47634
Project: 47634
Buggy source:
AbstractImagePrototype runDisabled();

Fixed version (ground truth):
ImageResource runDisabled();
Program: 47635
Project: 47635
Buggy source:
AbstractImagePrototype space1x23();

Fixed version (ground truth):
ImageResource space1x23();
Program: 47636
Project: 47636
Buggy source:
AbstractImagePrototype space1x20();

Fixed version (ground truth):
ImageResource space1x20();
Program: 47637
Project: 47637
Buggy source:
public void enableDrag(){
  setWidget(0,0,dropIndicator);
  addStyleName("String_Node_Str");
  setDroppable(false);
  MantleImages.images.drop_invalid().applyTo(dropIndicator);
}

Fixed version (ground truth):
public void enableDrag(){
  setWidget(0,0,dropIndicator);
  addStyleName("String_Node_Str");
  setDroppable(false);
  dropIndicator.setResource(MantleImages.images.drop_invalid());
}
Program: 47638
Project: 47638
Buggy source:
public FileItem(RepositoryFile repositoryFile,FilesListPanel filesListPanel,FileTypeEnabledOptions options,boolean supportsACLs,String fileIconStr){
  this.filesListPanel=filesListPanel;
  this.iconStr=fileIconStr;
  sinkEvents(Event.ONCLICK | Event.ONDBLCLICK | Event.ONMOUSEUP);
  DOM.setElementAttribute(getElement(),"String_Node_Str","String_Node_Str");
  DOM.setElementAttribute(popupMenu.getElement(),"String_Node_Str","String_Node_Str");
  fileLabel.setWordWrap(false);
  fileLabel.setText(repositoryFile.getTitle());
  fileLabel.setTitle(repositoryFile.getTitle());
  setStyleName("String_Node_Str");
  setCellPadding(0);
  setCellSpacing(0);
  ElementUtils.preventTextSelection(fileLabel.getElement());
  String name=repositoryFile.getName();
  Image fileIcon=new Image();
  if (fileIconStr != null) {
    fileIcon.setUrl(fileIconStr);
  }
 else   if (name.endsWith(ANALYSIS_VIEW_SUFFIX)) {
    MantleImages.images.file_analysis().applyTo(fileIcon);
  }
 else   if (name.endsWith(XACTION_SUFFIX)) {
    MantleImages.images.file_action().applyTo(fileIcon);
  }
 else   if (name.endsWith(URL_SUFFIX)) {
    MantleImages.images.file_url().applyTo(fileIcon);
  }
 else {
    MantleImages.images.fileIcon().applyTo(fileIcon);
  }
  fileIcon.setWidth("String_Node_Str");
  fileLabel.setWidth("String_Node_Str");
  setWidget(0,0,fileIcon);
  getCellFormatter().setWidth(0,0,"String_Node_Str");
  setWidget(0,1,fileLabel);
  getCellFormatter().setWidth(0,1,"String_Node_Str");
  this.options=options;
  this.repositoryFile=repositoryFile;
}

Fixed version (ground truth):
public FileItem(RepositoryFile repositoryFile,FilesListPanel filesListPanel,FileTypeEnabledOptions options,boolean supportsACLs,String fileIconStr){
  this.filesListPanel=filesListPanel;
  this.iconStr=fileIconStr;
  sinkEvents(Event.ONCLICK | Event.ONDBLCLICK | Event.ONMOUSEUP);
  DOM.setElementAttribute(getElement(),"String_Node_Str","String_Node_Str");
  DOM.setElementAttribute(popupMenu.getElement(),"String_Node_Str","String_Node_Str");
  fileLabel.setWordWrap(false);
  fileLabel.setText(repositoryFile.getTitle());
  fileLabel.setTitle(repositoryFile.getTitle());
  setStyleName("String_Node_Str");
  setCellPadding(0);
  setCellSpacing(0);
  ElementUtils.preventTextSelection(fileLabel.getElement());
  String name=repositoryFile.getName();
  Image fileIcon=new Image();
  if (fileIconStr != null) {
    fileIcon.setUrl(fileIconStr);
  }
 else   if (name.endsWith(ANALYSIS_VIEW_SUFFIX)) {
    fileIcon.setResource(MantleImages.images.file_analysis());
  }
 else   if (name.endsWith(XACTION_SUFFIX)) {
    fileIcon.setResource(MantleImages.images.file_action());
  }
 else   if (name.endsWith(URL_SUFFIX)) {
    fileIcon.setResource(MantleImages.images.file_url());
  }
 else {
    fileIcon.setResource(MantleImages.images.fileIcon());
  }
  fileIcon.setWidth("String_Node_Str");
  fileLabel.setWidth("String_Node_Str");
  setWidget(0,0,fileIcon);
  getCellFormatter().setWidth(0,0,"String_Node_Str");
  setWidget(0,1,fileLabel);
  getCellFormatter().setWidth(0,1,"String_Node_Str");
  this.options=options;
  this.repositoryFile=repositoryFile;
}
Program: 47639
Project: 47639
Buggy source:
public void setDroppable(boolean canDrop){
  if (this.canDrop == canDrop) {
    return;
  }
  if (canDrop) {
    MantleImages.images.drop_valid().applyTo(dropIndicator);
    addStyleName("String_Node_Str");
  }
 else {
    MantleImages.images.drop_invalid().applyTo(dropIndicator);
    removeStyleName("String_Node_Str");
  }
  this.canDrop=canDrop;
}

Fixed version (ground truth):
public void setDroppable(boolean canDrop){
  if (this.canDrop == canDrop) {
    return;
  }
  if (canDrop) {
    dropIndicator.setResource(MantleImages.images.drop_valid());
    addStyleName("String_Node_Str");
  }
 else {
    dropIndicator.setResource(MantleImages.images.drop_invalid());
    removeStyleName("String_Node_Str");
  }
  this.canDrop=canDrop;
}
Program: 47640
Project: 47640
Buggy source:
/** 
 */
private void createMenus(){
  addSpacer(5);
  Label label=new Label(Messages.getString("String_Node_Str"));
  label.setStyleName("String_Node_Str");
  add(label);
  add(GLUE);
  Image refreshImage=new Image();
  MantleImages.images.refresh().applyTo(refreshImage);
  Image refreshDisabledImage=new Image();
  MantleImages.images.runDisabled().applyTo(refreshDisabledImage);
  refreshBtn=new ToolbarButton(refreshImage,refreshDisabledImage);
  refreshBtn.setCommand(new RefreshRepositoryCommand());
  refreshBtn.setToolTip(Messages.getString("String_Node_Str"));
  add(refreshBtn);
}

Fixed version (ground truth):
/** 
 */
private void createMenus(){
  addSpacer(5);
  Label label=new Label(Messages.getString("String_Node_Str"));
  label.setStyleName("String_Node_Str");
  add(label);
  add(GLUE);
  Image refreshImage=new Image();
  refreshImage.setResource(MantleImages.images.refresh());
  Image refreshDisabledImage=new Image();
  refreshDisabledImage.setResource(MantleImages.images.runDisabled());
  refreshBtn=new ToolbarButton(refreshImage,refreshDisabledImage);
  refreshBtn.setCommand(new RefreshRepositoryCommand());
  refreshBtn.setToolTip(Messages.getString("String_Node_Str"));
  add(refreshBtn);
}
Program: 47648
Project: 47648
Buggy source:
public void update(){
  if (viewer == null)   return;
  try {
    IEditorPart editor=ActionBarContributor.getActiveEditor();
    if (!(editor instanceof MarkdownEditor)) {
      viewer.setText("String_Node_Str");
      return;
    }
    MarkdownEditor ed=(MarkdownEditor)editor;
    MarkdownPage page=ed.getMarkdownPage();
    String html=page.html();
    html=addBaseURL(editor,html);
    if (page != null)     viewer.setText(html);
 else     viewer.setText("String_Node_Str");
  }
 catch (  Exception ex) {
    System.out.println(ex);
    viewer.setText(ex.getMessage());
  }
}

Fixed version (ground truth):
public void update(){
  if (viewer == null)   return;
  try {
    IEditorPart editor=ActionBarContributor.getActiveEditor();
    if (!(editor instanceof MarkdownEditor)) {
      viewer.setText("String_Node_Str");
      return;
    }
    MarkdownEditor ed=(MarkdownEditor)editor;
    MarkdownPage page=ed.getMarkdownPage();
    String html=page.html();
    html=addBaseURL(editor,html);
    if (page != null)     viewer.setText(html);
 else     viewer.setText("String_Node_Str");
  }
 catch (  Exception ex) {
    System.out.println(ex);
    if (viewer != null && !viewer.isDisposed())     viewer.setText(ex.getMessage());
  }
}
Program: 47649
Project: 47649
Buggy source:
/** 
 * Cleanly shut down this StatsD client.
 */
public void stop(){
  try {
    executor.shutdown();
    executor.awaitTermination(30,TimeUnit.SECONDS);
  }
 catch (  Exception e) {
  }
 finally {
    if (clientSocket != null) {
      clientSocket.close();
    }
  }
}

Fixed version (ground truth):
/** 
 * Cleanly shut down this StatsD client. This method may throw an exception if the socket cannot be closed.
 */
public void stop(){
  try {
    executor.shutdown();
    executor.awaitTermination(30,TimeUnit.SECONDS);
  }
 catch (  Exception e) {
    throw new IllegalStateException(e);
  }
 finally {
    if (clientSocket != null) {
      clientSocket.close();
    }
  }
}
Program: 47650
Project: 47650
Buggy source:
/** 
 * Increments the specified counter by one. This method is non-blocking and is guaranteed not to throw an exception.
 * @param aspect the name of the counter to increment
 */
public void incrementCounter(String aspect){
  send(String.format("String_Node_Str",prefix,aspect,1));
}

Fixed version (ground truth):
/** 
 * Increments the specified counter by one. <p>This method is non-blocking and is guaranteed not to throw an exception.</p>
 * @param aspect the name of the counter to increment
 */
public void incrementCounter(String aspect){
  send(String.format("String_Node_Str",prefix,aspect,1));
}
Program: 47651
Project: 47651
Buggy source:
public StatsDClient(String prefix,String hostname,int port){
  this.prefix=prefix;
  try {
    this.clientSocket=new DatagramSocket();
    this.clientSocket.connect(new InetSocketAddress(hostname,port));
  }
 catch (  SocketException e) {
    throw new IllegalStateException(e);
  }
}

Fixed version (ground truth):
/** 
 * Create a new StatsD client communicating with a StatsD instance on the specified host and port. All messages send via this client will have their keys prefixed with the specified string. The new client will attempt to open a connection to the StatsD server immediately upon instantiation, and may throw an exception if that a connection cannot be established.
 * @param prefix the prefix to apply to keys sent via this client
 * @param hostname the host name of the targeted StatsD server
 * @param port the port of the targeted StatsD server
 */
public StatsDClient(String prefix,String hostname,int port){
  this.prefix=prefix;
  try {
    this.clientSocket=new DatagramSocket();
    this.clientSocket.connect(new InetSocketAddress(hostname,port));
  }
 catch (  SocketException e) {
    throw new IllegalStateException(e);
  }
}
Program: 47652
Project: 47652
Buggy source:
/** 
 * Records an execution time in milliseconds for the specified named operation.
 * @param aspect the name of the timed operation
 * @param timeInMs the time in milliseconds
 */
public void recordExecutionTime(String aspect,int timeInMs){
  send(String.format("String_Node_Str",prefix,aspect,1));
}

Fixed version (ground truth):
/** 
 * Records an execution time in milliseconds for the specified named operation. <p>This method is non-blocking and is guaranteed not to throw an exception.</p>
 * @param aspect the name of the timed operation
 * @param timeInMs the time in milliseconds
 */
public void recordExecutionTime(String aspect,int timeInMs){
  send(String.format("String_Node_Str",prefix,aspect,timeInMs));
}
Program: 47653
Project: 47653
Buggy source:
/** 
 * Records the latest fixed value for the specified named gauge.
 * @param aspect the name of the gauge
 * @param value the new reading of the gauge
 */
public void recordGaugeValue(String aspect,int value){
  send(String.format("String_Node_Str",prefix,aspect,1));
}

Fixed version (ground truth):
/** 
 * Records the latest fixed value for the specified named gauge. <p>This method is non-blocking and is guaranteed not to throw an exception.</p>
 * @param aspect the name of the gauge
 * @param value the new reading of the gauge
 */
public void recordGaugeValue(String aspect,int value){
  send(String.format("String_Node_Str",prefix,aspect,value));
}
Program: 47654
Project: 47654
Buggy source:
/** 
 * <p> Gets a DecimalFormat instance for the current thread with the given pattern and uses it to format the given arguments. </p>
 * @param pattern Format pattern that follows the conventions of {@link java.text.MessageFormat MessageFormat}
 * @param args Arguments
 * @return The formatted String
 */
public static String format(final String pattern,final Object... args){
  return messageFormat(pattern).render(args);
}

Fixed version (ground truth):
/** 
 * <p> Gets an ExtendedMessageFormat instance for the current thread with the given pattern and uses it to format a message with the specified arguments. </p>
 * @param pattern Format pattern that follows the conventions of {@link humanize.text.ExtendedMessageFormat MessageFormat}
 * @param args Arguments
 * @return The formatted String
 */
public static String format(final String pattern,final Object... args){
  return messageFormat(pattern).render(args);
}
Program: 47655
Project: 47655
Buggy source:
@Override public MessageFormat getMessageFormat(){
  messageFormat.setLocale(locale);
  return messageFormat;
}

Fixed version (ground truth):
@Override public MessageFormat getMessageFormat(){
  return new MessageFormat(EMPTY,locale);
}
Program: 47656
Project: 47656
Buggy source:
public DefaultContext(Locale locale){
  this.messageFormat=new MessageFormat(EMPTY,locale);
  setLocale(locale);
}

Fixed version (ground truth):
public DefaultContext(Locale locale){
  setLocale(locale);
}
Program: 47657
Project: 47657
Buggy source:
@Override public int getItemViewType(int position){
  return sections.values().contains(position) ? VIEW_TYPE_SECTION_HEADER : customListAdapter.getItemViewType(position) + 1;
}

Fixed version (ground truth):
@Override public int getItemViewType(int position){
  int positionInCustomAdapter=getUndecoratedItemPosition(position);
  return sections.values().contains(position) ? VIEW_TYPE_SECTION_HEADER : customListAdapter.getItemViewType(positionInCustomAdapter) + 1;
}
Program: 47658
Project: 47658
Buggy source:
private void findSections(){
  int n=listAdapter.getCount();
  int nSections=0;
  for (int i=0; i < n; i++) {
    @SuppressWarnings("String_Node_Str") String sectionName=sectionizer.getSectionTitleForItem((T)listAdapter.getItem(i));
    if (!sections.containsKey(sectionName)) {
      sections.put(sectionName,i + nSections);
      nSections++;
    }
  }
  if (DEBUG) {
    Log.d(TAG,String.format("String_Node_Str",sections.size()));
  }
}

Fixed version (ground truth):
private void findSections(){
  int n=listAdapter.getCount();
  int nSections=0;
  sections.clear();
  for (int i=0; i < n; i++) {
    @SuppressWarnings("String_Node_Str") String sectionName=sectionizer.getSectionTitleForItem((T)listAdapter.getItem(i));
    if (!sections.containsKey(sectionName)) {
      sections.put(sectionName,i + nSections);
      nSections++;
    }
  }
  if (DEBUG) {
    Log.d(TAG,String.format("String_Node_Str",sections.size()));
  }
}
Program: 47659
Project: 47659
Buggy source:
@Override public Void execute(final Client client) throws ElasticSearchException {
  BulkRequestBuilder bulkRequestBuilder=null;
  try {
    if ((bulks != null) && (!bulks.isEmpty())) {
      bulkRequestBuilder=client.prepareBulk();
      for (      JSONProvider jsonProvider : bulks) {
        String content=jsonProvider.toJson();
        bulkRequestBuilder.add(content.getBytes(),0,content.length(),true,null,null);
      }
    }
    CreateIndexResponse response=client.admin().indices().create(request).get();
    if ((response.acknowledged()) && (bulkRequestBuilder != null)) {
      BulkResponse bulkResponse=bulkRequestBuilder.setRefresh(true).execute().actionGet();
      if (bulkResponse.hasFailures()) {
        throw new EsSetupRuntimeException("String_Node_Str" + bulkResponse.buildFailureMessage());
      }
    }
  }
 catch (  Exception e) {
    throw new EsSetupRuntimeException(e);
  }
  return null;
}

Fixed version (ground truth):
@Override public Void execute(final Client client) throws ElasticSearchException {
  BulkRequestBuilder bulkRequestBuilder=null;
  try {
    if ((bulks != null) && (!bulks.isEmpty())) {
      bulkRequestBuilder=client.prepareBulk();
      for (      JSONProvider jsonProvider : bulks) {
        byte[] content=jsonProvider.toJson().getBytes("String_Node_Str");
        bulkRequestBuilder.add(content,0,content.length,true);
      }
    }
    CreateIndexResponse response=client.admin().indices().create(request).get();
    if ((response.acknowledged()) && (bulkRequestBuilder != null)) {
      BulkResponse bulkResponse=bulkRequestBuilder.setRefresh(true).execute().actionGet();
      if (bulkResponse.hasFailures()) {
        throw new EsSetupRuntimeException("String_Node_Str" + bulkResponse.buildFailureMessage());
      }
    }
  }
 catch (  Exception e) {
    throw new EsSetupRuntimeException(e);
  }
  return null;
}
Program: 47660
Project: 47660
Buggy source:
/** 
 * Called when the activity is first created. 
 */
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  logger.debug("String_Node_Str");
  PrngFixes.apply();
  SharedPreferences prefs=LoadPrefsUtil.getPrefs(getBaseContext());
  prefs.registerOnSharedPreferenceChangeListener(prefsChangeListener);
  theme=LoadPrefsUtil.theme(prefs);
  setTheme(theme.resourceId());
  setContentView(R.layout.main);
  calcPubkeyFingerprints();
  showKeyFingerprints();
  ((TextView)findViewById(R.id.addressesLabel)).setText(String.format("String_Node_Str",getText(R.string.ipAddrLabel),getText(R.string.ifacesLabel)));
  ((TextView)findViewById(R.id.portsLabel)).setText(String.format("String_Node_Str",getText(R.string.protocolLabel),getText(R.string.portLabel),getText(R.string.state)));
  EventBus.getDefault().register(this);
  if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
    View storageContainer=findViewById(R.id.storageContainer);
    ((ViewManager)storageContainer.getParent()).removeView(storageContainer);
    View safExplainHeading=findViewById(R.id.safExplainHeading);
    ((ViewManager)storageContainer.getParent()).removeView(safExplainHeading);
    View safExplain=findViewById(R.id.safExplain);
    ((ViewManager)storageContainer.getParent()).removeView(safExplain);
  }
}

Fixed version (ground truth):
/** 
 * Called when the activity is first created. 
 */
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  logger.debug("String_Node_Str");
  PrngFixes.apply();
  SharedPreferences prefs=LoadPrefsUtil.getPrefs(getBaseContext());
  prefs.registerOnSharedPreferenceChangeListener(prefsChangeListener);
  theme=LoadPrefsUtil.theme(prefs);
  setTheme(theme.resourceId());
  setContentView(R.layout.main);
  calcPubkeyFingerprints();
  showKeyFingerprints();
  ((TextView)findViewById(R.id.addressesLabel)).setText(String.format("String_Node_Str",getText(R.string.ipAddrLabel),getText(R.string.ifacesLabel)));
  ((TextView)findViewById(R.id.portsLabel)).setText(String.format("String_Node_Str",getText(R.string.protocolLabel),getText(R.string.portLabel),getText(R.string.state)));
  EventBus.getDefault().register(this);
  if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
    View storageContainer=findViewById(R.id.storageContainer);
    ((ViewManager)storageContainer.getParent()).removeView(storageContainer);
    View safExplainHeading=findViewById(R.id.safExplainHeading);
    ((ViewManager)safExplainHeading.getParent()).removeView(safExplainHeading);
    View safExplain=findViewById(R.id.safExplain);
    ((ViewManager)safExplain.getParent()).removeView(safExplain);
  }
}
Program: 47661
Project: 47661
Buggy source:
protected void checkSafAccess(){
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
    boolean hideWarning=true;
    RadioButton safRadio=findViewById(R.id.radioStorageSaf);
    if (prefsBean.getStorageType() == StorageType.SAF || prefsBean.getStorageType() == StorageType.RO_SAF) {
      Cursor cursor=null;
      try {
        String url=prefsBean.getSafUrl();
        Uri uri=Uri.parse(url);
        cursor=getContentResolver().query(uri,new String[]{DocumentsContract.Document.COLUMN_DOCUMENT_ID},null,null,null,null);
        cursor.moveToFirst();
      }
 catch (      UnsupportedOperationException e) {
      }
catch (      SecurityException e) {
        logger.debug("String_Node_Str",e.toString());
        hideWarning=false;
      }
 finally {
        if (cursor != null) {
          cursor.close();
        }
      }
    }
    if (hideWarning) {
      safRadio.setCompoundDrawablesWithIntrinsicBounds(0,0,0,0);
    }
 else {
      int icon=theme == Theme.DARK ? R.drawable.ic_warning_white_36dp : R.drawable.ic_warning_black_36dp;
      safRadio.setCompoundDrawablesWithIntrinsicBounds(0,0,icon,0);
    }
  }
}

Fixed version (ground truth):
protected void checkSafAccess(){
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
    boolean hideWarning=true;
    RadioButton safRadio=findViewById(R.id.radioStorageSaf);
    if (prefsBean.getStorageType() == StorageType.SAF || prefsBean.getStorageType() == StorageType.RO_SAF) {
      Cursor cursor=null;
      try {
        String url=prefsBean.getSafUrl();
        Uri uri=Uri.parse(url);
        cursor=getContentResolver().query(uri,new String[]{DocumentsContract.Document.COLUMN_DOCUMENT_ID},null,null,null,null);
        cursor.moveToFirst();
      }
 catch (      UnsupportedOperationException e) {
      }
catch (      SecurityException|NullPointerException e) {
        logger.debug("String_Node_Str",e.toString());
        hideWarning=false;
      }
 finally {
        if (cursor != null) {
          cursor.close();
        }
      }
    }
    if (hideWarning) {
      safRadio.setCompoundDrawablesWithIntrinsicBounds(0,0,0,0);
    }
 else {
      int icon=theme == Theme.DARK ? R.drawable.ic_warning_white_36dp : R.drawable.ic_warning_black_36dp;
      safRadio.setCompoundDrawablesWithIntrinsicBounds(0,0,icon,0);
    }
  }
}
Program: 47662
Project: 47662
Buggy source:
static String absoluteOrHome(String path,String homeDir){
  if ("String_Node_Str".equals(path) || "String_Node_Str".equals(path)) {
    return homeDir;
  }
  return path;
}

Fixed version (ground truth):
static String absoluteOrHome(String path,String homeDir){
  if ("String_Node_Str".equals(path) || "String_Node_Str".equals(path)) {
    return homeDir;
  }
  if (path.charAt(0) != '/') {
    return homeDir + "String_Node_Str" + path;
  }
  return path;
}