Adds an issue to the trace graph along with relevant information
        pertaining to the issue (e.g. instance, fix_info, sources/sinks)
        The issue is identified by its corresponding instance's ID in the input
        trace graph.
186089
def _populate_issue(self, graph: TraceGraph, instance_id: int) -> None:
        
        instance = graph._issue_instances[instance_id]
        issue = graph._issues[instance.issue_id.local_id]
        self._populate_shared_text(graph, instance.message_id)
        self._populate_shared_text(graph, instance.filename_id)
        self._populate_shared_text(graph, instance.callable_id)

        self.add_issue_instance(instance)
        self.add_issue(issue)

        if instance_id in graph._issue_instance_fix_info:
            issue_fix_info = graph._issue_instance_fix_info[instance_id]
            self.add_issue_instance_fix_info(instance, issue_fix_info)

        for shared_text_id in graph._issue_instance_shared_text_assoc[instance_id]:
            shared_text = graph._shared_texts[shared_text_id]
            if shared_text_id not in self._shared_texts:
                self.add_shared_text(shared_text)
            self.add_issue_instance_shared_text_assoc(instance, shared_text)
208812
def relevant_issues(issues, after):
    """"""
    logging.info('finding relevant issues after {}...'.format(after))
    seen = set()
    for issue in issues:
        if relevent_issue(issue, after) and issue['title'] not in seen:
            seen.add(issue['title'])
            yield issue
1085404
public void addVertex(JobVertex vertex) {
		final JobVertexID id = vertex.getID();
		JobVertex previous = taskVertices.put(id, vertex);

		// if we had a prior association, restore and throw an exception
		if (previous != null) {
			taskVertices.put(id, previous);
			throw new IllegalArgumentException("The JobGraph already contains a vertex with that id.");
		}
	}
665989
def insert(self, identified):
        

        if not isinstance(identified, self._class):
            raise self.Error("Passed instance is not of the needed class",
                             self.Error.INVALID_INSTANCE_CLASS, instance=identified)

        try:
            if self._objects[identified.key] != identified:
                raise self.Error("Passes instance's key '%s' is already occupied" % identified.key,
                                 self.Error.KEY_EXISTS, key=identified.key, instance=identified)
        except KeyError:
            self._objects[identified.key] = identified
            self._events.insert.trigger(list=self, instance=identified)
        return identified
860476
public void addDiagnosticInfo(TaskAttemptID taskId, String diagInfo) {
    List<String> diagHistory = taskDiagnosticData.get(taskId);
    if (diagHistory == null) {
      diagHistory = new ArrayList<String>();
      taskDiagnosticData.put(taskId, diagHistory);
    }
    diagHistory.add(diagInfo);
  }
942091
def add_node(self, id, label=None, type='CLASS', meta=None):
        
        g = self.get_graph()
        if meta is None:
            meta={}
        g.add_node(id, label=label, type=type, meta=meta)
792994
def issue_add(lancet, assign, add_to_sprint, summary):
    
    summary = " ".join(summary)
    issue = create_issue(
        lancet,
        summary,
        # project_id=project_id,
        add_to_active_sprint=add_to_sprint,
    )
    if assign:
        if assign == "me":
            username = lancet.tracker.whoami()
        else:
            username = assign
        assign_issue(lancet, issue, username)

    click.echo("Created issue")
464011
public Issue issue(String name, Retrospective retrospective, Map<String, Object> attributes) {
        Issue issue = new Issue(instance);

        issue.setName(name);
        issue.setProject(retrospective.getProject());
        addAttributes(issue, attributes);
        issue.save();
        issue.getRetrospectives().add(retrospective);
        return issue;
    }
655697
def editissue(self, project_id, issue_id, **kwargs):
        
        data = {'id': project_id, 'issue_id': issue_id}
        if kwargs:
            data.update(kwargs)
        request = requests.put(
            '{0}/{1}/issues/{2}'.format(self.projects_url, project_id, issue_id),
            headers=self.headers, data=data, verify=self.verify_ssl, auth=self.auth, timeout=self.timeout)

        if request.status_code == 200:
            return request.json()
        else:
            return False
