private RegistrationDataDistributor distributor = new RegistrationDataDistributor(); // 18 line
...
first = message.charAt(0) + "";
last = message.charAt(message.length() - 1) + "";
if (counter == 1) {
last = "А";
}
if(first.equals(last)){
...
name value
aaa 111
aaa 222
bbb 156
SELECT DISTINCT name FROM table_1 ORDER BY value;