[Demonstration 2]

[Buggy Method]
@Override
public void perform(final Map map, final Entity entity) {
    if (entity instanceof Creature == false) {
        return;
    }
    final Tile[][] tiles = map.getTiles();
    final Creature creature = (Creature) entity;
    if (tiles[creature.getX()][creature.getY()].isSolid()) {
        return;
    }
    creature.getLineOfSight().move(dx, dy);
    if (entity instanceof Player) {
        // Set all tiles to non-visible:
        // todo Update to only reset tiles at the player's last position.
        for (int x = 0; x < tiles.length; x++) {
            for (int y = 0; y < tiles[x].length; y++) {
                if (tiles[x][y].isVisible()) {
                    tiles[x][y].setVisible(false);
                    tiles[x][y].placeOnScreen(screen, x, y);
                }
            }
        }
        // Set visible tiles:
        final LineOfSight los = creature.getLineOfSight();
        los.getLinePoints().forEach(line -> {
            for (final Point point : line) {
                final Tile tile = tiles[point.x][point.y];
                tile.setVisible(true);
                tile.setVisited(true);
                tile.placeOnScreen(screen, point.x, point.y);
                if (tile.isSolid()) {
                    break;
                }
            }
        });
    }
}

[Buggy Hunk]
if (tiles[creature.getX()][creature.getY()].isSolid()) {

[Patch]
if (tiles[creature.getX() + dx][creature.getY() + dy].isSolid()) {

[Demonstration 3]

[Buggy Method]
@Test
public void should_return_deploymentconfig() throws CoreException {
    // given
    // when
    IDeploymentConfig deploymentConfig = OpenShiftServerUtils.getReplicationController(server);
    // then
    assertThat(deploymentConfig).isEqualTo(ResourceMocks.PROJECT2_DEPLOYMENTCONFIGS[2]);
}

[Buggy Hunk]
IDeploymentConfig deploymentConfig = OpenShiftServerUtils.getReplicationController(server);

[Patch]
IDeploymentConfig deploymentConfig = (IDeploymentConfig) OpenShiftServerUtils.getReplicationController(server);