32084
def _populate_trace(self, graph: TraceGraph, trace_frame_ids: List[int]) -> None:
        
        while len(trace_frame_ids) > 0:
            trace_frame_id = trace_frame_ids.pop()
            if trace_frame_id in self._visited_trace_frame_ids:
                continue

            trace_frame = graph._trace_frames[trace_frame_id]
            self._add_trace_frame(graph, trace_frame)
            self._visited_trace_frame_ids.add(trace_frame_id)

            key = (trace_frame.callee_id.local_id, trace_frame.callee_port)
            trace_frame_ids.extend(
                [
                    trace_frame_id
                    for trace_frame_id in graph._trace_frames_map[key]
                    if trace_frame_id not in self._visited_trace_frame_ids
                    and graph._trace_frames[trace_frame_id].kind == trace_frame.kind
                ]
            )
1268841
def add_problem_hparams(hparams, problem_name_or_instance):
  """"""
  if isinstance(problem_name_or_instance, problem_lib.Problem):
    problem = problem_name_or_instance
  else:
    problem = registry.problem(problem_name_or_instance)
  p_hparams = problem.get_hparams(hparams)
  hparams.problem = problem
  hparams.problem_hparams = p_hparams
212206
def add_data_to_repository(graph, repo=nil)

      repo ||= RDF::Repository.new()

      graph.each_statement do |statement|
        repo << statement
      end

      repo
    end
1157403
def _add_edge(self, source, target, **kwargs):
        """"""
        # Start with default edge properties
        edge_properties = self.edge_properties
        # Overwrite ones that are given in function call explicitly
        for k, v in kwargs.items():
            edge_properties[k] = v
        self.graph.add_edge(source, target, **edge_properties)
444035
def add_graph(self, other):
        
        self.add_nodes( n for n in other.nodes() if not n in self.nodes() )
        
        for each_node in other.nodes():
            for each_edge in other.neighbors(each_node):
                if (not self.has_edge((each_node, each_edge))):
                    self.add_edge((each_node, each_edge))
714920
def problem_id(self, value):
        
        if value == self._defaults['problemId'] and 'problemId' in self._values:
            del self._values['problemId']
        else:
            self._values['problemId'] = value
729286
def add_unmapped_section(issues)
      unless issues.empty?
        # Distinguish between issues and pull requests
        if issues.first.key?("pull_request")
          name = "merged"
          prefix = @options[:merge_prefix]
          add_wo_labels = @options[:add_pr_wo_labels]
        else
          name = "issues"
          prefix = @options[:issue_prefix]
          add_wo_labels = @options[:add_issues_wo_labels]
        end
        add_issues = if add_wo_labels
                       issues
                     else
                       # Only add unmapped issues
                       issues.select { |issue| issue["labels"].any? }
                     end
        merged = Section.new(name: name, prefix: prefix, labels: [], issues: add_issues, options: @options) unless add_issues.empty?
        @sections << merged
      end
      nil
    end
668589
def create_issue(self, request, group, form_data, **kwargs):
        
        instance = self.get_option('instance', group.project)
        project = (
            form_data.get('project') or
            self.get_option('default_project', group.project)
        )

        client = self.get_client(request.user)

        title = form_data['title']
        description = form_data['description']
        link = absolute_uri(group.get_absolute_url(params={'referrer': 'vsts_plugin'}))
        try:
            created_item = client.create_work_item(
                instance=instance,
                project=project,
                title=title,
                comment=markdown(description),
                link=link,
            )
        except Exception as e:
            self.raise_error(e, identity=client.auth)

        return {
            'id': created_item['id'],
            'url': created_item['_links']['html']['href'],
            'title': title,
        }