Sonarqube reports the following condition as bug.
string a1 = null;
string a2 = null;
string a3 = null;
for(int i = 0; i < args.length; ++i)
{
if ( args[i] == "-one" )
{
a1 = args[++i];
}
else if ( args[i] == "-two" )
{
a2 = args[++i];
}
else if ( args[i] == "-three" )
{
a3 = args[++i];
}
}
if ( !string.IsNullOrEmpty(a2) && !string.IsNullOrEmpty(a3))
{
// Do something
}
else
{
// Do something
}
![](https://lh3.googleusercontent.com/-dtAHWO0aD1I/WjA2OkvZIoI/AAAAAAAAD38/6VblliVrlDw35IVgVC9uujWUEQnpzJGjgCLcBGAs/s320/SonarQubeBug.png)