idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,143,991 | public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {<NEW_LINE>FunFact fact = (FunFact) Objects.requireNonNull(getArguments<MASK><NEW_LINE>View view = inflater.inflate(R.layout.fragment_funfact, container, false);<NEW_LINE>ViewHolder holder = new ViewHolder(view);<... | ()).getSerializable(EXTRA_MESSAGE_FUNFACT_OBJECT); |
1,113,962 | final DeleteSizeConstraintSetResult executeDeleteSizeConstraintSet(DeleteSizeConstraintSetRequest deleteSizeConstraintSetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteSizeConstraintSetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteSizeConstraintSet"); |
1,047,150 | protected static Memory _array_diff_impl(Environment env, TraceInfo trace, Memory array1, Memory array, Memory[] arrays, ArrayDiffCallback callback) throws Throwable {<NEW_LINE>if (expecting(env, trace, 1, array1, ARRAY) && expecting(env, trace, 2, array, ARRAY)) {<NEW_LINE>ForeachIterator iterator = array1.getNewItera... | ), value.toImmutable()); |
1,439,209 | public static ClientMessage encodeRequest(java.lang.String name, com.hazelcast.internal.serialization.Data key, com.hazelcast.internal.serialization.Data value, long threadId, long ttl, long maxIdle) {<NEW_LINE>ClientMessage clientMessage = ClientMessage.createForEncode();<NEW_LINE>clientMessage.setRetryable(false);<NE... | StringCodec.encode(clientMessage, name); |
381,527 | public void fromElement(FbxElement element) {<NEW_LINE>super.fromElement(element);<NEW_LINE>for (FbxElement child : element.children) {<NEW_LINE>if (!child.id.equals("PoseNode")) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>FbxId node = null;<NEW_LINE>float[] matData = null;<NEW_LINE>for (FbxElement e : child.children) {<N... | e.properties.get(0); |
1,646,651 | ActionResult<Wo> execute(EffectivePerson effectivePerson, String flag, String applicationFlag) throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>Business business = new Business(emc);<NEW_L... | emc.beginTransaction(File.class); |
1,338,510 | // method has sufficient tracing<NEW_LINE>@Trivial<NEW_LINE>public boolean isUpToDateWith(CacheEntry current) {<NEW_LINE>if (model == null || configProperties == null) {<NEW_LINE>throw new IllegalStateException("isUpToDateWith called on CacheEntry not read from disk");<NEW_LINE>}<NEW_LINE>Objects.requireNonNull(current... | "Cache out of date because files have changed", fileEntries, current.fileEntries); |
278,141 | public int updatePageMaxFreeSpace(final int pageIndex, final int freeSpace) {<NEW_LINE>assert freeSpace < (1 << (CELL_SIZE * 8));<NEW_LINE>assert pageIndex >= 0;<NEW_LINE>if (pageIndex >= CELLS_PER_PAGE) {<NEW_LINE>throw new IllegalArgumentException("Page index " + pageIndex + " exceeds tree capacity");<NEW_LINE>}<NEW_... | (pageIndex, oldFreeSpace, freeSpace)); |
1,262,711 | private URL buildURL(final TickerSymbol ticker, final Date from, final Date to) throws IOException {<NEW_LINE>// process the dates<NEW_LINE>final Calendar calendarFrom = Calendar.getInstance();<NEW_LINE>calendarFrom.setTime(from);<NEW_LINE>final Calendar calendarTo = Calendar.getInstance();<NEW_LINE>calendarTo.setTime(... | .get(Calendar.YEAR)); |
948,675 | public final void handleCancel() {<NEW_LINE>final Subscription currentSubscription = this.s;<NEW_LINE>if (currentSubscription == Operators.cancelledSubscription()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (currentSubscription == null) {<NEW_LINE>// if subscription is null, it means that streams has not yet reassembled... | requesterResponderSupport.remove(streamId, this); |
972,892 | public void testCriteriaQuery_Integer(TestExecutionContext testExecCtx, TestExecutionResources testExecResources, Object managedComponentObject) throws Throwable {<NEW_LINE>final String testName = getTestName();<NEW_LINE>// Verify parameters<NEW_LINE>if (testExecCtx == null || testExecResources == null) {<NEW_LINE>Asse... | CriteriaBuilder cb = em.getCriteriaBuilder(); |
1,569,649 | public static void reloadConfig(EnumRestartRequirement restarted) {<NEW_LINE>if (EnumRestartRequirement.WORLD.hasBeenRestarted(restarted)) {<NEW_LINE>addBiomeNames(propExcludedBiomes, excludedBiomes);<NEW_LINE>addBiomeNames(propExcessiveBiomes, excessiveBiomes);<NEW_LINE>addBiomeNames(propSurfaceDepositBiomes, surfaceD... | addAll(propExcludedDimensions.getIntList()); |
1,255,825 | private void removeBindings() {<NEW_LINE>priceCurrencyLabel.textProperty().unbind();<NEW_LINE>triggerPriceCurrencyLabel.textProperty().unbind();<NEW_LINE>triggerPriceDescriptionLabel.textProperty().unbind();<NEW_LINE>percentagePriceDescriptionLabel.textProperty().unbind();<NEW_LINE>volumeCurrencyLabel.textProperty().un... | .disableProperty().unbind(); |
1,401,192 | private void prepareColors(final StylingPolicy sp) {<NEW_LINE>if (colors == null) {<NEW_LINE>final ColorLibrary cols = shared.stylelib.getColorSet(StyleLibrary.PLOT);<NEW_LINE>if (sp instanceof ClassStylingPolicy) {<NEW_LINE>ClassStylingPolicy csp = (ClassStylingPolicy) sp;<NEW_LINE>final int maxStyle = csp.getMaxStyle... | = col.getBlue() / 255.f; |
143,275 | private void loadAddresses(MatchInfo matchInfo) {<NEW_LINE>VTMatch match = matchInfo.getMatch();<NEW_LINE>VTAssociation association = match.getAssociation();<NEW_LINE>Address sourceAddress = association.getSourceAddress();<NEW_LINE>Address destinationAddress = association.getDestinationAddress();<NEW_LINE><MASK><NEW_LI... | int sourceLength = match.getSourceLength(); |
548,959 | public void updateMetaParams(List<String> recordIDs, Map<String, String> metaParams) {<NEW_LINE>// Define the directories used to lookup the recording<NEW_LINE>List<String> states = new ArrayList<>();<NEW_LINE>states.add(Recording.STATE_PUBLISHED);<NEW_LINE>states.add(Recording.STATE_UNPUBLISHED);<NEW_LINE>states.add(R... | recordID, entry.getValue()); |
1,104,119 | protected static void newRouter(Engine engine, NonApplicationRootPathBuildItem nonApplicationRootPathBuildItem) {<NEW_LINE>// "/" or "/myroot/"<NEW_LINE>String httpRootPath = nonApplicationRootPathBuildItem.getNormalizedHttpRootPath();<NEW_LINE>// "/" or "/myroot/" or "/q/" or "/myroot/q/"<NEW_LINE>String frameworkRoot... | message, event.failure()); |
463,840 | public DynamoDBTarget unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DynamoDBTarget dynamoDBTarget = new DynamoDBTarget();<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(); |
1,479,427 | public com.amazonaws.services.elasticfilesystem.model.InsufficientThroughputCapacityException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.elasticfilesystem.model.InsufficientThroughputCapacityException insufficientThroughputCapacityException = new com.amazon... | int originalDepth = context.getCurrentDepth(); |
576,863 | public void updateCorrelationType(CorrelationAttributeInstance.Type aType) throws CentralRepoException {<NEW_LINE>Connection conn = connect();<NEW_LINE>PreparedStatement preparedStatement = null;<NEW_LINE>String sql = "UPDATE correlation_types SET display_name=?, db_table_name=?, supported=?, enabled=? WHERE id=?";<NEW... | isSupported() ? 1 : 0); |
1,327,564 | protected void run(URL url, Map<String, String> headers) {<NEW_LINE>this.listener = new WatcherWebSocketListener<>(this);<NEW_LINE>Builder builder = client.newWebSocketBuilder();<NEW_LINE><MASK><NEW_LINE>builder.uri(URI.create(url.toString()));<NEW_LINE>this.websocketFuture = builder.buildAsync(this.listener).handle((w... | headers.forEach(builder::header); |
1,070,204 | public long nextFragment(final int length, final int streamId) {<NEW_LINE>currentOffset = nextOffset;<NEW_LINE>final int framedLength = framedLength(length);<NEW_LINE>nextOffset += alignedLength(framedLength);<NEW_LINE>// ensure that there is enough capacity for padding message, or less than frame alignment which<NEW_L... | = buffer.capacity() - nextOffset; |
695,597 | public void createBindings() {<NEW_LINE>LengthConverter lengthConverter = new LengthConverter();<NEW_LINE>IntegerConverter intConverter = new IntegerConverter();<NEW_LINE>DoubleConverter doubleConverter = new DoubleConverter(Configuration.get().getLengthDisplayFormat());<NEW_LINE>MutableLocationProxy location = new Mut... | feeder, "visionEnabled", chckbxUseVision, "selected"); |
395,074 | public static BytesMessage msgConvert(org.apache.rocketmq.common.message.MessageExt rmqMsg) {<NEW_LINE>BytesMessage omsMsg = new BytesMessageImpl();<NEW_LINE>omsMsg.setBody(rmqMsg.getBody());<NEW_LINE>KeyValue headers = omsMsg.sysHeaders();<NEW_LINE>KeyValue properties = omsMsg.userHeaders();<NEW_LINE>final Set<Map.Ent... | DESTINATION, rmqMsg.getTopic()); |
1,730,792 | public static void viewImageInStandardApp(final Activity activity, final Uri imageUri) {<NEW_LINE>try {<NEW_LINE>final Intent intent = new Intent().setAction(Intent.ACTION_VIEW);<NEW_LINE>File file = UriUtils.isFileUri(imageUri) ? UriUtils.toFile(imageUri) : null;<NEW_LINE>final String mimeType;<NEW_LINE>if (file == nu... | Log.e("ImageUtils.viewImageInStandardApp", e); |
1,499,258 | public void existsTest() throws IOException {<NEW_LINE>String testFile = PathUtils.concatPath(mTopLevelTestDirectory, "testFile");<NEW_LINE>if (mUfs.isFile(testFile)) {<NEW_LINE>throw new IOException(IS_FAIL_CHECK_SHOULD_FAILED);<NEW_LINE>}<NEW_LINE>createEmptyFile(testFile);<NEW_LINE>if (!mUfs.isFile(testFile)) {<NEW_... | mConfiguration).setCreateParent(false)); |
770,058 | public static DescribeAiotPersonTablesResponse unmarshall(DescribeAiotPersonTablesResponse describeAiotPersonTablesResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeAiotPersonTablesResponse.setRequestId(_ctx.stringValue("DescribeAiotPersonTablesResponse.RequestId"));<NEW_LINE>describeAiotPersonTablesResponse.setMe... | = new ArrayList<PersonTableType>(); |
1,689,732 | public static void main(String[] args) throws IOException {<NEW_LINE><MASK><NEW_LINE>final int start_city = cityMap.start_city;<NEW_LINE>final int end_city = cityMap.end_city;<NEW_LINE>int[] rescues = cityMap.rescues;<NEW_LINE>boolean[] visited = new boolean[cityMap.cityNumbers];<NEW_LINE>TreeSet<Node> nodes = new Tree... | final CityMap cityMap = new CityMap(); |
40,951 | public void addNotify() {<NEW_LINE>super.addNotify();<NEW_LINE>int ptSize = getFont().getSize();<NEW_LINE>if (useMonospacedFont) {<NEW_LINE>// NOI18N<NEW_LINE>Font font = new Font("Monospaced", Font.PLAIN, ptSize);<NEW_LINE>setFont(font);<NEW_LINE>}<NEW_LINE>fontMetrics = getFontMetrics(getFont());<NEW_LINE>int width =... | = new Dimension(totalWidth, totalHeight); |
1,363,829 | private void handleHtml(TagElement node) {<NEW_LINE>if (!this.options.comment_format_html && !this.options.comment_format_source)<NEW_LINE>return;<NEW_LINE>String text = this.tm.toString(node);<NEW_LINE>Matcher matcher = HTML_TAG_PATTERN.matcher(text);<NEW_LINE>while (matcher.find()) {<NEW_LINE>int startPos = matcher.s... | == matcher.end(1)); |
322,031 | private void prepeareQueuePopupButton() {<NEW_LINE>final JPopupMenu popQ = new JPopupMenu();<NEW_LINE>ArrayList<DownloadQueue> qlist = QueueManager.getInstance().getQueueList();<NEW_LINE>JMenuItem[] qItems = new JMenuItem[qlist.size() + 1];<NEW_LINE>qItems[0] = new JMenuItem(StringResource.get("LBL_ALL_QUEUE"));<NEW_LI... | 0, btnQueue.getHeight()); |
1,554,645 | public <T> T monitorValue(T obj, ToDoubleFunction<T> f) {<NEW_LINE>final Id id = baseId.withTags(extraTags);<NEW_LINE>if (obj == null) {<NEW_LINE>registry.propagate(new IllegalArgumentException("obj is null for PolledMeter (id = " + id + "), no data will be reported. " + "See the API docs for monitorValue for guidance ... | class, c.getClass()); |
272,225 | public void init() throws javax.naming.NamingException, javax.ejb.CreateException, java.rmi.RemoteException {<NEW_LINE>// Create the initial context using the default context given to<NEW_LINE>// us by the J2EE Client Container<NEW_LINE>System.out.print("--Creating InitialContext... ");<NEW_LINE>InitialContext initCtx ... | narrow(homeObject, BasicCalculatorHome.class); |
860,606 | public ActionReport process(final ActionReport report, final String filter) {<NEW_LINE>if (monitoringService != null) {<NEW_LINE>String level = monitoringService.getMonitoringLevel("jvm");<NEW_LINE>if ((level != null) && (level.equals(ContainerMonitoring.LEVEL_OFF))) {<NEW_LINE>report.setActionExitCode(ActionReport.Exi... | .getLocalString("level.off", "Monitoring level for jvm is off")); |
197,730 | public void AppendValue(final String tag, final Object valueToAdd) {<NEW_LINE><MASK><NEW_LINE>Firebase firebaseChild = myFirebase.child(tag);<NEW_LINE>Transactional toRun = new Transactional(null, null, result) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>Transaction.Result run(MutableData currentData) {<NEW_LINE>Object val... | final ReturnVal result = new ReturnVal(); |
100,515 | // ***********************************************************************************<NEW_LINE>// METHODS<NEW_LINE>// ***********************************************************************************<NEW_LINE>@Override<NEW_LINE>public void filter(IntVar[] s, IntVar[] d, IntVar[] e, IntVar[] h, IntVar capa, ISet task... | double camax = capa.getUB(); |
386,790 | private synchronized void startPeriodicals(Set<Periodical> periodicalsToStart) {<NEW_LINE>final Sets.SetView<Periodical> notYetStartedPeriodicals = Sets.difference(periodicalsToStart, ImmutableSet.copyOf(periodicals.getAll()));<NEW_LINE>int numOfPeriodicalsToSkip = periodicalsToStart.size() - notYetStartedPeriodicals.s... | getClass().getCanonicalName()); |
1,708,195 | private boolean toggleS3Settings(final boolean stop) {<NEW_LINE>this.window().endEditingFor(null);<NEW_LINE>final Credentials credentials = session.getHost().getCredentials();<NEW_LINE>boolean enable = session.getHost().getProtocol().getType() == Protocol.Type.s3 || session.getHost().getProtocol().getType() == Protocol... | getFeature(Redundancy.class) != null; |
1,853,631 | private <T extends ArchiveEntry> Path createArchive(ProjectGenerationResult result, String fileExtension, Function<OutputStream, ? extends ArchiveOutputStream> archiveOutputStream, BiFunction<File, String, T> archiveEntry, BiConsumer<T, Integer> setMode) throws IOException {<NEW_LINE>Path archive = this.projectGenerati... | (wrapperScript, entryName, path)); |
1,356,668 | private void sendLogicalClose(boolean request) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(this, tc, "sendLogicalClose", "" + request);<NEW_LINE>eventRecorder.logEntry("sendLogicalClose");<NEW_LINE>// Create a new implementation of the JFapByteBuffer with a single by... | invalidate(false, e, "SIException thrown from system send"); |
1,618,805 | private void outputAnswer(Answer answer, boolean writeLog) {<NEW_LINE>try {<NEW_LINE>// Write answer to work json log if caller requested.<NEW_LINE>// Summarize that answer if all of the following are true:<NEW_LINE>// - answering a question<NEW_LINE>// - question successful<NEW_LINE>// - client did not request full su... | addAnswerElement(be.getBatfishStackTrace()); |
453,474 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>if (controller == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>TargetCardInLibrary target = new TargetCardInLibrary();<NEW_LINE>if (controller.searchLibrary(target, source, game)) {<NE... | opponent.getLogName() + " decides to leave the card in exile."); |
764,785 | void writeBlob(String blobName, BytesReference bytes, boolean failIfAlreadyExists) throws IOException {<NEW_LINE>if (bytes.length() > getLargeBlobThresholdInBytes()) {<NEW_LINE>// Compute md5 here so #writeBlobResumable forces the integrity check on the resumable upload.<NEW_LINE>// This is needed since we rely on atom... | bucketName, blobName).build(); |
185,263 | public static void processBorderVertical(GrayF32 orig, GrayF32 deriv, Kernel1D_F32 kernel, ImageBorder_F32 borderType) {<NEW_LINE>borderType.setImage(orig);<NEW_LINE>ConvolveJustBorder_General_SB.vertical(kernel, borderType, deriv);<NEW_LINE>GrayF32 origSub;<NEW_LINE>GrayF32 derivSub;<NEW_LINE>origSub = orig.subimage(0... | vertical(kernel, origSub, derivSub); |
164,381 | public void handleMessage(GlobalHandlerMessageContext msgctxt) throws Exception {<NEW_LINE>// get HttpServletRequest<NEW_LINE>HttpServletRequest httpRequest = msgctxt.getHttpServletRequest();<NEW_LINE>if (httpRequest != null) {<NEW_LINE>System.out.println(httpRequest.getCharacterEncoding());<NEW_LINE>System.out.<MASK><... | println(httpRequest.getLocalAddr()); |
1,721,338 | public void onClick(View v) {<NEW_LINE>AlertDialog.Builder builder = new <MASK><NEW_LINE>builder.setTitle(getString(R.string.profile_contact));<NEW_LINE>final EditText input = new EditText(getContext());<NEW_LINE>input.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_CLASS_PHONE);<NEW_LINE>builder.setView(input)... | AlertDialog.Builder(getContext()); |
1,816,721 | public void startElement(final String uri, final String name, final String tag, final Attributes atts) throws SAXException {<NEW_LINE>if (scrapeMetaData) {<NEW_LINE>// not implemented yet TODO: interprete RDF content<NEW_LINE>// may contain RDF + DC, DC, CC ...<NEW_LINE>} else {<NEW_LINE>if (tag != null) {<NEW_LINE>swi... | 0, buffer.length()); |
923,388 | public void exitRo_redistribute_bgp_cisco(Ro_redistribute_bgp_ciscoContext ctx) {<NEW_LINE>OspfProcess proc = _currentOspfProcess;<NEW_LINE>RoutingProtocol sourceProtocol = RoutingProtocol.BGP;<NEW_LINE>OspfRedistributionPolicy r = new OspfRedistributionPolicy(sourceProtocol);<NEW_LINE>proc.getRedistributionPolicies().... | toAsNum(ctx.bgp_asn()); |
788,412 | protected void recordAttributes(SpanEventRecorder recorder, LoggingMessage loggingMessage) {<NEW_LINE>StringBuilder address = loggingMessage.getAddress();<NEW_LINE>if (address.length() > 0) {<NEW_LINE>recorder.recordAttribute(CxfPluginConstants.CXF_ADDRESS, address.toString());<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>if (r... | StringBuilder responseCode = loggingMessage.getResponseCode(); |
1,808,648 | private void initMetrics(UUID serverId) {<NEW_LINE>Metrics metrics = new Metrics("DragonProxy", serverId.toString(), 2094);<NEW_LINE>metrics.addCustomChart(new Metrics.SingleLineChart("servers", () -> 1));<NEW_LINE>metrics.addCustomChart(new Metrics.SimplePie("bedrock_versions", DragonProxy.BEDROCK_CODEC::getMinecraftV... | -> proxy.getVersion())); |
187,294 | public void renderTileEntityAt(TileLaser laser, double x, double y, double z, float f, int i) {<NEW_LINE>Minecraft.getMinecraft().mcProfiler.startSection("bc");<NEW_LINE>Minecraft.getMinecraft().mcProfiler.startSection("laser_tile");<NEW_LINE>if (laser != null) {<NEW_LINE>GL11.glPushMatrix();<NEW_LINE>GL11.glTranslated... | laser, laser.getTexture()); |
1,659,004 | private void initRestOfGroupDependencies(Class<? extends ITestOrConfiguration> annotationClass) {<NEW_LINE>//<NEW_LINE>// Init groups depended upon<NEW_LINE>//<NEW_LINE>ITestOrConfiguration annotation = getAnnotationFinder().<MASK><NEW_LINE>ITestOrConfiguration classAnnotation = getAnnotationFinder().findAnnotation(get... | findAnnotation(getConstructorOrMethod(), annotationClass); |
325,808 | public void unlockRead(long stamp) {<NEW_LINE>offHeapLock = chm.get("Stamp ");<NEW_LINE>readLockHolderCount = chmR.get("ReaderCount ");<NEW_LINE>Jvm.debug().on(getClass(), " ,@t=" + System.currentTimeMillis() + " ChronicleStampedLock unlockRead(" + stamp + ") unlocking.." + "ReaderCount=[" + (readLockHolderCount = chmR... | chmR.put("ReaderCount ", readLockHolderCount); |
861,735 | private ImmutableListMultimap<TableRecordReference, LocationId> extractLocationIds(@NonNull final List<RecordRefWithLogEntry> entriesWithLocationId) {<NEW_LINE>final ImmutableList<RecordRefWithLogEntry> entriesWithLocationIdToUse = entriesWithLocationId.stream().collect(ImmutableList.toImmutableList());<NEW_LINE>final ... | > recordRef2LocationIds = ImmutableListMultimap.builder(); |
1,561,546 | public void initScene() {<NEW_LINE>DirectionalLight light = new DirectionalLight(.1f, .1f, -1);<NEW_LINE>light.setPower(2);<NEW_LINE><MASK><NEW_LINE>Material timeSphereMaterial = new Material();<NEW_LINE>timeSphereMaterial.enableLighting(true);<NEW_LINE>timeSphereMaterial.setDiffuseMethod(new DiffuseMethod.Lambert());<... | getCurrentScene().addLight(light); |
536,803 | static byte[] create(ZipFileData file, boolean allowZip64) throws ZipException {<NEW_LINE>byte[] comment = file.getBytes(file.getComment());<NEW_LINE>byte[] buf = new byte[FIXED_DATA_SIZE + comment.length];<NEW_LINE>// Allow writing of Zip file without Zip64 extensions for large archives as a special case<NEW_LINE>// s... | 1 : file.getNumEntries()); |
1,393,200 | static void appendImplEncoderTrait(final Appendable out, final String typeName) throws IOException {<NEW_LINE>indent(out, 1, "impl<%s> %s for %s {\n", BUF_LIFETIME, withLifetime("Writer"), withLifetime(typeName));<NEW_LINE>indent(out, 2, "#[inline]\n");<NEW_LINE>indent(out, 2, "fn get_buf_mut(&mut self) -> &mut WriteBu... | indent(out, 2, "}\n"); |
1,235,599 | public QuoteFillRatio userGetQuoteFillRatio() throws TimeoutException, ExecutionException, InterruptedException, ApiException {<NEW_LINE>Object postBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String path = "/user/quoteFillRatio";<NEW_LINE>// query params<NEW_LINE>List<Pair> queryParams <MASK><NEW_LI... | = new ArrayList<Pair>(); |
1,264,472 | public static List<RegressionExecution> executions() {<NEW_LINE>List<RegressionExecution> execs = new ArrayList<>();<NEW_LINE>execs.add(new EPLSubselectHavingNoAggNoFilterNoWhere());<NEW_LINE>execs.add(new EPLSubselectHavingNoAggWWhere());<NEW_LINE>execs.add(new EPLSubselectHavingNoAggWFilterWWhere());<NEW_LINE>execs.a... | .add(new EPLSubselectJoinFilteredOne()); |
1,501,703 | protected void compile(InputChanges inputs) {<NEW_LINE>BuildOperationLogger operationLogger = getOperationLoggerFactory().newOperationLogger(getName(), getTemporaryDir());<NEW_LINE>NativeCompileSpec spec = createCompileSpec();<NEW_LINE>spec.setTargetPlatform(targetPlatform.get());<NEW_LINE>spec.setTempDir(getTemporaryD... | (NativeToolChainInternal) toolChain.get(); |
180,377 | protected void buildLayer(int begin, int end, int layer) {<NEW_LINE>for (int num = begin; num < end; num++) {<NEW_LINE>if (!node.containsKey(num))<NEW_LINE>continue;<NEW_LINE>if (node.get(num).get(1).size() >= 2) {<NEW_LINE>for (Object innerid : node.get(num).get(1).toArray()) {<NEW_LINE>String rawid = null;<NEW_LINE>i... | ).get(layer - 1); |
1,370,275 | public // mixing up your enum types<NEW_LINE>void enumExampleUntyped(Context ctx) throws TestFailedException {<NEW_LINE>System.out.println("EnumExample");<NEW_LINE>Log.append("EnumExample");<NEW_LINE>Symbol name = ctx.mkSymbol("fruit");<NEW_LINE>EnumSort<Object> fruit = ctx.mkEnumSort(name, ctx.mkSymbol("apple"), ctx.m... | fruit.getConsts()[2]; |
929,941 | public CompletableFuture<Void> start(String[] args) {<NEW_LINE>state.set(DbgState.STARTING, Causes.UNCLAIMED);<NEW_LINE>boolean create = true;<NEW_LINE>if (args.length == 0) {<NEW_LINE>engThread = new DbgModelClientThreadExecutor(() -> DbgModel.debugCreate());<NEW_LINE>} else {<NEW_LINE>String remoteOptions = String.jo... | Msg.error(this, "start failed"); |
488,568 | public static void modifyLocalElement(final AXIComponent source, final SchemaUpdate.UpdateUnit u, final SchemaModel sm, SchemaGenerator.PrimitiveCart pc) {<NEW_LINE>checkPopulate(source);<NEW_LINE>LocalElement le = (LocalElement) ((Element) source).getPeer();<NEW_LINE>String propertyName = u.getPropertyName();<NEW_LINE... | (LocalComplexType) le.getInlineType(); |
774,496 | public DescribeSafetyRuleResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DescribeSafetyRuleResult describeSafetyRuleResult = new DescribeSafetyRuleResult();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth +... | int originalDepth = context.getCurrentDepth(); |
1,345,505 | private static void loadRows(ImpFormat format, int ID) {<NEW_LINE>// 1..6<NEW_LINE>String // 1..6<NEW_LINE>sql = // 7..12<NEW_LINE>"SELECT f.SeqNo,c.ColumnName,f.StartNo,f.EndNo,f.DataType,c.FieldLength," <MASK><NEW_LINE>try {<NEW_LINE>PreparedStatement pstmt = DB.prepareStatement(sql, null);<NEW_LINE>pstmt.setInt(1, I... | + "f.DataFormat,f.DecimalPoint,f.DivideBy100,f.ConstantValue,f.Callout, f.DefaultValue " + "FROM AD_ImpFormat_Row f,AD_Column c " + "WHERE f.AD_ImpFormat_ID=? AND f.AD_Column_ID=c.AD_Column_ID AND f.IsActive='Y'" + "ORDER BY f.SeqNo"; |
1,507,087 | final ListManagedEndpointsResult executeListManagedEndpoints(ListManagedEndpointsRequest listManagedEndpointsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listManagedEndpointsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
1,068,249 | public static String formatDateTime(Date time, TimeZone tz) {<NEW_LINE>Calendar cal = Calendar.getInstance(tz, Locale.ENGLISH);<NEW_LINE>cal.setTime(time);<NEW_LINE>int offset = <MASK><NEW_LINE>offset += cal.get(Calendar.DST_OFFSET);<NEW_LINE>// DateFormat is operating on GMT so adjust for time zone offset<NEW_LINE>Dat... | cal.get(Calendar.ZONE_OFFSET); |
593,490 | private static IntegrationResult runIntegrationEmbedded(IntegrationInput input, URLClassLoader integrationCl) throws Exception {<NEW_LINE>Util.infoMsg("Post build with " + input.integrationClassName);<NEW_LINE>if (input.source != null) {<NEW_LINE>// TODO: should we add new properties to the integration method?<NEW_LINE... | FileOutputStream(FileDescriptor.err))); |
463,807 | public CreateLicenseVersionResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CreateLicenseVersionResult createLicenseVersionResult = new CreateLicenseVersionResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentEleme... | class).unmarshall(context)); |
1,597,891 | protected void createButtonsForButtonBar(Composite parent) {<NEW_LINE>createButton(parent, IDialogConstants.OK_ID, IDialogConstants.CLOSE_LABEL, true);<NEW_LINE>Button button = createButton(parent, 9999, Messages.LabelCopyToClipboard, false);<NEW_LINE>button.addSelectionListener(SelectionListener.widgetSelectedAdapter(... | String path = dialog.open(); |
630,310 | public void marshall(CommentsForComparedCommit commentsForComparedCommit, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (commentsForComparedCommit == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(commentsF... | commentsForComparedCommit.getAfterCommitId(), AFTERCOMMITID_BINDING); |
1,090,590 | private Boolean handleImageMissing(Image img, boolean recap) {<NEW_LINE>log(logLevel, "handleImageMissing: %s", img.getName());<NEW_LINE>ObserveEvent evt = null;<NEW_LINE>FindFailedResponse response = findFailedResponse;<NEW_LINE>if (!recap && imageMissingHandler != null) {<NEW_LINE>log(logLevel, "handleImageMissing: c... | ) + img.getName()); |
146,551 | public static List<URL> collectLayers(ClassLoader loader) throws IOException {<NEW_LINE>List<URL> layerUrls = new ArrayList<URL>();<NEW_LINE>for (URL manifest : NbCollections.iterable(loader.getResources("META-INF/MANIFEST.MF"))) {<NEW_LINE>// NOI18N<NEW_LINE>InputStream is = manifest.openStream();<NEW_LINE>try {<NEW_L... | getMainAttributes().getValue("OpenIDE-Module-Layer"); |
1,465,198 | private YoutubeSignatureCipher extractTokensFromScript(String script, String sourceUrl) {<NEW_LINE>Matcher <MASK><NEW_LINE>if (!actions.find()) {<NEW_LINE>dumpProblematicScript(script, sourceUrl, "no actions match");<NEW_LINE>throw new IllegalStateException("Must find action functions from script: " + sourceUrl);<NEW_L... | actions = actionsPattern.matcher(script); |
573,373 | public void prepare(TreeLogger logger, ResourceContext context, ClientBundleRequirements requirements, JMethod method) throws UnableToCompleteException {<NEW_LINE>// if Gss is enabled, defer the call to the Gss generator.<NEW_LINE>if (gssEnabled) {<NEW_LINE>gssResourceGenerator.prepare(logger, context, requirements, me... | log(TreeLogger.ERROR, "At least one source must be specified"); |
1,355,485 | private void tradeAtFortStadaconaQuebec() {<NEW_LINE>savings -= 140.0;<NEW_LINE>System.out.println();<NEW_LINE>minkPrice = ((.2 * Math.random() + .85) * (Math.pow(10, 2) + .5)) / Math.pow(10, 2);<NEW_LINE>erminePrice = ((.2 * Math.random() + .8) * (Math.pow(10, 2) + .5)) / Math.pow(10, 2);<NEW_LINE>beaverPrice = ((.2 *... | pelts.set(FOX_ENTRY, foxPelt); |
1,700,080 | private JSONObject changePermissions(JSONObject params) throws ServletException {<NEW_LINE>try {<NEW_LINE>JSONArray paths = ((JSONArray) params.get("items"));<NEW_LINE>// "rw-r-x-wx"<NEW_LINE>String perms = params.getAsString("perms");<NEW_LINE>// "653"<NEW_LINE>String permsCode = params.getAsString("permsCode");<NEW_L... | setPermissions(f, perms, recursive); |
1,692,182 | private void loadNode1269() throws IOException, SAXException {<NEW_LINE>PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.NamingRuleType_EnumValues, new QualifiedName(0, "EnumValues"), new LocalizedText("en", "EnumValues"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new Dat... | .expanded(), true)); |
1,462,069 | private Object lookupLambdaFunction(MagicScriptContext context, String name) {<NEW_LINE>int index = name.indexOf(":");<NEW_LINE>if (index > -1) {<NEW_LINE>String method = name.substring(0, index);<NEW_LINE>String path = name.substring(index + 1);<NEW_LINE>ApiInfo info = getMapping(method.toUpperCase() + ":" + PathUtils... | >(context.getRootVariables()); |
766,937 | public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {<NEW_LINE>if (qName.equals(Constants.XML_TAG_CLIENT)) {<NEW_LINE>String id = <MASK><NEW_LINE>String component = attributes.getValue(Constants.XML_ATTR_CLIENT_COMPONENT);<NEW_LINE>String secret = attributes.g... | attributes.getValue(Constants.XML_ATTR_CLIENT_ID); |
1,577,837 | private void handleNewAssignment() {<NEW_LINE>LOG.log(Level.INFO, "Incarnating ourselves as {0} with task id {1}", new Object[] { helper.getMyComponent(), helper.getMyTaskId() });<NEW_LINE>// Initialize serializer once we got the new physical plan<NEW_LINE>this.serializer = SerializeDeSerializeHelper.getSerializer(help... | ), systemConfig.getInstanceTuningCurrentSampleWeight()); |
905,457 | public ContentTag addContentTag(Content content, TagName tagName, String comment, long beginByteOffset, long endByteOffset) throws TskCoreException {<NEW_LINE>CaseDbConnection connection = connections.getConnection();<NEW_LINE>acquireSingleUserCaseWriteLock();<NEW_LINE>ResultSet resultSet = null;<NEW_LINE>try {<NEW_LIN... | PREPARED_STATEMENT.INSERT_CONTENT_TAG, Statement.RETURN_GENERATED_KEYS); |
1,004,933 | private void createDistinctAggInfo(ArrayList<Expr> origGroupingExprs, ArrayList<FunctionCallExpr> distinctAggExprs, Analyzer analyzer) throws AnalysisException {<NEW_LINE>Preconditions.checkState(!distinctAggExprs.isEmpty());<NEW_LINE>// make sure that all DISTINCT params are the same;<NEW_LINE>// ignore top-level impl... | add(expr.ignoreImplicitCast()); |
814,752 | public static void main(String... args) throws Exception {<NEW_LINE>// Your Google Cloud Platform project ID<NEW_LINE>String projectId = System.getProperty("projectId");<NEW_LINE>if (projectId == null) {<NEW_LINE>System.err.println("Usage: QuickstartSample -DprojectId=YOUR_PROJECT_ID");<NEW_LINE>return;<NEW_LINE>}<NEW_... | resourceLabels.put("instance_id", "1234567890123456789"); |
1,012,267 | private static ToolchainTypeInfo findToolchainTypeInfo(ConfiguredTargetKey key, SkyframeIterableResult values) throws InvalidToolchainTypeException {<NEW_LINE>try {<NEW_LINE>ConfiguredTargetValue ctv = (ConfiguredTargetValue) values.nextOrThrow(ConfiguredValueCreationException.class, NoSuchThingException.class, ActionC... | ), "is a toolchain instance. Is the rule definition for the target you're building " + "setting \"toolchains =\" to a toolchain() instead of the expected " + "toolchain_type()?"); |
1,636,404 | private static WXModule findModule(String instanceId, String moduleStr, ModuleFactory factory) {<NEW_LINE>// find WXModule<NEW_LINE>WXModule wxModule = sGlobalModuleMap.get(moduleStr);<NEW_LINE>// not global module<NEW_LINE>if (wxModule == null) {<NEW_LINE>Map<String, WXModule> moduleMap = sInstanceModuleMap.get(instan... | getInstance().getSDKInstance(instanceId); |
1,510,171 | final GetDashboardEmbedUrlResult executeGetDashboardEmbedUrl(GetDashboardEmbedUrlRequest getDashboardEmbedUrlRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getDashboardEmbedUrlRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | addHandlerContext(HandlerContextKey.SERVICE_ID, "QuickSight"); |
1,517,648 | public java.util.Map.Entry<String, ServerInstanceLogRecordList> next() {<NEW_LINE>final <MASK><NEW_LINE>return new java.util.Map.Entry<String, ServerInstanceLogRecordList>() {<NEW_LINE><NEW_LINE>public String getKey() {<NEW_LINE>return key;<NEW_LINE>}<NEW_LINE><NEW_LINE>public ServerInstanceLogRecordList getValue() {<N... | String key = it.next(); |
781,257 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>Player player = game.getPlayer(source.getFirstTarget());<NEW_LINE>if (controller == null || player == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Permanent sacrificedCreature = null;<... | revealCards(source, cards, game); |
1,712,871 | public BackupPlan unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>BackupPlan backupPlan = new BackupPlan();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE><MA... | JsonToken token = context.getCurrentToken(); |
326,422 | public static ListFlowClusterAllResponse unmarshall(ListFlowClusterAllResponse listFlowClusterAllResponse, UnmarshallerContext _ctx) {<NEW_LINE>listFlowClusterAllResponse.setRequestId(_ctx.stringValue("ListFlowClusterAllResponse.RequestId"));<NEW_LINE>listFlowClusterAllResponse.setTotalCount(_ctx.integerValue("ListFlow... | ("ListFlowClusterAllResponse.Clusters[" + i + "].ChargeType")); |
1,768,515 | public static boolean copyModuleMetaDataSlot(MetaDataEvent<ModuleMetaData> event, MetaDataSlot slot) {<NEW_LINE>Container container = event.getContainer();<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>// For now, we just need to copy from WebModuleInfo, and ClientModuleInfo<NEW_LINE>// Supports EJB in WAR and ManagedBean in... | MetaData metaData = event.getMetaData(); |
647,689 | private void throwIfIllegalConsumerId(Metrics metrics, String consumerId) {<NEW_LINE>if (consumerId.equalsIgnoreCase(MetricsConsumer.vespa.id()) && applicationType != ApplicationType.HOSTED_INFRASTRUCTURE)<NEW_LINE>throw new IllegalArgumentException("'Vespa' is not allowed as metrics consumer id (case is ignored.)");<N... | autoscaling.id() + " is not allowed as metrics consumer id (case is ignored.)"); |
715,018 | protected static final Number coerceToNumber(final Number number, final Class<?> type) throws ELException {<NEW_LINE>if (Long.TYPE == type || Long.class.equals(type)) {<NEW_LINE>return Long.valueOf(number.longValue());<NEW_LINE>}<NEW_LINE>if (Double.TYPE == type || Double.class.equals(type)) {<NEW_LINE>return new Doubl... | valueOf(number.shortValue()); |
301,133 | private static void retrieveScreenshots(JPDAThreadImpl t, final ThreadReference tr, VirtualMachine vm, DebuggerEngine engine, JPDADebuggerImpl d, final List<RemoteScreenshot> screenshots) throws RetrievalException {<NEW_LINE>try {<NEW_LINE>final ClassType windowClass = getClass(vm, tr, "javafx.stage.Window");<NEW_LINE>... | windowClass.concreteMethodByName("impl_getMXWindowType", "()Ljava/lang/String;"); |
1,785,408 | public void performOperationStep(DeploymentOperation operationContext) {<NEW_LINE>final AbstractProcessApplication processApplication = operationContext.getAttachment(Attachments.PROCESS_APPLICATION);<NEW_LINE>final String paName = processApplication.getName();<NEW_LINE>Class<? extends AbstractProcessApplication> paCla... | Throwable cause = e.getCause(); |
1,088,059 | private void _removeAllFromLearning(int schedVer) {<NEW_LINE>// remove review cards from relearning<NEW_LINE>if (schedVer == 1) {<NEW_LINE>mCol.getDb().execute("update cards set due = odue, queue = " + Consts.QUEUE_TYPE_REV + ", type = " + Consts.CARD_TYPE_REV + ", mod = ?, usn = ?, odue = 0 where queue in (" + Consts.... | ), mCol.usn()); |
1,026,883 | public ArrayList<Fact> createFacts(MAcctSchema acctSchema) {<NEW_LINE>ArrayList<Fact> facts = new ArrayList<Fact>();<NEW_LINE>// Other Acct Schema<NEW_LINE>if (acctSchema.getC_AcctSchema_ID() != acctSchemaId)<NEW_LINE>return facts;<NEW_LINE>// create Fact Header<NEW_LINE>Fact fact = new Fact(this, acctSchema, postingTy... | getCR_Account_ID(), getTrxName()); |
48,207 | public void zoomEvent(EventType<ZoomEvent> eventType, double zoomFactor, double totalZoomFactor, double x, double y, double screenX, double screenY, boolean _shiftDown, boolean _controlDown, boolean _altDown, boolean _metaDown, boolean _direct, boolean _inertia) {<NEW_LINE>if (eventType == ZoomEvent.ZOOM_FINISHED) {<NE... | = zoomGesture.sceneCoords.getX(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.