<commit_before><form [formGroup]="quizForm" novalidate class="quizForm" (submit)="save(quizForm.value)">
    <md-card>
        <md-card-title>Create a new Quiz</md-card-title>
        <md-card-content>
            <md-input placeholder="Quiz name" formControlName="name" class="full-width">
                <md-hint *ngIf="!quizForm.controls.name.valid">
                    Quiz name is required (minimum 4 characters).
                </md-hint>
            </md-input>

            <!-- Questions -->
            <h3>Questions</h3>
            <div formArrayName="questions">
                <div *ngFor="let question of quizForm.controls.questions.controls; let i=index" class="question">
                    <div [formGroupName]="i">
                        <md-input placeholder="Question" formControlName="question" class="full-width"></md-input>
                        <div formArrayName="answers">
                            <div class="answer" *ngFor="let answer of question.controls.answers.controls; let j=index">
                                <div [formGroupName]="j">
                                    <md-input placeholder="Answer {{j + 1}}" formControlName="answer"></md-input>
                                    <md-checkbox formControlName="right">is correct</md-checkbox>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </md-card-content>
        <md-card-actions>
            <button type="submit" md-button [disabled]="!quizForm.valid">Save</button>
            <button md-button (click)="addQuestion()">Add Question</button>
        </md-card-actions>
    </md-card>
</form><commit_msg>hotfix for duplicated questions<commit_after><form [formGroup]="quizForm" novalidate class="quizForm">
    <md-card>
        <md-card-title>Create a new Quiz</md-card-title>
        <md-card-content>
            <md-input placeholder="Quiz name" formControlName="name" class="full-width">
                <md-hint *ngIf="!quizForm.controls.name.valid">
                    Quiz name is required (minimum 4 characters).
                </md-hint>
            </md-input>

            <!-- Questions -->
            <h3>Questions</h3>
            <div formArrayName="questions">
                <div *ngFor="let question of quizForm.controls.questions.controls; let i=index" class="question">
                    <div [formGroupName]="i">
                        <md-input placeholder="Question" formControlName="question" class="full-width"></md-input>
                        <div formArrayName="answers">
                            <div class="answer" *ngFor="let answer of question.controls.answers.controls; let j=index">
                                <div [formGroupName]="j">
                                    <md-input placeholder="Answer {{j + 1}}" formControlName="answer"></md-input>
                                    <md-checkbox formControlName="right">is correct</md-checkbox>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </md-card-content>
        <md-card-actions>
            <button type="submit" md-button [disabled]="!quizForm.valid" (click)="save(quizForm.value)">Save</button>
            <button md-button (click)="addQuestion()">Add Question</button>
        </md-card-actions>
    </md-card>
</form>
{'fraction_non_alphanumeric': 0.14167852062588904, 'fraction_numerical': 0.002275960170697013, 'mean_word_length': 1.5701754385964912, 'pattern_counts': {'":': 0, '<': 81, '<?xml version=': 0, '>': 81, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6958137', 'n_tokens_mistral': 967, 'n_tokens_neox': 907, 'n_words': 170}