idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
766,401 | public String reply(@PathVariable String id, @PathVariable(required = false) String title, @RequestParam(required = false) Boolean emailme, HttpServletRequest req, HttpServletResponse res, Model model) {<NEW_LINE>Post showPost = pc.read(id);<NEW_LINE>Profile <MASK><NEW_LINE>if (authUser == null || showPost == null) {<N... | authUser = utils.getAuthUser(req); |
428,814 | private void buildPanel() {<NEW_LINE>tableModel = new LocationReferencesTableModel(locationReferencesProvider);<NEW_LINE>tablePanel = new GhidraThreadedTablePanel<>(tableModel, 250);<NEW_LINE>table = tablePanel.getTable();<NEW_LINE>table.setHTMLRenderingEnabled(true);<NEW_LINE>table.setPreferredScrollableViewportSize(<... | new Dimension(300, 120)); |
100,432 | private void parseArgs(String[] args) {<NEW_LINE>boolean usage = false;<NEW_LINE>for (String arg : args) {<NEW_LINE>if (!arg.startsWith("--")) {<NEW_LINE>System.err.println("All arguments must start with '--': " + arg);<NEW_LINE>usage = true;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>String[] parts = arg.substring(2).split("... | totalTestSeconds = Long.parseLong(value); |
1,753,186 | public ResourceOptionsDto availableOperations(UriInfo context) {<NEW_LINE>final IdentityService identityService = getIdentityService();<NEW_LINE>UriBuilder baseUriBuilder = context.getBaseUriBuilder().path(relativeRootResourcePath).path(GroupRestService.PATH);<NEW_LINE>ResourceOptionsDto resourceOptionsDto = new Resour... | baseUri, HttpMethod.GET, "list"); |
246,859 | private void _sendContentletPublishNotification(Contentlet contentlet, HttpServletRequest req) throws Exception, PortalException, SystemException {<NEW_LINE>try {<NEW_LINE>req.setAttribute(com.liferay.portal.util.WebKeys.LAYOUT, req.getSession().getAttribute(com.dotmarketing.util.WebKeys.LAYOUT));<NEW_LINE>req.setAttri... | contentlet.getInode()) }); |
204,790 | IpAccessList createIosSecurityZoneAcl(Zone zone, Map<String, MatchSrcInterface> matchSrcInterfaceBySrcZone, Configuration c) {<NEW_LINE>ImmutableList.Builder<AclLine> zonePolicies = ImmutableList.builder();<NEW_LINE>// Allow traffic originating from device (no source interface)<NEW_LINE>zonePolicies.add(ExprAclLine.acc... | zoneName)).build()); |
1,378,318 | public void inputStateChanged(IOStateChangedEvent<MessageInput> event) {<NEW_LINE>final IOState<MessageInput> state = event.changedState();<NEW_LINE>final MessageInput input = state.getStoppable();<NEW_LINE>switch(event.newState()) {<NEW_LINE>case FAILED:<NEW_LINE>activityWriter.write(new Activity(state.getDetailedMess... | getNodeId().toString()); |
598,828 | final PutAccessControlRuleResult executePutAccessControlRule(PutAccessControlRuleRequest putAccessControlRuleRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(putAccessControlRuleRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | false), new PutAccessControlRuleResultJsonUnmarshaller()); |
1,615,665 | final DescribeCustomerGatewaysResult executeDescribeCustomerGateways(DescribeCustomerGatewaysRequest describeCustomerGatewaysRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeCustomerGatewaysRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetri... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
344,638 | public net.osmand.binary.VectorTile.Tile.Layer buildPartial() {<NEW_LINE>net.osmand.binary.VectorTile.Tile.Layer result = new net.osmand.binary.VectorTile.Tile.Layer(this);<NEW_LINE>int from_bitField0_ = bitField0_;<NEW_LINE>int to_bitField0_ = 0;<NEW_LINE>if (((from_bitField0_ & 0x00000001) == 0x00000001)) {<NEW_LINE>... | util.Collections.unmodifiableList(values_); |
76,904 | final ListRulesetsResult executeListRulesets(ListRulesetsRequest listRulesetsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listRulesetsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<ListRulesetsRequest> ... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,010,265 | public static Calendar createCalendar(CalDavEvent calDavEvent, DateTimeZone timeZone) {<NEW_LINE>TimeZoneRegistry registry = TimeZoneRegistryFactory.getInstance().createRegistry();<NEW_LINE>TimeZone timezone = registry.getTimeZone(timeZone.getID());<NEW_LINE>Calendar calendar = new Calendar();<NEW_LINE>calendar.getProp... | (calDavEvent.getContent())); |
730,766 | private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents<NEW_LINE>void initComponents() {<NEW_LINE>jLabel1 = new javax.swing.JLabel();<NEW_LINE>// NOI18N<NEW_LINE>jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/netbeans/modules/subversion/resources/icons/s... | .swing.GroupLayout.PREFERRED_SIZE)); |
1,719,591 | public void load(Map props) throws IllegalArgumentException {<NEW_LINE>// NOI18N<NEW_LINE>setMainClass(getProperty(props, PROP_CLASS_NAME, ""));<NEW_LINE>// NOI18N<NEW_LINE>setMainClassPath(getProperty(props, PROP_CLASS_PATH, ""));<NEW_LINE>// NOI18N<NEW_LINE>setMainArgs(getProperty(props, PROP_ARGS, ""));<NEW_LINE>// ... | getProperty(props, PROP_PORT_NO, "5140"); |
232,298 | public void process(Page page) {<NEW_LINE>// http://progressdaily.diandian.com/post/2013-01-24/40046867275<NEW_LINE>List<String> requests = page.getHtml().xpath("//a[@class=\"area_link flat_btn\"]/@href").all();<NEW_LINE>if (requests.size() > 2) {<NEW_LINE>requests = requests.subList(0, 2);<NEW_LINE>}<NEW_LINE>page.add... | ().xpath("//ul[@class=\"dishes menu_dishes\"]/li/span[@class=\"price_outer\"]/span[@class=\"price\"]/text()")); |
1,239,716 | public Configuration build(@Nonnull Environment env) {<NEW_LINE>try {<NEW_LINE>Configuration freemarker = new Configuration(Configuration.DEFAULT_INCOMPATIBLE_IMPROVEMENTS);<NEW_LINE>freemarker.setOutputFormat(outputFormat);<NEW_LINE>Config conf = env.getConfig();<NEW_LINE>if (conf.hasPath("freemarker")) {<NEW_LINE>con... | orElse(TemplateEngine.PATH))); |
122,340 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {<NEW_LINE>String test = request.getParameter("test");<NEW_LINE>PrintWriter out = response.getWriter();<NEW_LINE>out.println("Starting " + test + "<br>");<NEW_LINE>// The injection engine doesn't like thi... | println("<pre>ERROR in " + test + ":"); |
1,589,406 | public void run(RegressionEnvironment env) {<NEW_LINE>String methodName = ".testPerfPropertyAccess";<NEW_LINE>String joinStatement = "@name('s0') select * from " + "SupportBeanCombinedProps#length(1)" + " where indexed[0].mapped('a').value = 'dummy'";<NEW_LINE>env.compileDeploy(joinStatement).addListener("s0");<NEW_LIN... | log.info(methodName + " Done sending events"); |
716,127 | public ServiceInfo unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ServiceInfo serviceInfo = new ServiceInfo();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE... | JsonToken token = context.getCurrentToken(); |
63,749 | private int indexOfFisrtNameAfter(int position) {<NEW_LINE>int left = 0;<NEW_LINE>int right = this.potentialVariableNamesPtr;<NEW_LINE>next: while (true) {<NEW_LINE>if (right < left)<NEW_LINE>return -1;<NEW_LINE>int mid = left <MASK><NEW_LINE>int midPosition = this.potentialVariableNameStarts[mid];<NEW_LINE>if (midPosi... | + (right - left) / 2; |
1,814,469 | final DescribeLoadBalancerPoliciesResult executeDescribeLoadBalancerPolicies(DescribeLoadBalancerPoliciesRequest describeLoadBalancerPoliciesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeLoadBalancerPoliciesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContex... | DescribeLoadBalancerPoliciesResult>(new DescribeLoadBalancerPoliciesResultStaxUnmarshaller()); |
1,542,945 | static String pullFontPathFromTextAppearance(final Context context, AttributeSet attrs, int[] attributeId) {<NEW_LINE>if (attributeId == null || attrs == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>int textAppearanceId = -1;<NEW_LINE>final TypedArray typedArrayAttr = <MASK><NEW_LINE>if (typedArrayAttr != null) {<... | context.obtainStyledAttributes(attrs, ANDROID_ATTR_TEXT_APPEARANCE); |
1,343,923 | protected AttackResult injectableQuery(String accountName) {<NEW_LINE>String query = "";<NEW_LINE>try (Connection connection = dataSource.getConnection()) {<NEW_LINE>query = "SELECT * FROM user_data WHERE first_name = 'John' and last_name = '" + accountName + "'";<NEW_LINE>try (Statement statement = connection.createSt... | "<br> Your query was: " + query).build(); |
1,595,858 | public static DescribeBackupsResponse unmarshall(DescribeBackupsResponse describeBackupsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeBackupsResponse.setRequestId(_ctx.stringValue("DescribeBackupsResponse.RequestId"));<NEW_LINE>describeBackupsResponse.setTotalEcsSnapshotSize(_ctx.longValue("DescribeBackupsResp... | ("DescribeBackupsResponse.Items[" + i + "].CopyOnlyBackup")); |
1,661,280 | public void processElement(ProcessContext context) {<NEW_LINE>FailsafeElement<PubsubMessage, String> failsafeElement = context.element();<NEW_LINE>PubsubMessage pubsubMessage = failsafeElement.getOriginalPayload();<NEW_LINE>String message = pubsubMessage.getPayload().length > 0 ? new String(pubsubMessage.getPayload()) ... | StandardCharsets.UTF_8), attributes)); |
403,727 | private void renderPreview() {<NEW_LINE>var encoder = new MicroQrCodeEncoder();<NEW_LINE>if (controls.error != null) {<NEW_LINE>encoder.setError(controls.error);<NEW_LINE>}<NEW_LINE>if (controls.mask != null) {<NEW_LINE>encoder.setMask(controls.mask);<NEW_LINE>}<NEW_LINE>if (controls.version > 0) {<NEW_LINE>encoder.set... | encoder.addAlphanumeric(controls.message); |
1,018,880 | private boolean onWorkerStatus(WorkerStatus workerEvent) throws InvalidWorkerStateChangeException {<NEW_LINE>if (LOGGER.isDebugEnabled()) {<NEW_LINE>LOGGER.debug("on WorkerStatus for {}", workerEvent);<NEW_LINE>}<NEW_LINE>switch(workerEvent.getState()) {<NEW_LINE>case StartInitiated:<NEW_LINE>case Started:<NEW_LINE>cas... | getState().name()); |
556,770 | public ChunkUploadResponse uploadFileAsMultipart(File file, String uploadId, String contentRange, String xSdsAuthToken) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// verify the required parameter 'file' is set<NEW_LINE>if (file == null) {<NEW_LINE>throw new ApiException(400, "Missing the re... | , apiClient.parameterToString(xSdsAuthToken)); |
46,423 | public static void loadFromMap(DeviceCommandInvocation event, Map<String, Object> values) throws SiteWhereException {<NEW_LINE>event.setEventType(DeviceEventType.CommandInvocation);<NEW_LINE>event.setInitiator(CommandInitiator.valueOf(InfluxDbDeviceEvent.<MASK><NEW_LINE>event.setInitiatorId(InfluxDbDeviceEvent.find(val... | find(values, CMD_INITIATOR))); |
836,888 | public void marshall(PutBotAliasRequest putBotAliasRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (putBotAliasRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(putBotAliasRequest.getName(), ... | putBotAliasRequest.getChecksum(), CHECKSUM_BINDING); |
1,822,927 | private BlockNode processMonitorEnter(IRegion curRegion, BlockNode block, InsnNode insn, RegionStack stack) {<NEW_LINE>SynchronizedRegion synchRegion = new SynchronizedRegion(curRegion, insn);<NEW_LINE>synchRegion.getSubBlocks().add(block);<NEW_LINE>curRegion.getSubBlocks().add(synchRegion);<NEW_LINE>Set<BlockNode> exi... | (makeRegion(body, stack)); |
576,046 | public boolean apply(Game game, Ability source) {<NEW_LINE>int count = 0;<NEW_LINE>MageObject <MASK><NEW_LINE>if (mageObject != null) {<NEW_LINE>Spell spell = (Spell) game.getState().getValue("avenShrine" + mageObject);<NEW_LINE>if (spell != null) {<NEW_LINE>Player controller = game.getPlayer(spell.getControllerId());<... | mageObject = game.getObject(source); |
418,544 | public void releaseReservedMemory(long bytes, boolean immediately) {<NEW_LINE>if (immediately) {<NEW_LINE><MASK><NEW_LINE>if (alreadyAllocated - bytes < reservedFree.get()) {<NEW_LINE>memoryPool.freeReserveMemory(reservedAllocated.getAndSet(0));<NEW_LINE>reservedFree.set(0);<NEW_LINE>} else {<NEW_LINE>long actualFreeSi... | long alreadyAllocated = reservedAllocated.get(); |
37,359 | public SettableFuture<Connection> sendMessage(Connection connection, NetworkEnvelope networkEnvelope) {<NEW_LINE>// connection.sendMessage might take a bit (compression, write to stream), so we use a thread to not block<NEW_LINE>ListenableFuture<Connection> future = executorService.submit(() -> {<NEW_LINE>String id = c... | () : connection.getUid(); |
360,580 | final DescribeDBSubnetGroupsResult executeDescribeDBSubnetGroups(DescribeDBSubnetGroupsRequest describeDBSubnetGroupsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeDBSubnetGroupsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
1,049,790 | final AttachSecurityProfileResult executeAttachSecurityProfile(AttachSecurityProfileRequest attachSecurityProfileRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(attachSecurityProfileRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
1,667,410 | public StoreStats collectStoreStats(final TimeInterval timeInterval) {<NEW_LINE>final StoreStats stats = new StoreStats();<NEW_LINE>stats.setStoreId(this.storeEngine.getStoreId());<NEW_LINE>// Capacity for the store<NEW_LINE>stats.setCapacity(this.storeEngine.getTotalSpace());<NEW_LINE>// Available size for the store<N... | .setBytesWritten(getStoreBytesWritten(true)); |
843,006 | public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) {<NEW_LINE>final Context context = getContext();<NEW_LINE>Cursor cursor;<NEW_LINE>switch(uriMatcher.match(uri)) {<NEW_LINE>case MATCH_TYPE_META:<NEW_LINE>cursor = new MatrixCursor(new String[] { "apiVersion", "... | { API_VERSION, BuildConfig.VERSION_CODE }); |
475,884 | public void processView(EventBean[] newData, EventBean[] oldData, boolean isGenerateSynthetic) {<NEW_LINE>generateRemoveStreamJustOnce(isGenerateSynthetic, false);<NEW_LINE>if (newData != null) {<NEW_LINE>for (EventBean aNewData : newData) {<NEW_LINE>EventBean[] eventsPerStream = new EventBean[] { aNewData };<NEW_LINE>... | groupRepsOutputLastUnordRStream.put(mk, event); |
1,521,704 | private NodeGeometryModel shapeConfiguration(NodeView node, StyleOption styleOption) {<NEW_LINE>final ModeController modeController = node.getMap().getModeController();<NEW_LINE>final NodeModel model = node.getModel();<NEW_LINE>NodeGeometryModel shapeConfiguration = NodeStyleController.getController(modeController).get... | .getMainView().getShapeConfiguration(); |
1,514,892 | private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String cacheName) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter resourceGro... | error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); |
502,366 | public static ListRepositoryWebhookResponse unmarshall(ListRepositoryWebhookResponse listRepositoryWebhookResponse, UnmarshallerContext _ctx) {<NEW_LINE>listRepositoryWebhookResponse.setRequestId(_ctx.stringValue("ListRepositoryWebhookResponse.RequestId"));<NEW_LINE>listRepositoryWebhookResponse.setErrorCode<MASK><NEW_... | (_ctx.stringValue("ListRepositoryWebhookResponse.ErrorCode")); |
1,697,666 | public static CompletableFuture<CdmEntityDeclarationDefinition> fromData(final CdmCorpusContext ctx, final ReferenceEntity obj, final String location) {<NEW_LINE>final CdmEntityDeclarationDefinition referencedEntity = ctx.getCorpus().makeObject(CdmObjectType.ReferencedEntityDeclarationDef, obj.getName());<NEW_LINE>refe... | CdmObjectType.TraitRef, "is.hidden", true); |
258,179 | public void applyDefinitions(Configuration config) {<NEW_LINE>final int CORES = Runtime.getRuntime().availableProcessors();<NEW_LINE>config.set(MAX_ACTIVE_PEERS, DEFAULT_MAX_ACTIVE_PEERS);<NEW_LINE>config.set(MAX_PEER_INACTIVITY_PERIOD, DEFAULT_MAX_PEER_INACTIVITY_PERIOD_IN_SECONDS, TimeUnit.SECONDS);<NEW_LINE>config.s... | NOTIFICATION_CHECK_INTERVAL_TIME, 120, TimeUnit.SECONDS); |
296,269 | public void serialize(Ior<?, ?> value, JsonGenerator gen, SerializerProvider serializers) throws IOException {<NEW_LINE>value.fold(ExceptionSoftener.softenFunction(l -> {<NEW_LINE>JsonSerializer<Object> ser = serializers.findValueSerializer(LeftBean.class);<NEW_LINE>ser.serialize(new LeftBean<MASK><NEW_LINE>return null... | (l), gen, serializers); |
347,978 | public void run() {<NEW_LINE>// TUIChatLog.e(TAG, "mIsVideoPlay = " + mIsVideoPlay);<NEW_LINE>// get current position<NEW_LINE>int timeElapsed = holder.videoView.getCurrentPosition();<NEW_LINE>if (holder.playSeekBar.getProgress() >= holder.playSeekBar.getMax()) {<NEW_LINE>TUIChatLog.e(TAG, "getProgress() >= getMax()");... | durationHandler.postDelayed(this, 100); |
1,010,373 | private JToggleButton createDspButton(String dspType) {<NEW_LINE>JToggleButton dspButton = new JToggleButton();<NEW_LINE>dspButton.setMaximumSize(new java.awt.Dimension(48, 48));<NEW_LINE>dspButton.setMinimumSize(new java.awt<MASK><NEW_LINE>dspButton.setPreferredSize(new java.awt.Dimension(48, 48));<NEW_LINE>dspButton.... | .Dimension(48, 48)); |
620,189 | private void init() {<NEW_LINE>if (initialized) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// NOI18N<NEW_LINE>LOGGER.fine("FileAssociationsModel.init");<NEW_LINE>initialized = true;<NEW_LINE>for (FileObject mimeResolverFO : getOrderedResolvers()) {<NEW_LINE>boolean userDefined = isUserDefined(mimeResolverFO);<NEW_LINE>Map<... | extensionToMimeSystem.put(extension, mimeType); |
315,797 | private int next(int state, int fromTransitionIndex, int label, Transition transition) {<NEW_LINE>assert state >= 0;<NEW_LINE>assert label >= 0;<NEW_LINE>int stateIndex = 2 * state;<NEW_LINE>int firstTransitionIndex = states[stateIndex];<NEW_LINE>int numTransitions = states[stateIndex + 1];<NEW_LINE>// Since transition... | int transitionIndex = firstTransitionIndex + 3 * mid; |
1,702,593 | private void doSetTodoPatterns(@Nonnull TodoPattern[] todoPatterns, final boolean shouldNotifyIndices) {<NEW_LINE>TodoPattern[] oldTodoPatterns = myTodoPatterns;<NEW_LINE>IndexPattern[] oldIndexPatterns = myIndexPatterns;<NEW_LINE>myTodoPatterns = todoPatterns;<NEW_LINE>buildIndexPatterns();<NEW_LINE>// only trigger in... | , PROP_TODO_PATTERNS, oldTodoPatterns, todoPatterns)); |
829,270 | private void handleTankClick() {<NEW_LINE>InventoryPlayer inv = container.getPlayer().inventory;<NEW_LINE><MASK><NEW_LINE>if (heldStack == null || heldStack.getItem() == null)<NEW_LINE>return;<NEW_LINE>Item heldItem = heldStack.getItem();<NEW_LINE>if (FluidContainerRegistry.isEmptyContainer(heldStack)) {<NEW_LINE>int c... | ItemStack heldStack = inv.getItemStack(); |
1,047,043 | public void writeHyperlink(String tagName, XmlNamespace namespace, JRHyperlink hyperlink) throws IOException {<NEW_LINE>if (hyperlink != null) {<NEW_LINE><MASK><NEW_LINE>writer.addEncodedAttribute(JRXmlConstants.ATTRIBUTE_hyperlinkType, hyperlink.getLinkType(), HyperlinkTypeEnum.NONE.getName());<NEW_LINE>writer.addEnco... | writer.startElement(tagName, namespace); |
588,879 | private void addIconTab(final int position, Drawable drawable, CharSequence contentDescription) {<NEW_LINE>ImageView tab = new ImageView(getContext()) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected void onDraw(Canvas canvas) {<NEW_LINE>super.onDraw(canvas);<NEW_LINE>if (pager.getAdapter() instanceof IconTabProvider)... | (getThemedColor(Theme.key_chat_messagePanelIcons)); |
1,696,459 | private static void generateSignedCert(File keystore, String password, int validity, String alias, String subject) throws IOException {<NEW_LINE>String dname = "cn=" + guardSubjectName(subject) + ", o=JMeter Proxy (TEMPORARY TRUST ONLY)";<NEW_LINE>String <MASK><NEW_LINE>KeyToolUtils.genkeypair(keystore, alias, password... | ext = "san=" + chooseExtension(subject); |
1,327,920 | private I_C_BPartner_Location updateOldAddressIfExistsAndMatches(@NonNull final I_I_Pharma_BPartner importRecord) {<NEW_LINE>final List<I_C_BPartner_Location> existentBPLocations = Services.get(IBPartnerDAO.class).<MASK><NEW_LINE>if (existentBPLocations.isEmpty()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final Addre... | retrieveBPartnerLocations(importRecord.getC_BPartner()); |
809,638 | public void process(List<EllipseRotated_F64> ellipses, List<List<EllipsesIntoClusters.Node>> clusters) {<NEW_LINE>foundGrids.reset();<NEW_LINE>for (int i = 0; i < clusters.size(); i++) {<NEW_LINE>List<EllipsesIntoClusters.Node> cluster = clusters.get(i);<NEW_LINE>int clusterSize = cluster.size();<NEW_LINE>if (clusterSi... | System.out.println("Outer column with a row that has only one element"); |
847,019 | private static void tarjanSCC(int u) {<NEW_LINE><MASK><NEW_LINE>// dfs_low[u] <= dfs_num[u]<NEW_LINE>dfs_low.set(u, dfsNumberCounter++);<NEW_LINE>// stores u in a vector based on order of visitation<NEW_LINE>St.push(u);<NEW_LINE>visited.set(u, 1);<NEW_LINE>for (IntegerPair v_w : AL.get(u)) {<NEW_LINE>if (// a tree edge... | dfs_num.set(u, dfsNumberCounter); |
332,792 | /*<NEW_LINE>* Returns whether the given resource is in one of the given output folders and if<NEW_LINE>* it is filtered out from this output folder.<NEW_LINE>*/<NEW_LINE>private boolean isResFilteredFromOutput(RootInfo rootInfo, OutputsInfo info, IResource res, int elementType) {<NEW_LINE>if (info != null) {<NEW_LINE>J... | JAVA_PROJECT, null) : rootInfo.project; |
809,786 | public Request<SetTypeConfigurationRequest> marshall(SetTypeConfigurationRequest setTypeConfigurationRequest) {<NEW_LINE>if (setTypeConfigurationRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<SetTypeConfigurationRequest> request = new De... | request.addParameter("Version", "2010-05-15"); |
1,073,337 | public void marshall(ListFindingsReportsRequest listFindingsReportsRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (listFindingsReportsRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(listFi... | e.getMessage(), e); |
1,493,275 | public VariableStorage clone(Program newProgram) throws InvalidInputException {<NEW_LINE>if (program == null || newProgram == program) {<NEW_LINE>if (getClass().equals(VariableStorage.class)) {<NEW_LINE>// only reuse if simple VariableStorage instance<NEW_LINE>return this;<NEW_LINE>}<NEW_LINE>if (isUnassignedStorage())... | getLanguage().toString()); |
86,047 | private void dispatchOnSameActivity(PvmExecutionImpl targetScope, PvmExecutionImpl replacedBy, Map<PvmExecutionImpl, String> activityIds, Map<PvmExecutionImpl, String> activityInstanceIds, DelayedVariableEvent delayedVariableEvent) {<NEW_LINE>// check if the target scope has the same activity id and activity instance i... | lastActivityInstanceId = activityInstanceIds.get(targetScope); |
1,299,090 | public static void shareAction(@NonNull Context context, String shareableMessage, String sharingTitle) {<NEW_LINE>Intent sendIntent = new Intent();<NEW_LINE>sendIntent.setAction(Intent.ACTION_SEND);<NEW_LINE>sendIntent.putExtra(Intent.EXTRA_TEXT, shareableMessage);<NEW_LINE>sendIntent.setType("text/plain");<NEW_LINE>if... | sharingTitle, pendingIntent.getIntentSender()); |
1,761,745 | public void writeToParcel(Parcel dest, int flags) {<NEW_LINE>dest.writeString(payment.<MASK><NEW_LINE>dest.writeParcelable(new PayeeParcelable(payment.getPayee()), flags);<NEW_LINE>dest.writeLong(payment.getBlockIndex());<NEW_LINE>dest.writeLong(payment.getBlockTimestamp());<NEW_LINE>dest.writeLong(payment.getTimestamp... | getUuid().toString()); |
1,508,566 | public JPanel buildAlignmentPanel() {<NEW_LINE>alignmentTable = createAlignmentTable(null, 0);<NEW_LINE>mainPanel = new JPanel(new BorderLayout());<NEW_LINE>mainPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));<NEW_LINE>alignmentTable.setColumnHeaderPopupEnabled(true);<NEW_LINE>scrollPane = new JScrollP... | getButtonPanel(), BorderLayout.SOUTH); |
846,848 | public boolean process(@Nullable List<AssociatedPair> points2D, @Nullable List<AssociatedPair3D> points3D, @Nullable List<AssociatedPairConic> conics, DMatrixRMaj foundH) {<NEW_LINE>// no sanity check is done to see if the minimum number of points and conics has been provided because<NEW_LINE>// that is actually really... | ? points3D.size() : 0; |
930,069 | private JPanel buildUserInfoPanel() {<NEW_LINE>textFieldFirstName = new JFriendlyTextField(FIRST_NAME_HINT);<NEW_LINE>textFieldFirstName.setPreferredSize(new Dimension(300, 24));<NEW_LINE>textFieldLastName = new JFriendlyTextField(LAST_NAME_HINT);<NEW_LINE>textFieldLastName.setPreferredSize(new Dimension(300, 24));<NEW... | add(jHelpEmail, BorderLayout.CENTER); |
1,736,283 | public void visitType(TransactionType type) {<NEW_LINE>String typeName = type.getId();<NEW_LINE>Domain domain = m_report.findOrCreateDomain(m_domain);<NEW_LINE>if ("Service".equals(typeName)) {<NEW_LINE>typeName = "PigeonService";<NEW_LINE>} else if ("Call".equals(typeName)) {<NEW_LINE>typeName = "PigeonCall";<NEW_LINE... | long value = entry.getValue(); |
1,006,442 | public Bundle toBundle() {<NEW_LINE>Bundle bundle = new Bundle();<NEW_LINE>bundle.putString(keyForField(FIELD_ID), id);<NEW_LINE>bundle.putString(keyForField(FIELD_LABEL), label);<NEW_LINE>bundle.putString(keyForField(FIELD_LANGUAGE), language);<NEW_LINE>bundle.putInt(keyForField(FIELD_SELECTION_FLAGS), selectionFlags)... | (keyForField(FIELD_FRAME_RATE), frameRate); |
37,279 | private static String copyNativeLibraryFromClasspath(Platform platform) {<NEW_LINE>Path tmp = null;<NEW_LINE>try {<NEW_LINE>String <MASK><NEW_LINE>Path cacheDir = getCacheDir(platform);<NEW_LINE>Path path = cacheDir.resolve(libName);<NEW_LINE>if (Files.exists(path)) {<NEW_LINE>return path.toAbsolutePath().toString();<N... | libName = System.mapLibraryName(NATIVE_LIB_NAME); |
1,772,482 | public TextBlock asBig(final TextBlock title, final HorizontalAlignment labelAlignment, final TextBlock stereotype, final double width, final double height, final SymbolContext symbolContext, final HorizontalAlignment stereoAlignment) {<NEW_LINE>return new AbstractTextBlock() {<NEW_LINE><NEW_LINE>public void drawU(UGra... | return new Dimension2DDouble(width, height); |
756,865 | public void save() throws Exception {<NEW_LINE>ArrayList<Attachment> attachments = new ArrayList<Attachment>();<NEW_LINE>for (Attachment attachment : this.getRemovedItems()) {<NEW_LINE>if (!attachment.isNew()) {<NEW_LINE>attachments.add(attachment);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// If any, delete them by calling the D... | ).getUniqueId(), attachments); |
1,462,888 | protected void loadConfig() {<NEW_LINE>Map map = subs.getHistoryConfig();<NEW_LINE>Long l_enabled = (Long) map.get("enabled");<NEW_LINE>enabled = l_enabled == null ? true : l_enabled.longValue() == 1;<NEW_LINE>Long l_auto_dl = (Long) map.get("auto_dl");<NEW_LINE>auto_dl = l_auto_dl == null ? false : l_auto_dl.longValue... | getMapString(map, "nets", null); |
1,475,488 | private static Encoding processDRegexpElement(Ruby runtime, RegexpOptions options, Encoding regexpEnc, Encoding[] fixedEnc, RubyString str) {<NEW_LINE>Encoding strEnc = str.getEncoding();<NEW_LINE>if (options.isEncodingNone() && strEnc != ASCIIEncoding.INSTANCE) {<NEW_LINE>if (str.scanForCodeRange() != StringSupport.CR... | fixedEnc, RegexpSupport.ErrorMode.PREPROCESS); |
111,209 | private Node createExternFunctionForEs6Class(Node exportedClass) {<NEW_LINE>Node constructorMethodDefinition = NodeUtil.getEs6ClassConstructorMemberFunctionDef(exportedClass);<NEW_LINE>if (constructorMethodDefinition == null) {<NEW_LINE>// no constructor for the class, so just create an empty function with parameters<N... | paramList, IR.block()); |
977,137 | public BuiltInScalarFunctionImplementation specialize(BoundVariables boundVariables, int arity, FunctionAndTypeManager functionAndTypeManager) {<NEW_LINE>Type keyType = boundVariables.getTypeVariable("K");<NEW_LINE>Type inputValueType1 = boundVariables.getTypeVariable("V1");<NEW_LINE>Type inputValueType2 = boundVariabl... | outputValueType = boundVariables.getTypeVariable("V3"); |
65,404 | private void loadNode262() {<NEW_LINE>PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.ConditionType_EnabledState_EffectiveDisplayName, new QualifiedName(0, "EffectiveDisplayName"), new LocalizedText("en", "EffectiveDisplayName"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0),... | .expanded(), true)); |
190,779 | public void testRollbackLocalTransaction_TCP(HttpServletRequest request, HttpServletResponse response) throws Exception {<NEW_LINE>boolean testFailed = false;<NEW_LINE>try {<NEW_LINE>JMSContext jmsContextQCFTCP = qcfTCP.createContext(Session.SESSION_TRANSACTED);<NEW_LINE>emptyQueue(qcfTCP, queue);<NEW_LINE>Message mess... | jmsProducerQCFTCP.send(queue, message); |
900,447 | private void processChildren(List<RemovrSpec> children, Object subInput) {<NEW_LINE>if (subInput != null) {<NEW_LINE>if (subInput instanceof List) {<NEW_LINE>List<Object> subList = (List<Object>) subInput;<NEW_LINE>Set<Integer> <MASK><NEW_LINE>// build a list of all indicies to remove<NEW_LINE>for (RemovrSpec childSpec... | indiciesToRemove = new HashSet<>(); |
1,271,331 | public static void decomposePolygon(Polygon polygon, boolean orientation, List<Polygon> collector) {<NEW_LINE>if (polygon.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>LinearRing shell = filterRing(polygon.getPolygon());<NEW_LINE>LinearRing[] holes = new LinearRing[polygon.getNumberOfHoles()];<NEW_LINE>// Last poin... | (polygon.getHole(i)); |
89,245 | TypeBinding substituteInferenceVariable(InferenceVariable var, TypeBinding substituteType) {<NEW_LINE>boolean haveSubstitution = false;<NEW_LINE>TypeBinding currentBound = this.bound;<NEW_LINE>if (currentBound != null) {<NEW_LINE>currentBound = currentBound.substituteInferenceVariable(var, substituteType);<NEW_LINE>hav... | currentOtherBound = this.otherBounds[i]; |
229,485 | static boolean vp8_find_near_mvs_bias(MacroblockD xd, FullAccessGenArrPointer<ModeInfo> mi, MV[][] mode_mv_sb, MV[] best_mv_sb, int[] cnt, MVReferenceFrame refframe, EnumMap<MVReferenceFrame, Boolean> ref_frame_sign_bias) {<NEW_LINE>boolean sign_bias = ref_frame_sign_bias.get(refframe);<NEW_LINE>int sbNorm = sign_bias ... | .ordinal()], xd); |
149,660 | private CentralRepoAccount createAccount(CentralRepoAccount.CentralRepoAccountType type, String identifier) {<NEW_LINE>CentralRepoAccount ret = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>if (cr != null) {<NEW_LINE>ret = cr.getOrCreateAccount(type, identifier);<NEW_LINE>}<NEW_LINE>} catch (CentralRepoException e) {<N... | CentralRepository cr = CentralRepository.getInstance(); |
1,512,582 | protected void markBits(String[] args, Context context, PrintStream out) throws DDRInteractiveCommandException {<NEW_LINE>try {<NEW_LINE>long address = CommandUtils.parsePointer(args<MASK><NEW_LINE>J9ObjectPointer object = J9ObjectPointer.cast(address);<NEW_LINE>J9ObjectPointer base = J9ObjectPointer.cast(address).unta... | [1], J9BuildFlags.env_data64); |
1,159,421 | private I_AD_MigrationData createMigrationData(final PO po, final POInfo info, final int columnIndex, final String event) {<NEW_LINE>// Don't log encrypted columns<NEW_LINE>if (info.isEncrypted(columnIndex)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>// Don't log virtual columns<NEW_LINE>if (info.isVirtualColumn(colum... | converter.objectToString(infoColumn, value); |
131,386 | public void changeUserRoleAjax(@PathVariable("action") String action, @PathVariable("userId") int userId, @PathVariable("roleId") int roleId, HttpServletResponse response, HttpServletRequest request) {<NEW_LINE>try {<NEW_LINE>UserRole userRole = new UserRole();<NEW_LINE>userRole.setUserId(userId);<NEW_LINE>userRole.set... | object.put("info", "Delete role has successed."); |
555,618 | final GetDedicatedIpsResult executeGetDedicatedIps(GetDedicatedIpsRequest getDedicatedIpsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getDedicatedIpsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(F... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
781,855 | public static double kendall(int[] x, int[] y) {<NEW_LINE>if (x.length != y.length) {<NEW_LINE>throw new IllegalArgumentException("Input vector sizes are different.");<NEW_LINE>}<NEW_LINE>int is = 0, n2 = 0, n1 = 0, n = x.length;<NEW_LINE>double aa, a2, a1;<NEW_LINE>for (int j = 0; j < n - 1; j++) {<NEW_LINE>for (int k... | [j] - x[k]; |
445,721 | public void run() {<NEW_LINE>long etime = firstTime;<NEW_LINE>long stime = etime / DateUtil.MILLIS_PER_MINUTE * DateUtil.MILLIS_PER_MINUTE;<NEW_LINE>MapPack extra = new MapPack();<NEW_LINE>if (TagConstants.GROUP_SERVICE.equals(tagGroup)) {<NEW_LINE>extra.put("txid", firstTxid);<NEW_LINE>}<NEW_LINE>List<Pack> list = loa... | = new ArrayList<Pack>(); |
274,242 | private List<TextDetail> matchWholeFile(CharSequence cb, FileObject fo) throws DataObjectNotFoundException {<NEW_LINE>Matcher textMatcher = pattern.matcher(cb);<NEW_LINE>DataObject dataObject = null;<NEW_LINE>MultiLineMappedMatcherSmall.LineInfoHelper lineInfoHelper = new MultiLineMappedMatcherSmall.LineInfoHelper(cb);... | = new TextDetail(dataObject, searchPattern); |
1,105,674 | public WriteTreatmentResource unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AwsJsonReader reader = context.getReader();<NEW_LINE>if (!reader.isContainer()) {<NEW_LINE>reader.skipValue();<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>WriteTreatmentResource writeTreatmentResource = new WriteTreatmen... | ().unmarshall(context)); |
488,722 | void fillAnnotationStruct(ParsedAnnotation annotation) {<NEW_LINE>var withStruct = annotation.getStruct();<NEW_LINE>if (withStruct.isPresent()) {<NEW_LINE>var doc = annotation.getOwnerDoc();<NEW_LINE>var toFill = findStructFromParsed(withStruct.get());<NEW_LINE>for (ParsedField field : withStruct.get().getFields()) {<N... | inherit(findStructFromParsed(ps))); |
443,658 | public void onResponse(JSONObject jsonObject) {<NEW_LINE>if (callback == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (jsonObject == null) {<NEW_LINE>callback.onError();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Map<String, String> <MASK><NEW_LINE>JSONObject errors = jsonObject.optJSONObject("errors");<NEW_LINE>if (error... | failedUsernames = new LinkedHashMap<>(); |
601,106 | // private helper methods -------------------------------------------------<NEW_LINE>private synchronized void updateCredentials() {<NEW_LINE>File usersPropFile = new File(getServerDir(), "/conf/props/jmx-console-users.properties");<NEW_LINE>long lastModified = usersPropFile.lastModified();<NEW_LINE>if (lastModified ==... | WARNING, usersPropFile + " not found.", e); |
1,325,363 | protected JFreeChart createPie3DChart() throws JRException {<NEW_LINE>ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());<NEW_LINE>JFreeChart jfreeChart = ChartFactory.createPieChart3D(evaluateTextExpression(getChart().getTitleExpression()), (PieDataset) getDataset(), isShowLegend(), true, false);<NEW_L... | setLabelBackgroundPaint(itemLabel.getBackgroundColor()); |
383,486 | public Object visit(ASTCompilationUnit cUnit, Object data) {<NEW_LINE>SortedMap<Integer, Node> itemsByLineNumber = this.orderedCommentsAndEnumDeclarations(cUnit);<NEW_LINE>// Check comments between ASTEnumDeclaration and ASTEnumConstant.<NEW_LINE>boolean isPreviousEnumDecl = false;<NEW_LINE>for (Entry<Integer, Node> en... | super.visit(cUnit, data); |
559,519 | protected List<OfferAudit> saveOfferIds(Set<Offer> offers, Map<Offer, OfferCode> offerToCodeMapping, Order order) {<NEW_LINE>List<OfferAudit> audits = new ArrayList<>(offers.size());<NEW_LINE>for (Offer offer : offers) {<NEW_LINE>OfferAudit audit = offerAuditService.create();<NEW_LINE>audit.setCustomerId(order.getCusto... | codeUsedToRetrieveOffer = offerToCodeMapping.get(offer); |
1,661,377 | private MouseEvent handleWideMouseEvent(MouseEvent e) {<NEW_LINE>if (!isWideSelection() || !tree.isEnabled() || !SwingUtilities.isLeftMouseButton(e) || e.isConsumed())<NEW_LINE>return e;<NEW_LINE>int x = e.getX();<NEW_LINE>int y = e.getY();<NEW_LINE>TreePath path = getClosestPathForLocation(tree, x, y);<NEW_LINE>if (pa... | + bounds.width - 1)); |
401,981 | public static DescribeStrategyTargetResponse unmarshall(DescribeStrategyTargetResponse describeStrategyTargetResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeStrategyTargetResponse.setRequestId(_ctx.stringValue("DescribeStrategyTargetResponse.RequestId"));<NEW_LINE>List<StrategyTarget> strategyTargets = new Array... | ("DescribeStrategyTargetResponse.StrategyTargets[" + i + "].TargetType")); |
642,199 | // GROOVY end<NEW_LINE>SourceTypeBinding buildType(SourceTypeBinding enclosingType, PackageBinding packageBinding, AccessRestriction accessRestriction) {<NEW_LINE>// provide the typeDeclaration with needed scopes<NEW_LINE>this.referenceContext.scope = this;<NEW_LINE>this.referenceContext.staticInitializerScope = new Me... | SourceTypeBinding(className, packageBinding, this); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.