private boolean isBreakStatementExcluded(AstNode astNode) {
    boolean exclude = false;
    if (excludeCaseBreak && astNode.getToken().getType().equals(CxxKeyword.BREAK)) {
      for (AstNode statement = astNode.getFirstAncestor(CxxGrammarImpl.statement);
        statement != null;
        statement = statement.getPreviousSibling()) {
        if (astNode.getTokenLine() != statement.getTokenLine()) {
          break;
        }
        TokenType type = statement.getToken().getType();
        if (type.equals(CxxKeyword.CASE) || type.equals(CxxKeyword.DEFAULT)) {
          exclude = true;
          break;
        }
      }
    }
    return exclude;
  }
private boolean isBreakStatementExcluded ( AstNode astNode ) { boolean exclude = false ; if ( excludeCaseBreak && astNode . getToken ( ) . getType ( ) . equals ( CxxKeyword . BREAK ) ) { for ( AstNode statement = astNode . getFirstAncestor ( CxxGrammarImpl . statement ) ; statement != null ; statement = statement . getPreviousSibling ( ) ) { if ( astNode . getTokenLine ( ) != statement . getTokenLine ( ) ) { break ; } TokenType type = statement . getToken ( ) . getType ( ) ; if ( type . equals ( CxxKeyword . CASE ) || type . equals ( CxxKeyword . DEFAULT ) ) { exclude = true ; break ; } } } return exclude ; }
Exclude 'break' statement if it is on the same line as the switch label