[Demonstration 1]

[Buggy Method]
@Override
public void removeServerPortAlias(String portAlias) {
    JedisPool pool = new JedisPool(new JedisPoolConfig(), redisIp, Integer.parseInt(redisPort), 3000);
    Jedis jedis = pool.getResource();
    try {
        String frontend = "frontend:" + portAlias;
        logger.info(frontend);
        jedis.del(frontend.toLowerCase());
    } catch (JedisConnectionException e) {
        logger.error("HipacheRedisUtils Exception", e);
        if (jedis != null) {
            pool.returnBrokenResource(jedis);
        }
    } finally {
        if (jedis != null) {
            pool.returnResource(jedis);
            pool.destroy();
        }
    }
}

[Buggy Hunk]
JedisPool pool = new JedisPool(new JedisPoolConfig(), redisIp, Integer.parseInt(redisPort), 3000);

[Patch]
JedisPool pool = new JedisPool(new JedisPoolConfig(),ApplicationEntryPoint.IP_REDIS, Integer.parseInt(env.getProperty("redis.port")), 3000);

[Demonstration 2]

[Buggy Method]
@PostConstruct
private void init() {
    pools = controller.findAll();
    selectedPool = new PoolDto();
    // ВРЕМЕННО!
    List<String> images = new ArrayList<>();
    images.add("/resources/images/poolImages/baby.jpg");
    images.add("/resources/images/poolImages/base.jpg");
    images.add("/resources/images/poolImages/mini.jpg");
    for (int i = 0; i < images.size(); i++) {
        if (pools.size() > i) {
            pools.get(i).setPicture(images.get(i));
        }
    }
}

[Buggy Hunk]
pools = controller.findAll();

[Patch]
pools = controller.getWorkingPools();

[Demonstration 3]

[Buggy Method]
private boolean[][][] fillScheduleSlots(Section s, boolean fill) {
    //Create a locally scoped copy of the boolean matrix
    boolean[][][] sandbox = scheduleSlots.clone();
    //Extract the period slot for the section
    int q = s.getScheduleBlock().getPeriod();
    //Get the semesters
    Set<Integer> semesters = s.getSemesters();
    //Get the Days
    Set<Integer> days = s.getScheduleBlock().getDays();
    //Iterate over the semesters and days
    for (int p : semesters) {
        for (int r : days) {
            //If we are adding the section to the schedule, we need to check for conflicts
            if (fill && sandbox[p][q][r]) {
                return null;
            } else {
                sandbox[p][q][q] = fill;
            }
        }
    }
    return sandbox;
}

[Buggy Hunk]
sandbox[p][q][q] = fill;

[Patch]
sandbox[p][q][r] = fill;