nus-yam/ex-repair huggingface dataset:
Program: 20734
Project: 20734
Buggy source:
public void fromProperties(Map<String,String> properties){
  scanEndTime=new Date(Long.valueOf(properties.get("String_Node_Str")));
  scanStartTime=new Date(Long.valueOf(properties.get("String_Node_Str")));
  totalArtifactCount=Long.valueOf(properties.get("String_Node_Str"));
  totalArtifactFileSize=Long.valueOf(properties.get("String_Node_Str"));
  totalFileCount=Long.valueOf(properties.get("String_Node_Str"));
  totalGroupCount=Long.valueOf(properties.get("String_Node_Str"));
  totalProjectCount=Long.valueOf(properties.get("String_Node_Str"));
  newFileCount=Long.valueOf(properties.get("String_Node_Str"));
  totalCountForType.clear();
  for (  Map.Entry<String,String> entry : properties.entrySet()) {
    if (entry.getKey().startsWith("String_Node_Str")) {
      totalCountForType.put(entry.getKey().substring(6),Long.valueOf(entry.getValue()));
    }
  }
}

Fixed version (ground truth):
public void fromProperties(Map<String,String> properties){
  scanEndTime=new Date(Long.parseLong(properties.get("String_Node_Str")));
  scanStartTime=new Date(Long.parseLong(properties.get("String_Node_Str")));
  totalArtifactCount=Long.parseLong(properties.get("String_Node_Str"));
  totalArtifactFileSize=Long.parseLong(properties.get("String_Node_Str"));
  totalFileCount=Long.parseLong(properties.get("String_Node_Str"));
  totalGroupCount=Long.parseLong(properties.get("String_Node_Str"));
  totalProjectCount=Long.parseLong(properties.get("String_Node_Str"));
  newFileCount=Long.parseLong(properties.get("String_Node_Str"));
  totalCountForType.clear();
  for (  Map.Entry<String,String> entry : properties.entrySet()) {
    if (entry.getKey().startsWith("String_Node_Str")) {
      totalCountForType.put(entry.getKey().substring(6),Long.valueOf(entry.getValue()));
    }
  }
}
Program: 20735
Project: 20735
Buggy source:
public void testGetArtifactVersions(){
  ArtifactMetadata artifact1=createArtifact();
  String version1="String_Node_Str";
  artifact1.setId(artifact1.getProject() + "String_Node_Str" + version1+ "String_Node_Str");
  artifact1.setVersion(version1);
  ArtifactMetadata artifact2=createArtifact();
  String version2="String_Node_Str";
  artifact2.setId(artifact2.getProject() + "String_Node_Str" + version2+ "String_Node_Str");
  artifact2.setVersion(version2);
  repository.updateArtifact(TEST_REPO_ID,TEST_NAMESPACE,TEST_PROJECT,TEST_PROJECT_VERSION,artifact1);
  repository.updateArtifact(TEST_REPO_ID,TEST_NAMESPACE,TEST_PROJECT,TEST_PROJECT_VERSION,artifact2);
  assertEquals(Arrays.asList(version2,version1),repository.getArtifactVersions(TEST_REPO_ID,TEST_NAMESPACE,TEST_PROJECT,TEST_PROJECT_VERSION));
}

Fixed version (ground truth):
public void testGetArtifactVersions(){
  ArtifactMetadata artifact1=createArtifact();
  String version1="String_Node_Str";
  artifact1.setId(artifact1.getProject() + "String_Node_Str" + version1+ "String_Node_Str");
  artifact1.setVersion(version1);
  ArtifactMetadata artifact2=createArtifact();
  String version2="String_Node_Str";
  artifact2.setId(artifact2.getProject() + "String_Node_Str" + version2+ "String_Node_Str");
  artifact2.setVersion(version2);
  repository.updateArtifact(TEST_REPO_ID,TEST_NAMESPACE,TEST_PROJECT,TEST_PROJECT_VERSION,artifact1);
  repository.updateArtifact(TEST_REPO_ID,TEST_NAMESPACE,TEST_PROJECT,TEST_PROJECT_VERSION,artifact2);
  assertEquals(new HashSet<String>(Arrays.asList(version2,version1)),repository.getArtifactVersions(TEST_REPO_ID,TEST_NAMESPACE,TEST_PROJECT,TEST_PROJECT_VERSION));
}
Program: 20736
Project: 20736
Buggy source:
public ProjectVersionFacet getFacet(String facetId){
  return this.facets.get(facetId);
}

Fixed version (ground truth):
public ProjectVersionFacet getFacet(String facetId){
  return this.facets != null ? this.facets.get(facetId) : null;
}
Program: 20737
Project: 20737
Buggy source:
public ProjectVersionMetadata getProjectVersion(String repoId,String namespace,String projectId,String projectVersion) throws MetadataResolverException {
  ProjectVersionMetadata metadata=metadataRepository.getProjectVersion(repoId,namespace,projectId,projectVersion);
  if (metadata == null) {
    metadata=storageResolver.getProjectVersion(repoId,namespace,projectId,projectVersion);
    metadataRepository.updateProjectVersion(repoId,namespace,projectId,metadata);
  }
  return metadata;
}

Fixed version (ground truth):
public ProjectVersionMetadata getProjectVersion(String repoId,String namespace,String projectId,String projectVersion) throws MetadataResolverException {
  ProjectVersionMetadata metadata=metadataRepository.getProjectVersion(repoId,namespace,projectId,projectVersion);
  if (metadata == null) {
    metadata=storageResolver.getProjectVersion(repoId,namespace,projectId,projectVersion);
    if (metadata != null) {
      metadataRepository.updateProjectVersion(repoId,namespace,projectId,metadata);
    }
  }
  return metadata;
}
Program: 20738
Project: 20738
Buggy source:
public Collection<String> getArtifactVersions(String repoId,String namespace,String projectId,String projectVersion){
  File directory=new File(this.directory,repoId + "String_Node_Str" + projectId+ "String_Node_Str"+ projectVersion);
  Properties properties=readProperties(directory);
  List<String> versions=new ArrayList<String>();
  for (  Map.Entry entry : properties.entrySet()) {
    String name=(String)entry.getKey();
    if (name.startsWith("String_Node_Str")) {
      versions.add((String)entry.getValue());
    }
  }
  return versions;
}

