<commit_before>{% for attribute in entity.attributes -%}
  {%- if attribute.realm_read_only.size == 0 -%}
      {%- comment %} ******* CONVERT TYPE CAPTURE ******* {% endcomment -%}
      {%- capture convert_type -%}
        {%- if attribute.realm_read_only.size == 0 and attribute.enum_type.size > 0 -%}
          String
        {%- else -%}
          {%- if params.use_wrappers == "true" and attribute.optional == true -%}
            {%- include 'inc/wrapper_type_converter' -%}
          {%- else -%}
            {%- include 'inc/type_converter' -%}
          {%- endif -%}
        {%- endif -%}
      {%- endcapture -%}

      {%- capture default_value %}
        {%- if attribute.default.size > 0 %} =
          {%- if convert_type == "boolean" %}
            {%- if attribute.default == "YES" %} true
            {%- else %} false
            {%- endif %}
          {%- elsif convert_type == "String" %} "{{ attribute.default }}"
          {%- else %} {{ attribute.default }}
          {%- endif %}
        {%- endif %}
      {%- endcapture %}

      {%- assign name = attribute.name -%}
      {%- if name == primary_key %}
    @PrimaryKey
      {%- endif -%}
      {%- if attribute.indexed == true %}
    @Index
      {%- endif -%}
      {%- if attribute.realm_ignored == true %}
    @Ignore
      {%- endif -%}
      {%- if attribute.json_key_path.size > 0 %}
    @SerializedName("{{ attribute.json_key_path }}")
      {%- endif -%}
      {%- if params.support_annotations.size > 0 and attribute.support_annotation.size > 0 %}
    @android.support.annotation.{{ attribute.support_annotation }}
      {%- endif %}
    private {{ convert_type }} {{ name }}{{ default_value }};
  {%- endif -%}
{%- endfor -%}<commit_msg>Add @Required Realm attribute in Java template<commit_after>{% for attribute in entity.attributes -%}
  {%- if attribute.realm_read_only.size == 0 -%}
      {%- comment %} ******* CONVERT TYPE CAPTURE ******* {% endcomment -%}
      {%- capture convert_type -%}
        {%- if attribute.realm_read_only.size == 0 and attribute.enum_type.size > 0 -%}
          String
        {%- else -%}
          {%- if params.use_wrappers == "true" and attribute.optional == true -%}
            {%- include 'inc/wrapper_type_converter' -%}
          {%- else -%}
            {%- include 'inc/type_converter' -%}
          {%- endif -%}
        {%- endif -%}
      {%- endcapture -%}

      {%- capture default_value %}
        {%- if attribute.default.size > 0 %} =
          {%- if convert_type == "boolean" %}
            {%- if attribute.default == "YES" %} true
            {%- else %} false
            {%- endif %}
          {%- elsif convert_type == "String" %} "{{ attribute.default }}"
          {%- else %} {{ attribute.default }}
          {%- endif %}
        {%- endif %}
      {%- endcapture %}

      {%- capture isPrimitives %}
        {%- include 'inc/primitives' %}
      {%- endcapture %}

      {%- assign name = attribute.name -%}
      {%- if name == primary_key %}
    @PrimaryKey
      {%- endif -%}
      {%- if attribute.optional == false and attribute.realm_ignored == false and name != primary_key and isPrimitives == "false" %}
    @Required 
      {%- endif -%}
      {%- if attribute.indexed == true %}
    @Index
      {%- endif -%}
      {%- if attribute.realm_ignored == true %}
    @Ignore
      {%- endif -%}
      {%- if attribute.json_key_path.size > 0 %}
    @SerializedName("{{ attribute.json_key_path }}")
      {%- endif -%}
      {%- if params.support_annotations.size > 0 and attribute.support_annotation.size > 0 %}
    @android.support.annotation.{{ attribute.support_annotation }}
      {%- endif %}
    private {{ convert_type }} {{ name }}{{ default_value }};
  {%- endif -%}
{%- endfor -%}
{'fraction_non_alphanumeric': 0.18949893390191896, 'fraction_numerical': 0.0037313432835820895, 'mean_word_length': 1.9343236903831118, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '7656327', 'n_tokens_mistral': 1313, 'n_tokens_neox': 1142, 'n_words': 225}