nus-yam/ex-repair huggingface dataset:
Program: 82667
Project: 82667
Buggy source:
public void originalToCachedModuleDescriptor(DependencyResolver resolver,ResolvedResource orginalMetadataRef,Artifact requestedMetadataArtifact,ResolvedModuleRevision rmr,ModuleDescriptorWriter writer){
  ModuleDescriptor md=rmr.getDescriptor();
  Artifact originalMetadataArtifact=getOriginalMetadataArtifact(requestedMetadataArtifact);
  File mdFileInCache=getIvyFileInCache(md.getResolvedModuleRevisionId());
  ModuleRevisionId mrid=requestedMetadataArtifact.getModuleRevisionId();
  if (!lockMetadataArtifact(mrid)) {
    Message.warn("String_Node_Str" + mrid);
    return;
  }
  try {
    File originalFileInCache=getArchiveFileInCache(originalMetadataArtifact);
    writer.write(orginalMetadataRef,md,originalFileInCache,mdFileInCache);
    saveResolvers(md,resolver.getName(),resolver.getName());
    if (!md.isDefault()) {
      rmr.getReport().setOriginalLocalFile(originalFileInCache);
    }
    rmr.getReport().setLocalFile(mdFileInCache);
  }
 catch (  RuntimeException e) {
    throw e;
  }
catch (  Exception e) {
    Message.warn("String_Node_Str" + (orginalMetadataRef == null ? String.valueOf(md.getResolvedModuleRevisionId()) : String.valueOf(orginalMetadataRef)) + "String_Node_Str"+ e.getClass().getName()+ "String_Node_Str"+ e.getMessage());
  }
 finally {
    unlockMetadataArtifact(mrid);
  }
}

Fixed version (ground truth):
public void originalToCachedModuleDescriptor(DependencyResolver resolver,ResolvedResource orginalMetadataRef,Artifact requestedMetadataArtifact,ResolvedModuleRevision rmr,ModuleDescriptorWriter writer){
  ModuleDescriptor md=rmr.getDescriptor();
  Artifact originalMetadataArtifact=getOriginalMetadataArtifact(requestedMetadataArtifact);
  File mdFileInCache=getIvyFileInCache(md.getResolvedModuleRevisionId());
  ModuleRevisionId mrid=requestedMetadataArtifact.getModuleRevisionId();
  if (!lockMetadataArtifact(mrid)) {
    Message.warn("String_Node_Str" + mrid);
    return;
  }
  try {
    File originalFileInCache=getArchiveFileInCache(originalMetadataArtifact);
    writer.write(orginalMetadataRef,md,originalFileInCache,mdFileInCache);
    getMemoryCache().putInCache(mdFileInCache,new ParserSettingsMonitor(settings),true,md);
    saveResolvers(md,resolver.getName(),resolver.getName());
    if (!md.isDefault()) {
      rmr.getReport().setOriginalLocalFile(originalFileInCache);
    }
    rmr.getReport().setLocalFile(mdFileInCache);
  }
 catch (  RuntimeException e) {
    throw e;
  }
catch (  Exception e) {
    Message.warn("String_Node_Str" + (orginalMetadataRef == null ? String.valueOf(md.getResolvedModuleRevisionId()) : String.valueOf(orginalMetadataRef)) + "String_Node_Str"+ e.getClass().getName()+ "String_Node_Str"+ e.getMessage());
  }
 finally {
    unlockMetadataArtifact(mrid);
  }
}
Program: 82668
Project: 82668
Buggy source:
private static void saxBundleInfo(BundleInfo bundleInfo,ContentHandler handler) throws SAXException {
  AttributesImpl atts=new AttributesImpl();
  addAttr(atts,OBRXMLParser.RESOURCE_SYMBOLIC_NAME,bundleInfo.getSymbolicName());
  addAttr(atts,OBRXMLParser.RESOURCE_VERSION,bundleInfo.getRawVersion());
  if (bundleInfo.getUri() != null) {
    addAttr(atts,OBRXMLParser.RESOURCE_URI,bundleInfo.getUri());
  }
  handler.startElement("String_Node_Str",OBRXMLParser.RESOURCE,OBRXMLParser.RESOURCE,atts);
  Iterator itCapabilities=bundleInfo.getCapabilities().iterator();
  while (itCapabilities.hasNext()) {
    BundleCapability capability=(BundleCapability)itCapabilities.next();
    saxCapability(capability,handler);
  }
  Iterator itRequirement=bundleInfo.getCapabilities().iterator();
  while (itRequirement.hasNext()) {
    BundleRequirement requirement=(BundleRequirement)itRequirement.next();
    saxRequirement(requirement,handler);
  }
  handler.endElement("String_Node_Str",OBRXMLParser.RESOURCE,OBRXMLParser.RESOURCE);
  handler.characters("String_Node_Str".toCharArray(),0,1);
}

Fixed version (ground truth):
private static void saxBundleInfo(BundleInfo bundleInfo,ContentHandler handler) throws SAXException {
  AttributesImpl atts=new AttributesImpl();
  addAttr(atts,OBRXMLParser.RESOURCE_SYMBOLIC_NAME,bundleInfo.getSymbolicName());
  addAttr(atts,OBRXMLParser.RESOURCE_VERSION,bundleInfo.getRawVersion());
  if (bundleInfo.getUri() != null) {
    addAttr(atts,OBRXMLParser.RESOURCE_URI,bundleInfo.getUri());
  }
  handler.startElement("String_Node_Str",OBRXMLParser.RESOURCE,OBRXMLParser.RESOURCE,atts);
  Iterator itCapabilities=bundleInfo.getCapabilities().iterator();
  while (itCapabilities.hasNext()) {
    BundleCapability capability=(BundleCapability)itCapabilities.next();
    saxCapability(capability,handler);
  }
  Iterator itRequirement=bundleInfo.getRequirements().iterator();
  while (itRequirement.hasNext()) {
    BundleRequirement requirement=(BundleRequirement)itRequirement.next();
    saxRequirement(requirement,handler);
  }
  handler.endElement("String_Node_Str",OBRXMLParser.RESOURCE,OBRXMLParser.RESOURCE);
  handler.characters("String_Node_Str".toCharArray(),0,1);
}
Program: 82669
Project: 82669
Buggy source:
public void testFileRepo() throws Exception {
  RepositoryManifestIterable it=new RepositoryManifestIterable(new FileRepository(new File("String_Node_Str")));
  BundleRepo repo=new BundleRepo();
  repo.populate(it);
  BundleRepo repo2=OBRXMLParser.parse(new FileInputStream("String_Node_Str"));
  assertEquals(repo,repo2);
}

