méthode inspirée de VisualScoreTag dans LambdaProbe/JStripe (Licence GPL)
341552
private void draw() throws IOException { // NOPMD
		assert x == 0;
		final double myPercent = Math.max(Math.min(percentValue, 100d), 0d);
		final int fullBlockCount = (int) Math.floor(myPercent / (UNIT_SIZE * PARTIAL_BLOCKS));
		final int partialBlockIndex = (int) Math
				.floor((myPercent - fullBlockCount * UNIT_SIZE * PARTIAL_BLOCKS) / UNIT_SIZE);

		addImage(getBarImage(fullBlockCount > 0 || partialBlockIndex > 0 ? "a" : "a0"));

		final BufferedImage fullBody = getBarImage(String.valueOf(PARTIAL_BLOCKS));
		for (int i = 0; i < fullBlockCount; i++) {
			addImage(fullBody);
		}

		if (partialBlockIndex > 0) {
			final BufferedImage partialBody = getBarImage(String.valueOf(partialBlockIndex));
			addImage(partialBody);
		}

		final int emptyBlocks = FULL_BLOCKS - fullBlockCount - (partialBlockIndex > 0 ? 1 : 0);
		final BufferedImage emptyBody = getBarImage(String.valueOf(0));
		for (int i = 0; i < emptyBlocks; i++) {
			addImage(emptyBody);
		}

		addImage(getBarImage(fullBlockCount == FULL_BLOCKS ? "b" : "b0"));

		if (alertOnHighUsage) {
			x += 8;
			graphics.drawImage(getImage("alert.png"), x, 0, null);
		}
	}
180579
function getValidGraphQLTag(path: any): ?DocumentNode {
  const tag = path.get('tag');

  if (!tag.isIdentifier({name: 'graphql'})) {
    return null;
  }

  const quasis = path.node.quasi.quasis;

  if (quasis.length !== 1) {
    throw new Error(
      'BabelPluginRelay: Substitutions are not allowed in graphql fragments. ' +
        'Included fragments should be referenced as `...MyModule_propName`.',
    );
  }

  const text = quasis[0].value.raw;

  const ast = GraphQL.parse(text);

  if (ast.definitions.length === 0) {
    throw new Error('BabelPluginRelay: Unexpected empty graphql tag.');
  }

  return ast;
}
1216822
function (ttag, scanner) {

  if (ttag.type === 'INCLUSION' || ttag.type === 'BLOCKOPEN') {
    var args = ttag.args;
    if (ttag.path[0] === 'each' && args[1] && args[1][0] === 'PATH' &&
        args[1][1][0] === 'in') {
      // For slightly better error messages, we detect the each-in case
      // here in order not to complain if the user writes `{{#each 3 in x}}`
      // that "3 is not a function"
    } else {
      if (args.length > 1 && args[0].length === 2 && args[0][0] !== 'PATH') {
        // we have a positional argument that is not a PATH followed by
        // other arguments
        scanner.fatal("First argument must be a function, to be called on " +
                      "the rest of the arguments; found " + args[0][0]);
      }
    }
  }

  var position = ttag.position || TEMPLATE_TAG_POSITION.ELEMENT;
  if (position === TEMPLATE_TAG_POSITION.IN_ATTRIBUTE) {
    if (ttag.type === 'DOUBLE' || ttag.type === 'ESCAPE') {
      return;
    } else if (ttag.type === 'BLOCKOPEN') {
      var path = ttag.path;
      var path0 = path[0];
      if (! (path.length === 1 && (path0 === 'if' ||
                                   path0 === 'unless' ||
                                   path0 === 'with' ||
                                   path0 === 'each'))) {
        scanner.fatal("Custom block helpers are not allowed in an HTML attribute, only built-in ones like #each and #if");
      }
    } else {
      scanner.fatal(ttag.type + " template tag is not allowed in an HTML attribute");
    }
  } else if (position === TEMPLATE_TAG_POSITION.IN_START_TAG) {
    if (! (ttag.type === 'DOUBLE')) {
      scanner.fatal("Reactive HTML attributes must either have a constant name or consist of a single {{helper}} providing a dictionary of names and values.  A template tag of type " + ttag.type + " is not allowed here.");
    }
    if (scanner.peek() === '=') {
      scanner.fatal("Template tags are not allowed in attribute names, only in attribute values or in the form of a single {{helper}} that evaluates to a dictionary of name=value pairs.");
    }
  }

}
1073596
function toYAML (api, spaces, wrap) {
  const jsYaml = require("js-yaml");

  return jsYaml.dump(api, {
    indent: spaces,
    lineWidth: wrap,
    noRefs: true
  });
}
556843
def xincludeProcessTreeFlags(self, flags):
        
        ret = libxml2mod.xmlXIncludeProcessTreeFlags(self._o, flags)
        return ret
