Returns the provenance stack given the iden to it
969016
def getProvStack(self, iden: bytes):
        '''
        
        '''
        retn = self.slab.get(iden, db=self.db)
        if retn is None:
            return None

        return s_msgpack.un(retn)
159093
private StepIdentifier generateIdentifier(List<Pair<StepContextId, INodeEntry>> stack) {
        List<StepContextId> ctxs = new ArrayList<>();
        int i = 0;
        for (Pair<StepContextId, INodeEntry> pair : stack) {
            Map<String, String> params = null;
            if (null != pair.getSecond() && i < stack.size() - 1) {
                //include node as a parameter to the context only when it is an intermediate step,
                // i.e. a parent in the sequence
                params = new HashMap<>();
                params.put("node", pair.getSecond().getNodename());
            }
            ctxs.add(StateUtils.stepContextId(pair.getFirst().getStep(), !pair.getFirst().getAspect().isMain(),
                                              params
            ));
            i++;
        }
        return StateUtils.stepIdentifier(ctxs);
    }
581740
function getDebugInfo (func, stackLevel) {
  try {
    const orig = Error.prepareStackTrace
    Error.prepareStackTrace = function (_, stack) {
      return stack
    }
    const err = new Error()
    const stack = err.stack
    Error.prepareStackTrace = orig
    const stackItem = stack[stackLevel]
    return {
      line: stackItem.getLineNumber(),
      fileName: stackItem.getFileName(),
      parentFunctionName: stackItem.getFunctionName(),
      functionName: typeof func === 'function' ? func.name : null
    }
  } catch (e) {
    return {}
  }
}
119812
def show_stack(name=None, profile=None):
    '''
    
    '''
    h_client = _auth(profile)
    if not name:
        return {
            'result': False,
            'comment':
                'Parameter name missing or None'
            }
    try:
        ret = {}
        stack = h_client.stacks.get(name)
        links = {}
        for link in stack.links:
            links[link['rel']] = link['href']
        ret[stack.stack_name] = {
            'status': stack.stack_status,
            'id': stack.id,
            'name': stack.stack_name,
            'creation': stack.creation_time,
            'owner': stack.stack_owner,
            'reason': stack.stack_status_reason,
            'parameters': stack.parameters,
            'links': links,
        }
        ret['result'] = True
    except heatclient.exc.HTTPNotFound:
        return {
            'result': False,
            'comment': 'No stack {0}'.format(name)
            }
    return ret
1321767
private static Stack<UIContext> getStack() {
		Stack<UIContext> stack = CONTEXT_STACK.get();

		if (stack == null) {
			stack = new Stack<>();
			CONTEXT_STACK.set(stack);
		}

		return stack;
	}
1267759
function getPathStack() {
	return (module.parent || module).paths.map(function(path) {
		return lop(path)
	}).filter(function(path) {
		return (path !== '');
	});
}
1247923
def get_root(self):
        """"""
        if self.is_root_node():
            return self

        return self.get_ancestors().order_by(
            "-%s__depth" % self._closure_parentref()
        )[0]
353596
public String getStack()
    {
        if (_string==null)
        {
            StringBuffer buf= new StringBuffer(512);
            
            for (int i=0;i<_stack.length;i++)
            {
                if (i>_top)
                    buf.append(__lineSeparator);
                buf.append(_stack[i].toString());
            }
            _string=buf.toString();
        }
        
        return _string;
    }
72780
private Node getNestedNode(ArchivePath path) {
        // Iterate through nested archives
        for (Entry<ArchivePath, ArchiveAsset> nestedArchiveEntry : nestedArchives.entrySet()) {
            ArchivePath archivePath = nestedArchiveEntry.getKey();
            ArchiveAsset archiveAsset = nestedArchiveEntry.getValue();

            // Check to see if the requested path starts with the nested archive path
            if (startsWith(path, archivePath)) {
                Archive<?> nestedArchive = archiveAsset.getArchive();

                // Get the asset path from within the nested archive
                ArchivePath nestedAssetPath = getNestedPath(path, archivePath);

                // Recurse the call to the nested archive
                return nestedArchive.get(nestedAssetPath);
            }
        }
        return null;
    }
