idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,027,554 | private void init() {<NEW_LINE>// Init controller.<NEW_LINE>String controllerHost = _conf.getControllerHost();<NEW_LINE>if (controllerHost != null) {<NEW_LINE>_controllerHost = controllerHost;<NEW_LINE>} else {<NEW_LINE>_controllerHost = "localhost";<NEW_LINE>}<NEW_LINE>int controllerPort = _conf.getControllerPort();<N... | = _tempDir + "server/" + _serverInstanceName + "/segment_tar_dir"; |
1,115,687 | public static void sendEmail(@Nonnull String addressTo, @Nonnull String subject, @Nonnull String text) throws Exception {<NEW_LINE>if (!"true".equals(DAO.getConfig("smtp.mails.enabled", "false"))) {<NEW_LINE>throw new Exception("Mail sending disabled");<NEW_LINE>}<NEW_LINE>String senderEmail = DAO.getConfig("smtp.sende... | message.addHeader("Content-type", "text/HTML; charset=UTF-8"); |
528,518 | public String testEJBExtension() throws Exception {<NEW_LINE>Container ejbContainer = getEJBJarContainer(TEST_EJB);<NEW_LINE>EJBJarExt extensions = ejbContainer.adapt(EJBJarExt.class);<NEW_LINE>if (extensions == null)<NEW_LINE>return "Could not adapt EJB jar extensions";<NEW_LINE>List<EnterpriseBean> ejbs = extensions.... | TimeOut t = session.getTimeOut(); |
1,587,299 | public static File extractFile(Activity a, String fileName, File file, boolean single) {<NEW_LINE>try {<NEW_LINE>CacheZipUtils.CACHE_RECENT.mkdirs();<NEW_LINE>if (!CacheZipUtils.CACHE_RECENT.isDirectory()) {<NEW_LINE>Toast.makeText(a, R.string.msg_unexpected_error, Toast.LENGTH_LONG).show();<NEW_LINE>return null;<NEW_L... | , ExtUtils.getFileName(name)); |
1,783,418 | public Optional<SslContext> build(SslConfiguration ssl, HttpVersion httpVersion) {<NEW_LINE>if (!ssl.isEnabled()) {<NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_LINE>final boolean isHttp2 = httpVersion == HttpVersion.HTTP_2_0;<NEW_LINE>SslContextBuilder sslBuilder = SslContextBuilder.forClient().keyManager(getKeyMa... | Http2SecurityUtil.CIPHERS, SupportedCipherSuiteFilter.INSTANCE); |
1,294,116 | public RuleResult execute(final Map<String, String> ruleParam, Map<String, String> resourceAttributes) {<NEW_LINE>logger.debug("========SSLCertificateExpiryRule started=========");<NEW_LINE>Annotation annotation = null;<NEW_LINE>String validTo = null;<NEW_LINE>long expiredDuration;<NEW_LINE>long targetExpiredDuration;<... | ruleParam.get(PacmanRuleConstants.EXPIRED_DURATION); |
55,369 | public void start(WorkerNetAddress address) throws IOException {<NEW_LINE>super.start(address);<NEW_LINE>// Start serving metrics system, this will not block<NEW_LINE>MetricsSystem.startSinks(ServerConfiguration.getString(PropertyKey.METRICS_CONF_FILE));<NEW_LINE>try {<NEW_LINE>JobWorkerIdRegistry.registerWorker(mJobMa... | (PropertyKey.JOB_WORKER_THREADPOOL_SIZE), address); |
194,027 | public static void main(String[] args) {<NEW_LINE>System.out.print("Creating a new OpenNebula session...");<NEW_LINE>try {<NEW_LINE>Client oneClient = new Client();<NEW_LINE>System.out.println(" ok");<NEW_LINE>} catch (Exception e) {<NEW_LINE>System.out.println(e.getMessage());<NEW_LINE>}<NEW_LINE>System.out.println("F... | = new Client(null, "HTP://localhost:2633/RPC2"); |
992,535 | public void removeMatch(Set<EventBean> matchEvent) {<NEW_LINE>boolean quit = <MASK><NEW_LINE>if (!quit) {<NEW_LINE>for (ArrayList<EventBean> list : matchedEventArrays) {<NEW_LINE>if (list == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>for (EventBean event : list) {<NEW_LINE>if (matchEvent.contains(event)) {<NEW_LINE... | PatternConsumptionUtil.containsEvent(matchEvent, beginState); |
899,575 | public void begin(InterpretationContext ec, String name, Attributes attributes) {<NEW_LINE>// Let us forget about previous errors (in this object)<NEW_LINE>inError = false;<NEW_LINE>logger = null;<NEW_LINE>LoggerContext <MASK><NEW_LINE>String loggerName = ec.subst(attributes.getValue(NAME_ATTRIBUTE));<NEW_LINE>if (Opti... | loggerContext = (LoggerContext) this.context; |
1,423,731 | public void apply(final Task task) {<NEW_LINE>if (this.shutdownLatch != null) {<NEW_LINE>Utils.runClosureInThread(task.getDone(), new Status(RaftError.ENODESHUTDOWN, "Node is shutting down."));<NEW_LINE>throw new IllegalStateException("Node is shutting down");<NEW_LINE>}<NEW_LINE>Requires.requireNonNull(task, "Null tas... | .done = task.getDone(); |
703,202 | public boolean closeRequested() {<NEW_LINE>int id = this.getCurrentStateID();<NEW_LINE>// intercept close requests in game-related states and return to song menu<NEW_LINE>if (id == STATE_GAME || id == STATE_GAMEPAUSEMENU || id == STATE_GAMERANKING) {<NEW_LINE>// start playing track at preview position<NEW_LINE>SongMenu... | .STATE_GAMERANKING)).getGameData(); |
58,994 | // Display header<NEW_LINE>private static void header(Comparable[] array) {<NEW_LINE>StdDraw.setPenColor(StdDraw.BLACK);<NEW_LINE>StdDraw.text(array.length / 2.0, -2.7, "array[ ]");<NEW_LINE>for (int i = 0; i < array.length; i++) {<NEW_LINE>StdDraw.text(i, -2, String.valueOf(i));<NEW_LINE>}<NEW_LINE>StdDraw.text(-2.50,... | .length - 0.5, -1.65); |
244,958 | public ProcessContext<CartOperationRequest> execute(ProcessContext<CartOperationRequest> context) throws Exception {<NEW_LINE>CartOperationRequest request = context.getSeedData();<NEW_LINE>Long orderItemId = request.getItemRequest().getOrderItemId();<NEW_LINE>Integer orderItemQuantityDelta = request.getOrderItemQuantit... | ) (numToDelete - qty) }); |
1,697,928 | public boolean finalizeCommandsOnStart(final Commands cmds, final VirtualMachineProfile profile) {<NEW_LINE>final DomainRouterVO router = _routerDao.findById(profile.getId());<NEW_LINE>final NicProfile controlNic = getControlNic(profile);<NEW_LINE>if (controlNic == null) {<NEW_LINE>s_logger.error("Control network doesn... | "Cannot find related virtual router provider of router: " + router.getHostName()); |
1,638,629 | private void updateClassification() {<NEW_LINE>// for (var viewer : qupath.getViewers()) {<NEW_LINE>// var imageData = viewer.getImageData();<NEW_LINE>// if (imageData == null) {<NEW_LINE>// selectedOverlay.set(null);<NEW_LINE>// viewer.resetCustomPixelLayerOverlay();<NEW_LINE>// }<NEW_LINE>// }<NEW_LINE>var channel = ... | qupath.getOverlayOptions(), classifier); |
227,283 | public static DescribeInfrastructuresResponse unmarshall(DescribeInfrastructuresResponse describeInfrastructuresResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeInfrastructuresResponse.setRequestId<MASK><NEW_LINE>describeInfrastructuresResponse.setSuccess(_ctx.booleanValue("DescribeInfrastructuresResponse.Success... | (_ctx.stringValue("DescribeInfrastructuresResponse.RequestId")); |
1,797,920 | protected List<Element> expandDateYear(Document doc, String s) {<NEW_LINE>ArrayList<Element> exp = new ArrayList<Element>();<NEW_LINE>int value;<NEW_LINE>try {<NEW_LINE>value = Integer.<MASK><NEW_LINE>} catch (NumberFormatException e) {<NEW_LINE>logger.info("Cannot convert string \"" + s + "\" to long.");<NEW_LINE>thro... | decode(s).intValue(); |
356,289 | private void appendLocationText(boolean selected, Color bgColor, boolean isProblemFile, String containerText) {<NEW_LINE>SimpleTextAttributes locationAttrs = SimpleTextAttributes.GRAYED_ATTRIBUTES;<NEW_LINE>if (isProblemFile) {<NEW_LINE>SimpleTextAttributes wavedAttributes = SimpleTextAttributes.merge(new SimpleTextAtt... | suffix = matcher.group(3); |
1,160,691 | public void updateImpl(List<Metric> metrics) {<NEW_LINE>Preconditions.checkNotNull(metrics, "metrics");<NEW_LINE>File file = new File(dir, fileFormat.format(new Date(clock.now())));<NEW_LINE>Writer out = null;<NEW_LINE>try {<NEW_LINE>try {<NEW_LINE>LOGGER.debug("writing {} metrics to file {}", metrics.size(), file);<NE... | = new OutputStreamWriter(fileOut, "UTF-8"); |
1,343,390 | int doPythonModule(VirtualFrame frame, PythonModule extensionModule, @CachedLibrary(limit = "1") HashingStorageLibrary lib, @Cached ExecModuleNode execModuleNode) {<NEW_LINE>Object nativeModuleDef = extensionModule.getNativeModuleDef();<NEW_LINE>if (nativeModuleDef == null) {<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE><MAS... | DynamicObjectNativeWrapper nativeWrapper = extensionModule.getNativeWrapper(); |
157,802 | protected ResolveResult[] innerResolve(boolean caseSensitive, @NotNull PsiFile file) {<NEW_LINE>if (isFirst()) {<NEW_LINE>if (".".equals(getCanonicalText())) {<NEW_LINE>PsiDirectory directory = getDirectory();<NEW_LINE>return directory != null ? new PsiElementResolveResult[] { new PsiElementResolveResult(directory) } :... | > innerResult = ContainerUtil.newLinkedHashSet(); |
99,852 | private static JsonAuthResponse authenticate(@NonNull final SecurPharmConfig config) {<NEW_LINE>try {<NEW_LINE>final SSLContext sslContext = createSSLContext(config);<NEW_LINE>final HttpClient client = HttpClients.custom().setSSLContext(sslContext).build();<NEW_LINE>final RestTemplate restTemplate = new RestTemplate();... | HttpEntity<>(params, headers); |
484,131 | private GitCommand git(ConsoleOutputStreamConsumer outputStreamConsumer, final File workingFolder, int preferredCloneDepth, SubprocessExecutionContext executionContext) throws Exception {<NEW_LINE>if (isSubmoduleFolder()) {<NEW_LINE>return new GitCommand(getFingerprint(), new File(workingFolder.getPath()), GitMaterialC... | = shallowClone ? preferredCloneDepth : Integer.MAX_VALUE; |
1,592,937 | final DeleteLayerVersionResult executeDeleteLayerVersion(DeleteLayerVersionRequest deleteLayerVersionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteLayerVersionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetri... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
217,159 | public void create(final ConnectorRequestContext requestContext, final TableInfo tableInfo) {<NEW_LINE>final QualifiedName name = tableInfo.getName();<NEW_LINE>final String createdBy = PolarisUtils.getUserOrDefault(requestContext);<NEW_LINE>// check exists then create in non-transactional optimistic manner<NEW_LINE>if ... | throw new InvalidMetaException(name, exception); |
1,726,563 | int indexOfRaw(AbstractTruffleString a, int fromCharIndex, int maxCharIndex, char[] values, @Cached ToIndexableNode toIndexableNode, @Cached TStringInternalNodes.GetCodeRangeNode getCodeRangeNode, @Cached TStringOpsNodes.IndexOfAnyCharNode indexOfNode) {<NEW_LINE>a.checkEncoding(Encoding.UTF_16);<NEW_LINE>if (a.isEmpty... | a.boundsCheckRaw(fromCharIndex, maxCharIndex); |
255,184 | private ClassTree generateNewTestClass(WorkingCopy workingCopy, String name, TypeElement srcClass, List<ExecutableElement> srcMethods) {<NEW_LINE>String instanceClassName = null;<NEW_LINE>ClassTree abstractClassImpl = null;<NEW_LINE>if (srcClass.getModifiers().contains(ABSTRACT) && hasInstanceMethods(srcMethods)) {<NEW... | srcClass, instanceClassName, srcMethods, workingCopy); |
1,739,214 | public void cancelTileFetches(final Object[] fetchRequests) {<NEW_LINE>if (!valid)<NEW_LINE>return;<NEW_LINE>if (debugMode)<NEW_LINE>Log.d(<MASK><NEW_LINE>// Have to run on our own thread<NEW_LINE>Handler handler = new Handler(getLooper());<NEW_LINE>handler.post(() -> {<NEW_LINE>allStats.totalCancels = allStats.totalCa... | "RemoteTileFetcher", "Cancelling (number) fetches: " + fetchRequests.length); |
986,154 | private static ClassifiedTasks classifyTasks(ImmutableSet<TaskHandle> tasks, ImmutableSet<String> tlds) {<NEW_LINE>ClassifiedTasks.Builder classifiedTasksBuilder = ClassifiedTasks.builder();<NEW_LINE>// Read all tasks on the DNS pull queue and load them into the refresh item multimap.<NEW_LINE>for (TaskHandle task : ta... | copyOf(task.extractParams()); |
1,453,414 | private Geometry createPolygon(Map<String, Object> geometryMap, GeometryFactory geometryFactory) throws ParseException {<NEW_LINE>Geometry result = null;<NEW_LINE>try {<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>List<List<List<Number>>> ringsList = (List<List<List<Number>>>) <MASK><NEW_LINE>if (ringsList == null ... | geometryMap.get(GeoJsonConstants.NAME_COORDINATES); |
708,082 | @Produces(MediaType.TEXT_PLAIN)<NEW_LINE>@Operation(operationId = "scan", summary = "Starts asynchronous discovery process for a binding and returns the timeout in seconds of the discovery operation.", responses = { @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementatio... | error("Error occurred while scanning for binding '{}'", bindingId, exception); |
231,376 | public int compare(LoadResult o1, LoadResult o2) {<NEW_LINE>Throwable e1 = o1.error;<NEW_LINE>Throwable e2 = o2.error;<NEW_LINE>// First, sort by error type.<NEW_LINE>int value1 = e1 instanceof UnsatisfiedLinkError ? 1 : 0;<NEW_LINE>int value2 = e2 instanceof UnsatisfiedLinkError ? 1 : 0;<NEW_LINE>if (value1 != value2)... | String m1 = e1.getMessage(); |
684,193 | public boolean apply(Game game, Ability source) {<NEW_LINE>Permanent targetCreature = game.getPermanent(getTargetPointer()<MASK><NEW_LINE>if (targetCreature != null) {<NEW_LINE>new AddCountersTargetEffect(CounterType.M1M1.createInstance(3)).apply(game, source);<NEW_LINE>Player controllingPlayer = game.getPlayer(targetC... | .getFirst(game, source)); |
511,396 | public static void main(String[] args) throws IOException, ConnectorException, InterruptedException, GeneralSecurityException {<NEW_LINE>String start = args.length > 0 ? args[0] : null;<NEW_LINE>if (start != null) {<NEW_LINE>String[] args2 = Arrays.copyOfRange(args, 1, args.length);<NEW_LINE>if (CROSS_PROXY.equals(star... | println(" '" + start + "' is not supported!"); |
147,740 | public static ListGatewayDomainResponse unmarshall(ListGatewayDomainResponse listGatewayDomainResponse, UnmarshallerContext _ctx) {<NEW_LINE>listGatewayDomainResponse.setRequestId(_ctx.stringValue("ListGatewayDomainResponse.RequestId"));<NEW_LINE>listGatewayDomainResponse.setHttpStatusCode(_ctx.integerValue("ListGatewa... | ("ListGatewayDomainResponse.Data[" + i + "].CertBeforeDate")); |
340,252 | // ----------------//<NEW_LINE>// renderSelected //<NEW_LINE>// ----------------//<NEW_LINE>@Override<NEW_LINE>public boolean renderSelected(Graphics g) {<NEW_LINE><MASK><NEW_LINE>Rectangle rect = getBounds();<NEW_LINE>if ((clip == null) || clip.intersects(rect)) {<NEW_LINE>if (g instanceof Graphics2D) {<NEW_LINE>Graph... | Rectangle clip = g.getClipBounds(); |
1,162,199 | public void translate(final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions) throws InternalTranslationException {<NEW_LINE>Preconditions.checkNotNull(environment, "Error: Argument environment can't be null");<NEW_LINE>Preconditions.checkNotNull(instruction,... | = baseOffset + instructions.size(); |
53,167 | void loadLeftDBTree() {<NEW_LINE>TreeItem rootTreeItem = leftDBTree.getRoot();<NEW_LINE>rootTreeItem.getChildren().clear();<NEW_LINE>try {<NEW_LINE>List<DatabaseConfig> dbConfigs = ConfigHelper.loadDatabaseConfig();<NEW_LINE>for (DatabaseConfig dbConfig : dbConfigs) {<NEW_LINE>TreeItem<String> treeItem = new TreeItem<>... | ImageView dbImage = new ImageView("icons/computer.png"); |
520,660 | private void processEncodedMethods(DexHeader header, ClassDefItem item, List<EncodedMethod> methods, TaskMonitor monitor) throws Exception {<NEW_LINE>for (int i = 0; i < methods.size(); ++i) {<NEW_LINE>monitor.checkCanceled();<NEW_LINE>EncodedMethod method = methods.get(i);<NEW_LINE>MethodIDItem methodID = header.getMe... | .getNameIndex()) + "\n"); |
801,873 | public static GetMultiRateConfigResponse unmarshall(GetMultiRateConfigResponse getMultiRateConfigResponse, UnmarshallerContext _ctx) {<NEW_LINE>getMultiRateConfigResponse.setRequestId(_ctx.stringValue("GetMultiRateConfigResponse.RequestId"));<NEW_LINE>getMultiRateConfigResponse.setDomain(_ctx.stringValue("GetMultiRateC... | ("GetMultiRateConfigResponse.TemplatesInfo[" + i + "].AudioRate")); |
1,717,124 | public void doCollectInformation(@Nonnull final ProgressIndicator progress) {<NEW_LINE>if (myHighlightUsagesHandler != null) {<NEW_LINE>List<PsiElement> targets = myHighlightUsagesHandler.getTargets();<NEW_LINE>myHighlightUsagesHandler.computeUsages(targets);<NEW_LINE>final List<TextRange> readUsages = myHighlightUsage... | TargetElementUtilEx.ELEMENT_NAME_ACCEPTED, TargetElementUtilEx.REFERENCED_ELEMENT_ACCEPTED); |
138,627 | public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {<NEW_LINE>if (uri == null || uri.length() == 0) {<NEW_LINE>if (objects.isEmpty()) {<NEW_LINE>// root<NEW_LINE>parseRoot(qName, attributes);<NEW_LINE>} else {<NEW_LINE>Object parent = objects.peek();<NEW_LINE... | String tag = tags.peek(); |
316,836 | public ServiceObjects<UI> addingService(ServiceReference<UI> uiServiceReference) {<NEW_LINE><MASK><NEW_LINE>BundleContext bundleContext = bundle.getBundleContext();<NEW_LINE>UI contributedUI = bundleContext.getService(uiServiceReference);<NEW_LINE>try {<NEW_LINE>Class<? extends UI> uiClass = contributedUI.getClass();<N... | Bundle bundle = uiServiceReference.getBundle(); |
277,282 | public UpdateDataSourceResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>UpdateDataSourceResult updateDataSourceResult = new UpdateDataSourceResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>i... | JsonToken token = context.getCurrentToken(); |
525,257 | public void initSendable(NTSendableBuilder builder) {<NEW_LINE>builder.setSmartDashboardType("String Chooser");<NEW_LINE>builder.getEntry(INSTANCE).setDouble(m_instance);<NEW_LINE>builder.addStringProperty(DEFAULT<MASK><NEW_LINE>builder.addStringArrayProperty(OPTIONS, () -> m_map.keySet().toArray(new String[0]), null);... | , () -> m_defaultChoice, null); |
75,282 | public void showDialog(ConsoleFrame console) {<NEW_LINE>this.console = console;<NEW_LINE>this.txtServer.setText(ConsoleFrame.getPreferences().get("serverAddress", "localhost"));<NEW_LINE>this.txtPort.setText(ConsoleFrame.getPreferences().get("serverPort", <MASK><NEW_LINE>this.chkAutoConnect.setSelected(Boolean.parseBoo... | Integer.toString(17171))); |
717,383 | public void ReInit(java.io.Reader stream) {<NEW_LINE>if (jj_input_stream == null) {<NEW_LINE>jj_input_stream = new SimpleCharStream(stream, 1, 1);<NEW_LINE>} else {<NEW_LINE>jj_input_stream.ReInit(stream, 1, 1);<NEW_LINE>}<NEW_LINE>if (token_source == null) {<NEW_LINE>token_source = new PartitionParserTokenManager(jj_i... | [i] = new JJCalls(); |
1,242,408 | public static void addToString(SourceBuilder code, Datatype datatype, Map<Property, PropertyCodeGenerator> generatorsByProperty, boolean forPartial) {<NEW_LINE>// This code is to ensure entry order is preserved.<NEW_LINE>// Specifically this code is boiler plate from Collectors.toMap.<NEW_LINE>// Except with a LinkedHa... | addLine("public %s toString() {", String.class); |
1,648,614 | public void visit(BLangXMLElementLiteral xmlElementLiteral) {<NEW_LINE>BIRVariableDcl tempVarDcl = new BIRVariableDcl(xmlElementLiteral.getBType(), this.env.nextLocalVarId(names), VarScope.FUNCTION, VarKind.TEMP);<NEW_LINE>this.env.enclFunc.localVars.add(tempVarDcl);<NEW_LINE>BIROperand toVarRef = new BIROperand(tempVa... | BIROperand startTagNameIndex = this.env.targetOperand; |
1,074 | public static void main(String[] args) {<NEW_LINE>// test directories are automatically added<NEW_LINE>String[] directories = new String[] { "main/boofcv-geo/src/main/java/boofcv/alg", "main/boofcv-geo/src/main/java/boofcv/struct/geo", "main/boofcv-ip-multiview/src/main/java/boofcv/alg", "main/boofcv-io/src/main/java/b... | converter.replaceStartsWith("-Math.", "(float)-Math."); |
1,573,694 | public void initialize() throws InitializationException {<NEW_LINE>try {<NEW_LINE>Config config = m_configDao.<MASK><NEW_LINE>String content = config.getContent();<NEW_LINE>m_configId = config.getId();<NEW_LINE>m_config = DefaultSaxParser.parse(content);<NEW_LINE>} catch (DalNotFoundException e) {<NEW_LINE>try {<NEW_LI... | findByName(CONFIG_NAME, ConfigEntity.READSET_FULL); |
249,627 | private ToInvoiceExclOverride computeDeliveredOrOrdered() {<NEW_LINE>final Quantity orderedInStockUom = orderedData.getQtyInStockUom();<NEW_LINE>final boolean negativeQtyOrdered = orderedInStockUom.signum() <= 0;<NEW_LINE>final Quantity qtyToInvoiceInStockUomRaw;<NEW_LINE>final Quantity qtyToInvoiceRaw;<NEW_LINE>final ... | uomQty(qtyToInvoiceRaw).build(); |
1,638,345 | public void onLinkRemoteClose(Event e) {<NEW_LINE>final Link link = e.getLink();<NEW_LINE>final ErrorCondition remoteCondition = link.getRemoteCondition();<NEW_LINE>final AmqpErrorCondition errorCondition = AmqpErrorCondition.fromString(remoteCondition.getCondition().toString());<NEW_LINE>@SuppressWarnings("unchecked")... | > errorInfo = remoteCondition.getInfo(); |
1,612,092 | public final OperatorUnaryContext operatorUnary() throws RecognitionException {<NEW_LINE>OperatorUnaryContext _localctx = new <MASK><NEW_LINE>enterRule(_localctx, 82, RULE_operatorUnary);<NEW_LINE>int _la;<NEW_LINE>try {<NEW_LINE>enterOuterAlt(_localctx, 1);<NEW_LINE>{<NEW_LINE>setState(424);<NEW_LINE>_la = _input.LA(1... | OperatorUnaryContext(_ctx, getState()); |
1,744,947 | public Clustering<BiclusterWithInversionsModel> biclustering() {<NEW_LINE>double[][] mat = RelationUtil.relationAsMatrix(relation, rowIDs);<NEW_LINE>BiclusterCandidate cand = new BiclusterCandidate(getRowDim(), getColDim());<NEW_LINE>Clustering<BiclusterWithInversionsModel> result = new Clustering<>();<NEW_LINE>Metadat... | Random rand = rnd.getSingleThreadedRandom(); |
639,721 | private void calculate() {<NEW_LINE>if (model.getReversalLine_ID() > 0 && !model.isReversalParent())<NEW_LINE>return;<NEW_LINE>// try find the last cost detail transaction<NEW_LINE>lastCostDetail = MCostDetail.getLastTransaction(model, transaction, accountSchema.getC_AcctSchema_ID(), dimension.getM_CostType_ID(), dimen... | getCumulatedAmtLL().add(amountLowerLevel); |
96,080 | public static DescribeBackupsResponse unmarshall(DescribeBackupsResponse describeBackupsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeBackupsResponse.setRequestId(_ctx.stringValue("DescribeBackupsResponse.RequestId"));<NEW_LINE>describeBackupsResponse.setTotalCount(_ctx.integerValue("DescribeBackupsResponse.To... | ("DescribeBackupsResponse.Backups[" + i + "].BackupStatus")); |
1,193,007 | private static Map<String, Object> flatten(Map<String, Object> map, List<String> required, String parentName) {<NEW_LINE>Map<String, Object> <MASK><NEW_LINE>for (Map.Entry<String, Object> current : map.entrySet()) {<NEW_LINE>Map<String, Object> finalValue = (Map<String, Object>) current.getValue();<NEW_LINE>if (require... | result = new TreeMap<>(); |
884,685 | public void onNext(T element) {<NEW_LINE>// NOT calling super.onNext as this test only cares about stack depths, not the actual values of elements<NEW_LINE>// which also simplifies this test as we do not have to drain the test buffer, which would otherwise be in danger of overflowing<NEW_LINE>signalsReceived += 1;<NEW_... | value().request(1); |
653,618 | public ImageUploadResult modifyImage(String mediaId, ImageFilePayload imageFilePayload) {<NEW_LINE>Preconditions.checkArgument(StringUtils.isNotEmpty(mediaId), "mediaId should not be empty");<NEW_LINE>checkImageFilePayload(imageFilePayload);<NEW_LINE>NativeHttpClient client = (NativeHttpClient) _httpClient;<NEW_LINE>St... | LOG.info("upload image result:{}", imageUploadResult); |
1,631,179 | protected void init(Properties properties) throws BadRealmException, NoSuchRealmException {<NEW_LINE>LOG.config(() -> String.format("init(properties: %s)", properties));<NEW_LINE>final String <MASK><NEW_LINE>if (groupList != null && !groupList.isEmpty()) {<NEW_LINE>setProperty(PARAM_GROUPS, groupList);<NEW_LINE>assignG... | groupList = properties.getProperty(PARAM_GROUPS); |
1,315,294 | public void processOutput(Iterable<KeyedConfiguredTarget> partialResult) throws InterruptedException {<NEW_LINE>ConfiguredProtoOutputFormatter formatter = new ConfiguredProtoOutputFormatter();<NEW_LINE>formatter.setOptions(options, resolver, skyframeExecutor.getDigestFunction().getHashFunction());<NEW_LINE>for (KeyedCo... | addResults(builder.build()); |
480,529 | public void addFormForAddAccount() {<NEW_LINE>accountNrInputTextFieldEdited = false;<NEW_LINE>gridRowFrom = gridRow + 1;<NEW_LINE>Tuple2<ComboBox<TradeCurrency>, Integer> tuple = GUIUtil.addRegionCountryTradeCurrencyComboBoxes(gridPane, gridRow, this::onCountrySelected, this::onTradeCurrencySelected);<NEW_LINE>currency... | , BankUtil.getBankIdLabel("")); |
822,845 | protected Mono<Void> doSend(ParsedEmailTemplate template) {<NEW_LINE>return Mono.fromCallable(() -> {<NEW_LINE>MimeMessage mimeMessage = this.javaMailSender.createMimeMessage();<NEW_LINE>MimeMessageHelper helper = new <MASK><NEW_LINE>helper.setFrom(this.sender);<NEW_LINE>helper.setTo(template.getSendTo().toArray(new St... | MimeMessageHelper(mimeMessage, true, "utf-8"); |
682,325 | public static RelCollation buildCollationNonCoveringIndexScan(IndexDescriptor indexDesc, RelDataType indexScanRowType, RelDataType restrictedScanRowType, IndexCallContext context) {<NEW_LINE>if (context.getSortExprs() == null) {<NEW_LINE>return RelCollations.of(RelCollations.EMPTY.getFieldCollations());<NEW_LINE>}<NEW_... | origCollation.direction, origCollation.nullDirection); |
1,851,024 | private Mono<PagedResponse<JitNetworkAccessPolicyInner>> listByRegionNextSinglePageAsync(String nextLink) {<NEW_LINE>if (nextLink == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LI... | )).readOnly())); |
1,705,844 | public void marshall(LaunchProfileInitialization launchProfileInitialization, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (launchProfileInitialization == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(lau... | e.getMessage(), e); |
1,213,032 | public static BlobItemProperties populateBlobItemProperties(BlobItemPropertiesInternal blobItemPropertiesInternal) {<NEW_LINE>BlobItemProperties blobItemProperties = new BlobItemProperties();<NEW_LINE>blobItemProperties.setCreationTime(blobItemPropertiesInternal.getCreationTime());<NEW_LINE>blobItemProperties.setLastMo... | setLeaseDuration(blobItemPropertiesInternal.getLeaseDuration()); |
343,720 | private List<TextDetail> matchLines(CharSequence cs, FileObject fo) throws DataObjectNotFoundException, IOException {<NEW_LINE>List<TextDetail> dets = null;<NEW_LINE>DataObject dataObject = null;<NEW_LINE>int count = 0;<NEW_LINE>int limit = Constants.DETAILS_COUNT_LIMIT;<NEW_LINE>boolean canRun = true;<NEW_LINE>LineRea... | getString(), line.start); |
519,474 | public Builder createBuilder(BuilderFactory builderFactory, ExecTask task, Pipeline pipeline, UpstreamPipelineResolver pipelineResolver) {<NEW_LINE>String workingDir = task.workingDirectory();<NEW_LINE>String command = task.command();<NEW_LINE>File newWorkingDir = workingDir == null ? pipeline.defaultWorkingFolder() : ... | , new File(workingDir))); |
55,552 | public void generate(NodeLIRBuilderTool gen) {<NEW_LINE>// New OpenCL nodes for atomic add<NEW_LINE>OCLStamp oclStamp = null;<NEW_LINE>switch(elementKind) {<NEW_LINE>case Int:<NEW_LINE>oclStamp = getStampInt();<NEW_LINE>break;<NEW_LINE>case Long:<NEW_LINE>// DUE TO UNSUPPORTED FEATURE IN INTEL OpenCL PLATFORM<NEW_LINE>... | getLIRGeneratorTool().getLIRKind(accStamp); |
937,362 | public int addProject(Project project) {<NEW_LINE>project.setUpdateTime(new Date());<NEW_LINE>project.setCreateDate(new Date());<NEW_LINE>List<User> usersInformed = new ArrayList<User>();<NEW_LINE>for (String account : project.getMemberAccountList()) {<NEW_LINE>User user = accountDao.getUser(account);<NEW_LINE>if (user... | (result).toString()); |
335,042 | private static <// for existence in another one using 'deep' comparison.<NEW_LINE>K, V> boolean compareUnorderedCollection(Collection<K> col1, Collection<V> col2, List<String> path, Deque<DualKey> toCompare, Set<DualKey> visited, Map<String, Comparator<?>> comparatorByPropertyOrField, TypeComparators comparatorByType) ... | Object o2 = iterator.next(); |
775,914 | public void handleMessageSendException(String topic, EventStat eventStat, Object e) {<NEW_LINE>monitorIndexExt.incrementAndGet("PULSAR_SINK_EXP");<NEW_LINE>boolean needRetry = true;<NEW_LINE>if (e instanceof NotFoundException) {<NEW_LINE>logger.<MASK><NEW_LINE>needRetry = false;<NEW_LINE>} else if (e instanceof TooLong... | error("NotFoundException topic {}, message will be discard!", topic, e); |
1,760,160 | protected Collection<Declarable> processListener(MethodRabbitListenerEndpoint endpoint, RabbitListener rabbitListener, Object bean, Object target, String beanName) {<NEW_LINE>final List<Declarable> declarables = new ArrayList<>();<NEW_LINE>endpoint.setBean(bean);<NEW_LINE>endpoint.setMessageHandlerMethodFactory(this.me... | endpoint, rabbitListener, target, beanName); |
1,411,799 | public static RecognizeQuotaInvoiceResponse unmarshall(RecognizeQuotaInvoiceResponse recognizeQuotaInvoiceResponse, UnmarshallerContext _ctx) {<NEW_LINE>recognizeQuotaInvoiceResponse.setRequestId(_ctx.stringValue("RecognizeQuotaInvoiceResponse.RequestId"));<NEW_LINE>recognizeQuotaInvoiceResponse.setCode(_ctx.stringValu... | (_ctx.longValue("RecognizeQuotaInvoiceResponse.Data.OrgHeight")); |
1,107,563 | public void marshall(AwsEc2NetworkInterfaceDetails awsEc2NetworkInterfaceDetails, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (awsEc2NetworkInterfaceDetails == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marsha... | awsEc2NetworkInterfaceDetails.getPrivateIpAddresses(), PRIVATEIPADDRESSES_BINDING); |
1,760,004 | public boolean testClassLoad(final String tableName, final String className, final String asTypeName) throws TableNotFoundException, AccumuloException, AccumuloSecurityException {<NEW_LINE>EXISTING_TABLE_NAME.validate(tableName);<NEW_LINE>checkArgument(className != null, "className is null");<NEW_LINE>checkArgument(asT... | , tableName, className, asTypeName)); |
1,517,207 | private void remove() {<NEW_LINE>preview.removeAll();<NEW_LINE>preview.revalidate();<NEW_LINE>preview.repaint();<NEW_LINE>int dpi = DPIS[this.dpi.getSelectedIndex()];<NEW_LINE>int[] dpis = multi.getDpi();<NEW_LINE>com.codename1.ui.EncodedImage[] imgs = multi.getInternalImages();<NEW_LINE>for (int iter = 0; iter < dpis.... | [x] = imgs[originalOffset]; |
1,306,060 | protected void readData(int piece_number, int piece_offset, int length, ExternalSeedHTTPDownloaderListener listener) throws ExternalSeedException {<NEW_LINE>long piece_end = piece_offset + length - 1;<NEW_LINE>String str = url_prefix + "&piece=" + piece_number + "&ranges=" + piece_offset + "-" + piece_end;<NEW_LINE>set... | length, listener, isTransient()); |
1,832,721 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.<MASK><NEW_LINE>if (controller != null) {<NEW_LINE>List<Card> commandersInCommandZone = new ArrayList<>(game.getCommanderCardsFromCommandZone(controller, CommanderCardType.COMMANDER_OR_OATHBREAKER));<NEW_LINE>if (commandersInCommandZone... | getPlayer(source.getControllerId()); |
1,786,392 | /*<NEW_LINE>* @see com.sitewhere.grpc.service.AssetManagementGrpc.AssetManagementImplBase#<NEW_LINE>* deleteAssetType(com.sitewhere.grpc.service.GDeleteAssetTypeRequest,<NEW_LINE>* io.grpc.stub.StreamObserver)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void deleteAssetType(GDeleteAssetTypeRequest request, StreamObs... | (AssetModelConverter.asGrpcAssetType(apiResult)); |
1,383,287 | final DescribeAssetResult executeDescribeAsset(DescribeAssetRequest describeAssetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeAssetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<DescribeAssetReq... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,779,472 | private void readConstantAttribute() {<NEW_LINE>int attributesCount = u2At(6);<NEW_LINE>int readOffset = 8;<NEW_LINE>boolean isConstant = false;<NEW_LINE>for (int i = 0; i < attributesCount; i++) {<NEW_LINE>int utf8Offset = this.constantPoolOffsets[u2At(readOffset)] - this.structOffset;<NEW_LINE>char[] attributeName = ... | (relativeOffset + 1) == 1); |
577,339 | public void addSingleJob(JobKey jobKey, TriggerKey triggerKey, Class jobClass, Date date, JobDataMap jobDataMap) {<NEW_LINE>try {<NEW_LINE>LogUtil.info("addSingleJob: " + triggerKey.getName() + "," + triggerKey.getGroup());<NEW_LINE>JobBuilder jobBuilder = JobBuilder.newJob(jobClass).withIdentity(jobKey);<NEW_LINE>if (... | Trigger trigger = triggerBuilder.build(); |
1,704,244 | protected Map<String, Schema> resolveSchemaProperties(JavaType a, Annotation[] annotations, ModelConverterContext context) {<NEW_LINE>final Map<String, SchemaProperty> propList = new LinkedHashMap<>();<NEW_LINE>SchemaProperties props = a.getRawClass(<MASK><NEW_LINE>if (props != null && props.value().length > 0) {<NEW_L... | ).getAnnotation(SchemaProperties.class); |
1,202,327 | public IRubyObject add_namespace_definition(ThreadContext context, IRubyObject prefix, IRubyObject href) {<NEW_LINE>String hrefStr, prefixStr = prefix.isNil() ? null : prefix.convertToString().decodeString();<NEW_LINE>// try to search the namespace first<NEW_LINE>if (href.isNil()) {<NEW_LINE>hrefStr = findNamespaceHref... | setAttributeNS("http://www.w3.org/2000/xmlns/", qName, hrefStr); |
1,246,897 | public ClassSetAnalysisData read(Decoder decoder) throws Exception {<NEW_LINE>HierarchicalNameSerializer hierarchicalNameSerializer = classNameSerializerSupplier.get();<NEW_LINE>DependentSetSerializer dependentSetSerializer = new DependentSetSerializer(() -> hierarchicalNameSerializer);<NEW_LINE>int count = decoder.rea... | IntSetSerializer.INSTANCE.read(decoder); |
955,317 | public void run() {<NEW_LINE>String newVal = old.substring(0, start) + "${" + key + "}" + old.substring(end);<NEW_LINE>element.setElementText(newVal);<NEW_LINE>if (create[0].equals(Boolean.TRUE)) {<NEW_LINE>Profile prof = mdl.findComponent(element.findPosition(), Profile.class, true);<NEW_LINE>if (prof != null) {<NEW_L... | .getFactory().createProperties(); |
258,138 | void createApkFile(File outputFile, boolean signWithDebugKeyStore) throws MojoExecutionException {<NEW_LINE>// this needs to come from DexMojo<NEW_LINE>File dexFile = new File(targetDirectory, "classes.dex");<NEW_LINE>if (!dexFile.exists()) {<NEW_LINE>dexFile = new File(targetDirectory, "classes.zip");<NEW_LINE>}<NEW_L... | () - 3) + "jar"); |
1,143,170 | public static void vertical(Kernel1D_S32 kernel, GrayS16 src, GrayI16 dst) {<NEW_LINE>final short[] dataSrc = src.data;<NEW_LINE>final short[] dataDst = dst.data;<NEW_LINE>final int[] dataKer = kernel.data;<NEW_LINE>final int offset = kernel.getOffset();<NEW_LINE>final int kernelWidth = kernel.getWidth();<NEW_LINE>fina... | + imgWidth, (short) 0); |
37,799 | public static double curveLength(double x0, double y0, double x1, double y1, double x2, double y2, double x3, double y3, int n) {<NEW_LINE>double length = 0;<NEW_LINE>double xi = x0;<NEW_LINE>double yi = y0;<NEW_LINE>double t;<NEW_LINE>double px, py;<NEW_LINE>double tmpX, tmpY;<NEW_LINE>for (int i = 0; i < n; i++) {<NE... | Math.abs(yi - py); |
1,473,937 | /*<NEW_LINE>* Retrieve the server's stored configuration<NEW_LINE>* @param userId userId under which the request is performed<NEW_LINE>* @param serverName The name of the server to interrogate<NEW_LINE>* @param methodName The name of the method being invoked<NEW_LINE>* @return the platform origin<NEW_LINE>*<NEW_LINE>*... | getName(), methodName, e); |
1,217,806 | private Optional<I_M_PriceList> extractPriceList(@NonNull final org.compiere.model.I_C_OrderLine olRecord) {<NEW_LINE>final PriceListVersionId priceListVersionId = PriceListVersionId.ofRepoIdOrNull(olRecord.getM_PriceList_Version_ID());<NEW_LINE>if (priceListVersionId != null) {<NEW_LINE>final I_M_PriceList result = pr... | orgZoneId = orgDAO.getTimeZone(orgId); |
281,129 | private void validateContentCluster(ContentCluster currentCluster, ContentCluster nextCluster) {<NEW_LINE>String clusterName = currentCluster.getName();<NEW_LINE>currentCluster.getDocumentDefinitions().forEach((documentTypeName, currentDocumentType) -> {<NEW_LINE>NewDocumentType nextDocumentType = nextCluster.getDocume... | .globalDocumentChange.value())); |
1,419,906 | public void handleResult(Uri data) {<NEW_LINE>if (data == null)<NEW_LINE>return;<NEW_LINE>String code = data.getQueryParameter("code");<NEW_LINE>if (code == null)<NEW_LINE>return;<NEW_LINE>try {<NEW_LINE>// Trade our code for an access token.<NEW_LINE>//<NEW_LINE>Request //<NEW_LINE>request = //<NEW_LINE>new Request.Bu... | Timber.w(e, "Failed to get access token."); |
1,793,353 | private void showImportProgressLayout(boolean askFolder, boolean isExternal) {<NEW_LINE>// Replace launch options layout with import progress layout<NEW_LINE>rootView.removeAllViews();<NEW_LINE>LayoutInflater.from(getActivity()).inflate(R.layout.include_import_steps, rootView, true);<NEW_LINE>// Memorize UI elements th... | findViewById(R.id.import_step2_bar); |
853,810 | public boolean generatePluginConfig(ParseLoginAddress loginAddress, String clusterName, String targetPath, String option) throws Exception {<NEW_LINE>if (loginAddress.isLocal()) {<NEW_LINE>console.printlnInfoMessage(CommandUtils.getMessage("generateWebServerPluginTask.start.server.local", loginAddress.getServerName()))... | = new Object[] { clusterName }; |
439,016 | public String createQuerySQL(String table, List<DatasetTableField> fields, boolean isGroup, Datasource ds, List<ChartFieldCustomFilterDTO> fieldCustomFilter) {<NEW_LINE>SQLObj tableObj = SQLObj.builder().tableName((table.startsWith("(") && table.endsWith(")")) ? table : String.format(OracleConstants.KEYWORD_TABLE, tabl... | st_sql.add("groups", xFields); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.