int index = message.indexOf("%BUGID%");
int index = message.indexOf(bugID);
    public LinkList getLinkList(String commitMessage) {        ArrayList links = new ArrayList();        ArrayList urls = new ArrayList();        if (message != null) {	        int index = message.indexOf("%BUGID%"); //$NON-NLS-1$	        if (index != -1) {		        String tag = message.substring(0, index);		        index = commitMessage.indexOf(tag);		        if (index != -1) {			        index = index + tag.length();			        int start = index;			        StringBuffer issue = new StringBuffer();			        while (index < commitMessage.length()) {			            if (commitMessage.substring(index, index + 1).equals(",")) { //$NON-NLS-1$			                int range[] = {start, issue.length()};			                String url = getResolvedUrl(issue.toString());			                if ((url != null) && (url.trim().length() > 0)) {			                    links.add(range);			                    urls.add(url);			                }			                start = index + 1;			                issue = new StringBuffer();			            } else {			                if (commitMessage.substring(index, index + 1).equals("\n") || commitMessage.substring(index, index + 1).equals("\r")) break; //$NON-NLS-1$ //$NON-NLS-2$			                if (commitMessage.substring(index, index + 1).equals(" ")) {			                    int lineIndex = commitMessage.indexOf("\n", index);			                    if (lineIndex == -1) lineIndex = commitMessage.indexOf("\r", index);			                    if (lineIndex != -1) {			                        if (commitMessage.substring(index, lineIndex - 1).trim().length() == 0)			                        break;			                    }			                }			                issue.append(commitMessage.substring(index, index + 1));			            }			            index++;			        }  			        int range[] = {start, issue.length()};			        String url = getResolvedUrl(issue.toString());			        if ((url != null) && (url.trim().length() > 0)) { 			            links.add(range);			            urls.add(url);			        }		        }	        }        }        LinkList urlLinks = getUrls(commitMessage);        int[][] urlRanges = urlLinks.getLinkRanges();        String[] urlUrls = urlLinks.getUrls();        for (int i = 0; i < urlRanges.length; i++) {            links.add(urlRanges[i]);            urls.add(urlUrls[i]);        }        int[][] linkRanges = new int[links.size()][2];        links.toArray(linkRanges);        String[] urlArray = new String[urls.size()];        urls.toArray(urlArray);        LinkList linkList = new LinkList(linkRanges, urlArray);        return linkList;    }