idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
969,473 | public SingularityRequestParent skipHealthchecks(String requestId, SingularitySkipHealthchecksRequest skipHealthchecksRequest, SingularityUser user) {<NEW_LINE>SingularityRequestWithState oldRequestWithState = fetchRequestWithState(requestId, user);<NEW_LINE>SingularityRequest oldRequest = oldRequestWithState.getReques... | getSkipHealthchecks()).build(); |
1,345,368 | public Predicate<InfoPb> apply(BrokeredDevice unused) {<NEW_LINE>checkState(!hostTestSizes.isEmpty(), "Filtering on test size names, but no size was specified!");<NEW_LINE>List<Predicate<InfoPb>> predicates = Lists.newArrayList();<NEW_LINE>for (HostTestSize size : hostTestSizes) {<NEW_LINE>if (HostTestSize.UNKNOWN == s... | sizeToClassPredicate.get(size))); |
1,852,402 | public List<TermedStatementEntityEdit> schedule(List<TermedStatementEntityEdit> updates) {<NEW_LINE>List<TermedStatementEntityEdit> result = new ArrayList<>();<NEW_LINE>pointerFreeUpdates = new UpdateSequence();<NEW_LINE>pointerFullUpdates = new UpdateSequence();<NEW_LINE>allPointers = new HashSet<>();<NEW_LINE>for (Te... | = new HashSet<>(allPointers); |
848,076 | /* Build call for subscriptionsUnblockSubscriptionPost */<NEW_LINE>private com.squareup.okhttp.Call subscriptionsUnblockSubscriptionPostCall(String subscriptionId, String ifMatch, String ifUnmodifiedSince, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener pr... | localVarHeaderParams.put("Accept", localVarAccept); |
48,288 | public DBRecord translateRecord(DBRecord oldRecord) {<NEW_LINE>if (oldRecord == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>long entryPointKey = oldRecord.getKey();<NEW_LINE>DBRecord newRecord = OldFunctionDBAdapter.FUNCTIONS_SCHEMA.createRecord(entryPointKey);<NEW_LINE>newRecord.setLongValue(OldFunctionDBAdapter... | , oldRecord.getIntValue(V0_STACK_DEPTH_COL)); |
684,181 | public static ListOTAFirmwareResponse unmarshall(ListOTAFirmwareResponse listOTAFirmwareResponse, UnmarshallerContext _ctx) {<NEW_LINE>listOTAFirmwareResponse.setRequestId(_ctx.stringValue("ListOTAFirmwareResponse.RequestId"));<NEW_LINE>listOTAFirmwareResponse.setSuccess(_ctx.booleanValue("ListOTAFirmwareResponse.Succe... | (_ctx.integerValue("ListOTAFirmwareResponse.PageCount")); |
977,052 | public void computeDataOffsets(DexBody body) {<NEW_LINE>if (!(instruction instanceof Instruction31t)) {<NEW_LINE>throw new IllegalArgumentException("Expected Instruction31t but got: " + instruction.getClass());<NEW_LINE>}<NEW_LINE>Instruction31t fillArrayInstr = (Instruction31t) instruction;<NEW_LINE>int offset = fillA... | body.instructionAtAddress(targetAddress).instruction; |
536,453 | public boolean hasPermission(final UserManager userManager, final String imageTypeName, final String userId, final Type type) {<NEW_LINE>// Gets the image type metadata including ownerships.<NEW_LINE>final List<ImageOwnership> imageOwnerships = <MASK><NEW_LINE>// The owner set contains both users and groups.<NEW_LINE>f... | this.imageTypeDao.getImageTypeOwnership(imageTypeName); |
484,654 | public static void warnExternalOffsetRelocation(Program program, Address relocationAddress, Address symbolAddr, String symbolName, long adjustment, MessageLog log) {<NEW_LINE>if (symbolAddr == null || adjustment == 0 || !program.getMemory().isExternalBlockAddress(symbolAddr)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Stri... | = symbolName == null ? "<no name>" : symbolName; |
717,315 | private void mimeBuildSignedMessage(@NonNull BodyPart signedBodyPart, Intent result) throws MessagingException {<NEW_LINE>if (!cryptoStatus.isSigningEnabled()) {<NEW_LINE>throw new IllegalStateException("call to mimeBuildSignedMessage while signing isn't enabled!");<NEW_LINE>}<NEW_LINE>byte[] signedData = result.getByt... | result.getStringExtra(OpenPgpApi.RESULT_SIGNATURE_MICALG); |
1,347,684 | public AddApplicationInputResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AddApplicationInputResult addApplicationInputResult = new AddApplicationInputResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement()... | class).unmarshall(context)); |
1,779,861 | public static Slime toSlime(List<Notification> notifications) {<NEW_LINE>Slime slime = new Slime();<NEW_LINE>Cursor notificationsArray = slime.setObject().setArray(notificationsFieldName);<NEW_LINE>for (Notification notification : notifications) {<NEW_LINE>Cursor notificationObject = notificationsArray.addObject();<NEW... | , application.value())); |
1,531,170 | public static void convolve(Kernel2D_F64 kernel, GrayF64 src, GrayF64 dest) {<NEW_LINE>final double[] dataKernel = kernel.data;<NEW_LINE>final double[] dataSrc = src.data;<NEW_LINE>final double[] dataDst = dest.data;<NEW_LINE>final int width = src.getWidth();<NEW_LINE>final int height = src.getHeight();<NEW_LINE>int of... | .width - kernel.offset - 1; |
1,358,189 | public IRubyObject op_div(ThreadContext context, IRubyObject other) {<NEW_LINE>if (other instanceof RubyRational)<NEW_LINE>return idiv(context, (RubyRational) other);<NEW_LINE>RubyBigDecimal val = getVpValue(context, other, false);<NEW_LINE>if (val == null)<NEW_LINE>return callCoerced(context, sites(context).div, other... | throw context.runtime.newZeroDivisionError(); |
1,522,036 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player targetPlayer = game.getPlayer(source.getFirstTarget());<NEW_LINE>if (targetPlayer != null) {<NEW_LINE>FilterCreaturePermanent filter = new FilterCreaturePermanent();<NEW_LINE>filter.add(new ControllerIdPredicate(targetPlayer.getId()));<NEW_LINE>Restricti... | CardType.CREATURE.getPredicate()); |
1,370,705 | private boolean detectNoReturn(Program cp, AddressSet noReturnSet, AddressSetView checkSet) throws CancelledException {<NEW_LINE>AddressSet checkedSet = new AddressSet();<NEW_LINE>boolean hadSuspiciousFunctions = false;<NEW_LINE>AddressIterator refIter = cp.getReferenceManager().getReferenceSourceIterator(checkSet, tru... | Address fromAddress = reference.getFromAddress(); |
1,578,682 | private void doHoover() {<NEW_LINE>int rangeSqr = range * range;<NEW_LINE>for (EntityItem entity : selectEntitiesWithinAABB(getWorld(), getBounds())) {<NEW_LINE>double x = (pos.getX(<MASK><NEW_LINE>double y = (pos.getY() + 0.5D - entity.posY);<NEW_LINE>double z = (pos.getZ() + 0.5D - entity.posZ);<NEW_LINE>double dista... | ) + 0.5D - entity.posX); |
1,476,032 | public GlmModelData deserializeModel(Params meta, Iterable<String> data) {<NEW_LINE>GlmModelData modelData = new GlmModelData();<NEW_LINE>modelData.featureColNames = meta.get(GlmTrainParams.FEATURE_COLS);<NEW_LINE>modelData.offsetColName = meta.get(GlmTrainParams.OFFSET_COL);<NEW_LINE>modelData.weightColName = meta.get... | meta.get(GlmTrainParams.FAMILY); |
573,292 | protected void renderSafe(FluidTankTileEntity te, float partialTicks, PoseStack ms, MultiBufferSource buffer, int light, int overlay) {<NEW_LINE>if (!te.isController())<NEW_LINE>return;<NEW_LINE>if (!te.window)<NEW_LINE>return;<NEW_LINE>InterpolatedChasingValue fluidLevel = te.getFluidLevel();<NEW_LINE>if (fluidLevel =... | .getAttributes().isLighterThanAir(); |
649,592 | public ObjectTypeKey unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ObjectTypeKey objectTypeKey = new ObjectTypeKey();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCu... | int originalDepth = context.getCurrentDepth(); |
1,697,932 | public ListSchedulesResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListSchedulesResult listSchedulesResult = new ListSchedulesResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDep... | class).unmarshall(context)); |
299,039 | public void run() {<NEW_LINE>while (deletedCount.get() < putCount) {<NEW_LINE>try {<NEW_LINE>final String blobIdStr = deleteBlobIds.poll(50, TimeUnit.MILLISECONDS);<NEW_LINE>if (blobIdStr != null) {<NEW_LINE>final long startTimeInMs = SystemTime.getInstance().milliseconds();<NEW_LINE>deletedCount.incrementAndGet();<NEW... | logger.trace("Deleting blob {}", blobIdStr); |
1,585,659 | public NameValue[] addBasicAuthHeader(NameValue[] theHeaders, NamedIP theTarget) {<NEW_LINE>NameValue[] headers = null;<NEW_LINE>int index = 0;<NEW_LINE><MASK><NEW_LINE>if (encodedLogin != null && !encodedLogin.trim().isEmpty()) {<NEW_LINE>if (theHeaders != null && theHeaders.length > 0) {<NEW_LINE>headers = new NameVa... | String encodedLogin = theTarget.getUserPass64(); |
699,280 | public static String toWords(CharSequence string, char separator) {<NEW_LINE>if (string == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>StringBuilder builder = new StringBuilder();<NEW_LINE>int pos = 0;<NEW_LINE>Matcher matcher = UPPER_LOWER_PATTERN.matcher(string);<NEW_LINE>while (pos < string.length()) {<NEW_LIN... | group(1).toLowerCase(); |
421,062 | public void run() throws Exception {<NEW_LINE>JobConf conf = getJobConf();<NEW_LINE>if (System.getenv(HADOOP_TOKEN_FILE_LOCATION) != null) {<NEW_LINE>conf.set(MAPREDUCE_JOB_CREDENTIALS_BINARY, System.getenv(HADOOP_TOKEN_FILE_LOCATION));<NEW_LINE>}<NEW_LINE>jobClient = new JobClient(conf);<NEW_LINE>runningJob = jobClien... | group = counters.getGroup(groupName); |
432,745 | public OIdentifiable process() {<NEW_LINE>while (target.hasNext()) {<NEW_LINE>record = target.next();<NEW_LINE>index++;<NEW_LINE>final ORecord rec = record.getRecord();<NEW_LINE>if (rec instanceof ODocument) {<NEW_LINE>ODocument doc = (ODocument) rec;<NEW_LINE>if (!doc.getIdentity().isPersistent() && doc.fields() == 1)... | .fieldNames()[0]); |
1,244,699 | String generatePassword(final int totalLength, final boolean useLowercase, final boolean useUppercase, final boolean useDigit, final boolean usePunctuation, final String groupSeparator, final int groupSize) {<NEW_LINE>if ((totalLength < 1)) {<NEW_LINE>throw new AdempiereException("Password length must be > 0");<NEW_LIN... | (generateRandomString(CHAR_LOWERCASE, 2)); |
1,776,294 | public static IndexMetadata readFrom(StreamInput in) throws IOException {<NEW_LINE>Builder builder = new Builder(in.readString());<NEW_LINE>builder.version(in.readLong());<NEW_LINE>builder.mappingVersion(in.readVLong());<NEW_LINE>builder.<MASK><NEW_LINE>builder.setRoutingNumShards(in.readInt());<NEW_LINE>builder.state(... | settingsVersion(in.readVLong()); |
1,536,953 | byte[] compile(String name, String source, CompilerSettings settings, Printer debugStream) {<NEW_LINE>String scriptName = Location.computeSourceName(name);<NEW_LINE>ScriptClassInfo scriptClassInfo = new ScriptClassInfo(painlessLookup, scriptClass);<NEW_LINE>SClass root = Walker.buildPainlessTree(scriptName, source, set... | ).visitClass(root, scriptScope); |
1,166,366 | public void run() {<NEW_LINE>try {<NEW_LINE>String output = setupFile(backupDirectory, exportType);<NEW_LINE>int tasks = taskService.countTasks();<NEW_LINE>if (tasks > 0)<NEW_LINE>doTasksExport(output);<NEW_LINE>Preferences.setLong(BackupPreferences.<MASK><NEW_LINE>Preferences.setString(BackupPreferences.PREF_BACKUP_LA... | PREF_BACKUP_LAST_DATE, DateUtilities.now()); |
229,409 | // GEN-LAST:event_cancelButtonActionPerformed<NEW_LINE>private void hashValuesTextAreaMouseClicked(java.awt.event.MouseEvent evt) {<NEW_LINE>// GEN-FIRST:event_hashValuesTextAreaMouseClicked<NEW_LINE>if (SwingUtilities.isRightMouseButton(evt)) {<NEW_LINE>JPopupMenu popup = new JPopupMenu();<NEW_LINE>// NON-NLS<NEW_LINE... | JMenuItem pasteMenu = new JMenuItem("Paste"); |
1,225,217 | private InitKind ensureClassInitialized(Class<?> clazz, boolean allowErrors) {<NEW_LINE>try {<NEW_LINE>Unsafe.<MASK><NEW_LINE>return InitKind.BUILD_TIME;<NEW_LINE>} catch (NoClassDefFoundError ex) {<NEW_LINE>if (allowErrors) {<NEW_LINE>return InitKind.RUN_TIME;<NEW_LINE>} else if (!LinkAtBuildTimeSupport.singleton().li... | getUnsafe().ensureClassInitialized(clazz); |
1,412,068 | final ListTagsForResourceResult executeListTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listTagsForResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | endClientExecution(awsRequestMetrics, request, response); |
1,472,088 | private void loadNode447() {<NEW_LINE>PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.ServerConfigurationType_CertificateGroups_DefaultApplicationGroup_TrustList_UserWritable, new QualifiedName(0, "UserWritable"), new LocalizedText("en", "UserWritable"), LocalizedText.NULL_VALUE, UInteger.valueOf... | .expanded(), true)); |
580,712 | public Object doOperation(final AddNamedView operation, final Context context, final Store store) throws OperationException {<NEW_LINE>if (null == operation.getName() || operation.getName().isEmpty()) {<NEW_LINE>throw new IllegalArgumentException("NamedView name must be set and not empty");<NEW_LINE>}<NEW_LINE>final Na... | namedViewDetail.getViewWithDefaultParams(), namedViewDetail); |
1,143,612 | private void removeMemberOfUnitController(Business business, Person person) throws Exception {<NEW_LINE>EntityManager em = business.entityManagerContainer().get(Unit.class);<NEW_LINE>CriteriaBuilder cb = em.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<Unit> cq = cb.createQuery(Unit.class);<NEW_LINE>Root<Unit> root = cq... | .get(Unit_.controllerList)); |
1,553,888 | public static ListActionDataResponse unmarshall(ListActionDataResponse listActionDataResponse, UnmarshallerContext _ctx) {<NEW_LINE>listActionDataResponse.setRequestId(_ctx.stringValue("ListActionDataResponse.RequestId"));<NEW_LINE>listActionDataResponse.setSuccess(_ctx.booleanValue("ListActionDataResponse.Success"));<... | ("ListActionDataResponse.Actions[" + i + "].ArriveTimestamp")); |
1,634,434 | private Composite createFilterComposite(final Composite myComposite) {<NEW_LINE>Composite filter = new Composite(myComposite, SWT.NONE);<NEW_LINE>GridLayout gridLayout = new GridLayout(2, false);<NEW_LINE>gridLayout.marginWidth = 2;<NEW_LINE>gridLayout.marginHeight = 0;<NEW_LINE>gridLayout.marginBottom = 2;<NEW_LINE>fi... | ToolItem(toolBar, SWT.PUSH); |
1,851,136 | private void initPlayServicesPrefsCallbacks() {<NEW_LINE>Preference pref = findPreference(getString(R.string.pref_play_services));<NEW_LINE>if (pref == null)<NEW_LINE>return;<NEW_LINE>if (GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(getActivity().getApplicationContext()) != ConnectionResult.SUCCESS... | .string.pref_settings_general), pref); |
195,384 | private int createVtableLongs(Address vtableAddress) {<NEW_LINE>AddressSetView programAddressSet = currentProgram<MASK><NEW_LINE>DataType pointer = dataTypeManager.getPointer(null);<NEW_LINE>LongDataType longDT = new LongDataType();<NEW_LINE>int offset = 0;<NEW_LINE>int numLongs = 0;<NEW_LINE>while (true) {<NEW_LINE>Ad... | .getMemory().getAllInitializedAddressSet(); |
753,144 | public Widget createWidget(int row, int cell, JSONObject hostQueueEntry, DataTable.WidgetType type) {<NEW_LINE>if (cell == 0) {<NEW_LINE>return selectionManager.createWidget(row, cell, hostQueueEntry, type);<NEW_LINE>}<NEW_LINE>// one-time hosts have # in their name, which needs to be escaped<NEW_LINE>String executionS... | hostQueueEntry.get("execution_subdir"))); |
1,751,102 | protected void handleCommand(Player player, PlayerProfile profile, PrimarySkillType skill, int value) {<NEW_LINE>int skillLevel = profile.getSkillLevel(skill);<NEW_LINE>float xpRemoved = profile.getSkillXpLevelRaw(skill);<NEW_LINE>profile.modifySkill(skill, value);<NEW_LINE>if (player == null) {<NEW_LINE>profile.schedu... | skillLevel, XPGainReason.COMMAND, skillLevel); |
811,895 | public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException, NetworkRuleConflictException {<NEW_LINE>if (getAccountType() == null && getRoleId() == null) {<NEW_LINE>throw new ServerApiException(ApiErrorCode.PARAM... | , getAccountName(user), domain); |
1,022,601 | private void inferMonitoringDashboardProperties(ConfigurableEnvironment environment, Properties properties) {<NEW_LINE>try {<NEW_LINE>if (isMetricsRegistryEnabled(WavefrontProperties.class, environment)) {<NEW_LINE>logger.info("Dashboard type:" + MonitoringDashboardType.WAVEFRONT);<NEW_LINE>properties.setProperty(MONIT... | , environment.getProperty("management.metrics.export.wavefront.source")); |
1,151,871 | protected void addSummaryGroup(List<FillColumn> fillColumns) {<NEW_LINE>JRDesignGroup summaryGroup = new JRDesignGroup();<NEW_LINE>// TODO check for uniqueness<NEW_LINE>summaryGroup.setName(SUMMARY_GROUP_NAME);<NEW_LINE>JRDesignBand groupFooter = new JRDesignBand();<NEW_LINE>groupFooter.setSplitType(SplitTypeEnum.PREVE... | > footerChildren = pageFooter.getChildren(); |
1,192,438 | public MLData buildForNetworkInput(final double[] data) {<NEW_LINE>// feed the input fields<NEW_LINE>int index = 0;<NEW_LINE>for (final InputField field : this.inputFields) {<NEW_LINE>if (field.getUsedForNetworkInput()) {<NEW_LINE>if (index >= data.length) {<NEW_LINE>throw new NormalizationError(<MASK><NEW_LINE>}<NEW_L... | "Can't build data, input fields used for neural input, must match provided data(" + data.length + ")."); |
495,586 | public static List<ListenerConfig> buildServerAdminConfigs(PinotConfiguration serverConf) {<NEW_LINE>List<ListenerConfig> listeners = new ArrayList<>();<NEW_LINE>String adminApiPortString = serverConf.getProperty(CommonConstants.Server.CONFIG_OF_ADMIN_API_PORT);<NEW_LINE>if (adminApiPortString != null) {<NEW_LINE>liste... | (serverConf, "pinot.server.adminapi", tlsDefaults)); |
1,710,720 | public ResponseType proxy(RequestType request, Context context) {<NEW_LINE>lambdaContext = context;<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>SecurityContext securityContext = securityContextWriter.writeSecurityContext(request, context);<NEW_LINE>ContainerRequestType containerRequest = requestReader.readRequest(request, ... | CountDownLatch latch = new CountDownLatch(1); |
961,456 | <K, V> CommandArgs<K, V> bind(CommandArgs<K, V> args, RedisCodec<K, V> codec, CommandSegments commandSegments, MethodParametersAccessor accessor) {<NEW_LINE>int parameterCount = accessor.getParameterCount();<NEW_LINE>BitSet set = new BitSet(parameterCount);<NEW_LINE>for (CommandSegment commandSegment : commandSegments)... | set(argumentContribution.getParameterIndex()); |
1,761,758 | void createContainerWithClientEncryptionPolicy(CosmosAsyncClient client) {<NEW_LINE>ClientEncryptionIncludedPath includedPath1 = new ClientEncryptionIncludedPath();<NEW_LINE>includedPath1.setClientEncryptionKeyId("key1");<NEW_LINE>includedPath1.setPath("/sensitive");<NEW_LINE>includedPath1.setEncryptionType(CosmosEncry... | ClientEncryptionPolicy clientEncryptionPolicy = new ClientEncryptionPolicy(paths); |
1,804,605 | public List<Configuration> toVendorIndependentConfigurations() throws VendorConversionException {<NEW_LINE>String hostname = getHostname();<NEW_LINE>_c = new Configuration(hostname, _vendor);<NEW_LINE>_c.setHumanName(hostname);<NEW_LINE>_c.setDeviceModel(DeviceModel.CHECK_POINT_GATEWAY);<NEW_LINE>_c.setDefaultCrossZone... | .get(), mgmtObjects)); |
1,423,883 | public boolean start() {<NEW_LINE><MASK><NEW_LINE>try (InfluxDB influxDB = getConnection(spec.dataSourceConfiguration(), spec.disableCertificateValidation())) {<NEW_LINE>final String db = spec.database();<NEW_LINE>influxDB.setDatabase(spec.database());<NEW_LINE>influxDB.setRetentionPolicy(spec.retentionPolicy());<NEW_L... | InfluxDbIO.Read spec = source.spec; |
1,818,407 | protected void partialFinish(ManufOrder manufOrder, int inOrOut) throws AxelorException {<NEW_LINE>if (inOrOut != PART_FINISH_IN && inOrOut != PART_FINISH_OUT) {<NEW_LINE>throw new IllegalArgumentException(I18n.get(IExceptionMessage.IN_OR_OUT_INVALID_ARG));<NEW_LINE>}<NEW_LINE>Company company = manufOrder.getCompany();... | setOrigin(manufOrder.getManufOrderSeq()); |
354,228 | private File loadTemplate(String template) throws MojoExecutionException {<NEW_LINE>File tplFile = null;<NEW_LINE>if (template.startsWith("http://") || template.startsWith("https://")) {<NEW_LINE>tplFile = new File(project.getBuild().getDirectory() + File.separator + "templates");<NEW_LINE>tplFile.mkdirs();<NEW_LINE>tr... | throw new MojoExecutionException("Cannot find template file " + tplFile); |
320,790 | public ResponseEntity<BufferedImage> photo(@PathVariable String id, HttpServletRequest request) throws Exception {<NEW_LINE>InputStream photo = sparklrService.loadSparklrPhoto(id);<NEW_LINE>if (photo == null) {<NEW_LINE>throw new UnavailableException("The requested photo does not exist");<NEW_LINE>}<NEW_LINE>BufferedIm... | ImageReader imageReader = imageReaders.next(); |
158,840 | protected static void extractNamedEntityMentions(CoreMap s, List<Mention> mentions, Set<IntPair> mentionSpanSet, Set<IntPair> namedEntitySpanSet) {<NEW_LINE>List<CoreLabel> sent = s.get(CoreAnnotations.TokensAnnotation.class);<NEW_LINE>SemanticGraph basicDependency = s.get(SemanticGraphCoreAnnotations.BasicDependencies... | CoreAnnotations.IndexAnnotation.class) - 1; |
172,690 | public void downloadComponentBetweenDates(Customer customer, Universe universe, Path bundlePath, Date startDate, Date endDate) throws IOException, ParseException {<NEW_LINE>// Get application configured locations<NEW_LINE>String appHomeDir = config.hasPath("application.home") ? config.getString("application.home") : ".... | (Paths.get(destDir)); |
842,034 | public Movie toMovie() throws IOException {<NEW_LINE>ArrayList<Actor> actors = new ArrayList<>();<NEW_LINE>if (actor != null) {<NEW_LINE>actors = new ArrayList<<MASK><NEW_LINE>for (KodiXmlActorBean currentActor : actor) {<NEW_LINE>actors.add(currentActor.toActor());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Thumb[] posterThumbs;<... | >(actor.size()); |
59,965 | private Mono<Response<Void>> deleteSourceControlWithResponseAsync(String resourceGroupName, String name, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LI... | error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); |
1,751,292 | static void decrypt(String plaintext, char[][] keyMatrix, int size1) {<NEW_LINE>int i = 0;<NEW_LINE>int[] list = new int[4];<NEW_LINE>char[] plt = new char[size1];<NEW_LINE>// cipher the plain text with the key matrix we built<NEW_LINE>while (i < size1) {<NEW_LINE>search(keyMatrix, plaintext.charAt(i), plaintext.charAt... | )][list[1]]; |
897,986 | public boolean updateAlarm(SonosAlarm alarm) {<NEW_LINE>if (alarm != null && isConfigured()) {<NEW_LINE>Service service = device.findService(new UDAServiceId("AlarmClock"));<NEW_LINE>Action action = service.getAction("ListAlarms");<NEW_LINE>ActionInvocation invocation = new ActionInvocation(action);<NEW_LINE>DateTimeFo... | invocation.setInput("IncludeLinkedZones", "0"); |
761,410 | private void buildPrepParams(TDSWriter tdsWriter) throws SQLServerException {<NEW_LINE>if (getStatementLogger().isLoggable(java.util.logging.Level.FINE))<NEW_LINE>getStatementLogger().fine(toString() + ": calling sp_prepare: PreparedHandle:" + getPreparedStatementHandle() + ", SQL:" + preparedSQL);<NEW_LINE>expectPrepS... | .writeByte((byte) 0); |
1,114,999 | private void ingestPolicy(final Urn urn, final DataHubPolicyInfo info) throws URISyntaxException {<NEW_LINE>// 3. Write key & aspect<NEW_LINE>final MetadataChangeProposal keyAspectProposal = new MetadataChangeProposal();<NEW_LINE>final AspectSpec keyAspectSpec = _entityService.getKeyAspectSpec(urn);<NEW_LINE>GenericAsp... | final MetadataChangeProposal proposal = new MetadataChangeProposal(); |
1,849,281 | public emu.grasscutter.net.proto.EntityAuthorityInfoOuterClass.EntityAuthorityInfo buildPartial() {<NEW_LINE>emu.grasscutter.net.proto.EntityAuthorityInfoOuterClass.EntityAuthorityInfo result = new emu.grasscutter.net.proto.EntityAuthorityInfoOuterClass.EntityAuthorityInfo(this);<NEW_LINE>int from_bitField0_ = bitField... | util.Collections.unmodifiableList(poseParaList_); |
747,175 | public static void drawIndexes(Graphics2D g2, int fontSize, List<Point2D_F64> points, @Nullable Point2Transform2_F32 transform, double scale) {<NEW_LINE>int numDigits = BoofMiscOps.numDigits(points.size());<NEW_LINE>String format = "%" + numDigits + "d";<NEW_LINE>Font regular = new Font("Serif", Font.PLAIN, fontSize);<... | AffineTransform origTran = g2.getTransform(); |
1,650,633 | public void addTokenUnmodifiedSearch(String theSearchParamName, List<List<IQueryParameterType>> theAndOrTerms) {<NEW_LINE>if (CollectionUtils.isEmpty(theAndOrTerms)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>for (List<? extends IQueryParameterType> nextAnd : theAndOrTerms) {<NEW_LINE>ourLog.debug("addTokenUnmodifiedSearch... | matching(token.getValue()); |
1,311,090 | public boolean castingConversionTo(TypeDecl type) {<NEW_LINE>Object _parameters = type;<NEW_LINE>if (castingConversionTo_TypeDecl_values == null)<NEW_LINE>castingConversionTo_TypeDecl_values = new java.util.HashMap(4);<NEW_LINE>if (castingConversionTo_TypeDecl_values.containsKey(_parameters)) {<NEW_LINE>return ((Boolea... | , Boolean.valueOf(castingConversionTo_TypeDecl_value)); |
16,751 | /*<NEW_LINE>* Returns a Ghidra {@link FunctionDefinition} datatype built using the info from the DWARF die.<NEW_LINE>* <p><NEW_LINE>* Function types may be assigned "mangled" names with parameter type info if the name<NEW_LINE>* is already used or if this is an unnamed function defintion.<NEW_LINE>* <p><NEW_LINE>* Can ... | dni, diea.getOffset()); |
1,144,681 | public MethodTree Method(ModifiersTree modifiers, CharSequence name, Tree returnType, List<? extends TypeParameterTree> typeParameters, List<? extends VariableTree> parameters, List<? extends ExpressionTree> throwsList, BlockTree body, ExpressionTree defaultValue, boolean isVarArgs) {<NEW_LINE>ListBuffer<JCTypeParamete... | = new ListBuffer<JCVariableDecl>(); |
882,493 | public static String formatDuration(@Nullable Duration duration) {<NEW_LINE>if (duration == null || duration.isZero() || duration.isNegative()) {<NEW_LINE>return "";<NEW_LINE>}<NEW_LINE>StringBuilder formattedDuration = new StringBuilder();<NEW_LINE>long hours = duration.toHours();<NEW_LINE>long minutes = duration.toMi... | long seconds = duration.getSeconds(); |
1,673,766 | public static void main(String[] args) throws Exception {<NEW_LINE>WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.createPackage();<NEW_LINE>String outputfilepath = System.getProperty("user.dir") + "/OUT_bookmarkAdd.docx";<NEW_LINE>;<NEW_LINE>wordMLPackage.getMainDocumentPart().addParagraphOfText("x");<... | getMainDocumentPart().addParagraphOfText("x"); |
708,245 | private void saveImageAsNewImage(ResourceFieldLocation imageLocation) {<NEW_LINE>Data data = imageLocation.getResourceData();<NEW_LINE>if (data == null || !(data.getValue() instanceof DataImage)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>DataImage dataImage = (DataImage) data.getValue();<NEW_LINE>GhidraFileChooser chooser... | getExtension(f.getName()); |
1,063,388 | final GetFileUploadURLResult executeGetFileUploadURL(GetFileUploadURLRequest getFileUploadURLRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getFileUploadURLRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
1,130,514 | public void loadTransportRoutes(int[] filePointers, TIntObjectHashMap<TransportRoute> result) throws IOException {<NEW_LINE>Map<TransportIndex, TIntArrayList> groupPoints = new <MASK><NEW_LINE>for (int filePointer : filePointers) {<NEW_LINE>TransportIndex ind = getTransportIndex(filePointer);<NEW_LINE>if (ind != null) ... | HashMap<TransportIndex, TIntArrayList>(); |
459,786 | private void doShardReport(final HttpServletRequest req, final HttpServletResponse resp) throws IOException {<NEW_LINE>if (!isReadable(getServletContext(), req, resp)) {<NEW_LINE>// HA Quorum in use, but quorum is not met.<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!getBigdataRDFContext().isScaleOut()) {<NEW_LINE>buildAn... | (req.getParameter("o")); |
151,016 | private String printToken(Token token) {<NEW_LINE>int modeAsInt = _combinedParser.getTokenMode(token);<NEW_LINE>String mode = _combinedParser.getLexer().getModeNames()[modeAsInt];<NEW_LINE>String rawTokenText = token.getText();<NEW_LINE>String tokenText = BatfishCombinedParser.escape(rawTokenText);<NEW_LINE>int tokenTy... | getVocabulary().getSymbolicName(tokenType); |
1,171,668 | public void unauthenticateUser(final PwmRequest pwmRequest) throws PwmUnrecoverableException {<NEW_LINE>final LocalSessionStateBean ssBean = getSessionStateBean();<NEW_LINE>if (getLoginInfoBean().isAuthenticated()) {<NEW_LINE>// try to tear out a session normally.<NEW_LINE>getUserSessionDataCacheBean().clearPermissions... | getLoginInfoBean().setAuthenticated(false); |
1,759,531 | private void run(Options options, ConfigLoader configLoader, String migrationName, Path workdir, ImmutableList<String> sourceRefs) throws RepoException, ValidationException, IOException {<NEW_LINE>Config config = loadConfig(options, configLoader, migrationName);<NEW_LINE>Migration <MASK><NEW_LINE>if (!options.get(Workf... | migration = config.getMigration(migrationName); |
800,294 | public void performRewriteToMemberReference() {<NEW_LINE>MethodTree methodTree = getMethodFromFunctionalInterface(newClassTree);<NEW_LINE>if (methodTree.getBody() == null || methodTree.getBody().getStatements().size() != 1)<NEW_LINE>return;<NEW_LINE>Tree tree = methodTree.getBody().getStatements().get(0);<NEW_LINE>if (... | copy.rewrite(newClassTree, changed); |
1,297,008 | public static Object toValue(Datapoint datapoint, byte[] data) throws Exception {<NEW_LINE>DPTXlator translator = TranslatorTypes.createTranslator(0, datapoint.getDPT());<NEW_LINE>translator.setData(data);<NEW_LINE>LOG.info("Received KNX data: " + translator.getType().getID() + " (" + translator.getType().getDescriptio... | DPTXlatorBoolean) translator).getValueBoolean(); |
54,679 | private void initialise(AttributeSet attrs) {<NEW_LINE>TypedArray a = getContext().obtainStyledAttributes(<MASK><NEW_LINE>try {<NEW_LINE>this.roundedCorners = a.getBoolean(R.styleable.BootstrapDropDown_roundedCorners, false);<NEW_LINE>this.showOutline = a.getBoolean(R.styleable.BootstrapDropDown_showOutline, false);<NE... | attrs, R.styleable.BootstrapDropDown); |
79,184 | public static void main(String[] args) throws IOException {<NEW_LINE>LuceneLanguageModel lm = new LuceneLanguageModel(new File(NGRAMS));<NEW_LINE>Dictionary dictionary = Dictionary.read(JLanguageTool.getDataBroker().getFromResourceDirAsUrl("/de/german.dict"));<NEW_LINE><MASK><NEW_LINE>Map<String, String> lc = new HashM... | DictionaryLookup dl = new DictionaryLookup(dictionary); |
1,819,698 | public static int parseCSS2FontWeight(String text) {<NEW_LINE>int weight = 400;<NEW_LINE>try {<NEW_LINE>weight = Integer.parseInt(text);<NEW_LINE>weight = (weight / 100) * 100;<NEW_LINE>weight = Math.max(weight, 100);<NEW_LINE>weight = <MASK><NEW_LINE>} catch (NumberFormatException nfe) {<NEW_LINE>// weight is no numbe... | Math.min(weight, 900); |
265,422 | private // private static final int FUNCTION_VISIBILITY = 7;<NEW_LINE>void createFunction(RecordBuffer buffer) {<NEW_LINE>long name = readNameFromStrTab(buffer);<NEW_LINE>Type type = types.get(buffer.readInt());<NEW_LINE>if (type instanceof PointerType) {<NEW_LINE>type = ((PointerType) type).getPointeeType();<NEW_LINE>... | paramAttr, index.getAndIncrement()); |
1,716,369 | public void preProcess(PreviewModel previewModel) {<NEW_LINE>PreviewProperties properties = previewModel.getProperties();<NEW_LINE>if (properties.getBooleanValue(PreviewProperty.NODE_LABEL_SHORTEN)) {<NEW_LINE>// Shorten labels<NEW_LINE>Item[] nodeLabelsItems = previewModel.getItems(Item.NODE_LABEL);<NEW_LINE>int maxCh... | getItem(Item.NODE, node); |
1,455,491 | public PageResult<AbstractionVO> query(AbstractionQuery query) {<NEW_LINE>PageHelper.startPage(query.getPageNo(), query.getPageSize());<NEW_LINE>Example example = new Example(AbstractionPO.class);<NEW_LINE>Example.<MASK><NEW_LINE>criteria.andEqualTo("modelId", query.getModelId());<NEW_LINE>if (query.getAggregateType() ... | Criteria criteria = example.createCriteria(); |
490,427 | protected JSValue invoke(HMBase instance, String methodName, Object... params) {<NEW_LINE>switch(methodName) {<NEW_LINE>case "addEventListener":<NEW_LINE>{<NEW_LINE>String key = String<MASK><NEW_LINE>JSCallback callback = (JSCallback) params[1];<NEW_LINE>NotifyCenter.addEventListener(key, callback);<NEW_LINE>break;<NEW... | .valueOf(params[0]); |
429,658 | public void init(final Object target, ServiceRegistry services) {<NEW_LINE>super.init(target, services);<NEW_LINE>this.scriptServices = services;<NEW_LINE>loggingManager = services.get(LoggingManager.class);<NEW_LINE>if (target instanceof HasScriptServices) {<NEW_LINE>HasScriptServices scriptServices = (HasScriptServic... | getFileResolver(), fileCollectionFactory, services); |
737,723 | private static Map<Way, int[]> resortWaysToStopsOrder(List<Way> forwardWays, List<TransportStop> forwardStops) {<NEW_LINE>final Map<Way, int[]> orderWays = new HashMap<Way, int[]>();<NEW_LINE>if (forwardWays != null && forwardStops.size() > 0) {<NEW_LINE>// resort ways to stops order<NEW_LINE>for (Way w : forwardWays) ... | ), firstNode.getLongitude()); |
769,733 | private String nodeToRankingExpression(LightGBMNode node) {<NEW_LINE>if (node.isLeaf()) {<NEW_LINE>return Double.toString(node.getLeaf_value());<NEW_LINE>} else {<NEW_LINE>String condition;<NEW_LINE>String feature = featureNames.get(node.getSplit_feature());<NEW_LINE>if (node.getDecision_type().equals("==")) {<NEW_LINE... | + feature + " in [ " + values + "])"; |
1,337,519 | private boolean fromSubjectTest(StringBuffer sb) {<NEW_LINE>boolean pass = false;<NEW_LINE>try {<NEW_LINE>Subject subject = WSSubject.getCallerSubject();<NEW_LINE>// set delegate to false for s4u2proxy testing<NEW_LINE>String token = SpnegoTokenHelper.buildSpnegoAuthorizationFromSubject(spn, subject, lifetime, false);<... | writeLine(sb, "GSSCredential name is: " + gssName); |
903,560 | private void addModelsToRepo() {<NEW_LINE>if (isNotEmpty(folderFileExtMap)) {<NEW_LINE>Iterator<String> iterator = folderFileExtMap.keySet().iterator();<NEW_LINE>while (iterator.hasNext()) {<NEW_LINE>String folderName = iterator.next();<NEW_LINE>final String[] validExtension = folderFileExtMap.get(folderName);<NEW_LINE... | new ReadyMarker(READYMARKER_TYPE, ext)); |
1,812,079 | private void loadDevelopersAsynchronously() {<NEW_LINE>Task.Backgroundable task = new Task.Backgroundable(null, "Loading developers list", true) {<NEW_LINE><NEW_LINE>private final Collection[] myDevelopers = new Collection[] { Collections.emptyList() };<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run(@Nonnull Pro... | ] = DevelopersLoader.fetchDevelopers(indicator); |
1,343,557 | public String formatFullInteractive() {<NEW_LINE>StringBuilder builder = new StringBuilder();<NEW_LINE>builder.<MASK><NEW_LINE>builder.append(" at ");<NEW_LINE>builder.append("0x");<NEW_LINE>builder.append(Long.toHexString(this.getAddress()));<NEW_LINE>builder.append(" {");<NEW_LINE>builder.append(nl);<NEW_LINE>Structu... | append(this.getTargetName()); |
203,242 | private void processInterfaceMethodScope(MethodScope methodScope) {<NEW_LINE>PhpModifiers phpModifiers = methodScope.getPhpModifiers();<NEW_LINE>List<HintFix> fixes;<NEW_LINE>String invalidModifier;<NEW_LINE>if (phpModifiers.isPrivate()) {<NEW_LINE>// NOI18N<NEW_LINE>invalidModifier = "private";<NEW_LINE>fixes = Collec... | .getNameRange(), fixes)); |
605,756 | private Mono<PagedResponse<RegistryInner>> listSinglePageAsync() {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is requir... | error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); |
479,644 | private Cursor handlePartitionedTable(PartitionInfo partitionInfo) {<NEW_LINE>ArrayResultCursor result = new ArrayResultCursor("TOPOLOGY");<NEW_LINE>result.addColumn("ID", DataTypes.IntegerType);<NEW_LINE>result.<MASK><NEW_LINE>result.addColumn("TABLE_NAME", DataTypes.StringType);<NEW_LINE>result.addColumn("PARTITION_N... | addColumn("GROUP_NAME", DataTypes.StringType); |
10,819 | private void updateQueue(QueueTask qt) {<NEW_LINE>if (System.currentTimeMillis() - qt.order.createdTime >= this.queueTime) {<NEW_LINE>// since payment time is lesser than queuetime it would have already failed..<NEW_LINE>// additional check not needed<NEW_LINE>LOG.trace(ORDER_ID + ": Queue time for order over, failed..... | ": Error in connecting to queue db, trying again..", qt.order.id); |
1,664,229 | public boolean isVulnerable(Context context) throws Exception {<NEW_LINE>String fileName1 = "test_file_name1";<NEW_LINE>String fileName2 = "test_file_name2";<NEW_LINE>byte[<MASK><NEW_LINE>byte[] file2data = "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB".getBytes();<NEW_LINE>// create the template data<NEW_LINE>ByteArray... | ] file1Data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".getBytes(); |
1,746,203 | @Path("/api/projects/{id}")<NEW_LINE>@ApiOperation("Delete a project")<NEW_LINE>public RestProject deleteProject(@PathParam("id") int projId) throws ResourceNotFoundException, AccessControlException {<NEW_LINE>return tm.<RestProject, ResourceNotFoundException, AccessControlException>begin(() -> {<NEW_LINE>ProjectStore ... | rm.getProjectStore(getSiteId()); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.