idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,083,145 | protected void createTrapezium(DXFVertex start, DXFVertex end) {<NEW_LINE>// we start at the start side<NEW_LINE>double c = 0.0;<NEW_LINE>if (start.getStartWidth() > 0.0) {<NEW_LINE>c = start.getStartWidth() / 2;<NEW_LINE>} else {<NEW_LINE>c = this.p.getStartWidth() / 2;<NEW_LINE>}<NEW_LINE>Vector v = this.p.getExtrusi... | = start.getEndWidth() / 2; |
1,683,971 | public JRFont deserialize(JsonParser p, DeserializationContext ctxt) throws IOException, JsonProcessingException {<NEW_LINE>ObjectCodec oc = p.getCodec();<NEW_LINE>JsonNode node = oc.readTree(p);<NEW_LINE>JRBaseFont font = new JRBaseFont();<NEW_LINE>JsonNode fontNameNode = node.get("font-name");<NEW_LINE>if (fontNameNo... | setUnderline(underlineNode.asBoolean()); |
662,810 | /*<NEW_LINE>* Read raw registration response into a React Native map to be passed down the bridge<NEW_LINE>*/<NEW_LINE>public static final WritableMap registrationResponseToMap(RegistrationResponse response) {<NEW_LINE>WritableMap map = Arguments.createMap();<NEW_LINE>map.putString("clientId", response.clientId);<NEW_L... | putString("clientSecret", response.clientSecret); |
693,567 | public static void main(String[] args) throws Exception {<NEW_LINE>File file = new File("tmp-1Y26.jnl");<NEW_LINE>Properties properties = new Properties();<NEW_LINE>properties.setProperty(BigdataSail.Options.FILE, file.getAbsolutePath());<NEW_LINE>BigdataSail sail = new BigdataSail(properties);<NEW_LINE><MASK><NEW_LINE... | Repository repo = new BigdataSailRepository(sail); |
996,902 | public static void applyOptions(boolean holdConsole, boolean isReport) {<NEW_LINE>int style = Font.PLAIN;<NEW_LINE>if (ConfigOptions.bBold.booleanValue()) {<NEW_LINE>style += Font.BOLD;<NEW_LINE>}<NEW_LINE>if (ConfigOptions.bItalic.booleanValue()) {<NEW_LINE>style += Font.ITALIC;<NEW_LINE>}<NEW_LINE>GC.font = new Font(... | ("start.home"), ConfigOptions.sMainPath); |
1,418,766 | private void buildVnDown(Varnode vn) {<NEW_LINE>// Follow descendant edges<NEW_LINE>Iterator<PcodeOp> iter = vn.getDescendants();<NEW_LINE>if (iter == null) {<NEW_LINE>// no descendants<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ArrayList<ToOpEdge> <MASK><NEW_LINE>while (iter.hasNext()) {<NEW_LINE>PcodeOp op = iter.next();<N... | newedge = new ArrayList<>(); |
873,819 | protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException {<NEW_LINE>String userId = InputParser.getQueryParamOrThrowError(req, "userId", true);<NEW_LINE>String thirdPartyId = InputParser.getQueryParamOrThrowError(req, "thirdPartyId", true);<NEW_LINE>String thirdPartyUs... | sendJsonResponse(200, result, resp); |
939,300 | ActionResult<Wo> execute(HttpServletRequest request, EffectivePerson effectivePerson, JsonElement jsonElement) throws Exception {<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>Wi wrapIn = null;<NEW_LINE>Boolean check = true;<NEW_LINE>try {<NEW_LINE>wrapIn = this.convertToWrapIn(jsonElement, Wi.class... | setCreatorPerson(effectivePerson.getDistinguishedName()); |
186,155 | public byte[] doInTransform(Instrumentor instrumentor, ClassLoader classLoader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {<NEW_LINE>final InstrumentClass target = instrumentor.getInstrumentClass(classLoader, className, classfil... | OnSuccessInterceptor.class, RocketMQConstants.SCOPE); |
1,410,429 | private static SnapshotConnection makeSnapshotConnectionForBgpPeerInfo(BgpActivePeerConfig snapshotBgpPeer, int networkBits, Interface snapshotAttachmentIface, @Nullable Integer vlanTag) {<NEW_LINE>String snapshotAttachmentHostname = snapshotAttachmentIface.getOwner().getHostname();<NEW_LINE>String ispIfaceName = ispTo... | ConcreteInterfaceAddress.create(peerAddress, networkBits); |
1,838,030 | private void reloadTemplates() {<NEW_LINE>templates.clear();<NEW_LINE>pokemonSettings.clear();<NEW_LINE>moveSettings.clear();<NEW_LINE>badgeSettings.clear();<NEW_LINE>itemSettings.clear();<NEW_LINE>for (ItemTemplate template : provider.getTemplates().values()) {<NEW_LINE>if (template.hasPokemonSettings()) {<NEW_LINE>Po... | itemSettings.getItemId(), itemSettings); |
730,789 | protected void dgemm(char Order, char TransA, char TransB, int M, int N, int K, double alpha, INDArray A, int lda, INDArray B, int ldb, double beta, INDArray C, int ldc) {<NEW_LINE>// A = Shape.toOffsetZero(A);<NEW_LINE>// B = Shape.toOffsetZero(B);<NEW_LINE>Nd4j.getExecutioner().push();<NEW_LINE>val ctx = allocator.ge... | ctx, C, A, B); |
535,822 | final DeleteResourcePolicyResult executeDeleteResourcePolicy(DeleteResourcePolicyRequest deleteResourcePolicyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteResourcePolicyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteResourcePolicy"); |
399,473 | public static PageCursorFactory mapIntoPageCursorFactory(SortOrder sortOrder, ZonedDateTime transitSearchTimeZero, SearchParams searchParams, Duration searchWindowNextSearch, Itinerary firstRemovedItinerary, @Nullable PageType currentPageType) {<NEW_LINE>var factory = new PageCursorFactory(sortOrder, searchWindowNextSe... | searchParams.latestArrivalTime()) : null; |
835,457 | public synchronized Cursor tracks(WhereInfo where, String[] orderBy, String[] fields) {<NEW_LINE>List<JoinInfo> joinInfos = new ArrayList<>();<NEW_LINE>JoinInfo joinInfo = new JoinInfo();<NEW_LINE>joinInfo.table = TABLE_ARTISTS;<NEW_LINE>joinInfo.conditions.put(TABLE_TRACKS + "." + <MASK><NEW_LINE>joinInfos.add(joinInf... | TRACKS_ARTISTID, TABLE_ARTISTS + "." + ID); |
891,676 | public Cursor handle(RelNode logicalPlan, ExecutionContext executionContext) {<NEW_LINE>List<Cursor> inputCursors = new ArrayList<>();<NEW_LINE>List<RelNode> inputs = logicalPlan.getInputs();<NEW_LINE>boolean useUpdate = false;<NEW_LINE>for (RelNode relNode : inputs) {<NEW_LINE>if (relNode instanceof PhyQueryOperation)... | kind.belongsTo(SqlKind.SQL_SET_QUERY); |
206,914 | public void start() {<NEW_LINE>executor = java.util.concurrent.Executors.newCachedThreadPool();<NEW_LINE>if (localAddress != null) {<NEW_LINE>try {<NEW_LINE>server = HttpServer.create(localAddress, 10);<NEW_LINE>server.createContext("/alive", new AliveHandler());<NEW_LINE>server.createContext<MASK><NEW_LINE>// Thread c... | ("/ready", new ReadyHandler()); |
1,334,216 | static List<IndexChange> readTransactionIndexChanges(OChannelDataInput channel, ORecordSerializerNetworkV37 serializer) throws IOException {<NEW_LINE>List<IndexChange> changes = new ArrayList<>();<NEW_LINE>int val = channel.readInt();<NEW_LINE>while (val-- > 0) {<NEW_LINE>String indexName = channel.readString();<NEW_LI... | boolean cleared = channel.readBoolean(); |
1,757,200 | private void addNewNode() {<NEW_LINE>if (gridTab.getRecord_ID() > 0) {<NEW_LINE>String name = (String) gridTab.getValue("Name");<NEW_LINE>String description = (<MASK><NEW_LINE>boolean summary = gridTab.getValueAsBoolean("IsSummary");<NEW_LINE>// Menu - Action<NEW_LINE>String imageIndicator = (String) gridTab.getValue("... | String) gridTab.getValue("Description"); |
914,194 | /* (non-Javadoc)<NEW_LINE>* @see com.ibm.ws.sib.processor.MQLinkLocalization#delete()<NEW_LINE>*/<NEW_LINE>public void delete() {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(tc, "delete");<NEW_LINE>// Mark the destination for deletion<NEW_LINE>try {<NEW_LINE>// Set the... | SibTr.exception(tc, e); |
1,067,714 | public JSONObject subscribers(HttpServletRequest request) {<NEW_LINE>int pageNo = NumberUtils.toInt(WebUtils.required(request, "pageNo"));<NEW_LINE>int pageSize = NumberUtils.toInt(WebUtils.required(request, "pageSize"));<NEW_LINE>String namespaceId = WebUtils.optional(request, CommonParams.NAMESPACE_ID, Constants.DEFA... | valueOf(Boolean.TRUE))); |
1,090,397 | private synchronized void flush() {<NEW_LINE>if (recipients.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>StringBuilder b = new StringBuilder(text);<NEW_LINE>if (recipients.size() > 1) {<NEW_LINE>b.append(" And also to: ");<NEW_LINE>for (int i = 1; i < recipients.size(); i++) {<NEW_LINE>String displayName = recipie... | ()).append(" total)"); |
550,713 | public JsonSerializer<?> build() {<NEW_LINE>// [databind#2789]: There can be a case wherein `_typeId` is used, but<NEW_LINE>// nothing else. Rare but has happened; so force access.<NEW_LINE>if (_typeId != null) {<NEW_LINE>if (_config.isEnabled(MapperFeature.CAN_OVERRIDE_ACCESS_MODIFIERS)) {<NEW_LINE>_typeId.fixAccess(_... | ), this, properties, _filteredProperties); |
1,176,216 | protected List<DataPointGroup> groupByTypeAndTag(String metricName, List<DataPointRow> rows, TagGroupBy tagGroupBy, Order order) {<NEW_LINE>List<DataPointGroup> ret = new ArrayList<DataPointGroup>();<NEW_LINE>MemoryMonitor mm = new MemoryMonitor(20);<NEW_LINE>if (rows.isEmpty()) {<NEW_LINE>ret.add(new SortingDataPointG... | getGroupType(row.getDatastoreType()); |
895,121 | public void visit(MinExclusive minExclusive) {<NEW_LINE>assert (facetParent instanceof SimpleRestriction);<NEW_LINE>if (datatype instanceof NumberBase) {<NEW_LINE>java.util.List<Number> removeList = new ArrayList<Number>();<NEW_LINE>java.util.List<? extends Number> currentList = ((NumberBase) datatype).getMinExclusives... | (minExclusive.getValue())); |
509,057 | public static void main(final String[] a) {<NEW_LINE>final long n = Long.parseLong(a[0]);<NEW_LINE>final long incr = Long.MAX_VALUE / (n / 2);<NEW_LINE>long start, elapsed;<NEW_LINE>for (int k = 10; k-- != 0; ) {<NEW_LINE>System.out.print("Broadword msb: ");<NEW_LINE>start = System.currentTimeMillis();<NEW_LINE>for (lo... | * elapsed / n) + " ns/call"); |
1,574,360 | public BreakStatement convert(org.eclipse.jdt.internal.compiler.ast.BreakStatement statement) {<NEW_LINE>BreakStatement breakStatement = new BreakStatement(this.ast);<NEW_LINE>if (this.ast.apiLevel >= AST.JLS12_INTERNAL) {<NEW_LINE>breakStatement.setImplicit(statement.isImplicit);<NEW_LINE>if (statement.isImplicit) {<N... | new String(statement.label)); |
750,140 | public Iterable<? extends ErrorDescription> analyze() {<NEW_LINE>Preferences settings = context.getSettings();<NEW_LINE>if (settings != null && !settings.getBoolean(CodingStandardsFixerCustomizerPanel.ENABLED, false)) {<NEW_LINE>return Collections.emptyList();<NEW_LINE>}<NEW_LINE>CodingStandardsFixer codingStandardsFix... | scope, codingStandardsFixer, codingStandardsFixerParams, fileCount); |
1,101,258 | public ResponseContainer showTableInformation(RequestContainer request, Templater templater) {<NEW_LINE>if (!(request instanceof JdbcRequestContainer)) {<NEW_LINE>throw new IllegalArgumentException("Unsupported request container: " + request.getType());<NEW_LINE>}<NEW_LINE>JdbcRequestContainer jdbcRequest = (JdbcReques... | getAspects().add(rowSetAspect); |
1,054,111 | public void onBindGroupViewHolder(@NonNull MyGroupViewHolder holder, int groupPosition, int viewType) {<NEW_LINE>// child item<NEW_LINE>final AbstractExpandableDataProvider.BaseData item = mProvider.getGroupItem(groupPosition);<NEW_LINE>// set text<NEW_LINE>holder.mTextView.<MASK><NEW_LINE>// mark as clickable<NEW_LINE... | setText(item.getText()); |
673,993 | private Handler<RoutingContext> createIFrameHandler(String iframeHTML) {<NEW_LINE>String etag = getMD5String(iframeHTML);<NEW_LINE>return rc -> {<NEW_LINE>try {<NEW_LINE>if (LOG.isTraceEnabled())<NEW_LINE>LOG.trace("In Iframe handler");<NEW_LINE>if (etag != null && etag.equals(rc.request().getHeader(HttpHeaders.IF_NONE... | .currentTimeMillis() + oneYear)); |
1,836,793 | public void fileWritten(final Local file) {<NEW_LINE>if (this.isLocked()) {<NEW_LINE>log.debug(String.format("Skip reading bookmark from %s", file));<NEW_LINE>} else {<NEW_LINE>try {<NEW_LINE>// Read from disk and re-insert to collection<NEW_LINE>final Host bookmark = HostReaderFactory.<MASK><NEW_LINE>final int index =... | get().read(file); |
37,904 | protected Component createRuntimeEnumLookup(ValueProperty valueProperty) {<NEW_LINE>if (javaClass == Boolean.class) {<NEW_LINE>return createBooleanField(valueProperty);<NEW_LINE>}<NEW_LINE>LoadContext<CategoryAttribute> context = new LoadContext<>(CategoryAttribute.class);<NEW_LINE>LoadContext.Query q = context.setQuer... | categoryAttribute = dataManager.load(context); |
589,650 | private void saveTaxonomies(Client client, PClient.Builder newClient) {<NEW_LINE>for (Taxonomy taxonomy : client.getTaxonomies()) {<NEW_LINE>PTaxonomy.Builder newTaxonomy = PTaxonomy.newBuilder();<NEW_LINE>newTaxonomy.setId(taxonomy.getId());<NEW_LINE>newTaxonomy.setName(taxonomy.getName());<NEW_LINE>if (taxonomy.getSo... | = PTaxonomy.Classification.newBuilder(); |
372,604 | public void run() {<NEW_LINE>// Part of #33165 - the following code is wrapped by doc.render()<NEW_LINE>int lineNumber = getLineNumber();<NEW_LINE>int lineStart = NbDocument.findLineOffset(doc, lineNumber);<NEW_LINE>// #24434: Check whether the next line exists<NEW_LINE>// (the current one could be the last one).<NEW_L... | getText(lineStart, lineEnd - lineStart); |
1,533,928 | public okhttp3.Call systemScopesRoleAliasesGetCall(final ApiCallback _callback) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/system-scopes/role-aliases";<NEW_LINE>List<Pair> localVarQueryParams = new ArrayList<Pair>();<NEW_LINE... | = new ArrayList<Pair>(); |
802,878 | private void showContactInviteDialog(Long linkHandle, String fullName, String email, boolean isContact) {<NEW_LINE>if (inviteContactDialog != null && inviteContactDialog.isShowing())<NEW_LINE>return;<NEW_LINE>String message;<NEW_LINE>String buttonText;<NEW_LINE>if (isContact) {<NEW_LINE>message = getString(<MASK><NEW_L... | R.string.context_contact_already_exists, email); |
294,468 | public Set<String> resolveTypeName(CompilationInfo info, String anyName) {<NEW_LINE>int dot = anyName.indexOf('.');<NEW_LINE>if (dot == -1) {<NEW_LINE>// probably simple name, does not contain any dots<NEW_LINE>return resolveName(anyName);<NEW_LINE>}<NEW_LINE>// try to interpret as a fully qualified name; it's not usua... | String> resolved = resolveName(firstPart); |
1,367,857 | private void processChunkRequest() {<NEW_LINE>this.timings.syncChunkSendTimer.startTiming();<NEW_LINE>for (long index : this.chunkSendQueue.keySet()) {<NEW_LINE>if (this.chunkSendTasks.contains(index)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>int x = getHashX(index);<NEW_LINE>int z = getHashZ(index);<NEW_LINE><MASK><NE... | this.chunkSendTasks.add(index); |
1,041,731 | private static String generateName(CompilationInfo info, TreePath newClassToConvert, String prototype) {<NEW_LINE>Scope s = info.getTrees().getScope(newClassToConvert);<NEW_LINE>Integer extension = null;<NEW_LINE>// NOI18N<NEW_LINE>if (s == null)<NEW_LINE>return prototype + "Impl";<NEW_LINE>while (true) {<NEW_LINE>// N... | .getSimpleName().toString(); |
95,754 | public SweepCallback sweep(Vector3f startPos, Vector3f endPos, float allowedPenetration, float slopeFactor) {<NEW_LINE>Matrix4f startTransform = new Matrix4f().translationRotateScale(startPos, new Quaternionf(), 1.0f);<NEW_LINE>Matrix4f endTransform = new Matrix4f().translationRotateScale(endPos, new Quaternionf(), 1.0... | getBroadphaseHandle().getCollisionFilterGroup()); |
1,317,728 | public static DescribeDohSubDomainStatisticsResponse unmarshall(DescribeDohSubDomainStatisticsResponse describeDohSubDomainStatisticsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeDohSubDomainStatisticsResponse.setRequestId(_ctx.stringValue("DescribeDohSubDomainStatisticsResponse.RequestId"));<NEW_LINE>List<Sta... | ("DescribeDohSubDomainStatisticsResponse.Statistics[" + i + "].V4HttpsCount")); |
1,483,114 | static BigInteger xorNegative(BigInteger val, BigInteger that) {<NEW_LINE>// PRE: val and that are negative<NEW_LINE>// PRE: val has at least as many trailing zero digits as that<NEW_LINE>int resLength = Math.max(val.numberLength, that.numberLength);<NEW_LINE>int[<MASK><NEW_LINE>int iVal = val.getFirstNonzeroDigit();<N... | ] resDigits = new int[resLength]; |
1,032,023 | public boolean applies(Ability abilityToModify, Ability source, Game game) {<NEW_LINE>if (!(abilityToModify instanceof SpellAbility)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (!game.getOpponents(source.getControllerId()).contains(abilityToModify.getControllerId())) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Sp... | getStackObject(abilityToModify.getId()); |
531,035 | private void startScaning(ScanResult callback) {<NEW_LINE>this.callback = callback;<NEW_LINE>try {<NEW_LINE>// Add the listener for scan and cancel<NEW_LINE>Container cmdContainer = new Container(new FlowLayout(Component.CENTER));<NEW_LINE>Button scanButton = new Button(new Command("Scan") {<NEW_LINE><NEW_LINE>public v... | CENTER, media.getVideoComponent()); |
389,239 | private MethodSpec modelConstructor(ObjectResolvedType type) {<NEW_LINE>Builder constructor = MethodSpec.constructorBuilder();<NEW_LINE>if (type.getName().equals("CustomFacet") || server) {<NEW_LINE>constructor.addModifiers(PUBLIC);<NEW_LINE>} else {<NEW_LINE>constructor.addModifiers(PRIVATE);<NEW_LINE>}<NEW_LINE>const... | ) : f.getDescription()); |
712,508 | public ViewHolderShareContacts onCreateViewHolder(ViewGroup parent, int viewType) {<NEW_LINE>LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);<NEW_LINE>Display display = ((Activity) mContext).getWindowManager().getDefaultDisplay();<NEW_LINE>DisplayMetrics outMetrics ... | getResources().getDisplayMetrics()); |
379,470 | private ImmutableList<String> readOutput(final InputStream is, final int tailSize) {<NEW_LINE>final BufferedReader in = new BufferedReader(new InputStreamReader(is), 10240);<NEW_LINE>try {<NEW_LINE>final List<String> tail = tailSize > 0 ? new ArrayList<>(tailSize + 1) : new ArrayList<>();<NEW_LINE>int truncatedLines = ... | tail.size() + " lines)"); |
1,737,193 | private BTChipOutput convertResponseToOutput(byte[] response) throws BTChipException {<NEW_LINE>BTChipOutput result = null;<NEW_LINE>byte[] value = new byte[(response[0] & 0xff)];<NEW_LINE>System.arraycopy(response, 1, value, 0, value.length);<NEW_LINE>byte userConfirmationValue = response[1 + value.length];<NEW_LINE>i... | ] keycardIndexes = new byte[keycardIndexesLength]; |
822,569 | public static boolean openInBrowser(Context context, Intent intent, boolean showToastIfNoBrowser, boolean braveBrowser) {<NEW_LINE>boolean activityStarted = false;<NEW_LINE>ComponentName defaultBrowserComponentName = Settings.get().getDefaultBrowserComponentName(context);<NEW_LINE>if (defaultBrowserComponentName != nul... | Settings settings = Settings.get(); |
1,452,325 | public ColumnDefinition unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ColumnDefinition columnDefinition = new ColumnDefinition();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = origina... | class).unmarshall(context)); |
309,460 | public void propagate(InstanceState state) {<NEW_LINE>PlaRomData data = getPlaRomData(state);<NEW_LINE>Value cs = state.getPortValue(2);<NEW_LINE>boolean selection = state.getAttributeValue(Mem.ATTR_SELECTION) == Mem.SEL_HIGH;<NEW_LINE>boolean ComponentActive = !(cs == Value.FALSE && selection || cs == Value.TRUE && !s... | length - i - 1] = temp; |
1,646,909 | public static String modelToString(IReadOnlyJITDataModel model, boolean onlyCompiled) {<NEW_LINE>StringBuilder builder = new StringBuilder();<NEW_LINE>builder.append("Package").append(HEADLESS_SEPARATOR);<NEW_LINE>builder.append("Class").append(HEADLESS_SEPARATOR);<NEW_LINE>builder.append("Member Signature").append(HEA... | .getPackageManager().getRootPackages(); |
791,093 | private List<String> retrieveEntityIdsFromArguments(final Method method, final Object[] args) {<NEW_LINE>final Annotation[][] parameterAnnotations = getAnnotations(method);<NEW_LINE>int i = -1;<NEW_LINE>for (final Object arg : args) {<NEW_LINE>i++;<NEW_LINE>// Assume the first argument of type Entity is our type of Ent... | getId().toString()); |
848,273 | @Produces(MediaType.APPLICATION_JSON)<NEW_LINE>public Response view(@PathParam("username") String username) {<NEW_LINE>if (!authenticate()) {<NEW_LINE>throw new ForbiddenClientException();<NEW_LINE>}<NEW_LINE>UserDao userDao = new UserDao();<NEW_LINE>User user = userDao.getActiveByUsername(username);<NEW_LINE>if (user ... | throw new ClientException("UserNotFound", "The user does not exist"); |
761,574 | protected void writeConfig() {<NEW_LINE>IProgressMonitor monitor = new NullProgressMonitor();<NEW_LINE>TemplateCore template = TemplateEngine.getDefault().getTemplateById("SGXEnclaveConfig");<NEW_LINE>Map<String, String> valueStore = template.getValueStore();<NEW_LINE>valueStore.put("projectName", project.getName());<N... | put("HeapMaxSize", this.heapMaxSize); |
1,286,149 | public Node writeDescriptor(Node parent, Application application) {<NEW_LINE>Node appNode = super.writeDescriptor(parent, application);<NEW_LINE>// initialize-in-order<NEW_LINE>appendTextChild(appNode, ApplicationTagNames.INITIALIZE_IN_ORDER, String.valueOf(application.isInitializeInOrder()));<NEW_LINE>// module<NEW_LI... | LIBRARY_DIRECTORY, application.getLibraryDirectoryRawValue()); |
1,441,678 | protected void applyPrior(double[] x, double batchScale) {<NEW_LINE>// incorporate priors<NEW_LINE>if (prior == QUADRATIC_PRIOR) {<NEW_LINE>double lambda = batchScale / (sigma * sigma);<NEW_LINE>for (int i = 0; i < x.length; i++) {<NEW_LINE>double w = x[i], wlambda = w * lambda;<NEW_LINE>value += w * wlambda * 0.5;<NEW... | = batchScale / (sigmasq * sigmasq); |
62,681 | final DeleteOriginEndpointResult executeDeleteOriginEndpoint(DeleteOriginEndpointRequest deleteOriginEndpointRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteOriginEndpointRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
697,242 | final DeletePhoneNumberResult executeDeletePhoneNumber(DeletePhoneNumberRequest deletePhoneNumberRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deletePhoneNumberRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.st... | invoke(request, responseHandler, executionContext); |
1,401,166 | private static void generic(MarketDataService marketDataService) throws IOException {<NEW_LINE>Ticker ticker = marketDataService.getTicker(CurrencyPair.BTC_USDT);<NEW_LINE>System.out.println("BTC / USDT Ticker: " + ticker.toString());<NEW_LINE>// Get the latest order book data for BTC/USD<NEW_LINE>OrderBook orderBook =... | (0).toString()); |
1,574,714 | public int longestSubarray(int[] nums, int limit) {<NEW_LINE>int ans = 0;<NEW_LINE>PriorityQueue<Integer> maxHeap = new PriorityQueue<>((a, b) -> b - a);<NEW_LINE>PriorityQueue<Integer> minHeap = new PriorityQueue<>();<NEW_LINE>for (int left = 0, right = 0; left < nums.length && right < nums.length; right++) {<NEW_LINE... | .offer(nums[right]); |
1,430,854 | private // this uses, but does not alter, data from previous groups<NEW_LINE>ImmutableMap<CurveName, JacobianCalibrationMatrix> updateJacobiansForGroup(ImmutableRatesProvider provider, ImmutableList<ResolvedTrade> trades, ImmutableList<CurveParameterSize> orderGroup, ImmutableList<CurveParameterSize> orderPrev, Immutab... | [p], 0, totParamsPrev); |
413,697 | private boolean isSubtypeHelper(JSType subtype, JSType supertype) {<NEW_LINE>// Axiomatic cases.<NEW_LINE>if (identical(subtype, supertype) || supertype.isUnknownType() || supertype.isAllType() || subtype.isUnknownType() || subtype.isNoType()) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>// Special consideration for `nu... | ), supertype.assertObjectType()); |
1,522,807 | private void crossover(final MSeq<G> that, final MSeq<G> other, final int i) {<NEW_LINE>final var random = RandomRegistry.random();<NEW_LINE>final double u = random.nextDouble();<NEW_LINE>final double beta;<NEW_LINE>if (u < 0.5) {<NEW_LINE>// If u is smaller than 0.5 perform a contracting crossover.<NEW_LINE>beta = pow... | 1.0 / (_contiguity + 1)); |
468,467 | protected void initModule(Module module) {<NEW_LINE>final ModuleRootManager rootManager = ModuleRootManager.getInstance(module);<NEW_LINE>final ModifiableRootModel rootModel = rootManager.getModifiableModel();<NEW_LINE>for (String contentRoot : myContentRoots) {<NEW_LINE>final VirtualFile virtualFile = LocalFileSystem.... | String s = contentRoot + "/" + sourceRoot; |
1,022,832 | protected CommonAppListFilterAdapter onCreateCommonAppListFilterAdapter() {<NEW_LINE>adapter = new CommonAppListFilterAdapter((appInfo, itemView) -> {<NEW_LINE>if (packageSet == null || packageSet.isPrebuilt()) {<NEW_LINE>AppDetailsActivity.start(thisActivity(), appInfo);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>QuickDropd... | getString(R.string.feature_title_apps_manager); |
287,317 | public static Object toObject(InputStream is, Class<?> objectClass, String mediaType) {<NEW_LINE>Object output = null;<NEW_LINE>try {<NEW_LINE>output = objectClass.newInstance();<NEW_LINE>if (MediaType.APPLICATION_XML.equals(mediaType)) {<NEW_LINE>output = xmlMapper.readValue(is, objectClass);<NEW_LINE>} else if (Media... | "Error while converting String to Object using JAXB:" + e.getMessage()); |
1,233,604 | public void updateValueFromChildren(TypeNodeData inData) {<NEW_LINE>TypeNodeData data = (TypeNodeData) this.getUserObject();<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>String propType = inData.getTypeClass();<NEW_LINE>String propName = inData.getTypeName();<NEW_LINE>Object propObject = inData.getTypeValue();<NEW_LINE>Refl... | Object structObject = data.getTypeValue(); |
1,265,822 | /* Example usage: */<NEW_LINE>public static void main(String[] args) {<NEW_LINE>int n = 10;<NEW_LINE>List<List<Integer>> graph = createGraph(n);<NEW_LINE>addEdge(graph, 0, 1);<NEW_LINE>addEdge(graph, 0, 2);<NEW_LINE>addEdge(graph, 1, 2);<NEW_LINE>addEdge(graph, 1, 3);<NEW_LINE>addEdge(graph, 2, 3);<NEW_LINE>addEdge(gra... | addEdge(graph, 2, 7); |
399,053 | public EfsFileLocation unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>EfsFileLocation efsFileLocation = new EfsFileLocation();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken... | String currentParentElement = context.getCurrentParentElement(); |
14,793 | final AuthorizeSecurityGroupEgressResult executeAuthorizeSecurityGroupEgress(AuthorizeSecurityGroupEgressRequest authorizeSecurityGroupEgressRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(authorizeSecurityGroupEgressRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContex... | (super.beforeMarshalling(authorizeSecurityGroupEgressRequest)); |
75,350 | public void readFields(DataInput input) throws IOException {<NEW_LINE>id = input.readLong();<NEW_LINE>name = FunctionName.read(input);<NEW_LINE>retType = ColumnType.read(input);<NEW_LINE>int numArgs = input.readInt();<NEW_LINE>argTypes = new Type[numArgs];<NEW_LINE>for (int i = 0; i < numArgs; ++i) {<NEW_LINE>argTypes[... | location = URI.create(locationStr); |
1,281,113 | protected Map<String, String> authenticateWeb(URI uri, String realm, String authUrl, String completeUrl, String verificationUrl) {<NEW_LINE>final NotificationManager notificationManager = (NotificationManager) myService.getSystemService(Context.NOTIFICATION_SERVICE);<NEW_LINE>final Intent intent = new Intent(myService,... | intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); |
186,365 | protected void init() throws IOException {<NEW_LINE>getConf().setQuietMode(true);<NEW_LINE>if (commandFactory == null) {<NEW_LINE>commandFactory = new WowCommandFactory(getConf());<NEW_LINE>commandFactory.addObject(new WowFsShell.Help(getConf(), basePath, out, error), "-help");<NEW_LINE>commandFactory.addObject(new Wow... | , out, error), "-usage"); |
1,329,445 | public View onCreateView(final LayoutInflater inflater, final ViewGroup container, final Bundle savedInstanceState) {<NEW_LINE>final View view = inflater.inflate(R.layout.sweep_wallet_fragment, container, false);<NEW_LINE>messageView = view.<MASK><NEW_LINE>passwordViewGroup = view.findViewById(R.id.sweep_wallet_fragmen... | findViewById(R.id.sweep_wallet_fragment_message); |
503,293 | public List<Integer> mergeUsingHeap(List<List<Integer>> chunks) {<NEW_LINE>List<Integer> result = new ArrayList<Integer>();<NEW_LINE>PriorityQueue<Triplet> queue = new PriorityQueue<Triplet>();<NEW_LINE>// add first element of every chunk into queue<NEW_LINE>for (int i = 0; i < chunks.size(); i++) {<NEW_LINE>Triplet p ... | (i).get(0); |
487,587 | public void beforeDelete(final I_M_CostElement costElement) {<NEW_LINE>final CostElementType costElementType = CostElementType.ofCode(costElement.getCostElementType());<NEW_LINE>final CostingMethod costingMethod = CostingMethod.<MASK><NEW_LINE>final boolean isCostingMethod = costElementType.isMaterial() && costingMetho... | ofNullableCode(costElement.getCostingMethod()); |
253,149 | public void report(Neo4jError error) {<NEW_LINE>if (error.status().code().classification() == DatabaseError) {<NEW_LINE>String message;<NEW_LINE>if (error.queryId() != null) {<NEW_LINE>message = format("Client triggered an unexpected error [%s]: %s, reference %s, queryId: %s.", error.status().code().serialize(), error.... | message, error.cause()); |
1,260,216 | public void executeScript() throws MojoExecutionException {<NEW_LINE>Connection connection = null;<NEW_LINE>try {<NEW_LINE>Class<?> driverClass = ObjectFactory.externalClassForName(driver);<NEW_LINE>Driver theDriver = (Driver) driverClass.newInstance();<NEW_LINE>Properties properties = new Properties();<NEW_LINE>if (us... | e.getMessage(), e); |
1,792,863 | public RaftPeer makeLeader(RaftPeer candidate) {<NEW_LINE>if (!Objects.equals(leader, candidate)) {<NEW_LINE>leader = candidate;<NEW_LINE>applicationContext.publishEvent(new MakeLeaderEvent(this, leader));<NEW_LINE>Loggers.RAFT.info("{} has become the LEADER, local: {}, leader: {}", leader.ip, JSON.toJSONString(local()... | peer.ip, RaftCore.API_GET_PEER); |
1,221,719 | private static <T> T merge(T v1, T v2) {<NEW_LINE>if (v2 == null)<NEW_LINE>return v1;<NEW_LINE>if (v1 instanceof Collection) {<NEW_LINE>final Collection<Object> c1 = (Collection<Object>) v1;<NEW_LINE>final Collection<Object> c2 <MASK><NEW_LINE>final Collection<Object> cm;<NEW_LINE>if (v1 instanceof List)<NEW_LINE>cm = ... | = (Collection<Object>) v2; |
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.getElementsByTagNameNS(EjbJarProjectType.PROJECT_CONFIGURATION_NAMESPACE, "name");<NEW_LINE>Element nameEl;<NE... | helper.putPrimaryConfigurationData(data, true); |
1,759,666 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player targetPlayer = game.getPlayer(targetPointer.getFirst(game, source));<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>MageObject sourceObject = game.getObject(source);<NEW_LINE>String cardName = (String) game.getState().get... | drawCards(1, source, game); |
1,836,238 | public synchronized XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {<NEW_LINE>// stream size first, as it matters more and the files section can be long<NEW_LINE>builder.startObject(Fields.SIZE);<NEW_LINE>builder.humanReadableField(Fields.TOTAL_IN_BYTES, Fields.TOTAL, new ByteSize... | fileDetails.toXContent(builder, params); |
1,833,741 | public void start(ArrayList<Object> unsupportedBlocksList, Boolean galleryWithImageBlocks) {<NEW_LINE>if (!mStarted) {<NEW_LINE>mHasUnsupportedBlocks = unsupportedBlocksList != null && unsupportedBlocksList.size() > 0;<NEW_LINE>Map<String, Object> properties = getCommonProperties();<NEW_LINE>properties.put(KEY_UNSUPPOR... | T.EDITOR, "An editor session cannot be attempted to be started more than once, " + "unless it's due to rotation or Editor switch"); |
1,547,017 | public io.kubernetes.client.proto.V1beta1Certificates.CertificateSigningRequestSpec buildPartial() {<NEW_LINE>io.kubernetes.client.proto.V1beta1Certificates.CertificateSigningRequestSpec result = new io.kubernetes.client.proto.V1beta1Certificates.CertificateSigningRequestSpec(this);<NEW_LINE>int from_bitField0_ = bitFi... | bitField0_ = (bitField0_ & ~0x00000008); |
872,731 | public FIRFilterSpecification build() {<NEW_LINE>FIRLinearPhaseFilterType type = FIRLinearPhaseFilterType.TYPE_2_EVEN_LENGTH_ODD_ORDER_SYMMETRICAL;<NEW_LINE>int passFrequencyEnd = (int) (<MASK><NEW_LINE>int stopFrequencyBegin = (int) (mChannelBandwidth * (1.0 + mAlpha));<NEW_LINE>int estimatedOrder = estimateFilterOrde... | mChannelBandwidth * (1.0 - mAlpha)); |
354,553 | public static Collection<RegressionExecution> executions() {<NEW_LINE>ArrayList<RegressionExecution> execs = new ArrayList<>();<NEW_LINE>execs<MASK><NEW_LINE>execs.add(new ContextNestedIterateTargetedCP());<NEW_LINE>execs.add(new ContextNestedInvalid());<NEW_LINE>execs.add(new ContextNestedIterator());<NEW_LINE>execs.a... | .add(new ContextNestedWithFilterUDF()); |
1,025,418 | private Mono<Response<Flux<ByteBuffer>>> deleteDhcpWithResponseAsync(String resourceGroupName, String privateCloudName, String dhcpId, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot ... | this.client.mergeContext(context); |
1,709,778 | public static void convolve3(Kernel2D_S32 kernel, GrayS16 src, GrayI16 dest) {<NEW_LINE>final short[] dataSrc = src.data;<NEW_LINE>final short[] dataDst = dest.data;<NEW_LINE>final int width = src.getWidth();<NEW_LINE>final int height = src.getHeight();<NEW_LINE>final int kernelRadius = kernel.getRadius();<NEW_LINE>// ... | kernelRadius) * src.stride - kernelRadius; |
1,848,786 | private static String parseParam(String param, String firstName, String lastName, String middleName) throws ParseException {<NEW_LINE>if (param == null || param.length() == 0)<NEW_LINE>throw new ParseException("Pattern error", 0);<NEW_LINE>String last = <MASK><NEW_LINE>String first = StringUtils.upperCase(StringUtils.s... | StringUtils.substringAfter(param, "|"); |
1,178,279 | private Mono<Response<Flux<ByteBuffer>>> revokeAccessWithResponseAsync(String resourceGroupName, String diskName, 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... | this.client.mergeContext(context); |
1,333,545 | public RenderTarget buildRenderTarget(PreviewModel previewModel) {<NEW_LINE>CanvasSize cs = previewModel.getGraphicsCanvasSize();<NEW_LINE>PreviewProperties properties = previewModel.getProperties();<NEW_LINE>float marginBottom = <MASK><NEW_LINE>float marginLeft = properties.getFloatValue(PDFTarget.MARGIN_LEFT);<NEW_LI... | properties.getFloatValue(PDFTarget.MARGIN_BOTTOM); |
1,665,450 | public List<SearchFolder> loadSearchFolders() {<NEW_LINE>log.debug("Loading SearchFolders");<NEW_LINE><MASK><NEW_LINE>stopWatch.start();<NEW_LINE>Transaction tx = persistence.createTransaction();<NEW_LINE>try {<NEW_LINE>EntityManager em = persistence.getEntityManager();<NEW_LINE>MetaClass effectiveMetaClass = metadata.... | StopWatch stopWatch = new Slf4JStopWatch("SearchFolders"); |
1,622,884 | private void predTemp4x4(Frame[][] refs, int mbX, int mbY, MvList x, int blk4x4) {<NEW_LINE>int mbWidth = sh.sps.picWidthInMbsMinus1 + 1;<NEW_LINE>Frame picCol = refs[1][0];<NEW_LINE>int blkIndX = blk4x4 & 3;<NEW_LINE>int blkIndY = blk4x4 >> 2;<NEW_LINE>int blkPosX = (mbX << 2) + blkIndX;<NEW_LINE>int blkPosY <MASK><NE... | = (mbY << 2) + blkIndY; |
35,832 | public void run(RegressionEnvironment env) {<NEW_LINE>if (env.isHA()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String epl = "@name('flow') create dataflow RollingTopWords\n" + "create objectarray schema WordEvent (word string),\n" + "Emitter -> wordstream<WordEvent> {name:'a'} // Produces word stream\n" + "Select(wordstr... | operatorProvider(new DefaultSupportGraphOpProvider(capture)); |
1,301,060 | public static DescribeScdnCertificateListResponse unmarshall(DescribeScdnCertificateListResponse describeScdnCertificateListResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeScdnCertificateListResponse.setRequestId(_ctx.stringValue("DescribeScdnCertificateListResponse.RequestId"));<NEW_LINE>CertificateListModel ce... | ("DescribeScdnCertificateListResponse.CertificateListModel.CertList[" + i + "].Issuer")); |
1,245,567 | private void createAndCancelInSameMethod() {<NEW_LINE>final String info = "createAndCancelInSameMethod";<NEW_LINE>if (svLogger.isLoggable(Level.FINER)) {<NEW_LINE>svLogger.entering(CLASS_NAME, info);<NEW_LINE>}<NEW_LINE>// create a timer<NEW_LINE>Timer t = TimerHelper.createTimer(ivSessionCtx.getTimerService(), DURATIO... | CLASS_NAME, info, "threw unexpected Exception", ex); |
1,275,498 | private void initializeFileMenu() {<NEW_LINE>// File menu<NEW_LINE>JMenu fileMenu = new JMenu("File");<NEW_LINE>fileMenu.setMnemonic(KeyEvent.VK_F);<NEW_LINE>fileMenu.getAccessibleContext().setAccessibleDescription("File actions for JAVMovieScraper");<NEW_LINE>// Browse directory file menu<NEW_LINE>JMenuItem browseDire... | .VK_B, Event.CTRL_MASK)); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.