Program: 5496
Project: 5496
Buggy source:
/** 
 * Get information about the given artifact.
 * @param artifactId the artifact to get
 * @return information about the artifact
 * @throws ArtifactNotFoundException if the given artifact does not exist
 * @throws IOException if there was an exception reading the artifact information from the metastore
 */
public ArtifactDetail getArtifact(final Id.Artifact artifactId) throws ArtifactNotFoundException, IOException {
  try {
    final ArtifactData artifactData=Transactions.execute(transactional,new TxCallable<ArtifactData>(){
      @Override public ArtifactData call(      DatasetContext context) throws Exception {
        ArtifactCell artifactCell=new ArtifactCell(artifactId);
        byte[] value=getMetaTable(context).get(artifactCell.rowkey,artifactCell.column);
        if (value == null) {
          throw new ArtifactNotFoundException(artifactId.toEntityId());
        }
        return GSON.fromJson(Bytes.toString(value),ArtifactData.class);
      }
    }
);
    Location artifactLocation=impersonator.doAs(artifactId.getNamespace().toEntityId(),new Callable<Location>(){
      @Override public Location call() throws Exception {
        return Locations.getCompatibleLocation(locationFactory,artifactData.locationPath,artifactData.locationURI);
      }
    }
);
    return new ArtifactDetail(new ArtifactDescriptor(artifactId.toArtifactId(),artifactLocation),artifactData.meta);
  }
 catch (  TransactionFailureException e) {
    throw Transactions.propagate(e,IOException.class,ArtifactNotFoundException.class);
  }
catch (  Exception e) {
    throw Throwables.propagate(e);
  }
}

Fixed version (ground truth):
/** 
 * Get information about the given artifact.
 * @param artifactId the artifact to get
 * @return information about the artifact
 * @throws ArtifactNotFoundException if the given artifact does not exist
 * @throws IOException if there was an exception reading the artifact information from the metastore
 */
public ArtifactDetail getArtifact(final Id.Artifact artifactId) throws ArtifactNotFoundException, IOException {
  try {
    final ArtifactData artifactData=Transactions.execute(transactional,new TxCallable<ArtifactData>(){
      @Override public ArtifactData call(      DatasetContext context) throws Exception {
        ArtifactCell artifactCell=new ArtifactCell(artifactId);
        byte[] value=getMetaTable(context).get(artifactCell.rowkey,artifactCell.column);
        if (value == null) {
          throw new ArtifactNotFoundException(artifactId.toEntityId());
        }
        return GSON.fromJson(Bytes.toString(value),ArtifactData.class);
      }
    }
);
    Location artifactLocation=impersonator.doAs(artifactId.getNamespace().toEntityId(),new Callable<Location>(){
      @Override public Location call() throws Exception {
        return Locations.getLocationFromAbsolutePath(locationFactory,artifactData.getLocationPath());
      }
    }
);
    return new ArtifactDetail(new ArtifactDescriptor(artifactId.toArtifactId(),artifactLocation),artifactData.meta);
  }
 catch (  TransactionFailureException e) {
    throw Transactions.propagate(e,IOException.class,ArtifactNotFoundException.class);
  }
catch (  Exception e) {
    throw Throwables.propagate(e);
  }
}