idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
703,994 | private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String serverName, String virtualNetworkRuleName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and c... | error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); |
484,976 | public void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_value_blocks_to_int);<NEW_LINE>boolean noValueBlocks = false;<NEW_LINE>if (getIntent().hasExtra(EXTRA_VB)) {<NEW_LINE>mLayout = findViewById(R.id.tableLayoutValueBlocksToInt);<NEW_LIN... | .split(": ")[1]; |
1,701,321 | public void followArticle(final RequestContext context) {<NEW_LINE>context.renderJSON(StatusCodes.SUCC);<NEW_LINE>final JSONObject requestJSONObject = context.requestJSON();<NEW_LINE>final String followingArticleId = requestJSONObject.optString(Follow.FOLLOWING_ID);<NEW_LINE>final JSONObject currentUser = Sessions.getU... | put(Notification.NOTIFICATION_USER_ID, articleAuthorId); |
713,994 | protected Object run(IPersistentMap map) {<NEW_LINE>EObject key = get_key(obj);<NEW_LINE>IPersistentCollection empty = empty();<NEW_LINE>IPersistentCollection c = (IPersistentCollection) map.valAt(key, empty);<NEW_LINE>if (c == null || c.count() == 0)<NEW_LINE>return null;<NEW_LINE>IPersistentCollection out = empty();<... | out = out.cons(val); |
1,099,704 | private void doIt(LineInformation line, TextContent model, boolean expandtab, boolean shiftround, int tabstop, int shiftwidth, String replaceTab, String replaceShiftWidth) {<NEW_LINE>String lineStr = model.getText(line.getBeginOffset(), line.getLength());<NEW_LINE>int whitespaceEnd = VimUtils.getFirstNonWhiteSpaceOffse... | indent = indent.substring(1); |
1,358,812 | /*<NEW_LINE>* @see com.sitewhere.grpc.service.DeviceEventManagementGrpc.<NEW_LINE>* DeviceEventManagementImplBase#listStateChangesForIndex(com.sitewhere.grpc.<NEW_LINE>* service.GListStateChangesForIndexRequest, io.grpc.stub.StreamObserver)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void listStateChangesForIndex(GL... | (request.getCriteria())); |
1,405,056 | private void initTraverserIfNeeded() {<NEW_LINE>if (traverser != null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Generate one event for each user in userTrackers<NEW_LINE>Stream<ProductEvent> productEventStream = // randomly skip some events<NEW_LINE>IntStream.range(0, userTrackers.length).filter(i -> random.nextInt(3)... | (() -> traverser = null); |
934,295 | private boolean doDeleteFile(@NonNull HybridFileParcelable file) throws Exception {<NEW_LINE>switch(file.getMode()) {<NEW_LINE>case OTG:<NEW_LINE>DocumentFile documentFile = OTGUtil.getDocumentFile(file.getPath(), applicationContext, false);<NEW_LINE>return documentFile.delete();<NEW_LINE>case DOCUMENT_FILE:<NEW_LINE>d... | .delete(applicationContext, rootMode)); |
1,581,953 | private void loadClasspath() throws IOException {<NEW_LINE>if (configuration.getPath() != null) {<NEW_LINE>for (File file : configuration.getPath()) {<NEW_LINE>if (file.isFile()) {<NEW_LINE>classpath.putAll(loadClasspathFile(file, true));<NEW_LINE>} else {<NEW_LINE>File[] files = file.listFiles(child -> child.getName()... | (loadClasspathFile(child, true)); |
396,909 | public void readSettings(Object settings) {<NEW_LINE>wizardDescriptor = (WizardDescriptor) settings;<NEW_LINE>// NOI18N<NEW_LINE>wizardDescriptor.putProperty("NewProjectWizard_Title"<MASK><NEW_LINE>// guess webapps well-known locations and preset them<NEW_LINE>File baseFolder = (File) wizardDescriptor.getProperty(NewFr... | , component.getClientProperty("NewProjectWizard_Title")); |
1,054,999 | private void handleBackgroundImage(KrollDict d) {<NEW_LINE>String bg = <MASK><NEW_LINE>String bgSelected = d.optString(TiC.PROPERTY_BACKGROUND_SELECTED_IMAGE, bg);<NEW_LINE>String bgFocused = d.optString(TiC.PROPERTY_BACKGROUND_FOCUSED_IMAGE, bg);<NEW_LINE>String bgDisabled = d.optString(TiC.PROPERTY_BACKGROUND_DISABLE... | d.getString(TiC.PROPERTY_BACKGROUND_IMAGE); |
754,415 | private void processCell(int cellX, int cellY, Vector2f at, VoronoiResult[] results) {<NEW_LINE>long seed = (702395077 * (long) cellX + 915488749 * (long) cellY);<NEW_LINE>// Number of features<NEW_LINE>int count = poissonCount[(int) (seed >> 24)];<NEW_LINE>seed = incrementSeed(seed);<NEW_LINE>for (int point = 0; point... | ] = results[i - 1]; |
1,474,541 | private <T extends I_M_ProductPrice> T retrieveDefault(final boolean strictDefault, @NonNull final Class<T> type) {<NEW_LINE>final IQueryBuilder<MASK><NEW_LINE>if (strictDefault) {<NEW_LINE>queryBuilder.addEqualsFilter(I_M_ProductPrice.COLUMN_IsDefault, true);<NEW_LINE>}<NEW_LINE>// Take records with IsDefault=Y first<... | <I_M_ProductPrice> queryBuilder = toQueryBuilder(); |
1,782,341 | static char[] decode(byte[] ba, int off, int len) {<NEW_LINE>String csn = Charset.defaultCharset().name();<NEW_LINE>try {<NEW_LINE>// use charset name decode() variant which provides caching.<NEW_LINE>return decode(<MASK><NEW_LINE>} catch (UnsupportedEncodingException x) {<NEW_LINE>warnUnsupportedCharset(csn);<NEW_LINE... | csn, ba, off, len); |
1,160,524 | private void insertIntoGrid(DBIDRef id, V obj, int d, int v) {<NEW_LINE>// Number of cells in this dimension<NEW_LINE>final int cn = cells[d];<NEW_LINE>// Next dimension<NEW_LINE>final int nd = d + 1;<NEW_LINE>int mi = Math.max(0, (int) FastMath.floor((obj.doubleValue(d) - offset[d] - epsilon) / gridwidth));<NEW_LINE>i... | assert (mi <= ma) : "Grid inconsistent."; |
849,026 | public static void main(String[] args) throws Exception {<NEW_LINE>Args myArgs = new Args();<NEW_LINE>CmdLineParser parser = new CmdLineParser(myArgs, ParserProperties.defaults().withUsageWidth(90));<NEW_LINE>try {<NEW_LINE>parser.parseArgument(args);<NEW_LINE>} catch (CmdLineException e) {<NEW_LINE>System.err.println(... | int numDocs = reader.numDocs(); |
141,381 | public static ListDashboardMetricsFlowsResponse unmarshall(ListDashboardMetricsFlowsResponse listDashboardMetricsFlowsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listDashboardMetricsFlowsResponse.setRequestId(_ctx.stringValue("ListDashboardMetricsFlowsResponse.requestId"));<NEW_LINE>listDashboardMetricsFlowsResponse... | ("ListDashboardMetricsFlowsResponse.result[" + i + "].metricData")); |
1,793,908 | final DescribeKinesisStreamingDestinationResult executeDescribeKinesisStreamingDestination(DescribeKinesisStreamingDestinationRequest describeKinesisStreamingDestinationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeKinesisStreamingDestinationRequest);<NEW_LINE>AWSRequestMetrics ... | responseHandler, executionContext, cachedEndpoint, null); |
539,339 | public boolean fight(Permanent fightTarget, Ability source, Game game, boolean batchTrigger) {<NEW_LINE>// double fight events for each creature<NEW_LINE>game.fireEvent(GameEvent.getEvent(GameEvent.EventType.FIGHTED_PERMANENT, fightTarget.getId(), source, source.getControllerId()));<NEW_LINE>game.fireEvent(GameEvent.ge... | new MageObjectReference(this, game)); |
1,167,264 | private boolean isSectorInRage(Context context, boolean isWriteBlock) {<NEW_LINE>MCReader reader = Common.checkForTagAndCreateReader(this);<NEW_LINE>if (reader == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>int lastValidSector <MASK><NEW_LINE>int lastSector;<NEW_LINE>reader.close();<NEW_LINE>// Initialize last s... | = reader.getSectorCount() - 1; |
1,068,173 | private void parseStackMapTableAttribute(StackFrame firstFrame) {<NEW_LINE>StackFrame previous = firstFrame;<NEW_LINE>int bci = 0;<NEW_LINE>boolean first = true;<NEW_LINE>int entryCount = stream.readU2();<NEW_LINE>for (int i = 0; i < entryCount; i++) {<NEW_LINE>StackMapFrame entry = parseStackMapFrame();<NEW_LINE>Stack... | + (first ? 0 : 1); |
1,179,001 | public void propertyChange(java.beans.PropertyChangeEvent evt) {<NEW_LINE>if (ExplorerManager.PROP_SELECTED_NODES.equals(evt.getPropertyName())) {<NEW_LINE>final Node[] nodes = (Node[]) evt.getNewValue();<NEW_LINE>boolean res = nodes != null && nodes.length > 0;<NEW_LINE>int i = 0;<NEW_LINE>while (res && i < nodes.leng... | Node n = nodes[i++]; |
252,448 | public DeleteSessionResult deleteSession(DeleteSessionRequest deleteSessionRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteSessionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NE... | JsonUnmarshallerContext> unmarshaller = new DeleteSessionResultJsonUnmarshaller(); |
575,125 | private static void handleByteCode(ConfigurationCompiler compiler, Element element) {<NEW_LINE>ConfigurationCompilerByteCode codegen = compiler.getByteCode();<NEW_LINE>parseOptionalBoolean(element, "include-debugsymbols", codegen::setIncludeDebugSymbols);<NEW_LINE>parseOptionalBoolean(element, "include-comments", codeg... | busModifierEventType = getOptionalAttribute(element, "bus-modifier-event-type"); |
1,749,336 | private void drawIcon(Graphics graphics) {<NEW_LINE>if (!isIconVisible()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>graphics.pushState();<NEW_LINE>graphics.setLineWidth(1);<NEW_LINE>graphics.setForegroundColor(isEnabled() ? <MASK><NEW_LINE>graphics.setBackgroundColor(isEnabled() ? ColorConstants.black : ColorConstants.gra... | ColorConstants.black : ColorConstants.gray); |
375,244 | static void make_encode_method(ClassWriter cw, String className, int arity) {<NEW_LINE>MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "encode", "(" + Type.getDescriptor(EOutputStream.class<MASK><NEW_LINE>mv.visitCode();<NEW_LINE>mv.visitVarInsn(ALOAD, 1);<NEW_LINE>mv.visitVarInsn(ALOAD, 0);<NEW_LINE>mv.visitFieldInsn(GE... | ) + ")V", null, null); |
386,983 | public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver) {<NEW_LINE>try (HotSpotInvocationPluginHelper helper = new HotSpotInvocationPluginHelper(b, targetMethod, config)) {<NEW_LINE>ValueNode klass = helper.readKlassFromClass(receiver.get());<NEW_LINE>// Primitive Class case retu... | (false), GraalDirectives.UNLIKELY_PROBABILITY); |
1,438,653 | private void addElementActions(Menu menu, IDiagramModelArchimateComponent sourceDiagramModelComponent) {<NEW_LINE>addElementActions(menu, Messages.MagicConnectionCreationTool_7, sourceDiagramModelComponent, ArchimateModelUtils.getStrategyClasses());<NEW_LINE>addElementActions(menu, Messages.MagicConnectionCreationTool_... | sourceDiagramModelComponent, ArchimateModelUtils.getTechnologyClasses()); |
420,055 | public boolean format() throws Exception {<NEW_LINE>// Clear underreplicated ledgers<NEW_LINE>store.deleteRecursive(PulsarLedgerUnderreplicationManager.getBasePath(ledgersRootPath) + BookKeeperConstants.DEFAULT_ZK_LEDGERS_ROOT_PATH).get();<NEW_LINE>// Clear underreplicatedledger locks<NEW_LINE>store.deleteRecursive(Pul... | (ledgersRootPath)).get(); |
72,120 | public void complete(VirtualConnection vc, TCPReadRequestContext rsc) {<NEW_LINE>if (c_logger.isTraceEntryExitEnabled())<NEW_LINE>c_logger.traceEntry(this, "SipResolverTcpTransport: complete: entry: id=" + hashCode());<NEW_LINE>if (c_logger.isTraceDebugEnabled())<NEW_LINE>c_logger.traceDebug("SipResolverTcpTransport: c... | .getBuffer().getShort(); |
1,322,145 | public void onBindViewHolder(ViewHolder holder, Commit commit) {<NEW_LINE>User author = commit.author();<NEW_LINE>if (author != null && !TextUtils.isEmpty(author.login())) {<NEW_LINE>AvatarHandler.assignAvatar(holder.ivGravatar, author);<NEW_LINE>} else {<NEW_LINE>GitUser commitAuthor = commit.commit().author();<NEW_LI... | holder.tvDesc.setText(message); |
1,590,415 | public JSONObject toJSON() throws JSONException {<NEW_LINE>JSONObject jsonObj = new JSONObject();<NEW_LINE>jsonObj.put(JSON_SECRET, new String(new Base32().encode(getSecret())));<NEW_LINE>jsonObj.put(JSON_ISSUER, getIssuer());<NEW_LINE>jsonObj.put(JSON_LABEL, getLabel());<NEW_LINE>jsonObj.put(JSON_DIGITS, getDigits());... | getType().toString()); |
1,006,951 | private void insertRequestModel(Operation operation, Map<String, Object> model) {<NEW_LINE>OperationRequest request = operation.getRequest();<NEW_LINE>model.put("request_method", request.getMethod());<NEW_LINE>model.put("request_url", prepareRequestUrl(request.getUri()));<NEW_LINE>String rawQuery = request.getUri().get... | ("request_json_paths", jsonPaths(jsonPaths)); |
527,258 | public static void computeDataBitCoordinates(AztecCode marker, PackedArrayPoint2D_I16 coordinates) {<NEW_LINE>// clear old data<NEW_LINE>coordinates.reset();<NEW_LINE>// First layer goes around the orientation pattern + mode bits<NEW_LINE>int ringWidth = marker.getLocatorWidthSquares() + 6;<NEW_LINE>int ringRadius = ri... | 0, maxNum, hasGrid, coordinates); |
1,090,209 | private void computeObjectChecksum() throws DdlException {<NEW_LINE>if (FeConstants.runningUnitTest) {<NEW_LINE>// skip checking checksum when running ut<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>InputStream inputStream = null;<NEW_LINE>try {<NEW_LINE>inputStream = Util.getInputStreamFromUrl(getProperty(DRIVER_URL), null, H... | bytesRead = inputStream.read(buf); |
732,309 | public PropertiesPanel createPanel(final Host dataSource) {<NEW_LINE>PropertiesPanel panel = new PropertiesPanel();<NEW_LINE>panel.setLayout(new BorderLayout());<NEW_LINE>final JTextArea textArea = new JTextArea() {<NEW_LINE><NEW_LINE>public Dimension getMinimumSize() {<NEW_LINE>Dimension prefSize = getPreferredSize();... | new Dimension(1, 1)); |
981,640 | void processType(TypeElement autoOneOfType) {<NEW_LINE>DeclaredType kindMirror = mirrorForKindType(autoOneOfType);<NEW_LINE>// We are going to classify the methods of the @AutoOneOf class into several categories.<NEW_LINE>// This covers the methods in the class itself and the ones it inherits from supertypes.<NEW_LINE>... | ExecutableElement> abstractMethods = abstractMethodsIn(methods); |
966,236 | public Map<String, String> properties() {<NEW_LINE>ImmutableMap.Builder<String, String> propsBuilder = ImmutableMap.builder();<NEW_LINE>String fileFormat = icebergTable.properties().getOrDefault(TableProperties.DEFAULT_FILE_FORMAT, TableProperties.DEFAULT_FILE_FORMAT_DEFAULT);<NEW_LINE>propsBuilder.put("format", "icebe... | ).snapshotId()) : "none"; |
713,829 | protected List<? extends HandlerMethodArgumentResolver> initArgumentResolvers() {<NEW_LINE>List<HandlerMethodArgumentResolver> resolvers = new ArrayList<>();<NEW_LINE>ApplicationContext context = getApplicationContext();<NEW_LINE>ConfigurableBeanFactory beanFactory = (context instanceof ConfigurableApplicationContext ?... | .add(new ContinuationHandlerMethodArgumentResolver()); |
1,846,189 | public void init(FileObject fo) {<NEW_LINE>try {<NEW_LINE>if (fo == null) {<NEW_LINE>throw new RQException("fileName is not existed");<NEW_LINE>}<NEW_LINE>Properties props = new Properties();<NEW_LINE>if (fo.getCharset() != null) {<NEW_LINE>InputStreamReader ist = new InputStreamReader(fo.getInputStream(), fo.getCharse... | error(e.getStackTrace()); |
439,784 | private static void appendLong13(CharSink sink, long i) {<NEW_LINE>long c;<NEW_LINE>sink.put((char) ('0' + i / 1000000000000L));<NEW_LINE>sink.put((char) ('0' + (c = i % 1000000000000L) / 100000000000L));<NEW_LINE>sink.put((char) ('0' + (c %= 100000000000L) / 10000000000L));<NEW_LINE>sink.put((char) ('0' + (c %= 100000... | c %= 1000000) / 100000)); |
1,366,478 | public String checkCode(String label, String code, PortDefinition inputs, PortDefinition outputs, File root) throws IOException {<NEW_LINE>File file = null;<NEW_LINE>if (!hasIverilog) {<NEW_LINE>throw new IOException(Lang.get("err_iverilogNotInstalled"));<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>file = createVerilogFile(labe... | code, inputs, outputs, root); |
392,112 | public void marshall(PhoneNumber phoneNumber, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (phoneNumber == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(phoneNumber.getPhoneNumberId(), PHONENUMBERID_BINDI... | phoneNumber.getE164PhoneNumber(), E164PHONENUMBER_BINDING); |
945,927 | private void initializeDrivingFeatures() {<NEW_LINE>final GATKPath drivingPath = getDrivingFeaturePath();<NEW_LINE>final FeatureCodec<? extends Feature, ?> codec = FeatureManager.getCodecForFile(drivingPath.toPath());<NEW_LINE>if (isAcceptableFeatureType(codec.getFeatureType())) {<NEW_LINE>final GenomicsDBOptions optio... | >) codec.getClass()); |
1,059,945 | public static DescribeInstanceSpecsResponse unmarshall(DescribeInstanceSpecsResponse describeInstanceSpecsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeInstanceSpecsResponse.setRequestId(_ctx.stringValue("DescribeInstanceSpecsResponse.RequestId"));<NEW_LINE>List<InstanceSpec> instanceSpecs = new ArrayList<Inst... | ("DescribeInstanceSpecsResponse.InstanceSpecs[" + i + "].ElasticBandwidth")); |
819,643 | private CompletableFuture<Void> prepareBackwardSyncFutureWithRetry(final BackwardChain backwardChain) {<NEW_LINE>CompletableFuture<Void> f = prepareBackwardSyncFuture(backwardChain);<NEW_LINE>for (int i = 0; i < MAX_RETRIES; i++) {<NEW_LINE>f = f.thenApply(CompletableFuture::completedFuture).exceptionally(ex -> {<NEW_L... | getEthPeers().peerCount()); |
3,496 | final GetStreamingImageResult executeGetStreamingImage(GetStreamingImageRequest getStreamingImageRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getStreamingImageRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.st... | (super.beforeMarshalling(getStreamingImageRequest)); |
1,089,731 | final TagResourceResult executeTagResource(TagResourceRequest tagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(tagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
1,813,079 | /*<NEW_LINE>* Using concat operator to combine Observable : concat maintain<NEW_LINE>* the order of Observable.<NEW_LINE>* It will emit all the 7 values in order<NEW_LINE>* here - first "A1", "A2", "A3", "A4" and then "B1", "B2", "B3"<NEW_LINE>* first all from the first Observable and then<NEW_LINE>* all from the secon... | bObservable = Observable.fromArray(bStrings); |
1,467,866 | void _subscribe(CoreSubscriber<? super Void> s) {<NEW_LINE>HttpDataFactory df = DEFAULT_FACTORY;<NEW_LINE>try {<NEW_LINE>HttpClientFormEncoder encoder = new HttpClientFormEncoder(df, parent.nettyRequest, false, HttpConstants.DEFAULT_CHARSET, HttpPostRequestEncoder.EncoderMode.RFC1738);<NEW_LINE>formCallback.accept(pare... | .ChunkedWriter, new ChunkedWriteHandler()); |
1,449,407 | public boolean maybeCreateTable(String keyspaceName, String tableName) {<NEW_LINE>Keyspace ks = dataStore.<MASK><NEW_LINE>if (ks == null) {<NEW_LINE>String message = String.format("Unknown namespace %s, you must create it first.", keyspaceName);<NEW_LINE>throw new ErrorCodeRuntimeException(ErrorCode.DATASTORE_KEYSPACE_... | schema().keyspace(keyspaceName); |
1,133,250 | public Object map(Object input) {<NEW_LINE>List<Integer> list = (List<Integer>) input;<NEW_LINE>switch(mathOp) {<NEW_LINE>case Add:<NEW_LINE>int sum = 0;<NEW_LINE>for (Integer w : list) sum += w;<NEW_LINE>return sum;<NEW_LINE>case Subtract:<NEW_LINE>return new IntWritable(list.get(0) <MASK><NEW_LINE>case Multiply:<NEW_... | - list.get(1)); |
588,695 | public MappeableContainer andNot(final MappeableArrayContainer value2) {<NEW_LINE>final MappeableBitmapContainer answer = clone();<NEW_LINE>if (!BufferUtil.isBackedBySimpleArray(answer.bitmap)) {<NEW_LINE>throw new RuntimeException("Should not happen. Internal bug.");<NEW_LINE>}<NEW_LINE>long[] bitArray = answer.bitmap... | (~(1L << v)); |
1,099,415 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>Player opponent = game.getPlayer(this.getTargetPointer().getFirst(game, source));<NEW_LINE>Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId());<NEW_LINE>if (c... | .CREATURE.getPredicate())); |
759,531 | public Enumerable<Object[]> scan(DataContext root) {<NEW_LINE>final AuthenticationResult authenticationResult = (AuthenticationResult) Preconditions.checkNotNull(root.get(PlannerContext.DATA_CTX_AUTHENTICATION_RESULT), "authenticationResult in dataContext");<NEW_LINE>checkStateReadAccessForServers(authenticationResult,... | 1] = segment.getId(); |
1,248,241 | final PutOptedOutNumberResult executePutOptedOutNumber(PutOptedOutNumberRequest putOptedOutNumberRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(putOptedOutNumberRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.st... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
1,511,817 | private void loadBuiltin(E builtinEnum) {<NEW_LINE>class FactoryImpl implements BuiltinNodeFactory {<NEW_LINE><NEW_LINE>private final boolean construct;<NEW_LINE><NEW_LINE>private final boolean newTarget;<NEW_LINE><NEW_LINE>FactoryImpl(boolean construct, boolean newTarget) {<NEW_LINE>this.construct = construct;<NEW_LIN... | builtin, construct, newTarget, builtinEnum); |
147,072 | public void configure(TestElement el) {<NEW_LINE>initTableModel();<NEW_LINE>paramTable.setModel(tableModel);<NEW_LINE>UserParameters params = (UserParameters) el;<NEW_LINE>CollectionProperty names = params.getNames();<NEW_LINE><MASK><NEW_LINE>tableModel.setColumnData(0, (List<?>) names.getObjectValue());<NEW_LINE>Prope... | CollectionProperty threadValues = params.getThreadLists(); |
1,174,671 | public Map<String, String> generateOptions() {<NEW_LINE>Map<String, String> options = new HashMap<>(16);<NEW_LINE>options.put("format", getFormat());<NEW_LINE>if (this.failOnMissingField != null) {<NEW_LINE>String failOnMissingField = this.failOnMissingField.toString();<NEW_LINE>options.put("json.fail-on-missing-field"... | put("json.map-null-key.mode", this.mapNullKeyMode); |
790,716 | public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {<NEW_LINE>int topOffset = 0;<NEW_LINE>// TODO - other option is to let the painting of the dark border to the inner component and make this border's insets smaller.<NEW_LINE>if (c instanceof JComponent) {<NEW_LINE>JComponent jc = (JC... | Integer) jc.getClientProperty("MultiViewBorderHack.topOffset"); |
1,421,562 | private String parseString(String s) {<NEW_LINE>int readPos = 0;<NEW_LINE>int len = s.length();<NEW_LINE>int writePos = 0;<NEW_LINE>while (readPos < len) {<NEW_LINE>char c = s.charAt(readPos++);<NEW_LINE>if (c == '\\') {<NEW_LINE>if (readPos >= len)<NEW_LINE>throw new RuntimeException("Invalid escaped char in [" + s + ... | , readPos + 4), 16); |
268,683 | protected NativeEntity<ViewDTO> decode(EntityV1 entityV1, Map<String, ValueReference> parameters, Map<EntityDescriptor, Object> nativeEntities, User user) {<NEW_LINE>final ViewEntity viewEntity = objectMapper.convertValue(entityV1.data(), ViewEntity.class);<NEW_LINE>final Map<String, ViewStateDTO> viewStateMap = new Li... | persistedView.title(), persistedView); |
259,551 | static BlockArrayClipboard readVersion1(CompoundTag schematicTag, VersionedDataFixer fixer) throws IOException {<NEW_LINE>Map<String, Tag> schematic = schematicTag.getValue();<NEW_LINE>int width = requireTag(schematic, "Width", ShortTag.class).getValue() & 0xFFFF;<NEW_LINE>int height = requireTag(schematic, "Height", S... | ReaderUtil.decodePalette(paletteObject, fixer); |
845,981 | public void drawEventBasedGateway(String id, GraphicInfo graphicInfo) {<NEW_LINE>// rhombus<NEW_LINE>drawGateway(graphicInfo);<NEW_LINE>int x = (int) graphicInfo.getX();<NEW_LINE>int y = (int) graphicInfo.getY();<NEW_LINE>int width = (int) graphicInfo.getWidth();<NEW_LINE>int height = (int) graphicInfo.getHeight();<NEW... | eventInfo.setWidth(width * scale); |
1,431,034 | public void read(org.apache.thrift.protocol.TProtocol prot, multi_remove_response struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;<NEW_LINE>java.util.BitSet incoming = iprot.readBitSet(6);<NEW_LINE>if (incoming.get... | .error = iprot.readI32(); |
980,699 | public void predictVertical(int[] residual, boolean topLeftAvailable, boolean topRightAvailable, byte[] topLeft, byte[] topLine, int mbOffX, int blkX, int blkY, byte[] pixOut) {<NEW_LINE>interpolateTop(topLeftAvailable, topRightAvailable, topLeft, topLine, mbOffX + blkX, blkY, topBuf);<NEW_LINE>int pixOff = (blkY << 4)... | 6], -128, 127); |
1,521,886 | private int nodeSourceStart(Binding field, ASTNode node, int index) {<NEW_LINE>if (node instanceof FieldReference) {<NEW_LINE>FieldReference fieldReference = (FieldReference) node;<NEW_LINE>return (int) (fieldReference.nameSourcePosition >> 32);<NEW_LINE>} else if (node instanceof QualifiedNameReference) {<NEW_LINE>Qua... | sourcePositions[index] >> 32); |
1,821,826 | public void deprecatedMethod(final MethodBinding method, ASTNode location) {<NEW_LINE>// common arguments:<NEW_LINE>String readableClassName = new String(<MASK><NEW_LINE>String shortReadableClassName = new String(method.declaringClass.shortReadableName());<NEW_LINE>String selector = new String(method.selector);<NEW_LIN... | method.declaringClass.readableName()); |
297,531 | public static synchronized void onMessegeBrightness(final Handler h, MessegeBrightness msg, final TextView textView, final View overlay) {<NEW_LINE>int value = msg.getValue();<NEW_LINE>textView.setVisibility(View.VISIBLE);<NEW_LINE>h.removeCallbacksAndMessages(null);<NEW_LINE>h.postDelayed(new Runnable() {<NEW_LINE><NE... | ) + " " + value + "%"); |
1,167,571 | final UpdateUserHierarchyResult executeUpdateUserHierarchy(UpdateUserHierarchyRequest updateUserHierarchyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateUserHierarchyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | invoke(request, responseHandler, executionContext); |
1,840,081 | public void popupMenuWillBecomeVisible(PopupMenuEvent e) {<NEW_LINE>applyMenu.removeAll();<NEW_LINE>DefaultWssContainer wss = getModelItem().getOperation().getInterface().getProject().getWssContainer();<NEW_LINE>List<OutgoingWss> outgoingWssList = wss.getOutgoingWssList();<NEW_LINE>applyMenu.setEnabled(!outgoingWssList... | new AddWsaHeadersToRequestAction(getModelItem())); |
766,999 | // snippet-start:[personalize.java2.create_event_tracker.main]<NEW_LINE>public static String createEventTracker(PersonalizeClient personalizeClient, String eventTrackerName, String datasetGroupArn) {<NEW_LINE>String eventTrackerId = "";<NEW_LINE>String eventTrackerArn;<NEW_LINE>// 3 hours<NEW_LINE>long maxTime = 3 * 60... | ().getEpochSecond() + maxTime; |
1,048,507 | private String retrieveFlinkUserJar(FlinkEnv flinkEnv, Application app) {<NEW_LINE>switch(app.getDevelopmentMode()) {<NEW_LINE>case CUSTOMCODE:<NEW_LINE>switch(app.getApplicationType()) {<NEW_LINE>case STREAMPARK_FLINK:<NEW_LINE>return String.format("%s/%s", app.getAppLib(), app.getModule().concat(".jar"));<NEW_LINE>ca... | "[StreamPark] unsupported JobType: " + app.getDevelopmentMode()); |
1,506,483 | private void createSubscriptionIfNotExists(String partition, TopicName topicName) {<NEW_LINE>ProjectSubscriptionName subscriptionName = ProjectSubscriptionName.of(pubSubSettings.getProjectId(), partition);<NEW_LINE>if (subscriptionSet.contains(subscriptionName.toString())) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ListSub... | response = subscriptionAdminClient.listSubscriptions(listSubscriptionsRequest); |
84,123 | private void doDecode(MergedWarpMessage mergedWarpMessage, ByteBuffer byteBuffer) {<NEW_LINE>short msgNum = byteBuffer.getShort();<NEW_LINE>List<AbstractMessage> msgs = new ArrayList<AbstractMessage>();<NEW_LINE>for (int idx = 0; idx < msgNum; idx++) {<NEW_LINE>short typeCode = byteBuffer.getShort();<NEW_LINE>AbstractM... | msgIds = new ArrayList<>(); |
1,771,362 | public void start() {<NEW_LINE>ThreadUtils.checkIsOnMainThread();<NEW_LINE>Log.d(TAG, "start");<NEW_LINE>if (!hasPermission(apprtcContext, android.Manifest.permission.BLUETOOTH)) {<NEW_LINE>Log.w(TAG, "Process (pid=" + Process.myPid() + ") lacks BLUETOOTH permission");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (bluetooth... | getProfileConnectionState(BluetoothProfile.HEADSET))); |
794,040 | private void initTypeName() {<NEW_LINE>this.importsResolver = new ImportsTypeStringResolver(protoclass().declaringType().orNull(), getDeclaringType());<NEW_LINE>this.importsResolver.hierarchyTraversalForUnresolvedTypes(protoclass().environment().round(), this.containingType.extendedClasses(), this.containingType.implem... | .rawTypeName = provider.rawTypeName(); |
232,755 | public void evaluate(SearchRequest request, SearchResponse response) {<NEW_LINE>final String searchText = request<MASK><NEW_LINE>for (final Project project : OpenProjects.getDefault().getOpenProjects()) {<NEW_LINE>final ProjectInformation info = ProjectUtils.getInformation(project);<NEW_LINE>if (info == null || info.ge... | .getText().toLowerCase(); |
287,431 | final DescribeIdentityIdFormatResult executeDescribeIdentityIdFormat(DescribeIdentityIdFormatRequest describeIdentityIdFormatRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeIdentityIdFormatRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetri... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
1,313,568 | public Object execute(Object[] arguments, @CachedLibrary("this") PythonNativeWrapperLibrary lib, @Exclusive @Cached ToJavaNode toJavaNode, @Exclusive @Cached CExtNodes.ToNewRefNode toSulongNode, @Exclusive @Cached CallNode callNode, @Exclusive @Cached ExecutePositionalStarargsInteropNode posStarargsNode, @Exclusive @Ca... | .execute(arguments[1]); |
1,608,261 | private tr fillTable_Lookup_Headers(String columnName, int fieldRefId, tr line, String targetBase, boolean mandatory, boolean onlyValidated, boolean onlyActive, boolean temporary, boolean firstHeaderLine) {<NEW_LINE>String sqlSelect = null;<NEW_LINE>input filter = null;<NEW_LINE>if (fieldRefId > 0)<NEW_LINE>sqlSelect =... | (",").append(col); |
272,049 | public void initialize(TransactionUserWrapper wrapper, TransactionUserWrapper originalTU) {<NEW_LINE>if (c_logger.isTraceEntryExitEnabled()) {<NEW_LINE>Object[] params = { wrapper, originalTU };<NEW_LINE>c_logger.traceEntry(this, "initialize", params);<NEW_LINE>}<NEW_LINE>TransactionUserBase originalBaseTU = originalTU... | SipSessionSeqLog.INIT, getSharedId()); |
1,733,979 | final UpdateGeoMatchSetResult executeUpdateGeoMatchSet(UpdateGeoMatchSetRequest updateGeoMatchSetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateGeoMatchSetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.st... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
818,223 | void calculate() {<NEW_LINE>try {<NEW_LINE>if (!clusterAssignmentCache.isReady()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>logger.info("Max rate calculation started");<NEW_LINE>long start = clock.millis();<NEW_LINE>maxRateRegistry.onBeforeMaxRateCalculation();<NEW_LINE>clusterAssignmentCache.getSubscriptionConsumers().fo... | logger.error("Problem calculating max rate", e); |
1,590,533 | static void diffRowValues(RowBuilder rowBuilder, @Nullable Row baseRow, @Nullable Row deltaRow, TableMetadata inputMetadata) {<NEW_LINE>checkArgument(baseRow != null || deltaRow != null, "Both base and delta rows cannot be null");<NEW_LINE>checkArgument(rowBuilder != null, "rowBuilder cannot be null");<NEW_LINE>checkAr... | getColumnMetadata() != null, "columns cannot be null"); |
1,362,018 | private static Map<String, String> topicConfigFromTopicConfig(KafkaTopic kafkaTopic) {<NEW_LINE>if (kafkaTopic.getSpec().getConfig() != null) {<NEW_LINE>Map<String, String> result = new HashMap<>(kafkaTopic.getSpec().getConfig().size());<NEW_LINE>for (Map.Entry<String, Object> entry : kafkaTopic.getSpec().getConfig().e... | Object v = entry.getValue(); |
804,495 | public void updateSQLXML(String columnLabel, SQLXML xmlObject) throws SQLException {<NEW_LINE>try {<NEW_LINE>rsetImpl.updateSQLXML(columnLabel, xmlObject);<NEW_LINE>} catch (SQLException sqlX) {<NEW_LINE>FFDCFilter.processException(sqlX, getClass().getName() + ".updateSQLXML", "5280", this);<NEW_LINE>throw WSJdbcUtil.m... | ) + ".updateSQLXML", "5303", this); |
484,359 | public Request<ListTrafficPolicyInstancesByPolicyRequest> marshall(ListTrafficPolicyInstancesByPolicyRequest listTrafficPolicyInstancesByPolicyRequest) {<NEW_LINE>if (listTrafficPolicyInstancesByPolicyRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LI... | request.setHttpMethod(HttpMethodName.GET); |
1,657,724 | private int parseLine(int startOff, int endOff, Pattern ptn) throws BadLocationException {<NEW_LINE>if (endOff <= startOff) {<NEW_LINE>return endOff;<NEW_LINE>}<NEW_LINE>Document doc = getDocument();<NEW_LINE>while (true) {<NEW_LINE>String line = doc.getText(startOff, endOff - startOff);<NEW_LINE>Matcher m = ptn.matche... | += m.start() + 1; |
633,070 | public String onDelete(HttpServletRequest request, HttpServletResponse response) throws Exception {<NEW_LINE>if (versionJudgement.allMemberIsNewVersion()) {<NEW_LINE>throw new IllegalStateException("old raft protocol already stop");<NEW_LINE>}<NEW_LINE>response.setHeader("Content-Type", "application/json; charset=" + g... | URLDecoder.decode(value, "UTF-8"); |
519,148 | protected Configurable[] buildConfigurables() {<NEW_LINE>myGeneralPanel = new VcsGeneralConfigurationPanel(myProject) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void disposeUIResources() {<NEW_LINE>super.disposeUIResources();<NEW_LINE>myGeneralPanel = null;<NEW_LINE>}<NEW_LINE>};<NEW_LINE>if (myMappings != null) {<... | = new ArrayList<Configurable>(); |
1,232,799 | private void decode(byte[] data, int width, int height) {<NEW_LINE>long start = System.currentTimeMillis();<NEW_LINE>Result rawResult = null;<NEW_LINE>// double dimensionKoeff = ((double)height)/((double)width);<NEW_LINE>Logger.I(TAG, "Byte massive length " + data.length + " " + width + " " + height);<NEW_LINE>// Logge... | rawResult = multiFormatReader.decodeWithState(bitmap); |
1,502,074 | public StartupCommand[] initialize() {<NEW_LINE>Map<String, MockVMVO> vmsMaps = _simMgr.getVms(this.hostGuid);<NEW_LINE>totalCpu = agentHost.getCpuCount() * agentHost.getCpuSpeed();<NEW_LINE>totalMem = agentHost.getMemorySize();<NEW_LINE>for (Map.Entry<String, MockVMVO> entry : vmsMaps.entrySet()) {<NEW_LINE>MockVMVO v... | RouterPrivateIpStrategy.DcGlobal.toString()); |
1,371,926 | public int runjs(File fScript, URL script, String scriptName, String[] args) {<NEW_LINE>String initSikulix = "";<NEW_LINE>if (Runner.jsRunner == null) {<NEW_LINE>Runner.jsRunner = Runner.initjs();<NEW_LINE>initSikulix = Runner.prologjs(initSikulix);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>if (null != fScript) {<NEW_LINE>Fil... | Runner.jsRunner.eval(scriptName); |
279,514 | protected static void processDirectory(File file, IProgressMonitor monitor) {<NEW_LINE>SubMonitor sub = <MASK><NEW_LINE>final IWorkspace workspace = ResourcesPlugin.getWorkspace();<NEW_LINE>// first look for project description files<NEW_LINE>File dotProject = new File(file, IProjectDescription.DESCRIPTION_FILE_NAME);<... | SubMonitor.convert(monitor, 130); |
1,660,032 | private Mono<PagedResponse<VirtualMachineScaleSetInner>> listSinglePageAsync() {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getSubscription... | error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); |
1,194,202 | private I_AD_PrinterHW retrieveOrCreatePrinterRecord(@NonNull final String hostKey, @NonNull final PrinterHW hwPrinter) {<NEW_LINE>I_AD_PrinterHW printerRecord = Services.get(IQueryBL.class).createQueryBuilder(I_AD_PrinterHW.class).addOnlyActiveRecordsFilter().addEqualsFilter(I_AD_PrinterHW.COLUMNNAME_HostKey, hostKey)... | OutputType.Queue.getCode()); |
1,173,927 | final DescribeDatasetResult executeDescribeDataset(DescribeDatasetRequest describeDatasetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeDatasetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(F... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
1,050,234 | private void addMeasurementLine(List<ILineDataSet> lineDataSets, List<Entry> lineEntries, FloatMeasurementView measurementView) {<NEW_LINE>LineDataSet measurementLine = new LineDataSet(lineEntries, measurementView.getName().toString());<NEW_LINE>measurementLine.setLineWidth(1.5f);<NEW_LINE>measurementLine.setValueTextS... | .getBoolean("labelsEnable", false)); |
402,019 | private static List<Entry> readEntries(String annotatorName, Set<String> noDefaultOverwriteLabels, List<Boolean> ignoreCaseList, List<String[]> headerList, Map<Entry, Integer> entryToMappingFileNumber, boolean verbose, String[] annotationFieldnames, String... mappings) {<NEW_LINE>// Unlike RegexNERClassifier, we don't ... | RuntimeIOException("Couldn't read TokensRegexNER from " + mapping, e); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.