Update cntMaxRows
if ( ! mp . containsKey ( mat . get ( i ) ) ) { cntMaxRows = Math . max ( cntMaxRows , mp . get ( onesCompRow ) ) ; } else if ( ! mp . containsKey ( onesCompRow ) ) { cntMaxRows = Math . max ( cntMaxRows , mp . get ( mat . get ( i ) ) ) ; } else { cntMaxRows = Math . max ( cntMaxRows , mp . get ( mat . get ( i ) ) + mp . get ( onesCompRow ) ) ; } } return cntMaxRows ; }