Fixed version (ground truth):
public void testFileRepo() throws Exception {
  RepositoryManifestIterable it=new RepositoryManifestIterable(new FileRepository(new File("String_Node_Str").getAbsoluteFile()));
  BundleRepo repo=new BundleRepo();
  repo.populate(it);
  BundleRepo repo2=OBRXMLParser.parse(new FileInputStream("String_Node_Str"));
  assertEquals(repo,repo2);
}
Program: 82670
Project: 82670
Buggy source:
private Map getMappingsMap(){
  Map mappingsMap=new HashMap();
  for (Iterator iter=mappings.iterator(); iter.hasNext(); ) {
    Mapping mapping=(Mapping)iter.next();
    mappingsMap.put(mapping.getConf(),mapping.getScope());
  }
  return mappingsMap;
}

Fixed version (ground truth):
private Map getMappingsMap(){
  Map mappingsMap=new HashMap();
  for (Iterator iter=mappings.iterator(); iter.hasNext(); ) {
    Mapping mapping=(Mapping)iter.next();
    String[] mappingConfs=splitConfs(mapping.getConf());
    for (int i=0; i < mappingConfs.length; i++) {
      if (!mappingsMap.containsKey(mappingConfs[i])) {
        mappingsMap.put(mappingConfs[i],mapping.getScope());
      }
    }
  }
  return mappingsMap;
}
Program: 82673
Project: 82673
Buggy source:
private boolean upToDate(File source,File target,RetrieveOptions options){
  if (!target.exists()) {
    return false;
  }
  String overwriteMode=options.getOverwriteMode();
  if (RetrieveOptions.OVERWRITEMODE_ALWAYS.equals(overwriteMode)) {
    return false;
  }
  if (RetrieveOptions.OVERWRITEMODE_NEVER.equals(overwriteMode)) {
    return true;
  }
  if (RetrieveOptions.OVERWRITEMODE_NEWER.equals(overwriteMode)) {
    return source.lastModified() <= target.lastModified();
  }
  if (RetrieveOptions.OVERWRITEMODE_NEWER.equals(overwriteMode)) {
    return source.lastModified() != target.lastModified();
  }
  return false;
}

Fixed version (ground truth):
private boolean upToDate(File source,File target,RetrieveOptions options){
  if (!target.exists()) {
    return false;
  }
  String overwriteMode=options.getOverwriteMode();
  if (RetrieveOptions.OVERWRITEMODE_ALWAYS.equals(overwriteMode)) {
    return false;
  }
  if (RetrieveOptions.OVERWRITEMODE_NEVER.equals(overwriteMode)) {
    return true;
  }
  if (RetrieveOptions.OVERWRITEMODE_NEWER.equals(overwriteMode)) {
    return source.lastModified() <= target.lastModified();
  }
  if (RetrieveOptions.OVERWRITEMODE_DIFFERENT.equals(overwriteMode)) {
    return source.lastModified() == target.lastModified();
  }
  return false;
}
Program: 82674
Project: 82674
Buggy source:
/** 
 * [revision] is a valid revision in maven. This method strips the '[' and ']' characters. Cfr. http://docs.codehaus.org/x/IGU
 */
private static String normalizeRevision(String revision){
  if (revision.startsWith("String_Node_Str") && revision.endsWith("String_Node_Str") && revision.indexOf(',') == -1) {
    return revision.substring(1,revision.length() - 1);
  }
 else {
    return revision;
  }
}

Fixed version (ground truth):
/** 
 * [revision] is a valid revision in maven. This method strips the '[' and ']' characters. Cfr. http://docs.codehaus.org/x/IGU
 */
private static String normalizeRevision(String revision){
  if (revision.startsWith("String_Node_Str") && revision.endsWith("String_Node_Str") && revision.indexOf(',') == -1) {
    if (IvyPatternHelper.getTokenString(IvyPatternHelper.REVISION_KEY).equals(revision)) {
      return revision;
    }
    return revision.substring(1,revision.length() - 1);
  }
 else {
    return revision;
  }
}
Program: 82675
Project: 82675
Buggy source:
protected ResolvedModuleRevision findModuleInCache(DependencyDescriptor dd,ResolveData data,boolean anyResolver){
  return getRepositoryCacheManager().findModuleInCache(dd,dd.getDependencyRevisionId(),getCacheOptions(data),anyResolver ? null : getName());
}

Fixed version (ground truth):
protected ResolvedModuleRevision findModuleInCache(DependencyDescriptor dd,ResolveData data,boolean anyResolver){
  ResolvedModuleRevision rmr=getRepositoryCacheManager().findModuleInCache(dd,dd.getDependencyRevisionId(),getCacheOptions(data),anyResolver ? null : getName());
  if (rmr == null) {
    return null;
  }
  if (data.getReport() != null && data.isBlacklisted(data.getReport().getConfiguration(),rmr.getId())) {
    Message.verbose("String_Node_Str" + getName() + "String_Node_Str"+ rmr.getId()+ "String_Node_Str"+ dd+ "String_Node_Str");
    return null;
  }
  return rmr;
}
Program: 82676
Project: 82676
Buggy source:
protected ResolvedModuleRevision checkLatest(DependencyDescriptor dd,ResolvedModuleRevision newModuleFound,ResolveData data){
  ResolvedModuleRevision previousModuleFound=data.getCurrentResolvedModuleRevision();
  String newModuleDesc=describe(newModuleFound);
  Message.debug("String_Node_Str" + newModuleDesc + "String_Node_Str"+ describe(previousModuleFound));
  if (previousModuleFound == null) {
    Message.debug("String_Node_Str" + newModuleDesc);
    getRepositoryCacheManager().saveResolvedRevision(dd.getDependencyRevisionId(),newModuleFound.getId().getRevision());
    return newModuleFound;
  }
 else   if (isAfter(newModuleFound,previousModuleFound,data.getDate())) {
    Message.debug("String_Node_Str" + newModuleDesc);
    getRepositoryCacheManager().saveResolvedRevision(dd.getDependencyRevisionId(),newModuleFound.getId().getRevision());
    return newModuleFound;
  }
 else   if (!newModuleFound.getDescriptor().isDefault() && previousModuleFound.getDescriptor().isDefault()) {
    Message.debug("String_Node_Str" + newModuleDesc);
    getRepositoryCacheManager().saveResolvedRevision(dd.getDependencyRevisionId(),newModuleFound.getId().getRevision());
    return newModuleFound;
  }
 else {
    Message.debug("String_Node_Str" + newModuleDesc);
    return previousModuleFound;
  }
}

