<BUG>String sql = getSql("SELECT ALARMS.*, NODE.NODELABEL, SERVICE.SERVICENAME", criteria);return getAlarms(sql, paramSetter(criteria));</BUG><CONTEXT>} else {return alarms[0];}}public Alarm[] getMatchingAlarms(AlarmCriteria criteria) {<extra_id_0>}private Alarm[] getAlarms(String sql, PreparedStatementSetter setter) {List<Alarm> alarms = queryForList(sql, setter, new AlarmMapper());</CONTEXT>
String sql = getSql("SELECT ALARMS.*, NODE.NODELABEL, SERVICE.SERVICENAME FROM ALARMS LEFT OUTER JOIN NODE USING (NODEID) LEFT OUTER JOIN SERVICE USING (SERVICEID)", criteria);return getAlarms(sql, paramSetter(criteria));