Copy and filter topics for branches. These topics have a new name and will be added to job configuration.
193734
private void generateCopies(final Element topicref, final List<FilterUtils> filters) {
        final List<FilterUtils> fs = combineFilterUtils(topicref, filters);

        final String copyTo = topicref.getAttribute(BRANCH_COPY_TO);
        if (!copyTo.isEmpty()) {
            final URI dstUri = map.resolve(copyTo);
            final URI dstAbsUri = job.tempDirURI.resolve(dstUri);
            final String href = topicref.getAttribute(ATTRIBUTE_NAME_HREF);
            final URI srcUri = map.resolve(href);
            final URI srcAbsUri = job.tempDirURI.resolve(srcUri);
            final FileInfo srcFileInfo = job.getFileInfo(srcUri);
            if (srcFileInfo != null) {
//                final FileInfo fi = new FileInfo.Builder(srcFileInfo).uri(dstUri).build();
//                 TODO: Maybe Job should be updated earlier?
//                job.add(fi);
                logger.info("Filtering " + srcAbsUri + " to " + dstAbsUri);
                final ProfilingFilter writer = new ProfilingFilter();
                writer.setLogger(logger);
                writer.setJob(job);
                writer.setFilterUtils(fs);
                writer.setCurrentFile(dstAbsUri);
                final List<XMLFilter> pipe = singletonList(writer);

                final File dstDirUri = new File(dstAbsUri.resolve("."));
                if (!dstDirUri.exists() && !dstDirUri.mkdirs()) {
                    logger.error("Failed to create directory " + dstDirUri);
                }
                try {
                    xmlUtils.transform(srcAbsUri,
                                       dstAbsUri,
                                       pipe);
                } catch (final DITAOTException e) {
                    logger.error("Failed to filter " + srcAbsUri + " to " + dstAbsUri + ": " + e.getMessage(), e);
                }
                topicref.setAttribute(ATTRIBUTE_NAME_HREF, copyTo);
                topicref.removeAttribute(BRANCH_COPY_TO);
                // disable filtering again
                topicref.setAttribute(SKIP_FILTER, Boolean.TRUE.toString());
            }
        }
        for (final Element child: getChildElements(topicref, MAP_TOPICREF)) {
            if (DITAVAREF_D_DITAVALREF.matches(child)) {
                continue;
            }
            generateCopies(child, fs);
        }
    }
1131269
def transform(root, opts={})
      new_copy = opts[:in_place] ? root : clone_sexp(root)
      scope_stack = ScopeStack.new
      transform_tree(new_copy, scope_stack)
      new_copy
    end
1314734
def method_missing(name, *args, &block)
      super && return if new_record?
      name = name.to_s
      name[-1] == '=' ? set_field_value(name[0..-2], args[0]) : get_field_value(name) || find_pages_in_branch(name)
    end
1176852
def local_branches
      @local_branches ||= begin
        branches = []
        if not git.branches.local.empty?
          branches << git.branches.local.select{ |b| b.current }[0].name
          branches << git.branches.local.select{ |b| not b.current }.map{ |b| b.name }
        end
        branches.flatten
      end
    end
658359
def get_topic_tree(rs, topic, depth=0):
    

    # Break if we're in too deep.
    if depth > rs._depth:
        rs._warn("Deep recursion while scanning topic trees!")
        return []

    # Collect an array of all topics.
    topics = [topic]

    # Does this topic include others?
    if topic in rs._includes:
        # Try each of these.
        for includes in sorted(rs._includes[topic]):
            topics.extend(get_topic_tree(rs, includes, depth + 1))

    # Does this topic inherit others?
    if topic in rs._lineage:
        # Try each of these.
        for inherits in sorted(rs._lineage[topic]):
            topics.extend(get_topic_tree(rs, inherits, depth + 1))

    return topics
919125
def set_folder_names(self, folder_names):
        """"""
        assert self.root_path is not None
        path_list = [osp.join(self.root_path, dirname)
                     for dirname in folder_names]
        self.proxymodel.setup_filter(self.root_path, path_list)
1241986
def issueServiceJob(self, jobNode):
        
        if jobNode.preemptable:
            self.preemptableServiceJobsToBeIssued.append(jobNode)
        else:
            self.serviceJobsToBeIssued.append(jobNode)
        self.issueQueingServiceJobs()
1366981
public static void copyExternalAssets(AbstractWisdomMojo mojo, MavenResourcesFiltering filtering) throws IOException {
        File in = new File(mojo.basedir, Constants.ASSETS_SRC_DIR);
        if (!in.exists()) {
            return;
        }
        File out = new File(mojo.getWisdomRootDirectory(), Constants.ASSETS_DIR);
        filterAndCopy(mojo, filtering, in, out);
    }
