idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,300,174 | public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {<NEW_LINE>super.onViewCreated(view, savedInstanceState);<NEW_LINE>quickActionRegistry = getApplication().getQuickActionRegistry();<NEW_LINE>long actionId = savedInstanceState == null ? getArguments().getLong(KEY_ACTION_ID) : savedInstanceState.g... | : quickActionRegistry.getQuickAction(actionId)); |
768,660 | <R> void sendRpc(YRpc<R> rpc) {<NEW_LINE>if (!rpc.deadlineTracker.hasDeadline()) {<NEW_LINE>LOG.warn(getPeerUuidLoggingString() + " sending an rpc without a timeout " + rpc);<NEW_LINE>}<NEW_LINE>if (chan != null) {<NEW_LINE>final ChannelBuffer serialized = encode(rpc);<NEW_LINE>if (serialized == null) {<NEW_LINE>// Err... | rpc, new ConnectionResetException(null)); |
613,637 | protected Key copyPartialKey(Key key, PartialKey part) {<NEW_LINE>Key keyCopy;<NEW_LINE>switch(part) {<NEW_LINE>case ROW:<NEW_LINE>keyCopy = new Key(key.getRow());<NEW_LINE>break;<NEW_LINE>case ROW_COLFAM:<NEW_LINE>keyCopy = new Key(key.getRow(), key.getColumnFamily());<NEW_LINE>break;<NEW_LINE>case ROW_COLFAM_COLQUAL:... | ), key.getColumnVisibility()); |
181,043 | protected Void copyCallback(AsyncCallbackDispatcher<DataObjectManagerImpl, CopyCommandResult> callback, CopyContext<CreateCmdResult> context) {<NEW_LINE>CopyCommandResult result = callback.getResult();<NEW_LINE>DataObject destObj = context.destObj;<NEW_LINE>if (result.isFailed()) {<NEW_LINE>try {<NEW_LINE>objectInDataS... | destObj, ObjectInDataStoreStateMachine.Event.OperationSuccessed); |
1,439,954 | public static void main(String[] args) {<NEW_LINE>Properties props = new Properties();<NEW_LINE><MASK><NEW_LINE>props.put("acks", "all");<NEW_LINE>props.put("retries", 0);<NEW_LINE>props.put("batch.size", 16384);<NEW_LINE>props.put("linger.ms", 1);<NEW_LINE>props.put("buffer.memory", 33554432);<NEW_LINE>props.put("key.... | props.put("bootstrap.servers", "localhost:9092"); |
1,239,837 | protected void copyTemplateToTargetFilesystemStorageIfNeeded(VolumeInfo srcVolumeInfo, StoragePool srcStoragePool, DataStore destDataStore, StoragePool destStoragePool, Host destHost) {<NEW_LINE>if (srcVolumeInfo.getVolumeType() != Volume.Type.ROOT || srcVolumeInfo.getTemplateId() == null) {<NEW_LINE>return;<NEW_LINE>}... | , destStoragePool.getId())); |
1,828,142 | ActionResult<Wo> execute(EffectivePerson effectivePerson, JsonElement jsonElement) throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>Wi wi = this.convertToWrapIn(jsonElement, Wi.class);<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW... | list = new ArrayList<>(); |
1,620,746 | public Route redirectIfNotLeader(final Route leaderRoute) {<NEW_LINE>MasterDescription latestMaster = masterMonitor.getLatestMaster();<NEW_LINE>if (leadershipManager.isLeader() || isLocalHost(latestMaster)) {<NEW_LINE>if (leadershipManager.isReady()) {<NEW_LINE>return leaderRoute;<NEW_LINE>} else {<NEW_LINE>return extr... | (hostname).port(apiPort); |
1,042,903 | private void initializeSoot() {<NEW_LINE>logger.info("Initializing Soot...");<NEW_LINE>final String androidJar = config.getAnalysisFileConfig().getAndroidPlatformDir();<NEW_LINE>final String apkFileLocation = config.getAnalysisFileConfig().getTargetAPKFile();<NEW_LINE>// Clean up any old Soot instance we may have<NEW_L... | Options.v(), config); |
952,174 | private void checkOverlaps(Replacement replacement) {<NEW_LINE>Range<Integer> replacementRange = replacement.range();<NEW_LINE>Collection<Replacement> overlap = overlaps.subRangeMap(replacementRange)<MASK><NEW_LINE>checkArgument(overlap.isEmpty(), "%s overlaps with existing replacements: %s", replacement, Joiner.on(", ... | .asMapOfRanges().values(); |
95,496 | public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {<NEW_LINE>builder.startObject();<NEW_LINE>builder.stringListField(INDEX_PATTERNS.getPreferredName(), this.indexPatterns);<NEW_LINE>if (this.template != null) {<NEW_LINE>builder.field(TEMPLATE.getPreferredName(), this.template,... | getPreferredName(), this.componentTemplates); |
1,733,928 | public boolean await(long time, TimeUnit unit) throws InterruptedException {<NEW_LINE>long remainTime = unit.toMillis(time);<NEW_LINE><MASK><NEW_LINE>if (getCount() == 0) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>CompletableFuture<RedissonCountDownLatchEntry> promise = subscribe();<NEW_LINE>try {<NEW_LINE>promise.toC... | long current = System.currentTimeMillis(); |
1,588,492 | private static Map<TypeAlias, jnr.ffi.NativeType> buildTypeMap() {<NEW_LINE>Map<TypeAlias, jnr.ffi.NativeType> m = new EnumMap<TypeAlias, jnr.ffi.NativeType>(TypeAlias.class);<NEW_LINE>m.put(TypeAlias.int8_t, NativeType.SCHAR);<NEW_LINE>m.put(TypeAlias.u_int8_t, NativeType.UCHAR);<NEW_LINE>m.put(TypeAlias.int16_t, Nati... | TypeAlias.rlim_t, NativeType.ULONG); |
77,911 | protected void update() {<NEW_LINE>int connectionType = ((IDiagramModelConnection) getFirstSelectedObject()).getType();<NEW_LINE>if ((connectionType & IDiagramModelConnection.ARROW_FILL_SOURCE) != 0) {<NEW_LINE>fValue = IDiagramModelConnection.ARROW_FILL_SOURCE;<NEW_LINE>fButton.setImage(IArchiImages.ImageFactory.getIm... | .getImage(IArchiImages.ARROW_SOURCE_LINE)); |
315,234 | public String copyGroup(String src, String groupId) {<NEW_LINE>isTrue(!root.readonly(), IS_READ_ONLY);<NEW_LINE>Group group = groupCache.get(groupId);<NEW_LINE>isTrue("0".equals(groupId<MASK><NEW_LINE>isTrue(!Objects.equals(src, groupId), SRC_GROUP_CONFLICT);<NEW_LINE>Group srcGroup = groupCache.get(src);<NEW_LINE>notN... | ) || group != null, GROUP_NOT_FOUND); |
749,778 | private void extendPlugin(PluginBean pluginBean) {<NEW_LINE>myAppComponents = mergeElements(myAppComponents, pluginBean.applicationComponents);<NEW_LINE>myProjectComponents = mergeElements(myProjectComponents, pluginBean.projectComponents);<NEW_LINE>myActionsElements = mergeElements(myActionsElements, pluginBean.action... | mergeElements(myProjectListeners, pluginBean.projectListeners); |
117,589 | // Converts an object to a byte array, using enhancements when possible to reduce size<NEW_LINE>// reveals customer data<NEW_LINE>@Trivial<NEW_LINE>public byte[] serialize(Object value) throws IOException {<NEW_LINE>final boolean trace = TraceComponent.isAnyTracingEnabled();<NEW_LINE>BuiltinSerializationInfo<?> info = ... | objbuf = info.objectToBytes(value); |
159,623 | public void onResponse(Call<DirectionsResponse> call, Response<DirectionsResponse> response) {<NEW_LINE>// You can get the generic HTTP info about the response<NEW_LINE>Timber.d("Response code: " + response.code());<NEW_LINE>if (response.body() == null) {<NEW_LINE>Timber.e("No routes found, make sure you set the right ... | routes().get(0); |
780,576 | public ReturnedValueOnReadFile call() throws StreamNotFoundException, IOException, OutOfMemoryError, ShellNotRunningException {<NEW_LINE>InputStream inputStream;<NEW_LINE>switch(fileAbstraction.scheme) {<NEW_LINE>case CONTENT:<NEW_LINE>Objects.requireNonNull(fileAbstraction.uri);<NEW_LINE>final AppConfig appConfig = Ap... | .fromContentUri(fileAbstraction.uri)); |
652,774 | public boolean updateAttributes() {<NEW_LINE>String index = null;<NEW_LINE>List<HWPartition> partitions = getPartitions();<NEW_LINE>if (!partitions.isEmpty()) {<NEW_LINE>// If a partition exists on this drive, the major property<NEW_LINE>// corresponds to the disk index, so use it.<NEW_LINE>index = Integer.toString(par... | diskTimeMap.getOrDefault(index, 0L); |
560,817 | public boolean archiveEvents(final ArchiveEventsCmd cmd) {<NEW_LINE>final Account caller = getCaller();<NEW_LINE>final List<Long> ids = cmd.getIds();<NEW_LINE>boolean result = true;<NEW_LINE>List<Long> permittedAccountIds = new ArrayList<Long>();<NEW_LINE>if (_accountService.isNormalUser(caller.getId()) || caller.getTy... | getDomainChildrenIds(domain.getPath()); |
1,112,521 | private byte[] handlePosition(SimpleInterval interval, byte base, FeatureContext features) {<NEW_LINE>if (deletionBasesRemaining > 0) {<NEW_LINE>deletionBasesRemaining--;<NEW_LINE>return NO_BASES;<NEW_LINE>}<NEW_LINE>// If we have a mask at this site, use it<NEW_LINE>if (snpmaskPriority) {<NEW_LINE>if (isMasked(feature... | ().length() - 1; |
88,468 | Map<String, ?> toSerializable() {<NEW_LINE>Map<String, Object> map = new LinkedHashMap<>();<NEW_LINE>map.put("displayName", displayName);<NEW_LINE>map.put("id", id);<NEW_LINE>if (parentId != null) {<NEW_LINE>map.put("parentId", parentId);<NEW_LINE>}<NEW_LINE>map.put("startTime", startTime);<NEW_LINE>map.put("endTime", ... | map.put("details", details); |
791,827 | private ArchiveResult archive0(@NonNull final ArchiveRequest request) {<NEW_LINE>// t.schoemeberg@metas.de, 03787: using the client/org of the archived PO, if possible<NEW_LINE>final Properties ctxToUse = createContext(request);<NEW_LINE>final IArchiveStorage storage = Services.get(IArchiveStorageFactory.class).getArch... | (request.getFlavor())); |
1,690,622 | public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>String epl = "@public create table PointTable(id string primary key, px double, py double);\n" + "create index MyIndex on PointTable((px,py) pointregionquadtree(0,0,100,100,4,40));\n" + "insert into PointTable sel... | null, "P5", "P1,P2,P3,P4", "P5"); |
1,126,542 | public void update() {<NEW_LINE>clear();<NEW_LINE>addSeparator(true).padRight(6);<NEW_LINE>visSelectBox = new VisSelectBox<>("white");<NEW_LINE>Array<ResolutionEntryVO> resolutionEntryVOs = new Array<>();<NEW_LINE>ResolutionEntryVO newResolutionEntryVO = new ResolutionEntryVO();<NEW_LINE>newResolutionEntryVO.name = "Cr... | addListener(new UIResolutionBoxButtonClickListener(DELETE_RESOLUTION_BTN_CLICKED)); |
837,508 | public static Memory createFromDateString(Environment env, TraceInfo traceInfo, Memory arg) {<NEW_LINE>try {<NEW_LINE>DateTimeParseResult result = new DateTimeParser(arg.toString()).parseResult();<NEW_LINE><MASK><NEW_LINE>DateInterval dateInterval = new DateInterval(env);<NEW_LINE>Memory relative = referenceMemories.re... | ArrayMemory referenceMemories = result.toArrayMemory(); |
1,458,640 | private SSLContext createSslContext(SecurityStore keystore, SecurityStore truststore) {<NEW_LINE>try {<NEW_LINE>SSLContext sslContext;<NEW_LINE>if (isNotEmpty(provider)) {<NEW_LINE>sslContext = SSLContext.getInstance(protocol, provider);<NEW_LINE>} else {<NEW_LINE>sslContext = SSLContext.getInstance(protocol);<NEW_LINE... | getTrustManagers(), this.secureRandomImplementation); |
1,264,601 | public AdditionalResultAttributeValue unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AdditionalResultAttributeValue additionalResultAttributeValue = new AdditionalResultAttributeValue();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCu... | ().unmarshall(context)); |
255,281 | public okhttp3.Call prepareGarbageCollectionCommitsCall(String repository, GarbageCollectionPrepareRequest garbageCollectionPrepareRequest, final ApiCallback _callback) throws ApiException {<NEW_LINE>Object localVarPostBody = garbageCollectionPrepareRequest;<NEW_LINE>// create path and map variables<NEW_LINE>String loc... | = new ArrayList<Pair>(); |
1,563,359 | private void addPagination(Map<Field, String> fields, Pagination pagination) {<NEW_LINE>String startPage = "";<NEW_LINE>String endPage = "";<NEW_LINE>for (JAXBElement<String> element : pagination.getContent()) {<NEW_LINE>if ("MedlinePgn".equals(element.getName().getLocalPart())) {<NEW_LINE>putIfValueNotNull(fields, Sta... | fields, StandardField.PAGES, startPage); |
1,153,479 | private void executeStreamOutBlocking(StringBuilder tornadoVMBytecodeList, final int objectIndex, final int contextIndex, final long offset, final int eventList, final long sizeBatch, final int[] waitList) {<NEW_LINE>final TornadoAcceleratorDevice device = contexts.get(contextIndex);<NEW_LINE>final Object object = obje... | timeProfiler.getTimer(ProfilerType.COPY_OUT_TIME); |
416,444 | public void trim(MemoryTrimType trimType) {<NEW_LINE>ArrayList<<MASK><NEW_LINE>ArrayList<Entry<K, V>> oldMFUEntries;<NEW_LINE>final double trimRatio = mCacheTrimStrategy.getTrimRatio(trimType);<NEW_LINE>synchronized (this) {<NEW_LINE>final int targetCacheSize = (int) (mCachedEntries.getSizeInBytes() * (1 - trimRatio));... | Entry<K, V>> oldLFUEntries; |
938,145 | public static void main(String... args) {<NEW_LINE>Query query = QueryFactory.create("SELECT * { {?s ?p ?o } UNION { GRAPH ?g { ?s ?p ?o } } }");<NEW_LINE>Dataset dataset = DatasetFactory.createTxnMem();<NEW_LINE>try (RDFConnection conn = RDFConnection.connect(dataset)) {<NEW_LINE>System.out.println("** Load a file");<... | queryResultSet(query, ResultSetFormatter::out); |
359,157 | public void onConfigChanged(ConfigChanged event) {<NEW_LINE>if (event.getGroup().equals("attackIndicator")) {<NEW_LINE>boolean enabled = Boolean.TRUE.toString().equals(event.getNewValue());<NEW_LINE>switch(event.getKey()) {<NEW_LINE>case "warnForDefensive":<NEW_LINE>updateWarnedSkills(enabled, Skill.DEFENCE);<NEW_LINE>... | updateWarnedSkills(enabled, Skill.ATTACK); |
1,595,258 | public List<NamespaceVH> fetchNamespaceDetails(SubscriptionVH subscription) throws Exception {<NEW_LINE>List<NamespaceVH> namespaceList = new ArrayList<NamespaceVH>();<NEW_LINE>String accessToken = azureCredentialProvider.getToken(subscription.getTenant());<NEW_LINE>String url = String.format(apiUrlTemplate, URLEncoder... | JsonObject namespaceObject = namespaceElement.getAsJsonObject(); |
1,210,280 | @Consumes("application/x-www-form-urlencoded")<NEW_LINE>@Produces(MediaType.APPLICATION_JSON)<NEW_LINE>@Operation(description = "Fetch OAuth2 Access Token")<NEW_LINE>public AccessTokenResponse postAccessTokenRequest(@Parameter(description = "token request details include scope", required = true) String request) {<NEW_L... | code, e, ResourceError.class); |
1,360,518 | public TransportFilter createTransportFilter(Connection connection, TransportCipher read_cipher, TransportCipher write_cipher) throws TransportException {<NEW_LINE>Transport transport = connection.getTransport();<NEW_LINE>if (transport == null) {<NEW_LINE>throw (new TransportException("no transport available"));<NEW_LI... | .getFilter().getHelper(); |
228,887 | public RebootBrokerResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>RebootBrokerResult rebootBrokerResult = new RebootBrokerResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth =... | class).unmarshall(context)); |
1,709,183 | public static void main(String[] args) {<NEW_LINE>final MetricsAdvisorAdministrationAsyncClient advisorAdministrationAsyncClient = new MetricsAdvisorAdministrationClientBuilder().endpoint("https://{endpoint}.cognitiveservices.azure.com/").credential(new MetricsAdvisorKeyCredential("subscription_key", "api_key")).buildA... | "Message: %s%n", ingestionStatus.getMessage()); |
644,869 | public void load(Reader theReader, boolean allowArray) throws DataFormatException {<NEW_LINE>PushbackReader pbr = new PushbackReader(theReader);<NEW_LINE>int nextInt;<NEW_LINE>try {<NEW_LINE>while (true) {<NEW_LINE>nextInt = pbr.read();<NEW_LINE>if (nextInt == -1) {<NEW_LINE>throw new DataFormatException(Msg.code(1857)... | + (char) nextInt + "' (must be '{')"); |
1,130,071 | /* (non-Javadoc)<NEW_LINE>* @see com.ibm.jvm.j9.dump.indexsupport.IParserNode#nodeToPushAfterStarting(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)<NEW_LINE>*/<NEW_LINE>public IParserNode nodeToPushAfterStarting(String uri, String localName, String qName, Attributes attributes) {<NEW_LIN... | = new NodeStack(_javaThread, attributes); |
526,479 | void showTopSlowBuildRules(ImmutableList.Builder<String> lines) {<NEW_LINE>if (numberOfSlowRulesToShow == 0 || buildFinished == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Comparator<UnflavoredBuildTarget> comparator = (target1, target2) -> {<NEW_LINE>Long elapsedTime1 = Objects.requireNonNull(timeSpentMillisecondsInR... | (timeSpentMillisecondsInRules.get(target2)); |
1,563,761 | public void validate(OpenJobAction.JobParams params, ClusterState clusterState) {<NEW_LINE>final <MASK><NEW_LINE>final String jobId = params.getJobId();<NEW_LINE>validateJobAndId(jobId, job);<NEW_LINE>// If we already know that we can't find an ml node because all ml nodes are running at capacity or<NEW_LINE>// simply ... | Job job = params.getJob(); |
1,132,724 | private static void publishDiagnostics(JavaClientConnection connection, ICompilationUnit unit, IProgressMonitor monitor) throws JavaModelException {<NEW_LINE>final DiagnosticsHandler handler <MASK><NEW_LINE>WorkingCopyOwner wcOwner = new WorkingCopyOwner() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public IBuffer createBu... | = new DiagnosticsHandler(connection, unit); |
1,637,419 | public void marshall(WriteTreatmentResource writeTreatmentResource, AwsJsonWriter jsonWriter) throws Exception {<NEW_LINE>jsonWriter.beginObject();<NEW_LINE>if (writeTreatmentResource.getMessageConfiguration() != null) {<NEW_LINE>MessageConfiguration messageConfiguration = writeTreatmentResource.getMessageConfiguration... | ).marshall(messageConfiguration, jsonWriter); |
1,436,078 | public static DescribeNetworkRegionBlockResponse unmarshall(DescribeNetworkRegionBlockResponse describeNetworkRegionBlockResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeNetworkRegionBlockResponse.setRequestId(_ctx.stringValue("DescribeNetworkRegionBlockResponse.RequestId"));<NEW_LINE>Config config = new Config()... | (_ctx.stringValue("DescribeNetworkRegionBlockResponse.Config.RegionBlockSwitch")); |
461,992 | public static List<RecordReader> init(ExecutorFragmentContext ctx, HiveSubScan config) {<NEW_LINE>final HiveReaderFactory readerFactory = getReaderFactory(config);<NEW_LINE>final UserGroupInformation proxyUgi = ImpersonationUtil.createProxyUgi(config.getUserName(), ctx.getQueryUserName());<NEW_LINE>final List<List<Inpu... | > inputSplits = config.getInputSplits(); |
1,148,293 | public static void arrayToGray(byte[] array, Bitmap.Config config, GrayU8 output) {<NEW_LINE>final int h = output.height;<NEW_LINE>final int w = output.width;<NEW_LINE>int indexSrc = 0;<NEW_LINE>switch(config) {<NEW_LINE>case ARGB_8888:<NEW_LINE>{<NEW_LINE>for (int y = 0; y < h; y++) {<NEW_LINE>int indexDst = output<MA... | .startIndex + y * output.stride; |
428,315 | public Scorer scorer(LeafReaderContext context) throws IOException {<NEW_LINE>LeafReader reader = context.reader();<NEW_LINE>CustomPhraseQuery.PostingsAndFreq[] postingsFreqs = new CustomPhraseQuery.<MASK><NEW_LINE>String field = query.terms[0].field();<NEW_LINE>Terms fieldTerms = reader.terms(field);<NEW_LINE>if (fiel... | PostingsAndFreq[query.terms.length]; |
190,875 | private // TODO: Obey ignoreMetadata<NEW_LINE>void readImageResources(final boolean pParseData) throws IOException {<NEW_LINE>readHeader();<NEW_LINE>if (pParseData && metadata.imageResources == null || metadata.layerAndMaskInfoStart == 0) {<NEW_LINE>imageInput.seek(metadata.imageResourcesStart);<NEW_LINE>long imageReso... | metadata.imageResources.add(resource); |
183,483 | public MetricGroup deserialize(JsonParser p, DeserializationContext c) throws IOException {<NEW_LINE>if (p.getCurrentToken() != JsonToken.START_ARRAY) {<NEW_LINE>throw c.mappingException("Expected start of array");<NEW_LINE>}<NEW_LINE>final Long timestamp;<NEW_LINE>{<NEW_LINE>if (p.nextToken() != JsonToken.VALUE_NUMBER... | timestamp, groups.build()); |
1,517,055 | /*<NEW_LINE>* Walks the LiveSet in preorder, returns a HashSet of all walked objects. The HashSet is generated as a byproduct of the walk.<NEW_LINE>*<NEW_LINE>* @return a HashSet containing all visited objects<NEW_LINE>*/<NEW_LINE>public static void walkLiveSet(ObjectVisitor visitor, RootSetType rootSetType) throws Co... | visitedObjects, visitor, nextObject, nextAddress); |
687,778 | public UpdateNodegroupVersionResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>UpdateNodegroupVersionResult updateNodegroupVersionResult = new UpdateNodegroupVersionResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentPar... | ().unmarshall(context)); |
1,770,783 | protected void paintIcon(Graphics2D g2) {<NEW_LINE>g2.setColor(Color.WHITE);<NEW_LINE>g2.fillRect(0, scale(4), scale(16), scale(12));<NEW_LINE>g2.setColor(Color.BLACK);<NEW_LINE>g2.drawRect(0, scale(4), scale(16), scale(12));<NEW_LINE>g2.setColor(Color.LIGHT_GRAY);<NEW_LINE>final var font = g2.getFont().deriveFont((flo... | ), -scale(4)); |
1,053,853 | ActionResult<Wo> execute(EffectivePerson effectivePerson, String flag) 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_LINE>File file = emc.flag... | ExceptionEntityNotExist(flag, File.class); |
1,326,333 | private boolean threadPoolHasNext() throws CorruptDataException {<NEW_LINE>while ((current == null) && pool.notNull()) {<NEW_LINE>while (index < poolSize) {<NEW_LINE>J9ThreadMonitorPointer monitor = J9ThreadMonitorPointer.cast(poolEntries.add(index));<NEW_LINE>index++;<NEW_LINE>if (!FREE_TAG.eq(monitor.count())) {<NEW_... | objmon = ObjectAccessBarrier.getMonitor(obj); |
1,108,860 | final ListQueriesResult executeListQueries(ListQueriesRequest listQueriesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listQueriesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
1,250,749 | private Node createMainPane() {<NEW_LINE>Pane main = new Pane();<NEW_LINE>HBox lr = new HBox(10);<NEW_LINE>VBox src = new VBox(10);<NEW_LINE>src.getChildren().add(new Text("SOURCE CONTROL:"));<NEW_LINE>src.getChildren().add(new Separator());<NEW_LINE>src.getChildren().add(sourceControlPane);<NEW_LINE>src.getChildren().... | .add(new Separator()); |
1,053,037 | private AddEntryResult addEntry(final int recordVersion, final byte[] entryContent, final OAtomicOperation atomicOperation) throws IOException {<NEW_LINE>int recordSizesDiff;<NEW_LINE>int position;<NEW_LINE>int finalVersion = 0;<NEW_LINE>long pageIndex;<NEW_LINE>do {<NEW_LINE>final FindFreePageResult findFreePageResult... | finalVersion = localPage.getRecordVersion(position); |
1,686,421 | public static DescribePerDateDataResponse unmarshall(DescribePerDateDataResponse describePerDateDataResponse, UnmarshallerContext context) {<NEW_LINE>describePerDateDataResponse.setRequestId(context.stringValue("DescribePerDateDataResponse.RequestId"));<NEW_LINE>List<DataViewItem> dataView = new ArrayList<DataViewItem>... | ("DescribePerDateDataResponse.DataView[" + i + "].IsOpenCommonPort1d")); |
1,675,710 | private Video createPinnedChannel(Video video) {<NEW_LINE>if (video == null || (!video.hasReloadPageKey() && !video.hasChannel() && !video.isChannel())) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Video section = new Video();<NEW_LINE>section.itemType = video.itemType;<NEW_LINE>section.channelId = video.channelId;<NEW_... | ) && !video.isChannel(); |
247,151 | public GetJobTemplateResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>GetJobTemplateResult getJobTemplateResult = new GetJobTemplateResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = con... | String currentParentElement = context.getCurrentParentElement(); |
602,122 | protected WebResponse uncompressJavaScript(final WebResponse response) {<NEW_LINE>final WebRequest request = response.getWebRequest();<NEW_LINE>final String scriptName = request.getUrl().toString();<NEW_LINE>final <MASK><NEW_LINE>// skip if it is already formatted? => TODO<NEW_LINE>final ContextFactory factory = new Co... | String scriptSource = response.getContentAsString(); |
563,896 | private void updateValue(String resourceUuid, String resourceType, String newValue, boolean localUpdate) {<NEW_LINE>String originValue = loadConfigValue(resourceUuid);<NEW_LINE>String oldValue = originValue == null ? globalConfig.value() : originValue;<NEW_LINE>if (localUpdate) {<NEW_LINE>globalConfig.getValidators().f... | , resourceType, oldValue, newValue)); |
15,785 | private static void blockedMaze(char[][] maze, int i, int j, int m, int n, boolean[][] visited) {<NEW_LINE>if (i == m - 1 && j == n - 1) {<NEW_LINE>display(maze, m, n);<NEW_LINE>System.out.println();<NEW_LINE>return;<NEW_LINE>} else {<NEW_LINE>// Move in up direction<NEW_LINE>if (isSafe(maze, i - 1, j, m, n, visited)) ... | + 1][j] = false; |
1,491,509 | public void onCreate() {<NEW_LINE>super.onCreate();<NEW_LINE>inject(this);<NEW_LINE>navigation.setTitle(R.string.settings_developer);<NEW_LINE>LinearLayout wrapper = new LinearLayout(context);<NEW_LINE>wrapper.setOrientation(LinearLayout.VERTICAL);<NEW_LINE>Button logsButton = new Button(context);<NEW_LINE>logsButton.s... | setText(R.string.settings_open_logs); |
74,848 | public static String beanToStr(Object bean, boolean allowCustom) {<NEW_LINE>Class<?> clazz = Cls.unproxy(bean.getClass());<NEW_LINE>if (allowCustom) {<NEW_LINE>Method m = <MASK><NEW_LINE>if (!m.getDeclaringClass().equals(Object.class)) {<NEW_LINE>return bean.toString();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>BeanProperties pro... | Cls.getMethod(clazz, "toString"); |
149,850 | public BackupResponse newBackupResponse(Backup backup) {<NEW_LINE>VMInstanceVO vm = vmInstanceDao.findByIdIncludingRemoved(backup.getVmId());<NEW_LINE>AccountVO account = accountDao.findByIdIncludingRemoved(vm.getAccountId());<NEW_LINE>DomainVO domain = domainDao.findByIdIncludingRemoved(vm.getDomainId());<NEW_LINE>Dat... | setBackupOfferingId(offering.getUuid()); |
1,705,718 | public void write(org.apache.thrift.protocol.TProtocol prot, TopologyTaskHbInfo struct) throws org.apache.thrift.TException {<NEW_LINE>TTupleProtocol oprot = (TTupleProtocol) prot;<NEW_LINE>oprot.writeString(struct.topologyId);<NEW_LINE>oprot.writeI32(struct.topologyMasterId);<NEW_LINE>BitSet optionals = new BitSet();<... | struct.taskHbs.size()); |
656,227 | public boolean onTap(LatLong tapLatLong, Point layerXY, Point tapXY) {<NEW_LINE>this.expanded = !this.expanded;<NEW_LINE>double centerX = layerXY.x + this.getHorizontalOffset();<NEW_LINE>double centerY = layerXY.y + this.getVerticalOffset();<NEW_LINE>double radiusX = this.getBitmap<MASK><NEW_LINE>double radiusY = this.... | ().getWidth() / 2; |
861,012 | final CreateRoutingProfileResult executeCreateRoutingProfile(CreateRoutingProfileRequest createRoutingProfileRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createRoutingProfileRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<Creat... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
720,518 | private void loadNode1043() {<NEW_LINE>PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.NamespaceMetadataType_IsNamespaceSubset, new QualifiedName(0, "IsNamespaceSubset"), new LocalizedText("en", "IsNamespaceSubset"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new DataValu... | .expanded(), true)); |
72,132 | public void run(RegressionEnvironment env) {<NEW_LINE>EPCompiled compiled;<NEW_LINE>DeploymentOptions options;<NEW_LINE>compiled = env.compile("select * from SupportBean(theString='ABC')");<NEW_LINE>options = new DeploymentOptions().setStatementSubstitutionParameter(prepared -> {<NEW_LINE>tryInvalidSetObject(prepared, ... | ("x", 10), "Substitution parameter names have not been provided for this statement"); |
616,283 | private List<Wo> list(Business business, Wi wi) throws Exception {<NEW_LINE>List<Wo> wos = new ArrayList<>();<NEW_LINE>List<Person> people = business.person().pick(wi.getPersonList());<NEW_LINE>List<String> personIds = ListTools.extractProperty(people, JpaObject.id_FIELDNAME, String.class, true, true);<NEW_LINE>EntityM... | ).get(Identity.class); |
293,054 | public IterationScopeNode createIterationScope(FrameDescriptor frameDescriptor, JSFrameSlot blockScopeSlot) {<NEW_LINE>int numberOfSlots = frameDescriptor.getNumberOfSlots();<NEW_LINE>assert numberOfSlots > ScopeFrameNode.PARENT_SCOPE_SLOT_INDEX && ScopeFrameNode.PARENT_SCOPE_IDENTIFIER.equals(frameDescriptor.getSlotNa... | ] reads = new JSReadFrameSlotNode[numberOfSlotsToCopy]; |
807,722 | public void update(double value, long timestamp) {<NEW_LINE>rescaleIfNeeded();<NEW_LINE>lockForRegularUsage();<NEW_LINE>try {<NEW_LINE>final double priority = weight(timestamp - _startTime) / ThreadLocalRandom.current().nextDouble();<NEW_LINE>// TODO/FIXME: why is this unconditional? if newCount > size, should be dec... | Double first = _values.firstKey(); |
1,286,243 | public boolean storeById(String id, String report) throws IOException {<NEW_LINE>byte[] content = report.getBytes("utf-8");<NEW_LINE>int length = content.length;<NEW_LINE>byte[] num = String.valueOf(length).getBytes("utf-8");<NEW_LINE>m_writeLock.lock();<NEW_LINE>try {<NEW_LINE>m_writeDataFile.write(num);<NEW_LINE>m_wr... | data = line.getBytes("utf-8"); |
1,414,081 | public static DescribeNasInstancesResponse unmarshall(DescribeNasInstancesResponse describeNasInstancesResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeNasInstancesResponse.setRequestId(_ctx.stringValue("DescribeNasInstancesResponse.RequestId"));<NEW_LINE>describeNasInstancesResponse.setSuccess(_ctx.booleanValue(... | ("DescribeNasInstancesResponse.NasInstances[" + i + "].MeteredSize")); |
241,456 | private void queryMultiDumpGraph(UAVHttpMessage data) {<NEW_LINE>String ipport = data.getRequest("ipport");<NEW_LINE>String timesStr = data.getRequest("times");<NEW_LINE>String <MASK><NEW_LINE>List<String> times = JSONHelper.toObjectArray(timesStr, String.class);<NEW_LINE>List<String> threadIds = JSONHelper.toObjectArr... | threadIdsStr = data.getRequest("threadIds"); |
670,334 | public static void main(final String[] args) throws IOException {<NEW_LINE>final String base = "/home/fwilhelm/Workspace/Development/Projects/" + "Jenetics/jenetics.tool/src/main/resources/io/jenetics/tool/moea";<NEW_LINE>final Path data = Paths.get(base, "circle_min_front.dat");<NEW_LINE>final Path output = Paths.get(... | .get(base, "circle_points.gp")); |
1,607,098 | protected void emitCode(SPIRVCompilationResultBuilder crb, SPIRVAssembler asm) {<NEW_LINE>Logger.traceCodeGen(Logger.BACKEND.SPIRV, "emit IndexedLoadMemCollectionAccess in address: " + address + "[ " + address.getIndex() + "] -- region: " + address.getMemoryRegion().<MASK><NEW_LINE>SPIRVKind spirvKind = (SPIRVKind) re... | getMemorySpace().getName()); |
1,038,881 | public static void generateJaxWsArtifacts(Project project, FileObject targetFolder, String targetName, URL wsdlURL, String service, String port) throws Exception {<NEW_LINE>initProjectInfo(project);<NEW_LINE>JAXWSSupport jaxWsSupport = JAXWSSupport.<MASK><NEW_LINE>// NOI18N<NEW_LINE>String artifactsPckg = "service." + ... | getJAXWSSupport(project.getProjectDirectory()); |
1,162,617 | public com.amazonaws.services.redshiftdataapi.model.ResourceNotFoundException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.redshiftdataapi.model.ResourceNotFoundException resourceNotFoundException = new com.amazonaws.services.redshiftdataapi.model.ResourceNot... | JsonToken token = context.getCurrentToken(); |
980,569 | public DexAnnotationAble visitParameterAnnotation(final int index) {<NEW_LINE>if (parameterAnns == null) {<NEW_LINE>parameterAnns = new List[method.getParameterTypes().length];<NEW_LINE>}<NEW_LINE>// https://github.com/pxb1988/dex2jar/issues/485<NEW_LINE>// skip param annotation if out of range<NEW_LINE>if (index >= pa... | = new DexAnnotationNode(name, visibility); |
1,284,825 | private String logLevelToDescription(Level logLevel) {<NEW_LINE>String result = s_logger.localizeMessage("guiLogLevelOff");<NEW_LINE>if (logLevel.equals(Level.ALL)) {<NEW_LINE>result = s_logger.localizeMessage("guiLogLevelAll");<NEW_LINE>} else if (logLevel.equals(Level.FINEST)) {<NEW_LINE>result = s_logger.localizeMes... | getDefaultMarker()).toString(); |
1,663,197 | protected void writeValue(Value value) throws IOException, QueryResultHandlerException {<NEW_LINE>jg.writeStartObject();<NEW_LINE>if (value instanceof URI) {<NEW_LINE>jg.writeStringField("type", "uri");<NEW_LINE>jg.writeStringField("value", ((URI) value).toString());<NEW_LINE>} else if (value instanceof BNode) {<NEW_LI... | jg.writeStringField("type", "bnode"); |
1,347,394 | protected void executeExpression(ProcessInstance processInstance, ProcessDefinition procDefToMigrateTo, String preUpgradeJavaDelegateExpression, CommandContext commandContext) {<NEW_LINE>Expression expression = CommandContextUtil.getProcessEngineConfiguration(commandContext).getExpressionManager().createExpression(preU... | processInstance, Collections.emptyList()); |
1,591,428 | private void modifyRootElementAttrs(StringBuffer xmlBuffer) {<NEW_LINE>Map<String, String> nsAttrs = model.getXMLContentAttributes().getNamespaceToPrefixMap();<NEW_LINE>if (nsAttrs == null || nsAttrs.size() == 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int firstOccur = xmlBuffer.indexOf("xmlns");<NEW_LINE>int insertLoc ... | + nsPrefix + "='" + ns + "'"; |
1,218,662 | public static byte[] privKeyTweakAdd(byte[] privkey, byte[] tweak) throws AssertFailException {<NEW_LINE>Preconditions.checkArgument(privkey.length == 32);<NEW_LINE>ByteBuffer byteBuff = nativeECDSABuffer.get();<NEW_LINE>if (byteBuff == null || byteBuff.capacity() < privkey.length + tweak.length) {<NEW_LINE>byteBuff = ... | }).intValue() & 0xFF; |
1,764,338 | public void runRat() {<NEW_LINE>ReportConfiguration reportConfiguration = new ReportConfiguration();<NEW_LINE>reportConfiguration.setAddingLicenses(true);<NEW_LINE>List<IHeaderMatcher> matchers = new ArrayList<>();<NEW_LINE>matchers.add(Defaults.createDefaultMatcher());<NEW_LINE>// BSD 4-clause stuff (is disallowed bel... | (SimpleLicenseFamily[]::new)); |
711,834 | public Flux<NumericResponse<ReactiveListCommands.LPosCommand, Long>> lPos(Publisher<ReactiveListCommands.LPosCommand> commands) {<NEW_LINE>return execute(commands, command -> {<NEW_LINE>Assert.notNull(command.getKey(), "Key must not be null!");<NEW_LINE>Assert.notNull(command.getElement(), "Element must not be null!");... | = new ArrayList<Object>(); |
727,190 | public void addTorrentByMagnetUrl(String url, String title) {<NEW_LINE>// Since v39 Chrome sends application/x-www-form-urlencoded magnet links and most torrent clients do not understand those, so decode first<NEW_LINE>try {<NEW_LINE>url = URLDecoder.decode(url, "UTF-8");<NEW_LINE>} catch (UnsupportedEncodingException ... | .string.result_added, title)); |
1,229,578 | public void handle(JsonNode packet) {<NEW_LINE>ChannelType type = ChannelType.fromId(packet.get("type").asInt());<NEW_LINE>switch(type) {<NEW_LINE>case SERVER_TEXT_CHANNEL:<NEW_LINE>handleServerTextChannel(packet);<NEW_LINE>break;<NEW_LINE>case PRIVATE_CHANNEL:<NEW_LINE>handlePrivateChannel(packet);<NEW_LINE>break;<NEW... | logger.debug("Received CHANNEL_DELETE packet for a store channel. These are not supported in this" + " Javacord version and get ignored!"); |
785,479 | protected String doIt() throws Exception {<NEW_LINE>log.info("ASP_Status=" + getStatus() + ", AD_Menu_ID=" + menuId + ", IsGenerateFields=" + isGenerateFields());<NEW_LINE>MClientInfo clientInfo = MClientInfo.get(getCtx(), getAD_Client_ID());<NEW_LINE>int AD_Tree_ID = clientInfo.getAD_Tree_Menu_ID();<NEW_LINE>// Yamel ... | addLog("@AD_Browse_ID@ (" + noBrowses + ")"); |
236,906 | public static Message decode(byte[] wire) {<NEW_LINE>if (wire.length < 98)<NEW_LINE>throw new RuntimeException("Bad message");<NEW_LINE>byte[] mdc = new byte[32];<NEW_LINE>System.arraycopy(wire, 0, mdc, 0, 32);<NEW_LINE>byte[] signature = new byte[65];<NEW_LINE>System.arraycopy(wire, 32, signature, 0, 65);<NEW_LINE>byt... | mdcCheck, 0, mdcCheck.length); |
1,586,217 | private static int extractErrorPositionForPostgresql(Connection con, Statement stmt, Throwable ex, String sql) {<NEW_LINE>if (ex == null) {<NEW_LINE>return -1;<NEW_LINE>}<NEW_LINE>Class exceptionClass = ex.getClass();<NEW_LINE>if (exceptionClass.getName().equals("org.postgresql.util.PSQLException")) {<NEW_LINE>try {<NE... | Level.FINE, "Failed to parse PostgreSQL error", innerEx); |
298,937 | private Node compileModel() {<NEW_LINE>Node model = new Node(meshName + "-ogremesh");<NEW_LINE>for (int i = 0; i < geoms.size(); i++) {<NEW_LINE>Geometry g = geoms.get(i);<NEW_LINE>Mesh m = g.getMesh();<NEW_LINE>// New code for buffer extract<NEW_LINE>if (sharedMesh != null && usesSharedMesh.get(i)) {<NEW_LINE>m.extrac... | = new SkinningControl(animData.armature); |
742,368 | public Source unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>Source source = new Source();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_... | String currentParentElement = context.getCurrentParentElement(); |
892,707 | public void targetSelected(String field, Target node) {<NEW_LINE>List<String> <MASK><NEW_LINE>if (node != null) {<NEW_LINE>// The user has selected a new node<NEW_LINE>this.target = node;<NEW_LINE>if (node.getStartNode() != null) {<NEW_LINE>populateRequestField(node.getStartNode());<NEW_LINE>Session session = Model.get... | ctxNames = new ArrayList<>(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.