Structs are always stored inline, so need to be created right
        where they are used. You'll get this error if you created it
        elsewhere.
6171
def assertStructIsInline(self, obj):
        

        N.enforce_number(obj, N.UOffsetTFlags)
        if obj != self.Offset():
            msg = ("flatbuffers: Tried to write a Struct at an Offset that "
                   "is different from the current Offset of the Builder.")
            raise StructIsNotInlineError(msg)
497664
private StructImpl store(Class clazz) {
	Field[] fieldsArr = clazz.getFields();
	StructImpl fieldsMap = new StructImpl();
	for (int i = 0; i < fieldsArr.length; i++) {
	    storeField(fieldsArr[i], fieldsMap);
	}
	map.put(clazz, fieldsMap);
	return fieldsMap;
    }
1366763
def add_struct(struct)
      raise ArgumentError, "Invalid argument 'struct'. Expected StructureSet, got #{struct.class}." unless struct.is_a?(StructureSet)
      # Do not add it again if the struct already belongs to this instance:
      @structs << struct unless @associated_structs[struct.uid]
      @associated_structs[struct.uid] = struct
    end
1358364
function createNonRecoverableUserError(
  message: string,
  locations?: ?$ReadOnlyArray<Location>,
  nodes?: ?$ReadOnlyArray<ASTNode>,
): NonRecoverableUserError {
  let messageWithLocations = message;
  if (locations != null) {
    const printedLocations = printLocations(locations);
    messageWithLocations =
      printedLocations.length === 0
        ? message
        : [message, ...printedLocations].join('\n\n') + '\n';
  }
  const error = new GraphQLError(messageWithLocations, nodes ?? []);
  return new Error(error.message);
}
885740
function createFrame (type, payload) {
  var err = validateArgs(type, payload);
  if (err) { throw err; }

  var payloadBuffer = Buffer.isBuffer(payload) ? payload : new Buffer(payload);
  var headerBuffer  = createHeader(type, payload.length);

  return Buffer.concat([headerBuffer, payloadBuffer]);
}
1055733
function(opath, context) {
		var result, struct = context || self;
		if (gui.Type.isString(opath)) {
			if (!opath.contains(".")) {
				result = struct[opath];
			} else {
				var parts = opath.split(".");
				parts.every(function(part) {
					struct = struct[part];
					return gui.Type.isDefined(struct);
				});
				result = struct;
			}
		} else {
			throw new TypeError("Expected string, got " + gui.Type.of(opath));
		}
		return result;
	}
210836
def todict_using_struct(self, dict_struct=None, dict_post_processors=None):
        
        # It is important to assign the passed kwarg to a differently named variable.
        # A dict is passed by reference and using the same kwarg here results in it
        # getting mutated - causing unforeseen side effects
        dict_struct_to_use = (
            self._dict_struct_ if dict_struct is None
            else dict_struct)
        if dict_struct_to_use is None and self._autogenerate_dict_struct_if_none_:
            dict_struct_to_use = self.autogenerated_dict_structure()
        elif dict_struct.get("attrs") is None:
            dict_struct_to_use = {}
            dict_struct_to_use["attrs"] = self.autogenerated_dict_structure()["attrs"]
            if "rels" in dict_struct:
                dict_struct_to_use["rels"] = dict_struct.get("rels")
        result = self.serialize_attrs(*dict_struct_to_use.get('attrs', []))
        for rel, rel_dict_struct in dict_struct_to_use.get('rels', {}).items():
            rel_obj = getattr(self, rel) if hasattr(self, rel) else None
            if rel_obj is not None:
                if is_list_like(rel_obj):
                    result[rel] = [i.todict_using_struct(dict_struct=rel_dict_struct)
                                   if hasattr(i, 'todict_using_struct') else i
                                   for i in rel_obj]
                elif is_dict_like(rel_obj):
                    result[rel] = {k: v.todict_using_struct(dict_struct=rel_dict_struct)
                                   if hasattr(v, 'todict_using_struct') else v
                                   for k, v in rel_obj.iteritems()}
                else:
                    result[rel] = rel_obj.todict_using_struct(
                        dict_struct=rel_dict_struct) if hasattr(
                        rel_obj, 'todict_using_struct') else rel_obj
            else:
                result[rel] = None
        if isinstance(dict_post_processors, list):
            for dict_post_processor in dict_post_processors:
                if callable(dict_post_processor):
                    result = dict_post_processor(result, self)
        return result
