Long or complicated calculations/equations should be broken down into smaller steps using explanatory variables.
if(headerPattern.matcher(line).find()) ...
vs
Matcher match = headerPattern.matcher(line); if(match.find()) ...
the latter is more legible than the former.