Declares paths in the grading.xml file we are interested in
504622
protected function define_structure() {

        $paths = array();
        $userinfo = $this->get_setting_value('userinfo');

        $area = new restore_path_element('grading_area', '/areas/area');
        $paths[] = $area;
        // attach local plugin stucture to $area element
        $this->add_plugin_structure('local', $area);

        $definition = new restore_path_element('grading_definition', '/areas/area/definitions/definition');
        $paths[] = $definition;
        $this->add_plugin_structure('gradingform', $definition);
        // attach local plugin stucture to $definition element
        $this->add_plugin_structure('local', $definition);


        if ($userinfo) {
            $instance = new restore_path_element('grading_instance',
                '/areas/area/definitions/definition/instances/instance');
            $paths[] = $instance;
            $this->add_plugin_structure('gradingform', $instance);
            // attach local plugin stucture to $intance element
            $this->add_plugin_structure('local', $instance);
        }

        return $paths;
    }
151742
def _get_src_path_line_nodes_jacoco(self, xml_document, src_path):
        

        files = []
        packages = [pkg for pkg in xml_document.findall(".//package")]
        for pkg in packages:
            _files = [_file
                      for _file in pkg.findall('sourcefile')
                      if self._measured_source_path_matches(pkg.get('name'), _file.get('name'), src_path)
                      or []
                      ]
            files.extend(_files)

        if not files:
            return None
        lines = [file_tree.findall('./line')
                 for file_tree in files]
        return [elem for elem in itertools.chain(*lines)]
93768
protected function buildPaths ()
		{
			$titles = [];
			$guids = [];

			$n = count($this->_data);
			for ($i = 0; $i < $n; $i++)
			{
				$parent = $this->_data[ $i ];
				for ($j = $i + 1; $j < $n; $j++)
				{
					$child = $this->_data[ $j ];
					if ($child->lft > $parent->lft and $child->rgt < $parent->rgt)
					{
						$titles[ $child->id ][] = $parent->title;
						$guids[ $child->id ][] = $parent->guid;
					}
				}
				$titles[ $parent->id ][] = $parent->title;
				$guids[ $parent->id ][] = $parent->guid;

				$parent->titlePath = implode($this->_titlePathDelimiter, $titles[ $parent->id ]);
				$parent->guidPath = implode($this->_guidPathDelimiter, $guids[ $parent->id ]);
			}
		}
111302
def _setup_tarbell_project_path(settings, path, prompt=True):
    
    default_path = os.path.expanduser(os.path.join("~", "tarbell"))
    projects_path = raw_input("\nWhat is your Tarbell projects path? [Default: {0}, 'none' to skip] ".format(default_path))
    if projects_path == "":
        projects_path = default_path
    if projects_path.lower() == 'none':
        puts("\n- Not creating projects directory.")
        return {}

    if os.path.isdir(projects_path):
        puts("\nDirectory exists!")
    else:
        puts("\nDirectory does not exist.")
        make = raw_input("\nWould you like to create it? [Y/n] ")
        if make.lower() == "y" or not make:
            os.makedirs(projects_path)
    puts("\nProjects path is {0}".format(projects_path))
    puts("\n- Done setting up projects path.")
    return {"projects_path": projects_path}
1317097
protected function setPaths()
    {
        $pathPackage = realpath(__DIR__.'/../../../../');
        $pathBase = realpath(base_path());

        // Set CLI path.
        $this->pathCli = $pathBase.'/vendor/bin/'.$this::CLI_TOOL;
        if (!file_exists($this->pathCli)) {
            $this->pathCli = $pathPackage.'/vendor/bin/'.$this::CLI_TOOL;
        }

        // Set ruleset paths.
        $this->pathRulesetStock = $pathPackage.'/rulesets/'.$this::CLI_TOOL.'.xml';
        $this->pathRulesetLocal = $pathBase.'/'.$this::CLI_TOOL.'.xml';
        $this->pathRulesetLocalLegacy = $pathBase.'/app/'.$this::CLI_TOOL.'.xml';

        // Set active ruleset.
        $this->pathRuleset = $this->pathRulesetStock;
        if (is_readable($this->pathRulesetLocal)) {
            $this->pathRuleset = $this->pathRulesetLocal;
        } elseif (is_readable($this->pathRulesetLocalLegacy)) {
            $this->pathRuleset = $this->pathRulesetLocalLegacy;
        }
    }
345401
def generate path = "."
      updated_configuration = configuration.merge label: options.label, includes: options.includes
      runner = Runner.new path, configuration: updated_configuration.to_h
      files = runner.files

      return if files.empty?

      runner.run

      say "Processed table of contents for:"
      files.each { |file| say "  #{file}" }
    end
