idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,490,661 | protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {<NEW_LINE>final String operation = req.getParameter("operation");<NEW_LINE>final String clientId = req.getParameter("clientId");<NEW_LINE>final String subject = req.getParameter("subject");<NEW_LINE>final String consumerGroup = r... | SYSTEM_ERROR, "invalid parameter", null))); |
672,083 | // Convenience method so you can run it in your IDE<NEW_LINE>public static void main(String[] args) {<NEW_LINE>PostgreSQLContainer<?> postgres = new PostgreSQLContainer<>();<NEW_LINE>postgres.start();<NEW_LINE>PgConnectOptions options = new PgConnectOptions().setPort(postgres.getMappedPort(5432)).setHost(postgres.getCo... | Vertx vertx = Vertx.vertx(); |
897,988 | private Map<String, TestClasspath> computeTestingClassPaths(ModuleList ml, PropertyEvaluator evaluator, Set<String> extraTestTypes) {<NEW_LINE>Map<String, TestClasspath> classpaths = new HashMap<String, TestClasspath>();<NEW_LINE>ProjectXMLManager pxm = new ProjectXMLManager(project);<NEW_LINE>Map<String, Set<TestModul... | nball = evaluator.getProperty("nb_all"); |
1,228,859 | public Collection<S> readCollection(final Local file) throws AccessDeniedException {<NEW_LINE>if (!file.exists()) {<NEW_LINE>throw new LocalAccessDeniedException(file.getAbsolute());<NEW_LINE>}<NEW_LINE>final Collection<S> c = new Collection<S>();<NEW_LINE>NSArray list = NSArray.arrayWithContentsOfFile(file.getAbsolute... | object = this.deserialize(dict); |
1,762,173 | final UnsubscribeFromEventResult executeUnsubscribeFromEvent(UnsubscribeFromEventRequest unsubscribeFromEventRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(unsubscribeFromEventRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | invoke(request, responseHandler, executionContext); |
728,205 | public static OpenOrders adaptOpenOrders(CurrencyPair currencyPair, Bl3pOpenOrders.Bl3pOpenOrder[] bl3pOrders) {<NEW_LINE>List<LimitOrder> result = new ArrayList<>(bl3pOrders.length);<NEW_LINE>for (Bl3pOpenOrders.Bl3pOpenOrder bl3pOrder : bl3pOrders) {<NEW_LINE>Order.OrderType orderType = Bl3pUtils.fromBl3pOrderType(bl... | remainingAmount = originalAmount.subtract(executedAmount); |
1,452,569 | public static void addFileSliceCommonMetrics(List<FileSlice> fileSlices, Map<String, Double> metrics, long defaultBaseFileSize) {<NEW_LINE>int numLogFiles = 0;<NEW_LINE>long totalLogFileSize = 0;<NEW_LINE>long totalIORead = 0;<NEW_LINE>long totalIOWrite = 0;<NEW_LINE>long totalIO = 0;<NEW_LINE>for (FileSlice slice : fi... | totalIOWrite = FSUtils.getSizeInMB(totalIOWrite); |
920,783 | public Dialog createDialog(Activity activity, Bundle args) {<NEW_LINE>AlertDialog.Builder builder = new AlertDialog.Builder(mapActivity);<NEW_LINE>builder.<MASK><NEW_LINE>LinearLayout ll = new LinearLayout(activity);<NEW_LINE>final ListView lv = new ListView(activity);<NEW_LINE>final int dp24 = AndroidUtils.dpToPx(mapA... | setTitle(R.string.gps_status); |
456,638 | /* (non-Javadoc)<NEW_LINE>* @see org.eclipse.jdt.ls.core.internal.managers.IProjectImporter#importToWorkspace(org.eclipse.core.runtime.IProgressMonitor)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void importToWorkspace(IProgressMonitor monitor) throws CoreException {<NEW_LINE>if (!applies(monitor)) {<NEW_LINE>retur... | getConnection().sendEventNotification(notification); |
785,865 | /*<NEW_LINE>* Reading configuration values from the env variables, if a value was not provided it falls back to defaults.<NEW_LINE>*/<NEW_LINE>@VisibleForTesting<NEW_LINE>public static void readConfigurationFromEnvVariables() {<NEW_LINE>int sWidth = env.getIntEnvVariable(<MASK><NEW_LINE>int sHeight = env.getIntEnvVaria... | ZALENIUM_SCREEN_WIDTH, DEFAULT_SCREEN_SIZE.getWidth()); |
452,441 | final UpdateTrustResult executeUpdateTrust(UpdateTrustRequest updateTrustRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateTrustRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<UpdateTrustRequest> reques... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
688,526 | public boolean uninstallApkFromDevice(String packageName, boolean keepData) {<NEW_LINE>String name = getNameForDisplay();<NEW_LINE>PrintStream stdOut = console.getStdOut();<NEW_LINE>stdOut.printf("Removing apk from %s.\n", name);<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>String reason = deviceUninstallPackage(packageName... | long start = System.currentTimeMillis(); |
1,230,678 | public DeviceStatusInfo unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DeviceStatusInfo deviceStatusInfo = new DeviceStatusInfo();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = origina... | JsonToken token = context.getCurrentToken(); |
1,089,152 | private String resolveResourceTypeName(ConversionEnvironment environment, CfnResourceTrait resourceTrait) {<NEW_LINE>CfnConfig config <MASK><NEW_LINE>ServiceShape serviceShape = environment.context.getModel().expectShape(config.getService(), ServiceShape.class);<NEW_LINE>Optional<ServiceTrait> serviceTrait = serviceSha... | = environment.context.getConfig(); |
945,612 | final ListPendingInvitationResourcesResult executeListPendingInvitationResources(ListPendingInvitationResourcesRequest listPendingInvitationResourcesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listPendingInvitationResourcesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = execu... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
360,603 | public CompletableFuture<CreateKeyValueTableStatus> createKeyValueTable(String scope, String kvtName, final KeyValueTableConfiguration kvtConfig, final long createTimestamp, final long requestId) {<NEW_LINE>Preconditions.checkNotNull(kvtConfig, "kvTableConfig");<NEW_LINE>Preconditions.checkArgument(createTimestamp >= 0... | setStatus(status).build(); |
1,438,218 | public CodeGenNodeArg unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CodeGenNodeArg codeGenNodeArg = new CodeGenNodeArg();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth +... | JsonToken token = context.getCurrentToken(); |
1,540,241 | public Size apply(MethodVisitor methodVisitor, Implementation.Context implementationContext) {<NEW_LINE>Size size = IntegerConstant.forValue(stackManipulations.size()).apply(methodVisitor, implementationContext);<NEW_LINE>// The array's construction does not alter the stack's size.<NEW_LINE>size = size.aggregate(arrayC... | .apply(methodVisitor, implementationContext)); |
1,541,852 | public static GetProjectResponse unmarshall(GetProjectResponse getProjectResponse, UnmarshallerContext _ctx) {<NEW_LINE>getProjectResponse.setRequestId(_ctx.stringValue("GetProjectResponse.RequestId"));<NEW_LINE>getProjectResponse.setHttpStatusCode(_ctx.integerValue("GetProjectResponse.HttpStatusCode"));<NEW_LINE>getPr... | (_ctx.integerValue("GetProjectResponse.Data.Destination")); |
1,265,188 | //<NEW_LINE>"LogNotTimber", //<NEW_LINE>"StringFormatInTimber", //<NEW_LINE>"ThrowableNotAtBeginning", //<NEW_LINE>"BinaryOperationInTimber", //<NEW_LINE>"TimberArgCount", //<NEW_LINE>"TimberArgTypes", //<NEW_LINE>"TimberTagLength", "TimberExceptionLogging" })<NEW_LINE>//<NEW_LINE>@Override<NEW_LINE>protected void onCr... | Timber.d("%s %s", "arg0"); |
1,563,460 | public // region update<NEW_LINE>UpdateRequest updateRequest(UpdateQuery query, IndexCoordinates index) {<NEW_LINE>String indexName = query.getIndexName() != null ? query.getIndexName<MASK><NEW_LINE>UpdateRequest updateRequest = new UpdateRequest(indexName, query.getId());<NEW_LINE>if (query.getScript() != null) {<NEW_... | () : index.getIndexName(); |
845,113 | public okhttp3.Call applicationsApplicationIdOauthKeysKeyMappingIdGetCall(String applicationId, String keyMappingId, String groupId, final ApiCallback _callback) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/applications/{applic... | String[] localVarAccepts = { "application/json" }; |
1,007,692 | public void onBindViewHolder(@NonNull CategoryViewHolder holder, int position) {<NEW_LINE>Category <MASK><NEW_LINE>holder.txtTitle.setText(category.getName());<NEW_LINE>if (isSelected(position)) {<NEW_LINE>holder.txtTitle.setTypeface(null, Typeface.BOLD);<NEW_LINE>holder.txtTitle.setTextColor(Integer.parseInt(category.... | category = categories.get(position); |
1,461,981 | private void checkFilterChainOrder(List<OrderDecorator> filters, ParserContext pc, Object source) {<NEW_LINE><MASK><NEW_LINE>for (int i = 0; i < filters.size(); i++) {<NEW_LINE>OrderDecorator filter = filters.get(i);<NEW_LINE>if (i > 0) {<NEW_LINE>OrderDecorator previous = filters.get(i - 1);<NEW_LINE>if (filter.getOrd... | logger.info("Checking sorted filter chain: " + filters); |
436,414 | protected void serviceStart() throws Exception {<NEW_LINE>stateMonitor = new Thread(new Runnable() {<NEW_LINE><NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>while (!stopped.get() && !Thread.interrupted()) {<NEW_LINE>AppState state = getInternalState();<NEW_LINE>try {<N... | .getApplicationId(), "lack of resources: memory or vCores are not enough for the request by ps")); |
890,125 | public void updatedNode(VarNode vn) {<NEW_LINE>Object r = vn.getVariable();<NEW_LINE>if (!(r instanceof Local)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final Local receiver = (Local) r;<NEW_LINE>final Context context = vn.context();<NEW_LINE>PointsToSetInternal p2set = vn<MASK><NEW_LINE>if (ofcgb.wantTypes(receiver)) {<... | .getP2Set().getNewSet(); |
1,339,614 | private static boolean skipBrokerRebalance(Broker broker, ClusterModel clusterModel, Collection<Replica> replicas, boolean requireLessReplicas, boolean requireMoreReplicas, boolean hasOfflineTopicReplicas, boolean moveImmigrantReplicaOnly) {<NEW_LINE>if (broker.isAlive() && !requireMoreReplicas && !requireLessReplicas)... | trace("Skip rebalance: Broker {} is already within the limit for replicas {}.", broker, replicas); |
427,817 | public void checkScroll() {<NEW_LINE>if (listView == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (context instanceof ManagerActivity) {<NEW_LINE>if (bannerContainer.getVisibility() == View.GONE) {<NEW_LINE>((ManagerActivity) context).changeAppBarElevation(listView.canScrollVertically(-1) || (adapterList != null && ... | .id.app_bar_layout_chat_explorer), withElevation); |
1,021,702 | public final void next() {<NEW_LINE>try {<NEW_LINE>Token tok = getNextToken();<NEW_LINE>myimage = tok.image;<NEW_LINE>id = tok.kind;<NEW_LINE>if (id == EOF) {<NEW_LINE>// ??? EOF is visible just at Parser LEVEL<NEW_LINE>setState(lastValidState);<NEW_LINE>id = Bridge.JJ_EOF;<NEW_LINE>}<NEW_LINE>lastValidState = getState... | char ch = input_stream.readChar(); |
147,347 | static Referable resolveName(Scope scope, List<? extends String> path, boolean withSuperClasses) {<NEW_LINE>for (int i = 0; i < path.size(); i++) {<NEW_LINE>if (scope == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (withSuperClasses && i == path.size() - 2) {<NEW_LINE>Referable parentRef = scope.resolveName(pat... | .get(i + 1)); |
1,753,979 | public GetConfigurationPResponse toProto() {<NEW_LINE>GetConfigurationPResponse.Builder response = GetConfigurationPResponse.newBuilder();<NEW_LINE>if (mClusterConf != null) {<NEW_LINE>mClusterConf.forEach(property -> response.addClusterConfigs<MASK><NEW_LINE>}<NEW_LINE>if (mPathConf != null) {<NEW_LINE>mPathConf.forEa... | (property.toProto())); |
464,198 | protected void mergeList(List<Entity> list, Entity managedEntity, MetaProperty property, boolean replace, MergeOptions options, Set<Entity> mergedSet) {<NEW_LINE>if (replace) {<NEW_LINE>List<Entity> managedRefs = new ArrayList<>(list.size());<NEW_LINE>for (Entity entity : list) {<NEW_LINE>Entity managedRef = internalMe... | setPropertyValue(managedEntity, property, dstList); |
140,122 | private static void addNewExtraProperties(ObjectName objName, Properties props, AttributeList attrList, ServerInterface mejb) throws Exception {<NEW_LINE>try {<NEW_LINE>// NOI18N<NEW_LINE>String[] signature = new String[] { "javax.management.Attribute" };<NEW_LINE>Object[] params = null;<NEW_LINE>if (props.size() > att... | , props.getProperty(propName)); |
1,486,924 | private RawData loadRawData() {<NEW_LINE>final List<I_C_Invoice_Line_Alloc> ilaRecords = Services.get(IQueryBL.class).createQueryBuilder(I_C_Invoice_Line_Alloc.class).addOnlyActiveRecordsFilter().addInArrayFilter(I_C_Invoice_Line_Alloc.COLUMN_C_Invoice_Candidate_ID, invoiceCandidateIds).create().list();<NEW_LINE>final ... | uniqueIndex(invoiceRecords, I_C_Invoice::getC_Invoice_ID); |
1,215,347 | public long readLong() {<NEW_LINE>if (dbg)<NEW_LINE>System.err.println("\nread");<NEW_LINE>if (!hasMore()) {<NEW_LINE>throw new NoSuchElementException();<NEW_LINE>}<NEW_LINE>readElementCount--;<NEW_LINE>if (repeatCount != 0) {<NEW_LINE>if (dbg)<NEW_LINE>System.err.println("next repeat count = " + repeatCount + " lastn ... | delta = bitStream.readIntBits(MEDIUM_DELTA_BITS); |
741,954 | private void mergeHigherLevels(final KllFloatsSketch other, final long finalN) {<NEW_LINE>final int tmpSpaceNeeded = getNumRetained() + other.getNumRetainedAboveLevelZero();<NEW_LINE>final float[] workbuf = new float[tmpSpaceNeeded];<NEW_LINE>final int ub = KllHelper.ubOnNumLevels(finalN);<NEW_LINE>// ub+1 does not wor... | max(numLevels_, other.numLevels_); |
682,054 | protected Tuple3<Boolean, Double, Map<String, String>>[] detect(MTable series, boolean detectLast) throws Exception {<NEW_LINE>TableSummary summary = series.summary();<NEW_LINE>final double mean = summary.mean(selectedCol);<NEW_LINE>final double <MASK><NEW_LINE>double[] zScores = OutlierUtil.getNumericArray(series, sel... | standardDeviation = summary.standardDeviation(selectedCol); |
1,177,140 | // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .<NEW_LINE>public void handleRunEmulator(Sketch sketch, AndroidEditor editor, RunnerListener listener) throws SketchException, IOException {<NEW_LINE>listener.startIndeterminate();<NEW_LINE>listener.statusNotice(AndroidMode.getTextString("androi... | (AndroidMode.getTextString("android_mode.error.cannot_create_avd")); |
1,574,661 | protected BasicValidationResult createRecord(final DataLine dataLine) {<NEW_LINE>final String contig = dataLine.get(BasicValidationResultTableColumn.CONTIG);<NEW_LINE>final int start = <MASK><NEW_LINE>final int end = dataLine.getInt(BasicValidationResultTableColumn.END);<NEW_LINE>final Allele ref = Allele.create(dataLi... | dataLine.getInt(BasicValidationResultTableColumn.START); |
1,368,729 | final ListDeliverabilityTestReportsResult executeListDeliverabilityTestReports(ListDeliverabilityTestReportsRequest listDeliverabilityTestReportsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listDeliverabilityTestReportsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionC... | invoke(request, responseHandler, executionContext); |
945,612 | final ListPendingInvitationResourcesResult executeListPendingInvitationResources(ListPendingInvitationResourcesRequest listPendingInvitationResourcesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listPendingInvitationResourcesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = execu... | invoke(request, responseHandler, executionContext); |
113,061 | private Module registerModule(Path file) {<NEW_LINE>if (!FS.canReadFile(file)) {<NEW_LINE>throw new IllegalStateException("Cannot read file: " + file);<NEW_LINE>}<NEW_LINE>String shortName = _baseHome.toShortForm(file);<NEW_LINE>try {<NEW_LINE>StartLog.debug("Registering Module: %s", shortName);<NEW_LINE>Module module ... | + 1).equalsIgnoreCase("default"); |
1,584,946 | private static InputStream spawnGrep(Artifact input, PathFragment outputExecPath, boolean inMemoryOutput, ActionExecutionMetadata resourceOwner, ActionExecutionContext actionExecutionContext, Artifact grepIncludes, GrepIncludesFileType fileType) throws ExecException, InterruptedException {<NEW_LINE>ActionInput output =... | ), inputs, outputs, LOCAL_RESOURCES); |
208,616 | public void onCreate(Bundle icicle) {<NEW_LINE>super.onCreate(icicle);<NEW_LINE>setContentView(R.layout.act_help);<NEW_LINE>Version.setVersionText(getApplicationContext(), findViewById(R.id.version));<NEW_LINE>Button hintsButton = findViewById(R.id.hints_button);<NEW_LINE>hintsButton.setOnClickListener(new OnClickListe... | string.keyboard_shortcuts).show(); |
983,164 | public void createMatrices(List<MatrixContext> matrixContexts, long timeOutMS) throws Exception {<NEW_LINE>CreateMatricesRequest.Builder createBuilder = CreateMatricesRequest.newBuilder();<NEW_LINE>CheckMatricesCreatedRequest.Builder checkBuilder = CheckMatricesCreatedRequest.newBuilder();<NEW_LINE>List<String> matrixN... | build()).getMatrixMetasList(); |
1,037,262 | /*<NEW_LINE>* @see<NEW_LINE>* com.sitewhere.microservice.api.device.IDeviceManagement#searchDeviceAlarms(<NEW_LINE>* com.sitewhere.spi.search.device.IDeviceAlarmSearchCriteria)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public ISearchResults<RdbDeviceAlarm> searchDeviceAlarms(IDeviceAlarmSearchCriteria criteria) throws Si... | , criteria.getAssetId())); |
1,812,975 | public com.amazonaws.services.memorydb.model.ACLAlreadyExistsException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.memorydb.model.ACLAlreadyExistsException aCLAlreadyExistsException = new com.amazonaws.services.memorydb.model.ACLAlreadyExistsException(null);... | JsonToken token = context.getCurrentToken(); |
1,816,344 | private void processFiles(RootModule rootModule, final SeverityLevelCounter warningCounter, final String checkstyleVersion) {<NEW_LINE>final long startTime = System.currentTimeMillis();<NEW_LINE>final List<File> files = getFilesToCheck();<NEW_LINE>final long endTime = System.currentTimeMillis();<NEW_LINE>log("To locate... | "Using configuration " + config, Project.MSG_VERBOSE); |
319,980 | public static String prettyPrint3D(int[][][] m) {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>int rows = m.length;<NEW_LINE>int <MASK><NEW_LINE>int size = 1 + m[0][0].length * 2;<NEW_LINE>for (int i = 0; i < size; i++) sb.append(" ");<NEW_LINE>String spaces = sb.toString();<NEW_LINE>sb = new StringBuilder... | columns = m[0].length; |
1,852,844 | public FieldElement multInv() {<NEW_LINE>if (this.getData().equals(BigInteger.ZERO)) {<NEW_LINE>throw new ArithmeticException();<NEW_LINE>}<NEW_LINE>if (this.getData().equals(BigInteger.ONE)) {<NEW_LINE>return this;<NEW_LINE>}<NEW_LINE>// Polynomial EEA:<NEW_LINE>BigInteger r2 = this.getModulus();<NEW_LINE>BigInteger r... | t = t2.xor(t); |
1,478,604 | public void computeKilometricExpense(ActionRequest request, ActionResponse response) throws AxelorException {<NEW_LINE>ExpenseLine expenseLine = request.getContext().asType(ExpenseLine.class);<NEW_LINE>if (expenseLine.getKilometricAllowParam() == null || expenseLine.getDistance().compareTo(BigDecimal.ZERO) == 0 || expe... | (IExceptionMessage.LEAVE_USER_EMPLOYEE), userName); |
1,814,156 | public StarlarkCallable rule(StarlarkFunction implementation, Boolean test, Object attrs, Object implicitOutputs, Boolean executable, Boolean outputToGenfiles, Sequence<?> fragments, Sequence<?> hostFragments, Boolean starlarkTestable, Sequence<?> toolchains, boolean useToolchainTransition, String doc, Sequence<?> prov... | > attrsMapBuilder = ImmutableMap.builder(); |
1,190,449 | public void handlePerspective(ItemStack Object, TransformType cameraTransformType, PoseStack mat, LivingEntity entity) {<NEW_LINE>if (entity != null && entity.isUsingItem())<NEW_LINE>if ((entity.getUsedItemHand() == InteractionHand.MAIN_HAND) == (entity.getMainArm() == HumanoidArm.RIGHT)) {<NEW_LINE>if (cameraTransform... | , 1, 0, false)); |
1,322,677 | private static void startCoreDaemon() throws SuException, DaemonException {<NEW_LINE>boolean access_granted = false;<NEW_LINE>DataOutputStream writer = null;<NEW_LINE>BufferedReader reader = null;<NEW_LINE>String line;<NEW_LINE>int ret = -1;<NEW_LINE>try {<NEW_LINE>Process shell = Runtime.getRuntime().exec("su");<NEW_L... | DataOutputStream(shell.getOutputStream()); |
66,234 | public float evaluateMask(int tl_x, int tl_y) {<NEW_LINE>Objects.requireNonNull(o.mask);<NEW_LINE>float top = 0;<NEW_LINE>float imageMean = 0;<NEW_LINE>float imageSigma = 0;<NEW_LINE>for (int y = 0; y < o.template.height; y++) {<NEW_LINE>int imageIndex = o.image.startIndex + (tl_y + y) * o.image.stride + tl_x;<NEW_LINE... | .template.data[templateIndex++]; |
1,111,673 | protected void renderSafe(SchematicannonTileEntity tileEntity, float partialTicks, PoseStack ms, MultiBufferSource buffer, int light, int overlay) {<NEW_LINE>boolean blocksLaunching = !tileEntity.flyingBlocks.isEmpty();<NEW_LINE>if (blocksLaunching)<NEW_LINE>renderLaunchedBlocks(tileEntity, partialTicks, <MASK><NEW_LIN... | ms, buffer, light, overlay); |
132,044 | public void logExternal(Logger useLogger) {<NEW_LINE>String methodName = "logExternal";<NEW_LINE>useLogger.logp(Level.FINER, CLASS_NAME, methodName, " Module Externals:");<NEW_LINE>String useAppLibPath = getAppLibRootPath();<NEW_LINE>if (useAppLibPath == null) {<NEW_LINE>useLogger.logp(Level.<MASK><NEW_LINE>} else {<N... | FINER, CLASS_NAME, methodName, " Application library path [ Null ]"); |
497,230 | public void addToHandleList(Object h, HandleList HL) {<NEW_LINE>final boolean isTracingEnabled = TraceComponent.isAnyTracingEnabled();<NEW_LINE>if (HL != null) {<NEW_LINE><MASK><NEW_LINE>if (isTracingEnabled && tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(this, tc, "Adding Connection handle: " + h + "and its handle list ob... | mcwHandleList.put(h, HL); |
105,541 | public int bufferSize(@NotNull final ClientConnection clientConnection, @NotNull final T msg) {<NEW_LINE>int omittedProperties = 0;<NEW_LINE>int propertyLength = calculatePropertyLength(msg);<NEW_LINE>if (!securityConfigurationService.allowRequestProblemInformation() || !Objects.requireNonNullElse(clientConnection.getR... | (msg, propertyLength, ++omittedProperties); |
225,946 | private static JSModuleRecord createSyntheticJSONModule(JSRealm realm, Source source, Object hostDefined) {<NEW_LINE>final TruffleString exportName = Strings.DEFAULT;<NEW_LINE>JSFrameDescriptor frameDescBuilder = new JSFrameDescriptor(Undefined.instance);<NEW_LINE>JSFrameSlot slot = frameDescBuilder.addFrameSlot(export... | (ExportEntry.exportSpecifier(exportName)); |
605,959 | private boolean checkAuthorization(String authorization) {<NEW_LINE>if (authorization == null)<NEW_LINE>return false;<NEW_LINE>try {<NEW_LINE>String userInfo = authorization.substring(6).trim();<NEW_LINE>Base64 decoder = new Base64();<NEW_LINE>String namePassword = new String(decoder.decode(userInfo.getBytes()));<NEW_L... | Login(Env.getCtx()); |
702,331 | protected JMenuBar createMenuBar() {<NEW_LINE>JMenuBar menuBar = new JMenuBar();<NEW_LINE>String[] sessionMenuActionNames = { // "convertSession",<NEW_LINE>"newSession", // "convertSession",<NEW_LINE>"openSession", // "propertiesSession",<NEW_LINE>"saveSession", // "propertiesSession",<NEW_LINE>"refreshSession", "---",... | (createMenu("simsRunsMenu", simsRunsMenuActionNames)); |
1,672,839 | final AssociateVirtualInterfaceResult executeAssociateVirtualInterface(AssociateVirtualInterfaceRequest associateVirtualInterfaceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(associateVirtualInterfaceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequest... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
686,731 | private static Map<String, String> genericNameValueProcess(String s) {<NEW_LINE>Map<String, String> params = new HashMap<String, String>();<NEW_LINE>List<String> parameters = split(s, ";");<NEW_LINE>for (String parameter : parameters) {<NEW_LINE>List<String> <MASK><NEW_LINE>// do a check, otherwise we might get NPE<NEW... | parts = split(parameter, "="); |
729,704 | public User retrieveContactOrNull(@NonNull final RetrieveContactRequest request) {<NEW_LINE>final List<I_AD_User> contactRecords = bpartnersRepo.retrieveContacts(Env.getCtx(), request.getBpartnerId().getRepoId(), ITrx.TRXNAME_None);<NEW_LINE>final boolean ifNotFoundReturnNull = RetrieveContactRequest.IfNotFound.RETURN_... | findBestMatch(contactsAtOtherLocations, defaultContactOfType, defaultContact); |
986,402 | private Map<String, File> findBundledFiles(File module, String cnb) throws Exception {<NEW_LINE>Map<String, File> result = new HashMap<>();<NEW_LINE>if (module.getParentFile().getName().matches("modules|core|lib")) {<NEW_LINE>File cluster = module<MASK><NEW_LINE>File updateTracking = new File(new File(cluster, "update_... | .getParentFile().getParentFile(); |
1,051,236 | public void run() {<NEW_LINE>if (started) {<NEW_LINE>LOG.error("Already ran consumer");<NEW_LINE>throw new IllegalStateException("Already ran consumer");<NEW_LINE>}<NEW_LINE>started = true;<NEW_LINE>try {<NEW_LINE>initialize();<NEW_LINE>subscribeOrAssign();<NEW_LINE>while (!closed) {<NEW_LINE>final ConsumerRecords<?, G... | records = consumer.poll(POLL_TIMEOUT); |
1,222,168 | static int isFirstJavaLine(JTextComponent component) {<NEW_LINE>ShellSession s = ShellSession.get(component.getDocument());<NEW_LINE>if (s == null) {<NEW_LINE>return -1;<NEW_LINE>}<NEW_LINE>ConsoleSection sec = s.getModel().getInputSection();<NEW_LINE>if (sec == null) {<NEW_LINE>return -1;<NEW_LINE>}<NEW_LINE>LineDocum... | int caret = component.getCaretPosition(); |
177,748 | public Map<String, Object> info() {<NEW_LINE>Map<String, Object> info = new HashMap<>();<NEW_LINE>info.put("id", RSocketAppContext.ID);<NEW_LINE>info.put("serviceStatus", AppStatusEvent.statusText(this.rsocketServiceStatus));<NEW_LINE>if (this.serviceProvider) {<NEW_LINE>info.put("published", rsocketRequesterSupport.ex... | (loadBalancedRSocket.getLastRefreshTimeStamp())); |
1,370,609 | public void validate() {<NEW_LINE>String target = getTargetName();<NEW_LINE>// validate the parameters<NEW_LINE>if (delay() < 0) {<NEW_LINE>throw new FaultToleranceDefinitionException(Tr.formatMessage(tc, "circuitBreaker.parameter.delay.invalid.value.CWMFT5012E", "delay", delay(), target));<NEW_LINE>}<NEW_LINE>if ((fai... | , failureRatio(), target)); |
1,434,342 | public synchronized boolean register(ResolvedDependency dependencyToResolve) {<NEW_LINE>SameResolvedDependencyInAllVersions allVersions = <MASK><NEW_LINE>if (allVersions.noValidVersionExists()) {<NEW_LINE>LOGGER.debug("{} doesn't exit in registry, add it.", dependencyToResolve);<NEW_LINE>allVersions.add(dependencyToRes... | getAllVersions(dependencyToResolve.getName()); |
1,221,069 | public Void visitMethodInvocation(MethodInvocationTree javacTree, Node javaParserNode) {<NEW_LINE>if (javaParserNode instanceof MethodCallExpr) {<NEW_LINE>MethodCallExpr node = (MethodCallExpr) javaParserNode;<NEW_LINE>processMethodInvocation(javacTree, node);<NEW_LINE>// In javac, the type arguments will be empty if n... | ), node.getArguments()); |
1,731,995 | private static void testFileEncryptionWithStream(StreamingAead ags, File tmpFile, int plaintextSize) throws Exception {<NEW_LINE>byte[] aad = TestUtil.hexDecode("aabbccddeeff");<NEW_LINE>byte[] pt = generatePlaintext(plaintextSize);<NEW_LINE>FileOutputStream ctStream = new FileOutputStream(tmpFile);<NEW_LINE>WritableBy... | channel = Channels.newChannel(ctStream); |
1,774,568 | public InteractionResultHolder<ItemStack> use(Level world, Player player, @Nonnull InteractionHand hand) {<NEW_LINE>ItemStack stack = player.getItemInHand(hand);<NEW_LINE>if (!world.isClientSide && ManaItemHandler.instance().requestManaExactForTool(stack, player, MANA_COST, false)) {<NEW_LINE>BlockState bifrost = ModBl... | previousPos = new BlockPos.MutableBlockPos(); |
1,411,817 | public int numEnclaves(int[][] A) {<NEW_LINE>int n = A.length;<NEW_LINE>int m = A[0].length;<NEW_LINE>boolean[][] visited = new boolean[n][m];<NEW_LINE>for (int i = 0; i < n; ++i) {<NEW_LINE>walk(A, visited, i, 0);<NEW_LINE>walk(A, <MASK><NEW_LINE>}<NEW_LINE>for (int j = 0; j < m; ++j) {<NEW_LINE>walk(A, visited, 0, j)... | visited, i, m - 1); |
696,321 | public void measureChildWithMargins(View child, int widthUsed, int heightUsed) {<NEW_LINE>// first get default measured size<NEW_LINE>super.measureChildWithMargins(child, widthUsed, heightUsed);<NEW_LINE>if (!isTabExpandEnabled())<NEW_LINE>return;<NEW_LINE>final int count = getItemCount();<NEW_LINE>if (count == 0)<NEW_... | int measuredWidth = child.getMeasuredWidth(); |
283,597 | public Object apply(final ActionContext ctx, final Object caller, final Object[] sources) throws FrameworkException {<NEW_LINE>try {<NEW_LINE>assertArrayHasMinLengthAndMaxLengthAndAllElementsNotNull(sources, 2, 3);<NEW_LINE>if (!(sources[0] instanceof Group)) {<NEW_LINE>logParameterError(caller, sources, "Expected node... | "Expected node of type Principal as second argument - SuperUser can not be member of a group!", ctx.isJavaScriptContext()); |
320,630 | protected void changeApplianceVmStatus(ApplianceVmStatus newStatus) {<NEW_LINE><MASK><NEW_LINE>if (newStatus == getSelf().getStatus()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ApplianceVmStatus oldStatus = getSelf().getStatus();<NEW_LINE>logger.debug(String.format("ApplianceVm [%s] changed status, old status: [%s], new s... | self = dbf.reload(self); |
785,007 | public String loginUser(String username, String password) throws RestClientException {<NEW_LINE>Object postBody = null;<NEW_LINE>// verify the required parameter 'username' is set<NEW_LINE>if (username == null) {<NEW_LINE>throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'userna... | contentType = apiClient.selectHeaderContentType(contentTypes); |
477,479 | final CreateRegexPatternSetResult executeCreateRegexPatternSet(CreateRegexPatternSetRequest createRegexPatternSetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createRegexPatternSetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
135,369 | private void initFields() {<NEW_LINE>String address = instance.getProperty(PayaraModule.DEBUG_PORT);<NEW_LINE>SpinnerNumberModel addressModel = (SpinnerNumberModel) addressValue.getModel();<NEW_LINE>javaPlatforms = JavaUtils.findSupportedPlatforms(this.instance);<NEW_LINE>((JavaPlatformsComboBox) javaComboBox).updateMo... | this.javaComboBox.setEnabled(isLocalDomain); |
1,269,361 | public static BaseRawValueBasedPredicateEvaluator newRawValueBasedEvaluator(EqPredicate eqPredicate, DataType dataType) {<NEW_LINE>String value = eqPredicate.getValue();<NEW_LINE>switch(dataType) {<NEW_LINE>case INT:<NEW_LINE>return new IntRawValueBasedEqPredicateEvaluator(eqPredicate, Integer.parseInt(value));<NEW_LIN... | throw new IllegalStateException("Unsupported data type: " + dataType); |
477,132 | public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>String epl = "@public create table RectangleTable(id string primary key, rx double, ry double, rw double, rh double);\n" + "create index MyIndex on RectangleTable((rx,ry,rw,rh) mxcifquadtree(0,0,100,100,4,20));\n"... | 81, 80, 1, 1); |
292,068 | private org.batfish.datamodel.ospf.OspfArea.Builder toOspfAreaBuilder(OspfArea area, RouteFilterList summaryFilter) {<NEW_LINE>org.batfish.datamodel.ospf.OspfArea.Builder newAreaBuilder = org.batfish.datamodel.ospf.OspfArea.builder();<NEW_LINE>newAreaBuilder.setNumber(area.getName());<NEW_LINE>newAreaBuilder.setNssaSet... | (area.getStubSettings())); |
1,118,185 | public static void main(String[] args) {<NEW_LINE>Options options = new Options();<NEW_LINE>options.addRequiredOption("p", "port", true, "port number");<NEW_LINE>options.addRequiredOption("l", "loadPath", true, ".jar files path for dynamic loading");<NEW_LINE>CommandLine line = null;<NEW_LINE>try {<NEW_LINE>CommandLine... | parser.parse(options, args); |
1,034,592 | public static HighlightField of(org.springframework.data.elasticsearch.annotations.HighlightField field) {<NEW_LINE>org.springframework.data.elasticsearch.annotations.HighlightParameters parameters = field.parameters();<NEW_LINE>//<NEW_LINE>HighlightFieldParameters //<NEW_LINE>highlightParameters = //<NEW_LINE>Highligh... | type()).build(); |
1,028,971 | void decode(Decoder decoder, Instruction instruction) {<NEW_LINE>if ((((decoder.state_zs_flags & (StateFlags.B | StateFlags.Z)) | decoder.state_aaa) & decoder.invalidCheckMask) != 0)<NEW_LINE>decoder.setInvalidInstruction();<NEW_LINE>instruction.setCode(code);<NEW_LINE>instruction.setOp0Register(decoder.state_reg + dec... | instruction.setOp3Kind(OpKind.IMMEDIATE8); |
550,399 | private void addDocumentField(Document doc, String key, JsonNode value, FieldType fieldType) {<NEW_LINE>String valueText = value.asText() == "null" <MASK><NEW_LINE>if (STRING_FIELD_NAMES.contains(key)) {<NEW_LINE>doc.add(new StringField(key, valueText, Field.Store.YES));<NEW_LINE>} else if (FIELDS_WITHOUT_STEMMING.cont... | ? "" : value.asText(); |
1,644,073 | private void drawBackground(Canvas canvas) {<NEW_LINE>RectF rect = mCropWindowHandler.getRect();<NEW_LINE>float left = Math.max(BitmapUtils.getRectLeft(mBoundsPoints), 0);<NEW_LINE>float top = Math.max(BitmapUtils.getRectTop(mBoundsPoints), 0);<NEW_LINE>float right = Math.min(BitmapUtils.getRectRight(mBoundsPoints), ge... | 2], mBoundsPoints[3]); |
1,540,496 | public void matchFound(Map<String, Object> matchEvent, EventBean optionalTriggeringEvent) {<NEW_LINE>Map<String, Object> matchEventInclusive = null;<NEW_LINE>if (pattern.isInclusive()) {<NEW_LINE>if (matchEvent.size() < 2) {<NEW_LINE>matchEventInclusive = matchEvent;<NEW_LINE>} else {<NEW_LINE>// need to reorder accord... | , matchEvent.get(key)); |
847,838 | private void runAssertionSelectNested(RegressionEnvironment env, String typename, FunctionSendEvent send, Function<Object, Object> optionalValueConversion, Pair[] tests, Class expectedPropertyType, RegressionPath path) {<NEW_LINE>String stmtText = "@name('s0') select " + " item.nested?.nestedValue as n1, " + " exists(i... | , path).addListener("s0"); |
645,189 | private void replaceWithSuperType(TreePath path, VariableTree oldVarTree, VariableElement varElement, Element superTypeElement) {<NEW_LINE>Types types = workingCopy.getTypes();<NEW_LINE>TypeMirror supTypeErasure = types.<MASK><NEW_LINE>DeclaredType varType = (DeclaredType) varElement.asType();<NEW_LINE>TypeMirror theTy... | erasure(superTypeElement.asType()); |
1,613,438 | // ------------------------------- XP<NEW_LINE>private void hooverXP() {<NEW_LINE>double maxDist = Math.max(KillerJoeConfig.killerJoeHooverXpHeight.get(), Math.max(KillerJoeConfig.killerJoeHooverXpLength.get(), KillerJoeConfig.killerJoeHooverXpWidth.get()));<NEW_LINE>List<EntityXPOrb> xp = world.getEntitiesWithinAABB(E... | .motionX += xDist / totalDistance * speed; |
1,461,005 | public PresentableForm generateForm(final ForgottenPasswordStateMachine forgottenPasswordStateMachine) {<NEW_LINE>final PwmRequestContext pwmRequestContext = forgottenPasswordStateMachine.getRequestContext();<NEW_LINE>final LinkedHashSet<IdentityVerificationMethod> remainingAvailableOptionalMethods = new LinkedHashSet<... | selectOptions = new LinkedHashMap<>(); |
1,818,903 | public byte[] serialize(Map<Object, Object> map) {<NEW_LINE>int size = map.size();<NEW_LINE>// Directly return the size (0) for empty map<NEW_LINE>if (size == 0) {<NEW_LINE>return new byte[Integer.BYTES];<NEW_LINE>}<NEW_LINE>// No need to close these 2 streams<NEW_LINE>ByteArrayOutputStream byteArrayOutputStream = new ... | > firstEntry = iterator.next(); |
1,426,065 | public JobDetails unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>JobDetails jobDetails = new JobDetails();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken()... | int originalDepth = context.getCurrentDepth(); |
409,655 | // -------------------------------------------------------------------------<NEW_LINE>private static double[] calculateSecondDerivative(double[] xValues, double[] yValues, int dataSize, double leftFirstDev, double rightFirstDev, boolean leftNatural, boolean rightNatural) {<NEW_LINE>double[] deltaX = new double[dataSize... | ] = 1.0 / deltaX[i]; |
1,438,779 | private boolean swapInputs(RelMetadataQuery mq, LoptMultiJoin multiJoin, LoptJoinTree left, LoptJoinTree right, boolean selfJoin) {<NEW_LINE>boolean swap = false;<NEW_LINE>if (selfJoin) {<NEW_LINE>return !multiJoin.isLeftFactorInRemovableSelfJoin(((LoptJoinTree.Leaf) left.getFactorTree()).getId());<NEW_LINE>}<NEW_LINE>... | getRowCount(right.getJoinTree()); |
1,799,333 | public void run() {<NEW_LINE>String title = "About";<NEW_LINE>StringBuilder aboutString = new StringBuilder();<NEW_LINE>aboutString.append(TermuxUtils.getAppInfoMarkdownString(TermuxAPIActivity.this, TermuxUtils.AppInfoMode.TERMUX_AND_PLUGIN_PACKAGE));<NEW_LINE>aboutString.append("\n\n").append(AndroidUtils<MASK><NEW_L... | .getDeviceInfoMarkdownString(TermuxAPIActivity.this)); |
87,185 | public void marshall(CreateDataSourceRequest createDataSourceRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createDataSourceRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(createDataSourc... | createDataSourceRequest.getVpcConnectionProperties(), VPCCONNECTIONPROPERTIES_BINDING); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.