Fixed version (ground truth):
public Collection<String> getArtifactVersions(String repoId,String namespace,String projectId,String projectVersion){
  File directory=new File(this.directory,repoId + "String_Node_Str" + namespace+ "String_Node_Str"+ projectId+ "String_Node_Str"+ projectVersion);
  Properties properties=readProperties(directory);
  List<String> versions=new ArrayList<String>();
  for (  Map.Entry entry : properties.entrySet()) {
    String name=(String)entry.getKey();
    if (name.startsWith("String_Node_Str")) {
      versions.add((String)entry.getValue());
    }
  }
  return versions;
}
Program: 20739
Project: 20739
Buggy source:
public ProjectVersionMetadata getProjectVersion(String repoId,String groupId,String projectId,String projectVersion){
  File directory=new File(this.directory,repoId + "String_Node_Str" + projectId+ "String_Node_Str"+ projectVersion);
  Properties properties=readProperties(directory);
  ProjectVersionMetadata versionMetadata=new ProjectVersionMetadata();
  versionMetadata.setId(properties.getProperty("String_Node_Str"));
  return versionMetadata;
}

Fixed version (ground truth):
public ProjectVersionMetadata getProjectVersion(String repoId,String namespace,String projectId,String projectVersion){
  File directory=new File(this.directory,repoId + "String_Node_Str" + namespace+ "String_Node_Str"+ projectId+ "String_Node_Str"+ projectVersion);
  Properties properties=readProperties(directory);
  String id=properties.getProperty("String_Node_Str");
  ProjectVersionMetadata versionMetadata=null;
  if (id != null) {
    versionMetadata=new ProjectVersionMetadata();
    versionMetadata.setId(id);
  }
  return versionMetadata;
}
Program: 20740
Project: 20740
Buggy source:
public ProjectMetadata getProject(String repoId,String groupId,String projectId){
  File directory=new File(this.directory,repoId + "String_Node_Str" + projectId);
  Properties properties=readProperties(directory);
  ProjectMetadata project=new ProjectMetadata();
  project.setNamespace(properties.getProperty("String_Node_Str"));
  project.setId(properties.getProperty("String_Node_Str"));
  return project;
}

Fixed version (ground truth):
public ProjectMetadata getProject(String repoId,String namespace,String projectId){
  File directory=new File(this.directory,repoId + "String_Node_Str" + namespace+ "String_Node_Str"+ projectId);
  Properties properties=readProperties(directory);
  ProjectMetadata project=new ProjectMetadata();
  project.setNamespace(properties.getProperty("String_Node_Str"));
  project.setId(properties.getProperty("String_Node_Str"));
  return project;
}
Program: 20741
Project: 20741
Buggy source:
/** 
 * Creates a log message in the following format ... "{repository_id} {user_id} {remote_ip} \"{resource}\" \"{action}\""
 */
public void auditEvent(AuditEvent event){
  StringBuffer msg=new StringBuffer();
  msg.append(checkNull(event.getRepositoryId())).append(DELIM);
  msg.append(event.getUserId()).append(DELIM);
  msg.append(event.getRemoteIP()).append(DELIM);
  msg.append('\"').append(checkNull(event.getResource())).append('\"').append(DELIM);
  msg.append('\"').append(event.getAction()).append('\"');
  logger.info(msg.toString());
}

Fixed version (ground truth):
/** 
 * Creates a log message in the following format ... "{repository_id} {user_id} {remote_ip} \"{resource}\" \"{action}\""
 */
public void auditEvent(AuditEvent event){
  StringBuffer msg=new StringBuffer();
  msg.append(checkNull(event.getRepositoryId())).append(DELIM);
  msg.append(event.getUserId()).append(DELIM);
  msg.append(checkNull(event.getRemoteIP())).append(DELIM);
  msg.append('\"').append(checkNull(event.getResource())).append('\"').append(DELIM);
  msg.append('\"').append(event.getAction()).append('\"');
  logger.info(msg.toString());
}
Program: 20742
Project: 20742
Buggy source:
public static String getActivePrincipal(Map<String,?> sessionMap){
  SecuritySession securitySession=(SecuritySession)sessionMap.get(SecuritySystemConstants.SECURITY_SESSION_KEY);
  if (securitySession == null) {
    return UserManager.GUEST_USERNAME;
  }
  User user=securitySession.getUser();
  if (user == null) {
    return UserManager.GUEST_USERNAME;
  }
  return (String)user.getPrincipal();
}

Fixed version (ground truth):
public static String getActivePrincipal(Map<String,?> sessionMap){
  if (sessionMap == null) {
    return UserManager.GUEST_USERNAME;
  }
  SecuritySession securitySession=(SecuritySession)sessionMap.get(SecuritySystemConstants.SECURITY_SESSION_KEY);
  if (securitySession == null) {
    return UserManager.GUEST_USERNAME;
  }
  User user=securitySession.getUser();
  if (user == null) {
    return UserManager.GUEST_USERNAME;
  }
  return (String)user.getPrincipal();
}
Program: 20743
Project: 20743
Buggy source:
protected void triggerAuditEvent(String action){
  AuditEvent event=new AuditEvent(getPrincipal(),action);
  event.setRemoteIP(ServletActionContext.getRequest().getRemoteAddr());
  for (  AuditListener listener : auditListeners) {
    listener.auditEvent(event);
  }
}

Fixed version (ground truth):
protected void triggerAuditEvent(String action){
  AuditEvent event=new AuditEvent(getPrincipal(),action);
  event.setRemoteIP(getRemoteAddr());
  for (  AuditListener listener : auditListeners) {
    listener.auditEvent(event);
  }
}
Program: 20744
Project: 20744
Buggy source:
public Artifact(String repositoryId,String groupId,String artifactId,String version,String type,Date whenGathered){
  this.repositoryId=repositoryId;
  this.groupId=groupId;
  this.artifactId=artifactId;
  this.version=version;
  this.type=type;
  this.whenGathered=whenGathered;
}

Fixed version (ground truth):
public Artifact(String repositoryId,String groupId,String artifactId,String version,String type){
  this.repositoryId=repositoryId;
  this.groupId=groupId;
  this.artifactId=artifactId;
  this.version=version;
  this.type=type;
}
Program: 20745
Project: 20745
Buggy source:
public List<Artifact> getArtifactVersions(String groupId,String artifactId) throws Exception {
  List<Artifact> artifacts=new ArrayList<Artifact>();
  List<String> observableRepos=xmlRpcUserRepositories.getObservableRepositories();
  BrowsingResults results=repoBrowsing.selectArtifactId("String_Node_Str",observableRepos,groupId,artifactId);
  ArtifactDAO artifactDAO=archivaDAO.getArtifactDAO();
  for (  String version : results.getVersions()) {
    ArchivaArtifact pomArtifact=artifactDAO.getArtifact(groupId,artifactId,version,"String_Node_Str","String_Node_Str");
    Artifact artifact=new Artifact("String_Node_Str",groupId,artifactId,version,pomArtifact.getType(),pomArtifact.getModel().getWhenGathered());
    artifacts.add(artifact);
  }
  return artifacts;
}

