idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
846,114 | public boolean createMessageCommunicate(String strOperType, String strOrgType, T t, EffectivePerson effectivePerson) {<NEW_LINE>try {<NEW_LINE>Gson gson = new Gson();<NEW_LINE>String strT = gson.toJson(t);<NEW_LINE>OrgMessage orgMessage = new OrgMessage();<NEW_LINE>orgMessage.setOperType(strOperType);<NEW_LINE>orgMessa... | .getData().toString(); |
185,782 | // Code adapted from HTSJDK's BlockCompressedInputStream class<NEW_LINE>private BGZFBlockMetadata processNextBlock(InputStream stream, String streamSource) throws IOException {<NEW_LINE>final byte[] buffer = new byte[BlockCompressedStreamConstants.MAX_COMPRESSED_BLOCK_SIZE];<NEW_LINE>long blockAddress = streamOffset;<N... | throw new IOException("Premature end of file: " + streamSource); |
756,452 | public static void main(String[] args) {<NEW_LINE>String nameRgb = UtilIO.pathExample("kinect/basket/basket_rgb.png");<NEW_LINE>String nameDepth = UtilIO.pathExample("kinect/basket/basket_depth.png");<NEW_LINE>String <MASK><NEW_LINE>VisualDepthParameters param = CalibrationIO.load(nameCalib);<NEW_LINE>BufferedImage buf... | nameCalib = UtilIO.pathExample("kinect/basket/visualdepth.yaml"); |
454,621 | public static ClientResponse uninstallBiz(String bizName, String bizVersion) throws Throwable {<NEW_LINE>AssertUtils.assertNotNull(bizFactoryService, "bizFactoryService must not be null!");<NEW_LINE>AssertUtils.assertNotNull(bizManagerService, "bizFactoryService must not be null!");<NEW_LINE>AssertUtils.assertNotNull(b... | generateBizIdentity(bizName, bizVersion))); |
135,599 | public GetRetainedMessageResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>GetRetainedMessageResult getRetainedMessageResult = new GetRetainedMessageResult();<NEW_LINE>AwsJsonReader reader = context.getReader();<NEW_LINE>reader.beginObject();<NEW_LINE>while (reader.hasNext()) {<NEW_LINE>Str... | ().unmarshall(context)); |
805,393 | public AviatorObject call(final Map<String, Object> env, final AviatorObject arg1, final AviatorObject arg2) {<NEW_LINE>Object first = arg1.getValue(env);<NEW_LINE>if (first == null) {<NEW_LINE>return AviatorBoolean.FALSE;<NEW_LINE>}<NEW_LINE>Class<?<MASK><NEW_LINE>boolean contains = false;<NEW_LINE>if (Set.class.isAss... | > clazz = first.getClass(); |
1,821,331 | public void menuSelected(MenuEvent event) {<NEW_LINE>Set<JMenuItem> unseen = new HashSet<>(itemMap.values());<NEW_LINE>for (final Editor editor : base.getEditors()) {<NEW_LINE>Sketch sketch = editor.getSketch();<NEW_LINE>JMenuItem item = itemMap.get(sketch);<NEW_LINE>if (item != null) {<NEW_LINE>unseen.remove(item);<NE... | .equals(getSketch())); |
25,729 | public void outputAccumulators(FinishBundleContext context) {<NEW_LINE>// Establish immutable non-null handles to demonstrate that calling other<NEW_LINE>// methods cannot make them null<NEW_LINE>final Map<WindowedStructuralKey<K>, AccumT> accumulators = this.accumulators;<NEW_LINE>final Map<WindowedStructuralKey<K>, I... | > key = timestampEntry.getKey(); |
377,720 | static Model buildModel(Arguments arguments, ClassLoader classLoader, Set<Validator.Feature> features) {<NEW_LINE>List<String> models = arguments.positionalArguments();<NEW_LINE>ModelAssembler assembler = CommandUtils.createModelAssembler(classLoader);<NEW_LINE>ContextualValidationEventFormatter formatter = new Context... | ) + System.lineSeparator()); |
1,785,734 | protected void encodeScript(FacesContext context, Dialog dialog) throws IOException {<NEW_LINE>WidgetBuilder wb = getWidgetBuilder(context);<NEW_LINE>wb.init("Dialog", dialog);<NEW_LINE>wb.attr("visible", dialog.isVisible(), false).attr("draggable", dialog.isDraggable(), true).attr("resizable", dialog.isResizable(), tr... | wb.attr("focus", focusExpressions); |
741,909 | private void handle(GetPrimaryStorageLicenseInfoMsg msg) {<NEW_LINE>GetPrimaryStorageLicenseInfoReply reply = new GetPrimaryStorageLicenseInfoReply();<NEW_LINE>if (!PrimaryStorageSystemTags.PRIMARY_STORAGE_VENDOR.hasTag(msg.getPrimaryStorageUuid())) {<NEW_LINE>bus.reply(msg, reply);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE... | getPrimaryStorageUuid(), PrimaryStorageSystemTags.PRIMARY_STORAGE_VENDOR_TOKEN); |
75,744 | private void buildArrayType(TypeMirror type, Map<String, Integer> typeVariableIndexes, Map<String, TypeMirror> genericSignatures) throws IOException {<NEW_LINE>String typeName = typeWithoutAnnotations(type.toString());<NEW_LINE>if (type.getKind() == TypeKind.DECLARED) {<NEW_LINE>DeclaredType declaredType = (DeclaredTyp... | index)).append("]"); |
1,552,531 | final CreateMatchmakingRuleSetResult executeCreateMatchmakingRuleSet(CreateMatchmakingRuleSetRequest createMatchmakingRuleSetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createMatchmakingRuleSetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetri... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
428,959 | final StopExperimentResult executeStopExperiment(StopExperimentRequest stopExperimentRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(stopExperimentRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.... | addHandlerContext(HandlerContextKey.SERVICE_ID, "fis"); |
1,654,491 | private static void addVoidPointersAsSymbols(String structureName, long structureAddress, StructureReader structureReader, IProcess process) throws DataUnavailableException, CorruptDataException {<NEW_LINE>if (structureAddress == 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>List<String> voidFields = getVoidPointerFieldsFr... | log(FINER, "DDRSymbolFinder: Adding new DDR symbol " + symName); |
974,636 | public List<InvoiceExportResult> export(@NonNull final InvoiceToExport invoice) {<NEW_LINE>final ImmutableMultimap<CrossVersionRequestConverter, InvoiceAttachment> //<NEW_LINE>converter2ConvertableAttachment = extractConverters(invoice.getInvoiceAttachments());<NEW_LINE>final ImmutableList.Builder<InvoiceExportResult> ... | getId()).build(); |
1,507,656 | final DeleteTokenResult executeDeleteToken(DeleteTokenRequest deleteTokenRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteTokenRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
1,300,664 | private void minimize(final File output) throws IOException, MojoFailureException {<NEW_LINE><MASK><NEW_LINE>options.setCodingConvention(new ClosureCodingConvention());<NEW_LINE>options.setOutputCharset(Charset.forName(encoding));<NEW_LINE>options.setWarningLevel(DiagnosticGroups.CHECK_VARIABLES, CheckLevel.WARNING);<N... | final CompilerOptions options = new CompilerOptions(); |
1,226,924 | public void process() {<NEW_LINE>// query for jobs<NEW_LINE>Cursor query = context.getContentResolver().query(Jobs.CONTENT_URI, Jobs.PROJECTION, null, null, Jobs.SORT_OLDEST);<NEW_LINE>if (query == null) {<NEW_LINE>// query failed<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// process jobs, starting with oldest<NEW_LINE>List<... | Timber.e("Job %d failed, will retry.", jobId); |
972,715 | public Response add(@FormParam("parent") String parentName, @FormParam("name") String name) {<NEW_LINE>if (!authenticate()) {<NEW_LINE>throw new ForbiddenClientException();<NEW_LINE>}<NEW_LINE>checkBaseFunction(BaseFunction.ADMIN);<NEW_LINE>// Validate input<NEW_LINE>name = ValidationUtil.validateLength(name, "name", 1... | .format("This group already exists: {0}", name)); |
1,118,891 | public void run(final FlowTrigger trigger, Map data) {<NEW_LINE>installUrl = Q.New(ImageCacheVO.class).eq(ImageCacheVO_.imageUuid, msg.getVolume().getRootImageUuid()).eq(ImageCacheVO_.primaryStorageUuid, msg.getPrimaryStorageUuid()).select(ImageCacheVO_.installUrl).findValue();<NEW_LINE>if (installUrl != null) {<NEW_LI... | fail(reply.getError()); |
1,742,085 | public HiresTileModel rotate(int start, int count, float angle, float axisX, float axisY, float axisZ) {<NEW_LINE>// create quaternion<NEW_LINE>double halfAngle = Math.toRadians(angle) * 0.5;<NEW_LINE>double q = TrigMath.sin(halfAngle) / Math.sqrt(axisX * axisX + axisY * axisY + axisZ * axisZ);<NEW_LINE>double // quate... | qx, qy, qz, qw); |
1,077,216 | // ---------------------- visit //text:a<NEW_LINE>@Override<NEW_LINE>public void visit(TextAElement ele) {<NEW_LINE>StylableAnchor anchor = document.createAnchor(currentContainer);<NEW_LINE>String reference = ele.getXlinkHrefAttribute();<NEW_LINE>applyStyles(ele, anchor);<NEW_LINE>if (anchor.getFont().getColor() == nul... | "#" + StylableHeading.generateImplicitDestination(reference); |
215,332 | private String addProjects(CloseableHttpClient httpClient, Endpoint endpoint, Collection<GitLabProject> projects) throws IOException, SourceConnectorException {<NEW_LINE>HttpGet get = new HttpGet(endpoint.toString());<NEW_LINE>get.addHeader("Accept", "application/json");<NEW_LINE>addSecurity(get);<NEW_LINE>try (Closeab... | linkHeader = response.getFirstHeader("Link"); |
713,363 | public static void addResource(String path, Map<String, LocalResource> resourcesMap, Configuration conf) {<NEW_LINE>try {<NEW_LINE>if (path != null) {<NEW_LINE>// Check the format of the path, if the path is of path#archive, we set resource type as ARCHIVE<NEW_LINE>LocalizableResource localizableResource = new Localiza... | ), localizableResource.toLocalResource()); |
1,141,166 | public int minCostII(int[][] costs) {<NEW_LINE>if (costs == null || costs.length == 0) {<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>int n = costs.length;<NEW_LINE>int k = costs[0].length;<NEW_LINE>// min1 is the index of the 1st-smallest cost till previous house<NEW_LINE>// min2 is the index of the 2nd-smallest cost till p... | [i - 1][last2]; |
856,079 | final DeleteAssessmentRunResult executeDeleteAssessmentRun(DeleteAssessmentRunRequest deleteAssessmentRunRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteAssessmentRunRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
1,783,646 | public void openLink(String url, String title, String target) {<NEW_LINE>Objects.requireNonNull(url);<NEW_LINE>// javascript: security issue<NEW_LINE>if (SecurityUtils.ignoreThisLink(url))<NEW_LINE>return;<NEW_LINE>// if (pendingAction.size() > 0)<NEW_LINE>// closeLink();<NEW_LINE>pendingAction.add(0, (Element) documen... | ).setAttribute(XLINK_HREF2, url); |
1,085,391 | static boolean compareGreaterThan(Object left, Object right) {<NEW_LINE>Class<?> leftClass = left == null ? null : left.getClass();<NEW_LINE>Class<?> rightClass = right == null ? null : right.getClass();<NEW_LINE>if (leftClass == Integer.class && rightClass == Integer.class) {<NEW_LINE>return (Integer) left > (Integer)... | MemoryUnit) right, left) < 0; |
1,203,140 | public void processNewResult(Object result) {<NEW_LINE>Database db = ResultUtil.findDatabase(result);<NEW_LINE>// Prepare<NEW_LINE>SetDBIDs positiveids = DBIDUtil.ensureSet(DatabaseUtil.getObjectsByLabelMatch(db, positiveClassName));<NEW_LINE>if (positiveids.size() == 0) {<NEW_LINE>LOG.warning("Computing a ROC curve fa... | oresults = OutlierResult.getOutlierResults(result); |
308,127 | public void loadProgram() throws Exception {<NEW_LINE>ToyProgramBuilder builder = new ToyProgramBuilder("String Examples", false);<NEW_LINE>builder.createMemory("RAM", "0x0", 0x2000);<NEW_LINE>builder.createString("0x100", "Hello World!\n", StandardCharsets.US_ASCII, true, StringDataType.dataType);<NEW_LINE>Data nonStr... | tool.getService(ProgramManager.class); |
1,716,479 | public Result invoke(final Invoker<?> invoker, final Invocation invocation) throws RpcException {<NEW_LINE>LOGGER.debug("create dubbo xa sources");<NEW_LINE>Class<?> clazz = invoker.getInterface();<NEW_LINE>Class<?>[] args = invocation.getParameterTypes();<NEW_LINE>String methodName = invocation.getMethodName();<NEW_LI... | LOGGER, "hmily find method error {} ", ex::getMessage); |
401,587 | public INDArray computeGradient(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask) {<NEW_LINE>if (!labels.equalShapes(preOutput)) {<NEW_LINE>Preconditions.throwEx("Labels and preOutput must have equal shapes: got shapes %s vs %s", labels.shape(), preOutput.shape());<NEW_LINE>}<NEW_LINE>// No-... | LossUtil.applyMask(dlda, mask); |
425,209 | public boolean isClusterSafe() {<NEW_LINE>Collection<Member> members = nodeEngine.getClusterService().getMembers();<NEW_LINE>if (members == null || members.isEmpty()) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>final Collection<Future<Boolean>> futures = new ArrayList<>(members.size());<NEW_LINE>for (Member member : me... | Address target = member.getAddress(); |
1,064,114 | public static void buildVersionInfo(List<? extends Object> list) {<NEW_LINE>ProjectVersionService projectVersionService = CommonBeanFactory.getBean(ProjectVersionService.class);<NEW_LINE>List<String> versionIds = list.stream().map(i -> {<NEW_LINE>Class<?> clazz = i.getClass();<NEW_LINE>try {<NEW_LINE>Method getVersionI... | getMethod("setVersionName", String.class); |
1,266,755 | protected boolean isSloppyGesture(MotionEvent event) {<NEW_LINE>boolean sloppy = super.isSloppyGesture(event);<NEW_LINE>if (sloppy) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>final float drag0 = event.getY(0) - mStartY0;<NEW_LINE>final float drag1 = event.getY(1) - mStartY1;<NEW_LINE>final float xSpanDiff = <MASK><NEW... | Math.abs(mCurrFingerDiffX - mPrevFingerDiffX); |
201,378 | protected Flux<Payload> localRequestStream(GSVRoutingMetadata routing, MessageMimeTypeMetadata dataEncodingMetadata, @Nullable MessageAcceptMimeTypesMetadata messageAcceptMimeTypesMetadata, Payload payload) {<NEW_LINE>try {<NEW_LINE>ReactiveMethodHandler methodHandler = localServiceCaller.getInvokeMethod(routing.getSer... | ), routing.getMethod()); |
1,741,360 | public EncryptionEntity unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>EncryptionEntity encryptionEntity = new EncryptionEntity();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument())<NEW_LINE>targetDepth... | ().unmarshall(context)); |
487,515 | public DataPoint transform(DataPoint dp) {<NEW_LINE>Vec orig = dp.getNumericalValues();<NEW_LINE>final int nnz = orig.nnz();<NEW_LINE>if (// /make sparse<NEW_LINE>nnz / (double) orig.length() < factor) {<NEW_LINE>if (// already sparse, just return<NEW_LINE>orig.isSparse())<NEW_LINE>return dp;<NEW_LINE>// else, make spa... | ), dp.getCategoricalData()); |
1,607,395 | public List<Variable> batchInsert(List<VariableCreateParam> createParams) {<NEW_LINE>if (CollectionUtils.isEmpty(createParams)) {<NEW_LINE>return Collections.emptyList();<NEW_LINE>}<NEW_LINE>List<RelVariableSubject> rels = new LinkedList<>();<NEW_LINE>List<Variable> variables = createParams.stream().map(p -> {<NEW_LINE... | setId(UUIDGenerator.generate()); |
1,072,007 | public synchronized int read(byte[] b, int off, int len) throws IOException {<NEW_LINE>if (off < 0 || len < 0 || b.length - off < len)<NEW_LINE>throw new IndexOutOfBoundsException();<NEW_LINE>if (len == 0)<NEW_LINE>return 0;<NEW_LINE>if (buf == null)<NEW_LINE>throw new IOException("stream was closed");<NEW_LINE>if (!bu... | buf.remaining(), len); |
1,291,812 | public void run(RegressionEnvironment env) {<NEW_LINE>String[] fields = "c0".split(",");<NEW_LINE>String epl = "@Name('s0') select irstream theString as c0 from SupportBean#keepall()";<NEW_LINE>env.compileDeployAddListenerMileZero(epl, "s0");<NEW_LINE>env.assertPropsPerRowIterator("s0", fields, new Object[0][]);<NEW_LI... | new Object[] { "E1" }); |
135,711 | public void publish(LogRecord record) {<NEW_LINE>if (!isLoggable(record) || m_writerOut == null)<NEW_LINE>return;<NEW_LINE>// Format<NEW_LINE>String msg = null;<NEW_LINE>try {<NEW_LINE>msg = getFormatter().format(record);<NEW_LINE>} catch (Exception ex) {<NEW_LINE>reportError("formatting", ex, ErrorManager.FORMAT_FAILU... | "writing", ex, ErrorManager.WRITE_FAILURE); |
595,748 | private static TextAttributeDefinition buildTextAttributeDefinition(final TemplateMode templateMode, final TextAttributeName name, final Set<IElementProcessor> elementProcessors) {<NEW_LINE>// No need to use a list for sorting - the elementProcessors set has already been ordered<NEW_LINE>final Set<IElementProcessor> as... | MatchingElementName matchingElementName = processor.getMatchingElementName(); |
725,805 | private void cleanTrash(Long trashId, final ReturnValueCompletion<CleanTrashResult> completion) {<NEW_LINE>CleanTrashResult result = new CleanTrashResult();<NEW_LINE>InstallPathRecycleInventory inv = trash.getTrash(trashId);<NEW_LINE>if (inv == null) {<NEW_LINE>completion.success(result);<NEW_LINE>return;<NEW_LINE>}<NE... | getUuid(), BackupStorageVO.class); |
840,737 | private boolean subTypeOfType(ReferenceBinding subType, ReferenceBinding typeBinding) {<NEW_LINE>if (typeBinding == null || subType == null)<NEW_LINE>return false;<NEW_LINE>if (TypeBinding.equalsEquals(subType, typeBinding))<NEW_LINE>return true;<NEW_LINE>ReferenceBinding superclass = subType.superclass();<NEW_LINE>if ... | superInterfaces[i].erasure(); |
1,321,104 | private <PFRML> int keyin(PFRML target, String text, int modifiers) throws FindFailed {<NEW_LINE>if (target != null && 0 == click(target, 0)) {<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>Debug profiler = Debug.startTimer("Region.type");<NEW_LINE>if (text != null && !"".equals(text)) {<NEW_LINE>String showText = "";<NEW_LIN... | , KeyEvent.getKeyModifiersText(modifiers)); |
1,611,034 | public void run() {<NEW_LINE>if (mIsForeground && mPaused) {<NEW_LINE>mIsForeground = false;<NEW_LINE>try {<NEW_LINE>double sessionLength = System.currentTimeMillis() - sStartSessionTime;<NEW_LINE>if (sessionLength >= mConfig.getMinimumSessionDuration() && sessionLength < mConfig.getSessionTimeoutDuration()) {<NEW_LINE... | increment(AutomaticEvents.TOTAL_SESSIONS, 1); |
816,927 | public CurrentReceivingHU execute() {<NEW_LINE>final I_PP_Order <MASK><NEW_LINE>final I_PP_Order_BOMLine coProductLine;<NEW_LINE>final LocatorId locatorId;<NEW_LINE>final UomId uomId;<NEW_LINE>final IPPOrderReceiptHUProducer huProducer;<NEW_LINE>if (coProductBOMLineId != null) {<NEW_LINE>coProductLine = ppOrderBOMBL.ge... | ppOrder = ppOrderBL.getById(ppOrderId); |
381,833 | 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... | bookmarkId, relationName, Context.NONE); |
766,324 | private void writePages(Iterator<Page> pageIterator) {<NEW_LINE>checkState(writable, "Spilling no longer allowed. The spiller has been made non-writable on first read for subsequent reads to be consistent");<NEW_LINE>checkState(!committed, "Spilling no longer allowed. Spill file is already committed");<NEW_LINE>while (... | long pageSize = serializedPage.getSizeInBytes(); |
1,841,935 | public static void horizontal5(Kernel1D_S32 kernel, GrayS16 image, GrayI16 dest, int divisor) {<NEW_LINE>final short[] dataSrc = image.data;<NEW_LINE>final short[] dataDst = dest.data;<NEW_LINE>final int k1 = kernel.data[0];<NEW_LINE>final int k2 = kernel.data[1];<NEW_LINE>final int k3 = kernel.data[2];<NEW_LINE>final ... | int width = image.getWidth(); |
120,248 | public Map<String, Object> parse(File file) throws IOException {<NEW_LINE>RandomAccessFile raf = null;<NEW_LINE>byte[] buf = null;<NEW_LINE>try {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>raf = new RandomAccessFile(file, "r");<NEW_LINE>// Parse the HEADER<NEW_LINE>// ----------------<NEW_LINE>// magic number ("bplist")<NEW_LINE... | int st00 = raf.readInt(); |
1,430,841 | final UpdateStackInstancesResult executeUpdateStackInstances(UpdateStackInstancesRequest updateStackInstancesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateStackInstancesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | addHandlerContext(HandlerContextKey.SERVICE_ID, "CloudFormation"); |
1,307,266 | public HttpAsyncClientBuilder customizeHttpClient(HttpAsyncClientBuilder httpClientBuilder) {<NEW_LINE>final SSLContext sslcontext;<NEW_LINE>final TrustStrategy trustStrategy = allowSelfSignedCertificates ? new TrustSelfSignedStrategy() : null;<NEW_LINE>try {<NEW_LINE>if (StringUtils.isNotEmpty(trustStoreFile)) {<NEW_L... | RuntimeException("Unable to load trust store data from " + trustStoreFile, e); |
1,251,907 | private void createResultData(Composite panel, String label, int rate) {<NEW_LINE>GridData gridData;<NEW_LINE>// spacer column<NEW_LINE>Label c1 = new Label(panel, SWT.NULL);<NEW_LINE>gridData = new GridData();<NEW_LINE>gridData.horizontalSpan = 1;<NEW_LINE>c1.setLayoutData(gridData);<NEW_LINE>// label<NEW_LINE>Label c... | Label(panel, SWT.NULL); |
305,212 | private synchronized void initMySeed() {<NEW_LINE>if (this.mySeed != null)<NEW_LINE>return;<NEW_LINE>// create or init own seed<NEW_LINE>if (this.myOwnSeedFile.length() > 0)<NEW_LINE>try {<NEW_LINE>// load existing identity<NEW_LINE>this.mySeed = Seed.load(this.myOwnSeedFile);<NEW_LINE>if (this.mySeed == null)<NEW_LINE... | getSwitchboard().myPublicIPs()); |
1,457,307 | public void endElement(String namespaceURI, String localName, String qualifiedName) throws SAXException {<NEW_LINE>switch(Element.fromString(localName)) {<NEW_LINE>case BROWSER:<NEW_LINE>exitBrowser(namespaceURI, localName, qualifiedName);<NEW_LINE>break;<NEW_LINE>case CLASS:<NEW_LINE>exitClass(namespaceURI, localName,... | exitConstructors(namespaceURI, localName, qualifiedName); |
480,901 | public void addListGrid(ClassMetadata cmd, ListGrid listGrid, String tabName, Integer tabOrder, String groupName, boolean isTabPresent) {<NEW_LINE>tabName = tabName == null ? DEFAULT_TAB_NAME : tabName;<NEW_LINE>tabOrder = tabOrder == null ? DEFAULT_TAB_ORDER : tabOrder;<NEW_LINE>// Check CMD for Tab/Group name overrid... | (BLCMessageUtils.getMessage(tabName)); |
1,597,361 | private void importFromMediationTicket(String tradeId) {<NEW_LINE>clearInputFields();<NEW_LINE>Optional<Dispute> optionalDispute = mediationManager.findDispute(tradeId);<NEW_LINE>if (optionalDispute.isPresent()) {<NEW_LINE>Dispute dispute = optionalDispute.get();<NEW_LINE>depositTxHex.<MASK><NEW_LINE>if (dispute.disput... | setText(dispute.getDepositTxId()); |
769,975 | // Returns true if the relation holds.<NEW_LINE>static boolean multiPointRelatePoint_(MultiPoint multipoint_a, Point point_b, double tolerance, String scl, ProgressTracker progress_tracker) {<NEW_LINE>RelationalOperationsMatrix relOps = new RelationalOperationsMatrix();<NEW_LINE>relOps.resetMatrix_();<NEW_LINE>relOps.s... | relationCompare_(relOps.m_matrix, scl); |
1,099,045 | public void showAnnualReport(ActionRequest request, ActionResponse response) throws JSONException, NumberFormatException, AxelorException {<NEW_LINE>String employeeId = request.getContext().get("_id").toString();<NEW_LINE>String year = request.getContext().get("year").toString();<NEW_LINE>int yearId = new JSONObject(ye... | User user = AuthUtils.getUser(); |
1,358,985 | protected int createOrUpdateUsingBatch(Set<Long> workItems) {<NEW_LINE>TransactionLegacy txn = TransactionLegacy.currentTxn();<NEW_LINE>PreparedStatement stmtInsert = null;<NEW_LINE>int[] queryResult = null;<NEW_LINE>int count = 0;<NEW_LINE>boolean success = true;<NEW_LINE>try {<NEW_LINE>stmtInsert = txn.prepareAutoClo... | stmtInsert.setLong(1, vmId); |
1,354,398 | private static Relationship fromMap(final Map<String, Object> map) {<NEW_LINE>final Relationship var = new Relationship();<NEW_LINE>var.setInode((String<MASK><NEW_LINE>var.setParentStructureInode((String) map.get("parent_structure_inode"));<NEW_LINE>var.setChildStructureInode((String) map.get("child_structure_inode"));... | ) map.get("inode")); |
41,979 | private Position decodeAlternative(Channel channel, SocketAddress remoteAddress, String sentence) {<NEW_LINE>Parser parser = new Parser(PATTERN_ALT, sentence);<NEW_LINE>if (!parser.matches()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, parser.next()... | parser.nextInt() > 0); |
1,277,179 | public static ObservableMetricsSystem create(final MetricsConfiguration metricsConfiguration) {<NEW_LINE>LOG.trace(<MASK><NEW_LINE>if (!metricsConfiguration.isEnabled() && !metricsConfiguration.isPushEnabled()) {<NEW_LINE>return new NoOpMetricsSystem();<NEW_LINE>}<NEW_LINE>if (PROMETHEUS.equals(metricsConfiguration.get... | "Creating a metric system with {}", metricsConfiguration.getProtocol()); |
1,085,173 | public static boolean shapeEquals(long[] shape1, long[] shape2) {<NEW_LINE>if (isColumnVectorShape(shape1) && isColumnVectorShape(shape2)) {<NEW_LINE>return Arrays.equals(shape1, shape2);<NEW_LINE>}<NEW_LINE>if (isRowVectorShape(shape1) && isRowVectorShape(shape2)) {<NEW_LINE>long[] shape1Comp = squeeze(shape1);<NEW_LI... | [] shape2Comp = squeeze(shape2); |
575,505 | public void resolve(InjectionBinding<PersistenceUnit> injectionBinding) throws InjectionException {<NEW_LINE>final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();<NEW_LINE>if (isTraceOn && tc.isEntryEnabled())<NEW_LINE>Tr.entry(tc, "resolve : " + injectionBinding);<NEW_LINE>JPAPUnitInjectionBinding pUnitBindi... | String applName = pUnitBinding.getApplName(); |
88,525 | private static void configure(String propertiesFile) throws IOException {<NEW_LINE>FileInputStream inputStream = new FileInputStream(propertiesFile);<NEW_LINE>Properties properties = new Properties();<NEW_LINE>try {<NEW_LINE>properties.load(inputStream);<NEW_LINE>} finally {<NEW_LINE>inputStream.close();<NEW_LINE>}<NEW... | properties.getProperty(ConfigKeys.ZOOKEEPER_PREFIX_KEY); |
1,541,446 | public void testThatResponseValidationForOneResponseBookFails(Map<String, String> param, StringBuilder ret) throws Exception {<NEW_LINE>// Will double check why 1234 is not correct for this case later<NEW_LINE>String uri = getAddress("bookstore/booksResponse/123");<NEW_LINE>Response cResp = client.target(uri)<MASK><NEW... | .request().get(); |
1,038,752 | public void marshall(PackageVersionDescription packageVersionDescription, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (packageVersionDescription == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(packageVe... | packageVersionDescription.getSourceCodeRepository(), SOURCECODEREPOSITORY_BINDING); |
931,637 | public CloudTrailDetails unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CloudTrailDetails cloudTrailDetails = new CloudTrailDetails();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = ori... | "iso8601").unmarshall(context)); |
235,930 | public List<MapMarkersGroup> loadGroupsLegacy() {<NEW_LINE>Map<String, MapMarkersGroup> groupsMap = getAllGroupsMap();<NEW_LINE>Iterator<Entry<String, MapMarkersGroup>> iterator = groupsMap.entrySet().iterator();<NEW_LINE>while (iterator.hasNext()) {<NEW_LINE>MapMarkersGroup group = iterator.next().getValue();<NEW_LINE... | (markersDbHelper.getMarkersHistory(true)); |
580,136 | protected void createOrReplaceTriggerQuery(DBRProgressMonitor monitor, DBCExecutionContext executionContext, List<DBEPersistAction> actions, MySQLTrigger trigger, boolean create) {<NEW_LINE>if (trigger.isPersisted()) {<NEW_LINE>actions.add(new SQLDatabasePersistAction("Drop trigger", "DROP TRIGGER IF EXISTS " + trigger... | MySQLExecutionContext) executionContext).getDefaultCatalog(); |
1,022,486 | public UserSessionModel loadUserSession(RealmModel realm, String userSessionId, boolean offline) {<NEW_LINE>String offlineStr = offlineToString(offline);<NEW_LINE>TypedQuery<PersistentUserSessionEntity> userSessionQuery = em.createNamedQuery("findUserSession", PersistentUserSessionEntity.class);<NEW_LINE>userSessionQue... | added = addClientSessionToAuthenticatedClientSessionsIfPresent(userSession, clientSession); |
861,848 | public synchronized void resetStorageGroupStatus(StorageGroupInfo storageGroupInfo) {<NEW_LINE>long delta = 0;<NEW_LINE>if (reportedStorageGroupMemCostMap.containsKey(storageGroupInfo)) {<NEW_LINE>delta = reportedStorageGroupMemCostMap.get(storageGroupInfo) - storageGroupInfo.getMemCost();<NEW_LINE>this.totalStorageGro... | getLogicalStorageGroupName(), delta, totalStorageGroupMemCost); |
1,681,672 | private PricingSystemId retrievePricingSystemIdOrNull(@NonNull final BPartnerId bpartnerId, final SOTrx soTrx, @Nullable final String trxName) {<NEW_LINE>final Properties ctx = Env.getCtx();<NEW_LINE>final I_C_BPartner bPartner = InterfaceWrapperHelper.create(ctx, bpartnerId.getRepoId(<MASK><NEW_LINE>if (bPartner == nu... | ), I_C_BPartner.class, trxName); |
1,830,882 | public <A> double estimate(A data, NumberArrayAdapter<?, ? super A> adapter, final int end) {<NEW_LINE>final int begin = DistanceBasedIntrinsicDimensionalityEstimator.countLeadingZeros(data, adapter, end);<NEW_LINE>if (end - begin <= 3) {<NEW_LINE>if (end - begin == 2) {<NEW_LINE>// Fallback to MoM<NEW_LINE>double v1 =... | getDouble(data, begin + 2); |
911,958 | protected String createStartInvocation(BuildRequest request, String mainObject, boolean includeVserv) {<NEW_LINE>String zone = request.getArg("vserv.zone", null);<NEW_LINE>if (includeVserv && zone != null && zone.length() > 0) {<NEW_LINE>String transition = request.getArg("vserv.transition", "300000");<NEW_LINE>String ... | request.getArg("vserv.countryCode", "null"); |
497,104 | public static void verifyOptionsEqualsHashcode(ParserOptions options1, ParserOptions options2, ParserOptions options3, ParserOptions options4) {<NEW_LINE>// Objects should be different<NEW_LINE>Assert.assertNotSame(options1, options2);<NEW_LINE>Assert.assertNotSame(options1, options2);<NEW_LINE>Assert.assertNotSame(opt... | (options2.equals(options3)); |
1,043,081 | protected void handle(final SyncImageSizeOnBackupStorageMsg msg) {<NEW_LINE>GetImageSizeCmd cmd = new GetImageSizeCmd();<NEW_LINE>cmd.imageUuid = msg.getImage().getUuid();<NEW_LINE>ImageBackupStorageRefInventory ref = CollectionUtils.find(msg.getImage().getBackupStorageRefs(), new Function<ImageBackupStorageRefInventor... | final SyncImageSizeOnBackupStorageReply reply = new SyncImageSizeOnBackupStorageReply(); |
308,319 | private int produceHello(Msg msg) {<NEW_LINE>int bytesLeft = msg.size();<NEW_LINE>int index = 0;<NEW_LINE>if (bytesLeft < 6 || !compare(msg, "HELLO", true)) {<NEW_LINE>return ZError.EPROTO;<NEW_LINE>}<NEW_LINE>bytesLeft -= 6;<NEW_LINE>index += 6;<NEW_LINE>if (bytesLeft < 1) {<NEW_LINE>return ZError.EPROTO;<NEW_LINE>}<N... | length = msg.get(index); |
973,010 | Map<String, Object> bindParameters(Neo4jParameterAccessor parameterAccessor, boolean includePageableParameter, UnaryOperator<Integer> limitModifier) {<NEW_LINE>final Parameters<?, ?> formalParameters = parameterAccessor.getParameters();<NEW_LINE>Map<String, Object> resolvedParameters = new HashMap<>();<NEW_LINE>// Valu... | toString(index)), value); |
1,197,673 | public PlanFragment visitAbstractPhysicalSort(AbstractPhysicalSort<? extends Plan> sort, PlanTranslatorContext context) {<NEW_LINE>PlanFragment childFragment = sort.child(0).accept(this, context);<NEW_LINE>List<Expr> oldOrderingExprList = Lists.newArrayList();<NEW_LINE>List<Boolean> ascOrderList = Lists.newArrayList();... | add(k.isAsc()); |
429,747 | public JavaSourceFile visitJavaSourceFile(JavaSourceFile cu, P p) {<NEW_LINE>JavaSourceFile t = (JavaSourceFile) new RemoveTrailingWhitespaceVisitor<>(stopAfter<MASK><NEW_LINE>t = (JavaSourceFile) new BlankLinesVisitor<>(Optional.ofNullable(((SourceFile) cu).getStyle(BlankLinesStyle.class)).orElse(IntelliJ.blankLines()... | ).visit(cu, p); |
1,100,606 | public CreateRateBasedRuleResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CreateRateBasedRuleResult createRateBasedRuleResult = new CreateRateBasedRuleResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement()... | class).unmarshall(context)); |
145,055 | private Mono<PagedResponse<PremiumMessagingRegionInner>> listBySkuSinglePageAsync(String sku, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (this... | .nextLink(), null)); |
947,509 | // query.from() is non-inclusive<NEW_LINE>@Override<NEW_LINE>public void mergeQueriesInto(String agentRollupId, AggregateQuery query, QueryCollector collector) throws Exception {<NEW_LINE>ResultSet results = executeQuery(agentRollupId, query, queryTable);<NEW_LINE>long captureTime = Long.MIN_VALUE;<NEW_LINE>for (Row ro... | = !row.isNull(i); |
1,210,133 | protected IDeserializationConverter<RowData, AbstractBaseColumn> createInternalConverter(String type) {<NEW_LINE>switch(type.toUpperCase(Locale.ENGLISH)) {<NEW_LINE>case "ID":<NEW_LINE>return val -> new BigDecimalColumn(new BigDecimal(id.incrementAndGet()));<NEW_LINE>case "INT":<NEW_LINE>case "INTEGER":<NEW_LINE>return... | .class).toString()); |
249,405 | private ActionListener<Response> cancelTransformTasksWithNoAssignment(final ActionListener<Response> finalListener, final TransformNodeAssignments transformNodeAssignments) {<NEW_LINE>final ActionListener<Response> doExecuteListener = ActionListener.wrap(response -> {<NEW_LINE>GroupedActionListener<PersistentTask<?>> g... | getWaitingForAssignment().size()); |
84,900 | protected void doHandle(Exception thrownException, ConsumerRecords<?, ?> data, Consumer<?, ?> consumer, MessageListenerContainer container, Runnable invokeListener) {<NEW_LINE>BatchListenerFailedException batchListenerFailedException = getBatchListenerFailedException(thrownException);<NEW_LINE>if (batchListenerFailedEx... | record) : batchListenerFailedException.getIndex(); |
370,362 | public static void registerType(ModelBuilder modelBuilder) {<NEW_LINE>ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(Decision.class, DMN_ELEMENT_DECISION).namespaceUri(LATEST_DMN_NS).extendsType(DrgElement.class).instanceProvider(new ModelTypeInstanceProvider<Decision>() {<NEW_LINE><NEW_LINE>public Decis... | AllowedAnswers.class).build(); |
1,633,201 | public String stringify(Object o) {<NEW_LINE>if (o == null) {<NEW_LINE>return ("null");<NEW_LINE>}<NEW_LINE>final ObjectName on = (ObjectName) o;<NEW_LINE>final StringBuilder buf = new StringBuilder();<NEW_LINE>if (!mOmitDomain) {<NEW_LINE>buf.append(on.getDomain()).append(":");<NEW_LINE>}<NEW_LINE>final Map<String, St... | buf.toString(), ","); |
1,058,903 | private static <CC extends ClientConnection> void handleSuccess(SaslChallengeContext<CC> context) throws SaslException {<NEW_LINE>final CC connection = context.connection;<NEW_LINE>final SaslClient saslClient = connection.getSaslClient();<NEW_LINE>try {<NEW_LINE>// Check if connection was marked for being secure then v... | .RAW_SEND_SIZE).toString()); |
1,199,076 | public void marshall(TokenData tokenData, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (tokenData == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(tokenData.getTokenId(), TOKENID_BINDING);<NEW_LINE>protoc... | e.getMessage(), e); |
1,457,951 | final DescribeRegionsResult executeDescribeRegions(DescribeRegionsRequest describeRegionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeRegionsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<Descri... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
386,056 | private void okPressed() {<NEW_LINE>int skipCertificates = -1;<NEW_LINE>String skipCertificatesStr = jtfSkipCertificates.getText().trim();<NEW_LINE>if (skipCertificatesStr.length() == 0) {<NEW_LINE>JOptionPane.showMessageDialog(this, res.getString("DInhibitAnyPolicy.ValueReq.message"), getTitle(), JOptionPane.WARNING_M... | DError.displayError(this, e); |
1,541,738 | public void associate() {<NEW_LINE>matches.reset();<NEW_LINE>unassociatedSrc.reset();<NEW_LINE>for (int i = 0; i < locationLeft.size; i++) {<NEW_LINE>Point2D_F64 left = locationLeft.get(i);<NEW_LINE>Desc descLeft = descriptionsLeft.get(i);<NEW_LINE>int bestIndex = -1;<NEW_LINE>double bestScore = scoreThreshold;<NEW_LIN... | right = locationRight.get(j); |
1,167,689 | public Image createScaledProfileIcon() {<NEW_LINE>String icon = unresolvedProfile.getIcon();<NEW_LINE>if (icon != null && icon != "") {<NEW_LINE>final String prefix = "data:image/png;base64,";<NEW_LINE>Image image = null;<NEW_LINE>if (icon.startsWith(prefix)) {<NEW_LINE>icon = icon.substring(prefix.length());<NEW_LINE>... | ("/amidst/icon/profileicons/" + icon + ".png")); |
1,148,996 | static CharsetQualityTuple parseTuple(Object o) {<NEW_LINE>String s;<NEW_LINE>if (o instanceof String) {<NEW_LINE>s = (String) o;<NEW_LINE>} else {<NEW_LINE>s = o.toString();<NEW_LINE>}<NEW_LINE>CharsetQualityTuple tuple = new CharsetQualityTuple();<NEW_LINE>String[] sArr = s.split(";[qQ]=");<NEW_LINE>if (sArr.length >... | .parseFloat(sArr[1]); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.