idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
989,081 | private void cleanupLSwitchPort(String logicalSwitchUuid, LogicalSwitchPort lSwitchPort, NiciraNvpApi niciraNvpApi) {<NEW_LINE>s_logger.warn("Deleting previously created Logical Switch Port " + lSwitchPort.getUuid() + " (" + lSwitchPort.getDisplayName() + ") from Logical Switch " + logicalSwitchUuid);<NEW_LINE>try {<NE... | " due to: " + exceptionDeleteLSwitchPort.getMessage()); |
44,878 | CloseableIterable<ManifestEntry<F>> entries() {<NEW_LINE>if ((rowFilter != null && rowFilter != Expressions.alwaysTrue()) || (partFilter != null && partFilter != Expressions.alwaysTrue()) || (partitionSet != null)) {<NEW_LINE>Evaluator evaluator = evaluator();<NEW_LINE>InclusiveMetricsEvaluator metricsEvaluator = metri... | requireStatsProjection ? withStatsColumns(columns) : columns; |
1,353,787 | public static void durableExecutorYamlGenerator(Map<String, Object> parent, Config config) {<NEW_LINE>if (config.getDurableExecutorConfigs().isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Map<String, Object> child = new LinkedHashMap<>();<NEW_LINE>for (DurableExecutorConfig subConfigAsObject : config.getDurableExecu... | "statistics-enabled", subConfigAsObject.isStatisticsEnabled()); |
249,615 | private void checkMaterials() {<NEW_LINE>ItemStack[] totalMaterials = this.multiblock.getTotalMaterials();<NEW_LINE>if (totalMaterials != null) {<NEW_LINE>componentTooltip = new ArrayList<>();<NEW_LINE>componentTooltip.add(new TranslatableComponent("desc.immersiveengineering.info.reqMaterial"));<NEW_LINE>int maxOff = 1... | .getRarity().color)); |
1,226,649 | void populateAndNotifyAndroidEvent(@NonNull Event event, @Nullable OnErrorCallback onError) {<NEW_LINE>// Capture the state of the app and device and attach diagnostics to the event<NEW_LINE>event.setDevice(deviceDataCollector.generateDeviceWithState(new Date().getTime()));<NEW_LINE>event.addMetadata("device", deviceDa... | setContext(contextState.getContext()); |
785,433 | public DatabusRegistration register(Collection<DatabusCombinedConsumer> consumers, String... sources) throws DatabusClientException {<NEW_LINE>if ((null == consumers) || (consumers.isEmpty()))<NEW_LINE>throw new DatabusClientException("No consumer callbacks have been specified.");<NEW_LINE>if ((null == sources) || (sou... | regId, this, getCheckpointPersistenceProvider()); |
627,246 | private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String deviceName, String storageAccountName, String resourceGroupName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and canno... | error(new IllegalArgumentException("Parameter deviceName is required and cannot be null.")); |
709,912 | private void parseStrategyRoute(Element element, StrategyReleaseEntity strategyReleaseEntity) {<NEW_LINE>List<StrategyRouteEntity> strategyRouteEntityList = strategyReleaseEntity.getStrategyRouteEntityList();<NEW_LINE>if (strategyRouteEntityList != null) {<NEW_LINE>throw new DiscoveryException("Allow only one element["... | childElement.getName() + "] is missing"); |
140,952 | public void addSendMetric(DispatchProfile currentRecord, String bid) {<NEW_LINE>Map<String, String> dimensions = new HashMap<>();<NEW_LINE>dimensions.put(DataProxyMetricItem.KEY_CLUSTER_ID, this.getClusterId());<NEW_LINE>// metric<NEW_LINE>fillInlongId(currentRecord, dimensions);<NEW_LINE>dimensions.put(DataProxyMetric... | long size = currentRecord.getSize(); |
277,777 | public Request<ListRetainedMessagesRequest> marshall(ListRetainedMessagesRequest listRetainedMessagesRequest) {<NEW_LINE>if (listRetainedMessagesRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(ListRetainedMessagesRequest)");<NEW_LINE>}<NEW_LINE>Request<ListRetainedMessag... | request.setHttpMethod(HttpMethodName.GET); |
1,839,866 | private static final <T> RuleFactory<T> rulesOf(DynamoDBMapperConfig config, S3Link.Factory s3Links, DynamoDBMapperModelFactory models) {<NEW_LINE>final boolean ver1 = (config.getConversionSchema() == ConversionSchemas.V1);<NEW_LINE>final boolean ver2 = (config.getConversionSchema() == ConversionSchemas.V2);<NEW_LINE>f... | class, S3Link.class, s3Links); |
740,258 | private Mono<Response<Flux<ByteBuffer>>> startWithResponseAsync(String resourceGroupName, String virtualMachineName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.error(new IllegalA... | error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); |
235,310 | final DeleteFieldLevelEncryptionConfigResult executeDeleteFieldLevelEncryptionConfig(DeleteFieldLevelEncryptionConfigRequest deleteFieldLevelEncryptionConfigRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteFieldLevelEncryptionConfigRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetri... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
1,081,796 | protected void paintIcon(Graphics2D g2) {<NEW_LINE>// see HexDigit.getSegs()<NEW_LINE>final var segson = HexDigit.getSegs(isHexDisplay ? 10 : 7);<NEW_LINE>g2.setStroke(new BasicStroke(scale(2)));<NEW_LINE>g2.setColor(Color.WHITE);<NEW_LINE>g2.fillRect(scale(2), 0, scale(10), scale(16));<NEW_LINE>g2.setColor(Color.BLACK... | Color.RED : Color.LIGHT_GRAY); |
211,772 | static TlsAuthentication receiveServerCertificate(TlsClientContext clientContext, TlsClient client, ByteArrayInputStream buf) throws IOException {<NEW_LINE>SecurityParameters securityParameters = clientContext.getSecurityParametersHandshake();<NEW_LINE>if (null != securityParameters.getPeerCertificate()) {<NEW_LINE>thr... | throw new TlsFatalAlert(AlertDescription.decode_error); |
415,050 | // Inside the mCaptureThread<NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>if (mSettings.root_capture) {<NEW_LINE>runPacketLoop(-1, this, Build.VERSION.SDK_INT);<NEW_LINE>} else {<NEW_LINE>if (mParcelFileDescriptor != null) {<NEW_LINE>int fd = mParcelFileDescriptor.getFd();<NEW_LINE>int fd_setsize = getFdSet... | e(TAG, "Invalid VPN fd: " + fd); |
1,181,160 | protected void prepare() {<NEW_LINE>try (final IAutoCloseable cacheFlagRestorer = CacheInterceptor.temporaryDisableCaching()) {<NEW_LINE>final ClientSetup clientSetup = getClientSetup();<NEW_LINE>for (final ProcessInfoParameter para : getParametersAsArray()) {<NEW_LINE>if (para.getParameter() == null) {<NEW_LINE>contin... | setEMail(para.getParameterAsString()); |
1,209,142 | private static void createTransform(CssContext c, Box box, PageBox page, AffineTransform result, TransformYOrigin transformYOrigin, int shadowPageNumber) {<NEW_LINE>FSDerivedValue transforms = box.getStyle().valueByName(CSSName.TRANSFORM);<NEW_LINE>float relOriginX = box.getStyle().getFloatPropertyProportionalWidth(CSS... | TransformYOrigin.PAGE_BOTTOM ? -1 : 1; |
875,222 | protected void performDefaults() {<NEW_LINE>fBackupOnSaveButton.setSelection(getPreferenceStore<MASK><NEW_LINE>fOpenDiagramsOnLoadButton.setSelection(getPreferenceStore().getDefaultBoolean(OPEN_DIAGRAMS_ON_LOAD));<NEW_LINE>fMRUSizeSpinner.setSelection(getPreferenceStore().getDefaultInt(MRU_MAX));<NEW_LINE>fShowUnusedEl... | ().getDefaultBoolean(BACKUP_ON_SAVE)); |
591,135 | public SkeletalIndependentRegressionModel train(Dataset<Regressor> examples, Map<String, Provenance> runProvenance, int invocationCount) {<NEW_LINE>if (examples.getOutputInfo().getUnknownCount() > 0) {<NEW_LINE>throw new IllegalArgumentException("The supplied Dataset contained unknown Outputs, and this Trainer is super... | > domain = outputInfo.getDomain(); |
629,573 | public ContainerDistributionConfiguration unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ContainerDistributionConfiguration containerDistributionConfiguration = new ContainerDistributionConfiguration();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement... | class).unmarshall(context)); |
1,787,814 | private void processAttributes(Builder builder, Set<ClassMember> publicProperties) {<NEW_LINE>if (publicProperties == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>for (ClassMember classMember : publicProperties) {<NEW_LINE>if (classMember instanceof ClassProperty) {<NEW_LINE>ClassProperty property = (ClassProperty) cla... | String attributeName = property.getName(); |
860,533 | public void write(JsonWriter writer, @Nullable T value) {<NEW_LINE>if (value == null)<NEW_LINE>writer.writeNull();<NEW_LINE>else if (value.isEmpty())<NEW_LINE>writer.writeAscii(EMPTY);<NEW_LINE>else if (keyEncoder != null && valueEncoder != null) {<NEW_LINE>boolean pastFirst = false;<NEW_LINE>writer.writeByte(JsonWrite... | writer, e.getValue()); |
1,834,860 | public Type visitPi(PiExpression expr, Void params) {<NEW_LINE>if (expr.getResultSort().isProp())<NEW_LINE>return expr;<NEW_LINE>Type dom = visit(expr.<MASK><NEW_LINE>if (dom == null)<NEW_LINE>return null;<NEW_LINE>Type cod = visit(expr.getCodomain());<NEW_LINE>if (cod == null)<NEW_LINE>return null;<NEW_LINE>Sort sort ... | getParameters().getTypeExpr()); |
1,077,602 | public Map doAnalysis(Map<String, String> header, String log) {<NEW_LINE>List<String> logfields = Lists.newArrayList(separator.split(log));<NEW_LINE>Map<String, String<MASK><NEW_LINE>int i = 0;<NEW_LINE>// collection specified fields<NEW_LINE>for (int point : SpecifiedFields) {<NEW_LINE>// add irregular process<NEW_LIN... | > resultMap = Maps.newHashMap(); |
751,632 | public static ArrayList<Node> Astar(Node snakeHead, Node food) {<NEW_LINE>ArrayList<Node> open = new ArrayList<>();<NEW_LINE>HashSet<Node> close = new HashSet<>();<NEW_LINE>ArrayList<Node> result = new ArrayList<>();<NEW_LINE>setParentNull();<NEW_LINE>open.add(board[snakeHead.getX()][snakeHead.getY()]);<NEW_LINE>while ... | current = open.get(0); |
986,957 | public ResourceChangeDetail unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>ResourceChangeDetail resourceChangeDetail = new ResourceChangeDetail();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument())<NEW_... | ().unmarshall(context)); |
1,548,211 | public ModelResponse<String> invoke(ModelRequest request) {<NEW_LINE>ModelResponse<String> response = new ModelResponse<String>();<NEW_LINE>Transaction t = newTransaction("ModelService", getClass().getSimpleName());<NEW_LINE>try {<NEW_LINE>URL url = buildUrl(request);<NEW_LINE>t.addData(url.toString());<NEW_LINE>InputS... | t.setStatus(Message.SUCCESS); |
824,860 | protected void notifyTransportErrors(final Event event) {<NEW_LINE>final Transport transport = event.getTransport();<NEW_LINE>final Connection connection = event.getConnection();<NEW_LINE>if (connection == null || transport == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final ErrorCondition errorCondition = transport.... | ProxySelector proxySelector = ProxySelector.getDefault(); |
372,956 | // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .<NEW_LINE>static public void save() {<NEW_LINE>// On startup it'll be null, don't worry about it. It's trying to update<NEW_LINE>// the prefs for the open sketch before Preferences.init() has been called.<NEW_LINE>if (preferencesFile != null) {... | showWarning("Preferences", "Could not save the Preferences file.", e); |
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<MASK><NEW_LINE>AndroidBuild build... | (AndroidMode.getTextString("android_mode.status.starting_project_build")); |
228,563 | public void archiveDisconnectedEvent(final String inode, final boolean putBack) throws PortalException, SystemException, DotDataException, DotSecurityException {<NEW_LINE>final WebContext ctx = WebContextFactory.get();<NEW_LINE>final HttpServletRequest request = ctx.getHttpServletRequest();<NEW_LINE>// Retrieving the c... | Logger.error(this, "Could not put back event in recurrence"); |
987,121 | public static void initializeBackendServices(ServerBuilder<?> serverBuilder, ServiceSet services, DAOSet daos, Executor executor) {<NEW_LINE>wrapService(serverBuilder, new FutureProjectServiceImpl(daos, executor));<NEW_LINE>LOGGER.trace("Project serviceImpl initialized");<NEW_LINE>wrapService(serverBuilder, new FutureE... | daos, new FileHasher())); |
1,315,080 | public static void handle(String stmt, ServerConnection c, int offset) {<NEW_LINE>stmt = stmt.substring(offset).trim();<NEW_LINE>RouteResultset rrs = getRouteResultset(c, stmt);<NEW_LINE>if (rrs == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>// write header<NEW_LINE>ResultSetHeaderPacket header = Packe... | ByteBuffer buffer = c.allocate(); |
720,021 | protected void parseSSI(final byte[] in, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {<NEW_LINE>ByteBuffer buffer = new ByteBuffer(in);<NEW_LINE>OutputStream out = response.getOutputStream();<NEW_LINE>final byte[<MASK><NEW_LINE>int offset = 0;<NEW_LINE>int p = buffer.i... | ] inctxt = "<!--#include virtual=\"".getBytes(); |
657,126 | public void translateToBedrock(GeyserSession session, CompoundTag itemTag, ItemMapping mapping) {<NEW_LINE>// Empty shulker box<NEW_LINE>if (!itemTag.contains("BlockEntityTag"))<NEW_LINE>return;<NEW_LINE>CompoundTag <MASK><NEW_LINE>if (blockEntityTag.get("Items") == null)<NEW_LINE>return;<NEW_LINE>ListTag itemsList = n... | blockEntityTag = itemTag.get("BlockEntityTag"); |
492,810 | public void init(GameEngine gameEngine) {<NEW_LINE>context = gameEngine.createChildContext();<NEW_LINE>headless = context.get(DisplayDevice.class).isHeadless();<NEW_LINE>initEntityAndComponentManagers(headless);<NEW_LINE>createLocalPlayer(context);<NEW_LINE>if (!headless) {<NEW_LINE>// TODO: REMOVE this and handle refr... | context.get(NUIManager.class); |
1,423,221 | IKeyframes<Double, Vector3[]> parseNormalKeyframes(@NotNull String DEF) throws XPathExpressionException {<NEW_LINE>Node tag;<NEW_LINE>Node node;<NEW_LINE>NodeList nodes;<NEW_LINE>XPathExpression expr;<NEW_LINE><MASK><NEW_LINE>Element scene = (Element) mDoc.getDocumentElement().getElementsByTagName("Scene").item(0);<NEW... | XPath xpath = xPathfactory.newXPath(); |
1,583,784 | int compareSegments_(int left, int right, SimpleEdge segLeft, SimpleEdge segRight) {<NEW_LINE>if (m_b_intersection_detected)<NEW_LINE>return -1;<NEW_LINE>boolean sameY = m_prev_y == m_sweep_y && m_prev_x == m_sweep_x;<NEW_LINE>double xleft;<NEW_LINE>if (sameY && left == m_prev_1)<NEW_LINE>xleft = m_prevx_1;<NEW_LINE>el... | : xleft > xright ? 1 : 0; |
266,624 | public void writeHeaderPart(AnnotatedOutput out) {<NEW_LINE>throwIfNotPrepared();<NEW_LINE>int sz = typeIds.size();<NEW_LINE>int offset = (sz == <MASK><NEW_LINE>if (sz > DexFormat.MAX_TYPE_IDX + 1) {<NEW_LINE>throw new DexIndexOverflowException(String.format("Too many type identifiers to fit in one dex file: %1$d; max ... | 0) ? 0 : getFileOffset(); |
113,163 | public TriggerEvent createTriggerEvent(int when, String columnname) throws DDLException {<NEW_LINE>try {<NEW_LINE>Map gprops = (Map) getSpecification().getProperties();<NEW_LINE>Map props = (Map) getSpecification().getCommandProperties(Specification.CREATE_TRIGGER);<NEW_LINE>// NOI18N<NEW_LINE>Map bindmap = (Map) props... | Map) props.get("TriggerEventMap"); |
93,614 | protected Object addValueAs(Object container, Function<Object, Object> merger) {<NEW_LINE>List<Object> list = castTo(container, List.class);<NEW_LINE>Object existingValue = getExistingValue(list);<NEW_LINE>Object newValue = merger.apply(existingValue);<NEW_LINE>if (newValue == NO_MERGE) {<NEW_LINE>return NO_MERGE;<NEW_... | list.size() + 1); |
447,283 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>// TODO Auto-generated method stub<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.about);<NEW_LINE>mWeixin = (TextView) findViewById(R.id.about_textview_weixin);<NEW_LINE>// http://weixin.qq.com/r/7HX_8R7EfiABhw_SnyDI<NEW_LINE>... | (Html.fromHtml(htmlLinkTextWeibo)); |
334,437 | private PrivateKey parseKeyFromPem(String pemFormattedKey, Terminal terminal) throws UserException {<NEW_LINE>try {<NEW_LINE>return parsePKCS8PemString(pemFormattedKey);<NEW_LINE>} catch (Exception e) {<NEW_LINE>terminal.errorPrintln(<MASK><NEW_LINE>terminal.errorPrintln(Terminal.Verbosity.VERBOSE, "Failed to parse Pri... | Terminal.Verbosity.VERBOSE, ""); |
1,088,329 | public DataEntryRecordId save(@NonNull final DataEntryRecord dataEntryRecord) {<NEW_LINE>final I_DataEntry_Record dataRecord;<NEW_LINE>final DataEntryRecordId existingId = dataEntryRecord.getId().orElse(null);<NEW_LINE>if (existingId == null) {<NEW_LINE>dataRecord = newInstance(I_DataEntry_Record.class);<NEW_LINE>} els... | getMainRecord().getRecord_ID()); |
1,430,140 | public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args, Block block) {<NEW_LINE>if (block.isGiven()) {<NEW_LINE>int len = args.length;<NEW_LINE>// too much array creation!<NEW_LINE>Object[] convertedArgs = new Object[len + 1];<NEW_LINE>IRubyObject[] intermedia... | .toJava(paramTypes[i]); |
1,297,150 | private void writeSqlRequestExplainPlan() throws DocumentException {<NEW_LINE>try {<NEW_LINE>final String explainPlan;<NEW_LINE>if (collectorServer == null) {<NEW_LINE>explainPlan = DatabaseInformations.explainPlanFor(request.getName());<NEW_LINE>} else {<NEW_LINE>explainPlan = collectorServer.collectSqlRequestExplainP... | = new Paragraph("", cellFont); |
1,028,689 | public List<Integer> largestDivisibleSubset(int[] nums) {<NEW_LINE>int len = nums.length;<NEW_LINE>int[] count = new int[len];<NEW_LINE>int[] pre = new int[len];<NEW_LINE>Arrays.sort(nums);<NEW_LINE>int max = 0;<NEW_LINE>int index = -1;<NEW_LINE>for (int i = 0; i < len; i++) {<NEW_LINE>count[i] = 1;<NEW_LINE>pre[i] = -... | res = new ArrayList<>(); |
905,564 | public AttentionVertex build() {<NEW_LINE>this.nHeads = nHeads == 0 ? 1 : nHeads;<NEW_LINE>this.weightInit = weightInit == null ? WeightInit.XAVIER : weightInit;<NEW_LINE>Preconditions.checkArgument(nOut > 0, "You have to set nOut");<NEW_LINE>Preconditions.checkArgument(nInKeys > 0, "You have to set nInKeys");<NEW_LINE... | checkArgument(nInValues > 0, "You have to set nInValues"); |
458,072 | public void createNewProject(String projectPath, int originWidth, int originHeight, int pixelPerWorldUnit) {<NEW_LINE>if (projectPath == null || projectPath.equals("")) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String projectName = new File(projectPath).getName();<NEW_LINE>if (projectName.equals("")) {<NEW_LINE>return;<NE... | projectPath, originWidth, originHeight, pixelPerWorldUnit); |
651,951 | public static JavaClassAndMethod findInvocationLeastUpperBound(InvokeInstruction inv, ConstantPoolGen cpg, JavaClassAndMethodChooser methodChooser) throws ClassNotFoundException {<NEW_LINE>if (DEBUG_METHOD_LOOKUP) {<NEW_LINE>System.out.println("Find prototype method for " + SignatureConverter.convertMethodSignature(inv... | methodSig = inv.getSignature(cpg); |
137,910 | public static void processChosenFromCompletion(FileLookup.LookupFile file, DocumentOwner doc, Finder finder, boolean nameOnly) {<NEW_LINE>if (file == null)<NEW_LINE>return;<NEW_LINE>if (nameOnly) {<NEW_LINE>try {<NEW_LINE>int caretPos = doc.getCaretPosition();<NEW_LINE>if (finder.getSeparator().equals(doc.getText(caret... | doc.getText(start, 1); |
1,069,192 | protected void activateAsSchematicPrinter(MovementContext context, BlockPos pos, DeployerFakePlayer player, Level world, ItemStack filter) {<NEW_LINE>if (!filter.hasTag())<NEW_LINE>return;<NEW_LINE>if (!world.getBlockState(pos).getMaterial().isReplaceable())<NEW_LINE>return;<NEW_LINE>CompoundTag tag = filter.getTag();<... | ), true).getCount(); |
431,550 | private void extractAndAttachRabbitHttpRequest(@NonNull final Exchange exchange) {<NEW_LINE>final Object dispatchMessageRequestCandidate = exchange.getIn().getBody();<NEW_LINE>if (!(dispatchMessageRequestCandidate instanceof DispatchMessageRequest)) {<NEW_LINE>throw new RuntimeCamelException("The route " + RABBITMQ_DIS... | AUTHORIZATION, dispatchMessageRequest.getAuthToken()); |
928,899 | private Element processWsaProperty(Element header, boolean override, String elementLocalName, String wsaPropValue, boolean address, String refParamsContent) {<NEW_LINE>boolean existsWsa = getWsaProperty(header, <MASK><NEW_LINE>if (override) {<NEW_LINE>if (existsWsa) {<NEW_LINE>header = removeWsaProperty(override, heade... | elementLocalName) != null ? true : false; |
941,290 | public void handleGET(CoapExchange exchange) {<NEW_LINE>// get request to read out details<NEW_LINE>Request request = exchange.advanced().getRequest();<NEW_LINE>int accept = request.getOptions().getAccept();<NEW_LINE>if (accept == UNDEFINED) {<NEW_LINE>accept = TEXT_PLAIN;<NEW_LINE>}<NEW_LINE>Response response = new Re... | ct = MediaTypeRegistry.toString(accept); |
1,584,068 | public void keyPressed(KeyEvent event) {<NEW_LINE>if (event.stateMask == SWT.MOD1) {<NEW_LINE>int key = event.character;<NEW_LINE>if (key <= 26 && key > 0) {<NEW_LINE>key += 'a' - 1;<NEW_LINE>}<NEW_LINE>if (key == 'a') {<NEW_LINE>partial_buddy_table.selectAll();<NEW_LINE>event.doit = false;<NEW_LINE>}<NEW_LINE>} else i... | getString("Button.no") }, 1); |
828,575 | public void onClick(View v) {<NEW_LINE>controller.clearSelectedText();<NEW_LINE>Context c = anchor.getContext();<NEW_LINE>String trim = editText.getText()<MASK><NEW_LINE>if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {<NEW_LINE>ClipboardManager clipboard = (ClipboardManager) c.getSystemService(Context.CLIPB... | .toString().trim(); |
321,098 | private void drawReal(Graphics2D g) {<NEW_LINE>int width = parameters.getWidth();<NEW_LINE>int height = parameters.getHeight();<NEW_LINE>// Font<NEW_LINE><MASK><NEW_LINE>FontMetrics fontMetrics = null;<NEW_LINE>double factor = parameters.getFontFactor();<NEW_LINE>int fontSize = Math.min(parameters.getFontSize(), (int) ... | Font font = parameters.getFont(); |
1,114,902 | public static InstanceEntry snapshot() {<NEW_LINE>SystemInfo systemInfo = new SystemInfo();<NEW_LINE>CentralProcessor processor = systemInfo.getHardware().getProcessor();<NEW_LINE>long[] prevTicks = processor.getSystemCpuLoadTicks();<NEW_LINE>long[] ticks = processor.getSystemCpuLoadTicks();<NEW_LINE>long nice = ticks[... | MycatServer.class).countConnection(); |
46,785 | public SendUsersMessageResponse unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>SendUsersMessageResponse sendUsersMessageResponse = new SendUsersMessageResponse();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NE... | class).unmarshall(context)); |
1,236,503 | public Map<String, Set<String>> fieldsInIndices(String[] writeIndexWildcards) {<NEW_LINE>final String indices = String.join(",", writeIndexWildcards);<NEW_LINE>final State request = new State.Builder().indices(indices).withMetadata().build();<NEW_LINE>final JestResult jestResult = JestUtils.execute(jestClient, request,... | getClusterStateIndicesMetadata(jestResult.getJsonObject()); |
1,416,073 | public void renderFont(RenderFont font, String str, int x, int y, Color color, float sizeX, float sizeY) {<NEW_LINE>if (str.length() == 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>RenderFontJme jmeFont = (RenderFontJme) font;<NEW_LINE>ColorRGBA colorRgba = convertColor(color, tempColor);<NEW_LINE>CachedTextKey key = new ... | setScale(sizeX, sizeY, 0); |
1,370,073 | public static double reLnBn(int n) {<NEW_LINE>if (n < 0)<NEW_LINE>return Double.NaN;<NEW_LINE>if (n == 1)<NEW_LINE>return -log(2);<NEW_LINE>if (n % 2 != 0)<NEW_LINE>return Double.NEGATIVE_INFINITY;<NEW_LINE>if (// rel err < 1e-14<NEW_LINE>n >= 50) {<NEW_LINE>// Log[-2^(3/2 - n) ((3 i)/e)^n n^(1/2 + n) ((3 + 40 n^2)/(-1... | + 0.5) * log(n); |
243,846 | public static QueryAccountBillResponse unmarshall(QueryAccountBillResponse queryAccountBillResponse, UnmarshallerContext _ctx) {<NEW_LINE>queryAccountBillResponse.setRequestId(_ctx.stringValue("QueryAccountBillResponse.RequestId"));<NEW_LINE>queryAccountBillResponse.setCode(_ctx.stringValue("QueryAccountBillResponse.Co... | (_ctx.stringValue("QueryAccountBillResponse.Data.AccountID")); |
1,699,721 | public DoubleMatrix differentiateTwiceX0(PiecewisePolynomialResult2D pp, double[] x0Keys, double[] x1Keys) {<NEW_LINE>ArgChecker.notNull(pp, "pp");<NEW_LINE>int order0 = pp.getOrder()[0];<NEW_LINE>int order1 = pp.getOrder()[1];<NEW_LINE>ArgChecker.isFalse(order0 < 3, "polynomial degree of x0 < 2");<NEW_LINE>DoubleArray... | int nKnots0 = knots0.size(); |
432,012 | private UserDashboardItemId createUserDashboardItemAndSave(@NonNull final UserDashboardId dashboardId, @NonNull final UserDashboardItemAddRequest request) {<NEW_LINE>//<NEW_LINE>// Get the KPI<NEW_LINE>final int kpiId = request.getKpiId();<NEW_LINE>if (kpiId <= 0) {<NEW_LINE>throw new AdempiereException("kpiId is not s... | DashboardWidgetType widgetType = request.getWidgetType(); |
1,205,407 | final CreateAttributeGroupResult executeCreateAttributeGroup(CreateAttributeGroupRequest createAttributeGroupRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createAttributeGroupRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
1,228,137 | private SessionFactory buildSessionFactory(HibernateBundle<?> bundle, PooledDataSourceFactory dbConfig, ConnectionProvider connectionProvider, Map<String, String> properties, List<Class<?>> entities) {<NEW_LINE>final BootstrapServiceRegistry bootstrapServiceRegistry = configureBootstrapServiceRegistryBuilder(new Bootst... | getProperties()).build(); |
1,154,279 | private static ValidateResult updateValidate(String dbName, String sql, int[] paramsTypes, Object[] mockedVals) {<NEW_LINE>ValidateResult status = new ValidateResult(sql);<NEW_LINE>Connection connection = null;<NEW_LINE>PreparedStatement preparedStatement = null;<NEW_LINE>try {<NEW_LINE>connection = DataSourceUtil.getC... | - 1], Types.CHAR); |
1,819,754 | private void pauseVm(final PauseVmOnHypervisorMsg msg, final NoErrorCompletion completion) {<NEW_LINE>checkStatus();<NEW_LINE>final VmInstanceInventory vminv = msg.getVmInventory();<NEW_LINE>PauseVmOnHypervisorReply reply = new PauseVmOnHypervisorReply();<NEW_LINE>PauseVmCmd cmd = new PauseVmCmd();<NEW_LINE>cmd.setUuid... | bus.reply(msg, reply); |
46,773 | private String asArgument(Class<?> cl, String name) {<NEW_LINE>if (cl.isPrimitive()) {<NEW_LINE>if (Boolean.TYPE == cl) {<NEW_LINE>return name + "==null?false:((Boolean)" + name + ").booleanValue()";<NEW_LINE>}<NEW_LINE>if (Byte.TYPE == cl) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>if (Character.TYPE == cl) {<NEW_LINE>retu... | return name + "==null?(byte)0:((Byte)" + name + ").byteValue()"; |
1,022,699 | public static void checkGsiColumnLen(SqlAlterTable query, ExecutionContext ec, SqlValidator validator) {<NEW_LINE>for (SqlAlterSpecification alter : query.getAlters()) {<NEW_LINE>// not alter add index or not alter add global index<NEW_LINE>if (!(alter instanceof SqlAddIndex) || !SqlIndexDefinition.SqlIndexResiding.GLO... | getOriginTableName().getLastName()); |
250,460 | private static Factory fromVersion(RecognisedVersion version) {<NEW_LINE>if (RecognisedVersion.isOlderOrEqualTo(version, BetaMinecraftInterface.LAST_COMPATIBLE_VERSION)) {<NEW_LINE>return new Factory(BetaClassTranslator.get(version), BetaMinecraftInterface::new);<NEW_LINE>} else if (RecognisedVersion.isOlderOrEqualTo(v... | get(), _1_13MinecraftInterface::new); |
1,192,054 | public void onPause() {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>if (mCaptureSession != null) {<NEW_LINE>mCaptureSession.stopRepeating();<NEW_LINE>mCaptureSession = null;<NEW_LINE>mSessionCallback.getStateWaiter().waitForState(BlockingSessionCallback.SESSION_READY, SESSION_WAIT_TIMEOUT_MS);<NEW_LINE>}<NEW_LINE>} catch (... | Log.d(TAG, "onPause()"); |
455,557 | public Object invoke(MethodInvocation invocation) throws Throwable {<NEW_LINE>String method = invocation.getMethod().getName();<NEW_LINE>Object[] arguments = invocation.getArguments();<NEW_LINE>switch(method) {<NEW_LINE>case "addFirst":<NEW_LINE>envCopy.addFirst((PropertySource<?>) arguments[0]);<NEW_LINE>return invoca... | ?>) arguments[0]); |
905,632 | Object resolveConstantExpressionValue(Expression expression) {<NEW_LINE>org.eclipse.jdt.internal.compiler.ast.ASTNode node = (org.eclipse.jdt.internal.compiler.ast.ASTNode) this.newAstToOldAst.get(expression);<NEW_LINE>if (node instanceof org.eclipse.jdt.internal.compiler.ast.FieldDeclaration) {<NEW_LINE>node = ((org.e... | valueOf(constant.longValue()); |
71,442 | private void commitJob(DeleteJob job, Database db, long timeoutMs) throws DdlException, QueryStateException {<NEW_LINE>TransactionStatus status = null;<NEW_LINE>try {<NEW_LINE>if (unprotectedCommitJob(job, db, timeoutMs)) {<NEW_LINE>updateTableDeleteInfo(Catalog.getCurrentCatalog(), db.getId(), job.getDeleteInfo().getT... | OK, sb.toString()); |
313,414 | private void sendMessage() {<NEW_LINE>if (mediaPreviewAdapter.hasAttachments()) {<NEW_LINE>commitAttachments();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final Editable text = this.binding.textinput.getText();<NEW_LINE>final String body = text == null ? "" : text.toString();<NEW_LINE>final Conversation conversation = this.c... | randomUUID().toString()); |
805,066 | private void initView() {<NEW_LINE>binding.txtLanguage.setText(LocaleUtil.getCurrentLanguage(getActivity()));<NEW_LINE>binding.languageSettingsContainer.setOnClickListener(v -> showLanguagesDialog());<NEW_LINE>DefaultPrefs prefs = DefaultPrefs.get(getContext());<NEW_LINE>boolean shouldNotify = prefs.getNotificationFlag... | boolean headsUp = prefs.getHeadsUpFlag(); |
1,280,720 | /*<NEW_LINE>* -----------<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void print(StringBuilder toStringBuilder) {<NEW_LINE>super.print(toStringBuilder);<NEW_LINE>toStringBuilder.append("WebComponentDescriptor\n");<NEW_LINE>toStringBuilder.append("\n initializationParameters ").append(initializationParameters);<NEW_L... | ("\n multipartConfig ").append(multipartConfig); |
946,348 | void scrollUp(float dx, float dy) {<NEW_LINE>mDragStarted = false;<NEW_LINE>float pos = mMotionLayout.getProgress();<NEW_LINE>mMotionLayout.getAnchorDpDt(mTouchAnchorId, pos, mTouchAnchorX, mTouchAnchorY, mAnchorDpDt);<NEW_LINE>float movmentInDir = mTouchDirectionX * mAnchorDpDt[0] + mTouchDirectionY * mAnchorDpDt[1];<... | dy * mTouchDirectionY / mAnchorDpDt[1]; |
811,074 | private static TreeArtifactValue transformSharedTree(Artifact newArtifact, TreeArtifactValue tree) {<NEW_LINE>Preconditions.checkState(newArtifact.isTreeArtifact(), "Expected tree artifact, got %s", newArtifact);<NEW_LINE>if (TreeArtifactValue.OMITTED_TREE_MARKER.equals(tree)) {<NEW_LINE>return TreeArtifactValue.OMITTE... | newTree = TreeArtifactValue.newBuilder(newParent); |
1,253,362 | private void continueGroup(VideoGroup group) {<NEW_LINE>boolean updateInProgress = mScrollAction != null && !mScrollAction.isDisposed();<NEW_LINE>if (updateInProgress) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Log.d(TAG, "continueGroup: start continue group: " + group.getTitle());<NEW_LINE>getController().showProgressBar(... | .instance().getMediaItemManager(); |
376,779 | private void loadEdgesImpl(String filePath) throws ExecutionException, InterruptedException {<NEW_LINE>// Try to get number of lines<NEW_LINE>long numOfLines = getNumLinesOfFile(filePath);<NEW_LINE>long linesPerWorker = (numOfLines + (workerNum - 1)) / workerNum;<NEW_LINE>long start = Math.min(linesPerWorker * workerId... | (cur + chunkSize, end)); |
1,407,073 | private void generateFPVarRef(BLangExpression fpVarRef, BInvokableSymbol funcSymbol) {<NEW_LINE>// fpload instruction<NEW_LINE>BIRVariableDcl tempVarLambda = new BIRVariableDcl(fpVarRef.getBType(), this.env.nextLocalVarId(names), VarScope.FUNCTION, VarKind.TEMP);<NEW_LINE>this.env.enclFunc.localVars.add(tempVarLambda);... | .strandName, funcSymbol.schedulerPolicy)); |
1,050,625 | private JToggleButton initGapButton() {<NEW_LINE>JToggleButton button = new JToggleButton();<NEW_LINE>// NOI18N<NEW_LINE>ImageIcon image = ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/griddesigner/resources/gaps.png", false);<NEW_LINE>button.setIcon(image);<NEW_LINE>button.setFocusPainted(false... | .getInstance().getGapWidth(); |
1,408,161 | public void update2(final VariantContext eval, final VariantContext comp, final VariantEvalContext context) {<NEW_LINE>if (comp != null) {<NEW_LINE>// we only need to consider sites in comp<NEW_LINE>if (REQUIRE_IDENTICAL_ALLELES && (eval != null && haveDifferentAltAlleles(eval, comp)))<NEW_LINE>nDifferentAlleleSites++;... | ) && comp.hasGenotypes(evalSamples); |
344,694 | private static TieredIdentity fromScript(AlluxioConfiguration conf) {<NEW_LINE>String scriptName = conf.getString(PropertyKey.LOCALITY_SCRIPT);<NEW_LINE>Path script = Paths.get(scriptName);<NEW_LINE>if (!Files.exists(script)) {<NEW_LINE>URL resource = TieredIdentityFactory.class.getClassLoader().getResource(scriptName)... | execCommand(script.toString()); |
384,329 | public void marshall(APNSVoipSandboxChannelResponse aPNSVoipSandboxChannelResponse, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (aPNSVoipSandboxChannelResponse == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.mar... | aPNSVoipSandboxChannelResponse.getPlatform(), PLATFORM_BINDING); |
554,692 | @PutMapping(value = "/app-repository/app-definitions/{appDefinitionId}", produces = "application/json")<NEW_LINE>public AppDefinitionResponse executeAppDefinitionAction(@ApiParam(name = "appDefinitionId") @PathVariable String appDefinitionId, @ApiParam(required = true) @RequestBody AppDefinitionActionRequest actionRequ... | actionRequest.getAction() + "'."); |
677,122 | public void jimplify1phase2() {<NEW_LINE>String name = "<init>";<NEW_LINE>ArrayList parameters = new ArrayList();<NEW_LINE>ArrayList paramnames = new ArrayList();<NEW_LINE>// this$0<NEW_LINE>TypeDecl typeDecl = hostType();<NEW_LINE>if (typeDecl.needsEnclosing())<NEW_LINE>parameters.add(typeDecl.enclosingType().getSootT... | ClassDecl) typeDecl).superclass(); |
691,803 | public Xid[] recover(int flag) throws XAException {<NEW_LINE>System.out.println("recover(" + _key + ", " + flag + ")");<NEW_LINE>if (self() == null) {<NEW_LINE>if (DEBUG_OUTPUT)<NEW_LINE>System.out.println("No XARecoveryData - returning null xid array");<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>System.out.println("XAR... | = self().getRecoverAction(); |
754,276 | public static void average(InterleavedS8 from, GrayS8 to) {<NEW_LINE>final int numBands = from.getNumBands();<NEW_LINE>if (numBands == 1) {<NEW_LINE>for (int y = 0; y < from.height; y++) {<NEW_LINE>int indexFrom = from.getIndex(0, y);<NEW_LINE>int indexTo = to.getIndex(0, y);<NEW_LINE>System.arraycopy(from.data, indexF... | += from.data[indexFrom++]; |
12,457 | public String handleRequest(String uri, String content, HttpResponse output) {<NEW_LINE>try (Connection connection = db.getConnection()) {<NEW_LINE>if (connection == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>output.setStatus(HttpResponseStatus.OK);<NEW_LINE>output.headers().set(HttpHeaders.Names.CONTENT_TYPE, "... | return "ERROR:" + e.getMessage(); |
542,278 | static TrieLogLayer readFrom(final RLPInput input) {<NEW_LINE>final TrieLogLayer newLayer = new TrieLogLayer();<NEW_LINE>input.enterList();<NEW_LINE>newLayer.blockHash = Hash.wrap(input.readBytes32());<NEW_LINE>while (!input.isEndOfCurrentList()) {<NEW_LINE>input.enterList();<NEW_LINE>final Address address = Address.re... | storageChanges = new TreeMap<>(); |
1,512,716 | public void leave(DelegateExecution childExecution) {<NEW_LINE>DelegateExecution multiInstanceRootExecution = getMultiInstanceRootExecution(childExecution);<NEW_LINE>int nrOfInstances = getLoopVariable(multiInstanceRootExecution, NUMBER_OF_INSTANCES);<NEW_LINE>int loopCounter = getLoopVariable(childExecution, getCollec... | ((ExecutionEntity) childExecution, null); |
1,772,675 | public void manualNetworkTrace() throws Exception {<NEW_LINE>byte[] data = "badgerbadgerbadgerbadgerMUSHROOM!".getBytes();<NEW_LINE>// [START perf_manual_network_trace]<NEW_LINE>HttpMetric metric = FirebasePerformance.getInstance().newHttpMetric("https://www.google.com", FirebasePerformance.HttpMethod.GET);<NEW_LINE>fi... | URL url = new URL("https://www.google.com"); |
1,287,476 | public static void main(String[] args) {<NEW_LINE>ArrayList<Integer> v = new ArrayList<>();<NEW_LINE>v.add(10);<NEW_LINE>v.add(7);<NEW_LINE>v.add(2);<NEW_LINE>v.add(15);<NEW_LINE>v.add(4);<NEW_LINE>// sort descending with vector<NEW_LINE>Collections.sort(v);<NEW_LINE>// if we want to modify comparison function, use the... | System.out.println(v); |
1,149,368 | private void initializeXTools() {<NEW_LINE>System.out.println("Initializing XTools...");<NEW_LINE>ClientConfig config = new ClientConfig(ClientRole.Primary);<NEW_LINE>config.SetServerAddress("osserver.redmond.corp.microsoft.com");<NEW_LINE>_myMgr = SharingManager.Create(config);<NEW_LINE>if (_myMgr != null) {<NEW_LINE>... | (new DirectPairReceiver(), pairingListener); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.