idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
52,284 | public void prepare() throws IOException {<NEW_LINE>for (StringItem s : this) {<NEW_LINE>if (s.data.length() > 0x7FFF) {<NEW_LINE>useUTF8 = false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>ByteArrayOutputStream baos = new ByteArrayOutputStream();<NEW_LINE>int i = 0;<NEW_LINE>int offset = 0;<NEW_LINE>baos.reset();<NEW_LINE>Map<Str... | u8lenght >> 8) | 0x80); |
277,909 | private void loadRandomPacks(int version) {<NEW_LINE>String versionStr = prepareVersionStr(version, false);<NEW_LINE>java.util.List<String> packList;<NEW_LINE>String packNames;<NEW_LINE>String randomPrefs = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TOURNAMENT_PACKS_RANDOM_DRAFT + versionStr, "");<NEW_L... | = ExpansionRepository.instance.getWithBoostersSortedByReleaseDate(); |
86,512 | protected void handleCollision(PointList points, int index) {<NEW_LINE>Point start = points.getFirstPoint();<NEW_LINE>Point end = points.getLastPoint();<NEW_LINE>if (start.equals(end))<NEW_LINE>return;<NEW_LINE>Point midPoint = new Point((end.x + start.x) / 2, (end.y + start.y) / 2);<NEW_LINE>int position = end.getPosi... | = new Ray(end, start); |
1,005,686 | static Color[] terrain(int n, float alpha) {<NEW_LINE>int k = n / 2;<NEW_LINE>float[] H = { 4 / 12f, <MASK><NEW_LINE>float[] S = { 1f, 1f, 0f };<NEW_LINE>float[] V = { 0.65f, 0.9f, 0.95f };<NEW_LINE>Color[] palette = new Color[n];<NEW_LINE>float h = H[0];<NEW_LINE>float hw = (H[1] - H[0]) / (k - 1);<NEW_LINE>float s = ... | 2 / 12f, 0 / 12f }; |
129,966 | private void craft(Inventory inv, Block dispenser, Player p, Block b, ItemStack output) {<NEW_LINE>Inventory fakeInv = createVirtualInventory(inv);<NEW_LINE>Inventory outputInv = findOutputInventory(output, dispenser, inv, fakeInv);<NEW_LINE>if (outputInv != null) {<NEW_LINE>SlimefunItem sfItem = SlimefunItem.getByItem... | inv.getContents()[j]; |
384,620 | public void run(RegressionEnvironment env) {<NEW_LINE>Module module = new Module();<NEW_LINE>module.getItems().add(new ModuleItem("select * from NoSuchEvent"));<NEW_LINE>try {<NEW_LINE>env.getCompiler().syntaxValidate(module, null);<NEW_LINE>} catch (EPCompileException e) {<NEW_LINE>throw new RuntimeException(e);<NEW_L... | ).syntaxValidate(module, null); |
674,633 | private Mono<Response<Flux<ByteBuffer>>> createWithResponseAsync(String resourceGroupName, String clusterName, ClusterInner parameters, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot... | error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); |
289,074 | public Map<String, Object> toMap(final String filter) {<NEW_LINE>final Map<String, Object> map = new HashMap<>();<NEW_LINE>final String prefix = filter.substring(0, filter.indexOf(":"));<NEW_LINE>if ("dos".equals(prefix)) {<NEW_LINE>map.put("hidden", isHidden());<NEW_LINE>map.put("archive", isArchive());<NEW_LINE>map.p... | put("creationTime", creationTime()); |
300,230 | public void applyDayNightMode() {<NEW_LINE>MapActivity ctx = getMapActivity();<NEW_LINE>View mainView = getMainView();<NEW_LINE>View view = getView();<NEW_LINE>if (ctx == null || mainView == null || view == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>updateNightMode();<NEW_LINE>int dividerColorId = ColorUtilities.getD... | ViaSubView)).setTextColor(descriptionColor); |
956,243 | final DisassociateLensesResult executeDisassociateLenses(DisassociateLensesRequest disassociateLensesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(disassociateLensesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetri... | endClientExecution(awsRequestMetrics, request, response); |
1,041,810 | public emu.grasscutter.net.proto.SceneMonsterInfoOuterClass.SceneMonsterInfo buildPartial() {<NEW_LINE>emu.grasscutter.net.proto.SceneMonsterInfoOuterClass.SceneMonsterInfo result = new emu.grasscutter.net.proto.SceneMonsterInfoOuterClass.SceneMonsterInfo(this);<NEW_LINE>int from_bitField0_ = bitField0_;<NEW_LINE>resul... | .weaponList_ = weaponListBuilder_.build(); |
516,562 | public static GetCustomFieldsByTemplateIdResponse unmarshall(GetCustomFieldsByTemplateIdResponse getCustomFieldsByTemplateIdResponse, UnmarshallerContext _ctx) {<NEW_LINE>getCustomFieldsByTemplateIdResponse.setRequestId(_ctx.stringValue("GetCustomFieldsByTemplateIdResponse.RequestId"));<NEW_LINE>getCustomFieldsByTempla... | ("GetCustomFieldsByTemplateIdResponse.Data[" + i + "].IsRemember")); |
636,283 | public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {<NEW_LINE>Log.i(LOG_TAG, "Upgrading database from version " + oldVersion + " to " + newVersion);<NEW_LINE>Toast.makeText(GnuCashApplication.getAppContext(), "Upgrading GnuCash database", Toast.LENGTH_SHORT).show();<NEW_LINE>if (oldVersion > newVe... | RuntimeException(e.getTargetException()); |
243,846 | public static QueryAccountBillResponse unmarshall(QueryAccountBillResponse queryAccountBillResponse, UnmarshallerContext _ctx) {<NEW_LINE>queryAccountBillResponse.setRequestId(_ctx.stringValue("QueryAccountBillResponse.RequestId"));<NEW_LINE>queryAccountBillResponse.setCode(_ctx.stringValue("QueryAccountBillResponse.Co... | ("QueryAccountBillResponse.Data.Items[" + i + "].InvoiceDiscount")); |
1,261,869 | final DescribeLaunchTemplatesResult executeDescribeLaunchTemplates(DescribeLaunchTemplatesRequest describeLaunchTemplatesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeLaunchTemplatesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
1,088,360 | protected MultiHostDataSource createInnerDataSource() {<NEW_LINE>try {<NEW_LINE>List<Database> databases = cluster.getDatabases();<NEW_LINE>Map<HostSpec, DataSourceConfigure> dataSourceConfigs = new HashMap<>();<NEW_LINE>databases.forEach(database -> {<NEW_LINE>ConnectionString connString = database.getConnectionString... | , getClusterName()), ""); |
1,687,625 | private static void testJsMethods() {<NEW_LINE>assertTrue(callFunByA(new A<String>(), "abc").equals("abc"));<NEW_LINE>assertTrue(callFunByA(new B(), "def").equals("defabc"));<NEW_LINE>assertTrue(callFunByA(new C(), 1).equals(new Integer(6)));<NEW_LINE>assertTrue(callFunByA(new D(), 2).equals(new Integer(8)));<NEW_LINE>... | new F(), "abcd")); |
162,633 | public static void main(String[] args) {<NEW_LINE>Cache<Object, Object> l1Cache = CaffeineCacheBuilder.createCaffeineCacheBuilder().limit(100).expireAfterWrite(200, TimeUnit.SECONDS).keyConvertor(FastjsonKeyConvertor.INSTANCE).buildFunc(c -> new CaffeineCache((EmbeddedCacheConfig) c)).buildCache();<NEW_LINE>Cache<Objec... | multiLevelCache.put("K1", "V1"); |
1,500,124 | protected void updateView(@NotNull final P parameters) {<NEW_LINE>// Updating renderer<NEW_LINE>removeAll();<NEW_LINE>setLayout(new BorderLayout(parameters.tree().getCheckBoxRendererGap(), 0));<NEW_LINE>setEnabled(parameters.isCheckBoxEnabled());<NEW_LINE>setComponentOrientation(orientationForValue(parameters));<NEW_LI... | .tree().getActualRenderer(); |
1,272,677 | final GetFaceDetectionResult executeGetFaceDetection(GetFaceDetectionRequest getFaceDetectionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getFaceDetectionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
964,500 | private void registerEndpoint(ClassLoader loader) throws Exception {<NEW_LINE>//<NEW_LINE>// Convert J2EE deployment descriptor information into<NEW_LINE>// JAXRPC endpoint data structure<NEW_LINE>//<NEW_LINE>RuntimeEndpointInfo endpointInfo = rpcFactory_.createRuntimeEndpointInfo();<NEW_LINE>Class serviceEndpointInter... | String tieClassName = endpoint_.getTieClassName(); |
1,185,748 | public // TODO add to generic DistanceCalculator and develop geo versions.<NEW_LINE>double distanceToLineSegment(Point point, double vX, double vY, double wX, double wY) {<NEW_LINE>// Translated from: http://bl.ocks.org/mbostock/4218871<NEW_LINE>double d = distanceSquared(vX, vY, wX, wY);<NEW_LINE>double toX;<NEW_LINE>... | + t * (wX - vX); |
1,646,707 | public void updateTile() {<NEW_LINE>super.updateTile();<NEW_LINE>if (bulletLife > 0 && bullet != null) {<NEW_LINE>wasShooting = true;<NEW_LINE>tr.trns(rotation, shootLength, 0f);<NEW_LINE>bullet.rotation(rotation);<NEW_LINE>bullet.set(x + tr.x, y + tr.y);<NEW_LINE>bullet.time(0f);<NEW_LINE>heat = 1f;<NEW_LINE>recoil = ... | (size * tilesize / 2f)); |
329,010 | private void addNotification(final JSONObject requestJSONObject) throws RepositoryException {<NEW_LINE>final JSONObject notification = new JSONObject();<NEW_LINE>notification.put(Notification.NOTIFICATION_HAS_READ, false);<NEW_LINE>notification.put(Notification.NOTIFICATION_USER_ID, requestJSONObject.optString(Notifica... | put(Common.COMMAND, "refreshNotification"); |
355,129 | public void write(ByteBuf output, Chunk chunk) throws Exception {<NEW_LINE>output.writeInt(chunk.getX());<NEW_LINE>output.<MASK><NEW_LINE>output.writeBoolean(chunk.isFullChunk());<NEW_LINE>Type.VAR_INT.writePrimitive(output, chunk.getBitmask());<NEW_LINE>Type.NBT.write(output, chunk.getHeightMap());<NEW_LINE>// Write b... | writeInt(chunk.getZ()); |
53,889 | private I_GO_DeliveryOrder toDeliveryOrderPO(@NonNull final DeliveryOrder order) {<NEW_LINE>I_GO_DeliveryOrder orderPO = null;<NEW_LINE>if (order.getId() != null) {<NEW_LINE>orderPO = InterfaceWrapperHelper.load(order.getId(), I_GO_DeliveryOrder.class);<NEW_LINE>}<NEW_LINE>final OrderId orderId = order.getOrderId();<NE... | setGO_CustomerReference(order.getCustomerReference()); |
1,093,812 | protected CompletableFuture<? extends Response> execute(long queryStartNanoTime) {<NEW_LINE>String cqlVersion = options.get(CQL_VERSION);<NEW_LINE>if (cqlVersion == null)<NEW_LINE>throw new ProtocolException("Missing value CQL_VERSION in STARTUP message");<NEW_LINE>try {<NEW_LINE>if (new CassandraVersion(cqlVersion).co... | options.get(DRIVER_VERSION))); |
1,367,643 | public void deleteUserChannelHistory(final TLRPC.Chat chat, long userId, int offset) {<NEW_LINE>if (offset == 0) {<NEW_LINE>getMessagesStorage().deleteUserChatHistory(chat.id, userId);<NEW_LINE>}<NEW_LINE>TLRPC.TL_channels_deleteParticipantHistory req = new TLRPC.TL_channels_deleteParticipantHistory();<NEW_LINE>req.cha... | res = (TLRPC.TL_messages_affectedHistory) response; |
928,188 | private ClassFile make() throws CannotCompileException {<NEW_LINE>ClassFile cf = new ClassFile(false, classname, superName);<NEW_LINE>cf.setAccessFlags(AccessFlag.PUBLIC);<NEW_LINE>setInterfaces(cf, interfaces, hasGetHandler ? Proxy.class : ProxyObject.class);<NEW_LINE>ConstPool pool = cf.getConstPool();<NEW_LINE>// le... | cf, pool, classname, forwarders); |
245,138 | private void killTimedOutFrames(HostReport report) {<NEW_LINE>final Map<String, LayerDetail> layers = new HashMap<String, LayerDetail>(5);<NEW_LINE>for (RunningFrameInfo frame : report.getFramesList()) {<NEW_LINE><MASK><NEW_LINE>LayerDetail layer = layerDao.getLayerDetail(layerId);<NEW_LINE>long runtimeMinutes = ((Syst... | String layerId = frame.getLayerId(); |
1,027,756 | public static ImportDoNotCallNumbersResponse unmarshall(ImportDoNotCallNumbersResponse importDoNotCallNumbersResponse, UnmarshallerContext _ctx) {<NEW_LINE>importDoNotCallNumbersResponse.setRequestId(_ctx.stringValue("ImportDoNotCallNumbersResponse.RequestId"));<NEW_LINE>importDoNotCallNumbersResponse.setCode(_ctx.stri... | = new ArrayList<String>(); |
1,182,457 | public List<Component> defineLocalComponents() {<NEW_LINE>List<Component> all = new ArrayList<Component>();<NEW_LINE>all.add(A(DefaultMessageDumperManager.class));<NEW_LINE>all.add(A(DefaultMessageFinderManager.class));<NEW_LINE>all.add(A(DefaultMessageDumper.class));<NEW_LINE>all.add(A(DefaultMessageProcessor.class));... | (A(LocalBucket.class)); |
689,258 | @Override<NEW_LINE>public AuthenticationDetails login(Credentials credentials) throws LoginException {<NEW_LINE>if (!(credentials instanceof AnonymousUserCredentials)) {<NEW_LINE>throw new ClassCastException("Credentials cannot be cast to AnonymousUserCredentials");<NEW_LINE>}<NEW_LINE>AnonymousUserCredentials anonymou... | setAddress(anonymousCredentials.getIpAddress()); |
423,718 | public void actionPerformed(ActionEvent e) {<NEW_LINE>UIHelper uiHelper = new UIHelper(owlEditorKit);<NEW_LINE>Set<OWLOntology> ontologies = uiHelper.pickOWLOntologies();<NEW_LINE>for (OWLOntology ont : ontologies) {<NEW_LINE>// @@TODO what about anonymous ontologies?<NEW_LINE>String uriString = ont.getOntologyID().get... | ).addMapping(prefix, uriString); |
1,084,518 | public void write(DataOutput dataOutput) throws IOException {<NEW_LINE>if (iterators != null) {<NEW_LINE>dataOutput.writeInt(iterators.size());<NEW_LINE>for (IteratorSetting setting : getIterators()) setting.write(dataOutput);<NEW_LINE>} else {<NEW_LINE>dataOutput.writeInt(0);<NEW_LINE>}<NEW_LINE>if (ranges != null) {<... | writeInt(columns.size()); |
545,480 | private void initHttpsRelatedSettings(Map<String, String> agentConfig) {<NEW_LINE>// keystore<NEW_LINE>keystore = agentConfig.get("keystore");<NEW_LINE>caCert = agentConfig.get("caCert");<NEW_LINE>serverCert = agentConfig.get("serverCert");<NEW_LINE><MASK><NEW_LINE>secureSocketProtocol = agentConfig.get("secureSocketPr... | serverKey = agentConfig.get("serverKey"); |
564,234 | private JMethod addInternalGetMethodJava6(JDefinedClass jclass, JsonNode propertiesNode) {<NEW_LINE>JMethod method = jclass.method(PROTECTED, jclass.owner()._ref(Object.class), DEFINED_GETTER_NAME);<NEW_LINE>JVar nameParam = method.param(String.class, "name");<NEW_LINE>JVar notFoundParam = method.param(jclass.owner()._... | String propertyName = property.getKey(); |
301,210 | protected void initUi() {<NEW_LINE>buttonShowView = new JToggleButton(DisplayUtils.getScaledIcon(new ImageIcon(RequestSplitComponent.class.getResource("/resource/icon/view_split.png"))));<NEW_LINE>buttonShowView.setToolTipText(BUTTON_TOOL_TIP);<NEW_LINE>panelOptions = new JPanel();<NEW_LINE>panelOptions.add(headerViews... | add(splitMain, BorderLayout.CENTER); |
785,113 | private void refreshAsgLastChangeTime() {<NEW_LINE>regionToAsgToLastChangeTime.clear();<NEW_LINE>for (String region : regions) {<NEW_LINE>LOGGER.info(String.format("Getting ASG last change time in region %s", region));<NEW_LINE>Map<String, Long> asgToLastChangeTime = regionToAsgToLastChangeTime.get(region);<NEW_LINE>if... | regionToAsgToLastChangeTime.put(region, asgToLastChangeTime); |
1,369,773 | final UpdateRoomResult executeUpdateRoom(UpdateRoomRequest updateRoomRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateRoomRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
148,113 | final DeleteModelBiasJobDefinitionResult executeDeleteModelBiasJobDefinition(DeleteModelBiasJobDefinitionRequest deleteModelBiasJobDefinitionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteModelBiasJobDefinitionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContex... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
496,996 | private static Map<TypeAlias, jnr.ffi.NativeType> buildTypeMap() {<NEW_LINE>Map<TypeAlias, jnr.ffi.NativeType> m = new EnumMap<TypeAlias, NativeType>(TypeAlias.class);<NEW_LINE>m.put(TypeAlias.int8_t, NativeType.SCHAR);<NEW_LINE>m.put(TypeAlias.u_int8_t, NativeType.UCHAR);<NEW_LINE>m.put(TypeAlias.int16_t, NativeType.S... | TypeAlias.mode_t, NativeType.UINT); |
217,139 | public void onRequestFinish(MegaApiJava api, MegaRequest request, MegaError e) {<NEW_LINE>logDebug("Downloading thumbnail finished");<NEW_LINE>final long handle = request.getNodeHandle();<NEW_LINE>String handleBase64 = MegaApiJava.handleToBase64(handle);<NEW_LINE>if (e.getErrorCode() == MegaError.API_OK) {<NEW_LINE>log... | holderGrid = (MegaExplorerAdapter.ViewHolderGridExplorer) holder; |
581,309 | public U map(AtmosphereRequest req, Map<String, U> handlers) {<NEW_LINE>String path = computePath(req);<NEW_LINE>U handler = map(path, handlers);<NEW_LINE>if (handler == null) {<NEW_LINE>// (2) First, try exact match<NEW_LINE>handler = map(path + (path.endsWith("/") ? "all" : "/all"), handlers);<NEW_LINE>if (handler ==... | map(path + "*", handlers); |
1,605,819 | public void formerSerialize(ByteBuffer buffer) {<NEW_LINE>buffer.put((byte) PhysicalPlanType.CREATE_ALIGNED_TIMESERIES.ordinal());<NEW_LINE>byte[] bytes = prefixPath.getFullPath().getBytes();<NEW_LINE>buffer.putInt(bytes.length);<NEW_LINE>buffer.put(bytes);<NEW_LINE>ReadWriteIOUtils.write(measurements.size(), buffer);<... | ReadWriteIOUtils.write(measurement, buffer); |
1,083,896 | public TrialComponentParameterValue unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>TrialComponentParameterValue trialComponentParameterValue = new TrialComponentParameterValue();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth =... | int originalDepth = context.getCurrentDepth(); |
915,628 | protected ActivityInstanceImpl createActivityInstance(PvmExecutionImpl scopeExecution, ScopeImpl scope, String activityInstanceId, String parentActivityInstanceId, Map<String, List<Incident>> incidentsByExecution) {<NEW_LINE>ActivityInstanceImpl actInst = new ActivityInstanceImpl();<NEW_LINE>actInst.setId(activityInsta... | setProcessInstanceId(scopeExecution.getProcessInstanceId()); |
1,688,550 | public void serializeMap(GenerationContext context, MapShape shape) {<NEW_LINE>TypeScriptWriter writer = context.getWriter();<NEW_LINE>Shape target = context.getModel().expectShape(shape.<MASK><NEW_LINE>SymbolProvider symbolProvider = context.getSymbolProvider();<NEW_LINE>// Get the right serialization for each entry i... | getValue().getTarget()); |
497,731 | private int encodeSurrogate(char c, CharSequence in, int pos, int hi) {<NEW_LINE>int dword;<NEW_LINE>if (Character.isHighSurrogate(c)) {<NEW_LINE>if (hi - pos < 1) {<NEW_LINE>putByte('?');<NEW_LINE>return pos;<NEW_LINE>} else {<NEW_LINE>char c2 = in.charAt(pos++);<NEW_LINE>if (Character.isLowSurrogate(c2)) {<NEW_LINE>d... | 240 | dword >> 18)); |
1,243,093 | public void visitCodeAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute) {<NEW_LINE>// Evaluate the method.<NEW_LINE>if (runPartialEvaluator) {<NEW_LINE>partialEvaluator.visitCodeAttribute(clazz, method, codeAttribute);<NEW_LINE>}<NEW_LINE>int codeLength = codeAttribute.u4codeLength;<NEW_LINE>// Initiali... | ensureArraySize(instanceReturned, codeLength, false); |
675,344 | public ListLayerVersionsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListLayerVersionsResult listLayerVersionsResult = new ListLayerVersionsResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken... | String currentParentElement = context.getCurrentParentElement(); |
425,833 | public void paintIcon(Component c, Graphics g, int x, int y) {<NEW_LINE>g.translate(x, y);<NEW_LINE>Graphics2D g2 = (Graphics2D) g;<NEW_LINE>g2.setStroke(STROKE);<NEW_LINE>g2.setColor(OWLSystemColors.getForegroundColor());<NEW_LINE>g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);... | BASE_SIZE - 6, BASE_SIZE - 6); |
1,205,749 | private List<Source> buildEventSources(AlarmMessage msg) {<NEW_LINE>final List<Source> sources = new ArrayList<>(2);<NEW_LINE>final Source.SourceBuilder sourcePrototype = Source.builder();<NEW_LINE>switch(msg.getScopeId()) {<NEW_LINE>case DefaultScopeDefine.SERVICE_RELATION:<NEW_LINE>final IDManager.ServiceID.ServiceID... | getServiceId()).getName(); |
1,666,867 | public void checkPoint(LogCheckPointEvent logCheckPointEvent, LogPosition logPosition, Instant checkpointTime, String reason) throws IOException {<NEW_LINE>if (checkpointWriter == null) {<NEW_LINE>// we were not started but on a failure path someone tried to shutdown everything with checkpoint.<NEW_LINE>log.warn("Check... | databaseHealth.assertHealthy(IOException.class); |
1,237,299 | protected void addFeeInfoGroup() {<NEW_LINE>// don't increase gridRow as we removed button when this gets visible<NEW_LINE>feeInfoTitledGroupBg = addTitledGroupBg(gridPane, gridRow, 2, Res.get("bsqSwapOffer.amounts.headline"), Layout.COMPACT_GROUP_DISTANCE);<NEW_LINE>feeInfoTitledGroupBg.getStyleClass().add("last");<NE... | setOnAction(e -> onAction()); |
457,816 | private static void deployOfficial(ApplicationServer applicationServer, HandlerList handlers, List<ClassInfo> officialClassInfos) {<NEW_LINE>officialClassInfos.parallelStream().forEach(info -> {<NEW_LINE>try {<NEW_LINE>Class<?> clz = Class.forName(info.getName());<NEW_LINE>Path war = Paths.get(Config.dir_store().toStri... | new FilterHolder(new DenialOfServiceFilter()); |
520,169 | final CreateLensVersionResult executeCreateLensVersion(CreateLensVersionRequest createLensVersionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createLensVersionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.st... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
1,850,885 | private void fetchAttributes() throws AuthException {<NEW_LINE>try (SFTPConnectionHandler connHandler = (SFTPConnectionHandler) ConnectionPool.getConnectionHandler(SFTPFile.connHandlerFactory, url, true)) {<NEW_LINE>// Makes sure the connection is started, if not starts it<NEW_LINE>connHandler.checkConnection();<NEW_LI... | url.getPath(), e); |
220,766 | protected void initScene() {<NEW_LINE>PointLight pointLight = new PointLight();<NEW_LINE>pointLight.setPower(1);<NEW_LINE>pointLight.setPosition(-1, 1, 4);<NEW_LINE>getCurrentScene().addLight(pointLight);<NEW_LINE>try {<NEW_LINE>Texture earthTexture = new Texture("earthDiffuseTex", R.drawable.earth_diffuse);<NEW_LINE>M... | getCurrentCamera().setZ(6); |
933,111 | private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, String name, ContainerAppInner containerAppEnvelope, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is req... | error(new IllegalArgumentException("Parameter containerAppEnvelope is required and cannot be null.")); |
1,764,167 | private void loadLogAlertTemplate() {<NEW_LINE>final long now = clock.getTicks();<NEW_LINE>if (location == null || location.isEmpty()) {<NEW_LINE>location = DEFAULT_ALERT_TPT_FILE;<NEW_LINE>}<NEW_LINE>// location may contain dollar expressions<NEW_LINE>location = alertTemplate.parseEnv(location, now).toString();<NEW_LI... | parse(sink, now, properties); |
691,857 | public boolean added(Program program, AddressSetView set, TaskMonitor monitor, MessageLog log) throws CancelledException {<NEW_LINE>set = removeUninitializedBlock(program, set);<NEW_LINE>try {<NEW_LINE>// first split out all the function locations, make those the starts<NEW_LINE>// remove those from the bodies from the... | analyzeSet(program, unanalyzedSet, monitor); |
446,587 | private void instrumentRecursively(Instrumenter instr, Path root) throws IOException {<NEW_LINE>Files.walkFileTree(root, new SimpleFileVisitor<Path>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {<NEW_LINE>if (!file.getFileName().toSt... | output, file.toString()); |
102,791 | public ProducerRecord<byte[], byte[]> readMessage() {<NEW_LINE>try {<NEW_LINE>String line = reader.readLine();<NEW_LINE>if (line == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (!parseKey) {<NEW_LINE>T <MASK><NEW_LINE>byte[] serializedValue = serializer.serialize(valueSubject, topic, false, value, valueSchema);... | value = readFrom(line, valueSchema); |
637,673 | protected JSModuleRecord loadModuleFromUrl(ScriptOrModule referrer, ModuleRequest moduleRequest, TruffleFile maybeModuleFile, TruffleString maybeCanonicalPath) throws IOException {<NEW_LINE>JSModuleRecord existingModule;<NEW_LINE>TruffleFile moduleFile;<NEW_LINE>TruffleString canonicalPath;<NEW_LINE>if (maybeCanonicalP... | ).envParseModule(realm, source); |
1,769 | private List<String> translateCoordinates(String command, GcodeState state) throws GcodeParserException {<NEW_LINE>List<GcodeParser.GcodeMeta> gcodeMetas = GcodeParserUtils.processCommand(command, 0, state);<NEW_LINE>if (!isMovement(gcodeMetas)) {<NEW_LINE>return Collections.singletonList(command);<NEW_LINE>}<NEW_LINE>... | point().getPositionIn(currentUnits); |
328,719 | public void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext) {<NEW_LINE>Span span = (<MASK><NEW_LINE>if (null == span) {<NEW_LINE>// not tracing<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (requestContext.getProperty(SPAN_FINISHED_PROPERTY) != null) {<NEW_LINE>if (DOUBLE_FINISH_LOGGE... | Span) requestContext.getProperty(SPAN_PROPERTY); |
1,009,308 | private static WorkerMetaInfoProto buildWorkerMetaProto(AMWorker worker) {<NEW_LINE>WorkerMetaInfoProto.Builder builder = WorkerMetaInfoProto.newBuilder();<NEW_LINE><MASK><NEW_LINE>WorkerAttemptIdProto workerAttemptIdProto = convertToIdProto(attempt.getId());<NEW_LINE>Location location = attempt.getLocation();<NEW_LINE... | WorkerAttempt attempt = worker.getRunningAttempt(); |
595,927 | public void initialize(@NonNull final Context activityContext, final AWSConfiguration awsConfig) {<NEW_LINE>this.context = activityContext;<NEW_LINE>this.awsConfiguration = awsConfig;<NEW_LINE>Log.d(LOG_TAG, "Initializing Google SDK...");<NEW_LINE>try {<NEW_LINE>GoogleSignInProvider.setPermissions(this.awsConfiguration... | Log.d(LOG_TAG, "Connected to the Google SignIn API Client."); |
74,234 | private Flow convertAzkabanFlowToFlow(final AzkabanFlow azkabanFlow, final String flowName, final File flowFile) {<NEW_LINE>final <MASK><NEW_LINE>flow.setAzkabanFlowVersion(Constants.AZKABAN_FLOW_VERSION_2_0);<NEW_LINE>final Props props = azkabanFlow.getProps();<NEW_LINE>FlowLoaderUtils.addEmailPropsToFlow(flow, props)... | Flow flow = new Flow(flowName); |
102,639 | protected static void constructM(List<Point2D_F64> obsPts, DMatrixRMaj alphas, DMatrixRMaj M) {<NEW_LINE><MASK><NEW_LINE>M.reshape(3 * alphas.numCols, 2 * N, false);<NEW_LINE>for (int i = 0; i < N; i++) {<NEW_LINE>Point2D_F64 p2 = obsPts.get(i);<NEW_LINE>int row = i * 2;<NEW_LINE>for (int j = 0; j < alphas.numCols; j++... | int N = obsPts.size(); |
13,049 | public ApiResponse<Object> keyInHeaderWithHttpInfo() throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/header";<NEW_LINE>// query params<NEW_LINE>List<Pair> localVarQueryParams = new ArrayList<Pair>();<NEW_LINE>Map<String, String> l... | String[] localVarAccepts = { "application/json" }; |
29,427 | protected void internalReceiveCommand(String itemName, Command command) {<NEW_LINE>logger.<MASK><NEW_LINE>HorizonBindingProvider horizonBindingProvider = findFirstMatchingBindingProvider(itemName, command);<NEW_LINE>String horizonKeyWithHorizonId = horizonBindingProvider.getHorizonCommand(itemName, command.toString());... | debug("internalReceiveCommand({},{}) is called!", itemName, command); |
1,563,206 | protected Context makeContext() {<NEW_LINE>final <MASK><NEW_LINE>cx.setLanguageVersion(Context.VERSION_ES6);<NEW_LINE>cx.setLocale(browserVersion_.getBrowserLocale());<NEW_LINE>// make sure no java classes are usable from js<NEW_LINE>cx.setClassShutter(fullClassName -> {<NEW_LINE>final Map<String, String> activeXObject... | TimeoutContext cx = new TimeoutContext(this); |
81,298 | public boolean allocateIt() {<NEW_LINE>// Create invoice Allocation - See also MCash.completeIt<NEW_LINE>if (getC_Invoice_ID() > 0) {<NEW_LINE>return allocateInvoice();<NEW_LINE>}<NEW_LINE>if (getC_Order_ID() != 0) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// Allocate to multiple Payments based on entry<NEW_LINE>fin... | alloc.processIt(IDocument.ACTION_Complete); |
1,089,446 | public CompletableFuture<Page<NamedBlobRecord>> list(String accountName, String containerName, String blobNamePrefix, String pageToken) {<NEW_LINE>return executeTransactionAsync(accountName, containerName, true, (accountId, containerId, connection) -> {<NEW_LINE>try (PreparedStatement statement = connection.prepareStat... | "LIST: Blob deleted, ignoring in list response; account='{}', container='{}', name='{}'", accountName, containerName, blobName); |
141,654 | public ListAssistantAssociationsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListAssistantAssociationsResult listAssistantAssociationsResult = new ListAssistantAssociationsResult();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int t... | int originalDepth = context.getCurrentDepth(); |
623,893 | public void init(Properties properties, String topic, String groupId) {<NEW_LINE>this.nameServer = PropertiesUtils.getProperty(properties, "rabbitmq.host");<NEW_LINE>this.vhost = PropertiesUtils.getProperty(properties, "rabbitmq.virtual.host");<NEW_LINE>this.queueName = topic;<NEW_LINE>this.accessKey = PropertiesUtils.... | properties.get(RabbitMQConstants.RABBITMQ_RESOURCE_OWNERID); |
1,143,808 | private JPanel buildConfigPanel() {<NEW_LINE>scopeDropdownLabel.setToolTipText(CheckStyleBundle.message("config.scanscope.tooltip"));<NEW_LINE>scopeDropdown.setToolTipText(CheckStyleBundle.message("config.scanscope.tooltip"));<NEW_LINE>suppressErrorsCheckbox.setText(CheckStyleBundle.message("config.suppress-errors.chec... | (CheckStyleBundle.message("config.stabilize-classpath.tooltip")); |
676,405 | public BundleOrderItem createBundleOrderItem(final BundleOrderItemRequest itemRequest) {<NEW_LINE>final BundleOrderItem item = (BundleOrderItem) orderItemDao.create(OrderItemType.BUNDLE);<NEW_LINE>item.setQuantity(itemRequest.getQuantity());<NEW_LINE>item.setCategory(itemRequest.getCategory());<NEW_LINE>item.setName(it... | setBaseRetailPrice(itemRequest.getRetailPriceOverride()); |
970,635 | private void resize() {<NEW_LINE>Border border = getBorder();<NEW_LINE>int aw, ah;<NEW_LINE>if (border != null) {<NEW_LINE>Insets insets = border.getBorderInsets(this);<NEW_LINE>aw <MASK><NEW_LINE>ah = insets.top + insets.bottom;<NEW_LINE>basex = insets.left;<NEW_LINE>basey = insets.top;<NEW_LINE>} else {<NEW_LINE>aw =... | = insets.left + insets.right; |
1,084,946 | protected StateFactory init(ExpressionExecutor[] attributeExpressionExecutors, ConfigReader configReader, SiddhiQueryContext siddhiQueryContext) {<NEW_LINE>if (attributeExpressionExecutors.length != 2) {<NEW_LINE>throw new SiddhiAppValidationException("Invalid no of arguments passed to common:cast() function, " + "requ... | throw new SiddhiAppValidationException("Type must be one of int, long, float, double, bool, " + "string"); |
489,336 | @NoCache<NEW_LINE>@Consumes(MediaType.APPLICATION_JSON)<NEW_LINE>public Response newExecutionConfig(@PathParam("executionId") String execution, AuthenticatorConfigRepresentation json) {<NEW_LINE>auth.realm().requireManageRealm();<NEW_LINE>ReservedCharValidator.validate(json.getAlias());<NEW_LINE>AuthenticationExecution... | model = realm.getAuthenticationExecutionById(execution); |
1,133,625 | public PsiElementVisitor buildVisitor(@NotNull final ProblemsHolder holder, final boolean isOnTheFly, @NotNull final LocalInspectionToolSession session) {<NEW_LINE>final PsiFile file = holder.getFile();<NEW_LINE>final VirtualFile virtualFile = file.getVirtualFile();<NEW_LINE>final Project project = holder.getProject();... | unquoteString(value.getText()); |
840,881 | private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String labName, String scheduleName, 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... | error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); |
468,691 | final ListThemesResult executeListThemes(ListThemesRequest listThemesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listThemesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListThemes"); |
1,565,306 | protected Optional<StockMove> createStockMove(SaleOrder saleOrder, LocalDate estimatedDeliveryDate, List<SaleOrderLine> saleOrderLineList) throws AxelorException {<NEW_LINE>StockMove stockMove = this.createStockMove(saleOrder, saleOrder.getCompany(), estimatedDeliveryDate);<NEW_LINE>stockMove.setDeliveryCondition(saleO... | boolean isNeedingConformityCertificate = saleOrder.getIsNeedingConformityCertificate(); |
1,441,510 | public Order placeOrder(Order body) throws ApiException {<NEW_LINE>Object localVarPostBody = body;<NEW_LINE>// verify the required parameter 'body' is set<NEW_LINE>if (body == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'body' when calling placeOrder");<NEW_LINE>}<NEW_LINE>// create pat... | = new ArrayList<Pair>(); |
490,674 | public void encodeValues(Buffer valueBuffer, List<JoinMemoryBo> joinMemoryBoList) {<NEW_LINE>if (CollectionUtils.isEmpty(joinMemoryBoList)) {<NEW_LINE>throw new IllegalArgumentException("MemoryBoList must not be empty");<NEW_LINE>}<NEW_LINE>final int numValues = joinMemoryBoList.size();<NEW_LINE>valueBuffer.putVInt(num... | = new ArrayList<>(numValues); |
1,113,701 | public String inferBinaryName(@NonNull final JavaFileManager.Location location, @NonNull final JavaFileObject javaFileObject) {<NEW_LINE>checkSingleOwnerThread();<NEW_LINE>try {<NEW_LINE>assert javaFileObject != null;<NEW_LINE>// If cached return it dirrectly<NEW_LINE>if (javaFileObject == lastInfered) {<NEW_LINE>retur... | final InferableJavaFileObject ifo = (InferableJavaFileObject) javaFileObject; |
1,359,223 | public DataLakeFileSystemClientBuilder endpoint(String endpoint) {<NEW_LINE>// Ensure endpoint provided is dfs endpoint<NEW_LINE>endpoint = DataLakeImplUtils.endpointToDesiredEndpoint(endpoint, "dfs", "blob");<NEW_LINE>blobContainerClientBuilder.endpoint(DataLakeImplUtils.endpointToDesiredEndpoint<MASK><NEW_LINE>try {<... | (endpoint, "blob", "dfs")); |
1,399,432 | /* Build call for subscriptionsBlockSubscriptionPost */<NEW_LINE>private com.squareup.okhttp.Call subscriptionsBlockSubscriptionPostCall(String subscriptionId, String blockState, String ifMatch, String ifUnmodifiedSince, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressReq... | String[] localVarContentTypes = { "application/json" }; |
331,707 | private JPanel buildOutgoingConfigurationsTab() {<NEW_LINE>outgoingWssTable = JTableFactory.getInstance().makeJTable(new OutgoingWssTableModel());<NEW_LINE>outgoingWssTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {<NEW_LINE><NEW_LINE>public void valueChanged(ListSelectionEvent e) {<NEW_... | getViewport().add(entriesList); |
1,275,858 | public void createPartControl(Composite parent) {<NEW_LINE>Composite composite = new Composite(parent, SWT.NONE);<NEW_LINE>composite.setLayout(new GridLayout(1, true));<NEW_LINE>text = new StyledText(composite, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL);<NEW_LINE>text.setLayoutData(new GridData(GridData.FILL... | (Activator.getImage("icons/grid.jpg")); |
630,323 | public TopDocs drillDown(DoubleRange range) throws IOException {<NEW_LINE>// Passing no baseQuery means we drill down on all<NEW_LINE>// documents ("browse only"):<NEW_LINE>DrillDownQuery q = new DrillDownQuery(null);<NEW_LINE>final DoubleValuesSource vs = getDistanceValueSource();<NEW_LINE>q.add("field", range.getQuer... | search(q, 10).hits; |
1,156,809 | private static void draw(PoseStack transform, MultiBufferSource buffer, int x, int y, int width, int height, int red, int green, int blue) {<NEW_LINE>VertexConsumer builder = buffer.getBuffer(IERenderTypes.ITEM_DAMAGE_BAR);<NEW_LINE>transform.pushPose();<NEW_LINE>transform.translate(x, y, 0);<NEW_LINE>Matrix4f mat = tr... | .last().pose(); |
149,415 | private void jbInit() throws Exception {<NEW_LINE>loadData.setImage(ITheme.MENU_PROCESS_IMAGE);<NEW_LINE>loadData.addActionListener(this);<NEW_LINE>//<NEW_LINE>Charset[] charsets = Ini.getAvailableCharsets();<NEW_LINE>for (int i = 0; i < charsets.length; i++) {<NEW_LINE>fCharset.appendItem(charsets[i].displayName(), ch... | addEventListener(Events.ON_CLICK, this); |
1,409,652 | private final ContextEnumerator contexts(Ordering ordering, OpApplNode appl, Context c, TLCState s0, TLCState s1, final int control, CostModel cm) {<NEW_LINE>FormalParamNode[][<MASK><NEW_LINE>boolean[] isTuples = appl.isBdedQuantATuple();<NEW_LINE>ExprNode[] domains = appl.getBdedQuantBounds();<NEW_LINE>int flen = form... | ] formals = appl.getBdedQuantSymbolLists(); |
96,559 | public void updateRemainder(byte[] bytes, int pos, int size_mod32) {<NEW_LINE>if (pos < 0) {<NEW_LINE>throw new IllegalArgumentException(String.format("Pos (%s) must be positive", pos));<NEW_LINE>}<NEW_LINE>if (size_mod32 < 0 || size_mod32 >= 32) {<NEW_LINE>throw new IllegalArgumentException(String.format("size_mod32 (... | bytes[pos + remainder + 0]; |
46,773 | private String asArgument(Class<?> cl, String name) {<NEW_LINE>if (cl.isPrimitive()) {<NEW_LINE>if (Boolean.TYPE == cl) {<NEW_LINE>return name + "==null?false:((Boolean)" + name + ").booleanValue()";<NEW_LINE>}<NEW_LINE>if (Byte.TYPE == cl) {<NEW_LINE>return name + "==null?(byte)0:((Byte)" + name + ").byteValue()";<NEW... | return name + "==null?(short)0:((Short)" + name + ").shortValue()"; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.