[Demonstration 1]

[Buggy Method]
@Override
public void run() {
    synchronized (sysList) {
        sysList.clearInnactiveSys();
    }
}

[Buggy Hunk]
synchronized (sysList) {

[Patch]
synchronized (sysList.getList()) {

[Demonstration 2]

[Buggy Method]
public synchronized void connect() {
    if (client != null && client.isConnected()) {
        return;
    }
    try {
        client = new MqttClient(brokerURL, appName);
        options = new MqttConnectOptions();
        options.setUserName(user);
        options.setPassword(password.toCharArray());
        client.connect(options);
    } catch (MqttException e) {
        log.error(e.getMessage(), e);
    }
}

[Buggy Hunk]
client = new MqttClient(brokerURL, appName);

[Patch]
client = new MqttClient(brokerURL, deviceId);

[Demonstration 3]

[Buggy Method]
static public List<StatisticModel> convertListOfDbObjects(List<DBObject> mongoStat) {
    List<StatisticModel> result = new ArrayList<StatisticModel>() {
    };
    if (!mongoStat.isEmpty()) {
        for (DBObject row : mongoStat) {
            result.add(StatisticMapper.convertDbObject(row));
        }
    }
    return result;
}

[Buggy Hunk]
List<StatisticModel> result = new ArrayList<StatisticModel>() { };

[Patch]
List<StatisticModel> result = new ArrayList<StatisticModel>();