[Demonstration 1]

[Buggy Method]
@Override
public void onNetworkResponse(Connection connection, Response response, Span span) {
    if (response.isRedirect()) {
        Map<String, Object> redirectLogs = new HashMap<>(4);
        redirectLogs.put("event", "redirect");
        redirectLogs.put(Tags.PEER_HOSTNAME.getKey(), connection.socket().getInetAddress().getHostName());
        redirectLogs.put(Tags.PEER_PORT.getKey(), (short) connection.socket().getPort());
        if (connection.socket().getInetAddress() instanceof Inet4Address) {
            byte[] address = connection.socket().getInetAddress().getAddress();
            redirectLogs.put(Tags.PEER_HOST_IPV4.getKey(), ByteBuffer.wrap(address).getInt());
        } else {
            redirectLogs.put(Tags.PEER_HOST_IPV6.getKey(), connection.socket().getInetAddress().getHostAddress());
        }
        span.log(redirectLogs);
    } else {
        Tags.PEER_HOSTNAME.set(span, connection.socket().getInetAddress().getHostName());
        Tags.PEER_PORT.set(span, (short) connection.socket().getPort());
        if (connection.socket().getInetAddress() instanceof Inet4Address) {
            byte[] address = connection.socket().getInetAddress().getAddress();
            Tags.PEER_HOST_IPV4.set(span, ByteBuffer.wrap(address).getInt());
        } else {
            Tags.PEER_HOST_IPV6.set(span, connection.socket().getInetAddress().toString());
        }
    }
}

[Buggy Hunk]
Tags.PEER_PORT.set(span, (short) connection.socket().getPort());

[Patch]
Tags.PEER_PORT.set(span, connection.socket().getPort());

[Demonstration 2]

[Buggy Method]
@Override
public void run() {
    JedisHelper.subscribe(pubsub, NEWS_SHARE_CHANNEL);
    countDownLatch.countDown();
}

[Buggy Hunk]
JedisHelper.subscribe(pubsub, NEWS_SHARE_CHANNEL);

[Patch]
JedisHelper.publishMsg(NEWS_SHARE_CHANNEL, "stop");

[Demonstration 3]

[Buggy Method]
private void assertFirstRouteMapData(RouteMapData routeMapData) {
    List<PolylineData> polylineDataList = routeMapData.getPolylineDataList();
    PolylineData polylineData = polylineDataList.get(0);
    assertThat(polylineDataList.size(), is(2));
    assertThat(polylineData.getEncodedValue(), is("uvr_I{yxpABuAFcAp@yHvAwNr@iGPwAh@a@jAg@"));
    assertThat(polylineData.getColor(), is("#b1becc"));
    assertThat(routeMapData.getStartPoint().getName(), is("Unknown address"));
    assertThat(routeMapData.getStartPoint().getLatitude(), is(52.530227));
    assertThat(routeMapData.getStartPoint().getLongitude(), is(13.403356));
    assertThat(routeMapData.getEndPoint().getName(), is("S+U Potsdamer Platz"));
    assertThat(routeMapData.getEndPoint().getLatitude(), is(52.509067));
    assertThat(routeMapData.getEndPoint().getLongitude(), is(13.37798));
}

[Buggy Hunk]
assertThat(polylineData.getColor(), is("#b1becc"));

[Patch]
assertThat(polylineData.getColor(), is(Color.parseColor("#b1becc")));