idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
242,525 | public void onReceive(Context context, Intent intent) {<NEW_LINE>final String action = intent.getAction();<NEW_LINE>// Only listen for Bluetooth server changes<NEW_LINE>if (action.equals(BluetoothAdapter.ACTION_STATE_CHANGED)) {<NEW_LINE>final int state = intent.getIntExtra(<MASK><NEW_LINE>final int oldState = intent.g... | BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.ERROR); |
1,062,788 | public E relaxedPeek() {<NEW_LINE>final int chunkMask = this.chunkMask;<NEW_LINE>final int chunkShift = this.chunkShift;<NEW_LINE>final long cIndex = this.lvConsumerIndex();<NEW_LINE>final int ciChunkOffset = (int) (cIndex & chunkMask);<NEW_LINE>final long ciChunkIndex = cIndex >> chunkShift;<NEW_LINE>MpmcUnboundedXadd... | > consumerBuffer = this.lvConsumerChunk(); |
1,474,052 | public void loadLayout(DockLayout layout) {<NEW_LINE>if (layout == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>List<DockContent> currentContents = getContents();<NEW_LINE>currentContents.forEach(c <MASK><NEW_LINE>// Close current popouts<NEW_LINE>applyToPopoutsSafe(p -> closePopout(p));<NEW_LINE>for (DockLayoutPopout ... | -> c.setDockParent(null)); |
70,240 | private static void removeTrackerPeerSources(List<TrackerPeerSource> list) {<NEW_LINE>int numLeft = list.size();<NEW_LINE>if (numLeft == 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>TrackerPeerSource toRemove = list.get(0);<NEW_LINE>if (toRemove == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>MessageBoxShell mb = new Mess... | [] { "" + numLeft }); |
411,221 | public void center_display(Point2D p_new_center) {<NEW_LINE>java.awt<MASK><NEW_LINE>java.awt.geom.Point2D new_center = get_viewport_center();<NEW_LINE>java.awt.Point new_mouse_location = new java.awt.Point((int) (new_center.getX() - delta.getX()), (int) (new_center.getY() - delta.getY()));<NEW_LINE>move_mouse(new_mouse... | .Point delta = set_viewport_center(p_new_center); |
112,102 | public static void applyStyledFormat(StyledText text, String sql) {<NEW_LINE>if (StringUtil.isEmpty(sql))<NEW_LINE>return;<NEW_LINE>text.setText(sql);<NEW_LINE>text.addLineStyleListener(new LineStyleListener() {<NEW_LINE><NEW_LINE>public void lineGetStyle(LineStyleEvent event) {<NEW_LINE>String line = event.lineText;<N... | StringUtil.tokenizer(line, " \n\r\f\t()+*/-=<>'`\"[],"); |
1,320,423 | public void detectModifiedOutputFiles(ModifiedFileSet modifiedOutputFiles, @Nullable Range<Long> lastExecutionTimeRange, boolean trustRemoteArtifacts, int fsvcThreads) throws InterruptedException {<NEW_LINE>long startTime = System.nanoTime();<NEW_LINE>FilesystemValueChecker fsvc = new FilesystemValueChecker(Preconditio... | ofNanos(duration) : Duration.ZERO; |
1,359,514 | public static QueryClusterDetailResponse unmarshall(QueryClusterDetailResponse queryClusterDetailResponse, UnmarshallerContext _ctx) {<NEW_LINE>queryClusterDetailResponse.setRequestId(_ctx.stringValue("QueryClusterDetailResponse.RequestId"));<NEW_LINE>queryClusterDetailResponse.setMessage(_ctx.stringValue("QueryCluster... | (_ctx.stringValue("QueryClusterDetailResponse.Data.PayInfo")); |
934,603 | private void describeNewTitle(@NonNull DecryptedGroupChange change, @NonNull List<UpdateDescription> updates) {<NEW_LINE>boolean editorIsYou = change.getEditor().equals(selfUuidBytes);<NEW_LINE>if (change.hasNewTitle()) {<NEW_LINE>String newTitle = StringUtil.isolateBidi(change.getNewTitle().getValue());<NEW_LINE>if (e... | , R.drawable.ic_update_group_name_16)); |
544,307 | public void run(FlowTrigger trigger, Map data) {<NEW_LINE>try {<NEW_LINE>String filename = "input-json";<NEW_LINE>new JsonParser().parse(jsonContent);<NEW_LINE>List<ErrorCodeElaboration> errs = JSONObjectUtil.toCollection(jsonContent, ArrayList.class, ErrorCodeElaboration.class);<NEW_LINE>contents.put(filename, errs);<... | .InValidJsonArraySchema.toString())); |
752,803 | public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {<NEW_LINE>View root = UiUtilities.getInflater(inflater.getContext(), nightMode).inflate(R.layout.fragment_terrain, container, false);<NEW_LINE>showHideTopShadow(root);<NEW_LINE>TextView emptyS... | findViewById(R.id.legend_top_divider); |
1,505,939 | private TableWriter createWriter(CharSequence name, Entry e, long thread, CharSequence lockReason) {<NEW_LINE>try {<NEW_LINE>checkClosed();<NEW_LINE>LOG.info().$("open [table=`").utf8(name).$("`, thread=").$(thread).$(']').$();<NEW_LINE>e.writer = new TableWriter(configuration, name, messageBus, null, <MASK><NEW_LINE>e... | true, e, root, metrics); |
196,262 | private void open(String path, int memSize) throws FileNotFoundException, IOException {<NEW_LINE>this.path = path;<NEW_LINE>this.memBufferSize = memSize;<NEW_LINE>this.file = new File(this.path + ".hfile");<NEW_LINE>boolean isNew = this.file.exists() == false || this.file.length() < _memHeadReserved;<NEW_LINE>if (isNew... | (int) (memBufferSize / _keyLength); |
773,704 | protected void handleRedirect(FacesContext context, Throwable rootCause, ExceptionInfo info, boolean responseResetted) throws IOException {<NEW_LINE>ExternalContext externalContext = context.getExternalContext();<NEW_LINE>externalContext.getSessionMap().put(ExceptionInfo.ATTRIBUTE_NAME, info);<NEW_LINE>Map<String, Stri... | .getPartialViewContext().getPartialResponseWriter(); |
556,520 | public ODocument toNetworkStream() {<NEW_LINE>ODocument document = new ODocument();<NEW_LINE>document.setTrackingChanges(false);<NEW_LINE>document.field("name", getName());<NEW_LINE>document.field("type", getType().id);<NEW_LINE>document.field("globalId", globalRef.getId());<NEW_LINE>document.field("mandatory", mandato... | "collate", collate.getName()); |
503,406 | protected static void fromHistoricVariableUpdate(HistoricVariableUpdateDto dto, HistoricVariableUpdate historicVariableUpdate) {<NEW_LINE>dto<MASK><NEW_LINE>dto.variableName = historicVariableUpdate.getVariableName();<NEW_LINE>dto.variableInstanceId = historicVariableUpdate.getVariableInstanceId();<NEW_LINE>dto.initial... | .revision = historicVariableUpdate.getRevision(); |
783,433 | private final void encipher(int[] lr, int off) {<NEW_LINE>int i, n, l = lr[off], r = lr[off + 1];<NEW_LINE>l ^= P[0];<NEW_LINE>for (i = 0; i <= BLOWFISH_NUM_ROUNDS - 2; ) {<NEW_LINE>// Feistel substitution on left word<NEW_LINE>n = S[(l >> 24) & 0xff];<NEW_LINE>n += S[0x100 | ((l >> 16) & 0xff)];<NEW_LINE>n ^= S[0x200 ... | lr[off + 1] = l; |
1,816,248 | private boolean extractCalibration(DMatrixRMaj x, CameraPinhole calibration) {<NEW_LINE>double s = x.data[5];<NEW_LINE>double cx = calibration.cx = x.data[2] / s;<NEW_LINE>double cy = calibration.cy = x.data[4] / s;<NEW_LINE>double fy = calibration.fy = Math.sqrt(x.data[3<MASK><NEW_LINE>double sk = calibration.skew = (... | ] / s - cy * cy); |
1,134,550 | private short calcChecksum(InetAddress srcAddr, InetAddress dstAddr, byte[] header, byte[] payload) {<NEW_LINE>byte[] data;<NEW_LINE>int destPos;<NEW_LINE>int totalLength = payload.length + length();<NEW_LINE>boolean lowerLayerIsIpV4 = srcAddr instanceof Inet4Address;<NEW_LINE><MASK><NEW_LINE>if ((totalLength % 2) != 0... | int pseudoHeaderSize = lowerLayerIsIpV4 ? IPV4_PSEUDO_HEADER_SIZE : IPV6_PSEUDO_HEADER_SIZE; |
19,049 | public void syncVMMetaData(final Map<String, String> vmMetadatum) {<NEW_LINE>if (vmMetadatum == null || vmMetadatum.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>List<Pair<Pair<String, VirtualMachine.Type>, Pair<Long, String>>> vmDetails = _userVmDao.getVmsDetailByNames(vmMetadatum.keySet(), "platform");<NEW_LINE>f... | vm = _vmDao.findVMByInstanceName(name); |
1,641,898 | public static IntLongVector mergeSparseLongVector(IndexGetParam param, List<PartitionGetResult> partResults) {<NEW_LINE>int dim = (int) PSAgentContext.get().getMatrixMetaManager().getMatrixMeta(param.getMatrixId()).getColNum();<NEW_LINE>IntLongVector vector = VFactory.sparseLongVector(dim, param.size());<NEW_LINE>for (... | getPartKeyToIndexesMap().get(partKey); |
1,087,903 | public final VsplatparameterContext vsplatparameter(ArgDefListBuilder args) throws RecognitionException {<NEW_LINE>VsplatparameterContext _localctx = new VsplatparameterContext(_ctx, getState(), args);<NEW_LINE>enterRule(_localctx, 32, RULE_vsplatparameter);<NEW_LINE>int _la;<NEW_LINE>try {<NEW_LINE>enterOuterAlt(_loca... | _la = _input.LA(1); |
443,274 | public static boolean isJoinKeyHaveSameType(Join join) {<NEW_LINE>JoinInfo joinInfo = join.analyzeCondition();<NEW_LINE>RelDataType keyDataType = CalciteUtils.getJoinKeyDataType(join.getCluster().getTypeFactory(), join, joinInfo.leftKeys, joinInfo.rightKeys);<NEW_LINE>List<RelDataTypeField<MASK><NEW_LINE>RelNode left =... | > keyDataFieldList = keyDataType.getFieldList(); |
950,389 | public Layer1Topology loadLayer1Topology(NetworkId network, SnapshotId snapshot) {<NEW_LINE>// Prefer runtime data inside of batfish/ subfolder over top level<NEW_LINE>Path insideBatfish = Paths.get(RELPATH_INPUT, RELPATH_BATFISH_CONFIGS_DIR, BfConsts.RELPATH_L1_TOPOLOGY_PATH);<NEW_LINE>Path topLevel = Paths.get(RELPAT... | ("Unexpected exception caught while loading layer-1 topology for snapshot %s", snapshot), e); |
162,878 | private void registerTrustStore(String trustStorePath, RestClientBuilder builder) {<NEW_LINE>Optional<String> maybeTrustStorePassword = oneOf(clientConfigByClassName().trustStorePassword, clientConfigByConfigKey().trustStorePassword);<NEW_LINE>Optional<String> maybeTrustStoreType = oneOf(clientConfigByClassName().trust... | IllegalArgumentException("Failed to initialize trust store from classpath resource " + trustStorePath, e); |
1,324,886 | final GetParametersForImportResult executeGetParametersForImport(GetParametersForImportRequest getParametersForImportRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getParametersForImportRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetParametersForImport"); |
461,583 | public static LiveChannelStat parseGetLiveChannelStat(InputStream responseBody) throws ResponseParseException {<NEW_LINE>try {<NEW_LINE>Element root = getXmlRootElement(responseBody);<NEW_LINE>LiveChannelStat result = new LiveChannelStat();<NEW_LINE>result.setPushflowStatus(PushflowStatus.parse(root.getChildText("Statu... | (videoElem.getChildText("Codec")); |
1,213,388 | public void execute(List<EventWithContext> eventsWithContext, Map<String, EventFieldSpec> fieldSpec) {<NEW_LINE>for (final Map.Entry<String, EventFieldSpec> entry : fieldSpec.entrySet()) {<NEW_LINE>final String fieldName = entry.getKey();<NEW_LINE>final <MASK><NEW_LINE>for (final FieldValueProvider.Config providerConfi... | EventFieldSpec spec = entry.getValue(); |
702,489 | public void connect(ByteBuffer initial_data, ConnectionListener listener) {<NEW_LINE>if (TRACE) {<NEW_LINE>trace("outbound connect to " + endpoint.getNotionalAddress());<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>Map message = new HashMap();<NEW_LINE>byte[] initial_data_bytes = new byte[initial_data.remaining()];<NEW_LINE>init... | ("con_id")).longValue(); |
881,228 | public ListUsersInGroupResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListUsersInGroupResult listUsersInGroupResult = new ListUsersInGroupResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>i... | class).unmarshall(context)); |
1,096,784 | public void marshall(ServiceUpdate serviceUpdate, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (serviceUpdate == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(s... | serviceUpdate.getClusterName(), CLUSTERNAME_BINDING); |
483,194 | private String processPaymentInitializationResponse(HttpResponse<String> response, PaymentSpecification spec, int retryCount) {<NEW_LINE>var reservationId = spec.getReservationId();<NEW_LINE>var responseBody = JsonParser.parseString(response.body()).getAsJsonObject();<NEW_LINE>var paymentToken = responseBody.get("Token... | ("Expiration").getAsString()); |
811,142 | final CreateLunaClientResult executeCreateLunaClient(CreateLunaClientRequest createLunaClientRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createLunaClientRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
849,797 | public static boolean usesScrollbars() {<NEW_LINE>if (usesScrollbars_ != null)<NEW_LINE>return usesScrollbars_;<NEW_LINE>if (!BrowseCap.isMacintosh()) {<NEW_LINE>usesScrollbars_ = true;<NEW_LINE>} else {<NEW_LINE>Element parent = Document.get().createElement("div");<NEW_LINE>parent.getStyle().setWidth(100, Unit.PX);<NE... | ).setPosition(Position.FIXED); |
235,979 | protected Object decode(Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {<NEW_LINE>Parser parser = new Parser(PATTERN, (String) msg);<NEW_LINE>if (!parser.matches()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Position position = new Position(getProtocolName());<NEW_LINE>DeviceSession deviceS... | parseLong(time) * 1000)); |
280,963 | public static AutogenVersionEnvironmentDiff fromProto(ai.verta.modeldb.versioning.VersionEnvironmentDiff blob) {<NEW_LINE>if (blob == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>AutogenVersionEnvironmentDiff obj = new AutogenVersionEnvironmentDiff();<NEW_LINE>{<NEW_LINE>Function<ai.verta.modeldb.versioning.Versio... | fromProto(blob.getStatus()); |
237,282 | static void updateVideoInfo(final VideoFile thisVideo, final SecurityContext ctx) {<NEW_LINE>try (final Tx tx = StructrApp.getInstance(ctx).tx()) {<NEW_LINE>final Map<String, Object> info = AVConv.newInstance(ctx, thisVideo).getVideoInfo();<NEW_LINE>if (info != null && info.containsKey("streams")) {<NEW_LINE>final List... | logger.warn("", fex); |
1,177,382 | private Token includeFiltered() {<NEW_LINE>Matcher matcher = Pattern.compile("^include:([\\w\\-]+)([\\( ])").matcher(scanner.getInput());<NEW_LINE>if (matcher.find(0) && matcher.groupCount() > 1) {<NEW_LINE>this.consume(matcher.end() - 1);<NEW_LINE>String filter = matcher.group(1);<NEW_LINE>Token attrs = matcher.group(... | = new Include(path, lineno); |
337,388 | public static RoomGuestCounts toCounts(@NonNull BookingFilterParams.Room... rooms) {<NEW_LINE>final int roomsCount = rooms.length;<NEW_LINE>int adultsCount = 0;<NEW_LINE>int infantsCount = 0;<NEW_LINE>int childrenCount = 0;<NEW_LINE>for (Room room : rooms) {<NEW_LINE>adultsCount += room.getAdultsCount();<NEW_LINE>int[<... | ] ageOfChildren = room.getAgeOfChildren(); |
1,032,321 | private void okPressed() {<NEW_LINE>if (!jcbDigitalSignature.isSelected() && !jcbNonRepudiation.isSelected() && !jcbKeyEncipherment.isSelected() && !jcbDataEncipherment.isSelected() && !jcbKeyAgreement.isSelected() && !jcbCertificateSigning.isSelected() && !jcbCrlSign.isSelected() && !jcbEncipherOnly.isSelected() && !j... | () ? KeyUsage.nonRepudiation : 0; |
1,567,444 | private void assembleShare(Share share, Business business, Wi wi, EffectivePerson effectivePerson) throws Exception {<NEW_LINE>Attachment2 attachment = business.entityManagerContainer().find(wi.getFileId(), Attachment2.class);<NEW_LINE>if (attachment == null) {<NEW_LINE>Folder2 folder = business.entityManagerContainer(... | , 100, null, null)); |
895,448 | private void defaultHandlers() {<NEW_LINE>handlerMap.putVoid(GdbCommandEchoInterruptEvent.class, this::pushCmdInterrupt);<NEW_LINE>handlerMap.putVoid(GdbCommandEchoEvent.class, this::ignoreCmdEcho);<NEW_LINE>handlerMap.putVoid(GdbConsoleOutputEvent.class, this::processStdOut);<NEW_LINE>handlerMap.putVoid(GdbTargetOutpu... | GdbThreadGroupExitedEvent.class, this::processThreadGroupExited); |
26,201 | private static boolean implVerify(byte[] sig, int sigOff, byte[] pk, int pkOff, byte[] ctx, byte phflag, byte[] m, int mOff, int mLen) {<NEW_LINE>if (!checkContextVar(ctx)) {<NEW_LINE>throw new IllegalArgumentException("ctx");<NEW_LINE>}<NEW_LINE>byte[] R = <MASK><NEW_LINE>byte[] S = copy(sig, sigOff + POINT_BYTES, SCA... | copy(sig, sigOff, POINT_BYTES); |
59,248 | private static FSRL fromPartString(FSRL containerFile, String partStr) throws MalformedURLException {<NEW_LINE>partStr = partStr.trim();<NEW_LINE>int colonSlashSlash = partStr.indexOf("://");<NEW_LINE>if (colonSlashSlash <= 0) {<NEW_LINE>throw new MalformedURLException("Missing protocol in " + partStr);<NEW_LINE>}<NEW_... | paramMap.get(FSRL.PARAM_MD5); |
1,287,201 | private byte[] readImage() throws IOException {<NEW_LINE>final StringBuffer sb = new StringBuffer();<NEW_LINE>int c;<NEW_LINE>// read http subheader<NEW_LINE>while ((c = input.read()) != -1) {<NEW_LINE>if (c > 0) {<NEW_LINE>sb.append((char) c);<NEW_LINE>if (c == 13) {<NEW_LINE>// '10'+<NEW_LINE>sb.append((char) input.r... | .toString().toLowerCase(); |
574,155 | public void handle(GameSession session, byte[] header, byte[] payload) throws Exception {<NEW_LINE>SceneTransToPointReq req = SceneTransToPointReq.parseFrom(payload);<NEW_LINE>String code = req.getSceneId() + "_" + req.getPointId();<NEW_LINE>ScenePointEntry scenePointEntry = GenshinData.getScenePointEntries().get(code)... | , req.getSceneId())); |
1,251,021 | public static Type discoverFunctionType(Object function, String functionName, GenericApplicationContext applicationContext) {<NEW_LINE>if (function instanceof RoutingFunction) {<NEW_LINE>return FunctionContextUtils.findType(applicationContext.getBeanFactory(), functionName);<NEW_LINE>} else if (function instanceof Func... | FunctionRegistration.REGISTRATION_NAME_SUFFIX, FunctionRegistration.class); |
1,195,190 | public void run() {<NEW_LINE>VCSFileProxy file = null;<NEW_LINE>boolean originalValue = false;<NEW_LINE>// get another file<NEW_LINE>synchronized (refreshedFiles) {<NEW_LINE>Iterator<Entry<VCSFileProxy, Boolean>> it = refreshedFiles.entrySet().iterator();<NEW_LINE>if (it.hasNext()) {<NEW_LINE>Entry<VCSFileProxy, Boolea... | > e = it.next(); |
380,179 | public void execute(JobExecutionContext jobExecutionContext) {<NEW_LINE>ExecutorService executorService = ExecutorUtils.getJobWorkers();<NEW_LINE>ExecutorUtils.printThreadPoolStatus(executorService, "JOB_WORKERS", scheduleLogger);<NEW_LINE>executorService.submit(() -> {<NEW_LINE>TriggerKey triggerKey = jobExecutionCont... | .getTrigger().getKey(); |
1,176,916 | private void countComponentsInCollectionRecursively(Project project, CollectionDesc.Builder builder, Map<String, Integer> target) throws IOException, CompileExceptionError {<NEW_LINE>for (InstanceDesc inst : builder.getInstancesList()) {<NEW_LINE>IResource res = project.getResource(inst.getPrototype());<NEW_LINE>countC... | project.getGeneratedResource(hash, "go"); |
312,236 | public void read(org.apache.thrift.protocol.TProtocol prot, RDF_VarTuple 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(1);<NEW_LINE>if (incoming.get(0)) {<NE... | STRUCT, iprot.readI32()); |
373,427 | private JComponent createActionsToolbar() {<NEW_LINE>DefaultActionGroup toolbarGroup = new DefaultActionGroup();<NEW_LINE>toolbarGroup.add(ActionManager.getInstance().getAction(VcsLogActionPlaces.TOOLBAR_ACTION_GROUP));<NEW_LINE>DefaultActionGroup mainGroup = new DefaultActionGroup();<NEW_LINE>mainGroup.add(ActionManag... | ("ins 0, fill", "[left]0[left, fill]push[right]", "center")); |
1,564,968 | public Predicate unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>Predicate predicate = new Predicate();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonTok... | class).unmarshall(context)); |
1,689,099 | private void insertWord(String word) {<NEW_LINE>try {<NEW_LINE>// remove any currently selected text - this is the default behaviour<NEW_LINE>// of the editor when typing manually<NEW_LINE>int selStart = textComponent.getSelectionStart();<NEW_LINE>int selEnd = textComponent.getSelectionEnd();<NEW_LINE>int selLen = selE... | remove(index, caretIndex - index); |
1,332,613 | private List<OrderLineCandidate> execute0() {<NEW_LINE>final ProductId bomProductId = initialCandidate.getProductId();<NEW_LINE>final I_PP_Product_BOM bom = bomRepo.getDefaultBOMByProductId(bomProductId).orElse(null);<NEW_LINE>if (bom == null) {<NEW_LINE>return ImmutableList.of(initialCandidate);<NEW_LINE>}<NEW_LINE>fi... | .toBigDecimal()), bomUomId); |
970,198 | public OutputDataConfig unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>OutputDataConfig outputDataConfig = new OutputDataConfig();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = c... | int originalDepth = context.getCurrentDepth(); |
1,247,882 | public int read(byte[] bytes, int off, int len) throws IOException {<NEW_LINE>if (bytes == null)<NEW_LINE>throw new NullPointerException();<NEW_LINE>if (ras != null)<NEW_LINE>return ras.read(bytes, off, len);<NEW_LINE>if (off < 0 || len < 0 || off + len > bytes.length)<NEW_LINE>throw new IndexOutOfBoundsException();<NE... | ), bytes, off, k); |
1,011,438 | public static String computeConfigRootDocFileName(String configRootClassName, String rootName) {<NEW_LINE>String sanitizedClassName;<NEW_LINE>final Matcher matcher = <MASK><NEW_LINE>if (!matcher.find()) {<NEW_LINE>sanitizedClassName = rootName + Constants.DASH + hyphenate(configRootClassName);<NEW_LINE>} else {<NEW_LIN... | Constants.PKG_PATTERN.matcher(configRootClassName); |
1,058,294 | protected void doStartRender(String target, Action action, Controller controller, Invocation invocation, boolean[] isHandled) {<NEW_LINE>invocation.invoke();<NEW_LINE>Render render = controller.getRender();<NEW_LINE>if (render instanceof ForwardActionRender) {<NEW_LINE>String actionUrl = ((ForwardActionRender) render).... | ) + action.getMethodName()); |
1,429,897 | public void marshall(HlsGroupSettings hlsGroupSettings, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (hlsGroupSettings == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(hlsGroupSettings.getAdMarkers(), ADM... | hlsGroupSettings.getBaseUrl(), BASEURL_BINDING); |
1,385,352 | final DescribeMountTargetSecurityGroupsResult executeDescribeMountTargetSecurityGroups(DescribeMountTargetSecurityGroupsRequest describeMountTargetSecurityGroupsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeMountTargetSecurityGroupsRequest);<NEW_LINE>AWSRequestMetrics awsRequest... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
172,965 | public void marshall(CreateDataIntegrationRequest createDataIntegrationRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createDataIntegrationRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(... | createDataIntegrationRequest.getScheduleConfig(), SCHEDULECONFIG_BINDING); |
348,442 | public static Environment createOrGetDefaultEnvironment(PortablePipelineOptions options) {<NEW_LINE>verifyEnvironmentOptions(options);<NEW_LINE>String type = options.getDefaultEnvironmentType();<NEW_LINE>String config = options.getDefaultEnvironmentConfig();<NEW_LINE>Environment defaultEnvironment;<NEW_LINE>if (Strings... | getJavaCapabilities()).build(); |
819,789 | public static void nv21ToInterleaved_F32(byte[] dataNV, InterleavedF32 output) {<NEW_LINE>final int yStride = output.width;<NEW_LINE>final int uvStride = output.width / 2;<NEW_LINE>final int startUV = yStride * output.height;<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(0, output.height, row -> {<NEW_LINE>for (... | .startIndex + row * output.stride; |
30,347 | // Process HeronDataTuple and insert it into cache<NEW_LINE>protected void copyDataOutBound(int sourceTaskId, boolean isLocalSpout, TopologyAPI.StreamId streamId, HeronTuples.HeronDataTuple tuple, List<Integer> outTasks) {<NEW_LINE>boolean firstIteration = true;<NEW_LINE>boolean isAnchored = tuple.getRootsCount() > 0;<... | setAckedtuple(tupleKey).build(); |
1,064,504 | final ListIPSetsResult executeListIPSets(ListIPSetsRequest listIPSetsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listIPSetsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListIPSets"); |
1,599,225 | final ListMeetingTagsResult executeListMeetingTags(ListMeetingTagsRequest listMeetingTagsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listMeetingTagsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(F... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
1,303,640 | public void execute(AdminCommandContext adminCommandContext) {<NEW_LINE>Node node = nodes.getNode(nodeName);<NEW_LINE>Server server = servers.getServer(instanceName);<NEW_LINE>Client client = ClientBuilder.newClient();<NEW_LINE>WebTarget webTarget;<NEW_LINE>if (Boolean.valueOf(node.getUseTls())) {<NEW_LINE>webTarget = ... | server.getDockerContainerId() + "/stop"); |
208,516 | private void updateApplicationWithJobStatusCV(Application app, JobStatusCV jobStatus) {<NEW_LINE>// infer the final flink job state<NEW_LINE>Enumeration.Value state = jobStatus.jobState();<NEW_LINE>Enumeration.Value preState = toK8sFlinkJobState(FlinkAppState.of<MASK><NEW_LINE>state = FlinkJobStatusWatcher.inferFlinkJo... | (app.getState())); |
690,016 | private String coverage(RandomNumberGenerator rand, String personID, long start, long stop, String payerId, String type, UUID groupId, String groupName, String name, String planId) throws IOException {<NEW_LINE>StringBuilder s = new StringBuilder();<NEW_LINE>String coverageID = rand.randUUID().toString();<NEW_LINE>s.ap... | start)).append(','); |
374,953 | private void write(MinimalVirtualObject object) throws IOException {<NEW_LINE>if (object.eClass().getEAnnotation("wrapped") != null) {<NEW_LINE>EStructuralFeature wrappedFeature = object.eClass().getEStructuralFeature("wrappedValue");<NEW_LINE>print("{");<NEW_LINE>print("\"_t\":\"" + object.eClass().getName() + "\",");... | print(o.toString()); |
1,510,315 | public static void main(String[] args) {<NEW_LINE>// Create a section file.<NEW_LINE>Report rep = new ErrReport();<NEW_LINE>DuckContext duck = new DuckContext(rep);<NEW_LINE>SectionFile file1 = new SectionFile(duck);<NEW_LINE>// Loading inline XML table.<NEW_LINE>file1.loadXML("<?xml version=\"1.0\" encoding=\"UTF-8\"?... | " <service service_id=\"1\" program_map_PID=\"100\"/>\n" + " <service service_id=\"2\" program_map_PID=\"200\"/>\n" + " </PAT>\n" + "</tsduck>"); |
591,467 | 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() ? ColorConstants.black : ColorConstants.gray);<NEW_LINE>graphics.setBackgroundColor(isEnabled() ? Col... | 5.5f, pt.y + 10.5f); |
316,844 | public void layoutContainer(Container parent) {<NEW_LINE>int maxWidth = 0;<NEW_LINE>for (JLabel label : labelMap.values()) {<NEW_LINE>int labelPrefWidth = label.getPreferredSize().width;<NEW_LINE>if (labelPrefWidth > maxWidth) {<NEW_LINE>maxWidth = labelPrefWidth;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Insets insets = parent.g... | Dimension prefSize = c.getPreferredSize(); |
1,660,022 | boolean ensureAvailableSpaceUsed(boolean useCached) {<NEW_LINE>if (mdl.size() == 0) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>boolean result = false;<NEW_LINE>if (changed && !useCached) {<NEW_LINE>result = true;<NEW_LINE>change();<NEW_LINE>}<NEW_LINE>int last = mdl.size() - 1;<NEW_LINE>int lastTab = useCached ? getC... | last) + getW(last)); |
953,317 | private void addHolderNameAndId() {<NEW_LINE>Tuple2<InputTextField, InputTextField> tuple = addInputTextFieldInputTextField(gridPane, ++gridRow, Res.get("payment.account.owner"), BankUtil.getHolderIdLabel(""));<NEW_LINE>holderNameInputTextField = tuple.first;<NEW_LINE>holderNameInputTextField.setMinWidth(250);<NEW_LINE... | bind(currencyComboBox.widthProperty()); |
850,196 | public void addHeaders(ContainerRequestContext requestContext, ContainerResponseContext responseContext) {<NEW_LINE>if (options != null && options.isSkipHeaders()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>MediaType requestType = requestContext.getMediaType();<NEW_LINE><MASK><NEW_LINE>MultivaluedMap<String, Object> header... | MediaType responseType = responseContext.getMediaType(); |
1,211,299 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_main);<NEW_LINE>unbinder = ButterKnife.bind(this);<NEW_LINE>toolbar.setTitle("Mosby MVI");<NEW_LINE>toolbar.inflateMenu(R.menu.activity_main_toolbar);<NEW_LINE>toolbar.setOnMenuIte... | title = savedInstanceState.getString(KEY_TOOLBAR_TITLE); |
1,327,114 | public Tree transformTree(Tree tree) {<NEW_LINE>Label l = tree.label();<NEW_LINE>if (tree.isLeaf()) {<NEW_LINE>return tf.newLeaf(l);<NEW_LINE>}<NEW_LINE>String s = l.value();<NEW_LINE>s = tlpp.treebankLanguagePack().basicCategory(s);<NEW_LINE>if (deletePunct) {<NEW_LINE>// this is broken as it's not the right thing to ... | children = new ArrayList<>(); |
1,259,388 | public static void convolve(Kernel2D_S32 kernel, InterleavedS32 input, InterleavedS32 output) {<NEW_LINE>final int offset = kernel.getOffset();<NEW_LINE>final int width = input.getWidth();<NEW_LINE>final int height = input.getHeight();<NEW_LINE>final int numBands = input.getNumBands();<NEW_LINE>final int[] pixel = new ... | = startX + kernel.getWidth(); |
1,535,226 | public void run() {<NEW_LINE>Map<NodePortTuple, PortDesc> portDesc = new HashMap<>();<NEW_LINE>if (statisticsService != null) {<NEW_LINE>statisticsService.collectStatistics(true);<NEW_LINE>portDesc = statisticsService.getPortDesc();<NEW_LINE>if (vips != null && monitors != null && members != null && pools != null) {<NE... | (memberId).status = -1; |
1,772,546 | private void addTravertineEnrichingRecipes(Consumer<FinishedRecipe> consumer, String basePath) {<NEW_LINE>// Travertine -> Polished Travertine<NEW_LINE>enriching(consumer, BYGBlocks.TRAVERTINE, <MASK><NEW_LINE>enriching(consumer, BYGBlocks.TRAVERTINE_SLAB, BYGBlocks.POLISHED_TRAVERTINE_SLAB, basePath + "slabs_to_polish... | BYGBlocks.POLISHED_TRAVERTINE, basePath + "to_polished"); |
549,983 | public Map<String, ? extends MethodSymbol> methods() {<NEW_LINE>if (methods != null) {<NEW_LINE>return this.methods;<NEW_LINE>}<NEW_LINE>BServiceSymbol symbol = (BServiceSymbol) getInternalSymbol();<NEW_LINE>BClassSymbol classSymbol = symbol.getAssociatedClassSymbol();<NEW_LINE>SymbolFactory symbolFactory = <MASK><NEW_... | SymbolFactory.getInstance(this.context); |
587,245 | private static String keyToStringV2(Object key, URLEscaper.Escaping escaping, UriComponent.Type componentType, boolean full) {<NEW_LINE>if (key == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (key instanceof ComplexResourceKey) {<NEW_LINE>Object convertedKey;<NEW_LINE>ComplexResourceKey<?, ?> complexResourceKey... | ) key), escaping, componentType); |
1,575,514 | public static void main(String[] args) {<NEW_LINE>Webcam w = Webcam.getDefault();<NEW_LINE>w.open(true);<NEW_LINE>Vector<BufferedImage> images = new Vector<BufferedImage>();<NEW_LINE><MASK><NEW_LINE>for (int i = 0; i < 100; i++) {<NEW_LINE>images.add(w.getImage());<NEW_LINE>try {<NEW_LINE>Thread.sleep(100);<NEW_LINE>} ... | System.out.println("recording, please wait"); |
1,516,123 | public InnerLiteral extractInnerLiteral() {<NEW_LINE>assert properties.hasInnerLiteral();<NEW_LINE>int literalEnd = properties.getInnerLiteralEnd();<NEW_LINE>int literalStart = properties.getInnerLiteralStart();<NEW_LINE>AbstractStringBuffer literal = getEncoding().createStringBuffer(literalEnd - literalStart);<NEW_LIN... | .getCharSet().matches2CharsWith1BitDifference(); |
1,541,432 | private void enforceChildDistribution(DistributionSpec distributionSpec, GroupExpression child, PhysicalPropertySet childOutputProperty) {<NEW_LINE>double childCosts = child.getCost(childOutputProperty);<NEW_LINE>Group childGroup = child.getGroup();<NEW_LINE>if (child.getOp() instanceof PhysicalDistributionOperator) {<... | setBestExpression(enforcer, childCosts, newOutputProperty); |
652,660 | public void visitFilterMapping(WebAppContext context, Descriptor descriptor, XmlParser.Node node) {<NEW_LINE>// Servlet Spec 3.0, p74<NEW_LINE>// filter-mappings are always additive, whether from web xml descriptors (web.xml/web-default.xml/web-override.xml) or web-fragments.<NEW_LINE>// Maintenance update 3.0a to spec... | filterName, node, context, descriptor); |
1,086,823 | public io.kubernetes.client.proto.V1Policy.PodDisruptionBudgetList buildPartial() {<NEW_LINE>io.kubernetes.client.proto.V1Policy.PodDisruptionBudgetList result = new io.kubernetes.client.proto.V1Policy.PodDisruptionBudgetList(this);<NEW_LINE>int from_bitField0_ = bitField0_;<NEW_LINE>int to_bitField0_ = 0;<NEW_LINE>if ... | .items_ = itemsBuilder_.build(); |
1,799,030 | public boolean mapChords() {<NEW_LINE>boolean ok = true;<NEW_LINE>// Chords grouped with previous chords<NEW_LINE>// Check time consistency of grouped chords in the same narrow slot<NEW_LINE>for (MeasureSlot narrow : slot.getMembers()) {<NEW_LINE>TreeMap<Rational, List<AbstractChordInter>> times = readSlotTimes(narrow)... | .iterator().next(); |
862,186 | public Object readObject() {<NEW_LINE>int type = readByte();<NEW_LINE>switch(type) {<NEW_LINE>case NULL:<NEW_LINE>return null;<NEW_LINE>case ENUMED:<NEW_LINE>{<NEW_LINE>Class clazz = readEnum(Class.class);<NEW_LINE>assert clazz != null;<NEW_LINE>return readEnum(clazz);<NEW_LINE>}<NEW_LINE>case SERIALIZED:<NEW_LINE>{<NE... | throw new IllegalStateException("Unexpected length: " + length); |
1,743,978 | public Widget onInitialize() {<NEW_LINE>// Create a vertical panel to layout the contents<NEW_LINE>VerticalPanel layout = new VerticalPanel();<NEW_LINE>// Show the HTML variable that defines the dictionary<NEW_LINE>HTML source = new HTML("<pre>var userInfo = {\n" + " name: \"Amelie Crutcher\",\n" + " &n... | add(new HTML("<br><br>")); |
3,876 | protected void writeClassIdTo(Output output, Class<?> componentType, boolean array) throws IOException {<NEW_LINE>// shouldn't happen<NEW_LINE>assert !componentType.isArray();<NEW_LINE>final int id = array <MASK><NEW_LINE>final RegisteredDelegate<?> rd = getRegisteredDelegate(componentType);<NEW_LINE>if (rd != null) {<... | ? RuntimeFieldFactory.ID_CLASS_ARRAY : RuntimeFieldFactory.ID_CLASS; |
1,190,319 | public static ListDeploymentsResponse unmarshall(ListDeploymentsResponse listDeploymentsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listDeploymentsResponse.setRequestId(_ctx.stringValue("ListDeploymentsResponse.RequestId"));<NEW_LINE>listDeploymentsResponse.setTotalCount(_ctx.integerValue("ListDeploymentsResponse.To... | ("ListDeploymentsResponse.Deployments[" + i + "].DeploymentId")); |
1,284,358 | final CreateConfigurationSetResult executeCreateConfigurationSet(CreateConfigurationSetRequest createConfigurationSetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createConfigurationSetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
522,405 | public static void main(final String[] args) {<NEW_LINE>if (args.length < 7) {<NEW_LINE>LOG.error("Args: [initialServerList], [configPath], [threads], [writeRatio], [readRatio], [valueSize] are needed.");<NEW_LINE>System.exit(-1);<NEW_LINE>}<NEW_LINE>final String initialServerList = args[1];<NEW_LINE>final String confi... | start(30, TimeUnit.SECONDS); |
618,490 | public void initScene() {<NEW_LINE>DirectionalLight light = new DirectionalLight();<NEW_LINE>light.setLookAt(0, 0, -1);<NEW_LINE>light.enableLookAt();<NEW_LINE>getCurrentScene().addLight(light);<NEW_LINE>//<NEW_LINE>// -- Create a material for all cubes<NEW_LINE>//<NEW_LINE>Material material = new Material();<NEW_LINE>... | setRepeatMode(Animation.RepeatMode.INFINITE); |
39,323 | private int checkIsolatedAlters() {<NEW_LINE>logger.debug("S#{} checkIsolatedAlters", system.getId());<NEW_LINE>int modifs = 0;<NEW_LINE>final List<Inter> alters = sig.inters(ShapeSet.Accidentals.getShapes());<NEW_LINE>for (Inter inter : alters) {<NEW_LINE>if (inter instanceof KeyAlterInter) {<NEW_LINE>// Don't conside... | stavesAround = system.getStavesAround(center); |
1,454,123 | private boolean testSourceTargetDifferent() {<NEW_LINE>boolean result = false;<NEW_LINE>String sourceVendor = "";<NEW_LINE>String targetVendor = "";<NEW_LINE>String sourceHost = "";<NEW_LINE>String targetHost = "";<NEW_LINE>String sourcePort = "";<NEW_LINE>String targetPort = "";<NEW_LINE>String sourceName = "";<NEW_LI... | .toString().trim(); |
896,234 | public HelixTaskResult handleMessage() throws InterruptedException {<NEW_LINE>HelixTaskResult helixTaskResult = new HelixTaskResult();<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>if (_segmentName.equals("")) {<NEW_LINE>// NOTE: the method aborts if any segment reload encounters an unhandled exception,<NEW_LINE>// and can l... | _logger.info("Handling message: {}", _message); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.