Fixed version (ground truth):
public List<Artifact> getArtifactVersions(String groupId,String artifactId) throws Exception {
  List<Artifact> artifacts=new ArrayList<Artifact>();
  List<String> observableRepos=xmlRpcUserRepositories.getObservableRepositories();
  BrowsingResults results=repoBrowsing.selectArtifactId("String_Node_Str",observableRepos,groupId,artifactId);
  ArtifactDAO artifactDAO=archivaDAO.getArtifactDAO();
  for (  String version : results.getVersions()) {
    ArchivaArtifact pomArtifact=artifactDAO.getArtifact(groupId,artifactId,version,"String_Node_Str","String_Node_Str");
    Artifact artifact=new Artifact("String_Node_Str",groupId,artifactId,version,pomArtifact.getType());
    artifacts.add(artifact);
  }
  return artifacts;
}
Program: 20746
Project: 20746
Buggy source:
public List<Artifact> quickSearch(String queryString) throws Exception {
  List<Artifact> artifacts=new ArrayList<Artifact>();
  List<String> observableRepos=xmlRpcUserRepositories.getObservableRepositories();
  SearchResultLimits limits=new SearchResultLimits(SearchResultLimits.ALL_PAGES);
  SearchResults results=null;
  if (SearchUtil.isBytecodeSearch(queryString)) {
    results=crossRepoSearch.searchForBytecode("String_Node_Str",observableRepos,SearchUtil.removeBytecodeKeyword(queryString),limits);
  }
 else {
    results=crossRepoSearch.searchForTerm("String_Node_Str",observableRepos,queryString,limits);
  }
  List<SearchResultHit> hits=results.getHits();
  for (  SearchResultHit hit : hits) {
    ArtifactDAO artifactDAO=archivaDAO.getArtifactDAO();
    ArchivaArtifact pomArtifact=artifactDAO.getArtifact(hit.getGroupId(),hit.getArtifactId(),hit.getVersion(),"String_Node_Str","String_Node_Str");
    if (pomArtifact != null) {
      Artifact artifact=new Artifact(pomArtifact.getModel().getRepositoryId(),pomArtifact.getGroupId(),pomArtifact.getArtifactId(),pomArtifact.getVersion(),pomArtifact.getType(),pomArtifact.getModel().getWhenGathered());
      artifacts.add(artifact);
    }
 else {
      continue;
    }
  }
  return artifacts;
}

Fixed version (ground truth):
public List<Artifact> quickSearch(String queryString) throws Exception {
  List<Artifact> artifacts=new ArrayList<Artifact>();
  List<String> observableRepos=xmlRpcUserRepositories.getObservableRepositories();
  SearchResultLimits limits=new SearchResultLimits(SearchResultLimits.ALL_PAGES);
  SearchResults results=null;
  if (SearchUtil.isBytecodeSearch(queryString)) {
    results=crossRepoSearch.searchForBytecode("String_Node_Str",observableRepos,SearchUtil.removeBytecodeKeyword(queryString),limits);
  }
 else {
    results=crossRepoSearch.searchForTerm("String_Node_Str",observableRepos,queryString,limits);
  }
  List<SearchResultHit> hits=results.getHits();
  for (  SearchResultHit hit : hits) {
    ArtifactDAO artifactDAO=archivaDAO.getArtifactDAO();
    try {
      ArchivaArtifact pomArtifact=artifactDAO.getArtifact(hit.getGroupId(),hit.getArtifactId(),hit.getVersion(),"String_Node_Str","String_Node_Str");
      if (pomArtifact != null) {
        Artifact artifact=new Artifact(pomArtifact.getModel().getRepositoryId(),pomArtifact.getGroupId(),pomArtifact.getArtifactId(),pomArtifact.getVersion(),pomArtifact.getType());
        artifacts.add(artifact);
      }
 else {
        continue;
      }
    }
 catch (    ObjectNotFoundException e) {
      continue;
    }
catch (    ArchivaDatabaseException e) {
      continue;
    }
  }
  return artifacts;
}
Program: 20747
Project: 20747
Buggy source:
public List<Artifact> getArtifactByChecksum(String checksum) throws Exception {
  List<Artifact> results=new ArrayList<Artifact>();
  ArtifactDAO artifactDAO=archivaDAO.getArtifactDAO();
  ArtifactsByChecksumConstraint constraint=new ArtifactsByChecksumConstraint(checksum);
  List<ArchivaArtifact> artifacts=artifactDAO.queryArtifacts(constraint);
  for (  ArchivaArtifact archivaArtifact : artifacts) {
    Artifact artifact=new Artifact(archivaArtifact.getModel().getRepositoryId(),archivaArtifact.getModel().getGroupId(),archivaArtifact.getModel().getArtifactId(),archivaArtifact.getModel().getVersion(),archivaArtifact.getType(),archivaArtifact.getModel().getWhenGathered());
    results.add(artifact);
  }
  return results;
}

Fixed version (ground truth):
public List<Artifact> getArtifactByChecksum(String checksum) throws Exception {
  List<Artifact> results=new ArrayList<Artifact>();
  ArtifactDAO artifactDAO=archivaDAO.getArtifactDAO();
  ArtifactsByChecksumConstraint constraint=new ArtifactsByChecksumConstraint(checksum);
  List<ArchivaArtifact> artifacts=artifactDAO.queryArtifacts(constraint);
  for (  ArchivaArtifact archivaArtifact : artifacts) {
    Artifact artifact=new Artifact(archivaArtifact.getModel().getRepositoryId(),archivaArtifact.getModel().getGroupId(),archivaArtifact.getModel().getArtifactId(),archivaArtifact.getModel().getVersion(),archivaArtifact.getType());
    results.add(artifact);
  }
  return results;
}
Program: 20748
Project: 20748
Buggy source:
public List<Artifact> getDependees(String groupId,String artifactId,String version) throws Exception {
  List<Artifact> artifacts=new ArrayList<Artifact>();
  List<String> observableRepos=xmlRpcUserRepositories.getObservableRepositories();
  List<ArchivaProjectModel> dependees=repoBrowsing.getUsedBy("String_Node_Str",observableRepos,"String_Node_Str","String_Node_Str","String_Node_Str");
  for (  ArchivaProjectModel model : dependees) {
    Artifact artifact=new Artifact("String_Node_Str",model.getGroupId(),model.getArtifactId(),model.getVersion(),"String_Node_Str",model.getWhenIndexed());
    artifacts.add(artifact);
  }
  return artifacts;
}