1314414
function createAttributeWrapper(gl, program, attributes, doLink) {
  var obj = {}
  for(var i=0, n=attributes.length; i<n; ++i) {
    var a = attributes[i]
    var name = a.name
    var type = a.type
    var location = gl.getAttribLocation(program, name)
    
    switch(type) {
      case 'bool':
      case 'int':
      case 'float':
        addVectorAttribute(gl, program, location, 1, obj, name, doLink)
      break
      
      default:
        if(type.indexOf('vec') >= 0) {
          var d = type.charCodeAt(type.length-1) - 48
          if(d < 2 || d > 4) {
            throw new Error('gl-shader: Invalid data type for attribute ' + name + ': ' + type)
          }
          addVectorAttribute(gl, program, location, d, obj, name, doLink)
        } else {
          throw new Error('gl-shader: Unknown data type for attribute ' + name + ': ' + type)
        }
      break
    }
  }
  return obj
}
1060201
private void compileTemplateString(ComponentExposedTypeGenerator exposedTypeGenerator,
      TemplateParserResult templateParserResult) {
    VueTemplateCompilerResult compilerResult;
    try {
      VueTemplateCompiler vueTemplateCompiler = new VueTemplateCompiler();
      compilerResult = vueTemplateCompiler.compile(templateParserResult.getProcessedTemplate());
    } catch (VueTemplateCompilerException e) {
      e.printStackTrace();
      throw new RuntimeException();
    }

    generateGetRenderFunction(exposedTypeGenerator, compilerResult, templateParserResult);
    generateGetStaticRenderFunctions(exposedTypeGenerator, compilerResult);
  }
629558
function(val, cx, partials, text, tags) {
      var compiler = this.c;
      var options = this.options;
      options.delimiters = tags;
      var t = val.call(cx, text, function(t) {
        return compiler.compile(t, options).render(cx, partials);
      });
      this.b(compiler.compile(t.toString(), options).render(cx, partials));
      return false;
    }
