how to refactor the following codes
<p>I have a method want to refactor, and some dummy codes as below:</p>

<pre><code>if(deletedInfo.isEmpty() &amp;&amp; addedInfo.isEmpty()) {
    // some logic codes
} else if (!deletedInfo.isEmpty() &amp;&amp; addedInfo.isEmpty()) {
    // some logic codes
} else if (deletedInfo.isEmpty() &amp;&amp; !addedInfo.isEmpty()) {
    // some logic codes
} else if(!deletedInfo.isEmpty() &amp;&amp; !addedInfo.isEmpty()) {
    // some logic codes
}
</code></pre>

<p>is there a appropriate pattern or some algorithm to refactor this codes?</p>

<p>Thanks.</p>
