I was originally going to post this code from szeryf because of the way it used exceptions: exceptions are meant to be thrown and this method returns one, requiring the caller to check the type of object returned to see if it's an exception. But now that I look at six-line wonder a bit more, I've noticed that the WTF-to-LOC* ratio has surpassed one. And whenever this happens, you know what it means: time for a game of Where's WTF! I stopped counting at seven ... how many can you find?

public Object findRecord(String table, int i) {
  Object r = null;
  r = executeQuery("select * from " + table + " where id = " + i);
  if (r == null) r = new ClassNotFoundException();
  return r;

* Lines of Code. I wasn't sure if this is a real TLA** or one that I just made up.
** Three Letter Acronym, which happens to be the best self-describing thing ever.

[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!