1027188
function constructPaths(xmlElement) {
  if (xmlElement['path'] == null) {
    return ['*'];
  }

  var paths = [];
  xmlElement.path.some(function(pathElement) {
    var url = pathElement['$']['url'];

    // Ignore explicit paths if '*' is defined
    if (url === '*') {
      paths = ['*'];
      return true;
    }

    paths.push(url);
  });

  return paths;
}
259544
private void addAssignments(MpxjTreeNode parentNode, ProjectFile file)
   {
      for (ResourceAssignment assignment : file.getResourceAssignments())
      {
         final ResourceAssignment a = assignment;
         MpxjTreeNode childNode = new MpxjTreeNode(a)
         {
            @Override public String toString()
            {
               Resource resource = a.getResource();
               String resourceName = resource == null ? "(unknown resource)" : resource.getName();
               Task task = a.getTask();
               String taskName = task == null ? "(unknown task)" : task.getName();
               return resourceName + "->" + taskName;
            }
         };
         parentNode.add(childNode);
      }
   }
801070
private static PathCriteria parsePath(File path) {
        int starIndex = path.toString().indexOf(STAR);
        int wildcardIndex = path.toString().indexOf(WILDCARD);

        int index = (starIndex < wildcardIndex || wildcardIndex < 0) ? starIndex : wildcardIndex;

        if(index == 0 && path.toString().length() == 1)
            return new PathCriteria(String.valueOf(SEPARATOR), "", path.toString());
        else {
            int parentSeparatorIndex = index-1;
            while(path.toString().charAt(parentSeparatorIndex) != SEPARATOR && parentSeparatorIndex > -1)
                parentSeparatorIndex--;

            int childSeparatorIndex = index+1;
            if(childSeparatorIndex < path.toString().length())
                while(path.toString().charAt(childSeparatorIndex) != SEPARATOR && parentSeparatorIndex < path.toString().length())
                    childSeparatorIndex++;

            String parentPath = path.toString().substring(0, parentSeparatorIndex);
            String criteria = path.toString().substring(parentSeparatorIndex+1, childSeparatorIndex);
            String childPath = path.toString().substring(childSeparatorIndex, path.toString().length());

            return new PathCriteria(parentPath, childPath, criteria);
        }
    }
1215057
public function on_course_section_end() {

        // migrate files embedded into the section summary field
        $contextid = $this->converter->get_contextid(CONTEXT_COURSE);
        $fileman = $this->converter->get_file_manager($contextid, 'course', 'section', $this->currentsection['id']);
        $this->currentsection['summary'] = moodle1_converter::migrate_referenced_files($this->currentsection['summary'], $fileman);

        // write section's inforef.xml with the file references
        $this->open_xml_writer('sections/section_' . $this->currentsection['id'] . '/inforef.xml');
        $this->xmlwriter->begin_tag('inforef');
        $this->xmlwriter->begin_tag('fileref');
        $fileids = $fileman->get_fileids();
        if (is_array($fileids)) {
            foreach ($fileids as $fileid) {
                $this->write_xml('file', array('id' => $fileid));
            }
        }
        $this->xmlwriter->end_tag('fileref');
        $this->xmlwriter->end_tag('inforef');
        $this->close_xml_writer();

        // stash the section info and write section.xml
        $this->converter->set_stash('sectioninfo', $this->currentsection, $this->currentsection['id']);
        $this->open_xml_writer('sections/section_' . $this->currentsection['id'] . '/section.xml');
        $this->write_xml('section', $this->currentsection);
        $this->close_xml_writer();
        unset($this->currentsection);
    }
261099
private void writePathDescriptor(File consoleDir, Set<String> paths) {
        try (PrintWriter writer = new PrintWriter(new FileOutputStream(new File(consoleDir, "jettyconsolepaths.txt")))){
            for (String path : paths) {
                writer.println(path);
            }
        } catch (FileNotFoundException e) {
            throw new RuntimeException(e);
        }

    }
279933
public static void addFileToClassPath(Path file, Configuration conf)
    throws IOException {
    String classpath = conf.get("mapred.job.classpath.files");
    conf.set("mapred.job.classpath.files", classpath == null ? file.toString()
             : classpath + System.getProperty("path.separator") + file.toString());
    URI uri = file.makeQualified(file.getFileSystem(conf)).toUri();

    addCacheFile(uri, conf);
  }
