idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
989,294 | private static double calculateSNegative(double eps, double targetDelta, double initSInf, double initSSup) {<NEW_LINE>double deltaSup = calculateBNegative(eps, initSSup);<NEW_LINE>double sInf = initSInf;<NEW_LINE>double sSup = initSSup;<NEW_LINE>while (deltaSup > targetDelta) {<NEW_LINE>sInf = sSup;<NEW_LINE>sSup = 2 *... | deltaSup = calculateBNegative(eps, sSup); |
334,502 | public void read(org.apache.thrift.protocol.TProtocol iprot, Manifest struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TField schemeField;<NEW_LINE>iprot.readStructBegin();<NEW_LINE>while (true) {<NEW_LINE>schemeField = iprot.readFieldBegin();<NEW_LINE>if (schemeField.type == org.apache... | skip(iprot, schemeField.type); |
342,764 | private static void outputIndex(CompilationDescription indexInfo, String[] args) throws IOException {<NEW_LINE>String outputFile = System.getenv("KYTHE_OUTPUT_FILE");<NEW_LINE>if (!Strings.isNullOrEmpty(outputFile)) {<NEW_LINE>if (outputFile.endsWith(IndexInfoUtils.KZIP_FILE_EXT)) {<NEW_LINE>IndexInfoUtils.writeKzipToF... | outputDir = System.getenv("KYTHE_OUTPUT_DIRECTORY"); |
80,845 | public SQLExternalRecordFormat parseRowFormat() {<NEW_LINE>lexer.nextToken();<NEW_LINE>acceptIdentifier("FORMAT");<NEW_LINE>if (lexer.identifierEquals(FnvHash.Constants.DELIMITED)) {<NEW_LINE>lexer.nextToken();<NEW_LINE>}<NEW_LINE>SQLExternalRecordFormat format = new SQLExternalRecordFormat();<NEW_LINE>if (lexer.identi... | setEscapedBy(this.expr()); |
1,685,269 | private static BgpAdvertisementGroup create(@JsonProperty(PROP_AS_PATH) @Nullable AsPath asPath, @JsonProperty(PROP_DESCRIPTION) @Nullable String description, @JsonProperty(PROP_EXTENDED_COMMUNITIES) @Nullable Set<ExtendedCommunity> extendedCommunities, @JsonProperty(PROP_LOCAL_PREFERENCE) @Nullable Long localPreferenc... | ), "%s must be between 0 and %s", PROP_MED, MAX_MED); |
1,091,667 | final DescribeOrderableDBInstanceOptionsResult executeDescribeOrderableDBInstanceOptions(DescribeOrderableDBInstanceOptionsRequest describeOrderableDBInstanceOptionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeOrderableDBInstanceOptionsRequest);<NEW_LINE>AWSRequestMetrics awsRe... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeOrderableDBInstanceOptions"); |
548,135 | protected void readSetXCursor(int width, int height, Point hotspot) {<NEW_LINE>byte pr, pg, pb;<NEW_LINE>byte sr, sg, sb;<NEW_LINE>int data_len = ((width + 7) / 8) * height;<NEW_LINE>int mask_len = ((width + 7) / 8) * height;<NEW_LINE>ByteBuffer data = ByteBuffer.allocate(data_len);<NEW_LINE>ByteBuffer mask = ByteBuffe... | position() + 2, pg); |
244,108 | private void validateParamValue(Param param, String currentParamValue, String inputValue) throws ParamValidationException {<NEW_LINE>try {<NEW_LINE>Coin currentParamValueAsCoin, inputValueAsCoin;<NEW_LINE>switch(param.getParamType()) {<NEW_LINE>case UNDEFINED:<NEW_LINE>break;<NEW_LINE>case BSQ:<NEW_LINE>currentParamVal... | daoStateService.getParamValueAsCoin(param, inputValue); |
1,573,001 | public static void main(String[] args) {<NEW_LINE>Exercise41_OddLengthDirectedCycle oddLengthDirectedCycle = new Exercise41_OddLengthDirectedCycle();<NEW_LINE>Digraph digraph1 = new Digraph(4);<NEW_LINE>digraph1.addEdge(0, 1);<NEW_LINE>digraph1.addEdge(1, 2);<NEW_LINE>digraph1.addEdge(2, 3);<NEW_LINE>digraph1.addEdge(3... | digraph3.addEdge(4, 6); |
972,707 | final CreateJobResult executeCreateJob(CreateJobRequest createJobRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createJobRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_L... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateJob"); |
954,208 | private static //<NEW_LINE>//<NEW_LINE>void //<NEW_LINE>evaluateForksExecutionPaths(//<NEW_LINE>List<List<Tree>> allExecutionPaths, //<NEW_LINE>List<List<Tree>> currentPaths, //<NEW_LINE>List<Tree> currentPath, //<NEW_LINE>boolean lastIsCurrentPath, List<BreakTree> activeBreaks, Tree[] forks) {<NEW_LINE>int i = 0;<NEW_... | fork, allExecutionPaths, currentPathsForFork, activeBreaks); |
1,463,223 | protected void drawBar(Graphics2D g2, int startX, int startY, int width, int height) {<NEW_LINE>Polygon topSide = null;<NEW_LINE>Polygon rightSide = null;<NEW_LINE>g2.setPaint(fillPaint);<NEW_LINE>g2.fillRect(startX, startY, width, height);<NEW_LINE>if (draw3D) {<NEW_LINE>topSide = new Polygon();<NEW_LINE>topSide.addPo... | startY - (width / 3)); |
1,448,927 | private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents<NEW_LINE>void initComponents() {<NEW_LINE>jLabelConfig = new javax.swing.JLabel();<NEW_LINE>jPanelConfig = new javax.swing.JPanel();<NEW_LINE>setPreferredSize(new java.awt.Dimension(500, 340));<NEW_LINE>setRequestFocusEnab... | )).addContainerGap())); |
104,369 | public void marshall(StudioComponent studioComponent, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (studioComponent == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(studioComponent.getArn(), ARN_BINDING);... | studioComponent.getType(), TYPE_BINDING); |
1,669,190 | public void deleteById(String id) {<NEW_LINE>String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroup... | format("The resource ID '%s' is not valid. Missing path segment 'batchAccounts'.", id))); |
932,535 | private Object copyingObjects(Object object, boolean copyCacheFields) {<NEW_LINE>if (object instanceof Number) {<NEW_LINE>return (Number) object;<NEW_LINE>} else if (object instanceof String) {<NEW_LINE>return (String) object;<NEW_LINE>} else if (object instanceof Boolean) {<NEW_LINE>return (Boolean) object;<NEW_LINE>}... | new OpObject((OpObject) object); |
1,465,280 | public static void dumpLayoutParams(ViewGroup layout, String str) {<NEW_LINE>StackTraceElement s = new Throwable(<MASK><NEW_LINE>String loc = ".(" + s.getFileName() + ":" + s.getLineNumber() + ") " + str + " ";<NEW_LINE>int n = layout.getChildCount();<NEW_LINE>System.out.println(str + " children " + n);<NEW_LINE>for (... | ).getStackTrace()[1]; |
718,374 | private CompletableFuture<CdmDocumentDefinition> fetchDocumentDefinition(final String relativePath) {<NEW_LINE>return CompletableFuture.supplyAsync(() -> {<NEW_LINE>// get the document object from the import<NEW_LINE>String docPath = this.getCtx().getCorpus().getStorage().createAbsoluteCorpusPath(relativePath, this);<N... | null, resOpt).join(); |
724,158 | public EnableEnhancedMonitoringResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>EnableEnhancedMonitoringResult enableEnhancedMonitoringResult = new EnableEnhancedMonitoringResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCu... | JsonToken token = context.getCurrentToken(); |
1,427,582 | public void refresh(TableCell cell) {<NEW_LINE>Object ds = cell.getDataSource();<NEW_LINE>// needs to be long so we can shift it for sortVal<NEW_LINE>long percentDone = getPercentDone(ds);<NEW_LINE>long sortValue = 0;<NEW_LINE>if (ds instanceof DownloadManager) {<NEW_LINE>DownloadManager dm = (DownloadManager) cell.get... | / 1000) << 31) + hashCode; |
453,153 | public FileTreeInternal tarTree(Object tarPath) {<NEW_LINE>Provider<File> fileProvider = asFileProvider(tarPath);<NEW_LINE>Provider<ReadableResourceInternal> resource = providers.provider(() -> {<NEW_LINE>if (tarPath instanceof ReadableResourceInternal) {<NEW_LINE>return (ReadableResourceInternal) tarPath;<NEW_LINE>} e... | 7, "tar_tree_no_backing_file").nagUser(); |
1,726,054 | public Batch execute(CommandContext commandContext) {<NEW_LINE>Collection<MASK><NEW_LINE>MigrationPlan migrationPlan = executionBuilder.getMigrationPlan();<NEW_LINE>ensureNotNull(BadUserRequestException.class, "Migration plan cannot be null", "migration plan", migrationPlan);<NEW_LINE>ensureNotEmpty(BadUserRequestExcep... | <String> collectedInstanceIds = collectProcessInstanceIds(); |
588,764 | // Generate Loan Amortization<NEW_LINE>private String generateAmortization(MFMAgreement loan) {<NEW_LINE>String transactionName = (String) getParameter(FinancialSetting.PARAMETER_TRX_NAME);<NEW_LINE>List<AmortizationValue> amortizationList = new ArrayList<AmortizationValue>();<NEW_LINE>MFMProduct financialProduct = MFM... | loan.getFM_Product_ID(), transactionName); |
1,825,477 | public boolean keyPressed(int key, int scancode, int p_keyPressed_3_) {<NEW_LINE>if (this.nameField.isFocused()) {<NEW_LINE>if (key == GLFW.GLFW_KEY_ENTER) {<NEW_LINE>String name = this.nameField.getValue();<NEW_LINE>if (!tile.targetList.contains(name)) {<NEW_LINE>CompoundTag tag = new CompoundTag();<NEW_LINE>tag.putSt... | 0)).getMaxOffset()); |
626,778 | private static boolean addVolumes(VolumeManager fs, InitialConfiguration initConfig, ServerDirs serverDirs) {<NEW_LINE>var hadoopConf = initConfig.getHadoopConf();<NEW_LINE>var siteConfig = initConfig.getSiteConf();<NEW_LINE>Set<String> volumeURIs = VolumeConfiguration.getVolumeUris(siteConfig);<NEW_LINE>Set<String> in... | Constants.VERSION + " cannot initialize data version " + persistentVersion); |
1,822,211 | private void initComments() {<NEW_LINE>displayCommentArrays[MY_EOLS] = codeUnit.getCommentAsArray(CodeUnit.EOL_COMMENT);<NEW_LINE>totalCommentsFound += displayCommentArrays[MY_EOLS].length;<NEW_LINE>displayCommentArrays[MY_REPEATABLES] = codeUnit.getCommentAsArray(CodeUnit.REPEATABLE_COMMENT);<NEW_LINE>totalCommentsFou... | getListing(), refs, true); |
1,016,335 | private CanonicalSubscription canonicalizeR4(IBaseResource theSubscription) {<NEW_LINE>org.hl7.fhir.r4.model.Subscription subscription = (org.hl7.fhir.r4.model.Subscription) theSubscription;<NEW_LINE>CanonicalSubscription retVal = new CanonicalSubscription();<NEW_LINE>retVal.setStatus(subscription.getStatus());<NEW_LIN... | get(0).getValueAsPrimitive(); |
1,510,748 | public void refresh(TableCell cell, long timestamp) {<NEW_LINE>DownloadManager dm = (DownloadManager) cell.getDataSource();<NEW_LINE>long value = 0;<NEW_LINE>if (dm == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (dm.isDownloadComplete(false)) {<NEW_LINE>long completedTime = dm.getDownloadState().getLongParameter(Do... | super.refresh(cell, value); |
143,399 | public static void createKerberosUserEntries() throws Exception {<NEW_LINE>Log.info(c, "startAllServers", "Creating KDC user entries");<NEW_LINE>session = kdcServer.getDirectoryService().getAdminSession();<NEW_LINE>Entry entry = new DefaultEntry(session.getDirectoryService().getSchemaManager());<NEW_LINE>entry.setDn(kr... | entry.add("sn", "Service"); |
570,411 | default <T2, R1, R2, R3, R> LazyEither3<LT1, LT2, R> forEach4(Function<? super RT, ? extends LazyEither3<LT1, LT2, R1>> value1, BiFunction<? super RT, ? super R1, ? extends LazyEither3<LT1, LT2, R2>> value2, Function3<? super RT, ? super R1, ? super R2, ? extends LazyEither3<LT1, LT2, R3>> value3, Function4<? super RT,... | a = value1.apply(in); |
1,134,223 | private void checkUpdatingShardingKey(SqlInsert sqlInsert, TableMeta baseTableMeta, List<TableMeta> indexMetas, ExecutionContext ec) {<NEW_LINE>List<TableMeta> allTables = new ArrayList<>(indexMetas.size() + 1);<NEW_LINE>allTables.add(baseTableMeta);<NEW_LINE>allTables.addAll(indexMetas);<NEW_LINE>// column names are a... | .getLastName().toUpperCase(); |
1,165,961 | private void configureClearText(SocketChannel ch) {<NEW_LINE>final ChannelPipeline p = ch.pipeline();<NEW_LINE>final HttpServerCodec sourceCodec = new HttpServerCodec();<NEW_LINE>final HttpServerUpgradeHandler upgradeHandler = new HttpServerUpgradeHandler(sourceCodec, upgradeCodecFactory);<NEW_LINE>final CleartextHttp2... | (ReferenceCountUtil.retain(msg)); |
945,507 | public /* public int totalFruit(int[] tree) {<NEW_LINE>// We'll make a list of indexes for which a block starts.<NEW_LINE>List<Integer> blockLefts = new ArrayList();<NEW_LINE><NEW_LINE>// Add the left boundary of each block<NEW_LINE>for (int i = 0; i < tree.length; ++i)<NEW_LINE>if (i == 0 || tree[i-1] != tree[i])<N... | int ans = 0, i = 0; |
1,043,604 | /*<NEW_LINE>* Only handles instances of SonosSoapFault, all other exceptions fall through to the default Fault Interceptor<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void handleMessage(SoapMessage message) throws Fault {<NEW_LINE>Fault fault = (Fault) message.getContent(Exception.class);<NEW_LINE>LOG.warn("Error wi... | sonosError = document.createElement("SonosError"); |
181,310 | private synchronized void makeHierarchyMap(AgentObject[] objectList) {<NEW_LINE>elementList.clear();<NEW_LINE>rootMap.clear();<NEW_LINE>Set<Integer> sIds = ServerManager.getInstance().getOpenServerList();<NEW_LINE>for (int serverId : sIds) {<NEW_LINE>Server server = ServerManager.getInstance().getServer(serverId);<NEW_... | server.getName(), serverObj); |
620,579 | public List<MethodCall<Object>> createMethodCallListToBeParsedFromBody(final String addressPrefix, final Object body, final Request<Object> originatingRequest) {<NEW_LINE>List<MethodCall<Object>> methodCalls;<NEW_LINE>if (body != null) {<NEW_LINE>methodCalls = parserRef.get().parseMethodCalls(<MASK><NEW_LINE>} else {<N... | addressPrefix, body.toString()); |
1,501,674 | public SModelComparePluginConfiguration convertToSObject(ModelComparePluginConfiguration input) {<NEW_LINE>if (input == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>SModelComparePluginConfiguration result = new SModelComparePluginConfiguration();<NEW_LINE>result.setOid(input.getOid());<NEW_LINE>result.setUuid(inpu... | setDescription(input.getDescription()); |
455,921 | final RebootBrokerResult executeRebootBroker(RebootBrokerRequest rebootBrokerRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(rebootBrokerRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
472,395 | public void report(String target, Controller controller, Action action) {<NEW_LINE>StringBuilder sb = new StringBuilder(title).append(sdf.get().format(new Date())).append(" --------------------------\n");<NEW_LINE>sb.append("Url : ").append(controller.getRequest().getMethod()).append(" ").append(target).append(... | ()).append(".java:1)"); |
112,312 | public final void actionPerformed(@Nonnull AnActionEvent e) {<NEW_LINE>DataContext dataContext = e.getDataContext();<NEW_LINE>IdeView view = dataContext.getData(LangDataKeys.IDE_VIEW);<NEW_LINE>if (view == null)<NEW_LINE>return;<NEW_LINE>PsiDirectory dir = getTargetDirectory(dataContext, view);<NEW_LINE>if (dir == null... | selectedTemplate = getTemplate(project, dir); |
850,503 | static public View createToggle(LayoutInflater layoutInflater, OsmandApplication ctx, @LayoutRes int layoutId, LinearLayout layout, ApplicationMode mode, boolean useMapTheme) {<NEW_LINE>int metricsX = (int) ctx.getResources().getDimension(R.dimen.route_info_modes_height);<NEW_LINE>int metricsY = (int) ctx.getResources(... | LinearLayout.LayoutParams(metricsX, metricsY); |
1,399,413 | private void createLogger(final String flowId) {<NEW_LINE>// Create logger<NEW_LINE>// If this is a containerized execution then there is no need for a custom logger.<NEW_LINE>// The logs would be appended to server logs and persisted from FlowContainer.<NEW_LINE>if (isContainerizedDispatchMethodEnabled()) {<NEW_LINE>t... | = this.execId + "." + flowId; |
357,675 | public ByteBuffer read(long offset, long length) throws IOException {<NEW_LINE>Preconditions.checkState(!mClosed);<NEW_LINE>updateUnderFileSystemInputStream(offset);<NEW_LINE>updateBlockWriter(offset);<NEW_LINE>long bytesToRead = Math.min(length, mBlockMeta.getBlockSize() - offset);<NEW_LINE>if (bytesToRead <= 0) {<NEW... | int) (bytesToRead - bytesRead)); |
386,938 | private Optional<String> migrateStream(Stream stream) {<NEW_LINE>final List<AlarmCallbackConfiguration> alarmCallbacks = alarmCallbackService.getForStream(stream);<NEW_LINE>final List<Optional<String>> updatedConfigurations = alarmCallbacks.stream().filter(callbackConfiguration -> callbackConfiguration.getType().equals... | error("Failed moving alert receivers in " + errors + " email alarm callbacks."); |
1,443,970 | private static Num calculateVaR(Returns returns, double confidence) {<NEW_LINE>Num <MASK><NEW_LINE>// select non-NaN returns<NEW_LINE>List<Num> returnRates = returns.getValues().subList(1, returns.getSize() + 1);<NEW_LINE>Num var = zero;<NEW_LINE>if (!returnRates.isEmpty()) {<NEW_LINE>// F(x_var) >= alpha (=1-confidenc... | zero = returns.numOf(0); |
1,849,841 | public void processOpts() {<NEW_LINE>super.processOpts();<NEW_LINE>supportingFiles.add(new SupportingFile("ApiException.mustache", toSrcPath(invokerPackage, srcBasePath), "ApiException.php"));<NEW_LINE>supportingFiles.add(new SupportingFile("Configuration.mustache", toSrcPath(invokerPackage, srcBasePath), "Configuratio... | invokerPackage, srcBasePath), "ObjectSerializer.php")); |
594,448 | public Mono<StartCallRecordingResult> startRecording(String recordingStateCallbackUri) {<NEW_LINE>try {<NEW_LINE>Objects.requireNonNull(recordingStateCallbackUri, "'recordingStateCallbackUri' cannot be null.");<NEW_LINE>if (!Boolean.TRUE.equals(new URI(recordingStateCallbackUri).isAbsolute())) {<NEW_LINE>throw logger.<... | logExceptionAsError(new InvalidParameterException("'recordingStateCallbackUri' has to be an absolute Uri")); |
1,589,023 | byte[] encodeNative(VirtualFrame frame, Object filter, @Cached LZMAFilterConverter filterConverter, @Cached GetOutputNativeBufferNode getBuffer, @Cached NativeLibrary.InvokeNativeFunction createStream, @Cached NativeLibrary.InvokeNativeFunction encodeFilter, @Cached NativeLibrary.InvokeNativeFunction deallocateStream, ... | lzmaSupport.deallocateStream(lzmast, deallocateStream); |
1,082,570 | private Mono<Response<Flux<ByteBuffer>>> disableMonitoringWithResponseAsync(String resourceGroupName, String clusterName, 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."));<... | error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); |
1,064,216 | // Check whether the upgrade is needed<NEW_LINE>private boolean isQualified(EbeanServer server, UpgradeContext context) {<NEW_LINE>boolean v1TableExists = AspectStorageValidationUtil.checkV1TableExists(server);<NEW_LINE>if (v1TableExists) {<NEW_LINE>context.report().addLine("-- V1 table exists");<NEW_LINE>long v1TableR... | v2TableRowCount = AspectStorageValidationUtil.getV2NonSystemRowCount(server); |
1,405,933 | public String report() {<NEW_LINE>if (true)<NEW_LINE>return "-";<NEW_LINE><MASK><NEW_LINE>if (// don't report<NEW_LINE>getRecord_ID() == 0)<NEW_LINE>return "ID=0";<NEW_LINE>if (// new<NEW_LINE>getRecord_ID() == 1) {<NEW_LINE>parameter.append("ISSUE=");<NEW_LINE>HashMap htOut = get_HashMap();<NEW_LINE>try // deserializi... | StringBuffer parameter = new StringBuffer("?"); |
585,298 | public void handleRegularMessage(final Message msg) {<NEW_LINE>final NewMap map = mapRef.get();<NEW_LINE>if (map == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (msg.what == UPDATE_PROGRESS) {<NEW_LINE>if (detailProgress < detailTotal) {<NEW_LINE>detailProgress++;<NEW_LINE>}<NEW_LINE>if (map.waitDialog != null) {<NE... | (R.string.caches_eta_ltm)); |
1,350,553 | public NDList processInput(TranslatorContext ctx, QAInput input) {<NEW_LINE>BertToken token = tokenizer.encode(input.getQuestion().toLowerCase(), input.getParagraph().toLowerCase(), seqLength);<NEW_LINE>tokens = token.getTokens();<NEW_LINE>List<Long> indices = token.getTokens().stream().map(vocabulary::getIndex).collec... | NDManager manager = ctx.getNDManager(); |
1,405,356 | public Description matchVariable(VariableTree varTree, VisitorState state) {<NEW_LINE><MASK><NEW_LINE>Matcher<VariableTree> nameSameAsType = Matchers.variableType((typeTree, s) -> {<NEW_LINE>Symbol typeSymbol = ASTHelpers.getSymbol(typeTree);<NEW_LINE>if (typeSymbol != null) {<NEW_LINE>return typeSymbol.getSimpleName()... | Name varName = varTree.getName(); |
255,863 | public static boolean migrateMediaOptimizeSettings(SQLiteDatabase db) {<NEW_LINE>Cursor cursor = null;<NEW_LINE>try {<NEW_LINE>String sqlCommand = "SELECT * FROM " + SiteSettingsModel.SETTINGS_TABLE_NAME + ";";<NEW_LINE>cursor = db.rawQuery(sqlCommand, null);<NEW_LINE>if (cursor == null || cursor.getCount() == 0 || !cu... | getColumnIndexOrThrow("optimizedVideo")) == 1); |
347,373 | private void printHeader(Object version) {<NEW_LINE>String codeSource = this.getCodeSource();<NEW_LINE>String serviceName = this.service.getName();<NEW_LINE>Side side = this.getSide();<NEW_LINE>MixinEnvironment.logger.info("SpongePowered MIXIN Subsystem Version={} Source={} Service={} Env={}", version, codeSource, serv... | printer.print(System.err); |
877,569 | private void followCodeBack(TaskMonitor monitor, AddressSet flowAddressSet, CodeUnit codeUnit, Address dataAddress) {<NEW_LINE>if (codeUnit == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// additional code to be processed.<NEW_LINE>Stack<CodeUnit> codeUnitStack = new Stack<CodeUnit>();<NEW_LINE>if (codeUnit instanceof... | , (Data) codeUnit, dataAddress); |
1,833,814 | void repaint() {<NEW_LINE>int w = (int) Math.ceil(getWidth());<NEW_LINE>int h = (int) Math.ceil(getHeight());<NEW_LINE>if (w <= 0 || h <= 0)<NEW_LINE>return;<NEW_LINE>if (img == null || img.getWidth() != w || img.getHeight() != h) {<NEW_LINE>img = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);<NEW_LINE>}<NEW_LIN... | getThumbnail(), null, renderer); |
1,110,122 | public void updateStats(IMetaMember member, Map<String, String> attrs) {<NEW_LINE>String fullSignature = member.toString();<NEW_LINE>for (String modifier : MODIFIERS) {<NEW_LINE>if (fullSignature.contains(modifier + S_SPACE)) {<NEW_LINE>String incMethodName = "incCount" + modifier.substring(0, 1).toUpperCase() + modifi... | JITStats.class, incMethodName, mt); |
1,127,734 | private static Enumeration<NetworkInterface> NetworkInterface_getNetworkInterfaces() throws SocketException {<NEW_LINE>SocketException se;<NEW_LINE>try {<NEW_LINE>return NetworkInterface.getNetworkInterfaces();<NEW_LINE>} catch (SocketException e) {<NEW_LINE>se = e;<NEW_LINE>}<NEW_LINE>// Java 7 has getByIndex<NEW_LINE... | list = new ArrayList<>(); |
610,083 | public T linkFrom(BatchOperator<?>... inputs) {<NEW_LINE>BatchOperator<<MASK><NEW_LINE>rewriteTreeType(getParams());<NEW_LINE>rewriteLabelType(in.getSchema(), getParams());<NEW_LINE>getParams().set(ModelParamName.FEATURE_TYPES, FlinkTypeConverter.getTypeString(TableUtil.findColTypesWithAssertAndHint(in.getSchema(), get... | ?> in = checkAndGetFirst(inputs); |
560,773 | public boolean isCached(RequestAuthenticator authenticator) {<NEW_LINE>logger.debug("Checking if {} is cached", authenticator);<NEW_LINE>SecurityContext context = SecurityContextHolder.getContext();<NEW_LINE>KeycloakAuthenticationToken token;<NEW_LINE>KeycloakSecurityContext keycloakSecurityContext;<NEW_LINE>if (contex... | "Expected a KeycloakAuthenticationToken, but found {}", context.getAuthentication()); |
604,923 | public DHTStorageBlock keyBlockRequest(DHTTransportContact originating_contact, byte[] request, byte[] signature) {<NEW_LINE>// request is 4 bytes flags, 4 byte time, K byte key<NEW_LINE>// flag: MSB 00 -> unblock, 01 ->block<NEW_LINE>if (request.length <= 8) {<NEW_LINE>return (null);<NEW_LINE>}<NEW_LINE>keyBlock kb = ... | ByteArrayHashMap new_map = key_block_map_cow.duplicate(); |
359,951 | protected <T> Runnable doExport(T proxiedImpl, Class<T> type, URL url) throws RpcException {<NEW_LINE>String key = url.getAddress();<NEW_LINE>ProtocolServer protocolServer = serverMap.computeIfAbsent(key, k -> {<NEW_LINE>DubboHandlerRegistry registry = new DubboHandlerRegistry();<NEW_LINE>NettyServerBuilder builder = N... | IllegalStateException("Failed to set dubbo proxied service impl to stub, please make sure your stub " + "was generated by the dubbo-protoc-compiler.", e); |
762,226 | public static void main(String[] args) throws Exception {<NEW_LINE>if (args.length != 2) {<NEW_LINE>System.err.println("Usage : Util <src> <target>");<NEW_LINE>System.err.println("");<NEW_LINE>System.err.println("NOTE: <src>/<target> can be either a file path or a dlog stream");<NEW_LINE>Runtime.getRuntime().exit(-1);<... | String> parentAndName = getParentURI(destUri); |
429,696 | final CreateExplainabilityResult executeCreateExplainability(CreateExplainabilityRequest createExplainabilityRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createExplainabilityRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<Creat... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
910,286 | protected void updateLocale(boolean revalidate) {<NEW_LINE>Locale locale = monthView.getLocale();<NEW_LINE>if (getRenderingHandler() != null) {<NEW_LINE>getRenderingHandler().setLocale(locale);<NEW_LINE>}<NEW_LINE>// fixed JW: respect property in UIManager if available<NEW_LINE>// PENDING JW: what to do if weekdays had... | = new String[JXMonthView.DAYS_IN_WEEK]; |
1,720,893 | public void execute(AdminCommandContext context) {<NEW_LINE>ActionReport report = context.getActionReport();<NEW_LINE>MonitorContract mContract = null;<NEW_LINE>for (MonitorContract m : habitat.<MonitorContract>getAllServices(MonitorContract.class)) {<NEW_LINE>if ((m.getName()).equals(type)) {<NEW_LINE>mContract = m;<N... | mContract.process(report, filter); |
1,306,688 | public void onActionClick(int position, Object data) {<NEW_LINE>PopMenuAction action = (PopMenuAction) data;<NEW_LINE>if (TextUtils.equals(action.getActionName(), getResources().getString(R.string.start_conversation))) {<NEW_LINE>TUIUtils.startActivity("StartC2CChatActivity", null);<NEW_LINE>}<NEW_LINE>if (TextUtils.eq... | TYPE, TUIConversationConstants.GroupType.CHAT_ROOM); |
1,387,356 | public GetRateBasedStatementManagedKeysResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>GetRateBasedStatementManagedKeysResult getRateBasedStatementManagedKeysResult = new GetRateBasedStatementManagedKeysResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String curr... | JsonToken token = context.getCurrentToken(); |
1,435,146 | public void testGroupParameters(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// verify the required parameter 'requiredStringGroup' is set<NEW_LINE>i... | final String[] localVarContentTypes = {}; |
610,619 | private void updateNic(VmUpdateNicOnHypervisorMsg msg, NoErrorCompletion completion) {<NEW_LINE>checkStateAndStatus();<NEW_LINE><MASK><NEW_LINE>List<VmNicVO> nics = Q.New(VmNicVO.class).eq(VmNicVO_.vmInstanceUuid, msg.getVmInstanceUuid()).list();<NEW_LINE>UpdateNicCmd cmd = new UpdateNicCmd();<NEW_LINE>cmd.setVmInstanc... | final VmUpdateNicOnHypervisorReply reply = new VmUpdateNicOnHypervisorReply(); |
1,519,443 | private void initControls(IProgressReport pReport) {<NEW_LINE>if (null != pReport.getImage()) {<NEW_LINE>imageLabel.setImage(pReport.getImage());<NEW_LINE>} else {<NEW_LINE>imageLabel.setImage(getDisplay().getSystemImage(SWT.ICON_INFORMATION));<NEW_LINE>}<NEW_LINE>nameLabel.setText(formatForDisplay(pReport.getName()));... | .getString("Progress.reporting.status.finished"), false); |
1,753,242 | public void toModel(Model model) {<NEW_LINE>for (String s1 : altLocations.keySet()) {<NEW_LINE>Resource r = model.createResource();<NEW_LINE><MASK><NEW_LINE>model.add(r, LocationMappingVocab.mapping, e);<NEW_LINE>String k = s1;<NEW_LINE>String v = altLocations.get(k);<NEW_LINE>model.add(e, LocationMappingVocab.name, k)... | Resource e = model.createResource(); |
1,595,416 | private static Collection<Target> targets(Graph shapesGraph, Node shape) {<NEW_LINE>// sh:targetClass : rdfs:Class<NEW_LINE>// sh:targetNode : any IRI or literal<NEW_LINE>// sh:targetObjectsOf : rdf:Property<NEW_LINE>// sh:targetSubjectsOf : rdf:Property<NEW_LINE>// sh:target : uses object for further description.<NEW_... | x = new ArrayList<>(); |
430,775 | public Void call() throws Exception {<NEW_LINE>mResult.setRecordStartMs(CommonUtils.getCurrentMs());<NEW_LINE>AtomicLong localCounter = new AtomicLong();<NEW_LINE>while (!sFinish.get() && mRetryPolicy.attempt()) {<NEW_LINE>if (Thread.currentThread().isInterrupted()) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>long increment ... | mRetryPolicy.getAttemptCount(), e); |
1,213,947 | private boolean isCardFormatValid(Card card, Card commander, FilterMana color) {<NEW_LINE>if (!cardHasValideColor(color, card)) {<NEW_LINE>addError(DeckValidatorErrorType.OTHER, card.getName(), "Invalid color (" + commander.getName() + ')', true);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// 906.5b<NEW_LINE>// Each ca... | "Invalid cost (" + cost + ')', true); |
417,466 | public UpdateUploadResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>UpdateUploadResult updateUploadResult = new UpdateUploadResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth =... | JsonToken token = context.getCurrentToken(); |
224,840 | public InteractionResultHolder<ItemStack> use(Level worldIn, Player playerIn, InteractionHand handIn) {<NEW_LINE>ItemStack itemstack = playerIn.getItemInHand(handIn);<NEW_LINE>if (playerIn.fishing != null) {<NEW_LINE>if (!worldIn.isClientSide) {<NEW_LINE>int i = playerIn.fishing.retrieve(itemstack);<NEW_LINE>itemstack.... | .ITEM_USED.get(this)); |
1,595,775 | public int LAPACKE_chbgvx_work(int arg0, byte arg1, byte arg2, byte arg3, int arg4, int arg5, int arg6, float[] arg7, int arg8, float[] arg9, int arg10, float[] arg11, int arg12, float arg13, float arg14, int arg15, int arg16, float arg17, int[] arg18, float[] arg19, float[] arg20, int arg21, float[] arg22, float[] arg... | arg22, arg23, arg24, arg25); |
3,669 | static void insertAllSuperInterfaces(CtType<?> targetType, Template<?> template, CtClass<? extends Template<?>> sourceClass) {<NEW_LINE>// insert all the interfaces<NEW_LINE>for (CtTypeReference<?> t : sourceClass.getSuperInterfaces()) {<NEW_LINE>if (!t.equals(targetType.getFactory().Type().createReference(Template.cla... | (Class<?>) o); |
78,978 | private static void validateArchive(JReleaserContext context, JReleaserContext.Mode mode, Archive archive, Errors errors) {<NEW_LINE>context.getLogger().debug("archive.{}", archive.getName());<NEW_LINE>if (!archive.isActiveSet()) {<NEW_LINE>archive.setActive(Active.NEVER);<NEW_LINE>}<NEW_LINE>if (!archive.resolveEnable... | .$("validation_must_not_be_blank", "archive.name")); |
327,479 | protected double computeMinWidth(double height) {<NEW_LINE>double left = snappedLeftInset();<NEW_LINE>double right = snappedRightInset();<NEW_LINE>double leftArrowWidth = snapSize(Utils.boundedSize(leftArrowButton.prefWidth(-1), leftArrowButton.minWidth(-1), leftArrowButton.maxWidth(-1)));<NEW_LINE>double rightArrowWid... | pageInformation.prefWidth(-1)); |
749,415 | public void onError(java.lang.Exception e) {<NEW_LINE>byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;<NEW_LINE>org.apache.thrift.TSerializable msg;<NEW_LINE>ping_result result = new ping_result();<NEW_LINE>if (e instanceof ThriftSecurityException) {<NEW_LINE>result.sec = (ThriftSecurityException) e;<NEW_L... | .apache.thrift.TApplicationException) e; |
951,954 | public com.google.gwt.dev.shell.remoteui.RemoteMessageProto.Message.Response.ViewerResponse.CapabilityExchange buildPartial() {<NEW_LINE>com.google.gwt.dev.shell.remoteui.RemoteMessageProto.Message.Response.ViewerResponse.CapabilityExchange result = new com.google.gwt.dev.shell.remoteui.RemoteMessageProto.Message.Respo... | util.Collections.unmodifiableList(capabilities_); |
853,616 | static StructOrError<PathMatcher> parsePathMatcher(io.envoyproxy.envoy.config.route.v3.RouteMatch proto) {<NEW_LINE>boolean caseSensitive = proto.getCaseSensitive().getValue();<NEW_LINE>switch(proto.getPathSpecifierCase()) {<NEW_LINE>case PREFIX:<NEW_LINE>return StructOrError.fromStruct(PathMatcher.fromPrefix(proto.get... | (PathMatcher.fromRegEx(safeRegEx)); |
385,986 | protected boolean store() {<NEW_LINE>prefs.putBoolean(WinSysPrefs.EDITOR_CLOSE_ACTIVATES_RECENT, isCloseActivatesMostRecentDocument.isSelected());<NEW_LINE>prefs.putBoolean(WinSysPrefs.OPEN_DOCUMENTS_NEXT_TO_ACTIVE_TAB, isNewDocumentOpensNextToActiveTab.isSelected());<NEW_LINE>prefs.put(WinSysPrefs.EDITOR_SORT_TABS, <M... | getSelectedSortType().name()); |
1,470,072 | public void run(RegressionEnvironment env) {<NEW_LINE>EPStatement[] statements = new EPStatement[5];<NEW_LINE>sendTimer(env, 1000);<NEW_LINE>statements[0] = env.compileDeploy("@name('stmtmetric') select * from " + StatementMetric.class.getName()).statement("stmtmetric");<NEW_LINE>statements[0].addListener(env.listenerN... | ("runtimemetric").getAndClearIsInvoked()); |
417,613 | CompletableFuture<Block> importOrSavePendingBlock(final Block block, final Bytes nodeId) {<NEW_LINE>// Synchronize to avoid race condition where block import event fires after the<NEW_LINE>// blockchain.contains() check and before the block is registered, causing onBlockAdded() to be<NEW_LINE>// invoked for the parent ... | getHeader().getNumber()); |
181,207 | public Sql createIndexSql(Entity<?> en, EntityIndex index) {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>if (index.isUnique())<NEW_LINE>sb.append("Create UNIQUE Index ");<NEW_LINE>else<NEW_LINE>sb.append("Create Index ");<NEW_LINE>sb.append(index.getName(en));<NEW_LINE>sb.append(" ON ").append(en.getTable... | create(sb.toString()); |
890,581 | public InputStream writeObject(final VelocityResourceKey key) throws DotStateException, DotDataException, DotSecurityException {<NEW_LINE>long language = new Long(key.language);<NEW_LINE>Optional<ContentletVersionInfo> info = APILocator.getVersionableAPI().getContentletVersionInfo(key.id1, language);<NEW_LINE>if ((!inf... | APILocator.systemUser(), false); |
466,353 | public static ListSystemRulesResponse unmarshall(ListSystemRulesResponse listSystemRulesResponse, UnmarshallerContext _ctx) {<NEW_LINE>listSystemRulesResponse.setRequestId(_ctx.stringValue("ListSystemRulesResponse.RequestId"));<NEW_LINE>listSystemRulesResponse.setCode(_ctx.stringValue("ListSystemRulesResponse.Code"));<... | (_ctx.integerValue("ListSystemRulesResponse.Data.PageIndex")); |
1,853,657 | private Element processReadException(@Nullable Exception e) {<NEW_LINE>boolean contentTruncated = e == null;<NEW_LINE>myBlockSavingTheContent = !contentTruncated && (StorageUtil.isProjectOrModuleFile(myFileSpec) || myFileSpec.equals(StoragePathMacros.WORKSPACE_FILE));<NEW_LINE>if (!ApplicationManager.getApplication().i... | .WARNING).notify(null); |
1,377,100 | private okhttp3.Call replaceNamespacedLeaseValidateBeforeCall(String name, String namespace, V1Lease body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException {<NEW_LINE>// verify the required parameter 'name' is set<NEW_LINE>if (name == null) {<NE... | dryRun, fieldManager, fieldValidation, _callback); |
928,723 | protected void undeployLeftoverJobs() {<NEW_LINE>try {<NEW_LINE>// See if there are jobs running on any helios agent. If we are using TemporaryJobs,<NEW_LINE>// that class should've undeployed them at this point.<NEW_LINE>// Any jobs still running at this point have only been partially cleaned up.<NEW_LINE>// We look f... | jobId, undeployResponse.getStatus()); |
1,579,688 | protected void handleRequest(final HttpServletRequest request, final HttpServletResponse response, final HttpSession hSession) throws ServletException, IOException {<NEW_LINE>final PrintWriter out = response.getWriter();<NEW_LINE>final long start = System.nanoTime();<NEW_LINE>// Pick a random timeout point between [TIM... | returnData(user, out, data); |
302,258 | public void defineClassificationStructure(String line) {<NEW_LINE>List<ParsedProbability> list = ParseProbability.parseProbabilityList(this, line);<NEW_LINE>if (list.size() > 1) {<NEW_LINE>throw new BayesianError("Must only define a single probability, not a chain.");<NEW_LINE>}<NEW_LINE>if (list.size() == 0) {<NEW_LIN... | (parsedGiven.getValue())); |
393,637 | /*<NEW_LINE>* (non-Javadoc)<NEW_LINE>*<NEW_LINE>* @see com.impetus.kundera.client.Client#find(java.lang.Class,<NEW_LINE>* java.lang.Object)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public Object find(Class entityClass, Object key) {<NEW_LINE>EntityMetadata metadata = KunderaMetadataManager.getEntityMetadata(kunderaMetad... | entityType, result, metadata, true); |
1,794,622 | public Description matchMethodInvocation(MethodInvocationTree tree, VisitorState state) {<NEW_LINE>if (!shouldHoistConstantExpressions()) {<NEW_LINE>return NO_MATCH;<NEW_LINE>}<NEW_LINE>if (!INIT_LOGGER.matches(tree, state)) {<NEW_LINE>return NO_MATCH;<NEW_LINE>}<NEW_LINE>Type loggerType = LOGGER_TYPE.get(state);<NEW_L... | Type returnType = methodSym.getReturnType(); |
1,401,816 | public void paint(@Nonnull Graphics2D g2, int x, int y, int height) {<NEW_LINE>if (myLabels.isEmpty())<NEW_LINE>return;<NEW_LINE>GraphicsConfig config = GraphicsUtil.setupAAPainting(g2);<NEW_LINE>g2.setFont(getReferenceFont());<NEW_LINE>g2.setStroke(new BasicStroke(1.5f));<NEW_LINE>FontMetrics fontMetrics = g2.getFontM... | getHeight() + TOP_TEXT_PADDING + BOTTOM_TEXT_PADDING); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.