Fixed version (ground truth):
protected ResolvedModuleRevision checkLatest(DependencyDescriptor dd,ResolvedModuleRevision newModuleFound,ResolveData data){
  Checks.checkNotNull(dd,"String_Node_Str");
  Checks.checkNotNull(data,"String_Node_Str");
  ResolvedModuleRevision previousModuleFound=data.getCurrentResolvedModuleRevision();
  String newModuleDesc=describe(newModuleFound);
  Message.debug("String_Node_Str" + newModuleDesc + "String_Node_Str"+ describe(previousModuleFound));
  if (previousModuleFound == null) {
    Message.debug("String_Node_Str" + newModuleDesc);
    saveModuleRevisionIfNeeded(dd,newModuleFound);
    return newModuleFound;
  }
 else   if (isAfter(newModuleFound,previousModuleFound,data.getDate())) {
    Message.debug("String_Node_Str" + newModuleDesc);
    saveModuleRevisionIfNeeded(dd,newModuleFound);
    return newModuleFound;
  }
 else   if (!newModuleFound.getDescriptor().isDefault() && previousModuleFound.getDescriptor().isDefault()) {
    Message.debug("String_Node_Str" + newModuleDesc);
    saveModuleRevisionIfNeeded(dd,newModuleFound);
    return newModuleFound;
  }
 else {
    Message.debug("String_Node_Str" + newModuleDesc);
    return previousModuleFound;
  }
}
Program: 82679
Project: 82679
Buggy source:
public void toIvyFile(InputStream is,Resource res,File destFile,ModuleDescriptor md) throws IOException, ParseException {
  try {
    Namespace ns=null;
    if (md instanceof DefaultModuleDescriptor) {
      DefaultModuleDescriptor dmd=(DefaultModuleDescriptor)md;
      ns=dmd.getNamespace();
    }
    XmlModuleDescriptorUpdater.update(is,res,destFile,new UpdateOptions().setSettings(IvyContext.getContext().getSettings()).setStatus(md.getStatus()).setRevision(md.getResolvedModuleRevisionId().getRevision()).setPubdate(md.getResolvedPublicationDate()).setNamespace(ns));
  }
 catch (  SAXException e) {
    ParseException ex=new ParseException("String_Node_Str" + res,0);
    ex.initCause(e);
    throw ex;
  }
 finally {
    if (is != null) {
      is.close();
    }
  }
}

Fixed version (ground truth):
public void toIvyFile(InputStream is,Resource res,File destFile,ModuleDescriptor md) throws IOException, ParseException {
  try {
    Namespace ns=null;
    if (md instanceof DefaultModuleDescriptor) {
      DefaultModuleDescriptor dmd=(DefaultModuleDescriptor)md;
      ns=dmd.getNamespace();
    }
    XmlModuleDescriptorUpdater.update(is,res,destFile,new UpdateOptions().setSettings(IvyContext.getContext().getSettings()).setStatus(md.getStatus()).setRevision(md.getResolvedModuleRevisionId().getRevision()).setPubdate(md.getResolvedPublicationDate()).setUpdateBranch(false).setNamespace(ns));
  }
 catch (  SAXException e) {
    ParseException ex=new ParseException("String_Node_Str" + res,0);
    ex.initCause(e);
    throw ex;
  }
 finally {
    if (is != null) {
      is.close();
    }
  }
}
Program: 82681
Project: 82681
Buggy source:
public UpdaterHandler(URL relativePathCtx,PrintWriter out,final UpdateOptions options){
  this.settings=options.getSettings();
  this.out=out;
  this.resolvedRevisions=options.getResolvedRevisions();
  this.status=options.getStatus();
  this.revision=options.getRevision();
  this.pubdate=options.getPubdate();
  this.ns=options.getNamespace();
  this.replaceInclude=options.isReplaceInclude();
  this.relativePathCtx=relativePathCtx;
  if (options.getConfsToExclude() != null) {
    this.confs=Arrays.asList(options.getConfsToExclude());
  }
 else {
    this.confs=Collections.EMPTY_LIST;
  }
}

Fixed version (ground truth):
public UpdaterHandler(URL relativePathCtx,PrintWriter out,final UpdateOptions options){
  this.options=options;
  this.settings=options.getSettings();
  this.out=out;
  this.resolvedRevisions=options.getResolvedRevisions();
  this.status=options.getStatus();
  this.revision=options.getRevision();
  this.pubdate=options.getPubdate();
  this.ns=options.getNamespace();
  this.replaceInclude=options.isReplaceInclude();
  this.relativePathCtx=relativePathCtx;
  if (options.getConfsToExclude() != null) {
    this.confs=Arrays.asList(options.getConfsToExclude());
  }
 else {
    this.confs=Collections.EMPTY_LIST;
  }
}
Program: 82682
Project: 82682
Buggy source:
public void testReplaceBranch() throws Exception {
  IvyAntSettings settings=new IvyAntSettings();
  settings.setProject(project);
  settings.execute();
  settings.getConfiguredIvyInstance().getSettings().setDefaultBranch("String_Node_Str");
  project.setProperty("String_Node_Str","String_Node_Str");
  IvyResolve res=new IvyResolve();
  res.setProject(project);
  res.execute();
  deliver.setPubrevision("String_Node_Str");
  deliver.setDeliverpattern("String_Node_Str");
  deliver.execute();
  File deliveredIvyFile=new File("String_Node_Str");
  assertTrue(deliveredIvyFile.exists());
  ModuleDescriptor md=XmlModuleDescriptorParser.getInstance().parseDescriptor(new IvySettings(),deliveredIvyFile.toURL(),true);
  assertEquals(ModuleRevisionId.newInstance("String_Node_Str","String_Node_Str","String_Node_Str"),md.getModuleRevisionId());
  DependencyDescriptor[] dds=md.getDependencies();
  assertEquals(1,dds.length);
  assertEquals(ModuleRevisionId.newInstance("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"),dds[0].getDependencyRevisionId());
}

