Search some code: Max results:

Found 47485 results in 7525 files (38MB index data, 10785691 ngram matches, 114313 docs considered, 7520 docs (80MB) loaded, 99579 docs skipped): for
(and substr:"path" file_substr:"java") with options &zoekt.SearchOptions{EstimateDocCount:false, Whole:false, ShardMaxMatchCount:250, TotalMaxMatchCount:1000000, ShardMaxImportantMatch:2, TotalMaxImportantMatch:100, MaxWallTime:10000000000}
in 1.785583606s (queued: 1.59┬Ás)

android.googlesource.com/platform/external/mp4parser:isoparser/src/main/java/com/googlecode/mp4parser/util/Path.java:[master, ]

29: public class Path {
31:     private Path() {
36:     public static String createPath(Box box) {
40:     private static String createPath(Box box, String path) {
52:     public static Box getPath(Box box, String path) {
58:     public static List<Box> getPaths(Box box, String path) {
42:             return path;
46:             path = String.format("/%s[%d]", box.getType(), index) + path;
48:             return createPath(box.getParent(), path);
53:         List<Box> all = getPaths(box, path);
59:         if (path.startsWith("/")) {
65:             return getPaths(isoFile, path.substring(1));
66:         } else if (path.isEmpty()) {
71:             if (path.contains("/")) {
72:                 later = path.substring(path.indexOf('/') + 1);
73:                 now = path.substring(0, path.indexOf('/'));
75:                 now = path;
104:                 throw new RuntimeException(now + " is invalid path.");
111:     public static boolean isContained(Box box, String path) {
112:         assert path.startsWith("/") : "Absolute path required";
113:         return getPaths(box, path).contains(box);
37:         return createPath(box, "");
83:                     return getPaths(box.getParent(), later);
96:                                 children.addAll(getPaths(box1, later));
chromium.googlesource.com/arc/arc:third_party/android/external/mp4parser/isoparser/src/main/java/com/googlecode/mp4parser/util/Path.java:[master, ]
duplicate result
github.com/bazelbuild/rules_closure:java/io/bazel/rules/closure/Webpath.java:[master, ]
72:   private final String path;
55:   private static final Webpath EMPTY_PATH = new Webpath("");
56:   private static final Webpath ROOT_PATH = new Webpath(ROOT);
49: public final class Webpath implements CharSequence, Comparable<Webpath> {
76:   private Webpath(String path) {
170:   public Webpath subpath(int beginIndex, int endIndex) {
393:   public Webpath toAbsolutePath(Webpath currentWorkingDirectory) {
399:   public Webpath toAbsolutePath() {
34:  * Web server path.
36:  * <p>This class is a de facto implementation of the {@link java.nio.file.Path} API. That interface
62:   /** Returns new path of {@code first}. */
63:   public static Webpath get(String path) {
64:     if (path.isEmpty()) {
65:       return EMPTY_PATH;
66:     } else if (isRootInternal(path)) {
67:       return ROOT_PATH;
69:     return new Webpath(path);
77:     this.path = checkNotNull(path);
82:     return isRootInternal(path);
85:   private static boolean isRootInternal(String path) {
86:     return path.length() == 1 && path.charAt(0) == SEPARATOR;
89:   /** Returns {@code true} if path starts with {@code separator}. */
91:     return isAbsoluteInternal(path);
94:   private static boolean isAbsoluteInternal(String path) {
95:     return !path.isEmpty() && path.charAt(0) == SEPARATOR;
98:   /** Returns {@code true} if path ends with {@code separator}. */
100:     return hasTrailingSeparatorInternal(path);
103:   private static boolean hasTrailingSeparatorInternal(CharSequence path) {
104:     return path.length() != 0 && path.charAt(path.length() - 1) == SEPARATOR;
107:   /** Returns {@code true} if path ends with a trailing slash, or would after normalization. */
109:     int length = path.length();
110:     return path.isEmpty()
111:         || path.charAt(length - 1) == SEPARATOR
112:         || (path.endsWith(".") && (length == 1 || path.charAt(length - 2) == SEPARATOR))
113:         || (path.endsWith("..") && (length == 2 || path.charAt(length - 3) == SEPARATOR));
117:    * Returns last component in {@code path}.
119:    * @see java.nio.file.Path#getFileName()
123:     if (path.isEmpty()) {
124:       return EMPTY_PATH;
130:       return parts.size() == 1 && path.equals(last) ? this : new Webpath(last);
137:    * @see java.nio.file.Path#getParent()
141:     if (path.isEmpty() || isRoot()) {
146:             ? path.lastIndexOf(SEPARATOR, path.length() - 2)
147:             : path.lastIndexOf(SEPARATOR);
149:       return isAbsolute() ? ROOT_PATH : null;
151:       return new Webpath(path.substring(0, index + 1));
156:    * Returns root component if an absolute path, otherwise {@code null}.
158:    * @see java.nio.file.Path#getRoot()
162:     return isAbsolute() ? ROOT_PATH : null;
166:    * Returns specified range of sub-components in path joined together.
168:    * @see java.nio.file.Path#subpath(int, int)
171:     if (path.isEmpty() && beginIndex == 0 && endIndex == 1) {
185:    * Returns number of components in {@code path}.
187:    * @see java.nio.file.Path#getNameCount()
190:     if (path.isEmpty()) {
200:    * Returns component in {@code path} at {@code index}.
202:    * @see java.nio.file.Path#getName(int)
205:     if (path.isEmpty()) {
217:    * Returns path without extra separators or {@code .} and {@code ..}, preserving trailing slash.
219:    * @see java.nio.file.Path#normalize()
228:       index = path.indexOf(SEPARATOR, mark);
229:       String part = path.substring(mark, index == -1 ? path.length() : index + 1);
280:    * Returns {@code other} appended to {@code path}.
282:    * @see java.nio.file.Path#resolve(java.nio.file.Path)
285:     if (other.path.isEmpty()) {
290:       return new Webpath(path + other.path);
292:       return new Webpath(path + SEPARATOR + other.path);
297:    * Returns {@code other} resolved against parent of {@code path}.
299:    * @see java.nio.file.Path#resolveSibling(java.nio.file.Path)
307:   /** Returns absolute path of {@code reference} relative to {@code file}. */
313:    * Returns {@code other} made relative to {@code path}.
315:    * @see java.nio.file.Path#relativize(java.nio.file.Path)
318:     checkArgument(isAbsolute() == other.isAbsolute(), "'other' is different type of Path");
319:     if (path.isEmpty()) {
331:     StringBuilder result = new StringBuilder(path.length() + other.path.length());
348:    * Returns {@code true} if {@code path} starts with {@code other}.
350:    * @see java.nio.file.Path#startsWith(java.nio.file.Path)
355:     if (other.path.length() > me.path.length()) {
359:     } else if (!me.path.isEmpty() && other.path.isEmpty()) {
375:    * Returns {@code true} if {@code path} ends with {@code other}.
377:    * @see java.nio.file.Path#endsWith(java.nio.file.Path)
382:     if (other.path.length() > me.path.length()) {
384:     } else if (!me.path.isEmpty() && other.path.isEmpty()) {
387:       return me.isAbsolute() && me.path.equals(other.path);
392:   /** Converts relative path to an absolute path. */
398:   /** Returns {@code toAbsolutePath(ROOT_PATH)}. */
400:     return toAbsolutePath(ROOT_PATH);
403:   /** Removes beginning separator from path, if an absolute path. */
405:     return isAbsolute() ? new Webpath(path.substring(1)) : this;
408:   /** Adds trailing separator to path, if it isn't present. */
410:     return hasTrailingSeparator() ? this : new Webpath(path + SEPARATOR);
413:   /** Removes trailing separator from path, unless it's root. */
416:       return new Webpath(path.substring(0, path.length() - 1));
422:   /** Splits path into components, excluding separators and empty strings. */
427:   /** Splits path into components in reverse, excluding separators and empty strings. */
435:    * @see java.nio.file.Path#compareTo(java.nio.file.Path)
481:     String path2 = ((Webpath) other).path;
485:       if (i == path.length()) {
486:         return i2 == path2.length();
488:       if (i2 == path2.length()) {
491:       char c = path.charAt(i++);
493:         while (i < path.length() && path.charAt(i) == SEPARATOR) {
497:       char c2 = path2.charAt(i2++);
502:         while (i2 < path2.length() && path2.charAt(i2) == SEPARATOR) {
515:       for (int i = 0; i < path.length(); i++) {
516:         char c = path.charAt(i);
527:   /** Returns path as a string. */
530:     return path;
535:     return path.length();
540:     return path.charAt(index);
545:     return path.subSequence(start, end);
548:   /** Returns {@code true} if this path is an empty string. */
550:     return path.isEmpty();
553:   /** Returns list of path components, excluding slashes. */
559:             path.isEmpty() || isRoot()
561:                 : SPLITTER.splitToList(path));
37:  * is not formally implemented because it would not be desirable to have web paths accidentally
38:  * intermingle with file system paths.
40:  * <p>This implementation is almost identical to {@code sun.nio.fs.UnixPath}. The main difference is
122:   public Webpath getFileName() {
140:   public Webpath getParent() {
161:   public Webpath getRoot() {
181:     return new Webpath(JOINER.join(subList));
204:   public Webpath getName(int index) {
210:       return new Webpath(getParts().get(index));
221:   public Webpath normalize() {
276:     return new Webpath(result.toString());
284:   public Webpath resolve(Webpath other) {
301:   public Webpath resolveSibling(Webpath other) {
303:     Webpath parent = getParent();
308:   public Webpath lookup(Webpath reference) {
317:   public Webpath relativize(Webpath other) {
344:     return new Webpath(result.toString());
352:   public boolean startsWith(Webpath other) {
353:     Webpath me = removeTrailingSeparator();
379:   public boolean endsWith(Webpath other) {
380:     Webpath me = removeTrailingSeparator();
404:   public Webpath removeBeginningSeparator() {
409:   public Webpath addTrailingSeparator() {
414:   public Webpath removeTrailingSeparator() {
433:    * Compares two paths lexicographically for ordering.
438:   public int compareTo(Webpath other) {
478:     if (!(other instanceof Webpath) || hashCode() != other.hashCode()) {
android.googlesource.com/platform/gdk:samples/PhotoEditor/src/com/android/photoeditor/actions/ColorPath.java:[master, ]
30:     private final Path path;
37:     public Path path() {
27: public class ColorPath {
32:     public ColorPath(int color, Path path) {
22: import android.graphics.Path;
25:  * Colored path that could be painted on canvas.
34:         this.path = path;
38:         return path;
43:         canvas.drawPath(path, paint);
47:      * Creates a paint to draw color paths.
github.com/bazelbuild/eclipse:com.google.devtools.bazel.e4b/src/com/google/devtools/bazel/e4b/classpath/BazelClasspathContainer.java:[master, ]
48:   private final IPath path;
15: package com.google.devtools.bazel.e4b.classpath;
60:   private boolean isSourcePath(String path) throws JavaModelException, BackingStoreException {
137:   private static IPath getJarIPath(File execRoot, String file) {
156:   public IPath getPath() {
45: public class BazelClasspathContainer implements IClasspathContainer {
52:   public BazelClasspathContainer(IPath path, IJavaProject project)
93:   private boolean isSourceInPaths(List<String> sources)
104:   public IClasspathEntry[] getClasspathEntries() {
125:   private IClasspathEntry[] jarsToClasspathEntries(Set<Jars> jars) {
20: import java.nio.file.Path;
55:     this.path = path;
61:     Path pp = new File(instance.getWorkspaceRoot().toString() + File.separator + path).toPath();
81:   private boolean matchPatterns(Path path, IPath[] patterns) {
85:         if (matcher.matches(path)) {
141:     File path = new File(execRoot, file);
142:     return org.eclipse.core.runtime.Path.fromOSString(path.toString());
157:     return path;
21: import java.nio.file.PathMatcher;
29: import org.eclipse.core.runtime.IPath;
63:     for (IClasspathEntry entry : project.getRawClasspath()) {
65:         IResource res = root.findMember(entry.getPath());
69:             IPath[] inclusionPatterns = entry.getInclusionPatterns();
83:       for (IPath p : patterns) {
84:         PathMatcher matcher = FileSystems.getDefault().getPathMatcher("glob:" + p.toOSString());
96:       if (isSourcePath(s)) {
117:       Activator.error("Unable to compute classpath containers entries.", e);
130:       entries[i] = JavaCore.newLibraryEntry(getJarIPath(execRoot, j.getJar()),
131:           getJarIPath(execRoot, j.getSrcJar()), null);
147:     return "Bazel Classpath Container";
30: import org.eclipse.jdt.core.IClasspathContainer;
31: import org.eclipse.jdt.core.IClasspathEntry;
64:       if (entry.getEntryKind() == IClasspathEntry.CPE_SOURCE) {
111:         if (!isSourceInPaths(s.getSources())) {
115:       return jarsToClasspathEntries(jars);
118:       return new IClasspathEntry[] {};
121:       return new IClasspathEntry[] {};
126:     IClasspathEntry[] entries = new IClasspathEntry[jars.size()];
github.com/GoogleCloudPlatform/datanucleus-appengine:testing/selenium-core/xpath/javascript-xpath-0.1.8.js:[master, ]
645: UnionExpr.prototype.path = function(path) {
673: PathExpr = function(filter) {
2755:     win.XPathExpression = function(expr) {
2773:     win.XPathResult = function (value, type) {
614:     union.path(expr);
619:             throw Error('missing next union location path');
621:         union.path(PathExpr.parse(lexer));
646:     this.paths.push(path);
648:     if (path.needContextPosition) {
651:     if (path.needContextNode) {
686:     var op, expr, path, token;
698:         path = new PathExpr(FilterExpr.root()); // RootExpr
704:         path.step(op, expr);
710:             path = new PathExpr(FilterExpr.context());
711:             path.step('/', expr);
716:             path = new PathExpr(expr);
725:         path.step(op, Step.parse(lexer));
728:     return path;
806:     t += indent + 'path:' + '\n';
1: /*  JavaScript-XPath 0.1.8
4:  *  JavaScript-XPath is freely distributable under the terms of an MIT-style license.
5:  *  For details, see the JavaScript-XPath web site: http://coderepos.org/share/wiki/JavaScript-XPath
24: if (window.jsxpath) {
25:     config = window.jsxpath;
57:                         && document.implementation.hasFeature("XPath", null));
74: var PathExpr;
600:     this.paths = [];
609:     expr = PathExpr.parse(lexer);
635:     var paths = this.paths;
637:     for (var i = 0, l = paths.length; i < l; i ++) {
638:         var exrs = paths[i].evaluate(ctx);
639:         if (!exrs.isNodeSet) throw Error('PathExpr must be nodeset');
660:     for (var i = 0; i < this.paths.length; i ++) {
661:         t += this.paths[i].show(indent);
668:  * class: PathExpr
670: if (!window.PathExpr && window.defaultConfig)
671:     window.PathExpr = null;
683: PathExpr.ops = { '//': 1, '/': 1 };
685: PathExpr.parse = function(lexer) {
731: PathExpr.prototype = new BaseExpr();
733: PathExpr.prototype.evaluate = function(ctx) {
786: PathExpr.prototype.step = function(op, step) {
803: PathExpr.prototype.show = function(indent) {
1013:             // fix for "xpath href with spaces" (http://jira.openqa.org/browse/SEL-347)   
2273:         return node.__jsxpath_id__ || (node.__jsxpath_id__ = this.uuid++);
2769:     win.XPathExpression.prototype.evaluate = function(node, type) {
2770:         return new win.XPathResult(this.expr.evaluate(new Ctx(node)), type);
2807:     win.XPathResult.prototype.iterateNext = function() { return this.nodes[this.index++] };
2808:     win.XPathResult.prototype.snapshotItem = function(i) { return this.nodes[i] };
2810:     win.XPathResult.ANY_TYPE = 0;
2811:     win.XPathResult.NUMBER_TYPE = 1;
2812:     win.XPathResult.STRING_TYPE = 2;
2813:     win.XPathResult.BOOLEAN_TYPE = 3;
2814:     win.XPathResult.UNORDERED_NODE_ITERATOR_TYPE = 4;
2815:     win.XPathResult.ORDERED_NODE_ITERATOR_TYPE = 5;
2816:     win.XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE = 6;
2817:     win.XPathResult.ORDERED_NODE_SNAPSHOT_TYPE = 7;
2818:     win.XPathResult.ANY_UNORDERED_NODE_TYPE = 8;
2819:     win.XPathResult.FIRST_ORDERED_NODE_TYPE = 9;
2823:         return new win.XPathExpression(expr, null);
github.com/google/haskell-indexer:third_party/kythe/kythe/java/com/google/devtools/kythe/analyzers/base/CorpusPath.java:[master, ]
23:   private final String corpus, root, path;
22: public final class CorpusPath {
25:   public CorpusPath(String corpus, String root, String path) {
47:   public String getPath() {
21: /** Path within a particular corpus and corpus root. */
28:     this.path = path;
32:    * Returns a new {@link CorpusPath} equivalent to the corpus/path/root subset of the given {@link
48:     return path;
35:   public static CorpusPath fromVName(VName vname) {
36:     return new CorpusPath(vname.getCorpus(), vname.getRoot(), vname.getPath());
github.com/google/kythe:kythe/java/com/google/devtools/kythe/analyzers/base/CorpusPath.java:[master, ]
duplicate result
gerrit.googlesource.com/plugins/maintainer:src/main/java/io/fd/maintainer/plugin/parser/ComponentPath.java:[master, ]
29:     private final String path;
27: public class ComponentPath {
31:     public ComponentPath(final String path) {
35:     public String getPath() {
89:     private MatchLevel matchPathsAsDirectChild(final String[] componentPath, final String[] matchedPath) {
32:         this.path = path;
36:         return path;
39:     public MatchLevel matchAgainst(final String path) {
41:         if (path == null) {
45:         MatchLevel matchLevel = this.path.equals(path)
51:             final int indexOfWildcard = this.path.indexOf("*");
54:                 final String wildcardLess = this.path.replace(this.path.substring(indexOfWildcard), "");
55:                 if (path.contains(wildcardLess)) {
56:                     matchLevel = this.path.equals(wildcardLess)
57:                             // if path does not have wildcard, its partial match
62:                     final int extensionStart = this.path.lastIndexOf(".");
63:                     final String componentExtension = extension(extensionStart, this.path);
67:                         if (-1 != extensionStart && extension(path).equals(componentExtension)) {
76:                 // not a wildcard path ,therefore attempts match it as direct child
77:                 final String[] componentPathParts = this.path.split("/");
78:                 final String[] matchedPathParts = path.split("/");
102:     private String extension(final int extensionStart, final String path) {
106:         return path.substring(extensionStart + 1);
109:     private String extension(final String path) {
110:         return extension(path.lastIndexOf("."), path);
116:                 "path='" + path + '\'' +
131:         return path != null
132:                 ? path.equals(that.path)
133:                 : that.path == null;
138:         return path != null
139:                 ? path.hashCode()
145:         WILDCARD_WITH_EXTENSION(3),// matches wildcarded path with extension for ex.: foo/bar/*.mk
146:         PARTIAL(2),// matches part of the path
147:         WILDCARD_ONLY(1),// matches wildcarded path for ex.: foo/bar/*
19: import static io.fd.maintainer.plugin.parser.ComponentPath.MatchLevel.FULL;
20: import static io.fd.maintainer.plugin.parser.ComponentPath.MatchLevel.NONE;
21: import static io.fd.maintainer.plugin.parser.ComponentPath.MatchLevel.PARTIAL;
22: import static io.fd.maintainer.plugin.parser.ComponentPath.MatchLevel.WILDCARD_ONLY;
23: import static io.fd.maintainer.plugin.parser.ComponentPath.MatchLevel.WILDCARD_WITH_EXTENSION;
90:         for (int i = 0; i < componentPath.length; i++) {
91:             if (componentPath[i].equals(matchedPath[i])) {
115:         return "ComponentPath{" +
129:         final ComponentPath that = (ComponentPath) o;
80:                 matchLevel = matchedPathParts.length - componentPathParts.length > 1
83:                         : matchPathsAsDirectChild(componentPathParts, matchedPathParts);
github.com/google/climb-tracker:climblib/src/main/java/fr/steren/climblib/Path.java:[master, ]
15: public class Path {
github.com/google/copybara:java/com/google/copybara/CheckoutPathAttributes.java:[master, ]
35:   private final Path path;
33: public class CheckoutPathAttributes {
38:   CheckoutPathAttributes(Path path, BasicFileAttributes attributes) {
24: import java.nio.file.Path;
32:     doc = "Represents a path attributes like size.")
39:     this.path = Preconditions.checkNotNull(path);
51:           String.format("File %s is too big to compute the size: %d bytes", path, size));
31: @SkylarkModule(name = "PathAttributes", category = SkylarkModuleCategory.BUILTIN,
github.com/google/copybara:java/com/google/copybara/CheckoutPath.java:[master, ]
46:   private final Path path;
42: public class CheckoutPath implements Comparable<CheckoutPath>{
49:   CheckoutPath(Path path, Path checkoutDir) {
68:   public String fullPath() {
28: import java.nio.file.Path;
39: @SkylarkModule(name = "Path",
41:     doc = "Represents a path in the checkout directory")
47:   private final Path checkoutDir;
50:     this.path = Preconditions.checkNotNull(path);
54:   private CheckoutPath create(Path path) throws FuncallException {
55:     return createWithCheckoutDir(path, checkoutDir);
58:   static CheckoutPath createWithCheckoutDir(Path relative, Path checkoutDir)
66:   @SkylarkCallable(name = "path", doc = "Full path relative to the checkout directory",
69:     return path.toString();
73:       doc = "Filename of the path. For foo/bar/baz.txt it would be baz.txt",
76:     return path.getFileName().toString();
79:   @SkylarkCallable(name = "parent", doc = "Get the parent path", structField = true,
82:     Path parent = path.getParent();
84:       // nio equivalent of new_path("foo").parent returns null, but we want to be able to do
86:       // to return the parent folder and another function resolve a path based on that.
87:       return path.toString().equals("")
89:           : create(path.getFileSystem().getPath(""));
95:       doc = "Constructs a relative path between this path and a given path. For example:<br>"
96:           + "    path('a/b').relativize('a/b/c/d')<br>"
100:               doc = "The path to relativize against this path"),
103:     return create(path.relativize(other.path));
107:       doc = "Resolve the given path against this path.",
110:               doc = "Resolve the given path against this path. The parameter"
111:                   + " can be a string or a Path.")})
114:       return create(path.resolve((String) child));
116:       return create(path.resolve(((CheckoutPath) child).path));
123:       doc = "Resolve the given path against this path.",
126:               doc = "Resolve the given path against this path. The parameter can be a string or"
127:                   + " a Path."),})
130:       return create(path.resolveSibling((String) other));
132:       return create(path.resolveSibling(((CheckoutPath) other).path));
142:       return new CheckoutPathAttributes(path,
143:           Files.readAttributes(checkoutDir.resolve(path), BasicFileAttributes.class));
145:       String msg = "Error getting attributes for " + path + ":" + e;
153:     return path.toString();
158:     return this.path.compareTo(o.path);
44:   private static final Logger logger = Logger.getLogger(CheckoutPath.class.getName());
61:       throw new FuncallException("Absolute paths are not allowed: " + relative);
63:     return new CheckoutPath(relative.normalize(), checkoutDir);
99:           @Param(name = "other", type = CheckoutPath.class,
102:   public CheckoutPath relativize(CheckoutPath other) throws FuncallException {
112:   public CheckoutPath resolve(Object child) throws FuncallException {
115:     } else if (child instanceof CheckoutPath) {
128:   public CheckoutPath resolveSibling(Object other) throws FuncallException {
131:     } else if (other instanceof CheckoutPath) {
157:   public int compareTo(CheckoutPath o) {
140:   public CheckoutPathAttributes attr() throws FuncallException {
github.com/foam-framework/foam:tools/genjava.js:[master, ]
23: var path = require('path');
38:     pathComponents
github.com/google/FreeBuilder:src/test/java/org/inferred/freebuilder/processor/util/testing/TempJavaFileManager.java:[master, ]
71:     private final String path;
218:   private static String path(String packageName, String relativeName) {
67:       return new FileKey(location, path(packageName, relativeName));
73:     private FileKey(Location location, String path) {
75:       this.path = path;
83:       return path;
89:       fields.add("path", path);
chromium.googlesource.com/external/github.com/googlei18n/sfntly:java/test/com/google/typography/font/sfntly/testutils/TestFont.java:[master, ]
39:     private String path;
32:   private static final String TESTDATA_PATH = "../data/testdata/";
41:     private TestFontNames(String path) {
42:       this.path = path;
46:       return new File(TESTDATA_PATH + path);
github.com/googlei18n/sfntly:java/test/com/google/typography/font/sfntly/testutils/TestFont.java:[master, ]
duplicate result
chromium.googlesource.com/external/sfntly:java/test/com/google/typography/font/sfntly/testutils/TestFont.java:[master, ]
duplicate result
android.googlesource.com/platform/external/archive-patcher:shared/src/test/java/com/google/archivepatcher/shared/UnitTestZipEntry.java:[master, ]
29:   public final String path;
27:    * The path under which the data is located in the archive.
53:    * @param path the path under which the data is located in the archive
58:   public UnitTestZipEntry(String path, int level, String content, String comment) {
59:     this(path, level, true, content, comment);
64:    * @param path the path under which the data is located in the archive
69:   public UnitTestZipEntry(String path, int level, boolean nowrap, String content, String comment) {
70:     this.path = path;
chromium.googlesource.com/chromium/src/third_party/WebKit/Source/devtools:scripts/lint_javascript.py:[master, ]
7: import os.path as path
35: def to_platform_path(filepath):
49: scripts_path = path.dirname(path.abspath(__file__))
50: devtools_path = path.dirname(scripts_path)
51: devtools_frontend_path = path.join(devtools_path, "front_end")
52: eslint_path = path.join(devtools_path, "node_modules", "eslint", "bin", "eslint.js")
41: def to_platform_path_exact(filepath):
18:         print("Usage: %s [file|dir|glob]*" % path.basename(sys.argv[0]))
20:         print(" [file|dir|glob]*  Path or glob to run eslint on.")
59:     if not path.isfile(eslint_path):
65:         files_list = [devtools_frontend_path]
68:     eslintconfig_path = path.join(devtools_path, ".eslintrc.js")
69:     eslintignore_path = path.join(devtools_path, ".eslintignore")
70:     (node_path, _) = install_node_deps.resolve_node_paths()
72:         node_path,
73:         eslint_path,
75:         to_platform_path_exact(eslintconfig_path),
76:         "--ignore-path",
77:         to_platform_path_exact(eslintignore_path),
80:     eslint_proc = popen(exec_command, cwd=devtools_path)
37:         return filepath
38:     return re.sub(r"^/cygdrive/(\w)", "\\1:", filepath)
43:         return filepath
44:     output, _ = popen(["cygpath", "-w", filepath]).communicate()
chromium.googlesource.com/arc/arc:third_party/chromium-ppapi/third_party/WebKit/Source/devtools/scripts/lint_javascript.py:[master, ]
duplicate result
github.com/google/truth:extensions/proto/src/main/java/com/google/common/truth/extensions/proto/ProtoSubject.java:[master, ]
281:     abstract ImmutableList<SpecificField> path();
188:         ReportType type, Message message1, Message message2, ImmutableList<SpecificField> path) {
189:       ReporterRecord record = ReporterRecord.of(type, message1, message2, path);
210:                 record.type(), record.message1(), record.message2(), record.path());
219:                 record.type(), record.message1(), record.message2(), record.path());
229:                   record.type(), record.message1(), record.message2(), record.path());
257:           streamReporter.report(record.type(), record.message1(), record.message2(), record.path());
291:         ReportType type, Message message1, Message message2, ImmutableList<SpecificField> path) {
292:       return new AutoValue_ProtoSubject_ReporterRecord(type, message1, message2, path);
chromium.googlesource.com/external/webrtc/codesearch/deps:third_party/WebKit/Source/devtools/scripts/lint_javascript.py:[master, ]
duplicate result
github.com/google/u2f-ref-code:u2f-ref-code/java/src/com/google/u2f/tools/httpserver/servlets/StaticHandler.java:[master, ]
23:   private final String path;
25:   public StaticHandler(String mimeType, String path) {
27:     this.path = path;
33:       InputStream inputStream = new BufferedInputStream(new FileInputStream(path));
github.com/google/ExoPlayer:library/core/src/main/java/com/google/android/exoplayer2/util/UriUtil.java:[release-v2, ]
46:   private static final int PATH = 1;
41:    * The value at this position in the array is the index of the path part. Equals (schemeColon + 1)
43:    * (query) if no path part. The characters starting at this index can be "//" only if the
95:       removeDotSegments(uri, refIndices[PATH], refIndices[QUERY]);
112:     if (refIndices[PATH] != 0) {
116:       return removeDotSegments(uri, baseLimit + refIndices[PATH], baseLimit + refIndices[QUERY]);
119:     if (referenceUri.charAt(refIndices[PATH]) == '/') {
120:       // The reference path is rooted. The target is the base scheme and authority (if any), plus
122:       uri.append(baseUri, 0, baseIndices[PATH]).append(referenceUri);
123:       return removeDotSegments(uri, baseIndices[PATH], baseIndices[PATH] + refIndices[QUERY]);
128:     if (baseIndices[SCHEME_COLON] + 2 < baseIndices[PATH]
129:         && baseIndices[PATH] == baseIndices[QUERY]) {
130:       // Case 1: The base hier-part is just the authority, with an empty path. An additional '/' is
132:       uri.append(baseUri, 0, baseIndices[PATH]).append('/').append(referenceUri);
133:       return removeDotSegments(uri, baseIndices[PATH], baseIndices[PATH] + refIndices[QUERY] + 1);
140:       int baseLimit = lastSlashIndex == -1 ? baseIndices[PATH] : lastSlashIndex + 1;
142:       return removeDotSegments(uri, baseIndices[PATH], baseLimit + refIndices[QUERY]);
147:    * Removes dot segments from the path of a URI.
150:    * @param offset The index of the start of the path in {@code uri}.
151:    * @param limit The limit (exclusive) of the path in {@code uri}.
159:       // If the path starts with a /, always retain it.
162:     // The first character of the current path segment.
175:       // We've encountered the end of a segment or the end of the path. If the final segment was
176:       // "." or "..", remove the appropriate segments of the path.
236:     // Determine hier-part structure: hier-part = "//" authority path / path
252:     indices[PATH] = pathIndex;
241:     int pathIndex;
243:       pathIndex = uriString.indexOf('/', schemeIndex + 3); // find first '/' after "://"
244:       if (pathIndex == -1 || pathIndex > queryIndex) {
245:         pathIndex = queryIndex;
248:       pathIndex = schemeIndex + 1;
github.com/pagespeed/ngx_pagespeed:testing-dependencies/mod_pagespeed/third_party/grpc/src/third_party/protobuf/java/compatibility_tests/v2.5.0/more_protos/src/proto/google/protobuf/descriptor.proto:[master, ]
574:     repeated int32 path = 1 [packed=true];
520:   //   span   path               represents
532:   //   have an outer location whose path refers to the "extensions" repeated
534:   // - Multiple locations may have the same path.  This happens when a single
537:   //   extend blocks in the same scope, each of which will have the same path.
554:     // Each element is a field number or an index.  They form a path from
556:     // example, this path:
569:     // Thus, the above path gives the location of a field name.  If we removed
572:     // this path refers to the whole field declaration (from the beginning
android.googlesource.com/platform/packages/services/BuiltInPrintService:src/com/android/bips/discovery/DiscoveredPrinter.java:[master, ]
46:     public final Uri path;
45:     /** Resource path at which the print service can be reached */
56:      * @param path     Network path at which the printer is currently available
59:     public DiscoveredPrinter(Uri uuid, String name, Uri path, String location) {
62:         this.path = path;
69:         Uri uuid = null, path = null;
81:                 case "path":
82:                     path = Uri.parse(reader.nextString());
91:         if (printerName == null || path == null) throw new IOException("Missing name or path");
94:         this.path = path;
100:      * from the path (if UUID is missing)
103:         return uuid != null ? uuid : path;
106:     /** Return a generated printer ID based on uuid or (if uuid is missing) its path */
116:         String host = path.getHost().replaceAll(":[0-9]+", "");
130:         writer.name("path").value(path.toString());
142:         return new DiscoveredPrinter(uuid, longest(name, other.name), path,
158:                 Objects.equals(path, other.path) &&
167:         result = 31 * result + path.hashCode();
chromium.googlesource.com/ios-chromium-mirror:third_party/WebKit/Source/devtools/scripts/lint_javascript.py:[master, ]
duplicate result
chromium.googlesource.com/chromium/src:third_party/WebKit/Source/devtools/scripts/lint_javascript.py:[master, ]
duplicate result
chromium.googlesource.com/external/github.com/grpc/grpc:third_party/protobuf/java/compatibility_tests/v2.5.0/protos/src/proto/google/protobuf/descriptor.proto:[master, ]
duplicate result
github.com/grpc/grpc:third_party/protobuf/java/compatibility_tests/v2.5.0/protos/src/proto/google/protobuf/descriptor.proto:[master, ]
duplicate result
chromium.googlesource.com/external/github.com/grpc/grpc:third_party/protobuf/java/compatibility_tests/v2.5.0/more_protos/src/proto/google/protobuf/descriptor.proto:[master, ]
duplicate result
github.com/grpc/grpc:third_party/protobuf/java/compatibility_tests/v2.5.0/more_protos/src/proto/google/protobuf/descriptor.proto:[master, ]
duplicate result
github.com/google/patchfield:PatchfieldControl/src/com/noisepages/nettoyeur/patchfield/control/PatchView.java:[master, ]
198:     private final Path path = new Path();
31: import android.graphics.Path;
213:       path.reset();
222:           path.moveTo(x0, y0);
223:           path.cubicTo(x0, (y0 + y1) / 2, x1, (y0 + y1) / 2, x1, y1);
226:       canvas.drawPath(path, paint);
github.com/pagespeed/mod_pagespeed:third_party/protobuf/src/java/compatibility_tests/v2.5.0/protos/src/proto/google/protobuf/descriptor.proto:[master, ]
duplicate result
github.com/pagespeed/mod_pagespeed:third_party/protobuf/src/java/compatibility_tests/v2.5.0/more_protos/src/proto/google/protobuf/descriptor.proto:[master, ]
duplicate result
android.googlesource.com/platform/external/mockwebserver:src/main/java/com/google/mockwebserver/RecordedRequest.java:[master, ]
36:     private final String path;
103:     public String getPath() {
88:             this.path = requestLine.substring(methodEnd + 1, pathEnd);
91:             this.path = null;
104:         return path;
86:             int pathEnd = requestLine.indexOf(' ', methodEnd + 1);
github.com/GoogleCloudPlatform/multi-single-tenant-sample:serviceconsumermanagement/src/main/java/com/google/api/services/serviceconsumermanagement/v1alpha/model/CustomHttpPattern.java:[master, ]
45:   private java.lang.String path;
68:   public java.lang.String getPath() {
76:   public CustomHttpPattern setPath(java.lang.String path) {
41:    * The path matched by this custom verb.
65:    * The path matched by this custom verb.
69:     return path;
73:    * The path matched by this custom verb.
74:    * @param path path or {@code null} for none
77:     this.path = path;
chromium.googlesource.com/chromium/deps/xulrunner-sdk:win/include/liveconnect/jsjava.h:[master, ]
197:     const char *        path;   /* e.g. "java/lang", or NULL for default */
212:    created, using the provided classpath in addition to any default classpath.
213:    The classpath argument is ignored, however, if java_vm is non-NULL. */
216:                SystemJavaVM *java_vm, const char *classpath);
247:    using the provided classpath in addition to any default initargs.
android.googlesource.com/platform/external/jcommander:src/test/java/com/beust/jcommander/ValidatePropertiesWhenParsingTest.java:[master, ]
29:     private String path = "W";
36:     private String path = "W";
18:   public static class MyPathValidator implements IParameterValidator {
15:     cmd.parse(new String[] { "a", "-path", "myPathToHappiness" });
28:     @Parameter(names = "-path")
35:     @Parameter(names = "-path", validateWith = MyPathValidator.class)
android.googlesource.com/platform/frameworks/ex:common/java/com/android/common/content/SyncStateContentProviderHelper.java:[master, ]
47:     public static final String PATH = "syncstate";
gerrit.googlesource.com/plugins/lfs:src/main/java/com/googlesource/gerrit/plugins/lfs/locks/LfsCreateLockInput.java:[master, ]
18:   public final String path;
20:   LfsCreateLockInput(String path) {
21:     this.path = path;
github.com/googlesamples/android-SpeedTracker:Shared/src/main/java/com/example/android/wearable/speedtracker/common/Constants.java:[master, ]
24:     public static final String PATH = "/location";
android.googlesource.com/platform/packages/providers/ContactsProvider:src/com/android/providers/contacts/PhotoStore.java:[master, ]
289:         public final String path;
56:     private final File mStorePath;
55:     /** The file path for photo storage. */
288:         /** The path to the file. */
294:             path = file.getAbsolutePath();
70:         mStorePath = new File(rootDirectory, DIRECTORY);
72:             if (!mStorePath.exists()) {
73:                 if (!mStorePath.mkdirs()) {
75:                             + mStorePath.getPath());
88:         File[] files = mStorePath.listFiles();
119:         File[] files = mStorePath.listFiles();
198:                 file = File.createTempFile("img", null, mStorePath);
233:             Log.d("Could not clean up file %s", file.getAbsolutePath());
249:         return new File(mStorePath, String.valueOf(id));
github.com/google/earthengine-api:javascript/src/examples/Image/DownloadExample.js:[master, ]
6: var path = image.getDownloadURL({
11: print(path);
android.googlesource.com/platform/packages/providers/DownloadProvider:src/com/android/providers/downloads/DownloadScanner.java:[master, ]
52:         public final String path;
56:         public ScanRequest(long id, String path, String mimeType) {
58:             this.path = path;
64:             conn.scanFile(path, mimeType);
82:     public static void requestScanBlocking(Context context, long id, String path, String mimeType) {
85:         scanner.requestScan(new ScanRequest(id, path, mimeType));
123:         if (LOGV) Log.v(TAG, "requestScan() for " + req.path);
125:             mPending.put(req.path, req);
149:     public void onScanCompleted(String path, Uri uri) {
152:             req = mPending.remove(path);
155:             Log.w(TAG, "Missing request for path " + path);
chromium.googlesource.com/chromium/src/third_party:WebKit/Source/devtools/scripts/lint_javascript.py:[master, ]
duplicate result
gerrit.googlesource.com/plugins/owners:owners-common/src/main/java/com/vmware/gerrit/owners/common/Matcher.java:[master, ]
22:   protected String path;
42:   public void setPath(String path) {
46:   public String getPath() {
25:     this.path = key;
31:     return "Matcher [path=" + path + ", owners=" + owners + "]";
43:     this.path = path;
47:     return path;
50:   public abstract boolean matches(String pathToMatch);
github.com/MobileChromeApps/cordova-plugin-chrome-apps-system-storage:src/android/ChromeSystemStorage.java:[master, ]
36:         public File path;
28:     private static final String DATA_STORAGE_PATH = "StoragePath";
156:     private String getExternalStoragePath(String unitId) {
202:     private StorageFile getExternalStorageDirectoryByPath(String path, StorageFile[] directories) {
290:     private static String getBaseStoragePath(File directory) {
294:     private static String getBaseStoragePath(String fullPath) {
39:         public StorageFile(File path, String type) {
40:             this.path = path;
72:                 event.getData().putString(DATA_STORAGE_PATH, intent.getDataString());
81:                 // Sanitize the path provided with the event
82:                 String storagePath = getBaseStoragePath(Uri.parse(event.getData().getString(DATA_STORAGE_PATH)).getPath());
157:         // The unit ids are stored in the map where key = path, value = id,
171:         String path = getExternalStoragePath(unitId);
173:         return (path != null);
177:         String path = getExternalStoragePath(unitId);
179:         if (path == null) {
193:             // to have two external storage directories, whose path differs only by case
194:             if (getBaseStoragePath(storage).equalsIgnoreCase(path)) {
209:             if (getBaseStoragePath(storage.path).equalsIgnoreCase(path)) {
282:         String shortPath = getBaseStoragePath(directory.path);
284:         // Get the id based on the path for the directory
287:         return buildStorageUnitInfo(id, directory.path, directory.type, shortPath);
296:         // We want to use a shorter, more generic path
91:                 String unitId = plugin.getExternalStorageId(storagePath);
94:                     attachedStorage = plugin.getExternalStorageDirectoryByPath(storagePath, directories);
137:     private String getExternalStorageId(String storagePath) {
138:         return externalStorageIds.get(storagePath);
218:         // Setup the mapping from external storage paths to unit ids.  According to the
249:             String storagePath = getBaseStoragePath(storage);
251:             if (externalStorageIds.containsKey(storagePath)) {
256:             externalStorageIds.put(storagePath, id);
285:         String id = getExternalStorageId(shortPath);
291:         return getBaseStoragePath(directory.getAbsolutePath());
295:         // The generated storage paths will typically be an app-specific directory to store files
297:         int pos = fullPath.indexOf("/Android/data");
300:             return fullPath.substring(0, pos);
302:         return fullPath;
github.com/angular/protractor-cookbook:protractor-javascript/example-screenshot/screenshotReporter.js:[master, ]
3: var path = require('path');
8:   dir = path.join(dir, new Date().toISOString());
11:   // base function to take a screenshot -- change path as needed
17:       var stream = fs.createWriteStream(path.join(dir, fname));
gerrit.googlesource.com/plugins/hooks:src/main/java/com/googlesource/gerrit/plugins/hooks/Hook.java:[master, ]
20:   protected final Path path;
17: import java.nio.file.Path;
22:   Hook(Path path) {
23:     this.path = path;