Fixed version (ground truth):
public List<Artifact> getDependees(String groupId,String artifactId,String version) throws Exception {
  List<Artifact> artifacts=new ArrayList<Artifact>();
  List<String> observableRepos=xmlRpcUserRepositories.getObservableRepositories();
  List<ArchivaProjectModel> dependees=repoBrowsing.getUsedBy("String_Node_Str",observableRepos,"String_Node_Str","String_Node_Str","String_Node_Str");
  for (  ArchivaProjectModel model : dependees) {
    Artifact artifact=new Artifact("String_Node_Str",model.getGroupId(),model.getArtifactId(),model.getVersion(),"String_Node_Str");
    artifacts.add(artifact);
  }
  return artifacts;
}
Program: 20749
Project: 20749
Buggy source:
private SecuritySession getSecuritySession(){
  return (SecuritySession)getContextSession().get(SecuritySession.ROLE);
}

Fixed version (ground truth):
private SecuritySession getSecuritySession(){
  return (SecuritySession)getContextSession().get(SecuritySystemConstants.SECURITY_SESSION_KEY);
}
Program: 20750
Project: 20750
Buggy source:
private void appendLink(StringBuffer sb,String prefix,BidirectionalRepositoryLayout layout,ArchivaArtifact artifact){
  String type=artifact.getType();
  String linkText=StringUtils.capitalize(type);
  appendLink(sb,prefix,layout,artifact,linkText);
}

Fixed version (ground truth):
private void appendLink(StringBuffer sb,String prefix,ManagedRepositoryContent repo,ArchivaArtifact artifact){
  String type=artifact.getType();
  String linkText=StringUtils.capitalize(type);
  appendLink(sb,prefix,repo,artifact,linkText);
}
Program: 20751
Project: 20751
Buggy source:
private void appendMini(StringBuffer sb,String prefix,ManagedRepositoryConfiguration repo,BidirectionalRepositoryLayout layout,List relatedArtifacts){
}

Fixed version (ground truth):
private void appendMini(StringBuffer sb,String prefix,ManagedRepositoryContent repo,List<ArchivaArtifact> relatedArtifacts){
}
Program: 20752
Project: 20752
Buggy source:
public DownloadArtifact(OgnlValueStack stack,PageContext pageContext){
  super(stack);
  decimalFormat=new DecimalFormat("String_Node_Str");
  this.req=(HttpServletRequest)pageContext.getRequest();
  this.res=(HttpServletResponse)pageContext.getResponse();
  try {
    dao=(ArchivaDAO)PlexusTagUtil.lookup(pageContext,ArchivaDAO.ROLE,"String_Node_Str");
    layoutFactory=(BidirectionalRepositoryLayoutFactory)PlexusTagUtil.lookup(pageContext,BidirectionalRepositoryLayoutFactory.class);
  }
 catch (  ComponentLookupException e) {
    throw new RuntimeException(e.getMessage(),e);
  }
}

Fixed version (ground truth):
public DownloadArtifact(OgnlValueStack stack,PageContext pageContext){
  super(stack);
  decimalFormat=new DecimalFormat("String_Node_Str");
  this.req=(HttpServletRequest)pageContext.getRequest();
  this.res=(HttpServletResponse)pageContext.getResponse();
  try {
    dao=(ArchivaDAO)PlexusTagUtil.lookup(pageContext,ArchivaDAO.ROLE,"String_Node_Str");
    repositoryFactory=(RepositoryContentFactory)PlexusTagUtil.lookup(pageContext,RepositoryContentFactory.class);
  }
 catch (  ComponentLookupException e) {
    throw new RuntimeException(e.getMessage(),e);
  }
}
Program: 20753
Project: 20753
Buggy source:
public boolean end(Writer writer,String body){
  StringBuffer sb=new StringBuffer();
  try {
    Constraint constraint=new ArtifactsRelatedConstraint(groupId,artifactId,version);
    List relatedArtifacts=dao.getArtifactDAO().queryArtifacts(constraint);
    if (relatedArtifacts != null) {
      String repoId=((ArchivaArtifact)relatedArtifacts.get(0)).getModel().getRepositoryId();
      ManagedRepositoryConfiguration repo=findRepository(repoId);
      BidirectionalRepositoryLayout layout=layoutFactory.getLayout(repo.getLayout());
      String prefix=req.getContextPath() + "String_Node_Str" + repoId;
      if (mini) {
        appendMini(sb,prefix,repo,layout,relatedArtifacts);
      }
 else {
        appendNormal(sb,prefix,repo,layout,relatedArtifacts);
      }
    }
  }
 catch (  ObjectNotFoundException e) {
    appendError(sb,e);
  }
catch (  ArchivaDatabaseException e) {
    appendError(sb,e);
  }
catch (  LayoutException e) {
    appendError(sb,e);
  }
  try {
    writer.write(sb.toString());
  }
 catch (  IOException e) {
    throw new WebWorkException("String_Node_Str" + e.getMessage(),e);
  }
  return super.end(writer,body);
}

Fixed version (ground truth):
public boolean end(Writer writer,String body){
  StringBuffer sb=new StringBuffer();
  try {
    Constraint constraint=new ArtifactsRelatedConstraint(groupId,artifactId,version);
    List<ArchivaArtifact> relatedArtifacts=dao.getArtifactDAO().queryArtifacts(constraint);
    if (relatedArtifacts != null) {
      String repoId=((ArchivaArtifact)relatedArtifacts.get(0)).getModel().getRepositoryId();
      ManagedRepositoryContent repo=repositoryFactory.getManagedRepositoryContent(repoId);
      String prefix=req.getContextPath() + "String_Node_Str" + repoId;
      if (mini) {
        appendMini(sb,prefix,repo,relatedArtifacts);
      }
 else {
        appendNormal(sb,prefix,repo,relatedArtifacts);
      }
    }
  }
 catch (  ObjectNotFoundException e) {
    appendError(sb,e);
  }
catch (  ArchivaDatabaseException e) {
    appendError(sb,e);
  }
catch (  RepositoryNotFoundException e) {
    e.printStackTrace();
  }
catch (  RepositoryException e) {
    e.printStackTrace();
  }
  try {
    writer.write(sb.toString());
  }
 catch (  IOException e) {
    throw new WebWorkException("String_Node_Str" + e.getMessage(),e);
  }
  return super.end(writer,body);
}
Program: 20754
Project: 20754
Buggy source:
private void appendNormal(StringBuffer sb,String prefix,ManagedRepositoryConfiguration repo,BidirectionalRepositoryLayout layout,List relatedArtifacts){
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  if (relatedArtifacts.size() > 1) {
    sb.append("String_Node_Str");
  }
 else {
    sb.append("String_Node_Str");
  }
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  Iterator it=relatedArtifacts.iterator();
  while (it.hasNext()) {
    ArchivaArtifact artifact=(ArchivaArtifact)it.next();
    sb.append("String_Node_Str");
    sb.append("String_Node_Str");
    appendImageLink(sb,prefix,layout,artifact);
    sb.append("String_Node_Str");
    sb.append("String_Node_Str");
    appendLink(sb,prefix,layout,artifact);
    sb.append("String_Node_Str");
    sb.append("String_Node_Str");
    appendFilesize(sb,artifact);
    sb.append("String_Node_Str");
    sb.append("String_Node_Str");
  }
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
}

