idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,239,846 | public void initialScan(ReplayMod core) {<NEW_LINE>// Move anything which is still in the recording folder into the regular replay folder<NEW_LINE>// so it can be opened and/or recovered<NEW_LINE>try (DirectoryStream<Path> paths = Files.newDirectoryStream(folders.getRecordingFolder())) {<NEW_LINE>for (Path path : paths... | original.getFileName() + ".no_recover"); |
1,295,037 | private void loadOrgs() {<NEW_LINE>if (orgs != null && orgs.size() != 0) {<NEW_LINE>mView.showUserOrgs(orgs);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>HttpObserver<ArrayList<User>> httpObserver = new HttpObserver<ArrayList<User>>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onError(Throwable error) {<NEW_LINE>mVie... | .showErrorToast(getErrorTip(error)); |
840,761 | public void emitBlockQuads(BlockAndTintGetter blockView, BlockState state, BlockPos pos, Supplier<Random> randomSupplier, RenderContext context) {<NEW_LINE>super.emitBlockQuads(blockView, state, pos, randomSupplier, context);<NEW_LINE>// Add cell models on top of the base model, if possible<NEW_LINE>Item[] cells = getC... | .pushTransform(slotTransforms[slot]); |
905,794 | final UpdateConnectionResult executeUpdateConnection(UpdateConnectionRequest updateConnectionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateConnectionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | invoke(request, responseHandler, executionContext); |
1,018,630 | public boolean revokePortForwardingRulesForVm(long vmId) {<NEW_LINE>boolean success = true;<NEW_LINE>UserVmVO <MASK><NEW_LINE>if (vm == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>List<PortForwardingRuleVO> rules = _portForwardingDao.listByVm(vmId);<NEW_LINE>Set<Long> ipsToReprogram = new HashSet<Long>();<NEW_LI... | vm = _vmDao.findByIdIncludingRemoved(vmId); |
424,545 | public static DescribeFabricOrganizationPeersResponse unmarshall(DescribeFabricOrganizationPeersResponse describeFabricOrganizationPeersResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeFabricOrganizationPeersResponse.setRequestId(_ctx.stringValue("DescribeFabricOrganizationPeersResponse.RequestId"));<NEW_LINE>des... | (_ctx.integerValue("DescribeFabricOrganizationPeersResponse.ErrorCode")); |
668,623 | private void createNewConnection(final ResponseHandler handler, final Object attachment, final String schema) throws IOException {<NEW_LINE>// aysn create connection<NEW_LINE>final AtomicBoolean hasError = new AtomicBoolean(false);<NEW_LINE>MycatServer.getInstance().getBusinessExecutor().execute(new Runnable() {<NEW_LI... | "connection id is " + conn.getId()); |
1,463,071 | public void beginAnalyzeDocumentWithOptions() throws IOException {<NEW_LINE>// BEGIN: com.azure.ai.formrecognizer.DocumentAnalysisClient.beginAnalyzeDocument#string-InputStream-long-AnalyzeDocumentOptions-Context<NEW_LINE><MASK><NEW_LINE>String modelId = "{custom_trained_model_id}";<NEW_LINE>byte[] fileContent = Files.... | File document = new File("{local/file_path/fileName.jpg}"); |
223,223 | public Result send(Message msg, String routeName, boolean parseIfNotFound) {<NEW_LINE>boolean found = false;<NEW_LINE>RoutingTable table = mbus.getRoutingTable(msg.getProtocol().toString());<NEW_LINE>if (table != null) {<NEW_LINE>Route route = table.getRoute(routeName);<NEW_LINE>if (route != null) {<NEW_LINE>msg.<MASK>... | setRoute(new Route(route)); |
289,125 | public void runMethod(Method method, Object obj, Vector values) throws ResourceException {<NEW_LINE>try {<NEW_LINE>Class[] parameters = method.getParameterTypes();<NEW_LINE>if (values.size() != parameters.length) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Object[] actualValues = new Object[parameters.length];<NEW_LINE>for ... | Level.SEVERE, "", iae); |
1,520,529 | void handleControllerWebRtcEvents() {<NEW_LINE>ControllerToBotEventBus.subscribe("WEB_RTC_COMMANDS", event -> {<NEW_LINE>String commandType = "";<NEW_LINE>JSONObject <MASK><NEW_LINE>String type = webRtcEvent.getString("type");<NEW_LINE>switch(type) {<NEW_LINE>case "offer":<NEW_LINE>Timber.d("connectToSignallingServer: ... | webRtcEvent = event.getJSONObject("webrtc_event"); |
248,325 | private void savePreferences() {<NEW_LINE>// validate port string<NEW_LINE>try {<NEW_LINE>new PortIterator(portsText.getText());<NEW_LINE>} catch (Exception e) {<NEW_LINE>tabFolder.setSelection(portsTabItem);<NEW_LINE>portsText.forceFocus();<NEW_LINE>throw new FetcherException("unparseablePortString", e);<NEW_LINE>}<NE... | (pingersCombo.getSelectionIndex())); |
1,131,702 | private Optional<Pair<CaptureBindingPatternNode, String>> findCaptureBindingPattern(Node matchedNode, CodeActionContext context) {<NEW_LINE>Optional<Symbol> symbol = context.currentSemanticModel().flatMap(semanticModel -> semanticModel.symbol(matchedNode));<NEW_LINE>if (symbol.isEmpty() || context.currentSyntaxTree().i... | .get(), uri)); |
875,997 | final CreateIntegrationResponseResult executeCreateIntegrationResponse(CreateIntegrationResponseRequest createIntegrationResponseRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createIntegrationResponseRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequest... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateIntegrationResponse"); |
355,574 | public void handleOutbound(Context ctx) throws ServletException, IOException {<NEW_LINE>Model model = new Model(ctx);<NEW_LINE>Payload payload = ctx.getPayload();<NEW_LINE>Action action = payload.getAction();<NEW_LINE>normalize(model, payload);<NEW_LINE>String key = payload.getKey();<NEW_LINE>StateReport report = null;... | buildDisplayInfo(model, payload, report); |
1,100,865 | public Result<Boolean> apiModifyClusterConfig(@RequestBody String payload) {<NEW_LINE>if (StringUtil.isBlank(payload)) {<NEW_LINE>return Result.ofFail(-1, "empty request body");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>JSONObject body = JSON.parseObject(payload);<NEW_LINE>if (body.containsKey(KEY_MODE)) {<NEW_LINE>int mode =... | parseObject(payload, ClusterServerModifyRequest.class); |
737,922 | public FlowRegistrar stubFlowRegistrar(ConfigurableListableBeanFactory beanFactory, BatchStubRunner batchStubRunner) {<NEW_LINE>Map<StubConfiguration, Collection<Contract>> contracts = batchStubRunner.getContracts();<NEW_LINE>for (Entry<StubConfiguration, Collection<Contract>> entry : contracts.entrySet()) {<NEW_LINE>S... | + "_" + key.getArtifactId(); |
903,634 | public ListOutgoingCertificatesResult listOutgoingCertificates(ListOutgoingCertificatesRequest listOutgoingCertificatesRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listOutgoingCertificatesRequest);<NEW_LINE>AWSRequestMetrics awsReque... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
383,358 | public static void perform() throws Exception {<NEW_LINE>final String fromVer = "4.1.0";<NEW_LINE>final String toVer = "4.2.0";<NEW_LINE>LOGGER.log(Level.INFO, "Upgrading from version [" + fromVer + "] to version [" + toVer + "]....");<NEW_LINE>final BeanManager beanManager = BeanManager.getInstance();<NEW_LINE>final O... | fromVer + "] to version [" + toVer + "]"); |
1,156,935 | private void initialize() {<NEW_LINE>mBorderWidth = SettingsStore.getInstance(getContext()).getTransparentBorderWidth();<NEW_LINE><MASK><NEW_LINE>mWidgetPlacement = new WidgetPlacement(getContext());<NEW_LINE>mWidgetPlacement.name = getClass().getSimpleName();<NEW_LINE>mHandle = mWidgetManager.newWidgetHandle();<NEW_LI... | mWidgetManager = (WidgetManagerDelegate) getContext(); |
98,782 | public ApkSource build() {<NEW_LINE>ApkSource apkSource;<NEW_LINE>boolean sourceIsZip = false;<NEW_LINE>if (mApkFiles != null) {<NEW_LINE>List<FileDescriptor> apkFileDescriptors = new ArrayList<>(mApkFiles.size());<NEW_LINE>for (File apkFile : mApkFiles) apkFileDescriptors.add(new NormalFileDescriptor(apkFile));<NEW_LI... | new ContentUriFileDescriptor(mContext, mZipUri)); |
512,753 | final GetLicenseUsageResult executeGetLicenseUsage(GetLicenseUsageRequest getLicenseUsageRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getLicenseUsageRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(F... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
653,839 | private boolean hasSearchableColumns() {<NEW_LINE>boolean retValue = false;<NEW_LINE>m_tableName = MQuery.getZoomTableName(m_columnName);<NEW_LINE>m_keyColumnName = MQuery.getZoomColumnName(m_columnName);<NEW_LINE>if (m_columnName.equals("M_Product_ID") || m_columnName.equals("C_BPartner_ID") || m_columnName.equals("C_... | DB.prepareStatement(query, null); |
386,780 | protected <S extends ConsumerEndpointSpec<? super S, ? extends MessageHandler>> B register(S endpointSpec, Consumer<S> endpointConfigurer) {<NEW_LINE>if (endpointConfigurer != null) {<NEW_LINE>endpointConfigurer.accept(endpointSpec);<NEW_LINE>}<NEW_LINE>MessageChannel inputChannel = getCurrentMessageChannel();<NEW_LINE... | > factoryBeanTuple2 = endpointSpec.get(); |
1,016,290 | public void print(DebugContext debug, Graph graph, Map<Object, Object> properties, int id, String format, Object... args) throws IOException {<NEW_LINE>if (graph instanceof StructuredGraph) {<NEW_LINE>OptionValues options = graph.getOptions();<NEW_LINE>StructuredGraph structuredGraph = (StructuredGraph) graph;<NEW_LINE... | .getValue(options), writer); |
1,851,244 | private void addDisplayLabel(Symbol symbol, int nameLength, int typeLength, int sourceLength) {<NEW_LINE>String name = "";<NEW_LINE>String type = "";<NEW_LINE>String primary = getSpaces(7);<NEW_LINE>String source = "";<NEW_LINE>String namespace = "";<NEW_LINE>String yes = getSpaces(2) + "yes" + getSpaces(2);<NEW_LINE>S... | .getSource().toString(); |
1,302,244 | public CustomSql unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CustomSql customSql = new CustomSql();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NE... | int originalDepth = context.getCurrentDepth(); |
791,993 | public void scavenge() {<NEW_LINE>// don't attempt to scavenge if we are shutting down<NEW_LINE>if (isStopping() || isStopped())<NEW_LINE>return;<NEW_LINE>if (LOG.isDebugEnabled())<NEW_LINE>LOG.debug("{} scavenging sessions", this);<NEW_LINE>// Get a snapshot of the candidates as they are now. Others that<NEW_LINE>// a... | warn("Unable to expire Session {}", id, e); |
355,319 | private void initSuggester() {<NEW_LINE>SuggesterConfig suggesterConfig = env.getSuggesterConfig();<NEW_LINE>if (!suggesterConfig.isEnabled()) {<NEW_LINE>logger.log(Level.INFO, "Suggester disabled");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>File suggesterDir = new File(env.getDataRootPath(), IndexDatabase.SUGGESTER_DIR);<N... | Level.FINER, "Suggester rebuild parallelism level: " + rebuildParalleismLevel); |
174,531 | public List<List<Integer>> verticalTraversal(TreeNode root) {<NEW_LINE>List<int[]> list = new ArrayList<>();<NEW_LINE>dfs(root, 0, 0, list);<NEW_LINE>list.sort(new Comparator<int[]>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public int compare(int[] o1, int[] o2) {<NEW_LINE>if (o1[0] != o2[0])<NEW_LINE>return Integer.co... | 1], o1[1]); |
85,539 | final DeleteOpsMetadataResult executeDeleteOpsMetadata(DeleteOpsMetadataRequest deleteOpsMetadataRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteOpsMetadataRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.st... | addHandlerContext(HandlerContextKey.SERVICE_ID, "SSM"); |
590,418 | private boolean handleDataChange() throws Exception {<NEW_LINE>StateWrapper currentWrapper = stateRef.get();<NEW_LINE><MASK><NEW_LINE>StateWrapper newWrapper = readCurrentContext();<NEW_LINE>traceLogWrappers(currentWrapper, notifyWrapper, newWrapper);<NEW_LINE>if (currentWrapper.version + 1 == newWrapper.version && not... | StateWrapper notifyWrapper = notifyRef.get(); |
1,419,706 | public IQueryBuilder<I_MD_Candidate> mkQueryBuilder(@NonNull final CandidatesQuery query) {<NEW_LINE>final IQueryBL queryBL = Services.get(IQueryBL.class);<NEW_LINE>final IQueryBuilder<I_MD_Candidate> builder = queryBL.createQueryBuilder(I_MD_Candidate.class).addOnlyActiveRecordsFilter();<NEW_LINE>if (CandidatesQuery.F... | query.getParentDemandDetailsQuery(), parentBuilder); |
442,799 | public void flush(SegmentWriteState state, Sorter.DocMap sortMap, DocValuesConsumer dvConsumer) throws IOException {<NEW_LINE>bytes.freeze(false);<NEW_LINE>if (finalLengths == null) {<NEW_LINE>finalLengths = this.lengths.build();<NEW_LINE>}<NEW_LINE>final BinaryDVs sorted;<NEW_LINE>if (sortMap != null) {<NEW_LINE>sorte... | ), docsWithField.iterator()); |
628,065 | public void encode(MessageTree tree, ByteBuf buf) {<NEW_LINE>Message message = tree.getMessage();<NEW_LINE>if (message instanceof Transaction) {<NEW_LINE>int count = 0;<NEW_LINE>int index = buf.writerIndex();<NEW_LINE>BufferHelper helper = m_bufferHelper;<NEW_LINE>Transaction t = (Transaction) message;<NEW_LINE>Locator... | * calculateLines(t) + 10); |
1,202,009 | public // TODO Can we optimize this algo?<NEW_LINE>Token findToken(int position) {<NEW_LINE>TextRange textRangeWithMinutiae = textRangeWithMinutiae();<NEW_LINE>// Check whether this position is the same as the end text position of the text.<NEW_LINE>// If that is the case, return the eof token.<NEW_LINE>// Fixes 24905<... | textRangeWithMinutiae.endOffset() + "'"); |
1,529,641 | public void execute(Project project) {<NEW_LINE>SwiftXCTestSuite component = project.getExtensions().getByType(SwiftXCTestSuite.class);<NEW_LINE>FileCollection sources = component.getSwiftSource();<NEW_LINE>xcodeProject.getGroups().getTests().from(sources);<NEW_LINE>String targetName = component.getModule().get();<NEW_... | , getBridgeTaskPath(project), sources); |
1,786,878 | private static void tryMT(RegressionEnvironment env, int numSeconds, int numWriteThreads) throws InterruptedException {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>String eplCreateVariable = "@public create table varagg (c0 int, c1 int, c2 int, c3 int, c4 int, c5 int)";<NEW_LINE>env.compileDeploy(eplC... | String eplMerge = "on SupportBean_S0 merge varagg " + "when not matched then insert select -1 as c0, -1 as c1, -1 as c2, -1 as c3, -1 as c4, -1 as c5 " + "when matched then update set c0=id, c1=id, c2=id, c3=id, c4=id, c5=id"; |
1,479,061 | public void packColumn(final TableColumn column) {<NEW_LINE>//<NEW_LINE>// Check if we have fixed length set from GridField<NEW_LINE>final int widthFixed = getFixedWidth(column);<NEW_LINE>if (widthFixed > 0) {<NEW_LINE>column.setPreferredWidth(widthFixed);<NEW_LINE>column.setWidth(widthFixed);<NEW_LINE>return;<NEW_LINE... | min(MAXSIZE, width + SLACK); |
1,585,848 | private String buildQualifiedName(DeclaredType type, TypeElement typeElement, ExecutableElement enclosedElement) {<NEW_LINE>String qualifiedName = enclosedElement.getSimpleName().toString();<NEW_LINE>qualifiedName += "(" + enclosedElement.getParameters().stream().map(variableElement -> types.erasure(variableElement.asT... | get(key).toString(); |
1,367,983 | private void refreshRemoteVideo() {<NEW_LINE>if (mRemoteUserIdList.size() > 0) {<NEW_LINE>for (int i = 0; i < mRemoteUserIdList.size() || i < 6; i++) {<NEW_LINE>if (i < mRemoteUserIdList.size() && !TextUtils.isEmpty(mRemoteUserIdList.get(i))) {<NEW_LINE>mRemoteVideoList.get(i).setVisibility(View.VISIBLE);<NEW_LINE>mRem... | ).setVisibility(View.GONE); |
666,114 | // The tested exceptions cause FFDC so we have to allow for this.<NEW_LINE>@AllowedFFDC<NEW_LINE>public void launchFaultToleranceTCK() throws Exception {<NEW_LINE>boolean isFullMode = TestModeFilter.shouldRun(TestMode.FULL);<NEW_LINE>String suiteFileName = isFullMode ? "tck-suite.xml" : "tck-suite-lite.xml";<NEW_LINE>M... | resultInfo.put("results_type", "MicroProfile"); |
1,765,209 | private void passwordWarningClicked() {<NEW_LINE>if (dialog == null) {<NEW_LINE>final String[] items = { getString(R.string.admin_password), getString(R.string.server_password) };<NEW_LINE>dialog = new MaterialAlertDialogBuilder(getActivity()).setTitle(R.string.include_password_dialog).setMultiChoiceItems(items, checke... | .setEnabled(passwordsSet[itemIndex]); |
559,044 | private Properties loadConfig() {<NEW_LINE>Properties properties = defaultProperties();<NEW_LINE>Iterator<String> it = Config.getKeys();<NEW_LINE>while (it.hasNext()) {<NEW_LINE>final String key = it.next();<NEW_LINE>if (key == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (key.startsWith("felix.")) {<NEW_LINE>fina... | Config.getStringProperty(key) : null; |
1,060,580 | private void buildHeader() {<NEW_LINE>OsmandApplication app = getMyApplication();<NEW_LINE>if (app != null && view != null) {<NEW_LINE>final ImageView iconView = (ImageView) view.findViewById(R.id.context_menu_icon_view);<NEW_LINE>Drawable icon = menu.getRightIcon();<NEW_LINE>int iconId = menu.getRightIconId();<NEW_LIN... | getResources().getDimensionPixelSize(sizeId); |
443,112 | private static boolean parseAndCheckForTokenEquivalence(String first, String second, Context context) {<NEW_LINE>ImmutableList<ErrorProneToken> tokens1 = ErrorProneTokens.getTokens(SEMICOLON.trimTrailingFrom(first), context);<NEW_LINE>ImmutableList<ErrorProneToken> tokens2 = ErrorProneTokens.getTokens(SEMICOLON.trimTra... | token2 = tokens2.get(i); |
1,625,682 | public BatchGetReportsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>BatchGetReportsResult batchGetReportsResult = new BatchGetReportsResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token =... | String currentParentElement = context.getCurrentParentElement(); |
1,647,532 | public static byte[] decryptFile(File file, byte[] encryptionKeyBytes, byte[] iv, byte[] authenticationTag) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException, NoSuchPaddingException, InvalidKeyException, BadPaddingException, IllegalBlockSizeException, IOException {<NEW_LINE>Cipher cipher = Cipher.getI... | Cipher.DECRYPT_MODE, key, spec); |
1,270,607 | public void loadNode(int AD_Tree_Favorite_ID) {<NEW_LINE>String displayQuery = "SELECT fn.ad_tree_favorite_node_id, fn.parent_id, fn.seqno, fn.nodename, fn.issummary, fn.ad_menu_id, iscollapsible," + " coalesce(t.name, m.name) as menuTrl " + " FROM ad_tree_favorite_node fn " + " LEFT JOIN AD_Menu m on (m.AD_Menu_ID =... | NodeID = rs.getInt(1); |
1,623,100 | Charset parseCharset(@Nullable String contentTypeValue) {<NEW_LINE>if (contentTypeValue != null) {<NEW_LINE>String charsetRaw = null;<NEW_LINE>int indexOfCharset = contentTypeValue.toLowerCase().indexOf(CHARSET_PREFIX);<NEW_LINE>if (indexOfCharset != -1) {<NEW_LINE>int indexOfEncoding = indexOfCharset + CHARSET_PREFIX.... | charsetRaw.length() - 1); |
695,790 | public static String toSdpString(final String id, List<Parameter> parameters) {<NEW_LINE>final StringBuilder stringBuilder = new StringBuilder();<NEW_LINE>stringBuilder.append(id).append(' ');<NEW_LINE>for (int i = 0; i < parameters.size(); ++i) {<NEW_LINE>final Parameter <MASK><NEW_LINE>final String name = p.getParame... | p = parameters.get(i); |
160,405 | public SmartHomeAppliance unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>SmartHomeAppliance smartHomeAppliance = new SmartHomeAppliance();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth =... | class).unmarshall(context)); |
1,085,705 | private void browseForIcons() {<NEW_LINE>GhidraFileChooser iconFileChooser = new GhidraFileChooser(getComponent());<NEW_LINE>iconFileChooser.setFileSelectionMode(GhidraFileChooser.FILES_ONLY);<NEW_LINE>iconFileChooser.setTitle("Choose Icon");<NEW_LINE>iconFileChooser.setApproveButtonToolTipText("Choose Icon");<NEW_LINE... | ToolIconURL url = new ToolIconURL(filename); |
366,973 | void updateRowOfSeederState(int srcId, long rowId) throws SQLException {<NEW_LINE><MASK><NEW_LINE>PreparedStatement stmt = null;<NEW_LINE>try {<NEW_LINE>StringBuilder sql = new StringBuilder();<NEW_LINE>// sql.append("insert into bootstrap_applier_state ");<NEW_LINE>// sql.append("values (?,?,?,?) ");<NEW_LINE>// sql.a... | Connection conn = _bootstrapConn.getDBConn(); |
522,424 | public final static Meteor build(HttpServletRequest req, Broadcaster.SCOPE scope, List<BroadcastFilter> l, Serializer s) {<NEW_LINE>AtmosphereResource r = (AtmosphereResource) req.getAttribute(ATMOSPHERE_RESOURCE);<NEW_LINE>if (r == null)<NEW_LINE>throw new IllegalStateException("MeteorServlet not defined in web.xml");... | AtmosphereResourceImpl.SKIP_BROADCASTER_CREATION, Boolean.TRUE); |
143,432 | protected JPanel createPanel() {<NEW_LINE>JPanel panel = new JPanel();<NEW_LINE>BoxLayout boxLayout = new BoxLayout(panel, BoxLayout.Y_AXIS);<NEW_LINE>panel.setLayout(boxLayout);<NEW_LINE>panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));<NEW_LINE>for (String currentRegister : extent.getContextRegisters(... | = new JTextField(currentRegister, TEXT_FIELD_COLUMNS); |
769,604 | protected void connect(WifiConfiguration wifiConfiguration, WifiManager.ActionListener listener) {<NEW_LINE>WifiInfo wifiInfo = getConnectionInfo();<NEW_LINE>String ssid = isQuoted(wifiConfiguration.SSID) ? stripQuotes(wifiConfiguration.SSID) : wifiConfiguration.SSID;<NEW_LINE>ShadowWifiInfo shadowWifiInfo = Shadow.ext... | shadowWifiInfo.setNetworkId(wifiConfiguration.networkId); |
1,291,062 | public LabelNameCondition unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>LabelNameCondition labelNameCondition = new LabelNameCondition();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken t... | int originalDepth = context.getCurrentDepth(); |
1,143,068 | private boolean debugEmptyMapping(FileObject javaFile) {<NEW_LINE>JavaSource js = JavaSource.forFileObject(javaFile);<NEW_LINE>if (isWebService(js)) {<NEW_LINE>// cannot debug web service implementation file<NEW_LINE>String mes = // NOI18N<NEW_LINE>java.text.MessageFormat.// NOI18N<NEW_LINE>format(// NOI18N<NEW_LINE>Nb... | { javaFile.getName() }); |
1,479,751 | private Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, String factoryName, DeleteDataFlowDebugSessionRequest request, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and ... | error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); |
1,638,045 | public //<NEW_LINE>void beforeRun() {<NEW_LINE>if (this.isDynamicBackground()) {<NEW_LINE>steps = scenario.getBackgroundSteps();<NEW_LINE>} else {<NEW_LINE>steps = scenario.getStepsIncludingBackground();<NEW_LINE>}<NEW_LINE>ScenarioEngine.set(engine);<NEW_LINE>engine.init();<NEW_LINE>if (this.background != null) {<NEW_... | engine.setRobot(backgroundEngine.robot); |
33,210 | void draw(Graphics g) {<NEW_LINE>boolean selected = needsHighlight();<NEW_LINE>Font f = new Font("SansSerif", selected ? Font.BOLD : 0, 14);<NEW_LINE>g.setFont(f);<NEW_LINE>g.setColor(selected ? selectColor : whiteColor);<NEW_LINE>String s = (flags & FLAG_VALUE) != 0 ? getUnitTextWithScale(volts[0], "V", scale<MASK><NE... | ) : sim.LS("out"); |
933,549 | private static File createPernsistenceXml(List<Class<?>> classes, File directory) throws Exception {<NEW_LINE>Document document = DocumentHelper.createDocument();<NEW_LINE>Element persistence = document.addElement("persistence", "http://java.sun.com/xml/ns/persistence");<NEW_LINE>persistence.addAttribute(QName.get("sch... | addText(o.getCanonicalName()); |
131,996 | public static OrderBook adaptOrders(BitZOrders bitZOrders, CurrencyPair currencyPair) {<NEW_LINE>Date timestamp = DateUtils.fromMillisUtc(bitZOrders.getTimestamp());<NEW_LINE>List<LimitOrder> asks = new ArrayList<LimitOrder>();<NEW_LINE>List<LimitOrder> bids <MASK><NEW_LINE>for (BitZPublicOrder order : bitZOrders.getAs... | = new ArrayList<LimitOrder>(); |
109,129 | public void updateColors(@NonNull TextState textState) {<NEW_LINE>super.updateColors(textState);<NEW_LINE>shadowRadius = textState.textShadowRadius;<NEW_LINE>boolean <MASK><NEW_LINE>view.setBackgroundResource(portrait ? textState.boxTop : textState.boxFree);<NEW_LINE>TextView waypointText = view.findViewById(R.id.waypo... | portrait = AndroidUiHelper.isOrientationPortrait(mapActivity); |
87,362 | // Try to guess world type from Minecraft 1.16 generator settings<NEW_LINE>private static WorldType tryGuessWorldType(CompoundTag dataTag) {<NEW_LINE>// Be careful when handling null values, we don't want to trigger unwanted errors<NEW_LINE>Tag<?> generator = NBTUtils.getNestedTag(dataTag, <MASK><NEW_LINE>Tag<?> genera... | "WorldGenSettings", "dimensions", "minecraft:overworld", "generator"); |
721,301 | public InspectorV3 createInspector(Context context, InspectorV3.InspectorResponse response) {<NEW_LINE>String query = uri.getQueryParameter("q");<NEW_LINE>SortType popular = SortType.findFromAddition(uri.getQueryParameter("sort"));<NEW_LINE>if (requestType == ApiRequestType.FAVORITE)<NEW_LINE>return InspectorV3.favorit... | .url), null, response); |
236,789 | protected void addCommandBrowseAction(final JPanel pane, FixedSizeButton browseCommandButton, JTextField tfCommand) {<NEW_LINE>browseCommandButton.addActionListener(new ActionListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void actionPerformed(ActionEvent e) {<NEW_LINE>FileChooserDescriptor descriptor = FileC... | createPathChooser(descriptor, myProject, pane); |
800,985 | final DescribeProvisioningTemplateVersionResult executeDescribeProvisioningTemplateVersion(DescribeProvisioningTemplateVersionRequest describeProvisioningTemplateVersionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeProvisioningTemplateVersionRequest);<NEW_LINE>AWSRequestMetrics ... | false), new DescribeProvisioningTemplateVersionResultJsonUnmarshaller()); |
1,460,317 | public static DescribeGroupedVulResponse unmarshall(DescribeGroupedVulResponse describeGroupedVulResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeGroupedVulResponse.setRequestId(_ctx.stringValue("DescribeGroupedVulResponse.RequestId"));<NEW_LINE>describeGroupedVulResponse.setCurrentPage(_ctx.integerValue("Describ... | ("DescribeGroupedVulResponse.GroupedVulItems[" + i + "].AsapCount")); |
489,617 | final AddInstanceGroupsResult executeAddInstanceGroups(AddInstanceGroupsRequest addInstanceGroupsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(addInstanceGroupsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.st... | (super.beforeMarshalling(addInstanceGroupsRequest)); |
1,237,510 | static void displayEditPanel(TransactionNode node) {<NEW_LINE>MonitorData md = null;<NEW_LINE>// We retrieve the data from the file system, not from the<NEW_LINE>// cache<NEW_LINE>md = // from file<NEW_LINE>Controller.getInstance().// from file<NEW_LINE>getMonitorData(// from file<NEW_LINE>node, // don't cache<NEW_LINE... | removeParametersFromQuery(md.getRequestData()); |
1,076,436 | private static ReadOnlyBinaryDictionary createReadOnlyBinaryDictionary(final Context context, final Locale locale) {<NEW_LINE>AssetFileDescriptor afd = null;<NEW_LINE>try {<NEW_LINE>final int resId = DictionaryInfoUtils.getMainDictionaryResourceIdIfAvailableForLocale(context.getResources(), locale);<NEW_LINE>if (0 == r... | Log.e(TAG, "Could not find the resource"); |
1,087,324 | protected static String literalBitsComment(CstLiteralBits value, int width) {<NEW_LINE>StringBuffer sb = new StringBuffer(20);<NEW_LINE>sb.append("#");<NEW_LINE>long bits;<NEW_LINE>if (value instanceof CstLiteral64) {<NEW_LINE>bits = ((CstLiteral64) value).getLongBits();<NEW_LINE>} else {<NEW_LINE>bits = value.getIntBi... | (Hex.u8(bits)); |
1,393,824 | private void toSlime(String hostname, Cursor object) {<NEW_LINE>Node node = nodeRepository.nodes().node(hostname).orElseThrow(() -> new NotFoundException("No node with hostname '" + hostname + "'"));<NEW_LINE>List<NodeAcl> acls = aclsForChildren ? nodeRepository.getChildAcls(node) : List.of(node.acl(nodeRepository.node... | (), nodeAcl, trustedPortsArray)); |
822,378 | protected <T extends Block> BlockEntry<?> createEntry(AbstractRegistrate<?> registrate, Variant<T> variant, WeatherState state, boolean waxed) {<NEW_LINE>String name = "";<NEW_LINE>if (waxed) {<NEW_LINE>name += "waxed_";<NEW_LINE>}<NEW_LINE>name += getWeatherStatePrefix(state);<NEW_LINE>name += this.name;<NEW_LINE>Stri... | .getName() + "_from_honeycomb")); |
99,893 | private static void optimizeOperator(int operator, ASTNode tk, ASTNode tkOp, ASTLinkedList astLinkedList, ASTLinkedList optimizedAst, ParserContext pCtx) {<NEW_LINE>switch(operator) {<NEW_LINE>case Operator.REGEX:<NEW_LINE>optimizedAst.addTokenNode(new RegExMatchNode(tk, astLinkedList.nextNode(), pCtx));<NEW_LINE>break... | .nextNode(), pCtx)); |
679,801 | private Set<String> parseHandlesOutput(File pluginOutputFile) {<NEW_LINE>String line;<NEW_LINE>Set<String> fileSet = new HashSet<>();<NEW_LINE>try (BufferedReader br = new BufferedReader(new FileReader(pluginOutputFile))) {<NEW_LINE>// Ignore the first two header lines<NEW_LINE>br.readLine();<NEW_LINE>br.readLine();<NE... | , file_path.indexOf('\"')); |
255,140 | public void marshall(GeneralName generalName, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (generalName == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(generalName.getOtherName(), OTHERNAME_BINDING);<NEW... | generalName.getRegisteredId(), REGISTEREDID_BINDING); |
1,524,075 | final DBSubnetGroup executeModifyDBSubnetGroup(ModifyDBSubnetGroupRequest modifyDBSubnetGroupRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(modifyDBSubnetGroupRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ModifyDBSubnetGroupReq... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
154,232 | public Module commitModule(@NotNull Project project, @Nullable ModifiableModuleModel model) {<NEW_LINE>final String basePath = getModuleFileDirectory();<NEW_LINE>if (basePath == null) {<NEW_LINE>Messages.showErrorDialog("Module path not set", "Internal Error");<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final VirtualFil... | updateKnownSdkPaths(sdk.getHomePath()); |
1,098,896 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_main);<NEW_LINE>RecyclerView recyclerView = findViewById(R.id.list);<NEW_LINE>recyclerView.setLayoutManager(new LinearLayoutManager(this));<NEW_LINE>List<Type> dataSet = new ArrayL... | dataSet.add(Type.Contrast); |
1,028,089 | static Index identifyIndexToUse(List<Index> allIndexes) {<NEW_LINE>Index bestCandidateIndex = null;<NEW_LINE>double solrVerFound = 0.0;<NEW_LINE>double schemaVerFound = 0.0;<NEW_LINE>for (Index index : allIndexes) {<NEW_LINE>if (NumberUtils.toDouble(index.getSolrVersion()) > CURRENT_SOLR_VERSION_INT) {<NEW_LINE>// "leg... | toDouble(index.getSolrVersion()); |
1,056,565 | private void decodeDescriptorValueLabel(BufferedInputStream stream, int nvar) throws IOException {<NEW_LINE>valueLabelsLookupTable = new String[nvar];<NEW_LINE>int length_label_name = constantTable.get("NAME");<NEW_LINE>int length_label_name_list = length_label_name * nvar;<NEW_LINE>dbgLog.fine("length_label_name=" + l... | ] labelNames = new String[nvar]; |
1,272,263 | private void writeMetaFile(String className, List<Pair<Element, Integer>> elements, BiConsumer<Pair<Element, Integer>, Map<String, String>> processElement) {<NEW_LINE>final Pair<String, String> pair = splitClassName(className);<NEW_LINE>final String packageName = pair.first();<NEW_LINE>final String simpleClassName = pa... | processElement.accept(element, metas); |
609,091 | public static List<RegressionExecution> executions() {<NEW_LINE>List<RegressionExecution> execs = new ArrayList<>();<NEW_LINE>execs.add(new EPLScriptScripts());<NEW_LINE>execs.add(new EPLScriptQuoteEscape());<NEW_LINE>execs.add(new EPLScriptScriptReturningEvents());<NEW_LINE>execs.add(new EPLScriptDocSamples());<NEW_LI... | .add(new EPLScriptReturnNullWhenNumeric()); |
1,235,003 | public void encodeTerm(DataOutput out, FieldInfo fieldInfo, BlockTermState _state, boolean absolute) throws IOException {<NEW_LINE>IntBlockTermState state = (IntBlockTermState) _state;<NEW_LINE>if (absolute) {<NEW_LINE>lastState = emptyState;<NEW_LINE>assert lastState.docStartFP == 0;<NEW_LINE>}<NEW_LINE>if (lastState.... | out.writeVInt(state.singletonDocID); |
604,219 | public <T extends ImageBase<T>> SimpleImageSequence<T> open(String device, int width, int height, ImageType<T> imageType) {<NEW_LINE>if (device != null) {<NEW_LINE>Webcam webcam;<NEW_LINE>try {<NEW_LINE>int which = Integer.parseInt(device);<NEW_LINE>webcam = Webcam.getWebcams().get(which);<NEW_LINE>} catch (NumberForma... | throw new RuntimeException("Can't find webcam with ID or name at " + device); |
850,821 | private void writeAsPDF(File file, int w, int h) {<NEW_LINE>if (!ChartUtils.isOrsonPDFAvailable()) {<NEW_LINE>throw new IllegalStateException("OrsonPDF is not present on the classpath.");<NEW_LINE>}<NEW_LINE>Args.nullNotPermitted(file, "file");<NEW_LINE>try {<NEW_LINE>Class<?> pdfDocClass = Class.forName("com.orsonpdf.... | .getDeclaredConstructor().newInstance(); |
1,312,239 | public static AutogenEnvironmentDiff fromProto(ai.verta.modeldb.versioning.EnvironmentDiff blob) {<NEW_LINE>if (blob == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>AutogenEnvironmentDiff obj = new AutogenEnvironmentDiff();<NEW_LINE>{<NEW_LINE>Function<ai.verta.modeldb.versioning.EnvironmentDiff, AutogenCommandLin... | fromProto(blob.getDocker()); |
996,926 | public void createIcon(Context context, long did) {<NEW_LINE>// This code should not be reachable with lower versions<NEW_LINE>ShortcutInfoCompat shortcut = new ShortcutInfoCompat.Builder(this, Long.toString(did)).setIntent(new Intent(context, Reviewer.class).setAction(Intent.ACTION_VIEW).putExtra("deckId", did)).setIc... | requestPinShortcut(this, shortcut, null); |
850,971 | final DeleteDeploymentStrategyResult executeDeleteDeploymentStrategy(DeleteDeploymentStrategyRequest deleteDeploymentStrategyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteDeploymentStrategyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetri... | false), new DeleteDeploymentStrategyResultJsonUnmarshaller()); |
1,384,101 | public HKerberosThriftClient open() {<NEW_LINE>if (isOpen()) {<NEW_LINE>throw new IllegalStateException("Open called on already open connection. You should not have gotten here.");<NEW_LINE>}<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug("Creating a new thrift connection to {}", cassandraHost);<NEW_LINE>}<NEW... | getPort(), timeout, params); |
847,652 | public List<String> watchedVideosByFriends(List<List<String>> watchedVideos, int[][] friends, int id, int level) {<NEW_LINE>int n = friends.length;<NEW_LINE>boolean[<MASK><NEW_LINE>Deque<Integer> q = new LinkedList<>();<NEW_LINE>q.offerLast(id);<NEW_LINE>vis[id] = true;<NEW_LINE>while (level-- > 0) {<NEW_LINE>for (int ... | ] vis = new boolean[n]; |
1,846,194 | private boolean evaluateIsoSurface(VecD up, VecD direction) {<NEW_LINE>VecD pos = getFirstIntersectionWithHint(direction);<NEW_LINE>if (pos == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>VecD right = direction.cross(up).normalize().multiply(SMOOTHNESS_ROTATION / SMOOTHNESS_GRID_SIZE);<NEW_LINE>up = up.multiply(S... | .add(normal), up); |
1,502,868 | public String _nextDueMsg(@NonNull Context context) {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>if (revDue()) {<NEW_LINE>sb.append("\n\n");<NEW_LINE>sb.append(context.getString(R.string.studyoptions_congrats_more_rev));<NEW_LINE>}<NEW_LINE>if (newDue()) {<NEW_LINE>sb.append("\n\n");<NEW_LINE>sb.append(c... | getString(R.string.sched_unbury_action); |
1,812,339 | /*<NEW_LINE>* (non-Javadoc)<NEW_LINE>* @see com.aptana.preview.IPreviewHandler#handle(com.aptana.preview.SourceConfig)<NEW_LINE>*/<NEW_LINE>public PreviewConfig handle(SourceConfig config) throws CoreException {<NEW_LINE>if (config.getContent() != null) {<NEW_LINE>// we're not handling content preview requests<NEW_LINE... | getServerConfiguration(config.getProject()); |
725,564 | private void init(Context context, AttributeSet attrs) {<NEW_LINE>LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);<NEW_LINE>inflater.inflate(R.layout.layout_slidebar, this, true);<NEW_LINE>backgroundView = findViewById(R.id.slidebar_root_bg);<NEW_LINE>mText = findVie... | R.styleable.UnlockBar_textAlign, TEXT_ALIGN_CENTER); |
1,229,022 | public Message<?> postProcessResult(Object result, Message<?> input) {<NEW_LINE>Object convertedResult = result;<NEW_LINE>if (this.messageConverter != null && CLOUD_EVENT_CLASS != null && CLOUD_EVENT_CLASS.isAssignableFrom(result.getClass())) {<NEW_LINE>convertedResult = this.messageConverter.toMessage(result, input.ge... | targetPrefix, "Unable to determine prefix for Cloud Event atttributes, " + "which they must have according to protocol specification. Consider adding 'target-protocol' " + "header with values of one of the supported protocols - [kafka, amqp, http]"); |
113,678 | final GetEnabledStandardsResult executeGetEnabledStandards(GetEnabledStandardsRequest getEnabledStandardsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getEnabledStandardsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.