170527
function compileGraphQLTag(
  t: $FlowFixMe,
  path: Object,
  state: BabelState,
  ast: DocumentNode,
): void {
  if (ast.definitions.length !== 1) {
    throw new Error(
      'BabelPluginRelay: Expected exactly one definition per graphql tag.',
    );
  }
  const definition = ast.definitions[0];
  if (
    definition.kind !== 'FragmentDefinition' &&
    definition.kind !== 'OperationDefinition'
  ) {
    throw new Error(
      'BabelPluginRelay: Expected a fragment, mutation, query, or ' +
        'subscription, got `' +
        definition.kind +
        '`.',
    );
  }
  return replaceMemoized(t, path, createAST(t, state, path, definition));
}
1092767
@FFDCIgnore(Throwable.class)
    private static Object createEclipseNamespaceMapper(Class<?> mcls, Map<String, String> map) {
        ASMHelper helper = new ASMHelper();
        String className = "org.apache.cxf.jaxb.EclipseNamespaceMapper";
        String slashedName = "org/apache/cxf/jaxb/EclipseNamespaceMapper";
        Class<?> cls = helper.findClass(className, JAXBUtils.class);

        if (cls == null) {
            ClassWriter cw = helper.createClassWriter();
            if (cw == null) {
                return null;
            }
            String superName = "org/eclipse/persistence/internal/oxm/record/namespaces/MapNamespacePrefixMapper";
            FieldVisitor fv;
            MethodVisitor mv;
            cw.visit(Opcodes.V1_6,
                     Opcodes.ACC_PUBLIC + Opcodes.ACC_FINAL + Opcodes.ACC_SUPER,
                     slashedName, null,
                     superName, null);

            cw.visitSource("EclipseNamespaceMapper.java", null);

            fv = cw.visitField(Opcodes.ACC_PRIVATE, "nsctxt", "[Ljava/lang/String;", null, null);
            fv.visitEnd();


            mv = cw.visitMethod(Opcodes.ACC_PUBLIC, "<init>", "(Ljava/util/Map;)V",
                                "(Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;)V", null);
            mv.visitCode();
            Label l0 = helper.createLabel();
            mv.visitLabel(l0);
            mv.visitVarInsn(Opcodes.ALOAD, 0);
            mv.visitVarInsn(Opcodes.ALOAD, 1);
            mv.visitMethodInsn(Opcodes.INVOKESPECIAL,
                               superName, "<init>", "(Ljava/util/Map;)V", false);
            Label l1 = helper.createLabel();
            mv.visitLabel(l1);
            mv.visitInsn(Opcodes.RETURN);
            Label l2 = helper.createLabel();
            mv.visitLabel(l2);
            mv.visitMaxs(2, 2);
            mv.visitEnd();


            mv = cw.visitMethod(Opcodes.ACC_PUBLIC, "setContextualNamespaceDecls", "([Ljava/lang/String;)V",
                                null, null);
            mv.visitCode();
            l0 = helper.createLabel();
            mv.visitLabel(l0);
            mv.visitLineNumber(47, l0);
            mv.visitVarInsn(Opcodes.ALOAD, 0);
            mv.visitVarInsn(Opcodes.ALOAD, 1);
            mv.visitFieldInsn(Opcodes.PUTFIELD, slashedName, "nsctxt", "[Ljava/lang/String;");
            l1 = helper.createLabel();
            mv.visitLabel(l1);
            mv.visitLineNumber(48, l1);
            mv.visitInsn(Opcodes.RETURN);
            l2 = helper.createLabel();
            mv.visitLabel(l2);
            mv.visitLocalVariable("this", "L" + slashedName + ";", null, l0, l2, 0);
            mv.visitLocalVariable("contextualNamespaceDecls", "[Ljava/lang/String;", null, l0, l2, 1);
            mv.visitMaxs(2, 2);
            mv.visitEnd();

            mv = cw.visitMethod(Opcodes.ACC_PUBLIC, "getContextualNamespaceDecls", "()[Ljava/lang/String;", null, null);
            mv.visitCode();
            l0 = helper.createLabel();
            mv.visitLabel(l0);
            mv.visitLineNumber(51, l0);
            mv.visitVarInsn(Opcodes.ALOAD, 0);
            mv.visitFieldInsn(Opcodes.GETFIELD, slashedName, "nsctxt", "[Ljava/lang/String;");
            mv.visitInsn(Opcodes.ARETURN);
            l1 = helper.createLabel();

            mv.visitLabel(l1);
            mv.visitLocalVariable("this", "L" + slashedName + ";", null, l0, l1, 0);

            mv.visitMaxs(1, 1);
            mv.visitEnd();


            mv = cw.visitMethod(Opcodes.ACC_PUBLIC, "getPreDeclaredNamespaceUris", "()[Ljava/lang/String;", null, null);
            mv.visitCode();
            l0 = helper.createLabel();
            mv.visitLabel(l0);
            mv.visitLineNumber(1036, l0);
            mv.visitVarInsn(Opcodes.ALOAD, 0);
            mv.visitMethodInsn(Opcodes.INVOKESPECIAL,
                               superName,
                               "getPreDeclaredNamespaceUris", "()[Ljava/lang/String;", false);
            mv.visitVarInsn(Opcodes.ASTORE, 1);
            l1 = helper.createLabel();
            mv.visitLabel(l1);
            mv.visitLineNumber(1037, l1);
            mv.visitVarInsn(Opcodes.ALOAD, 0);
            mv.visitFieldInsn(Opcodes.GETFIELD, slashedName, "nsctxt", "[Ljava/lang/String;");
            l2 = helper.createLabel();
            mv.visitJumpInsn(Opcodes.IFNONNULL, l2);
            Label l3 = helper.createLabel();
            mv.visitLabel(l3);
            mv.visitLineNumber(1038, l3);
            mv.visitVarInsn(Opcodes.ALOAD, 1);
            mv.visitInsn(Opcodes.ARETURN);
            mv.visitLabel(l2);
            mv.visitLineNumber(1040, l2);
            mv.visitFrame(Opcodes.F_APPEND, 1, new Object[] {"[Ljava/lang/String;"}, 0, null);
            mv.visitTypeInsn(Opcodes.NEW, "java/util/ArrayList");
            mv.visitInsn(Opcodes.DUP);
            mv.visitVarInsn(Opcodes.ALOAD, 1);
            mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/util/Arrays", "asList",
                               "([Ljava/lang/Object;)Ljava/util/List;", false);
            mv.visitMethodInsn(Opcodes.INVOKESPECIAL, "java/util/ArrayList", "<init>", "(Ljava/util/Collection;)V", false);
            mv.visitVarInsn(Opcodes.ASTORE, 2);
            Label l4 = helper.createLabel();
            mv.visitLabel(l4);
            mv.visitLineNumber(1041, l4);
            mv.visitInsn(Opcodes.ICONST_1);
            mv.visitVarInsn(Opcodes.ISTORE, 3);
            Label l5 = helper.createLabel();
            mv.visitLabel(l5);
            Label l6 = helper.createLabel();
            mv.visitJumpInsn(Opcodes.GOTO, l6);
            Label l7 = helper.createLabel();
            mv.visitLabel(l7);
            mv.visitLineNumber(1042, l7);
            mv.visitFrame(Opcodes.F_APPEND, 2, new Object[] {"java/util/List", Opcodes.INTEGER}, 0, null);
            mv.visitVarInsn(Opcodes.ALOAD, 2);
            mv.visitVarInsn(Opcodes.ALOAD, 0);
            mv.visitFieldInsn(Opcodes.GETFIELD, slashedName, "nsctxt", "[Ljava/lang/String;");
            mv.visitVarInsn(Opcodes.ILOAD, 3);
            mv.visitInsn(Opcodes.AALOAD);
            mv.visitMethodInsn(Opcodes.INVOKEINTERFACE, "java/util/List", "remove", "(Ljava/lang/Object;)Z", true);
            mv.visitInsn(Opcodes.POP);
            Label l8 = helper.createLabel();
            mv.visitLabel(l8);
            mv.visitLineNumber(1041, l8);
            mv.visitIincInsn(3, 2);
            mv.visitLabel(l6);
            mv.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            mv.visitVarInsn(Opcodes.ILOAD, 3);
            mv.visitVarInsn(Opcodes.ALOAD, 0);
            mv.visitFieldInsn(Opcodes.GETFIELD,
                              slashedName,
                              "nsctxt", "[Ljava/lang/String;");
            mv.visitInsn(Opcodes.ARRAYLENGTH);
            mv.visitJumpInsn(Opcodes.IF_ICMPLT, l7);
            Label l9 = helper.createLabel();
            mv.visitLabel(l9);
            mv.visitLineNumber(1044, l9);
            mv.visitVarInsn(Opcodes.ALOAD, 2);
            mv.visitVarInsn(Opcodes.ALOAD, 2);
            mv.visitMethodInsn(Opcodes.INVOKEINTERFACE, "java/util/List", "size", "()I", true);
            mv.visitTypeInsn(Opcodes.ANEWARRAY, "java/lang/String");
            mv.visitMethodInsn(Opcodes.INVOKEINTERFACE, "java/util/List",
                               "toArray", "([Ljava/lang/Object;)[Ljava/lang/Object;", true);
            mv.visitTypeInsn(Opcodes.CHECKCAST, "[Ljava/lang/String;");
            mv.visitInsn(Opcodes.ARETURN);
            Label l10 = helper.createLabel();
            mv.visitLabel(l10);
            mv.visitLocalVariable("this", "L" + slashedName + ";",
                                  null, l0, l10, 0);
            mv.visitLocalVariable("sup", "[Ljava/lang/String;", null, l1, l10, 1);
            mv.visitLocalVariable("s", "Ljava/util/List;", "Ljava/util/List<Ljava/lang/String;>;", l4, l10, 2);
            mv.visitLocalVariable("x", "I", null, l5, l9, 3);
            mv.visitMaxs(3, 4);
            mv.visitEnd();

            cw.visitEnd();

            byte[] bts = cw.toByteArray();
            cls = helper.loadClass(className,
                                   mcls, bts);
        }
        try {
            return cls.getConstructor(Map.class).newInstance(map);
        } catch (Throwable e) {
            e.printStackTrace();
            return null;
        }
    }
