processes a monitor enter call to create a scope block

@param pc
the current program counter
161314
private void sawMonitorEnter(int pc) {
        monitorSyncPCs.add(Integer.valueOf(pc));

        ScopeBlock sb = new ScopeBlock(pc, Integer.MAX_VALUE);
        sb.setSync();
        rootScopeBlock.addChild(sb);
    }
897050
static public String createMonitor(String monitorUrl,
            Node parserInstruction, String modifiesResponse, TECore core) {
        MonitorCall mc = monitors.get(monitorUrl);
        mc.setCore(core);
        if (parserInstruction != null) {
            mc.setParserInstruction(DomUtils.getElement(parserInstruction));
            mc.setModifiesResponse(Boolean.parseBoolean(modifiesResponse));
        }
        LOGR.log(Level.CONFIG, "Configured monitor without test:\n {0}", mc);
        return "";
    }
495801
Scope enterScope() {
    final Map<VarKey, Variable> currentFrame = new LinkedHashMap<>();
    final Label scopeExit = new Label();
    frames.push(currentFrame);
    return new Scope() {
      boolean exited;

      @Override
      Variable createSynthetic(
          SyntheticVarName varName, Expression initExpr, SaveStrategy strategy) {
        checkState(!exited, "Scope already exited");
        VarKey key = VarKey.create(Kind.SYNTHETIC, varName.name());
        // synthetics are prefixed by $ by convention
        String name = fieldNames.generateName("$" + varName.name());
        return doCreate(name, new Label(), scopeExit, initExpr, key, strategy);
      }

      @Override
      Variable createTemporary(String name, Expression initExpr) {
        checkState(!exited, "Scope already exited");
        VarKey key = VarKey.create(Kind.TEMPORARY, name);
        name = fieldNames.generateName("$$" + name);
        return doCreate(name, new Label(), scopeExit, initExpr, key, SaveStrategy.NEVER);
      }

      @Override
      Variable create(String name, Expression initExpr, SaveStrategy strategy) {
        checkState(!exited, "Scope already exited");
        VarKey key = VarKey.create(Kind.USER_DEFINED, name);
        name = fieldNames.generateName(name);
        return doCreate(name, new Label(), scopeExit, initExpr, key, strategy);
      }

      @Override
      Statement exitScope() {
        checkState(!exited, "Scope already exited");
        exited = true;
        frames.pop();
        // Use identity semantics to make sure we visit each label at most once.  visiting a label
        // more than once tends to corrupt internal asm state.
        final Set<Label> endLabels = Sets.newIdentityHashSet();
        for (Variable var : currentFrame.values()) {
          endLabels.add(var.local.end());
          availableSlots.clear(
              var.local.index(), var.local.index() + var.local.resultType().getSize());
        }
        return new Statement() {
          // TODO(lukes): we could generate null writes for when object typed fields go out of
          // scope.  This would potentially allow intermediate results to be collected sooner.
          @Override
          protected void doGen(CodeBuilder adapter) {
            for (Label label : endLabels) {
              adapter.visitLabel(label);
            }
          }
        };
      }

      private Variable doCreate(
          String name,
          Label start,
          Label end,
          Expression initExpr,
          VarKey key,
          SaveStrategy strategy) {
        int index = reserveSlotFor(initExpr.resultType());
        LocalVariable local =
            LocalVariable.createLocal(name, index, initExpr.resultType(), start, end);
        Variable var;
        switch (strategy) {
          case DERIVED:
            var = new DerivedVariable(initExpr, local);
            break;
          case NEVER:
            var = new TemporaryVariable(initExpr, local);
            break;
          case STORE:
            var = new FieldSavedVariable(initExpr, local);
            break;
          default:
            throw new AssertionError();
        }
        currentFrame.put(key, var);
        allVariables.add(var);
        return var;
      }
    };
  }
