title: How can I simplify this set of if statements? (Or, what's making it feel so awkward?)
body: <p>My colleague showed me this piece of code, and we both wondered why we couldn't seem to remove duplicated code.</p>
  
  <pre><code>private List&lt;Foo&gt; parseResponse(Response&lt;ByteString&gt; response) {
      if (response.status().code() != Status.OK.code() || !response.payload().isPresent()) {
        if (response.status().code() != Status.NOT_FOUND.code() || !response.payload().isPresent()) {
          LOG.error("Cannot fetch recently played, got status code {}", response.status());
        }
        return Lists.newArrayList();
      }
      // ...
      // ...
      // ...
      doSomeLogic();
      // ...
      // ...
      // ...
      return someOtherList;
  }
  </code></pre>
  
  <p>Here's an alternate representation, to make it a little less wordy:</p>
  
  <pre><code>private void f() {
      if (S != 200 || !P) {
          if (S != 404 || !P) {
              Log();
          }
          return;
      }
      // ...
      // ...
      // ...
      doSomeLogic();
      // ...
      // ...
      // ...
      return;
  }
  </code></pre>
  
  <p>Is there a simpler way to write this, without duplicating the <code>!P</code>? If not, is there some unique property about the situation or conditions that makes it impossible to factor out the <code>!P</code>?</p>