idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,449,414 | void receive(FileReference reference, String filename, byte[] content) {<NEW_LINE>log.log(Level.INFO, "Preparing receive call for " + reference.value() + " and file " + filename);<NEW_LINE>XXHash64 hasher = XXHashFactory.fastestInstance().hash64();<NEW_LINE>Request fileBlob = new Request("filedistribution.receiveFile")... | add(new DataValue(content)); |
1,630,438 | private void doExec(String args) throws IOException, InterruptedException, ConfigurationException {<NEW_LINE>int pos = args.indexOf(',');<NEW_LINE>if (pos == -1) {<NEW_LINE>// weird stuff<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Everything after the "," is what we're supposed to run<NEW_LINE>// First make note of jars w... | > env = pb.environment(); |
36,585 | public static BatchGetPluginConfigInfoResponse unmarshall(BatchGetPluginConfigInfoResponse batchGetPluginConfigInfoResponse, UnmarshallerContext context) {<NEW_LINE>batchGetPluginConfigInfoResponse.setRequestId(context.stringValue("BatchGetPluginConfigInfoResponse.RequestId"));<NEW_LINE>batchGetPluginConfigInfoResponse... | ("BatchGetPluginConfigInfoResponse.Data[" + i + "].PluginUniqKey")); |
421,166 | public Mono<Response<DataCollectionRuleAssociationProxyOnlyResourceInner>> createWithResponseAsync(String resourceUri, String associationName, DataCollectionRuleAssociationProxyOnlyResourceInner body) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter ... | error(new IllegalArgumentException("Parameter associationName is required and cannot be null.")); |
135,229 | List<T> convert(List<CallHierarchyEntry.Call> l) {<NEW_LINE>if (l == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>List<T> res = (List<T>) new ArrayList();<NEW_LINE>for (CallHierarchyEntry.Call call : l) {<NEW_LINE><MASK><NEW_LINE>LineDocument lDoc = callEntryDocument(che, lineDoc);<NEW_LINE>CallHierarchyItem callI... | CallHierarchyEntry che = call.getItem(); |
419,188 | @ConditionalOnProperty(prefix = "rocketmq", value = { "name-server", "producer.group" })<NEW_LINE>public DefaultMQProducer defaultMQProducer(RocketMQProperties rocketMQProperties) {<NEW_LINE>RocketMQProperties.Producer producerConfig = rocketMQProperties.getProducer();<NEW_LINE>String nameServer = rocketMQProperties.ge... | setCompressMsgBodyOverHowmuch(producerConfig.getCompressMessageBodyThreshold()); |
251,768 | private void reloadConfig() {<NEW_LINE>String basePath = System.getenv(CONFIG_FILE_ENV_VAR);<NEW_LINE>if (basePath == null) {<NEW_LINE>String <MASK><NEW_LINE>basePath = Paths.get(userHome, ".databrickscfg").toString();<NEW_LINE>}<NEW_LINE>if (!new File(basePath).isFile()) {<NEW_LINE>throw new IllegalStateException("Cou... | userHome = System.getProperty("user.home"); |
916,956 | private InstanceProperties instantiate(String displayName) throws IOException {<NEW_LINE>// if all the data is normally validated - create the instance and<NEW_LINE>// attach the additional properties<NEW_LINE>Map<String, String> props = new HashMap<String, String>();<NEW_LINE>props.put(WLPluginProperties.SERVER_ROOT_A... | put(WLPluginProperties.DOMAIN_ROOT_ATTR, domainRoot); |
1,633,421 | public BatchGetDeploymentInstancesResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>BatchGetDeploymentInstancesResult batchGetDeploymentInstancesResult = new BatchGetDeploymentInstancesResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth... | String currentParentElement = context.getCurrentParentElement(); |
576,064 | private List<ReceivedMessage> receiveMessages() throws ExecutionException, InterruptedException {<NEW_LINE>List<ApiFuture<List<ReceivedMessage>>> result = subscriptionNames.stream().map(subscriptionId -> {<NEW_LINE>String subscriptionName = ProjectSubscriptionName.format(pubSubSettings.getProjectId(), subscriptionId);<... | addAllAckIds(ackIds).build(); |
1,308,782 | public Object apply(final ActionContext ctx, final Object caller, final Object[] sources) throws FrameworkException {<NEW_LINE>if (sources == null || sources != null && sources.length != 3) {<NEW_LINE>logParameterError(caller, sources, ctx.isJavaScriptContext());<NEW_LINE>return usage(ctx.isJavaScriptContext());<NEW_LI... | StructrApp.key(type, "text"); |
1,545,507 | private void cmd_Ok() {<NEW_LINE>log.config("OK=" + true);<NEW_LINE>m_ok = true;<NEW_LINE>saveResultSelection(detail);<NEW_LINE>saveSelection(detail);<NEW_LINE>// Is Process ok<NEW_LINE>boolean isOk = false;<NEW_LINE>// Valid Process, Selected Keys and process parameters<NEW_LINE>if (getAD_Process_ID() > 0 && getSelect... | ().setAD_PInstance_ID(-1); |
632,927 | public void addChild(@Nonnull SMTestProxy child) {<NEW_LINE>ApplicationManager.getApplication().assertIsDispatchThread();<NEW_LINE>if (myChildren == null) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>myChildren.add(child);<NEW_LINE>// add printable<NEW_LINE>//<NEW_LINE>// add link to child's future output in correct place<NEW... | myChildren = ContainerUtil.newArrayListWithCapacity(4); |
118,219 | protected void unsetConfigurationProvider(ConfigurationProvider p) {<NEW_LINE>if (tc.isEntryEnabled())<NEW_LINE>Tr.entry(tc, "unsetConfigurationProvider", p);<NEW_LINE>if (p != null) {<NEW_LINE>// Used to test whether we are logging to an RDBMS<NEW_LINE>// configured<NEW_LINE>if (!p.isSQLRecoveryLog()) {<NEW_LINE>if (t... | Tr.exit(tc, "unsetConfigurationProvider"); |
135,501 | public static void configureLog(Properties properties) {<NEW_LINE>for (String property : properties.stringPropertyNames()) {<NEW_LINE>if (property.startsWith(LOGGER_PREFIX)) {<NEW_LINE>if (property.startsWith(DATETIME_FORMAT)) {<NEW_LINE>String <MASK><NEW_LINE>if (dateTimeFormat != null && !dateTimeFormat.isEmpty()) {<... | dateTimeFormat = properties.getProperty(DATETIME_FORMAT); |
99,142 | public Request<DescribeSpotFleetRequestsRequest> marshall(DescribeSpotFleetRequestsRequest describeSpotFleetRequestsRequest) {<NEW_LINE>if (describeSpotFleetRequestsRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<DescribeSpotFleetRequests... | <DescribeSpotFleetRequestsRequest>(describeSpotFleetRequestsRequest, "AmazonEC2"); |
91,452 | private Flux<Publisher<DataBuffer>> encode(Publisher<?> input, ResolvableType elementType, MediaType mediaType, DataBufferFactory factory, Map<String, Object> hints) {<NEW_LINE>ResolvableType dataType = (ServerSentEvent.class.isAssignableFrom(elementType.toClass()) ? elementType.getGeneric() : elementType);<NEW_LINE>re... | retry.toMillis(), sb); |
550,510 | public JavaExpression visit(BinaryExpr expr, Void aVoid) {<NEW_LINE>JavaExpression leftJe = expr.getLeft(<MASK><NEW_LINE>JavaExpression rightJe = expr.getRight().accept(this, null);<NEW_LINE>TypeMirror leftType = leftJe.getType();<NEW_LINE>TypeMirror rightType = rightJe.getType();<NEW_LINE>TypeMirror type;<NEW_LINE>// ... | ).accept(this, null); |
466,661 | private void dispatchMessage(APIMessage msg) {<NEW_LINE>ApiMessageDescriptor desc = processor.getApiMessageDescriptor(msg);<NEW_LINE>if (desc == null) {<NEW_LINE>Map message = map(e(msg.getClass().getName(), msg));<NEW_LINE>ErrorCode err = err(PortalErrors.NO_SERVICE_FOR_MESSAGE, "no service configuration file declares... | warn(err.getDetails()); |
1,110,757 | private void saveAuthUser(BasicToken basicToken, User userInfo) {<NEW_LINE>String updateSql = "UPDATE " + daoSession.getAuthUserDao().getTablename() + " SET " + AuthUserDao.Properties.Selected.columnName + " = 0";<NEW_LINE>daoSession.getAuthUserDao().getDatabase().execSQL(updateSql);<NEW_LINE>String deleteExistsSql = "... | setLoginId(userInfo.getLogin()); |
339,067 | public void execute(String serviceAccountFilePath, String project, String collectionName, String documentName, String incrPullTableDataset, String incrPullLogTableName, String logTableCheckpointColumn) throws IOException, InterruptedException, Exception {<NEW_LINE>CheckpointDAO <MASK><NEW_LINE>String maxTimestampValue ... | checkpointDAO = getCheckpointDAO(serviceAccountFilePath, project); |
1,592,636 | @SuppressWarnings("unused")<NEW_LINE>public static int onLoad(JNIJavaVM vm, CCharPointer options, @SuppressWarnings("unused") PointerBase reserved) {<NEW_LINE>AgentIsolate.setGlobalIsolate(CurrentIsolate.getIsolate());<NEW_LINE>String optionsString = options.isNonNull() ? fromCString(options) : "";<NEW_LINE>WordPointer... | vm, jvmti, callbacks, optionsString); |
609,578 | private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String serverName, String keyName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."... | this.client.mergeContext(context); |
14,937 | private boolean checkConvergence(Collection<Individuum> pop) {<NEW_LINE>if (pop.isEmpty()) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>// Gene occurrence counter<NEW_LINE>int[][] occur = new int<MASK><NEW_LINE>// Count gene occurrences<NEW_LINE>for (Individuum ind : pop) {<NEW_LINE>short[] gene = ind.getGene();<NEW_LIN... | [dim][phi + 1]; |
1,621,734 | private boolean tryResolve(Concrete.ReferenceExpression expr, ExpressionResolveNameVisitor exprVisitor) {<NEW_LINE>Referable ref = expr.getReferent();<NEW_LINE>while (ref instanceof RedirectingReferable) {<NEW_LINE>ref = ((RedirectingReferable) ref).getOriginalReferable();<NEW_LINE>}<NEW_LINE>if (ref instanceof Unresol... | .getScope(), resolvedRefs)); |
75,501 | private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents<NEW_LINE>void initComponents() {<NEW_LINE>java.awt.GridBagConstraints gridBagConstraints;<NEW_LINE>jLabelDesc = new javax.swing.JLabel();<NEW_LINE>jPanelBeanTree = new javax.swing.JPanel();<NEW_LINE>jLabelError = new javax... | 0, 11, 0, 11); |
253,732 | public static void main(String[] args) {<NEW_LINE>try {<NEW_LINE>CommandLine cl = parseComandLine(args);<NEW_LINE>Agfa2SR main = new Agfa2SR();<NEW_LINE>String xsltURL1 = cl.getOptionValue("x", DEFAULT_XSL);<NEW_LINE>main.xsltURL = xsltURL1.equalsIgnoreCase("none") ? null : toURL(xsltURL1);<NEW_LINE>main.xml = cl.hasOp... | main.attrs = new Attributes(); |
113,163 | public TriggerEvent createTriggerEvent(int when, String columnname) throws DDLException {<NEW_LINE>try {<NEW_LINE>Map gprops = (Map) getSpecification().getProperties();<NEW_LINE>Map props = (Map) getSpecification().getCommandProperties(Specification.CREATE_TRIGGER);<NEW_LINE>// NOI18N<NEW_LINE>Map bindmap = (Map) props... | String) bindmap.get("EVENT"); |
23,217 | public static String stripURL(String url, SessionInfo info) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(tc, "Removing any session id from [" + url + "]");<NEW_LINE>}<NEW_LINE>String target = info.getSessionConfig().getURLRewritingMarker();<NEW_LINE>URLParser parser = ... | .substring(parser.fragmentMarker)); |
1,812,697 | private static void tryAssertionFirstUniqueAndLength(RegressionEnvironment env) {<NEW_LINE>String[] fields = new String[] { "theString", "intPrimitive" };<NEW_LINE>sendEvent(env, "E1", 1);<NEW_LINE>env.assertPropsPerRowIteratorAnyOrder("s0", fields, new Object[][] <MASK><NEW_LINE>env.assertPropsNew("s0", fields, new Ob... | { { "E1", 1 } }); |
797,082 | /* Split dataframe into inliers and outliers and encode attributes into itemsets<NEW_LINE>*<NEW_LINE>* Variables afftected:<NEW_LINE>* - inlierItemsets: Encoded inlier itemsets for this pane<NEW_LINE>* - outlierItemsets: Encoded outlier itemsets for this pane<NEW_LINE>*/<NEW_LINE>private void encodeAttributes(Data... | df.filter(outlierColumn, predicate); |
870,757 | // End of variables declaration//GEN-END:variables<NEW_LINE>private static Configuration config(POMModel pomModel) {<NEW_LINE>Build build = pomModel.getProject().getBuild();<NEW_LINE>if (build == null) {<NEW_LINE>build = pomModel.getFactory().createBuild();<NEW_LINE>pomModel.getProject().setBuild(build);<NEW_LINE>}<NEW... | Configuration config = nbmPlugin.getConfiguration(); |
1,046,395 | @Pointer<NEW_LINE>public TruffleObject GetStringCritical(@JavaType(String.class) StaticObject str, @Pointer TruffleObject isCopyPtr) {<NEW_LINE>if (!getUncached().isNull(isCopyPtr)) {<NEW_LINE>ByteBuffer isCopyBuf = <MASK><NEW_LINE>// always copy since pinning is not supported<NEW_LINE>isCopyBuf.put((byte) 1);<NEW_LINE... | NativeUtils.directByteBuffer(isCopyPtr, 1); |
803,013 | private File createZIPFromExcel(File excelFile) throws IOException, ParseException, AxelorException {<NEW_LINE>Workbook workBook = new XSSFWorkbook(new FileInputStream(excelFile));<NEW_LINE>File zipFile = File.createTempFile("demo", ".zip");<NEW_LINE>List<String> entries = new ArrayList<>();<NEW_LINE>for (int i = 0; i ... | this.writeToZip(csvFile, zos); |
1,108,094 | // Test the getRunningTaskCount method<NEW_LINE>@Test<NEW_LINE>public void testGetRunningTaskCount() throws Exception {<NEW_LINE>PolicyExecutor executor = provider.create("testgetRunningTaskCount").maxConcurrency(2);<NEW_LINE>CountDownLatch beginLatch1 = new CountDownLatch(1);<NEW_LINE>CountDownLatch continueLatch1 = n... | future1 = executor.submit(task1); |
47,779 | protected void processAnnotationOnMethod(MethodMetadata data, Annotation methodAnnotation, Method method) {<NEW_LINE>if (CollectionFormat.class.isInstance(methodAnnotation)) {<NEW_LINE>CollectionFormat collectionFormat = findMergedAnnotation(method, CollectionFormat.class);<NEW_LINE>data.template().collectionFormat(col... | parseProduces(data, method, methodMapping); |
1,730,314 | public static DescribePhysicalConnectionsResponse unmarshall(DescribePhysicalConnectionsResponse describePhysicalConnectionsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describePhysicalConnectionsResponse.setRequestId(_ctx.stringValue("DescribePhysicalConnectionsResponse.RequestId"));<NEW_LINE>describePhysicalConnect... | ("DescribePhysicalConnectionsResponse.PhysicalConnectionSet[" + i + "].Bandwidth")); |
1,744,977 | private void createLatencySlider() {<NEW_LINE>// Latency slider:<NEW_LINE>this.m_latencyTimeSlider = new JSlider(10, 210);<NEW_LINE>this.m_latencyTimeSlider.setBackground(Color.WHITE);<NEW_LINE>this.m_latencyTimeSlider.setValue((int) Showcase.this.getCollector().getLatency());<NEW_LINE>this.m_latencyTimeSlider.setMajor... | int value = source.getValue(); |
1,056,249 | final ListApplicationsResult executeListApplications(ListApplicationsRequest listApplicationsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listApplicationsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
1,770,873 | public static boolean withinBounds(MapView mapView, Point2d frameSize, Point3d newLocalPos, Point2d[] bounds) {<NEW_LINE>if (bounds == null)<NEW_LINE>return true;<NEW_LINE>// We make a copy of the map view so we can mess with it<NEW_LINE>final MapView thisMapView = mapView.clone();<NEW_LINE>// The corners of the view s... | Matrix4d fullMatrix = thisMapView.calcModelViewMatrix(); |
1,789,302 | final GetAccountSummaryResult executeGetAccountSummary(GetAccountSummaryRequest getAccountSummaryRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getAccountSummaryRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.st... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
682,643 | private void initBackForm(Form f) {<NEW_LINE>Vector formNavigationStack = baseFormNavigationStack;<NEW_LINE>if (formNavigationStack != null && formNavigationStack.size() > 0) {<NEW_LINE>setFormState(f, (Hashtable) formNavigationStack.elementAt(formNavigationStack.size() - 1));<NEW_LINE>formNavigationStack.removeElement... | formNavigationStack.size() - 1); |
1,288,916 | public Mana produceMana(Game game, Ability source) {<NEW_LINE>if (game != null) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>if (controller != null) {<NEW_LINE>ManaPool pool = controller.getManaPool();<NEW_LINE>int blackMana = pool.getBlack();<NEW_LINE><MASK><NEW_LINE>int blueMana =... | int whiteMana = pool.getWhite(); |
9,936 | /*<NEW_LINE>* (non-Javadoc)<NEW_LINE>* @see com.aptana.sax.ISchemaElement#validateAttributes(org.xml.sax.Attributes)<NEW_LINE>*/<NEW_LINE>public void validateAttributes(Attributes attributes) throws SAXException {<NEW_LINE>// save attributes for possible error messaging<NEW_LINE>if (attributes.getLength() > 0) {<NEW_LI... | value = attributes.getValue(i); |
1,443,328 | public ProcessStatus processCheckPasswordAction(final PwmRequest pwmRequest) throws IOException, PwmUnrecoverableException, ChaiUnavailableException {<NEW_LINE>final RestCheckPasswordServer.JsonInput jsonInput = JsonFactory.get().deserialize(pwmRequest.readRequestBodyAsString(<MASK><NEW_LINE>final UserIdentity userIden... | ), RestCheckPasswordServer.JsonInput.class); |
1,277,613 | public static void main(String[] args) {<NEW_LINE>Scanner scan = new Scanner(System.in);<NEW_LINE><MASK><NEW_LINE>int ts = scan.nextInt();<NEW_LINE>System.out.print("Enter the number of elements in the array ");<NEW_LINE>int n = scan.nextInt();<NEW_LINE>System.out.println("Enter all your array elements:");<NEW_LINE>int... | System.out.print("Enter the target sum "); |
287,148 | public GroundTruthManifest unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>GroundTruthManifest groundTruthManifest = new GroundTruthManifest();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDep... | JsonToken token = context.getCurrentToken(); |
518,069 | private int sendMsg(String data, String url) {<NEW_LINE>if (JSONUtils.isJsonObject(url)) {<NEW_LINE>try {<NEW_LINE>AlarmEmailJsonInfo email = JSON.parseObject(url, AlarmEmailJsonInfo.class);<NEW_LINE>MailFactoryUtils.send(email, data);<NEW_LINE>} catch (Exception e) {<NEW_LINE>LoggerUtils.print(this.getClass()).error("... | , object.getString("msg")); |
1,776,038 | public org.apache.drill.exec.proto.UserProtos.PreparedStatement buildPartial() {<NEW_LINE>org.apache.drill.exec.proto.UserProtos.PreparedStatement result = new org.apache.drill.exec.proto.UserProtos.PreparedStatement(this);<NEW_LINE>int from_bitField0_ = bitField0_;<NEW_LINE>int to_bitField0_ = 0;<NEW_LINE>if (columnsB... | .columns_ = columnsBuilder_.build(); |
1,122,190 | public void write(org.apache.thrift.protocol.TProtocol prot, bulkImportFiles_result struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;<NEW_LINE>java.util.BitSet optionals = new java.util.BitSet();<NEW_LINE>if (struct... | struct.success.size()); |
233,074 | public ResultList<Topic> list(@Context UriInfo uriInfo, @Context SecurityContext securityContext, @Parameter(description = "Fields requested in the returned resource", schema = @Schema(type = "string", example = FIELDS)) @QueryParam("fields") String fieldsParam, @Parameter(description = "Filter topics by service name",... | filter, limitParam, before, after); |
967,260 | protected int doWork() {<NEW_LINE>IOUtil.assertFileIsReadable(INTERVAL_LIST);<NEW_LINE>IOUtil.assertFileIsReadable(REFERENCE_SEQUENCE);<NEW_LINE>IOUtil.assertFileIsWritable(OUTPUT);<NEW_LINE>final IntervalList intervals = IntervalList.fromFile(INTERVAL_LIST);<NEW_LINE>final ReferenceSequenceFile ref = ReferenceSequence... | ), interval.getEnd()); |
1,548,006 | public HttpResponseOutputStream<StorageObject> write(final Path file, final TransferStatus status, final ConnectionCallback callback) throws BackgroundException {<NEW_LINE>final S3Object object = new S3WriteFeature(session).getDetails(file, status);<NEW_LINE>// ID for the initiated multipart upload.<NEW_LINE>final Mult... | bucket = containerService.getContainer(file); |
287,438 | public void readData(ObjectDataInput in) throws IOException {<NEW_LINE>int size = in.readInt();<NEW_LINE>data = createHashMap(size);<NEW_LINE>merkleTreeDiffByMapName = new HashMap<>();<NEW_LINE>recordStoreStatsPerMapName = createHashMap(size);<NEW_LINE>for (int i = 0; i < size; i++) {<NEW_LINE>String mapName = in.readS... | boolean differentialReplication = in.readBoolean(); |
357,122 | private ManagedMap<String, Object> buildVariablesMap(final Element element, final ParserContext parserContext, List<Element> variableElements) {<NEW_LINE>@SuppressWarnings("serial")<NEW_LINE>ManagedMap<String, Object> variableMap = new ManagedMap<String, Object>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Object p... | , variable.indexOf("-ref")); |
754,944 | public void enable() {<NEW_LINE>if (tfConfig != null) {<NEW_LINE>if (tfConfig.eIsSet(tfConfig.eClass().getEStructuralFeature("threshold"))) {<NEW_LINE>setThreshold(tfConfig.getThreshold());<NEW_LINE>}<NEW_LINE>if (tfConfig.eIsSet(tfConfig.eClass().getEStructuralFeature("callbackPeriod"))) {<NEW_LINE>setCallbackPeriod(t... | this, TinkerforgeErrorHandler.TF_NOT_CONNECTION_EXCEPTION, e); |
1,148,951 | private void updateCounts() {<NEW_LINE>int landCount = 0;<NEW_LINE>int creatureCount = 0;<NEW_LINE>int sorceryCount = 0;<NEW_LINE>int instantCount = 0;<NEW_LINE>int enchantmentCount = 0;<NEW_LINE>int artifactCount = 0;<NEW_LINE>for (CardView card : cards.values()) {<NEW_LINE>if (card.isLand()) {<NEW_LINE>landCount++;<N... | ? cards.size() : 0; |
1,808,599 | public AttributeNameAndValue unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AttributeNameAndValue attributeNameAndValue = new AttributeNameAndValue();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int t... | JsonToken token = context.getCurrentToken(); |
859,075 | public void checkGiteeUpdate(final int appVersionCode) {<NEW_LINE>mCompositeSubscription.add(Update.checkGitee().observeOn(AndroidSchedulers.mainThread()).subscribe(new Action1<String>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void call(String json) {<NEW_LINE>try {<NEW_LINE>String versionName = new JSONObject(j... | (json).getString(APP_URL); |
628,918 | /* Sample generated code:<NEW_LINE>*<NEW_LINE>* @com.ibm.j9ddr.GeneratedFieldAccessor(offsetFieldName="_sharedHeadNodePtrOffset_", declaredType="J9SRP*")<NEW_LINE>* public SelfRelativePointer sharedHeadNodePtr() throws CorruptDataException {<NEW_LINE>* return SelfRelativePointer.cast(getPointerAtOffset(J9SharedInva... | className, "getPointerAtOffset", longFromLong, false); |
266,540 | public void saveFile() {<NEW_LINE>FileNameExtensionFilter filter = new FileNameExtensionFilter("*.sgf", "*.SGF");<NEW_LINE>JSONObject filesystem = Lizzie.<MASK><NEW_LINE>JFileChooser chooser = new JFileChooser(filesystem.getString("last-folder"));<NEW_LINE>chooser.setFileFilter(filter);<NEW_LINE>chooser.setMultiSelecti... | config.persisted.getJSONObject("filesystem"); |
791,416 | public final // JPA2.g:515:1: identification_variable : ( WORD | 'GROUP' );<NEW_LINE>JPA2Parser.identification_variable_return identification_variable() throws RecognitionException {<NEW_LINE>JPA2Parser.identification_variable_return retval = new JPA2Parser.identification_variable_return();<NEW_LINE>retval.start = inpu... | LT(-1), re); |
115,484 | private void updateChannelFavoritesList(List<Favorite> favorites) {<NEW_LINE>final Channel channel = <MASK><NEW_LINE>if (channel == null) {<NEW_LINE>logger.debug("Channel {} doesn't exist. Delete & add thing to get channel.", CHANNEL_FAVORITES_LIST);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Get channel config parameter ... | getThing().getChannel(CHANNEL_FAVORITES_LIST); |
727,228 | public void transfer(String projectId, TransferEvent e) {<NEW_LINE>final int event;<NEW_LINE>switch(e.getType()) {<NEW_LINE>case INITIATED:<NEW_LINE>event = Message.TRANSFER_INITIATED;<NEW_LINE>break;<NEW_LINE>case STARTED:<NEW_LINE>event = Message.TRANSFER_STARTED;<NEW_LINE>break;<NEW_LINE>case PROGRESSED:<NEW_LINE>ev... | ": " + e.getType()); |
504,264 | public void close(int requestNumber) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(this, tc, "close", requestNumber);<NEW_LINE>// Deregister any error callback created for this connection.<NEW_LINE>if (asynchReader != null) {<NEW_LINE>try {<NEW_LINE>mainConsumer.getCon... | exception(this, tc, e); |
1,584,171 | public void newSpace(Location location, SpaceQuality qual) {<NEW_LINE>entry("newSpace", location, qual);<NEW_LINE>if (qual.size == 0) {<NEW_LINE>reportError(location, <MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (qual.size <= 0 || qual.size > 8) {<NEW_LINE>throw new SleighError("Space '" + qual.name + "' has unsuppor... | "Space definition '" + qual.name + "' missing size attribute"); |
243,768 | final ListResolverEndpointIpAddressesResult executeListResolverEndpointIpAddresses(ListResolverEndpointIpAddressesRequest listResolverEndpointIpAddressesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listResolverEndpointIpAddressesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = ... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
38,666 | public static void main(String[] args) throws XmlPullParserException, IOException {<NEW_LINE>RenderingRulesStorage.STORE_ATTRIBUTES = true;<NEW_LINE>// InputStream is = RenderingRulesStorage.class.getResourceAsStream("default.render.xml");<NEW_LINE>String defaultFile = "/Users/victorshcherb/osmand/repos/resources/rende... | parser.setInput(is, "UTF-8"); |
1,057,026 | public void findHydratedProjects(FindProjects request, StreamObserver<AdvancedQueryProjectsResponse> responseObserver) {<NEW_LINE>try {<NEW_LINE>// Get the user info from the Context<NEW_LINE>var userInfo = authService.getCurrentLoginUserInfo();<NEW_LINE>FindProjects.Response projectResponse;<NEW_LINE>try {<NEW_LINE>pr... | (project).build()); |
465,578 | private void shutdownDerbyEmbedded() {<NEW_LINE>final boolean trace = TraceComponent.isAnyTracingEnabled();<NEW_LINE>if (trace && tc.isEntryEnabled())<NEW_LINE>Tr.entry(this, tc, "shutdownDerbyEmbedded", classloader, embDerbyRefCount);<NEW_LINE>// Shut down Derby embedded if the reference count drops to 0<NEW_LINE>if (... | forNameWithPriv("org.apache.derby.jdbc.EmbeddedDataSource40", true, classloader); |
1,176,229 | public BeanDefinition parse(Element element, ParserContext pc) {<NEW_LINE>String loginProcessingUrl = element.getAttribute(ATT_LOGIN_PROCESSING_URL);<NEW_LINE>if (StringUtils.hasText(loginProcessingUrl)) {<NEW_LINE>this.loginProcessingUrl = loginProcessingUrl;<NEW_LINE>}<NEW_LINE>BeanDefinition saml2LoginBeanConfig = B... | authenticationRequestResolver = Saml2LoginBeanDefinitionParserUtils.createDefaultAuthenticationRequestResolver(relyingPartyRegistrationRepository); |
1,744,810 | static CommentNotification processFunctionCommentNotification(final PGNotification notification, final SQLProvider provider) {<NEW_LINE>final Matcher matcher = FUNCTION_PATTERN.matcher(notification.getParameter());<NEW_LINE>if (!matcher.find()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final Integer notificationModul... | ? CommentOperation.DELETE : CommentOperation.APPEND; |
664,548 | public void zkSaveInstanceError(String message) {<NEW_LINE>String path = KeyBuilder.instanceErrors(_cluster, _instanceName);<NEW_LINE>if (!_zkclient.exists(path)) {<NEW_LINE>LOG.warn("failed to persist instance error because znode does not exist:" + path);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// the coordinator is a se... | LOG.info("created error node at: " + errorNode); |
81,311 | public static void main(String[] args) {<NEW_LINE>// Parse text to separate words<NEW_LINE>String INPUT_TEXT = "Hello World! Hello All! Hi World!";<NEW_LINE>// Create Multiset<NEW_LINE>Multiset<String> multiset = TreeMultiset.create(Arrays.asList(INPUT_TEXT.split(" ")));<NEW_LINE>// Print count words<NEW_LINE>// print ... | + multiset.count("World!")); |
360,796 | public static void describeTable(SqlDescribeTable sqlNode) throws SQLException {<NEW_LINE>String tableName = sqlNode.getTable().toString();<NEW_LINE>String columnFilter = sqlNode.getColumn() != null ? sqlNode.getColumn().toString().replaceAll("'", "") : "";<NEW_LINE>MetadataClient metadataClient = new MetadataClient();... | columnFilter.replaceAll("%", ""); |
1,437,899 | public final Task<Void> deleteEventually() {<NEW_LINE>final ParseRESTCommand command;<NEW_LINE>final Task<JSONObject> runEventuallyTask;<NEW_LINE>synchronized (mutex) {<NEW_LINE>validateDelete();<NEW_LINE>isDeletingEventually += 1;<NEW_LINE>String localId = null;<NEW_LINE>if (getObjectId() == null) {<NEW_LINE>localId =... | String sessionToken = ParseUser.getCurrentSessionToken(); |
1,631,386 | public void dataTypeReplaced(DataType oldDt, DataType newDt) {<NEW_LINE>if (oldDt == this) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>lock.acquire();<NEW_LINE>try {<NEW_LINE>checkDeleted();<NEW_LINE>DataType replacementDt = newDt;<NEW_LINE>try {<NEW_LINE>validateDataType(replacementDt);<NEW_LINE>replacementDt = resolve(rep... | getLength() - 1, 0); |
1,834,818 | public boolean isSupported(final Path workdir, final String filename) {<NEW_LINE>if (workdir.isRoot()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (!this.validate(filename)) {<NEW_LINE>log.warn(String.format("Validation failed for target name %s", filename));<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (workdir.a... | = new SDSPermissionsFeature(session, nodeid); |
971,192 | private boolean addRecent(DataObject template) {<NEW_LINE>DataFolder folder = getRecentFolder();<NEW_LINE>// no recent folder, no recent templates<NEW_LINE>if (folder == null)<NEW_LINE>return false;<NEW_LINE>// check if privileged<NEW_LINE>if (getPrivilegedList().contains(template))<NEW_LINE>return false;<NEW_LINE>// c... | Level.WARNING, null, ioe); |
1,357,334 | private static DataSet<FastDistanceMatrixData> randomInit(DataSet<FastDistanceVectorData> data, final int k, final FastDistance distance, DataSet<Integer> vectorSize, int seed) {<NEW_LINE>return selectTopK(k, seed, data, new Functional.SerializableFunction<FastDistanceVectorData, byte[]>() {<NEW_LINE><NEW_LINE>private ... | .add(v.f1)); |
1,169,767 | private SourceArtifact createArtifactIfNotValid(Root sourceRoot, PathFragment execPath) {<NEW_LINE>if (sourceRoot == null) {<NEW_LINE>// not a path that we can find...<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>SourceArtifact artifact = sourceArtifactCache.getArtifact(execPath);<NEW_LINE>if (artifact != null && sourceRo... | return sourceArtifactCache.new Entry(validArtifact); |
1,097,327 | public void onChatMessage(ChatMessage event) {<NEW_LINE>if (event.getType() != ChatMessageType.GAMEMESSAGE && event.getType() != ChatMessageType.SPAM) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// remove color and linebreaks<NEW_LINE>String chatMsg = Text.removeTags(event.getMessage());<NEW_LINE>if (chatMsg.startsWith(CHAT... | mPoints = mComplete.group("points"); |
393,296 | private static void mergeResults(Map<String, Response> remoteResponses, List<ResolvedIndex> indices, List<ResolvedAlias> aliases, List<ResolvedDataStream> dataStreams) {<NEW_LINE>for (Map.Entry<String, Response> responseEntry : remoteResponses.entrySet()) {<NEW_LINE>String clusterAlias = responseEntry.getKey();<NEW_LIN... | alias.getName()))); |
1,843,210 | public ASN1Primitive toASN1Primitive() {<NEW_LINE>ASN1EncodableVector v = new ASN1EncodableVector(4);<NEW_LINE>{<NEW_LINE>ASN1EncodableVector pV = new ASN1EncodableVector(acceptablePolicySet.length);<NEW_LINE>for (int i = 0; i != acceptablePolicySet.length; i++) {<NEW_LINE>pV.add(acceptablePolicySet[i]);<NEW_LINE>}<NEW... | add(new DERSequence(pV)); |
1,304,047 | public static void addFluidTooltip(FluidStack fluid, List<Component> tooltip, int tankCapacity) {<NEW_LINE>if (!fluid.isEmpty())<NEW_LINE>tooltip.add(applyFormat(fluid.getDisplayName(), fluid.getFluid().getAttributes().getRarity(fluid).color));<NEW_LINE>else<NEW_LINE>tooltip.add(new TranslatableComponent("gui.immersive... | "mB"), ChatFormatting.GRAY)); |
1,802,164 | double calculate_rho() {<NEW_LINE>int nr_free = 0;<NEW_LINE>double ub = Double.POSITIVE_INFINITY, lb <MASK><NEW_LINE>for (int i = 0; i < active_size; i++) {<NEW_LINE>final double yG = y[i] * G[i];<NEW_LINE>if (is_lower_bound(i)) {<NEW_LINE>if (y[i] > 0) {<NEW_LINE>ub = ub < yG ? ub : yG;<NEW_LINE>} else {<NEW_LINE>lb =... | = Double.NEGATIVE_INFINITY, sum_free = 0; |
1,241,400 | public void handle(MigratingInstanceParseContext parseContext, ActivityInstance element) {<NEW_LINE>MigratingActivityInstance migratingInstance = null;<NEW_LINE>MigrationInstruction applyingInstruction = parseContext.getInstructionFor(element.getActivityId());<NEW_LINE>ScopeImpl sourceScope = null;<NEW_LINE>ScopeImpl t... | String activityId = applyingInstruction.getTargetActivityId(); |
266,605 | public void onCompleted(final boolean success) {<NEW_LINE>UiThread.run(() -> {<NEW_LINE>Activity activity = mActivityRef.get();<NEW_LINE>if (activity == null)<NEW_LINE>return;<NEW_LINE>final Intent intent = new Intent(Intent.ACTION_SEND);<NEW_LINE>intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);<NEW_LINE>intent.putExtra... | putExtra(Intent.EXTRA_STREAM, uri); |
427,920 | private static void preprocess(@Nonnull Path inputPath, @Nonnull Path outputPath, Settings settings) throws IOException {<NEW_LINE>BatfishLogger logger = settings.getLogger();<NEW_LINE>logger.info("\n*** READING INPUT FILES ***\n");<NEW_LINE>Map<Path, String> configurationData = readAllFiles(inputPath.resolve<MASK><NEW... | (BfConsts.RELPATH_CONFIGURATIONS_DIR), logger); |
490,126 | protected boolean selectRelevantArcs(double delta) throws ContradictionException {<NEW_LINE>// Trivially no inference<NEW_LINE>int idx = activeArcs.nextSetBit(0);<NEW_LINE>while (idx >= 0 && costs[sortedArcs[idx]] - minTArc <= delta) {<NEW_LINE>idx = activeArcs.nextSetBit(idx + 1);<NEW_LINE>}<NEW_LINE>if (idx == -1) {<... | activeArcs.nextSetBit(idx + 1); |
25,378 | private Optional<StorageNode> storageNodeInGroup(Predicate<ServiceInstance> storageServicePredicate) {<NEW_LINE>if (!VespaModelUtil.isStorage(serviceCluster)) {<NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_LINE>Set<StorageNode> storageNodes = new HashSet<>();<NEW_LINE>for (ServiceInstance serviceInstance : services... | ) + " in storage cluster " + clusterInfo()); |
758,566 | public void run(CommandLine theCommandLine) throws ParseException, ExecutionException {<NEW_LINE>parseFhirContext(theCommandLine);<NEW_LINE>myPackageName = theCommandLine.getOptionValue(NAME_OPT);<NEW_LINE>if (isBlank(myPackageName)) {<NEW_LINE>throw new ParseException(Msg.code(1546<MASK><NEW_LINE>}<NEW_LINE>if (!NpmPa... | ) + "No package name supplied (--" + NAME_OPT + ")"); |
659,402 | public Policy createPolicy(File projectDir, Supplier<Iterable<File>> toFormat) {<NEW_LINE>Objects.requireNonNull(projectDir, "projectDir");<NEW_LINE>Objects.requireNonNull(toFormat, "toFormat");<NEW_LINE>if (this != GIT_ATTRIBUTES) {<NEW_LINE>return createPolicy();<NEW_LINE>} else {<NEW_LINE>if (gitAttributesPolicyCrea... | File.class, Supplier.class); |
844,465 | Node createJscompArrayFromIterableCall(Node iterable, StaticScope scope) {<NEW_LINE>// TODO(b/193800507): consider making this verify the arrayFromIterable $jscomp runtime library<NEW_LINE>// is injected.<NEW_LINE>Node makeIterableName = createQName(scope, "$jscomp.arrayFromIterable");<NEW_LINE>final Type resultType;<N... | assertFunctionType().getReturnType()); |
982,986 | public soot.Value eval(Body b) {<NEW_LINE>if (type().isString() && isConstant())<NEW_LINE>return soot.jimple.StringConstant.v(constant().stringValue());<NEW_LINE>if (isStringAdd()) {<NEW_LINE>Local v;<NEW_LINE>if (firstStringAddPart()) {<NEW_LINE>// new StringBuffer<NEW_LINE>v = b.newTemp(b.newNewExpr(lookupType("java.... | ), this), this)); |
1,843,814 | private String makeShareableMessage() {<NEW_LINE>StringBuilder build = new StringBuilder();<NEW_LINE>final String newLine = "\n";<NEW_LINE>if ((Utility.getPhoneNumber(getActivity(), mPrefsFactory) != null) && (!TextUtils.isEmpty(Utility.getPhoneNumber(getActivity(), mPrefsFactory)))) {<NEW_LINE>build.append(getString(R... | (R.string.phone_status)); |
1,784,214 | final GetTraceSummariesResult executeGetTraceSummaries(GetTraceSummariesRequest getTraceSummariesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getTraceSummariesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.st... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
545,298 | public Stream<Object> keyStream() {<NEW_LINE>return StreamSupport.stream(new Spliterator<Object>() {<NEW_LINE><NEW_LINE>private int nextEntriesIndex;<NEW_LINE><NEW_LINE>private OHashTable.Entry<Object, Object>[] entries;<NEW_LINE><NEW_LINE>{<NEW_LINE>OHashTable.Entry<Object, Object> firstEntry = hashTable.firstEntry();... | Object> bucketEntry = entries[nextEntriesIndex]; |
1,346,682 | public static void fixedLagSmoothingDemo() {<NEW_LINE>System.out.println("DEMO: Fixed-Lag-Smoothing");<NEW_LINE>System.out.println("=========================");<NEW_LINE>System.out.println("Lag = 1");<NEW_LINE>System.out.println("-------");<NEW_LINE>FixedLagSmoothing uw = new FixedLagSmoothing(HMMExampleFactory.getUmbr... | = new ArrayList<AssignmentProposition>(); |
681,808 | public void run(long memoryWeCanHoldForCertain, BatchingNeoStores neoStore, long highNodeId) {<NEW_LINE>try (RelationshipGroupCache groupCache = new RelationshipGroupCache(numberArrayFactory, memoryWeCanHoldForCertain, highNodeId, memoryTracker)) {<NEW_LINE>// Read from the temporary relationship group store...<NEW_LIN... | ByteArray groupCountCache = groupCache.getGroupCountCache(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.