FIXME: public for some external testing. -> protected
502558
public static Map<String, String> getXpathVariables(Map<String, Collection<AttributeBean>> attributeMap) {
        // Set all the bind variables in the query context

        Map<String, String> variables = new HashMap<String, String>();

        for (String t : targets) {
            int count = 0;
            for (AttributeBean bean : attributeMap.get(t.toLowerCase()
                                                       + "Attributes")) {
                if (bean.getId().equals(XACML_RESOURCE_ID)) {
                    variables.put("XacmlResourceId", bean.getId());

                    if (log.isDebugEnabled()) {
                        log.debug("XacmlResourceId = '" + bean.getId()
                                  + "'");
                    }


                    int c = 0;
                    for (String value : bean.getValues()) {
                        variables.put("XacmlResourceIdValue"
                                          + c, value);
                        if (log.isDebugEnabled()) {
                            log.debug("XacmlResourceIdValue"
                                      + c + " = '" + value + "'");
                        }


                        c++;
                    }
                } else {
                    variables.put(t + "Id" + count,
                                             bean.getId());

                    if (log.isDebugEnabled()) {
                        log.debug(t + "Id" + count + " = '" + bean.getId()
                                  + "'");
                    }

                    int valueCount = 0;
                    for (String value : bean.getValues()) {
                        variables.put(t + "Id" + count
                                                 + "-Value"
                                                 + valueCount,
                                                 value);
                        if (log.isDebugEnabled()) {
                            log.debug(t + "Id" + count + "-Value"
                                      + valueCount + " = '" + value + "'");
                        }

                        valueCount++;
                    }

                    count++;
                }
            }
        }
        return variables;


    }
321260
private function checkVisibilityProtected(string &$methodName, string &$statedClassOrigin): bool
    {
        if (false === $this->reflectionsMethods[$methodName]->isPrivate()
            && !empty($statedClassOrigin)
            && ($statedClassOrigin === $this->statedClassName
                || \is_subclass_of($statedClassOrigin, $this->statedClassName))) {
            //It's a public or protected method, do like if there is no method
            return true;
        }

        return false;
    }
963938
private void protectSideEffects() {
    if (!problemNodes.isEmpty()) {
      if (!preserveFunctionInjected) {
        addExtern(compiler);
      }
      for (Node n : problemNodes) {
        Node name = IR.name(PROTECTOR_FN).srcref(n);
        name.putBooleanProp(Node.IS_CONSTANT_NAME, true);
        Node replacement = IR.call(name).srcref(n);
        replacement.putBooleanProp(Node.FREE_CALL, true);
        n.replaceWith(replacement);
        replacement.addChildToBack(n);
        compiler.reportChangeToEnclosingScope(replacement);
      }
    }
  }
619769
def real_main(release_url=None,
              tests_json_path=None,
              upload_build_id=None,
              upload_release_name=None):
    """"""
    coordinator = workers.get_coordinator()
    fetch_worker.register(coordinator)
    coordinator.start()

    data = open(FLAGS.tests_json_path).read()
    tests = load_tests(data)

    item = DiffMyImages(
        release_url,
        tests,
        upload_build_id,
        upload_release_name,
        heartbeat=workers.PrintWorkflow)
    item.root = True

    coordinator.input_queue.put(item)
    coordinator.wait_one()
    coordinator.stop()
    coordinator.join()
1281116
def get_public(self):
        '''
        
        '''
        node = self.node.find('public')
        if node is not None:
            return Cpublic(node=node)
        else:
            return None
935086
function(err) {
        if (err) { done(err); return; }
        var assert = require('assert');
        var difflet = require('difflet')({indent: 2, comment: true});
        try {
          assert.deepEqual(options.test.actual, options.expected, 'Actual should match expected.');
          grunt.log.writeln('Test passed.');
          done();
        } catch (err) {
          grunt.log.subhead('Assertion Failure');
          console.log(difflet.compare(err.expected, err.actual));
          done(err);
        }
      }
306185
static Object callSecurely(final CodeSource codeSource, Callable callable,
            Context cx, Scriptable scope, Scriptable thisObj, Object[] args)
    {
        final Thread thread = Thread.currentThread();
        // Run in doPrivileged as we might be checked for "getClassLoader"
        // runtime permission
        final ClassLoader classLoader = (ClassLoader)AccessController.doPrivileged(
            new PrivilegedAction<Object>() {
                @Override
                public Object run() {
                    return thread.getContextClassLoader();
                }
            });
        Map<ClassLoader,SoftReference<SecureCaller>> classLoaderMap;
        synchronized(callers)
        {
            classLoaderMap = callers.get(codeSource);
            if(classLoaderMap == null)
            {
                classLoaderMap = new WeakHashMap<ClassLoader,SoftReference<SecureCaller>>();
                callers.put(codeSource, classLoaderMap);
            }
        }
        SecureCaller caller;
        synchronized(classLoaderMap)
        {
            SoftReference<SecureCaller> ref = classLoaderMap.get(classLoader);
            if (ref != null) {
                caller = ref.get();
            } else {
                caller = null;
            }
            if (caller == null) {
                try
                {
                    // Run in doPrivileged as we'll be checked for
                    // "createClassLoader" runtime permission
                    caller = (SecureCaller)AccessController.doPrivileged(
                            new PrivilegedExceptionAction<Object>()
                    {
                        @Override
                        public Object run() throws Exception
                        {
                            ClassLoader effectiveClassLoader;
                            Class<?> thisClass = getClass();
                            if(classLoader.loadClass(thisClass.getName()) != thisClass) {
                                effectiveClassLoader = thisClass.getClassLoader();
                            } else {
                                effectiveClassLoader = classLoader;
                            }
                            SecureClassLoaderImpl secCl =
                                new SecureClassLoaderImpl(effectiveClassLoader);
                            Class<?> c = secCl.defineAndLinkClass(
                                    SecureCaller.class.getName() + "Impl",
                                    secureCallerImplBytecode, codeSource);
                            return c.newInstance();
                        }
                    });
                    classLoaderMap.put(classLoader, new SoftReference<SecureCaller>(caller));
                }
                catch(PrivilegedActionException ex)
                {
                    throw new UndeclaredThrowableException(ex.getCause());
                }
            }
        }
        return caller.call(callable, cx, scope, thisObj, args);
    }
