idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
892,691 | public static void addEntityManagementRelatedClasses(Context context) {<NEW_LINE>ModuleManager moduleManager = <MASK><NEW_LINE>ModuleEnvironment environment = moduleManager.getEnvironment();<NEW_LINE>NetworkSystem networkSystem = context.get(NetworkSystem.class);<NEW_LINE>// Entity Manager<NEW_LINE>PojoEntityManager en... | context.get(ModuleManager.class); |
381,321 | private List<CSSASMechConfig> extractASMech(Map<String, Object> authenticationLayerProperties) {<NEW_LINE>List<CSSASMechConfig> cssasMechConfigs = new ArrayList<CSSASMechConfig>();<NEW_LINE>List<String> configuredMechanisms = new ArrayList<String>();<NEW_LINE>String establishTrustInClient = (String) authenticationLayer... | authenticator, domain, required, authenticationLayerProperties); |
1,301,287 | public PricingDetail unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>PricingDetail pricingDetail = new PricingDetail();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument())<NEW_LINE>targetDepth += 1;<NEW_L... | int xmlEvent = context.nextEvent(); |
630,369 | private void declareExchange(final String rootName, String group, final Exchange exchangeArg) {<NEW_LINE>Exchange exchange = exchangeArg;<NEW_LINE>for (DeclarableCustomizer customizer : this.customizers) {<NEW_LINE>exchange = (<MASK><NEW_LINE>}<NEW_LINE>try {<NEW_LINE>this.rabbitAdmin.declareExchange(exchange);<NEW_LIN... | Exchange) customizer.apply(exchange); |
698,978 | final DescribeReplicationTasksResult executeDescribeReplicationTasks(DescribeReplicationTasksRequest describeReplicationTasksRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeReplicationTasksRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetri... | addHandlerContext(HandlerContextKey.SERVICE_ID, "Database Migration Service"); |
1,316,582 | private static void downloadEN_US(File localeFile) {<NEW_LINE>try {<NEW_LINE>// Let the user know we are downloading the JAR<NEW_LINE>GeyserImpl.getInstance().getLogger().info(GeyserLocale.getLocaleStringLog("geyser.locale.download.en_us"));<NEW_LINE>GeyserImpl.getInstance().getLogger().debug("Download URL: " + clientJ... | (GeyserLocale.getLocaleStringLog("geyser.locale.download.en_us.done")); |
1,035,407 | public byte[] asn1Encode() throws Asn1Exception, IOException {<NEW_LINE>DerOutputStream bytes = new DerOutputStream();<NEW_LINE>DerOutputStream temp = new DerOutputStream();<NEW_LINE>DerValue[] der = new DerValue[4];<NEW_LINE>temp.putInteger(BigInteger.valueOf(tkt_vno));<NEW_LINE>bytes.write(DerValue.createTag(DerValue... | getRealm().asn1Encode()); |
1,770,858 | public static ListCompliancePackTemplatesResponse unmarshall(ListCompliancePackTemplatesResponse listCompliancePackTemplatesResponse, UnmarshallerContext _ctx) {<NEW_LINE>listCompliancePackTemplatesResponse.setRequestId(_ctx.stringValue("ListCompliancePackTemplatesResponse.RequestId"));<NEW_LINE>CompliancePackTemplates... | ("ListCompliancePackTemplatesResponse.CompliancePackTemplatesResult.CompliancePackTemplates[" + i + "].AutomationHelpUrl")); |
1,554,485 | public void computeMacAndEncode(JwtSignRequest request, StreamObserver<JwtSignResponse> responseObserver) {<NEW_LINE>JwtSignResponse response;<NEW_LINE>try {<NEW_LINE>KeysetHandle keysetHandle = CleartextKeysetHandle.read(BinaryKeysetReader.withBytes(request.getKeyset().toByteArray()));<NEW_LINE>RawJwt rawJwt = convert... | setSignedCompactJwt(signedCompactJwt).build(); |
1,410,873 | public void parseDetail(ByteBuffer bb) throws IOException {<NEW_LINE>objectTypeIndication = IsoTypeReader.readUInt8(bb);<NEW_LINE>int data = IsoTypeReader.readUInt8(bb);<NEW_LINE>streamType = data >>> 2;<NEW_LINE>upStream = (data >> 1) & 0x1;<NEW_LINE>bufferSizeDB = IsoTypeReader.readUInt24(bb);<NEW_LINE>maxBitRate = I... | = bb.position() - begin; |
1,210,775 | public void process(final LifecycleEventsProto.StatusEvent statusEvent) {<NEW_LINE>String message = " " + statusEvent.statusEventType <MASK><NEW_LINE>if (statusEvent instanceof LifecycleEventsProto.WorkerStatusEvent) {<NEW_LINE>LifecycleEventsProto.WorkerStatusEvent wse = (LifecycleEventsProto.WorkerStatusEvent) status... | + " " + statusEvent.message + " "; |
15,726 | public static DescribeAccountsResponse unmarshall(DescribeAccountsResponse describeAccountsResponse, UnmarshallerContext context) {<NEW_LINE>describeAccountsResponse.setRequestId(context.stringValue("DescribeAccountsResponse.RequestId"));<NEW_LINE>describeAccountsResponse.setPageSize(context.integerValue("DescribeAccou... | ("DescribeAccountsResponse.Items[" + i + "].TelephoneNum")); |
565,748 | public org.mlflow.api.proto.ModelRegistry.RegisteredModel buildPartial() {<NEW_LINE>org.mlflow.api.proto.ModelRegistry.RegisteredModel result = new org.mlflow.api.proto.ModelRegistry.RegisteredModel(this);<NEW_LINE>int from_bitField0_ = bitField0_;<NEW_LINE>int to_bitField0_ = 0;<NEW_LINE>if (((from_bitField0_ & 0x0000... | util.Collections.unmodifiableList(latestVersions_); |
661,682 | public J visitBinary(G.Binary binary, P p) {<NEW_LINE>G.Binary b = binary;<NEW_LINE>b = b.withPrefix(visitSpace(b.getPrefix(), GSpace.Location.BINARY_PREFIX, p));<NEW_LINE>b = b.withMarkers(visitMarkers(b.getMarkers(), p));<NEW_LINE>Expression temp = (<MASK><NEW_LINE>if (!(temp instanceof G.Binary)) {<NEW_LINE>return t... | Expression) visitExpression(b, p); |
219,314 | public void registerMap() {<NEW_LINE>// 0 - Location<NEW_LINE>map(Type.POSITION);<NEW_LINE>// 1 - Action<NEW_LINE>map(Type.UNSIGNED_BYTE);<NEW_LINE>// 2 - NBT data<NEW_LINE>map(Type.NBT);<NEW_LINE>handler(new PacketHandler() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void handle(PacketWrapper wrapper) throws Except... | ), position, tag, true); |
383,432 | public JSDynamicObject createPrototype(JSRealm realm, JSFunctionObject constructor) {<NEW_LINE>JSContext ctx = realm.getContext();<NEW_LINE>JSObject prototype = JSObjectUtil.createOrdinaryPrototypeObject(realm);<NEW_LINE>JSObjectUtil.putConstructorProperty(ctx, prototype, constructor);<NEW_LINE>JSObjectUtil.putBuiltinA... | (TemporalPlainDatePrototypeBuiltins.BUILTINS, DAY_OF_WEEK)); |
1,808,197 | public // tag::message[]<NEW_LINE>void onSessionMessage(final ClientSession session, final long timestamp, final DirectBuffer buffer, final int offset, final int length, final Header header) {<NEW_LINE>// <1><NEW_LINE>final long correlationId = buffer.getLong(offset + CORRELATION_ID_OFFSET);<NEW_LINE>final long custome... | ) 1 : (byte) 0); |
1,408,365 | private static // method declaration's throws clause to declare the new checked exceptions<NEW_LINE>void fixThrows(VisitorState state, SuggestedFix.Builder fix) {<NEW_LINE>MethodTree methodTree = state.findEnclosing(MethodTree.class);<NEW_LINE>if (methodTree == null || methodTree.getThrows().isEmpty()) {<NEW_LINE>retur... | newThrows = new ArrayList<>(); |
1,551,354 | public void modifyTestElement(TestElement element) {<NEW_LINE>super.modifyTestElement(element);<NEW_LINE>final String method = element.getPropertyAsString(HTTPSamplerBase.METHOD);<NEW_LINE>final GraphQLRequestParams params = new GraphQLRequestParams(operationNameText.getText(), queryContent.getText(), variablesContent.... | .GET.equals(method)); |
1,624,535 | public void voidCommand(TelCommand telCommand) throws Throwable {<NEW_LINE>String[] args = telCommand.getCommandArgs();<NEW_LINE>String argsJoin = StringUtils.join(args, "");<NEW_LINE>argsJoin = argsJoin.replace("\\s+", " ");<NEW_LINE>args = argsJoin.split("=");<NEW_LINE>//<NEW_LINE>if (args.length > 0) {<NEW_LINE>Stri... | args[0].trim(); |
1,511,392 | public String asi(final ICalloutField calloutField) {<NEW_LINE>if (isCalloutActive()) {<NEW_LINE>return NO_ERROR;<NEW_LINE>}<NEW_LINE>final I_M_InOutLine inoutLine = calloutField.getModel(I_M_InOutLine.class);<NEW_LINE>final int asiId = inoutLine.getM_AttributeSetInstance_ID();<NEW_LINE>if (asiId <= 0) {<NEW_LINE>retur... | int M_Product_ID = inoutLine.getM_Product_ID(); |
985,897 | static void completeInPlaceSubtract(TBigInteger op1, TBigInteger op2) {<NEW_LINE>int resultSign = op1.compareTo(op2);<NEW_LINE>if (op1.sign == 0) {<NEW_LINE>System.arraycopy(op2.digits, 0, op1.digits, 0, op2.numberLength);<NEW_LINE>op1.sign = -op2.sign;<NEW_LINE>} else if (op1.sign != op2.sign) {<NEW_LINE>add(op1.digit... | op1.sign = -op1.sign; |
1,819,703 | // obtains the data and calculates the grid of results<NEW_LINE>private static void calculate(CalculationRunner runner) {<NEW_LINE>// the trades for which to calculate a P&L series<NEW_LINE>List<Trade> trades = ImmutableList.of(createTrade());<NEW_LINE>// the columns, specifying the measures to be calculated<NEW_LINE>L... | ReferenceData refData = ReferenceData.standard(); |
277,289 | public Object evaluateRecord(OIdentifiable iRecord, ODocument iCurrentResult, OSQLFilterCondition iCondition, Object iLeft, Object iRight, OCommandContext iContext, final ODocumentSerializer serializer) {<NEW_LINE>List<Number> left <MASK><NEW_LINE>double lat = left.get(0).doubleValue();<NEW_LINE>double lon = left.get(1... | = (List<Number>) iLeft; |
1,283,536 | public Future putBlob(final Callback callback, final MetricsCollector metricsCollector) {<NEW_LINE>int randomNum = localRandom.nextInt((maxBlobSize - minBlobSize) + 1) + minBlobSize;<NEW_LINE>final byte[] blob = new byte[randomNum];<NEW_LINE>byte[] usermetadata = new byte[random.nextInt(1024)];<NEW_LINE>BlobProperties ... | futureResult.done(null, e); |
1,093,630 | public ListenableFuture<?> processFor(long maxRuntime, long start) {<NEW_LINE>checkLockNotHeld("Can not process for a duration while holding the driver lock");<NEW_LINE>try (DriverLockResult lockResult = tryLockAndProcessPendingStateChanges(100, TimeUnit.MILLISECONDS)) {<NEW_LINE>if (lockResult.wasAcquired()) {<NEW_LIN... | getTaskContext().getYieldExecutor()); |
143,263 | public static String escape(String source, char delimiter) {<NEW_LINE>byte[] bytes = source.getBytes(UTF8);<NEW_LINE>ByteArrayOutputStream result = new ByteArrayOutputStream();<NEW_LINE>for (byte b : bytes) {<NEW_LINE>int val = b;<NEW_LINE>if (val < 0)<NEW_LINE>val += 256;<NEW_LINE>if (b == delimiter) {<NEW_LINE>result... | result.toByteArray(), UTF8); |
303,975 | public static void renderHUD(PoseStack ms, Player player, ItemStack stack, float pticks) {<NEW_LINE>int xo = Minecraft.getInstance().getWindow().getGuiScaledWidth() / 2 - 20;<NEW_LINE>int y = Minecraft.getInstance().getWindow().getGuiScaledHeight() / 2 + 20;<NEW_LINE>if (!player.getAbilities().flying) {<NEW_LINE>int cd... | 40, y - 1, 0x88000000); |
1,021,431 | public void validate() throws InvalidPropertyException {<NEW_LINE>PrintStream out = DebugTracer.getPrintStream();<NEW_LINE>boolean good = false;<NEW_LINE><MASK><NEW_LINE>if (debug) {<NEW_LINE>out.println("ActivationAnnNonJB1.validate(): Current contents of Prop1: " + prop1);<NEW_LINE>out.println("ActivationAnnNonJB1.va... | boolean debug = DebugTracer.isDebugActivationSpec(); |
240,049 | public void marshall(Event event, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (event == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(event.getArn(), ARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(ev... | event.getLastUpdatedTime(), LASTUPDATEDTIME_BINDING); |
241,655 | private synchronized V _put(K key, V value, long keepTime, MODE m) {<NEW_LINE>ENTRY<K, V>[] tab = table;<NEW_LINE>int index = hash(key) % tab.length;<NEW_LINE>for (ENTRY<K, V> e = tab[index]; e != null; e = e.next) {<NEW_LINE>if (CompareUtil.equals(e.key, key)) {<NEW_LINE>V old = e.value;<NEW_LINE>e.value = value;<NEW_... | header, header.link_next, e); |
513,270 | public void visitAPIResponse(AnnotationModel annotation, AnnotatedElement element, ApiContext context) {<NEW_LINE>APIResponseImpl apiResponse = <MASK><NEW_LINE>Operation workingOperation = context.getWorkingOperation();<NEW_LINE>// Handle exception mappers<NEW_LINE>if (workingOperation == null) {<NEW_LINE>if (element i... | APIResponseImpl.createInstance(annotation, context); |
452,710 | static void savePrediction8x8(DecoderState sharedState, int mbX, MvList x) {<NEW_LINE>sharedState.mvTopLeft.copyPair(0, sharedState.mvTop, (mbX << 2) + 3);<NEW_LINE>sharedState.mvLeft.<MASK><NEW_LINE>sharedState.mvLeft.copyPair(1, x, 7);<NEW_LINE>sharedState.mvLeft.copyPair(2, x, 11);<NEW_LINE>sharedState.mvLeft.copyPa... | copyPair(0, x, 3); |
1,439,930 | public static void checkDisplaySize(Context context, Configuration newConfiguration) {<NEW_LINE>try {<NEW_LINE>density = context.getResources().getDisplayMetrics().density;<NEW_LINE>Configuration configuration = newConfiguration;<NEW_LINE>if (configuration == null) {<NEW_LINE>configuration = context.getResources().getC... | ceil(configuration.screenHeightDp * density); |
986,974 | FinishPatchOperation popFinishPatchAction(String patchId, boolean clear) {<NEW_LINE>String value = getPreferences().get(HOOK_PREFIX + <MASK><NEW_LINE>if (value == null)<NEW_LINE>return null;<NEW_LINE>String[] values = value.split(DELIMITER);<NEW_LINE>if (clear) {<NEW_LINE>getPreferences().remove(HOOK_PREFIX + type + HO... | type + HOOK_QFINISH_ + patchId, null); |
69,790 | // actionPerformed<NEW_LINE>private void send() throws Exception {<NEW_LINE>final IMsgBL msgBL = Services.get(IMsgBL.class);<NEW_LINE>final <MASK><NEW_LINE>setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));<NEW_LINE>confirmPanel.getOKButton().setEnabled(false);<NEW_LINE>final StringTokenizer st = new StringToke... | Properties ctx = Env.getCtx(); |
178,140 | public ActorFuture<Void> copySnapshot(final PersistedSnapshot snapshot, final Path targetDirectory) {<NEW_LINE>final CompletableActorFuture<Void> result = new CompletableActorFuture<>();<NEW_LINE>actor.run(() -> {<NEW_LINE>if (!Files.exists(snapshot.getPath())) {<NEW_LINE>result.completeExceptionally(String.format("Exp... | )), new FileNotFoundException()); |
1,020,877 | public MethodInsnAST visit(int lineNo, String line) throws ASTParseException {<NEW_LINE>try {<NEW_LINE>String[] trim = line.trim().split("\\s+");<NEW_LINE>if (trim.length < 2)<NEW_LINE>throw new ASTParseException(lineNo, "Not enough paramters");<NEW_LINE>int start = line.indexOf(trim[0]);<NEW_LINE>// op<NEW_LINE>Opcode... | nameParser.visit(lineNo, nameS); |
1,106,897 | static Alert buildDeleteAlertDialog(List<Path> pathsLabel) {<NEW_LINE>Alert deleteAlert = new WindowModalAlert(Alert.AlertType.WARNING, null, ButtonType.YES, ButtonType.CANCEL);<NEW_LINE>deleteAlert.setHeaderText("Do you want to delete selected path(s)?");<NEW_LINE>DialogPane dialogPane = deleteAlert.getDialogPane();<N... | = new ListView<>(paths); |
900,345 | final GetRelationalDatabaseLogEventsResult executeGetRelationalDatabaseLogEvents(GetRelationalDatabaseLogEventsRequest getRelationalDatabaseLogEventsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getRelationalDatabaseLogEventsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = execu... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
1,690,468 | public ProcessInstance execute(CommandContext commandContext) {<NEW_LINE>ProcessEngineConfigurationImpl processEngineConfiguration = CommandContextUtil.getProcessEngineConfiguration(commandContext);<NEW_LINE>ProcessDefinition processDefinition = getProcessDefinition(processEngineConfiguration, commandContext);<NEW_LINE... | referenceId, referenceType, stageInstanceId, false); |
1,289,167 | public static void main(String[] args) {<NEW_LINE>try {<NEW_LINE>CommandLine cl = parseComandLine(args);<NEW_LINE>DcmValidate main = new DcmValidate();<NEW_LINE>String iodFile = cl.getOptionValue("iod");<NEW_LINE>if (iodFile == null)<NEW_LINE>throw new MissingOptionException(Arrays.asList("iod"));<NEW_LINE>main.setIOD(... | > fnames = cl.getArgList(); |
1,293,742 | private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents<NEW_LINE>void initComponents() {<NEW_LINE>tvExpressions = new BeanTreeView();<NEW_LINE>lblPropertyExpressions = new javax.swing.JLabel();<NEW_LINE>jScrollPane2 = new javax.swing.JScrollPane();<NEW_LINE>tpDesc = new javax.s... | MAX_VALUE).addContainerGap())); |
467,570 | public Mono<Response<Void>> deleteWithResponseAsync(String scope, String roleManagementPolicyAssignmentName) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (scope ... | )).readOnly())); |
498,837 | public void performInstrospect(HttpServletRequest req, HttpServletResponse resp, StringBuffer sb) {<NEW_LINE>sb.append("\n\nPreparing Introspect Data:");<NEW_LINE>String clientId = req.getParameter("clientId");<NEW_LINE>String clientSecret = req.getParameter("clientSecret");<NEW_LINE>sb.append("\n***clientID:" + client... | IdToken idToken = PropagationHelper.getIdToken(); |
1,056,144 | protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception {<NEW_LINE>Map<String, Object> map = new HashMap<>();<NEW_LINE>int id = ServletRequestUtils.getRequiredIntParameter(request, "id");<NEW_LINE>User user = securityService.getCurrentUser(request);<NEW_LI... | ModelAndView("playlist", "model", map); |
1,852,559 | protected WireFeed parseChannel(final Element rssRoot, final Locale locale) {<NEW_LINE>final Channel channel = new Channel(getType());<NEW_LINE>channel.setStyleSheet(getStyleSheet(rssRoot.getDocument()));<NEW_LINE>final Element eChannel = rssRoot.getChild("channel", getRSSNamespace());<NEW_LINE>final Element title = eC... | setTitle(title.getText()); |
1,255,639 | protected List<float[]> convertColumn(float[] cLine) {<NEW_LINE>if (cLine.length < 4)<NEW_LINE>throw new RuntimeException(MessageLocalization.getComposedMessage("no.valid.column.line.found"));<NEW_LINE>List<float[]> cc = new ArrayList<>();<NEW_LINE>for (int k = 0; k < cLine.length - 2; k += 2) {<NEW_LINE>if (cLine.leng... | (minY, r[0]); |
1,062,257 | public Optional<AbstractDeclaring> typeAdaptersProvider() {<NEW_LINE>Optional<DeclaringType> typeDefining = declaringType().isPresent() ? Optional.of(declaringType().get().associatedTopLevel()) : Optional.<DeclaringType>absent();<NEW_LINE>Optional<TypeAdaptersMirror> typeDefined = typeDefining.isPresent() ? typeDefinin... | AbstractDeclaring>of(packageOf()); |
313,028 | public CreateGroupResult createGroup(CreateGroupRequest createGroupRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createGroupRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<Cre... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
465,378 | protected void processFingerprintVerification(XmppUri uri) {<NEW_LINE>if (mConversation != null && mAccount != null && uri.hasFingerprints() && mAccount.getAxolotlService().getCryptoTargets(mConversation).contains(uri.getJid())) {<NEW_LINE>boolean performedVerification = xmppConnectionService.verifyFingerprints(mAccoun... | Toast.LENGTH_SHORT).show(); |
890,981 | public void actionPerformed(ActionEvent e) {<NEW_LINE>TelaPrincipal t = PortugolStudio<MASK><NEW_LINE>AbaCodigoFonte abaCodigoFonte = AbaCodigoFonte.novaAba();<NEW_LINE>abaCodigoFonte.setCodigoFonte(codigoFonte, recente, true);<NEW_LINE>t.getPainelTabulado().adicionaAba(abaCodigoFonte);<NEW_LINE>// List<File> arquivo =... | .getInstancia().getTelaPrincipal(); |
1,371,969 | private RequestController fetchThumbnail(@NonNull String imageUrl, @NonNull Consumer<Optional<Attachment>> callback) {<NEW_LINE>Call call = client.newCall(new Request.Builder().url(imageUrl).build());<NEW_LINE>CallRequestController controller = new CallRequestController(call);<NEW_LINE>SignalExecutors.UNBOUNDED.execute... | accept(Optional.empty()); |
1,263,636 | public Response createTokenResponse(UserModel user, UserSessionModel userSession, ClientSessionContext clientSessionCtx, String scopeParam, boolean code) {<NEW_LINE>AccessToken token = tokenManager.createClientAccessToken(session, realm, <MASK><NEW_LINE>TokenManager.AccessTokenResponseBuilder responseBuilder = tokenMan... | client, user, userSession, clientSessionCtx); |
496,600 | public static double d(int[] x1, int[] x2, int radius) {<NEW_LINE>int n1 = x1.length;<NEW_LINE>int n2 = x2.length;<NEW_LINE>double[][] table = new double[2][n2 + 1];<NEW_LINE>table[0][0] = 0;<NEW_LINE>for (int i = 1; i <= n2; i++) {<NEW_LINE>table[0][i] = Double.POSITIVE_INFINITY;<NEW_LINE>}<NEW_LINE>for (int i = 1; i ... | [0] = table[1]; |
1,389,273 | public static void importChunks(WorldDirectories source, Progress progressChannel, boolean headless, boolean overwrite, SelectionData sourceSelection, SelectionData targetSelection, List<Range> ranges, Point3i offset, DataProperty<Map<Point2i, RegionDirectories>> tempFiles) {<NEW_LINE>try {<NEW_LINE>WorldDirectories wd... | != null && sourceSelection.inverted(); |
99,142 | public Request<DescribeSpotFleetRequestsRequest> marshall(DescribeSpotFleetRequestsRequest describeSpotFleetRequestsRequest) {<NEW_LINE>if (describeSpotFleetRequestsRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<DescribeSpotFleetRequests... | request.addParameter("Action", "DescribeSpotFleetRequests"); |
175,136 | public Request<AssociateSecurityKeyRequest> marshall(AssociateSecurityKeyRequest associateSecurityKeyRequest) {<NEW_LINE>if (associateSecurityKeyRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(AssociateSecurityKeyRequest)");<NEW_LINE>}<NEW_LINE>Request<AssociateSecurityK... | jsonWriter = JsonUtils.getJsonWriter(stringWriter); |
395,487 | final DescribeConfigurationResult executeDescribeConfiguration(DescribeConfigurationRequest describeConfigurationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeConfigurationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>... | (super.beforeMarshalling(describeConfigurationRequest)); |
435,525 | public void receiveResponse(HttpClientResponse clientResponse) {<NEW_LINE>int sc = clientResponse.statusCode();<NEW_LINE>int maxRedirects = request.followRedirects ? client.getOptions().getMaxRedirects() : 0;<NEW_LINE>this.clientResponse = clientResponse;<NEW_LINE>if (redirects < maxRedirects && sc >= 300 && sc < 400) ... | .getHeader(HttpHeaders.LOCATION)); |
1,158,069 | public ItemStack doBukkitEvent_PlayerItemConsumeEvent(ItemStack s, World w, LivingEntity e) {<NEW_LINE>PICE_canceled = false;<NEW_LINE>if (get() instanceof ServerPlayerEntity) {<NEW_LINE>org.bukkit.inventory.ItemStack craftItem = CraftItemStack.asBukkitCopy(get().activeItemStack);<NEW_LINE>PlayerItemConsumeEvent event ... | getPluginManager().callEvent(event); |
1,729,304 | public void replaceSelect() {<NEW_LINE>ReplaceRuleBean oldRuleBean = new ReplaceRuleBean();<NEW_LINE>oldRuleBean.setReplaceSummary(binding.pageView.getSelectStr().trim());<NEW_LINE>oldRuleBean.setEnable(true);<NEW_LINE>oldRuleBean.setRegex(binding.pageView.getSelectStr().trim());<NEW_LINE>oldRuleBean.setIsRegex(false);... | ().getTag())); |
450,322 | public ParseException generateParseException() {<NEW_LINE>jj_expentries.clear();<NEW_LINE>boolean[] la1tokens = new boolean[157];<NEW_LINE>if (jj_kind >= 0) {<NEW_LINE>la1tokens[jj_kind] = true;<NEW_LINE>jj_kind = -1;<NEW_LINE>}<NEW_LINE>for (int i = 0; i < 177; i++) {<NEW_LINE>if (jj_la1[i] == jj_gen) {<NEW_LINE>for (... | .lexStateNames[token_source.curLexState]); |
609,000 | final GetJobRunResult executeGetJobRun(GetJobRunRequest getJobRunRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getJobRunRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetJobRunRequest> request = null;<NEW_LINE>Response<GetJobRu... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
1,151,996 | public static void generateCustomPolicy(LibertyServer server, String... permissionsToAdd) throws Exception {<NEW_LINE>if (!server.isJava2SecurityEnabled() || permissionsToAdd == null || permissionsToAdd.length == 0)<NEW_LINE>return;<NEW_LINE>String policyPath;<NEW_LINE>if (JavaInfo.JAVA_VERSION >= 9) {<NEW_LINE>policyP... | throw new Exception("Policy file did not contain special token 'grant {'. The contents were: " + policyContents); |
893,895 | private JsonResponseUpsertItemBuilder syncJsonContact(@NonNull final OrgId orgId, @NonNull final JsonRequestContactUpsertItem jsonContact, @NonNull final SyncAdvise parentSyncAdvise, @NonNull final ShortTermContactIndex shortTermIndex) {<NEW_LINE>final ExternalIdentifier contactIdentifier = ExternalIdentifier.of(jsonCo... | ? SyncOutcome.UPDATED : SyncOutcome.NOTHING_DONE; |
1,728,138 | protected void onSaveInstanceState(Bundle outState) {<NEW_LINE>super.onSaveInstanceState(outState);<NEW_LINE>outState.putInt(getString(R.string.frag_prev_mid), initalMiddleFragment);<NEW_LINE>outState.putInt(getString(R.string.frag_prev_bottom), initalBottomFragment);<NEW_LINE>outState.putInt(getString(R.string.frag_pr... | outState.putInt("checkMode", modeCheck); |
591,070 | default <T1, T2, T3> Tuple3<Iterator<T1>, Iterator<T2>, Iterator<T3>> unzip3(Function<? super T, ? extends T1> unzipper1, Function<? super T, ? extends T2> unzipper2, Function<? super T, ? extends T3> unzipper3) {<NEW_LINE>Objects.requireNonNull(unzipper1, "unzipper1 is null");<NEW_LINE>Objects.requireNonNull(unzipper2... | iterator().map(unzipper2); |
451,794 | public RealInfo generateRealInfo() {<NEW_LINE>double min = Double.POSITIVE_INFINITY;<NEW_LINE>double max = Double.NEGATIVE_INFINITY;<NEW_LINE>double sum = 0.0;<NEW_LINE>double sumSquares = 0.0;<NEW_LINE>double mean;<NEW_LINE>if (valueCounts != null) {<NEW_LINE>List<Map.Entry<Double, MutableLong>> entries = valueCounts.... | double value = e.getKey(); |
1,479,296 | private void uploadAutoModeContextSettings(File remoteFolder) throws SharedConfigurationException {<NEW_LINE>logger.log(Level.INFO, "Uploading shared configuration to {0}", remoteFolder.getAbsolutePath());<NEW_LINE>publishTask("Uploading AutoModeContext configuration files");<NEW_LINE>// Make a subfolder<NEW_LINE>File ... | = new File(remoteFolder, AUTO_MODE_FOLDER); |
1,207,191 | public static void carry(int[] z) {<NEW_LINE>int z0 = z[0], z1 = z[1], z2 = z[2], z3 = z[3], z4 = z[4];<NEW_LINE>int z5 = z[5], z6 = z[6], z7 = z[7], z8 = z[8], z9 = z[9];<NEW_LINE>z2 += (z1 >> 26);<NEW_LINE>z1 &= M26;<NEW_LINE>z4 += (z3 >> 26);<NEW_LINE>z3 &= M26;<NEW_LINE>z7 += (z6 >> 26);<NEW_LINE>z6 &= M26;<NEW_LIN... | z4 += (z3 >> 26); |
762,249 | private String queryCmdbName(List<String> ips) {<NEW_LINE>Map<String, Integer> nameCountMap = new HashMap<String, Integer>();<NEW_LINE>for (String ip : ips) {<NEW_LINE>String cmdbDomain = queryDomainFromCMDB(ip);<NEW_LINE>if (checkIfValid(cmdbDomain)) {<NEW_LINE>Integer count = nameCountMap.get(cmdbDomain);<NEW_LINE>if... | put(cmdbDomain, count + 1); |
767,472 | private List<GlobalConfig> prepareTimeoutGlobalConfig() {<NEW_LINE>Set<Class<? extends ConfigurableTimeoutMessage>> allConfigurableMessageClasses = BeanUtils.reflections.getSubTypesOf(ConfigurableTimeoutMessage.class).stream().filter(clz -> !APISyncCallMessage.class.isAssignableFrom(clz)).collect(Collectors.toSet());<N... | .format("timeout for message %s", clz)); |
1,345,700 | private void openChat(UserJid user, String text) {<NEW_LINE>UserJid bareAddress = user.getBareUserJid();<NEW_LINE>ArrayList<BaseEntity> entities = new ArrayList<>();<NEW_LINE>for (AbstractChat check : MessageManager.getInstance().getChats()) {<NEW_LINE>if (check.isActive() && check.getUser().equals(bareAddress)) {<NEW_... | .get(0), text); |
742,596 | protected Color convertToPresentation(String modelValue) throws ConversionException {<NEW_LINE>if (modelValue == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (modelValue.startsWith("#")) {<NEW_LINE>modelValue = modelValue.substring(<MASK><NEW_LINE>}<NEW_LINE>try {<NEW_LINE>switch(modelValue.length()) {<NEW_LINE... | 1, modelValue.length()); |
275,429 | public List<T> compactThirteen(List<T> collection, int position) {<NEW_LINE>_N = neighbour[position][Positions.N.ordinal()];<NEW_LINE>_S = neighbour[position][<MASK><NEW_LINE>_E = neighbour[position][Positions.E.ordinal()];<NEW_LINE>_W = neighbour[position][Positions.W.ordinal()];<NEW_LINE>_NW = neighbour[neighbour[pos... | Positions.S.ordinal()]; |
475,057 | private Map<String, Object> export() {<NEW_LINE>Map<String, Object> map = new HashMap<>();<NEW_LINE>exportBoolean(map, "aue", auto_up_enabled);<NEW_LINE>exportBoolean(map, "ause", auto_up_seeding_enabled);<NEW_LINE>exportBoolean(map, "sle", seeding_limits_enabled);<NEW_LINE>exportInt(map, "ul", up_limit);<NEW_LINE>expo... | c_list = new ArrayList<>(); |
1,131,487 | private RelOptCost hashJoinCumulativeCostLowerBound(Join join, RelMetadataQuery mq, VolcanoPlanner planner) {<NEW_LINE>final double leftRowCount = mq.getRowCount(join.getLeft());<NEW_LINE>final double rightRowCount = mq.getRowCount(join.getRight());<NEW_LINE>final RelDataType probeSideRowType;<NEW_LINE>final RelDataTyp... | hashJoinCpu, hashJoinMemory, 0, 0); |
1,505,012 | final GetDetectorModelAnalysisResultsResult executeGetDetectorModelAnalysisResults(GetDetectorModelAnalysisResultsRequest getDetectorModelAnalysisResultsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getDetectorModelAnalysisResultsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = ... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
372,559 | public void updateImageRampupPlan(final ImageRampupPlanRequestDTO imageRampupPlanRequest) throws ImageMgmtException {<NEW_LINE>// input validation for image version create request<NEW_LINE>final List<String> validationErrors = new ArrayList<>();<NEW_LINE>if (!ValidatorUtils.validateObject(imageRampupPlanRequest, valida... | .converter.convertToDataModel(imageRampupPlanRequest)); |
1,199,600 | private void encodeMarkup(FacesContext context, Knob knob) throws IOException {<NEW_LINE>ResponseWriter writer = context.getResponseWriter();<NEW_LINE>Object value = knob.getValue() != null ? knob.getValue() : 0;<NEW_LINE>writer.startElement("input", knob);<NEW_LINE>writer.writeAttribute("id", knob.getClientId(), null)... | ), knob.isDisabled()); |
583,077 | private void computeKeepIndexing() {<NEW_LINE>if (_keepIndexing) {<NEW_LINE>_segmentLogger.debug(<MASK><NEW_LINE>if ((System.currentTimeMillis() >= _segmentEndTimeThreshold) || _realtimeSegment.getNumDocsIndexed() >= _streamConfig.getFlushThresholdRows()) {<NEW_LINE>if (_realtimeSegment.getNumDocsIndexed() == 0) {<NEW_... | "Current indexed {} raw events", _realtimeSegment.getNumDocsIndexed()); |
1,020,419 | public com.amazonaws.services.alexaforbusiness.model.SkillNotLinkedException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.alexaforbusiness.model.SkillNotLinkedException skillNotLinkedException = new com.amazonaws.services.<MASK><NEW_LINE>int originalDepth = c... | alexaforbusiness.model.SkillNotLinkedException(null); |
1,199,096 | protected Iterator<RowResult<Value>> computeNext() {<NEW_LINE>if (endOfResults) {<NEW_LINE>return endOfData();<NEW_LINE>} else {<NEW_LINE>try (ConnectionSupplier conns = new ConnectionSupplier(connectionPool);<NEW_LINE>ClosableIterator<AgnosticLightResultRow> iter = selectNextPage(conns)) {<NEW_LINE>List<RowResult<Valu... | ).ifPresent(results::add); |
957,996 | protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) {<NEW_LINE>String scriptLocation = element.getAttribute(LOCATION_ATTRIBUTE);<NEW_LINE>String scriptText = DomUtils.getTextValue(element);<NEW_LINE>if (StringUtils.hasText(scriptLocation) == StringUtils.hasText(scriptText... | (resolveScriptLocation(element, scriptLocation)); |
787,068 | private static URL[] classPath2URLArray(String classPath) {<NEW_LINE>if (Objects.isNull(classPath) || classPath.length() == 0) {<NEW_LINE>logger.error("Empty class Path!");<NEW_LINE>return new URL[] {};<NEW_LINE>}<NEW_LINE>String[] splited = classPath.split(":");<NEW_LINE>logger.info("Splited class path: " + String<MAS... | .join(",", splited)); |
132,421 | public Tuple2<Double, Double> calcHessianGradientLoss(Iterable<Tuple3<Double, Double, Vector>> labelVectors, DenseVector coefVector, DenseMatrix hessian, DenseVector grad) {<NEW_LINE>if (this.hasSecondDerivative()) {<NEW_LINE><MASK><NEW_LINE>for (int i = 0; i < size; ++i) {<NEW_LINE>grad.set(i, 0.0);<NEW_LINE>for (int ... | int size = grad.size(); |
119,065 | public okhttp3.Call postPingCall(SomeObj someObj, final ApiCallback _callback) throws ApiException {<NEW_LINE>String basePath = null;<NEW_LINE>// Operation Servers<NEW_LINE>String[] localBasePaths = new String[] {};<NEW_LINE>// Determine Base Path to Use<NEW_LINE>if (localCustomBaseUrl != null) {<NEW_LINE>basePath = lo... | String[] localVarAccepts = { "application/json" }; |
1,593,201 | public void afterCreate(VerticalViewActivity a) {<NEW_LINE>final VerticalViewActivity activity = getManagedComponent();<NEW_LINE>DocumentController.chooseFullScreen(activity, AppState.get().fullScreenMode);<NEW_LINE>if (++loadingCount == 1) {<NEW_LINE>documentModel = ActivityControllerStub.DM_STUB;<NEW_LINE>if (intent ... | LOG.d("codecType last", codecType); |
1,537,945 | private static FeedClient createFeedClient(CliArguments cliArgs) throws CliArguments.CliArgumentsException {<NEW_LINE>FeedClientBuilder builder = FeedClientBuilder.create(cliArgs.endpoint());<NEW_LINE>cliArgs.connections().ifPresent(builder::setConnectionsPerEndpoint);<NEW_LINE>cliArgs.maxStreamsPerConnection().ifPrese... | .ofSeconds(doom)))); |
982,905 | public void onSensorChanged(SensorEvent event) {<NEW_LINE>// Attention : sensor produces a lot of events & can hang the system<NEW_LINE>if (inUpdateValue) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>synchronized (this) {<NEW_LINE>if (!sensorRegistered) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>inUpdateValue = true;<NEW_LINE>tr... | heading = getAngle(avgValSin, avgValCos); |
1,758,648 | public void recordActivityEnd(ExecutionEntity executionEntity, String deleteReason, Date endTime) {<NEW_LINE>if (getHistoryConfigurationSettings().isHistoryEnabledForActivity(executionEntity.getProcessDefinitionId(), executionEntity.getActivityId())) {<NEW_LINE>String activityId = getActivityIdForExecution(executionEnt... | ), HistoryJsonConstants.TYPE_ACTIVITY_END, data); |
69,968 | private Mono<Response<Flux<ByteBuffer>>> updateTagsWithResponseAsync(String resourceGroupName, String networkInterfaceName, TagsObject parameters, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required... | this.client.mergeContext(context); |
34,293 | protected void handleReadyResponse(String response, JsonObject jo) {<NEW_LINE>if (TinyGUtils.isTinyGVersion(jo)) {<NEW_LINE>firmwareVersionNumber = TinyGUtils.getVersion(jo);<NEW_LINE>firmwareVersion = "G2Core " + firmwareVersionNumber;<NEW_LINE>}<NEW_LINE>capabilities.addCapability(CapabilitiesConstants.X_AXIS);<NEW_L... | comm.sendByteImmediately(TinyGUtils.COMMAND_ENQUIRE_STATUS); |
295,595 | private String contrast() {<NEW_LINE>final ShenyuDictDO before = (ShenyuDictDO) getBefore();<NEW_LINE>Objects.requireNonNull(before);<NEW_LINE>final ShenyuDictDO after = (ShenyuDictDO) getAfter();<NEW_LINE>Objects.requireNonNull(after);<NEW_LINE>if (Objects.equals(before, after)) {<NEW_LINE>return "it no change";<NEW_L... | final StringBuilder builder = new StringBuilder(); |
1,362,210 | private Result<TopicOffsetChangedEnum> checkTopicOffsetChanged(ClusterDO clusterDO, String topicName, Map<TopicPartition, Long> endOffsetMap) {<NEW_LINE>if (ValidateUtils.isNull(clusterDO) || ValidateUtils.isNull(topicName) || ValidateUtils.isEmptyMap(endOffsetMap)) {<NEW_LINE>return new Result<>(TopicOffsetChangedEnum... | get(entry.getKey()); |
791,749 | public void nextTuple() {<NEW_LINE>ConsumerRecord<K, V<MASK><NEW_LINE>if (record != null) {<NEW_LINE>// there are still records remaining for emission from the previous poll<NEW_LINE>emitConsumerRecord(record);<NEW_LINE>} else {<NEW_LINE>// all the records from previous poll have been<NEW_LINE>// emitted or this is ver... | > record = buffer.poll(); |
1,458,726 | private void removeJob(String resourceId, String group) {<NEW_LINE>if (StringUtils.equals(ScheduleGroup.API_SCENARIO_TEST.name(), group)) {<NEW_LINE>scheduleManager.removeJob(ApiScenarioTestJob.getJobKey(resourceId), ApiScenarioTestJob.getTriggerKey(resourceId));<NEW_LINE>} else if (StringUtils.equals(ScheduleGroup.TES... | , PerformanceTestJob.getTriggerKey(resourceId)); |
641,998 | public byte[] encode(MVCCRecord record) {<NEW_LINE>KeyMeta meta = KeyMeta.newBuilder().setCreateRevision(record.getCreateRev()).setModRevision(record.getModRev()).setVersion(record.getVersion()).setValueType(record.getValueType()).setExpireTime(record.getExpireTime()).build();<NEW_LINE>int metaLen = meta.getSerializedS... | throw new StateStoreRuntimeException("Failed to serialize key metadata", e); |
1,513,595 | public static void colorizeIcons(Context context, int iconType, GradientDrawable background, @ColorInt int defaultColor) {<NEW_LINE>switch(iconType) {<NEW_LINE>case Icons.VIDEO:<NEW_LINE>case Icons.IMAGE:<NEW_LINE>background.setColor(Utils.getColor(context<MASK><NEW_LINE>break;<NEW_LINE>case Icons.AUDIO:<NEW_LINE>backg... | , R.color.video_item)); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.