public class ChanHelper {
public static Loadable getLoadableFromStartUri(Uri uri) {
Loadable loadable = null;
List<String> parts = uri.getPathSegments();
if (parts.size() > 0) {
<BUG>String rawBoard = parts.get(0);
if (Chan.getBoardManager().getBoardExists(rawBoard)) {
</BUG>
if (parts.size() == 1 || (parts.size() == 2 && "catalog".equals(parts.get(1)))) {
<BUG>loadable = LoadablePool.getInstance().obtain(new Loadable(rawBoard));
} else if (parts.size() >= 3) {</BUG>
int no = -1;

public class ChanHelper {
public static Loadable getLoadableFromStartUri(Uri uri) {
Loadable loadable = null;
List<String> parts = uri.getPathSegments();
if (parts.size() > 0) {
String rawBoard = parts.get(0);
BoardManager boardManager = Chan.getBoardManager();
DatabaseLoadableManager loadableManager = Chan.getDatabaseManager().getDatabaseLoadableManager();
if (boardManager.getBoardExists(rawBoard)) {
if (parts.size() == 1 || (parts.size() == 2 && "catalog".equals(parts.get(1)))) {
loadable = loadableManager.get(Loadable.forCatalog(rawBoard));
} else if (parts.size() >= 3) {
int no = -1;
