private IssueData parseIssue(final InputStream _xml) { try { Element issue = FileUtil.parseDocument(_xml, false); String summary = getChildContent(issue, "subject"); String state = getAttribute(issue.getChild("status"), "name"); String url = getUrl(host, id); boolean resolved = state.equalsIgnoreCase("Closed") || getChildContent(issue, "done_ratio").equals("100"); IssueData result = new IssueData(id, summary, state, url, resolved); return result; } catch (JDOMException e) { throw new RuntimeException(String.format("Error parsing XML for issue '%s' on '%s'.", id, host)); } catch (IOException e) { throw new RuntimeException(String.format("Error reading XML for issue '%s' on '%s'.", id, host)); } } }