idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,719,550 | static WebSocketClientHandshaker newHandshaker(URI webSocketURL, WebSocketVersion version, String subprotocol, boolean allowExtensions, HttpHeaders customHeaders, int maxFramePayloadLength, boolean performMasking) {<NEW_LINE>WebSocketDecoderConfig config = WebSocketDecoderConfig.newBuilder().expectMaskedFrames(false).a... | , customHeaders, maxFramePayloadLength, -1); |
238,162 | public static License fromXContent(XContentParser parser) throws IOException {<NEW_LINE>String licenseKey = null;<NEW_LINE>// advance from metadata START_OBJECT<NEW_LINE>XContentParser.Token token = parser.nextToken();<NEW_LINE>if (token != XContentParser.Token.FIELD_NAME || !Objects.equals(parser.currentName(), WRITEA... | "unexpected FIELD_NAME " + parser.currentToken()); |
953,151 | private BindableValue bindableValueFor(JsonToken token) {<NEW_LINE>if (!JsonTokenType.STRING.equals(token.getType()) && !JsonTokenType.UNQUOTED_STRING.equals(token.getType()) && !JsonTokenType.REGULAR_EXPRESSION.equals(token.getType())) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>boolean isRegularExpression = token.get... | computeParameterIndex(inSpelMatcher.group()); |
40,366 | public void paint(JComponent c, Graphics g, PaintContext context, Rectangle clip, FieldBackgroundColorManager map, RowColLocation cursorLoc, int rowHeight) {<NEW_LINE>// center in the heightAbove area (negative, since 0 is the baseline of text, which is at<NEW_LINE>// the bottom of the heightAbove)<NEW_LINE>int toggleH... | context.getBackground(), null); |
1,378,325 | public void actionPerformed(ActionEvent e) {<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>JComboBox<String> cb = (JComboBox<String>) e.getSource();<NEW_LINE>String filename = (String) cb.getSelectedItem();<NEW_LINE><MASK><NEW_LINE>MapPanel.INSTANCE.vertices = null;<NEW_LINE>try {<NEW_LINE>ControlPanel.this.building... | LOGGER.info("Changed building to " + filename); |
1,474,293 | public static void main(String[] args) {<NEW_LINE>Path data = FileSystems.<MASK><NEW_LINE>try {<NEW_LINE>Map<String, String> config = SusiServer.readConfig(data);<NEW_LINE>DAO.init(config, data, true);<NEW_LINE>File f = new File("conf/os_skills/operation/en/en_0001_foundation.txt");<NEW_LINE>SusiSkill.ID skillid = new ... | getDefault().getPath("data"); |
337,822 | public void run(RegressionEnvironment env) {<NEW_LINE>String[] fields = "c0,c1,c2,c3,c4".split(",");<NEW_LINE>SupportEvalBuilder builder = new SupportEvalBuilder("SupportCollection");<NEW_LINE>builder.expression<MASK><NEW_LINE>builder.expression(fields[1], "strvals.distinctOf(v => extractNum(v))");<NEW_LINE>builder.exp... | (fields[0], "strvals.distinctOf()"); |
1,645,841 | public Boolean2DArrayAssert isDeepEqualTo(boolean[][] expected) {<NEW_LINE>// boolean[][] actual = new boolean[][] { { true, false }, { false, true } };<NEW_LINE>if (actual == expected)<NEW_LINE>return myself;<NEW_LINE>isNotNull();<NEW_LINE>if (expected.length != actual.length) {<NEW_LINE>throw failures.failure(info, s... | .length, expected.length)); |
1,323,239 | public static void normalize() {<NEW_LINE>if (getDebugLookahead() && !getDebugParser()) {<NEW_LINE>if (cmdLineSetting.contains(USEROPTION__DEBUG_PARSER) || inputFileSetting.contains(USEROPTION__DEBUG_PARSER)) {<NEW_LINE>JavaCCErrors.warning("True setting of option DEBUG_LOOKAHEAD overrides " + "false setting of option ... | put(USEROPTION__DEBUG_PARSER, Boolean.TRUE); |
1,581,768 | public Description matchMethod(MethodTree tree, VisitorState state) {<NEW_LINE>Type stringType = state.getSymtab().stringType;<NEW_LINE>boolean isFormatMethod = ASTHelpers.hasAnnotation(ASTHelpers.getSymbol(tree), FormatMethod.class, state);<NEW_LINE>boolean foundFormatString = false;<NEW_LINE>boolean foundString = fal... | paramSymbol.type, stringType, state); |
1,412,001 | // Suppress high Cognitive Complexity warning<NEW_LINE>@SuppressWarnings("squid:S3776")<NEW_LINE>private SingleQuery constructSelectPlan(FilterOperator filterOperator, List<String> columnNames) throws QueryOperatorException {<NEW_LINE>FilterOperator timeFilter = null;<NEW_LINE>FilterOperator valueFilter = null;<NEW_LIN... | valueFilter = valueList.get(0); |
1,444,352 | public final void compute() {<NEW_LINE>final BiFunction<? super V, ? super V, ? extends V> reducer;<NEW_LINE>if ((reducer = this.reducer) != null) {<NEW_LINE>for (int i = baseIndex, f, h; batch > 0 && (h = ((f = baseLimit) + i) >>> 1) > i; ) {<NEW_LINE>addToPendingCount(1);<NEW_LINE>(rights = new ReduceValuesTask<K, V>... | .apply(tr, sr)); |
824,529 | protected JFreeChart createScatterChart() throws JRException {<NEW_LINE>ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());<NEW_LINE>JFreeChart jfreeChart = ChartFactory.createScatterPlot(evaluateTextExpression(getChart().getTitleExpression()), evaluateTextExpression(((JRScatterPlot) getPlot()).getXAxis... | (scatterPlot.getRangeAxisMaxValueExpression())); |
39,022 | public CreateSecurityProfileResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CreateSecurityProfileResult createSecurityProfileResult = new CreateSecurityProfileResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentE... | JsonToken token = context.getCurrentToken(); |
79,198 | private void triggerScaleUp(String streamSegmentName, int numOfSplits) {<NEW_LINE>Pair<Long, Long> pair = cache.get(streamSegmentName);<NEW_LINE>long lastRequestTs = 0;<NEW_LINE>if (pair != null && pair.getKey() != null) {<NEW_LINE>lastRequestTs = pair.getKey();<NEW_LINE>}<NEW_LINE>long timestamp = getTimeMillis();<NEW... | segment = Segment.fromScopedName(streamSegmentName); |
713,544 | private void sampleOldestActions(AnsiTerminalWriter terminalWriter) throws IOException {<NEW_LINE>// This method can only be called if 'activeActions.size()' was observed to be larger than 1 at<NEW_LINE>// some point in the past. But the 'activeActions' map can grow and shrink concurrent with this<NEW_LINE>// code here... | addAll(activeActions.entrySet()); |
1,687,487 | public SigningConfigurationOverrides unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>SigningConfigurationOverrides signingConfigurationOverrides = new SigningConfigurationOverrides();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDep... | int originalDepth = context.getCurrentDepth(); |
386,069 | public UpdateAssociationStatusResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>UpdateAssociationStatusResult updateAssociationStatusResult = new UpdateAssociationStatusResult();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDep... | int originalDepth = context.getCurrentDepth(); |
1,460,786 | public ImageData create(int height, HSB backgroundColor, boolean embossed, boolean rotated) {<NEW_LINE>ImageData source = null;<NEW_LINE>if (embossed) {<NEW_LINE>if (rotated) {<NEW_LINE>source = CoreImages.getImageDescriptor(CoreImages.HANDLE_EMBOSSED_ROTATED).getImageData();<NEW_LINE>} else {<NEW_LINE>source = CoreIma... | CoreImages.HANDLE).getImageData(); |
1,196,215 | protected void convert(@NotNull BaseViewHolder helper, @Nullable Status item) {<NEW_LINE>switch(helper.getLayoutPosition() % 3) {<NEW_LINE>case 0:<NEW_LINE>helper.setImageResource(R.id.img, R.mipmap.animation_img1);<NEW_LINE>break;<NEW_LINE>case 1:<NEW_LINE>helper.setImageResource(R.id.img, R.mipmap.animation_img2);<NE... | (clickableSpan).create()); |
387,498 | private String createHTML(PAGE_TYPE requestPage) {<NEW_LINE>String result = "<html><head>";<NEW_LINE>// READ CSS<NEW_LINE>URL url = getClass().getClassLoader().getResource("org/compiere/images/PAPanel.css");<NEW_LINE>InputStreamReader ins;<NEW_LINE>try {<NEW_LINE>ins = new InputStreamReader(url.openStream());<NEW_LINE>... | + "<img src=\"res:org/compiere/images/logo_ad.png\">" + "</td><td></td><td width=\"290\">" + "</td></tr></table>" + "</body></html>"; |
1,163,906 | public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>env.compileDeploy("@public create window AWindow#keepall as A", path);<NEW_LINE>env.compileDeploy("insert into AWindow select * from A", path);<NEW_LINE>// preload<NEW_LINE>for (int i = 0; i < 10000; i++) {<NEW_LI... | assertEqualsNew("s0", "c0", "ALater"); |
1,766,049 | public void mouseMoved(MouseEvent evt) {<NEW_LINE>if (LOG.isLoggable(Level.FINE)) {<NEW_LINE>// NOI18N<NEW_LINE>LOG.log(Level.FINE, "mouseMoved: x=" + evt.getX() + "; y=" + evt.getY() + "enabled=" + enabled + ", status=" + status + ", flags=" + flags);<NEW_LINE>}<NEW_LINE>if (toolTip != null) {<NEW_LINE>Rectangle ignor... | contains(mousePosition) : null)); |
299,036 | public static GetOwnerApplyOrderDetailResponse unmarshall(GetOwnerApplyOrderDetailResponse getOwnerApplyOrderDetailResponse, UnmarshallerContext _ctx) {<NEW_LINE>getOwnerApplyOrderDetailResponse.setRequestId(_ctx.stringValue("GetOwnerApplyOrderDetailResponse.RequestId"));<NEW_LINE>getOwnerApplyOrderDetailResponse.setSu... | = new ArrayList<Resource>(); |
399,164 | public Request<DeleteClusterRequest> marshall(DeleteClusterRequest deleteClusterRequest) {<NEW_LINE>if (deleteClusterRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<DeleteClusterRequest> request = new DefaultRequest<DeleteClusterRequest>(... | (deleteClusterRequest.getFinalClusterSnapshotRetentionPeriod())); |
457,082 | public MultipartFormEntity buildEntity() {<NEW_LINE>String boundaryCopy = boundary;<NEW_LINE>if (boundaryCopy == null && contentType != null) {<NEW_LINE>boundaryCopy = contentType.getParameter("boundary");<NEW_LINE>}<NEW_LINE>if (boundaryCopy == null) {<NEW_LINE>boundaryCopy = generateBoundary();<NEW_LINE>}<NEW_LINE>Ch... | Collections.<FormBodyPart>emptyList(); |
349,371 | public void change(final Host bookmark) {<NEW_LINE>passwordField.cell().<MASK><NEW_LINE>passwordField.setEnabled(options.password && !bookmark.getCredentials().isAnonymousLogin());<NEW_LINE>if (options.keychain && options.password) {<NEW_LINE>if (StringUtils.isBlank(bookmark.getHostname())) {<NEW_LINE>return;<NEW_LINE>... | setPlaceholderString(options.getPasswordPlaceholder()); |
47,181 | public String formatAsFieldItemList(String content, String fieldName, boolean forceAsField) {<NEW_LINE>if (forceAsField) {<NEW_LINE>return ITEM_TOKEN + content;<NEW_LINE>}<NEW_LINE>if (!isModelField(content, fieldName)) {<NEW_LINE>return content;<NEW_LINE>}<NEW_LINE>int startIndex = content.indexOf(DOLLAR_TOTKEN);<NEW_... | fieldName, getItemToken() + fieldName); |
1,143,592 | public void put(Object key, Object value) {<NEW_LINE>if (cacheSize <= memoryCache.size()) {<NEW_LINE>// we need to find the oldest entry<NEW_LINE>Enumeration e = memoryCache.keys();<NEW_LINE>long oldest = System.currentTimeMillis();<NEW_LINE>Object oldestKey = null;<NEW_LINE>Object[] oldestValue = null;<NEW_LINE>while ... | [0]).longValue(); |
168,226 | protected void dropClassInternal(ODatabaseDocumentInternal database, final String className) {<NEW_LINE>acquireSchemaWriteLock(database);<NEW_LINE>try {<NEW_LINE>if (database.getTransaction().isActive())<NEW_LINE>throw new IllegalStateException("Cannot drop a class inside a transaction");<NEW_LINE>if (className == null... | cls = classes.get(key); |
449,262 | public static void main(String[] args) {<NEW_LINE>Exercise28_StackWithAQueue<Integer> exercise28_stackWithAQueue = new Exercise28_StackWithAQueue<>();<NEW_LINE>StdOut.println("IsEmpty: " + exercise28_stackWithAQueue.isEmpty() + " Expected: true");<NEW_LINE>exercise28_stackWithAQueue.push(1);<NEW_LINE>exercise28_stackWi... | println(exercise28_stackWithAQueue.pop()); |
287,449 | public static ListDevicesResponse unmarshall(ListDevicesResponse listDevicesResponse, UnmarshallerContext _ctx) {<NEW_LINE>listDevicesResponse.setRequestId(_ctx.stringValue("ListDevicesResponse.RequestId"));<NEW_LINE>listDevicesResponse.setMessage(_ctx.stringValue("ListDevicesResponse.Message"));<NEW_LINE>listDevicesRe... | ("ListDevicesResponse.Data.Records[" + i + "].DeviceSite")); |
754,470 | public double squaredDistance(NumberVector n, ClusterFeature ocf) {<NEW_LINE>if (!(ocf instanceof BIRCHCF)) {<NEW_LINE>throw new IllegalStateException("This distance only supports BIRCH clustering features.");<NEW_LINE>}<NEW_LINE>BIRCHCF cf = (BIRCHCF) ocf;<NEW_LINE>if (cf.getWeight() <= 0) {<NEW_LINE>return 0.;<NEW_LI... | double sum = cf.sumOfSumOfSquares(); |
1,524,320 | public PlanFragment visitPhysicalMysqlScan(OptExpression optExpression, ExecPlan context) {<NEW_LINE>PhysicalMysqlScanOperator node = (PhysicalMysqlScanOperator) optExpression.getOp();<NEW_LINE>context.getDescTbl().<MASK><NEW_LINE>TupleDescriptor tupleDescriptor = context.getDescTbl().createTupleDescriptor();<NEW_LINE>... | addReferencedTable(node.getTable()); |
1,345,308 | private static void generateLogManagerLogger(ClassOutput output, BiFunction<MethodCreator, FieldDescriptor, BranchResult> isMinLevelEnabledFunction) {<NEW_LINE>try (ClassCreator cc = ClassCreator.builder().setFinal(true).className(LOGMANAGER_LOGGER_CLASS_NAME).classOutput(output).build()) {<NEW_LINE>AnnotationCreator t... | isLoggableMethod, nameAlias.getFieldDescriptor()); |
1,630,619 | public static DescribeBgpGroupsResponse unmarshall(DescribeBgpGroupsResponse describeBgpGroupsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeBgpGroupsResponse.setRequestId<MASK><NEW_LINE>describeBgpGroupsResponse.setPageSize(_ctx.integerValue("DescribeBgpGroupsResponse.PageSize"));<NEW_LINE>describeBgpGroupsRes... | (_ctx.stringValue("DescribeBgpGroupsResponse.RequestId")); |
1,391,333 | public void mouseReleased(final MouseEvent e) {<NEW_LINE>final MainView v = (MainView) e.getSource();<NEW_LINE>if (!v.contains(e.getX(), e.getY())) {<NEW_LINE>v.setMouseArea(MouseArea.OUT);<NEW_LINE>}<NEW_LINE>if (!isDragActive()) {<NEW_LINE>super.mouseReleased(e);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final NodeView no... | final Quantity<LengthUnit> hGap = hgap; |
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(tags_); |
311,315 | final UntagResourceResult executeUntagResource(UntagResourceRequest untagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(untagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "UntagResource"); |
940,316 | public void updateGui() {<NEW_LINE>// Note: There is a reason for why we have to update the toolbar<NEW_LINE>// from the outside. The toolbar can not update itself because<NEW_LINE>// the toolbar state depends on the state of the TID box in the<NEW_LINE>// debug panel.<NEW_LINE>final IDebugger debugger = m_debugger.get... | getTraceLogger(debugger).hasEchoBreakpoints(); |
1,371,502 | public void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>((SyncthingApp) getApplication()).component().inject(this);<NEW_LINE>setContentView(R.layout.activity_main);<NEW_LINE>mDrawerLayout = findViewById(R.id.drawer_layout);<NEW_LINE>FragmentManager fm = getSupportFragment... | DeviceListFragment.class.getName()); |
975,020 | public SQLExpr buildPartitionBy(GsiMetaManager.GsiTableMetaBean indexTableMeta, boolean onTable) {<NEW_LINE>final String policy = onTable <MASK><NEW_LINE>final String key = onTable ? indexTableMeta.tbPartitionKey : indexTableMeta.dbPartitionKey;<NEW_LINE>if (null == indexTableMeta || TStringUtil.isBlank(policy)) {<NEW_... | ? indexTableMeta.tbPartitionPolicy : indexTableMeta.dbPartitionPolicy; |
883,452 | public static ItineraryListFilterChain createFilterChain(SortOrder sortOrder, ItineraryFilterParameters params, int maxNumOfItineraries, Instant filterOnLatestDepartureTime, boolean removeWalkAllTheWayResults, boolean maxNumberOfItinerariesCropHead, Consumer<Itinerary> maxLimitReachedSubscriber) {<NEW_LINE>var builder ... | .createWithOneItineraryPerGroup(params.groupSimilarityKeepOne)); |
804,868 | public void validate(CustomBindingResult bindingResult, PurchaseContext purchaseContext, SameCountryValidator vatValidator, Map<ConfigurationKeys, Boolean> formValidationParameters, Optional<Validator.TicketFieldsFilterer> ticketFieldsFilterer, boolean reservationRequiresPayment) {<NEW_LINE>formalValidation(bindingResu... | .isPresent() ? STEP_2_INVALID_VAT : STEP_2_MISSING_ATTENDEE_DATA; |
923,762 | public CELLTYPE join(Column<?, ?>... columns) {<NEW_LINE>if (columns.length <= 1) {<NEW_LINE>throw new IllegalArgumentException("You can't merge less than 2 columns together.");<NEW_LINE>}<NEW_LINE>HashSet<Column<?, ?>> columnGroup = new HashSet<Column<?, ?>>();<NEW_LINE>// NOTE: this doesn't care about hidden columns,... | joinedCell.setSection(getSection()); |
1,555,643 | public Page<EntCustomer> findByCreaterAndSharesAndOrgi(String creater, String shares, String orgi, Date begin, Date end, boolean includeDeleteData, String q, Pageable page) {<NEW_LINE>BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery();<NEW_LINE>BoolQueryBuilder boolQueryBuilder1 = new BoolQueryBuilder();<NEW... | .defaultOperator(Operator.AND)); |
1,454,486 | public Symbol tryApplyRules(Symbol node) {<NEW_LINE>final boolean isTraceEnabled = LOGGER.isTraceEnabled();<NEW_LINE>// Some rules may only become applicable after another rule triggered, so we keep<NEW_LINE>// trying to re-apply the rules as long as at least one plan was transformed.<NEW_LINE>boolean done = false;<NEW... | ).getSimpleName() + "' transformed the symbol"); |
1,820,362 | /* Buggy implementation. Keep as first draft if we want to use it again<NEW_LINE>public void renameForDragAndDrop(Long draggedDeckDid, Long ontoDeckDid) throws DeckRenameException {<NEW_LINE>Deck draggedDeck = get(draggedDeckDid);<NEW_LINE>String draggedDeckName = draggedDeck.getString("name");<NEW_LINE>String ontoDeck... | [] parentDeckPath = path(parentDeckName); |
74,693 | private static // F743-506<NEW_LINE>TimerMethodData.AutomaticTimer processAutomaticTimerFromXML(com.ibm.ws.javaee.dd.ejb.Timer timer) {<NEW_LINE>TimerSchedule timerSchedule = timer.getSchedule();<NEW_LINE>boolean persistent = !timer.isSetPersistent() || timer.isPersistent();<NEW_LINE>ScheduleExpression schedule = new S... | String dayOfWeek = timerSchedule.getDayOfWeek(); |
647,176 | protected Area createGridArea(int gridRadius) {<NEW_LINE>final Area cellArea = new Area(createCellShape(getSize()));<NEW_LINE>final Set<Point> points = generateRing(gridRadius);<NEW_LINE>Area gridArea = new Area();<NEW_LINE>// HACK! Hex cellShape is ever so off from grid so adding them to a single Area can produce gap<... | Math.toRadians(90))); |
472,020 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>if (controller == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Set<String> choices = new HashSet<>();<NEW_LINE>choices.add("Artifacts");<NEW_LINE>choices.add("Creatures");<NEW_LINE>cho... | ).apply(game, source); |
917,458 | public void validate(Context context, ActionListener<Context> listener) {<NEW_LINE>List<String> remoteIndices = new ArrayList<<MASK><NEW_LINE>Map<String, Version> remoteClusterVersions;<NEW_LINE>try {<NEW_LINE>List<String> remoteAliases = RemoteClusterLicenseChecker.remoteClusterAliases(context.getRegisteredRemoteClust... | >(context.resolveRemoteSource()); |
92,223 | private MapValue removeInternal(String key, Optional<byte[]> value, Optional<MapValue> tombstone) {<NEW_LINE>checkState(!closed, destroyedMessage);<NEW_LINE>checkNotNull(key, ERROR_NULL_KEY);<NEW_LINE>checkNotNull(value, ERROR_NULL_VALUE);<NEW_LINE>tombstone.ifPresent(v -> checkState(v.isTombstone()));<NEW_LINE>counter... | LOGGER.trace("ECMap Remove: Existing value for key {} is already null", k); |
5,355 | public String extractBamlXml(String xml) throws AxelorException {<NEW_LINE>if (xml == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>DocumentBuilderFactory docBuilderFactory = new XPathParse().getDocumentBuilderFactory();<NEW_LINE>try {<NEW_LINE>docBuilderFactory.setNamespaceAware(false);<NEW_LINE>DocumentBuilder bu... | ByteArrayInputStream(xml.getBytes()); |
880,929 | private void printGCSummary() {<NEW_LINE>if (!HeapOptions.PrintGCSummary.getValue()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Log log = Log.log();<NEW_LINE>final String prefix = "PrintGCSummary: ";<NEW_LINE>log.string(prefix).string("MaximumYoungGenerationSize: ").unsigned(getPolicy().getMaximumYoungGenerationSize()).new... | HeapImpl heap = HeapImpl.getHeapImpl(); |
858,236 | public static boolean stbir_resize_uint16_generic(@NativeType("stbir_uint16 const *") ShortBuffer input_pixels, int input_w, int input_h, int input_stride_in_bytes, @NativeType("stbir_uint16 *") ShortBuffer output_pixels, int output_w, int output_h, int output_stride_in_bytes, int num_channels, int alpha_channel, int f... | (output_stride_in_bytes >> 1))); |
116,233 | public void writeElement(XmlWriter writer) throws SAXException {<NEW_LINE>final AttributesImpl attributes = new AttributesImpl();<NEW_LINE>if ((getRelationship() != null) && !getRelationship().equals("")) {<NEW_LINE>attributes.addAttribute("", "rel", null, "xs:token", getRelationship());<NEW_LINE>}<NEW_LINE>if ((getRev... | writer.endElement(APP_NAMESPACE, "link"); |
285,372 | private static void addHostTransportPortToConnectorList(String host, String transport, String port) throws UnknownHostException {<NEW_LINE>if (c_logger.isTraceEntryExitEnabled()) {<NEW_LINE>c_logger.traceEntry(null, "addHostTransportPortToConnectorList", host, transport, port);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>if (po... | , HashSet<Integer>>(); |
1,671,308 | /* (non-Javadoc)<NEW_LINE>* @see org.netbeans.modules.web.beans.navigation.actions.ModelActionStrategy#isApplicable(org.netbeans.modules.web.beans.api.model.WebBeansModel, java.lang.Object[])<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public boolean isApplicable(WebBeansModel model, Object[] context) {<NEW_LINE>final Obje... | resolve(model.getCompilationController()); |
1,181,711 | private RFuture<ScanResult<Object>> distributedScanIteratorAsync(String iteratorName, int count) {<NEW_LINE>return commandExecutor.evalWriteAsync(getRawName(), codec, EVAL_LIST_SCAN, "local start_index = redis.call('get', KEYS[2]); " + "if start_index ~= false then " + "start_index = tonumber(start_index); " + "else " ... | (), iteratorName), count); |
1,845,269 | final BatchGetImageResult executeBatchGetImage(BatchGetImageRequest batchGetImageRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(batchGetImageRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
1,352,112 | public Result uploadFile(Http.Request request, Long petId) throws Exception {<NEW_LINE>String[] valueadditionalMetadata = request.body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata");<NEW_LINE>String additionalMetadata;<NEW_LINE>if (valueadditionalMetadata != null) {<NEW_LINE>additionalMetadata = v... | request, petId, additionalMetadata, _file); |
1,548,839 | public void process(GrayF32 derivX, GrayF32 derivY, GrayF32 intensity) {<NEW_LINE>InputSanityCheck.checkSameShape(derivX, derivY);<NEW_LINE>intensity.reshape(derivX.width, derivX.height);<NEW_LINE>int w = derivX.width;<NEW_LINE>int h = derivX.height;<NEW_LINE>horizXX.reshape(w, h);<NEW_LINE>horizXY.reshape(w, h);<NEW_L... | compute(totalXX, totalXY, totalYY); |
1,612,708 | final PutRecordResult executePutRecord(PutRecordRequest putRecordRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(putRecordRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_L... | endClientExecution(awsRequestMetrics, request, response); |
622,640 | void draw(Graphics g) {<NEW_LINE>int hs = 12;<NEW_LINE>setBbox(point1, point2, hs);<NEW_LINE>// draw first lead and plate<NEW_LINE>setVoltageColor(g, volts[0]);<NEW_LINE>drawThickLine(g, point1, lead1);<NEW_LINE>setPowerColor(g, false);<NEW_LINE>drawThickLine(g, plate1[0], plate1[1]);<NEW_LINE>if (sim.powerCheckItem.ge... | , point2, lead2, -curcount); |
1,377,286 | public static BufferedImage generateTextImage(int w, int h, String text) {<NEW_LINE>BufferedImage img = new BufferedImage(w, h, BufferedImage.TYPE_3BYTE_BGR);<NEW_LINE>Graphics2D g = img.createGraphics();<NEW_LINE>g.setColor(Color.BLACK);<NEW_LINE>g.fillRect(0, 0, w, h);<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>g.setFon... | g.setColor(Color.WHITE); |
1,788,172 | private void handleClientCoreMessage_TemplateChange(Message msg) {<NEW_LINE>SonicUtils.log(TAG, Log.INFO, "handleClientCoreMessage_TemplateChange wasLoadDataInvoked = " + wasLoadDataInvoked.get() + ",msg arg1 = " + msg.arg1);<NEW_LINE>if (wasLoadDataInvoked.get()) {<NEW_LINE>if (TEMPLATE_CHANGE_REFRESH == msg.arg1) {<N... | setResult(SONIC_RESULT_CODE_TEMPLATE_CHANGE, SONIC_RESULT_CODE_HIT_CACHE, false); |
1,662,086 | public void keyPressed(KeyEvent ev) {<NEW_LINE>if (!chatboxPanelManager.shouldTakeInput()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>switch(ev.getKeyCode()) {<NEW_LINE>case KeyEvent.VK_ENTER:<NEW_LINE>ev.consume();<NEW_LINE>if (index > -1) {<NEW_LINE>if (onItemSelected != null) {<NEW_LINE>onItemSelected.accept(results.key... | clientThread.invokeLater(this::update); |
1,372,924 | private String dumpCreationTraces(@Nonnull FileElement fileElement) {<NEW_LINE>final StringBuilder traces = new StringBuilder("\nNow " + Thread.currentThread() + "\n");<NEW_LINE>traces.append("My creation trace:\n")<MASK><NEW_LINE>traces.append("AST creation traces:\n");<NEW_LINE>fileElement.acceptTree(new RecursiveTre... | .append(getUserData(CREATION_TRACE)); |
1,848,813 | private void applyPatch() throws IOException {<NEW_LINE>byte[] vanillaHash = new byte[64];<NEW_LINE>byte[] appliedPatchHash = new byte[64];<NEW_LINE>try (InputStream is = ClientLoader.class.getResourceAsStream("/client.serial")) {<NEW_LINE>if (is == null) {<NEW_LINE>SwingUtilities.invokeLater(() -> new FatalErrorDialog... | DataInputStream dis = new DataInputStream(is); |
519,137 | public Template visitRawBlock(final RawBlockContext ctx) {<NEW_LINE>level += 1;<NEW_LINE>SexprContext sexpr = ctx.sexpr();<NEW_LINE>Token nameStart = sexpr.QID().getSymbol();<NEW_LINE>String name = nameStart.getText();<NEW_LINE>qualifier.addLast(name);<NEW_LINE>String nameEnd = ctx.nameEnd.getText();<NEW_LINE>if (!name... | startDelim.length() - 2); |
7,239 | protected void paintComponent(Graphics g) {<NEW_LINE>Graphics2D g2D = (Graphics2D) g;<NEW_LINE>// center icon<NEW_LINE>m_icon.paintIcon(this, g2D, s_size.width / 2 - m_icon.getIconWidth() / 2, 5);<NEW_LINE>// Paint Text<NEW_LINE>Color color = getForeground();<NEW_LINE>g2D.setPaint(color);<NEW_LINE>Font font = getFont()... | = m_icon.getIconHeight() + 20; |
1,234,966 | public String exportAsZip() {<NEW_LINE>File file = new <MASK><NEW_LINE>if (file == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>String zipPath = file.getAbsolutePath();<NEW_LINE>if (!file.getAbsolutePath().endsWith(".skl")) {<NEW_LINE>zipPath += ".skl";<NEW_LINE>}<NEW_LINE>if (new File(zipPath).exists()) {<NEW_LIN... | SikulixFileChooser(sikuliIDE).export(); |
358,620 | ImmutableList<CToolchain.Builder> createCrosstools() {<NEW_LINE>// clang<NEW_LINE>CToolchain.Builder x86Clang = // Workaround for https://code.google.com/p/android/issues/detail?id=220159.<NEW_LINE>createBaseX86ClangToolchain("x86", "i686", "i686-linux-android").addCompilerFlag("-mstackrealign").setToolchainIdentifier(... | (ndkPaths.createBuiltinSysroot("x86_64")); |
1,301,196 | private void methods(final Element element, ParserContext parserContext, final Map<String, Object> gatewayAttributes) {<NEW_LINE>List<Element> methodElements = DomUtils.getChildElementsByTagName(element, "method");<NEW_LINE>if (!CollectionUtils.isEmpty(methodElements)) {<NEW_LINE>Map<String, BeanDefinition> methodMetad... | .hasText(payloadExpression), "'payload-expression' is not allowed when a 'mapper' is provided"); |
1,782,654 | private void loadNode773() {<NEW_LINE>PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.AuditHistoryUpdateEventType_ParameterDataTypeId, new QualifiedName(0, "ParameterDataTypeId"), new LocalizedText("en", "ParameterDataTypeId"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), n... | this.nodeManager.addNode(node); |
207,634 | public Bundle addAccount(AccountAuthenticatorResponse response, String accountType, String authTokenType, String[] requiredFeatures, Bundle options) {<NEW_LINE>Log_OC.i(TAG, "Adding account with type " + accountType + " and auth token " + authTokenType);<NEW_LINE>AccountManager accountManager = AccountManager.get(mCont... | intent.putExtra(KEY_AUTH_TOKEN_TYPE, authTokenType); |
1,433,472 | public void marshall(StaticImageActivateScheduleActionSettings staticImageActivateScheduleActionSettings, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (staticImageActivateScheduleActionSettings == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try ... | e.getMessage(), e); |
1,792,587 | public void read(org.apache.thrift.protocol.TProtocol prot, getTableConfiguration_args struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;<NEW_LINE>java.util.BitSet incoming = iprot.readBitSet(3);<NEW_LINE>if (incomin... | struct.credentials.read(iprot); |
1,387,173 | private void loadNode787() {<NEW_LINE>TransitionVariableTypeNode node = new TransitionVariableTypeNode(this.context, Identifiers.StateMachineType_LastTransition, new QualifiedName(0, "LastTransition"), new LocalizedText("en", "LastTransition"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new Dat... | this.nodeManager.addNode(node); |
29,603 | public void handleMessage(SoapMessage message) throws Fault {<NEW_LINE>Exchange ex = message.getExchange();<NEW_LINE>BindingOperationInfo bop = ex.getBindingOperationInfo();<NEW_LINE>if (bop == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (bop.isUnwrapped()) {<NEW_LINE>bop = bop.getWrappedOperation();<NEW_LINE>}<NEW... | Message exInpMsg = ex.getInMessage(); |
839,426 | private void generateToString(IntrospectedTable introspectedTable, TopLevelClass topLevelClass) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>Method method = new Method("toString");<NEW_LINE>method.setVisibility(JavaVisibility.PUBLIC);<NEW_LINE>method.setReturnType(FullyQualifiedJavaType.getStringInstance());<NEW_LINE>// $NON-NLS... | ).addGeneralMethodComment(method, introspectedTable); |
1,215,042 | final DeleteDomainResult executeDeleteDomain(DeleteDomainRequest deleteDomainRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteDomainRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | endClientExecution(awsRequestMetrics, request, response); |
925,940 | protected void performLiquibaseTask(Liquibase liquibase) throws LiquibaseException {<NEW_LINE>//<NEW_LINE>// Check the Pro license<NEW_LINE>//<NEW_LINE>boolean hasProLicense = MavenUtils.checkProLicense(<MASK><NEW_LINE>if (!hasProLicense) {<NEW_LINE>throw new LiquibaseException("The 'rollbackOneUpdateSQL' command requi... | liquibaseProLicenseKey, commandName, getLog()); |
1,763,627 | private void assembleAudit(AuditEvent event) {<NEW_LINE>auditBuffer.append(event.queryId).append("\t");<NEW_LINE>auditBuffer.append(longToTimeString(event.timestamp)).append("\t");<NEW_LINE>auditBuffer.append(event.clientIp).append("\t");<NEW_LINE>auditBuffer.append(event.user).append("\t");<NEW_LINE>auditBuffer.append... | .stmtId).append("\t"); |
1,535,517 | // change all occurrences of oldSubString to newSubString<NEW_LINE>public static String changeString(String inString, String oldSubString, String newSubString) {<NEW_LINE>if (oldSubString.trim().equals(""))<NEW_LINE>return inString;<NEW_LINE>int start = 0;<NEW_LINE>int end = 0;<NEW_LINE>StringBuffer changedString = new... | (inString.substring(start)); |
1,647,881 | protected void addGuiElements() {<NEW_LINE>super.addGuiElements();<NEW_LINE>addRenderableWidget(new GuiSecurityTab(this, robit, 120));<NEW_LINE>addRenderableWidget(GuiSideHolder.create(this, 176, 6, 106, false, false, SpecialColors.TAB_ROBIT_MENU));<NEW_LINE>addRenderableWidget(new MekanismImageButton(this, 179, 10, 18... | (ClickedEntityButton.ROBIT_INVENTORY, robit)); |
1,607,054 | private void startElasticsearchProcess(Path distroArtifact) {<NEW_LINE>logger.info("Running `bin/elasticsearch` in `{}` for {}", workingDir, this);<NEW_LINE>final ProcessBuilder processBuilder = new ProcessBuilder();<NEW_LINE>if (OperatingSystem.current().isWindows()) {<NEW_LINE>processBuilder.command("cmd", "/c", dist... | environment.put("ES_JAVA_OPTIONS", "-Xms512m -Xmx512m"); |
1,020,194 | private static List<Artifact> collect(ActionExecutionContext actionExecutionContext, Set<Artifact> includes, List<PathFragment> absoluteBuiltInIncludeDirs) throws ExecException {<NEW_LINE>// Collect inputs and output<NEW_LINE>List<Artifact> inputs = new ArrayList<>(includes.size());<NEW_LINE>for (Artifact included : in... | included instanceof TreeFileArtifact, "Not a TreeFileArtifact: %s", included); |
1,813,687 | private void writeBody(ByteBuffer buffer) {<NEW_LINE>byte nullVal = 0;<NEW_LINE>BufferUtil.writeWithLength(buffer, catalog, nullVal);<NEW_LINE>BufferUtil.writeWithLength(buffer, db, nullVal);<NEW_LINE>BufferUtil.writeWithLength(buffer, table, nullVal);<NEW_LINE>BufferUtil.writeWithLength(buffer, orgTable, nullVal);<NEW... | writeWithLength(buffer, name, nullVal); |
1,054,942 | private void drawSplitItems(Canvas canvas, RotatedTileBox tileBox, List<GpxDisplayItem> items, DrawSettings settings) {<NEW_LINE>final <MASK><NEW_LINE>int r = (int) (12 * tileBox.getDensity());<NEW_LINE>paintTextIcon.setTextSize(r);<NEW_LINE>int dr = r * 3 / 2;<NEW_LINE>float px = -1;<NEW_LINE>float py = -1;<NEW_LINE>f... | QuadRect latLonBounds = tileBox.getLatLonBounds(); |
373,777 | static public void main(String[] args) {<NEW_LINE>int[][] fm = new int[8][8];<NEW_LINE>if (args.length != 1) {<NEW_LINE>System.out.println("usage: java DCT <matrix-filename>");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>File f = new File(args[0]);<NEW_LINE>if (!f.canRead()) {<NEW_LINE>System.out.println("Error! can't open " ... | = new StringTokenizer(line, ", "); |
716,947 | @Override<NEW_LINE>public Component createUIComponent(@Nonnull Disposable uiDisposable) {<NEW_LINE>if (myRootComponent == null) {<NEW_LINE>Configurable firstConfigurable = children[0];<NEW_LINE>if (children.length == 1) {<NEW_LINE>myRootComponent = firstConfigurable.createUIComponent(uiDisposable);<NEW_LINE>} else {<NE... | VerticalLayout verticalLayout = VerticalLayout.create(); |
801,125 | public com.amazonaws.services.resourcegroupstaggingapi.model.InternalServiceException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.resourcegroupstaggingapi.model.InternalServiceException internalServiceException = new com.amazonaws.services.resourcegroupstagg... | String currentParentElement = context.getCurrentParentElement(); |
1,463,706 | public boolean handler(ServerConfiguration conf, LBRDFlags flags) throws InterruptedException, BKException, IOException, ReplicationException.UnavailableException, ReplicationException.CompatibilityException, KeeperException {<NEW_LINE>boolean getter = flags.get;<NEW_LINE>boolean setter = false;<NEW_LINE>if (flags.set ... | , String.valueOf(lostBookieRecoveryDelay)); |
915,099 | public static // }<NEW_LINE>BlockedTerm parse(JSONObject data, String streamLogin) {<NEW_LINE>String id = JSONUtil.getString(data, "id");<NEW_LINE>long createdAt = JSONUtil.getDatetime(data, "created_at", -1);<NEW_LINE>long updatedAt = JSONUtil.getDatetime(data, "updated_at", -1);<NEW_LINE>long expiresAt = JSONUtil.get... | text, moderatorId, streamId, streamLogin); |
175,972 | public static DescribeNamespaceListResponse unmarshall(DescribeNamespaceListResponse describeNamespaceListResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeNamespaceListResponse.setRequestId(_ctx.stringValue("DescribeNamespaceListResponse.RequestId"));<NEW_LINE>describeNamespaceListResponse.setCode(_ctx.stringValu... | ("DescribeNamespaceListResponse.Data[" + i + "].VpcId")); |
32,529 | public byte[] assignUid(final String type, final String name) {<NEW_LINE>Tags.validateString(type, name);<NEW_LINE>if (type.toLowerCase().equals("metric")) {<NEW_LINE>try {<NEW_LINE>final byte[] uid = this.metrics.getId(name);<NEW_LINE>throw new IllegalArgumentException("Name already exists with UID: " <MASK><NEW_LINE>... | + UniqueId.uidToString(uid)); |
157,290 | public FieldBinding addSyntheticFieldForEnumValues() {<NEW_LINE>if (!isPrototype())<NEW_LINE>throw new IllegalStateException();<NEW_LINE>if (this.synthetics == null)<NEW_LINE>this.synthetics = new Map[MAX_SYNTHETICS];<NEW_LINE>if (this.synthetics[SourceTypeBinding.FIELD_EMUL] == null)<NEW_LINE>this.synthetics[SourceTyp... | == null ? 0 : fieldDeclarations.length; |
62,407 | public boolean replacePushbuttonField(String field, PdfFormField button, int order) {<NEW_LINE>if (getFieldType(field) != FIELD_TYPE_PUSHBUTTON) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Item item = getFieldItem(field);<NEW_LINE>if (order >= item.size()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>PdfDictionary mer... | values = item.getValue(order); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.