<commit_before>package jbehave.example.stack;

import java.util.Stack;

import org.jbehave.core.annotations.Given;
import org.jbehave.core.annotations.Then;
import org.jbehave.core.annotations.When;
import org.jbehave.core.steps.Steps;
import org.junit.Assert;

public class StackSteps extends Steps {

    private Stack<String> stackUnderTest;
    private String searchElement;

    @Given("sei ein leerer Stack.")
    public void anEmptyStack() {
        this.stackUnderTest = new Stack<String>();
    }

    @When("das Wort $element hinzugefügt wird")
    public void anElementIsAdded(final String element) {
        this.stackUnderTest.push(element);
    }

    @When("das oberste Element vom Stack entfernt wird")
    public void removeLastElement() {
        this.stackUnderTest.pop();
    }

    @When("das Wort $element gesucht wird")
    public void searchForElement(final String element) {
        this.searchElement = element;
    }

    @Then("liegt das Wort $word ganz oben auf dem Stack.")
    public void theResultingElementShouldBe(final String word) {
        Assert.assertEquals(this.stackUnderTest.search(word), 1);
    }

    @Then("ist die erwartete Position $pos.")
    public void thePositionReturnedShouldBe(final int pos) {
        Assert.assertEquals(this.stackUnderTest.search(this.searchElement), pos);
    }
}<commit_msg>exchange detected value and target values<commit_after>package jbehave.example.stack;

import java.util.Stack;

import org.jbehave.core.annotations.Given;
import org.jbehave.core.annotations.Then;
import org.jbehave.core.annotations.When;
import org.jbehave.core.steps.Steps;
import org.junit.Assert;

public class StackSteps extends Steps {

    private Stack<String> stackUnderTest;
    private String searchElement;

    @Given("sei ein leerer Stack.")
    public void anEmptyStack() {
        this.stackUnderTest = new Stack<String>();
    }

    @When("das Wort $element hinzugefügt wird")
    public void anElementIsAdded(final String element) {
        this.stackUnderTest.push(element);
    }

    @When("das oberste Element vom Stack entfernt wird")
    public void removeLastElement() {
        this.stackUnderTest.pop();
    }

    @When("das Wort $element gesucht wird")
    public void searchForElement(final String element) {
        this.searchElement = element;
    }

    @Then("liegt das Wort $word ganz oben auf dem Stack.")
    public void theResultingElementShouldBe(final String word) {
        Assert.assertEquals(1, this.stackUnderTest.search(word));
    }

    @Then("ist die erwartete Position $pos.")
    public void thePositionReturnedShouldBe(final int pos) {
        Assert.assertEquals(pos, this.stackUnderTest.search(this.searchElement));
    }
}
{'fraction_non_alphanumeric': 0.10117302052785923, 'fraction_numerical': 0.0007331378299120235, 'mean_word_length': 3.689003436426117, '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': '4621661', 'n_tokens_mistral': 820, 'n_tokens_neox': 796, 'n_words': 199}