idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,293,012 | private HazelcastInstance createHazelcastInstanceEmbedded(String xmlPath) {<NEW_LINE>InputStream is = getClass().getClassLoader().getResourceAsStream(xmlPath);<NEW_LINE>try {<NEW_LINE>XmlConfigBuilder builder = new XmlConfigBuilder(is);<NEW_LINE>com.hazelcast.config.Config config = builder.build();<NEW_LINE>if (Cluster... | getTcpIpConfig().setEnabled(true); |
1,223,775 | public void load(GlowVillager entity, CompoundTag compound) {<NEW_LINE>super.load(entity, compound);<NEW_LINE>compound.tryGetInt("Profession").filter(GlowVillager::isValidProfession).map(GlowVillager::getProfessionById).ifPresent(entity::setProfession);<NEW_LINE>compound.tryGetInt("Career").map(GlowVillager::getProfess... | sell, uses, maxUses, experienceReward); |
984,159 | public void buildModel() {<NEW_LINE>model = new Model("Grocery");<NEW_LINE>itemCost = model.intVarArray("item", 4, 1, 711, false);<NEW_LINE>model.sum(itemCost, "=", 711).post();<NEW_LINE>// intermediary products<NEW_LINE>IntVar[] tmp = model.intVarArray("tmp", <MASK><NEW_LINE>model.times(itemCost[0], itemCost[1], tmp[0... | 2, 1, 71100, true); |
1,580,659 | public void visitConstantExpression(final ConstantExpression expression) {<NEW_LINE>if (!(expression.isNullExpression() || expression.isTrueExpression() || expression.isFalseExpression() || expression.isEmptyStringExpression())) {<NEW_LINE>if (expression instanceof AnnotationConstantExpression) {<NEW_LINE>// ex: @inter... | .getText().toCharArray(); |
1,620,959 | public AwsRdsDbOptionGroupMembership unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AwsRdsDbOptionGroupMembership awsRdsDbOptionGroupMembership = new AwsRdsDbOptionGroupMembership();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurren... | class).unmarshall(context)); |
1,512,265 | public Object[] findPollInfoForUpdate(long partitionId) throws Exception {<NEW_LINE>String find = "SELECT p.EXPIRY,p.STATES FROM Partition p WHERE p.ID=:i";<NEW_LINE>final boolean trace = TraceComponent.isAnyTracingEnabled();<NEW_LINE>if (trace && tc.isEntryEnabled())<NEW_LINE>Tr.entry(this, tc, "findPollInfoForUpdate"... | = getPersistenceServiceUnit().createEntityManager(); |
1,201,297 | private static Genesis createBlockForJson(GenesisJson genesisJson) {<NEW_LINE>byte[] nonce = prepareNonce(ByteUtil.hexStringToBytes(genesisJson.nonce));<NEW_LINE>byte[] difficulty = hexStringToBytesValidate(genesisJson.difficulty, 32, true);<NEW_LINE>byte[] mixHash = hexStringToBytesValidate(genesisJson.mixhash, 32, fa... | timestamp = ByteUtil.byteArrayToLong(timestampBytes); |
937,931 | public void exitField(int initializationStart, int declarationEnd, int declarationSourceEnd) {<NEW_LINE>JavaElement handle = (JavaElement) this.handleStack.peek();<NEW_LINE>FieldInfo fieldInfo = (FieldInfo) this.infoStack.peek();<NEW_LINE>IJavaElement[] elements = getChildren(fieldInfo);<NEW_LINE>SourceFieldElementInfo... | info.setSourceRangeStart(fieldInfo.declarationStart); |
917,750 | public boolean onMarkerClick(Marker marker) {<NEW_LINE>// Log.d(TAG, "---> onMarkerClick / marker.tag = " + marker.getTag());<NEW_LINE>JSONObject properties = null;<NEW_LINE>String clusterId_markerId = marker.getTag() + "";<NEW_LINE>if (clusterId_markerId.contains("markercluster_")) {<NEW_LINE>if (clusterId_markerId.co... | this.onClusterEvent("marker_click", activeMarker); |
81,957 | public void verifyRubricQuestionDetails(int questionNum, FeedbackRubricQuestionDetails questionDetails) {<NEW_LINE>int numChoices = questionDetails.getNumOfRubricChoices();<NEW_LINE>List<String<MASK><NEW_LINE>for (int i = 0; i < numChoices; i++) {<NEW_LINE>assertEquals(choices.get(i), getRubricChoiceInputs(questionNum)... | > choices = questionDetails.getRubricChoices(); |
81,251 | private void scheduleNewBackupJob(BackupConfig newBackupConfig) {<NEW_LINE>if (newBackupConfig == null || isBlank(newBackupConfig.getSchedule())) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>JobDetail jobDetail = newJob().withIdentity(jobKey()).ofType(ScheduleBackupQuartzJob.class).usingJobData(jobDataMap()).b... | ": " + e.getMessage()); |
755,680 | void persist(KeyedTimerData<K> keyedTimerData) {<NEW_LINE>final TimerKey<K> timerKey = TimerKey.of(keyedTimerData);<NEW_LINE>switch(keyedTimerData.getTimerData().getDomain()) {<NEW_LINE>case EVENT_TIME:<NEW_LINE>final Long timestamp = eventTimeTimerState.<MASK><NEW_LINE>if (timestamp != null) {<NEW_LINE>final KeyedTime... | get(timerKey).read(); |
311,395 | private void scanFile(MediaFile file, MusicFolder musicFolder, MediaLibraryStatistics statistics, Map<String, AtomicInteger> albumCount, Map<String, Artist> artists, Map<String, Album> albums, Map<Integer, Album> albumsInDb, Genres genres, Map<Integer, Set<String>> encountered) {<NEW_LINE>if (scanCount.incrementAndGet(... | indexManager.index(file, musicFolder); |
1,668,995 | public void render(BlastFurnacePreheaterTileEntity bEntity, float partial, PoseStack transform, MultiBufferSource buffers, int light, int overlay) {<NEW_LINE>if (bEntity.isDummy())<NEW_LINE>return;<NEW_LINE>transform.pushPose();<NEW_LINE>transform.translate(0.5, 0.5, 0.5);<NEW_LINE>transform.mulPose(new Quaternion(new ... | ), transform, light, overlay); |
308,092 | private ESResultSet convertResponse(boolean useLateral) throws SQLException {<NEW_LINE>if (esResponse.getHits().getHits().length == 0 && esResponse.getScrollId() != null) {<NEW_LINE>esResponse = client.prepareSearchScroll(esResponse.getScrollId()).setScroll(new TimeValue(Utils.getIntProp(props, Utils.PROP_SCROLL_TIMEOU... | min(total, getLimit()); |
1,073,782 | final DeleteQueryDefinitionResult executeDeleteQueryDefinition(DeleteQueryDefinitionRequest deleteQueryDefinitionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteQueryDefinitionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
873,549 | public void initialize(@Nullable View view) {<NEW_LINE>Objects.requireNonNull(view);<NEW_LINE>mChartController = new <MASK><NEW_LINE>mChartController.initialize(view);<NEW_LINE>mScrollView = (NestedScrollView) view;<NEW_LINE>mTitle = view.findViewById(R.id.title);<NEW_LINE>mAscent = view.findViewById(R.id.ascent);<NEW_... | ChartController(view.getContext()); |
618,440 | public void mouseClicked(final MouseEvent e) {<NEW_LINE>boolean shouldEditOrResetPosition = e.getButton() == MouseEvent.BUTTON1 && e.getClickCount() == 2 && doubleClickTimer.getDelay() > 0;<NEW_LINE>if (shouldEditOrResetPosition) {<NEW_LINE>final MainView mainView = (MainView) e.getComponent();<NEW_LINE>if (mainView.ge... | final NodeView nodeV = getNodeView(e); |
1,103,597 | private void validateBlockValue(int currentParamValueAsBlock, int inputValueAsBlock, Param param) throws ParamValidationException {<NEW_LINE>boolean isMainnet = Config.baseCurrencyNetwork().isMainnet();<NEW_LINE>switch(param) {<NEW_LINE>case LOCK_TIME_TRADE_PAYOUT:<NEW_LINE>break;<NEW_LINE>case PHASE_UNDEFINED:<NEW_LIN... | , Res.get("validation.mustNotBeNegative")); |
477,142 | public static InputStream openForReading(Form form, ScopedFile file) throws IOException {<NEW_LINE>switch(file.getScope()) {<NEW_LINE>case Asset:<NEW_LINE>return form.openAsset(file.getFileName());<NEW_LINE>case App:<NEW_LINE>if (Build.VERSION.SDK_INT < Build.VERSION_CODES.FROYO) {<NEW_LINE>return new FileInputStream(n... | , file.getFileName())); |
1,493,254 | public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>env.compileDeploy("@public create variable int lower", path);<NEW_LINE>env.compileDeploy("@public create variable int upper", path);<NEW_LINE>env.compileDeploy("on SupportBean set lower=intPrimitive,upper=intBoxed... | + ".fetchBetween(lower, upper), " + "method:" + className + ".fetchIdDelimited(value)"; |
684,923 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {<NEW_LINE>if (container != null) {<NEW_LINE>container.removeAllViews();<NEW_LINE>}<NEW_LINE>View view = inflater.inflate(R.<MASK><NEW_LINE>lvAp = (ListView) view.findViewById(R.id.lv_ap);<NEW_LINE>tvAirodumpInfo = (TextVi... | layout.fragment_ap, container, false); |
1,732,976 | public void run() {<NEW_LINE>TokenSequence<? extends JsTokenId> ts = LexUtilities.getJsTokenSequence(doc, caretOffset);<NEW_LINE>if (ts != null) {<NEW_LINE>ts.move(caretOffset);<NEW_LINE>if (ts.moveNext() && ts.token().id() == JsTokenId.STRING && EditorUtils.isFileReference(Source.create(doc).createSnapshot(), ts.offse... | () - withoutPlugin.length(); |
886,988 | public boolean doAlert(AlertConfigWithParams alertConfig, AlertTemplate alertTemplate) throws AlertException {<NEW_LINE>AlertDingTalkParams dingTalkParams = alertConfig.getDingTalkParams();<NEW_LINE>try {<NEW_LINE>// handling contacts<NEW_LINE>List<String> contactList = new ArrayList<>();<NEW_LINE>String contacts = din... | content.put("text", markdown); |
1,700,468 | private static File createAAB(Project project, File outDir, BundleHelper helper, ICanceled canceled) throws IOException, CompileExceptionError {<NEW_LINE>BundleHelper.throwIfCanceled(canceled);<NEW_LINE>final Platform platform = getFirstPlatform(project);<NEW_LINE>File apk;<NEW_LINE>if (ExtenderUtil.hasNativeExtensions... | signFile(project, baseAab, canceled); |
563,459 | static Media readMedia(JSONObject mediaJsonObject) throws Exception {<NEW_LINE>Media media = new Media();<NEW_LINE>Object bitrate = mediaJsonObject.get("bitrate");<NEW_LINE>if (bitrate != null && bitrate instanceof Integer) {<NEW_LINE>media.bitrate = ((Integer) bitrate).intValue();<NEW_LINE>media.hasBitrate = true;<NEW... | ("width")).intValue(); |
1,293,419 | private static boolean canWrite(Path root, Path file, URL resource, @Nullable Consumer<String> load) {<NEW_LINE>Path testFile;<NEW_LINE>if (Files.exists(file)) {<NEW_LINE>if (!Files.isWritable(file)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// Don't overwrite existing file just to check if we can write to directory... | getParent().resolve(".lwjgl.test"); |
239,316 | /* GRECLIPSE edit -- GROOVY-4386, GROOVY-7812, et al.<NEW_LINE>private boolean resolveToOuterNested(ClassNode type) {<NEW_LINE>CompileUnit compileUnit = currentClass.getCompileUnit();<NEW_LINE>String typeName = type.getName();<NEW_LINE><NEW_LINE>ModuleNode module = currentClass.getModule();<NEW_LINE>for (ImportNode imp... | return new ConstructedOuterNestedClassNode(outerClassNode, outerNestedClassName); |
1,142,097 | private void runImport(MPart part, Shell shell, Client client) {<NEW_LINE>try {<NEW_LINE>Extractor extractor = new IBFlexStatementExtractor(client);<NEW_LINE>FileDialog fileDialog = new FileDialog(shell, SWT.OPEN | SWT.MULTI);<NEW_LINE>fileDialog.setText(extractor.getLabel());<NEW_LINE>// $NON-NLS-1$ //$NON-NLS-2$<NEW_... | files = new ArrayList<>(); |
1,830,834 | private void bindCountViews(View v, int neutCount, int posCount, boolean showNeutZero) {<NEW_LINE>switch(currentState) {<NEW_LINE>case SAVED:<NEW_LINE>v.findViewById(R.id.row_foldersumneu).setVisibility(View.GONE);<NEW_LINE>v.findViewById(R.id.row_foldersumpos<MASK><NEW_LINE>break;<NEW_LINE>case BEST:<NEW_LINE>v.findVi... | ).setVisibility(View.GONE); |
869,667 | private static void tryAssertionTargetCurrentMatch(RegressionEnvironment env, boolean testSoda, TargetEnum target) {<NEW_LINE>String[] fields = "a1.id,aarr[0].id,b.id".split(",");<NEW_LINE>String epl = "@name('s0') select * from pattern " + target.getText() + "[every a1=SupportIdEventA -> [:10] aarr=SupportIdEventA unt... | , epl).addListener("s0"); |
703,337 | public ListSAMLProvidersResult unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>ListSAMLProvidersResult listSAMLProvidersResult = new ListSAMLProvidersResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocu... | new ArrayList<SAMLProviderListEntry>()); |
1,248,577 | protected RexLiteral makeLiteral(Comparable o, RelDataType type, SqlTypeName typeName) {<NEW_LINE>// All literals except NULL have NOT NULL types.<NEW_LINE>type = typeFactory.createTypeWithNullability(type, o == null);<NEW_LINE>int p;<NEW_LINE>switch(typeName) {<NEW_LINE>case CHAR:<NEW_LINE>// Character literals must h... | ), type.getCollation()); |
1,826,931 | final ListEmailIdentitiesResult executeListEmailIdentities(ListEmailIdentitiesRequest listEmailIdentitiesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listEmailIdentitiesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
375,846 | protected Void copyVolumeCallBack(AsyncCallbackDispatcher<VolumeServiceImpl, CopyCommandResult> callback, CopyVolumeContext<VolumeApiResult> context) {<NEW_LINE>VolumeInfo srcVolume = context.srcVolume;<NEW_LINE>VolumeInfo destVolume = context.destVolume;<NEW_LINE>CopyCommandResult result = callback.getResult();<NEW_LI... | VolumeApiResult res = new VolumeApiResult(destVolume); |
610,443 | public static ListStoreResponse unmarshall(ListStoreResponse listStoreResponse, UnmarshallerContext _ctx) {<NEW_LINE>listStoreResponse.setRequestId(_ctx.stringValue("ListStoreResponse.RequestId"));<NEW_LINE>listStoreResponse.setErrorCode(_ctx.stringValue("ListStoreResponse.ErrorCode"));<NEW_LINE>listStoreResponse.setEr... | ("ListStoreResponse.Stores[" + i + "].GmtCreate")); |
310,455 | private <// FileBasedIndex.requestReindex doesn't handle the situation properly because update requires old data that was lost<NEW_LINE>Key> void wipeProblematicFileIdsForParticularKeyAndStubIndex(@Nonnull StubIndexKey<Key, ?> indexKey, @Nonnull Key key, @Nonnull UpdatableIndex<Integer, SerializedStubTree, FileContent>... | artificialOldValues, Collections.emptyMap()); |
1,729,990 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {<NEW_LINE>int widthMode = MeasureSpec.getMode(widthMeasureSpec);<NEW_LINE>int heightMode = MeasureSpec.getMode(heightMeasureSpec);<NEW_LINE>int widthSize = MeasureSpec.getSize(widthMeasureSpec);<NEW_LINE>int heightSize = MeasureSpec.getSize(heightMe... | Math.min(w, h); |
582,403 | public static QueryMqSofamqConsumerConnectionResponse unmarshall(QueryMqSofamqConsumerConnectionResponse queryMqSofamqConsumerConnectionResponse, UnmarshallerContext _ctx) {<NEW_LINE>queryMqSofamqConsumerConnectionResponse.setRequestId(_ctx.stringValue("QueryMqSofamqConsumerConnectionResponse.RequestId"));<NEW_LINE>que... | = new ArrayList<ConnectionListItem>(); |
1,557,543 | public void bindView(View view, Context context, Cursor cursor) {<NEW_LINE>int id = cursor.getInt(cursor.getColumnIndex(OnionServiceContentProvider.OnionService._ID));<NEW_LINE>final String where = OnionServiceContentProvider.OnionService._ID + "=" + id;<NEW_LINE>TextView localPort = view.findViewById(R.id.hs_port);<NE... | OnionServiceContentProvider.OnionService.ENABLED, isChecked); |
624,703 | public static ListVpcGatewayEndpointsResponse unmarshall(ListVpcGatewayEndpointsResponse listVpcGatewayEndpointsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listVpcGatewayEndpointsResponse.setRequestId(_ctx.stringValue("ListVpcGatewayEndpointsResponse.RequestId"));<NEW_LINE>listVpcGatewayEndpointsResponse.setNextToke... | ("ListVpcGatewayEndpointsResponse.Endpoints[" + i + "].EndpointName")); |
65,021 | public void stop() {<NEW_LINE>stopping = true;<NEW_LINE>taskExecutor.shutdown();<NEW_LINE>List<ListenableFuture<Void>> shutdownFutures = new ArrayList<>();<NEW_LINE>synchronized (tasks) {<NEW_LINE>for (ThreadingTaskRunnerWorkItem taskWorkItem : tasks.values()) {<NEW_LINE>shutdownFutures.add(scheduleTaskShutdown(taskWor... | LOGGER.error(e, "Encountered exception when stopping all tasks."); |
156,207 | protected GridPointers pointerizeOp(Op op, int... dimensions) {<NEW_LINE>GridPointers pointers = new GridPointers(op, dimensions);<NEW_LINE>AtomicAllocator allocator = AtomicAllocator.getInstance();<NEW_LINE>val context = allocator.getDeviceContext();<NEW_LINE>pointers.setX(allocator.getPointer(op.x(), context));<NEW_L... | .shapeInfoDataBuffer(), context)); |
755,270 | final ListCrawlersResult executeListCrawlers(ListCrawlersRequest listCrawlersRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listCrawlersRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | (super.beforeMarshalling(listCrawlersRequest)); |
1,853,656 | public ServerConfiguration load(String issuer) throws Exception {<NEW_LINE>RestTemplate restTemplate = new RestTemplate(httpFactory);<NEW_LINE>// data holder<NEW_LINE>ServerConfiguration conf = new ServerConfiguration();<NEW_LINE>// construct the well-known URI<NEW_LINE>String url = issuer + "/.well-known/openid-config... | (getAsJwsAlgorithmList(o, "request_object_signing_alg_values_supported")); |
1,290,425 | public static ListDeployOrdersResponse unmarshall(ListDeployOrdersResponse listDeployOrdersResponse, UnmarshallerContext _ctx) {<NEW_LINE>listDeployOrdersResponse.setRequestId(_ctx.stringValue("ListDeployOrdersResponse.RequestId"));<NEW_LINE>listDeployOrdersResponse.setCode(_ctx.integerValue("ListDeployOrdersResponse.C... | (_ctx.stringValue("ListDeployOrdersResponse.ErrorMsg")); |
1,346,070 | @JSONP<NEW_LINE>@NoCache<NEW_LINE>@Consumes(MediaType.APPLICATION_JSON)<NEW_LINE>@Produces({ MediaType.APPLICATION_JSON, "application/javascript" })<NEW_LINE>public Response updateContentTypeFieldById(@PathParam("fieldId") final String fieldId, final String fieldJson, @Context final HttpServletRequest httpServletReques... | ExceptionMapperUtil.createResponse(null, "Field 'id' should be set"); |
166,967 | private JobEventRdbSearch.Condition buildCondition(final Map<String, String> requestParams, final String[] params) throws ParseException {<NEW_LINE>int perPage = 10;<NEW_LINE>int page = 1;<NEW_LINE>if (!Strings.isNullOrEmpty(requestParams.get("per_page"))) {<NEW_LINE>perPage = Integer.parseInt(requestParams.get("per_pa... | (requestParams.get("page")); |
803,519 | private void unlink(final Entry<CacheFileRegion> entry) {<NEW_LINE>assert Thread.holdsLock(this);<NEW_LINE>assert invariant(entry, true);<NEW_LINE>assert entry.prev != null;<NEW_LINE>final Entry<CacheFileRegion> currFront = freqs[entry.freq];<NEW_LINE>assert currFront != null;<NEW_LINE>if (currFront == entry) {<NEW_LIN... | .next.prev = entry.prev; |
1,142,389 | public ListEntityRecognizerSummariesResult listEntityRecognizerSummaries(ListEntityRecognizerSummariesRequest listEntityRecognizerSummariesRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listEntityRecognizerSummariesRequest);<NEW_LINE>A... | ListEntityRecognizerSummariesRequestMarshaller().marshall(listEntityRecognizerSummariesRequest); |
1,489,317 | final DeleteChannelResult executeDeleteChannel(DeleteChannelRequest deleteChannelRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteChannelRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
1,777,476 | private ListChangeListener<TreeItem<DocumentProperty>> treeItemListChangeListener() {<NEW_LINE>return change -> {<NEW_LINE>properties.clear();<NEW_LINE>if (!change.getList().isEmpty()) {<NEW_LINE>final TreeItem<DocumentProperty> treeItem = change.getList().get(0);<NEW_LINE>if (treeItem != null) {<NEW_LINE>final Documen... | new TreeSelectionChange(changeCasted, properties)); |
897,813 | private IType[] searchForOuterTypesOfReferences(IMethod[] newNameMethods, IProgressMonitor pm) throws CoreException {<NEW_LINE>final Set<IType> outerTypesOfReferences = new HashSet<>();<NEW_LINE>SearchPattern pattern = RefactoringSearchEngine.createOrPattern(newNameMethods, IJavaSearchConstants.REFERENCES);<NEW_LINE>IJ... | Object element = match.getElement(); |
153,630 | public void paint(Graphics g) {<NEW_LINE>if (isShowing()) {<NEW_LINE>super.paint(g);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (needLayout) {<NEW_LINE>doLayout();<NEW_LINE>}<NEW_LINE>int width = getWidth();<NEW_LINE>// We're painting in a PropertyRenderer, no parent present<NEW_LINE>Graphics cg = g.create(0, 0, width - b... | RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); |
932,142 | public boolean loadBPartner(int C_BPartner_ID) {<NEW_LINE>log.config("C_BPartner_ID=" + C_BPartner_ID);<NEW_LINE>// New bpartner<NEW_LINE>if (C_BPartner_ID == 0) {<NEW_LINE>m_partner = null;<NEW_LINE>m_pLocation = null;<NEW_LINE>m_user = null;<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>m_partner = new MBPartner(Env.getC... | int location = m_pLocation.getC_Location_ID(); |
585,171 | final UpdateAppImageConfigResult executeUpdateAppImageConfig(UpdateAppImageConfigRequest updateAppImageConfigRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateAppImageConfigRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
854,886 | public Slime toSlime(Tenant tenant) {<NEW_LINE>Slime slime = new Slime();<NEW_LINE>Cursor tenantObject = slime.setObject();<NEW_LINE>tenantObject.setString(nameField, tenant.name().value());<NEW_LINE>tenantObject.setString(typeField, valueOf(tenant.type()));<NEW_LINE>tenantObject.setLong(createdAtField, tenant.createdA... | , tenantObject.setObject(lastLoginInfoField)); |
971,762 | public String handleSerializingInitialRequest(HttpServletRequest req, HttpServletResponse resp, String sp_idp_initial, String shortRelayState, HttpRequestInfo requestInfo, SsoSamlService ssoService) {<NEW_LINE>InitialRequest ir = null;<NEW_LINE>try {<NEW_LINE>ir = createInitialRequestFromHttpRequestInfo(req, requestInf... | req, resp, initialrequest_cookie_name, initialrequest_cookie_value); |
756,793 | public Hcl visitObjectelem(HCLParser.ObjectelemContext ctx) {<NEW_LINE>return convert(ctx, (c, prefix) -> {<NEW_LINE>Space parenthesesPrefix = null;<NEW_LINE>if (ctx.LPAREN() != null) {<NEW_LINE>parenthesesPrefix = sourceBefore("(");<NEW_LINE>}<NEW_LINE>Expression identifier = visitIdentifier(ctx.Identifier());<NEW_LIN... | withAfter(sourceBefore(")"))); |
453,965 | public static void horizontal(Kernel1D_F32 kernel, GrayF32 input, GrayF32 output, int skip) {<NEW_LINE>final float[] dataSrc = input.data;<NEW_LINE>final float[] dataDst = output.data;<NEW_LINE>final float[] dataKer = kernel.data;<NEW_LINE>final int radius = kernel.getRadius();<NEW_LINE>final int offset = UtilDownConvo... | .width - input.width % skip; |
1,826,590 | final DescribeEventCategoriesResult executeDescribeEventCategories(DescribeEventCategoriesRequest describeEventCategoriesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeEventCategoriesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
1,795,164 | public void write(JSONWriter jsonWriter, Object object, Object fieldName, Type fieldType, long features) {<NEW_LINE>if (object == null) {<NEW_LINE>jsonWriter.writeNull();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>JSONWriter.Context context = jsonWriter.getContext();<NEW_LINE>Instant instant = (Instant) object;<NEW_LINE>if (... | DateTimeFormatter formatter = this.getDateFormatter(); |
1,080,534 | private static byte[] readMasterKey(ByteBuf packet) {<NEW_LINE>byte[] masterKey = null;<NEW_LINE>// check if the master key is an empty master key<NEW_LINE>boolean isEmptyKey = true;<NEW_LINE>for (int i = 0; i < BookieProtocol.MASTER_KEY_LENGTH; i++) {<NEW_LINE>if (packet.getByte(packet.readerIndex() + i) != emptyPassw... | masterKey, 0, BookieProtocol.MASTER_KEY_LENGTH); |
765,163 | public Callback deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException {<NEW_LINE>final ObjectMapper mapper;<NEW_LINE>if (openapi31) {<NEW_LINE>mapper = Json31.mapper();<NEW_LINE>} else {<NEW_LINE>mapper = Json.mapper();<NEW_LINE>}<NEW_LINE>Callback result = new Callback();<NEW_LINE>JsonNode node = ... | (child, PathItem.class)); |
1,537,491 | protected CloseableIterable<FileScanTask> planFiles(TableOperations ops, Snapshot snapshot, Expression rowFilter, boolean ignoreResiduals, boolean caseSensitive, boolean colStats) {<NEW_LINE>String schemaString = SchemaParser.toJson(schema());<NEW_LINE>String specString = PartitionSpecParser.toJson(PartitionSpec.unpart... | residuals = ResidualEvaluator.unpartitioned(filter); |
630,563 | // @Override<NEW_LINE>// public void beforeUnmarshal(Object target, Object parent) {<NEW_LINE>//<NEW_LINE>// }<NEW_LINE>@Override<NEW_LINE>public void afterUnmarshal(Object target, Object parent) {<NEW_LINE>if (target instanceof AlternateContent.Choice) {<NEW_LINE>AlternateContent.Choice choice = (AlternateContent.Choi... | addMcChoiceNamespace(choice.getIgnorable()); |
1,370 | static void search(File dir, List<File> found, Pattern matching, Pattern ignoring, boolean includeFiles, boolean includeDirectories, boolean recursive) {<NEW_LINE>File[] files = dir.listFiles();<NEW_LINE>if (files != null) {<NEW_LINE>for (File f : files) {<NEW_LINE>if ((includeFiles && f.isFile()) || (includeDirectorie... | "name", f.getAbsoluteFile()); |
1,017,001 | private // -----------//<NEW_LINE>Clef buildClef(ClefInter clef) {<NEW_LINE>Clef pmClef = factory.createClef();<NEW_LINE>// Staff number (only for multi-staff parts)<NEW_LINE>if (current.logicalPart.isMultiStaff()) {<NEW_LINE>pmClef.setNumber(new BigInteger("" + (1 + clef.getStaff().getIndexInPart())));<NEW_LINE>}<NEW_... | logger.error("Clef shape not exported {}", shape); |
56,748 | public Content update(@NonNull final Content content, @Nonnull String url, boolean updateImages) {<NEW_LINE>content.setSite(TSUMINO);<NEW_LINE>String theUrl = galleryUrl<MASK><NEW_LINE>if (theUrl.isEmpty())<NEW_LINE>return new Content().setStatus(StatusContent.IGNORED);<NEW_LINE>content.setUrl(theUrl.replace("/Read/Ind... | .isEmpty() ? url : galleryUrl; |
793,799 | public static void chekAndRegisterCommands(DocumentServiceContext context) {<NEW_LINE>LanguageServerContext serverContext = context.languageServercontext();<NEW_LINE>LSClientLogger <MASK><NEW_LINE>ServerCapabilities serverCapabilities = serverContext.get(ServerCapabilities.class);<NEW_LINE>if (serverCapabilities.getExe... | clientLogger = LSClientLogger.getInstance(serverContext); |
1,098,142 | private RealmIdentity createRealmIdentity(SamlPrincipal principal) {<NEW_LINE>return new RealmIdentity() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Principal getRealmIdentityPrincipal() {<NEW_LINE>return principal;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public SupportLevel getCredentialAcquireSupport(Clas... | basicIdentity(new MapAttributes(attributes)); |
419,840 | private static byte[] rsaPrivateKeyToBlob(RSAPrivateCrtKey rsaPrivCrtKey) throws CryptoException {<NEW_LINE>try {<NEW_LINE>// 2316 sufficient for a 4096 bit RSA key<NEW_LINE>ByteBuffer bb = ByteBuffer.wrap(new byte[4096]);<NEW_LINE>bb.order(ByteOrder.LITTLE_ENDIAN);<NEW_LINE>// Write out the blob fields<NEW_LINE>// rsa... | UnsignedUtil.putInt(bb, bitLength); |
1,334,723 | private FunctionNode module(final String moduleName) {<NEW_LINE>boolean oldStrictMode = isStrictMode;<NEW_LINE>try {<NEW_LINE>// Module code is always strict mode code. (ES6 10.2.1)<NEW_LINE>isStrictMode = true;<NEW_LINE>// Make a pseudo-token for the script holding its start and length.<NEW_LINE>int functionStart = Ma... | setModule(module.createModule()); |
1,088,771 | public void mergeTrackable(final Trackable newTrackable) {<NEW_LINE>guid = StringUtils.defaultIfEmpty(newTrackable.guid, guid);<NEW_LINE>geocode = StringUtils.defaultIfEmpty(newTrackable.geocode, geocode);<NEW_LINE>iconUrl = StringUtils.defaultIfEmpty(newTrackable.iconUrl, iconUrl);<NEW_LINE>name = StringUtils.defaultI... | defaultIfNull(newTrackable.released, released); |
1,123,989 | public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {<NEW_LINE>logger.debug("Reporting metrics");<NEW_LINE>long timestamp = System.currentTimeMillis();<NEW_LINE>try {<NEW_LINE>for (KairosMetricReporter reporter : m_reporterProvider.get()) {<NEW_LINE>List<DataPointSet> dpList = repo... | (), dataPoint, m_ttl)); |
78,382 | public boolean execute() throws Exception {<NEW_LINE>if (_dimensions == null && _metrics == null && _timeColumnName == null) {<NEW_LINE>LOGGER.error("Error: Missing required argument, please specify at least one of -dimensions, -metrics, -timeColumnName");<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Schema schema;<NEW_L... | "Store Pinot schema to file: {}", outputFile.getAbsolutePath()); |
1,041,712 | final DetectStackSetDriftResult executeDetectStackSetDrift(DetectStackSetDriftRequest detectStackSetDriftRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(detectStackSetDriftRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
904,885 | public static SpnegoEngine instance(final String username, final String password, final String servicePrincipalName, final String realmName, final boolean useCanonicalHostname, final Map<String, String> customLoginConfig, final String loginContextName) {<NEW_LINE>String key = "";<NEW_LINE>if (customLoginConfig != null ... | , customLoginConfig, loginContextName, null)); |
1,388,181 | public static void rewriteQueryContextWithHints(QueryContext queryContext, IndexSegment indexSegment) {<NEW_LINE>Map<ExpressionContext, ExpressionContext> expressionOverrideHints = queryContext.getExpressionOverrideHints();<NEW_LINE>if (MapUtils.isEmpty(expressionOverrideHints)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>L... | > selectExpressions = queryContext.getSelectExpressions(); |
256,796 | public void evaluateInFrame(@NotNull final String isolateId, @NotNull final Frame vmFrame, @NotNull final String expression, @NotNull final XDebuggerEvaluator.XEvaluationCallback callback) {<NEW_LINE>addRequest(() -> myVmService.evaluateInFrame(isolateId, vmFrame.getIndex(), expression, new EvaluateInFrameConsumer() {<... | errorOccurred(sentinel.getValueAsString()); |
1,733,488 | public void writeToParcel(Parcel dest, int flags) {<NEW_LINE><MASK><NEW_LINE>dest.writeInt(this.score);<NEW_LINE>dest.writeByte(editable ? (byte) 1 : (byte) 0);<NEW_LINE>dest.writeByte(voteUpAble ? (byte) 1 : (byte) 0);<NEW_LINE>dest.writeByte(voteUpEd ? (byte) 1 : (byte) 0);<NEW_LINE>dest.writeByte(voteDownAble ? (byt... | dest.writeLong(this.id); |
792,657 | final SearchResourcesResult executeSearchResources(SearchResourcesRequest searchResourcesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(searchResourcesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(F... | (super.beforeMarshalling(searchResourcesRequest)); |
368,767 | public BufferedImageOp op() {<NEW_LINE>thirdparty.jhlabs.image.SmearFilter op = new thirdparty.jhlabs.image.SmearFilter();<NEW_LINE>op.setDensity(density);<NEW_LINE>op.setAngle(angle);<NEW_LINE>op.setScatter(scatter);<NEW_LINE>op.setDistance(distance);<NEW_LINE>op.setMix(mix);<NEW_LINE>switch(smearType) {<NEW_LINE>case... | jhlabs.image.SmearFilter.CROSSES); |
174,913 | private static String formatFolderListingTableHtml(String folderName, List<FileMetadata> fileMetadatas, String apiLocation, boolean originals) {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append(formatFolderListingTableHeaderHtml());<NEW_LINE>for (FileMetadata fileMetadata : fileMetadatas) {<NEW_LINE>... | (formatFileListFolderHtml(subFolder, folderAccessUrl)); |
1,241,931 | private void applyPhaseOptions(JimpleBody b, Map<String, String> opts) {<NEW_LINE><MASK><NEW_LINE>if (options.use_original_names()) {<NEW_LINE>PhaseOptions.v().setPhaseOptionIfUnset("jb.lns", "only-stack-locals");<NEW_LINE>}<NEW_LINE>final PackManager pacman = PackManager.v();<NEW_LINE>final boolean time = Options.v().... | JBOptions options = new JBOptions(opts); |
1,554,126 | final CreateDefaultSubnetResult executeCreateDefaultSubnet(CreateDefaultSubnetRequest createDefaultSubnetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createDefaultSubnetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
77,107 | protected void doExecute(ExecutionContext context) {<NEW_LINE>CommandConsole commandConsole = context.getCommandConsole();<NEW_LINE>ManifestFileProcessor processor = new ManifestFileProcessor();<NEW_LINE>for (Map.Entry<String, Map<String, ProvisioningFeatureDefinition>> prodFeatureEntries : processor.getFeatureDefiniti... | FeatureDefinition featureDefintion = entry.getValue(); |
1,401,524 | public void actionPerformed(ActionEvent e) {<NEW_LINE>final Object source = e.getSource();<NEW_LINE>if (source == panel.tgbHeadVsIndex || source == panel.tgbHeadVsWorking || source == panel.tgbIndexVsWorking) {<NEW_LINE>onDisplayedStatusChanged();<NEW_LINE>} else if (source == panel.btnDiff) {<NEW_LINE>modeKeeper.store... | .getTask().waitFinished(); |
746,041 | public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {<NEW_LINE>String <MASK><NEW_LINE>baseBind.clear.setVisibility(inputs.length() > 0 ? View.VISIBLE : View.INVISIBLE);<NEW_LINE>if (inputs.length() > 0 && searchType == 0 && !inputs.endsWith(" ") && fuck != null) {<NEW_LINE>List<String> keys = Ar... | inputs = String.valueOf(charSequence); |
492,811 | final GetEventSourceMappingResult executeGetEventSourceMapping(GetEventSourceMappingRequest getEventSourceMappingRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getEventSourceMappingRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
1,027,106 | public void start(Stage primaryStage) {<NEW_LINE>this.primaryStage = primaryStage;<NEW_LINE>String version;<NEW_LINE>try {<NEW_LINE>version = FileHelper.getManifestAttributes().getValue("Application-Version");<NEW_LINE>} catch (IOException ex) {<NEW_LINE>version = "dev";<NEW_LINE>}<NEW_LINE>title = "MCA Selector " + ve... | getClassLoader().getResource("style.css"); |
1,132,510 | public DateFormat createDateFormat(String pattern, Locale locale, TimeZone tz) {<NEW_LINE>int[] dateStyle = null;<NEW_LINE>int[] timeStyle = null;<NEW_LINE>if (pattern != null && pattern.trim().length() > 0) {<NEW_LINE>int sepIdx = pattern.indexOf(STANDARD_DATE_FORMAT_SEPARATOR);<NEW_LINE>String dateTok = sepIdx < 0 ? ... | pattern.substring(0, sepIdx); |
181,713 | private void computeNullStatus(FlowInfo trueBranchInfo, FlowInfo falseBranchInfo, FlowContext flowContext) {<NEW_LINE>// given that the condition cannot be optimized to a constant<NEW_LINE>// we now merge the nullStatus from both branches:<NEW_LINE>if (this.ifTrueNullStatus == -1) {<NEW_LINE>// has this status been pre... | valueIfTrue.nullStatus(trueBranchInfo, flowContext); |
184,773 | public Map<String, Object> assignUserAccess(Map<String, String> params) throws Exception {<NEW_LINE>final WebContext ctx = WebContextFactory.get();<NEW_LINE>final HttpServletRequest request = ctx.getHttpServletRequest();<NEW_LINE>final HttpServletResponse response = ctx.getHttpServletResponse();<NEW_LINE>final UserAPI ... | "user", userToModify.toMap()); |
1,583,745 | final PutAppsListResult executePutAppsList(PutAppsListRequest putAppsListRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(putAppsListRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
1,394,248 | public static void main(String[] args) throws Exception {<NEW_LINE><MASK><NEW_LINE>DefaultCacheMonitor l2CacheMonitor = new DefaultCacheMonitor("OrderCache_L2");<NEW_LINE>DefaultCacheMonitor orderCacheMonitor = new DefaultCacheMonitor("OrderCache");<NEW_LINE>Cache<String, Integer> l1Cache = CaffeineCacheBuilder.createC... | DefaultCacheMonitor l1CacheMonitor = new DefaultCacheMonitor("OrderCache_L1"); |
1,337,759 | ActionResult<List<Wo>> execute(EffectivePerson effectivePerson, String workId) throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>ActionResult<List<Wo>> result = new ActionResult<>();<NEW_LINE>Business business = new Business(emc);<NEW_LINE>if (!b... | find(workId, Work.class); |
1,652,315 | final GetApplicationResult executeGetApplication(GetApplicationRequest getApplicationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getApplicationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
1,150,914 | final UpdateWebACLResult executeUpdateWebACL(UpdateWebACLRequest updateWebACLRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateWebACLRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | invoke(request, responseHandler, executionContext); |
920,414 | private void validateElement(Element element) {<NEW_LINE>TypeMirror requiredAnnotationTypeMirror = processingEnv.getElementUtils().getTypeElement(RequiredAnnotation.class.getName()).asType();<NEW_LINE>for (AnnotationMirror annotation : processingEnv.getElementUtils().getAllAnnotationMirrors(element)) {<NEW_LINE>Annotat... | value = getAnnotationValue(requiredAnnotationMirror, "value"); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.