285912
@Override
	public void topicDeployed(LocalTopic topic)
    {
    	try
    	{
    		if (jmxAgent != null)
    			jmxAgent.register(new ObjectName(JMXAgent.JMX_DOMAIN+":type=Engines,engine="+engine.getName()+",children=topics,name="+topic.getName()), topic);
    	}
    	catch (Exception e)
    	{
    		log.error("Cannot register local topic on JMX agent",e);
    	}
    }
1042845
def create_branch_and_checkout(self, branch_name: str):
        
        self.create_branch(branch_name)
        self.checkout(branch_name)
425895
public void clearTopics()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.entry(tc, "clearTopics");
    
    //we only clear the topics if the remote me
    //has subscribed to some topics on this me.
    if(_outputHandler!=null)
    {
      if (_outputHandler.getTopics() != null)
      {
        Iterator topics = 
          Arrays.asList(_outputHandler.getTopics()).iterator();

        LinkedList topicSpaces = new LinkedList();
        LinkedList topicSpaceMappings = new LinkedList();
        // Iterate through each of the topics and add the matching ts uuid and ts mapping
        for (int i = 0; i < _outputHandler.getTopics().length; i++)
        {
          topicSpaces.add(_outputHandler.getTopicSpaceUuid().toString());   
          topicSpaceMappings.add(_outputHandler.getTopicSpaceMapping());         
        }
  
        //get the NeighbourProxyListener
        NeighbourProxyListener listener = 
          _messageProcessor.getProxyHandler().getProxyListener();
        try
        {
          ExternalAutoCommitTransaction tran =
            _messageProcessor.getTXManager().createAutoCommitTransaction();
          listener.deleteProxySubscription(topics,
                                           topicSpaces.iterator(),
                                           topicSpaceMappings.iterator(),
                                           _outputHandler.getTargetMEUuid(),
                                           _outputHandler.getBusName(),
                                           tran);
        }
        catch(SIResourceException e)
        {
          FFDCFilter.processException(
            e,
            "com.ibm.ws.sib.processor.runtime.RemoteTopicSpaceControl.clearTopics",
            "1:456:1.34",
            this);
            
          SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0002",
            new Object[] { "com.ibm.ws.sib.processor.runtime.RemoteTopicSpaceControl.clearTopics", 
                           "1:461:1.34", 
                           SIMPUtils.getStackTrace(e) });
          SibTr.exception(tc, e);
        }
      }
      else
      {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
          SibTr.debug(tc, "No Topics to delete for topicspace with id " + _outputHandler.getDestinationName());
      }
    }//end if PSOH==null

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.exit(tc, "clearTopics");        
  }
624645
private static void setJobName(Map<String,String> map, String jobName) {
		map.put(JOB_NAME_KEY, jobName);
	}
1069977
def branches(self):
		
		# get all remote branches
		refs = filter(lambda l: isinstance(l, git.RemoteReference), self.repo.references)
		# filter out HEAD branch
		refs = filter(lambda l: l.name != "origin/HEAD", refs)
		# filter out all branches not starting with 'origin/'
		refs = filter(lambda l: l.name.startswith("origin/"), refs)
		for ref in refs:
			self.refs[ref.name[7:]] = ref

		# remove 'origin/' prefix
		return map(lambda l: l.name[7:], refs)
588755
def create_topic(self, topic_name, topic_config):
        
        topic_subs = []
        t = self.template

        if "Subscription" in topic_config:
            topic_subs = topic_config["Subscription"]

        t.add_resource(
            sns.Topic.from_dict(
                topic_name,
                topic_config
            )
        )

        topic_arn = Ref(topic_name)

        t.add_output(
            Output(topic_name + "Name", Value=GetAtt(topic_name, "TopicName"))
        )
        t.add_output(Output(topic_name + "Arn", Value=topic_arn))

        sqs_subs = [sub for sub in topic_subs if sub["Protocol"] == "sqs"]
        if sqs_subs:
            self.create_sqs_policy(topic_name, topic_arn, sqs_subs)
1195344
public JenkinsServer renameJob(FolderJob folder, String oldJobName, String newJobName, Boolean crumbFlag)
            throws IOException {
        client.post(UrlUtils.toJobBaseUrl(folder, oldJobName) 
            + "/doRename?newName=" + EncodingUtils.formParameter(newJobName),
               crumbFlag);
        return this;
    }
1286192
function(params, cb) {
    cb = cb || _noop;
    assert(params.topic);

    _metaBroker.metadata([params.topic], function(err, cluster) {
      cluster.topics.forEach(function(topic) {
        _partitions[topic.topicName] = topic.partitions;
      });

      cb(err, cluster);
    });
  }
171985
def job_data(cls, job_id=dummy_job_id, branches=None, **kwargs):
        
        return dict(job_id=job_id, branches=branches or [])