851955
public void visitBlockStatement(BlockStatement block) {
        pushState();
        block.setVariableScope(currentScope);
        super.visitBlockStatement(block);
        popState();
    }
311948
@Override
    public void sawOpcode(int seen) {

        FinallyBlockInfo fbi = fbInfo.get(0);

        if (getPC() < fbi.startPC) {
            return;
        }

        if (getPC() == fbi.startPC) {
            if (OpcodeUtils.isAStore(seen)) {
                fbi.exReg = RegisterUtils.getAStoreReg(this, seen);
            } else {
                removeEarliestFinallyBlock();
                sawOpcode(seen);
                return;
            }
            return;
        }

        if (seen == Const.MONITORENTER) {
            fbi.monitorCount++;
        } else if (seen == Const.MONITOREXIT) {
            fbi.monitorCount--;
            if (fbi.monitorCount < 0) {
                removeEarliestFinallyBlock();
                sawOpcode(seen);
                return;
            }
        }

        if ((seen == Const.ATHROW) && (loadedReg == fbi.exReg)) {
            removeEarliestFinallyBlock();
            sawOpcode(seen);
            return;
        } else if (OpcodeUtils.isALoad(seen)) {
            loadedReg = RegisterUtils.getALoadReg(this, seen);
        } else {
            loadedReg = -1;
        }

        if (OpcodeUtils.isReturn(seen) || (seen == Const.ATHROW)) {
            bugReporter.reportBug(new BugInstance(this, BugType.AFBR_ABNORMAL_FINALLY_BLOCK_RETURN.name(), NORMAL_PRIORITY).addClass(this).addMethod(this)
                    .addSourceLine(this));
            removeEarliestFinallyBlock();
        } else if (OpcodeUtils.isStandardInvoke(seen)) {
            try {
                JavaClass cls = Repository.lookupClass(getClassConstantOperand());
                Method m = findMethod(cls, getNameConstantOperand(), getSigConstantOperand());
                if (m != null) {
                    ExceptionTable et = m.getExceptionTable();
                    if ((et != null) && (et.getLength() > 0) && !catchBlockInFinally(fbi)) {
                        bugReporter.reportBug(new BugInstance(this, BugType.AFBR_ABNORMAL_FINALLY_BLOCK_RETURN.name(), LOW_PRIORITY).addClass(this)
                                .addMethod(this).addSourceLine(this));
                        removeEarliestFinallyBlock();
                    }
                }
            } catch (ClassNotFoundException cnfe) {
                bugReporter.reportMissingClass(cnfe);
            }
        }
    }
937973
void monitorChild() {
    Process proc = childProc;
    if (proc == null) {
      // Process may have already been disposed of, e.g. by calling kill().
      return;
    }

    while (proc.isAlive()) {
      try {
        proc.waitFor();
      } catch (Exception e) {
        LOG.log(Level.WARNING, "Exception waiting for child process to exit.", e);
      }
    }

    synchronized (this) {
      if (isDisposed()) {
        return;
      }

      int ec;
      try {
        ec = proc.exitValue();
      } catch (Exception e) {
        LOG.log(Level.WARNING, "Exception getting child process exit code, assuming failure.", e);
        ec = 1;
      }

      if (ec != 0) {
        State currState = getState();
        // Override state with failure if the current state is not final, or is success.
        if (!currState.isFinal() || currState == State.FINISHED) {
          setState(State.FAILED, true);
        }
      }

      dispose();
    }
  }
989619
public static void register(final Monitor monitor, Long delay, Long period) {
        ScheduledFuture future = scheduler.scheduleAtFixedRate(new Runnable() {

            public void run() {
                monitor.reload();
            }
        }, delay, period, TimeUnit.MILLISECONDS);

        register.put(monitor, future);
    }
1209424
@Override
  public void process(Node externs, Node root) {
    checkState(topLevelStatements.isEmpty(), "process() called more than once");
    NodeTraversal t = new NodeTraversal(compiler, this, scopeCreator);
    t.traverseRoots(externs, root);
  }