954239
function ZoneAwareError() {
        // make sure we have a valid this
        // if this is undefined(call Error without new) or this is global
        // or this is some other objects, we should force to create a
        // valid ZoneAwareError by call Object.create()
        if (!(this instanceof ZoneAwareError)) {
            return ZoneAwareError.apply(Object.create(ZoneAwareError.prototype), arguments);
        }
        // Create an Error.
        var error = NativeError.apply(this, arguments);
        this[__symbol__('error')] = error;
        // Save original stack trace
        error.originalStack = error.stack;
        // Process the stack trace and rewrite the frames.
        if (ZoneAwareError[stackRewrite] && error.originalStack) {
            var frames_1 = error.originalStack.split('\n');
            var zoneFrame = _currentZoneFrame;
            var i = 0;
            // Find the first frame
            while (frames_1[i] !== zoneAwareFrame && i < frames_1.length) {
                i++;
            }
            for (; i < frames_1.length && zoneFrame; i++) {
                var frame = frames_1[i];
                if (frame.trim()) {
                    var frameType = blackListedStackFrames.hasOwnProperty(frame) && blackListedStackFrames[frame];
                    if (frameType === FrameType.blackList) {
                        frames_1.splice(i, 1);
                        i--;
                    }
                    else if (frameType === FrameType.transition) {
                        if (zoneFrame.parent) {
                            // This is the special frame where zone changed. Print and process it accordingly
                            frames_1[i] += " [" + zoneFrame.parent.zone.name + " => " + zoneFrame.zone.name + "]";
                            zoneFrame = zoneFrame.parent;
                        }
                        else {
                            zoneFrame = null;
                        }
                    }
                    else {
                        frames_1[i] += " [" + zoneFrame.zone.name + "]";
                    }
                }
            }
            error.stack = error.zoneAwareStack = frames_1.join('\n');
        }
        // use defineProperties here instead of copy property value
        // because of issue #595 which will break angular2.
        Object.defineProperties(this, getErrorPropertiesForPrototype(Object.getPrototypeOf(this)));
        return this;
    }
247117
def _generate_struct_serializer(self, struct):
        """"""
        struct_name = fmt_class_prefix(struct)

        with self.block_func(
                func='serialize',
                args=fmt_func_args_declaration([('valueObj',
                                                 '{} *'.format(struct_name))]),
                return_type='NSDictionary<NSString *, id> *',
                class_func=True):
            if not struct.all_fields and not struct.has_enumerated_subtypes():
                self.emit('#pragma unused(valueObj)')

            self.emit(
                'NSMutableDictionary *jsonDict = [[NSMutableDictionary alloc] init];'
            )
            self.emit()
            for field in struct.all_fields:
                data_type, nullable = unwrap_nullable(field.data_type)

                input_value = 'valueObj.{}'.format(fmt_var(field.name))
                serialize_call = self._fmt_serialization_call(
                    field.data_type, input_value, True)

                if not nullable:
                    if is_primitive_type(data_type):
                        self.emit('jsonDict[@"{}"] = {};'.format(
                            field.name, input_value))
                    else:
                        self.emit('jsonDict[@"{}"] = {};'.format(
                            field.name, serialize_call))
                else:
                    with self.block('if ({})'.format(input_value)):
                        self.emit('jsonDict[@"{}"] = {};'.format(
                            field.name, serialize_call))
            self.emit()

            if struct.has_enumerated_subtypes():
                first_block = True
                for tags, subtype in struct.get_all_subtypes_with_tags():
                    assert len(tags) == 1, tags
                    tag = tags[0]
                    base_condition = '{} ([valueObj isKindOfClass:[{} class]])'
                    with self.block(
                            base_condition.format('if' if first_block else
                                                  'else if',
                                                  fmt_class_prefix(subtype))):
                        if first_block:
                            first_block = False
                        func_args = fmt_func_args([('value',
                            '({} *)valueObj'.format(
                                fmt_class_prefix(
                                    subtype)))])
                        caller = fmt_serial_class(fmt_class_prefix(subtype))
                        serialize_call = fmt_func_call(
                            caller=caller, callee='serialize', args=func_args)
                        self.emit('NSDictionary *subTypeFields = {};'.format(
                            serialize_call))
                        with self.block(
                                'for (NSString* key in subTypeFields)'):
                            self.emit('jsonDict[key] = subTypeFields[key];')
                        self.emit(
                            'jsonDict[@".tag"] = @"{}";'.format(fmt_var(tag)))
                self.emit()
            self.emit('return [jsonDict count] > 0 ? jsonDict : nil;')
        self.emit()
966611
func structOnlyError(t reflect.Type) error {
	isStruct := t.Kind() == reflect.Struct
	isScanner := reflect.PtrTo(t).Implements(_unmarshallerInterface)
	if !isStruct {
		return fmt.Errorf("expected %s but got %s", reflect.Struct, t.Kind())
	}
	if isScanner {
		return fmt.Errorf("structscan expects a struct dest but the provided struct type %s implements unmarshaler", t.Name())
	}
	return fmt.Errorf("expected a struct, but struct %s has no exported fields", t.Name())
}
218303
function completeValueWithLocatedError(
  exeContext: ExecutionContext,
  returnType: GraphQLType,
  fieldNodes: Array<FieldNode>,
  info: GraphQLResolveInfo,
  path: ResponsePath,
  result: mixed,
  parentDirectiveTree: DirectiveTree,
  execDetails: ObjMap<mixed>
): mixed {
  try {
    const completed = completeValue(
      exeContext,
      returnType,
      fieldNodes,
      info,
      path,
      result,
      parentDirectiveTree,
      execDetails
    );
    const promise = getPromise(completed);
    if (promise) {
      return promise.then(
        undefined,
        error => Promise.reject(
          locatedError(error, fieldNodes, responsePathAsArray(path))
        )
      );
    }
    return completed;
  } catch (error) {
    throw locatedError(error, fieldNodes, responsePathAsArray(path));
  }
}
1127332
def p_struct(self, p):
        ''''''
        p[0] = ast.Struct(
            name=p[2], fields=p[4], annotations=p[6], lineno=p.lineno(2)
        )
