Program: 12984
Project: 12984
Buggy source:
/** 
 * @see org.overlord.sramp.ui.client.shared.services.IArtifactService#get(java.lang.String)
 */
@Override public ArtifactBean get(String uuid) throws SrampUiException {
  try {
    BaseArtifactType artifact=clientAccessor.getClient().getArtifactMetaData(uuid);
    ArtifactType artifactType=ArtifactType.valueOf(artifact);
    ArtifactBean bean=new ArtifactBean();
    bean.setModel(artifactType.getArtifactType().getModel());
    bean.setType(artifactType.getType());
    bean.setRawType(artifactType.getArtifactType().getType());
    bean.setUuid(artifact.getUuid());
    bean.setName(artifact.getName());
    bean.setDescription(artifact.getDescription());
    bean.setVersion(artifact.getVersion());
    bean.setCreatedBy(artifact.getCreatedBy());
    bean.setCreatedOn(artifact.getCreatedTimestamp().toGregorianCalendar().getTime());
    bean.setUpdatedOn(artifact.getLastModifiedTimestamp().toGregorianCalendar().getTime());
    bean.setUpdatedBy(artifact.getLastModifiedBy());
    bean.setDerived(artifactType.getArtifactType().isDerived());
    if (SrampModelUtils.isDocumentArtifact(artifact)) {
      DocumentArtifactType doc=(DocumentArtifactType)artifact;
      bean.setContentSize(doc.getContentSize());
      bean.setContentType(doc.getContentType());
      if (SrampModelUtils.isTextDocumentArtifact(doc)) {
        bean.setTextDocument(true);
      }
    }
    for (    Property property : artifact.getProperty()) {
      bean.setProperty(property.getPropertyName(),property.getPropertyValue());
    }
    bean.getClassifiedBy().addAll(artifact.getClassifiedBy());
    int numRelationships=artifact.getRelationship() == null ? 0 : artifact.getRelationship().size();
    bean.setNumRelationships(numRelationships);
    return bean;
  }
 catch (  SrampClientException e) {
    throw new SrampUiException(e.getMessage());
  }
catch (  SrampAtomException e) {
    throw new SrampUiException(e.getMessage());
  }
}

Fixed version (ground truth):
/** 
 * @see org.overlord.sramp.ui.client.shared.services.IArtifactService#get(java.lang.String)
 */
@Override public ArtifactBean get(String uuid) throws SrampUiException {
  try {
    BaseArtifactType artifact=clientAccessor.getClient().getArtifactMetaData(uuid);
    ArtifactType artifactType=ArtifactType.valueOf(artifact);
    ArtifactBean bean=new ArtifactBean();
    bean.setModel(artifactType.getArtifactType().getModel());
    bean.setType(artifactType.getType());
    bean.setRawType(artifactType.getArtifactType().getType());
    bean.setUuid(artifact.getUuid());
    bean.setName(artifact.getName());
    bean.setDescription(artifact.getDescription());
    bean.setVersion(artifact.getVersion());
    bean.setCreatedBy(artifact.getCreatedBy());
    bean.setCreatedOn(artifact.getCreatedTimestamp().toGregorianCalendar().getTime());
    bean.setUpdatedOn(artifact.getLastModifiedTimestamp().toGregorianCalendar().getTime());
    bean.setUpdatedBy(artifact.getLastModifiedBy());
    bean.setDerived(artifactType.isDerived());
    if (SrampModelUtils.isDocumentArtifact(artifact)) {
      DocumentArtifactType doc=(DocumentArtifactType)artifact;
      bean.setContentSize(doc.getContentSize());
      bean.setContentType(doc.getContentType());
      if (SrampModelUtils.isTextDocumentArtifact(doc)) {
        bean.setTextDocument(true);
      }
    }
    for (    Property property : artifact.getProperty()) {
      bean.setProperty(property.getPropertyName(),property.getPropertyValue());
    }
    bean.getClassifiedBy().addAll(artifact.getClassifiedBy());
    int numRelationships=artifact.getRelationship() == null ? 0 : artifact.getRelationship().size();
    bean.setNumRelationships(numRelationships);
    return bean;
  }
 catch (  SrampClientException e) {
    throw new SrampUiException(e.getMessage());
  }
catch (  SrampAtomException e) {
    throw new SrampUiException(e.getMessage());
  }
}