Program: 110929
Project: 110929
Buggy source:
public static SkyValue clone(Rule rule,Path outputDirectory,EventHandler eventHandler) throws RepositoryFunctionException {
  AggregatingAttributeMapper mapper=AggregatingAttributeMapper.of(rule);
  if ((mapper.has("String_Node_Str",Type.STRING) == mapper.has("String_Node_Str",Type.STRING)) && (mapper.get("String_Node_Str",Type.STRING).isEmpty() == mapper.get("String_Node_Str",Type.STRING).isEmpty())) {
    throw new RepositoryFunctionException(new EvalException(rule.getLocation(),"String_Node_Str"),Transience.PERSISTENT);
  }
  String startingPoint;
  if (mapper.has("String_Node_Str",Type.STRING) && !mapper.get("String_Node_Str",Type.STRING).isEmpty()) {
    startingPoint=mapper.get("String_Node_Str",Type.STRING);
  }
 else {
    startingPoint="String_Node_Str" + mapper.get("String_Node_Str",Type.STRING);
  }
  GitRepositoryDescriptor descriptor=new GitRepositoryDescriptor(mapper.get("String_Node_Str",Type.STRING),startingPoint,mapper.get("String_Node_Str",Type.BOOLEAN),outputDirectory);
  Git git=null;
  try {
    if (descriptor.directory.exists()) {
      if (isUpToDate(descriptor)) {
        return new HttpDownloadValue(descriptor.directory);
      }
      try {
        FileSystemUtils.deleteTree(descriptor.directory);
      }
 catch (      IOException e) {
        throw new RepositoryFunctionException(e,Transience.TRANSIENT);
      }
    }
    git=Git.cloneRepository().setURI(descriptor.remote).setCredentialsProvider(new NetRCCredentialsProvider()).setDirectory(descriptor.directory.getPathFile()).setCloneSubmodules(false).setNoCheckout(true).setProgressMonitor(new GitProgressMonitor("String_Node_Str" + descriptor.remote,eventHandler)).call();
    git.checkout().setCreateBranch(true).setName("String_Node_Str").setStartPoint(descriptor.checkout).call();
    if (descriptor.initSubmodules && !git.submoduleInit().call().isEmpty()) {
      git.submoduleUpdate().setProgressMonitor(new GitProgressMonitor("String_Node_Str" + descriptor.remote,eventHandler)).call();
    }
  }
 catch (  InvalidRemoteException e) {
    throw new RepositoryFunctionException(new IOException("String_Node_Str" + e.getMessage()),Transience.PERSISTENT);
  }
catch (  RefNotFoundException|InvalidRefNameException e) {
    throw new RepositoryFunctionException(new IOException("String_Node_Str" + e.getMessage()),Transience.PERSISTENT);
  }
catch (  GitAPIException e) {
    StringBuilder errmsg=new StringBuilder();
    errmsg.append(e.getMessage());
    Throwable throwable=e;
    while (throwable.getCause() != null) {
      throwable=throwable.getCause();
      errmsg.append("String_Node_Str" + e.getMessage());
    }
    throw new RepositoryFunctionException(new IOException("String_Node_Str" + errmsg),Transience.PERSISTENT);
  }
catch (  JGitInternalException e) {
    throw new RepositoryFunctionException(new IOException(e.getMessage()),Transience.PERSISTENT);
  }
 finally {
    if (git != null) {
      git.close();
    }
  }
  return new HttpDownloadValue(descriptor.directory);
}

Fixed version (ground truth):
public static SkyValue clone(Rule rule,Path outputDirectory,EventHandler eventHandler) throws RepositoryFunctionException {
  AggregatingAttributeMapper mapper=AggregatingAttributeMapper.of(rule);
  if ((mapper.has("String_Node_Str",Type.STRING) == mapper.has("String_Node_Str",Type.STRING)) && (mapper.get("String_Node_Str",Type.STRING).isEmpty() == mapper.get("String_Node_Str",Type.STRING).isEmpty())) {
    throw new RepositoryFunctionException(new EvalException(rule.getLocation(),"String_Node_Str"),Transience.PERSISTENT);
  }
  String startingPoint;
  if (mapper.has("String_Node_Str",Type.STRING) && !mapper.get("String_Node_Str",Type.STRING).isEmpty()) {
    startingPoint=mapper.get("String_Node_Str",Type.STRING);
  }
 else {
    startingPoint="String_Node_Str" + mapper.get("String_Node_Str",Type.STRING);
  }
  GitRepositoryDescriptor descriptor=new GitRepositoryDescriptor(mapper.get("String_Node_Str",Type.STRING),startingPoint,mapper.get("String_Node_Str",Type.BOOLEAN),outputDirectory);
  if (descriptor.remote != null && descriptor.remote.startsWith("String_Node_Str")) {
    try {
      ProxyHelper.createProxyIfNeeded(descriptor.remote);
    }
 catch (    IOException ie) {
      throw new RepositoryFunctionException(ie,Transience.TRANSIENT);
    }
  }
  Git git=null;
  try {
    if (descriptor.directory.exists()) {
      if (isUpToDate(descriptor)) {
        return new HttpDownloadValue(descriptor.directory);
      }
      try {
        FileSystemUtils.deleteTree(descriptor.directory);
      }
 catch (      IOException e) {
        throw new RepositoryFunctionException(e,Transience.TRANSIENT);
      }
    }
    git=Git.cloneRepository().setURI(descriptor.remote).setCredentialsProvider(new NetRCCredentialsProvider()).setDirectory(descriptor.directory.getPathFile()).setCloneSubmodules(false).setNoCheckout(true).setProgressMonitor(new GitProgressMonitor("String_Node_Str" + descriptor.remote,eventHandler)).call();
    git.checkout().setCreateBranch(true).setName("String_Node_Str").setStartPoint(descriptor.checkout).call();
    if (descriptor.initSubmodules && !git.submoduleInit().call().isEmpty()) {
      git.submoduleUpdate().setProgressMonitor(new GitProgressMonitor("String_Node_Str" + descriptor.remote,eventHandler)).call();
    }
  }
 catch (  InvalidRemoteException e) {
    throw new RepositoryFunctionException(new IOException("String_Node_Str" + e.getMessage()),Transience.PERSISTENT);
  }
catch (  RefNotFoundException|InvalidRefNameException e) {
    throw new RepositoryFunctionException(new IOException("String_Node_Str" + e.getMessage()),Transience.PERSISTENT);
  }
catch (  GitAPIException e) {
    StringBuilder errmsg=new StringBuilder();
    errmsg.append(e.getMessage());
    Throwable throwable=e;
    while (throwable.getCause() != null) {
      throwable=throwable.getCause();
      errmsg.append("String_Node_Str" + e.getMessage());
    }
    throw new RepositoryFunctionException(new IOException("String_Node_Str" + errmsg),Transience.PERSISTENT);
  }
catch (  JGitInternalException e) {
    throw new RepositoryFunctionException(new IOException(e.getMessage()),Transience.PERSISTENT);
  }
 finally {
    if (git != null) {
      git.close();
    }
  }
  return new HttpDownloadValue(descriptor.directory);
}