Program: 82749
Project: 82749
Buggy source:
protected void prepareAndCheck(){
  Ivy ivy=getIvyInstance();
  _organisation=getProperty(_organisation,ivy,"String_Node_Str");
  _module=getProperty(_module,ivy,"String_Node_Str");
  if (_org != null && getResolvedDescriptor(_org,_name + "String_Node_Str",true) == null) {
    IvyResolve resolve=createResolve(isHaltonfailure());
    resolve.setOrg(_org);
    resolve.setName(_name);
    resolve.setRev(_rev);
    String conf=_conf == null ? "String_Node_Str" : _conf;
    resolve.setConf(conf);
    resolve.execute();
    _conf="String_Node_Str";
  }
 else {
    ensureResolved(isHaltonfailure(),isTransitive(),getOrganisation(),getModule());
    _conf=getProperty(_conf,ivy,"String_Node_Str");
    if ("String_Node_Str".equals(_conf)) {
      _conf=getProperty(ivy,"String_Node_Str");
      if (_conf == null) {
        throw new BuildException("String_Node_Str");
      }
    }
  }
  _organisation=getProperty(_organisation,ivy,"String_Node_Str");
  _module=getProperty(_module,ivy,"String_Node_Str");
  if (_cache == null) {
    _cache=ivy.getDefaultCache();
  }
  if (_organisation == null && _org == null) {
    throw new BuildException("String_Node_Str");
  }
  if (_module == null && _org == null) {
    throw new BuildException("String_Node_Str");
  }
  if (_conf == null) {
    throw new BuildException("String_Node_Str");
  }
  _artifactFilter=FilterHelper.getArtifactTypeFilter(_type);
}

Fixed version (ground truth):
protected void prepareAndCheck(){
  Ivy ivy=getIvyInstance();
  _organisation=getProperty(_organisation,ivy,"String_Node_Str");
  _module=getProperty(_module,ivy,"String_Node_Str");
  if (_org != null) {
    _conf=_conf == null ? "String_Node_Str" : _conf;
    String[] toResolve=getConfsToResolve(_org,_name + "String_Node_Str",_conf,true);
    if (toResolve.length > 0) {
      Message.verbose("String_Node_Str" + _org + "String_Node_Str"+ _name+ "String_Node_Str"+ _rev+ "String_Node_Str"+ StringUtils.join(toResolve,"String_Node_Str")+ "String_Node_Str");
      IvyResolve resolve=createResolve(isHaltonfailure());
      resolve.setOrg(_org);
      resolve.setName(_name);
      resolve.setRev(_rev);
      resolve.setConf(_conf);
      resolve.execute();
    }
 else {
      Message.verbose("String_Node_Str" + _org + "String_Node_Str"+ _name+ "String_Node_Str"+ _rev+ "String_Node_Str"+ _conf+ "String_Node_Str");
    }
    if ("String_Node_Str".equals(_conf)) {
      _conf=StringUtils.join(getResolvedConfigurations(_org,_name + "String_Node_Str",true),"String_Node_Str");
    }
  }
 else {
    Message.debug("String_Node_Str");
    ensureResolved(isHaltonfailure(),isTransitive(),getOrganisation(),getModule(),getProperty(_conf,ivy,"String_Node_Str"));
    _conf=getProperty(_conf,ivy,"String_Node_Str");
    if ("String_Node_Str".equals(_conf)) {
      _conf=getProperty(ivy,"String_Node_Str");
      if (_conf == null) {
        throw new BuildException("String_Node_Str");
      }
    }
  }
  _organisation=getProperty(_organisation,ivy,"String_Node_Str");
  _module=getProperty(_module,ivy,"String_Node_Str");
  if (_cache == null) {
    _cache=ivy.getDefaultCache();
  }
  if (_organisation == null && _org == null) {
    throw new BuildException("String_Node_Str");
  }
  if (_module == null && _org == null) {
    throw new BuildException("String_Node_Str");
  }
  if (_conf == null) {
    throw new BuildException("String_Node_Str");
  }
  _artifactFilter=FilterHelper.getArtifactTypeFilter(_type);
}