PlaceInfo (Project project, String line) { int atIndex = line.indexOf("\t"+ AT_ATR + " "); if (atIndex < 0) return null; int lparenthIndex = line.indexOf('(', atIndex); if (lparenthIndex < 0) return null; int lastDotIndex = line.lastIndexOf('.', lparenthIndex); if (lastDotIndex < 0 || lastDotIndex < atIndex) return null; String className = line.substring(atIndex + AT_ATR.length() + 1, lastDotIndex).trim(); int dollarIndex = className.indexOf('$'); if (dollarIndex >= 0){ className = className.substring(0, dollarIndex); } int rparenthIndex = line.indexOf(')', lparenthIndex); if (rparenthIndex < 0) return null; String fileAndLine = line.substring(lparenthIndex + 1, rparenthIndex).trim(); int colonIndex = fileAndLine.lastIndexOf(':'); if (colonIndex < 0) return null; String lineString = fileAndLine.substring(colonIndex + 1); String file = fileAndLine.substring(0, colonIndex); int lineNumber; try{ lineNumber = Integer.parseInt(lineString); } catch(NumberFormatException e){ return null; } return makePlaceInfo(className, file, lineNumber, project, lparenthIndex, rparenthIndex); }