idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
3,519 | public static OkHttpClient.Builder newBuilder() {<NEW_LINE>Log.d(TAG, "Creating new instance of HTTP client");<NEW_LINE>System.setProperty("http.maxConnections", String.valueOf(MAX_CONNECTIONS));<NEW_LINE>OkHttpClient.Builder builder = new OkHttpClient.Builder();<NEW_LINE>builder.interceptors().add(new BasicAuthorizati... | "Proxy-Authorization", credentials).build(); |
1,644,578 | final PutLogEventsResult executePutLogEvents(PutLogEventsRequest putLogEventsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(putLogEventsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | (super.beforeMarshalling(putLogEventsRequest)); |
472,808 | private MetaDataRegisterDTO buildMetaDataDTO(final ServiceBean<?> serviceBean, final ShenyuDubboClient shenyuDubboClient, final Method method) {<NEW_LINE>String path = contextPath + shenyuDubboClient.path();<NEW_LINE>String desc = shenyuDubboClient.desc();<NEW_LINE>String serviceName = serviceBean.getInterface();<NEW_L... | (Collectors.joining(",")); |
1,082,873 | public static void horizontal11(Kernel1D_S32 kernel, GrayS16 input, GrayI16 output, int skip) {<NEW_LINE>final short[] dataSrc = input.data;<NEW_LINE>final short[] dataDst = output.data;<NEW_LINE>final int k1 = kernel.data[0];<NEW_LINE>final int k2 = kernel.data[1];<NEW_LINE>final int k3 = kernel.data[2];<NEW_LINE>fina... | k10 = kernel.data[9]; |
1,607,928 | public static DescribeVmBackupPlanExecutionsResponse unmarshall(DescribeVmBackupPlanExecutionsResponse describeVmBackupPlanExecutionsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeVmBackupPlanExecutionsResponse.setRequestId(_ctx.stringValue("DescribeVmBackupPlanExecutionsResponse.RequestId"));<NEW_LINE>describe... | (_ctx.integerValue("DescribeVmBackupPlanExecutionsResponse.PageSize")); |
1,539,678 | private void redrawBorderForSquareCorners(@NonNull Canvas canvas) {<NEW_LINE>if (all(mCornersRounded)) {<NEW_LINE>// no square corners<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (mCornerRadius == 0) {<NEW_LINE>// no round corners<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>float left = mDrawableRect.left;<NEW_LINE>float top = mD... | = left + mDrawableRect.width(); |
612,126 | public static void copyImagePullSecret(String namespace) {<NEW_LINE>LOGGER.info("Checking if secret {} is in the default namespace", Environment.SYSTEM_TEST_STRIMZI_IMAGE_PULL_SECRET);<NEW_LINE>if (kubeClient("default").getSecret(Environment.SYSTEM_TEST_STRIMZI_IMAGE_PULL_SECRET) == null) {<NEW_LINE>throw new RuntimeEx... | ))).build()); |
1,004,790 | protected void loadAllTransGroupList() {<NEW_LINE>List<Group> groups = matrix.getGroups();<NEW_LINE>List<Group> scaleGroups = matrix.getScaleOutGroups();<NEW_LINE>List<String> groupNames = new ArrayList<>(groups.size(<MASK><NEW_LINE>for (Group group : groups) {<NEW_LINE>if (group.getType().isMysql()) {<NEW_LINE>groupNa... | ) + scaleGroups.size()); |
1,666,026 | public void initialize() {<NEW_LINE>addTitledGroupBg(root, gridRow, 3, Res.get("account.menu.walletInfo.balance.headLine"));<NEW_LINE>addMultilineLabel(root, gridRow, Res.get("account.menu.walletInfo.balance.info"), Layout.FIRST_ROW_DISTANCE, Double.MAX_VALUE);<NEW_LINE>btcTextField = addTopLabelTextField(root, ++gridR... | , "44'/0'/1'", -Layout.FLOATING_LABEL_DISTANCE); |
835,260 | private void initializeOutput(int type) {<NEW_LINE>if (state_ == CHUNK_PRE_OUTPUT) {<NEW_LINE>hasErrors_ = false;<NEW_LINE>state_ = CHUNK_POST_OUTPUT;<NEW_LINE>} else if (state_ == CHUNK_POST_OUTPUT && presenter_ instanceof ChunkOutputStream && (isBlockType(type) || isBlockType(type) != isBlockType(lastOutputType_))) {... | int ordinal = stream.getContentOrdinal(); |
1,398,538 | // GEN-LAST:event_bnCancelActionPerformed<NEW_LINE>@Messages({ "AddNewOrganizationDialog.bnOk.addFailed.text=Failed to add new organization." })<NEW_LINE>private void bnOKActionPerformed(java.awt.event.ActionEvent evt) {<NEW_LINE>// GEN-FIRST:event_bnOKActionPerformed<NEW_LINE>try {<NEW_LINE>CentralRepository dbManager... | getOrganizationByID(organizationToEdit.getOrgID()); |
1,836,538 | private static ChangeBlockEvent.Place createAndPostChangeBlockEventPlaceMulti(CauseStackManager.StackFrame frame, ForgeToSpongeEventData eventData) {<NEW_LINE>final BlockEvent.MultiPlaceEvent forgeEvent = (BlockEvent.MultiPlaceEvent) eventData.getForgeEvent();<NEW_LINE>final net.minecraft.world.World world = forgeEvent... | ForgeBlockSnapshotBridge_Forge) blockSnapshot).forgeBridge$toSpongeSnapshot(); |
1,298,245 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_main);<NEW_LINE>// authentication with an API key or named user is required to access basemaps and other<NEW_LINE>// location services<NEW_LINE>ArcGISRuntimeEnvironment.setApiKey(B... | = new ArcGISMap(BasemapStyle.ARCGIS_STREETS); |
1,715,657 | private static void addDeserializers(SimpleModule module, JsonDeserializer[] replacementJsonDeserializers) {<NEW_LINE>List<JsonDeserializer> jsonDeserializers = // expectation<NEW_LINE>Arrays.// expectation<NEW_LINE>asList(// request<NEW_LINE>new OpenAPIExpectationDTODeserializer(), // times<NEW_LINE>new RequestDefinit... | (), new CookiesDeserializer()); |
1,401,172 | protected Image resolveIcon() {<NEW_LINE>try {<NEW_LINE>int snapshotType = getLoadedSnapshot().getType();<NEW_LINE>switch(snapshotType) {<NEW_LINE>case LoadedSnapshot.SNAPSHOT_TYPE_CPU:<NEW_LINE>return ImageUtilities.mergeImages(CPU_ICON, NODE_BADGE, 0, 0);<NEW_LINE>case LoadedSnapshot.SNAPSHOT_TYPE_CPU_JDBC:<NEW_LINE>... | MEMORY_ICON, NODE_BADGE, 0, 0); |
417,672 | public void drawSheared(float x, float y, float hshear, float vshear, Color filter) {<NEW_LINE>if (alpha != 1) {<NEW_LINE>if (filter == null) {<NEW_LINE>filter = Color.white;<NEW_LINE>}<NEW_LINE>filter = new Color(filter);<NEW_LINE>filter.a *= alpha;<NEW_LINE>}<NEW_LINE>if (filter != null) {<NEW_LINE>filter.bind();<NEW... | -centerX, -centerY, 0.0f); |
1,689,584 | private void logTimes(long startTime, String sourceIP, long renderStartTime, long commitStartTime, long endTime, String req, String normalizedQuery, Timing t) {<NEW_LINE>// note: intentionally only taking time since request was received<NEW_LINE>long totalTime = endTime - startTime;<NEW_LINE>long timeoutInterval = Long... | - renderStartTime).append(" ms. "); |
366,994 | public static <C> SuiteImpacts newInstance(CheckSuite<C> suite, C checkable) {<NEW_LINE>final List<Check<C>> checks = suite.getChecks();<NEW_LINE>final int nb = checks.size();<NEW_LINE>// Build names & weights<NEW_LINE>String[] names = new String[nb];<NEW_LINE>double[] weights = new double[nb];<NEW_LINE>for (int i = 0;... | i] = check.getName(); |
1,480,913 | public static CreateSiteMonitorResponse unmarshall(CreateSiteMonitorResponse createSiteMonitorResponse, UnmarshallerContext _ctx) {<NEW_LINE>createSiteMonitorResponse.setRequestId(_ctx.stringValue("CreateSiteMonitorResponse.RequestId"));<NEW_LINE>createSiteMonitorResponse.setCode(_ctx.stringValue("CreateSiteMonitorResp... | ("CreateSiteMonitorResponse.CreateResultList[" + i + "].TaskName")); |
1,012,305 | public static void dense3x3(final GrayU8 input, final GrayU8 output) {<NEW_LINE>final int height = input.height - 1;<NEW_LINE>final byte[] src = input.data;<NEW_LINE>// pre-compute offsets to pixels. row-major starting from upper row<NEW_LINE>final int offset0 = -input.stride - 1;<NEW_LINE>final int offset1 = -input.st... | + y * input.stride + 1; |
210,650 | public void marshall(RunJobFlowRequest runJobFlowRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (runJobFlowRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(runJobFlowRequest.getName(), NAME... | runJobFlowRequest.getAutoScalingRole(), AUTOSCALINGROLE_BINDING); |
636,525 | private synchronized void createGroupIfNecessary(SelectionContext<C> context, Executor executor) {<NEW_LINE>ResourceGroupId id = context.getResourceGroupId();<NEW_LINE>if (!groups.containsKey(id)) {<NEW_LINE>InternalResourceGroup group;<NEW_LINE>if (id.getParent().isPresent()) {<NEW_LINE>createGroupIfNecessary(configur... | .parentGroupContext(context), executor); |
168,467 | void mergeRealms(OsAccountRealm sourceRealm, OsAccountRealm destRealm, CaseDbTransaction trans) throws TskCoreException {<NEW_LINE>// Update accounts<NEW_LINE>db.getOsAccountManager().mergeOsAccountsForRealms(sourceRealm, destRealm, trans);<NEW_LINE>// Update the sourceRealm realm<NEW_LINE>CaseDbConnection connection =... | null, trans.getConnection()); |
809,032 | public static CodegenExpression codegen(ExprNewStructNodeForge forge, CodegenMethodScope codegenMethodScope, ExprForgeCodegenSymbol exprSymbol, CodegenClassScope codegenClassScope) {<NEW_LINE>CodegenMethod methodNode = codegenMethodScope.makeChild(EPTypePremade.MAP.getEPType(), ExprNewStructNodeForgeEval.class, codegen... | .methodReturn(ref("props")); |
972,964 | public boolean handleFacadeClick(@Nonnull World world1, @Nonnull BlockPos placeAt, @Nonnull EntityPlayer player, @Nonnull EnumFacing opposite, @Nonnull ItemStack stack, @Nonnull EnumHand hand, float hitX, float hitY, float hitZ) {<NEW_LINE>// Add facade<NEW_LINE>if (player.isSneaking()) {<NEW_LINE>return false;<NEW_LIN... | .getMetaFromType(getFacadeType())); |
1,846,590 | private void updateSearchViewState(boolean enter) {<NEW_LINE>int hide = enter ? View.GONE : View.VISIBLE;<NEW_LINE>listView.setVisibility(hide);<NEW_LINE>searchListView.setVisibility(enter ? View.VISIBLE : View.GONE);<NEW_LINE>searchItem.getSearchContainer().setVisibility(enter ? View.VISIBLE : View.GONE);<NEW_LINE>act... | [1].setVisibility(hide); |
877,020 | private static void constructActionGraphAndArtifactList(ListeningExecutorService executorService, MutableActionGraph actionGraph, ConcurrentMap<String, Object> pathFragmentTrieRoot, Sharder<ActionLookupValue> actionLookupValues, boolean strictConflictChecks, ConcurrentMap<ActionAnalysisMetadata, ConflictException> badA... | throw new IllegalStateException("Unexpected exception", e); |
1,217,521 | public void loadDynamicClasses() {<NEW_LINE>final ArrayList<SootClass> dynamicClasses = new ArrayList<>();<NEW_LINE>final Options opts = Options.v();<NEW_LINE>final Map<String, List<String>> temp = new HashMap<>();<NEW_LINE>temp.put(null, opts.dynamic_class());<NEW_LINE>final <MASK><NEW_LINE>for (String path : opts.dyn... | ModulePathSourceLocator msloc = ModulePathSourceLocator.v(); |
337,639 | public void snapShort(StringBuilder strBuff, boolean includeZero) {<NEW_LINE>strBuff.append("\"").append(getFullName()).append("\":").append("{\"").append(this.count.getShortName()).append("\":").append(this.count.getAndResetValue()).append(",\"").append(this.min.getShortName()).append("\":").append(this.min.getAndRese... | ()).append(",\"cells\":{"); |
1,076,091 | private void meetingStarted(MeetingStarted message) {<NEW_LINE>Meeting <MASK><NEW_LINE>if (m != null) {<NEW_LINE>if (m.getStartTime() == 0) {<NEW_LINE>long now = System.currentTimeMillis();<NEW_LINE>m.setStartTime(now);<NEW_LINE>Map<String, Object> logData = new HashMap<>();<NEW_LINE>logData.put("meetingId", m.getInter... | m = getMeeting(message.meetingId); |
808,477 | public AutoMLOutputDataConfig unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AutoMLOutputDataConfig autoMLOutputDataConfig = new AutoMLOutputDataConfig();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken tok... | String currentParentElement = context.getCurrentParentElement(); |
1,271,462 | // int version - includes support for beyond 16 bit chars.<NEW_LINE>public static boolean int_isUcsChar(int ch) {<NEW_LINE>// RFC 3987<NEW_LINE>// ucschar = %xA0-D7FF / %xF900-FDCF / %xFDF0-FFEF<NEW_LINE>// / %x10000-1FFFD / %x20000-2FFFD / %x30000-3FFFD<NEW_LINE>// / %x40000-4FFFD / %x50000-5FFFD / %x60000-6FFFD<NE... | range(ch, 0xE1000, 0xEFFFD); |
4,063 | public static com.trilead.ssh2.Connection acquireAuthorizedConnection(String ip, int port, String username, String password, String privateKey) {<NEW_LINE>com.trilead.ssh2.Connection sshConnection = new com.trilead.ssh2.Connection(ip, port);<NEW_LINE>try {<NEW_LINE>sshConnection.connect(null, DEFAULT_CONNECT_TIMEOUT, D... | ssh2.Connection(ip, port); |
1,249,507 | public static boolean isKeyRegistered(Long userId, PublicKey publicKey) throws SQLException, GeneralSecurityException {<NEW_LINE>boolean isDuplicate = false;<NEW_LINE>Connection con = DBUtils.getConn();<NEW_LINE>PreparedStatement stmt = con.prepareStatement("select * from public_keys where user_id=? and fingerprint lik... | ResultSet rs = stmt.executeQuery(); |
234,378 | public void mouseDragged(MouseEvent me) {<NEW_LINE>// Get new mouse coordinates<NEW_LINE>if (selector.isSelectorFrameActive()) {<NEW_LINE>selector.getSelectorFrame().resizeTo(getOffset(me).getX(), getOffset(me).getY());<NEW_LINE>disableElementMovement = true;<NEW_LINE>return;<NEW_LINE>} else if (disableElementMovement(... | - gridSize / 2) / gridSize); |
45,297 | public Object execute(ExecuteCommandContext context) {<NEW_LINE>String documentUri = "";<NEW_LINE>VersionedTextDocumentIdentifier textDocumentIdentifier = new VersionedTextDocumentIdentifier();<NEW_LINE>for (CommandArgument arg : context.getArguments()) {<NEW_LINE>if (CommandConstants.ARG_KEY_DOC_URI.equals(arg.key()))... | textEdits = new ArrayList<>(); |
49,924 | public static ValueNode canonicalizeRead(ValueNode read, CanonicalizerTool tool, JavaKind accessKind, ValueNode object, ValueNode offset, LocationIdentity locationIdentity) {<NEW_LINE>if (!tool.canonicalizeReads()) {<NEW_LINE>return read;<NEW_LINE>}<NEW_LINE>NodeView view = NodeView.from(tool);<NEW_LINE>Stamp resultSta... | offset, locationIdentity, tool, view); |
1,142,484 | final GetOrderResult executeGetOrder(GetOrderRequest getOrderRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getOrderRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>R... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
297,250 | public void marshall(GetReservationCoverageRequest getReservationCoverageRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (getReservationCoverageRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marsha... | getReservationCoverageRequest.getTimePeriod(), TIMEPERIOD_BINDING); |
1,200,066 | public ListenerDeclarationNode transform(ListenerDeclarationNode listenerDeclarationNode) {<NEW_LINE>Token visibilityQualifier = formatToken(listenerDeclarationNode.visibilityQualifier().orElse(null), 1, 0);<NEW_LINE>MetadataNode metadata = formatNode(listenerDeclarationNode.metadata().orElse(null), 0, 1);<NEW_LINE>Tok... | withSemicolonToken(semicolonToken).apply(); |
1,249,146 | private void scheduleReceiveBatteryLevel() {<NEW_LINE>BroadcastReceiver recv;<NEW_LINE>if (mBatteryLevelRecvRef == null || (recv = mBatteryLevelRecvRef.get()) == null) {<NEW_LINE>if (mBatteryStatusRecvRef == null || (recv = mBatteryStatusRecvRef.get()) == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final In... | BatteryManager.EXTRA_PLUGGED, BatteryManager.BATTERY_PLUGGED_AC); |
184,113 | protected String doIt() throws Exception {<NEW_LINE>int to_ID = super.getRecord_ID();<NEW_LINE>log.info("From PA_ReportColumnSet_ID=" + m_PA_ReportColumnSet_ID + ", To=" + to_ID);<NEW_LINE>if (to_ID < 1)<NEW_LINE>throw new Exception(MSG_SaveErrorRowNotFound);<NEW_LINE>//<NEW_LINE>MReportColumnSet to = new MReportColumn... | ), m_PA_ReportColumnSet_ID, get_TrxName()); |
1,004,658 | public SOAPMessage invoke(SOAPMessage request) {<NEW_LINE>SOAPMessage response = null;<NEW_LINE>try {<NEW_LINE>System.out.println("Incoming Client Request as a SOAPMessage:");<NEW_LINE>request.writeTo(System.out);<NEW_LINE>String hdrText = request.getSOAPHeader().getTextContent();<NEW_LINE>System.out.println("Incoming ... | Source src = new StreamSource(respMsg); |
27,721 | public void createControl(Composite parent) {<NEW_LINE>Composite main = new Composite(parent, SWT.NONE);<NEW_LINE>main.setLayout(GridLayoutFactory.swtDefaults().numColumns(3).create());<NEW_LINE>main.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create());<NEW_LINE>GridDataFactory inputData = GridDataFa... | SWT.BORDER | SWT.SINGLE); |
1,787,989 | public static String formatDelay(Number data) {<NEW_LINE>if (data == null) {<NEW_LINE>return StringUtils.EMPTY;<NEW_LINE>}<NEW_LINE>long t = data.longValue();<NEW_LINE>if (t < 0) {<NEW_LINE>return String.valueOf(t);<NEW_LINE>}<NEW_LINE>int hour = 0;<NEW_LINE>int minute = 0;<NEW_LINE>while (t >= 60 * 60 * 1000) {<NEW_LI... | = new ArrayList<String>(); |
750,275 | public static Collection<RegressionExecution> executions() {<NEW_LINE>ArrayList<RegressionExecution> executions = new ArrayList<>();<NEW_LINE>executions.add(new ExprFilterOptReboolConstValueRegexpRHS());<NEW_LINE>executions.add(new ExprFilterOptReboolMixedValueRegexpRHS());<NEW_LINE>executions.add(new ExprFilterOptRebo... | .add(new ExprFilterOptReboolNoValueConcat()); |
1,678,665 | public void collectAtLocus(final Nucleotide refBase, final ReadPileup pileup, final Locatable locus, final int minBaseQuality) {<NEW_LINE>Utils.nonNull(refBase);<NEW_LINE>Utils.nonNull(pileup);<NEW_LINE>Utils.nonNull(locus);<NEW_LINE>ParamUtils.isPositiveOrZero(minBaseQuality, "Minimum base quality must be zero or high... | (r.getBase())); |
1,816,807 | public void appendTo(BitArray bitArray, byte[] text) {<NEW_LINE>for (int i = 0; i < binaryShiftByteCount; i++) {<NEW_LINE>if (i == 0 || (i == 31 && binaryShiftByteCount <= 62)) {<NEW_LINE>// We need a header before the first character, and before<NEW_LINE>// character 31 when the total byte code is <= 62<NEW_LINE>// BI... | bitArray.appendBits(31, 5); |
417,851 | public void marshall(DashPackage dashPackage, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (dashPackage == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(dashPackage.getAdTriggers(), ADTRIGGERS_BINDING);<N... | dashPackage.getPeriodTriggers(), PERIODTRIGGERS_BINDING); |
185,295 | public void configure(Binder binder) {<NEW_LINE>Jerseys.addResource(binder, ChatHandlerResource.class);<NEW_LINE>LifecycleModule.register(binder, ChatHandlerResource.class);<NEW_LINE>if (properties.containsKey(MAX_CHAT_REQUESTS_PROPERTY)) {<NEW_LINE>final int maxRequests = Integer.parseInt<MASK><NEW_LINE>JettyBindings.... | (properties.getProperty(MAX_CHAT_REQUESTS_PROPERTY)); |
1,717,960 | private void writeRequestValues(CounterRequest request, boolean allChildHitsDisplayed, boolean allocatedKBytesDisplayed) throws IOException {<NEW_LINE>final String nextColumn = "</td><td align='right'>";<NEW_LINE>writeln(nextColumn);<NEW_LINE>writeln(integerFormat.format(request.getMean()));<NEW_LINE>writeln(nextColumn... | (request.getAllocatedKBytesMean())); |
734,077 | final DescribeDBClusterSnapshotsResult executeDescribeDBClusterSnapshots(DescribeDBClusterSnapshotsRequest describeDBClusterSnapshotsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeDBClusterSnapshotsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRe... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
24,495 | static int upgradeDbToVersion6(SQLiteDatabase db) {<NEW_LINE>int oldVersion = 5;<NEW_LINE>String addFullAccountNameQuery = " ALTER TABLE " + AccountEntry.TABLE_NAME + " ADD COLUMN " + AccountEntry.COLUMN_FULL_NAME + " varchar(255) ";<NEW_LINE>db.execSQL(addFullAccountNameQuery);<NEW_LINE>// update all existing accounts... | _ID + " = " + id, null); |
81,599 | Object AroundConstruct(InvocationContext inv) {<NEW_LINE>try {<NEW_LINE>svLogger.info("ChainInterceptor2 Called");<NEW_LINE>InjectedManagedBean bean = (InjectedManagedBean) inv.getParameters()[0];<NEW_LINE>// Make sure InvocationContext.getParameters() in second interceptor returns what was set in first interceptor<NEW... | "InvocationContext.getTarget() is not null before InvocationContext.proceed()", inv.getTarget()); |
218,116 | private static Response backchannelLogoutClientSession(KeycloakSession session, RealmModel realm, AuthenticatedClientSessionModel clientSession, AuthenticationSessionModel logoutAuthSession, UriInfo uriInfo, HttpHeaders headers) {<NEW_LINE>UserSessionModel userSession = clientSession.getUserSession();<NEW_LINE>ClientMo... | ), AuthenticationSessionModel.Action.LOGGED_OUT); |
610,623 | private void transformCriterion(Example.Criteria exampleCriteria, String condition, String property, Object[] values, String andOr) {<NEW_LINE>if (values.length == 0) {<NEW_LINE>if ("and".equals(andOr)) {<NEW_LINE>exampleCriteria.addCriterion(column(property) + " " + condition);<NEW_LINE>} else {<NEW_LINE>exampleCriter... | (property) + " " + condition); |
1,797,697 | public void translate(final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions) throws InternalTranslationException {<NEW_LINE>TranslationHelpers.checkTranslationArguments(environment, instruction, instructions, "dmult");<NEW_LINE>final String sourceRegister1 =... | String tempResult = environment.getNextVariableString(); |
1,843,022 | private static void renderConfigOptionsIfNecessary(FacesContext facesContext) throws IOException {<NEW_LINE>ResponseWriter writer = facesContext.getResponseWriter();<NEW_LINE>MyfacesConfig config = MyfacesConfig.getCurrentInstance(facesContext.getExternalContext());<NEW_LINE>ScriptContext script = new ScriptContext();<... | startElement(HTML.SCRIPT_ELEM, null); |
486,940 | public void groupNameChanged(Group group, String oldName, String newName) {<NEW_LINE>if (logger.isTraceEnabled())<NEW_LINE>logger.trace("Group name for " + group.getName() + "changed from=" + oldName + " to=" + newName);<NEW_LINE>ContactGroupIcqImpl contactGroup = findContactGroup(group);<NEW_LINE>if (contactGroup == n... | logger.debug("group name changed event received for unknown group" + group); |
987,459 | private String issueReceipt(MProject project) {<NEW_LINE>MInOut inOut = new MInOut(getCtx(), getInOutId(), null);<NEW_LINE>if (inOut.isSOTrx() || !inOut.isProcessed() || !(MInOut.DOCSTATUS_Completed.equals(inOut.getDocStatus()) || MInOut.DOCSTATUS_Closed.equals(inOut.getDocStatus())))<NEW_LINE>throw new IllegalArgument... | inOutLines = inOut.getLines(false); |
1,728,017 | public void traverseComparisonFields(HollowEffigy comparison, int maxDiff) {<NEW_LINE>for (Field field : comparison.getFields()) {<NEW_LINE>if (field.isLeafNode()) {<NEW_LINE>FieldDiffCount <MASK><NEW_LINE>if (fieldCount == null) {<NEW_LINE>if (simDiffCount.diffCount + 1 >= maxDiff) {<NEW_LINE>simDiffCount.diffCount++;... | fieldCount = map.get(field); |
1,434,465 | private void preserveExistingLineBreaks() {<NEW_LINE>// normally n empty lines = n+1 line breaks, but not at the file start and end<NEW_LINE>Token first = this.tm.get(0);<NEW_LINE>int startingBreaks = first.getLineBreaksBefore();<NEW_LINE>first.clearLineBreaksBefore();<NEW_LINE>first.putLineBreaksBefore(startingBreaks ... | tm.size() - 1); |
1,156,180 | private JPopupMenu buildResizePopup() {<NEW_LINE>JPopupMenu res = new JPopupMenu();<NEW_LINE>List<ResizeOption> options = ResizeOptions<MASK><NEW_LINE>options.add(ResizeOption.SIZE_TO_FIT);<NEW_LINE>for (ResizeOption ro : options) {<NEW_LINE>final ResizeOption size = ro;<NEW_LINE>JCheckBoxMenuItem menuItem = new JCheck... | .getDefault().loadAll(); |
517,789 | public static void main(String[] args) throws IOException, NoSuchAlgorithmException, InvalidKeyException {<NEW_LINE>try {<NEW_LINE>// MinioClient minioClient =<NEW_LINE>// MinioClient.builder()<NEW_LINE>// .endpoint("https://s3.amazonaws.com")<NEW_LINE>// .credentials("YOUR-ACCESSKEY", "YOUR-SECRETACCESSKEY")<NEW_LINE>... | ("my-filename").build()); |
116,829 | private static Value.Builder valueFromCallable(StarlarkCallable x) {<NEW_LINE>// Starlark def statement?<NEW_LINE>if (x instanceof StarlarkFunction) {<NEW_LINE>StarlarkFunction fn = (StarlarkFunction) x;<NEW_LINE>Signature sig = new Signature();<NEW_LINE>sig.name = fn.getName();<NEW_LINE>sig.parameterNames = fn.getPara... | .hasKwargs = fn.hasKwargs(); |
198,122 | public void enableAntiAlias(boolean antiAlias) {<NEW_LINE>if (antiAlias) {<NEW_LINE>gr.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);<NEW_LINE>gr.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);<NEW_LINE>gr.setRenderingHint(RenderingH... | RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_OFF); |
12,981 | public OutputLocation unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>OutputLocation outputLocation = new OutputLocation();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth +... | ().unmarshall(context)); |
167,192 | public static String convertPATH(String rawPATH) {<NEW_LINE>if (rawPATH == null || !PlatformUtil.isWindows()) {<NEW_LINE>return rawPATH;<NEW_LINE>}<NEW_LINE>// Handle if path didn't come from bash/mingw/cygwin, but from system env instead.<NEW_LINE>if (rawPATH.indexOf(';') != -1) {<NEW_LINE>return rawPATH;<NEW_LINE>}<N... | ] = m.replaceFirst("$1:/$2"); |
28,965 | private String splitContent(String data) {<NEW_LINE>int length = data.length();<NEW_LINE>if (length < SPLIT_LINE_LENGTH) {<NEW_LINE>state = SplitState.UNCHANGED;<NEW_LINE>return data;<NEW_LINE>}<NEW_LINE>int pos = data.indexOf(NEWLINE);<NEW_LINE>if (pos == -1) {<NEW_LINE>state = SplitState.SINGLE_LINE;<NEW_LINE>StringB... | ? SplitState.LONG_CONTENT : SplitState.UNCHANGED; |
1,123,787 | protected void initContentBuffer(XMLStringBuffer suiteBuffer) {<NEW_LINE>Properties testAttrs = new Properties();<NEW_LINE><MASK><NEW_LINE>testAttrs.setProperty("verbose", String.valueOf(m_logLevel));<NEW_LINE>suiteBuffer.push("test", testAttrs);<NEW_LINE>if (null != m_groupNames) {<NEW_LINE>suiteBuffer.push("groups");... | testAttrs.setProperty("name", m_projectName); |
211,891 | final PutTelemetryRecordsResult executePutTelemetryRecords(PutTelemetryRecordsRequest putTelemetryRecordsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(putTelemetryRecordsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
882,787 | public boolean validateMethodRequest(MethodConfig methodConfig) {<NEW_LINE>if (methodConfig.getSpreadsheetId() == null || methodConfig.getSpreadsheetId().isBlank()) {<NEW_LINE>throw new AppsmithPluginException(AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR, "Missing required field Spreadsheet Url");<NEW_LINE>}<NEW_L... | AppsmithPluginException(AppsmithPluginError.PLUGIN_ERROR, "Request body was not an array."); |
670,204 | protected QueryDataSet processShowQuery(ShowPlan showPlan, QueryContext context) throws QueryProcessException, MetadataException {<NEW_LINE>switch(showPlan.getShowContentType()) {<NEW_LINE>case TTL:<NEW_LINE>return processShowTTLQuery((ShowTTLPlan) showPlan);<NEW_LINE>case FLUSH_TASK_INFO:<NEW_LINE>return processShowFl... | return processShowNodesInSchemaTemplate((ShowNodesInTemplatePlan) showPlan); |
1,106,891 | public int compare(BuddyPluginBuddy b1, BuddyPluginBuddy b2) {<NEW_LINE>int res = 0;<NEW_LINE>if (field == FIELD_NAME) {<NEW_LINE>res = b1.getName().compareTo(b2.getName());<NEW_LINE>} else if (field == FIELD_ONLINE) {<NEW_LINE>res = (b1.isOnline(false) ? 1 : 0) - (b2.isOnline(false) ? 1 : 0);<NEW_LINE>} else if (field... | ), b2.getLocalAuthorisedRSSTagsOrCategoriesAsString()); |
648,617 | public Builder mergeFrom(com.google.protobuf.DescriptorProtos.ServiceOptions other) {<NEW_LINE>if (other == com.google.protobuf.DescriptorProtos.ServiceOptions.getDefaultInstance())<NEW_LINE>return this;<NEW_LINE>if (uninterpretedOptionBuilder_ == null) {<NEW_LINE>if (!other.uninterpretedOption_.isEmpty()) {<NEW_LINE>i... | .alwaysUseFieldBuilders ? getUninterpretedOptionFieldBuilder() : null; |
656,645 | public static void main(String[] args) {<NEW_LINE>String classname = System.getProperty(PARAMETER_NAME);<NEW_LINE>CmdLineParser parser = null;<NEW_LINE>boolean classHasArgument = false;<NEW_LINE>boolean classHasOptions = false;<NEW_LINE>// Check the requirement: must specify the class to start<NEW_LINE>if (classname ==... | , (Object[]) null); |
850,109 | public com.amazonaws.services.costandusagereport.model.ValidationException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.costandusagereport.model.ValidationException validationException = new com.amazonaws.services.costandusagereport.model.ValidationException(... | JsonToken token = context.getCurrentToken(); |
1,772,987 | public void renameField(Model m, JSONObject field, String newName) throws ConfirmModSchemaException {<NEW_LINE>mCol.modSchema();<NEW_LINE>String pat = String.format("\\{\\{([^{}]*)([:#^/]|[^:#/^}][^:}]*?:|)%s\\}\\}", Pattern.quote(<MASK><NEW_LINE>if (newName == null) {<NEW_LINE>newName = "";<NEW_LINE>}<NEW_LINE>String ... | field.getString("name"))); |
1,086,977 | private void onConnect() {<NEW_LINE>Timber.d(<MASK><NEW_LINE>scheduler.scheduleMqttMaybeReconnectAndPing(preferences.getKeepalive());<NEW_LINE>Timber.d("Releasing connectinglock");<NEW_LINE>connectingLock.release();<NEW_LINE>changeState(EndpointState.CONNECTED);<NEW_LINE>// allow new connection attempts from queueMessa... | "MQTT connected!. Running onconnect handler (threadID %s)", Thread.currentThread()); |
1,145,162 | private void updateConfigForCredentialProvider() {<NEW_LINE>String cpPaths = siteConfig.get(Property.GENERAL_SECURITY_CREDENTIAL_PROVIDER_PATHS.getKey());<NEW_LINE>if (cpPaths != null && !Property.GENERAL_SECURITY_CREDENTIAL_PROVIDER_PATHS.getDefaultValue().equals(cpPaths)) {<NEW_LINE>// Already configured<NEW_LINE>ret... | GENERAL_SECURITY_CREDENTIAL_PROVIDER_PATHS.getKey(), keystoreUri); |
1,105,811 | public static OptionParser createOptionParser() {<NEW_LINE>OptionParser parser = new OptionParser();<NEW_LINE>// commmon<NEW_LINE>parser.acceptsAll(Arrays.asList("help", "?", "h"), "shows this help").forHelp();<NEW_LINE>parser.acceptsAll(Arrays.asList("n", "iteration"), "vjtop will exit after n output iterations (defa... | ).ofType(String.class); |
1,689,986 | public RFuture<Map<String, Map<StreamMessageId, Map<K, V>>>> readGroupAsync(String groupName, String consumerName, int count, long timeout, TimeUnit unit, StreamMessageId id, Map<String, StreamMessageId> keyToId) {<NEW_LINE>List<Object> params = new ArrayList<Object>();<NEW_LINE>params.add("GROUP");<NEW_LINE>params.add... | addAll(keyToId.keySet()); |
305,140 | static void artifactNamePatternFromStarlark(StarlarkInfo artifactNamePatternStruct, ArtifactNamePatternAdder adder) throws EvalException {<NEW_LINE>checkRightProviderType(artifactNamePatternStruct, "artifact_name_pattern");<NEW_LINE>String categoryName = getMandatoryFieldFromStarlarkProvider(<MASK><NEW_LINE>if (categor... | artifactNamePatternStruct, "category_name", String.class); |
503,099 | protected AstRoot parseEcmascript(final String sourceCode, final List<ParseProblem> parseProblems) throws ParseException {<NEW_LINE>final CompilerEnvirons compilerEnvirons = new CompilerEnvirons();<NEW_LINE>compilerEnvirons.setRecordingComments(parserOptions.isRecordingComments());<NEW_LINE>compilerEnvirons.setRecordin... | parse(sourceCode, sourceURI, beginLineno); |
171,153 | protected <T> Stream<T> doStream(Query query, Class<?> entityType, String collectionName, Class<T> returnType) {<NEW_LINE><MASK><NEW_LINE>Assert.notNull(entityType, "Entity type must not be null!");<NEW_LINE>Assert.hasText(collectionName, "Collection name must not be null or empty!");<NEW_LINE>Assert.notNull(returnType... | Assert.notNull(query, "Query must not be null!"); |
1,449,728 | private static void generateEditJsp(Project project, CompilationController controller, String entityClass, String simpleEntityName, String managedBean, String fieldName, String linkToIndex, BaseDocument doc, final FileObject jsfRoot, EmbeddedPkSupport embeddedPkSupport, String controllerClass, String styleAndScriptTags... | , Matcher.quoteReplacement(styleAndScriptTags)); |
1,143,991 | public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {<NEW_LINE>FunFact fact = (FunFact) Objects.requireNonNull(getArguments()).getSerializable(EXTRA_MESSAGE_FUNFACT_OBJECT);<NEW_LINE>View view = inflater.inflate(R.<MASK><NEW_LINE>ViewHolder holder = new ViewHolder(... | layout.fragment_funfact, container, false); |
108,730 | protected void addCalcMemberPropToMeasure(MondrianGuiDef.Measure measure, int parentIndex, TreePath tpath) {<NEW_LINE>MondrianGuiDef.CalculatedMemberProperty property = new MondrianGuiDef.CalculatedMemberProperty();<NEW_LINE>property.name = "";<NEW_LINE>if (measure.memberProperties == null) {<NEW_LINE>measure.memberPro... | ] = tpath.getPathComponent(i); |
113,472 | public SearchResponse searchWithRetry(SearchRequest searchRequest, String jobId, Supplier<Boolean> shouldRetry, Consumer<String> retryMsgHandler) {<NEW_LINE>final PlainActionFuture<SearchResponse> getResponse = PlainActionFuture.newFuture();<NEW_LINE>final Object key = new Object();<NEW_LINE>final ActionListener<Search... | -> onGoingRetryableSearchActions.remove(key)); |
674,370 | public NodeInterface saveOutgoingMessage(final SecurityContext securityContext, final AdvancedMailContainer amc, final String messageId) {<NEW_LINE>NodeInterface outgoingMessage = null;<NEW_LINE>final App app = StructrApp.getInstance(securityContext);<NEW_LINE>try (final Tx tx = app.tx()) {<NEW_LINE>PropertyMap props =... | ), amc.getInReplyTo()); |
1,173,682 | static Span generateSpan(SpanData spanData, Endpoint localEndpoint) {<NEW_LINE>SpanContext context = spanData.getContext();<NEW_LINE>long startTimestamp = toEpochMicros(spanData.getStartTimestamp());<NEW_LINE>// TODO(sebright): Fix the Checker Framework warning.<NEW_LINE>@SuppressWarnings("nullness")<NEW_LINE>long endT... | toEpochMicros(spanData.getEndTimestamp()); |
91,088 | public static OfferedPsks parse(InputStream input) throws IOException {<NEW_LINE>Vector identities = new Vector();<NEW_LINE>{<NEW_LINE>int totalLengthIdentities = TlsUtils.readUint16(input);<NEW_LINE>if (totalLengthIdentities < 7) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>byte[] identitiesData = TlsUtils.readFully(totalLen... | throw new TlsFatalAlert(AlertDescription.decode_error); |
245,496 | public <T extends JpaObject, W extends Object> List<T> listEqualAndEqualAndIn(Class<T> cls, String firstAttribute, Object firstValue, String secondAttribute, Object secondValue, String thirdAttribute, Collection<W> thirdValues) throws Exception {<NEW_LINE>EntityManager em = this.get(cls);<NEW_LINE>CriteriaBuilder cb = ... | cq = cb.createQuery(cls); |
657,379 | private Properties loadProperties(FileObject f) {<NEW_LINE>Source s = Source.create(f);<NEW_LINE>final Document <MASK><NEW_LINE>final Properties props = new Properties();<NEW_LINE>if (doc == null) {<NEW_LINE>LOG.fine("Loading properties from " + f);<NEW_LINE>try (InputStream is = f.getInputStream()) {<NEW_LINE>props.lo... | doc = s.getDocument(false); |
1,160,922 | public void exitRbn_remote_as(Rbn_remote_asContext ctx) {<NEW_LINE>boolean ipv4 = false;<NEW_LINE>boolean ipv6 = false;<NEW_LINE>if (Ip.tryParse(_currentNeighborName).isPresent()) {<NEW_LINE>ipv4 = true;<NEW_LINE>} else if (Ip6.tryParse(_currentNeighborName).isPresent()) {<NEW_LINE>ipv6 = true;<NEW_LINE>} else if (_cur... | getStart().getLine()); |
983,462 | private void processUpdate(String commandString) {<NEW_LINE>if (COMMAND_PATTERN.matcher(commandString).matches()) {<NEW_LINE>String command = commandString.substring(0, 2);<NEW_LINE>String value = commandString.substring(2, commandString.length()).trim();<NEW_LINE>// Secondary zone commands with a parameter<NEW_LINE>if... | ), new StringType(value)); |
1,099,234 | public String create(User user, String userId) throws Exception {<NEW_LINE>// Create the user UUID<NEW_LINE>user.setId(UUID.randomUUID().toString());<NEW_LINE>// Checks for user unicity<NEW_LINE>EntityManager em = ThreadLocalContext.get().getEntityManager();<NEW_LINE>Query q = em.createQuery("select u from User u where... | > l = q.getResultList(); |
44,931 | final StartContactRecordingResult executeStartContactRecording(StartContactRecordingRequest startContactRecordingRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(startContactRecordingRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>... | addHandlerContext(HandlerContextKey.SERVICE_ID, "Connect"); |
1,412,884 | private static String dumpActionMapInfo(ActionMap map, Object q, Lookup prev, Lookup now, Lookup globalContext, Lookup originalLkp) {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>// NOI18N<NEW_LINE>// NOI18N<NEW_LINE>sb.append("We really get map from the lookup. Map: ").append(map).append(" returned: ").//... | .lookupAll(Object.class)); |
677,147 | private <E extends Member & AnnotatedElement> Object trace(InvocationContext context, E element, Class<?> declaringClass) throws Exception {<NEW_LINE>if (null != declaringClass.getAnnotation(Path.class)) {<NEW_LINE>return context.proceed();<NEW_LINE>}<NEW_LINE>Traced annotation = <MASK><NEW_LINE>if (null == annotation)... | element.getAnnotation(Traced.class); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.