idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,549,367 | private PathWrapper constructFreeHandRoutePathWrapper(LineString lineString) {<NEW_LINE>PathWrapper pathWrapper = new PathWrapper();<NEW_LINE>PointList pointList = new PointList();<NEW_LINE>PointList startPointList = new PointList();<NEW_LINE>PointList endPointList = new PointList();<NEW_LINE>PointList wayPointList = n... | (0, ""), endPointList); |
525,047 | public AppMeta extract(ApkSourceFile apkSourceFile, ApkSourceFile.Entry baseApkEntry) {<NEW_LINE>try {<NEW_LINE>boolean seenMetaFile = false;<NEW_LINE>AppMeta appMeta = new AppMeta();<NEW_LINE>for (ApkSourceFile.Entry entry : apkSourceFile.listEntries()) {<NEW_LINE>if (entry.getLocalPath().equals(META_FILE)) {<NEW_LINE... | w(TAG, "Error while extracting meta", e); |
399,733 | public void writeMetadata(String objectName, ObjectMetadata objMetaData) throws Exception {<NEW_LINE>MutationBatch m = keyspace.prepareMutationBatch().withRetryPolicy(retryPolicy);<NEW_LINE>ColumnListMutation<String> row = m.withRow(cf, objectName);<NEW_LINE>if (objMetaData.getChunkSize() != null)<NEW_LINE>row.putColum... | ), objMetaData.getTtl()); |
1,421,191 | public int trainModel(String modelPath, int epochs) {<NEW_LINE>if (modelPath == null) {<NEW_LINE>logger.severe(Common.addTag("model path cannot be empty"));<NEW_LINE>return -1;<NEW_LINE>}<NEW_LINE>if (epochs <= 0) {<NEW_LINE>logger.severe<MASK><NEW_LINE>return -1;<NEW_LINE>}<NEW_LINE>int status = padSamples();<NEW_LINE... | (Common.addTag("epochs cannot smaller than 0")); |
926,083 | public static SavedModelBundle loadSavedModelBundle(String exportDir, String[] tags, ConfigProto config, RunOptions runOptions) {<NEW_LINE>try (PointerScope ignored = new PointerScope()) {<NEW_LINE>TF_Status status = TF_Status.newStatus();<NEW_LINE>// allocate parameters for TF_LoadSessionFromSavedModel<NEW_LINE>TF_Ses... | .newGraph().retainReference(); |
1,015,437 | public void processElement(ProcessContext c) {<NEW_LINE>if (Objects.equals(c.element().getKey(), EMPTY_EXPORT_FILE)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Iterable<String> files = c.element().getValue();<NEW_LINE>Iterator<String> it = files.iterator();<NEW_LINE>boolean gcs = it.hasNext() && GcsPath.GCS_URI.matcher(it.... | ).print(proto))); |
1,518,531 | private void processRefLink(Link subRef, String externalFile) {<NEW_LINE>RefFormat format = computeRefFormat(subRef.get$ref());<NEW_LINE>if (!isAnExternalRefFormat(format)) {<NEW_LINE>subRef.set$ref(RefType.SCHEMAS.getInternalPrefix() + processRefToExternalSchema(externalFile + subRef.get$ref(), RefFormat.RELATIVE));<N... | String $ref = subRef.get$ref(); |
1,604,770 | public ClientInstanceTracked[] track(byte[] hash, ClientInstanceTracked.TrackTarget target) {<NEW_LINE>if (mc_group == null || getOtherInstances().length == 0) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>Map body = new HashMap();<NEW_LINE>body.put("hash", hash);<NEW_LINE>body.put("seed", new Long(target.isSeed() ? 1 : 0));<N... | return (new ClientInstanceTracked[0]); |
1,561,684 | private Mono<Response<Void>> disableAllForHostingEnvironmentWithResponseAsync(String resourceGroupName, String environmentName, String hostingEnvironmentName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint()... | error(new IllegalArgumentException("Parameter hostingEnvironmentName is required and cannot be null.")); |
60,129 | public static String removeQueryComments(String query) {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>final int length = query.length();<NEW_LINE>int commentCharacterCount = 0;<NEW_LINE>boolean inComment = false;<NEW_LINE>boolean inSingleQuotes = false;<NEW_LINE>boolean inDoubleQuotes = false;<NEW_LINE>for... | sb.length() - 1); |
512,255 | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException {<NEW_LINE>startedEvent(endpoint.getEndpointAddressPath());<NEW_LINE>if ("Tester".equalsIgnoreCase(request.getQueryString()) && !(HTTPBinding.HTTP_BINDING.equals(endpoint.getProtocolBinding()))) {<NEW_LINE>Endpoint e... | = (ServletAdapter) getEndpointFor(request); |
483,420 | public void onEntityDamage(EntityDamageEvent event) {<NEW_LINE><MASK><NEW_LINE>if (victim instanceof Player) {<NEW_LINE>Player player = (Player) victim;<NEW_LINE>LocalPlayer localPlayer = WorldGuardPlugin.inst().wrapPlayer(player);<NEW_LINE>if (isInvincible(localPlayer)) {<NEW_LINE>player.setFireTicks(0);<NEW_LINE>even... | Entity victim = event.getEntity(); |
600,505 | public synchronized void submitRunTaskCommand(long jobId, long taskId, JobConfig jobConfig, Object taskArgs, long workerId) {<NEW_LINE>RunTaskCommand.Builder runTaskCommand = RunTaskCommand.newBuilder();<NEW_LINE>runTaskCommand.setJobId(jobId);<NEW_LINE>runTaskCommand.setTaskId(taskId);<NEW_LINE>try {<NEW_LINE>runTaskC... | Builder command = JobCommand.newBuilder(); |
681,122 | public ILUTUProducerAllocationDestination createLUTUProducerAllocationDestination(@NonNull final I_M_HU_LUTU_Configuration lutuConfiguration) {<NEW_LINE>final IHandlingUnitsBL handlingUnitsBL = Services.get(IHandlingUnitsBL.class);<NEW_LINE>final LUTUProducerDestination luProducerDestination = new LUTUProducerDestinati... | ofRepoId(lutuConfiguration.getM_Product_ID()); |
480,250 | public void plantOneOff(JobRequest request) {<NEW_LINE>long <MASK><NEW_LINE>long endMs = Common.getEndMs(request, true);<NEW_LINE>JobInfo jobInfo = createBuilderOneOff(createBaseBuilder(request, true), startMs, endMs).build();<NEW_LINE>int scheduleResult = schedule(jobInfo);<NEW_LINE>if (scheduleResult == ERROR_BOOT_PE... | startMs = Common.getStartMs(request); |
118,968 | public void run() {<NEW_LINE>Element data = helper.getPrimaryConfigurationData(true);<NEW_LINE>// XXX replace by XMLUtil when that has findElement, findText, etc.<NEW_LINE>// NOI18N<NEW_LINE>NodeList nl = data.<MASK><NEW_LINE>Element nameEl;<NEW_LINE>if (nl.getLength() == 1) {<NEW_LINE>nameEl = (Element) nl.item(0);<NE... | getElementsByTagNameNS(EjbJarProjectType.PROJECT_CONFIGURATION_NAMESPACE, "name"); |
122,540 | private int copySetRecord(HollowSetSchema engineSchema, int currentRecordPointer, int currentRecordOrdinal) {<NEW_LINE>HollowSetWriteRecord rec = engineSchema != null ? (HollowSetWriteRecord) getWriteRecord(engineSchema) : null;<NEW_LINE>int numElements = VarInt.readVInt(record.data, currentRecordPointer);<NEW_LINE>cur... | ordinalMapping.put(currentRecordOrdinal, stateEngineOrdinal); |
169,710 | default <// This context is not duplicated, so we need to do it.<NEW_LINE>R> // This context is not duplicated, so we need to do it.<NEW_LINE>SpanOperation // This context is not duplicated, so we need to do it.<NEW_LINE>sendRequest(final Context context, final SpanKind kind, final TracingPolicy policy, final R request... | INSTANCE.attach(duplicatedContext, spanContext); |
79,602 | public void createMenuItems(Bundle savedInstanceState) {<NEW_LINE>Context ctx = getContext();<NEW_LINE>Bundle args = getArguments();<NEW_LINE>if (ctx == null || args == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String contentsJson = args.getString(CONTENTS_JSON_KEY);<NEW_LINE>if (contentsJson == null) {<NEW_LINE>ret... | LinearLayout container = new LinearLayout(ctx); |
534,273 | public void drawU(UGraphic ug) {<NEW_LINE>final double thickness = ug.getParam().getStroke().getThickness();<NEW_LINE>final double radius = 4 + thickness - 1;<NEW_LINE>final double lineHeight = 4 + thickness - 1;<NEW_LINE>final int xWing = 4;<NEW_LINE>final AffineTransform rotate = AffineTransform.getRotateInstance(thi... | Double(-xWing, -lineHeight); |
1,005,214 | public void run(RegressionEnvironment env) {<NEW_LINE>String epl;<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>env.compileDeploy("@public create window ZoneWindow#keepall as Zone", path);<NEW_LINE>env.compileDeploy("insert into ZoneWindow select * from Zone", path);<NEW_LINE>epl = "@name('s0') select Z... | 0, 20, 20))); |
159,120 | private void decodeMask1(ByteBuf buf, int mask, Position position) {<NEW_LINE>if (BitUtil.check(mask, 0)) {<NEW_LINE>position.setValid(true);<NEW_LINE>position.setLongitude(buf.readFloatLE());<NEW_LINE>position.setLatitude(buf.readFloatLE());<NEW_LINE>position.setSpeed(UnitsConverter.knotsFromKph(buf.readUnsignedByte()... | int mnc = buf.readUnsignedByte(); |
1,195,343 | public static void main(String[] args) {<NEW_LINE>if (args.length != 6) {<NEW_LINE>System.out.println(args.length);<NEW_LINE>printUsage();<NEW_LINE>exit(1);<NEW_LINE>}<NEW_LINE>String BUCKET_NAME = args[0];<NEW_LINE>String API_KEY = args[1];<NEW_LINE>String SERVICE_INSTANCE_ID = args[2];<NEW_LINE>String bucketFile = ar... | "Uploading new pmap file to storage: " + bucketFile + " from local: " + oldPmapFile); |
907,693 | public static void horizontal5(Kernel1D_S32 kernel, GrayS16 input, GrayI16 output, int skip) {<NEW_LINE>final short[] dataSrc = input.data;<NEW_LINE>final short[] dataDst = output.data;<NEW_LINE>final int k1 = kernel.data[0];<NEW_LINE>final int <MASK><NEW_LINE>final int k3 = kernel.data[2];<NEW_LINE>final int k4 = kern... | k2 = kernel.data[1]; |
254,138 | private BType createMatchingRecordType(BLangErrorFieldMatchPatterns errorFieldMatchPatterns) {<NEW_LINE>BRecordType detailRecordType = createAnonRecordType(errorFieldMatchPatterns.pos);<NEW_LINE>List<BLangSimpleVariable> typeDefFields = new ArrayList<>();<NEW_LINE>for (BLangNamedArgMatchPattern bindingPattern : errorFi... | names.fromIdNode(bindingPattern.argName); |
1,704,776 | public final BlockContext block() throws RecognitionException {<NEW_LINE>BlockContext _localctx = new BlockContext(_ctx, getState());<NEW_LINE>enterRule(_localctx, 158, RULE_block);<NEW_LINE>try {<NEW_LINE>enterOuterAlt(_localctx, 1);<NEW_LINE>{<NEW_LINE>setState(992);<NEW_LINE>match(LBRACE);<NEW_LINE>setState(994);<NE... | _errHandler.reportError(this, re); |
634,511 | public void renameFile(Event actionEvent) {<NEW_LINE>RenameDialog dialog = RenameDialog.create();<NEW_LINE>Path path = fileSystemView.getSelectionModel().getSelectedItem().getValue().getPath();<NEW_LINE>TextField editor = dialog.getEditor();<NEW_LINE>editor.setText(path.getFileName().toString());<NEW_LINE>Consumer<Stri... | getText().lastIndexOf("."); |
663,558 | public static int mainInt(String... args) throws Exception {<NEW_LINE>Args processed = new Args();<NEW_LINE>JCommander jCommander = new JCommander(processed);<NEW_LINE>jCommander.setCaseSensitiveOptions(false);<NEW_LINE>try {<NEW_LINE>jCommander.parse(args);<NEW_LINE>} catch (ParameterException ex) {<NEW_LINE>System.er... | .htmlSuite.get(3)); |
759,910 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(getContentView());<NEW_LINE>// if a parameter was passed to open an account within a specific book, then switch<NEW_LINE>String bookUID = getIntent().getStringExtra(UxArgument.BOOK_UID);<NEW_LINE>if... | WHITE, PorterDuff.Mode.SRC_IN); |
1,755,550 | private ObjectNode updateIntegrationResponse(OperationShape shape, Map<CorsHeader, String> corsHeaders, Set<String> deduced, ObjectNode response) {<NEW_LINE>Map<CorsHeader, String> responseHeaders = new HashMap<>(corsHeaders);<NEW_LINE>ObjectNode responseParams = response.getObjectMember(RESPONSE_PARAMETERS_KEY).orElse... | put(CorsHeader.EXPOSE_HEADERS, headersToExposeString); |
655,221 | public void run() {<NEW_LINE>final <MASK><NEW_LINE>String text = "";<NEW_LINE>try {<NEW_LINE>text = doc.getText(0, doc.getLength());<NEW_LINE>} catch (BadLocationException ex) {<NEW_LINE>Support.LOG.log(Level.SEVERE, null, ex);<NEW_LINE>}<NEW_LINE>final String comment = text;<NEW_LINE>Runnable r = new Runnable() {<NEW_... | StyledDocument doc = textPane.getStyledDocument(); |
73,567 | private void writeCompound(WrittenType type, NBTTagCompound compound, DataOutput to) throws IOException {<NEW_LINE>profiler.startSection("compound");<NEW_LINE>WrittenType stringType = WrittenType.getForSize(map.strings.size());<NEW_LINE>if (debug)<NEW_LINE>log("\n Compound tag count = " + compound.getSize());<NEW_LINE... | + safeToString(nbt) + ")"); |
1,287,741 | protected Broadcaster removeAtmosphereResource(AtmosphereResource r, boolean executeDone) {<NEW_LINE>if (destroyed.get()) {<NEW_LINE>logger.debug(DESTROYED, getID(), "removeAtmosphereResource(AtmosphereResource r)");<NEW_LINE>return this;<NEW_LINE>}<NEW_LINE>boolean <MASK><NEW_LINE>if (removed) {<NEW_LINE>if (r.isSuspe... | removed = resources.remove(r); |
897,635 | public void run() {<NEW_LINE>double CAMERA_PADDING = DEFAULT_CAMERA_PADDING;<NEW_LINE>try {<NEW_LINE>if (mParams.has("camera")) {<NEW_LINE>JSONObject camera = mParams.getJSONObject("camera");<NEW_LINE>if (camera.has("padding")) {<NEW_LINE>CAMERA_PADDING = camera.getDouble("padding");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} ca... | (builder.build())); |
1,506,648 | private Dimension layoutSize(@Nonnull Function<Component, Dimension> size) {<NEW_LINE>Dimension titleSize = myTitleComponent == null ? new Dimension() : size.fun(myTitleComponent);<NEW_LINE>Dimension centeredSize = myCenteredComponent == null ? new Dimension() : size.fun(myCenteredComponent);<NEW_LINE>Dimension actionS... | .width + myLayoutData.configuration.closeOffset; |
245,731 | public EbsBlockDevice unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>EbsBlockDevice ebsBlockDevice = new EbsBlockDevice();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth +... | ().unmarshall(context)); |
1,354,370 | protected Object readElement(org.w3c.dom.Element element) throws java.io.IOException, ClassNotFoundException {<NEW_LINE>NodeList targetModuleElements = element.getElementsByTagName(E_TARGET_MODULE);<NEW_LINE>TargetModule[] targetModules = new TargetModule[targetModuleElements.getLength()];<NEW_LINE>for (int i = 0; i < ... | return new TargetModule.List(targetModules); |
415,626 | static QuadTreeImpl buildQuadTree(MultiPathImpl multipathImpl) {<NEW_LINE>Envelope2D extent = new Envelope2D();<NEW_LINE>multipathImpl.queryLooseEnvelope2D(extent);<NEW_LINE>QuadTreeImpl quad_tree_impl = new QuadTreeImpl(extent, 8);<NEW_LINE>int hint_index = -1;<NEW_LINE>SegmentIteratorImpl seg_iter = multipathImpl.que... | insert(index, boundingbox, hint_index); |
1,778,408 | public void handleBinding() {<NEW_LINE>WSSecTimestamp timestamp = createTimestamp();<NEW_LINE>handleLayout(timestamp);<NEW_LINE>assertPolicy(sbinding.getName());<NEW_LINE>if (sbinding.getProtectionOrder() == AbstractSymmetricAsymmetricBinding.ProtectionOrder.EncryptBeforeSigning) {<NEW_LINE>doEncryptBeforeSign();<NEW_L... | (), SPConstants.ENCRYPT_BEFORE_SIGNING)); |
908,713 | final ListOrganizationPortfolioAccessResult executeListOrganizationPortfolioAccess(ListOrganizationPortfolioAccessRequest listOrganizationPortfolioAccessRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listOrganizationPortfolioAccessRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = ... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
1,293,665 | private synchronized boolean updateCandidates() {<NEW_LINE>boolean affected = false;<NEW_LINE>final JavaPlatform[] newPlatforms = jpm.getInstalledPlatforms();<NEW_LINE>final Map<JavaPlatform, PropertyChangeListener> oldPlatforms = new HashMap<>(platforms);<NEW_LINE>final Map<JavaPlatform, PropertyChangeListener> newSta... | LinkedHashMap<>(newPlatforms.length); |
1,457,579 | public static byte[] rocketMQProtocolEncode(RemotingCommand cmd) {<NEW_LINE>// String remark<NEW_LINE>byte[] remarkBytes = null;<NEW_LINE>int remarkLen = 0;<NEW_LINE>if (cmd.getRemark() != null && cmd.getRemark().length() > 0) {<NEW_LINE>remarkBytes = cmd.getRemark().getBytes(CHARSET_UTF8);<NEW_LINE>remarkLen = remarkB... | headerBuffer.putInt(remarkBytes.length); |
842,034 | public Movie toMovie() throws IOException {<NEW_LINE>ArrayList<Actor> actors = new ArrayList<>();<NEW_LINE>if (actor != null) {<NEW_LINE>actors = new ArrayList<>(actor.size());<NEW_LINE>for (KodiXmlActorBean currentActor : actor) {<NEW_LINE>actors.add(currentActor.toActor());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Thumb[] post... | director[i], null)); |
1,590,268 | protected final AbortException abortInvalidArgument(String argument, String message, int exitCode) {<NEW_LINE>Set<String> allArguments = collectAllArguments();<NEW_LINE>int equalIndex;<NEW_LINE>String testString = argument;<NEW_LINE>if ((equalIndex = argument.indexOf('=')) != -1) {<NEW_LINE>testString = argument.substr... | (" ").append(match); |
1,403,945 | protected void wrapPage(StringBuilder select, Query query, boolean scan) {<NEW_LINE>String page = query.page();<NEW_LINE>// It's the first time if page is empty<NEW_LINE>if (!page.isEmpty()) {<NEW_LINE>byte[] position = PageState.fromString(page).position();<NEW_LINE>Map<HugeKeys, Object> columns = PagePosition.fromByt... | (columns.get(key)); |
334,302 | public static DescribeClustersResponse unmarshall(DescribeClustersResponse describeClustersResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeClustersResponse.setRequestId(_ctx.stringValue("DescribeClustersResponse.RequestId"));<NEW_LINE>describeClustersResponse.setTotalCount(_ctx.longValue("DescribeClustersRespons... | (_ctx.integerValue("DescribeClustersResponse.PageSize")); |
815,296 | public DiscordantPairEvidence decode(final Reader<DiscordantPairEvidence> reader) throws IOException {<NEW_LINE>if (!versionChecked) {<NEW_LINE>if (!DiscordantPairEvidence.BCI_VERSION.equals(reader.getVersion())) {<NEW_LINE>throw new UserException("baf.bci file has wrong version: expected " + DiscordantPairEvidence.BCI... | boolean endStrand = dis.readBoolean(); |
391,411 | public Object resolveArgument(MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest webRequest, WebDataBinderFactory binderFactory) {<NEW_LINE>Authentication authentication = SecurityContextHolder.getContext().getAuthentication();<NEW_LINE>if (authentication == null) {<NEW_LINE>return null;<NE... | " is not assignable to " + parameter.getParameterType()); |
501,021 | public FlipperObject toFlipperObject(@Nullable ImagePerfData imagePerfData) {<NEW_LINE>if (imagePerfData == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>FlipperObject.Builder <MASK><NEW_LINE>objectJson.put("requestId", imagePerfData.getRequestId());<NEW_LINE>objectJson.put("controllerSubmitTimeMs", imagePerfData.g... | objectJson = new FlipperObject.Builder(); |
731,420 | public static <J2 extends J> J2 indent(J j, Cursor cursor, int shift) {<NEW_LINE>JavaSourceFile cu = cursor.firstEnclosingOrThrow(JavaSourceFile.class);<NEW_LINE>TabsAndIndentsStyle tabsAndIndents = Optional.ofNullable(((SourceFile) cu).getStyle(TabsAndIndentsStyle.class)).orElse(IntelliJ.tabsAndIndents());<NEW_LINE>//... | .visit(j, 0)); |
880,862 | public static void main(String[] args) {<NEW_LINE>Scanner sc = new Scanner(System.in);<NEW_LINE>System.out.print("Enter size of Stack: ");<NEW_LINE>int n = sc.nextInt();<NEW_LINE>stack st = new stack(n);<NEW_LINE>boolean flag = true;<NEW_LINE>int val;<NEW_LINE>int pos = 0;<NEW_LINE>while (flag) {<NEW_LINE>System.out.pr... | System.out.println("2. Pop item out from Stack"); |
735,942 | public long handle(Emulator<?> emulator) {<NEW_LINE>RegisterContext context = emulator.getContext();<NEW_LINE>UnidbgPointer object = context.getPointerArg(1);<NEW_LINE>UnidbgPointer clazz = context.getPointerArg(2);<NEW_LINE>UnidbgPointer jmethodID = context.getPointerArg(3);<NEW_LINE>UnidbgPointer va_list = context.ge... | getMethod(jmethodID.toIntPeer()); |
1,852,523 | final ListDetectorsResult executeListDetectors(ListDetectorsRequest listDetectorsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listDetectorsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | (super.beforeMarshalling(listDetectorsRequest)); |
582,996 | public UpdateRecipeResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>UpdateRecipeResult updateRecipeResult = new UpdateRecipeResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth =... | JsonToken token = context.getCurrentToken(); |
1,587,378 | final DeletePolicyResult executeDeletePolicy(DeletePolicyRequest deletePolicyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deletePolicyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
1,368,532 | public ApiResponse<Void> deletePetWithHttpInfo(Long petId, String apiKey) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// verify the required parameter 'petId' is set<NEW_LINE>if (petId == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'petId' when calling delete... | = new ArrayList<Pair>(); |
987,829 | private Future<Void> begin(OracleConnection conn, ContextInternal context) {<NEW_LINE>return executeBlocking(context, () -> {<NEW_LINE><MASK><NEW_LINE>String isolationLevel;<NEW_LINE>switch(isolation) {<NEW_LINE>case TRANSACTION_READ_COMMITTED:<NEW_LINE>isolationLevel = "READ COMMITTED";<NEW_LINE>break;<NEW_LINE>case T... | int isolation = conn.getTransactionIsolation(); |
490,595 | private void mergeKeycloakClients(ConfigurationChanges diffs, Device prevDev, Device dev, String deviceDN) throws NamingException {<NEW_LINE>Collection<String<MASK><NEW_LINE>for (String clientID : prevDev.getKeycloakClientIDs()) {<NEW_LINE>if (!clientIDs.contains(clientID)) {<NEW_LINE>String keycloakClientDN = keycloak... | > clientIDs = dev.getKeycloakClientIDs(); |
768,578 | public void asyncReadEntry(ReadHandle lh, long firstEntry, long lastEntry, boolean isSlowestReader, final ReadEntriesCallback callback, Object ctx) {<NEW_LINE>lh.readAsync(firstEntry, lastEntry).thenAcceptAsync(ledgerEntries -> {<NEW_LINE>List<Entry> entries = Lists.newArrayList();<NEW_LINE>long totalSize = 0;<NEW_LINE... | entries.size(), totalSize); |
999,018 | private TranslationResults buildResults() {<NEW_LINE>TranslationResults results = new TranslationResults();<NEW_LINE>if (hasTotalClassLevelOrdering) {<NEW_LINE>for (String next : totalClassLevelOrdering) {<NEW_LINE>EjbInterceptor interceptor = ejbBundle.getInterceptorByClassName(next);<NEW_LINE>results.allInterceptorCl... | MethodDescriptor nextMethod = entry.getKey(); |
714,431 | final RecognizeUtteranceResult executeRecognizeUtterance(RecognizeUtteranceRequest recognizeUtteranceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(recognizeUtteranceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetri... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
877,355 | public Predicate generate(AndPredicate originalAndPredicate) {<NEW_LINE>assert rangesByPredicateIndex != null;<NEW_LINE>if (reduction == 0) {<NEW_LINE>return originalAndPredicate;<NEW_LINE>}<NEW_LINE>Predicate[] originalPredicates = originalAndPredicate.predicates;<NEW_LINE>int predicateCount = originalPredicates.lengt... | generated++] = originalPredicates[i]; |
956,021 | private PointSensitivityBuilder rateForwardSensitivity(OvernightAveragedRateComputation computation, OvernightIndexRates rates) {<NEW_LINE>OvernightIndex index = computation.getIndex();<NEW_LINE>HolidayCalendar calendar = computation.getFixingCalendar();<NEW_LINE>LocalDate startFixingDate = computation.getStartDate();<... | currentFixingDate = calendar.previous(currentFixingDate); |
1,814,919 | public void rollback() {<NEW_LINE>checkDistressed();<NEW_LINE>if (o3InError || inTransaction()) {<NEW_LINE>try {<NEW_LINE>LOG.info().$("tx rollback [name=").$(tableName).$(']').$();<NEW_LINE>if ((masterRef & 1) != 0) {<NEW_LINE>masterRef++;<NEW_LINE>}<NEW_LINE>freeColumns(false);<NEW_LINE>this.txWriter.unsafeLoadAll();... | .tableWriter().incrementRollbacks(); |
1,466,024 | public static boolean isPointInsidePolygon(LatLon point, List<LatLon> polygon) {<NEW_LINE>double px = point.getLongitude();<NEW_LINE>double py = point.getLatitude();<NEW_LINE>boolean oddNodes = false;<NEW_LINE>for (int i = 0, j = polygon.size() - 1; i < polygon.size(); j = i++) {<NEW_LINE>double x1 = polygon.get(i).get... | get(i).getLatitude(); |
1,607,258 | public void onIsManual(final I_C_Invoice_Candidate ic) {<NEW_LINE>final IInvoiceCandidateHandlerDAO handlerDAO = Services.get(IInvoiceCandidateHandlerDAO.class);<NEW_LINE>final Properties ctx = InterfaceWrapperHelper.getCtx(ic);<NEW_LINE>if (ic.isManual()) {<NEW_LINE>final IInvoiceCandBL invoiceCandBL = Services.get(II... | LocalDate today = invoiceCandBL.getToday(); |
1,395,126 | public void createSchema(PhysicalPlan plan) throws MetadataException, CheckConsistencyException {<NEW_LINE>List<PartialPath> storageGroups = new ArrayList<>();<NEW_LINE>// for InsertPlan, try to just use deviceIds to get related storage groups because there's no<NEW_LINE>// need to call getPaths to concat deviceId and ... | ).getPrefixPath()))); |
268,016 | private void checkAmbiguousOptionalArguments(CoreMethod coreMethod, ExecutableElement specializationMethod, Specialization specializationAnnotation) {<NEW_LINE>List<? extends VariableElement> parameters = specializationMethod.getParameters();<NEW_LINE>int n = getLastParameterIndex(parameters);<NEW_LINE>if (coreMethod.a... | , parameters.get(n)); |
529,192 | public void initialize() throws InitializationException {<NEW_LINE>try {<NEW_LINE>Config config = m_configDao.findByName(CONFIG_NAME, ConfigEntity.READSET_FULL);<NEW_LINE>String content = config.getContent();<NEW_LINE>m_configId = config.getId();<NEW_LINE>m_modifyTime = config.getModifyDate().getTime();<NEW_LINE><MASK>... | m_config = DefaultSaxParser.parse(content); |
182,353 | private void storeResult(final String key, final int ttl, final QueryResult queryResult) {<NEW_LINE>if (ttl <= 0) {<NEW_LINE>log.warn("{}: not storing due to low ttl ({}s)", key, ttl);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final CachedResult cachedResult = new CachedResult(queryResult.getRange(), queryResult.getGroups()... | key, bytes.length, ttl); |
874,374 | protected void handle(final DownloadImageMsg msg) {<NEW_LINE>final DownloadImageReply reply = new DownloadImageReply();<NEW_LINE>final ImageInventory iinv = msg.getImageInventory();<NEW_LINE>final String installPath = PathUtil.join(getSelf().getUrl(), BackupStoragePathMaker.makeImageInstallPath(iinv));<NEW_LINE>String ... | bus.reply(msg, reply); |
1,539,679 | public AnalystField defineClass(String fieldName, FieldDirection d, NormalizationAction action, List<ClassItem> classes) {<NEW_LINE>AnalystField field = new AnalystField();<NEW_LINE>if (action != NormalizationAction.Equilateral && action != NormalizationAction.OneOf) {<NEW_LINE>throw new AnalystError("defineClass can o... | getNormalizedFields().add(field); |
1,259,694 | protected void computePsiDataPsiGradient(GrayF32 image1, GrayF32 image2, GrayF32 deriv1x, GrayF32 deriv1y, GrayF32 deriv2x, GrayF32 deriv2y, GrayF32 deriv2xx, GrayF32 deriv2yy, GrayF32 deriv2xy, GrayF32 du, GrayF32 dv, GrayF32 psiData, GrayF32 psiGradient) {<NEW_LINE>int N = image1.width * image1.height;<NEW_LINE>for (... | taylor2 - image1.data[i]; |
1,187,609 | public Object retryAroundAdvice(ProceedingJoinPoint proceedingJoinPoint, @Nullable Retry retryAnnotation) throws Throwable {<NEW_LINE>Method method = ((MethodSignature) proceedingJoinPoint.getSignature()).getMethod();<NEW_LINE>String methodName = method.getDeclaringClass().getName() + "#" + method.getName();<NEW_LINE>i... | ), retryAnnotation.name()); |
612,350 | private static Vector apply(CompLongDoubleVector v1, LongDummyVector v2, Binary op) {<NEW_LINE>LongDoubleVector[] parts = v1.getPartitions();<NEW_LINE>Storage[] resParts = StorageSwitch.<MASK><NEW_LINE>if (!op.isKeepStorage()) {<NEW_LINE>for (int i = 0; i < parts.length; i++) {<NEW_LINE>if (parts[i].getStorage() instan... | applyComp(v1, v2, op); |
909,042 | public // 03917<NEW_LINE>MQuery createReportingQuery() {<NEW_LINE>final Properties ctx = getCtx();<NEW_LINE>final MQuery query;<NEW_LINE>//<NEW_LINE>// If we are reporting on a header tab (not detail) we shall use exactly the same items as the user is seeing in Tab (03917)<NEW_LINE>if (Check.isEmpty(getLinkColumnName()... | log.warn("Cannot parse whereExtended: ", whereExtended); |
1,416,066 | public List<Map<String, Object>> invoke() {<NEW_LINE>NodeList nodes = null;<NEW_LINE>File d = new File(webGoatHomeDirectory, "ClientSideFiltering/employees.xml");<NEW_LINE>XPathFactory factory = XPathFactory.newInstance();<NEW_LINE>XPath path = factory.newXPath();<NEW_LINE>try (InputStream is = new FileInputStream(d)) ... | InputSource inputSource = new InputSource(is); |
318,412 | public <G extends Category> CreateResponse<G> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException {<NEW_LINE>CreateResponse<G> createResponse = context.createOrRetrieveCopyInstance(this);<NEW_LINE>if (createResponse.isAlreadyPopulated()) {<NEW_LINE>return createResponse;<NEW_L... | getAllParentCategoryXrefs().add(clonedEntry); |
703,643 | public DashConfigurationForPut unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DashConfigurationForPut dashConfigurationForPut = new DashConfigurationForPut();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LI... | JsonToken token = context.getCurrentToken(); |
558,137 | private void parseRootElement(final Path resultsDirectory, final Path parsedFile, final RandomUidContext context, final ResultsVisitor visitor) {<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();<NEW_LINE>final DocumentBuilder builder = factory.newDocum... | LOGGER.debug("Parsing file {}", parsedFile); |
647,088 | final UpdateLinkResult executeUpdateLink(UpdateLinkRequest updateLinkRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateLinkRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
1,364,060 | public static void main(String[] args) {<NEW_LINE>Set<String> words = new HashSet<>();<NEW_LINE>words.add("sb");<NEW_LINE>words.add("xx");<NEW_LINE>SensitiveFilter sensitiveFilter = new SensitiveFilter(words);<NEW_LINE>String text1 = "u sb a";<NEW_LINE>Set<String> ss = sensitiveFilter.getSensitiveWords(text1, MatchType... | getSensitiveWords(text1, MatchType.MIN_MATCH); |
331,741 | public void queueEvent(FacesEvent event) {<NEW_LINE>FacesContext context = getFacesContext();<NEW_LINE>if (ComponentUtils.isRequestSource(this, context) && event instanceof AjaxBehaviorEvent) {<NEW_LINE>setRowIndex(-1);<NEW_LINE>Map<String, String> params = context.getExternalContext().getRequestParameterMap();<NEW_LIN... | get(Constants.RequestParams.PARTIAL_BEHAVIOR_EVENT_PARAM); |
505,090 | public void marshall(DocumentClassifierProperties documentClassifierProperties, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (documentClassifierProperties == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(... | documentClassifierProperties.getEndTime(), ENDTIME_BINDING); |
1,119,594 | protected Page newPage(final HttpServletRequest req, final HttpServletResponse resp, final Session session, final String template) {<NEW_LINE>final Page page = new Page(req, resp, getApplication().getVelocityEngine(), template);<NEW_LINE>page.add("version", jarVersion);<NEW_LINE>page.add("azkaban_name", this.name);<NEW... | add("note_type", NoteServlet.type); |
630,124 | public void execute(final EditorAdaptor editorAdaptor, final int count) throws CommandExecutionException {<NEW_LINE>final IWorkbenchPartSite site = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActivePart().getSite();<NEW_LINE>final EPartService psvc = (EPartService) site.getService(EPartServi... | ((MPart) newTab, true); |
759,339 | void buildEventPayload(AnalyticsEvent internalEvent, Event event) {<NEW_LINE>final Session session = new Session();<NEW_LINE>session.withId(internalEvent.getSession().getSessionId());<NEW_LINE>session.withStartTimestamp(DateUtils.formatISO8601Date(new Date(internalEvent.getSession().getSessionStart())));<NEW_LINE>if (i... | ).getSessionStop()))); |
266,637 | public static List<String> dumpListens(final Repo repo, Path path) throws InterruptedException {<NEW_LINE>final List<PersistentConnection> conns = <MASK><NEW_LINE>final Semaphore semaphore = new Semaphore(0);<NEW_LINE>// we need to run this through our work queue to make the ordering work out.<NEW_LINE>repo.scheduleNow... | new ArrayList<PersistentConnection>(1); |
1,024,912 | public void syrk(char Order, char Uplo, char Trans, double alpha, INDArray A, double beta, INDArray C) {<NEW_LINE>if (Nd4j.getExecutioner().getProfilingMode() == OpExecutioner.ProfilingMode.ALL)<NEW_LINE>OpProfiler.getInstance().<MASK><NEW_LINE>if (C.rows() > Integer.MAX_VALUE || A.size(0) > Integer.MAX_VALUE || C.size... | processBlasCall(false, A, C); |
954,964 | // subscribe one more given topic<NEW_LINE>public CompletableFuture<Void> subscribeAsync(String topicName, boolean createTopicIfDoesNotExist) {<NEW_LINE>TopicName topicNameInstance = getTopicName(topicName);<NEW_LINE>if (topicNameInstance == null) {<NEW_LINE>return FutureUtil.failedFuture(new PulsarClientException.Alre... | fullTopicName, ex1.getMessage()); |
419,356 | public static Type findActualType(Type unresolved, DequeMap<TypeVariable<?>, Type> resolvedTypes) {<NEW_LINE>// Handle simple cases quickly.<NEW_LINE>if (!(unresolved instanceof TypeVariable<?>)) {<NEW_LINE>return unresolved;<NEW_LINE>}<NEW_LINE>TypeVariable<?> var = (TypeVariable<?>) unresolved;<NEW_LINE>Type target =... | = (TypeVariable<?>) target; |
1,335,995 | void process(Content dataSource, DataSourceIngestModuleProgress progressBar) {<NEW_LINE>String modOutPath = Case.getCurrentCase().getModuleDirectory() + File.separator + "sru";<NEW_LINE>File dir = new File(modOutPath);<NEW_LINE>if (dir.exists() == false) {<NEW_LINE>dir.mkdirs();<NEW_LINE>}<NEW_LINE>// NON-NLS<NEW_LINE>... | + sruAbstractFile.getId() + "_srudb.db3"; |
427,816 | static void copyWithEncoding(InputStream inputStream, OutputStream os, Map<String, String> replacements) throws IOException {<NEW_LINE>byte[] arr = new byte[4096];<NEW_LINE>final String encUTF8 = "utf-8";<NEW_LINE>PushbackInputStream pin = new PushbackInputStream(inputStream, 4096);<NEW_LINE>int <MASK><NEW_LINE>if (len... | len = pin.read(arr); |
680,614 | static AttributeBinding createBinding(String name, Type type) {<NEW_LINE>// Simple scalar parameter types<NEW_LINE>if (type == String.class) {<NEW_LINE>AttributeKey<String> key = AttributeKey.stringKey(name);<NEW_LINE>return (setter, arg) -> setter.put(key, (String) arg);<NEW_LINE>}<NEW_LINE>if (type == long.class || t... | ) arg).doubleValue()); |
1,792,710 | private void createOutputFragment(PlanFragment inputFragment, ExecPlan execPlan, List<ColumnRefOperator> outputColumns) {<NEW_LINE>if (inputFragment.getPlanRoot() instanceof ExchangeNode || !inputFragment.isPartitioned()) {<NEW_LINE>List<Expr> outputExprs = outputColumns.stream().map(variable -> ScalarOperatorToExpr.bu... | inputFragment.getPlanRoot(), false); |
164,664 | public void onCreate() {<NEW_LINE>SharedPreferences themePrefs = getSharedPreferences("THEME", 0);<NEW_LINE>Boolean isDark = themePrefs.getBoolean("isDark", false);<NEW_LINE>if (isDark)<NEW_LINE>setTheme(R.style.DarkTheme);<NEW_LINE>else<NEW_LINE>setTheme(R.style.AppTheme);<NEW_LINE>super.onCreate();<NEW_LINE>ACRA.init... | CoreConfigurationBuilder builder = new CoreConfigurationBuilder(this); |
887,424 | public List<IWorker<ITestNGMethod>> createWorkers(Arguments arguments) {<NEW_LINE>List<IWorker<ITestNGMethod>> result = Lists.newArrayList();<NEW_LINE>// Methods that belong to classes with a sequential=true or parallel=classes<NEW_LINE>// attribute must all be run in the same worker<NEW_LINE>Set<Class<?>> sequentialCl... | .addAll(methodsToMultipleMethodInstances(tm)); |
1,137,971 | public static Ticker adaptTickerMessage(Instrument instrument, ArrayNode arrayNode) {<NEW_LINE>return Streams.stream(arrayNode.elements()).filter(JsonNode::isObject).map(tickerNode -> {<NEW_LINE>Iterator<JsonNode> askIterator = tickerNode.get("a").iterator();<NEW_LINE>Iterator<JsonNode> bidIterator = tickerNode.get("b"... | get("c").iterator(); |
1,120,566 | public static AltBn128Fq12Point twist(final AltBn128Fq2Point p) {<NEW_LINE>final Fq2 x = p.getX();<NEW_LINE>final Fq2 y = p.getY();<NEW_LINE>final Fq[] xCoeffs = x.getCoefficients();<NEW_LINE>final Fq[] yCoeffs = y.getCoefficients();<NEW_LINE>final Fq[] nX = new Fq[Fq12.DEGREE];<NEW_LINE>Arrays.fill(nX, Fq.zero());<NEW... | w.power(3))); |
492,144 | public static void serverTick(Level level, BlockPos worldPosition, BlockState state, TileTerraPlate self) {<NEW_LINE>boolean removeMana = true;<NEW_LINE>if (self.hasValidPlatform()) {<NEW_LINE>List<ItemStack> items = self.getItems();<NEW_LINE>SimpleContainer inv = self.getInventory();<NEW_LINE>ITerraPlateRecipe recipe ... | floatToIntBits(self.getCompletion()); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.