Consolidate Boolean _And_ Expression
You have two immediately nested if statements. Merge both conditional expressions with the Boolean and operator.
if(cond1) { if(cond2) { /* cond1 and cond2 are true */ ... } }
⇓
if(cond1 && cond2) { /* cond1 and cond2 are true */ ... }
Motivation
The Boolean expressions of control-flow statements are usually translated by compilers as the composition of the simpler if statements, rather than being evaluated arithmetically. This refactoring allows to recover the original Boolean expressions. Boolean or expressions are translated via and expressions and negation.
Mechanics
Merge both conditional expressions with the Boolean and operator.