Fixed version (ground truth):
private void appendNormal(StringBuffer sb,String prefix,ManagedRepositoryContent repo,List<ArchivaArtifact> relatedArtifacts){
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  if (relatedArtifacts.size() > 1) {
    sb.append("String_Node_Str");
  }
 else {
    sb.append("String_Node_Str");
  }
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  Iterator it=relatedArtifacts.iterator();
  while (it.hasNext()) {
    ArchivaArtifact artifact=(ArchivaArtifact)it.next();
    sb.append("String_Node_Str");
    sb.append("String_Node_Str");
    appendImageLink(sb,prefix,repo,artifact);
    sb.append("String_Node_Str");
    sb.append("String_Node_Str");
    appendLink(sb,prefix,repo,artifact);
    sb.append("String_Node_Str");
    sb.append("String_Node_Str");
    appendFilesize(sb,artifact);
    sb.append("String_Node_Str");
    sb.append("String_Node_Str");
  }
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
}
Program: 20755
Project: 20755
Buggy source:
private void appendImageLink(StringBuffer sb,String prefix,BidirectionalRepositoryLayout layout,ArchivaArtifact artifact){
  String type=artifact.getType();
  String linkText="String_Node_Str" + req.getContextPath() + "String_Node_Str"+ type+ "String_Node_Str";
  appendLink(sb,prefix,layout,artifact,linkText);
}

Fixed version (ground truth):
private void appendImageLink(StringBuffer sb,String prefix,ManagedRepositoryContent repo,ArchivaArtifact artifact){
  String type=artifact.getType();
  String linkText="String_Node_Str" + req.getContextPath() + "String_Node_Str"+ type+ "String_Node_Str";
  appendLink(sb,prefix,repo,artifact,linkText);
}
Program: 20756
Project: 20756
Buggy source:
private String saveConfiguration(){
  try {
    archivaConfiguration.save(archivaConfiguration.getConfiguration());
    addActionMessage("String_Node_Str");
  }
 catch (  RegistryException e) {
    addActionError("String_Node_Str" + e.getMessage());
  }
catch (  IndeterminateConfigurationException e) {
    addActionError(e.getMessage());
  }
  return SUCCESS;
}

Fixed version (ground truth):
private String saveConfiguration(){
  try {
    archivaConfiguration.save(archivaConfiguration.getConfiguration());
    addActionMessage("String_Node_Str");
  }
 catch (  RegistryException e) {
    addActionError("String_Node_Str" + e.getMessage());
    return INPUT;
  }
catch (  IndeterminateConfigurationException e) {
    addActionError(e.getMessage());
    return INPUT;
  }
  return SUCCESS;
}
Program: 20757
Project: 20757
Buggy source:
private String saveConfiguration(){
  try {
    archivaConfiguration.save(archivaConfiguration.getConfiguration());
    addActionMessage("String_Node_Str");
  }
 catch (  RegistryException e) {
    addActionError("String_Node_Str" + e.getMessage());
  }
catch (  IndeterminateConfigurationException e) {
    addActionError(e.getMessage());
  }
  return SUCCESS;
}

Fixed version (ground truth):
private String saveConfiguration(){
  try {
    archivaConfiguration.save(archivaConfiguration.getConfiguration());
    addActionMessage("String_Node_Str");
  }
 catch (  RegistryException e) {
    addActionError("String_Node_Str" + e.getMessage());
    return INPUT;
  }
catch (  IndeterminateConfigurationException e) {
    addActionError(e.getMessage());
    return INPUT;
  }
  return SUCCESS;
}
Program: 20758
Project: 20758
Buggy source:
public String save(){
  String mode=getMode();
  String repoId=getRepository().getId();
  boolean containsError=false;
  getLogger().info("String_Node_Str" + mode + "String_Node_Str"+ repoId+ "String_Node_Str");
  containsError=validateFields(mode);
  if (containsError && StringUtils.equalsIgnoreCase("String_Node_Str",mode)) {
    return INPUT;
  }
 else   if (containsError && StringUtils.equalsIgnoreCase("String_Node_Str",mode)) {
    return ERROR;
  }
  if (StringUtils.equalsIgnoreCase("String_Node_Str",mode)) {
    removeRepository(repoId);
  }
  try {
    addRepository(getRepository());
    saveConfiguration();
  }
 catch (  IOException e) {
    addActionError("String_Node_Str" + e.getMessage());
  }
catch (  RoleManagerException e) {
    addActionError("String_Node_Str" + e.getMessage());
  }
catch (  InvalidConfigurationException e) {
    addActionError("String_Node_Str" + e.getMessage());
  }
catch (  RegistryException e) {
    addActionError("String_Node_Str" + e.getMessage());
  }
  return SUCCESS;
}