545554
private void checkIncludePatterns() {
        Map newroots = new HashMap();
        // put in the newroots map the include patterns without
        // wildcard tokens
        for (int i = 0; i < includes.length; i++) {
            if (FileUtil.isAbsolutePath(includes[i])) {
                //skip abs. paths not under basedir, if set:
                if (basedir != null
                    && !SelectorUtils.matchPatternStart(includes[i],
                    basedir.getAbsolutePath(), isCaseSensitive())) {
                    continue;
                }
            } else if (basedir == null) {
                //skip non-abs. paths if basedir == null:
                continue;
            }
            newroots.put(SelectorUtils.rtrimWildcardTokens(
                includes[i]), includes[i]);
        }
        if (newroots.containsKey("") && basedir != null) {
            // we are going to scan everything anyway
            scandir(basedir, "", true);
        } else {
            // only scan directories that can include matched files or
            // directories
            Iterator it = newroots.entrySet().iterator();

            File canonBase = null;
            if (basedir != null) {
                try {
                    canonBase = basedir.getCanonicalFile();
                } catch (IOException ex) {
                    throw new RuntimeException(ex);
                }
            }
            while (it.hasNext()) {
                Map.Entry entry = (Map.Entry) it.next();
                String currentelement = (String) entry.getKey();

                if (basedir == null && !FileUtil.isAbsolutePath(currentelement)) {
                    continue;
                }
                String originalpattern = (String) entry.getValue();
                File myfile = new File(basedir, currentelement);

                if (myfile.exists()) {
                    // may be on a case insensitive file system.  We want
                    // the results to show what's really on the disk, so
                    // we need to double check.
                    try {
                        String path = (basedir == null)
                            ? myfile.getCanonicalPath()
                            : FileUtil.removeLeadingPath(canonBase,
                            myfile.getCanonicalFile());
                        if (!path.equals(currentelement)) {
                            myfile = findFile(basedir, currentelement, true);
                            if (myfile != null && basedir != null) {
                                currentelement = FileUtil.removeLeadingPath(
                                    basedir, myfile);
                            }
                        }
                    } catch (IOException ex) {
                        throw new RuntimeException(ex);
                    }
                }
                if ((myfile == null || !myfile.exists()) && !isCaseSensitive()) {
                    File f = findFile(basedir, currentelement, false);
                    if (f != null && f.exists()) {
                        // adapt currentelement to the case we've
                        // actually found
                        currentelement = (basedir == null)
                            ? f.getAbsolutePath()
                            : FileUtil.removeLeadingPath(basedir, f);
                        myfile = f;
                    }
                }
                if (myfile != null && myfile.exists()) {
                    if (!followSymlinks
                        && isSymlink(basedir, currentelement)) {
                        continue;
                    }
                    if (myfile.isDirectory()) {
                        if (isIncluded(currentelement)
                            && currentelement.length() > 0) {
                            accountForIncludedDir(currentelement, myfile, true);
                        }  else {
                            if (currentelement.length() > 0) {
                                if (currentelement.charAt(currentelement
                                                          .length() - 1)
                                    != File.separatorChar) {
                                    currentelement =
                                        currentelement + File.separatorChar;
                                }
                            }
                            scandir(myfile, currentelement, true);
                        }
                    } else {
                        boolean included = isCaseSensitive()
                            ? originalpattern.equals(currentelement)
                            : originalpattern.equalsIgnoreCase(currentelement);
                        if (included) {
                            accountForIncludedFile(currentelement, myfile);
                        }
                    }
                }
            }
        }
    }
741698
private static List<URL> parsePaths(List<PathElement> paths, Bundle bundle) {
		List<URL> pathList = new ArrayList<URL>();
		for (PathElement path : paths) {
			String name = path.getName();
			if (name.endsWith("/")) {
				// we have a directory
				addEntries(bundle, name, "*.*", pathList);
			} else {
				// we have a file name
				String baseName;
				String filePattern;
				int pos = name.lastIndexOf('/');
				if (pos < 0) {
					baseName = "/";
					filePattern = name;
				} else {
					baseName = name.substring(0, pos + 1);
					filePattern = name.substring(pos + 1);
				}
				if (hasWildcards(filePattern)) {
					addEntries(bundle, baseName, filePattern, pathList);
				} else {
					pathList.add(bundle.getEntry(name));
				}
			}
		}
		return pathList;
	}
1334757
def _SetupPaths():
  """"""
  sdk_path = _FindSdkPath()
  if sdk_path:
    sys.path.append(sdk_path)
    try:
      import dev_appserver  # pylint: disable=g-import-not-at-top
      if hasattr(dev_appserver, 'fix_sys_path'):
        dev_appserver.fix_sys_path()
      else:
        logging.warning(_NO_FIX_SYS_PATH_WARNING)
    except ImportError:
      logging.warning(_IMPORT_ERROR_WARNING)
  else:
    logging.warning(_NOT_FOUND_WARNING)

  # Add the path above this directory, so we can import the endpoints package
  # from the user's app code (rather than from another, possibly outdated SDK).
  # pylint: disable=g-import-not-at-top
  from google.appengine.ext import vendor
  vendor.add(os.path.dirname(os.path.dirname(__file__)))
117532
public void setAuxAnalyzepath(Path src) {
        boolean nonEmpty = false;

        String[] elementList = src.list();
        for (String anElementList : elementList) {
            if (!"".equals(anElementList)) {
                nonEmpty = true;
                break;
            }
        }

        if (nonEmpty) {
            if (auxAnalyzepath == null) {
                auxAnalyzepath = src;
            } else {
                auxAnalyzepath.append(src);
            }
        }
    }
470983
void configureClasses(String path) {

        findClassesInClasspath();

        if (StringUtils.isNotBlank(path)) {
            // If the path is set, set up class reloading:
            configureClassesReloadable(path);
        }
        packagePrefix = getValue(PACKAGE_PREFIX);
        classesReloadable = classesUrl != null && classesInClasspath == null;

        // Communicate:
        showClassesConfiguration();
    }