Program: 82788
Project: 82788
Buggy source:
/** 
 * After the call node may be discarded. To avoid using discarded node, make sure to get the real node after the call IvyNode node = ... node.loadData(); node = node.getRealNode(); ...
 */
public boolean loadData(String conf){
  boolean loaded=_md != null;
  if (!isEvicted(_rootModuleConf) && hasConfigurationsToLoad() && !hasProblem()) {
    if (_md == null) {
      DependencyResolver resolver=_data.getIvy().getResolver(getModuleId());
      try {
        Message.debug("String_Node_Str" + resolver + "String_Node_Str"+ getId());
        _module=resolver.getDependency(_dd,_data);
        if (_module != null) {
          _data.getIvy().saveResolver(_data.getCache(),_module.getDescriptor(),resolver.getName());
          if (!getId().isExactRevision()) {
            if (!_module.getId().isExactRevision()) {
              Message.error("String_Node_Str" + getId() + "String_Node_Str");
              _problem=new RuntimeException("String_Node_Str");
              _data.getReport().addDependency(this);
              return false;
            }
            IvyNode resolved=_data.getNode(_module.getId());
            if (resolved != null) {
              resolved._downloaded|=_module.isDownloaded();
              resolved._searched|=_module.isSearched();
              resolved.markSelected(_rootModuleConf);
              resolved.updateDataFrom(this,_rootModuleConf);
              resolved.loadData(conf);
              if (_dd != null) {
                resolved.addDependencyArtifactsIncludes(_rootModuleConf,_dd.getDependencyArtifactsIncludes(getParentConf()));
              }
              _data.register(getId(),resolved);
              return true;
            }
          }
          _downloaded=_module.isDownloaded();
          _searched=_module.isSearched();
        }
 else {
          Message.warn("String_Node_Str" + getId());
          resolver.reportFailure();
          _problem=new RuntimeException("String_Node_Str");
        }
      }
 catch (      ParseException e) {
        _problem=e;
      }
      if (_module == null) {
        _data.getReport().addDependency(this);
        return false;
      }
 else {
        loaded=true;
        if (!getId().isExactRevision()) {
          Message.info("String_Node_Str" + _module.getId().getRevision() + "String_Node_Str"+ getId());
        }
        _md=_module.getDescriptor();
        if (!getId().isExactRevision()) {
          _data.register(_module.getId(),this);
        }
        _confsToFetch.remove("String_Node_Str");
        updateConfsToFetch(Arrays.asList(resolveSpecialConfigurations(getRequiredConfigurations(getParent(),getParentConf()),this)));
      }
    }
  }
  if (hasProblem()) {
    _data.getReport().addDependency(this);
    return loaded;
  }
  if ("String_Node_Str".equals(conf)) {
    if (_md != null) {
      _fetchedConfigurations.addAll(Arrays.asList(_md.getPublicConfigurationsNames()));
      _confsToFetch.clear();
      addRootModuleConfigurations(_rootModuleConf,_md.getPublicConfigurationsNames());
    }
  }
 else {
    if (_md != null) {
      Configuration c=_md.getConfiguration(conf);
      if (c == null) {
        _confsToFetch.remove(conf);
        _problem=new RuntimeException("String_Node_Str" + this + "String_Node_Str"+ conf+ "String_Node_Str"+ getParent()+ "String_Node_Str"+ getParentConf());
        return false;
      }
 else       if (!isRoot() && c.getVisibility() != Configuration.Visibility.PUBLIC) {
        _confsToFetch.remove(conf);
        _problem=new RuntimeException("String_Node_Str" + this + "String_Node_Str"+ c+ "String_Node_Str"+ getParent()+ "String_Node_Str"+ getParentConf());
        return false;
      }
    }
    if (loaded) {
      _fetchedConfigurations.add(conf);
      _confsToFetch.remove(conf);
    }
    addRootModuleConfigurations(_rootModuleConf,new String[]{conf});
  }
  if (_dd != null) {
    addDependencyArtifactsIncludes(_rootModuleConf,_dd.getDependencyArtifactsIncludes(getParentConf()));
  }
  return loaded;
}

Fixed version (ground truth):
/** 
 * After the call node may be discarded. To avoid using discarded node, make sure to get the real node after the call IvyNode node = ... node.loadData(); node = node.getRealNode(); ...
 */
public boolean loadData(String conf){
  boolean loaded=_md != null;
  if (!isEvicted(_rootModuleConf) && hasConfigurationsToLoad() && !hasProblem()) {
    if (_md == null) {
      DependencyResolver resolver=_data.getIvy().getResolver(getModuleId());
      try {
        Message.debug("String_Node_Str" + resolver + "String_Node_Str"+ getId());
        _module=resolver.getDependency(_dd,_data);
        if (_module != null) {
          _data.getIvy().saveResolver(_data.getCache(),_module.getDescriptor(),resolver.getName());
          if (_data.getIvy().logModuleWhenFound()) {
            Message.info("String_Node_Str" + _module.getId() + "String_Node_Str"+ _module.getResolver().getName());
          }
          if (!getId().isExactRevision()) {
            if (!_module.getId().isExactRevision()) {
              Message.error("String_Node_Str" + getId() + "String_Node_Str");
              _problem=new RuntimeException("String_Node_Str");
              _data.getReport().addDependency(this);
              return false;
            }
            IvyNode resolved=_data.getNode(_module.getId());
            if (resolved != null) {
              resolved._downloaded|=_module.isDownloaded();
              resolved._searched|=_module.isSearched();
              resolved.markSelected(_rootModuleConf);
              resolved.updateDataFrom(this,_rootModuleConf);
              resolved.loadData(conf);
              if (_dd != null) {
                resolved.addDependencyArtifactsIncludes(_rootModuleConf,_dd.getDependencyArtifactsIncludes(getParentConf()));
              }
              _data.register(getId(),resolved);
              return true;
            }
          }
          _downloaded=_module.isDownloaded();
          _searched=_module.isSearched();
        }
 else {
          Message.warn("String_Node_Str" + getId());
          resolver.reportFailure();
          _problem=new RuntimeException("String_Node_Str");
        }
      }
 catch (      ParseException e) {
        _problem=e;
      }
      if (_module == null) {
        _data.getReport().addDependency(this);
        return false;
      }
 else {
        loaded=true;
        if (!getId().isExactRevision()) {
          Message.info("String_Node_Str" + _module.getId().getRevision() + "String_Node_Str"+ getId());
        }
        _md=_module.getDescriptor();
        if (!getId().isExactRevision()) {
          _data.register(_module.getId(),this);
        }
        _confsToFetch.remove("String_Node_Str");
        updateConfsToFetch(Arrays.asList(resolveSpecialConfigurations(getRequiredConfigurations(getParent(),getParentConf()),this)));
      }
    }
  }
  if (hasProblem()) {
    _data.getReport().addDependency(this);
    return handleConfiguration(loaded,conf) && loaded;
  }
  if (!handleConfiguration(loaded,conf)) {
    return false;
  }
  if (_dd != null) {
    addDependencyArtifactsIncludes(_rootModuleConf,_dd.getDependencyArtifactsIncludes(getParentConf()));
  }
  return loaded;
}