<commit_before>package com.dubovyk.bookmanager.Entities;

import org.hibernate.annotations.*;
import org.hibernate.annotations.CascadeType;

import javax.persistence.*;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * This is a class for representing
 * a Book table in the database. It stores such basic
 * information as a name and an author of the book.
 *
 * @author <NAME> aka knidarkness
 * @version 1.0
 */
@Entity
@Table(name = "Book")
public class Book {
    @Id
    @GeneratedValue(generator = "increment")
    @GenericGenerator(name = "increment", strategy = "increment")
    @Column(name = "book_id")
    private Long id;

    @Column(name = "book_name", length = 250, nullable = false)
    private String Name;

    @ManyToOne
    @Cascade(value = CascadeType.ALL)
    @JoinColumn(name ="author_id")
    private Author author;

    public Book(){}

    public Book(String name, Author author) {
        Name = name;
        this.author = author;
    }

    @Override
    public String toString(){
        return "\"" + getName() + "\" by " + getAuthor();
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return Name;
    }

    public void setName(String name) {
        Name = name;
    }

    public Author getAuthor() {
        return this.author;
    }

    public void setAuthor(Author author) {
        this.author = author;
    }
}
<commit_msg>changed toString()  (added authors name)<commit_after>package com.dubovyk.bookmanager.Entities;

import org.hibernate.annotations.*;
import org.hibernate.annotations.CascadeType;

import javax.persistence.*;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * This is a class for representing
 * a Book table in the database. It stores such basic
 * information as a name and an author of the book.
 *
 * @author <NAME> aka knidarkness
 * @version 1.0
 */
@Entity
@Table(name = "Book")
public class Book {
    @Id
    @GeneratedValue(generator = "increment")
    @GenericGenerator(name = "increment", strategy = "increment")
    @Column(name = "book_id")
    private Long id;

    @Column(name = "book_name", unique = true, length = 250, nullable = false)
    private String Name;

    @ManyToOne
    @Cascade(value = CascadeType.ALL)
    @JoinColumn(name ="author_id")
    private Author author;

    public Book(){}

    public Book(String name, Author author) {
        Name = name;
        this.author = author;
    }

    @Override
    public String toString(){
        return "\"" + getName() + "\" by " + getAuthor().getName();
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return Name;
    }

    public void setName(String name) {
        Name = name;
    }

    public Author getAuthor() {
        return this.author;
    }

    public void setAuthor(Author author) {
        this.author = author;
    }
}

{'fraction_non_alphanumeric': 0.11581364829396325, 'fraction_numerical': 0.0032808398950131233, 'mean_word_length': 2.6558752997601918, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7147389', 'n_tokens_mistral': 941, 'n_tokens_neox': 910, 'n_words': 268}