Fixed version (ground truth):
public void testReplaceBranch() throws Exception {
  IvyAntSettings settings=new IvyAntSettings();
  settings.setProject(project);
  settings.execute();
  settings.getConfiguredIvyInstance().getSettings().setDefaultBranch("String_Node_Str");
  project.setProperty("String_Node_Str","String_Node_Str");
  IvyResolve res=new IvyResolve();
  res.setProject(project);
  res.execute();
  deliver.setPubrevision("String_Node_Str");
  deliver.setDeliverpattern("String_Node_Str");
  deliver.execute();
  File deliveredIvyFile=new File("String_Node_Str");
  assertTrue(deliveredIvyFile.exists());
  ModuleDescriptor md=XmlModuleDescriptorParser.getInstance().parseDescriptor(new IvySettings(),deliveredIvyFile.toURL(),true);
  assertEquals(ModuleRevisionId.newInstance("String_Node_Str","String_Node_Str","String_Node_Str"),md.getModuleRevisionId());
  DependencyDescriptor[] dds=md.getDependencies();
  assertEquals(1,dds.length);
  assertEquals(ModuleRevisionId.newInstance("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"),dds[0].getDependencyRevisionId());
  assertEquals(ModuleRevisionId.newInstance("String_Node_Str","String_Node_Str","String_Node_Str"),dds[0].getDynamicConstraintDependencyRevisionId());
}
Program: 82683
Project: 82683
Buggy source:
public void addPlugin(PomDependencyMgt plugin){
  String pluginValue=plugin.getGroupId() + EXTRA_INFO_DELIMITER + plugin.getArtifaceId()+ EXTRA_INFO_DELIMITER+ plugin.getVersion();
  String pluginExtraInfo=(String)ivyModuleDescriptor.getExtraInfo().get("String_Node_Str");
  if (pluginExtraInfo == null) {
    pluginExtraInfo=pluginValue;
  }
 else {
    pluginExtraInfo=pluginExtraInfo + "String_Node_Str" + pluginValue;
  }
  ivyModuleDescriptor.getExtraInfo().put("String_Node_Str",pluginExtraInfo);
}

Fixed version (ground truth):
public void addPlugin(PomDependencyMgt plugin){
  String pluginValue=plugin.getGroupId() + EXTRA_INFO_DELIMITER + plugin.getArtifactId()+ EXTRA_INFO_DELIMITER+ plugin.getVersion();
  String pluginExtraInfo=(String)ivyModuleDescriptor.getExtraInfo().get("String_Node_Str");
  if (pluginExtraInfo == null) {
    pluginExtraInfo=pluginValue;
  }
 else {
    pluginExtraInfo=pluginExtraInfo + "String_Node_Str" + pluginValue;
  }
  ivyModuleDescriptor.getExtraInfo().put("String_Node_Str",pluginExtraInfo);
}
Program: 82684
Project: 82684
Buggy source:
private String getDefaultVersion(PomDependencyData dep){
  String key=getDependencyMgtExtraInfoKey(dep.getGroupId(),dep.getArtifaceId());
  return (String)ivyModuleDescriptor.getExtraInfo().get(key);
}

Fixed version (ground truth):
private String getDefaultVersion(PomDependencyData dep){
  String key=getDependencyMgtExtraInfoKey(dep.getGroupId(),dep.getArtifactId());
  return (String)ivyModuleDescriptor.getExtraInfo().get(key);
}
Program: 82685
Project: 82685
Buggy source:
public void addDependencyMgt(PomDependencyMgt dep){
  String key=getDependencyMgtExtraInfoKey(dep.getGroupId(),dep.getArtifaceId());
  ivyModuleDescriptor.addExtraInfo(key,dep.getVersion());
  ivyModuleDescriptor.addDependencyDescriptorMediator(ModuleId.newInstance(dep.getGroupId(),dep.getArtifaceId()),ExactPatternMatcher.INSTANCE,new OverrideDependencyDescriptorMediator(null,dep.getVersion()));
}

Fixed version (ground truth):
public void addDependencyMgt(PomDependencyMgt dep){
  String key=getDependencyMgtExtraInfoKey(dep.getGroupId(),dep.getArtifactId());
  ivyModuleDescriptor.addExtraInfo(key,dep.getVersion());
  ivyModuleDescriptor.addDependencyDescriptorMediator(ModuleId.newInstance(dep.getGroupId(),dep.getArtifactId()),ExactPatternMatcher.INSTANCE,new OverrideDependencyDescriptorMediator(null,dep.getVersion()));
}
Program: 82686
Project: 82686
Buggy source:
public void addArtifact(String artifactId,String packaging){
  String ext=packaging;
  if ("String_Node_Str".equals(packaging)) {
    for (Iterator it=getPlugins(ivyModuleDescriptor).iterator(); it.hasNext(); ) {
      PomDependencyMgt plugin=(PomDependencyMgt)it.next();
      if ("String_Node_Str".equals(plugin.getGroupId()) && "String_Node_Str".equals(plugin.getArtifaceId())) {
        ext="String_Node_Str";
        break;
      }
    }
  }
  ivyModuleDescriptor.addArtifact("String_Node_Str",new DefaultArtifact(mrid,new Date(),artifactId,ext,ext));
}

Fixed version (ground truth):
public void addArtifact(String artifactId,String packaging){
  String ext=packaging;
  if ("String_Node_Str".equals(packaging)) {
    for (Iterator it=getPlugins(ivyModuleDescriptor).iterator(); it.hasNext(); ) {
      PomDependencyMgt plugin=(PomDependencyMgt)it.next();
      if ("String_Node_Str".equals(plugin.getGroupId()) && "String_Node_Str".equals(plugin.getArtifactId())) {
        ext="String_Node_Str";
        break;
      }
    }
  }
  ivyModuleDescriptor.addArtifact("String_Node_Str",new DefaultArtifact(mrid,new Date(),artifactId,ext,ext));
}
Program: 82687
Project: 82687
Buggy source:
public String getArtifactId(){
  String val=getFirstChildText(projectElement,ARTIFACT_ID);
  if (val == null) {
    val=getFirstChildText(parentElement,ARTIFACT_ID);
  }
  return replaceProps(val);
}

Fixed version (ground truth):
public String getArtifactId(){
  String val=getFirstChildText(pluginElement,ARTIFACT_ID);
  return replaceProps(val);
}
Program: 82688
Project: 82688
Buggy source:
private void resolveAndCheckRevision(ModuleDescriptor systemMd,ModuleRevisionId dependencyConstraint,ResolvedResource ivyRef,boolean isDynamic){
  ModuleRevisionId resolvedMrid=systemMd.getResolvedModuleRevisionId();
  if (resolvedMrid.getRevision() == null || resolvedMrid.getRevision().length() == 0) {
    if (!isDynamic) {
      resolvedMrid=ModuleRevisionId.newInstance(resolvedMrid,dependencyConstraint.getRevision());
    }
 else     if (ivyRef.getRevision() == null || ivyRef.getRevision().length() == 0) {
      resolvedMrid=ModuleRevisionId.newInstance(resolvedMrid,"String_Node_Str" + getName());
    }
 else {
      resolvedMrid=ModuleRevisionId.newInstance(resolvedMrid,ivyRef.getRevision());
    }
  }
  if (isDynamic) {
    Message.verbose("String_Node_Str" + toSystem(resolvedMrid).getRevision() + "String_Node_Str"+ dependencyConstraint.getModuleId());
  }
  systemMd.setResolvedModuleRevisionId(resolvedMrid);
  checkModuleDescriptorRevision(systemMd,dependencyConstraint);
}

