Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
294,200 | void (@NotNull XValueTextRenderer renderer) { renderer.renderComment(myValue); } | renderValue |
294,201 | Location () { return script == null ? new Location(url, line) : new Location(script, line, -1); } | withoutColumn |
294,202 | Url () { return url; } | getUrl |
294,203 | Script () { return script; } | getScript |
294,204 | int () { return line; } | getLine |
294,205 | int () { return column; } | getColumn |
294,206 | boolean (Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Location location = (Location)o; return column == location.column && line == location.line && url.equals(location.url); } | equals |
294,207 | int () { int result = url.hashCode(); result = 31 * result + line; result = 31 * result + column; return result; } | hashCode |
294,208 | boolean () { return false; } | isDomPropertiesValue |
294,209 | ThreeState (@NotNull String name, @NotNull Object beanValue) { return name.equals("port") ? ThreeState.fromBoolean(!beanValue.equals(defaultPort)) : ThreeState.UNSURE; } | accepts |
294,210 | String () { return host; } | getHost |
294,211 | void (@Nullable String value) { if (StringUtil.isEmpty(value) || value.equals("localhost") || value.equals("127.0.0.1")) { host = null; } else { host = value; } } | setHost |
294,212 | int () { return port; } | getPort |
294,213 | void (int port) { this.port = port; } | setPort |
294,214 | RunProfileState (@NotNull Executor executor, @NotNull ExecutionEnvironment env) { return EmptyRunProfileState.INSTANCE; } | getState |
294,215 | RunConfiguration () { RemoteDebugConfiguration configuration = (RemoteDebugConfiguration)super.clone(); configuration.host = host; configuration.port = port; return configuration; } | clone |
294,216 | InetSocketAddress (RunProfileState state) { if (host == null) { return new InetSocketAddress(InetAddress.getLoopbackAddress(), port); } else { return new InetSocketAddress(host, getPort()); } } | computeDebugAddress |
294,217 | void (@NotNull RemoteDebugConfiguration configuration) { hostField.setText(StringUtil.notNullize(configuration.host, "localhost")); portField.setNumber(configuration.port); } | resetEditorFrom |
294,218 | void (@NotNull RemoteDebugConfiguration configuration) { configuration.setHost(hostField.getText()); configuration.setPort(portField.getNumber()); } | applyEditorTo |
294,219 | JComponent () { return FormBuilder.createFormBuilder().addLabeledComponent(XDebuggerBundle.message("label.host"), hostField) .addLabeledComponent(XDebuggerBundle.message("label.port"), portField).getPanel(); } | createEditor |
294,220 | XSourcePosition (@Nullable PsiElement element) { if (element != null) { return XDebuggerUtil.getInstance().createPositionByElement(element.getNavigationElement()); } return null; } | calcSourcePosition |
294,221 | void (@NotNull PsiElement element) { if (!(element instanceof ForeignLeafPsiElement) && element.isPhysical()) { super.visitElement(element); } } | visitElement |
294,222 | void (@NotNull PsiWhiteSpace space) { } | visitWhiteSpace |
294,223 | void (@NotNull PsiComment comment) { } | visitComment |
294,224 | void (@NotNull OuterLanguageElement element) { } | visitOuterLanguageElement |
294,225 | XValueGroup () { return valueGroup; } | getValueGroup |
294,226 | void (@NotNull XValueChildrenList children, boolean last) { for (XValueGroup group : children.getTopGroups()) { this.children.addTopGroup(group); } for (int i = 0; i < children.size(); i++) { this.children.add(children.getName(i), children.getValue(i)); } for (XValueGroup group : children.getBottomGroups()) { this.children.addBottomGroup(group); } if (last) { result.setResult(this.children); } } | addChildren |
294,227 | void (int remaining) { result.setResult(children); } | tooManyChildren |
294,228 | void (boolean alreadySorted) { } | setAlreadySorted |
294,229 | void (@NotNull String errorMessage) { result.setError(errorMessage); } | setErrorMessage |
294,230 | void (@NotNull String errorMessage, @Nullable XDebuggerTreeNodeHyperlink link) { setErrorMessage(errorMessage); } | setErrorMessage |
294,231 | void (@NotNull String message, @Nullable Icon icon, @NotNull SimpleTextAttributes attributes, @Nullable XDebuggerTreeNodeHyperlink link) { } | setMessage |
294,232 | Promise<XValueChildrenList> () { return result; } | getResult |
294,233 | Promise<Content> (@NotNull final Condition<XValueGroup> groupContentResolveCondition, @NotNull final Condition<VariableView> valueSubContentResolveCondition) { assert content == null; content = new Content(); return result.thenAsync(new Function<>() { private void resolveGroups(@NotNull List<XValueGroup> valueGroups, @NotNull List<TestCompositeNode> resultNodes, @NotNull List<Promise<?>> promises) { for (XValueGroup group : valueGroups) { TestCompositeNode node = new TestCompositeNode(group); boolean computeChildren = groupContentResolveCondition.value(group); if (computeChildren) { group.computeChildren(node); } resultNodes.add(node); if (computeChildren) { promises.add(node.loadContent(Conditions.alwaysFalse(), valueSubContentResolveCondition)); } } } @NotNull @Override public Promise<Content> fun(XValueChildrenList list) { List<Promise<?>> promises = new ArrayList<>(); resolveGroups(children.getTopGroups(), content.topGroups, promises); for (int i = 0; i < children.size(); i++) { XValue value = children.getValue(i); TestValueNode node = new TestValueNode(); node.myName = children.getName(i); value.computePresentation(node, XValuePlace.TREE); content.values.add(node); promises.add(node.getResult()); // myHasChildren could be not computed yet if (value instanceof VariableView && ((VariableView)value).getValue() instanceof ObjectValue && valueSubContentResolveCondition.value((VariableView)value)) { promises.add(node.loadChildren(value)); } } resolveGroups(children.getBottomGroups(), content.bottomGroups, promises); return Promises.all(promises, content); } }); } | loadContent |
294,234 | void (@NotNull List<XValueGroup> valueGroups, @NotNull List<TestCompositeNode> resultNodes, @NotNull List<Promise<?>> promises) { for (XValueGroup group : valueGroups) { TestCompositeNode node = new TestCompositeNode(group); boolean computeChildren = groupContentResolveCondition.value(group); if (computeChildren) { group.computeChildren(node); } resultNodes.add(node); if (computeChildren) { promises.add(node.loadContent(Conditions.alwaysFalse(), valueSubContentResolveCondition)); } } } | resolveGroups |
294,235 | Promise<Content> (XValueChildrenList list) { List<Promise<?>> promises = new ArrayList<>(); resolveGroups(children.getTopGroups(), content.topGroups, promises); for (int i = 0; i < children.size(); i++) { XValue value = children.getValue(i); TestValueNode node = new TestValueNode(); node.myName = children.getName(i); value.computePresentation(node, XValuePlace.TREE); content.values.add(node); promises.add(node.getResult()); // myHasChildren could be not computed yet if (value instanceof VariableView && ((VariableView)value).getValue() instanceof ObjectValue && valueSubContentResolveCondition.value((VariableView)value)) { promises.add(node.loadChildren(value)); } } resolveGroups(children.getBottomGroups(), content.bottomGroups, promises); return Promises.all(promises, content); } | fun |
294,236 | Promise<XTestValueNode> () { return result; } | getResult |
294,237 | Promise<Content> (@NotNull XValue value) { TestCompositeNode childrenNode = new TestCompositeNode(); value.computeChildren(childrenNode); return childrenNode.loadContent(Conditions.alwaysFalse(), Conditions.alwaysFalse()) .onSuccess(content -> children = content); } | loadChildren |
294,238 | Content () { return children; } | getChildren |
294,239 | void (@Nullable Icon icon, @NotNull XValuePresentation valuePresentation, boolean hasChildren) { super.applyPresentation(icon, valuePresentation, hasChildren); result.setResult(this); } | applyPresentation |
294,240 | String (JsonReaderEx reader) { return reader.nextString(); } | read |
294,241 | void (JsonReaderEx reader) { if (reader.peek() == JsonToken.NULL) { throw new RuntimeException("Field is not nullable"); } } | checkIsNull |
294,242 | boolean (JsonReaderEx reader) { if (reader.peek() == JsonToken.NULL) { reader.skipValue(); return true; } else return false; } | readsNull |
294,243 | String (JsonReaderEx reader) { return reader.nextString(true); } | readRawString |
294,244 | Object (JsonReaderEx reader) { if (reader.peek() == JsonToken.BEGIN_OBJECT) { return readMap(reader, null); } else { return reader.nextString(true); } } | readRawStringOrMap |
294,245 | String (@NotNull String enumValue) { int n = enumValue.length(); StringBuilder builder = new StringBuilder(n + 4); boolean prevIsLowerCase = false; for (int i = 0; i < n; i++) { char c = enumValue.charAt(i); if (c == '-' || c == ' ') { builder.append('_'); continue; } if (Character.isUpperCase(c)) { // second check handle "CSPViolation" (transform to CSP_VIOLATION) if (prevIsLowerCase || (i != 0 && (i + 1) < n && Character.isLowerCase(enumValue.charAt(i + 1)))) { builder.append('_'); } builder.append(c); prevIsLowerCase = false; } else { builder.append(Character.toUpperCase(c)); prevIsLowerCase = true; } } return builder.toString(); } | convertRawEnumName |
294,246 | Object (JsonReaderEx reader) { return switch (reader.peek()) { case BEGIN_ARRAY -> nextList(reader); case BEGIN_OBJECT -> { reader.beginObject(); yield nextObject(reader); } case STRING -> reader.nextString(); case NUMBER -> reader.nextDouble(); case BOOLEAN -> reader.nextBoolean(); case NULL -> { reader.nextNull(); yield null; } default -> throw new IllegalStateException(); }; } | read |
294,247 | List<String> (JsonReaderEx reader) { reader.beginArray(); if (!reader.hasNext()) { reader.endArray(); return Collections.emptyList(); } List<String> list = new ArrayList<>(); do { list.add(reader.nextString(true)); } while (reader.hasNext()); reader.endArray(); return list; } | readRawStringArray |
294,248 | long[] (JsonReaderEx reader) { checkIsNull(reader); reader.beginArray(); if (!reader.hasNext()) { reader.endArray(); return ArrayUtilRt.EMPTY_LONG_ARRAY; } LongArrayList result = new LongArrayList(); do { result.add(reader.nextLong()); } while (reader.hasNext()); reader.endArray(); return result.toLongArray(); } | readLongArray |
294,249 | double[] (JsonReaderEx reader) { checkIsNull(reader); reader.beginArray(); if (!reader.hasNext()) { reader.endArray(); return new double[]{0}; } DoubleArrayList result = new DoubleArrayList(); do { result.add(reader.nextDouble()); } while (reader.hasNext()); reader.endArray(); return result.toDoubleArray(); } | readDoubleArray |
294,250 | int[] (JsonReaderEx reader) { checkIsNull(reader); reader.beginArray(); if (!reader.hasNext()) { reader.endArray(); return ArrayUtilRt.EMPTY_INT_ARRAY; } IntList result = new IntArrayList(); do { result.add(reader.nextInt()); } while (reader.hasNext()); reader.endArray(); return result.toIntArray(); } | readIntArray |
294,251 | List<StringIntPair> (JsonReaderEx reader) { checkIsNull(reader); reader.beginArray(); if (!reader.hasNext()) { reader.endArray(); return Collections.emptyList(); } List<StringIntPair> result = new ArrayList<>(); do { reader.beginArray(); result.add(new StringIntPair(reader.nextInt(), reader.nextString())); reader.endArray(); } while (reader.hasNext()); reader.endArray(); return result; } | readIntStringPairs |
294,252 | boolean (String name, JsonReaderEx reader) { reader.beginObject(); while (reader.hasNext()) { if (reader.nextName().equals(name)) { return reader.nextBoolean(); } else { reader.skipValue(); } } return false; } | findBooleanField |
294,253 | ValueModifier () { return valueModifier; } | getValueModifier |
294,254 | String () { return name; } | getName |
294,255 | Value () { return value; } | getValue |
294,256 | void (Value value) { if (!valueForced) { this.value = value; } } | setValue |
294,257 | void (Value value) { valueForced = true; this.value = value; } | forceValue |
294,258 | boolean () { return valueModifier != null; } | isMutable |
294,259 | boolean () { return true; } | isReadable |
294,260 | String () { return "[Variable: name=" + getName() + ", value=" + getValue() + ']'; } | toString |
294,261 | String () { return script.toString(); } | toString |
294,262 | boolean (Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } return script.equals(((ScriptId)o).script); } | equals |
294,263 | int () { return script.hashCode(); } | hashCode |
294,264 | String () { return name; } | getName |
294,265 | Script () { return script; } | getScript |
294,266 | String () { return name; } | toString |
294,267 | boolean (Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } return name.equals(((ScriptName)o).name); } | equals |
294,268 | int () { return name.hashCode(); } | hashCode |
294,269 | boolean (@NotNull VariablesHost host, @NotNull List<Variable> data) { return host.valueManager.getCacheStamp() == host.cacheStamp; } | isUpToDate |
294,270 | Promise (@NotNull VariablesHost host) { return host.valueManager.isObsolete() ? Promises.cancelledPromise() : host.load(); } | load |
294,271 | Promise<List<Variable>> () { return VARIABLES_LOADER.get(this); } | get |
294,272 | void (@NotNull List<Variable> result) { updateCacheStamp(); VARIABLES_LOADER.set(this, result); } | set |
294,273 | void () { cacheStamp = valueManager.getCacheStamp(); } | updateCacheStamp |
294,274 | Value () { return exceptionValue; } | getExceptionValue |
294,275 | int (CharIterator in) { int result = 0; int shift = 0; int digit; do { digit = Base64.BASE64_DECODE_MAP[in.next()]; assert (digit != -1) : "invalid char"; result += (digit & VLQ_BASE_MASK) << shift; shift += VLQ_BASE_SHIFT; } while ((digit & VLQ_CONTINUATION_BIT) != 0); boolean negate = (result & 1) == 1; result >>= 1; return negate ? -result : result; } | decode |
294,276 | AttachOSHandler () { if(myOsHandler == null) { myOsHandler = AttachOSHandler.getAttachOsHandler(this); } return myOsHandler; } | getOsHandler |
294,277 | boolean (@NotNull final Object credentialsObject) { return false; } | isSameHost |
294,278 | int () { return 0; } | getOrder |
294,279 | String () { return ""; } | getGroupName |
294,280 | Icon (@NotNull Project project, @NotNull ProcessInfo info, @NotNull UserDataHolder dataHolder) { return EmptyIcon.ICON_16; } | getItemIcon |
294,281 | String (@NotNull Project project, @NotNull ProcessInfo info, @NotNull UserDataHolder dataHolder) { return info.getExecutableDisplayName(); } | getItemDisplayText |
294,282 | WSLDistribution () { return myWsl; } | getWsl |
294,283 | boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; WslAttachHost host = (WslAttachHost)o; return Objects.equals(myWsl, host.myWsl); } | equals |
294,284 | int () { return Objects.hash(myWsl); } | hashCode |
294,285 | List<ProcessInfo> () { return Arrays.asList(OSProcessUtil.getProcessList()); } | getProcessList |
294,286 | boolean (@NotNull String filePath) { return new File(filePath).canRead(); } | canReadFile |
294,287 | String () { return ""; } | getFileSystemHostId |
294,288 | int () { //TODO should be reworked after merging according to jsch-nio try { GeneralCommandLine commandLine = new GeneralCommandLine(Arrays.asList("id", "-u")); String uid = myHost.getProcessOutput(commandLine).getStdout().trim(); try { return Integer.parseInt(uid); } catch (NumberFormatException e) { LOGGER.warn("Error while parsing user id from " + uid, e); return -1; } } catch (ExecutionException ex) { LOGGER.warn("Error while getting user id", ex); return -1; } } | getUid |
294,289 | int () { try { final InputStream fileStream = myHost.getFileContent(PTRACE_SCOPE_PATH); if (fileStream != null) { if (!myHost.canReadFile(PTRACE_SCOPE_PATH)) { LOGGER.warn(PTRACE_SCOPE_PATH + " file exists but you don't have permissions to read it."); return 3; // The strongest possible level } final BufferedReader buf = new BufferedReader(new InputStreamReader(fileStream, StandardCharsets.UTF_8)); final String fileContent = buf.readLine(); try (Scanner scanner = new Scanner(fileContent)) { return scanner.nextInt(); } catch (Exception ex) { LOGGER.warn("Could not read security level from " + PTRACE_SCOPE_PATH, ex); return 3; // The strongest possible level } } } catch (IOException | ExecutionException e) { LOGGER.warn("Error while uploading file:" + PTRACE_SCOPE_PATH, e); return 1; } return 1; // default PTRACE_SCOPE value } | getPtraceScope |
294,290 | boolean (int pid) { List<String> commands = new ArrayList<>(); commands.add("/bin/sh"); commands.add("-c"); commands.add(String.format(GET_PROCESS_USER, pid)); try { return myHost.getProcessOutput(new GeneralCommandLine(commands)).getStdout().trim().equals(getenv("USER")); } catch (Exception e) { LOGGER.warn("Failed to compare users", e); return false; } } | isOurProcess |
294,291 | OSType () { return myOSType; } | getOSType |
294,292 | AttachOSHandler (@NotNull EnvironmentAwareHost host) { try { final OSType osType = computeOsType(host); if (osType == OSType.LINUX) { return new LinuxAttachOSHandler(host); } if (osType == OSType.MACOSX) { return new MacAttachOSHandler(host); } if (osType == OSType.WINDOWS) { return new GenericAttachOSHandler(host, OSType.WINDOWS); } } catch (ExecutionException e) { LOG.warn("Error while obtaining host operating system", e); } return new GenericAttachOSHandler(host, OSType.UNKNOWN); } | getAttachOsHandler |
294,293 | OSType () { if(SystemInfo.isLinux) { return OSType.LINUX; } if(SystemInfo.isMac) { return OSType.MACOSX; } if(SystemInfo.isWindows) { return OSType.WINDOWS; } return OSType.UNKNOWN; } | localComputeOsType |
294,294 | String () { return "AttachOSHandler{" + "myOSType=" + myOSType + '}'; } | toString |
294,295 | LazyAttachVirtualFS () { return (LazyAttachVirtualFS)VirtualFileManager.getInstance().getFileSystem(PROTOCOL); } | getInstance |
294,296 | String () { return PROTOCOL; } | getProtocol |
294,297 | VirtualFile (@NotNull String path, @NotNull EnvironmentAwareHost hostInfo) { final String fullFilePath = hostInfo.getFileSystemHostId() + path; return myFileCache.computeIfAbsent(fullFilePath, s -> { String content; try { content = getFileContent(hostInfo, path); } catch (IOException e) { LOG.warn("can't read file", e); return null; } if (content == null) { return null; } return new LazyAttachVirtualFile(fullFilePath, content); }); } | findFileByPath |
294,298 | VirtualFile (@NotNull String path) { return myFileCache.get(path); } | findFileByPath |
294,299 | void (boolean asynchronous) { throw new IncorrectOperationException(); } | refresh |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.