299637
public BytecodeNode compile(RowExpression rowExpression, Scope scope, Optional<Variable> outputBlockVariable, Optional<Class> lambdaInterface)
    {
        return rowExpression.accept(new Visitor(), new Context(scope, outputBlockVariable, lambdaInterface));
    }
461301
def xincludeProcessFlags(self, flags):
        
        ret = libxml2mod.xmlXIncludeProcessFlags(self._o, flags)
        return ret
1311748
function (token, context, chain) {

			var i ,
				len ,
				files = [] ,
				output = '' ,
				viewData = Object.create(context) ,
				env = container.getParameter('kernel.environment') ,
				data = container.get('assets.template.helper.assets')
								.assets(token.files[0], token.files[1], token.files[2], false);

			if (env === 'development') {

				// dev environments print all of the files one-by-one
				data.files.forEach(function(file) {
					files.push(file + '?' + data.versionParameter + '=' + data.version);
				});

			} else {

				// prod or test print the combined file only
				files = [data.combinedFile];

			}

			// render the output one file at a time, respectively injecting URL into each
			for (i = 0, len = files.length; i < len; i++) {
				viewData.url = files[i];
				output += Twig.parse.apply(this, [token.output, viewData]);
			}

			return {
				chain: chain,
				output: output
			};
		}