117107
def collect_impl(self):
        

        ld = self.ldata
        rd = self.rdata
        deep = not self.shallow

        for event, entry in compare(ld, rd):
            if deep and fnmatches(entry, *JAR_PATTERNS):
                if event == LEFT:
                    yield DistJarRemoved(ld, rd, entry)
                elif event == RIGHT:
                    yield DistJarAdded(ld, rd, entry)
                elif event == DIFF:
                    yield DistJarChange(ld, rd, entry, True)
                elif event == SAME:
                    yield DistJarChange(ld, rd, entry, False)

            elif deep and fnmatches(entry, "*.class"):
                if event == LEFT:
                    yield DistClassRemoved(ld, rd, entry)
                elif event == RIGHT:
                    yield DistClassAdded(ld, rd, entry)
                elif event == DIFF:
                    yield DistClassChange(ld, rd, entry, True)
                elif event == SAME:
                    yield DistClassChange(ld, rd, entry, False)

            elif deep and fnmatches(entry, *TEXT_PATTERNS):
                if event == LEFT:
                    yield DistContentRemoved(ld, rd, entry)
                elif event == RIGHT:
                    yield DistContentAdded(ld, rd, entry)
                elif event == DIFF:
                    yield DistTextChange(ld, rd, entry)
                elif event == SAME:
                    yield DistTextChange(ld, rd, entry, False)

            elif deep and fnmatches(entry, "*/MANIFEST.MF"):
                if event == LEFT:
                    yield DistContentRemoved(ld, rd, entry)
                elif event == RIGHT:
                    yield DistContentAdded(ld, rd, entry)
                elif event == DIFF:
                    yield DistManifestChange(ld, rd, entry, True)
                elif event == SAME:
                    yield DistManifestChange(ld, rd, entry, False)

            else:
                if event == LEFT:
                    yield DistContentRemoved(ld, rd, entry)
                elif event == RIGHT:
                    yield DistContentAdded(ld, rd, entry)
                elif event == DIFF:
                    yield DistContentChange(ld, rd, entry, True)
                elif event == SAME:
                    yield DistContentChange(ld, rd, entry, False)
199910
def _get_stack_info_for_trace(
        self,
        frames,
        library_frame_context_lines=None,
        in_app_frame_context_lines=None,
        with_locals=True,
        locals_processor_func=None,
    ):
        """"""
        return list(
            iterate_with_template_sources(
                frames,
                with_locals=with_locals,
                library_frame_context_lines=library_frame_context_lines,
                in_app_frame_context_lines=in_app_frame_context_lines,
                include_paths_re=self.include_paths_re,
                exclude_paths_re=self.exclude_paths_re,
                locals_processor_func=locals_processor_func,
            )
        )
232979
function parseStacktrace(e, scriptName) {
    var UNKNOWN_FUNCTION = '<unknown>';
    var node = /^\s*at (?:((?:\[object object\])?\S+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;
    var lines = e.stacktrace.split('\n');
    var stack = [];
    var parts;
    var element;

    for (var i = 0, j = lines.length; i < j; ++i) {
        if ((parts = node.exec(lines[i]))) {
            element = {
                'file': parts[2],
                'method': parts[1] || UNKNOWN_FUNCTION,
                'line': parts[2] === scriptName ? +parts[3] - scriptContentLineOffset : +parts[3],
                'column': parts[4] ? +parts[4] : null
            };
        } else {
            continue;
        }
        stack.push(element);
    }

    return stack;
}
1169886
def parsed_stack(self):
        
        if 'parsedStack' in self._values:
            return self._values['parsedStack']
        self._values['parsedStack'] = copy.deepcopy(self._defaults['parsedStack'])
        return self._values['parsedStack']
157907
byte[] popOne() throws GeneratorException {
        try {
            return idStack.pop();
        } catch (NoSuchElementException e) {
            // Cached stack is empty, load up a fresh stack.
            idStack.addAll(generator.batch(batchSize));
            return popOne();
        }
    }
286126
function() {
				var doc = this;
				var stack = [];

				_.forEach(model.$oids, function(fkType, schemaPath) {
					if (fkType.type == 'subDocument') return; // Skip sub-documents (as they are stored against the parent anyway)

					stack = stack.concat(doc.getNodesBySchemaPath(schemaPath)
						.map(function(node) {
							node.fkType = fkType.type;
							return node;
						})
					);
				});
				return stack;
			}
997749
def get_stacks(self):
        
        if not hasattr(self, "_stacks"):
            stacks = []
            definitions = self._get_stack_definitions()
            for stack_def in definitions:
                stack = Stack(
                    definition=stack_def,
                    context=self,
                    mappings=self.mappings,
                    force=stack_def.name in self.force_stacks,
                    locked=stack_def.locked,
                    enabled=stack_def.enabled,
                    protected=stack_def.protected,
                )
                stacks.append(stack)
            self._stacks = stacks
        return self._stacks
1091754
def _get_value(self, exc_type, exc_value, exc_traceback):
        
        stack_info = get_stack_info(
            iter_traceback_frames(exc_traceback),
            transformer=self.transform,
            capture_locals=self.client.capture_locals,
        )

        exc_module = getattr(exc_type, '__module__', None)
        if exc_module:
            exc_module = str(exc_module)
        exc_type = getattr(exc_type, '__name__', '<unknown>')

        return {
            'value': to_unicode(exc_value),
            'type': str(exc_type),
            'module': to_unicode(exc_module),
            'stacktrace': stack_info,
        }