Program: 12489
Project: 12489
Buggy source:
/** 
 * This copy constructor creates a new Identified instance and copies all of its fields.
 * @param identified the identified instance to be copied
 * @throws SBOLValidationException if an SBOL validation rule violation occurred in any of the followingmethods: <ul> <li> {@link #setIdentity(URI)},</li> <li>  {@link #setAnnotations(List)},</li> <li>  {@link #setDisplayId(String)},</li> <li>  {@link #setVersion(String)}, or </li> <li>  {@link #setWasDerivedFrom(URI)}.</li> </ul>
 */
Identified(Identified identified) throws SBOLValidationException {
  this.setIdentity(identified.getIdentity());
  this.annotations=new ArrayList<>();
  if (identified.hasAnnotations()) {
    List<Annotation> clonedAnnotations=new ArrayList<>();
    for (    Annotation annotation : identified.getAnnotations()) {
      clonedAnnotations.add(annotation.copy());
    }
    this.setAnnotations(clonedAnnotations);
  }
  if (identified.isSetDisplayId()) {
    this.setDisplayId(identified.getDisplayId());
  }
  if (identified.isSetVersion()) {
    this.setVersion(identified.getVersion());
  }
  if (identified.isSetPersistentIdentity()) {
    this.setPersistentIdentity(URI.create(identified.getPersistentIdentity().toString()));
  }
  if (identified.isSetWasDerivedFrom()) {
    this.setWasDerivedFrom(URI.create(identified.getWasDerivedFrom().toString()));
  }
  if (identified.isSetName()) {
    this.setName(identified.getName());
  }
  if (identified.isSetDescription()) {
    this.setDescription(identified.getDescription());
  }
}

Fixed version (ground truth):
/** 
 * This copy constructor creates a new Identified instance and copies all of its fields.
 * @param identified the identified instance to be copied
 * @throws SBOLValidationException if an SBOL validation rule violation occurred in any of the followingmethods: <ul> <li> {@link #setIdentity(URI)},</li> <li>  {@link #setAnnotations(List)},</li> <li>  {@link #setDisplayId(String)},</li> <li>  {@link #setVersion(String)}, or </li> <li>  {@link #setWasDerivedFrom(URI)}.</li> </ul>
 */
Identified(Identified identified) throws SBOLValidationException {
  this.setIdentity(identified.getIdentity());
  this.wasDerivedFroms=new HashSet<URI>();
  this.annotations=new ArrayList<>();
  if (identified.hasAnnotations()) {
    List<Annotation> clonedAnnotations=new ArrayList<>();
    for (    Annotation annotation : identified.getAnnotations()) {
      clonedAnnotations.add(annotation.copy());
    }
    this.setAnnotations(clonedAnnotations);
  }
  if (identified.isSetDisplayId()) {
    this.setDisplayId(identified.getDisplayId());
  }
  if (identified.isSetVersion()) {
    this.setVersion(identified.getVersion());
  }
  if (identified.isSetPersistentIdentity()) {
    this.setPersistentIdentity(URI.create(identified.getPersistentIdentity().toString()));
  }
  for (  URI wasDerivedFrom : identified.getWasDerivedFroms()) {
    this.addWasDerivedFrom(URI.create(wasDerivedFrom.toString()));
  }
  if (identified.isSetWasDerivedFrom()) {
    this.setWasDerivedFrom(URI.create(identified.getWasDerivedFrom().toString()));
  }
  if (identified.isSetName()) {
    this.setName(identified.getName());
  }
  if (identified.isSetDescription()) {
    this.setDescription(identified.getDescription());
  }
}