[Demonstration 1]

[Buggy Method]
@Test
public void getAllClaim() {
    int totalClaim = 11;
    assertEquals("Total all claim", totalClaim, connectDB.getAllClaim().size());
}

[Buggy Hunk]
assertEquals("Total all claim", totalClaim, connectDB.getAllClaim().size());

[Patch]
assertEquals("Total all claim", totalClaim, connectDB.getAllClaim(2017).size());

[Demonstration 2]

[Buggy Method]
public ArrayList<Claim> loadNotUserClaims(User user) {
    ArrayList<Claim> claims = new ArrayList<Claim>();
    SharedPreferences claimCounterFile = this.context.getSharedPreferences("claimCounter", 0);
    int mostRecentClaimId = claimCounterFile.getInt("claimCount", 0);
    Claim claim;
    User currentUser;
    int currentUserId;
    int actualUserId = user.getId();
    for (int i = 1; i <= mostRecentClaimId; i++) {
        claim = new Claim(i);
        currentUser = claim.getUser();
        if (currentUser != null) {
            currentUserId = currentUser.getId();
            // Checks to make sure the Claim does NOT belong to the Actual
            // user and that the claims have a submitted status
            if ((claim.getId() != -1) && (actualUserId != currentUserId) && (claim.getStatus() == Constants.statusSubmitted)) {
                claims.add(claim);
            }
        }
    }
    return claims;
}

[Buggy Hunk]
(claim.getStatus() == Constants.statusSubmitted)){

[Patch]
(claim.getStatus().equals(Constants.statusSubmitted))){

[Demonstration 3]

[Buggy Method]
@Test
public void simulatedRemoteSystemTest() {
    new TestKit(testSystem) {

        {
            try {
                SystemManager.createSystem("LocalSystem", Option.apply(Inet4Address.getLocalHost().getHostAddress()), Option.apply(AkkaSettings.GUISystemPort()));
                ActorRef localActor = SystemManager.createActor(Props.create(TestActor.class), "localActor");
                String confText = "{\"akka\":{\"actor\":{\"provider\":\"akka.remote.RemoteActorRefProvider\"}," + "\"loglevel\":\"INFO\",\"remote\":{\"enabled-transports\":[\"akka.remote.netty.tcp\"]" + ",\"log-received-messages\":\"on\",\"log-sent-messages\":\"on\"" + ",\"netty\":{\"tcp\":{\"hostname\":\"" + Inet4Address.getLocalHost().getHostAddress() + "\",\"port\":" + AkkaSettings.ComputeSystemPort() + "}}}}}";
                Config customConf = ConfigFactory.parseString(confText);
                ActorSystem remoteSystem = ActorSystem.create("RemoteSystem", customConf);
                remoteSystem.actorOf(Props.create(TestActor.class), "remoteActor");
                SystemManager.setIPForRemoting(Inet4Address.getLocalHost().getHostAddress());
                ActorSelection remoteActor = SystemManager.getRemoteActor("RemoteSystem", "/user/", "remoteActor");
                TestKit probe = new TestKit(testSystem);
                localActor.tell(probe.getRef(), getRef());
                expectMsg("done");
                within(duration("3 seconds"), () -> {
                    remoteActor.tell(startMsg, localActor);
                    probe.expectMsg(mapMsg);
                    return null;
                });
            } catch (UnknownHostException e) {
                e.printStackTrace();
            }
        }
    };
}

[Buggy Hunk]
SystemManager.setIPForRemoting(Inet4Address.getLocalHost().getHostAddress());

[Patch]
SystemManager.setIPForRemoting(Inet4Address.getLocalHost().getHostAddress(), AkkaSettings.ComputeSystemPort());