[Demonstration 1]

[Buggy Method]
public Span[] sentPosDetect(String s) {
    List<Span> sentences = new ArrayList<Span>();
    int start = 0;
    for (int i = 0; i < s.length(); i++) {
        char c = s.charAt(i);
        if (c == '\n' || c == '\r') {
            if (start - i > 0) {
                Span span = new Span(start, i).trim(s);
                if (span.length() > 0) {
                    sentences.add(span);
                }
                start = i + 1;
            }
        }
    }
    if (s.length() - start > 0) {
        Span span = new Span(start, s.length()).trim(s);
        if (span.length() > 0) {
            sentences.add(span);
        }
    }
    return sentences.toArray(new Span[sentences.size()]);
}

[Buggy Hunk]
if (start - i > 0) {

[Patch]
if (i - start > 0) {

[Demonstration 2]

[Buggy Method]
@Override
public int hashCode() {
    return m_identifier.hashCode() ^ m_properties.hashCode() ^ m_value.hashCode();
}

[Buggy Hunk]
return m_identifier.hashCode() ^ m_properties.hashCode() ^ m_value.hashCode();

[Patch]
return m_value.hashCode();

[Demonstration 3]

[Buggy Method]
@PostConstruct
void postConstruct() {
    setSkin(createDefaultSkin());
    tokenProperty().addListener((observable, oldValue, newValue) -> initValues(newValue));
    translationTextProperty().addListener((observable, oldValue, newValue) -> setTokenTextInternal(newValue));
    selectedLocationProperty().addListener((observable, oldValue, newValue) -> {
        applicationState.setToken(getToken());
        applicationState.setLocation(newValue);
    });
    getStyleClass().add("border");
}

[Buggy Hunk]
translationTextProperty().addListener((observable, oldValue, newValue) -> setTokenTextInternal(newValue));

[Patch]
translationTextProperty().addListener((observable, oldValue, newValue) -> setTranslationTextInternal(newValue));