Buggy code:
@ Entity @ Table ( name = "person" ) @ XmlRootElement @ NamedQueries ( { @ NamedQuery ( name = "Person.findAll" , query = "SELECT<seq2seq4repair_space>p<seq2seq4repair_space>FROM<seq2seq4repair_space>Person<seq2seq4repair_space>p" ) , @ NamedQuery ( name = "Person.findByPersonId" , query = "SELECT<seq2seq4repair_space>p<seq2seq4repair_space>FROM<seq2seq4repair_space>Person<seq2seq4repair_space>p<seq2seq4repair_space>WHERE<seq2seq4repair_space>p.personId<seq2seq4repair_space>=<seq2seq4repair_space>:personId" ) , @ NamedQuery ( name = "Person.findByName" , query = "SELECT<seq2seq4repair_space>p<seq2seq4repair_space>FROM<seq2seq4repair_space>Person<seq2seq4repair_space>p<seq2seq4repair_space>WHERE<seq2seq4repair_space>p.name<seq2seq4repair_space>=<seq2seq4repair_space>:name" ) , @ NamedQuery ( name = "Person.findBySurname" , query = "SELECT<seq2seq4repair_space>p<seq2seq4repair_space>FROM<seq2seq4repair_space>Person<seq2seq4repair_space>p<seq2seq4repair_space>WHERE<seq2seq4repair_space>p.surname<seq2seq4repair_space>=<seq2seq4repair_space>:surname" ) , @ NamedQuery ( name = "Person.findBySsn" , query = "SELECT<seq2seq4repair_space>p<seq2seq4repair_space>FROM<seq2seq4repair_space>Person<seq2seq4repair_space>p<seq2seq4repair_space>WHERE<seq2seq4repair_space>p.ssn<seq2seq4repair_space>=<seq2seq4repair_space>:ssn" ) , @ NamedQuery ( name = "Person.findByEmail" , query = "SELECT<seq2seq4repair_space>p<seq2seq4repair_space>FROM<seq2seq4repair_space>Person<seq2seq4repair_space>p<seq2seq4repair_space>WHERE<seq2seq4repair_space>p.email<seq2seq4repair_space>=<seq2seq4repair_space>:email" ) , @ NamedQuery ( name = "Person.findByPassword" , query = "SELECT<seq2seq4repair_space>p<seq2seq4repair_space>FROM<seq2seq4repair_space>Person<seq2seq4repair_space>p<seq2seq4repair_space>WHERE<seq2seq4repair_space>p.password<seq2seq4repair_space>=<seq2seq4repair_space>:password" ) , @ NamedQuery ( name = "Person.findByUsername" , query = "SELECT<seq2seq4repair_space>p<seq2seq4repair_space>FROM<seq2seq4repair_space>Person<seq2seq4repair_space>p<seq2seq4repair_space>WHERE<seq2seq4repair_space>p.username<seq2seq4repair_space>=<seq2seq4repair_space>:username" ) } ) public class Person implements Serializable { private static final long serialVersionUID = 1L ; @ Id @ Basic ( optional = false ) @ NotNull @ Column ( name = "person_id" ) private Long personId ; @ Size ( max = 255 ) @ Column ( name = "name" ) private String name ; @ Size ( max = 255 ) @ Column ( name = "surname" ) private String surname ; @ Size ( max = 255 ) @ Column ( name = "ssn" ) private String ssn ; @ Size ( max = 255 ) @ Column ( name = "email" ) private String email ; @ Size ( max = 255 ) @ Column ( name = "password" ) private String password ; @ Size ( max = 255 ) @ Column ( name = "username" ) private String username ; @ JoinColumn ( name = "person_id" , referencedColumnName = "role_id" , insertable = false , updatable = false ) @ OneToOne ( optional = false ) private Role role ; @ JoinColumn ( name = "role_id" , referencedColumnName = "role_id" ) @ ManyToOne private Role roleId ; @ OneToMany ( mappedBy = "personId" ) private Collection < CompetenceProfile > competenceProfileCollection ; public Person ( ) { } public Person ( Long personId ) { } public Long getPersonId ( ) { } public void setPersonId ( Long personId ) { } public String getName ( ) { } public void setName ( String name ) { } public String getSurname ( ) { } public void setSurname ( String surname ) { } public String getSsn ( ) { } public void setSsn ( String ssn ) { } public String getEmail ( ) { } public void setEmail ( String email ) { } public String getPassword ( ) { } public void setPassword ( String password ) { } public String getUsername ( ) { } public void setUsername ( String username ) { } public Role getRole ( ) { } public void setRole ( Role role ) { } public Role getRoleId ( ) { } public void setRoleId ( Role roleId ) { } @ XmlTransient public Collection < CompetenceProfile > getCompetenceProfileCollection ( ) { } public void setCompetenceProfileCollection ( Collection < CompetenceProfile > competenceProfileCollection ) { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object object ) { } @ Override public String toString ( ) { <START_BUG> return ( "se.kth.Person[<seq2seq4repair_space>personId=" + ( personId ) ) + "<seq2seq4repair_space>]" ; <END_BUG> } }

Fix:
return ( "se.kth.model.Person[<seq2seq4repair_space>personId=" + ( personId ) ) + "<seq2seq4repair_space>]" ;