Fixed version (ground truth):
public String save(){
  String mode=getMode();
  String repoId=getRepository().getId();
  boolean containsError=false;
  getLogger().info("String_Node_Str" + mode + "String_Node_Str"+ repoId+ "String_Node_Str");
  containsError=validateFields(mode);
  if (containsError && StringUtils.equalsIgnoreCase("String_Node_Str",mode)) {
    return INPUT;
  }
 else   if (containsError && StringUtils.equalsIgnoreCase("String_Node_Str",mode)) {
    return ERROR;
  }
  if (StringUtils.equalsIgnoreCase("String_Node_Str",mode)) {
    removeRepository(repoId);
  }
  String result;
  try {
    addRepository(getRepository());
    result=saveConfiguration();
  }
 catch (  IOException e) {
    addActionError("String_Node_Str" + e.getMessage());
    result=INPUT;
  }
catch (  RoleManagerException e) {
    addActionError("String_Node_Str" + e.getMessage());
    result=INPUT;
  }
catch (  InvalidConfigurationException e) {
    addActionError("String_Node_Str" + e.getMessage());
    result=INPUT;
  }
catch (  RegistryException e) {
    addActionError("String_Node_Str" + e.getMessage());
    result=INPUT;
  }
  return result;
}
Program: 20759
Project: 20759
Buggy source:
public String delete(){
  getLogger().info("String_Node_Str");
  if (operationAllowed(ArchivaRoleConstants.OPERATION_DELETE_REPOSITORY,getRepoid())) {
    addActionError("String_Node_Str" + getRepoid() + "String_Node_Str");
    return ERROR;
  }
  if (StringUtils.equals(mode,"String_Node_Str") || StringUtils.equals(mode,"String_Node_Str")) {
    AdminRepositoryConfiguration existingRepository=getRepository();
    if (existingRepository == null) {
      addActionError("String_Node_Str");
      return ERROR;
    }
    try {
      removeRepository(getRepoid());
      removeRepositoryRoles(existingRepository);
      saveConfiguration();
      if (StringUtils.equals(mode,"String_Node_Str")) {
        removeContents(existingRepository);
      }
    }
 catch (    IOException e) {
      addActionError("String_Node_Str" + e.getMessage());
    }
catch (    RoleManagerException e) {
      addActionError("String_Node_Str" + e.getMessage());
    }
catch (    InvalidConfigurationException e) {
      addActionError("String_Node_Str" + e.getMessage());
    }
catch (    RegistryException e) {
      addActionError("String_Node_Str" + e.getMessage());
    }
  }
  return SUCCESS;
}

Fixed version (ground truth):
public String delete(){
  getLogger().info("String_Node_Str");
  if (operationAllowed(ArchivaRoleConstants.OPERATION_DELETE_REPOSITORY,getRepoid())) {
    addActionError("String_Node_Str" + getRepoid() + "String_Node_Str");
    return ERROR;
  }
  String result=SUCCESS;
  if (StringUtils.equals(mode,"String_Node_Str") || StringUtils.equals(mode,"String_Node_Str")) {
    AdminRepositoryConfiguration existingRepository=getRepository();
    if (existingRepository == null) {
      addActionError("String_Node_Str");
      return ERROR;
    }
    try {
      removeRepository(getRepoid());
      result=saveConfiguration();
      if (result.equals(SUCCESS)) {
        removeRepositoryRoles(existingRepository);
        if (StringUtils.equals(mode,"String_Node_Str")) {
          removeContents(existingRepository);
        }
      }
    }
 catch (    IOException e) {
      addActionError("String_Node_Str" + e.getMessage());
      result=INPUT;
    }
catch (    RoleManagerException e) {
      addActionError("String_Node_Str" + e.getMessage());
      result=INPUT;
    }
catch (    InvalidConfigurationException e) {
      addActionError("String_Node_Str" + e.getMessage());
      result=INPUT;
    }
catch (    RegistryException e) {
      addActionError("String_Node_Str" + e.getMessage());
      result=INPUT;
    }
  }
  return result;
}
Program: 20760
Project: 20760
Buggy source:
private String saveConfiguration() throws IOException, InvalidConfigurationException, RegistryException {
  getLogger().info("String_Node_Str");
  try {
    archivaConfiguration.save(archivaConfiguration.getConfiguration());
    addActionMessage("String_Node_Str");
  }
 catch (  IndeterminateConfigurationException e) {
    addActionError(e.getMessage());
  }
  return SUCCESS;
}

Fixed version (ground truth):
private String saveConfiguration() throws IOException, InvalidConfigurationException, RegistryException {
  getLogger().info("String_Node_Str");
  try {
    archivaConfiguration.save(archivaConfiguration.getConfiguration());
    addActionMessage("String_Node_Str");
  }
 catch (  IndeterminateConfigurationException e) {
    addActionError(e.getMessage());
    return INPUT;
  }
  return SUCCESS;
}
Program: 20762
Project: 20762
Buggy source:
public boolean end(Writer writer,String body){
  StringBuffer sb=new StringBuffer();
  try {
    ManagedArtifact managedArtifact=managedRepositories.findArtifact(groupId,artifactId,version);
    RepositoryConfiguration repoConfig=managedRepositories.getRepositoryConfiguration(managedArtifact.getRepositoryId());
    String prefix=req.getContextPath() + "String_Node_Str" + repoConfig.getUrlName();
    if (mini) {
      appendMini(sb,prefix,managedArtifact);
    }
 else {
      appendNormal(sb,prefix,managedArtifact);
    }
  }
 catch (  ProjectBuildingException e) {
    appendError(sb,e);
  }
  try {
    writer.write(sb.toString());
  }
 catch (  IOException e) {
    throw new WebWorkException("String_Node_Str" + e.getMessage(),e);
  }
  return super.end(writer,body);
}

Fixed version (ground truth):
public boolean end(Writer writer,String body){
  StringBuffer sb=new StringBuffer();
  try {
    ManagedArtifact managedArtifact=managedRepositories.findArtifact(groupId,artifactId,version);
    if (managedArtifact != null) {
      RepositoryConfiguration repoConfig=managedRepositories.getRepositoryConfiguration(managedArtifact.getRepositoryId());
      String prefix=req.getContextPath() + "String_Node_Str" + repoConfig.getUrlName();
      if (mini) {
        appendMini(sb,prefix,managedArtifact);
      }
 else {
        appendNormal(sb,prefix,managedArtifact);
      }
    }
  }
 catch (  ProjectBuildingException e) {
    appendError(sb,e);
  }
  try {
    writer.write(sb.toString());
  }
 catch (  IOException e) {
    throw new WebWorkException("String_Node_Str" + e.getMessage(),e);
  }
  return super.end(writer,body);
}
Program: 20763
Project: 20763
Buggy source:
public void addUser(String principal) throws RbacStoreException {
  try {
    Resource usernameResource=manager.createResource(principal);
    manager.saveResource(usernameResource);
    Permission editUser=manager.createPermission("String_Node_Str");
    editUser.setOperation(manager.getOperation("String_Node_Str"));
    editUser.setResource(manager.getResource(principal));
    editUser=manager.savePermission(editUser);
    Role userRole=manager.createRole("String_Node_Str" + principal);
    userRole.addPermission(editUser);
    userRole=manager.saveRole(userRole);
    UserAssignment assignment=manager.createUserAssignment(principal);
    assignment.addRole(userRole);
    manager.saveUserAssignment(assignment);
  }
 catch (  RbacObjectNotFoundException ne) {
    throw new RbacStoreException("String_Node_Str",ne);
  }
}

