idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,521,089 | public void checkBankOrderAlreadyExist(Invoice invoice) throws AxelorException {<NEW_LINE>TypedQuery<BankOrder> q = JPA.em().createQuery("select bankOrder " + "FROM Invoice invoice " + "LEFT JOIN InvoicePayment invoicePayment on invoice.id = invoicePayment.invoice " + "LEFT JOIN BankOrder as bankOrder on invoicePayment... | setParameter("statusSelectDraft", BankOrderRepository.STATUS_DRAFT); |
1,230,170 | final DeletePolicyResult executeDeletePolicy(DeletePolicyRequest deletePolicyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deletePolicyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
943,299 | public static void growBorder(GrayS32 src, ImageBorder_S32 border, int borderX0, int borderY0, int borderX1, int borderY1, GrayS32 dst) {<NEW_LINE>dst.reshape(src.width + borderX0 + borderX1, src.height + borderY0 + borderY1);<NEW_LINE>border.setImage(src);<NEW_LINE>// Copy src into the inner portion of dst<NEW_LINE>Im... | x - borderX0, y - borderY0); |
1,762,598 | public static GetShieldResultResponse unmarshall(GetShieldResultResponse getShieldResultResponse, UnmarshallerContext context) {<NEW_LINE>getShieldResultResponse.setErrorCode(context.integerValue("GetShieldResultResponse.ErrorCode"));<NEW_LINE>getShieldResultResponse.setErrorMsg(context.stringValue("GetShieldResultResp... | ("GetShieldResultResponse.Data.AppList[" + i + "]")); |
474,342 | Object sendRequest(String method, Object... args) throws DaemonException {<NEW_LINE>final byte[] requestBytes;<NEW_LINE>try {<NEW_LINE>HashMap<Object, Object> kwargs = new HashMap<>();<NEW_LINE>if (isVersion2 && RPC_METHOD_DAEMON_LOGIN.equals(method)) {<NEW_LINE>kwargs.put("client_version", "" + V2_PROTOCOL_VERSION);<N... | getOutputStream().write(requestBytes); |
386,686 | public InputEditorPosition skipEmptyLines(boolean upwards, InputEditorPosition boundary) {<NEW_LINE>Position position = Position.create(<MASK><NEW_LINE>while (isLineEmpty(position, upwards)) {<NEW_LINE>if (upwards) {<NEW_LINE>if (position.getRow() <= 0)<NEW_LINE>return null;<NEW_LINE>position = Position.create(position... | getRow(), getPosition()); |
590,620 | public void addQueryToCollection(String queryName, String query, boolean isNativeQuery, Class clazz) {<NEW_LINE>if (namedNativeQueries == null) {<NEW_LINE>namedNativeQueries = new ConcurrentHashMap<String, QueryWrapper>();<NEW_LINE>}<NEW_LINE>if (!namedNativeQueries.containsKey(queryName)) {<NEW_LINE>namedNativeQueries... | + namedNativeQueries.get(queryName)); |
289,313 | private BExpressionValue performLogicalOperation(BVariable lVar, BVariable rVar, SyntaxKind operator) throws EvaluationException {<NEW_LINE>List<Value> argList = new ArrayList<>();<NEW_LINE>argList.add(getValueAsObject(context, lVar));<NEW_LINE>argList.add(getValueAsObject(context, rVar));<NEW_LINE>GeneratedStaticMetho... | getGeneratedMethod(context, B_LOGICAL_EXPR_HELPER_CLASS, B_LOGICAL_AND_METHOD); |
1,332,613 | private List<OrderLineCandidate> execute0() {<NEW_LINE>final ProductId bomProductId = initialCandidate.getProductId();<NEW_LINE>final I_PP_Product_BOM bom = bomRepo.getDefaultBOMByProductId(bomProductId).orElse(null);<NEW_LINE>if (bom == null) {<NEW_LINE>return ImmutableList.of(initialCandidate);<NEW_LINE>}<NEW_LINE>fi... | result = new ArrayList<>(); |
1,104,851 | private static DaemonContext parseFrom(String source) {<NEW_LINE>Pattern pattern = Pattern.compile("^.*DefaultDaemonContext\\[(uid=[^\\n,]+)?,?javaHome=([^\\n]+),daemonRegistryDir=([^\\n]+),pid=([^\\n]+),idleTimeout=(.+?)(,priority=[^\\n]+)?,daemonOpts=([^\\n]+)].*", Pattern.MULTILINE + Pattern.DOTALL);<NEW_LINE>Matche... | substring("uid=".length()); |
1,181,217 | public static DMatrixRMaj invertCalibrationMatrix(DMatrixRMaj K, @Nullable DMatrixRMaj K_inv) {<NEW_LINE>BoofMiscOps.checkEq(3, K.numCols);<NEW_LINE>BoofMiscOps.checkEq(3, K.numRows);<NEW_LINE>if (K_inv == null)<NEW_LINE>K_inv = new DMatrixRMaj(3, 3);<NEW_LINE>double fx = <MASK><NEW_LINE>double fy = K.unsafe_get(1, 1);... | K.unsafe_get(0, 0); |
1,567,934 | private boolean equivalentReference(ModelKey first, ModelKey second, MultiValueMap<ModelKey, ModelKey> referenceKeyToEffectiveKey, HashMap<List<ModelKey>, Boolean> seen) {<NEW_LINE>if (first == second) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>if (first == null || second == null) {<NEW_LINE>return false;<NEW_LINE>}<N... | (second), referenceKeyToEffectiveKey, seen); |
239,495 | private void colorFilledInput(Theme theme) {<NEW_LINE>if (devices == null) {<NEW_LINE>// Don't mark anything red, until the devices are loaded.<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>TraceType type = getSelectedType();<NEW_LINE>DeviceCaptureInfo dev = getSelectedDevice();<NEW_LINE>if (type == null) {<NEW_LINE>apiLabel.se... | setForeground(theme.missingInput()); |
617,429 | private void init(BuddyPlugin _plugin, UIInstance _ui_instance) {<NEW_LINE>plugin = _plugin;<NEW_LINE>ui_instance = (UISWTInstance) _ui_instance;<NEW_LINE>buddyPluginAZ2Listener = new BuddyPluginAZ2Listener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void chatCreated(final BuddyPluginAZ2.chatInstance chat) {<NEW_L... | getAZ2Handler().addListener(buddyPluginAZ2Listener); |
224,853 | protected String doIt() throws Exception {<NEW_LINE>log.info("C_DunningRun_ID=" + getRecord_ID() + ", Dispute=" + isIncludeInDispute() + ", C_BP_Group_ID=" + getBPGroupId() + ", C_BPartner_ID=" + getBPartnerId());<NEW_LINE>if (getRecord_ID() != 0) {<NEW_LINE>MDunningRun dunningRun = new MDunningRun(getCtx(), getRecord_... | ), 0, get_TrxName()); |
1,837,537 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_bubble_flow);<NEW_LINE>Point size = new Point();<NEW_LINE>WindowManager w = getWindowManager();<NEW_LINE>w.getDefaultDisplay().getSize(size);<NEW_LINE>final LayoutInflater <MASK><N... | inflater = LayoutInflater.from(this); |
1,324,465 | private RefreshResult refresh(@NonNull final Document document, @NonNull final DocumentId documentId) {<NEW_LINE>logger.debug("Refreshing: {}, using ID={}", document, documentId);<NEW_LINE>if (documentId.isNew()) {<NEW_LINE>throw new AdempiereException("Invalid documentId to refresh: " + documentId);<NEW_LINE>}<NEW_LIN... | logger.debug("Retrieving records: {}", sql); |
1,586,331 | public void propertyChanged(int property) {<NEW_LINE>String type = "unknown";<NEW_LINE>if (property == SpeedManagerListener.PR_ASN) {<NEW_LINE>type = "ASN change";<NEW_LINE>mon.readFromPersistentMap();<NEW_LINE>mon.updateFromCOConfigManager();<NEW_LINE>SMSearchLogger.log("ASN change.");<NEW_LINE>} else if (property == ... | shortTermLimit = PingSpaceMon.getUploadLimit(false); |
279,036 | public String stringValue(BLink parent) {<NEW_LINE>StringJoiner sj = new StringJoiner(",");<NEW_LINE>for (Map.Entry<K, V> kvEntry : this.entrySet()) {<NEW_LINE>K key = kvEntry.getKey();<NEW_LINE>V value = kvEntry.getValue();<NEW_LINE>if (value == null) {<NEW_LINE>sj.add("\"" + key + "\":null");<NEW_LINE>} else {<NEW_LI... | value).informalStringValue(mapParent)); |
1,014,332 | public void deleteById(String id) {<NEW_LINE>String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>throw logger.logExceptionAsError(new IllegalArgumentException(String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroup... | Utils.getValueFromIdByName(id, "workspaces"); |
34,634 | public void removeSecretsForSite(final Host host, final User user) throws DotDataException, DotSecurityException {<NEW_LINE>Logger.info(AppsAPIImpl.class, () -> String.format(" Removing secrets under site `%s` ", host.getName()));<NEW_LINE>// This must be called with param filterNonExisting in false since the first thi... | getIdentifier().toLowerCase()); |
589,745 | public boolean apply(Game game, Ability source) {<NEW_LINE>int equipCount = game.getBattlefield().count(filter1, source.getControllerId(), source, game);<NEW_LINE>int vehicleCount = game.getBattlefield().count(filter2, source.getControllerId(), source, game);<NEW_LINE>if (equipCount + vehicleCount < 1) {<NEW_LINE>retur... | outcome, target, source, game); |
1,322,859 | public CodegenMethod processCodegen(CodegenExpression resultEventTypeOuter, CodegenExpression eventBeanFactory, CodegenMethodScope codegenMethodScope, SelectExprProcessorCodegenSymbol selectSymbol, ExprForgeCodegenSymbol exprSymbol, CodegenClassScope codegenClassScope) {<NEW_LINE>// NOTE: Maintaining result-event-type ... | refEPS = exprSymbol.getAddEPS(methodNode); |
516,272 | final ListDestinationsResult executeListDestinations(ListDestinationsRequest listDestinationsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listDestinationsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
1,392,641 | public void assignLabels(LingoProcessingContext context, DoubleMatrix2D stemCos, IntIntHashMap filteredRowToStemIndex, DoubleMatrix2D phraseCos) {<NEW_LINE>final PreprocessingContext preprocessingContext = context.preprocessingContext;<NEW_LINE>final int firstPhraseIndex = preprocessingContext.allLabels.firstPhraseInde... | final int phraseFeatureIndex = candidatePhraseIndices[i]; |
1,477,516 | public ListRoutingProfileQueuesResult listRoutingProfileQueues(ListRoutingProfileQueuesRequest listRoutingProfileQueuesRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listRoutingProfileQueuesRequest);<NEW_LINE>AWSRequestMetrics awsReque... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,427,261 | final ListMultiRegionAccessPointsResult executeListMultiRegionAccessPoints(ListMultiRegionAccessPointsRequest listMultiRegionAccessPointsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listMultiRegionAccessPointsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.get... | endClientExecution(awsRequestMetrics, request, response); |
1,317,417 | public void drawScreen(int par1, int par2, float par3) {<NEW_LINE>drawDefaultBackground();<NEW_LINE>int scale = fontRenderer.getUnicodeFlag() ? 1 : 2;<NEW_LINE>for (EnumFacing dir : EnumFacing.VALUES) {<NEW_LINE>if (stacks.containsKey(dir)) {<NEW_LINE>ItemStack stack = stacks.get(dir);<NEW_LINE>String blockName = stack... | / 2 - BUTTON_HEIGHT * 3 - 5; |
932,804 | public ImageRepository unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ImageRepository imageRepository = new ImageRepository();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken... | String currentParentElement = context.getCurrentParentElement(); |
478,342 | public static boolean isOfProjectType(FileObject projectFile, String projectType) {<NEW_LINE>try {<NEW_LINE>ClassLoader cl = Lookup.getDefault().lookup(ClassLoader.class);<NEW_LINE>// NOI18N<NEW_LINE>Class foqClz = cl.loadClass("org.netbeans.api.project.FileOwnerQuery");<NEW_LINE>// NOI18N<NEW_LINE>Class <MASK><NEW_LIN... | apClz = cl.loadClass("org.netbeans.api.project.ActionProvider"); |
1,236,599 | public QueryFlowManager prepareQueryFlow(LogicalQueryPlan queryPlan, long snapshot) {<NEW_LINE>QueryFlow.Builder flowBuilder = QueryFlow.newBuilder();<NEW_LINE>long currentSnapshotId = snapshot;<NEW_LINE>if (queryPlan.isSnapshotDisable()) {<NEW_LINE>currentSnapshotId = Long.MAX_VALUE;<NEW_LINE>}<NEW_LINE>flowBuilder.se... | setInputBatchLevel(queryPlan.getInputBatchLavel()); |
1,611,501 | private void procedure(String personID, String encounterID, Procedure procedure) throws IOException {<NEW_LINE>// START,STOP,PATIENT,ENCOUNTER,CODE,DESCRIPTION,COST,REASONCODE,REASONDESCRIPTION<NEW_LINE>StringBuilder s = new StringBuilder();<NEW_LINE>s.append(iso8601Timestamp(procedure.<MASK><NEW_LINE>if (procedure.sto... | start)).append(','); |
606,041 | public void marshall(OutputSettings outputSettings, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (outputSettings == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(outputSettings.getArchiveOutputSettings(),... | outputSettings.getHlsOutputSettings(), HLSOUTPUTSETTINGS_BINDING); |
1,409,674 | private void initIgnorableTypes() {<NEW_LINE>ignored = new HashSet<>();<NEW_LINE>ignored.add(Class.class);<NEW_LINE>ignored.add(Void.class);<NEW_LINE>ignored.add(Void.TYPE);<NEW_LINE>ignored.add(HttpHeaders.class);<NEW_LINE>ignored.add(BindingResult.class);<NEW_LINE><MASK><NEW_LINE>// Used to ignore parameters<NEW_LINE... | ignored.add(UriComponentsBuilder.class); |
160,598 | private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents<NEW_LINE>void initComponents() {<NEW_LINE>java.awt.GridBagConstraints gridBagConstraints;<NEW_LINE>insidePanel = new javax.swing.JPanel();<NEW_LINE>xLabel = new javax.swing.JLabel();<NEW_LINE>xField = new javax.swing.JText... | new java.awt.GridBagConstraints(); |
1,491,149 | private void loadAdapter() {<NEW_LINE>WorldEdit worldEdit = WorldEdit.getInstance();<NEW_LINE>// Attempt to load a Bukkit adapter<NEW_LINE>BukkitImplLoader adapterLoader = new BukkitImplLoader();<NEW_LINE>try {<NEW_LINE>adapterLoader.addFromPath(getClass().getClassLoader());<NEW_LINE>} catch (IOException e) {<NEW_LINE>... | ).getCanonicalName() + " as the Bukkit adapter"); |
842,396 | public Transaction userCancelWithdrawal(String token) throws TimeoutException, ExecutionException, InterruptedException, ApiException {<NEW_LINE>Object postBody = null;<NEW_LINE>// verify the required parameter 'token' is set<NEW_LINE>if (token == null) {<NEW_LINE>VolleyError error = new VolleyError("Missing the requir... | , ApiInvoker.parameterToString(token)); |
366,853 | private static List<String> readModulesList(final String filename) {<NEW_LINE>Log.d(MeowCatApplication.TAG, "Reading modules list " + filename + "...");<NEW_LINE>final StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads();<NEW_LINE>try {<NEW_LINE>final File listFile = new File(filename);<NEW_LINE>final ... | BufferedReader bufferedReader = new BufferedReader(fileReader); |
379,974 | private void createNutchIndexData() throws IOException, URISyntaxException {<NEW_LINE>log.info("creating nutch index files ... ");<NEW_LINE>JobConf job = new JobConf(NutchData.class);<NEW_LINE>Utils.shareUrls(URLS_DIR_NAME, options, job);<NEW_LINE>Utils.shareDict(options, job);<NEW_LINE>setNutchOptions(job);<NEW_LINE>P... | job.setReducerClass(CreateLinks.class); |
821,163 | private void roundDownTime(Calendar cal, String datePattern) {<NEW_LINE>if (datePattern.indexOf('S') == -1) {<NEW_LINE>cal.roll(Calendar.MILLISECOND, -cal.get(Calendar.MILLISECOND));<NEW_LINE>}<NEW_LINE>if (datePattern.indexOf('s') == -1) {<NEW_LINE>cal.roll(Calendar.SECOND, -cal.get(Calendar.SECOND));<NEW_LINE>}<NEW_L... | hourOfDayPattern = Pattern.compile("[hKkH]"); |
444,580 | public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {<NEW_LINE>builder.startObject(Fields.JVM);<NEW_LINE>builder.field(Fields.PID, pid);<NEW_LINE>builder.field(Fields.VERSION, version);<NEW_LINE>builder.field(Fields.VM_NAME, vmName);<NEW_LINE>builder.field(Fields.VM_VERSION, vmV... | array(Fields.GC_COLLECTORS, gcCollectors); |
1,239,983 | public void addSubResult(SampleResult subResult, boolean renameSubResults) {<NEW_LINE>if (subResult == null) {<NEW_LINE>// see https://bz.apache.org/bugzilla/show_bug.cgi?id=54778<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String tn = getThreadName();<NEW_LINE>if (tn.length() == 0) {<NEW_LINE>tn = Thread.currentThread().getN... | ) + subResult.getHeadersSize()); |
1,132,443 | public HtmlResponse delete(final EditForm form) {<NEW_LINE>verifyCrudMode(form.crudMode, CrudMode.DETAILS, form.dictId);<NEW_LINE>validate(form, messages -> {<NEW_LINE>}, this::asDetailsHtml);<NEW_LINE>verifyToken(this::asDetailsHtml);<NEW_LINE>synonymService.getSynonymItem(form.dictId, form.id).ifPresent(entity -> {<N... | ()), this::asDetailsHtml); |
351,658 | public boolean apply(Game game, Ability source) {<NEW_LINE>Permanent sacrificedPermanent = null;<NEW_LINE>for (Cost cost : source.getCosts()) {<NEW_LINE>if (cost instanceof SacrificeTargetCost) {<NEW_LINE>SacrificeTargetCost sacrificeCost = (SacrificeTargetCost) cost;<NEW_LINE>if (!sacrificeCost.getPermanents().isEmpty... | = new FilterCard("creature card with mana value " + newConvertedCost); |
1,336,822 | private synchronized void saveChangedSessions() {<NEW_LINE>long now = System.currentTimeMillis();<NEW_LINE>Iterator<SessionHolder> it = sessions<MASK><NEW_LINE>Map<SessionKey, LocalSession> saveQueue = new HashMap<>();<NEW_LINE>while (it.hasNext()) {<NEW_LINE>SessionHolder stored = it.next();<NEW_LINE>if (stored.key.is... | .values().iterator(); |
419,741 | public static GetMonitorListResponse unmarshall(GetMonitorListResponse getMonitorListResponse, UnmarshallerContext _ctx) {<NEW_LINE>getMonitorListResponse.setRequestId<MASK><NEW_LINE>getMonitorListResponse.setCode(_ctx.stringValue("GetMonitorListResponse.Code"));<NEW_LINE>getMonitorListResponse.setMessage(_ctx.stringVa... | (_ctx.stringValue("GetMonitorListResponse.RequestId")); |
741,808 | private void loadCollectionDescriptors() {<NEW_LINE>// Load collection classes marked with @Collection annotation<NEW_LINE>List<CollectionDetails> collections = getCollections();<NEW_LINE>for (CollectionDetails collection : collections) {<NEW_LINE>CollectionInfo collectionInfo = collection.cd.getCollection();<NEW_LINE>... | getPath()).getParent(); |
349,533 | public void validate() {<NEW_LINE>for (String arg : args) {<NEW_LINE>if (!isConfigurationArg(arg) && !VALID_OPERATIONS_AND_FLAGS.contains(arg) && !isHandledByExtension(arg)) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>String outputTypeValue = getArgumentValue(OUTPUT_TYPE, args).toLowerCase();<NEW_LINE>if (!("json"... | throw new FlywayException("Invalid argument: " + arg); |
268,594 | public Long count(String application, String infoId, String title) throws Exception {<NEW_LINE>EntityManager em = this.entityManagerContainer().get(HotPictureInfo.class);<NEW_LINE>CriteriaBuilder cb = em.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<Long> cq = <MASK><NEW_LINE>Root<HotPictureInfo> root = cq.from(HotPictu... | cb.createQuery(Long.class); |
1,779,861 | public static Slime toSlime(List<Notification> notifications) {<NEW_LINE>Slime slime = new Slime();<NEW_LINE>Cursor notificationsArray = slime.setObject().setArray(notificationsFieldName);<NEW_LINE>for (Notification notification : notifications) {<NEW_LINE>Cursor notificationObject = notificationsArray.addObject();<NEW... | ).forEach(messagesArray::addString); |
988,562 | private void updatePolicy(Policy policy, TimePolicyRepresentation representation) {<NEW_LINE>String nbf = representation.getNotBefore();<NEW_LINE>String noa = representation.getNotOnOrAfter();<NEW_LINE>if (nbf != null && noa != null) {<NEW_LINE>validateFormat(nbf);<NEW_LINE>validateFormat(noa);<NEW_LINE>}<NEW_LINE>Map<... | HashMap(policy.getConfig()); |
674,191 | public Result processWorkPackage(@NonNull final I_C_Queue_WorkPackage workpackage, final String localTrxName) {<NEW_LINE>final List<I_C_Async_Batch> batches = queueDAO.retrieveAllItems(workpackage, I_C_Async_Batch.class);<NEW_LINE>if (batches == null || batches.size() != 1) {<NEW_LINE>throw new AdempiereException("Ther... | keepAliveTimeExpired = asyncBatchBL.keepAliveTimeExpired(asyncBatchId); |
651,980 | private void rollbackActions(List<ActionTO> unfinishedActions) throws StorageException {<NEW_LINE>for (ActionTO action : unfinishedActions) {<NEW_LINE>logger.log(Level.INFO, "- Needs to be rolled back: " + action);<NEW_LINE>switch(action.getType()) {<NEW_LINE>case UPLOAD:<NEW_LINE>delete(action.getRemoteFile());<NEW_LI... | getRemoteFile() + " also does not exist.", e); |
833,820 | static void createTimestampTriggerNotification(NotificationModel notificationModel, Bundle triggerBundle) {<NEW_LINE>TimestampTriggerModel trigger = TimestampTriggerModel.fromBundle(triggerBundle);<NEW_LINE>String uniqueWorkName = "trigger:" + notificationModel.getId();<NEW_LINE>long delay = trigger.getDelay();<NEW_LIN... | insertTriggerNotification(notificationModel, triggerBundle, withAlarmManager); |
1,659,318 | public ManualSyncSubmissionResult resetConnection(final UUID connectionId) {<NEW_LINE>log.info("reset sync request");<NEW_LINE>final boolean workflowReachable = isWorkflowReachable(getConnectionManagerName(connectionId));<NEW_LINE>if (!workflowReachable) {<NEW_LINE>log.error("Can't reset a non-reachable workflow");<NEW... | .class, getConnectionManagerName(connectionId)); |
177,111 | final UpdateIPSetResult executeUpdateIPSet(UpdateIPSetRequest updateIPSetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateIPSetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
183,347 | protected void createButtonsForButtonBar(Composite parent) {<NEW_LINE>((GridData) parent.getLayoutData()).grabExcessHorizontalSpace = true;<NEW_LINE>final Button managerButton = createButton(parent, IDialogConstants.CANCEL_ID, UIDashboardMessages.dialog_add_dashboard_button_manage, false);<NEW_LINE>((GridData) managerB... | )).horizontalAlignment = GridData.BEGINNING; |
578,310 | ActionResult<Wo> execute(EffectivePerson effectivePerson, String flag) throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>Business business = new Business(emc);<NEW_LINE>File file = emc.find... | getPortal(), Portal.class); |
479,160 | public StatusOutputStream<Void> write(final Path file, final TransferStatus status, final ConnectionCallback callback) throws BackgroundException {<NEW_LINE>try {<NEW_LINE>final java.nio.file.Path p = session.toPath(file);<NEW_LINE>final Set<OpenOption> options = new HashSet<>();<NEW_LINE>options.add(StandardOpenOption... | options.add(StandardOpenOption.CREATE); |
1,012,005 | public void optimize(PinotQuery query, @Nullable TableConfig tableConfig, @Nullable Schema schema) {<NEW_LINE>// If schema doesn't have any JSON columns, there is no need to run this optimizer.<NEW_LINE>if (schema == null || !schema.hasJSONColumn()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// In SELECT clause, replace JS... | schema, DataSchema.ColumnDataType.STRING); |
1,287,222 | public Tensor[] step(Tensor[] updates, double weight) {<NEW_LINE>for (int i = 0; i < updates.length; i++) {<NEW_LINE>gradsSquared[i].scaleInPlace(rho);<NEW_LINE>gradsSquared[i].intersectAndAddInPlace(updates[i], (double a) -> a * a * (1.0 - rho));<NEW_LINE>updates[i].hadamardProductInPlace(velocitySquared[i], (double a... | a * (1.0 - rho)); |
1,534,155 | protected ErlangVisitor buildErlangVisitor(@NotNull final ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {<NEW_LINE>return new ErlangVisitor() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void visitExportFunction(@NotNull ErlangExportFunction o) {<NEW_LINE>PsiReference reference = o.getReference(... | (fixMessage, name, arity)); |
425,597 | public static void main(String[] args) {<NEW_LINE>ReStructuredTextConverter formatter = new ReStructuredTextConverter();<NEW_LINE>formatter.addSection("Section");<NEW_LINE>formatter.addSubSection("SubSection");<NEW_LINE>formatter.addSubSubSection("SubSubSection");<NEW_LINE>formatter.addChapter("Chapter");<NEW_LINE>form... | formatter.addQuote("Item 2.3", 2); |
1,190,292 | public void actionPerformed(ActionEvent e) {<NEW_LINE>// Blinker timer fired<NEW_LINE>JTextComponent c = component;<NEW_LINE>if (c != null) {<NEW_LINE>setShowing(!showing);<NEW_LINE>// TODO only repaint carets showing on screen<NEW_LINE>List<MASK><NEW_LINE>int sortedCaretsSize = sortedCarets.size();<NEW_LINE>for (int i... | <CaretInfo> sortedCarets = getSortedCarets(); |
1,531,843 | final RemoveTagsResult executeRemoveTags(RemoveTagsRequest removeTagsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(removeTagsRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<RemoveTagsRequest> request = null;<NEW_LINE>Response<Re... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
1,230,620 | private boolean isIndirectParentValue() {<NEW_LINE>final Properties ctx = getGridFieldContext();<NEW_LINE>boolean result = false;<NEW_LINE>int tabNo = m_vo.TabNo;<NEW_LINE>int currentLevel = Env.getContextAsInt(ctx, m_vo.WindowNo, tabNo, GridTab.CTX_TabLevel);<NEW_LINE>if (tabNo > 1 && currentLevel > 1) {<NEW_LINE>whil... | WindowNo, tabNo, GridTab.CTX_TabLevel); |
966,343 | public void doCap(InvokeChainContext context) {<NEW_LINE>String storeKey = (String) context.get(InvokeChainConstants.METHOD_SPAN_STOREKEY);<NEW_LINE>if (storeKey == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Span span = (Span) context.get(storeKey);<NEW_LINE>if (span == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>St... | context.get(CaptureConstants.INFO_CLIENT_RESPONSESTATE); |
867,818 | public void preProcess(INDArray array, INDArray maskArray, DistributionStats stats) {<NEW_LINE>if (array.rank() <= 2) {<NEW_LINE>array.subiRowVector(stats.getMean().castTo<MASK><NEW_LINE>array.diviRowVector(filteredStd(stats).castTo(array.dataType()));<NEW_LINE>} else // if array Rank is 3 (time series) samplesxfeature... | (array.dataType())); |
1,750,968 | public static void planarToBuffered_U8(Planar<GrayU8> src, DataBufferInt buffer, WritableRaster dst) {<NEW_LINE>if (src.getNumBands() != dst.getNumBands())<NEW_LINE>throw new IllegalArgumentException("Unequal number of bands src = " + src.getNumBands() + " dst = " + dst.getNumBands());<NEW_LINE>final int[] dstData = bu... | c1 = band1[indexSrc] & 0xFF; |
1,425,422 | public void extractBatchKeyPhrasesMaxOverload() {<NEW_LINE>// BEGIN: com.azure.ai.textanalytics.TextAnalyticsAsyncClient.extractKeyPhrasesBatch#Iterable-TextAnalyticsRequestOptions<NEW_LINE>List<TextDocumentInput> textDocumentInputs1 = Arrays.asList(new TextDocumentInput("0", "I had a wonderful trip to Seattle last wee... | "Status code of request response: %d%n", response.getStatusCode()); |
1,630,802 | private void addOLCand0(@NonNull final OLCand candidate) {<NEW_LINE>if (currentOrderLine == null) {<NEW_LINE>currentOrderLine = newOrderLine(candidate);<NEW_LINE>}<NEW_LINE>currentOrderLine.setM_Warehouse_ID(WarehouseId.toRepoId(candidate.getWarehouseId()));<NEW_LINE>currentOrderLine.setM_Warehouse_Dest_ID(WarehouseId.... | primaryOrderLineToGroup.put(orderLineId, orderLineGroup); |
1,042,837 | private void browseSuperclassButtonActionPerformed(ActionEvent evt) {<NEW_LINE>ElementHandle<TypeElement> handle = TypeElementFinder.find(null, new TypeElementFinder.Customizer() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Set<ElementHandle<TypeElement>> query(ClasspathInfo classpathInfo, String textForQuery, ClassI... | template = Templates.getTemplate(wizardDescriptor); |
806,880 | public void marshall(Authorizer authorizer, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (authorizer == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(authorizer.getAuthorizerCredentialsArn(), AUTHORIZERCR... | authorizer.getJwtConfiguration(), JWTCONFIGURATION_BINDING); |
947,788 | private String fixLocale(FacesContext facesContext, String value) {<NEW_LINE>Locale loc = facesContext.getViewRoot().getLocale();<NEW_LINE>if (loc == null || loc == Locale.US) {<NEW_LINE>// nothing to fix if we are already using the US Locale<NEW_LINE>return value;<NEW_LINE>}<NEW_LINE>// TODO: DecimalFormatSymbols.getI... | char decSep = dfs.getDecimalSeparator(); |
103,879 | public Artifact newFile(Object var1, Object var2, Object fileSuffix) throws EvalException {<NEW_LINE>checkMutable("new_file");<NEW_LINE>checkDeprecated(<MASK><NEW_LINE>// Determine which of new_file's four signatures is being used. Yes, this is terrible.<NEW_LINE>// It's one major reason that this method is deprecated.... | "ctx.actions.declare_file", "ctx.new_file", getStarlarkSemantics()); |
939,034 | public boolean post(ForgeToSpongeEventData eventData) {<NEW_LINE>final boolean hasForgeListeners = eventData<MASK><NEW_LINE>// If there are no forge listeners, no events need to be fired pre<NEW_LINE>if (hasForgeListeners) {<NEW_LINE>// Fire event to plugins before modifications<NEW_LINE>eventData.setBeforeModification... | .getForgeListeners().length > 0; |
1,552,898 | public static ExportDoNotCallNumbersResponse unmarshall(ExportDoNotCallNumbersResponse exportDoNotCallNumbersResponse, UnmarshallerContext _ctx) {<NEW_LINE>exportDoNotCallNumbersResponse.setRequestId(_ctx.stringValue("ExportDoNotCallNumbersResponse.RequestId"));<NEW_LINE>exportDoNotCallNumbersResponse.setHttpStatusCode... | (_ctx.stringValue("ExportDoNotCallNumbersResponse.Message")); |
614,730 | public void handleGroupUpdated(BoseSoundTouchConfiguration masterPlayerConfiguration) {<NEW_LINE>String deviceId = getMacAddress();<NEW_LINE>if (masterPlayerConfiguration != null && masterPlayerConfiguration.macAddress != null) {<NEW_LINE>// Stereo pair<NEW_LINE>if (Objects.equals(masterPlayerConfiguration.macAddress, ... | ()).build()); |
549,772 | void removeTopicSpaceReference(SIBUuid8 neighbourUuid, MESubscription subscription, SIBUuid12 topicSpace, String topic) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(tc, "removeTopicSpaceReference", new Object[] { neighbourUuid, subscription, topicSpace, topic });<NEW_... | TemporarySubscription) _topicSpaces.get(topicSpace); |
1,137,622 | public void onWindowFocusChanged(boolean hasFocus) {<NEW_LINE>if (mHideNav) {<NEW_LINE>int options = getWindow()<MASK><NEW_LINE>options |= View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;<NEW_LINE>if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {<NEW_LINE>options |= View.SYSTEM_UI_FLAG_FULLSCREEN;<NEW_LINE>}<NEW_LINE>... | .getDecorView().getSystemUiVisibility(); |
1,715,742 | private static void tryAssertionSnapshotVar(RegressionEnvironment env) {<NEW_LINE>sendTimer(env, 6000);<NEW_LINE>sendEvent(env, "E1");<NEW_LINE>sendEvent(env, "E2");<NEW_LINE>env.milestone(0);<NEW_LINE>sendTimer(env, 19999);<NEW_LINE>sendEvent(env, "E3");<NEW_LINE>env.assertListenerNotInvoked("s0");<NEW_LINE>sendTimer(... | "E3" }, { "E4" } }); |
1,158,530 | private static void tryAssertionDefault(RegressionEnvironment env) {<NEW_LINE>// assert select result type<NEW_LINE>env.assertStatement("s0", statement -> {<NEW_LINE>EventType eventType = statement.getEventType();<NEW_LINE>assertEquals(String.class, eventType.getPropertyType("symbol"));<NEW_LINE>assertEquals(Long.class... | , eventType.getPropertyType("mySum")); |
677,724 | public void processRecord(MetricsRecord record) {<NEW_LINE>LOG.info("metricscache sink processRecord");<NEW_LINE>// Format it into TopologyManager.PublishMetrics<NEW_LINE>// The format of record is "host:port/componentName/instanceId"<NEW_LINE>// So MetricsRecord.getSource().split("/") would be an array with 3 elements... | 0], exceptionStackTraceLines[1]); |
801,018 | private void updateKeyStrokes(JComponent c) {<NEW_LINE>c.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).clear();<NEW_LINE>Map<KeyStroke, MacroButton<MASK><NEW_LINE>if (c.getActionMap().keys() != null) {<NEW_LINE>for (Object o : c.getActionMap().keys()) {<NEW_LINE>// We're looking for MacroButton here, but we're adding ... | > keyStrokeMap = MacroButtonHotKeyManager.getKeyStrokeMap(); |
1,400,576 | private // ------------------//<NEW_LINE>void connectAncestors(StaffFilament one, StaffFilament two) {<NEW_LINE>StaffFilament oneAnc = (StaffFilament) one.getAncestor();<NEW_LINE>StaffFilament twoAnc = (StaffFilament) two.getAncestor();<NEW_LINE>if (oneAnc != twoAnc) {<NEW_LINE>if (oneAnc.getLength(Orientation.HORIZONT... | putAll(twoAnc.getCombs()); |
83,912 | public void process(T input) {<NEW_LINE>super.initialize(input.width, input.height);<NEW_LINE>lazyDeclareSigmas(this.sigma);<NEW_LINE>if (temp == null) {<NEW_LINE>// declare it to be the latest image that it might need to be, resize below<NEW_LINE>temp = (T) input.createNew(1, 1);<NEW_LINE>}<NEW_LINE>if (levelScales[0]... | horizontal.process(input, temp); |
1,732,145 | public void run(RegressionEnvironment env) {<NEW_LINE>sendTimeEvent(env, "2002-05-1T08:00:00.000");<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>env.compileDeploy("@public create context NineToFive as start (0, 9, *, *, *) end (0, 17, *, *, *)", path);<NEW_LINE>// no started yet<NEW_LINE>String[] field... | env.compileDeploy("@name('s0') @public context NineToFive create window MyWindow#keepall as SupportBean", path); |
276,896 | public void handle(FutureResult finalResult, UserRequest userRequest, ResponseCache responseCache) {<NEW_LINE>GetPSFRequest getPSFRequest = (GetPSFRequest) userRequest;<NEW_LINE>MapResponseCache cache = (MapResponseCache) responseCache;<NEW_LINE>// Adaptor to Get PSF merge<NEW_LINE>ConcurrentHashMap<Request, Response> ... | ().merge(partGetResults)); |
1,389,028 | public StandardHlsSettings unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>StandardHlsSettings standardHlsSettings = new StandardHlsSettings();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDep... | JsonToken token = context.getCurrentToken(); |
624,813 | private void emitParticles(ItemStack stack, IManaSpreader spreader) {<NEW_LINE>float rotationYaw = -(spreader.getRotationX() + 90F);<NEW_LINE>float rotationPitch = spreader.getRotationY();<NEW_LINE>// Lots of EntityThrowable copypasta<NEW_LINE>float f = 0.3F;<NEW_LINE>float mx = (float) (Mth.sin(rotationYaw / 180.0F * ... | .PI) * f / 2D); |
1,499,887 | public void onPlayerShow(PostPlayerShowEvent event) {<NEW_LINE>SuperVanish plugin = (SuperVanish) getPlugin();<NEW_LINE>if (!plugin.getSettings().getBoolean("MessageOptions.FakeJoinQuitMessages.BroadcastFakeJoinOnReappear") || event.isSilent()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final Player player = event.getPlaye... | (), joinMessage), 20); |
823,939 | public static ListCabInstancesResponse unmarshall(ListCabInstancesResponse listCabInstancesResponse, UnmarshallerContext context) {<NEW_LINE>listCabInstancesResponse.setRequestId<MASK><NEW_LINE>listCabInstancesResponse.setSuccess(context.booleanValue("ListCabInstancesResponse.Success"));<NEW_LINE>listCabInstancesRespon... | (context.stringValue("ListCabInstancesResponse.RequestId")); |
1,595,232 | private AggregationLinearFactoryDesc handleCreateTable(ExprNode[] childNodes, AggregationAccessorLinearType stateType, ExprValidationContext validationContext) throws ExprValidationException {<NEW_LINE>String message = "For tables columns, the " + stateType.name().<MASK><NEW_LINE>if (stateType != AggregationAccessorLin... | toLowerCase(Locale.ENGLISH) + " aggregation function requires the 'window(*)' declaration"; |
1,300,644 | public List<ValidateError> validate(Map<String, String> values) {<NEW_LINE>List<ValidateError> errors = new ArrayList<>();<NEW_LINE>Validator validator;<NEW_LINE>ValidateError error;<NEW_LINE>validator = ValidatorFactory.getInstance(Validator.REQUIRED);<NEW_LINE>error = validator.validate(values.get("token"), convLabel... | ValidatorFactory.getInstance(Validator.INTEGER); |
798,338 | public Object invokeExportedMethod(String methodName, Collection<Object> arguments) throws NoSuchMethodException, RuntimeException {<NEW_LINE>Method method = mExportedMethods.get(methodName);<NEW_LINE>if (method == null) {<NEW_LINE>throw new NoSuchMethodException("Module " + getName() + "does not export method " + meth... | > actualArgumentsIterator = arguments.iterator(); |
424,787 | public final boolean member(Value elem) {<NEW_LINE>try {<NEW_LINE>TupleValue tv = (TupleValue) elem.toTuple();<NEW_LINE>if (tv == null) {<NEW_LINE>FcnRcdValue fcn = <MASK><NEW_LINE>if (fcn == null) {<NEW_LINE>if (elem instanceof ModelValue)<NEW_LINE>return ((ModelValue) elem).modelValueMember(this);<NEW_LINE>Assert.fai... | (FcnRcdValue) elem.toFcnRcd(); |
473,065 | public void marshall(StartSpeechSynthesisTaskRequest startSpeechSynthesisTaskRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (startSpeechSynthesisTaskRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.... | startSpeechSynthesisTaskRequest.getLexiconNames(), LEXICONNAMES_BINDING); |
643,167 | public void showForward(final RequestContext context) {<NEW_LINE>final Request request = context.getRequest();<NEW_LINE>String to = context.param(Common.GOTO);<NEW_LINE>if (StringUtils.isBlank(to)) {<NEW_LINE>to = Latkes.getServePath();<NEW_LINE>}<NEW_LINE>final String referer = Headers.getHeader(request, "referer", ""... | sendRedirect(Latkes.getServePath()); |
417,246 | /*<NEW_LINE>* Creates an EMP table and does an insert, update and select operations on<NEW_LINE>* the new table created.<NEW_LINE>*/<NEW_LINE>public static void doSQLWork(Connection conn) {<NEW_LINE>try {<NEW_LINE>conn.setAutoCommit(false);<NEW_LINE>// Prepare a statement to execute the SQL Queries.<NEW_LINE>Statement ... | System.out.println("--------------------------"); |
1,121,962 | public void serialize(DataOutputStream output) throws IOException {<NEW_LINE>output.writeBoolean(useNewAPI);<NEW_LINE>if (useNewAPI) {<NEW_LINE>int size = splitsNewAPI.size();<NEW_LINE>output.writeInt(size);<NEW_LINE>output.writeInt(locations.length);<NEW_LINE>for (int i = 0; i < locations.length; i++) {<NEW_LINE>outpu... | getClass().getName()); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.