idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
772,470 | public void start() {<NEW_LINE>if (current != null) {<NEW_LINE>current.show();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Form hi = new Form();<NEW_LINE>hi.setToolbar(new Toolbar());<NEW_LINE>hi.setTitle("Test Fonts");<NEW_LINE>List<FontWrapper> fonts = new ArrayList<>();<NEW_LINE>int fontSize = Display.getInstance().convert... | fontSize, Font.STYLE_PLAIN))); |
1,323,408 | public Request<AddSourceIdentifierToSubscriptionRequest> marshall(AddSourceIdentifierToSubscriptionRequest addSourceIdentifierToSubscriptionRequest) {<NEW_LINE>if (addSourceIdentifierToSubscriptionRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>R... | <AddSourceIdentifierToSubscriptionRequest>(addSourceIdentifierToSubscriptionRequest, "AmazonRDS"); |
1,675,962 | /*<NEW_LINE>* Remembers all type bindings defined in the given parsed unit, adding local/anonymous types if specified.<NEW_LINE>*/<NEW_LINE>private void rememberAllTypes(CompilationUnitDeclaration parsedUnit, org.eclipse.jdt.core.ICompilationUnit cu, boolean includeLocalTypes) {<NEW_LINE>TypeDeclaration[] types = parse... | expression, cu, existingElements, knownScopes); |
830,938 | final ListDomainsForPackageResult executeListDomainsForPackage(ListDomainsForPackageRequest listDomainsForPackageRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listDomainsForPackageRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
212,853 | private PageIds doIndexQueryOnce(IndexLabel indexLabel, ConditionQuery query) {<NEW_LINE>// Query all or one page<NEW_LINE>Iterator<BackendEntry> entries = null;<NEW_LINE>LockUtil.Locks locks = new LockUtil.<MASK><NEW_LINE>try {<NEW_LINE>locks.lockReads(LockUtil.INDEX_LABEL_DELETE, indexLabel.id());<NEW_LINE>locks.lock... | Locks(this.graphName()); |
236,383 | public void initModelBySetings(@Nonnull FindModel model) {<NEW_LINE>model.setCaseSensitive(isCaseSensitive());<NEW_LINE><MASK><NEW_LINE>model.setFromCursor(isFromCursor());<NEW_LINE>model.setGlobal(isGlobal());<NEW_LINE>model.setRegularExpressions(isRegularExpressions());<NEW_LINE>model.setWholeWordsOnly(isWholeWordsOn... | model.setForward(isForward()); |
781,738 | private static void generic(TradeService tradeService) throws IOException, InterruptedException {<NEW_LINE><MASK><NEW_LINE>final OpenOrdersParams openOrders = new DefaultOpenOrdersParamCurrencyPair(CURRENCY_PAIR);<NEW_LINE>try {<NEW_LINE>log.debug("{}", tradeService.getOpenOrders(openOrders));<NEW_LINE>} catch (Exchang... | log.debug("{}", "----------GENERIC----------"); |
1,316,582 | private static void downloadEN_US(File localeFile) {<NEW_LINE>try {<NEW_LINE>// Let the user know we are downloading the JAR<NEW_LINE>GeyserImpl.getInstance().getLogger().info(GeyserLocale.getLocaleStringLog("geyser.locale.download.en_us"));<NEW_LINE>GeyserImpl.getInstance().getLogger().debug("Download URL: " + clientJ... | ), tmpFilePath.toString()); |
39,019 | public void shutDown() {<NEW_LINE>// NON-NLS<NEW_LINE>logger.log(Level.INFO, "Keyword search ingest module instance {0} shutting down", instanceNum);<NEW_LINE>if ((initialized == false) || (context == null)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (context.fileIngestIsCancelled()) {<NEW_LINE>// NON-NLS<NEW_LINE>logge... | .getServer().queryNumIndexedChunks(); |
355,301 | public final ExplistContext explist() throws RecognitionException {<NEW_LINE>ExplistContext _localctx = new ExplistContext(_ctx, getState());<NEW_LINE>enterRule(_localctx, 44, RULE_explist);<NEW_LINE>int _la;<NEW_LINE>try {<NEW_LINE>enterOuterAlt(_localctx, 1);<NEW_LINE>{<NEW_LINE>setState(254);<NEW_LINE>exp(0);<NEW_LI... | _errHandler.recover(this, re); |
1,047,038 | public String handleAnswer(DownloadAnswer answer) {<NEW_LINE>if (s_logger.isTraceEnabled()) {<NEW_LINE>s_logger.trace("handleAnswer, answer status=" + answer.getDownloadStatus(<MASK><NEW_LINE>}<NEW_LINE>switch(answer.getDownloadStatus()) {<NEW_LINE>case DOWNLOAD_IN_PROGRESS:<NEW_LINE>getDownloadListener().scheduleStatu... | ) + ", curr state=" + getName()); |
1,134,059 | public JSONObject articleAPI(String url, JSONObject genericScraperData) throws MalformedURLException {<NEW_LINE>URL qurl = new URL(url);<NEW_LINE>String data = "";<NEW_LINE>try {<NEW_LINE>// ArticleExtractor.INSTANCE.getText(qurl);<NEW_LINE>data = null;<NEW_LINE>genericScraperData.put("query", qurl);<NEW_LINE>genericSc... | genericScraperData.put("NLP", "false"); |
1,299,188 | public Object apply(final ActionContext ctx, final Object caller, final Object[] sources) throws FrameworkException {<NEW_LINE>try {<NEW_LINE>assertArrayHasLengthAndAllElementsNotNull(sources, 1);<NEW_LINE>final String script = sources[0].toString();<NEW_LINE>// create a script engine manager:<NEW_LINE>ScriptEngineMana... | [] { script, e }); |
362,785 | private TraceNamespaceSymbol createNamespaceIfAbsent(String path) {<NEW_LINE>TraceSymbolManager symbolManager = trace.getSymbolManager();<NEW_LINE>try {<NEW_LINE>return symbolManager.namespaces().add(path, symbolManager.<MASK><NEW_LINE>} catch (DuplicateNameException e) {<NEW_LINE>Msg.info(this, "Namespace for module "... | getGlobalNamespace(), SourceType.IMPORTED); |
1,203,083 | public Object sendSyncRequest(Object msg) throws TimeoutException {<NEW_LINE>String serverAddress = loadBalance(getTransactionServiceGroup(), msg);<NEW_LINE>long timeoutMillis = this.getRpcRequestTimeout();<NEW_LINE>RpcMessage rpcMessage = <MASK><NEW_LINE>// send batch message<NEW_LINE>// put message into basketMap, @s... | buildRequestMessage(msg, ProtocolConstants.MSGTYPE_RESQUEST_SYNC); |
1,363,718 | private void loadState(PagedFile pagedFile, Header.Reader headerReader, CursorContext cursorContext) throws IOException {<NEW_LINE>Pair<TreeState, TreeState> states = loadStatePages(pagedFile, cursorContext);<NEW_LINE>TreeState state = TreeStatePair.selectNewestValidState(states);<NEW_LINE>try (PageCursor cursor = page... | long freeListReadPageId = state.freeListReadPageId(); |
1,768,168 | private ApiTestCase createTest(SaveApiTestCaseRequest request, List<MultipartFile> bodyFiles) {<NEW_LINE>checkNameExist(request);<NEW_LINE>FileUtils.createBodyFiles(request.getId(), bodyFiles);<NEW_LINE>request.setRequest(tcpApiParamService.parseMsTestElement(request.getRequest()));<NEW_LINE>if (StringUtils.isNotEmpty(... | setPriority(request.getPriority()); |
650,216 | public static long parseTime(String s) {<NEW_LINE>long unit = 0;<NEW_LINE>s = s.toLowerCase();<NEW_LINE>s = s.replaceAll(" ", "");<NEW_LINE>if (s.endsWith("ms")) {<NEW_LINE>unit = 1;<NEW_LINE>s = s.substring(0, s.length() - 2);<NEW_LINE>} else if (s.endsWith("s")) {<NEW_LINE>unit = 1000;<NEW_LINE>s = s.substring(0, s.l... | s.length() - 1); |
1,048,932 | public void execute(Location location) throws BuildException {<NEW_LINE>if (fromDir == null && path == null)<NEW_LINE>throw new BuildException("Either 'from' attribute, or nested <fileset> tags are required.");<NEW_LINE>if (fromDir != null && path != null)<NEW_LINE>throw new BuildException("You can't specify both 'from... | setSourcepath(sourcepath.toString()); |
374,652 | private boolean simplifyErrorMessageForSingleGroup(Map<ArgGroupSpec, List<List<ParseResult.GroupMatch>>> matchesPerGroup, CommandLine commandLine) {<NEW_LINE>for (ArgGroupSpec group : matchesPerGroup.keySet()) {<NEW_LINE>List<ParseResult.GroupMatch> flat = flatList(matchesPerGroup.get(group));<NEW_LINE>Set<ArgSpec> mat... | group.validateArgs(commandLine, matchedArgs); |
1,755,303 | public void popParameterStack() {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE)) {<NEW_LINE>// 306998.15<NEW_LINE>logger.logp(Level.FINE, CLASS_NAME, "popParameterStack", "entry");<NEW_LINE>}<NEW_LINE>if (WCCustomProperties.CHECK_REQUEST_OBJECT_IN_USE) {<NEW_LINE>checkRequestObjectI... | CLASS_NAME, "popParameterStack", "Unable to remove item from stack", empty); |
1,216,681 | public static void computeTextField(Instance instance) {<NEW_LINE>final var facing = instance.getAttributeValue(StdAttr.FACING);<NEW_LINE>Object labelLoc = instance.getAttributeValue(StdAttr.LABEL_LOC);<NEW_LINE>final var bds = instance.getBounds();<NEW_LINE>int x = bds.getX() <MASK><NEW_LINE>int y = bds.getY() + bds.g... | + bds.getWidth() / 2; |
1,343,614 | private void checkVibration() {<NEW_LINE>if (audioManager == null)<NEW_LINE>return;<NEW_LINE>logDebug("Ringer mode: " + audioManager.getRingerMode() + ", Stream volume: " + audioManager.getStreamVolume(AudioManager.STREAM_RING) + ", Voice call volume: " + audioManager<MASK><NEW_LINE>if (participatingInACall()) {<NEW_LI... | .getStreamVolume(AudioManager.STREAM_VOICE_CALL)); |
683,773 | private static void saveEntities(DomainBase domain, RegistryLock lock, DateTime now, boolean isLock) {<NEW_LINE>String reason = String.format("%s of a domain through a RegistryLock operation", isLock ? "Lock" : "Unlock");<NEW_LINE>DomainHistory domainHistory = new DomainHistory.Builder().setRegistrarId(domain.getCurren... | tm().insert(oneTime); |
474,542 | protected XContentBuilder doXContentBody(XContentBuilder builder, Params params) throws IOException {<NEW_LINE>builder.field(Fields.COUNT, count);<NEW_LINE>if (count != 0) {<NEW_LINE>builder.field(Fields.MIN, min);<NEW_LINE>builder.field(Fields.MAX, max);<NEW_LINE>builder.field(Fields.AVG, avg);<NEW_LINE>builder.field(... | Fields.MIN_AS_STRING, getMinAsString()); |
1,554,601 | // taken from http://www.docjar.com/html/api/org/apache/pdfbox/examples/util/RemoveAllText.java.html<NEW_LINE>private PDDocument removeText(PDPage page) throws IOException {<NEW_LINE>PDFStreamParser parser = new PDFStreamParser(page);<NEW_LINE>parser.parse();<NEW_LINE>List<Object> tokens = parser.getTokens();<NEW_LINE>... | ContentStreamWriter writer = new ContentStreamWriter(out); |
1,464,916 | public Response filter(Caller<?> caller, Request request) {<NEW_LINE>int maxAcvitivyCount = caller.getUrl().getIntParameter(URLParamType.actives.getName(), URLParamType.actives.getIntValue());<NEW_LINE>if (maxAcvitivyCount > 0) {<NEW_LINE>int activeCount = RpcStats.getServiceStat(caller.getUrl()).getActiveCount();<NEW_... | System.currentTimeMillis() - startTime); |
1,440,830 | private static Class<?> resolveJavaClassArgument(final Ruby runtime, final IRubyObject java_class) {<NEW_LINE>if (java_class instanceof RubyString) {<NEW_LINE>return getJavaClass(runtime, java_class.asJavaString());<NEW_LINE>}<NEW_LINE>if (java_class instanceof JavaProxy) {<NEW_LINE>Object obj = ((JavaProxy) java_class... | return (Class<?>) obj; |
146,179 | public Boolean exec(Node v1, Node v2) {<NEW_LINE>try {<NEW_LINE>// Check if the first literal is unparseable or geometry is empty (always fails).<NEW_LINE>GeometryWrapper geometry1 = GeometryWrapper.extract(v1, GeometryIndex.PRIMARY);<NEW_LINE>if (geometry1.isEmpty()) {<NEW_LINE>return Boolean.FALSE;<NEW_LINE>}<NEW_LIN... | extract(v2, GeometryIndex.SECONDARY); |
25,780 | public String generate(Collection<ICSSMetadataElement> elements, URI root) {<NEW_LINE>List<String> examples = new ArrayList<String>(elements.size());<NEW_LINE>for (ICSSMetadataElement element : elements) {<NEW_LINE>examples.add(element.getExample());<NEW_LINE>}<NEW_LINE>examples = CollectionsUtil.filter(examples, new I... | examples.get(i))); |
783,220 | public IMessage onMessage(PacketFarmAction message, MessageContext ctx) {<NEW_LINE>if (PersonalConfig.machineParticlesEnabled.get()) {<NEW_LINE>for (BlockPos bc : message.coords) {<NEW_LINE>for (int i = 0; i < 15; i++) {<NEW_LINE>double xOff = 0.5 + (rand.nextDouble() - 0.5) * 1.1;<NEW_LINE>double yOff = 0.5 + (rand.ne... | () - 0.5) * 1.5); |
166,364 | // NOSONAR<NEW_LINE>@Override<NEW_LINE>public Message<?> toMessage(List<ConsumerRecord<?, ?>> records, @Nullable Acknowledgment acknowledgment, Consumer<?, ?> consumer, Type type) {<NEW_LINE>KafkaMessageHeaders kafkaMessageHeaders = new KafkaMessageHeaders(this.generateMessageId, this.generateTimestamp);<NEW_LINE>Map<S... | (type, record, conversionFailures)); |
491,373 | public com.amazonaws.services.certificatemanager.model.InvalidArgsException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.certificatemanager.model.InvalidArgsException invalidArgsException = new com.amazonaws.services.certificatemanager.model.InvalidArgsExcept... | int originalDepth = context.getCurrentDepth(); |
814,273 | public void marshall(Database database, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (database == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(database.getName(), NAME_BINDING);<NEW_LINE>protocolMarshall... | database.getLocationUri(), LOCATIONURI_BINDING); |
1,060,725 | public DescribeVpcPeeringConnectionsResult unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>DescribeVpcPeeringConnectionsResult describeVpcPeeringConnectionsResult = new DescribeVpcPeeringConnectionsResult();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isSta... | int originalDepth = context.getCurrentDepth(); |
733,291 | public static ST_Agedge_s agnxtedge(ST_Agraph_s g, ST_Agedge_s e, ST_Agnode_s n) {<NEW_LINE>ENTERING("8zy2u6gsi2xzv2ffv8o4v4uvf", "agnxtedge");<NEW_LINE>try {<NEW_LINE>ST_Agedge_s rv;<NEW_LINE>if (AGTYPE(e) == AGOUTEDGE) {<NEW_LINE>rv = agnxtout(g, e);<NEW_LINE>if (rv == null) {<NEW_LINE>do {<NEW_LINE>rv = N(rv) ? agfs... | (rv.node, n)); |
259,789 | public static void onLoadInterpretReport(int type, Throwable e) {<NEW_LINE>if (reporter == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>switch(type) {<NEW_LINE>case ShareConstants.TYPE_INTERPRET_GET_INSTRUCTION_SET_ERROR:<NEW_LINE>reporter.onReport(KEY_LOADED_INTERPRET_GET_INSTRUCTION_SET_ERROR);<NEW_LINE>reporter.onRe... | + Utils.getExceptionCauseString(e)); |
1,318,008 | private void handleClearDots(boolean detected) {<NEW_LINE>String message = "Clear the dots!";<NEW_LINE>if (detected) {<NEW_LINE>gui.getInfoPanel().updateView(saver.getCurrentView());<NEW_LINE>gui.getInfoPanel().updateFocusScore(saver.getFocusScore());<NEW_LINE>double stationaryTime = actions.getStationaryTime();<NEW_LI... | get(i).handleNoDetection(); |
910,999 | public static GeneralPath arrowheadPath(Point2D p0, Point2D tipPt, double finLength, double finAngle, double offsetSize) {<NEW_LINE>GeneralPath arrowhead = new GeneralPath();<NEW_LINE>Point2D offset = AWTUtil.<MASK><NEW_LINE>Point2D finTip1 = fin(tipPt, p0, finLength, finAngle);<NEW_LINE>Point2D finTip2 = fin(tipPt, p0... | vector(p0, tipPt, offsetSize); |
444,192 | private ClassNode checkForTargetType(final Expression expr, final ClassNode type) {<NEW_LINE>ClassNode sourceType = type, targetType = null;<NEW_LINE>MethodNode enclosingMethod = typeCheckingContext.getEnclosingMethod();<NEW_LINE>BinaryExpression enclosingBinaryExpression = typeCheckingContext.getEnclosingBinaryExpress... | getDeclaredOrInferredType(enclosingBinaryExpression.getLeftExpression()); |
1,682,304 | public <PSI> Iterator<Match> findAll(PSI target) throws FindFailed {<NEW_LINE>lastMatches = null;<NEW_LINE>RepeatableFindAll rf = new RepeatableFindAll(target, null);<NEW_LINE>Image img = rf._image;<NEW_LINE>String targetStr = img.getName();<NEW_LINE>Boolean response = true;<NEW_LINE>if (!img.isValid() && img.hasIOExce... | .createdefault(this, img)); |
1,219,256 | private static LiveExprNode astToLive(ITool tool, ExprNode expr, Context con) {<NEW_LINE>switch(expr.getKind()) {<NEW_LINE>case OpApplKind:<NEW_LINE>{<NEW_LINE>OpApplNode expr1 = (OpApplNode) expr;<NEW_LINE>return astToLiveAppl(tool, expr1, con);<NEW_LINE>}<NEW_LINE>case LetInKind:<NEW_LINE>{<NEW_LINE>LetInNode expr1 =... | tool, expr, con, level); |
1,444,569 | private void addToUpperLists(Permission perm) {<NEW_LINE>Permission all = this.plugin.getServer().getPluginManager().getPermission("multiverse.*");<NEW_LINE>Permission allWorlds = this.plugin.getServer().getPluginManager().getPermission("multiverse.access.*");<NEW_LINE>Permission allExemption = this.plugin.getServer().... | getPluginManager().recalculatePermissionDefaults(allWorlds); |
1,043,493 | private void measureChild(MeasureSpecs measureSpec, boolean isFakeMeasure) {<NEW_LINE>int widthMeasureSpec = (measureSpec.autoColumnsCount > 0) ? infinity : MeasureSpec.makeMeasureSpec(measureSpec.pixelWidth, MeasureSpec.EXACTLY);<NEW_LINE>int heightMeasureSpec = (isFakeMeasure || measureSpec.autoRowsCount > 0) ? infin... | int growSize = remainingSpace / measureSpec.autoRowsCount; |
1,018,610 | public void run() {<NEW_LINE>displayer = new SearchDisplayer();<NEW_LINE>// NOI18N<NEW_LINE>callDisplayerFromAWT("prepareOutput");<NEW_LINE>int freeBufSpace = 0;<NEW_LINE>for (MatchingObject obj : objects) {<NEW_LINE>freeBufSpace = addToBuffer(allDetails, 0);<NEW_LINE>while (freeBufSpace < 0) {<NEW_LINE>printBuffer();<... | ] smallBuffer = new Node[smallBufSize]; |
1,631,770 | final ListPrincipalThingsResult executeListPrincipalThings(ListPrincipalThingsRequest listPrincipalThingsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listPrincipalThingsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListPrincipalThings"); |
942,857 | protected Node copyNode(Node node) {<NEW_LINE>boolean filter = false;<NEW_LINE>try {<NEW_LINE>DataObject d = (DataObject) node.getCookie(DataObject.class);<NEW_LINE>if (d != null) {<NEW_LINE>InstanceCookie.Of inst = (InstanceCookie.Of) d.getCookie(InstanceCookie.Of.class);<NEW_LINE>if (inst != null && (inst.instanceOf(... | .getPrimaryFile().getFileSystem(); |
1,487,918 | public void save(File file) throws IOException {<NEW_LINE>PrintStream out = new PrintStream(file, "UTF-8");<NEW_LINE>out.println("font.name=" + fontName);<NEW_LINE>out.println("font.size=" + fontSize);<NEW_LINE>out.println("font.bold=" + bold);<NEW_LINE>out.println("font.italic=" + italic);<NEW_LINE>out.println("font.g... | getClass().getName()); |
1,349,471 | public StorageObject upload(final Path file, final Local local, final BandwidthThrottle throttle, final StreamListener listener, final TransferStatus status, final ConnectionCallback callback) throws BackgroundException {<NEW_LINE>final S3Protocol.AuthenticationHeaderSignatureVersion signatureVersion = session.getSigna... | throttle, listener, status, callback); |
237,401 | public Long countTranslationEntries(TranslatedEntity entityType, ResultType stage) {<NEW_LINE>CriteriaBuilder builder = em.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<Long> criteria = builder.createQuery(Long.class);<NEW_LINE>Root<TranslationImpl> root = criteria.from(TranslationImpl.class);<NEW_LINE>criteria.select(b... | query = em.createQuery(criteria); |
88,731 | final SendInvitationResult executeSendInvitation(SendInvitationRequest sendInvitationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(sendInvitationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<SendInvitat... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,639,947 | final DescribeAppImageConfigResult executeDescribeAppImageConfig(DescribeAppImageConfigRequest describeAppImageConfigRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeAppImageConfigRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
961,640 | final DeleteEnvironmentResult executeDeleteEnvironment(DeleteEnvironmentRequest deleteEnvironmentRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteEnvironmentRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.st... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteEnvironment"); |
845,365 | protected void openSupport(String reason) throws FMFileManagerException {<NEW_LINE>if (fa != null) {<NEW_LINE>throw (new FMFileManagerException("file already open"));<NEW_LINE>}<NEW_LINE>reserveAccess(reason);<NEW_LINE>try {<NEW_LINE>file_access.aboutToOpen();<NEW_LINE>fa = FileUtil.newFileAccessor(linked_file, access_... | access_mode == FM_READ ? READ_ACCESS_MODE : WRITE_ACCESS_MODE); |
995,575 | static Object readVal(Context ctx, int resId, Class<?> valType) throws Exception {<NEW_LINE>Resources res = ctx.getResources();<NEW_LINE>Object val = null;<NEW_LINE>if (isBoolean(valType, true)) {<NEW_LINE>val = res.getBoolean(resId);<NEW_LINE>} else if (isInteger(valType, true)) {<NEW_LINE><MASK><NEW_LINE>} else if (i... | val = res.getInteger(resId); |
1,530,452 | /*<NEW_LINE>* Client to test Advertize... Run it on node boxes to test for firewall.<NEW_LINE>*/<NEW_LINE>public static void main(String[] args) throws Exception {<NEW_LINE>if (args.length != 2 && args.length != 3) {<NEW_LINE>System.out.println("Usage: Advertize multicastaddress port [bindaddress]");<NEW_LINE>System.ou... | value = System.getProperty("os.name"); |
56,122 | private void saveSettings(Client client, PClient.Builder newClient) {<NEW_LINE>PSettings.Builder newSettings = PSettings.newBuilder();<NEW_LINE>ClientSettings settings = client.getSettings();<NEW_LINE>settings.getBookmarks().forEach(b -> {<NEW_LINE>PBookmark.Builder newBookmark = PBookmark.newBuilder();<NEW_LINE>newBoo... | setLabel(b.getLabel()); |
1,050,477 | private List<String> aliveRemote(String name, List<Application> list) {<NEW_LINE>final List<String> values = new CopyOnWriteArrayList<>();<NEW_LINE>list.stream().filter(o -> {<NEW_LINE>try {<NEW_LINE>return !StringUtils.equals(o.getNode(<MASK><NEW_LINE>} catch (Exception e) {<NEW_LINE>logger.error(e);<NEW_LINE>}<NEW_LI... | ), Config.node()); |
1,821,021 | protected void showForgotPasswordDialog() {<NEW_LINE>AlertDialog.Builder builder = new AlertDialog.Builder(this);<NEW_LINE>builder.setTitle(getString(R.string.forgot_password));<NEW_LINE>// Set up the input<NEW_LINE>final EditText input = new EditText(this);<NEW_LINE>input.setInputType(InputType.TYPE_CLASS_TEXT | Input... | showToast(throwable.getLocalizedMessage()); |
1,683,471 | public List<Task> findTasksAndVariablesByQueryCriteria(TaskQueryImpl taskQuery) {<NEW_LINE>final String query = "selectTaskWithVariablesByQueryCriteria";<NEW_LINE>// paging doesn't work for combining task instances and variables due to<NEW_LINE>// an outer join, so doing it in-memory<NEW_LINE>if (taskQuery.getFirstResu... | instanceList.subList(0, toIndex); |
392,288 | public SqlFragments createFragments(String columnFullName, RDBColumnMetadata column, Term term) {<NEW_LINE>List<Object> <MASK><NEW_LINE>if (values.isEmpty()) {<NEW_LINE>return EmptySqlFragments.INSTANCE;<NEW_LINE>}<NEW_LINE>PrepareSqlFragments fragments = PrepareSqlFragments.of();<NEW_LINE>List<String> options = term.g... | values = convertList(column, term); |
115,156 | private double[] compute(final SelfOrganizingMap som, final double[] input) {<NEW_LINE>final double[] result = new double[som.getOutputCount()];<NEW_LINE>for (int i = 0; i < som.getOutputCount(); i++) {<NEW_LINE>final double[] optr = som.getWeights().getArray()[i];<NEW_LINE>final Matrix matrixA = new <MASK><NEW_LINE>fo... | Matrix(input.length, 1); |
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."... | getSubscriptionId(), apiVersion, context); |
47,254 | private void insertWrapperImpl(Node node, SourceSection sourceSection) {<NEW_LINE>Node parent = node.getParent();<NEW_LINE>if (parent instanceof WrapperNode) {<NEW_LINE>// already wrapped, need to invalidate the wrapper something changed<NEW_LINE>invalidateWrapperImpl((WrapperNode) parent, node);<NEW_LINE>return;<NEW_L... | .getContext().validEventContextOnWrapperInsert(); |
1,735,561 | public void deleteByIdWithResponse(String id, Context context) {<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. Missin... | Utils.getValueFromIdByName(id, "capacityPools"); |
1,802,445 | public Result search(Query query, Execution execution) {<NEW_LINE>String recall = query.properties().getString(recallName);<NEW_LINE>if (recall == null)<NEW_LINE>return execution.search(query);<NEW_LINE>AnyParser parser = new AnyParser(ParserEnvironment.fromExecutionContext(execution.context()));<NEW_LINE>QueryTree roo... | ().getSimpleName() + "."; |
1,302,577 | public void removeStorageInfo(String storageInstId, String ip, Integer port) {<NEW_LINE>try {<NEW_LINE>Map<Integer, ParameterContext> insertParams = Maps.newHashMap();<NEW_LINE>MetaDbUtil.setParameter(1, insertParams, ParameterMethod.setString, storageInstId);<NEW_LINE>MetaDbUtil.setParameter(2, insertParams, Parameter... | insertParams, ParameterMethod.setInt, port); |
190,627 | public UpdateNetworkSettingsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>UpdateNetworkSettingsResult updateNetworkSettingsResult = new UpdateNetworkSettingsResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentE... | ().unmarshall(context)); |
183,841 | private void loadNode755() {<NEW_LINE>PropertyTypeNode node = new PropertyTypeNode(this.context, new NodeId(0, 15001), new QualifiedName(0, "ConditionEventId"), new LocalizedText("en", "ConditionEventId"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new DataValue(Variant.NULL_VALUE), Identifiers... | .expanded(), false)); |
1,749,765 | public void run(RegressionEnvironment env) {<NEW_LINE>if (env.isHA()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String graph = "@name('flow') create dataflow MySelect\n" + "Emitter -> instream_s0<SupportBean>{name: 'emitterS0'}\n" + "Select(instream_s0) -> outstream {\n" + " select: (select sum(intPrimitive) as sumInt fr... | [] { 14 + 9 }); |
1,148,053 | public void marshall(TaskStatistics taskStatistics, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (taskStatistics == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshal... | taskStatistics.getTotalChecks(), TOTALCHECKS_BINDING); |
770,143 | public boolean updGroupConsumeCtrlConf(GroupConsumeCtrlEntity entity, StringBuilder strBuff, ProcessResult result) {<NEW_LINE>// Checks whether the record already exists<NEW_LINE>GroupConsumeCtrlEntity curEntity = consumeCtrlCache.get(entity.getRecordKey());<NEW_LINE>if (curEntity == null) {<NEW_LINE>result.setFailResu... | (")!").toString()); |
1,754,156 | private void initialize(GitblitRegistration reg, boolean isLogin) {<NEW_LINE>setIconImage(new ImageIcon(getClass().getResource("/gitblt-favicon.png")).getImage());<NEW_LINE>canceled = true;<NEW_LINE>urlField = new JTextField(reg == null ? "" : reg.url, 30);<NEW_LINE>nameField = new JTextField(reg == <MASK><NEW_LINE>acc... | null ? "" : reg.name); |
1,456,694 | public void onBindViewHolder(Presenter.ViewHolder viewHolder, Object item) {<NEW_LINE><MASK><NEW_LINE>Video video = (Video) item;<NEW_LINE>ComplexImageCardView cardView = (ComplexImageCardView) viewHolder.view;<NEW_LINE>Context context = cardView.getContext();<NEW_LINE>cardView.setTitleText(video.title);<NEW_LINE>cardV... | super.onBindViewHolder(viewHolder, item); |
343,199 | public void marshall(ForecastSummary forecastSummary, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (forecastSummary == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.mars... | forecastSummary.getForecastArn(), FORECASTARN_BINDING); |
1,500,977 | public void marshall(Job job, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (job == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(job.getAccelerationSettings(), ACCELERATIONSETTINGS_BINDING);<NEW_LINE>prot... | job.getCreatedAt(), CREATEDAT_BINDING); |
1,258,169 | public Builder mergeFrom(io.kubernetes.client.proto.V1.ConfigMapList other) {<NEW_LINE>if (other == io.kubernetes.client.proto.V1.ConfigMapList.getDefaultInstance())<NEW_LINE>return this;<NEW_LINE>if (other.hasMetadata()) {<NEW_LINE>mergeMetadata(other.getMetadata());<NEW_LINE>}<NEW_LINE>if (itemsBuilder_ == null) {<NE... | bitField0_ = (bitField0_ & ~0x00000002); |
321,149 | private void purgeProfile(String today) {<NEW_LINE>int retainProfileDays = conf.mgr_purge_profile_keep_days;<NEW_LINE>if (retainProfileDays > 0) {<NEW_LINE>int lastDeleteDate = CastUtil.cint(DateUtil.yyyymmdd(System.currentTimeMillis() - (<MASK><NEW_LINE>while (true) {<NEW_LINE>String yyyymmdd = getLongAgoDate(deletedP... | DateUtil.MILLIS_PER_DAY * retainProfileDays))); |
1,153,987 | public void updateTaskPartitionList(int workerId, int workerNumPerProcess, List<Integer> processPartitionList) {<NEW_LINE>int index = workerNumPerProcess * workerId;<NEW_LINE>Map<Integer, List<Integer>> taskPartitionList = this.processTaskPartitionList.computeIfAbsent(workerId, <MASK><NEW_LINE>LinkedList<Integer> parti... | k -> Maps.newHashMap()); |
1,646,856 | protected Object doCall(Object[] arguments, @Cached IsCallableNode isCallable) {<NEW_LINE>Object thisObj = JSArguments.getThisObject(arguments);<NEW_LINE>Object function = JSArguments.getFunctionObject(arguments);<NEW_LINE>JSProxyObject proxy = (JSProxyObject) function;<NEW_LINE>if (!isCallable.executeBoolean(JSProxy.g... | JSProxy.getHandlerChecked(proxy, errorBranch); |
885,464 | public void flatMap1(Row value, Collector<Row> out) throws Exception {<NEW_LINE>if (!isTfClusterStarted) {<NEW_LINE>if (firstItem) {<NEW_LINE><MASK><NEW_LINE>int port = serverSocket.getLocalPort();<NEW_LINE>serverSocket.close();<NEW_LINE>String localIp = IpHostUtil.getIpAddress();<NEW_LINE>for (int i = 0; i < numWorker... | ServerSocket serverSocket = IpHostUtil.getFreeSocket(); |
1,518,663 | private void loadCache() throws Exception {<NEW_LINE>TransactionMonitor.DEFAULT.logTransaction("MetaCache", "load", new Task() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void go() throws Exception {<NEW_LINE>List<DcTbl> dcs = dcService.findAllDcNames();<NEW_LINE>List<DcMeta> dcMetas = new LinkedList<>();<NEW_LINE>f... | xpipeMeta = createXpipeMeta(dcMetas, redisCheckRuleMetas); |
487,210 | private double[] determineMinMaxDistance(Relation<ParameterizationFunction> relation, int dimensionality) {<NEW_LINE>double[] min = new double[dimensionality - 1];<NEW_LINE>double[] max = new double[dimensionality - 1];<NEW_LINE>Arrays.<MASK><NEW_LINE>HyperBoundingBox box = new HyperBoundingBox(min, max);<NEW_LINE>doub... | fill(max, Math.PI); |
1,489,365 | protected Mono<Void> doExecute(final ServerWebExchange exchange, final ShenyuPluginChain chain, final SelectorData selector, final RuleData rule) {<NEW_LINE>ICache cache = CacheUtils.getCache();<NEW_LINE>byte[] bytes;<NEW_LINE>if (Objects.nonNull(cache) && Objects.nonNull(bytes = cache.getData(CacheUtils.dataKey(exchan... | data.readableByteCount()))); |
1,329,760 | public static int findLineEnding(PTextIOBase self, String line, int start) {<NEW_LINE>int pos;<NEW_LINE>if (self.isReadTranslate()) {<NEW_LINE>int nlpos = PString.indexOf(line, "\n", start);<NEW_LINE>int crpos = PString.<MASK><NEW_LINE>if (crpos == -1) {<NEW_LINE>if (nlpos == -1) {<NEW_LINE>return -1;<NEW_LINE>} else {... | indexOf(line, "\r", start); |
1,832,249 | private static RpcRequest toRpcRequest(Class<?> serviceType, String method, TBase<?, ?> thriftArgs) {<NEW_LINE>requireNonNull(thriftArgs, "thriftArgs");<NEW_LINE>// NB: The map returned by FieldMetaData.getStructMetaDataMap() is an EnumMap,<NEW_LINE>// so the parameter ordering is preserved correctly during iteration.<... | int numFields = fields.size(); |
675,102 | static void exportStructure(Context context, OutputStream output) {<NEW_LINE>// Build a document from the Community/Collection hierarchy.<NEW_LINE>// To be read by importStructure, perhaps<NEW_LINE>Element rootElement = new Element(INPUT_ROOT);<NEW_LINE>List<Community> communities = null;<NEW_LINE>try {<NEW_LINE>commun... | XMLOutputter(Format.getPrettyFormat()); |
1,605,387 | public static String format(double number, int width) {<NEW_LINE>Preconditions.checkArgument(number >= 0, "Non-negative numbers cannot be formatted by this method");<NEW_LINE>var integerDigits = (int) Math.max(0, Math<MASK><NEW_LINE>var fractionalDigits = width - integerDigits - 1;<NEW_LINE>var minFractional = Math.pow... | .log10(number) + 1); |
1,018,109 | private int parseTweet(JSONObject tweet) throws MalformedURLException {<NEW_LINE>int parsedCount = 0;<NEW_LINE>if (!tweet.has("extended_entities")) {<NEW_LINE>logger.error("XXX Tweet doesn't have entitites");<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>JSONObject entities = tweet.getJSONObject("extended_entities");<NEW_LINE... | ("video_info").getJSONArray("variants"); |
378,832 | final GetBotsResult executeGetBots(GetBotsRequest getBotsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getBotsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<GetBotsRequest> request = null;<NEW_LINE>Respo... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,715,347 | public void process(Tables.OsmWaterPolygon element, FeatureCollector features) {<NEW_LINE>if (nullIfEmpty(element.name()) != null) {<NEW_LINE>try {<NEW_LINE>Geometry centerlineGeometry = lakeCenterlines.get(element.source().id());<NEW_LINE>FeatureCollector.Feature feature;<NEW_LINE>int minzoom = 9;<NEW_LINE>if (centerl... | : 0).setMinZoom(minzoom); |
560,494 | public void readFields(DataInput in) throws IOException {<NEW_LINE>super.readFields(in);<NEW_LINE>int counter = in.readInt();<NEW_LINE>for (int i = 0; i < counter; i++) {<NEW_LINE>Column column = Column.read(in);<NEW_LINE>partitionColumns.add(column);<NEW_LINE>}<NEW_LINE>this.isMultiColumnPartition = partitionColumns.s... | partitionId, new RangePartitionItem(range)); |
6,779 | public static String formatMillis(double theMillis) {<NEW_LINE>StringBuilder buf = new StringBuilder(20);<NEW_LINE>if (theMillis > 0.0 && theMillis < 1.0) {<NEW_LINE>buf.append(getSubMillisecondMillisFormat().format(theMillis));<NEW_LINE>buf.append("ms");<NEW_LINE>} else if (theMillis < (10 * DateUtils.MILLIS_PER_SECON... | ().format(days)); |
348,711 | final DescribeClientVpnConnectionsResult executeDescribeClientVpnConnections(DescribeClientVpnConnectionsRequest describeClientVpnConnectionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeClientVpnConnectionsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContex... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
864,059 | private void addStaticRegexResultProperties() {<NEW_LINE>if (context.isOptionRegexpStaticResultInContextInit()) {<NEW_LINE>if (context.isOptionNashornCompatibilityMode()) {<NEW_LINE>putRegExpStaticPropertyAccessor(null, Strings.INPUT);<NEW_LINE>putRegExpStaticPropertyAccessor(BuiltinFunctionKey.RegExpMultiLine, Strings... | BuiltinFunctionKey.RegExpLastParen, Strings.LAST_PAREN); |
475,923 | private Object apply(OExpression expression, OResult elem, OCommandContext ctx, int recursion) {<NEW_LINE>OResultInternal result = new OResultInternal();<NEW_LINE>if (starItem != null || includeItems.size() == 0) {<NEW_LINE>for (String property : elem.getPropertyNames()) {<NEW_LINE>if (isExclude(property)) {<NEW_LINE>c... | value, ctx, recursion - 1); |
22,158 | public Object parseHttpResponse(Object body, RpcMethodInfo rpcMethodInfo) {<NEW_LINE>Object response;<NEW_LINE>try {<NEW_LINE>switch(protocolType) {<NEW_LINE>case Options.ProtocolType.PROTOCOL_HTTP_JSON_VALUE:<NEW_LINE>if (rpcMethodInfo instanceof ProtobufRpcMethodInfo) {<NEW_LINE>ProtobufRpcMethodInfo protobufRpcMetho... | RpcException.SERIALIZATION_EXCEPTION, "parse rpc response error", ex); |
538,360 | public void run() {<NEW_LINE>pendingWrite = false;<NEW_LINE>if (loading || names.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>File configFile = null;<NEW_LINE>try {<NEW_LINE>configFile = File.createTempFile("usermap", ".tmp.csv", location);<NEW_LINE>final BufferedWriter bWriter = new BufferedWriter(new FileWriter(... | getValue().toString()); |
947,107 | protected void matchReportReference(ASTNode reference, IJavaElement element, Binding elementBinding, int accuracy, MatchLocator locator) throws CoreException {<NEW_LINE>int offset = -1;<NEW_LINE>int length = -1;<NEW_LINE>if (reference instanceof SingleNameReference) {<NEW_LINE>offset = reference.sourceStart;<NEW_LINE>l... | null, accuracy, offset, length); |
332,012 | protected static void writeCentralDirectoryEnd(OutputStream out, int nbEntries, long cdLength, long cdOffset, String comment, String encoding, ZipBuffer zipBuffer) throws IOException {<NEW_LINE>out.write(EOCD_SIG);<NEW_LINE>// disk numbers<NEW_LINE>// 2x SHORT_0<NEW_LINE>out.write(LONG_0);<NEW_LINE>// number of entries... | out.write(zipBuffer.shortBuffer); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.