<?xml version="1.0" encoding="UTF-8"?>
<test-data>
    <test-code>
        <description><![CDATA[
null check after method invocation with conditional AND and !=
     ]]></description>
        <expected-problems>1</expected-problems>
        <code><![CDATA[
public class Foo {
 void bar() {
  if (a.equals(baz) && a!=null) {}
 }
}
     ]]></code>
    </test-code>
    <test-code>
        <description><![CDATA[
null check after nested method invocation
     ]]></description>
        <expected-problems>1</expected-problems>
        <code><![CDATA[
public class Foo {
 void bar() {
  if (a.equals(baz.foo()) && baz != null) {}
 }
}
     ]]></code>
    </test-code>
    <test-code>
        <description><![CDATA[
null check before nested method invocation
     ]]></description>
        <expected-problems>0</expected-problems>
        <code><![CDATA[
public class Foo {
 void bar() {
  if (a != null && a.equals(foo())) {}
 }
}
     ]]></code>
    </test-code>
    <test-code>
        <description><![CDATA[
1610730: null check after method invocation with conditional OR and ==
     ]]></description>
        <expected-problems>1</expected-problems>
        <code><![CDATA[
public class Foo {
 void bar() {
  if (a.equals(baz) || a == null) {}
 }
}
     ]]></code>
    </test-code>
    <test-code>
        <description><![CDATA[
3372128: False positive: ArrayIsStoredDirectly
     ]]></description>
        <expected-problems>0</expected-problems>
        <code><![CDATA[
public class Foo {
  public final void setExcludeStatus(String[] excludeStatus) {
    if (excludeStatus != null) {
      this.excludeStatus = Arrays.asList(excludeStatus.clone());
    } else {
      this.excludeStatus = null;
    }
  }
}
        ]]></code>
    </test-code>
    <test-code>
        <description>#977 MisplacedNullCheck makes false positives</description>
        <expected-problems>0</expected-problems>
        <code><![CDATA[
public class Test {
    public void method(final String value,final String oldValue) {
        if ((value != null && !value.equals(oldValue)) || value == null) {
            // Do something
        }
    }
}
]]></code>
    </test-code>
</test-data>
