<commit_before>package com.rollbar.payload.data.body;

import com.rollbar.testing.GetAndSet;
import com.rollbar.testing.TestThat;
import com.rollbar.utilities.ArgumentNullException;
import org.junit.Before;
import org.junit.Test;

import java.util.LinkedHashMap;
import java.util.Map;

import static org.junit.Assert.*;

/**
 * Created by chris on 11/25/15.
 */
public class FrameTest {
    Frame f;

    @Before
    public void setUp() throws Exception {
        f = new Frame("com.rollbar.payload.data.Frame.java");
    }

    @Test
    public void testFilename() throws Exception {
        TestThat.getAndSetWorks(f, "newfile.java", "{redacted}.java", new GetAndSet<Frame, String>() {
            public String get(Frame frame) {
                return frame.filename();
            }

            public Frame set(Frame frame, String val) {
                try {
                    return frame.filename(val);
                } catch (ArgumentNullException e) {
                    fail("Neither is null");
                    return null;
                }
            }
        });
    }

    @Test
    public void testLineNumber() throws Exception {
        TestThat.getAndSetWorks(f, 15, 20, new GetAndSet<Frame, Integer>() {
            public Integer get(Frame frame) {
                return frame.lineNumber();
            }

            public Frame set(Frame frame, Integer val) {
                return frame.lineNumber(val);<commit_msg>unused throws clause, makes var private<commit_after>package com.rollbar.payload.data.body;

import com.rollbar.testing.GetAndSet;
import com.rollbar.testing.TestThat;
import com.rollbar.utilities.ArgumentNullException;
import org.junit.Before;
import org.junit.Test;

import java.util.LinkedHashMap;
import java.util.Map;

import static org.junit.Assert.*;

/**
 * Created by chris on 11/25/15.
 */
public class FrameTest {
    private Frame f;

    @Before
    public void setUp() {
        f = new Frame("com.rollbar.payload.data.Frame.java");
    }

    @Test
    public void testFilename() throws Exception {
        TestThat.getAndSetWorks(f, "newfile.java", "{redacted}.java", new GetAndSet<Frame, String>() {
            public String get(Frame frame) {
                return frame.filename();
            }

            public Frame set(Frame frame, String val) {
                try {
                    return frame.filename(val);
                } catch (ArgumentNullException e) {
                    fail("Neither is null");
                    return null;
                }
            }
        });
    }

    @Test
    public void testLineNumber() throws Exception {
        TestThat.getAndSetWorks(f, 15, 20, new GetAndSet<Frame, Integer>() {
            public Integer get(Frame frame) {
                return frame.lineNumber();
            }

            public Frame set(Frame frame, Integer val) {
                return frame.lineNumber(val);
{'fraction_non_alphanumeric': 0.10366062264796443, 'fraction_numerical': 0.006842285323297981, 'mean_word_length': 2.011328527291452, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '535510', 'n_tokens_mistral': 828, 'n_tokens_neox': 778, 'n_words': 201}