called in context of erraneous or-block
766825
void reset() {

        if (this.keys == null) {
            this.len = Integer.MIN_VALUE;
            this.mask = Integer.MIN_VALUE;
            this.threshold = Integer.MIN_VALUE;
            this.count = Integer.MIN_VALUE;
            for (int i = 0; i < 3; i++) {
                this.ints[i] = Integer.MIN_VALUE;
            }
            this.map = null;
        } else {
            this.keys = new Object[this.keys.length];
        }

        this.count = 0;

    }
519273
def RESCUE(exception_klass, &block)
      fmt_err = ->err_cls{err_cls.ancestors.take_while{|mod|mod != Object}.join(' < ')}
      block.call
    rescue exception_klass
      pass
    rescue ::Exception
      failure("Faced a exception, that kind of #{exception_klass}(#{fmt_err.call exception_klass}).",
              "Faced a exception, that instance of #{$!.class}(#{fmt_err.call $!.class}).", 2)
    else
      failure("Faced a exception, that kind of #{exception_klass}(#{fmt_err.call exception_klass}).",
              'The block was not faced any exceptions.', 2)
    ensure
      _declared!
    end
1293727
function(containerBlock) {
    var clauseBlock = containerBlock.nextConnection.targetBlock();
    var i = 1;
    while (clauseBlock) {
      switch (clauseBlock.type) {
        case 'controls_if_elseif':
          var inputIf = this.getInput('IF' + i);
          var inputDo = this.getInput('DO' + i);
          clauseBlock.valueConnection_ =
              inputIf && inputIf.connection.targetConnection;
          clauseBlock.statementConnection_ =
              inputDo && inputDo.connection.targetConnection;
          i++;
          break;
        case 'controls_if_else':
          var inputDo = this.getInput('ELSE');
          clauseBlock.statementConnection_ =
              inputDo && inputDo.connection.targetConnection;
          break;
        default:
          throw 'Unknown block type.';
      }
      clauseBlock = clauseBlock.nextConnection &&
          clauseBlock.nextConnection.targetBlock();
    }
  }
1052067
def p_block(self, p):
        ''
        p[0] = Block(p[2], lineno=p.lineno(1))
        p.set_lineno(0, p.lineno(1))