1292754
@Override
  public void register(Monitor<?> monitor) {
    Preconditions.checkNotNull(monitor, "monitor");
    try {
      monitors.add(monitor);
    } catch (Exception e) {
      throw new IllegalArgumentException("invalid object", e);
    }
  }
198330
static public String createMonitor(String monitorUrl, TECore core) {
        return createMonitor(monitorUrl, null, "", core);
    }
964975
private void register(Path path, ResourceMonitorImpl monitorImpl) throws IOException
   {
      WatchKey key = path.register(watcher, ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY);
      keys.put(key, monitorImpl);
   }
190539
public void setScope(String scope) {
        if (scope.equalsIgnoreCase("page")) {
            this.scope = PageContext.PAGE_SCOPE;
        } else if (scope.equalsIgnoreCase("request")) {
            this.scope = PageContext.REQUEST_SCOPE;
        } else if (scope.equalsIgnoreCase("session")) {
            this.scope = PageContext.SESSION_SCOPE;
        } else if (scope.equalsIgnoreCase("application")) {
            this.scope = PageContext.APPLICATION_SCOPE;
        }
        // TODO: Add error handling?  Needs direction from spec.
    }
839913
@Override
    public boolean registerMonitor(Object monitor) {
        // Process the annotated object, build a configuration, and create probe
        // listeners that represent each call site of the monitor.
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(this, tc, "monitor = " + monitor);
        }
        long startTime = System.nanoTime();
        Set<ProbeListener> listeners = buildListenersFromAnnotated(monitor);
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(this, tc, "buildListenersFromAnnotated time = " + TimeUnit.NANOSECONDS.toMicros(System.nanoTime() - startTime) + "usec");
        }

        // Update collections of listeners
        startTime = System.nanoTime();
        if (!addListenersForMonitor(monitor, listeners)) {
            return false;
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(this, tc, "addListenersForMonitorTime = " + TimeUnit.NANOSECONDS.toMicros(System.nanoTime() - startTime) + "usec");
        }

        // Process all of the listeners and determine which of the available
        // classes needs to be transformed
        startTime = System.nanoTime();
        Collection<Class<?>> effectedClasses = processNewListeners(listeners);
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(this, tc, "processNewListeners time = " + TimeUnit.NANOSECONDS.toMicros(System.nanoTime() - startTime) + "usec");
        }

        // Update the classes with the configured probes
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(this, tc, "effectedClasses.size() = " + effectedClasses.size());
        }
        startTime = System.nanoTime();
        this.transformer.instrumentWithProbes(effectedClasses);
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(this, tc, "instrumentWithProbes time = " + TimeUnit.NANOSECONDS.toMicros(System.nanoTime() - startTime) + "usec");
        }

        return true;
    }
428750
@AroundInvoke
	public Object monitor(InvocationContext context) throws Exception {
		if (isMonitored(context)) {
			String simonName = getSimonName(context);
			try (Split ignored = SimonManager.getStopwatch(simonName).start()) {
				return context.proceed();
			}
		} else {
			return context.proceed();
		}
	}
595207
@Override
    public void sawOpcode(int seen) {
        try {
            stack.precomputation(this);

            if (seen == Const.INVOKEINTERFACE) {
                processInvokeInterface();

            } else if (seen == Const.INVOKESPECIAL) {
                processInvokeSpecial();
            }
        } finally {
            stack.sawOpcode(this, seen);
        }
    }
677580
public static boolean call(PageContext pc, double scope, String[] varNames) {
	return call(pc, scope, KeyImpl.toKeyArray(varNames));
    }
1227286
public synchronized void batchProcessComplete() {
    if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {
      UIMAFramework.getLogger(this.getClass()).logrb(Level.FINEST, this.getClass().getName(),
              "process", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, "UIMA_CPM_method_ping__FINEST",
              new Object[] { Thread.currentThread().getName() });
    }
  }