idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
957,079 | public DescribeUserStackAssociationsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DescribeUserStackAssociationsResult describeUserStackAssociationsResult = new DescribeUserStackAssociationsResult();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement()... | int originalDepth = context.getCurrentDepth(); |
1,781,979 | private static void populateStblPCM(NodeBox stbl, PacketChunk[] chunks, int trackId, CodecMeta se) throws IOException {<NEW_LINE>AudioCodecMeta ase = (AudioCodecMeta) se;<NEW_LINE>int frameSize = ase.getFrameSize();<NEW_LINE>LongArrayList stco = new LongArrayList(250 << 10);<NEW_LINE>List<SampleToChunkEntry> stsc <MASK... | = new ArrayList<SampleToChunkEntry>(); |
1,712,633 | static String addUsernamePassword(final String url, final String userName, final String password) throws URISyntaxException, UnsupportedEncodingException {<NEW_LINE>final URI uri = URI.create(url.substring<MASK><NEW_LINE>final Map<String, String> params = new HashMap<>(// Hack around the fact Optional.Stream requires J... | (JDBC_URL_PREFIX.length())); |
264,088 | void init(boolean decrypting, String algorithm, byte[] key) throws InvalidKeyException {<NEW_LINE>int keyLength = key.length;<NEW_LINE>if (effectiveKeyBits == 0) {<NEW_LINE>effectiveKeyBits = keyLength << 3;<NEW_LINE>}<NEW_LINE>checkKey(algorithm, keyLength);<NEW_LINE>// key buffer, the L[] byte array from the spec<NEW... | i + t8] & 0xff)]; |
330,991 | static RunnerApi.PTransform.Builder translateAppliedPTransform(AppliedPTransform<?, ?, ?> appliedPTransform, List<AppliedPTransform<?, ?, ?>> subtransforms, SdkComponents components) throws IOException {<NEW_LINE>RunnerApi.PTransform.Builder transformBuilder = RunnerApi.PTransform.newBuilder();<NEW_LINE>for (Map.Entry<... | (taggedOutput.getValue())); |
374,032 | public static WaveletDescription<WlCoef_F32> daubJ_F32(int J) {<NEW_LINE>if (J != 4) {<NEW_LINE>throw new IllegalArgumentException("Only 4 is currently supported");<NEW_LINE>}<NEW_LINE>WlCoef_F32 coef = new WlCoef_F32();<NEW_LINE>coef.offsetScaling = 0;<NEW_LINE>coef.offsetWavelet = 0;<NEW_LINE>coef.scaling = new float... | BorderIndex1D_Wrap(), coef, inverse); |
40,626 | private void readTypeParameters(NdBinding type, SignatureWrapper wrapper) throws CoreException {<NEW_LINE>char[] genericSignature = wrapper.signature;<NEW_LINE>if (genericSignature.length == 0 || wrapper.charAtStart() != '<') {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>List<TypeParameter> typeParameters = new ArrayList<>();... | boundSignature = createTypeSignature(wrapper, JAVA_LANG_OBJECT_FIELD_DESCRIPTOR); |
1,213,235 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>Permanent sourcePermanent = game.getPermanent(source.getSourceId());<NEW_LINE>if (controller != null) {<NEW_LINE>if (!controller.flipCoin(source, game, true)) {<NEW_LINE>if (sourcePermanent ... | Target target = new TargetOpponent(true); |
1,013,294 | // </editor-fold>//GEN-END:initComponents<NEW_LINE>private void libraryManagerComboBoxActionPerformed(java.awt.event.ActionEvent evt) {<NEW_LINE>// GEN-FIRST:event_libraryManagerComboBoxActionPerformed<NEW_LINE>int index = libraryManagerComboBox.getSelectedIndex();<NEW_LINE>if (index == -1) {<NEW_LINE>// do nothing<NEW... | librariesCustomizer.setLibraryStorageArea(LibraryStorageArea.GLOBAL); |
1,763,573 | // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents<NEW_LINE>private void initComponents() {<NEW_LINE>java.awt.GridBagConstraints gridBagConstraints;<NEW_LINE>introLabel = new javax.swing.JLabel();<NEW_LINE>explanation = new javax.swing.JTextArea();<NEW_LINE>selectLabel = new javax... | .class, "ASCN_UTA_TEXT_explanation", label)); |
193,178 | private void unload(List<Bundle> bundles) {<NEW_LINE>if (bundles.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>LOG.log(<MASK><NEW_LINE>ClassLoader l = Lookup.getDefault().lookup(ClassLoader.class);<NEW_LINE>final Lookup stop = Lookups.metaInfServices(l, "META-INF/namedservices/Modules/Stop/");<NEW_LINE>for (Callabl... | Level.FINE, "unloading: {0}", bundles); |
1,567,460 | private static void tryAssertionScoringUseCase(RegressionEnvironment env, EventRepresentationChoice eventRepresentationEnum, AtomicInteger milestone) {<NEW_LINE>String[] fields = "userId,keyword,sumScore".split(",");<NEW_LINE>String epl = eventRepresentationEnum.getAnnotationTextWJsonProvided(MyLocalJsonProvidedScoreCy... | { "Pete", "K1", 115L }); |
1,131,643 | public static JobClusterManagerProto.ListJobsRequest createListJobsRequest(final Map<String, List<String>> params, final Optional<String> regex, final boolean activeOnlyDefault) {<NEW_LINE>if (params == null) {<NEW_LINE>if (regex.isPresent()) {<NEW_LINE>return new JobClusterManagerProto.ListJobsRequest(regex.get());<NE... | labelsQuery = paramValue(params, QUERY_PARAM_LABELS_QUERY); |
637,183 | private void handleEditReportal(final HttpServletRequest req, final HttpServletResponse resp, final Session session) throws ServletException, IOException {<NEW_LINE>final int id = getIntParam(req, "id");<NEW_LINE>final ProjectManager projectManager = this.server.getProjectManager();<NEW_LINE>final Page page = newPage(r... | errors = new ArrayList<>(); |
1,043,501 | public Hcl visitForObjectExpr(HCLParser.ForObjectExprContext ctx) {<NEW_LINE>return convert(ctx, (c, prefix) -> {<NEW_LINE>sourceBefore("{");<NEW_LINE>return new Hcl.ForObject(randomId(), Space.format(prefix), Markers.EMPTY, (Hcl.ForIntro) visit(ctx.forIntro()), new HclLeftPadded<>(sourceBefore(":"), (Expression) visit... | EMPTY), sourceBefore("}")); |
1,816,026 | public void onItemClick(AdapterView<?> parent, View view, int position, long id) {<NEW_LINE>City modifiedCity = adapter.getItem(position);<NEW_LINE>// Acquire the name of the clicked City, in order to be able to query for it.<NEW_LINE>final String name = modifiedCity.getName();<NEW_LINE>// Create an asynchronous transa... | "name", name).findFirst(); |
528,827 | // Based on the explanation at https://algs4.cs.princeton.edu/61event/<NEW_LINE>public double timeToHit(Particle3D otherParticle) {<NEW_LINE>if (this == otherParticle) {<NEW_LINE>return Double.POSITIVE_INFINITY;<NEW_LINE>}<NEW_LINE>double deltaPositionX = otherParticle.positionX - positionX;<NEW_LINE>double deltaPositi... | double deltaVelocityX = otherParticle.velocityX - velocityX; |
1,310,821 | private FieldsAndIncludes parseIncludes(RecordDataSchema recordDataSchema, PdlParser.FieldIncludesContext includeSet) throws ParseException {<NEW_LINE>List<NamedDataSchema> <MASK><NEW_LINE>Set<NamedDataSchema> includesDeclaredInline = new HashSet<>();<NEW_LINE>List<Field> fields = new ArrayList<>();<NEW_LINE>if (includ... | includes = new ArrayList<>(); |
1,262,324 | final CreateNodeFromTemplateJobResult executeCreateNodeFromTemplateJob(CreateNodeFromTemplateJobRequest createNodeFromTemplateJobRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createNodeFromTemplateJobRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequest... | endClientExecution(awsRequestMetrics, request, response); |
1,566,749 | // / Update the last word of a given named entity<NEW_LINE>private NamedEntity updateLastWord(NamedEntity namedEntity, String lastWord) {<NEW_LINE>boolean boolLastWord = false;<NEW_LINE>List<NerToken> tokens = new ArrayList<>(wordList.length);<NEW_LINE>for (int i = 0; i < wordList.length; i++) {<NEW_LINE>String s = wor... | return new NamedEntity(type, tokens); |
988,245 | public void run(RegressionEnvironment env) {<NEW_LINE>String[] fields = new String[] { "symbol", "price", "sumVol" };<NEW_LINE>String stmtText = "@name('s0') select symbol, price, sum(volume) as sumVol " + "from SupportMarketDataBean#length(5) " + "group by symbol " + "order by symbol";<NEW_LINE>env.compileDeploy(stmtT... | , "OCC", -5, 99); |
587,766 | public static ExchangeMetaData adaptMetaData(BitfinexAccountInfosResponse[] bitfinexAccountInfos, ExchangeMetaData exchangeMetaData) {<NEW_LINE>final Map<CurrencyPair, CurrencyPairMetaData> currencyPairs = exchangeMetaData.getCurrencyPairs();<NEW_LINE>// lets go with the assumption that the trading fees are common acro... | oldMetaData.getFeeTiers()))); |
871,484 | public Integer[] calculateRange(String beginValue, String endValue) {<NEW_LINE>SimpleDateFormat format = new SimpleDateFormat(this.dateFormat);<NEW_LINE>try {<NEW_LINE>Date begin = format.parse(beginValue);<NEW_LINE>Date end = format.parse(endValue);<NEW_LINE>Calendar cal = Calendar.getInstance();<NEW_LINE>List<Integer... | Integer[list.size()]; |
427,632 | public RFuture<V> putIfExistsAsync(K key, V value) {<NEW_LINE>if (storeMode == LocalCachedMapOptions.StoreMode.LOCALCACHE) {<NEW_LINE>ByteBuf mapKey = encodeMapKey(key);<NEW_LINE>CacheKey cacheKey = localCacheView.toCacheKey(mapKey);<NEW_LINE>CacheValue prevValue = <MASK><NEW_LINE>if (prevValue != null) {<NEW_LINE>broa... | cachePutIfExists(cacheKey, key, value); |
26,827 | public void stateChanged(ChangeEvent evt) {<NEW_LINE>super.stateChanged(evt);<NEW_LINE>Document doc;<NEW_LINE>JTextComponent c = component();<NEW_LINE>if (RectangularSelectionUtils.isRectangularSelection(c) && (doc = c.getDocument()) != null) {<NEW_LINE>if (rectangularSelectionBag == null) {<NEW_LINE>// Btw the documen... | = regions.get(i++); |
446,610 | public Request<DescribeStackResourceDriftsRequest> marshall(DescribeStackResourceDriftsRequest describeStackResourceDriftsRequest) {<NEW_LINE>if (describeStackResourceDriftsRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<DescribeStackReso... | request.addParameter("Version", "2010-05-15"); |
1,826,526 | public void deleteFileIfExistsCodeSnippets() {<NEW_LINE>ShareAsyncClient shareAsyncClient = createAsyncClientWithSASToken();<NEW_LINE>// BEGIN: com.azure.storage.file.share.ShareAsyncClient.deleteFileIfExists#string<NEW_LINE>shareAsyncClient.deleteFileIfExists("myfile").subscribe(deleted -> {<NEW_LINE>if (deleted) {<NE... | ShareRequestConditions().setLeaseId(leaseId); |
1,342,677 | public void processFile() {<NEW_LINE>long counter = 0;<NEW_LINE>while (iterator.hasNext()) {<NEW_LINE>final AbstractLocusInfo<T> info = iterator.next();<NEW_LINE>final ReferenceSequence ref = refWalker.get(info.getSequenceIndex());<NEW_LINE>boolean referenceBaseN = collector.isReferenceBaseN(info.getPosition(), ref);<N... | collector.unfilteredBaseQHistogramArray).sum(); |
894,139 | ActionResult<Wo> execute(EffectivePerson effectivePerson, String id, String path0, String path1) throws Exception {<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>Wo wo = new Wo();<NEW_LINE>String executorSeed = null;<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance()... | setId(work.getId()); |
250,754 | // Write out a <funcRec/> segment in XML.<NEW_LINE>public void saveXml(Writer fwrite) throws IOException {<NEW_LINE>StringBuilder buf = new StringBuilder();<NEW_LINE>buf.append(" <funcRec");<NEW_LINE>buf.append(" funcName=\"");<NEW_LINE>SpecXmlUtils.xmlEscape(buf, this.funcName);<NEW_LINE>buf.append("\"");<NEW_LINE>bu... | xmlEscape(buf, kid.funcName); |
433,537 | private I_M_HU createInstanceRecursively(@NonNull final I_M_HU_PI_Version huPIVersion, @Nullable final I_M_HU_Item parentItem) {<NEW_LINE>//<NEW_LINE>// Check if parent item was specified, make sure it was saved<NEW_LINE>if (parentItem != null && parentItem.getM_HU_Item_ID() <= 0) {<NEW_LINE>throw new AdempiereExceptio... | IAttributeStorageFactory attributesStorageFactory = huContext.getHUAttributeStorageFactory(); |
1,082,872 | public static MessageHandlerMethodFactory messageHandlerMethodFactory(@Qualifier(IntegrationContextUtils.ARGUMENT_RESOLVER_MESSAGE_CONVERTER_BEAN_NAME) CompositeMessageConverter compositeMessageConverter, @Nullable Validator validator, ConfigurableListableBeanFactory clbf) {<NEW_LINE>DefaultMessageHandlerMethodFactory ... | .add(new HeadersMethodArgumentResolver()); |
966,970 | public void forEach(BiConsumer<? super K, ? super V> processor) {<NEW_LINE>long stamp = tryOptimisticRead();<NEW_LINE>Object[] table = this.table;<NEW_LINE>boolean acquiredReadLock = false;<NEW_LINE>try {<NEW_LINE>// Validate no rehashing<NEW_LINE>if (!validate(stamp)) {<NEW_LINE>// Fallback to read lock<NEW_LINE>stamp... | processor.accept(storedKey, storedValue); |
363,027 | private ByteBuffer untransform(ByteBuffer data) throws TTransportException {<NEW_LINE>if (readTransforms.contains(Transforms.ZLIB_TRANSFORM.getValue())) {<NEW_LINE>try {<NEW_LINE>Inflater decompressor = new Inflater();<NEW_LINE>decompressor.setInput(data.array(), data.position(), data.remaining());<NEW_LINE>int length ... | .min(zlibBufferSize, length)); |
1,792,793 | public static // 14: PREFIX(parenthesized_expression)<NEW_LINE>boolean expression(PsiBuilder b, int l, int g) {<NEW_LINE>if (!recursion_guard_(b, l, "expression"))<NEW_LINE>return false;<NEW_LINE>addVariant(b, "<expression>");<NEW_LINE>boolean r, p;<NEW_LINE>Marker m = enter_section_(b, l, _NONE_, "<expression>");<NEW_... | generic_function_call_expression(b, l + 1); |
300,352 | public BlazeCommandResult exec(CommandEnvironment env, OptionsParsingResult options) {<NEW_LINE>ImmutableSortedMap<BuildConfigurationKey, BuildConfigurationValue> configurations = findConfigurations(env);<NEW_LINE>try (PrintWriter writer = new PrintWriter(new OutputStreamWriter(env.getReporter().getOutErr().getOutputSt... | , forOutput(configurations, fragmentDefs)); |
193,266 | final DescribeVolumesResult executeDescribeVolumes(DescribeVolumesRequest describeVolumesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeVolumesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(F... | invoke(request, responseHandler, executionContext); |
293,773 | private void completeContainer(String containerId, int rawExitCode, String rawExitDiagnostics, Boolean needToRelease) throws Exception {<NEW_LINE>if (needToRelease) {<NEW_LINE>tryToReleaseContainer(containerId);<NEW_LINE>if (rawExitCode == FrameworkExitCode.CONTAINER_MIGRATE_TASK_REQUESTED.toInt()) {<NEW_LINE>requestMa... | taskRoleName, taskStatus.getTaskIndex()); |
886,840 | public Delegate unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>Delegate delegate = new Delegate();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken t... | class).unmarshall(context)); |
1,200,262 | public VehicleRoutingAlgorithm createAlgorithm(VehicleRoutingProblem vrp) {<NEW_LINE>// TODO determine alpha threshold<NEW_LINE>int radialShare = (int) (vrp.getJobs().size() * 0.3);<NEW_LINE>int randomShare = (int) (vrp.getJobs().size() * 0.5);<NEW_LINE>Jsprit.Builder builder = Jsprit.Builder.newInstance(vrp);<NEW_LINE... | Jsprit.Strategy.WORST_BEST, "0.0"); |
358,236 | public static void handleXssBlockBuffer(CheckParameter parameter, String script) throws UnsupportedEncodingException {<NEW_LINE>Integer contentLength = (Integer) parameter.getParam("content_length");<NEW_LINE>Object buffer = parameter.getParam("buffer");<NEW_LINE>byte[] content = script.getBytes(parameter.getParam<MASK... | ("encoding").toString()); |
411,490 | public static double itakuraSaitoDist(double[] speechFrame1, double[] speechFrame2, int fftSize, int lpOrder) {<NEW_LINE>double[] preemphasizedFrame1 = SignalProcUtils.applyPreemphasis(speechFrame1, 0.97);<NEW_LINE>double[] preemphasizedFrame2 = SignalProcUtils.applyPreemphasis(speechFrame2, 0.97);<NEW_LINE>// Windowin... | w], 1e-20)) - 1.0; |
1,367,997 | void transpileTry(Node n, @Nullable TranspilationContext.Case breakCase) {<NEW_LINE>Node tryBlock = n.removeFirstChild();<NEW_LINE>Node catchBlock = n.removeFirstChild();<NEW_LINE>Node finallyBlock = n.removeFirstChild();<NEW_LINE>TranspilationContext.Case catchCase = catchBlock.hasChildren() ? context.createCase() : n... | context.enterCatchBlock(finallyCase, exceptionName); |
340,832 | public String show(@RequestParam(value = "name", required = true) String name, @RequestParam(value = "type", required = false) String type, @RequestParam(value = "topology", required = false) String topologyId, @RequestParam(value = "host", required = false) String host, ModelMap model) {<NEW_LINE>if (StringUtils.isNot... | name = StringEscapeUtils.escapeHtml(name); |
1,542,913 | public WebElement findElement(WebDriver driver, String locator) {<NEW_LINE>WebElement toReturn = null;<NEW_LINE>String strategy = searchAdditionalStrategies(locator);<NEW_LINE>if (strategy != null) {<NEW_LINE>String actualLocator = locator.substring(locator.indexOf('=') + 1);<NEW_LINE>// TODO(simon): Recurse into child... | ).executeScript(strategy, actualLocator); |
315,291 | private Sha256Hash readBinary(InputStream inputStream) throws IOException {<NEW_LINE>DataInputStream dis = null;<NEW_LINE>try {<NEW_LINE>MessageDigest digest = Sha256Hash.newDigest();<NEW_LINE>DigestInputStream digestInputStream = new DigestInputStream(inputStream, digest);<NEW_LINE>dis = new DataInputStream(digestInpu... | () * 1000), dataHash); |
571,389 | final UpdateContactFlowNameResult executeUpdateContactFlowName(UpdateContactFlowNameRequest updateContactFlowNameRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateContactFlowNameRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
950,603 | public void registerWithMaster() throws CancelledException, InternalException, DeadlineExceededException, InterruptedException {<NEW_LINE>// onNext() - send the request batches<NEW_LINE>// onError() - when an error occurs on the worker side, propagate the error status to<NEW_LINE>// the master side and then close on th... | error("Worker {} - Error during the register stream, aborting now.", mWorkerId, e); |
424,103 | public void deleteArtifact(DeleteProjectArtifact request, StreamObserver<DeleteProjectArtifact.Response> responseObserver) {<NEW_LINE>try {<NEW_LINE>final var futureResponse = futureProjectDAO.deleteArtifacts(request).thenCompose(unused -> futureProjectDAO.getProjectById(request.getId()), executor).thenCompose(updatedP... | ).build(), executor); |
351,507 | private void collectAndSaveConsumerGroup(Long clusterId, Set<String> consumerGroupSet) {<NEW_LINE>try {<NEW_LINE>AdminClient adminClient = KafkaClientPool.getAdminClient(clusterId);<NEW_LINE>scala.collection.immutable.Map<org.apache.kafka.common.Node, scala.collection.immutable.List<kafka.coordinator.GroupOverview>> br... | String consumerGroup = groupOverview.groupId(); |
1,367,689 | public ApiResponse<FileMetadata> uploadPutResumableWithHttpInfo(String uploadId) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// verify the required parameter 'uploadId' is set<NEW_LINE>if (uploadId == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'uploadId' whe... | localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); |
295,345 | public static void checkCommand(byte[] command, byte[] args, final byte[] envBlock) {<NEW_LINE>if (HookHandler.enableCmdHook.get()) {<NEW_LINE>LinkedList<String> commands = new LinkedList<String>();<NEW_LINE>if (command != null && command.length > 0) {<NEW_LINE>commands.add(new String(command, 0<MASK><NEW_LINE>}<NEW_LI... | , command.length - 1)); |
536,164 | public void perform(SecurityTest securityTest, Object param) {<NEW_LINE>if (dialog == null) {<NEW_LINE>XFormDialogBuilder builder = XFormFactory.createDialogBuilder("SecurityTest Options");<NEW_LINE>form = builder.createForm("Basic");<NEW_LINE>form.addCheckBox(FAIL_ON_ERROR, "Fail on error").addFormFieldListener(new XF... | !Boolean.parseBoolean(newValue)); |
1,213,025 | public RelDataType deriveType(SqlValidator validator, SqlValidatorScope scope, SqlCall call) {<NEW_LINE>final SqlNode operand = call.getOperandList().get(0);<NEW_LINE>final RelDataType nodeType = validator.deriveType(scope, operand);<NEW_LINE>assert nodeType != null;<NEW_LINE>if (!nodeType.isStruct()) {<NEW_LINE>throw ... | .RESOURCE.unknownField(fieldName)); |
1,300,508 | public static int runAnt(String[] args) {<NEW_LINE>String className = null;<NEW_LINE>Class c = null;<NEW_LINE>try {<NEW_LINE>className = "org.apache.tools.ant.Main";<NEW_LINE>c = Class.forName(className);<NEW_LINE>} catch (ClassNotFoundException e1) {<NEW_LINE>System.err.println("Error: ant.jar not found on the classpa... | System.err.println("Error: "); |
649,512 | public byte[] encrypt(final byte[] iv, final byte[] plaintext, final byte[] associatedData) throws GeneralSecurityException {<NEW_LINE>if (iv.length != IV_SIZE_IN_BYTES) {<NEW_LINE>throw new GeneralSecurityException("iv is wrong size");<NEW_LINE>}<NEW_LINE>// Check that ciphertext is not longer than the max. size of a ... | int ciphertextOutputOffset = prependIv ? IV_SIZE_IN_BYTES : 0; |
383,396 | public static Container decompress(byte[] b, int[] keys) throws IOException {<NEW_LINE>InputStream stream = new InputStream(b);<NEW_LINE>int compression = stream.readUnsignedByte();<NEW_LINE>int compressedLength = stream.readInt();<NEW_LINE>if (compressedLength < 0 || compressedLength > 1000000) {<NEW_LINE>throw new Ru... | = new byte[compressedLength + 4]; |
1,334,765 | DepictedItem fromCursor(final Cursor cursor) {<NEW_LINE>final String fileName = cursor.getString(cursor.getColumnIndex(Table.COLUMN_NAME));<NEW_LINE>final String description = cursor.getString(cursor.getColumnIndex(Table.COLUMN_DESCRIPTION));<NEW_LINE>final String imageUrl = cursor.getString(cursor.getColumnIndex(Table... | .getColumnIndex(Table.COLUMN_CATEGORIES_DESCRIPTION_LIST)); |
998,258 | private void createEdges(int origEdgeKey, int origRevEdgeKey, GHPoint3D prevSnapped, int prevWayIndex, boolean isPillar, GHPoint3D currSnapped, int wayIndex, PointList fullPL, EdgeIteratorState closestEdge, int prevNodeId, int nodeId) {<NEW_LINE>int max = wayIndex + 1;<NEW_LINE>PointList basePoints = new PointList(<MAS... | max - prevWayIndex + 1, is3D); |
1,435,668 | public void ldapMatchingRuleInChain_MemberOf() throws Exception {<NEW_LINE>// This test will only be executed when using physical LDAP server as these type of filters are not supported on ApacheDS<NEW_LINE>Assume.assumeTrue(!LDAPUtils.USE_LOCAL_LDAP_SERVER);<NEW_LINE>Log.info(c, "ldapMatchingRuleInChain_MemberOf", "Che... | getList().size()); |
181,753 | public List<Offer> readOffersByAutomaticDeliveryType() {<NEW_LINE>CriteriaBuilder builder = em.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<Offer> criteria = builder.createQuery(Offer.class);<NEW_LINE>Root<OfferImpl> root = criteria.from(OfferImpl.class);<NEW_LINE>criteria.select(root);<NEW_LINE>List<Predicate> restric... | get("automaticallyAdded"), true)); |
1,660,118 | private void handleChildren() {<NEW_LINE>getGraph().removeAllChildren();<NEW_LINE>map = new HashMap();<NEW_LINE>Iterator it = getChildren().iterator();<NEW_LINE>while (it.hasNext()) {<NEW_LINE>TestNode tn = (TestNode) it.next();<NEW_LINE>SimpleNode sn = new SimpleNode();<NEW_LINE>getGraph().addChild(sn);<NEW_LINE>sn.se... | (TestNode) it2.next(); |
620,200 | public Result processWorkPackage(@NonNull final I_C_Queue_WorkPackage workpackage, final String localTrxName) {<NEW_LINE>trxManager.assertTrxNameNull(localTrxName);<NEW_LINE>final Properties ctx = InterfaceWrapperHelper.getCtx(workpackage);<NEW_LINE>final <MASK><NEW_LINE>Check.assume(adClientId > 0, "No point in callin... | int adClientId = workpackage.getAD_Client_ID(); |
537,088 | /*<NEW_LINE>* Closes all clients. Waits for checked out clients to be checked in, then closes them too.<NEW_LINE>*/<NEW_LINE>@FFDCIgnore(value = { InterruptedException.class })<NEW_LINE>public void close() {<NEW_LINE>// remove all the clients from the deque, closing them as we go<NEW_LINE>while (numClientsClosed.get() ... | Tr.event(tc, "InterruptedException during close - will retry"); |
697,453 | public io.kubernetes.client.proto.V1.ServiceAccountList buildPartial() {<NEW_LINE>io.kubernetes.client.proto.V1.ServiceAccountList result = new io.kubernetes.client.proto.V1.ServiceAccountList(this);<NEW_LINE>int from_bitField0_ = bitField0_;<NEW_LINE>int to_bitField0_ = 0;<NEW_LINE>if (((from_bitField0_ & 0x00000001) ... | .metadata_ = metadataBuilder_.build(); |
1,566,714 | public void Adjust(Date period) {<NEW_LINE>Date end = new Date(period.getTime() + TimeHelper.ONE_HOUR);<NEW_LINE>RouterConfig routerConfig = m_routerService.queryLastReport(Constants.CAT);<NEW_LINE>StateReport report = m_stateReportService.queryHourlyReport(Constants.CAT, period, end);<NEW_LINE>String remoteServers = m... | >> gaps = buildGroupServersGaps(statistics); |
1,665,370 | private void browsePressed() {<NEW_LINE>JFileChooser chooser = FileChooserFactory.getPkcs8FileChooser();<NEW_LINE>File currentExportFile = new File(jtfExportFile.getText().trim());<NEW_LINE>if ((currentExportFile.getParentFile() != null) && (currentExportFile.getParentFile().exists())) {<NEW_LINE>chooser.setCurrentDire... | (res.getString("DExportPrivateKeyPkcs8.ChooseExportFile.Title")); |
346,181 | public void onDrawOver(@NonNull Canvas c, @NonNull RecyclerView parent, @NonNull RecyclerView.State state) {<NEW_LINE>super.<MASK><NEW_LINE>RecyclerView.Adapter adapter = parent.getAdapter();<NEW_LINE>RecyclerView.LayoutManager layoutManager = parent.getLayoutManager();<NEW_LINE>if (adapter == null || layoutManager == ... | onDrawOver(c, parent, state); |
1,071,791 | public static void allInsideLeft(CameraPinholeBrown paramLeft, DMatrixRMaj rectifyLeft, DMatrixRMaj rectifyRight, DMatrixRMaj rectifyK, ImageDimension rectifiedSize) {<NEW_LINE>// need to take in account the order in which image distort will remove rectification later on<NEW_LINE>paramLeft = new CameraPinholeBrown(para... | .width * bound.height)); |
1,369,057 | // ~ Methods ----------------------------------------------------------------<NEW_LINE>public void onMatch(RelOptRuleCall call) {<NEW_LINE>final Intersect intersect = call.rel(0);<NEW_LINE>if (intersect.all) {<NEW_LINE>// nothing we can do<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final RelOptCluster cluster = intersect.get... | .getInputs().size(); |
743,558 | public void onBookClicked(long bookId) {<NEW_LINE>if (action == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!action.equals(Intent.ACTION_CREATE_SHORTCUT)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Book book = dataRepository.getBook(bookId);<NEW_LINE>if (book == null) {<NEW_LINE>Toast.makeText(this, R.string.book_does... | Toast.LENGTH_SHORT).show(); |
1,500,520 | public void listStatusTest() throws IOException {<NEW_LINE>String testDirNonEmpty = <MASK><NEW_LINE>String testDirNonEmptyChildDir = PathUtils.concatPath(testDirNonEmpty, "testDirNonEmpty2");<NEW_LINE>String testDirNonEmptyChildFile = PathUtils.concatPath(testDirNonEmpty, "testDirNonEmptyF");<NEW_LINE>String testDirNon... | PathUtils.concatPath(mTopLevelTestDirectory, "testDirNonEmpty1"); |
1,476,988 | public void drawConnection(int[] xPoints, int[] yPoints, String connectionType, double scaleFactor) {<NEW_LINE>Paint originalPaint = g.getPaint();<NEW_LINE>Stroke originalStroke = g.getStroke();<NEW_LINE>g.setPaint(CONNECTION_COLOR);<NEW_LINE>for (int i = 1; i < xPoints.length; i++) {<NEW_LINE>int <MASK><NEW_LINE>int s... | sourceX = xPoints[i - 1]; |
621,441 | public void write(org.apache.thrift.protocol.TProtocol prot, create_app_options struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;<NEW_LINE>java.util.BitSet optionals = new java.util.BitSet();<NEW_LINE>if (struct.isS... | struct.envs.size()); |
132,309 | public RPReply _process(RPRequest request) {<NEW_LINE>String method = request.getMethod();<NEW_LINE>if (method.equals("getPluginProperties")) {<NEW_LINE>// must copy properties as actual return is subtype + non serialisable<NEW_LINE>Properties p = new Properties();<NEW_LINE>Properties x = delegate.getPluginProperties()... | delegate.getShortCuts()))); |
1,071,173 | public static byte[] injectPayload(byte[] origin, byte[] payload, boolean noXor, PrintStream out) {<NEW_LINE>byte[] chunk = noXor ? createChunk(payload, 0) : createChunk(payload);<NEW_LINE>byte[] result = new byte[origin.length + chunk.length + 4];<NEW_LINE>System.arraycopy(origin, 0, result, 0, origin.length);<NEW_LIN... | "unexpected digest write: " + signature.length + " bytes"); |
1,515,108 | public static int wavelengthToRGB(float wavelength) {<NEW_LINE>float gamma = 0.80f;<NEW_LINE>float r, g, b, factor;<NEW_LINE>int w = (int) wavelength;<NEW_LINE>if (w < 380) {<NEW_LINE>r = 0.0f;<NEW_LINE>g = 0.0f;<NEW_LINE>b = 0.0f;<NEW_LINE>} else if (w < 440) {<NEW_LINE>r = -(wavelength - <MASK><NEW_LINE>g = 0.0f;<NEW... | 440) / (440 - 380); |
499,107 | public static boolean writeMapExceptionExtensions(List<MapExceptionEntry> mapExceptionList, boolean didWriteExtensionStartElement, XMLStreamWriter xtw) throws Exception {<NEW_LINE>for (MapExceptionEntry mapException : mapExceptionList) {<NEW_LINE>if (!didWriteExtensionStartElement) {<NEW_LINE>xtw.writeStartElement(ELEM... | mapException.getErrorCode(), xtw); |
652,409 | final DeleteAccountAliasResult executeDeleteAccountAlias(DeleteAccountAliasRequest deleteAccountAliasRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteAccountAliasRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetri... | addHandlerContext(HandlerContextKey.SERVICE_ID, "IAM"); |
1,790,698 | public void apply(final double[] src, int srcPos, double[] target, int targetPos, int off, int len) {<NEW_LINE>if (len < 0 || off < 0 || off + len > window.length)<NEW_LINE>throw new IllegalArgumentException("Requested offset " + off + " or length " + len + " does not fit into window length " + window.length);<NEW_LINE... | srcPos, targetPos + len, 0); |
410,606 | public void after(Object target, Object[] args, Object result, Throwable throwable) {<NEW_LINE>if (isDebug) {<NEW_LINE>logger.afterInterceptor(target, args, result, throwable);<NEW_LINE>}<NEW_LINE>if (args == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>DatabaseInfo databaseInfo = DatabaseInfoUtils.getDatabaseInfo(targ... | logger.debug("parse DatabaseInfo:{}", databaseInfo); |
106,784 | public void service(HttpRequest request, HttpResponse response) throws Exception {<NEW_LINE>JsonParser parser = new JsonParser();<NEW_LINE>Gson gson = new GsonBuilder().create();<NEW_LINE>JsonObject parsedRequest = gson.fromJson(request.<MASK><NEW_LINE>// For more information on the structure of this object https://clo... | getReader(), JsonObject.class); |
653,105 | public void prepare(PreparedStatement statement) throws SQLException {<NEW_LINE>statement.setString(1, information.getName());<NEW_LINE>statement.setString(2, information.getTableColor().name());<NEW_LINE>setStringOrNull(statement, 3, columns[0]);<NEW_LINE>setStringOrNull(statement, 4, columns[1]);<NEW_LINE>setStringOr... | , 20, icons[2]); |
991,432 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.scan_roms_activity);<NEW_LINE>if (NativeExports.SettingsLoadBool(SettingsID.RomList_GameDirUseSelected.getValue())) {<NEW_LINE>File CurrentPath = new File(NativeExports.SettingsLoadString(S... | .GetString(LanguageStringID.ANDROID_SELECTDIR)); |
813,327 | // gadgetBytes will be null only if gadget_ == null AND empty == true<NEW_LINE>@SuppressWarnings("null")<NEW_LINE>public byte[] toByteArray() {<NEW_LINE>final int preLongs, outBytes;<NEW_LINE>final boolean empty = gadget_ == null;<NEW_LINE>final byte[] gadgetBytes = (gadget_ != null ? gadget_.toByteArray() : null);<NEW... | gadgetBytes, 0, gadgetBytes.length); |
745,230 | public Pair<Boolean, String> executeRule(double[] values, double[] baselines, String rawValue) {<NEW_LINE>MonitorRule instance = m_rules.get(rawValue);<NEW_LINE>if (instance == null) {<NEW_LINE>try {<NEW_LINE>Pair<File, File> files = generateClassFile(rawValue);<NEW_LINE>File userDefinedFolder = files.getKey();<NEW_LIN... | (MonitorRule) cls.newInstance(); |
1,150,769 | private String generateBetween(@NonNull Criteria criteria, @NonNull List<Pair<String, Object>> parameters, int counter) {<NEW_LINE>final String subject = criteria.getSubject();<NEW_LINE>final Object value1 = toCosmosDbValue(criteria.getSubjectValues<MASK><NEW_LINE>final Object value2 = toCosmosDbValue(criteria.getSubje... | ().get(0)); |
1,000,227 | public DescribeAssociationExecutionTargetsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DescribeAssociationExecutionTargetsResult describeAssociationExecutionTargetsResult = new DescribeAssociationExecutionTargetsResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE... | String currentParentElement = context.getCurrentParentElement(); |
484,634 | public static void main(String[] args) {<NEW_LINE>LOGGER.info("Program started");<NEW_LINE>// Create a list of tasks to be executed<NEW_LINE>var tasks = List.of(new PotatoPeelingTask(3), new PotatoPeelingTask(6), new CoffeeMakingTask(2), new CoffeeMakingTask(6), new PotatoPeelingTask(4), new CoffeeMakingTask(2), new Po... | ).forEach(executor::execute); |
316,750 | public static DetectSpineMRIResponse unmarshall(DetectSpineMRIResponse detectSpineMRIResponse, UnmarshallerContext _ctx) {<NEW_LINE>detectSpineMRIResponse.setRequestId(_ctx.stringValue("DetectSpineMRIResponse.RequestId"));<NEW_LINE>Data data = new Data();<NEW_LINE>List<Disc> discs = new ArrayList<Disc>();<NEW_LINE>for ... | + "].Location[" + j + "]")); |
228,811 | void addRegOrMem(Instruction instruction, int operand, int regLo, int regHi, int vsibIndexRegLo, int vsibIndexRegHi, boolean allowMemOp, boolean allowRegOp) {<NEW_LINE>int opKind = instruction.getOpKind(operand);<NEW_LINE>encoderFlags |= EncoderFlags.MOD_RM;<NEW_LINE>if (opKind == OpKind.REGISTER) {<NEW_LINE>if (!allow... | int codeSize = instruction.getCodeSize(); |
1,577,931 | public boolean undo(Set<Integer> p_changed_nets) {<NEW_LINE>this.components.undo(this.communication.observers);<NEW_LINE>Collection<UndoableObjects.Storable> cancelled_objects = new LinkedList<>();<NEW_LINE>Collection<UndoableObjects.Storable> restored_objects = new LinkedList<>();<NEW_LINE>boolean result = item_list.u... | curr_item.get_net_no(i))); |
740,617 | private /*<NEW_LINE>@Override<NEW_LINE>public void paint(Graphics g) {<NEW_LINE>super.paint(g);<NEW_LINE>Graphics2D g2d = (Graphics2D) g;<NEW_LINE>drawDecoration(g2d);<NEW_LINE>g2d.setColor(new Color(0<MASK><NEW_LINE>g2d.drawRoundRect(3, 3, getWidth() - 7, getHeight() - 7, 5, 5);<NEW_LINE>}<NEW_LINE>*/<NEW_LINE>void dr... | , 128, 128, 128)); |
515,419 | public HyperBoundingBox determineAlphaMinMax(HyperBoundingBox interval) {<NEW_LINE>final int dim = vec.getDimensionality();<NEW_LINE>if (interval.getDimensionality() != dim - 1) {<NEW_LINE>throw new IllegalArgumentException("Interval needs to have dimensionality d=" + (dim - 1) + ", read: " + interval.getDimensionality... | centroid = SpatialUtil.centroid(interval); |
463,122 | final StartSentimentDetectionJobResult executeStartSentimentDetectionJob(StartSentimentDetectionJobRequest startSentimentDetectionJobRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(startSentimentDetectionJobRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRe... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
1,521,760 | private void doTargetsForFullyQualifiedBuckTarget(VirtualFile sourceFile, Project project, String prefixToAutocomplete, CompletionResultSet result) {<NEW_LINE>BuckTargetPattern pattern = BuckTargetPattern.parse(prefixToAutocomplete).orElse(null);<NEW_LINE>if (pattern == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Buck... | + "//" + cellPath + ":" + name; |
1,451,021 | public void resize() {<NEW_LINE>if (((m_initialMovieHeight == -1 || m_initialMovieWidth == -1) && !m_isAudioOnly) || m_textureView == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Handler handler = new Handler(Looper.getMainLooper());<NEW_LINE>handler.post(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public vo... | .LayoutParams) m_textureView.getLayoutParams(); |
379,967 | public void onPresentProofClicked(View v) {<NEW_LINE>try {<NEW_LINE>int connectionHandle = ConnectionApi.connectionDeserialize(connection).get();<NEW_LINE>// Check agency for a proof request<NEW_LINE>String requests = DisclosedProofApi.proofGetRequests(connectionHandle).get();<NEW_LINE>// Create a Disclosed proof objec... | proofUpdateState(proofHandle).get(); |
1,180,055 | private static List<Map<String, Object>> mergeNamedList(List listA, List listB) {<NEW_LINE>Map<String, Map<String, Object>> mapped = new HashMap<String, Map<String, Object>>();<NEW_LINE>for (Object item : (List) listA) {<NEW_LINE>Map<String, Object> map = (Map<String, Object>) item;<NEW_LINE>String name = (String) map.... | mergedMap = mergeWallStat(mapA, mapB); |
558,094 | private void updateUdt(RestDB restDB, Keyspace keyspace, UserDefinedTypeUpdate udtUpdate, UserDefinedType udt) throws ExecutionException, InterruptedException {<NEW_LINE>List<UserDefinedTypeField> addFields = udtUpdate.getAddFields();<NEW_LINE>List<UserDefinedTypeUpdate.RenameUdtField<MASK><NEW_LINE>if ((addFields == n... | > renameFields = udtUpdate.getRenameFields(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.