ArrayList<RuleHead> all = config.getStatements();
// go backwards so we can append at the end
for (int i = all.size() - 1; i >= 0; i--) {
RuleHead r = all.get(i);
String topic = r.getTopic().toLowerCase();
int weight = 0;
if (topic.equals("select")) {
weight = 10;
} else if (topic.equals("create table")) {
weight = 20;
} else if (topic.equals("insert")) {
weight = 5;
} else if (topic.startsWith("update")) {
weight = 3;
} else if (topic.startsWith("delete")) {
weight = 3;
} else if (topic.startsWith("drop")) {
weight = 2;
}
if (SHOW_SYNTAX) {
System.out.println(r.getTopic());
}
for (int j = 0; j < weight; j++) {
statements.add(r);
}
}