title: Computation of Conditional Coverage in Cobertura
body: <p>I have 2 pieces of code that are giving me trouble. I test them with Unit-Tests, using cobertura to analyze the test coverage, and I don't understand how the conditional coverage is computed.
  This is the first piece:</p>
  
  <pre><code>if ((x.getInt() == a) 
   || (x.getInt() == y.getInt()) { ...
  </code></pre>
  
  <p>Cobertura reports me that 4 cases need to be covered, which seems fine when assumed that short-circuiting is ignored.</p>
  
  <p>Then, in another method I have another (longer) conditional:</p>
  
  <pre><code>if ((x == null)
   || ObjectUtils.equals(x.getInt(), a)
   || ObjectUtils.equals(x.getInt(), y.getInt())) {
    ...
  </code></pre>
  
  <p>Here comes the part I don't understand: Cobertura reports that 5/6 cases are covered. I would have expected 8 cases, I could explain 5 cases (considering the x == null), but</p>
  
  <blockquote>
    <p>how does cobertura handle conditional coverage in these cases, and why does that lead to 6 cases?</p>
  </blockquote>