idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
542,451 | public boolean apply(Game game, Ability source) {<NEW_LINE>UUID opponentId = (UUID) this.getValue("PsychicSurgeryOpponent");<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>Player opponent = game.getPlayer(opponentId);<NEW_LINE>if (controller != null && opponent != null) {<NEW_LINE>Cards... | LIBRARY, new FilterCard("card to exile")); |
216,717 | // timeout property not supported in Rest Client 3.0 - use timeout method instead<NEW_LINE>@SkipForRepeat(MicroProfileActions.MP50_ID)<NEW_LINE>public void testReadTimeout(HttpServletRequest req, HttpServletResponse resp) throws Exception {<NEW_LINE>try {<NEW_LINE>builder.property("com.ibm.ws.jaxrs.client.receive.timeo... | convert(elapsedTime, TimeUnit.NANOSECONDS); |
577,095 | public void add(String groupKey, Object result) {<NEW_LINE>Comparable newKey = _aggregationFunction.extractFinalResult(result);<NEW_LINE>ImmutablePair<String, Object> groupKeyResultPair = new ImmutablePair<>(groupKey, result);<NEW_LINE>List<ImmutablePair<String, Object>> groupKeyResultPairs = _treeMap.get(newKey);<NEW_... | _treeMap.put(newKey, groupKeyResultPairs); |
4,462 | protected WriteCellData<?> convert(CellWriteHandlerContext cellWriteHandlerContext) {<NEW_LINE>// This means that the user has defined the data.<NEW_LINE>if (cellWriteHandlerContext.getOriginalFieldClass() == WriteCellData.class) {<NEW_LINE>if (cellWriteHandlerContext.getOriginalValue() == null) {<NEW_LINE>return new <... | WriteCellData<>(CellDataTypeEnum.EMPTY); |
1,645,553 | final GetContextKeysForCustomPolicyResult executeGetContextKeysForCustomPolicy(GetContextKeysForCustomPolicyRequest getContextKeysForCustomPolicyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getContextKeysForCustomPolicyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionC... | endClientExecution(awsRequestMetrics, request, response); |
1,280,322 | protected Object doQuery(Object[] objs) {<NEW_LINE>List<String> result = null;<NEW_LINE>try {<NEW_LINE>if (objs == null || objs.length != 1) {<NEW_LINE>throw new Exception("chardet paramSize error!");<NEW_LINE>}<NEW_LINE>// check encoding for string<NEW_LINE>if (option != null && option.contains("v")) {<NEW_LINE>CharEn... | encoding = UniversalDetector.detectCharset(file); |
932,285 | public void init() {<NEW_LINE>PendingWorkJobSearch = createSearchBuilder();<NEW_LINE>PendingWorkJobSearch.and("jobStatus", PendingWorkJobSearch.entity().getStatus(), Op.EQ);<NEW_LINE>PendingWorkJobSearch.and("vmType", PendingWorkJobSearch.entity().getVmType(), Op.EQ);<NEW_LINE>PendingWorkJobSearch.and("vmInstanceId", P... | getStatus(), Op.EQ); |
199,235 | final CreateTrustResult executeCreateTrust(CreateTrustRequest createTrustRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createTrustRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi... | invoke(request, responseHandler, executionContext); |
1,362,414 | private void initializeSystemMonitor(String variant) {<NEW_LINE>if (sigarImpl == null) {<NEW_LINE>Sigar.variant = variant;<NEW_LINE>sigarImpl = new Sigar();<NEW_LINE>}<NEW_LINE>if (sigar == null) {<NEW_LINE>sigar = SigarProxyCache.newInstance(sigarImpl, 1000);<NEW_LINE>}<NEW_LINE>logger.info("Using Sigar version {}", S... | (disks.toArray())); |
1,833,764 | public boolean executeCommand(final String args) {<NEW_LINE>// get filenames<NEW_LINE>final String sourceID = getProp().getPropertyString(ScriptProperties.SEGREGATE_CONFIG_SOURCE_FILE);<NEW_LINE>final File sourceFile = getScript().resolveFilename(sourceID);<NEW_LINE>EncogLogging.log(EncogLogging.LEVEL_DEBUG, "Beginning... | getScript().expectInputHeaders(sourceID); |
1,562,920 | public static void main(String[] args) throws Exception {<NEW_LINE>print("Hello");<NEW_LINE>print("World");<NEW_LINE>System.out.println("Annotations: " + Foo.class.getDeclaredField("i"));<NEW_LINE>System.out.println("Annotations: " + Foo.class.getDeclaredField("i"));<NEW_LINE>System.out.println("Annotations: " + Foo<MA... | .class.getDeclaredField("i")); |
1,128,367 | public Future<RowSet> query(String sql, List<Object> params) {<NEW_LINE>return Future.future(new Handler<Promise<RowSet>>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void handle(Promise<RowSet> rowSetPromise) {<NEW_LINE>prepareQuery(sql, params, new MysqlCollector() {<NEW_LINE><NEW_LINE>MycatRowMetaData mycatRowMe... | objects = new ArrayList<>(); |
361,922 | public com.amazonaws.services.memorydb.model.SubnetGroupNotFoundException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.memorydb.model.SubnetGroupNotFoundException subnetGroupNotFoundException = new com.amazonaws.services.memorydb.model.SubnetGroupNotFoundExce... | int originalDepth = context.getCurrentDepth(); |
1,197,764 | public Multimap<Node, Split> computeAssignments(List<Split> splits, List<RemoteTask> existingTasks) {<NEW_LINE>Multimap<Node, Split> assignment = HashMultimap.create();<NEW_LINE>NodeAssignmentStats assignmentStats = new NodeAssignmentStats(nodeTaskMap, workerNodes, existingTasks);<NEW_LINE>ResettableRandomizedIterator<... | TddlRuntimeException(ErrorCode.ERR_NO_NODES_AVAILABLE, "No nodes available to run query"); |
1,387,982 | private void initPublicPackageTable() {<NEW_LINE>publicPkgsTable.setModel(getProperties().getPublicPackagesModel());<NEW_LINE>publicPkgsTable.getColumnModel().getColumn(0).setMaxWidth(CHECKBOX_WIDTH + 20);<NEW_LINE>publicPkgsTable.setRowHeight(publicPkgsTable.getFontMetrics(publicPkgsTable.getFont()).getHeight() + (2 *... | int row = publicPkgsTable.getSelectedRow(); |
648,233 | private static // #284<NEW_LINE>void // #284<NEW_LINE>checkTableID(// #284<NEW_LINE>Properties ctx, // #284<NEW_LINE>SvrProcess sp, boolean onlyADSequence) {<NEW_LINE>int IDRangeEnd = DB.getSQLValue(null, "SELECT IDRangeEnd FROM AD_System");<NEW_LINE>if (IDRangeEnd <= 0)<NEW_LINE>IDRangeEnd = DB.getSQLValue(null, "SELE... | + " -> " + seq.getCurrentNext(); |
528,898 | private Jdk14HandlerAccessor wrapHandler(Object handler, int index) {<NEW_LINE>try {<NEW_LINE>if (handler == null) {<NEW_LINE>throw new IllegalArgumentException("handler is null");<NEW_LINE>}<NEW_LINE>Jdk14HandlerAccessor handlerAccessor = null;<NEW_LINE>String className = handler<MASK><NEW_LINE>if ("org.apache.juli.Fi... | .getClass().getName(); |
1,165,268 | private void parseFolderArray(List<String> parentNames, String name, JsonArray arrayValue) {<NEW_LINE>if (name == null)<NEW_LINE>name = AppConstants.ROOT_FOLDER;<NEW_LINE>List<String> children = new ArrayList<String>();<NEW_LINE>List<String> feedIds = new ArrayList<String>();<NEW_LINE>for (JsonElement jsonElement : arr... | JsonObject) jsonElement).entrySet(); |
710,790 | private void bitrv216(float[] a, int offa) {<NEW_LINE>float x1r, x1i, x2r, x2i, x3r, x3i, x4r, x4i, x5r, x5i, x7r, x7i, x8r, x8i, x10r, x10i, x11r, x11i, x12r, x12i, x13r, x13i, x14r, x14i;<NEW_LINE>x1r = a[offa + 2];<NEW_LINE>x1i = a[offa + 3];<NEW_LINE><MASK><NEW_LINE>x2i = a[offa + 5];<NEW_LINE>x3r = a[offa + 6];<NE... | x2r = a[offa + 4]; |
669,427 | public <A, B> double dependence(NumberArrayAdapter<?, A> adapter1, A data1, NumberArrayAdapter<?, B> adapter2, B data2) {<NEW_LINE>final int len = Utils.size(adapter1, data1, adapter2, data2);<NEW_LINE>// Get attribute value range:<NEW_LINE>final double off1, scale1, off2, scale2;<NEW_LINE>{<NEW_LINE>double mi = adapte... | Math.round(delta * RESCALE); |
778,301 | protected void renderTransmissionDynamic(@Nonnull IConduit conduit, @Nonnull IConduitTexture tex, @Nullable Vector4f color, @Nonnull CollidableComponent component, float selfIllum) {<NEW_LINE>final float filledRatio = ((LiquidConduit) conduit).getTank().getFilledRatio();<NEW_LINE>if (filledRatio <= 0) {<NEW_LINE>return... | )) == 1 ? 0 : shrink; |
96,223 | protected boolean applyInstallProperties(Map<String, List<String[]>> install_properties, String prefix, File to_file) {<NEW_LINE>boolean defer_restart = false;<NEW_LINE>if (to_file.isDirectory()) {<NEW_LINE>File[] files = to_file.listFiles();<NEW_LINE>if (files != null) {<NEW_LINE>for (int i = 0; i < files.length; i++)... | String file_name = file.getName(); |
344,980 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>if (controller != null) {<NEW_LINE>Set<Card> cardsToExile = new HashSet<>(this.getTargetPointer().getTargets(game, source).size());<NEW_LINE>for (UUID targetId : this.getTargetPointer().getT... | token.addSubType(SubType.ZOMBIE); |
86,539 | private void addTrainedModelStats(GetTrainedModelsAction.Response modelsResponse, GetTrainedModelsStatsAction.Response statsResponse, Map<String, Object> inferenceUsage) {<NEW_LINE>List<TrainedModelConfig> trainedModelConfigs = modelsResponse.getResources().results();<NEW_LINE>Map<String, GetTrainedModelsStatsAction.Re... | ), estimatedMemoryUsageBytes.asMap()); |
673,952 | public void actionPerformed(ActionEvent e) {<NEW_LINE>log.config("Action=" + e.getActionCommand());<NEW_LINE>if (m_actionActive)<NEW_LINE>return;<NEW_LINE>m_actionActive = true;<NEW_LINE>log.config("Action=" + e.getActionCommand());<NEW_LINE>// Order<NEW_LINE>if (e.getSource().equals(orderField)) {<NEW_LINE>KeyNamePair... | (KeyNamePair) invoiceField.getSelectedItem(); |
189,448 | public void writeEntryHeader(byte[] outbuf) {<NEW_LINE>int offset = 0;<NEW_LINE>offset = TarHeader.getNameBytes(this.header.name, outbuf, offset, TarHeader.NAMELEN);<NEW_LINE>offset = Octal.getOctalBytes(this.header.mode, outbuf, offset, TarHeader.MODELEN);<NEW_LINE>offset = Octal.getOctalBytes(this.header.userId, outb... | outbuf, offset, TarHeader.SIZELEN); |
792,730 | public static void interleavedToBuffered(InterleavedU8 src, DataBufferInt buffer, WritableRaster dst) {<NEW_LINE>if (src.getNumBands() != dst.getNumBands())<NEW_LINE>throw new IllegalArgumentException("Unequal number of bands src = " + src.getNumBands() + " dst = " + dst.getNumBands());<NEW_LINE>final int[] dstData = b... | << 16 | c2 << 8 | c3; |
302,664 | private Mono<Response<Flux<ByteBuffer>>> assessPatchesWithResponseAsync(String resourceGroupName, String vmName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>... | getSubscriptionId(), accept, context); |
1,756,943 | private void inflateRoutingParameter(final LocalRoutingParameter parameter) {<NEW_LINE>if (parameter != null) {<NEW_LINE>final BottomSheetItemWithCompoundButton[] item = new BottomSheetItemWithCompoundButton[1];<NEW_LINE>BottomSheetItemWithCompoundButton.Builder builder = new BottomSheetItemWithCompoundButton.Builder()... | .setIcon(getContentIcon(iconId)); |
1,183,391 | public static void main(String[] args) throws IOException {<NEW_LINE>// Use the factory to get the version 1 Mercado Bitcoin exchange API using default settings<NEW_LINE>Exchange mercadoExchange = ExchangeFactory.INSTANCE.createExchange(MercadoBitcoinExchange.class);<NEW_LINE>// Interested in the public market data fee... | series.setMarker(SeriesMarkers.NONE); |
657,796 | double leftLabelPadding() {<NEW_LINE>double leftPadding = super.leftLabelPadding();<NEW_LINE>// RT-27167: we must take into account the disclosure node and the<NEW_LINE>// indentation (which is not taken into account by the LabeledSkinBase.<NEW_LINE>final double height = getCellSize();<NEW_LINE>TreeTableCell<S, T> cell... | Node graphic = treeItem.getGraphic(); |
748,612 | public boolean hasPlayerFaceImage(String playername, FaceType facetype) {<NEW_LINE>String baseKey = prefix + "tiles/faces/" + facetype.id + "/" + playername + ".png";<NEW_LINE>boolean exists = false;<NEW_LINE>S3Client s3 = getConnection();<NEW_LINE>try {<NEW_LINE>ListObjectsV2Request req = ListObjectsV2Request.builder(... | Log.severe("AWS Exception", x); |
583,284 | /* This function check if parameter is of type oneOf, allOf, anyOf and return required type validators. It's<NEW_LINE>detached from below function to call it from "magic" workarounds functions */<NEW_LINE>private ParameterTypeValidator resolveAnyOfOneOfTypeValidator(Parameter parameter) {<NEW_LINE>ComposedSchema compos... | getAnyOf()), parameter)); |
1,839,201 | public void updateViews() {<NEW_LINE>linearLayout.removeAllViews();<NEW_LINE>editPoiData.setIsInEdit(true);<NEW_LINE>PoiType pt = editPoiData.getCurrentPoiType();<NEW_LINE>String currentPoiTypeKey = "";<NEW_LINE>if (pt != null) {<NEW_LINE>currentPoiTypeKey = pt.getEditOsmTag();<NEW_LINE>}<NEW_LINE>for (Entry<String, St... | id.valueEditText).requestFocus(); |
768,578 | public void asyncReadEntry(ReadHandle lh, long firstEntry, long lastEntry, boolean isSlowestReader, final ReadEntriesCallback callback, Object ctx) {<NEW_LINE>lh.readAsync(firstEntry, lastEntry).thenAcceptAsync(ledgerEntries -> {<NEW_LINE>List<Entry> entries = Lists.newArrayList();<NEW_LINE>long totalSize = 0;<NEW_LINE... | entries.size(), totalSize); |
291,070 | final CreateAuthorizerResult executeCreateAuthorizer(CreateAuthorizerRequest createAuthorizerRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createAuthorizerRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
1,511,578 | public com.squareup.okhttp.Call apisApiIdDocumentsDocumentIdPutAsync(String apiId, String documentId, Document body, String contentType, String ifMatch, String ifUnmodifiedSince, final ApiCallback<Document> callback) throws ApiException {<NEW_LINE>ProgressResponseBody.ProgressListener progressListener = null;<NEW_LINE>... | executeAsync(call, localVarReturnType, callback); |
1,007,451 | public void terminateExecution(long jobId, long executionId, Address callerAddress, TerminationMode mode) {<NEW_LINE>failIfNotRunning();<NEW_LINE>ExecutionContext <MASK><NEW_LINE>if (executionContext == null) {<NEW_LINE>// If this happens after the execution terminated locally, ignore.<NEW_LINE>// If this happens befor... | executionContext = executionContexts.get(executionId); |
1,725,735 | void updateValue(final Watch watch) {<NEW_LINE>RP.post(() -> {<NEW_LINE>if (!dbg.isSuspended()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>CallFrame currentCallFrame = dbg.getCurrentCallFrame();<NEW_LINE>if (currentCallFrame == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>VariablesModel.ScopedRemoteObject sv = Evaluator.ev... | watch.getExpression(), true); |
19,829 | public List<QueryJobResults> dryRunQueries() throws IllegalArgumentException, InterruptedException {<NEW_LINE>List<Table> tables = getBigQueryTablesFromSchema();<NEW_LINE>// Create dry-run jobs<NEW_LINE>List<JobInfo> jobInfos = getJobInfosFromQuery(true);<NEW_LINE>// Store results for every successful dry-run<NEW_LINE>... | QueryJobConfiguration queryJobConfiguration = jobInfo.getConfiguration(); |
535,288 | public void batchInsert(String index, String type, List<?> objects) {<NEW_LINE>try {<NEW_LINE>BulkRequestBuilder bulkRequest = client.prepareBulk();<NEW_LINE>for (Object object : objects) {<NEW_LINE>XContentBuilder builder = jsonBuilder().startObject();<NEW_LINE>String[] fileNames = getFiledName(object);<NEW_LINE>for (... | ServerException(e.getMessage()); |
541,818 | public void create(IProject project, CommandLine commandLine) {<NEW_LINE>String[] args = <MASK><NEW_LINE>DefaultParser parser = new DefaultParser();<NEW_LINE>org.apache.commons.cli.Options options = new org.apache.commons.cli.Options();<NEW_LINE>options.addOption(Option.builder().hasArg().required().longOpt("interprete... | commandLine.getValues(Options.ARGS_OPTION); |
1,355,016 | public static String patch(String source, ShaderType type, boolean hasGeometry) {<NEW_LINE>if (source.contains("iris_")) {<NEW_LINE>throw new IllegalStateException("Shader is attempting to exploit internal Iris code!");<NEW_LINE>}<NEW_LINE>StringTransformations transformations = new StringTransformations(source);<NEW_L... | Transformations.InjectionPoint.BEFORE_CODE, "uniform sampler2D iris_overlay;"); |
243,755 | public Boolean update(TransformRequest request, String operator) {<NEW_LINE>LOGGER.info("begin to update transform info: {}", request);<NEW_LINE>this.checkParams(request);<NEW_LINE>// Check whether the transform can be modified<NEW_LINE>String groupId = request.getInlongGroupId();<NEW_LINE>groupCheckService.checkGroupS... | transformEntity, request.getFieldList()); |
1,144,793 | public void handle(AnnotationValues<With> annotation, Annotation ast, EclipseNode annotationNode) {<NEW_LINE>handleFlagUsage(annotationNode, ConfigurationKeys.WITH_FLAG_USAGE, "@With");<NEW_LINE>EclipseNode node = annotationNode.up();<NEW_LINE>AccessLevel level = annotation<MASK><NEW_LINE>if (level == AccessLevel.NONE ... | .getInstance().value(); |
495,125 | private Cluster mapResource(ResultSet rs) throws SQLException {<NEW_LINE>Map<String, String> map = conformityMapFromJson(rs.getString("conformities"));<NEW_LINE>map.put(Cluster.CLUSTER, rs.getString(Cluster.CLUSTER));<NEW_LINE>map.put(Cluster.REGION, rs.getString(Cluster.REGION));<NEW_LINE>map.put(Cluster.IS_CONFORMING... | rs.getString(Cluster.OWNER_EMAIL); |
1,600,181 | public static Vector apply(LongFloatVector v1, LongDummyVector v2, Binary op) {<NEW_LINE>if (v1.isSparse()) {<NEW_LINE>if (op.isKeepStorage()) {<NEW_LINE>throw new AngelException("operation is not support!");<NEW_LINE>} else {<NEW_LINE>// multi-rehash<NEW_LINE>LongFloatVectorStorage newStorage = v1.getStorage().emptySp... | LongFloatVectorStorage v1Storage = v1.getStorage(); |
1,050,474 | public void processMessage(final Capability cap, final Message message) {<NEW_LINE>final MessageData messageData = AbstractSnapMessageData.create(message);<NEW_LINE>final int code = messageData.getCode();<NEW_LINE>LOG.trace("Process snap message {}, {}", cap, code);<NEW_LINE>final EthPeer ethPeer = ethPeers.peer(messag... | ethPeer.disconnect(DisconnectReason.BREACH_OF_PROTOCOL); |
1,478,310 | private SettableFuture<PublishStatus> queuePublish(@NotNull final String client, @NotNull final PUBLISH publish, final int subscriptionQos, final boolean shared, final boolean retainAsPublished, @Nullable final ImmutableIntArray subscriptionIdentifier, @Nullable final Long queueLimit) {<NEW_LINE>final ListenableFuture<... | > statusFuture = SettableFuture.create(); |
1,760,056 | public static QueryMqSofamqMessageByTopicResponse unmarshall(QueryMqSofamqMessageByTopicResponse queryMqSofamqMessageByTopicResponse, UnmarshallerContext _ctx) {<NEW_LINE>queryMqSofamqMessageByTopicResponse.setRequestId(_ctx.stringValue("QueryMqSofamqMessageByTopicResponse.RequestId"));<NEW_LINE>queryMqSofamqMessageByT... | ("QueryMqSofamqMessageByTopicResponse.Data.Content[" + i + "].MsgId")); |
1,757,244 | final CreateRobotApplicationResult executeCreateRobotApplication(CreateRobotApplicationRequest createRobotApplicationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createRobotApplicationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
190,425 | private static boolean scanForJars(ClusterizeInfo folder) throws InterruptedException {<NEW_LINE>File[] children = folder.jar.listFiles();<NEW_LINE>folder.getChildren().remove(folder.getChildren().getNodes());<NEW_LINE>if (children == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>String pref = folder.path.length()... | ().getNodesCount() > 0; |
1,685,564 | protected void drawFigure(Graphics graphics) {<NEW_LINE>graphics.pushState();<NEW_LINE>Rectangle bounds = getBounds().getCopy();<NEW_LINE>bounds.width--;<NEW_LINE>bounds.height--;<NEW_LINE>// Set line width here so that the whole figure is constrained, otherwise SVG graphics will have overspill<NEW_LINE>int lineWidth =... | width / 2 + 1, curve_y); |
1,687,180 | public InteractionResult useOn(UseOnContext ctx) {<NEW_LINE>Player player = ctx.getPlayer();<NEW_LINE>ItemStack stack = ctx.getItemInHand();<NEW_LINE>if (player != null && player.isShiftKeyDown()) {<NEW_LINE>Level world = ctx.getLevel();<NEW_LINE>BlockPos pos = ctx.getClickedPos();<NEW_LINE>Direction side = ctx.getClic... | ).onIEBlockPlacedBy(blockCtx, coresample); |
346,940 | private static void collectKeyShares(TlsCrypto crypto, int[] supportedGroups, Vector keyShareGroups, Hashtable clientAgreements, Vector clientShares) throws IOException {<NEW_LINE>if (isNullOrEmpty(supportedGroups)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (null == keyShareGroups || keyShareGroups.isEmpty()) {<NEW_LIN... | , true)).createDH(); |
1,846,556 | private void openFileWriter() {<NEW_LINE>try {<NEW_LINE>temporaryFile = new File(Config.getStringProperty("org.dotcms.XMLSitemap.SITEMAP_XML_FILENAME", "XMLSitemap") + ".xml");<NEW_LINE>out = new OutputStreamWriter(Files.newOutputStream(temporaryFile.toPath()), "UTF-8");<NEW_LINE>out.write("<?xml version='1.0' encoding... | e.getMessage(), e); |
643,216 | final GetAssociatedEnclaveCertificateIamRolesResult executeGetAssociatedEnclaveCertificateIamRoles(GetAssociatedEnclaveCertificateIamRolesRequest getAssociatedEnclaveCertificateIamRolesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getAssociatedEnclaveCertificateIamRolesRequest);<NEW_LIN... | addHandlerContext(HandlerContextKey.SERVICE_ID, "EC2"); |
893,185 | public void visitTry(STry userTryNode, SemanticScope semanticScope) {<NEW_LINE>SBlock userBlockNode = userTryNode.getBlockNode();<NEW_LINE>if (userBlockNode == null) {<NEW_LINE>throw userTryNode.createError(new IllegalArgumentException("extraneous try statement"));<NEW_LINE>}<NEW_LINE>semanticScope.replicateCondition(u... | getCondition(userBlockNode, AnyContinue.class); |
1,421,011 | public void onChanged(Change<? extends Toggle> c) {<NEW_LINE>// This change event happens when the toggles are added -- we don't need to inspect the change event<NEW_LINE>if (getItem() != null && getItem().getDecodeConfiguration() instanceof DecodeConfigNBFM) {<NEW_LINE>// Capture current modified state so that we can ... | Bandwidth bandwidth = config.getBandwidth(); |
1,437,345 | private static void verifyEdgesConditionQuery(ConditionQuery query) {<NEW_LINE>assert query.resultType().isEdge();<NEW_LINE><MASK><NEW_LINE>if (total == 1) {<NEW_LINE>if (query.containsCondition(HugeKeys.LABEL) || query.containsCondition(HugeKeys.PROPERTIES) || query.containsScanRelation()) {<NEW_LINE>return;<NEW_LINE>... | int total = query.conditionsSize(); |
1,037,032 | public void sync(DataModel dataModel) {<NEW_LINE>// Build named-based maps from ID-based maps<NEW_LINE>this.thermostats_by_name = new HashMap<String, Thermostat>();<NEW_LINE>if (this.thermostat_id_list != null) {<NEW_LINE>for (String id : this.thermostat_id_list) {<NEW_LINE>if (dataModel.getDevices() != null && dataMod... | th.getName(), th); |
1,107,735 | private void prefetchData(boolean firstTime) {<NEW_LINE>final OSBTreeBonsai<OIdentifiable, Integer> tree = loadTree();<NEW_LINE>if (tree == null) {<NEW_LINE>throw new IllegalStateException("RidBag is not properly initialized, can not load tree implementation");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>tree.loadEntriesMajor(f... | .getLast().getKey(); |
1,553,585 | public String validateGiverRecipientVisibility(FeedbackQuestionAttributes feedbackQuestionAttributes) {<NEW_LINE>String errorMsg = "";<NEW_LINE>// giver type can only be STUDENTS<NEW_LINE>if (feedbackQuestionAttributes.getGiverType() != FeedbackParticipantType.STUDENTS) {<NEW_LINE>log.severe("Unexpected giverType for c... | feedbackQuestionAttributes.setGiverType(FeedbackParticipantType.STUDENTS); |
867,585 | private void updateDynamicRecords(List<DynamicRecord> records, IdUpdateListener idUpdateListener, CursorContext cursorContext, StoreCursors storeCursors) {<NEW_LINE>PageCursor stringCursor = null;<NEW_LINE>PageCursor arrayCursor = null;<NEW_LINE>try {<NEW_LINE>for (DynamicRecord valueRecord : records) {<NEW_LINE>Proper... | throw new InvalidRecordException("Unknown dynamic record" + valueRecord); |
120,246 | public void writePraatPitchTier(String fileName) throws IOException {<NEW_LINE>// initialize times and values:<NEW_LINE>ArrayList<Double> times = new ArrayList<Double>();<NEW_LINE>ArrayList<Double> values = new ArrayList<Double>();<NEW_LINE>// cumulative time pointer:<NEW_LINE>double time = 0;<NEW_LINE>// iterate over ... | phoneIterator = phones.listIterator(1); |
1,354,329 | /*<NEW_LINE>* (non-Javadoc)<NEW_LINE>*<NEW_LINE>* @see javax.jms.JMSContext#createSharedConsumer(javax.jms.Topic, java.lang.String)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public JMSConsumer createSharedConsumer(Topic topic, String sharedSubscriptionName) throws JMSRuntimeException, InvalidDestinationRuntimeException, ... | jmsSession.createSharedConsumer(topic, sharedSubscriptionName); |
1,413,482 | public void resolve() {<NEW_LINE>if (zone_letter == 'Z') {<NEW_LINE>mgrs = "Latitude limit exceeded";<NEW_LINE>} else {<NEW_LINE>StringBuffer sb = new StringBuffer(Integer.toString(zone_number)).append(zone_letter).append(get100kID(easting, northing, zone_number));<NEW_LINE>StringBuffer seasting = new StringBuffer(Inte... | toString((int) easting)); |
1,448,447 | private com.ning.http.client.Request translate(final ClientRequest requestContext) {<NEW_LINE>final String strMethod = requestContext.getMethod();<NEW_LINE>final URI uri = requestContext.getUri();<NEW_LINE>RequestBuilder builder = new RequestBuilder(strMethod).setUrl(uri.toString());<NEW_LINE>builder.setFollowRedirects... | final FeedableBodyGenerator bodyGenerator = new FeedableBodyGenerator(); |
1,499,751 | private static void updatePermissions(IFileStore sourceFileStore, IFileStore targetFileStore, boolean isFile, PermissionDirection direction, IProgressMonitor monitor) {<NEW_LINE>if (PreferenceUtils.getUpdatePermissions(direction)) {<NEW_LINE>IFileInfo targetFileInfo = getFileInfo(targetFileStore, monitor);<NEW_LINE>lon... | & IExtendedFileInfo.PERMISSION_OWNER_EXECUTE) != 0); |
1,203,249 | public void start(BundleContext context) throws Exception {<NEW_LINE>// For test purposes, use a random port<NEW_LINE>Server server = new Server(0);<NEW_LINE>server.getConnectors()[0].addEventListener(new LifeCycle.Listener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void lifeCycleStarted(LifeCycle event) {<NEW_LI... | serverProps.put("managedServerName", "fooServer"); |
1,219,522 | public Response handle(Command command) {<NEW_LINE>Response response = new Response();<NEW_LINE>SessionId sessionId = command.getSessionId();<NEW_LINE>if (sessionId != null) {<NEW_LINE>response.setSessionId(sessionId.toString());<NEW_LINE>}<NEW_LINE>throwUpIfSessionTerminated(sessionId);<NEW_LINE>final RestishHandler<?... | "Error: " + e.getMessage()); |
1,312,869 | private void exportSites(final Path target) throws FrameworkException {<NEW_LINE>logger.info("Exporting sites");<NEW_LINE>final List<Map<String, Object>> sites = new LinkedList<>();<NEW_LINE>final App app = StructrApp.getInstance();<NEW_LINE>try (final Tx tx = app.tx()) {<NEW_LINE>for (final Site site : app.nodeQuery(S... | .getProperty(Site.visibleToAuthenticatedUsers)); |
1,112,068 | public static Map<File, String> downloadFiles(@NonNull final String url, @NonNull final List<File> files, @NonNull final Map<String, String> parameters, @Nullable final OnFilesDownloadCallback callback) {<NEW_LINE>Map<File, String> <MASK><NEW_LINE>for (final File file : files) {<NEW_LINE>final int[] progressValue = { 0... | errors = new HashMap<>(); |
8,317 | // This method spawns a mob at loc, owned by target<NEW_LINE>public static void spawnmob(final IEssentials ess, final Server server, final CommandSource sender, final User target, final Location loc, final List<String> parts, final List<String> data, int mobCount) throws Exception {<NEW_LINE>final Location sloc = Locat... | checkSpawnable(ess, sender, mob); |
434,514 | Object strOneArg(VirtualFrame frame, Object strClass, Object obj, @SuppressWarnings("unused") PNone encoding, @SuppressWarnings("unused") PNone errors, @Cached PyObjectStrAsObjectNode strNode) {<NEW_LINE>Object result = strNode.execute(frame, obj);<NEW_LINE>// try to return a primitive if possible<NEW_LINE>if (getIsStr... | (strClass, (String) result); |
639,651 | private void initializeRingBufferTaskFactories() {<NEW_LINE>factories.put(RingbufferReadOneCodec.REQUEST_MESSAGE_TYPE, (cm, con) -> new RingbufferReadOneMessageTask(cm, node, con));<NEW_LINE>factories.put(RingbufferAddAllCodec.REQUEST_MESSAGE_TYPE, (cm, con) -> new RingbufferAddAllMessageTask(cm, node, con));<NEW_LINE>... | (cm, node, con)); |
520,894 | private static Set<String> toStrings(Glob_range_setContext ctx, long maxValue) {<NEW_LINE>if (ctx.unnumbered != null) {<NEW_LINE>return ImmutableSet.of(ctx.unnumbered.getText());<NEW_LINE>}<NEW_LINE>String baseWord = ctx.base_word.getText();<NEW_LINE>if (ctx.first_interval_end == null && ctx.other_numeric_ranges == nul... | .group(2), 10); |
1,832,966 | public UpdateAccountSettingsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>UpdateAccountSettingsResult updateAccountSettingsResult = new UpdateAccountSettingsResult();<NEW_LINE>updateAccountSettingsResult.setStatus(context.<MASK><NEW_LINE>int originalDepth = context.getCurrentDepth();<NE... | getHttpResponse().getStatusCode()); |
1,022,586 | public void onPrepareSubMenu(final SubMenu subMenu) {<NEW_LINE>subMenu.removeGroup(MENU_GROUP);<NEW_LINE>if (mAccounts == null)<NEW_LINE>return;<NEW_LINE>for (int i = 0, j = mAccounts.length; i < j; i++) {<NEW_LINE>final AccountDetails account = mAccounts[i];<NEW_LINE>final MenuItem item = subMenu.add(MENU_GROUP, Menu.... | i, account.user.name); |
619,560 | private static void addOrUpdateRemoteConfig(Environment env, boolean isUpdateOrNot) {<NEW_LINE>StandardEnvironment environment = (StandardEnvironment) env;<NEW_LINE>PropertySource propertySource = environment.getPropertySources().get("bootstrapProperties");<NEW_LINE>if (propertySource == null) {<NEW_LINE>return;<NEW_LI... | key, val.toString()); |
407,140 | public void testNew2Invocations(Map<String, String> param, StringBuilder ret) {<NEW_LINE>String serverIP = param.get("serverIP");<NEW_LINE>String serverPort = param.get("serverPort");<NEW_LINE>ClientBuilder cb = ClientBuilder.newBuilder();<NEW_LINE>Client c = cb.build();<NEW_LINE>WebTarget t1 = c.target("http://" + ser... | path("test3").request(); |
61,777 | protected Object singleByteOptimizable(Rope stringRope, Rope patternRope, int offset, @Cached @Shared("stringBytesNode") BytesNode stringBytesNode, @Cached @Shared("patternBytesNode") BytesNode patternBytesNode, @Cached LoopConditionProfile loopProfile) {<NEW_LINE>assert offset >= 0;<NEW_LINE>int p = offset;<NEW_LINE>f... | int e = stringRope.byteLength(); |
1,644,050 | public static Dataset<Row> alignLinked(Dataset<Row> dupesActual, Arguments args) {<NEW_LINE>dupesActual = dupesActual.cache();<NEW_LINE>dupesActual = dupesActual.withColumnRenamed(ColName.ID_COL, ColName.CLUSTER_COLUMN);<NEW_LINE>List<Column> cols = new ArrayList<Column>();<NEW_LINE>cols.add(dupesActual<MASK><NEW_LINE>... | .col(ColName.CLUSTER_COLUMN)); |
622,286 | private void nextAnswer(Request fromUpstream, CachingRequestState<?, ConceptMap> requestState, int iteration) {<NEW_LINE>Optional<Partial.Compound<?, ?>> upstreamAnswer = requestState.nextAnswer(<MASK><NEW_LINE>if (upstreamAnswer.isPresent()) {<NEW_LINE>answerFound(upstreamAnswer.get(), fromUpstream, iteration);<NEW_LI... | ).map(Partial::asCompound); |
849,594 | public PsiElement restoreBySignature(@Nonnull PsiFile file, @Nonnull String signature, @Nullable StringBuilder processingInfoStorage) {<NEW_LINE>int semicolonIndex = signature.indexOf(ELEMENTS_SEPARATOR);<NEW_LINE>PsiElement parent;<NEW_LINE>if (semicolonIndex >= 0) {<NEW_LINE>String parentSignature = signature.substri... | String type = tokenizer.nextToken(); |
145,376 | public PutRecordsResultEntry unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>PutRecordsResultEntry putRecordsResultEntry = new PutRecordsResultEntry();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int t... | JsonToken token = context.getCurrentToken(); |
433,385 | private void addToStatement(X_I_BankStatement toImport) {<NEW_LINE>// Get the bank account for the first statement<NEW_LINE>// New Statement<NEW_LINE>if (isToCreate(toImport)) {<NEW_LINE>try {<NEW_LINE>createStatement(toImport);<NEW_LINE>noInsert.updateAndGet(count -> count + 1);<NEW_LINE>} catch (Exception e) {<NEW_LI... | setC_BankStatement_ID(statement.getC_BankStatement_ID()); |
794,229 | public void testCompletionStageRxInvoker_getIbmOverridesCbConnectionTimeout(Map<String, String> param, StringBuilder ret) {<NEW_LINE>String target = null;<NEW_LINE>if (isZOS()) {<NEW_LINE>// https://stackoverflow.com/a/904609/6575578<NEW_LINE>target = "http://example.com:81";<NEW_LINE>} else {<NEW_LINE>// Connect to te... | out.println("testCompletionStageRxInvoker_getIbmOverridesCbConnectionTimeout " + ret); |
1,568,671 | public static void unzip(File zipFile, File targetDirectory) throws IOException {<NEW_LINE>ZipInputStream zis = new ZipInputStream(new BufferedInputStream<MASK><NEW_LINE>try {<NEW_LINE>ZipEntry ze;<NEW_LINE>int count;<NEW_LINE>byte[] buffer = new byte[8192];<NEW_LINE>while ((ze = zis.getNextEntry()) != null) {<NEW_LINE... | (new FileInputStream(zipFile))); |
1,719,098 | private void writeEmbeddedValue(int pid, int rid, Object value, ByteBuffer buffer, PackageMetaData packageMetaData) throws BimserverDatabaseException {<NEW_LINE>IdEObject wrappedValue = (IdEObject) value;<NEW_LINE>Short cid = database.getCidOfEClass(wrappedValue.eClass());<NEW_LINE>buffer.order(ByteOrder.LITTLE_ENDIAN)... | putShort((short) -cid); |
926,094 | public int drainCipherBytes(ByteBuffer buffer) throws IOException {<NEW_LINE>try (AutoLock ignore = lock.lock()) {<NEW_LINE>if (quicheConn == null)<NEW_LINE>throw new IOException("Cannot send when not connected");<NEW_LINE>int prevPosition = buffer.position();<NEW_LINE>long written;<NEW_LINE>if (buffer.isDirect()) {<NE... | bufferSegment = MemorySegment.ofByteBuffer(buffer); |
458,151 | public NType resolve(Scope s) throws Exception {<NEW_LINE>NClassType thisType = getType().asClassType();<NEW_LINE>List<NType> baseTypes = new ArrayList<NType>();<NEW_LINE>for (NNode base : bases) {<NEW_LINE>NType baseType = resolveExpr(base, s);<NEW_LINE>if (baseType.isClassType()) {<NEW_LINE>thisType.addSuper(baseType... | BaseStr, new NUnknownType())); |
1,323,707 | public void onClick(View v) {<NEW_LINE>new ColorsDialog((FragmentActivity) controller.getActivity(), (Boolean) t1Img.getTag(), (Integer) t3Text.getTag(), (Integer) t2BG.getTag(), true, true, new ColorsDialogResult() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onChooseColor(int colorText, int colorBg) {<NEW_LINE... | MagicHelper.colorToString(colorText))); |
966,733 | public void paint(Editor editor, Graphics g, Rectangle range) {<NEW_LINE>EditorGutterComponentEx gutter = ((EditorEx) editor).getGutterComponentEx();<NEW_LINE>Graphics2D g2 = (Graphics2D) g;<NEW_LINE>int x1 = 0;<NEW_LINE>int x2 = x1 + gutter.getWidth();<NEW_LINE>int y1, y2;<NEW_LINE>if (myEmptyRange && myLastLine) {<NE... | getLineNumber(myHighlighter.getStartOffset()); |
1,625,911 | private static void tryAssert(RegressionEnvironment env) {<NEW_LINE>// assert select result type<NEW_LINE>String[] fields = "mySum".split(",");<NEW_LINE>env.assertStatement("s0", statement -> assertEquals(Long.class, statement.getEventType().getPropertyType("mySum")));<NEW_LINE>env.assertPropsPerRowIteratorAnyOrder("s0... | [] { { null } }); |
1,210,636 | public void run() {<NEW_LINE>Jep jep = JEPThreadPoolClassifier.getInstance().getJEPInstance();<NEW_LINE>try {<NEW_LINE>// load data<NEW_LINE>// to be reviewed for classification<NEW_LINE>jep.eval("x_all, y_all, f_all = load_data_and_labels_crf_file('" + this.trainPath.getAbsolutePath() + "')");<NEW_LINE>jep.eval("x_tra... | this.modelPath.getAbsolutePath()); |
208,667 | private Object apply(OExpression expression, Map<String, Object> input, OCommandContext ctx, int recursion) {<NEW_LINE>OResultInternal result = new OResultInternal();<NEW_LINE>if (starItem != null || includeItems.size() == 0) {<NEW_LINE>for (String property : input.keySet()) {<NEW_LINE>if (isExclude(property)) {<NEW_LI... | (alias, convert(value)); |
435,671 | public Mono<Layout> createLayout(String pageId, Layout layout) {<NEW_LINE>if (pageId == null) {<NEW_LINE>return Mono.error(new AppsmithException(AppsmithError.INVALID_PARAMETER, FieldName.PAGE_ID));<NEW_LINE>}<NEW_LINE>// fetch the unpublished page<NEW_LINE>Mono<PageDTO> pageMono = newPageService.findPageById(pageId, M... | = new ArrayList<Layout>(); |
974,851 | private void export(XlsxBorderInfo info) {<NEW_LINE>// if(info.hasBorder())<NEW_LINE>{<NEW_LINE>write("<border");<NEW_LINE>if (info.getDirection() != null) {<NEW_LINE>write(info.getDirection().equals(LineDirectionEnum.TOP_DOWN) ? " diagonalDown=\"1\"" : " diagonalUp=\"1\"");<NEW_LINE>}<NEW_LINE>write(">");<NEW_LINE>exp... | exportBorder(info, XlsxBorderInfo.DIAGONAL_BORDER); |
440,150 | public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {<NEW_LINE>if (!ModelReturn.class.isAssignableFrom(type.getRawType())) {<NEW_LINE>// this class only serializes 'ModelReturn' and its subtypes<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final TypeAdapter<JsonElement> elementAdapter = <MASK><NEW_LINE>final Ty... | gson.getAdapter(JsonElement.class); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.