Program: 13042
Project: 13042
Buggy source:
/** 
 * Maps the base artifact model meta data (from the JCR node to the s-ramp artifact).
 * @param jcrNode
 * @param artifact
 * @throws DatatypeConfigurationException 
 * @throws RepositoryException 
 */
protected static void mapBaseArtifactMetaData(Node jcrNode,BaseArtifactType artifact) throws DatatypeConfigurationException, RepositoryException {
  artifact.setCreatedBy(getProperty(jcrNode,"String_Node_Str"));
  XMLGregorianCalendar createdTS;
  createdTS=DatatypeFactory.newInstance().newXMLGregorianCalendar(getProperty(jcrNode,"String_Node_Str"));
  artifact.setCreatedTimestamp(createdTS);
  artifact.setDescription(getProperty(jcrNode,"String_Node_Str"));
  artifact.setLastModifiedBy(getProperty(jcrNode,"String_Node_Str"));
  XMLGregorianCalendar modifiedTS=DatatypeFactory.newInstance().newXMLGregorianCalendar(getProperty(jcrNode,"String_Node_Str"));
  artifact.setLastModifiedTimestamp(modifiedTS);
  artifact.setName(getProperty(jcrNode,"String_Node_Str"));
  artifact.setUuid(getProperty(jcrNode,"String_Node_Str"));
  artifact.setVersion(getProperty(jcrNode,"String_Node_Str"));
  String srampPropsPrefix=JCRConstants.SRAMP_PROPERTIES + "String_Node_Str";
  PropertyIterator properties=jcrNode.getProperties();
  while (properties.hasNext()) {
    Property property=properties.nextProperty();
    String propQName=property.getName();
    if (propQName.startsWith(srampPropsPrefix)) {
      String propName=propQName.substring(7);
      String propValue=property.getValue().getString();
      org.s_ramp.xmlns._2010.s_ramp.Property srampProp=new org.s_ramp.xmlns._2010.s_ramp.Property();
      srampProp.setPropertyName(propName);
      srampProp.setPropertyValue(propValue);
      artifact.getProperty().add(srampProp);
    }
  }
}

Fixed version (ground truth):
/** 
 * Maps the base artifact model meta data (from the JCR node to the s-ramp artifact).
 * @param jcrNode
 * @param artifact
 * @throws DatatypeConfigurationException 
 * @throws RepositoryException 
 */
protected static void mapBaseArtifactMetaData(Node jcrNode,BaseArtifactType artifact) throws DatatypeConfigurationException, RepositoryException {
  artifact.setCreatedBy(getProperty(jcrNode,"String_Node_Str"));
  XMLGregorianCalendar createdTS;
  createdTS=DatatypeFactory.newInstance().newXMLGregorianCalendar(getProperty(jcrNode,"String_Node_Str"));
  artifact.setCreatedTimestamp(createdTS);
  artifact.setDescription(getProperty(jcrNode,"String_Node_Str"));
  artifact.setLastModifiedBy(getProperty(jcrNode,"String_Node_Str"));
  XMLGregorianCalendar modifiedTS=DatatypeFactory.newInstance().newXMLGregorianCalendar(getProperty(jcrNode,"String_Node_Str"));
  artifact.setLastModifiedTimestamp(modifiedTS);
  artifact.setName(getProperty(jcrNode,"String_Node_Str"));
  artifact.setUuid(getProperty(jcrNode,"String_Node_Str"));
  artifact.setVersion(getProperty(jcrNode,"String_Node_Str"));
  String srampPropsPrefix=JCRConstants.SRAMP_PROPERTIES + "String_Node_Str";
  int srampPropsPrefixLen=srampPropsPrefix.length();
  PropertyIterator properties=jcrNode.getProperties();
  while (properties.hasNext()) {
    Property property=properties.nextProperty();
    String propQName=property.getName();
    if (propQName.startsWith(srampPropsPrefix)) {
      String propName=propQName.substring(srampPropsPrefixLen);
      String propValue=property.getValue().getString();
      org.s_ramp.xmlns._2010.s_ramp.Property srampProp=new org.s_ramp.xmlns._2010.s_ramp.Property();
      srampProp.setPropertyName(propName);
      srampProp.setPropertyValue(propValue);
      artifact.getProperty().add(srampProp);
    }
  }
}