Fixed version (ground truth):
public void addUser(String principal) throws RbacStoreException {
  Resource usernameResource=manager.createResource(principal);
  manager.saveResource(usernameResource);
  Permission editUser=manager.createPermission("String_Node_Str" + principal,"String_Node_Str",principal);
  editUser=manager.savePermission(editUser);
  Role userRole=manager.createRole("String_Node_Str" + principal);
  userRole.addPermission(editUser);
  userRole=manager.saveRole(userRole);
  UserAssignment assignment=manager.createUserAssignment(principal);
  assignment.addRole(userRole);
  manager.saveUserAssignment(assignment);
}
Program: 20764
Project: 20764
Buggy source:
/** 
 * Queries the configuration on how to handle a repository download failure
 * @param repository the repository object where the failure occurred
 * @param message    the message/reason for the failure
 * @param t          the cause for the exception
 * @throws ProxyException if hard failure is enabled on the repository causing the failure
 */
private void processRepositoryFailure(ProxiedArtifactRepository repository,String message,Throwable t) throws ProxyException {
  if (repository.isHardFail()) {
    throw new ProxyException("String_Node_Str" + repository.getName() + "String_Node_Str"+ message,t);
  }
 else {
    getLogger().warn(message);
    getLogger().debug(message,t);
  }
}

Fixed version (ground truth):
private void processRepositoryFailure(ProxiedArtifactRepository repository,String message) throws ProxyException {
  if (repository.isHardFail()) {
    throw new ProxyException("String_Node_Str" + repository.getName() + "String_Node_Str"+ message);
  }
 else {
    getLogger().warn("String_Node_Str" + repository.getName() + "String_Node_Str"+ message);
  }
}
Program: 20765
Project: 20765
Buggy source:
public File getAlways(String path,List proxiedRepositories,ArtifactRepository managedRepository,ProxyInfo wagonProxy) throws ResourceDoesNotExistException, ProxyException {
  File target=new File(managedRepository.getBasedir(),path);
  for (Iterator i=proxiedRepositories.iterator(); i.hasNext(); ) {
    ProxiedArtifactRepository repository=(ProxiedArtifactRepository)i.next();
    if (repository.isCachedFailure(path)) {
      getLogger().debug("String_Node_Str" + repository.getName() + "String_Node_Str");
    }
 else {
      try {
        get(path,target,repository,managedRepository,wagonProxy);
        if (!target.exists()) {
          repository.addFailure(path);
        }
 else {
          repository.clearFailure(path);
        }
      }
 catch (      ProxyException e) {
        repository.addFailure(path);
        throw e;
      }
    }
  }
  if (!target.exists()) {
    throw new ResourceDoesNotExistException("String_Node_Str" + path + "String_Node_Str");
  }
  return target;
}

Fixed version (ground truth):
public File getAlways(String path,List proxiedRepositories,ArtifactRepository managedRepository,ProxyInfo wagonProxy) throws ResourceDoesNotExistException, ProxyException {
  File target=new File(managedRepository.getBasedir(),path);
  for (Iterator i=proxiedRepositories.iterator(); i.hasNext(); ) {
    ProxiedArtifactRepository repository=(ProxiedArtifactRepository)i.next();
    if (repository.isCachedFailure(path)) {
      processRepositoryFailure(repository,"String_Node_Str");
    }
 else {
      try {
        get(path,target,repository,managedRepository,wagonProxy);
        if (!target.exists()) {
          repository.addFailure(path);
        }
 else {
          repository.clearFailure(path);
        }
      }
 catch (      ProxyException e) {
        repository.addFailure(path);
        throw e;
      }
    }
  }
  if (!target.exists()) {
    throw new ResourceDoesNotExistException("String_Node_Str" + path + "String_Node_Str");
  }
  return target;
}
Program: 20767
Project: 20767
Buggy source:
public File getAlways(String path,List proxiedRepositories,ArtifactRepository managedRepository,ProxyInfo wagonProxy) throws ResourceDoesNotExistException, ProxyException {
  File target=new File(managedRepository.getBasedir(),path);
  for (Iterator i=proxiedRepositories.iterator(); i.hasNext(); ) {
    ProxiedArtifactRepository repository=(ProxiedArtifactRepository)i.next();
    if (repository.isCachedFailure(path)) {
      processCachedRepositoryFailure(repository,"String_Node_Str" + path);
    }
 else {
      get(path,target,repository,managedRepository,wagonProxy);
    }
  }
  if (!target.exists()) {
    throw new ResourceDoesNotExistException("String_Node_Str" + path + "String_Node_Str");
  }
  return target;
}

Fixed version (ground truth):
public File getAlways(String path,List proxiedRepositories,ArtifactRepository managedRepository,ProxyInfo wagonProxy) throws ResourceDoesNotExistException, ProxyException {
  return get(managedRepository,path,proxiedRepositories,wagonProxy,true);
}
Program: 20771
Project: 20771
Buggy source:
/** 
 * Method called by lucence during indexing operations
 * @param fieldName the field name that the lucene object is currently processing
 * @param reader    a Reader object to the index stream
 * @return an analyzer to specific to the field name or the default analyzer if none is present
 */
public TokenStream tokenStream(String fieldName,Reader reader){
  TokenStream tokenStream;
  if ("String_Node_Str".equals(fieldName)) {
    tokenStream=new EclipseIndexTokenizer(reader);
  }
 else {
    tokenStream=defaultAnalyzer.tokenStream(fieldName,reader);
  }
  return tokenStream;
}

Fixed version (ground truth):
/** 
 * Method called by lucence during indexing operations
 * @param fieldName the field name that the lucene object is currently processing
 * @param reader    a Reader object to the index stream
 * @return an analyzer to specific to the field name or the default analyzer if none is present
 */
public TokenStream tokenStream(String fieldName,Reader reader){
  TokenStream tokenStream;
  if (JAR_SIZE.equals(fieldName)) {
    tokenStream=new EclipseIndexTokenizer(reader);
  }
 else   if (JAR_DATE.equals(fieldName)) {
    tokenStream=new EclipseIndexTokenizer(reader);
  }
 else   if (MD5.equals(fieldName)) {
    tokenStream=new EclipseIndexTokenizer(reader);
  }
 else {
    tokenStream=defaultAnalyzer.tokenStream(fieldName,reader);
  }
  return tokenStream;
}
Program: 20773
Project: 20773
Buggy source:
/** 
 * Method for testing the exceptions thrown by ArtifactRepositoryIndex
 * @throws Exception
 */
