Program: 82776
Project: 82776
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=false;
  if (!isEvicted(_rootModuleConf) && (hasConfigurationsToLoad() || !isRootModuleConfLoaded()) && !hasProblem()) {
    markRootModuleConfLoaded();
    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)));
      }
    }
 else {
      loaded=true;
    }
  }
  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;
}

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=false;
  if (!isEvicted(_rootModuleConf) && (hasConfigurationsToLoad() || !isRootModuleConfLoaded()) && !hasProblem()) {
    markRootModuleConfLoaded();
    if (_md == null) {
      DependencyResolver resolver=_data.getIvy().getResolver(getModuleId());
      if (resolver == null) {
        Message.error("String_Node_Str" + getModuleId() + "String_Node_Str");
        _problem=new RuntimeException("String_Node_Str" + getModuleId() + "String_Node_Str");
        _data.getReport().addDependency(this);
        return false;
      }
      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() && _data.getIvy().logResolvedRevision()) {
          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)));
      }
    }
 else {
      loaded=true;
    }
  }
  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;
}