private List<RuleFailure> getFailuresForGivenLine( File toHighlight, List<RuleFailure> failuresForFile, int lineNumber ) {
List<RuleFailure> failuresForGivenLine = new ArrayList<RuleFailure>();
if ( failuresForFile != null ) {
for (Iterator<RuleFailure> i = failuresForFile.iterator(); i.hasNext();) {
RuleFailure failure = i.next();
Parameter lineParam = failure.getParameter( "line" );
if ( lineParam.getValue().intValue() == lineNumber ) {
failuresForGivenLine.add( failure );
i.remove();
}
}
}