idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
893,540 | public void onClick(View v) {<NEW_LINE>final Context context = v.getContext();<NEW_LINE>if (v == developer) {<NEW_LINE>// open dev settings<NEW_LINE>Intent devIntent = new Intent(Settings.ACTION_APPLICATION_DEVELOPMENT_SETTINGS);<NEW_LINE>devIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);<NEW_LINE>ResolveInfo resolveIn... | Toast.LENGTH_SHORT).show(); |
967,659 | // TODO unify this method with `runWithPartitionScan`<NEW_LINE>private void runWithPartitionScanForNative() {<NEW_LINE>// if we reach here, it means we didn't manage to leverage index and we fall-back to full-partition scan<NEW_LINE>int totalEntryCount = recordStore.size();<NEW_LINE>responses = new MapEntries(totalEntr... | null, newTtl).doPostOperateOps(); |
228,045 | public DatabaseSet adapt(DatabaseSet original) {<NEW_LINE>if (connectionStrings == null || connectionStrings.isEmpty())<NEW_LINE>return original;<NEW_LINE>if (original instanceof DefaultDatabaseSet) {<NEW_LINE>try {<NEW_LINE>boolean dbShardingDisabled = true;<NEW_LINE>boolean tableShardingDisabled = true;<NEW_LINE>Stri... | LOGGER.warn("Adapt DefaultDatabaseSet to LocalDefaultDatabaseSet exception", t); |
1,426,642 | public static <T> T clone(T object) throws CloneNotSupportedException {<NEW_LINE>if (object == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (object instanceof PublicCloneable) {<NEW_LINE>PublicCloneable pc = (PublicCloneable) object;<NEW_LINE>return <MASK><NEW_LINE>} else {<NEW_LINE>try {<NEW_LINE>Method method... | (T) pc.clone(); |
1,284,976 | private static int exportAttachment(@NonNull AttachmentSecret attachmentSecret, @NonNull Cursor cursor, @NonNull BackupFrameOutputStream outputStream, int count, long estimatedCount) {<NEW_LINE>try {<NEW_LINE>long rowId = cursor.getLong(cursor.getColumnIndexOrThrow(AttachmentDatabase.ROW_ID));<NEW_LINE>long uniqueId = ... | , uniqueId), inputStream, size); |
1,696,956 | private static void parseAssertions(Element element, AnnotationMirror mirror, TypeElement type, LibraryData model) {<NEW_LINE>TypeMirror assertions = ElementUtils.getAnnotationValue(TypeMirror.<MASK><NEW_LINE>if (assertions != null) {<NEW_LINE>AnnotationValue value = ElementUtils.getAnnotationValue(mirror, "assertions"... | class, mirror, "assertions", false); |
685,480 | public void claimJob(final ClaimJobRequest request, final StreamObserver<ClaimJobResponse> responseObserver) {<NEW_LINE>final Set<Tag> tags = Sets.newHashSet();<NEW_LINE>final long start = System.nanoTime();<NEW_LINE>try {<NEW_LINE>final String id = request.getId();<NEW_LINE>final AgentClientMetadata clientMetadata = j... | ) - start, TimeUnit.NANOSECONDS); |
1,240,218 | public com.amazonaws.services.managedgrafana.model.ThrottlingException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.managedgrafana.model.ThrottlingException throttlingException = new com.amazonaws.services.managedgrafana.model.ThrottlingException(null);<NEW_L... | int originalDepth = context.getCurrentDepth(); |
1,426,021 | public void initChannel(SocketChannel channel) {<NEW_LINE><MASK><NEW_LINE>boolean secure = channel.attr(SECURE) != null && channel.attr(SECURE).get() != null && channel.attr(SECURE).get();<NEW_LINE>if (proxyConfigurations != null) {<NEW_LINE>if (secure && proxyConfigurations.containsKey(ProxyConfiguration.Type.HTTPS)) ... | ChannelPipeline pipeline = channel.pipeline(); |
134,243 | public static List<String> extractZipFolderToFolder(final File zipFile, final String path, final String destination, String encoding) {<NEW_LINE>List<String> fileNames = new ArrayList<String>();<NEW_LINE>String dest = destination;<NEW_LINE>if (!destination.endsWith(File.separator)) {<NEW_LINE>dest = destination + File.... | , FilenameUtils.getName(name)); |
1,258,559 | protected Schema processAsId(String propertyName, JavaType type, ModelConverterContext context, ObjectMapper mapper) {<NEW_LINE>final BeanDescription beanDesc = mapper.getSerializationConfig().introspect(type);<NEW_LINE>for (BeanPropertyDefinition def : beanDesc.findProperties()) {<NEW_LINE>final String name = def.getN... | Annotation[anns.size()]; |
161,002 | public void updateDefaultHost(Host host, User user, boolean respectFrontendRoles) throws DotDataException, DotSecurityException {<NEW_LINE>// If host is marked as default make sure that no other host is already set to be the default<NEW_LINE>if (host.isDefault()) {<NEW_LINE>ContentletAPI conAPI = APILocator.getContentl... | checkin(otherHost, user, respectFrontendRoles); |
705,427 | private void fillRequestSettings(HttpRequestBase request, String path) {<NEW_LINE>MlflowHostCreds hostCreds = hostCredsProvider.getHostCreds();<NEW_LINE>createHttpClientIfNecessary(hostCreds.shouldIgnoreTlsVerification());<NEW_LINE>String uri = hostCreds.getHost() + "/" + BASE_API_PATH + "/" + path;<NEW_LINE>request.se... | (URI.create(uri)); |
630,757 | private void collectExtensionDependencies(Project project, Configuration deploymentConfiguration, Map<ArtifactKey, ResolvedDependencyBuilder> appDependencies) {<NEW_LINE>final <MASK><NEW_LINE>for (ResolvedArtifact a : rc.getResolvedArtifacts()) {<NEW_LINE>if (a.getId().getComponentIdentifier() instanceof ProjectCompone... | ResolvedConfiguration rc = deploymentConfiguration.getResolvedConfiguration(); |
1,192,434 | protected void deleteInvalidUser(final RealmModel realm, final UserModel user) {<NEW_LINE>String userId = user.getId();<NEW_LINE>String userName = user.getUsername();<NEW_LINE>UserCache userCache = session.userCache();<NEW_LINE>if (userCache != null) {<NEW_LINE>userCache.evict(realm, user);<NEW_LINE>}<NEW_LINE>// This ... | logger.debugf("Removed invalid user '%s'", userName); |
75,306 | public void run(final SyncTaskChain chain) {<NEW_LINE>checkState();<NEW_LINE>if (msg.isSkipIfHostConnected() && HostStatus.Connected == self.getStatus()) {<NEW_LINE>finish(chain);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ConnectHostMsg connectMsg = new ConnectHostMsg(self.getUuid());<NEW_LINE>connectMsg.setNewAdd(false);<N... | , reply.getError())); |
1,490,722 | JSONObject writeItemsToJson(@NonNull JSONObject json) {<NEW_LINE>JSONArray jsonArray = new JSONArray();<NEW_LINE>if (!items.isEmpty()) {<NEW_LINE>try {<NEW_LINE>for (ITileSource template : items) {<NEW_LINE>JSONObject jsonObject = new JSONObject();<NEW_LINE>boolean sql = template instanceof SQLiteTileSource;<NEW_LINE>j... | LOG.error("Failed write to json", e); |
1,077,909 | public void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>overridePendingTransition(R.anim.activity_slide_up, R.anim.activity_slide_down);<NEW_LINE>slug = getIntent().getStringExtra("slug");<NEW_LINE>context = this;<NEW_LINE>sharedPrefs = context.getSharedPreferences("com.k... | setItemManager(builder.build()); |
476,471 | protected List<Cluster<M>> splitCluster(Cluster<M> parentCluster, Relation<V> relation) {<NEW_LINE>// Transform parent cluster into a clustering<NEW_LINE>if (parentCluster.size() <= 1) {<NEW_LINE>// Split is not possible<NEW_LINE>return Arrays.asList(parentCluster);<NEW_LINE>}<NEW_LINE>splitInitializer.setInitialMeans(... | .get(it), v); |
693,113 | public Response handleRequest(final ManagementRequest request) {<NEW_LINE>final PluginManagementRequest concreteRequest = (PluginManagementRequest) request;<NEW_LINE>logger.log(Level.SEVERE, "Executing PluginOperation for action " + concreteRequest.getOptions().getAction() + " ...");<NEW_LINE>Thread pluginThread = new ... | , request.getId())); |
1,141,505 | public ValidationHandlerImpl create(OperationImpl operation) {<NEW_LINE>// TODO error handling of this function?<NEW_LINE>Map<ParameterLocation, List<ParameterProcessor>> parameterProcessors = new HashMap<>();<NEW_LINE>List<BodyProcessor> bodyProcessors = new ArrayList<>();<NEW_LINE>GeneratorContext context = new Gener... | resolveStyle(pe.getValue()); |
998,331 | public static void yv12ToPlanarRgb_U8(byte[] dataYV, Planar<GrayU8> output) {<NEW_LINE>GrayU8 R = output.getBand(0);<NEW_LINE>GrayU8 G = output.getBand(1);<NEW_LINE>GrayU8 B = output.getBand(2);<NEW_LINE>final int yStride = output.width;<NEW_LINE>final int uvStride = output.width / 2;<NEW_LINE>final int startU = yStrid... | + 2165 * cb) >> 10; |
618,391 | private void afterRestoreStarted(Client clientWithHeaders, PutFollowAction.Request request, ActionListener<PutFollowAction.Response> originalListener, RestoreService.RestoreCompletionResponse response) {<NEW_LINE>final ActionListener<PutFollowAction.Response> listener;<NEW_LINE>if (ActiveShardCount.NONE.equals(request.... | RestoreInfo restoreInfo = restoreSnapshotResponse.getRestoreInfo(); |
424,477 | private static void panoseDebugReportOnPhysicalFonts(Map<String, PhysicalFont> physicalFontMap) {<NEW_LINE>Iterator fontIterator = physicalFontMap<MASK><NEW_LINE>while (fontIterator.hasNext()) {<NEW_LINE>Map.Entry pairs = (Map.Entry) fontIterator.next();<NEW_LINE>if (pairs.getKey() == null) {<NEW_LINE>log.info("Skipped... | .entrySet().iterator(); |
379,153 | private List<I_M_HU> retrieveTopLevelHUsForModel(final Properties ctx, final int adTableId, final int recordId, final String trxName) {<NEW_LINE>final IQueryBuilder<I_M_HU> queryBuilder = //<NEW_LINE>queryBL.createQueryBuilder(I_M_HU_Assignment.class, ctx, trxName).addEqualsFilter(I_M_HU_Assignment.COLUMNNAME_AD_Table_... | ).list(I_M_HU.class); |
1,540,019 | public NodeIndicesStats stats(CommonStatsFlags flags) {<NEW_LINE>CommonStats commonStats = new CommonStats(flags);<NEW_LINE>// the cumulative statistics also account for shards that are no longer on this node, which is tracked by oldShardsStats<NEW_LINE>for (Flag flag : flags.getFlags()) {<NEW_LINE>switch(flag) {<NEW_L... | search.add(oldShardsStats.searchStats); |
952,654 | private Mono<Response<Flux<ByteBuffer>>> migrateCassandraKeyspaceToManualThroughputWithResponseAsync(String resourceGroupName, String accountName, String keyspaceName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId()... | error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); |
496,950 | public ClientAuthentication unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ClientAuthentication clientAuthentication = new ClientAuthentication();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = con... | String currentParentElement = context.getCurrentParentElement(); |
747,968 | public Object execute(final Map<Object, Object> iArgs) {<NEW_LINE>if (clazz == null)<NEW_LINE>throw new OCommandExecutionException("Cannot execute the command because it has not been parsed yet");<NEW_LINE>// CREATE VERTEX DOES NOT HAVE TO BE IN TX<NEW_LINE>final OVertex vertex = getDatabase().newVertex(clazz);<NEW_LIN... | new OCommandParameters(iArgs), context); |
674,522 | public static <T extends BaseVertex, E extends BaseEdge> boolean graphEquals(final BaseGraph<T, E> g1, final BaseGraph<T, E> g2) {<NEW_LINE>Utils.nonNull(g1, "g1");<NEW_LINE><MASK><NEW_LINE>final Set<T> vertices1 = g1.vertexSet();<NEW_LINE>final Set<T> vertices2 = g2.vertexSet();<NEW_LINE>final Set<E> edges1 = g1.edgeS... | Utils.nonNull(g2, "g2"); |
360,158 | private static void resolveJUnitDependencies(NbModuleProject project, ModuleList moduleList, String testType, boolean addNBJUnit) throws IOException {<NEW_LINE>ModuleEntry <MASK><NEW_LINE>if (junit4 == null) {<NEW_LINE>IOException e = new IOException("no libs.junit4");<NEW_LINE>Exceptions.attachLocalizedMessage(e, ERR_... | junit4 = moduleList.getEntry(JUNIT_MODULE); |
1,152,105 | public LayersListItem unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>LayersListItem layersListItem = new LayersListItem();<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(); |
988,720 | public static void horizontal3(Kernel1D_S32 kernel, GrayS32 image, GrayS32 dest, int divisor) {<NEW_LINE>final int[] dataSrc = image.data;<NEW_LINE>final int[] dataDst = dest.data;<NEW_LINE>final int k1 = kernel.data[0];<NEW_LINE>final int k2 = kernel.data[1];<NEW_LINE>final int k3 = kernel.data[2];<NEW_LINE>final int ... | + i * dest.stride + radius; |
1,417,780 | public IRubyObject newMethod(IRubyObject receiver, final String methodName, boolean bound, Visibility visibility, boolean respondToMissing, boolean priv) {<NEW_LINE>CacheEntry entry = searchWithCache(methodName);<NEW_LINE>if (entry.method.isUndefined() || (visibility != null && entry.method.getVisibility() != visibilit... | originModule, methodName, entry, receiver); |
1,689,560 | private static WebServiceRefPartialInfo buildPartialInfoFromWebServiceClient(Class<?> serviceInterfaceClass) {<NEW_LINE>WebServiceClient webServiceClient = serviceInterfaceClass.getAnnotation(WebServiceClient.class);<NEW_LINE>if (webServiceClient == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>String className = s... | webServiceClient.targetNamespace(), localPart); |
1,035,825 | public static StatsGroup createStatsGroup(String groupName, String statsTemplate, StatsInstance parentInstance, ObjectName mBean, StatisticActions actionLsnr) throws StatsFactoryException {<NEW_LINE>if (tc.isEntryEnabled())<NEW_LINE>Tr.entry(tc, new StringBuffer("createStatsGroup:name=").append(groupName).append(";pare... | debug(tc, "Exception:", e); |
1,011,302 | public void resolvePackageDirectives(CompilationUnitScope cuScope) {<NEW_LINE>if (this.binding == null) {<NEW_LINE>this.ignoreFurtherInvestigation = true;<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (this.hasResolvedPackageDirectives)<NEW_LINE>return;<NEW_LINE>this.hasResolvedPackageDirectives = true;<NEW_LINE>Set<PackageB... | ref.targets.length][]; |
991,798 | public static boolean contentHasVisibleContentChildren(Content c) {<NEW_LINE>if (c != null) {<NEW_LINE>try {<NEW_LINE>if (!c.hasChildren()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>} catch (TskCoreException ex) {<NEW_LINE>// NON-NLS<NEW_LINE>logger.log(Level.SEVERE, "Error checking if the node has children, for con... | .ABSTRACTFILE.getObjectType() + ") AS OBJECT_IDS"; |
1,231,926 | public void execute(AdminCommandContext context) {<NEW_LINE>if (appName != null) {<NEW_LINE>if (!isValidApplication(appName)) {<NEW_LINE>ActionReport report = context.getActionReport();<NEW_LINE>report.setActionExitCode(ActionReport.ExitCode.FAILURE);<NEW_LINE>ActionReport.MessagePart messagePart = report.getTopMessage... | Resources appScopedResources = application.getResources(); |
1,836,853 | public void start() throws Throwable {<NEW_LINE>if (!started.compareAndSet(false, true)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>boss = new NioEventLoopGroup(1, <MASK><NEW_LINE>worker = new NioEventLoopGroup(0, new DefaultThreadFactory("qos-worker", true));<NEW_LINE>ServerBootstrap serverBootstrap = new ServerBootstrap(... | new DefaultThreadFactory("qos-boss", true)); |
1,771,000 | public void processStartupAnswer(final Answer answer, final Response response, final Link link) {<NEW_LINE>boolean cancelled = false;<NEW_LINE>synchronized (this) {<NEW_LINE>if (_startup != null) {<NEW_LINE>_startup.cancel();<NEW_LINE>_startup = null;<NEW_LINE>} else {<NEW_LINE>cancelled = true;<NEW_LINE>}<NEW_LINE>}<N... | 2 * _pingInterval, TimeUnit.MILLISECONDS); |
1,341,298 | public void registry() {<NEW_LINE>String address = NetUtils.getAddr(masterConfig.getListenPort());<NEW_LINE>localNodePath = getMasterPath();<NEW_LINE>int masterHeartbeatInterval = masterConfig.getHeartbeatInterval();<NEW_LINE>HeartBeatTask heartBeatTask = new HeartBeatTask(startupTime, masterConfig.getMaxCpuLoadAvg(), ... | registryClient.addConnectionStateListener(this::handleConnectionState); |
1,062,007 | public static HystrixObservableCommand.Setter build(final HystrixHandle hystrixHandle) {<NEW_LINE>initHystrixHandleOnRequire(hystrixHandle);<NEW_LINE>HystrixCommandGroupKey groupKey = HystrixCommandGroupKey.Factory.<MASK><NEW_LINE>HystrixCommandKey commandKey = HystrixCommandKey.Factory.asKey(hystrixHandle.getCommandKe... | asKey(hystrixHandle.getGroupKey()); |
581,388 | boolean serialize(StringBuilder destination, EquivItem item) {<NEW_LINE>String annotations = leafAnnotations(item);<NEW_LINE>destination.append(getIndexName(item.getItem(0))).append(" contains ");<NEW_LINE>if (annotations.length() > 0) {<NEW_LINE>destination.append("([{").append(annotations).append("}]");<NEW_LINE>}<NE... | ).getIndexedString(), destination); |
1,676,140 | static void paintNot(InstancePainter painter) {<NEW_LINE>final var g = painter.getGraphics();<NEW_LINE>GraphicsUtil.switchToWidth(g, 2);<NEW_LINE>if (painter.getAttributeValue(NotGate.ATTR_SIZE) == NotGate.SIZE_NARROW) {<NEW_LINE>GraphicsUtil.switchToWidth(g, 2);<NEW_LINE>int[] xp = new int[4];<NEW_LINE>int[] yp = new ... | drawPolyline(xp, yp, 4); |
1,802,530 | static void createModelMap() {<NEW_LINE>if (modelMap != null)<NEW_LINE>return;<NEW_LINE>modelMap = new HashMap<String, DiodeModel>();<NEW_LINE>addDefaultModel("spice-default", new DiodeModel(1e-14, 0, 1, 0, null));<NEW_LINE>addDefaultModel("default", new DiodeModel(1.7143528192808883e-7, 0, 2, 0, null));<NEW_LINE>addDe... | , 2, 0, null)); |
241,190 | public void addArgs(List<String> args) throws Exception {<NEW_LINE>ArgumentWriter writer = new ArgumentWriter(instance);<NEW_LINE>writer.writeIfSet("-ORBListenEndpoints", ORB_LISTEN_ENDPOINTS);<NEW_LINE>writer.writeIfSet("-ORBDebugLevel", ORB_DEBUG_LEVEL);<NEW_LINE>writer.writeIfSet("-ORBLogFile", ORB_LOG_FILE);<NEW_LI... | directive.addOptions("-ORBConnectionHandlerCleanup", "1"); |
155,431 | public void startElement(final String uri, final String localName, final String qName, final Attributes attributes) throws SAXException {<NEW_LINE>if (qName.equals("entry")) {<NEW_LINE>entryElement = true;<NEW_LINE>String type = attributes.getValue("type");<NEW_LINE>if (type.equals("file")) {<NEW_LINE>directory = false... | md5 = attributes.getValue("md5"); |
436,183 | public ReadableShopOrder populate(ShopOrder source, ReadableShopOrder target, MerchantStore store, Language language) throws ConversionException {<NEW_LINE>// not that much is required<NEW_LINE>// customer<NEW_LINE>try {<NEW_LINE>ReadableCustomer customer = new ReadableCustomer();<NEW_LINE>PersistableCustomer persistab... | getDelivery().getPostalCode()); |
1,606,386 | public void parseSelectFields(JoinInfo joinInfo) {<NEW_LINE>String sideTableName = joinInfo.getSideTableName();<NEW_LINE>String nonSideTableName = joinInfo.getNonSideTable();<NEW_LINE>List<String> fields = Lists.newArrayList();<NEW_LINE>int sideTableFieldIndex = 0;<NEW_LINE>for (int i = 0; i < outFieldInfoList.size(); ... | inFieldIndex.put(i, nonSideIndex); |
1,049,048 | private void replayResponseToBrowser(CrawlURI curi, InterceptedRequest interceptedRequest) {<NEW_LINE>// There seems to be no easy way to stream the body to the browser so we slurp it into<NEW_LINE>// memory with a size limit. The one way I can see to achieve streaming is to have Heritrix<NEW_LINE>// serve the request ... | "Page body too large to replay: {0}", curi.getURI()); |
1,082,497 | private void insertDraggedEntities(MouseEvent me) {<NEW_LINE>GridElement entity = handler.getDrawPanel().getElementToComponent(me.getComponent());<NEW_LINE>DrawPanel currentDiagram = CurrentGui.getInstance().getGui().getCurrentDiagram();<NEW_LINE>List<GridElement> selectedEntities = handler.getDrawPanel().getSelector()... | - entity.getRectangle().x; |
1,390,294 | public static <T> void quickSort(long[] ids, T[] values, int low, int high) {<NEW_LINE>if (low < high) {<NEW_LINE>int mid = (low + high) / 2;<NEW_LINE>long tmp = ids[mid];<NEW_LINE>T tmpValue = values[mid];<NEW_LINE>ids[mid] = ids[low];<NEW_LINE>values[mid] = values[low];<NEW_LINE>ids[low] = tmp;<NEW_LINE>values[low] =... | [ii] = ids[jj]; |
1,360,120 | private void citationNotExists(EntityManagerContainerBasic emc, Field field, String value, JpaObject jpa, CheckPersist checkPersist, CheckPersistType checkPersistType) throws Exception {<NEW_LINE>if (StringUtils.isNotEmpty(value) && (!ArrayUtils.contains(checkPersist.excludes(), value))) {<NEW_LINE>for (CitationNotExis... | (), ",") + "."); |
146,716 | public ErrorCode action(ByteBuf ackPayload, String clientID, String fromUser, ProtoConstants.RequestSourceType requestSourceType, WFCMessage.RouteRequest request, Qos1PublishHandler.IMCallback callback) {<NEW_LINE>MemorySessionStore.Session session = m_sessionsStore.sessionForClientAndUser(fromUser, clientID);<NEW_LINE... | String serverIp = mServer.getServerIp(); |
1,010,619 | private synchronized boolean moveProperties(String oldPath, String newPath) throws IOException {<NEW_LINE>String oldSubListPath = oldPath + ".";<NEW_LINE>String newSubListPath = newPath + ".";<NEW_LINE>// check for move conflict<NEW_LINE>if (propertyTable.getRecord(new StringField(newPath)) != null) {<NEW_LINE>return f... | oldSubListPath.length()))); |
1,403,878 | public void aesDecrypt(final byte[] key, InputStream in, OutputStream out, long inputSize) throws IOException, CryptoError {<NEW_LINE>InputStream decrypted = null;<NEW_LINE>try {<NEW_LINE>byte[] cKey = key;<NEW_LINE>boolean macIncluded = inputSize % 2 == 1;<NEW_LINE>if (macIncluded) {<NEW_LINE>SubKeys subKeys = getSubK... | IOUtils.read(in, iv); |
1,827,251 | protected int doWork() {<NEW_LINE>final List<Path> <MASK><NEW_LINE>if (TEST_INPUT_READABILITY) {<NEW_LINE>IOUtil.assertPathsAreReadable(inputPaths);<NEW_LINE>}<NEW_LINE>IOUtil.assertFileIsReadable(HAPLOTYPE_MAP);<NEW_LINE>IOUtil.assertFileIsWritable(OUTPUT);<NEW_LINE>final FingerprintChecker checker = new FingerprintCh... | inputPaths = IOUtil.getPaths(INPUT); |
737,753 | public static void copyHtmlInputTextAttributes(HtmlInputText src, HtmlInputText dest) {<NEW_LINE>dest.setId(src.getId());<NEW_LINE>boolean forceId = getBooleanValue(JSFAttr.FORCE_ID_ATTR, src.getAttributes().get(JSFAttr.FORCE_ID_ATTR), false);<NEW_LINE>if (forceId) {<NEW_LINE>dest.getAttributes().put(JSFAttr.FORCE_ID_A... | setAccesskey(src.getAccesskey()); |
749,146 | public Function newInstance(int position, ObjList<Function> args, IntList argPositions, CairoConfiguration configuration, SqlExecutionContext sqlExecutionContext) throws SqlException {<NEW_LINE>final char c = args.getQuick(0).getChar(null);<NEW_LINE>switch(c) {<NEW_LINE>case 'd':<NEW_LINE>return new TimestampFloorDDFun... | (args.getQuick(1)); |
765,987 | public DomainSettings unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DomainSettings domainSettings = new DomainSettings();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth +... | ().unmarshall(context)); |
529,101 | public void actionPerformedImpl(ActionEvent e, RTextArea textArea) {<NEW_LINE>try {<NEW_LINE>// find current color at caret<NEW_LINE>int caretPosition = textArea.getCaretPosition();<NEW_LINE>int start;<NEW_LINE>int len = 0;<NEW_LINE>String oldStr;<NEW_LINE>int[] result = findColorAt(textArea, caretPosition);<NEW_LINE>i... | start + length.get()); |
1,508,818 | public EnableVpcClassicLinkResult unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>EnableVpcClassicLinkResult enableVpcClassicLinkResult = new EnableVpcClassicLinkResult();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument())<NEW_LINE>targetDepth... | int originalDepth = context.getCurrentDepth(); |
281,514 | protected void onSaveInstanceState(@NonNull Bundle outState) {<NEW_LINE>// responsibility of restore is preferred in onCreate() before than in<NEW_LINE>// onRestoreInstanceState when there are Fragments involved<NEW_LINE>Log_OC.v(TAG, "onSaveInstanceState() start");<NEW_LINE>super.onSaveInstanceState(outState);<NEW_LIN... | putBoolean(FileDisplayActivity.KEY_SYNC_IN_PROGRESS, mSyncInProgress); |
1,282,269 | private boolean matchArg(String arg, IKey key) {<NEW_LINE>String kn = options.caseSensitiveOptions ? key.getName() : key.getName().toLowerCase();<NEW_LINE>if (options.allowAbbreviatedOptions) {<NEW_LINE>if (kn.startsWith(arg))<NEW_LINE>return true;<NEW_LINE>} else {<NEW_LINE>ParameterDescription <MASK><NEW_LINE>if (pd ... | pd = descriptions.get(key); |
532,444 | public boolean doMonitor(ServiceEmitter emitter) {<NEW_LINE>if (cache != null) {<NEW_LINE>final CacheStats currCacheStats = cache.getStats();<NEW_LINE>final CacheStats deltaCacheStats = currCacheStats.delta(prevCacheStats);<NEW_LINE>final CachePopulatorStats.Snapshot currCachePopulatorStats = cachePopulatorStats.snapsh... | deltaCachePopulatorStats = currCachePopulatorStats.delta(prevCachePopulatorStats); |
1,573,789 | public void init(boolean forEncryption, CipherParameters params) throws IllegalArgumentException {<NEW_LINE>if (params instanceof ParametersWithIV) {<NEW_LINE>ParametersWithIV ivParam = (ParametersWithIV) params;<NEW_LINE>byte[] iv = ivParam.getIV();<NEW_LINE>if (iv.length < blockSize) {<NEW_LINE>throw new IllegalArgum... | true, ivParam.getParameters()); |
389,580 | public static byte[] calculateSSLMac(byte[] input, byte[] macWriteSecret, MacAlgorithm macAlgorithm) {<NEW_LINE>final byte[] pad1 = SSLUtils.getPad1(macAlgorithm);<NEW_LINE>final byte[] pad2 = SSLUtils.getPad2(macAlgorithm);<NEW_LINE>try {<NEW_LINE>final String hashName = getHashAlgorithm(macAlgorithm);<NEW_LINE>final ... | hashFunction = MessageDigest.getInstance(hashName); |
820,449 | void move(FragmentDB destFrag, Address min, Address max) throws NotFoundException {<NEW_LINE>lock.acquire();<NEW_LINE>try {<NEW_LINE>if (!getProgram().getMemory().contains(min, max)) {<NEW_LINE>throw new NotFoundException("Address range for " + min + ", " + max + " is not contained in memory");<NEW_LINE>}<NEW_LINE>Addr... | DOCR_CODE_MOVED, null, min, max); |
1,066,291 | public Map<String, INDArray> init(NeuralNetConfiguration conf, INDArray paramsView, boolean initializeParams) {<NEW_LINE>SeparableConvolution2D layer = (SeparableConvolution2D) conf.getLayer();<NEW_LINE>if (layer.getKernelSize().length != 2)<NEW_LINE>throw new IllegalArgumentException("Filter size must be == 2");<NEW_L... | (conf, depthWiseWeightView, initializeParams)); |
929,085 | private void processType(TypeElement autoBuilderType, TypeElement ofClass, String callMethod) {<NEW_LINE>ImmutableSet<ExecutableElement> methods = abstractMethodsIn(getLocalAndInheritedMethods(autoBuilderType, typeUtils(), elementUtils()));<NEW_LINE>Executable executable = findExecutable(ofClass, callMethod, autoBuilde... | TypeMirror builtType = executable.builtType(); |
201,206 | private void calculateDampingMoments(FlightConfiguration configuration, FlightConditions conditions, AerodynamicForces total) {<NEW_LINE>// Calculate pitch and yaw damping moments<NEW_LINE>double mul = getDampingMultiplier(configuration, conditions, conditions.getPitchCenter().x);<NEW_LINE>double pitchRate = conditions... | ), total.getCyaw()); |
79,661 | private boolean validateReplicationTrx(final Mutable<Integer> candidatesUpdated) {<NEW_LINE>final IQueryBuilder<I_C_OLCand> queryBuilder = createOLCandQueryBuilder();<NEW_LINE>final Iterator<I_C_OLCand> selectedCands = queryBuilder.create().iterate(I_C_OLCand.class);<NEW_LINE>int candidatesWithErorr = 0;<NEW_LINE>// av... | candidatesUpdated.getValue() + 1); |
1,652,682 | public void doSetup() {<NEW_LINE>delT = 0.005f;<NEW_LINE>espSqr = 500.0f;<NEW_LINE>float[] auxPositionRandom = new float[numBodies * 4];<NEW_LINE>float[] auxVelocityZero = new float[numBodies * 3];<NEW_LINE>for (int i = 0; i < auxPositionRandom.length; i++) {<NEW_LINE>auxPositionRandom[i] = (float) Math.random();<NEW_L... | posSeq, 0, auxPositionRandom.length); |
969,314 | public int numberOfArithmeticSlices(int[] A) {<NEW_LINE>int res = 0;<NEW_LINE>Map<Integer, Integer>[] map = new Map[A.length];<NEW_LINE>for (int i = 0; i < A.length; i++) {<NEW_LINE>map[i] = new HashMap<>(i);<NEW_LINE>for (int j = 0; j < i; j++) {<NEW_LINE>long diff = (long) A<MASK><NEW_LINE>if (diff <= Integer.MIN_VAL... | [i] - A[j]; |
1,089,616 | private Icon runInGraphicsContext(TripleFunction<BufferedImage, Graphics2D, FontRenderContext, Icon> callback) {<NEW_LINE>Icon result = null;<NEW_LINE>Graphics2D graphics = null;<NEW_LINE>// noinspection UndesirableClassUsage<NEW_LINE>BufferedImage image = new BufferedImage(iconSize, iconSize, BufferedImage.TYPE_4BYTE_... | deriveFont(Font.PLAIN, fontSize); |
1,587,077 | private void saveAllEntities() {<NEW_LINE>// use ImmutableObject instead of Registry so that the Key generation doesn't break<NEW_LINE>ImmutableList<Registry> registries = ImmutableList.of(sunriseTld, gaTld, eapTld);<NEW_LINE>ImmutableList<RegistrarContact> contacts = contactsBuilder.build();<NEW_LINE>tm().transact(() ... | tm().putAll(registrars); |
433,519 | private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents<NEW_LINE>void initComponents() {<NEW_LINE>java.awt.GridBagConstraints gridBagConstraints;<NEW_LINE>jLabel1 = new javax.swing.JLabel();<NEW_LINE>changeNameTextField = new javax.swing.JTextField();<NEW_LINE>renameCommentsChe... | = java.awt.GridBagConstraints.HORIZONTAL; |
840,518 | public static DescribeNetworkAnalyticsPacketLossResponse unmarshall(DescribeNetworkAnalyticsPacketLossResponse describeNetworkAnalyticsPacketLossResponse, UnmarshallerContext context) {<NEW_LINE>describeNetworkAnalyticsPacketLossResponse.setRequestId(context.stringValue("DescribeNetworkAnalyticsPacketLossResponse.Reque... | ("DescribeNetworkAnalyticsPacketLossResponse.PacketLossInfos[" + i + "].Country.CountryEn")); |
1,227,854 | public static void main(String[] args) throws ConnectorException, IOException {<NEW_LINE>Config clientConfig = new Config();<NEW_LINE>clientConfig.configurationHeader = CONFIG_HEADER;<NEW_LINE>clientConfig.customConfigurationDefaultsProvider = DEFAULTS;<NEW_LINE>clientConfig.configurationFile = CONFIG_FILE;<NEW_LINE>Cl... | testCL(clientConfig.uri, context); |
620,376 | public void startUp(FloodlightModuleContext context) {<NEW_LINE>// paag: register the IControllerCompletionListener<NEW_LINE>floodlightProviderService.addCompletionListener(this);<NEW_LINE>floodlightProviderService.addOFMessageListener(OFType.PACKET_IN, this);<NEW_LINE>floodlightProviderService.<MASK><NEW_LINE>floodlig... | addOFMessageListener(OFType.FLOW_REMOVED, this); |
1,792,246 | public static void main(String[] args) {<NEW_LINE>AmazonGuardDuty guardduty = AmazonGuardDutyClientBuilder.defaultClient();<NEW_LINE>// Set detectorId to the detectorId returned by GuardDuty's<NEW_LINE>// ListDetectors() for your current AWS Account/Region<NEW_LINE>final String detectorId = "ceb03b04f96520a8884c959f3e9... | out.println("FindingId: " + finding); |
338,187 | public static Validated build(String pattern, @Nullable String metadataPattern) {<NEW_LINE>Matcher matcher = TILDE_RANGE_PATTERN.matcher(pattern);<NEW_LINE>if (!matcher.matches()) {<NEW_LINE>return Validated.invalid("tildeRange", pattern, "not a tilde range");<NEW_LINE>}<NEW_LINE>String major = matcher.group(1);<NEW_LI... | + "." + minor + "." + patch; |
700,775 | public AwsElbLoadBalancerConnectionDraining unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AwsElbLoadBalancerConnectionDraining awsElbLoadBalancerConnectionDraining = new AwsElbLoadBalancerConnectionDraining();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParen... | class).unmarshall(context)); |
207,226 | public JSONObject decode42(ByteBuffer buf) {<NEW_LINE>JSONObject m = new JSONObject();<NEW_LINE>while (buf.position() < buf.array().length) {<NEW_LINE>long tl = uint32(buf);<NEW_LINE>int t = (int) (tl >>> 3);<NEW_LINE>switch(t) {<NEW_LINE>case 1:<NEW_LINE>m.put("AAA311", uint32(buf));<NEW_LINE>break;<NEW_LINE>case 2:<N... | ("AAA198", uint32(buf)); |
1,200,051 | public // wrapper. -- L.A. 4.5<NEW_LINE>DatasetDTO processOAIDCxml(String DcXmlToParse) throws XMLStreamException {<NEW_LINE>// look up DC metadata mapping:<NEW_LINE>ForeignMetadataFormatMapping dublinCoreMapping = findFormatMappingByName(DCTERMS);<NEW_LINE>if (dublinCoreMapping == null) {<NEW_LINE>throw new EJBExcepti... | setVersionState(DatasetVersion.VersionState.RELEASED); |
1,653,971 | private void createLUsForTUs(final I_M_ShipmentSchedule schedule, final List<I_M_ShipmentSchedule_QtyPicked> qtyPickedRecords) {<NEW_LINE>//<NEW_LINE>// Create HUContext from "schedule" because we want to get the Ctx and TrxName from there<NEW_LINE>final IContextAware contextProvider = InterfaceWrapperHelper.getContext... | LULoader luLoader = new LULoader(huContext); |
1,267,724 | public void paintEntity(Graphics g) {<NEW_LINE>Graphics2D g2 = (Graphics2D) g;<NEW_LINE>g2.setFont(HandlerElementMap.getHandlerForElement(this).<MASK><NEW_LINE>// enable colors<NEW_LINE>Composite[] composites = colorize(g2);<NEW_LINE>g2.setColor(fgColor);<NEW_LINE>Polygon poly = new Polygon();<NEW_LINE>poly.addPoint(ge... | getFontHandler().getFont()); |
725,758 | private static ImmutableList<GeneratedTarget> runQuery(Project project, Label label) {<NEW_LINE>String outputBase = BlazeQueryOutputBaseProvider.<MASK><NEW_LINE>if (outputBase == null) {<NEW_LINE>// since this is run automatically in the background, don't run without a custom output base,<NEW_LINE>// otherwise we'll be... | getInstance(project).getOutputBaseFlag(); |
236,012 | final GetNetworkAnalyzerConfigurationResult executeGetNetworkAnalyzerConfiguration(GetNetworkAnalyzerConfigurationRequest getNetworkAnalyzerConfigurationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getNetworkAnalyzerConfigurationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = ... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
1,439,094 | public static Props loadPropsFromYamlFile(final ProjectLoader projectLoader, final ExecutableFlow executableFlow, final String path) {<NEW_LINE>File tempDir = null;<NEW_LINE>Props props = null;<NEW_LINE>try {<NEW_LINE>tempDir = com.google.common.io.Files.createTempDir();<NEW_LINE>props = FlowLoaderUtils.getPropsFromYam... | (tempDir, projectLoader, executableFlow)); |
1,738,346 | private boolean sendAsReply(String channel, String text) {<NEW_LINE>boolean restricted = settings.getBoolean("mentionReplyRestricted");<NEW_LINE>boolean doubleAt = text.startsWith("@@");<NEW_LINE>if (doubleAt || (!restricted && text.startsWith("@"))) {<NEW_LINE>String[] split = text.split(" ", 2);<NEW_LINE>// Min usern... | g.insert(text, false); |
1,681,968 | public void actionPerformed(ActionEvent e) {<NEW_LINE>MenuItem c = (MenuItem) e.getSource();<NEW_LINE>String name = c.getName();<NEW_LINE>if ("ADD_URL".equals(name)) {<NEW_LINE>XDMApp.getInstance().addDownload(null, null);<NEW_LINE>} else if ("RESTORE".equals(name)) {<NEW_LINE>XDMApp.getInstance().showMainWindow();<NEW... | int ret = SpeedLimiter.getSpeedLimit(); |
754,169 | private HttpServer configHttpServer(URI uri, ResourceConfig rc) {<NEW_LINE>String protocol = uri.getScheme();<NEW_LINE>final HttpServer server;<NEW_LINE>if (protocol != null && protocol.equals("https")) {<NEW_LINE>SSLContextConfigurator sslContext = new SSLContextConfigurator();<NEW_LINE>String keystoreFile = this.conf... | size() > 0, "Http Server should have some listeners, but now is none"); |
779,971 | public int onStartCommand(Intent intent, int flags, int startId) {<NEW_LINE>int status = intent.getIntExtra(PackageInstaller.EXTRA_STATUS, -999);<NEW_LINE>switch(status) {<NEW_LINE>case PackageInstaller.STATUS_PENDING_USER_ACTION:<NEW_LINE><MASK><NEW_LINE>sendStatusChangeBroadcast(intent.getIntExtra(PackageInstaller.EX... | Log.d(TAG, "Requesting user confirmation for installation"); |
142,822 | static void loadCsv(String projectId, String instanceId, String databaseId, String tableName, String filePath, String[] optFlags) throws Exception {<NEW_LINE>SpannerOptions options = SpannerOptions<MASK><NEW_LINE>Spanner spanner = options.getService();<NEW_LINE>// Initialize option flags<NEW_LINE>Options opt = new Opti... | .newBuilder().build(); |
54,813 | public void writeTo(OutputStream out) throws FuseMapFillerException, IOException, PinMapException {<NEW_LINE>for (String in : builder.getInputs()) {<NEW_LINE>int i = pinMap.getInputFor(in);<NEW_LINE>if (i == 13)<NEW_LINE>filler.addVariable(21, new Variable(in));<NEW_LINE>else<NEW_LINE>filler.addVariable((i - 1) * 2, ne... | 23 - pinMap.getOutputFor(o); |
5,723 | private void updateColumnItem(TableItem attrItem) {<NEW_LINE>DBDAttributeBinding attr = (DBDAttributeBinding) attrItem.getData();<NEW_LINE>String transformStr = "";<NEW_LINE>DBVEntityAttribute vAttr = vEntity.getVirtualAttribute(attr, false);<NEW_LINE>if (vAttr != null) {<NEW_LINE>DBVTransformSettings transformSettings... | String.join(",", coStrings); |
1,567,386 | private static long parseLong(final CharSequence cs, final int length) {<NEW_LINE>int i = 0;<NEW_LINE>final char firstCh = cs.charAt(i);<NEW_LINE>final boolean negative = firstCh == '-';<NEW_LINE>if ((negative || firstCh == '+') && ++i == length) {<NEW_LINE>throw illegalInput(cs);<NEW_LINE>}<NEW_LINE>long result = 0;<N... | long next = result * RADIX_10 - digit; |
1,810,414 | private void testCodeFirstCompletableFuture(CodeFirstPojoIntf codeFirst) {<NEW_LINE>if (!CodeFirstPojoClientIntf.class.isInstance(codeFirst)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Vertx vertx = VertxUtils.getOrCreateVertxByName("transport", null);<NEW_LINE>CountDownLatch latch = new CountDownLatch(1);<NEW_LINE>// vert... | context.addContext("k", "v"); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.