idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,138,603 | private // ----------------------------------------------------------------------------------------------<NEW_LINE>void addVirtualBasesSpeculatively(int startOffset, List<ClassPdbMember> pdbMembers, List<VirtualLayoutBaseClass> virtualBases, TaskMonitor monitor) throws CancelledException {<NEW_LINE>String accumulatedCo... | ().getDataTypeName() + ")"; |
740,025 | // Stratified cross validation<NEW_LINE>public void cross_validation(DataSet x, double[] weighted_C, int nr_fold, double[] target) {<NEW_LINE>final int l = x.size();<NEW_LINE>int[] perm = new int[l], fold_start;<NEW_LINE>// stratified cv may not give leave-one-out rate<NEW_LINE>// Each class to l folds -> some folds ma... | = new double[submodel.nr_class]; |
869,634 | public static void convolve(Kernel2D_S32 kernel, GrayS16 input, GrayI16 output, int skip) {<NEW_LINE>output.reshape(input.width / skip, input.height / skip);<NEW_LINE>final int radius = kernel.getRadius();<NEW_LINE>final int width = input.width - input.width % skip;<NEW_LINE>final int height = input.height - input.heig... | get(j, i) * v; |
1,719,082 | protected void prepare() {<NEW_LINE>ProcessInfoParameter[] para = getParameter();<NEW_LINE>for (int i = 0; i < para.length; i++) {<NEW_LINE>String name = <MASK><NEW_LINE>if (para[i].getParameter() == null)<NEW_LINE>;<NEW_LINE>if (name.equals("MovementDate"))<NEW_LINE>p_MovementDate = (Timestamp) para[i].getParameter();... | para[i].getParameterName(); |
640,148 | public boolean isMUL(String columnName) {<NEW_LINE>for (SQLTableElement element : this.tableElementList) {<NEW_LINE>if (element instanceof MySqlUnique) {<NEW_LINE>MySqlUnique unique = (MySqlUnique) element;<NEW_LINE>SQLExpr column = unique.getColumns().<MASK><NEW_LINE>if (column instanceof SQLIdentifierExpr && SQLUtils... | get(0).getExpr(); |
125,518 | private JsonWebTokenImpl verifyAndParseEncryptedJWT(String issuer, PublicKey publicKey, PrivateKey privateKey) throws JWTProcessingException {<NEW_LINE>if (encryptedJWT == null) {<NEW_LINE>throw new IllegalStateException("EncryptedJWT not parsed");<NEW_LINE>}<NEW_LINE>String algName = encryptedJWT.getHeader().getAlgori... | decrypt(new RSADecrypter(privateKey)); |
55,038 | public static ErrorDescription implementMethods(HintContext ctx) {<NEW_LINE>ClassTree clazz = (ClassTree) ctx.getPath().getLeaf();<NEW_LINE>Element typeEl = ctx.getInfo().getTrees().getElement(ctx.getPath());<NEW_LINE>if (typeEl == null || !typeEl.getKind().isClass())<NEW_LINE>return null;<NEW_LINE>List<Tree> candidate... | >(clazz.getImplementsClause()); |
1,814,156 | public StarlarkCallable rule(StarlarkFunction implementation, Boolean test, Object attrs, Object implicitOutputs, Boolean executable, Boolean outputToGenfiles, Sequence<?> fragments, Sequence<?> hostFragments, Boolean starlarkTestable, Sequence<?> toolchains, boolean useToolchainTransition, String doc, Sequence<?> prov... | (functionIdentifier, loc, ruleInfo)); |
1,397,282 | private static List<Class> findClasses(File directory, String packageName) throws ClassNotFoundException, IOException, URISyntaxException {<NEW_LINE>List<Class> <MASK><NEW_LINE>if (!directory.exists()) {<NEW_LINE>// maybe we are running from a jar file, so try that<NEW_LINE>File thisJarFile = new File(SpecificProfileFa... | classes = new ArrayList<>(); |
26,183 | public SaveResult saveIdentity(SignalProtocolAddress address, IdentityKey identityKey, boolean nonBlockingApproval) {<NEW_LINE>synchronized (LOCK) {<NEW_LINE>IdentityStoreRecord identityRecord = cache.<MASK><NEW_LINE>RecipientId recipientId = RecipientId.fromExternalPush(address.getName());<NEW_LINE>if (identityRecord ... | get(address.getName()); |
1,784,270 | final AssociateMemberAccountResult executeAssociateMemberAccount(AssociateMemberAccountRequest associateMemberAccountRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(associateMemberAccountRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
1,121,832 | public void runScript() throws IOException {<NEW_LINE>List<String> args = new ArrayList<>();<NEW_LINE>String pythonVersion = mlContext.getProperties().getOrDefault(MLConstants.PYTHON_VERSION, "");<NEW_LINE>String pythonExec = "python" + pythonVersion;<NEW_LINE>// check if has python2 or python3 environment<NEW_LINE>if ... | " ").join(args)); |
1,176,129 | public static String[][] parseFromLines(String[] lines, int minimumItemsInOneLine, int startLine, int endLine) {<NEW_LINE>String[][] labels = null;<NEW_LINE><MASK><NEW_LINE>if (startLine <= endLine) {<NEW_LINE>int i, j;<NEW_LINE>int count = 0;<NEW_LINE>for (i = startLine; i <= endLine; i++) {<NEW_LINE>String[] labelInf... | String[][] labelsRet = null; |
1,812,162 | protected void cleanupCompensation() {<NEW_LINE>// The compensation is at the end here. Simply stop the execution.<NEW_LINE>commandContext.getHistoryManager(<MASK><NEW_LINE>commandContext.getExecutionEntityManager().deleteExecutionAndRelatedData(execution, null);<NEW_LINE>ExecutionEntity parentExecutionEntity = executi... | ).recordActivityEnd(execution, null); |
506,257 | public void doApkBuild() throws Exception {<NEW_LINE>// TODO Merge 2 zip packages<NEW_LINE>apkFile = getApkFile();<NEW_LINE>diffAPkFile = getDiffAPkFile();<NEW_LINE>Profiler.start("build tpatch apk");<NEW_LINE>Profiler.enter("prepare dir");<NEW_LINE>File tmpWorkDir = new File(diffAPkFile.getParentFile(), "tmp-apk");<NE... | new File(tmpWorkDir, "res")); |
1,228,114 | protected ECPointFormat selectPointFormat(T msg) {<NEW_LINE>ECPointFormat selectedFormat;<NEW_LINE>if (chooser.getConfig().isEnforceSettings()) {<NEW_LINE>selectedFormat = chooser<MASK><NEW_LINE>} else {<NEW_LINE>Set<ECPointFormat> serverSet = new HashSet<>(chooser.getConfig().getDefaultServerSupportedPointFormats());<... | .getConfig().getDefaultSelectedPointFormat(); |
1,116,410 | public static RandomForest fit(Formula formula, DataFrame data, Properties params) {<NEW_LINE>int ntrees = Integer.parseInt(params<MASK><NEW_LINE>int mtry = Integer.parseInt(params.getProperty("smile.random_forest.mtry", "0"));<NEW_LINE>SplitRule rule = SplitRule.valueOf(params.getProperty("smile.random_forest.split_ru... | .getProperty("smile.random_forest.trees", "500")); |
613,813 | public void heartbeat() {<NEW_LINE>LinkedMultiValueMap<String, ElasticAgentMetadata> elasticAgentsOfMissingPlugins = agentService.allElasticAgents();<NEW_LINE>// pingMessage TTL is set lesser than elasticPluginHeartBeatInterval to ensure there aren't multiple ping request for the same plugin<NEW_LINE>long pingMessageTi... | (), clusterProfiles), pingMessageTimeToLive); |
824,917 | public DashEncryption unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DashEncryption dashEncryption = new DashEncryption();<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(); |
444,304 | public static DescribeAffectedMaliciousFileImagesResponse unmarshall(DescribeAffectedMaliciousFileImagesResponse describeAffectedMaliciousFileImagesResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeAffectedMaliciousFileImagesResponse.setRequestId(_ctx.stringValue("DescribeAffectedMaliciousFileImagesResponse.Reques... | ("DescribeAffectedMaliciousFileImagesResponse.AffectedMaliciousFileImagesResponse[" + i + "].Status")); |
558,497 | EncodedParameter encodeParameterValue(Object value, @Nullable PostgresTypeIdentifier dataType, @Nullable Object parameterValue) {<NEW_LINE>if (dataType == null) {<NEW_LINE>if (parameterValue == null) {<NEW_LINE>throw new IllegalArgumentException(String<MASK><NEW_LINE>}<NEW_LINE>Codec<?> codec = this.codecLookup.findEnc... | .format("Cannot encode null value %s using type inference", value)); |
533,392 | public void onEnterStage(MySQLResponseService service) {<NEW_LINE>RouteResultsetNode rrn = (RouteResultsetNode) service.getAttachment();<NEW_LINE>if (!service.getConnection().isClosed() && service.getXaStatus() != TxState.TX_COMMIT_FAILED_STATE) {<NEW_LINE>session.releaseConnection(rrn, false);<NEW_LINE>xaHandler.faked... | newService.execCmd("XA COMMIT " + xaTxId); |
1,637,111 | public void stop() {<NEW_LINE>if (tomcatReference != null && Thread.currentThread() == main.getMainThread()) {<NEW_LINE>Tomcat tomcat = tomcatReference.getTomcat();<NEW_LINE>if (tomcat.getServer() == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Logging.info(main, "Stopping webserver...");<NEW_LINE>if (tomcat.getServer(... | main, "Destroy tomcat error.", false, e); |
511,100 | private static HttpURLConnection connect(String url, String method, Map<String, String> requestProperty, boolean doOutput, /* for post/puts */<NEW_LINE>boolean useCaches) throws MalformedURLException, URISyntaxException, IOException {<NEW_LINE>// Decode the url since the url in the card may already be encoded<NEW_LINE>... | ), entry.getValue()); |
1,673,489 | public Optional<Long> launchInstalledBundleInSimulator(String simulatorUdid, String bundleID, LaunchBehavior launchBehavior, List<String> args) throws IOException, InterruptedException {<NEW_LINE>ImmutableList.Builder<String> commandBuilder = ImmutableList.builder();<NEW_LINE>commandBuilder.add(<MASK><NEW_LINE>if (laun... | simctlPath.toString(), "launch"); |
96,613 | public void doTask() {<NEW_LINE>for (String type : config.getOuterClusterTypes()) {<NEW_LINE>try {<NEW_LINE>ClusterType clusterType = ClusterType.lookup(type);<NEW_LINE>SentinelBindTask <MASK><NEW_LINE>if (bindTask != null) {<NEW_LINE>if (!bindTask.future().isDone()) {<NEW_LINE>logger.debug("sentinels of cluster type: ... | bindTask = bindTasks.get(clusterType); |
648,702 | protected void configure() {<NEW_LINE>Config config = ConfigLoader.loadYmlConfigFromResource("configuration.yml", Config.class);<NEW_LINE>ToDoApi toDoApi = Feign.builder().decoder(new GsonDecoder()).logger(new Slf4jLogger()).logLevel(FULL).requestInterceptor(new BasicAuthRequestInterceptor(config.getToDoCredentials().g... | class, config.getPostEndpoint()); |
480,629 | public static IntDeltaCompressor newInstance(@Nonnull IntList deltaList) {<NEW_LINE>if (deltaList.size() < 0)<NEW_LINE>throw new NegativeArraySizeException(<MASK><NEW_LINE>int bytesAfterCompression = ByteArrayUtils.countBytesAfterCompression(deltaList);<NEW_LINE>Flags startedDeltaIndex = new BitSetFlags(bytesAfterCompr... | "size < 0: " + deltaList.size()); |
1,499,026 | public Map<JCTree, JCTree> resolveMethodMember(JavacNode node) {<NEW_LINE>ArrayDeque<JCTree> stack = new ArrayDeque<JCTree>();<NEW_LINE>{<NEW_LINE>JavacNode n = node;<NEW_LINE>while (n != null) {<NEW_LINE>stack.push(n.get());<NEW_LINE>n = n.up();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>messageSuppressor.disableLoggers();<NEW_LI... | ), node.getContext()); |
915,526 | public static <T> Queue<T> createQueue(int queueType, final int queueCapacity) {<NEW_LINE>switch(queueType) {<NEW_LINE>case -99:<NEW_LINE>return new ArrayDeque<T>(queueCapacity);<NEW_LINE>case -3:<NEW_LINE>return new ArrayBlockingQueue<T>(queueCapacity);<NEW_LINE>case -2:<NEW_LINE>return new LinkedTransferQueue<T>();<N... | throw new IllegalArgumentException("Type: " + queueType); |
732,220 | private TreeNode buildTree(int[] preorder, int preStart, int preEnd, Map<Integer, Integer> inorderMap, int inStart, int inEnd) {<NEW_LINE>if (preStart > preEnd || inStart > inEnd) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>TreeNode root = <MASK><NEW_LINE>int inRoot = inorderMap.get(preorder[preStart]);<NEW_LINE>// Thi... | new TreeNode(preorder[preStart]); |
1,682,825 | private static void testDateTime() {<NEW_LINE>{<NEW_LINE>final Date now = Foo.now();<NEW_LINE>final Date nowChrono = Foo.chrono_now();<NEW_LINE>final DateFormat df = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss");<NEW_LINE>System.out.println("now: " + df.format(now));<NEW_LINE>final Date today = Calendar.getInstance().get... | chrono_now_opt(true).isPresent(); |
1,027,709 | protected boolean streamFromRepo(HttpServletRequest request, HttpServletResponse response, Repository repository, RevCommit commit, String requestedPath) throws IOException {<NEW_LINE>boolean served = false;<NEW_LINE>RevWalk rw = new RevWalk(repository);<NEW_LINE>TreeWalk tw = new TreeWalk(repository);<NEW_LINE>try {<N... | copyTo(response.getOutputStream()); |
1,676,108 | public void close() {<NEW_LINE>// Make sure we are not restoring more then once<NEW_LINE>if (restored) {<NEW_LINE>slogger.warn("currentInstance: Skip restoring current instance because we already did that: {}", this);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>restored = true;<NEW_LINE>// Actually restore it<NEW_LINE>final O... | instance, currentInstanceHolder.get()); |
723,634 | private static Set<ProxyClassLoader> coalesceAppend(ClassLoader root, Set<ProxyClassLoader> existing, ClassLoader[] appended, ClassLoader[] systemCL) throws IllegalArgumentException {<NEW_LINE>int likelySize = existing.size() + appended.length;<NEW_LINE>LinkedHashSet<ClassLoader> uniq = new LinkedHashSet<ClassLoader>(l... | addRec(root, uniq, l); |
484,513 | public static void createAndRegister() {<NEW_LINE>SubstrateTargetDescription target = ConfigurationValues.getTarget();<NEW_LINE>SubstrateRegisterConfig registerConfig = new SubstrateAArch64RegisterConfig(SubstrateRegisterConfig.ConfigKind.NORMAL, null, target, SubstrateOptions.PreserveFramePointer.getValue());<NEW_LINE... | calleeSavedRegisters.remove(AArch64.lr); |
590,539 | public void replace(final StringBuilder target, final String piece) {<NEW_LINE>// Compile the regex to match something like <img ... /> or<NEW_LINE>// <IMG ... />. This regex is case sensitive and keeps the style,<NEW_LINE>// src or other attributes of the <img> tag.<NEW_LINE>final Pattern p = Pattern.compile("<\\s*[iI... | (piece.substring(start)); |
213,546 | public void schedule(TransportContext transportContext, EventInternal event, TransportScheduleCallback callback) {<NEW_LINE>executor.execute(() -> {<NEW_LINE>try {<NEW_LINE>TransportBackend transportBackend = backendRegistry.get(transportContext.getBackendName());<NEW_LINE>if (transportBackend == null) {<NEW_LINE>Strin... | "Error scheduling event " + e.getMessage()); |
700,715 | public static QCommitPanel createRefreshPanel(final File[] roots, final File repository, String commitMessage, final QPatch patch, final HgRevision parentRevision, final String helpCtxId) {<NEW_LINE>final Preferences preferences = HgModuleConfig.getDefault().getPreferences();<NEW_LINE>List<<MASK><NEW_LINE>final Default... | String> recentUsers = getRecentUsers(repository); |
580,129 | public PointSensitivityBuilder presentValueSensitivityRates(ResolvedSwaption swaption, RatesProvider ratesProvider, HullWhiteOneFactorPiecewiseConstantParametersProvider hwProvider) {<NEW_LINE>validate(swaption, ratesProvider, hwProvider);<NEW_LINE>ResolvedSwap swap = swaption.getUnderlying();<NEW_LINE>LocalDate expiry... | PointSensitivityBuilder point = PointSensitivityBuilder.none(); |
370,087 | private PackageData parseDataFromClassFile(InputFile file) throws IOException {<NEW_LINE>PackageDataBuilder builder = new PackageDataBuilder();<NEW_LINE>ClassFile <MASK><NEW_LINE>TypeDeclaration typeDecl = classFile.getType();<NEW_LINE>for (Annotation annotation : typeDecl.getAnnotations()) {<NEW_LINE>String signature ... | classFile = ClassFile.create(file); |
537,526 | public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) {<NEW_LINE>LogHelper.<MASK><NEW_LINE>if (isUriNotValid(uri)) {<NEW_LINE>return new MatrixCursor(new String[0], 1);<NEW_LINE>}<NEW_LINE>ensureCacheReady();<NEW_LINE>String[] queryKeys;<NEW_LINE>if (projection ==... | i(TAG, "query values with: " + this); |
21,716 | public int[] queryFanSpeeds() {<NEW_LINE>if (!IS_PI) {<NEW_LINE>String fanStr = this.sensorsMap.get(FAN);<NEW_LINE>if (fanStr != null) {<NEW_LINE>List<Integer> speeds = new ArrayList<>();<NEW_LINE>int fan = 1;<NEW_LINE>for (; ; ) {<NEW_LINE>String fanPath = String.format("%s%d_input", fanStr, fan);<NEW_LINE>if (!new Fi... | ] = speeds.get(i); |
195,702 | private void visitGeneratedElements(RoundEnvironment roundEnv, TypeElement generatedElement) {<NEW_LINE>for (Element ae : roundEnv.getElementsAnnotatedWith(generatedElement)) {<NEW_LINE>String comments = getGeneratedComments(ae, generatedElement);<NEW_LINE>if (comments == null || !comments.startsWith(Metadata.ANNOTATIO... | Metadata.ANNOTATION_COMMENT_PREFIX.length()); |
218,193 | public void printTag(String name, HashMap parameters, boolean insertTab, boolean insertNewLine, boolean closeTag) {<NEW_LINE>if (insertTab) {<NEW_LINE>printTabulation();<NEW_LINE>}<NEW_LINE>this.print('<');<NEW_LINE>this.print(name);<NEW_LINE>if (parameters != null) {<NEW_LINE>int length = parameters.size();<NEW_LINE>M... | [i].getKey()); |
1,674,558 | private void displayBox(BoxNode box) {<NEW_LINE>rightPane.removeAll();<NEW_LINE>rightPane.revalidate();<NEW_LINE>rightPane.repaint();<NEW_LINE>if (box.box != null) {<NEW_LINE>HashMap<Integer, Tuple._2<String, Object>> map = new HashMap<Integer, Tuple._2<String, Object>>();<NEW_LINE>Method[] methods = box.box.getClass()... | (field.v1), "wrap"); |
206,626 | private void resize(int newSize) {<NEW_LINE>// find out what the delta is<NEW_LINE>int currentSize = 0;<NEW_LINE>for (int i = 0; i < getCellCount(); i++) {<NEW_LINE>currentSize += cellAt(i).getRequiredSize();<NEW_LINE>}<NEW_LINE>int totalDividerSize = getDividerSize() * (getCellCount() - 1);<NEW_LINE>int newNetSize = n... | cellAt(getCellCount() - 1); |
140,591 | public List<User> executeList(CommandContext commandContext) {<NEW_LINE>// GET /{realm}/users<NEW_LINE>// Query parameters: username, email, firstName, lastName, search(email, first, last or username)<NEW_LINE>// paging first, max<NEW_LINE>UriComponentsBuilder builder = prepareQuery("/users");<NEW_LINE>if (getMaxResult... | HttpStatus statusCode = response.getStatusCode(); |
806,308 | static Authority fromString(String authority) {<NEW_LINE>if (authority == null || authority.length() == 0) {<NEW_LINE>return NoAuthority.INSTANCE;<NEW_LINE>}<NEW_LINE>Matcher matcher = ZOOKEEPER_AUTH.matcher(authority);<NEW_LINE>if (matcher.matches()) {<NEW_LINE>return new ZookeeperAuthority(matcher.group(1).replaceAll... | matcher = SINGLE_MASTER_AUTH.matcher(authority); |
1,706,374 | void merge(@NotNull final SentryOptions options) {<NEW_LINE>if (options.getDsn() != null) {<NEW_LINE>setDsn(options.getDsn());<NEW_LINE>}<NEW_LINE>if (options.getEnvironment() != null) {<NEW_LINE>setEnvironment(options.getEnvironment());<NEW_LINE>}<NEW_LINE>if (options.getRelease() != null) {<NEW_LINE>setRelease(option... | setPrintUncaughtStackTrace(options.getPrintUncaughtStackTrace()); |
368,853 | static String extractCN(final String subjectPrincipal) throws SSLException {<NEW_LINE>if (subjectPrincipal == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>final LdapName subjectDN = new LdapName(subjectPrincipal);<NEW_LINE>final List<Rdn> rdns = subjectDN.getRdns();<NEW_LINE>for (int i = rdns.size()... | Attributes attributes = rds.toAttributes(); |
155,255 | private String findModelPackageName(EntityGraph graph) {<NEW_LINE>String packageName = "";<NEW_LINE>Set<String> packageNames = graph.entities().stream().map(entity -> entity.typeName().packageName()).collect(Collectors.toCollection(TreeSet::new));<NEW_LINE>if (packageNames.size() == 1) {<NEW_LINE>// all the types are i... | .iterator().next(); |
1,570,306 | public static QueryAvailableInstancesResponse unmarshall(QueryAvailableInstancesResponse queryAvailableInstancesResponse, UnmarshallerContext _ctx) {<NEW_LINE>queryAvailableInstancesResponse.setRequestId(_ctx.stringValue("QueryAvailableInstancesResponse.RequestId"));<NEW_LINE>queryAvailableInstancesResponse.setCode(_ct... | ("QueryAvailableInstancesResponse.Data.InstanceList[" + i + "].EndTime")); |
1,369,663 | private String nameForType(TypeMirror type) {<NEW_LINE>return type.accept(new SimpleTypeVisitor8<String, Void>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public String visitDeclared(DeclaredType type, Void v) {<NEW_LINE>String simpleName = simpleNameForType(type);<NEW_LINE>if (type.getTypeArguments().isEmpty()) {<NEW_LI... | ).collect(toImmutableList()); |
466,245 | public static ServerIdentity deserialize(byte[] input) throws IllegalArgumentException, IOException {<NEW_LINE>DataInputStream inputStream = new DataInputStream(new ByteArrayInputStream(input));<NEW_LINE>byte header = inputStream.readByte();<NEW_LINE>if (header != SERVER_IDENTITY_HEADER) {<NEW_LINE>throw new IllegalArg... | random, signingPublicKey, attestationInfo, additionalInfo); |
1,242,408 | public static void addToString(SourceBuilder code, Datatype datatype, Map<Property, PropertyCodeGenerator> generatorsByProperty, boolean forPartial) {<NEW_LINE>// This code is to ensure entry order is preserved.<NEW_LINE>// Specifically this code is boiler plate from Collectors.toMap.<NEW_LINE>// Except with a LinkedHa... | stream().anyMatch(isOptional); |
1,319,142 | public void removeSpectator(final User user) {<NEW_LINE>logger.info(String.format("Removing spectator %s from game %d.", user.toString(), id));<NEW_LINE>synchronized (spectators) {<NEW_LINE>if (!spectators.remove(user)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// not actually spectating<NEW_LINE>user.leaveGame(this);<NEW... | LongPollEvent.GAME_SPECTATOR_LEAVE.toString()); |
785,092 | public static void deserializeToField(final Object containingObject, final String fieldName, final String json, final ClassFieldCache classFieldCache) throws IllegalArgumentException {<NEW_LINE>if (containingObject == null) {<NEW_LINE>throw new IllegalArgumentException("Cannot deserialize to a field of a null object");... | JSONObject wrapperJsonObj = new JSONObject(1); |
1,055,671 | public void run() {<NEW_LINE>var viewer = qupath.getViewer();<NEW_LINE>var imageData = viewer.getImageData();<NEW_LINE>if (imageData == null) {<NEW_LINE>Dialogs.showNoImageError(title);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>var builder = new SvgTools.SvgBuilder(viewer);<NEW_LINE>var server = imageData.getServer();<NEW_L... | compress = params.getBooleanParameterValue("compress"); |
772,065 | private CompletableFuture<Optional<EthPeer>> confirmPivotBlockHeader(final EthPeer bestPeer) {<NEW_LINE>final BlockHeader pivotBlockHeader = fastSyncState.getPivotBlockHeader().get();<NEW_LINE>final RetryingGetHeaderFromPeerByNumberTask task = RetryingGetHeaderFromPeerByNumberTask.forSingleNumber(protocolSchedule, ethC... | bestPeer.disconnect(DisconnectReason.USELESS_PEER); |
398,659 | public static Date pascoa(int ano) {<NEW_LINE>int a = ano % 19;<NEW_LINE>int b = ano / 100;<NEW_LINE>int c = ano % 100;<NEW_LINE>int d = b / 4;<NEW_LINE>int e = b % 4;<NEW_LINE>int f = (b + 8) / 25;<NEW_LINE>int g = (b - f + 1) / 3;<NEW_LINE>int h = (19 * a + b - d - g + 15) % 30;<NEW_LINE>int i = c / 4;<NEW_LINE>int k... | 7 * m + 114) / 31; |
766,597 | protected void prepareHandshakeMessageContents() {<NEW_LINE>LOGGER.debug("Prepare SSL2ClientHello");<NEW_LINE>preparePaddingLength(message);<NEW_LINE>prepareType(message);<NEW_LINE>prepareProtocolVersion(message);<NEW_LINE>// By Default we just set a fixed value with ssl2 cipher suites<NEW_LINE>prepareCipherSuites(mess... | ().getValue().length; |
476,553 | public static void main(String[] args) throws Exception {<NEW_LINE>int port = 8282;<NEW_LINE>try {<NEW_LINE>port = Integer.parseInt<MASK><NEW_LINE>} catch (Exception ex) {<NEW_LINE>// ignore<NEW_LINE>}<NEW_LINE>AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(ConsumerBootstrap.Consume... | (System.getenv("rest.api.port")); |
102,709 | public <T> ClusterInvoker<T> buildClusterInvokerChain(final ClusterInvoker<T> originalInvoker, String key, String group) {<NEW_LINE>ClusterInvoker<T> last = originalInvoker;<NEW_LINE>URL url = originalInvoker.getUrl();<NEW_LINE>List<ModuleModel> moduleModels = getModuleModelsFromUrl(url);<NEW_LINE>List<ClusterFilter> f... | getActivateExtension(url, key, group); |
1,267,475 | public void paint(Graphics g) {<NEW_LINE>Rectangle newBounds = new Rectangle(newViewPort.getBounds());<NEW_LINE>Rectangle currentBounds = new Rectangle(currentViewPort.getBounds());<NEW_LINE>double nW = newBounds.getWidth();<NEW_LINE>double nH = newBounds.getHeight();<NEW_LINE>double cW = currentBounds.getWidth();<NEW_... | getX()) * motionVal / 100.0; |
487,283 | public void marshall(ApiDestination apiDestination, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (apiDestination == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(apiDestination.getApiDestinationArn(), API... | apiDestination.getApiDestinationState(), APIDESTINATIONSTATE_BINDING); |
1,425,061 | private static Object mergeDictText(Object object, Map<String, List<SysDictItemEntity>> mapDictItems) throws Exception {<NEW_LINE>// Map<Field->Value><NEW_LINE>HashMap<String, Object> mapFieldValues = new HashMap<>();<NEW_LINE>// Map<Field->FieldType><NEW_LINE>HashMap<String, Object> mapFieldAndType = new HashMap<>();<... | > objectClass = object.getClass(); |
1,626,180 | public void generateCode(ClassFile classFile) {<NEW_LINE>classFile.generateMethodInfoHeader(this.binding);<NEW_LINE>int methodAttributeOffset = classFile.contentsOffset;<NEW_LINE>int attributeNumber = classFile.generateMethodInfoAttributes(this.binding);<NEW_LINE>if ((!this.binding.isNative()) && (!this.binding.isAbstr... | referenceCompilationUnit().compilationResult, null); |
1,518,857 | public Request<GetCelebrityInfoRequest> marshall(GetCelebrityInfoRequest getCelebrityInfoRequest) {<NEW_LINE>if (getCelebrityInfoRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(GetCelebrityInfoRequest)");<NEW_LINE>}<NEW_LINE>Request<GetCelebrityInfoRequest> request = new... | setContent(new StringInputStream(snippet)); |
123,085 | final ListRecipeVersionsResult executeListRecipeVersions(ListRecipeVersionsRequest listRecipeVersionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listRecipeVersionsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetri... | (super.beforeMarshalling(listRecipeVersionsRequest)); |
742,658 | public void run() {<NEW_LINE>final ClassLoader clBackup <MASK><NEW_LINE>final Tasklet t = tracker.tasklet;<NEW_LINE>currentThread().setContextClassLoader(tracker.jobClassLoader);<NEW_LINE>IdleStrategy idlerLocal = idlerNonCooperative;<NEW_LINE>MetricsImpl.Container userMetricsContextContainer = MetricsImpl.container();... | = currentThread().getContextClassLoader(); |
72,198 | public void write(LogoutRequestType logOutRequest) throws ProcessingException {<NEW_LINE>StaxUtil.writeStartElement(writer, PROTOCOL_PREFIX, JBossSAMLConstants.LOGOUT_REQUEST.get(), PROTOCOL_NSURI.get());<NEW_LINE>StaxUtil.writeNameSpace(writer, PROTOCOL_PREFIX, PROTOCOL_NSURI.get());<NEW_LINE>StaxUtil.writeNameSpace(w... | StaxUtil.writeDOMElement(writer, signature); |
496,800 | public <U> Optional<U> createMetadata(BuildTarget buildTarget, ActionGraphBuilder graphBuilder, CellPathResolver cellRoots, CgoLibraryDescriptionArg args, Optional<ImmutableMap<BuildTarget, Version>> selectedVersions, Class<U> metadataClass) {<NEW_LINE>Optional<GoPlatform> platform = getGoToolchain(buildTarget.getTarge... | getPlatformFlavorDomain().getValue(buildTarget); |
1,621,065 | private boolean buildDefaultActivator(Path bindir, String activatorClassName, Writer writer) throws IOException {<NEW_LINE>Path activatorSourceFileName = bindir.resolve(activatorClassName + ".java");<NEW_LINE>try (PrintWriter activatorWriter = new PrintWriter(Files.newBufferedWriter(activatorSourceFileName, Charset.for... | diagnostics = new DiagnosticCollector<>(); |
1,548,031 | public Description matchCompilationUnit(CompilationUnitTree tree, VisitorState state) {<NEW_LINE>ImmutableChecker immutableChecker = new ImmutableChecker(ImmutableSet.of(javax.annotation.concurrent.Immutable.class.getName(), com.google.errorprone.annotations.Immutable.class.getName()));<NEW_LINE>Optional<? extends Impo... | getSymbol(i.getQualifiedIdentifier()); |
1,115,791 | private void moveOrDeleteSentMessage(Account account, LocalStore localStore, LocalMessage message) throws MessagingException {<NEW_LINE>if (!account.hasSentFolder() || !account.isUploadSentMessages()) {<NEW_LINE>Timber.i("Not uploading sent message; deleting local message");<NEW_LINE>message.destroy();<NEW_LINE>} else ... | String sentFolderServerId = sentFolder.getServerId(); |
1,286,811 | private static LookupResult buildResult(Message answer, List<Name> aliases, Record query) {<NEW_LINE>int rcode = answer.getRcode();<NEW_LINE>List<Record> answerRecords = answer.getSection(Section.ANSWER);<NEW_LINE>if (answerRecords.isEmpty() && rcode != Rcode.NOERROR) {<NEW_LINE>switch(rcode) {<NEW_LINE>case Rcode.NXDO... | ), query.getType()); |
58,131 | public GeneratorEntity compile() {<NEW_LINE>GeneratorEntity entity = new GeneratorEntity(getCompiler().getContext());<NEW_LINE>entity.setReturnReference(statement.isReturnReference());<NEW_LINE>entity.setInternalName(compiler.getModule().getInternalName() + "_generator" + statement.getGeneratorId());<NEW_LINE>entity.se... | setData(clazzEntity.getData()); |
967,489 | private Filter deserializeArray(final JsonParser p, final DeserializationContext c) throws IOException {<NEW_LINE>if (p.nextToken() != JsonToken.VALUE_STRING) {<NEW_LINE>throw c.mappingException("Expected operator (string)");<NEW_LINE>}<NEW_LINE>final String operator = p.readValueAs(String.class);<NEW_LINE>final Filter... | return parseRawFilter((RawFilter) filter); |
130,310 | public boolean transform(MutableQuadView quad) {<NEW_LINE>if (identityMatrix) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>for (int i = 0; i < 4; i++) {<NEW_LINE>quad.copyPos(i, storage3);<NEW_LINE>storage.set(storage3.x(), storage3.y(), storage3.z(), 1);<NEW_LINE>storage.transform(matrix);<NEW_LINE>quad.pos(i, storage.... | storage3.z(), 0); |
1,851,938 | private static void randomize(Context context) {<NEW_LINE>int first = 0;<NEW_LINE>String format = context.getString(R.string.msg_randomizing);<NEW_LINE>List<ApplicationInfo> listApp = context.getPackageManager().getInstalledApplications(0);<NEW_LINE>// Randomize global<NEW_LINE>int userId = Util.<MASK><NEW_LINE>Privacy... | getUserId(Process.myUid()); |
653,635 | public List<String> resolve(Context context, List<String> expressions) {<NEW_LINE><MASK><NEW_LINE>Metadata metadata = context.getState().metadata();<NEW_LINE>if (options.expandWildcardsClosed() == false && options.expandWildcardsOpen() == false) {<NEW_LINE>return expressions;<NEW_LINE>}<NEW_LINE>if (isEmptyOrTrivialWil... | IndicesOptions options = context.getOptions(); |
658,949 | public <T> T parseObject(Type type, Object fieldName) {<NEW_LINE>int token = lexer.token();<NEW_LINE>if (token == JSONToken.NULL) {<NEW_LINE>lexer.nextToken();<NEW_LINE>return (T) TypeUtils.optionalEmpty(type);<NEW_LINE>}<NEW_LINE>if (token == JSONToken.LITERAL_STRING) {<NEW_LINE>if (type == byte[].class) {<NEW_LINE>by... | deserialze(this, type, fieldName); |
552,595 | public void announce() throws AnnounceException {<NEW_LINE>Mail mail = context.getModel().getAnnounce().getMail();<NEW_LINE>String message = "";<NEW_LINE>if (isNotBlank(mail.getMessage())) {<NEW_LINE>message = mail.getResolvedMessage(context);<NEW_LINE>} else {<NEW_LINE>Map<String, Object> <MASK><NEW_LINE>props.put(Con... | props = new LinkedHashMap<>(); |
302,472 | private void initLayout() {<NEW_LINE>this.getStyleClass().add("searchBox");<NEW_LINE>searchField = new JFXTextField();<NEW_LINE>searchField.setOnKeyReleased(e -> {<NEW_LINE>if (e.getCode() == KeyCode.ESCAPE) {<NEW_LINE>if (closeHandler != null) {<NEW_LINE>closeHandler.run();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>... | focusedProperty().addListener(focusListener); |
1,818,345 | protected void checkFile(@NotNull ErlangFile file, @NotNull ProblemsHolder problemsHolder) {<NEW_LINE>Set<String> exported = new HashSet<>();<NEW_LINE>for (ErlangAttribute attribute : file.getAttributes()) {<NEW_LINE>ErlangExport export = attribute.getExport();<NEW_LINE>ErlangExportFunctions exportFunctions = export !=... | ? export.getExportFunctions() : null; |
645,451 | final DisassociateBotResult executeDisassociateBot(DisassociateBotRequest disassociateBotRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(disassociateBotRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(F... | false), new DisassociateBotResultJsonUnmarshaller()); |
1,063,351 | public void invokeAfterGroupsConfigurations(GroupConfigMethodArguments arguments) {<NEW_LINE>// Skip this if the current method doesn't belong to any group<NEW_LINE>// (only a method that belongs to a group can trigger the invocation<NEW_LINE>// of afterGroups methods)<NEW_LINE>if (arguments.getTestMethod().getGroups()... | getGroupMethods().getAfterGroupMethodsForGroup(g); |
869,203 | protected boolean afterSave(boolean newRecord, boolean success) {<NEW_LINE>if (!success)<NEW_LINE>return success;<NEW_LINE>if (newRecord) {<NEW_LINE>StringBuffer sb = new StringBuffer("INSERT INTO AD_TreeNodeCMT " + "(AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, " + "AD_Tree_ID, Node_ID, Parent... | toString(), get_TrxName()); |
565,656 | public static void main(String[] args) {<NEW_LINE>Scanner sc = new Scanner(System.in);<NEW_LINE>System.out.println("Enter the number of rows of the first matrix");<NEW_LINE>int n1 = sc.nextInt();<NEW_LINE>System.out.println("Enter the number of columns of the first matrix");<NEW_LINE>int m1 = sc.nextInt();<NEW_LINE>Sys... | System.out.println("Enter the number of columns of the second matrix"); |
1,644,027 | final StartSupportDataExportResult executeStartSupportDataExport(StartSupportDataExportRequest startSupportDataExportRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(startSupportDataExportRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_... | (super.beforeMarshalling(startSupportDataExportRequest)); |
436,622 | final public SemgrexPattern SubNode(GraphRelation r) throws ParseException {<NEW_LINE>SemgrexPattern result = null;<NEW_LINE>SemgrexPattern child = null;<NEW_LINE>switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk) {<NEW_LINE>case 11:<NEW_LINE>{<NEW_LINE>jj_consume_token(11);<NEW_LINE>result = SubNode(r);<NEW_LINE>jj_consume_... | addAll(result.getChildren()); |
1,265,112 | private Map<String, Object> createOnlineActivityJSONMap(SessionsMutator sessionsMutator) {<NEW_LINE>long now = System.currentTimeMillis();<NEW_LINE>long monthAgo = now - TimeUnit.DAYS.toMillis(30L);<NEW_LINE>long weekAgo = now - TimeUnit.DAYS.toMillis(7L);<NEW_LINE>SessionsMutator sessions30d = sessionsMutator.filterSe... | (sessions30d.toPlaytime())); |
1,048,035 | public void init(Map<String, Object> params) {<NEW_LINE>super.init(params);<NEW_LINE>diffTable.setStyleProvider(new DiffStyleProvider());<NEW_LINE>diffTable.setIconProvider(new DiffIconProvider());<NEW_LINE>diffDs.addItemChangeListener(e -> {<NEW_LINE>boolean valuesVisible = (e.getItem() != null) && (e.getItem().hasSta... | = "ItemState." + itemState.toString(); |
354,338 | public boolean isConvertible(MAcctSchema acctSchema) {<NEW_LINE>// No Currency in document<NEW_LINE>if (getC_Currency_ID() == NO_CURRENCY) {<NEW_LINE>log.fine("(none) - " + toString());<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>// Journal from a different acct schema<NEW_LINE>if (this instanceof Doc_GLJournal) {<NEW_LI... | > it = set.iterator(); |
702,746 | final DetectLabelsResult executeDetectLabels(DetectLabelsRequest detectLabelsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(detectLabelsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
1,502,668 | public void init() {<NEW_LINE>List<String> fileList = getFilesList();<NEW_LINE>if (fileList.size() > 0) {<NEW_LINE>try {<NEW_LINE>List<String> paths <MASK><NEW_LINE>for (String s : fileList) {<NEW_LINE>if (!paths.contains(s)) {<NEW_LINE>paths.add(s);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Collections.sort(paths, Collections.re... | = new ArrayList<String>(); |
449,166 | private PrivacyController createPrivacyController() {<NEW_LINE>final Optional<BigInteger> chainId = protocolSchedule.getChainId();<NEW_LINE>if (privacyParameters.isPrivacyPluginEnabled()) {<NEW_LINE>return new PluginPrivacyController(blockchainQueries.getBlockchain(), privacyParameters, chainId, createPrivateTransactio... | ), privacyParameters.getPrivateWorldStateReader()); |
732,449 | public void notifyAppearStateChange(int firstVisible, int lastVisible, int directionX, int directionY) {<NEW_LINE>if (mAppearChangeRunnable != null) {<NEW_LINE>getHostView().removeCallbacks(mAppearChangeRunnable);<NEW_LINE>mAppearChangeRunnable = null;<NEW_LINE>}<NEW_LINE>// notify appear state<NEW_LINE>Iterator<Appear... | result = item.setAppearStatus(visible); |
1,486,393 | public GraphQLInterfaceType toGraphQLType(String typeName, AnnotatedType javaType, TypeMappingEnvironment env) {<NEW_LINE>BuildContext buildContext = env.buildContext;<NEW_LINE>GraphQLInterfaceType.Builder typeBuilder = newInterface().name(typeName).description(buildContext.typeInfoGenerator.generateTypeDescription(jav... | typeResolver(type, buildContext.typeResolver); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.