124392
public final void mOR() throws RecognitionException {
        try {
            int _type = OR;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // EventFilter.g:48:4: ( 'or' )
            // EventFilter.g:48:6: 'or'
            {
            match("or"); 



            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
987943
def tryCondition(self, block):
        
        currentBlock = self._prevNonEmptyBlock(block)
        if not currentBlock.isValid():
            return None

        # found non-empty line
        currentText = currentBlock.text()
        if currentText.rstrip().endswith(';') and \
           re.search(r'^\s*(if\b|[}]?\s*else|do\b|while\b|for)', currentText) is None:
            # idea: we had something like:
            #   if/while/for (expression)
            #       statement();  <-- we catch this trailing ';'
            # Now, look for a line that starts with if/for/while, that has one
            # indent level less.
            currentIndentation = self._lineIndent(currentText)
            if not currentIndentation:
                return None

            for block in self.iterateBlocksBackFrom(currentBlock.previous()):
                if block.text().strip(): # not empty
                    indentation = self._blockIndent(block)

                    if len(indentation) < len(currentIndentation):
                        if re.search(r'^\s*(if\b|[}]?\s*else|do\b|while\b|for)[^{]*$', block.text()) is not None:
                            dbg("tryCondition: success in line %d" % block.blockNumber())
                            return indentation
                        break

        return None
1294482
@Override public boolean block() throws InterruptedException {
    while( !isDone() ) {
      try { get(); }
      catch(ExecutionException eex) { // skip the execution part
        Throwable tex = eex.getCause();
        if( tex instanceof                 Error) throw (                Error)tex;
        if( tex instanceof  DistributedException) throw ( DistributedException)tex;
        if( tex instanceof JobCancelledException) throw (JobCancelledException)tex;
        throw new RuntimeException(tex);
      }
      catch(CancellationException cex) { Log.errRTExcept(cex); }
    }
    return true;
  }
1318014
private void failRemainingBlocks(String[] failedBlockIds, Throwable e) {
    for (String blockId : failedBlockIds) {
      try {
        listener.onBlockFetchFailure(blockId, e);
      } catch (Exception e2) {
        logger.error("Error in block fetch failure callback", e2);
      }
    }
  }
1063805
def error *args
      cfg = get_config!
      if (cfg.out or cfg.print) && !@mute_error
        text, bind, opts = args.get_opts [!block_given? && args[0].kinda(Hash) ? args[0] : "\b\b ", nil], :mute => 0
        opts[:mute] |= NOLOG if !cfg.out
        opts[:mute] |= NOPRINT if !cfg.print
        return if block_given? && (text = yield).nil?
        _print(:error, text, opts[:mute], cfg._caller && (@current_caller || caller)[(opts[:caller] || opts[:caller_offset]).to_i], bind, cfg)
      end  
    end
216883
def on_failure(&block)
      on do |_, _, reason|
        block.call(reason) if reason
      end
    end
100326
public static <L, R> Either<L, R> errorOf(L reference) {
        return leftOf(reference);
    }
761369
private void fillBlock(int block, /*UChar32*/ int start, /*UChar32*/ int limit,
              int value, int initialValue, boolean overwrite) {
        int i;
        int pLimit = block+limit;
        if(overwrite) {
            for (i=block+start; i<pLimit; i++) {
                data[i] = value;
            }
        } else {
            for (i=block+start; i<pLimit; i++) {
                if(data[i]==initialValue) {
                    data[i]=value;
                }
            }
        }
    }
449107
public final void block() throws RecognitionException {
		int block_StartIndex = input.index();


		            increaseLevel();
		        
		try {
			if ( state.backtracking>0 && alreadyParsedRule(input, 80) ) { return; }

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:693:5: ( '{' ( blockStatement )* '}' )
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:693:7: '{' ( blockStatement )* '}'
			{
			match(input,121,FOLLOW_121_in_block2769); if (state.failed) return;
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:693:11: ( blockStatement )*
			loop104:
			while (true) {
				int alt104=2;
				int LA104_0 = input.LA(1);
				if ( ((LA104_0 >= CharacterLiteral && LA104_0 <= DecimalLiteral)||LA104_0==ENUM||LA104_0==FloatingPointLiteral||(LA104_0 >= HexLiteral && LA104_0 <= Identifier)||(LA104_0 >= OctalLiteral && LA104_0 <= StringLiteral)||LA104_0==29||LA104_0==36||(LA104_0 >= 40 && LA104_0 <= 41)||(LA104_0 >= 44 && LA104_0 <= 45)||(LA104_0 >= 52 && LA104_0 <= 53)||LA104_0==58||(LA104_0 >= 63 && LA104_0 <= 67)||(LA104_0 >= 70 && LA104_0 <= 73)||(LA104_0 >= 75 && LA104_0 <= 77)||(LA104_0 >= 79 && LA104_0 <= 80)||(LA104_0 >= 82 && LA104_0 <= 83)||(LA104_0 >= 85 && LA104_0 <= 87)||LA104_0==90||(LA104_0 >= 92 && LA104_0 <= 98)||(LA104_0 >= 100 && LA104_0 <= 112)||(LA104_0 >= 114 && LA104_0 <= 121)||LA104_0==126) ) {
					alt104=1;
				}

				switch (alt104) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:693:11: blockStatement
					{
					pushFollow(FOLLOW_blockStatement_in_block2771);
					blockStatement();
					state._fsp--;
					if (state.failed) return;
					}
					break;

				default :
					break loop104;
				}
			}

			match(input,125,FOLLOW_125_in_block2774); if (state.failed) return;
			}

			if ( state.backtracking==0 ) {
			            if( localVariableLevel <= 1 ) {
			                // this is the top level block, so set the top level declarations
			                rootBlockDescr.setInScopeLocalVars( getLocalDeclarations() );
			            }
			            decreaseLevel();
			        }
		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
			if ( state.backtracking>0 ) { memoize(input, 80, block_StartIndex); }

		}
	}
789739
private Context translateStatementBlock(WyilFile.Stmt.Block block, Context context) {
		for (int i = 0; i != block.size(); ++i) {
			WyilFile.Stmt stmt = block.get(i);
			context = translateStatement(stmt, context);
			if (stmt instanceof WyilFile.Stmt.Return) {
				return null;
			}
		}
		return context;
	}
1238295
function handleBlock(startArr, startOffsetM, startOffsetNextM, destArr, destOffsetM, destOffsetNextM, undefined){

  // slice out the block we need
  var startArrTemp = startArr.slice(startOffsetM, startOffsetNextM || undefined)
    ,  destArrTemp =  destArr.slice( destOffsetM,  destOffsetNextM || undefined)

  var i = 0
    , posStart = {pos:[0,0], start:[0,0]}
    , posDest  = {pos:[0,0], start:[0,0]}

  do{

    // convert shorthand types to long form
    startArrTemp[i] = simplyfy.call(posStart, startArrTemp[i])
     destArrTemp[i] = simplyfy.call(posDest ,  destArrTemp[i])

    // check if both shape types match
    // 2 elliptical arc curve commands ('A'), are considered different if the
    // flags (large-arc-flag, sweep-flag) don't match
    if(startArrTemp[i][0] != destArrTemp[i][0] || startArrTemp[i][0] == 'M' ||
        (startArrTemp[i][0] == 'A' &&
          (startArrTemp[i][4] != destArrTemp[i][4] || startArrTemp[i][5] != destArrTemp[i][5])
        )
      ) {

      // if not, convert shapes to beziere
      Array.prototype.splice.apply(startArrTemp, [i, 1].concat(toBeziere.call(posStart, startArrTemp[i])))
       Array.prototype.splice.apply(destArrTemp, [i, 1].concat(toBeziere.call(posDest, destArrTemp[i])))

    } else {

      // only update positions otherwise
      startArrTemp[i] = setPosAndReflection.call(posStart, startArrTemp[i])
       destArrTemp[i] = setPosAndReflection.call(posDest ,  destArrTemp[i])

    }

    // we are at the end at both arrays. stop here
    if(++i == startArrTemp.length && i == destArrTemp.length) break

    // destArray is longer. Add one element
    if(i == startArrTemp.length){
      startArrTemp.push([
        'C',
        posStart.pos[0],
        posStart.pos[1],
        posStart.pos[0],
        posStart.pos[1],
        posStart.pos[0],
        posStart.pos[1],
      ])
    }

    // startArr is longer. Add one element
    if(i == destArrTemp.length){
      destArrTemp.push([
        'C',
        posDest.pos[0],
        posDest.pos[1],
        posDest.pos[0],
        posDest.pos[1],
        posDest.pos[0],
        posDest.pos[1]
      ])
    }


  }while(true)

  // return the updated block
  return {start:startArrTemp, dest:destArrTemp}
}
519754
function(e) {
    var legal = false;
    // Is the block nested in a loop?
    var block = this;
    do {
      if (this.LOOP_TYPES.indexOf(block.type) != -1) {
        legal = true;
        break;
      }
      block = block.getSurroundParent();
    } while (block);
    if (legal) {
      this.setWarningText(null);
    } else {
      this.setWarningText(Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING);
    }
  }
267225
def p_block(p):
    
    # section 3.2: REQUIRE command must come before any other commands,
    # which means it can't be in the block of another command
    if any(command.RULE_IDENTIFIER == 'REQUIRE'
           for command in p[2].commands):
        print("REQUIRE command not allowed inside of a block (line %d)" %
            (p.lineno(2)))
        raise SyntaxError
    p[0] = p[2]