<commit_before>package com.naughtyzombie.fib;

/**
 * Created by pram on 22/06/2015.
 */
public class FibonnaciLoop {
    public static void main(String[] args) {
        int n = 25, first = 0, second = 1, next, i;
        System.out.println("Printing first " + n + " numbers in Fibonacci Series \n");
        calc(n, first, second);
    }

    private static void calc(int n, int first, int second) {
        int i;
        int next;
        for (i = 0; i < n; i++) {
            if (i <= 1)
                next = i;
            else {
                next = first + second;
                first = second;
                second = next;
            }
            System.out.print(next + "\t");
        }
    }
}<commit_msg>Update FibonnaciLoop.java<commit_after>package com.naughtyzombie.fib;

/**
 * Created by pram on 22/06/2015.
 */
public class FibonnaciLoop {
    public static void main(String[] args) {
        int n = 25, first = 0, second = 1, next, i;
        System.out.println("Printing first " + n + " numbers in Fibonacci Series \n");
        calc(n, first, second);
    }

    private static void calc(int n, int first, int second) {
        int i;
        int next;
        for (i = 0; i < n; i++) {
            if (i <= 1)
                next = i;
            else {
                next = first + second;
                first = second;
                second = next;
            }
            System.out.print(next + "\t");
        }
    }
    
    //This implementation works in all cases
    public int getFib(int nthNum) {
        int next = 0;
        int first = 0;
        int second = 1;

        if (nthNum < 2) {
            next = nthNum;
        } else {
            for (int i = 2; i <= nthNum; i++) {
                next = first + second;
                first = second;
                second = next;
            }
        }
        
        return next;
    }
}
{'fraction_non_alphanumeric': 0.1163157894736842, 'fraction_numerical': 0.017368421052631578, 'mean_word_length': 1.2958937198067633, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 3, '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': '4888470', 'n_tokens_mistral': 622, 'n_tokens_neox': 568, 'n_words': 180}