1109207
function checkHacks(declarations, rule, name, value) {
      var needsHack = name === 'content' && value.indexOf('viewport-units-buggyfill') > -1;
      if (!needsHack) {
        return;
      }

      var fakeRules = value.replace(quoteExpression, '');
      fakeRules.split(';').forEach(function(fakeRuleElement) {
        var fakeRule = fakeRuleElement.split(':');
        if (fakeRule.length !== 2) {
          return;
        }

        var name = fakeRule[0].trim();
        if (name === 'viewport-units-buggyfill') {
          return;
        }

        var value = fakeRule[1].trim();
        declarations.push([rule, name, value]);
        if (calcExpression.test(value)) {
          var webkitValue = value.replace(calcExpression, '-webkit-calc(');
          declarations.push([rule, name, webkitValue]);
        }
      });
    }
1083014
function makeParameterizedOnly(parameters, defaultIt) {
  return function(title, test) {
    const it = makeTestCaseDefiner(parameters, defaultIt);
    global.describe.only('', () => it(title, test));
  };
}
419619
function coverage() {
  var jscoverage = spawn(bin('jscoverage'), ['lib', 'lib-cov']);

  jscoverage.on('error', function(err) {
    console.error(err);
    process.exit(1);
  });

  jscoverage.stderr.setEncoding('utf8');
  jscoverage.stderr.on('data', function(err) {
    console.error(err);
    process.exit(1);
  });

  jscoverage.on('close', suite);
}
1310645
function findExternal(source, externals, context) {
  if (!externals) return false

  // string match
  if (typeof externals === 'string') return (source === externals)

  // array: recurse
  if (externals instanceof Array) {
    return externals.some(function (e) { return findExternal(source, e, context) })
  }

  if (externals instanceof RegExp) {
    return externals.test(source)
  }

  if (typeof externals === 'function') {
    var functionExternalFound = false
    externals.call(null, context, source, function(err, value) {
      if (err) {
        functionExternalFound = false
      } else {
        functionExternalFound = findExternal(source, value, context)
      }
    })
    return functionExternalFound
  }

  // else, vanilla object
  for (var key in externals) {
    if (!has(externals, key)) continue
    if (source === key) return true
  }
  return false
}
1361659
public static int setPrivate(int modifier, boolean b) {
        if (b) {
            return (modifier | PRIVATE) & (~PUBLIC & ~PROTECTED);
        }
        else {
            return modifier & ~PRIVATE;
        }
    }
1089594
private boolean isExternal(String filename) {

        boolean external = false;
        if (filename.indexOf("://") > 0) {
            external = true;
        }
        return external;
    }
877100
private function checkMethodsAccessibility(): void
    {
        $publicMethods = $this->getClassPublicMethods();
        \sort($publicMethods);

        $allowedPublicMethods = $this->getAllowedPublicMethods();

        foreach (static::$allowedMagicMethods as $magicMethod) {
            if (\array_search($magicMethod, $publicMethods, true) !== false) {
                $allowedPublicMethods[] = $magicMethod;
            }
        }

        \sort($allowedPublicMethods);

        if (\count($publicMethods) > \count($allowedPublicMethods)
            || \count(\array_diff($allowedPublicMethods, $publicMethods)) !== 0
        ) {
            throw new ImmutabilityViolationException(\sprintf(
                'Class %s should not have public methods',
                static::class
            ));
        }
    }
1289815
def get_private_and_public(username, password_verifier, private, preset):
    """"""
    session = SRPServerSession(
        SRPContext(username, prime=preset[0], generator=preset[1]),
        hex_from_b64(password_verifier), private=private)

    click.secho('Server private: %s' % session.private_b64)
    click.secho('Server public: %s' % session.public_b64)
73998
public static PrivateMethodVerification verifyPrivate(Class<?> clazz, VerificationMode verificationMode) {
        return verifyPrivate((Object) clazz, verificationMode);
    }
972728
def protected_view(view, info):
    """"""

    if info.options.get('protected'):
        def wrapper_view(context, request):
            response = _advice(request)
            if response is not None:
                return response
            else:
                return view(context, request)
        return wrapper_view
    return view