idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,563,337 | public MessageReaction createMessageReaction(MessageChannel chan, long id, DataObject obj) {<NEW_LINE>DataObject emoji = obj.getObject("emoji");<NEW_LINE>final Long emojiID = emoji.isNull("id") ? null : emoji.getLong("id");<NEW_LINE>final String name = emoji.getString("name", "");<NEW_LINE>final boolean <MASK><NEW_LINE... | animated = emoji.getBoolean("animated"); |
850,503 | static public View createToggle(LayoutInflater layoutInflater, OsmandApplication ctx, @LayoutRes int layoutId, LinearLayout layout, ApplicationMode mode, boolean useMapTheme) {<NEW_LINE>int metricsX = (int) ctx.getResources().getDimension(R.dimen.route_info_modes_height);<NEW_LINE>int metricsY = (int) ctx.getResources(... | (ctx, useMapTheme)))); |
1,143,070 | protected CommandExecutionResult executeNow(AbstractEntityDiagram diagram, BlocLines lines) throws NoSuchColorException {<NEW_LINE>lines = lines.trimSmart(1);<NEW_LINE>final RegexResult line0 = getStartingPattern().matcher(lines.getFirst().getTrimmed().getString());<NEW_LINE>final String symbol = StringUtils.goUpperCas... | code.getName() + ") is already defined"); |
990,403 | public Node operate(final AtomicValue mOperand1, final AtomicValue mOperand2) throws SirixXPathException {<NEW_LINE>final Type returnType = getReturnType(mOperand1.getTypeKey(), mOperand2.getTypeKey());<NEW_LINE>final int typeKey = asXdmNodeReadTrx().keyForName(returnType.getStringRepr());<NEW_LINE>final byte[] value;<... | throw new XPathError(ErrorType.FOAR0001); |
410,540 | private void addConstructor(AnnotationTypeDeclaration node, Map<ExecutableElement, VariableElement> fieldElements) {<NEW_LINE>TypeElement type = node.getTypeElement();<NEW_LINE>String typeName = nameTable.getFullName(type);<NEW_LINE>FunctionDeclaration constructorDecl = new FunctionDeclaration("create_" + typeName, typ... | propName = NameTable.getAnnotationPropertyName(memberElement); |
1,233,007 | public static ToIntFunction<Object> specilizeyyyydd(int num, SimpleColumnInfo column1) {<NEW_LINE>ToIntFunction<Object> dbFunction;<NEW_LINE>switch(column1.getType()) {<NEW_LINE>case NUMBER:<NEW_LINE>dbFunction = o -> yyyydd(num, column1.normalizeValue(o));<NEW_LINE>break;<NEW_LINE>case STRING:<NEW_LINE>dbFunction = o ... | , column1.normalizeValue(o)); |
636,142 | private List<ResourceInventory> filterNoAccessResources(Set<String> resourceUuids, String accountUuid) {<NEW_LINE>if (resourceUuids.isEmpty()) {<NEW_LINE>return Collections.emptyList();<NEW_LINE>}<NEW_LINE>return new SQLBatchWithReturn<List<ResourceInventory>>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected List<Re... | collect(Collectors.toList()); |
760,113 | public PredictorExecutionDetails unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>PredictorExecutionDetails predictorExecutionDetails = new PredictorExecutionDetails();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>J... | String currentParentElement = context.getCurrentParentElement(); |
399,141 | public boolean isWriteTypeInfo(Object object, Class fieldClass, long features) {<NEW_LINE>if (object == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>if (objectClass == fieldClass) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>features |= context.features;<NEW_LINE>if ((features & Feature.WriteClass... | Class objectClass = object.getClass(); |
606,008 | protected SootMethod generateRedirectMethodForBindService(SootClass serviceConnection, SootClass destComp) {<NEW_LINE>ServiceEntryPointInfo entryPointInfo = (ServiceEntryPointInfo) componentToEntryPoint.get(destComp);<NEW_LINE>if (entryPointInfo == null) {<NEW_LINE>logger.warn(<MASK><NEW_LINE>return null;<NEW_LINE>}<NE... | "Destination component {} has no dummy main method", destComp.getName()); |
838,554 | public Spec process(StringCharReader reader, String contextPath) {<NEW_LINE>SpecCentered.Alignment alignment = SpecCentered.Alignment.ALL;<NEW_LINE>SpecCentered.Location location = null;<NEW_LINE>String word = reader.readWord();<NEW_LINE>if (word.isEmpty()) {<NEW_LINE>throw new SyntaxException("Missing location and ali... | SpecCentered.Alignment.fromString(word); |
1,661,896 | public static ListTagsResponse unmarshall(ListTagsResponse listTagsResponse, UnmarshallerContext context) {<NEW_LINE>listTagsResponse.setRequestId(context.stringValue("ListTagsResponse.RequestId"));<NEW_LINE>listTagsResponse.setCode(context.stringValue("ListTagsResponse.Code"));<NEW_LINE>listTagsResponse.setMessage(con... | ("ListTagsResponse.Tags[" + i + "].Cover.Ctime")); |
1,004,413 | protected boolean canPlace(BlockPlaceContext context, BlockState state) {<NEW_LINE>net.minecraft.world.entity.player.Player playerentity = context.getPlayer();<NEW_LINE>CollisionContext iselectioncontext = playerentity == null ? CollisionContext.empty(<MASK><NEW_LINE>boolean original = (!this.mustSurvive() || state.can... | ) : CollisionContext.of(playerentity); |
682,658 | private BodyType createBodyType(@NonNull final XmlBody body) {<NEW_LINE>final BodyType bodyType = jaxbRequestObjectFactory.createBodyType();<NEW_LINE>bodyType.setPlace(body.getPlace());<NEW_LINE>bodyType.setRole(body.getRole());<NEW_LINE>bodyType.setRoleTitle(body.getRoleTitle());<NEW_LINE>bodyType.setProlog(createProl... | getTiers().getBiller()); |
708,417 | public static String computeDefinitionName(String ref, Set<String> reserved) {<NEW_LINE>final String[] refParts = ref.split("#/");<NEW_LINE>if (refParts.length > 2) {<NEW_LINE>throw new RuntimeException("Invalid ref format: " + ref);<NEW_LINE>}<NEW_LINE>final String file = refParts[0];<NEW_LINE>final String definitionP... | jsonPathElements = definitionPath.split("/"); |
1,504,724 | public okhttp3.Call readNamespacedRoleBindingCall(String name, String namespace, String pretty, final ApiCallback _callback) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/... | = new String[] { "BearerToken" }; |
347,780 | protected void performAction(Node[] activatedNodes) {<NEW_LINE>final GrailsPlatform runtime = GrailsPlatform.getDefault();<NEW_LINE>if (!runtime.isConfigured()) {<NEW_LINE>ConfigurationSupport.showConfigurationWarning(runtime);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>DataObject dataObject = activatedNodes[0].getLookup().l... | getNameExt().length()); |
365,711 | public void marshall(RuleGroup ruleGroup, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (ruleGroup == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(ruleGroup.getName(), NAME_BINDING);<NEW_LINE>protocolMars... | ruleGroup.getCustomResponseBodies(), CUSTOMRESPONSEBODIES_BINDING); |
167,510 | public void drawInfo(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight, int mouseX, int mouseY) {<NEW_LINE>FontRenderer fr = minecraft.fontRenderer;<NEW_LINE>String txt = Lang.GUI_ZOMBGEN_OUTPUT.get("");<NEW_LINE>int <MASK><NEW_LINE>fr.drawStringWithShadow(txt, 89 - sw / 2 - xOff, 0 - yOff, ColorUtil.getR... | sw = fr.getStringWidth(txt); |
640,815 | public Object postProcessBeforeInitialization(final Object bean, final String beanName) throws BeansException {<NEW_LINE>Class<?> clazz = bean.getClass();<NEW_LINE>if (isProxyBean(bean)) {<NEW_LINE>clazz = AopUtils.getTargetClass(bean);<NEW_LINE>}<NEW_LINE>Field[] fields = clazz.getDeclaredFields();<NEW_LINE>for (Field... | field.getType(), ref); |
452,771 | // convert java.io.files into relative paths under the root container.<NEW_LINE>private Set<String> convertAbsToRelative(Collection<File> files) {<NEW_LINE>Set<String> result = new HashSet<String>();<NEW_LINE>for (File f : files) {<NEW_LINE>// assumption here that f is a dir, and path will end in File.seperator<NEW_LIN... | fAbsPath = PathUtils.fixPathString(f); |
484,255 | protected void installStrings(JFileChooser fc) {<NEW_LINE>super.installStrings(fc);<NEW_LINE>Locale l = fc.getLocale();<NEW_LINE>lookInLabelMnemonic = UIManager.getInt("FileChooser.lookInLabelMnemonic");<NEW_LINE>lookInLabelText = UIManager.getString("FileChooser.lookInLabelText", l);<NEW_LINE>saveInLabelText = UIManag... | getMessage(DirectoryChooserUI.class, "TLTP_NewFolder"); |
1,166,583 | private void saveStates(@Nonnull final File dir) {<NEW_LINE>final Element storeElement = new Element(StorageData.COMPONENT);<NEW_LINE>for (final String componentName : copiedStorageData.getComponentNames()) {<NEW_LINE>copiedStorageData.processComponent(componentName, (fileName, state) -> {<NEW_LINE>if (!dirtyFileNames.... | setAttribute(StorageData.NAME, componentName); |
1,395,955 | public DemotionResult demote(User user, ContextSet context, Predicate<String> previousGroupPermissionChecker, @Nullable Sender sender, boolean removeFromFirst) {<NEW_LINE>if (getSize() <= 1) {<NEW_LINE>throw new IllegalStateException("Track contains one or fewer groups, unable to demote");<NEW_LINE>}<NEW_LINE>// find a... | previousGroup.getName(), sender); |
232,407 | public HistoricTaskInstanceEntity recordTaskInfoChange(TaskEntity taskEntity, Date changeTime, AbstractEngineConfiguration engineConfiguration) {<NEW_LINE>HistoricTaskInstanceEntity historicTaskInstance = getHistoricTaskInstanceEntityManager().findById(taskEntity.getId());<NEW_LINE>if (historicTaskInstance != null) {<N... | setDueDate(taskEntity.getDueDate()); |
485,081 | public static int borderInverseUpper(WlBorderCoef<?> desc, BorderIndex1D border, int dataLength) {<NEW_LINE>WlCoef inner = desc.getInnerCoefficients();<NEW_LINE>int borderSize = borderForwardUpper(inner, dataLength);<NEW_LINE>borderSize += borderSize % 2;<NEW_LINE>WlCoef uu = borderSize > 0 ? inner : null;<NEW_LINE>WlC... | desc.getBorderCoefficients(2000 - indexUL); |
1,043,488 | public CreateProjectResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CreateProjectResult createProjectResult = new CreateProjectResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDep... | class).unmarshall(context)); |
125,945 | public PCollection<Long> expand(PCollection<T> input) {<NEW_LINE>TypeDescriptor<T> type = input.getCoder().getEncodedTypeDescriptor();<NEW_LINE>if (HLL_IMPLEMENTED_TYPES.contains(type)) {<NEW_LINE>HllCount.Init.Builder<T> builder = builderForType(type);<NEW_LINE>return input.apply(builder.globally()).apply(HllCount.Ext... | ().getCanonicalName())); |
1,298,466 | void assembleMessageParameters() {<NEW_LINE>mAid = SecureUtils.<MASK><NEW_LINE>final ByteBuffer paramsBuffer;<NEW_LINE>LOG.info("State: " + (mState ? "ON" : "OFF"));<NEW_LINE>if (mTransitionSteps == null || mTransitionResolution == null || mDelay == null) {<NEW_LINE>paramsBuffer = ByteBuffer.allocate(GENERIC_ON_OFF_SET... | calculateK4(mAppKey.getKey()); |
387,444 | private void applyStrategy(int region, @Nonnull String seq, @Nonnull StringBuilder builder) {<NEW_LINE>if (strategy == SanitizationStrategy.REMOVE) {<NEW_LINE>if (codeLanguage.matcher(seq).matches())<NEW_LINE>builder.append(seq.substring(seq.indexOf("\n") + 1));<NEW_LINE>else<NEW_LINE>builder.append(seq);<NEW_LINE>retu... | ("\\").append(token); |
260,458 | protected Object readItem(Element tr, Set<String> selected, DesignContext context) {<NEW_LINE><MASK><NEW_LINE>if (visibleColumns.size() != cells.size()) {<NEW_LINE>throw new DesignException("Wrong number of columns in a Table row. Expected " + visibleColumns.size() + ", was " + cells.size() + ".");<NEW_LINE>}<NEW_LINE>... | Elements cells = tr.children(); |
249,371 | public void onMapReady(@NonNull MapboxMap map) {<NEW_LINE>mapboxMap = map;<NEW_LINE>map.setStyle(Style.LIGHT, new Style.OnStyleLoaded() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onStyleLoaded(@NonNull Style style) {<NEW_LINE>// Disable any type of fading transition when icons collide on the map. This enhances... | , -79.045), 3)); |
1,291,694 | public void marshall(AwsApiGatewayV2StageDetails awsApiGatewayV2StageDetails, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (awsApiGatewayV2StageDetails == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(aws... | awsApiGatewayV2StageDetails.getRouteSettings(), ROUTESETTINGS_BINDING); |
811,912 | public void onEntityCollision(Level world, Entity entity) {<NEW_LINE>if (!world.isClientSide && entity != null && entity.isAlive()) {<NEW_LINE>SawmillTileEntity master = master();<NEW_LINE>if (master == null)<NEW_LINE>return;<NEW_LINE>if (new BlockPos(0, 1, 1).equals(posInMultiblock) && entity instanceof ItemEntity) {<... | hurt(IEDamageSources.sawmill, 7); |
1,339,294 | public void marshall(Artwork artwork, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (artwork == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(artwork.getInputKey(), INPUTKEY_BINDING);<NEW_LINE>protocolMars... | artwork.getAlbumArtFormat(), ALBUMARTFORMAT_BINDING); |
1,539,494 | public Map<String, String> runDiagnosticsCommand(final RunDiagnosticsCmd cmd) {<NEW_LINE>final Long vmId = cmd.getId();<NEW_LINE>final String cmdType = cmd.getType().getValue();<NEW_LINE>final String ipAddress = cmd.getAddress();<NEW_LINE>final String optionalArguments = cmd.getOptionalArguments();<NEW_LINE>final VMIns... | ", on remote host: " + vmInstance.getHostName()); |
1,401,312 | public static DescribeContactsResponse unmarshall(DescribeContactsResponse describeContactsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeContactsResponse.setRequestId(_ctx.stringValue("DescribeContactsResponse.RequestId"));<NEW_LINE>describeContactsResponse.setSuccess(_ctx.booleanValue("DescribeContactsRespons... | = new ArrayList<Contact>(); |
1,316,974 | public void configure(ConfigurableProvider provider) {<NEW_LINE>provider.addAlgorithm("MessageDigest.SHA3-224", PREFIX + "$Digest224");<NEW_LINE>provider.addAlgorithm("MessageDigest.SHA3-256", PREFIX + "$Digest256");<NEW_LINE>provider.addAlgorithm("MessageDigest.SHA3-384", PREFIX + "$Digest384");<NEW_LINE>provider.addA... | provider.addAlgorithm("Alg.Alias.MessageDigest.TUPLEHASH256", "TUPLEHASH256-512"); |
801,754 | void mergeXML(AdministeredObject aod) throws InjectionConfigurationException {<NEW_LINE>final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();<NEW_LINE>if (isTraceOn && tc.isEntryEnabled())<NEW_LINE>Tr.entry(tc, "mergeXML: name=" + getJndiName() + ", binding=" + ", " + aod);<NEW_LINE>String nameValue = aod.get... | name, nameValue, "name", KEY_NAME); |
1,128,118 | private void computeCollectionChildren(@NotNull InstanceRef instanceRef, int offset, @NotNull final XCompositeNode node) {<NEW_LINE>final int count = Math.min(instanceRef.getLength() - offset, XCompositeNode.MAX_CHILDREN_TO_SHOW);<NEW_LINE>myDebugProcess.getVmServiceWrapper().getCollectionObject(myIsolateId, myInstance... | assert false : instanceRef.getKind(); |
1,278,745 | protected void readBitmap() {<NEW_LINE>// (sub)image position & size<NEW_LINE>currentFrame.ix = readShort();<NEW_LINE>currentFrame.iy = readShort();<NEW_LINE>currentFrame.iw = readShort();<NEW_LINE>currentFrame.ih = readShort();<NEW_LINE>int packed = read();<NEW_LINE>// 1 - local color table flag interlace<NEW_LINE>lct... | = (packed & 0x40) != 0; |
252,728 | public boolean filterCheck(DiskManagerFileInfo ds, String filter, boolean regex) {<NEW_LINE>if (hide_dnd_files) {<NEW_LINE>if (ds.isSkipped()) {<NEW_LINE>return (false);<NEW_LINE>} else if (ds instanceof FilesViewNodeInner) {<NEW_LINE>// see if all kids skipped<NEW_LINE>if (((FilesViewNodeInner) ds).getSkippedState() =... | ).find() == match_result); |
1,155,085 | public void caseATableswitchStatement(ATableswitchStatement node) {<NEW_LINE>inATableswitchStatement(node);<NEW_LINE>if (node.getSemicolon() != null) {<NEW_LINE>node.getSemicolon().apply(this);<NEW_LINE>}<NEW_LINE>if (node.getRBrace() != null) {<NEW_LINE>node.getRBrace().apply(this);<NEW_LINE>}<NEW_LINE>{<NEW_LINE>List... | getRParen().apply(this); |
864,812 | public void run() {<NEW_LINE>if (window != null) {<NEW_LINE>FileDialog dialog = new FileDialog(window.getShell(), SWT.OPEN);<NEW_LINE>dialog.setFilterNames(new String<MASK><NEW_LINE>dialog.setFilterExtensions(new String[] { "*.zip" });<NEW_LINE>String importFileName = dialog.open();<NEW_LINE>if (StringUtil.isEmpty(impo... | [] { "scouter export zip files", "zip Files (*.zip)" }); |
411,078 | public ListenableFuture<Void> write(Slice slice) {<NEW_LINE>checkState(directUploadFuture == null, "Direct upload already started");<NEW_LINE>if (closed) {<NEW_LINE>// Ignore writes after writer is closed<NEW_LINE>return immediateVoidFuture();<NEW_LINE>}<NEW_LINE>// Skip multipart upload if there would only be one part... | (key).storageClass(storageClass); |
939,123 | @ApiOperation(value = "Create an experiment", response = Experiment.class)<NEW_LINE>@Timed<NEW_LINE>public Response postExperiment(@ApiParam(required = true) final NewExperiment newExperiment, @QueryParam("createNewApplication") @DefaultValue("false") final boolean createNewApplication, @HeaderParam(AUTHORIZATION) @Api... | "Could not create experiment " + newExperiment + " because " + e); |
567,029 | protected void writeCaseServiceTaskAdditionalAttributes(BaseElement element, BpmnModel model, XMLStreamWriter xtw) throws Exception {<NEW_LINE>CaseServiceTask caseServiceTask = (CaseServiceTask) element;<NEW_LINE>writeQualifiedAttribute(ATTRIBUTE_TYPE, ServiceTask.CASE_TASK, xtw);<NEW_LINE>if (StringUtils.isNotEmpty(ca... | caseServiceTask.getBusinessKey(), xtw); |
1,063,248 | private void publishError(BoltResponseMessageWriter messageWriter, Neo4jError error) {<NEW_LINE>try {<NEW_LINE>if (error.isFatal()) {<NEW_LINE>messageWriter.write(new FatalFailureMessage(error.status(), error.message()));<NEW_LINE>} else {<NEW_LINE>messageWriter.write(new FailureMessage(error.status()<MASK><NEW_LINE>}<... | , error.message())); |
944,475 | private Mono<PagedResponse<IntegrationServiceEnvironmentInner>> listByResourceGroupSinglePageAsync(String resourceGroup, Integer top, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot b... | .nextLink(), null)); |
247,771 | public static boolean intersectSegmentCircle(Vector2 start, Vector2 end, Circle circle, MinimumTranslationVector mtv) {<NEW_LINE>v2a.set(end).sub(start);<NEW_LINE>v2b.set(circle.x - start.x, circle.y - start.y);<NEW_LINE>float len = v2a.len();<NEW_LINE>float u = v2b.<MASK><NEW_LINE>if (u <= 0) {<NEW_LINE>v2c.set(start)... | dot(v2a.nor()); |
1,040,893 | private static synchronized void addToTrustStore(String url, X509Certificate cert) throws GeneralSecurityException, IOException {<NEW_LINE>FileObject root = FileUtil.getConfigRoot();<NEW_LINE>FileObject ts = root.getFileObject(TRUST_STORE_PATH);<NEW_LINE>char[] password = Keyring.read(TRUST_PASSWORD_KEY);<NEW_LINE>if (... | toString(32).toCharArray(); |
971,688 | private static void queryByIterator() throws IoTDBConnectionException, StatementExecutionException {<NEW_LINE>try (SessionDataSet dataSet = session.executeQueryStatement("select * from root.sg1.d1")) {<NEW_LINE>DataIterator iterator = dataSet.iterator();<NEW_LINE>System.out.println(dataSet.getColumnNames());<NEW_LINE>/... | ROOT_SG1_D1_S2)).append(","); |
1,352,085 | private static void distributePrimitives(@Nonnull Map<SearchRequestCollector, Processor<? super PsiReference>> collectors, @Nonnull Set<RequestWithProcessor> locals, @Nonnull MultiMap<Set<IdIndexEntry>, RequestWithProcessor> globals, @Nonnull List<Computable<Boolean>> customs, @Nonnull Map<RequestWithProcessor, Process... | > processor = entry.getValue(); |
464,834 | private static // relation.<NEW_LINE>boolean relate(Envelope envelope_a, Envelope envelope_b, SpatialReference sr, int relation, ProgressTracker progress_tracker) {<NEW_LINE>if (envelope_a.isEmpty() || envelope_b.isEmpty()) {<NEW_LINE>if (relation == Relation.disjoint)<NEW_LINE>// Always true<NEW_LINE>return true;<NEW_... | env_a, env_b, tolerance, progress_tracker); |
1,494,380 | private static List<CompletionItem> createConfigurationsCompletion(Project p) {<NEW_LINE>Collection<ProjectConfiguration> configurations = getConfigurations(p);<NEW_LINE><MASK><NEW_LINE>if (size <= 1) {<NEW_LINE>return Collections.emptyList();<NEW_LINE>}<NEW_LINE>List<CompletionItem> completionItems = new ArrayList<>(s... | int size = configurations.size(); |
314,686 | public void validateFormalIdentifier(String identifier) {<NEW_LINE>char first = identifier.charAt(0);<NEW_LINE>if (Character.isUpperCase(first)) {<NEW_LINE>compile_error("formal argument cannot be a constant");<NEW_LINE>}<NEW_LINE>switch(first) {<NEW_LINE>case '@':<NEW_LINE>if (identifier.charAt(1) == '@') {<NEW_LINE>c... | identifier.length() - 1); |
448,477 | public static void deduceCollations(List<RelCollation> outputCollations, final int sourceCount, List<RexLocalRef> refs, List<RelCollation> inputCollations) {<NEW_LINE>int[] targets = new int[sourceCount];<NEW_LINE>Arrays.fill(targets, -1);<NEW_LINE>for (int i = 0; i < refs.size(); i++) {<NEW_LINE>final RexLocalRef ref ... | int source = fieldCollation.getFieldIndex(); |
1,649,779 | public void serialize(ByteBuf buf) {<NEW_LINE>super.serialize(buf);<NEW_LINE>IntDoubleVectorStorage storage = split.getStorage();<NEW_LINE>if (storage instanceof IntDoubleSparseVectorStorage) {<NEW_LINE>buf.writeInt(storage.size());<NEW_LINE>ObjectIterator<Int2DoubleMap.Entry> iter = storage.entryIterator();<NEW_LINE>I... | ] indices = storage.getIndices(); |
79,490 | private void sortTail() {<NEW_LINE>// size > limit here<NEW_LINE>T[] d = data;<NEW_LINE>int l = limit, s = size;<NEW_LINE>Comparator<? super T> cmp = comparator;<NEW_LINE>Arrays.sort(d, l, s, cmp);<NEW_LINE>if (cmp.compare(d[s - 1], d[0]) < 0) {<NEW_LINE>// Common case: descending sequence<NEW_LINE>// Assume size - lim... | d, k, l - k); |
889,093 | private int insertFromValues(String sql, Insert insert, String index, int maxRequestsPerBulk) throws SQLException {<NEW_LINE>Heading heading = new Heading();<NEW_LINE>QueryState state = new BasicQueryState(sql, heading, this.props);<NEW_LINE>List<Object> values = updateParser.parse(insert, state);<NEW_LINE>if (state.ha... | map.put(key, value); |
1,192,363 | public void testLocalMethodwithRemoteExAndSub() throws Exception {<NEW_LINE>SLRemoteExLocal remoteExLocal = lookupSLRemoteExBeanLocal();<NEW_LINE>// verify method with throws exception may be called without an exception<NEW_LINE>remoteExLocal.testMethodwithRemoteExAndSub("none");<NEW_LINE>try {<NEW_LINE>remoteExLocal.t... | "RuntimeException", rootex.getMessage()); |
119,204 | private BeamRelNode convertToBeamRelInternal(String sql, QueryParameters queryParams) {<NEW_LINE>RelRoot root = plannerImpl.rel(sql, queryParams);<NEW_LINE>RelTraitSet desiredTraits = root.rel.getTraitSet().replace(BeamLogicalConvention.INSTANCE).replace(root.collation).simplify();<NEW_LINE>// beam physical plan<NEW_LI... | 0, desiredTraits, root.rel); |
940,316 | public void updateGui() {<NEW_LINE>// Note: There is a reason for why we have to update the toolbar<NEW_LINE>// from the outside. The toolbar can not update itself because<NEW_LINE>// the toolbar state depends on the state of the TID box in the<NEW_LINE>// debug panel.<NEW_LINE>final IDebugger debugger = m_debugger.get... | && (!haltBeforeCommunicating || suspended)); |
726,109 | public static GregorianCalendar unpackDate(byte[] timestamp) {<NEW_LINE>final int minute = ByteUtils.<MASK><NEW_LINE>final int year = ByteUtils.getBitsFromBuffer(timestamp, 16, 7) + 2000;<NEW_LINE>final int month = ByteUtils.getBitsFromBuffer(timestamp, 23, 4);<NEW_LINE>final int day = ByteUtils.getBitsFromBuffer(times... | getBitsFromBuffer(timestamp, 5, 11); |
191,430 | public void updateMetadata(String catalog, String table) throws TException {<NEW_LINE>HEAVYDBLOGGER.debug("Received invalidation from server for " + catalog + " : " + table);<NEW_LINE>long timer = System.currentTimeMillis();<NEW_LINE>callCount++;<NEW_LINE>HeavyDBParser parser;<NEW_LINE>try {<NEW_LINE>parser = (HeavyDBP... | HEAVYDBLOGGER.error(msg, ex); |
341,487 | public void updateAnimation() {<NEW_LINE>if (current == null) {<NEW_LINE>copyFrom(Minecraft.getMinecraft().getTextureMapBlocks().getMissingSprite());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Profiler p = Minecraft.getMinecraft().mcProfiler;<NEW_LINE>// MAPPING: func_194340_a: Profiler.startSection<NEW_LINE>p.<MASK><NEW_LIN... | func_194340_a(getClass()::getSimpleName); |
1,633,000 | protected void grabVideo() {<NEW_LINE>int iplDepth = IPL_DEPTH_8U;<NEW_LINE>org.bytedeco.libfreenect2.Frame rgb = frames.get(org.bytedeco.libfreenect2.Frame.Color);<NEW_LINE>int channels = <MASK><NEW_LINE>int deviceWidth = (int) rgb.width();<NEW_LINE>int deviceHeight = (int) rgb.height();<NEW_LINE>BytePointer rawVideoI... | (int) rgb.bytes_per_pixel(); |
1,361,375 | private static void runAssertionSimple(RegressionEnvironment env, String epl) {<NEW_LINE>env.compileDeploy(epl).addListener("s0");<NEW_LINE>String deploymentId = env.deploymentId("s0");<NEW_LINE>sendEvent(env, null, "E1", 10);<NEW_LINE>assertTotal(env, null, 10);<NEW_LINE>env.milestone(0);<NEW_LINE>env.stageService().g... | env, null, "end", 99); |
763,044 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>if (BuildConfig.DEBUG) {<NEW_LINE>StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder().detectAll().penaltyLog().build());<NEW_LINE>StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder().detectLeakedSqlLiteObjects().detectLeakedClosableObjects()... | penaltyDeath().build()); |
338,191 | public void put(ThreadContext context, StructLayout.Storage cache, Member m, AbstractMemory ptr, IRubyObject value) {<NEW_LINE>DynamicMethod conversionMethod;<NEW_LINE>if (value instanceof Pointer) {<NEW_LINE>ptr.getMemoryIO().putMemoryIO(m.offset, ((Pointer) value).getMemoryIO());<NEW_LINE>} else if (value instanceof ... | context.runtime.newArgumentError("Invalid pointer value"); |
526,945 | public static <T, M extends Classifier<T>> ClassificationValidation<M> of(T[] x, int[] y, T[] testx, int[] testy, BiFunction<T[], int[], M> trainer) {<NEW_LINE>long start = System.nanoTime();<NEW_LINE>M model = trainer.apply(x, y);<NEW_LINE>double fitTime = (System.nanoTime() - start) / 1E6;<NEW_LINE>start = System.nan... | scoreTime, testy, prediction, posteriori); |
1,674,099 | private InitiateAuthRequest initiateCustomAuthRequest(final Map<String, String> clientMetadata, final AuthenticationDetails authenticationDetails, final AuthenticationHelper authenticationHelper) {<NEW_LINE>final InitiateAuthRequest authRequest = new InitiateAuthRequest();<NEW_LINE>authRequest.setAuthFlow(CognitoServic... | HashMap<String, String>(); |
688,749 | private Collection<TextEdge> calculateExtendedEdges(Integer numOfLines, Map<Integer, List<TextChunk>> currDirectedEdges, Integer left, Integer right, Integer mid, Integer minDistToMid) {<NEW_LINE>Set<TextEdge> extendedEdges = new HashSet<>();<NEW_LINE>Iterator<Map.Entry<Integer, List<TextChunk>>> edgeIterator = currDir... | > entry = edgeIterator.next(); |
1,001,407 | final GetIdentityPoolConfigurationResult executeGetIdentityPoolConfiguration(GetIdentityPoolConfigurationRequest getIdentityPoolConfigurationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getIdentityPoolConfigurationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContex... | addHandlerContext(HandlerContextKey.SERVICE_ID, "Cognito Sync"); |
1,132,584 | public okhttp3.Call connectPatchNamespacedServiceProxyCall(String name, String namespace, String path, final ApiCallback _callback) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/api/v1/namespaces/{namespace}/services/{name}/prox... | (namespace.toString())); |
825,473 | // HLS only supports a small subset of the defined file types.<NEW_LINE>@SuppressLint("SwitchIntDef")<NEW_LINE>@Nullable<NEW_LINE>private Extractor createExtractorByFileType(@FileTypes.Type int fileType, Format format, @Nullable List<Format> muxedCaptionFormats, TimestampAdjuster timestampAdjuster) {<NEW_LINE>switch(fi... | createFragmentedMp4Extractor(timestampAdjuster, format, muxedCaptionFormats); |
787,549 | private void addToMap(Map<FileSystem, Set<FileObject>> map, FileObject fo, boolean removeFromCache) {<NEW_LINE>if (fo == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>FileSystem fs;<NEW_LINE>try {<NEW_LINE>fs = fo.getFileSystem();<NEW_LINE>} catch (FileStateInvalidException e) {<NEW_LINE>// ignore files in invalid files... | set = map.get(fs); |
569,289 | public static void connectTextBasedFilter(TreeViewer viewer, LiveExpression<Filter<String>> searchBoxModel, LabelProvider labels, ITreeContentProvider treeContent) {<NEW_LINE>TreeAwareViewerFilter viewerFilter = new TreeAwareViewerFilter(viewer, Filters.acceptAll(), labels, treeContent);<NEW_LINE>Disposable disposable ... | Filters.delegatingTo(searchBoxModel))); |
654,689 | private JCMethodDecl generateBuilderMethod(SuperBuilderJob job) {<NEW_LINE>JavacTreeMaker maker = job.getTreeMaker();<NEW_LINE>JCExpression call = maker.NewClass(null, List.<JCExpression>nil(), namePlusTypeParamsToTypeReference(maker, job.parentType, job.toName(job.builderImplClassName), false, job.typeParams), List.<J... | statement = maker.Return(call); |
842,817 | public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {<NEW_LINE>super.onViewCreated(view, savedInstanceState);<NEW_LINE>mDelegate = new OsmAuthFragmentDelegate(this) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected void loginOsm() {<NEW_LINE>((BaseMwmFragmentActivity) getActivity()).repla... | findViewById(R.id.lost_password); |
1,570,217 | public void search(Vec query, int numNeighbors, List<Integer> neighbors, List<Double> distances) {<NEW_LINE>neighbors.clear();<NEW_LINE>distances.clear();<NEW_LINE>BoundedSortedList<IndexDistPair> knn = new BoundedSortedList<>(numNeighbors);<NEW_LINE>List<Double> <MASK><NEW_LINE>// Find the best representative r_q<NEW_... | qi = dm.getQueryInfo(query); |
36,847 | protected DdlJob buildDdlJob(BaseDdlOperation logicalDdlPlan, ExecutionContext executionContext) {<NEW_LINE>LogicalAlterTableSetTableGroup logicalAlterTableSetTableGroup = (LogicalAlterTableSetTableGroup) logicalDdlPlan;<NEW_LINE>logicalAlterTableSetTableGroup.preparedData();<NEW_LINE><MASK><NEW_LINE>final SchemaManage... | AlterTableSetTableGroupPreparedData preparedData = logicalAlterTableSetTableGroup.getPreparedData(); |
221,817 | protected void configurePipeline(ChannelHandlerContext ctx, String protocol) {<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug(format(ctx.channel(), "Negotiated application-level protocol [" + protocol + "]"));<NEW_LINE>}<NEW_LINE>ChannelPipeline p = ctx.pipeline();<NEW_LINE>if (ApplicationProtocolNames.HTTP_2.... | throw new IllegalStateException("unknown protocol: " + protocol); |
353,888 | public static int[] values(int[] v, int t) {<NEW_LINE>ArgChecker.notNull(v, "v");<NEW_LINE>ArgChecker.isTrue((t > <MASK><NEW_LINE>ArgChecker.isTrue((t < v.length), "Invalid number of differences requested, 't' is greater than the number of " + "elements in 'v'. The given 't' was: {} and 'v' contains {} elements", t, v.... | -1), "Invalid number of differences requested, t must be positive or 0, but was {}", t); |
1,573,251 | public void introspect(PrintWriter writer) {<NEW_LINE>// Grab the Thread MXBean<NEW_LINE>ThreadMXBean threadMXBean = ManagementFactory.getThreadMXBean();<NEW_LINE>// Dump count information<NEW_LINE>writer.println("Thread counts:");<NEW_LINE>writer.println("--------------");<NEW_LINE>writer.println(INDENT + "current act... | " total started: " + threadMXBean.getTotalStartedThreadCount()); |
365,042 | public String sendCommand(String command, boolean blocking) {<NEW_LINE>// TODO REFACTOR so that we use the same code in sendCommand and wait<NEW_LINE>logger.log(Level.INFO, "Sending Python command: " + command);<NEW_LINE>String returnCommand = null;<NEW_LINE>try {<NEW_LINE>writer.write(command);<NEW_LINE>writer.flush()... | e, Py4JNetworkException.ErrorTime.ERROR_ON_RECEIVE); |
689,762 | public static ListListenersByIpResponse unmarshall(ListListenersByIpResponse listListenersByIpResponse, UnmarshallerContext _ctx) {<NEW_LINE>listListenersByIpResponse.setRequestId(_ctx.stringValue("ListListenersByIpResponse.RequestId"));<NEW_LINE>listListenersByIpResponse.setHttpCode(_ctx.stringValue("ListListenersByIp... | (_ctx.integerValue("ListListenersByIpResponse.TotalCount")); |
1,428,419 | public void print() {<NEW_LINE>log.info(m_info.toString());<NEW_LINE>if (m_layout == null)<NEW_LINE>layout();<NEW_LINE>// Paper Attributes: media-printable-area, orientation-requested, media<NEW_LINE>PrintRequestAttributeSet prats = m_layout.getPaper().getPrintRequestAttributeSet();<NEW_LINE>// add: copies, job-nam... | (m_info.getCopies())); |
1,689,119 | private PgpSignEncryptResult encryptBackupData(@NonNull BackupKeyringParcel backupInput, @NonNull CryptoInputParcel cryptoInput, @Nullable OutputStream outputStream, Uri plainUri, long exportedDataSize) throws FileNotFoundException {<NEW_LINE>PgpSignEncryptOperation signEncryptOperation = new PgpSignEncryptOperation(mC... | openOutputStream(backupInput.getOutputUri()); |
1,456,056 | public void readFrom(MiniDump dump, Builder builder, Object addressSpace, IAbstractAddressSpace memory, boolean is64Bit) throws IOException {<NEW_LINE>// get the thread ID of the failing thread<NEW_LINE>long tid = -1;<NEW_LINE>if (null != dump._j9rasReader) {<NEW_LINE>try {<NEW_LINE>tid = dump._j9rasReader.getThreadID(... | long stackStart = dump.coreReadLong(); |
196,416 | public AudioOnlyHlsSettings unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AudioOnlyHlsSettings audioOnlyHlsSettings = new AudioOnlyHlsSettings();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targe... | class).unmarshall(context)); |
293,054 | public IterationScopeNode createIterationScope(FrameDescriptor frameDescriptor, JSFrameSlot blockScopeSlot) {<NEW_LINE>int numberOfSlots = frameDescriptor.getNumberOfSlots();<NEW_LINE>assert numberOfSlots > ScopeFrameNode.PARENT_SCOPE_SLOT_INDEX && ScopeFrameNode.PARENT_SCOPE_IDENTIFIER.equals(frameDescriptor.getSlotNa... | writes, blockScopeSlot.getIndex()); |
1,153,664 | public void execute() {<NEW_LINE>if (!enableArtemisPlugin) {<NEW_LINE>getLog().info("Plugin disabled via 'enableArtemisPlugin' set to false.");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (context != null && !context.hasDelta(sourceDirectory))<NEW_LINE>return;<NEW_LINE>log.info("");<NEW_LINE>log.info("CONFIGURATION");<NEW_... | Weaver weaver = new Weaver(outputDirectory); |
1,169,880 | /*<NEW_LINE>* put - insert and/or updates a session as appropriate<NEW_LINE>*/<NEW_LINE>public Object put(Object key, Object value) {<NEW_LINE>if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {<NEW_LINE>LoggingUtil.SESSION_LOGGER_WAS.entering(metho... | , methodNames[PUT], "Session is not valid. Returning null"); |
652,001 | public void run() {<NEW_LINE>resetState();<NEW_LINE>isRunning.set(true);<NEW_LINE>while (isRunning.get()) {<NEW_LINE>// (re)connect<NEW_LINE>if (socketCh == null) {<NEW_LINE>try {<NEW_LINE>InetAddress addr = InetAddress.getByName(host);<NEW_LINE>socketCh = SocketChannel.open(new InetSocketAddress(addr, port));<NEW_LINE... | , subscriptions.size())); |
631,063 | public ValidationErrors validate(SetNullableStatement setNullableStatement, Database database, SqlGeneratorChain sqlGeneratorChain) {<NEW_LINE>ValidationErrors validationErrors = new ValidationErrors();<NEW_LINE>validationErrors.checkRequiredField(<MASK><NEW_LINE>if (setNullableStatement.isNullable()) {<NEW_LINE>if (da... | "tableName", setNullableStatement.getTableName()); |
90,755 | private Formula compileStatementFormula(ControlFlowNode node, List<ControlFlowNode> cutoffNodes, List<String> quantifiedMetavars) {<NEW_LINE>quantifiedMetavars = shallowCopy(quantifiedMetavars);<NEW_LINE>if (SmPLJavaDSL.isStatementLevelDots(node.getStatement())) {<NEW_LINE>return compileStatementLevelDotsFormula(node, ... | = new Expression(statement, metavars); |
1,671,985 | private List<String> computeFileNamesForMissingBuckets(ConnectorSession session, HiveStorageFormat storageFormat, Path targetPath, int bucketCount, boolean transactionalCreateTable, PartitionUpdate partitionUpdate) {<NEW_LINE>if (partitionUpdate.getFileNames().size() == bucketCount) {<NEW_LINE>// fast path for common c... | > missingFileNames = missingFileNamesBuilder.build(); |
1,669,971 | public Object clone() throws CloneNotSupportedException {<NEW_LINE>DefaultIntervalXYDataset clone = (DefaultIntervalXYDataset) super.clone();<NEW_LINE>clone.seriesKeys = new ArrayList<>(this.seriesKeys);<NEW_LINE>clone.seriesList = new ArrayList<>(this.seriesList.size());<NEW_LINE>for (int i = 0; i < this.seriesList.si... | = new double[xStart.length]; |
1,464,419 | private void commonDestroyed(DoDestroyEvent event, EntityRef entity, Block block) {<NEW_LINE>entity.send(new CreateBlockDropsEvent(event.getInstigator(), event.getDirectCause(), event.getDamageType()));<NEW_LINE>BlockDamageModifierComponent blockDamageModifierComponent = event.getDamageType().getComponent(BlockDamageMo... | dustBuilder = entityManager.newBuilder("CoreAssets:dustEffect"); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.