idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,495,898 | public void performBootstrap(BootstrapTask task, AbstractProducer producer, Long currentSchemaID) throws Exception {<NEW_LINE>if (LOGGER.isDebugEnabled()) {<NEW_LINE>LOGGER.debug("bootstrapping requested for {}", task.logString());<NEW_LINE>}<NEW_LINE>Table table = getTableForTask(task);<NEW_LINE>producer.push(bootstra... | "bootstrapping row : {}", row.toJSON()); |
234,227 | private static void appendUtf8(RopeBuilder to, int code, RubyEncoding[] enc, Rope str, RegexpSupport.ErrorMode mode) throws DeferredRaiseException {<NEW_LINE><MASK><NEW_LINE>if (code < 0x80) {<NEW_LINE>if (to != null) {<NEW_LINE>to.append(StringUtils.formatASCIIBytes("\\x%02X", code));<NEW_LINE>}<NEW_LINE>} else {<NEW_... | checkUnicodeRange(code, str, mode); |
302,538 | public boolean importInto(Workspace workspace, Toaster toaster) {<NEW_LINE>try {<NEW_LINE>var command = IOUtils.toString(importCtrl.getInput());<NEW_LINE>var args = translateCommandline(command);<NEW_LINE>if (args.length < 2 || !args[0].equals("curl")) {<NEW_LINE>toaster.showToast("No valid curl command");<NEW_LINE>ret... | argumentList = Arrays.asList(args); |
157,196 | private String makeKeyConstractorComment(List<ColumnDefinition> columnDefinitions) {<NEW_LINE>StringBuilder builder = new StringBuilder();<NEW_LINE>builder.append(" /**\n");<NEW_LINE>builder.append(" * Constructor\n");<NEW_LINE>Collection<<MASK><NEW_LINE>for (ColumnDefinition columnDefinition : primaryKeys) {<NE... | ColumnDefinition> primaryKeys = getPrimaryKeys(columnDefinitions); |
159,090 | public Concrete.Expression visitPi(PiExpression piExpr, Void ignore) {<NEW_LINE>List<List<Concrete.TypeParameter>> parameters = new ArrayList<>();<NEW_LINE>Expression expr = piExpr;<NEW_LINE>for (; piExpr != null; piExpr = expr.cast(PiExpression.class)) {<NEW_LINE>List<Concrete.TypeParameter> params = new ArrayList<>()... | expr.accept(this, null); |
1,215,734 | public static Map<String, Object> buildDependenciesData(Stream<Codestart> codestartsStream, String languageName, Collection<String> extensions, Collection<String> platforms) {<NEW_LINE>final Map<String, Set<CodestartDep>> depsData = new HashMap<>();<NEW_LINE>final Set<CodestartDep> boms = new LinkedHashSet<>();<NEW_LIN... | addAll(d.getTestDependencies()); |
911,123 | public Pair<User, Account> findUserAccountByApiKey(String apiKey) {<NEW_LINE>TransactionLegacy txn = TransactionLegacy.currentTxn();<NEW_LINE>PreparedStatement pstmt = null;<NEW_LINE>Pair<User, Account> userAcctPair = null;<NEW_LINE>try {<NEW_LINE>String sql = FIND_USER_ACCOUNT_BY_API_KEY;<NEW_LINE><MASK><NEW_LINE>pstm... | pstmt = txn.prepareAutoCloseStatement(sql); |
1,006,226 | private void exportTableToCsv(File file) {<NEW_LINE>final File csvFile = new File(file.toString() + ".csv");<NEW_LINE>final String tableName = (String) this.tablesDropdownList.getSelectedItem();<NEW_LINE>SwingWorker<String, Void> csvWorker = new SwingWorker<String, Void>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protec... | MessageNotifyUtil.Message.error(message); |
353,061 | private NV_ENC_QP parseQp(String optionName, String optionValue) {<NEW_LINE>String[] qps = optionValue.split(",");<NEW_LINE>NV_ENC_QP qp = null;<NEW_LINE>try {<NEW_LINE>if (qps.length == 1) {<NEW_LINE>int qpValue = Integer.parseInt(qps[0]);<NEW_LINE>qp = new NV_ENC_QP();<NEW_LINE>qp.qpInterP(qpValue);<NEW_LINE>qp.qpInt... | parseInt(qps[2])); |
1,552,147 | protected void add(Object callback) {<NEW_LINE>if (callback instanceof BQBeforeScopeCallback) {<NEW_LINE>this.beforeAll = addToCallbacks(beforeAll, c -> ((BQBeforeScopeCallback) callback).beforeScope<MASK><NEW_LINE>}<NEW_LINE>if (callback instanceof BQBeforeMethodCallback) {<NEW_LINE>this.beforeEach = addToCallbacks(be... | (BQTestScope.TEST_CLASS, c)); |
1,025,172 | protected void handleSearchButtonSelected() {<NEW_LINE>IJavaProject project = getJavaProject();<NEW_LINE>IJavaElement[] elements = null;<NEW_LINE>if ((project == null) || !project.exists()) {<NEW_LINE>IJavaModel model = JavaCore.create(ResourcesPlugin.getWorkspace().getRoot());<NEW_LINE>if (model != null) {<NEW_LINE>tr... | SearchEngine.createJavaSearchScope(elements, constraints); |
1,741,024 | public Network implement(Network network, NetworkOffering offering, DeployDestination dest, ReservationContext context) throws InsufficientVirtualNetworkCapacityException {<NEW_LINE>assert (network.getState() == State.Implementing) : "Why are we implementing " + network;<NEW_LINE>long dcId = dest.getDataCenter().getId(... | () + "." + keyStr)); |
1,721,096 | private void verifyAllowedMethodName(Expression key, boolean isStatic, boolean computed, boolean generator, boolean accessor, boolean async) {<NEW_LINE>if (!computed) {<NEW_LINE>final TruffleString name = ((PropertyKey) key).getPropertyName();<NEW_LINE>if (!isStatic && generator && name.equals(CONSTRUCTOR_NAME)) {<NEW_... | ), key.getToken()); |
823,656 | public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {<NEW_LINE>try {<NEW_LINE>monitor.subTask(Messages.GithubForkWizard_ForkSubTaskName);<NEW_LINE>IGithubRepository repo = ghManager.fork(owner, repoName, organization);<NEW_LINE>// Now clone the repo!<NEW_LINE>CloneJob job = ... | > projects = job.getCreatedProjects(); |
115,185 | public void start() {<NEW_LINE>FusekiInfo.server(serverLog);<NEW_LINE>// This does not get anything usefully for Jetty as we use it.<NEW_LINE>// String jettyVersion = org.eclipse.jetty.server.Server.getVersion();<NEW_LINE>// serverLog.info(format("Jetty %s",jettyVersion));<NEW_LINE>String host = serverConnector.getHost... | ex.getMessage(), ex); |
452,748 | public static PictureExporter createPicture(SvgConversionContext context, NodeIterator anchorOrInline) {<NEW_LINE>PictureExporter converter = new PictureExporter();<NEW_LINE>try {<NEW_LINE>Node n = anchorOrInline.nextNode();<NEW_LINE>converter.pic = (org.pptx4j.pml.Pic) XmlUtils.unmarshal(n, org.pptx4j.jaxb.Context.jcP... | String imgRelId = blip.getEmbed(); |
1,750,067 | public void processConnect(final Host host, final StartupCommand cmd, final boolean forRebalance) {<NEW_LINE>if (cmd instanceof StartupRoutingCommand) {<NEW_LINE>if (((StartupRoutingCommand) cmd).getHypervisorType() == HypervisorType.KVM || ((StartupRoutingCommand) cmd).getHypervisorType() == HypervisorType.LXC) {<NEW_... | Commands c = new Commands(cmds); |
1,155,952 | public boolean onOptionsItemSelected(MenuItem item) {<NEW_LINE>// Handle action bar item clicks here. The action bar will<NEW_LINE>// automatically handle clicks on the Home/Up button, so long<NEW_LINE>// as you specify a parent activity in AndroidManifest.xml.<NEW_LINE>int id = item.getItemId();<NEW_LINE>// turn into ... | AlertDialog alertDialog = alertDialogBuilder.create(); |
1,728,777 | private I_C_BPartner createNewBPartnerNoSave(final I_I_BPartner from) {<NEW_LINE>final I_C_BPartner bpartner = InterfaceWrapperHelper.newInstance(I_C_BPartner.class);<NEW_LINE>bpartner.setExternalId(from.getC_BPartner_ExternalId());<NEW_LINE>bpartner.setAD_Org_ID(from.getAD_Org_ID());<NEW_LINE>//<NEW_LINE>bpartner.setV... | setVATaxID(from.getTaxID()); |
165,172 | private static NioClientSocketChannelFactory defaultChannelFactory(final Config config) {<NEW_LINE>class BossThreadNamer implements ThreadNameDeterminer {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public String determineThreadName(String currentThreadName, String proposedThreadName) throws Exception {<NEW_LINE>return "Asyn... | , num_workers, new WorkerThreadNamer()); |
313,789 | public void buildModel() {<NEW_LINE>model = new Model();<NEW_LINE>Random rand = new Random(29091981);<NEW_LINE>double precision = 1.e-6;<NEW_LINE>kid_gift = model.intVarArray("g2k", n_kids, 0, n_gifts, false);<NEW_LINE>kid_price = model.intVarArray("p2k", n_kids, 0, max_price, false);<NEW_LINE>total_cost = model.intVar... | 0, max_price * n_kids, precision); |
971,715 | protected Peer connectTo(PeerAddress address, boolean incrementMaxConnections, int connectTimeoutMillis) {<NEW_LINE>checkState(lock.isHeldByCurrentThread());<NEW_LINE>VersionMessage ver = getVersionMessage().duplicate();<NEW_LINE>ver.bestHeight = chain == null ? 0 : chain.getBestChainHeight();<NEW_LINE>ver.time = Utils... | ver.receivingAddr.setParent(ver); |
719,483 | public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {<NEW_LINE>builder.startObject();<NEW_LINE>builder.field("uid", uid);<NEW_LINE>if (builder.getRestApiVersion() == RestApiVersion.V_7 && params.paramAsBoolean("accept_enterprise", false) == false) {<NEW_LINE>if (License.LicenseT... | builder.field("type", type); |
1,651,205 | private void bubbleSort() {<NEW_LINE>List<String> labels = mChart.getData().getXVals();<NEW_LINE>List<Entry> values = mChart.getData()<MASK><NEW_LINE>List<Integer> colors = mChart.getData().getDataSet().getColors();<NEW_LINE>float tmp1;<NEW_LINE>String tmp2;<NEW_LINE>Integer tmp3;<NEW_LINE>for (int i = 0; i < values.si... | .getDataSet().getYVals(); |
662,896 | private static Type[] clipParquetSchema(GroupType parquetSchema, String[] fieldNames, boolean caseSensitive) {<NEW_LINE>Type[] types = new Type[fieldNames.length];<NEW_LINE>if (caseSensitive) {<NEW_LINE>for (int i = 0; i < fieldNames.length; ++i) {<NEW_LINE>String fieldName = fieldNames[i];<NEW_LINE>types[i] = parquetS... | parquetSchema.getType(fieldName) : null; |
3,048 | protected void layoutNativeView(boolean informParent) {<NEW_LINE>if (nativeView != null) {<NEW_LINE>Animation a = nativeView.getAnimation();<NEW_LINE>if (a instanceof TiMatrixAnimation) {<NEW_LINE>TiMatrixAnimation matrixAnimation = (TiMatrixAnimation) a;<NEW_LINE>matrixAnimation.invalidateWithMatrix(nativeView);<NEW_L... | getViewTreeObserver().removeOnGlobalLayoutListener(this); |
729,465 | private void markupSectionHeaders(TaskMonitor monitor) {<NEW_LINE>int headerCount = elf.getSectionHeaderCount();<NEW_LINE>int size = elf.e_shentsize() * headerCount;<NEW_LINE>if (size == 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>monitor.setMessage("Markup Section Headers ...");<NEW_LINE>Structure shStructDt = (Structur... | elf.e_shoff(), size); |
1,433,453 | protected Result updateStreamSource(String streamId, Broadcast broadcast) {<NEW_LINE>boolean result = false;<NEW_LINE>boolean resultStopStreaming = false;<NEW_LINE>logger.debug("update cam info for stream {}", broadcast.getStreamId());<NEW_LINE>if (checkStreamUrl(broadcast.getStreamUrl())) {<NEW_LINE>Broadcast broadcas... | logger.info("new RTSP URL: {}", rtspURLWithAuth); |
1,524,627 | public boolean fieldElementClicked(Object clickedObject, Navigatable navigatable, ProgramLocation location, MouseEvent mouseEvent, ServiceProvider serviceProvider) {<NEW_LINE>if (mouseEvent.getClickCount() != 2 || mouseEvent.getButton() != MouseEvent.BUTTON1) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>GoToService goT... | goToService.goTo(navigatable, gotoAddr); |
141,044 | public static DescribeParametersResponse unmarshall(DescribeParametersResponse describeParametersResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeParametersResponse.setRequestId(_ctx.stringValue("DescribeParametersResponse.RequestId"));<NEW_LINE>describeParametersResponse.setEngine(_ctx.stringValue("DescribeParam... | ("DescribeParametersResponse.RunningParameters[" + i + "].ParameterValue")); |
1,491,376 | private ApiResponseSet<Object> alertToSet(Alert alert) {<NEW_LINE>Map<String, Object> map = new HashMap<>();<NEW_LINE>map.put("id", String.valueOf(alert.getAlertId()));<NEW_LINE>map.put("pluginId", String.valueOf(alert.getPluginId()));<NEW_LINE>map.put("alertRef", alert.getAlertRef());<NEW_LINE>// Deprecated in 2.5.0, ... | ().getId())); |
797,205 | private String deserializeHeader(String headerName) {<NEW_LINE>if (headerName.endsWith(Metadata.BINARY_HEADER_SUFFIX)) {<NEW_LINE>Metadata.Key<byte[]> key;<NEW_LINE>try {<NEW_LINE>key = Metadata.Key.<MASK><NEW_LINE>} catch (IllegalArgumentException e) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Iterable<byte[]> values ... | of(headerName, Metadata.BINARY_BYTE_MARSHALLER); |
1,084,835 | public static RelNode enforce(RelNode input, RelTraitSet toTraitSet) {<NEW_LINE>assert input.getConvention() == MppConvention.INSTANCE;<NEW_LINE>RelDistribution toDistribution = <MASK><NEW_LINE>RelCollation toCollation = toTraitSet.getTrait(RelCollationTraitDef.INSTANCE);<NEW_LINE>RelNode output;<NEW_LINE>if (toDistrib... | toTraitSet.getTrait(RelDistributionTraitDef.INSTANCE); |
108,147 | final GetRuleGroupResult executeGetRuleGroup(GetRuleGroupRequest getRuleGroupRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getRuleGroupRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
1,556,509 | @ApiImplicitParams({ @ApiImplicitParam(name = "objHash", value = "object type", required = true, dataType = "int", paramType = "path"), @ApiImplicitParam(name = "serverId", value = "server id", dataType = "int", paramType = "query") })<NEW_LINE>@ApiResponses(value = { @ApiResponse(code = 200, message = "OK - Json Data"... | getInstance().getServerIfNullDefault(serverId); |
1,440,381 | private void emptyReadBuffers() {<NEW_LINE>for (int n = 0; n < NUMBER_OF_READ_BUFFERS; n++) {<NEW_LINE>AtomicReference<OClosableEntry<K, V>>[] buffer = readBuffers[n];<NEW_LINE>long writeCount = readBufferDrainAtWriteCount[n].get();<NEW_LINE>long counter = readBufferReadCount[n];<NEW_LINE>while (true) {<NEW_LINE>final ... | >> eref = buffer[bufferIndex]; |
394,470 | private Mono<PagedResponse<ApplicationGatewayInner>> listByResourceGroupSinglePageAsync(String resourceGroupName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException(... | error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); |
1,813,564 | public MappedFieldType unmappedFieldType(String type) {<NEW_LINE>if (type.equals("string")) {<NEW_LINE>deprecationLogger.deprecate("unmapped_type_string", "[unmapped_type:string] should be replaced with [unmapped_type:keyword]");<NEW_LINE>type = "keyword";<NEW_LINE>}<NEW_LINE>MappedFieldType fieldType = unmappedFieldTy... | (builderContext)).fieldType(); |
738,368 | private void updateContainers(String type, String name, String targetKey, JSONArray updateDatas) {<NEW_LINE>JSONObject workloadSpec = (JSONObject) getWorkloadRef().getSpec();<NEW_LINE>log.info("configmap trait parent workload {}", workloadSpec.toJSONString());<NEW_LINE>JSONArray containers;<NEW_LINE>if (workloadSpec.ge... | target = container.getJSONArray(targetKey); |
1,495,195 | public Request<AddRoleToDBInstanceRequest> marshall(AddRoleToDBInstanceRequest addRoleToDBInstanceRequest) {<NEW_LINE>if (addRoleToDBInstanceRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<AddRoleToDBInstanceRequest> request = new Default... | request.addParameter("Action", "AddRoleToDBInstance"); |
358,535 | public static DescribeWebLockConfigListResponse unmarshall(DescribeWebLockConfigListResponse describeWebLockConfigListResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeWebLockConfigListResponse.setRequestId(_ctx.stringValue("DescribeWebLockConfigListResponse.RequestId"));<NEW_LINE>describeWebLockConfigListResponse... | ("DescribeWebLockConfigListResponse.ConfigList[" + i + "].ExclusiveDir")); |
998,707 | public void migrate(boolean forceUpgrade) throws IOException {<NEW_LINE>StoreVersionCheck versionCheck = storageEngineFactory.versionCheck(fs, databaseLayout, config, pageCache, logService, pageCacheTracer);<NEW_LINE>var logsUpgrader = new LogsUpgrader(fs, storageEngineFactory, databaseLayout, pageCache, legacyLogsLoca... | fs, pageCache, storageEngineFactory))); |
791,450 | public static String decodeString(String s) {<NEW_LINE>int pos_amp = s.indexOf('&');<NEW_LINE>if (pos_amp == -1)<NEW_LINE>return s;<NEW_LINE>int pos_sc;<NEW_LINE>int pos_a;<NEW_LINE>StringBuilder buf = new StringBuilder(s.substring(0, pos_amp));<NEW_LINE>char replace;<NEW_LINE>while (true) {<NEW_LINE>pos_sc = s.indexOf... | (s.substring(pos_amp)); |
516,965 | private static Element toXML(RelationTriple triple, String curNS) {<NEW_LINE>Element top = new Element("triple", curNS);<NEW_LINE>top.addAttribute(new Attribute("confidence", triple.confidenceGloss()));<NEW_LINE>// Create the subject<NEW_LINE>Element subject = new Element("subject", curNS);<NEW_LINE>subject.addAttribut... | = new Element("text", curNS); |
613,770 | private int removeNull(int index) {<NEW_LINE>Entry[] tab = table;<NEW_LINE>int len = tab.length;<NEW_LINE>tab[index].value = Misc.free(tab[index].value);<NEW_LINE>tab[index] = null;<NEW_LINE>size--;<NEW_LINE>Entry e;<NEW_LINE>int i;<NEW_LINE>for (i = nextIndex(index, len); (e = tab[i]) != null; i = nextIndex(i, len)) {... | <?> k = e.k; |
836,192 | private void logBeanData() {<NEW_LINE>String methodName = "logBeanData";<NEW_LINE>logBeanData(methodName, getBeanText(constructorBean, CDICaseInjection.Constructor));<NEW_LINE>logBeanData(methodName, getBeanText(postConstruct, CDICaseInjection.PostConstruct));<NEW_LINE>// getBeanText(getPreDestroy(), CDICaseInjection.P... | (dependentFieldBean, CDICaseInjection.Field)); |
959,142 | public boolean checkLinkRules(String fName, int line) {<NEW_LINE>// Check case of path (check for UNIX compatibility on a PC)!<NEW_LINE>String offensive = offensivePathMember(directory + separator + fName);<NEW_LINE>if (offensive != null) {<NEW_LINE>String file = "";<NEW_LINE>try {<NEW_LINE>File f = new File(offensive)... | "Reference to " + fName + " with absolute path", line); |
729,989 | private static Map<String, FileTypes> extractTypesByAbsolutePath(StructureXMLParser parser) {<NEW_LINE>Map<String, FileTypes> typesByFile = new HashMap<String, FileTypes>();<NEW_LINE>// Typedefs<NEW_LINE>for (Typedef typedef : parser.getTypedefs().values()) {<NEW_LINE>String filename = typedef.getDefinitionLocation() =... | types = typesByFile.get(filename); |
1,524,293 | public void modifyTx(ClientDetailsModification[] clients) {<NEW_LINE>for (ClientDetailsModification client : clients) {<NEW_LINE>if (ClientDetailsModification.ADD.equals(client.getAction())) {<NEW_LINE>publish(new ClientCreateEvent(client, getPrincipal(), identityZoneManager.getCurrentIdentityZoneId()));<NEW_LINE>} els... | , identityZoneManager.getCurrentIdentityZoneId())); |
1,039,652 | protected static void addJavaJob(CuratorFramework client, String jobName) throws Exception {<NEW_LINE><MASK><NEW_LINE>client.create().creatingParentsIfNeeded().forPath(jobConfigNode + "jobType", "JAVA_JOB".getBytes());<NEW_LINE>client.create().creatingParentsIfNeeded().forPath(jobConfigNode + "cron", "*/5 * * * * ?".ge... | String jobConfigNode = "/$Jobs/" + jobName + "/config/"; |
1,527,211 | public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>String objects = "@public create variable string MYVARIABLE_NONCONSTANT = 'abc';\n" + "@public create table MyTable(tablecol string);\n" + "@public create window MyWindow#keepall as SupportBean;\n" + "@public crea... | path, "SupportBean", hook + "select * from pattern[s0=SupportBean_S0 -> SupportBean(MyJavaScript(theString)='x')]"); |
1,446,706 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_main);<NEW_LINE>// get a reference to the map view<NEW_LINE>mMapView = findViewById(R.id.mapView);<NEW_LINE>try {<NEW_LINE>// set up an oauth config with url to portal, a client id... | Log.e(TAG, error); |
740,252 | private boolean decodeBin() {<NEW_LINE>int opcode = RV32imSupport.getOpcode(instruction);<NEW_LINE>if (opcode == LOAD) {<NEW_LINE>destination = RV32imSupport.getDestinationRegisterIndex(instruction);<NEW_LINE>immediate = RV32imSupport.getImmediateValue(instruction, RV32imSupport.I_TYPE);<NEW_LINE>base = RV32imSupport.g... | destination = RV32imSupport.getSourceRegister2Index(instruction); |
1,290,601 | public void valueChanged(ListSelectionEvent e) {<NEW_LINE>clearSelection();<NEW_LINE>updateVersionsCombo(null);<NEW_LINE>updateExtensionsCombo();<NEW_LINE>final int ind = myRefs.getSelectedIndex();<NEW_LINE>final PsiElement element = getPsiElement();<NEW_LINE>if (ind > -1 && element != null) {<NEW_LINE>final PsiReferen... | (ViewerTreeStructure) myPsiTreeBuilder.getTreeStructure(); |
1,352,905 | public Frequency unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>Frequency frequency = new Frequency();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonTok... | class).unmarshall(context)); |
1,521,613 | private int copyMetadataAndSetIndexed(int columnIndex, int indexValueBlockSize) {<NEW_LINE>try {<NEW_LINE>int index = openMetaSwapFile(ff, ddlMem, path, rootLen, configuration.getMaxSwapFileCount());<NEW_LINE>int columnCount = metaMem.getInt(META_OFFSET_COUNT);<NEW_LINE>ddlMem.putInt(columnCount);<NEW_LINE>ddlMem.putIn... | nameOffset += Vm.getStorageLength(columnName); |
329,230 | public final Object invokeInterceptor(Object bean, InvocationContext inv, Object[] interceptors) throws Exception {<NEW_LINE>// Interceptor instance is the bean instance itself if the<NEW_LINE>// interceptor index is < 0.<NEW_LINE>Object interceptorInstance = (ivBeanInterceptor) ? bean : interceptors[ivInterceptorIndex... | ivInterceptorMethod.invoke(interceptorInstance, NO_ARGS); |
1,726,437 | public void adjustVideoPosition(double adjustPercent, boolean forwardDirection) {<NEW_LINE>if (disableGestures) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (adjustPercent < -1.0f) {<NEW_LINE>adjustPercent = -1.0f;<NEW_LINE>} else if (adjustPercent > 1.0f) {<NEW_LINE>adjustPercent = 1.0f;<NEW_LINE>}<NEW_LINE>int totalTime... | = fragmentBinding.videoView.getDuration(); |
1,522,435 | public Object propertyValue(CloudObject obj, String propertyName) {<NEW_LINE>final String key = (<MASK><NEW_LINE>if (key == null) {<NEW_LINE>return placeholderImage;<NEW_LINE>}<NEW_LINE>Image image = (Image) getCache().get(key);<NEW_LINE>if (image == null) {<NEW_LINE>ReplaceableImage r = inProgress.get(key);<NEW_LINE>i... | String) obj.getObject(idProperty); |
454,984 | private void createThrowStmt(Body body, Unit oldStmt, LocalCreation lc) {<NEW_LINE>RefType <MASK><NEW_LINE>Local lcEx = lc.newLocal(tp);<NEW_LINE>SootMethodRef constructorRef = Scene.v().makeConstructorRef(tp.getSootClass(), Collections.singletonList((Type) RefType.v("java.lang.String")));<NEW_LINE>// Create the except... | tp = RefType.v("java.lang.NullPointerException"); |
192,276 | public void configure(Binder binder) {<NEW_LINE>binder.bind(ZkDataMigrationRunner.class).in(Scopes.SINGLETON);<NEW_LINE>Multibinder<ZkDataMigration> dataMigrations = Multibinder.newSetBinder(binder, ZkDataMigration.class);<NEW_LINE>dataMigrations.addBinding().to(LastTaskStatusMigration.class);<NEW_LINE>dataMigrations.a... | ).to(SingularityCmdLineArgsMigration.class); |
1,661,896 | public static ListTagsResponse unmarshall(ListTagsResponse listTagsResponse, UnmarshallerContext context) {<NEW_LINE>listTagsResponse.setRequestId(context.stringValue("ListTagsResponse.RequestId"));<NEW_LINE>listTagsResponse.setCode(context.stringValue("ListTagsResponse.Code"));<NEW_LINE>listTagsResponse.setMessage(con... | = new ArrayList<Tag>(); |
1,653,059 | public Request<InvokeRequest> marshall(InvokeRequest invokeRequest) {<NEW_LINE>if (invokeRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(InvokeRequest)");<NEW_LINE>}<NEW_LINE>Request<InvokeRequest> request = new DefaultRequest<InvokeRequest>(invokeRequest, "AWSLambda");<... | (invokeRequest.getInvocationType())); |
1,613,765 | final UpdateTrackerResult executeUpdateTracker(UpdateTrackerRequest updateTrackerRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateTrackerRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
701,014 | public static NavigationItem.CategoryNavigationItem convertToCategoryNavigationItem(@NonNull Context context, @NonNull CategoryWithNotesCount counter) {<NEW_LINE>final <MASK><NEW_LINE>final var englishRes = getEnglishResources(context);<NEW_LINE>final String category = counter.getCategory().replaceAll("\\s+", "");<NEW_... | var res = context.getResources(); |
16,010 | private void uploadResultsToGcs(String destination) {<NEW_LINE>checkArgument(!destination.isEmpty(), "destination must include at least the bucket name, but is empty");<NEW_LINE>Path bucketWithFolder = Paths.get(destination, createUniqueFolderName());<NEW_LINE>String bucket = bucketWithFolder.getName(0).toString();<NEW... | .build().getService(); |
736,220 | public boolean runCreateAppScript(String appName, boolean isCluster, String mongoHost, String mongoUser, String mongoPass, String warFileName) {<NEW_LINE>Path currentRelativePath = Paths.get("");<NEW_LINE>String webappsPath = currentRelativePath.toAbsolutePath().toString();<NEW_LINE>String command;<NEW_LINE>if (warFile... | + " -p " + webappsPath + " -c " + isCluster; |
388,385 | private static WorkspaceEdit computeMoveEdit(FileRename[] moveEvents, SourcePath[] sourcePaths, IProgressMonitor monitor) {<NEW_LINE>IPath[] newPaths = Stream.of(moveEvents).map(event -> ResourceUtils.filePathFromURI(event.getNewUri())).toArray(IPath[]::new);<NEW_LINE>IPath destinationPath = ResourceUtils.getLongestCom... | nonClasspathCus = new ArrayList<>(); |
1,706,133 | private void addGroupUser(Group group, String userId, List<String> sourceIds) {<NEW_LINE>String id = group.getId();<NEW_LINE>String type = group.getType();<NEW_LINE>if (StringUtils.equals(type, UserGroupType.SYSTEM)) {<NEW_LINE>UserGroup userGroup = new UserGroup();<NEW_LINE>userGroup.setId(UUID.<MASK><NEW_LINE>userGro... | randomUUID().toString()); |
1,053,608 | public boolean writeToBIOlayout(String filename) throws IOException {<NEW_LINE>File path = new File(DataConnector.GRAPH_PATH);<NEW_LINE>if (!path.exists()) {<NEW_LINE>path.mkdir();<NEW_LINE>System.out.println("[Info] Directory: " + DataConnector.GRAPH_PATH + " created");<NEW_LINE>}<NEW_LINE>File file = new File(DataCon... | > neigh = p.getNeighbours(); |
1,730,994 | public PostAggregator toPostAggregator(PlannerContext plannerContext, RowSignature rowSignature, RexNode rexNode, PostAggregatorVisitor postAggregatorVisitor) {<NEW_LINE>final List<RexNode> operands = ((RexCall) rexNode).getOperands();<NEW_LINE>final List<PostAggregator> inputPostAggs = new ArrayList<>();<NEW_LINE>Inte... | plannerContext, rowSignature, operand, postAggregatorVisitor); |
668,225 | public Tuple3<Params, Iterable<String>, Iterable<Row>> serializeModel(Tuple3<Boolean, Boolean, BaseVectorSummary> modelData) {<NEW_LINE>Boolean withMean = modelData.f0;<NEW_LINE>Boolean withStd = modelData.f1;<NEW_LINE>BaseVectorSummary summary = modelData.f2;<NEW_LINE>double[] means;<NEW_LINE>double[] stdDeviations;<N... | , new ArrayList<>()); |
1,667,596 | public ActivityImpl createActivityOnScope(Element activityElement, ScopeImpl scopeElement) {<NEW_LINE>String id = activityElement.attribute("id");<NEW_LINE>LOG.parsingElement("activity", id);<NEW_LINE>ActivityImpl activity = scopeElement.createActivity(id);<NEW_LINE>activity.setProperty("name", activityElement.attribut... | ("documentation", parseDocumentation(activityElement)); |
1,760,572 | public DiscoveryDruidNodeList listPods(String podNamespace, String labelSelector, NodeRole nodeRole) {<NEW_LINE>try {<NEW_LINE>V1PodList podList = coreV1Api.listNamespacedPod(podNamespace, null, null, null, null, labelSelector, 0, null, null, null);<NEW_LINE>Preconditions.checkState(podList != null, "WTH: NULL podList"... | ).getResourceVersion(), allNodes); |
1,465,715 | protected long[] readMvSub8x8(int miCol, int miRow, int blSz, VPXBooleanDecoder decoder, DecodingContext c, int packedRefFrames) {<NEW_LINE>int subMode0 = readInterMode(miCol, miRow, blSz, decoder, c);<NEW_LINE>long mvl0 = readSub0(miCol, miRow, blSz, decoder, c, subMode0, packedRefFrames);<NEW_LINE>int subMode1 = read... | blSz, c, mvl0, mvl1); |
1,637,925 | public void resumeSnapshot(String snapshotPrefix, boolean deleteSnapshot) {<NEW_LINE>Lock readLock = this.storeLock.readLock();<NEW_LINE>readLock.lock();<NEW_LINE>try {<NEW_LINE>if (!this.opened()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Map<String, RocksDBSessions> snapshotPaths = new HashMap<>();<NEW_LINE>for (Map.Ent... | snapshotPath = sessions.buildSnapshotPath(snapshotPrefix); |
1,263,552 | protected void write(ClassWriter classWriter, MethodWriter methodWriter, WriteScope writeScope) {<NEW_LINE>methodWriter.writeStatementOffset(getLocation());<NEW_LINE>Variable variable = writeScope.defineVariable(variableType, variableName);<NEW_LINE>Variable array = <MASK><NEW_LINE>Variable index = writeScope.defineInt... | writeScope.defineInternalVariable(arrayType, arrayName); |
1,311,852 | public void postLayout() {<NEW_LINE>VPanel panel = getWidget();<NEW_LINE>if (uidlScrollTop != null) {<NEW_LINE>// IE / Safari fix for when scroll top is set to greater than panel<NEW_LINE>// height<NEW_LINE>int maxScroll = panel<MASK><NEW_LINE>if (uidlScrollTop > maxScroll) {<NEW_LINE>uidlScrollTop = maxScroll;<NEW_LIN... | .getWidget().getOffsetHeight(); |
862,535 | protected // 0 -> don't check<NEW_LINE>void // 0 -> don't check<NEW_LINE>refreshNodes(// 0 -> don't check<NEW_LINE>List nodes_to_refresh, // 0 -> don't check<NEW_LINE>DHTRouterNodeImpl node, // 0 -> don't check<NEW_LINE>byte[] path, // 0 -> don't check<NEW_LINE>boolean seeding, long max_permitted_idle) {<NEW_LINE>// wh... | [depth / 8] | mask); |
1,715,481 | public void visitMerge(final AbstractMergeNode mergeNode) {<NEW_LINE>Logger.traceBuildLIR(Logger.BACKEND.PTX, "visitMerge: ", mergeNode);<NEW_LINE>boolean loopExitMerge = true;<NEW_LINE>for (EndNode end : mergeNode.forwardEnds()) {<NEW_LINE>loopExitMerge &= end.predecessor() instanceof LoopExitNode;<NEW_LINE>}<NEW_LINE... | (phi.valueAt(1)); |
608,447 | public DirContextOperations authenticate(final Authentication authentication) {<NEW_LINE>Assert.isInstanceOf(UsernamePasswordAuthenticationToken.class, authentication, "Can only process UsernamePasswordAuthenticationToken objects");<NEW_LINE>// locate the user and check the password<NEW_LINE>DirContextOperations user =... | throw new UsernameNotFoundException("User not found: " + username); |
38,392 | private void renderLineItemToCursor(Cursor cursor, Bill.LineItem lineItem) {<NEW_LINE>cursor.setString("id", lineItem.id());<NEW_LINE>cursor.setString("description", lineItem.description());<NEW_LINE>cursor.setString("amount", lineItem.amount().toString());<NEW_LINE>cursor.setString("plan", lineItem.plan());<NEW_LINE>c... | lineItem.plan()))); |
505,998 | void saveRotationState() {<NEW_LINE>// Disable rotation from the accelerometer; 0 means off, 1 means on<NEW_LINE>try {<NEW_LINE>originalAccelerometer = settings.system().getInt(Settings.System.ACCELEROMETER_ROTATION);<NEW_LINE>} catch (Settings.SettingNotFoundException e) {<NEW_LINE>Log.d(TAG, "Could not read accelerom... | Settings.System.ACCELEROMETER_ROTATION, 0); |
109,176 | // Complain if an attempt to annotate the enclosing type of a static member type is being made.<NEW_LINE>public static void isTypeUseCompatible(TypeReference reference, Scope scope, Annotation[] annotations) {<NEW_LINE>if (annotations == null || reference == null || reference.getAnnotatableLevels() == 1)<NEW_LINE>retur... | new Annotation[] { annotation }); |
133,361 | public com.amazonaws.services.codecommit.model.InvalidRepositoryTriggerBranchNameException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.codecommit.model.InvalidRepositoryTriggerBranchNameException invalidRepositoryTriggerBranchNameException = new com.amazonaw... | JsonToken token = context.getCurrentToken(); |
1,706,013 | public void testUCPMaxStatements() throws Exception {<NEW_LINE>// TODO remove this restriction once Oracle release a JDBC 4.3 compliant driver<NEW_LINE>boolean atLeastJava9 = false;<NEW_LINE>// Oracle driver and UCP for JDBC 4.2 is not compatible with Java 9+<NEW_LINE>try {<NEW_LINE>// added in Java 9<NEW_LINE>Class.fo... | 3, poolDataSourceDSD.getMaxStatements()); |
141,927 | private FilterOperator parseAndExpression(InfluxDBSqlParser.AndExpressionContext ctx) {<NEW_LINE>if (ctx.predicate().size() == 1) {<NEW_LINE>return parsePredicate(ctx.predicate(0));<NEW_LINE>}<NEW_LINE>FilterOperator binaryOp = new FilterOperator(FilterConstant.FilterType.KW_AND);<NEW_LINE>int size = ctx.predicate().si... | .addChildOperator(parsePredicate(predicateContext)); |
1,162,475 | public static void run() {<NEW_LINE>Scheduler scheduler = new Scheduler();<NEW_LINE>scheduler.addIdleTask(<MASK><NEW_LINE>Packet queue = new Packet(null, ID_WORKER, KIND_WORK);<NEW_LINE>queue = new Packet(queue, ID_WORKER, KIND_WORK);<NEW_LINE>scheduler.addWorkerTask(ID_WORKER, 1000, queue);<NEW_LINE>queue = new Packet... | ID_IDLE, 0, null, COUNT); |
742,332 | // Flush the in-memory data to the file<NEW_LINE>private synchronized void flushData() {<NEW_LINE>BufferedWriter writer = null;<NEW_LINE>try {<NEW_LINE>writer = new BufferedWriter(new FileWriter(new File(this.inputPath)));<NEW_LINE>for (String key : this.metadataMap.keySet()) {<NEW_LINE>writer.write(NEW_PROPERTY_SEPARA... | toString() + "]" + NEW_LINE); |
913,013 | public void doReportStat(SofaTracerSpan sofaTracerSpan) {<NEW_LINE>Map<String, String> tagsWithStr = sofaTracerSpan.getTagsWithStr();<NEW_LINE>StatKey statKey = new StatKey();<NEW_LINE>String localApp = tagsWithStr.get(CommonSpanTags.LOCAL_APP);<NEW_LINE>String exchange = tagsWithStr.get(CommonSpanTags.RABBIT_EXCHANGE)... | .getLoadTestMark(sofaTracerSpan) })); |
186,933 | private void exportDunning(@NonNull final DunningToExport dunningToExport) {<NEW_LINE>final ILoggable loggable = Loggables.withLogger(logger, Level.DEBUG);<NEW_LINE>final List<DunningExportClient> exportClients = dunningExportServiceRegistry.createExportClients(dunningToExport);<NEW_LINE>if (exportClients.isEmpty()) {<... | .getId()), attachmentEntryCreateRequest); |
176,495 | private static IrPolygon[] quadToTri(IrPolygon quad) {<NEW_LINE>if (quad.vertices.length == 3) {<NEW_LINE>throw new IllegalStateException("Already a triangle");<NEW_LINE>}<NEW_LINE>IrPolygon[] t = new IrPolygon[] { new IrPolygon(), new IrPolygon() };<NEW_LINE>t[0].vertices = new IrVertex[3];<NEW_LINE>t[1].vertices = ne... | ].vertices[1] = v1; |
1,851,591 | public Response toResponse(final ValidationException exception) {<NEW_LINE>if (exception instanceof ConstraintViolationException) {<NEW_LINE>LOGGER.log(Level.FINER, <MASK><NEW_LINE>final ConstraintViolationException cve = (ConstraintViolationException) exception;<NEW_LINE>final Response.ResponseBuilder response = Respo... | LocalizationMessages.CONSTRAINT_VIOLATIONS_ENCOUNTERED(), exception); |
1,938 | public void marshall(Attachment attachment, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (attachment == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(attachment.getCoreNetworkId(), CORENETWORKID_BINDING);... | attachment.getResourceArn(), RESOURCEARN_BINDING); |
1,649,729 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player player = game.getPlayer(targetPointer.getFirst(game, source));<NEW_LINE>Player controller = game.<MASK><NEW_LINE>if (player != null && controller != null) {<NEW_LINE>Cards revealedCards = new CardsImpl();<NEW_LINE>revealedCards.addAll(controller.getHand(... | getPlayer(source.getControllerId()); |
401,429 | private synchronized IMqttAsyncClient checkConnection() throws MqttException {<NEW_LINE>if (this.client != null && !this.client.isConnected()) {<NEW_LINE>this.client.setCallback(null);<NEW_LINE>this.client.close();<NEW_LINE>this.client = null;<NEW_LINE>}<NEW_LINE>if (this.client == null) {<NEW_LINE>try {<NEW_LINE>MqttC... | new MqttConnectionFailedEvent(this, e)); |
1,116,390 | public void parallel(Map<String, ApiDefinitionExecResult> executeQueue, RunModeConfigDTO config, DBTestQueue executionQueue, String runMode) {<NEW_LINE>for (String testId : executeQueue.keySet()) {<NEW_LINE>ApiDefinitionExecResult result = executeQueue.get(testId);<NEW_LINE>String reportId = result.getId();<NEW_LINE>Ha... | setPoolId(config.getResourcePoolId()); |
816,849 | private void init(Map<Class<? extends IBase>, BaseRuntimeElementDefinition<?>> theExistingDefinitions, Set<Class<? extends IBase>> theTypesToScan) {<NEW_LINE>if (theExistingDefinitions != null) {<NEW_LINE>myClassToElementDefinitions.putAll(theExistingDefinitions);<NEW_LINE>}<NEW_LINE>int startSize = myClassToElementDef... | > next = nextEntry.getValue(); |
1,491,435 | public void update(InlongGroupConf conf) throws Exception {<NEW_LINE>if (conf != null) {<NEW_LINE>AssertUtil.isTrue(conf.getGroupName() != null && conf.getGroupName().equals(this.groupConf.getGroupName()), "Group must have same name");<NEW_LINE>this.groupConf = conf;<NEW_LINE>} else {<NEW_LINE>conf = this.groupConf;<NE... | parseByBizStatus(groupResponse.getStatus()); |
888,777 | public static P4MaterialConfig fromJSON(JsonReader jsonReader, ConfigHelperOptions options) {<NEW_LINE>P4MaterialConfig p4MaterialConfig = new P4MaterialConfig();<NEW_LINE>ScmMaterialRepresenter.fromJSON(jsonReader, p4MaterialConfig);<NEW_LINE>jsonReader.readStringIfPresent("port", p4MaterialConfig::setServerAndPort);<... | ).ifPresent(p4MaterialConfig::setUseTickets); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.