public void testIndexerExceptions() throws Exception {
  RepositoryIndexingFactory factory=(RepositoryIndexingFactory)lookup(RepositoryIndexingFactory.ROLE);
  Artifact artifact=createArtifact("String_Node_Str","String_Node_Str","String_Node_Str");
  try {
    File notIndexDir=new File("String_Node_Str");
    ArtifactRepositoryIndex indexer=factory.createArtifactRepositoryIndex(notIndexDir,repository);
    indexer.indexArtifact(artifact);
    fail("String_Node_Str");
  }
 catch (  RepositoryIndexException e) {
    assertTrue(true);
  }
  try {
    File notIndexDir=new File("String_Node_Str");
    ArtifactRepositoryIndex indexer=factory.createArtifactRepositoryIndex(notIndexDir,repository);
    indexer.indexArtifact(artifact);
    fail("String_Node_Str");
  }
 catch (  RepositoryIndexException e) {
    assertTrue(true);
  }
  artifact=createArtifact("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  try {
    File notIndexDir=new File("String_Node_Str");
    ArtifactRepositoryIndex indexer=factory.createArtifactRepositoryIndex(notIndexDir,repository);
    indexer.indexArtifact(artifact);
    fail("String_Node_Str");
  }
 catch (  RepositoryIndexException e) {
    assertTrue(true);
  }
  try {
    File notIndexDir=new File("String_Node_Str");
    ArtifactRepositoryIndex indexer=factory.createArtifactRepositoryIndex(notIndexDir,repository);
    indexer.indexArtifact(artifact);
    fail("String_Node_Str");
  }
 catch (  RepositoryIndexException e) {
    assertTrue(true);
  }
}

Fixed version (ground truth):
/** 
 * Method for testing the exceptions thrown by ArtifactRepositoryIndex
 * @throws Exception
 */
public void testIndexerExceptions() throws Exception {
  RepositoryIndexingFactory factory=(RepositoryIndexingFactory)lookup(RepositoryIndexingFactory.ROLE);
  try {
    File notIndexDir=new File("String_Node_Str");
    factory.createArtifactRepositoryIndex(notIndexDir,repository);
    fail("String_Node_Str");
  }
 catch (  RepositoryIndexException e) {
    assertTrue(true);
  }
  try {
    File notIndexDir=new File("String_Node_Str");
    factory.createArtifactRepositoryIndex(notIndexDir,repository);
    fail("String_Node_Str");
  }
 catch (  RepositoryIndexException e) {
    assertTrue(true);
  }
}
Program: 20775
Project: 20775
Buggy source:
private void scheduleJobs(Configuration configuration) throws ParseException, SchedulerException {
  JobDetail jobDetail=new JobDetail(INDEXER_JOB,DISCOVERER_GROUP,RepositoryTaskJob.class);
  JobDataMap dataMap=new JobDataMap();
  dataMap.put(AbstractJob.LOGGER,getLogger());
  dataMap.put(RepositoryTaskJob.TASK_KEY,indexerTask);
  jobDetail.setJobDataMap(dataMap);
  getLogger().info("String_Node_Str" + configuration.getIndexerCronExpression());
  CronTrigger trigger=new CronTrigger(INDEXER_JOB + "String_Node_Str",DISCOVERER_GROUP,configuration.getIndexerCronExpression());
  scheduler.scheduleJob(jobDetail,trigger);
  try {
    indexerTask.executeNowIfNeeded();
  }
 catch (  TaskExecutionException e) {
    getLogger().error("String_Node_Str" + e.getMessage(),e);
  }
}

Fixed version (ground truth):
private void scheduleJobs(Configuration configuration) throws ParseException, SchedulerException {
  if (configuration.getIndexPath() != null) {
    JobDetail jobDetail=new JobDetail(INDEXER_JOB,DISCOVERER_GROUP,RepositoryTaskJob.class);
    JobDataMap dataMap=new JobDataMap();
    dataMap.put(AbstractJob.LOGGER,getLogger());
    dataMap.put(RepositoryTaskJob.TASK_KEY,indexerTask);
    jobDetail.setJobDataMap(dataMap);
    getLogger().info("String_Node_Str" + configuration.getIndexerCronExpression());
    CronTrigger trigger=new CronTrigger(INDEXER_JOB + "String_Node_Str",DISCOVERER_GROUP,configuration.getIndexerCronExpression());
    scheduler.scheduleJob(jobDetail,trigger);
    try {
      indexerTask.executeNowIfNeeded();
    }
 catch (    TaskExecutionException e) {
      getLogger().error("String_Node_Str" + e.getMessage(),e);
    }
  }
 else {
    getLogger().info("String_Node_Str");
  }
}
Program: 20777
Project: 20777
Buggy source:
public void setLayout(String layout){
  if ("String_Node_Str".equalsIgnoreCase(layout)) {
    this.layout=new LegacyRepositoryLayout();
  }
 else {
    this.layout=new DefaultRepositoryLayout();
  }
}

Fixed version (ground truth):
public void setLayout(String layout){
  if ("String_Node_Str".equalsIgnoreCase(layout)) {
    this.layout=new LegacyRepositoryLayout();
  }
 else {
    this.layout=new DefaultRepositoryLayout();
  }
  if (repoCache != null) {
    setRepositoryCachePath(repoCache.getBasedir());
  }
}
Program: 20778
Project: 20778
Buggy source:
private ProxyConfiguration getTestConfiguration() throws ComponentLookupException {
  ProxyConfiguration config=(ProxyConfiguration)container.lookup(ProxyConfiguration.ROLE);
  config.setRepositoryCachePath("String_Node_Str");
  ArtifactRepositoryLayout layout=new LegacyRepositoryLayout();
  File repo1File=getTestFile("String_Node_Str");
  ProxyRepository repo1=new ProxyRepository("String_Node_Str","String_Node_Str" + repo1File.getAbsolutePath(),layout);
  config.addRepository(repo1);
  return config;
}

Fixed version (ground truth):
private ProxyConfiguration getTestConfiguration() throws ComponentLookupException {
  ProxyConfiguration config=(ProxyConfiguration)container.lookup(ProxyConfiguration.ROLE);
  config.setRepositoryCachePath(getTestFile("String_Node_Str").getAbsolutePath());
  ArtifactRepositoryLayout layout=new LegacyRepositoryLayout();
  File repo1File=getTestFile("String_Node_Str");
  ProxyRepository repo1=new ProxyRepository("String_Node_Str","String_Node_Str" + repo1File.getAbsolutePath(),layout);
  config.addRepository(repo1);
  return config;
}