Fixed version (ground truth):
private void resolveAndCheckRevision(ModuleDescriptor systemMd,ModuleRevisionId dependencyConstraint,ResolvedResource ivyRef,boolean isDynamic){
  ModuleRevisionId resolvedMrid=systemMd.getResolvedModuleRevisionId();
  if (resolvedMrid.getRevision() == null || resolvedMrid.getRevision().length() == 0 || resolvedMrid.getRevision().startsWith("String_Node_Str")) {
    if (!isDynamic) {
      resolvedMrid=ModuleRevisionId.newInstance(resolvedMrid,dependencyConstraint.getRevision());
    }
 else     if (ivyRef.getRevision() == null || ivyRef.getRevision().length() == 0) {
      resolvedMrid=ModuleRevisionId.newInstance(resolvedMrid,"String_Node_Str" + getName());
    }
 else {
      resolvedMrid=ModuleRevisionId.newInstance(resolvedMrid,ivyRef.getRevision());
    }
  }
  if (isDynamic) {
    Message.verbose("String_Node_Str" + toSystem(resolvedMrid).getRevision() + "String_Node_Str"+ dependencyConstraint.getModuleId());
  }
  systemMd.setResolvedModuleRevisionId(resolvedMrid);
  checkModuleDescriptorRevision(systemMd,dependencyConstraint);
}
Program: 82689
Project: 82689
Buggy source:
private void checkModuleDescriptorRevision(ModuleDescriptor systemMd,ModuleRevisionId systemMrid){
  if (!getSettings().getVersionMatcher().accept(systemMrid,systemMd)) {
    throw new UnresolvedDependencyException("String_Node_Str" + getName() + "String_Node_Str"+ systemMd.getModuleRevisionId().getRevision()+ "String_Node_Str"+ systemMrid.getRevision());
  }
}

Fixed version (ground truth):
private void checkModuleDescriptorRevision(ModuleDescriptor systemMd,ModuleRevisionId systemMrid){
  if (!getSettings().getVersionMatcher().accept(systemMrid,systemMd)) {
    throw new UnresolvedDependencyException("String_Node_Str" + getName() + "String_Node_Str"+ systemMd.getResolvedModuleRevisionId().getRevision()+ "String_Node_Str"+ systemMrid.getRevision());
  }
}
Program: 82690
Project: 82690
Buggy source:
public boolean loadData(String conf,boolean shouldBePublic){
  boolean loaded=node.loadData(rootModuleConf,getParentNode(),parentConf,conf,shouldBePublic);
  if (loaded) {
    useRealNode();
    if (data.getSettings().getVersionMatcher().isDynamic(getId())) {
      data.register(node.getResolvedId(),this);
    }
  }
  return loaded;
}

Fixed version (ground truth):
public boolean loadData(String conf,boolean shouldBePublic){
  boolean loaded=node.loadData(rootModuleConf,getParentNode(),parentConf,conf,shouldBePublic);
  if (loaded) {
    useRealNode();
    if (!getId().equals(node.getResolvedId())) {
      data.register(node.getResolvedId(),this);
    }
  }
  return loaded;
}
Program: 82691
Project: 82691
Buggy source:
public void taskFinished(BuildEvent event){
  if (stackDepth == 0) {
    ivy.getLoggerEngine().popLogger();
    event.getProject().removeBuildListener(this);
  }
  stackDepth--;
}

Fixed version (ground truth):
public void taskFinished(BuildEvent event){
  stackDepth--;
  if (stackDepth == 0) {
    ivy.getLoggerEngine().popLogger();
    event.getProject().removeBuildListener(this);
  }
}
Program: 82692
Project: 82692
Buggy source:
/** 
 * Creates and register an   {@link AntMessageLogger} for the given {@link Task}, with the given  {@link Ivy} instance.<p> The created instance will automatically be unregistered from the Ivy instance when the task finishes. </p>
 * @param task the task the logger should use for logging
 * @param ivy the ivy instance on which the logger should be registered
 */
