idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
44,452 | public boolean checkGroupDetailInfoExistenceByStorageInstIdAndDbNameAndGroupNames(String storageInstId, String dbName, List<String> groupNames) {<NEW_LINE>boolean res = false;<NEW_LINE>try {<NEW_LINE>Map<Integer, ParameterContext> params = new HashMap<>();<NEW_LINE>MetaDbUtil.setParameter(1, params, ParameterMethod.set... | rowCount = rs.getInt(1); |
681,608 | public void process(HitContext hitContext) throws IOException {<NEW_LINE>for (PercolateContext pc : percolateContexts) {<NEW_LINE>String fieldName = pc.fieldName();<NEW_LINE>Query query = pc.percolateQuery.getQueryStore().getQueries(ctx).apply(hitContext.docId());<NEW_LINE>if (query == null) {<NEW_LINE>// This is not a... | new Sort(SortField.FIELD_DOC)); |
989,102 | void addChange(int changeStartOffset, int changeEndOffset) {<NEW_LINE>if (this.changeStartOffset == -1) {<NEW_LINE>this.changeStartOffset = changeStartOffset;<NEW_LINE>this.changeEndOffset = changeEndOffset;<NEW_LINE>if (ViewHierarchyImpl.EVENT_LOG.isLoggable(Level.FINE)) {<NEW_LINE>// NOI18N<NEW_LINE>ViewUtils.// NOI1... | "," + this.changeEndOffset + ">\n"); |
359,052 | public void handle(OnlineUser user, JSONObject message) throws IOException {<NEW_LINE>if (message.get("t").equals("userInfo")) {<NEW_LINE>LogManager.LOGGER.fine("(WS) User info request from " + user.getUser().getUsername());<NEW_LINE>JSONObject json = new JSONObject();<NEW_LINE>if (user.getUser().isGuest()) {<NEW_LINE>... | getWorld().getY()); |
1,310,684 | public ApiResponse<List<MediaItem>> mediaPost_0WithHttpInfo(String id, List<CreateMediaItemRequest> createMediaItemRequests) throws ApiException {<NEW_LINE>Object localVarPostBody = createMediaItemRequests;<NEW_LINE>// verify the required parameter 'id' is set<NEW_LINE>if (id == null) {<NEW_LINE>throw new ApiException(... | (id.toString())); |
1,676,636 | public synchronized Store.MetadataSnapshot openSession(String sessionUUID, IndexShard indexShard) throws IOException {<NEW_LINE>boolean success = false;<NEW_LINE>RestoreSession restore = null;<NEW_LINE>try {<NEW_LINE>if (onGoingRestores.containsKey(sessionUUID)) {<NEW_LINE>logger.debug("not opening new session [{}] as ... | onGoingRestores.put(sessionUUID, restore); |
446,582 | @Override<NEW_LINE>public JPanel createComponentImpl(Disposable parentUIDisposable) {<NEW_LINE>final Module module = getModule();<NEW_LINE>final Project project = module.getProject();<NEW_LINE>myContentEntryEditorListener = new MyContentEntryEditorListener();<NEW_LINE>final JPanel mainPanel = new JPanel(new BorderLayou... | new JPanel(new BorderLayout()); |
1,203,451 | protected Component buildContent() {<NEW_LINE>JPanel panel = new JPanel(new BorderLayout());<NEW_LINE>table = JTableFactory.<MASK><NEW_LINE>table.setHorizontalScrollEnabled(true);<NEW_LINE>table.setDefaultRenderer(JComboBox.class, new ResolverRenderer());<NEW_LINE>table.setDefaultEditor(JComboBox.class, new ResolverEdi... | getInstance().makeJXTable(resolveContextTableModel); |
1,823,755 | public com.squareup.okhttp.Call apisApiIdGetCall(String apiId, String tenantDomain, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map vari... | String[] localVarAccepts = { "application/json" }; |
1,308,238 | private JDTRefactoringDescriptorComment createComment(String project, final String header) throws JavaModelException {<NEW_LINE>final JDTRefactoringDescriptorComment comment = new JDTRefactoringDescriptorComment(project, this, header);<NEW_LINE>if (!fMethod.getElementName().equals(fMethodName)) {<NEW_LINE>comment.addSe... | .getOldName()) })); |
1,739,475 | private void startBroker() throws Exception {<NEW_LINE>if (!_conf.shouldStartBroker()) {<NEW_LINE>LOGGER.info("Skipping start broker step. Assumes broker is already started.");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String brokerInstanceName <MASK><NEW_LINE>Map<String, Object> properties = new HashMap<>();<NEW_LINE>prope... | = "Broker_localhost_" + CommonConstants.Helix.DEFAULT_BROKER_QUERY_PORT; |
1,573,867 | private static RefactorWorkspaceEdit moveInstanceMethod(CodeActionParams params, LspVariableBinding destination, IProgressMonitor monitor) {<NEW_LINE>final ICompilationUnit unit = JDTUtils.resolveCompilationUnit(params.getTextDocument().getUri());<NEW_LINE>if (unit == null) {<NEW_LINE>return new RefactorWorkspaceEdit("... | .bindingKey)).findFirst(); |
799,070 | protected static Pair<Type, Integer> fromThrift(TTypeDesc typeDesc, int nodeIdx) throws InternalException {<NEW_LINE>TTypeNode node = typeDesc.getTypes().get(nodeIdx);<NEW_LINE>Type type = null;<NEW_LINE>switch(node.getType()) {<NEW_LINE>case SCALAR:<NEW_LINE>{<NEW_LINE>Preconditions.checkState(node.isSetScalarType());... | checkState(scalarType.isSetLen()); |
459,505 | protected IStatus run(IProgressMonitor monitor) {<NEW_LINE>SubMonitor sub = SubMonitor.convert(monitor, 1000);<NEW_LINE>if (sub.isCanceled()) {<NEW_LINE>return Status.CANCEL_STATUS;<NEW_LINE>}<NEW_LINE>GitRepository currentRepo = commit.repository();<NEW_LINE>currentRepo.enterWriteProcess();<NEW_LINE>try {<NEW_LINE>// ... | launch.getProcesses()[0]; |
754,049 | public Object value(Aggregation agg, Map<String, String> fieldTypeMap, String lookupFieldPrefix) {<NEW_LINE>MultiBucketsAggregation aggregation = (MultiBucketsAggregation) agg;<NEW_LINE>HashMap<String, Object> nested = new HashMap<>();<NEW_LINE>for (MultiBucketsAggregation.Bucket bucket : aggregation.getBuckets()) {<NE... | + agg.getName())); |
1,208,408 | public CodegenExpression codegenNoNullCheck(CodegenExpressionRef value, EPTypeClass valueType, CodegenExpressionRef lower, EPTypeClass lowerType, CodegenExpressionRef higher, EPTypeClass higherType, CodegenMethodScope codegenMethodScope, CodegenClassScope codegenClassScope) {<NEW_LINE>CodegenBlock block = codegenMethod... | ).blockReturn(constantTrue()); |
1,033,181 | public void onWebSocketConnect(Session session) {<NEW_LINE>logger.trace("WebSocket.onOpen.");<NEW_LINE>webSocket = new Jetty9WebSocket(session, framework.getAtmosphereConfig());<NEW_LINE>if (jetty93Up) {<NEW_LINE>HttpServletRequest r = originalRequest(session);<NEW_LINE>if (r != null) {<NEW_LINE>// We close except the ... | .getInitParameter(PROPERTY_SESSION_CREATE, true)); |
738,958 | static void removeCache(Object[] arguments, Class<?> targetClass, Method method, CacheEvict evict, boolean isAction) {<NEW_LINE>String unless = AnnotationUtil.get(evict.unless());<NEW_LINE>if (Utils.isUnless(unless, method, arguments)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String cacheName = AnnotationUtil.get(evict.n... | cacheKey, targetClass, method, arguments); |
365,432 | public void configure(Map<String, ?> configs) {<NEW_LINE>super.configure(configs);<NEW_LINE><MASK><NEW_LINE>_optimizationResult = null;<NEW_LINE>KafkaCruiseControl kafkaCruiseControl = extractKafkaCruiseControlObjectFromConfig(configs, GOAL_VIOLATION);<NEW_LINE>KafkaCruiseControlConfig config = kafkaCruiseControl.confi... | _violatedGoalsByFixability = new HashMap<>(); |
475,212 | protected Object computeValueAt(int row, int col) {<NEW_LINE>int index = ((Integer) filteredToFullIndexes.get(row)).intValue();<NEW_LINE>switch(col) {<NEW_LINE>case 0:<NEW_LINE>return sortedClassNames[index];<NEW_LINE>case 1:<NEW_LINE>// return new Long(trackedLiveObjectsSize[index]);<NEW_LINE>return (nTotalTrackedByte... | .format(nTrackedAllocObjects[index]); |
412,204 | private List<Operation> extractOperations(ObjectTypeDefinition typeDef) {<NEW_LINE>List<Operation> results = new ArrayList<>();<NEW_LINE>for (FieldDefinition fieldDef : typeDef.getFieldDefinitions()) {<NEW_LINE>Operation operation = new Operation();<NEW_LINE>operation.setName(fieldDef.getName());<NEW_LINE>operation.set... | inputValueTypeInfo = TypeInfo.typeInfo(inputValueType); |
944,157 | private void processV2(Socket socket) throws IOException {<NEW_LINE>DataInputX in = null;<NEW_LINE>DataOutputX out = null;<NEW_LINE>Configure conf = Configure.getInstance();<NEW_LINE>try {<NEW_LINE>in = new DataInputX(new BufferedInputStream(socket.getInputStream()));<NEW_LINE>out = new DataOutputX(new BufferedOutputSt... | (Pack) in2.readPack(); |
360,447 | protected void doFullTaskAction() throws ManifestMerger2.MergeFailureException, IOException {<NEW_LINE>ILogger iLogger <MASK><NEW_LINE>ManifestMerger2.Invoker mergerInvoker = ManifestMerger2.newMerger(getMainManifestFile(), iLogger, ManifestMerger2.MergeType.LIBRARY);<NEW_LINE>List<File> secondaryManifestFiles = getSec... | = new LoggerWrapper(getLogger()); |
1,750,353 | public boolean isRecipe(@Nonnull RecipeLevel machineLevel, @Nonnull NNList<MachineRecipeInput> inputs) {<NEW_LINE>if (!machineLevel.canMake(RECIPE_LEVEL)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>ItemStack output = Prep.getEmpty();<NEW_LINE>for (MachineRecipeInput ri : inputs) {<NEW_LINE>if (ri != null && Prep.isVa... | ).getSmeltingResult(ri.item); |
254,131 | // =======================================================================<NEW_LINE>// Implementation methods<NEW_LINE>@Override<NEW_LINE>public Reasoner bindSchema(Graph tbox) throws ReasonerException {<NEW_LINE>if (schemaGraph != null) {<NEW_LINE>throw new ReasonerException("Can only bind one schema at a time to a Ge... | InfGraph) graph).prepare(); |
795,859 | public void processRecordsCli(Dataset<Row> lines) throws ZinggClientException {<NEW_LINE>LOG.info("Processing Records for CLI Labelling");<NEW_LINE>printMarkedRecordsStat();<NEW_LINE>if (lines == null || lines.count() == 0) {<NEW_LINE>LOG.info("It seems there are no unmarked records at this moment. Please run findTrain... | msg2 = String.format("\tZingg does not do any prediction for the above pairs as Zingg is still collecting training data to build the preliminary models."); |
1,077,443 | private void createLineWidthComboControl(Composite parent) {<NEW_LINE>createLabel(parent, Messages.DiagramConnectionSection_7, ITabbedLayoutConstants.STANDARD_LABEL_WIDTH, SWT.CENTER);<NEW_LINE>fComboLineWidth = new Combo(parent, SWT.READ_ONLY);<NEW_LINE>getWidgetFactory().<MASK><NEW_LINE>fComboLineWidth.setItems(combo... | adapt(fComboLineWidth, true, true); |
1,144,407 | protected void doInit() {<NEW_LINE>if (ConfigDataMode.isFastMock()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>this.scheduler = new ScheduledThreadPoolExecutor(1, new NamedThreadFactory() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Thread newThread(Runnable r) {<NEW_LINE>Thread thread = new Thread(r, "PlanManager schedu... | , new ThreadPoolExecutor.CallerRunsPolicy()); |
411,496 | public Future<VoidResult> update(int matrixId, int rowId, Vector delta, UpdateOp op) {<NEW_LINE>checkParams(matrixId, rowId);<NEW_LINE>delta.setMatrixId(matrixId);<NEW_LINE>delta.setRowId(rowId);<NEW_LINE>MatrixMeta matrixMeta = PSAgentContext.get().getMatrixMetaManager().getMatrixMeta(matrixId);<NEW_LINE>PartitionKey[... | requestIdToResponseCache.put(requestId, cache); |
359,629 | public ProgressObject deployJDBCDrivers(Target target, Set<Datasource> datasources) {<NEW_LINE>List urls = JDBCDriverDeployHelper.<MASK><NEW_LINE>final MonitorProgressObject startProgress = new MonitorProgressObject(dm, null);<NEW_LINE>ProgressObject retVal = JDBCDriverDeployHelper.getProgressObject(driverLoc, urls);<N... | getMissingDrivers(getDriverLocations(), datasources); |
634,482 | public boolean configure(final FeatureContext context) {<NEW_LINE>final Configuration config = context.getConfiguration();<NEW_LINE>final String jsonFeature = CommonProperties.getValue(config.getProperties(), config.getRuntimeType(), InternalProperties.JSON_FEATURE, JSON_FEATURE, String.class);<NEW_LINE>// Other JSON p... | context.register(JsonParseExceptionMapper.class); |
991,531 | private static final String toOctalString(BigInteger value) {<NEW_LINE>int signum = value.signum();<NEW_LINE>// obvious shortcut<NEW_LINE>if (signum == 0) {<NEW_LINE>return "0";<NEW_LINE>}<NEW_LINE>byte[] input = value.abs().toByteArray();<NEW_LINE>if (input.length < 3) {<NEW_LINE>return value.toString(8);<NEW_LINE>}<N... | - 2] & 0xFF) : 0x00; |
796,958 | public void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setTitle(R.string.diff_title);<NEW_LINE><MASK><NEW_LINE>viewFlow = (ViewFlow) findViewById(R.id.viewflow);<NEW_LINE>DiffAdapter adapter = new DiffAdapter(this);<NEW_LINE>viewFlow.setAdapter(adapter);<NEW_LINE>TitleFl... | setContentView(R.layout.title_layout); |
1,782,887 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {<NEW_LINE>// Create the list fragment's content view by calling the super method<NEW_LINE>final View listFragmentView = super.<MASK><NEW_LINE>// Now create a SwipeRefreshLayout to wrap the fragment's content view<NEW_LINE... | onCreateView(inflater, container, savedInstanceState); |
1,690,025 | protected void onClick() {<NEW_LINE>if (!(getContext() instanceof Activity)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Intent intent = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);<NEW_LINE>intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TYPE, RingtoneManager.TYPE_NOTIFICATION);<NEW_LINE>intent.putExtra(RingtoneManag... | ).startActivityForResult(intent, REQUEST_RINGTONE); |
1,595,192 | private DocLine[] loadLines(MOrder order) {<NEW_LINE>ArrayList<DocLine> list = new ArrayList<DocLine>();<NEW_LINE>MOrderLine[] lines = order.getLines();<NEW_LINE>for (int i = 0; i < lines.length; i++) {<NEW_LINE>MOrderLine line = lines[i];<NEW_LINE>DocLine docLine <MASK><NEW_LINE>BigDecimal Qty = line.getQtyOrdered();<... | = new DocLine(line, this); |
351,720 | public TSQueryNonAlignDataSet fillBuffer(int fetchSize, WatermarkEncoder encoder) throws InterruptedException {<NEW_LINE>if (!initialized) {<NEW_LINE>init(encoder, fetchSize);<NEW_LINE>}<NEW_LINE>int seriesNum = seriesReaderWithoutValueFilterList.size();<NEW_LINE>TSQueryNonAlignDataSet tsQueryNonAlignDataSet = new TSQu... | (ByteBuffer.allocate(0)); |
774,557 | private boolean openInBrowser(String urlAsString, boolean canShowUndoPrompt, boolean braveBrowser) {<NEW_LINE>Log.d(TAG, "ContentView.openInBrowser() - url:" + urlAsString);<NEW_LINE>CrashTracking.log("ContentView.openInBrowser()");<NEW_LINE>Intent intent = new Intent(Intent.ACTION_VIEW);<NEW_LINE>intent.setData(Uri.pa... | Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); |
1,297,136 | public T findMatch(Q key) {<NEW_LINE>Object[] keyArray = new <MASK><NEW_LINE>int keyArrayLogicalSize = 0;<NEW_LINE>for (int i = 0; i < matchFields.size(); i++) {<NEW_LINE>Object matched = matchFields.get(i).extract(key);<NEW_LINE>if (matched != null) {<NEW_LINE>keyArray[keyArrayLogicalSize++] = matched;<NEW_LINE>}<NEW_... | Object[matchFields.size()]; |
1,288,102 | private void addAnonymousInnerClasses(final CompilationController cc, final Set<SourceClassInfo> innerClasses) throws IOException {<NEW_LINE>final int parentClassNameLength = getQualifiedName().length();<NEW_LINE>cc.<MASK><NEW_LINE>ErrorAwareTreePathScanner<Void, Void> scanner = new ErrorAwareTreePathScanner<Void, Void... | toPhase(JavaSource.Phase.RESOLVED); |
1,573,875 | private Object doSendAndReceiveAsync(Destination reqDestination, jakarta.jms.Message jmsRequest, Session session, int priority) throws JMSException {<NEW_LINE>String correlation = null;<NEW_LINE>MessageProducer messageProducer = null;<NEW_LINE>try {<NEW_LINE>messageProducer = session.createProducer(reqDestination);<NEW... | = new LinkedBlockingQueue<>(1); |
1,655,434 | public JSDynamicObject propertyHandlerInstantiate(JSContext context, JSRealm realm, ObjectTemplate template, JSDynamicObject target, boolean global) {<NEW_LINE>JSDynamicObject handler = JSUncheckedProxyHandler.create(context, realm);<NEW_LINE>JSDynamicObject proxy = JSProxy.create(context, realm, target, handler);<NEW_... | template, realm, SETTER, proxy); |
834,051 | final DeleteTransitGatewayConnectPeerResult executeDeleteTransitGatewayConnectPeer(DeleteTransitGatewayConnectPeerRequest deleteTransitGatewayConnectPeerRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteTransitGatewayConnectPeerRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = ... | (super.beforeMarshalling(deleteTransitGatewayConnectPeerRequest)); |
1,733,510 | public UpdateWorldTemplateResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>UpdateWorldTemplateResult updateWorldTemplateResult = new UpdateWorldTemplateResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement()... | JsonToken token = context.getCurrentToken(); |
1,126,647 | public static ErrorDescription switchPatternMatchToSwitchNull(HintContext ctx) {<NEW_LINE>SwitchTree switchTree = (SwitchTree) ctx.getPath().getLeaf();<NEW_LINE>boolean isPatternMatch = false;<NEW_LINE>isPatternMatch = TreeShims.isPatternMatch(switchTree);<NEW_LINE>if (!isPatternMatch) {<NEW_LINE>return null;<NEW_LINE>... | ), indexOf).toEditorFix(); |
435,313 | private PersistentResource upsertObject(Entity entity, Environment context) {<NEW_LINE>Set<Entity.Attribute<MASK><NEW_LINE>Optional<String> id = entity.getId();<NEW_LINE>RequestScope requestScope = entity.getRequestScope();<NEW_LINE>PersistentResource upsertedResource;<NEW_LINE>EntityDictionary dictionary = requestScop... | > attributes = entity.getAttributes(); |
754,954 | Task<Void> stopHttpMetric(int id, Bundle httpMetricConfig, Bundle attributes) {<NEW_LINE>return Tasks.call(() -> {<NEW_LINE>HttpMetric httpMetric = httpMetrics.get(id);<NEW_LINE>if (httpMetricConfig.containsKey("httpResponseCode")) {<NEW_LINE>httpMetric.setHttpResponseCode((int) httpMetricConfig.getDouble("httpResponse... | ) httpMetricConfig.getDouble("requestPayloadSize")); |
1,658,890 | public void addClassElements(TopLevelClass topLevelClass) {<NEW_LINE>FullyQualifiedJavaType fqjt = new <MASK><NEW_LINE>Set<FullyQualifiedJavaType> importedTypes = initializeImportedTypes(fqjt);<NEW_LINE>Method method = new Method(introspectedTable.getCountByExampleStatementId());<NEW_LINE>method.setVisibility(JavaVisib... | FullyQualifiedJavaType(introspectedTable.getExampleType()); |
1,406,176 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>if (controller == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Map<UUID, Integer> playerMap = new HashMap<>();<NEW_LINE>CardsImpl cards = new CardsImpl();<NEW_LINE>for (Permanent perma... | getControllerId(), count + 1); |
530,965 | public Tuple2<DenseMatrix, DenseMatrix> unstack(Tuple3<Double, Double, Vector> labledVector) {<NEW_LINE>int batchSize = labledVector.f0.intValue();<NEW_LINE>DenseVector stacked = (DenseVector) labledVector.f2;<NEW_LINE>if (features == null || features.numRows() != batchSize) {<NEW_LINE>features = new DenseMatrix(batchS... | stacked.get(start + i); |
981,201 | public Path copy(final Path source, final Path target, final ch.cyberduck.core.transfer.TransferStatus status, final ConnectionCallback callback, final StreamListener listener) throws BackgroundException {<NEW_LINE>try {<NEW_LINE>final IRODSFileSystemAO fs = session.getClient();<NEW_LINE>final DataTransferOperations tr... | map("Cannot copy {0}", e, source); |
1,451,236 | /* (non-Javadoc)<NEW_LINE>* @see javax.ws.rs.ext.MessageBodyWriter#writeTo(java.lang.Object, java.lang.Class, java.lang.reflect.Type, java.lang.annotation.Annotation[], javax.ws.rs.core.MediaType, javax.ws.rs.core.MultivaluedMap, java.io.OutputStream)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void writeTo(List<Wid... | add(objectBuilder.build()); |
207,466 | private synchronized void processQueue() {<NEW_LINE>Iterator<QueuedBlock> it = queuedBlocks.values().iterator();<NEW_LINE>while (it.hasNext()) {<NEW_LINE>QueuedBlock queuedBlock = it.next();<NEW_LINE>List<TransactionReceipt> receipts = queuedBlock.receipts;<NEW_LINE>if (receipts != null) {<NEW_LINE>Block block = blockS... | receipts, block.getNumber()); |
1,743,593 | private TextLine[] calculateTextLines() {<NEW_LINE>int startOffset = 0;<NEW_LINE>List<TextLine> <MASK><NEW_LINE>StringBuilder lineBuilder = new StringBuilder();<NEW_LINE>int index = 0;<NEW_LINE>int line = 0;<NEW_LINE>int textLength = text.length();<NEW_LINE>int lengthOfNewLineChars;<NEW_LINE>while (index < textLength) ... | textLines = new ArrayList<>(); |
771,482 | public TNiftyClientTransport connectSync(InetSocketAddress addr, @Nullable Duration connectTimeout, @Nullable Duration receiveTimeout, @Nullable Duration sendTimeout, int maxFrameSize, @Nullable HostAndPort socksProxyAddress) throws TTransportException, InterruptedException {<NEW_LINE>// TODO: implement send timeout fo... | Channel channel = f.getChannel(); |
836,675 | public void insert(NumberVector nv, DBIDRef dbid) {<NEW_LINE>// No root created yet:<NEW_LINE>if (root == null) {<NEW_LINE>final int dim = nv.getDimensionality();<NEW_LINE>L leaf = factory.make(dim);<NEW_LINE>if (idmap != null) {<NEW_LINE>ArrayModifiableDBIDs list = DBIDUtil.newArray();<NEW_LINE>list.add(dbid);<NEW_LIN... | .make(dim), capacity); |
156,184 | public static GetDevopsProjectMembersResponse unmarshall(GetDevopsProjectMembersResponse getDevopsProjectMembersResponse, UnmarshallerContext _ctx) {<NEW_LINE>getDevopsProjectMembersResponse.setRequestId(_ctx.stringValue("GetDevopsProjectMembersResponse.RequestId"));<NEW_LINE>getDevopsProjectMembersResponse.setNextPage... | ("GetDevopsProjectMembersResponse.Object[" + i + "].Phone")); |
1,046,814 | public //<NEW_LINE>void onDrawFrame(GL10 glUnused) {<NEW_LINE>// Set the viewport<NEW_LINE>GLES30.glViewport(0, 0, mWidth, mHeight);<NEW_LINE>// Clear the color buffer<NEW_LINE>GLES30.glClear(GLES30.GL_COLOR_BUFFER_BIT);<NEW_LINE>// Use the program object<NEW_LINE>GLES30.glUseProgram(mProgramObject);<NEW_LINE>// Set th... | GL_FLOAT, false, 0, mVertices); |
135,323 | void electionComplete(final long nowNs) {<NEW_LINE>leadershipTermId = election.leadershipTermId();<NEW_LINE>if (Cluster.Role.LEADER == role) {<NEW_LINE>timeOfLastLogUpdateNs = nowNs - leaderHeartbeatIntervalNs;<NEW_LINE>timerService.currentTime(clusterClock.timeUnit().convert(nowNs, TimeUnit.NANOSECONDS));<NEW_LINE><MA... | ClusterControl.ToggleState.activate(controlToggle); |
835,580 | public FairsharePolicy unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>FairsharePolicy fairsharePolicy = new FairsharePolicy();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = conte... | int originalDepth = context.getCurrentDepth(); |
594,567 | public TypeName visit(PrimitiveResolvedType primitiveType) {<NEW_LINE>if (primitiveType.getName().equals("integer")) {<NEW_LINE>return ClassName.get(Long.class);<NEW_LINE>} else if (primitiveType.getName().equals("number")) {<NEW_LINE>return ClassName.get(Double.class);<NEW_LINE>} else if (primitiveType.getName().equal... | ClassName.get(UUID.class); |
893,321 | public static WebOptimizedMP4Muxer withOldHeader(SeekableByteChannel output, Brand brand, MovieBox oldHeader) throws IOException {<NEW_LINE>int size = (int) oldHeader.getHeader().getSize();<NEW_LINE>TrakBox vt = oldHeader.getVideoTrack();<NEW_LINE>SampleToChunkBox stsc = vt.getStsc();<NEW_LINE>size -= stsc.getSampleToC... | += vt.getFrameCount() << 3; |
725,300 | public void createControl(Composite parent) {<NEW_LINE>initializeDialogUnits(parent);<NEW_LINE>SashForm settingsDivider = new SashForm(parent, SWT.VERTICAL);<NEW_LINE>settingsDivider.setLayoutData(new GridData(GridData.FILL_BOTH));<NEW_LINE>{<NEW_LINE>Composite inputFilesGroup = UIUtils.createComposite(settingsDivider,... | new GridData(GridData.FILL_BOTH)); |
977,365 | public void execute(UIManager.ViewHolder viewHolder) {<NEW_LINE>try {<NEW_LINE>NativeAdView nativeAdView = null;<NEW_LINE>MediaView mediaView = null;<NEW_LINE>MediaView adIconView = null;<NEW_LINE>if (adTag != -1) {<NEW_LINE>nativeAdView = (NativeAdView) viewHolder.get(adTag);<NEW_LINE>}<NEW_LINE>if (mediaViewTag != -1... | clickableViews = new ArrayList<>(); |
303,325 | final UpdateApplicationLayerAutomaticResponseResult executeUpdateApplicationLayerAutomaticResponse(UpdateApplicationLayerAutomaticResponseRequest updateApplicationLayerAutomaticResponseRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateApplicationLayerAutomaticResponseRequest);<NEW_LIN... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
564,524 | final RegisterUserResult executeRegisterUser(RegisterUserRequest registerUserRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(registerUserRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
1,574,353 | public final IRubyObject collectStats(final ThreadContext context) throws IOException {<NEW_LINE>final AbstractNamespacedMetricExt pipelineMetric = metric.namespace(context, RubyArray.newArray(context.runtime, Arrays.asList(MetricKeys.STATS_KEY, MetricKeys.PIPELINES_KEY, pipelineId.asString().intern(), QUEUE_KEY)));<NE... | dirPath = inner.ruby_dir_path(context); |
226,373 | public void valueChanged(XFormField sourceField, String newValue, String oldValue) {<NEW_LINE>List<String> testCases = new ArrayList<String>();<NEW_LINE>String tc = mainForm.getComponentValue(TESTCASE);<NEW_LINE>if (newValue.equals(ALL_VALUE)) {<NEW_LINE>for (TestSuite testSuite : testSuites) {<NEW_LINE>for (TestCase t... | getModelItem().getTestSuiteByName(newValue); |
1,010,564 | public static ListCdtProductsResponse unmarshall(ListCdtProductsResponse listCdtProductsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listCdtProductsResponse.setRequestId(_ctx.stringValue("ListCdtProductsResponse.RequestId"));<NEW_LINE>List<CdtProductsItem> cdtProducts = new ArrayList<CdtProductsItem>();<NEW_LINE>for ... | ("ListCdtProductsResponse.CdtProducts[" + i + "].BusinessRegionId")); |
679,762 | private static Resource[] visibleConfigurationMetadataResources(ClassLoader classLoader) throws IOException {<NEW_LINE>ResourcePatternResolver resourcePatternResolver = new PathMatchingResourcePatternResolver(classLoader);<NEW_LINE>Resource[] configurationResources = resourcePatternResolver.getResources(VISIBLE_PROPERT... | DEPRECATED_DATAFLOW_CONFIGURATION_PROPERTIES + " is a deprecated. Please use " + VISIBLE_PROPERTIES + " instead."); |
103,288 | public static void main(String[] args) throws Exception {<NEW_LINE>AmazonDynamoDB client = AmazonDynamoDBClientBuilder.standard().withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration("http://localhost:8000", "us-west-2")).build();<NEW_LINE>DynamoDB dynamoDB = new DynamoDB(client);<NEW_LINE>Table table =... | ).withReturnValues(ReturnValue.UPDATED_NEW); |
1,608,834 | public void onConnectionWrapped(ConnectionInformation connectionInformation) {<NEW_LINE>final Metric2Registry metricRegistry = corePlugin.getMetricRegistry();<NEW_LINE>// at the moment stagemonitor only supports monitoring connections initiated via a DataSource<NEW_LINE>if (connectionInformation.getDataSource() instanc... | dataSource, connectionInformation.getConnection()); |
529,870 | public static Pair<double[], int[]> perform_wavelet_transform(double[] data, String wavelet, int decomposition_level) throws BrainFlowError {<NEW_LINE>if (decomposition_level <= 0) {<NEW_LINE>throw new BrainFlowError("Invalid decomposition level", ExitCode.INVALID_ARGUMENTS_ERROR.get_code());<NEW_LINE>}<NEW_LINE>int[] ... | = new int[decomposition_level + 1]; |
349,007 | private void requestNextBlock(Exchange exchange, Response response, Block2BlockwiseStatus status) {<NEW_LINE>// do late block size negotiation<NEW_LINE>int blockSzx = Math.min(response.getOptions().getBlock2().getSzx(), preferredBlockSzx);<NEW_LINE>if (response.isNotification() && exchange.isNotification()) {<NEW_LINE>... | ).getNum(), block); |
265,690 | private <T> T byUpdatingNearCache(Supplier<T> remoteCallSupplier, K key, Data keyData, V value, Data valueData, boolean calledByBooleanMethod) {<NEW_LINE>Object nearCacheKey = toNearCacheKey(key, keyData);<NEW_LINE>try {<NEW_LINE>long reservationId = cacheOnUpdate ? nearCache.tryReserveForUpdate(nearCacheKey, keyData, ... | nearCacheKey, nearCacheValue, reservationId, false); |
1,709,735 | private void saveTslintError(SensorContext context, TslintError tslintError) {<NEW_LINE>String tslintKey = tslintError.ruleName;<NEW_LINE>InputFile inputFile = getInputFile(context, tslintError.name);<NEW_LINE>if (inputFile == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>TextRange location = getLocation(tslintError, in... | (inputFile).at(location); |
30,853 | public LayerDetail mapRow(ResultSet rs, int rowNum) throws SQLException {<NEW_LINE>LayerDetail layer = new LayerDetail();<NEW_LINE>layer.chunkSize = rs.getInt("int_chunk_size");<NEW_LINE>layer.<MASK><NEW_LINE>layer.dispatchOrder = rs.getInt("int_dispatch_order");<NEW_LINE>layer.id = rs.getString("pk_layer");<NEW_LINE>l... | command = rs.getString("str_cmd"); |
1,608,401 | protected void loadFromModelData(TFTableModelRegressionModelData modelData, TableSchema modelSchema) {<NEW_LINE>Params meta = modelData.getMeta();<NEW_LINE>String tfOutputSignatureDef = meta.get(TFModelDataConverterUtils.TF_OUTPUT_SIGNATURE_DEF);<NEW_LINE>// TypeInformation <?> tfOutputSignatureType = meta.get(TFModelD... | meta.get(TFModelDataConverterUtils.TF_INPUT_COLS); |
795,395 | public char[][] create(int n, int m) {<NEW_LINE>char[][] matrix = new char[n][m];<NEW_LINE>int r = 0;<NEW_LINE>char ch = 'X';<NEW_LINE>int high = Math.min(n, m);<NEW_LINE>// high is min of n and m. If high is odd then high is ceiling of high/2<NEW_LINE>// else high is high/2. e.g high is 5 then high becomes 3 if high i... | [i][r] = ch; |
275,427 | public boolean computeSceneTransform(LookUpSimilarImages dbSimilar, SceneWorkingGraph src, SceneWorkingGraph dst, SceneWorkingGraph.View selectedSrc, SceneWorkingGraph.View selectedDst, ScaleSe3_F64 src_to_dst) {<NEW_LINE>// Sanity check<NEW_LINE>BoofMiscOps.checkSame(selectedSrc.pview, selectedDst.pview);<NEW_LINE>if ... | src, inliersSrc, listWorldToViewSrc, listIntrinsicsSrc); |
953,938 | public Deployment deploy(DeploymentBuilderImpl activiti6DeploymentBuilder) {<NEW_LINE>try {<NEW_LINE>DeploymentBuilder deploymentBuilder = getProcessEngine()<MASK><NEW_LINE>// Copy settings<NEW_LINE>deploymentBuilder.name(activiti6DeploymentBuilder.getDeployment().getName());<NEW_LINE>deploymentBuilder.category(activit... | .getRepositoryService().createDeployment(); |
1,267,864 | private Mono<Response<Flux<ByteBuffer>>> refreshWithResponseAsync(String deviceName, String storageAccountName, String containerName, String resourceGroupName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint(... | error(new IllegalArgumentException("Parameter storageAccountName is required and cannot be null.")); |
1,260,157 | private AbstractDistanceScoreFunction parseNumberVariable(XContentParser parser, QueryShardContext context, MappedFieldType fieldType, MultiValueMode mode) throws IOException {<NEW_LINE>XContentParser.Token token;<NEW_LINE>String parameterName = null;<NEW_LINE>double scale = 0;<NEW_LINE>double origin = 0;<NEW_LINE>doub... | numericFieldData = context.getForField(fieldType); |
1,189,484 | public void onPreviewSizeChosen(final Size size, final int rotation) {<NEW_LINE>final float textSizePx = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, TEXT_SIZE_DIP, getResources().getDisplayMetrics());<NEW_LINE>borderedText = new BorderedText(textSizePx);<NEW_LINE>borderedText.setTypeface(Typeface.MONOSPACE);... | findViewById(R.id.tracking_overlay); |
869,220 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_demo_tab_with_notification_mark);<NEW_LINE>final Demo demo = getDemo();<NEW_LINE>Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);<NEW_LINE>toolbar.setTitle(demo.titleResId);... | .layoutResId, tab, false)); |
1,439,958 | // deleteRelationship<NEW_LINE>@Override<NEW_LINE>public Relationship deleteRelationship(String userId, String typeDefGUID, String typeDefName, String obsoleteRelationshipGUID) throws InvalidParameterException, RepositoryErrorException, RelationshipNotKnownException, UserNotAuthorizedException {<NEW_LINE>final String m... | this.getRelationship(userId, obsoleteRelationshipGUID); |
972,512 | private void initColumnsAndTables(SessionLocal session, boolean literalsChecked) {<NEW_LINE>Column[] cols;<NEW_LINE>removeCurrentViewFromOtherTables();<NEW_LINE>setTableExpression(isTableExpression);<NEW_LINE>try {<NEW_LINE>Query compiledQuery = compileViewQuery(session, querySQL, literalsChecked);<NEW_LINE>this.queryS... | = new Column[columnTemplates.length]; |
1,211,462 | public void read(org.apache.thrift.protocol.TProtocol prot, drainReplicationTable_args 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(4);<NEW_LINE>if (incomin... | >(2 * _set91.size); |
954,167 | public View render(RenderedAdaptiveCard renderedCard, Context context, FragmentManager fragmentManager, ViewGroup viewGroup, BaseCardElement baseCardElement, ICardActionHandler cardActionHandler, HostConfig hostConfig, RenderArgs renderArgs) throws Exception {<NEW_LINE>TextBlock textBlock = Util.castTo(baseCardElement,... | (new SpannableString(text))); |
542,540 | private List<EmailWrapper> generateFeedbackSessionPublishedOrUnpublishedEmails(FeedbackSessionAttributes session, List<StudentAttributes> students, List<InstructorAttributes> instructors, List<InstructorAttributes> instructorsToNotify, EmailType emailType) {<NEW_LINE>CourseAttributes course = coursesLogic.getCourse(ses... | instructorsToNotify, template, emailType, action); |
727,526 | public static Collection<ExasolServerSession> readSessions(JDBCSession session) throws SQLException {<NEW_LINE>log.debug("read sessions");<NEW_LINE>List<ExasolServerSession> <MASK><NEW_LINE>// check dba view<NEW_LINE>try {<NEW_LINE>try (JDBCStatement dbStat = session.createStatement()) {<NEW_LINE>try (JDBCResultSet dbR... | listSessions = new ArrayList<>(); |
1,231,635 | public void fitToSuppliedMarkers(ReadableArray markerIDsArray, ReadableMap edgePadding, boolean animated) {<NEW_LINE>if (map == null)<NEW_LINE>return;<NEW_LINE>LatLngBounds.Builder builder = new LatLngBounds.Builder();<NEW_LINE>String[] markerIDs = new String[markerIDsArray.size()];<NEW_LINE>for (int i = 0; i < markerI... | (Marker) feature.getFeature(); |
624,996 | public void onBindViewHolder(PreferenceViewHolder holder) {<NEW_LINE>super.onBindViewHolder(holder);<NEW_LINE>holder.itemView.setOnClickListener(new View.OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(View v) {<NEW_LINE>UsersPreferencesDirections.ActionNavUserPreferencesToNavUsersettings ... | setTitle(scaleUser.getUserName()); |
410,563 | private // Misc<NEW_LINE>void dispose() {<NEW_LINE>if (themeChangeListener != null) {<NEW_LINE>PlatformUI.getWorkbench().getThemeManager().removePropertyChangeListener(themeChangeListener);<NEW_LINE>themeChangeListener = null;<NEW_LINE>}<NEW_LINE>DBWorkbench.getPlatform().getDataSourceProviderRegistry().getGlobalDataSo... | getPreferenceStore().removePropertyChangeListener(dataPropertyListener); |
96,801 | public Description matchVariable(VariableTree tree, VisitorState state) {<NEW_LINE>if (tree.getInitializer() == null) {<NEW_LINE>return NO_MATCH;<NEW_LINE>}<NEW_LINE>LambdaExpressionTree lambda = LAMBDA_VISITOR.visit(tree.getInitializer(), null);<NEW_LINE>if (lambda == null) {<NEW_LINE>return NO_MATCH;<NEW_LINE>}<NEW_L... | lambda, fix, name, type); |
449,858 | public void loadState(Element parentNode) {<NEW_LINE>try {<NEW_LINE>ourLocalRunManager.set(this);<NEW_LINE>clear(false);<NEW_LINE>List<Element> children = parentNode.getChildren(CONFIGURATION);<NEW_LINE>Element[] sortedElements = children.toArray(new Element[children.size()]);<NEW_LINE>// ensure templates are loaded fi... | add(settings.getConfiguration()); |
1,820,185 | public GeneralCommandLine createCommandLine() throws ExecutionException {<NEW_LINE>if (myGoRoot == null) {<NEW_LINE>throw new ExecutionException("Sdk is not set or Sdk home path is empty for module");<NEW_LINE>}<NEW_LINE>GeneralCommandLine commandLine = !myPtyDisabled && PtyCommandLine.isEnabled() ? new PtyCommandLine(... | GoConstants.PATH), true)); |
248,014 | private void tryUpdateData(String monthUrlString, final String regionUrlString) {<NEW_LINE>GetJsonAsyncTask.OnResponseListener<Protocol.TotalChangesByMonthResponse> onResponseListener = new GetJsonAsyncTask.OnResponseListener<Protocol.TotalChangesByMonthResponse>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void on... | >(Protocol.TotalChangesByMonthResponse.class); |
437,181 | public void generateAssignment(BlockScope currentScope, CodeStream codeStream, Assignment assignment, boolean valueRequired) {<NEW_LINE>FieldBinding codegenBinding = this.binding.original();<NEW_LINE>if (codegenBinding.canBeSeenBy(this.actualReceiverType, this, currentScope)) {<NEW_LINE>this.receiver.generateCode(curre... | generateCode(currentScope, codeStream, true); |
1,556,755 | private Resource.Builder doCreateResourceBuilder() {<NEW_LINE>if (!disableValidation) {<NEW_LINE>checkForNonPublicMethodIssues();<NEW_LINE>}<NEW_LINE>final Class<?> annotatedResourceClass = ModelHelper.getAnnotatedResourceClass(handlerClass);<NEW_LINE>final Path rPathAnnotation = <MASK><NEW_LINE>final boolean keepEncod... | annotatedResourceClass.getAnnotation(Path.class); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.