[Demonstration 1]

[Buggy Method]
public final void setIsInitialWeight(final String isInWeight) {
    this.isInitialWeight = isInWeight != null && "y".equals(isInWeight);
}

[Buggy Hunk]
public final void setIsInitialWeight(final String isInWeight) {

[Patch]
public void setIsInitialWeight(final String isInWeight) {

[Demonstration 2]

[Buggy Method]
@Test
public void testImport() throws IOException, RDFParseException, RDFHandlerException {
    InputStream in = this.getClass().getResourceAsStream(TEST_FILE);
    Assume.assumeNotNull(in);
    String base = buildDatasetBaseUri(credentials, status.getOwner(), TEST_DATASET);
    final Model model = Rio.parse(in, base, TEST_FILE_FORMAT);
    Assert.assertTrue(redlink.importDataset(model, TEST_DATASET));
    final SPARQLResult triples = redlink.sparqlTupleQuery(QUERY_SELECT, TEST_DATASET);
    Assert.assertNotNull(triples);
    Assert.assertTrue(triples.size() >= TEST_FILE_TRIPLES);
    //TODO: more specific testing
}

[Buggy Hunk]
public void testImport() throws IOException, RDFParseException, RDFHandlerException {

[Patch]
public void testImport() throws IOException, RDFParseException, RDFHandlerException, URISyntaxException {

[Demonstration 3]

[Buggy Method]
public void sendMessage(byte type, BlueLinkOutputStream message) {
    if (message == null)
        return;
    try {
        byte[] header = new byte[MESSAGE_HEADER_SIZE];
        int contentLength = message.getSize();
        // conversion int/byte
        byte[] contentLengthTab = twoBytesConversionBuffer.putChar(0, (char) contentLength).array();
        header[0] = type;
        header[1] = contentLengthTab[0];
        header[2] = contentLengthTab[1];
        send(header, message.toByteArray());
    } catch (IOException e) {
        Log.e(BlueLink.TAG, "Send message IO Exception", e);
    }
}

[Buggy Hunk]
byte[] contentLengthTab = twoBytesConversionBuffer.putChar(0, (char) contentLength).array(); // conversion int/byte

[Patch]
byte[] contentLengthTab = sTwoBytesConversionBuffer.putChar(0, (char) contentLength).array(); // conversion int/byte