public static void register(Task task,final Ivy ivy){
  AntMessageLogger logger=new AntMessageLogger(task);
  ivy.getLoggerEngine().pushLogger(logger);
  task.getProject().addBuildListener(new BuildListener(){
    private int stackDepth=0;
    public void buildFinished(    BuildEvent event){
    }
    public void buildStarted(    BuildEvent event){
    }
    public void targetStarted(    BuildEvent event){
    }
    public void targetFinished(    BuildEvent event){
    }
    public void taskStarted(    BuildEvent event){
      stackDepth++;
    }
    public void taskFinished(    BuildEvent event){
      if (stackDepth == 0) {
        ivy.getLoggerEngine().popLogger();
        event.getProject().removeBuildListener(this);
      }
      stackDepth--;
    }
    public void messageLogged(    BuildEvent event){
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Creates and register an   {@link AntMessageLogger} for the given {@link Task}, with the given  {@link Ivy} instance.<p> The created instance will automatically be unregistered from the Ivy instance when the task finishes. </p>
 * @param task the task the logger should use for logging
 * @param ivy the ivy instance on which the logger should be registered
 */
public static void register(Task task,final Ivy ivy){
  AntMessageLogger logger=new AntMessageLogger(task);
  ivy.getLoggerEngine().pushLogger(logger);
  task.getProject().addBuildListener(new BuildListener(){
    private int stackDepth=0;
    public void buildFinished(    BuildEvent event){
    }
    public void buildStarted(    BuildEvent event){
    }
    public void targetStarted(    BuildEvent event){
    }
    public void targetFinished(    BuildEvent event){
    }
    public void taskStarted(    BuildEvent event){
      stackDepth++;
    }
    public void taskFinished(    BuildEvent event){
      stackDepth--;
      if (stackDepth == 0) {
        ivy.getLoggerEngine().popLogger();
        event.getProject().removeBuildListener(this);
      }
    }
    public void messageLogged(    BuildEvent event){
    }
  }
);
}
Program: 82693
Project: 82693
Buggy source:
public String getProblemMessage(){
  Exception e=problem;
  if (e == null) {
    return "String_Node_Str";
  }
  String errMsg=e instanceof RuntimeException ? e.getMessage() : e.toString();
  if (errMsg == null || errMsg.length() == 0 || "String_Node_Str".equals(errMsg)) {
    errMsg=e.getClass().getName() + "String_Node_Str" + e.getStackTrace()[0].toString();
  }
  return errMsg;
}

Fixed version (ground truth):
public String getProblemMessage(){
  return StringUtils.getErrorMessage(problem);
}
Program: 82695
Project: 82695
Buggy source:
/** 
 * Fills a repository with a set of module, using empty files for published artifacts.
 * @param resolver the resolver to use to publish the modules
 * @param mds the descriptors of the modules to put in the repository
 * @throws IOException if an IO problem occurs while filling the repository
 */
public static void fillRepository(DependencyResolver resolver,Collection mds) throws IOException {
  File tmp=File.createTempFile("String_Node_Str","String_Node_Str");
  try {
    for (Iterator iter=mds.iterator(); iter.hasNext(); ) {
      boolean overwrite=false;
      ModuleDescriptor md=(ModuleDescriptor)iter.next();
      resolver.beginPublishTransaction(md.getModuleRevisionId(),overwrite);
      boolean published=false;
      try {
        XmlModuleDescriptorWriter.write(md,tmp);
        resolver.publish(md.getMetadataArtifact(),tmp,overwrite);
        tmp.delete();
        tmp.createNewFile();
        Artifact[] artifacts=md.getAllArtifacts();
        for (int i=0; i < artifacts.length; i++) {
          resolver.publish(artifacts[i],tmp,overwrite);
        }
        resolver.commitPublishTransaction();
      }
  finally {
        if (!published) {
          resolver.abortPublishTransaction();
        }
      }
    }
  }
  finally {
    tmp.delete();
  }
}

Fixed version (ground truth):
/** 
 * Fills a repository with a set of module, using empty files for published artifacts.
 * @param resolver the resolver to use to publish the modules
 * @param mds the descriptors of the modules to put in the repository
 * @throws IOException if an IO problem occurs while filling the repository
 */
public static void fillRepository(DependencyResolver resolver,Collection mds) throws IOException {
  File tmp=File.createTempFile("String_Node_Str","String_Node_Str");
  try {
    for (Iterator iter=mds.iterator(); iter.hasNext(); ) {
      boolean overwrite=false;
      ModuleDescriptor md=(ModuleDescriptor)iter.next();
      resolver.beginPublishTransaction(md.getModuleRevisionId(),overwrite);
      boolean published=false;
      try {
        XmlModuleDescriptorWriter.write(md,tmp);
        resolver.publish(md.getMetadataArtifact(),tmp,overwrite);
        tmp.delete();
        tmp.createNewFile();
        Artifact[] artifacts=md.getAllArtifacts();
        for (int i=0; i < artifacts.length; i++) {
          resolver.publish(artifacts[i],tmp,overwrite);
        }
        resolver.commitPublishTransaction();
        published=true;
      }
  finally {
        if (!published) {
          resolver.abortPublishTransaction();
        }
      }
    }
  }
  finally {
    tmp.delete();
  }
}
Program: 82698
Project: 82698
Buggy source:
public void output(ReportOutputter[] outputters,File cache){
  for (int i=0; i < outputters.length; i++) {
    outputters[i].output(this,cache);
  }
}

Fixed version (ground truth):
public void output(ReportOutputter[] outputters,ResolutionCacheManager cacheMgr) throws IOException {
  for (int i=0; i < outputters.length; i++) {
    outputters[i].output(this,cacheMgr);
  }
}
Program: 82700
Project: 82700
Buggy source:
public void outputReport(ResolveReport report,File cache){
  Message.info("String_Node_Str");
  report.setProblemMessages(Message.getProblems());
  report.output(settings.getReportOutputters(),cache);
  Message.verbose("String_Node_Str" + report.getResolveTime() + "String_Node_Str"+ report.getDownloadTime()+ "String_Node_Str");
  Message.sumupProblems();
}

Fixed version (ground truth):
public void outputReport(ResolveReport report,ResolutionCacheManager cacheMgr) throws IOException {
  Message.info("String_Node_Str");
  report.setProblemMessages(Message.getProblems());
  report.output(settings.getReportOutputters(),cacheMgr);
}
Program: 82702
Project: 82702
Buggy source:
public abstract void output(ResolveReport report,File destDir);

Fixed version (ground truth):
public abstract void output(ResolveReport report,ResolutionCacheManager cacheMgr) throws IOException ;
Program: 82703
Project: 82703
Buggy source:
/** 
 * Returns the default ivy settings of this classloader. If it doesn't exist yet, a new one is created using the given project to back the VariableContainer.
 * @param project  TODO add text.
 * @return  An IvySetting instance.
 */
public static IvyAntSettings getDefaultInstance(Project project){
  Object defaultInstanceObj=project.getReference("String_Node_Str");
  if (defaultInstanceObj != null && defaultInstanceObj.getClass().getClassLoader() != IvyAntSettings.class.getClassLoader()) {
    Message.warn("String_Node_Str" + "String_Node_Str");
    defaultInstanceObj=null;
  }
  if (defaultInstanceObj != null && !(defaultInstanceObj instanceof IvyAntSettings)) {
    throw new BuildException("String_Node_Str" + defaultInstanceObj.getClass().getName() + "String_Node_Str");
  }
  if (defaultInstanceObj == null) {
    Message.info("String_Node_Str" + "String_Node_Str");
    IvyAntSettings defaultInstance=new IvyAntSettings();
    defaultInstance.setProject(project);
    defaultInstance.registerAsDefault();
    return defaultInstance;
  }
 else {
    return (IvyAntSettings)defaultInstanceObj;
  }
}

Fixed version (ground truth):
/** 
 * Returns the default ivy settings of this classloader. If it doesn't exist yet, a new one is created using the given project to back the VariableContainer.
 * @param project  TODO add text.
 * @return  An IvySetting instance.
 */
public static IvyAntSettings getDefaultInstance(Project project){
  Object defaultInstanceObj=project.getReference("String_Node_Str");
  if (defaultInstanceObj != null && defaultInstanceObj.getClass().getClassLoader() != IvyAntSettings.class.getClassLoader()) {
    project.log("String_Node_Str" + "String_Node_Str",Project.MSG_WARN);
    defaultInstanceObj=null;
  }
  if (defaultInstanceObj != null && !(defaultInstanceObj instanceof IvyAntSettings)) {
    throw new BuildException("String_Node_Str" + defaultInstanceObj.getClass().getName() + "String_Node_Str");
  }
  if (defaultInstanceObj == null) {
    project.log("String_Node_Str" + "String_Node_Str",Project.MSG_INFO);
    IvyAntSettings defaultInstance=new IvyAntSettings();
    defaultInstance.setProject(project);
    defaultInstance.registerAsDefault();
    return defaultInstance;
  }
 else {
    return (IvyAntSettings)defaultInstanceObj;
  }
}
Program: 82704
Project: 82704
Buggy source:
protected Properties getDefaultProperties(){
  URL url=IvySettings.getDefaultPropertiesURL();
  Properties props=new Properties();
  Message.verbose("String_Node_Str" + url);
  try {
    InputStream is=url.openStream();
    try {
      props.load(is);
    }
  finally {
      if (is != null) {
        is.close();
      }
    }
  }
 catch (  IOException ex) {
    throw new BuildException(ex);
  }
  return props;
}

Fixed version (ground truth):
protected Properties getDefaultProperties(){
  URL url=IvySettings.getDefaultPropertiesURL();
  Properties props=new Properties();
  verbose("String_Node_Str" + url);
  try {
    InputStream is=url.openStream();
    try {
      props.load(is);
    }
  finally {
      if (is != null) {
        is.close();
      }
    }
  }
 catch (  IOException ex) {
    throw new BuildException(ex);
  }
  return props;
}
Program: 82705
Project: 82705
Buggy source:
/** 
 * Set _file or _url to its default value
 * @param variableContainer
 */
private void defineDefaultSettingFile(IvyVariableContainer variableContainer){
  String settingsFileName=variableContainer.getVariable("String_Node_Str");
  if (settingsFileName != null && !settingsFileName.equals(variableContainer.getVariable("String_Node_Str"))) {
    Message.deprecated("String_Node_Str");
  }
 else {
    settingsFileName=variableContainer.getVariable("String_Node_Str");
  }
  File[] settingsLocations=new File[]{new File(getProject().getBaseDir(),settingsFileName),new File(getProject().getBaseDir(),"String_Node_Str"),new File(settingsFileName),new File("String_Node_Str")};
  for (int i=0; i < settingsLocations.length; i++) {
    file=settingsLocations[i];
    Message.verbose("String_Node_Str" + file);
    if (file.exists()) {
      break;
    }
  }
  if (!file.exists()) {
    if (Boolean.valueOf(getProject().getProperty("String_Node_Str")).booleanValue()) {
      Message.info("String_Node_Str");
      file=null;
      url=IvySettings.getDefault14SettingsURL();
    }
 else {
      Message.info("String_Node_Str");
      file=null;
      url=IvySettings.getDefaultSettingsURL();
    }
  }
}

Fixed version (ground truth):
/** 
 * Set _file or _url to its default value
 * @param variableContainer
 */
private void defineDefaultSettingFile(IvyVariableContainer variableContainer){
  String settingsFileName=variableContainer.getVariable("String_Node_Str");
  if (settingsFileName != null && !settingsFileName.equals(variableContainer.getVariable("String_Node_Str"))) {
    info("String_Node_Str");
  }
 else {
    settingsFileName=variableContainer.getVariable("String_Node_Str");
  }
  File[] settingsLocations=new File[]{new File(getProject().getBaseDir(),settingsFileName),new File(getProject().getBaseDir(),"String_Node_Str"),new File(settingsFileName),new File("String_Node_Str")};
  for (int i=0; i < settingsLocations.length; i++) {
    file=settingsLocations[i];
    verbose("String_Node_Str" + file);
    if (file.exists()) {
      break;
    }
  }
  if (!file.exists()) {
    if (Boolean.valueOf(getProject().getProperty("String_Node_Str")).booleanValue()) {
      info("String_Node_Str");
      file=null;
      url=IvySettings.getDefault14SettingsURL();
    }
 else {
      info("String_Node_Str");
      file=null;
      url=IvySettings.getDefaultSettingsURL();
    }
  }
}
Program: 82706
Project: 82706
Buggy source:
public void doExecute() throws BuildException {
  try {
    if (pomFile == null) {
      throw new BuildException("String_Node_Str");
    }
    if (ivyFile == null) {
      throw new BuildException("String_Node_Str");
    }
    ModuleDescriptor md=PomModuleDescriptorParser.getInstance().parseDescriptor(new IvySettings(),pomFile.toURL(),false);
    PomModuleDescriptorParser.getInstance().toIvyFile(pomFile.toURL().openStream(),new URLResource(pomFile.toURL()),getIvyFile(),md);
  }
 catch (  MalformedURLException e) {
    throw new BuildException("String_Node_Str" + pomFile + "String_Node_Str"+ e,e);
  }
catch (  ParseException e) {
    log(e.getMessage(),Project.MSG_ERR);
    throw new BuildException("String_Node_Str" + pomFile + "String_Node_Str"+ e,e);
  }
catch (  Exception e) {
    throw new BuildException("String_Node_Str" + e + "String_Node_Str"+ pomFile+ "String_Node_Str"+ ivyFile,e);
  }
}

Fixed version (ground truth):
public void doExecute() throws BuildException {
  try {
    if (pomFile == null) {
      throw new BuildException("String_Node_Str");
    }
    if (ivyFile == null) {
      throw new BuildException("String_Node_Str");
    }
    ModuleDescriptor md=PomModuleDescriptorParser.getInstance().parseDescriptor(getSettings(),pomFile.toURL(),false);
    PomModuleDescriptorParser.getInstance().toIvyFile(pomFile.toURL().openStream(),new URLResource(pomFile.toURL()),getIvyFile(),md);
  }
 catch (  MalformedURLException e) {
    throw new BuildException("String_Node_Str" + pomFile + "String_Node_Str"+ e,e);
  }
catch (  ParseException e) {
    log(e.getMessage(),Project.MSG_ERR);
    throw new BuildException("String_Node_Str" + pomFile + "String_Node_Str"+ e,e);
  }
catch (  Exception e) {
    throw new BuildException("String_Node_Str" + e + "String_Node_Str"+ pomFile+ "String_Node_Str"+ ivyFile,e);
  }
}
Program: 82707
Project: 82707
Buggy source:
public void doExecute() throws BuildException {
  try {
    if (ivyFile == null) {
      throw new BuildException("String_Node_Str");
    }
    if (pomFile == null) {
      throw new BuildException("String_Node_Str");
    }
    ModuleDescriptor md=XmlModuleDescriptorParser.getInstance().parseDescriptor(new IvySettings(),ivyFile.toURL(),false);
    PomModuleDescriptorWriter.write(md,mappings.isEmpty() ? PomModuleDescriptorWriter.DEFAULT_MAPPING : new ConfigurationScopeMapping(getMappingsMap()),pomFile);
  }
 catch (  MalformedURLException e) {
    throw new BuildException("String_Node_Str" + ivyFile + "String_Node_Str"+ e,e);
  }
catch (  ParseException e) {
    log(e.getMessage(),Project.MSG_ERR);
    throw new BuildException("String_Node_Str" + ivyFile + "String_Node_Str"+ e,e);
  }
catch (  Exception e) {
    throw new BuildException("String_Node_Str" + e + "String_Node_Str"+ ivyFile+ "String_Node_Str"+ pomFile,e);
  }
}

Fixed version (ground truth):
public void doExecute() throws BuildException {
  try {
    if (ivyFile == null) {
      throw new BuildException("String_Node_Str");
    }
    if (pomFile == null) {
      throw new BuildException("String_Node_Str");
    }
    ModuleDescriptor md=XmlModuleDescriptorParser.getInstance().parseDescriptor(getSettings(),ivyFile.toURL(),false);
    PomModuleDescriptorWriter.write(md,mappings.isEmpty() ? PomModuleDescriptorWriter.DEFAULT_MAPPING : new ConfigurationScopeMapping(getMappingsMap()),pomFile);
  }
 catch (  MalformedURLException e) {
    throw new BuildException("String_Node_Str" + ivyFile + "String_Node_Str"+ e,e);
  }
catch (  ParseException e) {
    log(e.getMessage(),Project.MSG_ERR);
    throw new BuildException("String_Node_Str" + ivyFile + "String_Node_Str"+ e,e);
  }
catch (  Exception e) {
    throw new BuildException("String_Node_Str" + e + "String_Node_Str"+ ivyFile+ "String_Node_Str"+ pomFile,e);
  }
}
Program: 82708
Project: 82708
Buggy source:
/** 
 * Called when task is about to finish Should clean up all state related information (stacks for example)
 */
protected void finalizeTask(){
  if (!IvyContext.getContext().pop(ANT_PROJECT_CONTEXT_KEY,getProject())) {
    Message.error("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Called when task is about to finish Should clean up all state related information (stacks for example)
 */
protected void finalizeTask(){
  if (!IvyContext.getContext().pop(ANT_PROJECT_CONTEXT_KEY,getProject())) {
    Message.error("String_Node_Str");
  }
  IvyContext.popContext();
}
Program: 82709
Project: 82709
Buggy source:
/** 
 * Called when task starts its execution.
 */
protected void prepareTask(){
  IvyContext.getContext().push(ANT_PROJECT_CONTEXT_KEY,getProject());
}

Fixed version (ground truth):
/** 
 * Called when task starts its execution.
 */
protected void prepareTask(){
  IvyContext.pushNewCopyContext();
  IvyContext.getContext().setIvy(getIvyInstance());
  IvyContext.getContext().push(ANT_PROJECT_CONTEXT_KEY,getProject());
}
Program: 82710
Project: 82710
Buggy source:
public MessageLogger getMessageLogger(){
  return getIvy().getLoggerEngine();
}

Fixed version (ground truth):
public MessageLogger getMessageLogger(){
  Ivy ivy=peekIvy();
  if (ivy == null) {
    if (defaultIvy == null) {
      return Message.getDefaultLogger();
    }
 else {
      return defaultIvy.getLoggerEngine();
    }
  }
 else {
    return ivy.getLoggerEngine();
  }
}
Program: 82711
Project: 82711
Buggy source:
public static void setDefaultLogger(MessageLogger logger){
  defaultLogger=logger;
}

Fixed version (ground truth):
/** 
 * Change the default logger used when no other logger is currently configured
 * @param logger the new default logger, must not be <code>null</code>
 */
public static void setDefaultLogger(MessageLogger logger){
  Checks.checkNotNull(logger,"String_Node_Str");
  defaultLogger=logger;
}
Program: 82712
Project: 82712
Buggy source:
public static MessageLogger getDefaultLogger(){
  return defaultLogger;
}

Fixed version (ground truth):
/** 
 * Returns the current default logger.
 * @return the current default logger; is never <code>null</code>.
 */
public static MessageLogger getDefaultLogger(){
  return defaultLogger;
}
Program: 82713
Project: 82713
Buggy source:
/** 
 * Returns the current logger, or the default one if there is no logger in the stack
 * @return the current logger, or the default one if there is no logger in the stack
 */
private MessageLogger peekLogger(){
  if (loggerStack.isEmpty()) {
    return defaultLogger;
  }
  return (MessageLogger)loggerStack.peek();
}

Fixed version (ground truth):
/** 
 * Returns the current logger, or the default one if there is no logger in the stack
 * @return the current logger, or the default one if there is no logger in the stack
 */
private MessageLogger peekLogger(){
  if (loggerStack.isEmpty()) {
    return getDefaultLogger();
  }
  return (MessageLogger)loggerStack.peek();
}
Program: 82714
Project: 82714
Buggy source:
public void setShowProgress(boolean progress){
  defaultLogger.setShowProgress(progress);
  for (Iterator iter=loggerStack.iterator(); iter.hasNext(); ) {
    MessageLogger l=(MessageLogger)iter.next();
    l.setShowProgress(progress);
  }
}

Fixed version (ground truth):
public void setShowProgress(boolean progress){
  getDefaultLogger().setShowProgress(progress);
  for (Iterator iter=loggerStack.iterator(); iter.hasNext(); ) {
    MessageLogger l=(MessageLogger)iter.next();
    l.setShowProgress(progress);
  }
}
Program: 82715
Project: 82715
Buggy source:
public void clearProblems(){
  defaultLogger.clearProblems();
  for (Iterator iter=loggerStack.iterator(); iter.hasNext(); ) {
    MessageLogger l=(MessageLogger)iter.next();
    l.clearProblems();
  }
  problems.clear();
  errors.clear();
  warns.clear();
}

Fixed version (ground truth):
public void clearProblems(){
  getDefaultLogger().clearProblems();
  for (Iterator iter=loggerStack.iterator(); iter.hasNext(); ) {
    MessageLogger l=(MessageLogger)iter.next();
    l.clearProblems();
  }
  problems.clear();
  errors.clear();
  warns.clear();
}
Program: 82716
Project: 82716
Buggy source:
public boolean isShowProgress(){
  return defaultLogger.isShowProgress();
}

Fixed version (ground truth):
public boolean isShowProgress(){
  return getDefaultLogger().isShowProgress();
}
Program: 82717
Project: 82717
Buggy source:
protected void setUp() throws Exception {
  strategy=IgnoreCircularDependencyStrategy.getInstance();
  mockMessageImpl=new MockMessageLogger();
  IvyContext.getContext().getIvy().getLoggerEngine().setDefaultLogger(mockMessageImpl);
}

Fixed version (ground truth):
protected void setUp() throws Exception {
  strategy=IgnoreCircularDependencyStrategy.getInstance();
  mockMessageImpl=new MockMessageLogger();
  Message.setDefaultLogger(mockMessageImpl);
}
Program: 82718
Project: 82718
Buggy source:
private void resetLogger(){
  mockMessageImpl=new MockMessageLogger();
  IvyContext.getContext().getIvy().getLoggerEngine().setDefaultLogger(mockMessageImpl);
}

Fixed version (ground truth):
private void resetLogger(){
  mockMessageImpl=new MockMessageLogger();
  Message.setDefaultLogger(mockMessageImpl);
}