874627
def parse(cls, parser, token):
        
        # Process the template line.
        tag_name, args, kwargs = parse_token_kwargs(
            parser, token,
            allowed_kwargs=cls.allowed_kwargs,
            compile_args=False,  # Only overrule here, keep at render() phase.
            compile_kwargs=cls.compile_kwargs
        )

        # remove "for" keyword, so all other args can be resolved in render().
        if args[0] == 'for':
            args.pop(0)

        # And apply the compilation afterwards
        for i in range(len(args)):
            args[i] = parser.compile_filter(args[i])

        cls.validate_args(tag_name, *args, **kwargs)
        return cls(tag_name, *args, **kwargs)
190516
@VisibleForTesting
  public static Tagger getTagger(String implementation) {
    if (implementation.equals("impl")) {
      // We can return the global tracer here because if impl is linked the global tracer will be
      // the impl one.
      // TODO(bdrutu): Make everything not be a singleton (disruptor, etc.) and use a new
      // TraceComponentImpl similar to TraceComponentImplLite.
      return tagsComponentImplBase.getTagger();
    } else if (implementation.equals("impl-lite")) {
      return tagsComponentImplLite.getTagger();
    } else {
      throw new RuntimeException("Invalid tagger implementation specified.");
    }
  }
338763
function inTemplateTag(line) {
                if (line <= 1) {
                    return false
                }
                const lineStartIndex = sourceCode.getIndexFromLoc({
                    line,
                    column: 0,
                })
                return microTemplateService.inTemplateTag(lineStartIndex - 1)
            }
398271
function renderTemplate(engine, filePath, content, context) {
    context = context || {};

    // Mutable objects to contains all blocks requiring post-processing
    var blocks = {};

    // Create nunjucks environment
    var env = engine.toNunjucks(blocks);

    // Replace shortcuts from plugin's blocks
    content = replaceShortcuts(engine.getBlocks(), filePath, content);

    return timing.measure(
        'template.render',

        Promise.nfcall(
            env.renderString.bind(env),
            content,
            context,
            {
                path: filePath
            }
        )
        .then(function(content) {
            return TemplateOutput.create(content, blocks);
        })
    );
}