1003396
function StoreError(type, message) {
  this.name = StoreError.name;
  Error.call(this);
  type = type || ERR;
  message = type + ' ' + (message || 'unknown internal error');
  if(arguments.length > 2) {
    var args = [message].concat([].slice.call(arguments, 2));
    message = util.format.apply(util, args);
  }
  this.message = message;
}
287228
void stat(char[] fmt, String src) throws IOException {
    Path srcPath = new Path(src);
    FileSystem srcFs = srcPath.getFileSystem(getConf());
    FileStatus glob[] = srcFs.globStatus(srcPath);
    if (null == glob)
      throw new IOException("cannot stat `" + src + "': No such file or directory");
    for (FileStatus f : glob) {
      StringBuilder buf = new StringBuilder();
      for (int i = 0; i < fmt.length; ++i) {
        if (fmt[i] != '%') {
          buf.append(fmt[i]);
        } else {
          if (i + 1 == fmt.length) break;
          switch(fmt[++i]) {
            case 'b':
              buf.append(f.getLen());
              break;
            case 'F':
              buf.append(f.isDir() ? "directory" : "regular file");
              break;
            case 'n':
              buf.append(f.getPath().getName());
              break;
            case 'o':
              buf.append(f.getBlockSize());
              break;
            case 'r':
              buf.append(f.getReplication());
              break;
            case 'y':
              buf.append(modifFmt.format(new Date(f.getModificationTime())));
              break;
            case 'Y':
              buf.append(f.getModificationTime());
              break;
            default:
              buf.append(fmt[i]);
              break;
          }
        }
      }
      System.out.println(buf.toString());
    }
  }
1037339
private void saveToContext(Context context, boolean updateSiteStructure) {
		ParameterParser urlParamParser = context.getUrlParamParser();
		ParameterParser formParamParser = context.getPostParamParser();
		List<String> structParams = new ArrayList<String>();
		List<StructuralNodeModifier> ddns = new ArrayList<StructuralNodeModifier>();
		
		for (StructuralNodeModifier snm : this.ddnTableModel.getElements()) {
			if (snm.getType().equals(StructuralNodeModifier.Type.StructuralParameter)) {
				structParams.add(snm.getName());
			} else {
				ddns.add(snm);
			}
		}

		if (urlParamParser instanceof StandardParameterParser) {
			StandardParameterParser urlStdParamParser = (StandardParameterParser) urlParamParser;
			urlStdParamParser.setKeyValuePairSeparators(this.getUrlKvPairSeparators().getText());
			urlStdParamParser.setKeyValueSeparators(this.getUrlKeyValueSeparators().getText());

			urlStdParamParser.setStructuralParameters(structParams);

			context.setUrlParamParser(urlStdParamParser);
			urlStdParamParser.setContext(context);
		}
		if (formParamParser instanceof StandardParameterParser) {
			StandardParameterParser formStdParamParser = (StandardParameterParser) formParamParser;
			formStdParamParser.setKeyValuePairSeparators(this.getPostKvPairSeparators().getText());
			formStdParamParser.setKeyValueSeparators(this.getPostKeyValueSeparators().getText());
			context.setPostParamParser(formStdParamParser);
			formStdParamParser.setContext(context);
		}
		
		context.setDataDrivenNodes(ddns);
		
		if (updateSiteStructure) {
			context.restructureSiteTree();
		}
	}
1199394
private String _serializeStruct(Struct struct, Map<Object, String> done, String id) throws ConverterException {
	StringBuilder sb = new StringBuilder(goIn() + "<STRUCT ID=\"" + id + "\">");

	Iterator<Key> it = struct.keyIterator();

	deep++;
	while (it.hasNext()) {
	    Key key = it.next();
	    // <ENTRY NAME="STRING" TYPE="STRING">hello</ENTRY>
	    String value = _serialize(struct.get(key, null), done);
	    sb.append(goIn() + "<ENTRY NAME=\"" + key.toString() + "\" TYPE=\"" + type + "\">");
	    sb.append(value);
	    sb.append(goIn() + "</ENTRY>");
	}
	deep--;

	sb.append(goIn() + "</STRUCT>");
	type = "STRUCT";
	return sb.toString();
    }
961259
function SError()
{
	var args, obj, parsed, options;

	args = Array.prototype.slice.call(arguments, 0);
	if (!(this instanceof SError)) {
		obj = Object.create(SError.prototype);
		SError.apply(obj, arguments);
		return (obj);
	}

	parsed = parseConstructorArguments({
	    'argv': args,
	    'strict': true
	});

	options = parsed.options;
	VError.call(this, options, '%s', parsed.shortmessage);

	return (this);
}