idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,583,754 | public List<HealthRecord> healthCheck(final SystemHealthCheckRequest systemHealthCheckRequest) {<NEW_LINE>final AppConfig config = systemHealthCheckRequest.getDomainConfig();<NEW_LINE>final Locale locale = systemHealthCheckRequest.getLocale();<NEW_LINE>final String separator = LocaleHelper.getLocalizedMessage(locale, C... | , HealthMessage.Config_PromiscuousLDAP, appPropertyKey)); |
917,119 | private void receiveTransportAccept(JinglePacket packet) {<NEW_LINE>if (responding()) {<NEW_LINE>Log.d(Config.LOGTAG, id.account.getJid().asBareJid() + ": received out of order transport-accept (we were responding)");<NEW_LINE>respondToIqWithOutOfOrder(packet);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final boolean validSt... | String sid = ibbTransportInfo.getTransportId(); |
1,516,611 | private static SetArgs createSetArgs4(Object[] argsArr) {<NEW_LINE>if (argsArr.length != 4) {<NEW_LINE>MatrixLog.w(TAG, "createSetArgs args length invalid : %d", argsArr.length);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>SetArgs setArgs = new SetArgs();<NEW_LINE>if (!(argsArr[0] instanceof Integer)) {<NEW_LINE>MatrixLo... | = (Long) argsArr[1]; |
1,087,903 | public final VsplatparameterContext vsplatparameter(ArgDefListBuilder args) throws RecognitionException {<NEW_LINE>VsplatparameterContext _localctx = new VsplatparameterContext(_ctx, getState(), args);<NEW_LINE>enterRule(_localctx, 32, RULE_vsplatparameter);<NEW_LINE>int _la;<NEW_LINE>try {<NEW_LINE>enterOuterAlt(_loca... | (name) : null, null); |
452,059 | public UnmodifiableIterator<N> iterator() {<NEW_LINE>if (orderedNodeConnections == null) {<NEW_LINE>Iterator<Entry<N, Object>> entries = adjacentNodeValues.entrySet().iterator();<NEW_LINE>return new AbstractIterator<N>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>@CheckForNull<NEW_LINE>protected N computeNext() {<NEW_LINE... | > entry = entries.next(); |
847,815 | public LustreLogConfiguration unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>LustreLogConfiguration lustreLogConfiguration = new LustreLogConfiguration();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>i... | JsonToken token = context.getCurrentToken(); |
750,804 | public static String replace(String text, String repl, String with, int max) {<NEW_LINE>if (isEmpty(text) || isEmpty(repl) || with == null || max == 0) {<NEW_LINE>return text;<NEW_LINE>}<NEW_LINE>int start = 0;<NEW_LINE>int end = text.indexOf(repl, start);<NEW_LINE>if (end == -1) {<NEW_LINE>return text;<NEW_LINE>}<NEW_... | text.length() + increase); |
1,102,092 | public void askForAccess() {<NEW_LINE>askPermissions = false;<NEW_LINE>showStorageAlertWithDelay = true;<NEW_LINE>// If mobile device, only portrait mode is allowed<NEW_LINE>if (!isTablet(this)) {<NEW_LINE>logDebug("Mobile only portrait mode");<NEW_LINE>setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);... | drawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED); |
723,980 | public MultivaluedMap<String, String> update(MultivaluedMap<String, String> incomingHeaders, MultivaluedMap<String, String> clientOutgoingHeaders) {<NEW_LINE>MultivaluedMap<String, String> myHeaders = new MultivaluedHashMap<>();<NEW_LINE>myHeaders.putSingle("HEADER_FROM_CUSTOM_CLIENTHEADERSFACTORY", "456");<NEW_LINE>LO... | "INJECTED_FOO", foo.getWord()); |
147,553 | public void testNoClassloaderContext(HttpServletRequest request, PrintWriter out) throws Exception {<NEW_LINE>LoadClassTask task = new LoadClassTask();<NEW_LINE>System.out.println("Servlet thread class loader " + Thread.currentThread().getContextClassLoader());<NEW_LINE>// Validate that it works from the servlet thread... | throw new Exception("Task did not complete in a timely manner. " + status); |
638,124 | private void handleTargetsForVMware(long hostId, long storagePoolId) {<NEW_LINE>HostVO host = hostDao.findById(hostId);<NEW_LINE>if (host.getHypervisorType() == HypervisorType.VMware) {<NEW_LINE>String storageAddress = storagePoolDetailsDao.findDetail(storagePoolId, SolidFireUtil.STORAGE_VIP).getValue();<NEW_LINE>int s... | setTargetTypeToRemove(ModifyTargetsCommand.TargetTypeToRemove.DYNAMIC); |
1,364,655 | public static <T extends Node<?>, P1, P2> NodeInfo<T> create(T n, NodeCtor2<P1, P2, T> ctor, P1 p1, P2 p2) {<NEW_LINE>return new NodeInfo<T>(n) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected List<Object> innerProperties() {<NEW_LINE>return Arrays.asList(p1, p2);<NEW_LINE>}<NEW_LINE><NEW_LINE>protected T innerTransfo... | Objects.equals(p1, newP1); |
605,499 | public void simpleLayout(Comparator<SortableElement> comparator, List<SortableElement> elements) {<NEW_LINE>int maxHeight = 0;<NEW_LINE>int sumWidth = 0;<NEW_LINE>for (SortableElement e : elements) {<NEW_LINE>if (e.getElement().getRectangle().height > maxHeight) {<NEW_LINE>maxHeight = e.getElement<MASK><NEW_LINE>}<NEW_... | ().getRectangle().height; |
759,920 | static int isPointInPolygon(Polygon inputPolygon, double inputPointXVal, double inputPointYVal, double tolerance) {<NEW_LINE>if (inputPolygon.isEmpty())<NEW_LINE>return 0;<NEW_LINE>Envelope2D env = new Envelope2D();<NEW_LINE>inputPolygon.queryLooseEnvelope(env);<NEW_LINE>env.inflate(tolerance, tolerance);<NEW_LINE>if (... | RasterizedGeometry2D rgeom = accel.getRasterizedGeometry(); |
976,883 | private static void parseMethods(String id, NodeList nodeList, RootBeanDefinition beanDefinition, ParserContext parserContext) throws ClassNotFoundException {<NEW_LINE>if (nodeList != null && nodeList.getLength() > 0) {<NEW_LINE>ManagedList methods = null;<NEW_LINE>for (int i = 0; i < nodeList.getLength(); i++) {<NEW_L... | node = nodeList.item(i); |
197,984 | protected void executeTasksOnWorker(Id server) {<NEW_LINE>String page = this.supportsPaging() ? PageInfo.PAGE_NONE : null;<NEW_LINE>do {<NEW_LINE>Iterator<HugeTask<Object>> tasks = this.tasks(TaskStatus.SCHEDULED, PAGE_SIZE, page);<NEW_LINE>while (tasks.hasNext()) {<NEW_LINE>HugeTask<?<MASK><NEW_LINE>this.initTaskCalla... | > task = tasks.next(); |
1,604,977 | final RevokeInvitationResult executeRevokeInvitation(RevokeInvitationRequest revokeInvitationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(revokeInvitationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
997,078 | private void initDxSettings() {<NEW_LINE>try {<NEW_LINE>Boolean d3d = !settings.getBoolean("nod3d");<NEW_LINE>Boolean ddraw = settings.getBoolean("noddraw");<NEW_LINE>String uiScale = null;<NEW_LINE>if (settings.getLong("uiScale") > 0) {<NEW_LINE>uiScale = String.valueOf(settings<MASK><NEW_LINE>}<NEW_LINE>LOGGER.info(S... | .getLong("uiScale") / 100.0); |
1,535,307 | protected static String calculateCodeCommitPassword(URIish uri, String awsSecretKey) {<NEW_LINE>String[] split = uri.getHost().split("\\.");<NEW_LINE>if (split.length < 4) {<NEW_LINE>throw new CredentialException("Cannot detect AWS region from URI", null);<NEW_LINE>}<NEW_LINE>String region = split[1];<NEW_LINE>Date now... | throw new CredentialException("Error calculating AWS CodeCommit password", e); |
486,898 | public static Map<String, String> analyzeBackendTagsProperties(Map<String, String> properties, Tag defaultValue) throws AnalysisException {<NEW_LINE>Map<String, String> tagMap = Maps.newHashMap();<NEW_LINE>Iterator<Map.Entry<String, String>> iter = properties.entrySet().iterator();<NEW_LINE>while (iter.hasNext()) {<NEW... | (keyParts[1], val); |
968,526 | public void showAdminPreferenceFunction(final RequestContext context) {<NEW_LINE>final String templateName = "admin-preference.ftl";<NEW_LINE>final AbstractFreeMarkerRenderer renderer = new ConsoleRenderer(context, templateName);<NEW_LINE>final Locale locale = Latkes.getLocale();<NEW_LINE>final Map<String, String> lang... | final String id = availableIDs[i]; |
813,452 | // -------------------------------------------------------------------------<NEW_LINE>@Override<NEW_LINE>public PortfolioItemSummary summarize() {<NEW_LINE>// 5Y USD 2mm Rec USD-LIBOR-6M Cap 1% / Pay Premium : 21Jan17-21Jan22<NEW_LINE>StringBuilder buf = new StringBuilder(96);<NEW_LINE>IborCapFloorLeg mainLeg = product... | ().getInitialValue())); |
950,895 | default Map<String, String> buildJobContext(LineageEvent event) {<NEW_LINE>Map<String, String> <MASK><NEW_LINE>if (event.getJob().getFacets() != null) {<NEW_LINE>if (event.getJob().getFacets().getSourceCodeLocation() != null) {<NEW_LINE>if (event.getJob().getFacets().getSourceCodeLocation().getType() != null) {<NEW_LIN... | args = new LinkedHashMap<>(); |
1,172,548 | public MatchResult match(List<YamlContract> contracts, Request request, Parameters parameters) {<NEW_LINE>YamlContract contract = contracts.get(0);<NEW_LINE>// TODO: What if the body is in files?<NEW_LINE>Map body = (Map) contract.request.body;<NEW_LINE>try {<NEW_LINE>Map jsonBodyFromContract = body;<NEW_LINE>Map jsonB... | Map) jsonBodyFromRequest.get("variables"); |
1,196,376 | public void marshall(Condition condition, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (condition == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(condition.getEq(), EQ_BINDING);<NEW_LINE>protocolMarshall... | condition.getGreaterThan(), GREATERTHAN_BINDING); |
218,075 | public DBClusterRole unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>DBClusterRole dBClusterRole = new DBClusterRole();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument())<NEW_LINE>targetDepth += 1;<NEW_L... | ().unmarshall(context)); |
808,809 | public boolean apply(Game game, Ability source) {<NEW_LINE>FilterCard filterCardInHand = new FilterCard();<NEW_LINE>filterCardInHand.add(SubType.AURA.getPredicate());<NEW_LINE>Player controller = game.<MASK><NEW_LINE>Permanent academyResearchers = game.getPermanent(source.getSourceId());<NEW_LINE>if (controller != null... | getPlayer(source.getControllerId()); |
1,178,321 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player player = game.getPlayer(game.getActivePlayerId());<NEW_LINE>Permanent permanent = game.getPermanent(source.getSourceId());<NEW_LINE>if (player == null || permanent == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Choice choice = new ChoiceImpl();<NE... | "Add a doom counter", "Remove a doom counter", "Do nothing"))); |
1,343,252 | private int bfsToGetShortestCycle(Graph graph, int sourceVertex) {<NEW_LINE>int shortestCycle = Integer.MAX_VALUE;<NEW_LINE>int[] distTo = new int[graph.vertices()];<NEW_LINE>int[] edgeTo = new int[graph.vertices()];<NEW_LINE>Queue<Integer> queue = new Queue<>();<NEW_LINE>boolean[] visited = new boolean[graph.vertices(... | int currentVertex = queue.dequeue(); |
856,404 | protected ListPopup createPopup(DataContext context) {<NEW_LINE>WidgetState state = getWidgetState(context.getData(CommonDataKeys.VIRTUAL_FILE));<NEW_LINE>Editor editor = getEditor();<NEW_LINE>PsiFile psiFile = getPsiFile();<NEW_LINE>if (state instanceof MyWidgetState && editor != null && psiFile != null) {<NEW_LINE>fi... | MyWidgetState) state).getContributor(); |
1,326,763 | public void removeUser(Long userId, String xSdsAuthToken) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// verify the required parameter 'userId' is set<NEW_LINE>if (userId == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'userId' when calling removeUser");<NEW_L... | localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); |
700,718 | protected void bindServer() {<NEW_LINE>// Bind and start to accept incoming connections.<NEW_LINE>final InetAddress[] hostAddresses;<NEW_LINE>try {<NEW_LINE>hostAddresses = networkService.resolveBindHostAddresses(bindHosts);<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new BindHttpException("Failed to resolve host... | ArrayList<>(hostAddresses.length); |
389,887 | public static void downloadNovel(BaseActivity<?> activity, String displayName, String content, Callback<Uri> targetCallback) {<NEW_LINE>check(activity, new FeedBack() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void doSomething() {<NEW_LINE>File textFile = LegacyFile.textFile(activity, displayName);<NEW_LINE>try {<N... | write(content.getBytes()); |
710,981 | protected void checkImage(XMLElement e, String attrNS, String attr) {<NEW_LINE>// if it's an SVG image, fall back to super's logic<NEW_LINE>String ns = e.getNamespace();<NEW_LINE>if ("http://www.w3.org/2000/svg".equals(ns)) {<NEW_LINE>super.checkImage(e, attrNS, attr);<NEW_LINE>} else // else process image source sets ... | srcset = e.getAttribute("srcset"); |
1,652,422 | private void saveBPartnerLocations(@NonNull final BPartnerComposite bPartnerComposite, final boolean validatePermissions) {<NEW_LINE>final List<BPartnerLocation> bpartnerLocations = bPartnerComposite.getLocations();<NEW_LINE>final BPartnerId bpartnerId = bPartnerComposite.getBpartner().getId();<NEW_LINE>final OrgId org... | validatePermissions(validatePermissions).build(); |
191,128 | protected void observerShardLeader(final Long clusterDbId, final Long shardDbId) {<NEW_LINE>logger.info("[observerShardLeader]cluster_{},shard_{}", clusterDbId, shardDbId);<NEW_LINE>final CuratorFramework client = zkClient.get();<NEW_LINE>if (currentMetaManager.watchIfNotWatched(clusterDbId, shardDbId)) {<NEW_LINE>try ... | clusterDbId, shardDbId, pathChildrenCache, e); |
767,263 | public boolean register(final InferableJavaFileObject jfo) {<NEW_LINE>Parameters.notNull("jfo", jfo);<NEW_LINE>final String inferedName = jfo.inferBinaryName();<NEW_LINE>final String[] pkgName = FileObjects.getPackageAndName(inferedName);<NEW_LINE>List<Integer> ids = this.packages.get(pkgName[0]);<NEW_LINE>if (ids == n... | Integer id = it.next(); |
156,794 | private void cmd_button() {<NEW_LINE>log.config("Activity=" + m_activity);<NEW_LINE>if (m_activity == null)<NEW_LINE>return;<NEW_LINE>//<NEW_LINE>MWFNode node = m_activity.getNode();<NEW_LINE>if (MWFNode.ACTION_UserWindow.equals(node.getAction())) {<NEW_LINE>// Explicit Window<NEW_LINE>int AD_Window_ID = node.getAD_Win... | form = ADForm.openForm(AD_Form_ID); |
826,570 | protected void exportStyledTextRun(Map<AttributedCharacterIterator.Attribute, Object> styledTextAttributes, String text, Locale locale, Color backcolor) throws IOException, JRException {<NEW_LINE>JRFont styleFont = new JRBaseFont(styledTextAttributes);<NEW_LINE>Color styleForeground = (Color) styledTextAttributes.get(T... | valueOf(getColorIndex(styleBackground))); |
1,639,318 | public void afterActionPerformed(AnAction action, DataContext dataContext, AnActionEvent event) {<NEW_LINE>StringBuffer out = new StringBuffer();<NEW_LINE>final ActionManager actionManager = ActionManager.getInstance();<NEW_LINE>final String id = actionManager.getId(action);<NEW_LINE>out.append("id=" + id);<NEW_LINE>if... | out.toString(), null); |
1,246,219 | public final FieldContext field() throws RecognitionException {<NEW_LINE>FieldContext _localctx = new <MASK><NEW_LINE>enterRule(_localctx, 58, RULE_field);<NEW_LINE>int _la;<NEW_LINE>try {<NEW_LINE>enterOuterAlt(_localctx, 1);<NEW_LINE>{<NEW_LINE>setState(285);<NEW_LINE>type();<NEW_LINE>setState(286);<NEW_LINE>((FieldC... | FieldContext(_ctx, getState()); |
704,951 | public List<MappingField> resolveAndValidateFields(List<MappingField> userFields, Map<String, String> options, NodeEngine nodeEngine) {<NEW_LINE>InternalSerializationService ss = (InternalSerializationService) nodeEngine.getSerializationService();<NEW_LINE>// normalize and validate the names and external names<NEW_LINE... | >(fields.values()); |
337,670 | public void reduce(Text key, Iterator<Text> values, OutputCollector<Text, Text> output, Reporter reporter) throws IOException {<NEW_LINE>String field = key.toString();<NEW_LINE>reporter.setStatus("starting " + field + " ::host = " + hostName);<NEW_LINE>// concatenate strings<NEW_LINE>if (field.startsWith(VALUE_TYPE_STR... | "finished " + field + " ::host = " + hostName); |
705,990 | private List<IViewRow> retrieveRowLines(final ViewEvaluationCtx viewEvalCtx, final ViewId viewId, final DocumentIdsSelection rowIds) {<NEW_LINE>logger.debug("Getting row lines: rowId={} - {}", rowIds, this);<NEW_LINE>logger.debug("Using: {}", viewId);<NEW_LINE>final SqlAndParams sqlAndParams = sqlViewSelect.selectInclu... | pstmt, sqlAndParams.getSqlParams()); |
974,442 | public <S, D> D map(MappingContext<S, D> context) {<NEW_LINE>MappingContextImpl<S, D> contextImpl = (MappingContextImpl<S, D>) context;<NEW_LINE>Class<D<MASK><NEW_LINE>// Resolve some circular dependencies<NEW_LINE>if (!Iterables.isIterable(destinationType)) {<NEW_LINE>D circularDest = contextImpl.destinationForSource(... | > destinationType = context.getDestinationType(); |
978,886 | public static ImportSwaggerResponse unmarshall(ImportSwaggerResponse importSwaggerResponse, UnmarshallerContext _ctx) {<NEW_LINE>importSwaggerResponse.setRequestId(_ctx.stringValue("ImportSwaggerResponse.RequestId"));<NEW_LINE>List<ApiImportSwaggerSuccess> success = new ArrayList<ApiImportSwaggerSuccess>();<NEW_LINE>fo... | ("ImportSwaggerResponse.Success[" + i + "].HttpMethod")); |
708,609 | public Object interpret(ExecutionContext context, boolean debug) {<NEW_LINE>Object lhs = getValue(this.lhsGet, context, getLhs().interpret(context, debug));<NEW_LINE>Long lhsNum = null;<NEW_LINE>if (getOp().equals(">>>")) {<NEW_LINE>lhsNum = Types.toUint32(context, lhs);<NEW_LINE>} else {<NEW_LINE>lhsNum = Types.toInt3... | .rhsGet, context, value)); |
787,900 | private void addEdgeColoringControls(final DefaultFormBuilder formBuilder) {<NEW_LINE>TranslatedObject[] automaticLayoutTypes = TranslatedObject.fromEnum(AutomaticEdgeColor.class.getSimpleName() + ".", AutomaticEdgeColor.Rule.class);<NEW_LINE>mAutomaticEdgeColorComboBox = JComboBoxFactory.create(automaticLayoutTypes);<... | mEditEdgeColorsBtn, formBuilder.getColumnCount()); |
411,962 | public com.amazonaws.services.workspacesweb.model.ThrottlingException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.workspacesweb.model.ThrottlingException throttlingException = new com.amazonaws.services.workspacesweb.model.ThrottlingException(null);<NEW_LINE... | JsonToken token = context.getCurrentToken(); |
220,642 | public static ClickHouseBitmap wrap(Object bitmap, ClickHouseDataType innerType) {<NEW_LINE>final ClickHouseBitmap b;<NEW_LINE>if (bitmap instanceof RoaringBitmap) {<NEW_LINE>b = new ClickHouseRoaringBitmap((RoaringBitmap) bitmap, innerType);<NEW_LINE>} else if (bitmap instanceof MutableRoaringBitmap) {<NEW_LINE>b = ne... | ((Roaring64NavigableMap) bitmap, innerType); |
1,580,865 | private void buildExceptionDashboard(Model model, Payload payload, long date) {<NEW_LINE>model.setReportStart(new Date(payload.getDate()));<NEW_LINE>model.setReportEnd(new Date(payload.getDate() + TimeHelper.ONE_HOUR - 1));<NEW_LINE>int minuteCount = payload.getMinuteCounts();<NEW_LINE>int minute = model.getMinute();<N... | Arrays.asList(Constants.FRONT_END); |
1,145,585 | public void handleCommand(Command command) {<NEW_LINE>Thing thing = thingProvider.apply(link.getLinkedUID().getThingUID());<NEW_LINE>if (thing != null) {<NEW_LINE>final <MASK><NEW_LINE>if (handler != null) {<NEW_LINE>if (ThingHandlerHelper.isHandlerInitialized(thing)) {<NEW_LINE>logger.debug("Delegating command '{}' fo... | ThingHandler handler = thing.getHandler(); |
1,512,327 | private void printOccupancyInfo(JavaHeap theHeap, PrintStream out) {<NEW_LINE>long size = 0;<NEW_LINE>long totalObjectSize = 0;<NEW_LINE>// total number of objects on the heap<NEW_LINE>long totalObjects = 0;<NEW_LINE>// total number of corrupt objects<NEW_LINE>long totalCorruptObjects = 0;<NEW_LINE>Iterator<?> itSectio... | = totalObjectSize + theObject.getSize(); |
1,306,701 | public void parse(ReadableByteChannel dataSource, ByteBuffer header, long contentSize, BoxParser boxParser) throws IOException {<NEW_LINE>ByteBuffer content = ByteBuffer.allocate(CastUtils.l2i(contentSize));<NEW_LINE>dataSource.read(content);<NEW_LINE>((Buffer) content).position(6);<NEW_LINE>dataReferenceIndex = IsoTyp... | foregroundR = IsoTypeReader.readUInt16(content); |
1,275,490 | private boolean legalize_edge(Corner p_corner, Edge p_edge) {<NEW_LINE>if (p_edge.is_legal()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Triangle triangle_to_change;<NEW_LINE>if (p_edge.left_triangle.opposite_corner(p_edge) == p_corner) {<NEW_LINE>triangle_to_change = p_edge.right_triangle;<NEW_LINE>} else if (p_edge... | curr_edge = triangle_to_change.edge_lines[i]; |
1,490,584 | public ProcessingConfiguration unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ProcessingConfiguration processingConfiguration = new ProcessingConfiguration();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LI... | )).unmarshall(context)); |
1,015,406 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {<NEW_LINE>int horzPadding = getPaddingLeft() + getPaddingRight();<NEW_LINE>int vertPadding = getPaddingTop() + getPaddingBottom();<NEW_LINE>int childWidthMSpec, childHeightMSpec;<NEW_LINE>if (isChildRotated()) {<NEW_LINE>// Swap both measure specs, ... | , MeasureSpec.getMode(widthMeasureSpec)); |
346,837 | final DeleteImagePipelineResult executeDeleteImagePipeline(DeleteImagePipelineRequest deleteImagePipelineRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteImagePipelineRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | addHandlerContext(HandlerContextKey.SERVICE_ID, "imagebuilder"); |
1,631,365 | static void showUpdateAvailableNotification(Context context, String title, String content, UpdateFrom updateFrom, URL apk, int smallIconResourceId) {<NEW_LINE>NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);<NEW_LINE>initNotificationChannel(context,... | 0, builder.build()); |
1,105,011 | public int removeImageTypeOwner(ImageType imageType) throws ImageMgmtException {<NEW_LINE>final Set<ImageOwnership> currentOwners = new HashSet<>(getImageTypeOwnership(imageType.getName()));<NEW_LINE>final Set<ImageOwnership> ownersToRemove = new HashSet<>(imageType.getOwnerships());<NEW_LINE>ownersToRemove.retainAll(c... | ErrorCode.BAD_REQUEST, "Exception while removing " + "image owners. Invalid imageTypeId"); |
187,292 | public static SubscriptionCriteria parse(String theCriteria) {<NEW_LINE>String criteria = trim(theCriteria);<NEW_LINE>if (isBlank(criteria)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (criteria.startsWith(Constants.SUBSCRIPTION_MULTITYPE_PREFIX)) {<NEW_LINE>if (criteria.endsWith(Constants.SUBSCRIPTION_MULTITYPE_SUF... | typesSet = Sets.newHashSet(types); |
1,189,098 | private Sequence checkOptionX(Sequence[] srcSeries, Sequence table, String[] names) {<NEW_LINE>if (option == null || option.indexOf('x') == -1 || table == null) {<NEW_LINE>return table;<NEW_LINE>}<NEW_LINE>ListBase1 mems = table.getMems();<NEW_LINE>int size = mems.size();<NEW_LINE>if (size == 0) {<NEW_LINE>return table... | ] fcount = new int[count]; |
39,224 | public static Pair<Edge, NaviEdge> convertEdge(final INaviEdge edge, final NaviNode sourceNode, final NaviNode targetNode, final Graph2D graph2D, final boolean adjustColors) {<NEW_LINE>// Build the edge label if necessary<NEW_LINE>final ZyLabelContent content = ZyEdgeBuilder.buildContent(edge);<NEW_LINE>// Create the e... | setLineColor(edge.getColor()); |
685,144 | public void doInTransactionWithoutResult(TransactionStatus status) {<NEW_LINE>for (String accountName : accountNamesFinal) {<NEW_LINE>Account permittedAccount = _accountDao.findActiveAccount(accountName, domain.getId());<NEW_LINE>if (permittedAccount != null) {<NEW_LINE>if (permittedAccount.getId() == caller.getId()) {... | add(permittedAccount.getId()); |
78,126 | private void addDocumentTypes(List<SDDocumentType> docList) {<NEW_LINE>LinkedList<NewDocumentType> lst = new LinkedList<>();<NEW_LINE>for (SDDocumentType doc : docList) {<NEW_LINE>lst.add(convert(doc));<NEW_LINE>model.getDocumentManager().add(lst.getLast());<NEW_LINE>}<NEW_LINE>Map<DataType, DataType> replacements = ne... | var old = entry.getKey(); |
106,301 | private void cmp(Locatable locatable, int opIdx) {<NEW_LINE>assert opIdx >= UnitCompiler<MASK><NEW_LINE>VerificationTypeInfo operand2 = this.getCodeContext().currentInserter().getStackMap().peekOperand();<NEW_LINE>this.getCodeContext().popOperand();<NEW_LINE>VerificationTypeInfo operand1 = this.getCodeContext().current... | .EQ && opIdx <= UnitCompiler.LE; |
1,389,683 | final UpdateResourceEventConfigurationResult executeUpdateResourceEventConfiguration(UpdateResourceEventConfigurationRequest updateResourceEventConfigurationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateResourceEventConfigurationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetri... | invoke(request, responseHandler, executionContext); |
1,344,548 | public void addDebugText(List<String> messages) {<NEW_LINE><MASK><NEW_LINE>messages.add("[Iris] Shadow Distance Terrain: " + terrainFrustumHolder.getDistanceInfo() + " Entity: " + entityFrustumHolder.getDistanceInfo());<NEW_LINE>messages.add("[Iris] Shadow Culling Terrain: " + terrainFrustumHolder.getCullingInfo() + " ... | messages.add("[Iris] Shadow Maps: " + debugStringOverall); |
61,014 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_map_realtime);<NEW_LINE>Toolbar toolbar = findViewById(R.id.toolbar);<NEW_LINE>setSupportActionBar(toolbar);<NEW_LINE>ButterKnife.bind(this);<NEW_LINE>mHandler = new Handler(Looper... | mSharedPreferences = PreferenceManager.getDefaultSharedPreferences(this); |
521,950 | public List<CompletionItem> complete() {<NEW_LINE>namePrefix = ctx.getPrefix();<NEW_LINE>if (namePrefix.startsWith("<")) {<NEW_LINE>namePrefix = namePrefix.substring(1);<NEW_LINE>}<NEW_LINE>int dot = namePrefix.indexOf('.');<NEW_LINE>if (dot != -1) {<NEW_LINE>packagePrefix = namePrefix.substring(0, dot);<NEW_LINE>nameP... | TypeElement>>(loadFromAllTypes()); |
501,558 | public void run(RegressionEnvironment env) {<NEW_LINE>SupportContextListener listener = new SupportContextListener(env);<NEW_LINE>env.runtime().getContextPartitionService().addContextStateListener(listener);<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>env.compileDeploy("@name('ctx') @public create con... | .getContextPartitionService().removeContextStateListeners(); |
1,302,287 | public boolean load(String date, Collection<Integer> hashes, int serverId) {<NEW_LINE>if (hashes == null || hashes.size() == 0)<NEW_LINE>return false;<NEW_LINE>MapPack param = new MapPack();<NEW_LINE>param.put("date", date);<NEW_LINE>param.put("type", type);<NEW_LINE>ListValue hashLv = param.newList("hash");<NEW_LINE>I... | String key = en.next(); |
466,919 | void add(String field, int docUpTo, int ord, boolean hasValue) {<NEW_LINE>assert finished == false : "buffer was finished already";<NEW_LINE>if (fields[0].equals(field) == false || fields.length != 1) {<NEW_LINE>if (fields.length <= ord) {<NEW_LINE>String[] array = ArrayUtil.grow(fields, ord + 1);<NEW_LINE>if (fields.l... | = new FixedBitSet(ord + 1); |
217,875 | protected Object createNode(JSContext context, JSBuiltin builtin, boolean construct, boolean newTarget, Reflect builtinEnum) {<NEW_LINE>assert context.getEcmaScriptVersion() >= 6;<NEW_LINE>switch(builtinEnum) {<NEW_LINE>case apply:<NEW_LINE>return ReflectApplyNodeGen.create(context, builtin, args().fixedArgs(3).createA... | 2).createArgumentNodes(context)); |
512,833 | public int reactTagForTouch(float touchX, float touchY) {<NEW_LINE>CharSequence text = getText();<NEW_LINE>int target = getId();<NEW_LINE>int x = (int) touchX;<NEW_LINE>int y = (int) touchY;<NEW_LINE>Layout layout = getLayout();<NEW_LINE>if (layout == null) {<NEW_LINE>// If the layout is null, the view hasn't been prop... | int targetSpanTextLength = text.length(); |
1,477,200 | public static final SipURI creatLocalRouteHeader(SipServletRequestImpl request, Serializable stateInfo) {<NEW_LINE>if (c_logger.isTraceEntryExitEnabled()) {<NEW_LINE>c_logger.traceEntry(SipUtil.class, "creatLocalRouteHeader", new Object[] { request, stateInfo });<NEW_LINE>}<NEW_LINE>SipProvider provider = request.getSi... | SipUtil.class, "creatLocalRouteHeader", routeUri); |
1,624,099 | private void ensureParent(Box box, AbstractTreeItem child) {<NEW_LINE>if (child.parent == null) {<NEW_LINE>if (child instanceof TableHeadStructualElement || child instanceof TableFootStructualElement) {<NEW_LINE>child.parent = (TableStructualElement) box.getParent().getAccessibilityObject();<NEW_LINE>} else if (child i... | .add((TableBodyStructualElement) child); |
126,123 | default int reserveTickets(String reservationId, List<Integer> ticketIds, TicketCategory category, String userLanguage, PriceContainer.VatStatus vatStatus, IntFunction<String> ticketMetadataSupplier) {<NEW_LINE>var idx = new AtomicInteger();<NEW_LINE>var batchReserveParameters = ticketIds.stream().map(id -> new MapSqlP... | toArray(MapSqlParameterSource[]::new); |
531,443 | public static int interpolateColor(int[] colors, float proportion) {<NEW_LINE>int rTotal = 0, gTotal = 0, bTotal = 0;<NEW_LINE>// We correct the ratio to colors.length - 1 so that<NEW_LINE>// for i == colors.length - 1 and p == 1, then the final ratio is 1 (see below)<NEW_LINE>float p = proportion * (colors.length - 1)... | (p - i), 0.0f); |
1,202,401 | public WebGraphQlHandler build() {<NEW_LINE>Chain endOfChain = request -> this.service.execute(request<MASK><NEW_LINE>Chain executionChain = this.interceptors.stream().reduce(WebGraphQlInterceptor::andThen).map(interceptor -> interceptor.apply(endOfChain)).orElse(endOfChain);<NEW_LINE>ThreadLocalAccessor accessor = (Co... | ).map(WebGraphQlResponse::new); |
1,332,907 | final GetCanaryRunsResult executeGetCanaryRuns(GetCanaryRunsRequest getCanaryRunsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getCanaryRunsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
1,424,754 | final UntagResourceResult executeUntagResource(UntagResourceRequest untagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(untagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | (super.beforeMarshalling(untagResourceRequest)); |
225,900 | public Page<Task> tasks(Pageable pageable, GetTasksPayload getTasksPayload) {<NEW_LINE>TaskQuery taskQuery = taskService.createTaskQuery();<NEW_LINE>if (getTasksPayload == null) {<NEW_LINE>getTasksPayload = TaskPayloadBuilder.tasks().build();<NEW_LINE>}<NEW_LINE>String authenticatedUserId = securityManager.getAuthentic... | taskOwner(authenticatedUserId).endOr(); |
677,878 | public RegisterAppInstanceUserEndpointResult registerAppInstanceUserEndpoint(RegisterAppInstanceUserEndpointRequest registerAppInstanceUserEndpointRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(registerAppInstanceUserEndpointRequest);<... | awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); |
360,083 | protected void validateModelSpecificInfo() throws InvalidDataTypeException {<NEW_LINE>Program program = getProgram();<NEW_LINE>// Num1 is dword at SIGNATURE_OFFSET.<NEW_LINE>// No additional validation for this yet.<NEW_LINE>// Num2 is dword at ATTRIBUTES_OFFSET.<NEW_LINE>// No additional validation for this yet.<NEW_L... | " doesn't refer to a valid location for the " + Rtti2Model.DATA_TYPE_NAME + "."); |
1,508,375 | private static void fillApiDeclarationOutRepresentation(Operation operation, ResourceOperationDeclaration rod, Collection<String> usedModels) {<NEW_LINE>// Get out representation<NEW_LINE>PayLoad outRepr = null;<NEW_LINE>for (Response response : operation.getResponses()) {<NEW_LINE>if (Status.isSuccess(response.getCode... | setType(swaggerTypeFormat.getType()); |
599,920 | private Map<String, Object> normalizeHeaders(Map<String, Object> headers) {<NEW_LINE>Map<String, Object> normalizedHeaders = new HashMap<>();<NEW_LINE>for (Entry<String, Object> entry : headers.entrySet()) {<NEW_LINE>String headerName = entry.getKey();<NEW_LINE>Object headerValue = entry.getValue();<NEW_LINE>if (header... | normalizedHeaders.put(headerName, headerValue); |
1,252,771 | public static void computeNormalization(List<AssociatedPair> points, NormalizationPoint2D N1, NormalizationPoint2D N2) {<NEW_LINE>double meanX1 = 0;<NEW_LINE>double meanY1 = 0;<NEW_LINE>double meanX2 = 0;<NEW_LINE>double meanY2 = 0;<NEW_LINE>for (int pointIdx = 0; pointIdx < points.size(); pointIdx++) {<NEW_LINE>Associ... | = p.p2.x - meanX2; |
594,981 | public Request<DescribeSentimentDetectionJobRequest> marshall(DescribeSentimentDetectionJobRequest describeSentimentDetectionJobRequest) {<NEW_LINE>if (describeSentimentDetectionJobRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(DescribeSentimentDetectionJobRequest)");<N... | request.setHttpMethod(HttpMethodName.POST); |
1,600,700 | void serialize(TransformerHandler handler, File outputFile) throws SAXException, IOException, ExportException {<NEW_LINE>String filenameWithoutExtension = getFilenameWithoutExtension(outputFile);<NEW_LINE>handler.startDocument();<NEW_LINE>AttributesImpl attrs = new AttributesImpl();<NEW_LINE>writeViews(getUIFacade(), h... | getCurrentVersionNumber() + ")", attrs); |
760,807 | public static ScanHeader read(ByteBuffer bb) {<NEW_LINE>ScanHeader scan = new ScanHeader();<NEW_LINE>scan.ls <MASK><NEW_LINE>scan.ns = bb.get() & 0xff;<NEW_LINE>scan.components = new Component[scan.ns];<NEW_LINE>for (int i = 0; i < scan.components.length; i++) {<NEW_LINE>Component c = scan.components[i] = new Component... | = bb.getShort() & 0xffff; |
408,258 | public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {<NEW_LINE>Context context = getActivity();<NEW_LINE>if (context == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>if (id == R.id.spDefaultBridges) {<NEW_LINE>preferenceRepository.get().setStringPreference(DEFAULT_BRIDGES_OBF... | int id = adapterView.getId(); |
178,038 | private static CompletionStage<DataFolder> findTargetForTemplate(CompletionStage<DataObject> findTemplate, NbCodeLanguageClient client, ExecuteCommandParams params) {<NEW_LINE>final DataObject[] templateObject = new DataObject[1];<NEW_LINE>return findTemplate.thenCompose(any -> {<NEW_LINE>templateObject[0] = any;<NEW_L... | ))).thenCompose(this); |
1,811,127 | public boolean onMenuItemClick(MenuItem item) {<NEW_LINE>LogUtil.v("Chosen is " + item.getOrder());<NEW_LINE>int i = 0;<NEW_LINE>for (Spannable s : base) {<NEW_LINE>if (s.equals(item.getTitle())) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>i++;<NEW_LINE>}<NEW_LINE>switch(i) {<NEW_LINE>case 0:<NEW_LINE>SortingUtil.setTime(sub... | setTime(subreddit, TimePeriod.DAY); |
1,227,861 | protected void handleOptionalParam(Map<String, String> existingConverters, String errorLocation, boolean hasRuntimeConverters, ServerIndexedParameter builder, String elementType, String genericElementType) {<NEW_LINE>ParameterConverterSupplier converter = null;<NEW_LINE>if (genericElementType != null) {<NEW_LINE>Parame... | = new SetConverter.SetSupplier(genericTypeConverter); |
644,709 | protected MessageHandler createHandler(Object bean, Method method, List<Annotation> annotations) {<NEW_LINE>String applySequence = MessagingAnnotationUtils.resolveAttribute(annotations, "applySequence", String.class);<NEW_LINE>AbstractMessageSplitter splitter;<NEW_LINE>if (AnnotatedElementUtils.isAnnotated(method, Bean... | = new MethodInvokingSplitter(bean, method); |
1,054,263 | public void init(String name) {<NEW_LINE>Properties p = new Properties();<NEW_LINE>ClassLoader classLoader = getClass().getClassLoader();<NEW_LINE>try {<NEW_LINE>URL url = classLoader.getResource(name + ".properties");<NEW_LINE>if (url != null) {<NEW_LINE>InputStream is = url.openStream();<NEW_LINE>p.load(is);<NEW_LINE... | PropertiesUtil.fromProperties(p, _props); |
1,387,650 | final IndexFacesResult executeIndexFaces(IndexFacesRequest indexFacesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(indexFacesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<... | false), new IndexFacesResultJsonUnmarshaller()); |
538,705 | public static int[] sortInstances(InstanceList ilist, int[] instIndices, int featureIndex) {<NEW_LINE>ArrayList list = new ArrayList();<NEW_LINE>for (int ii = 0; ii < instIndices.length; ii++) {<NEW_LINE>Instance inst = ilist.get(instIndices[ii]);<NEW_LINE>FeatureVector fv = (FeatureVector) inst.getData();<NEW_LINE>lis... | p2.y ? 1 : -1; |
820,412 | public void selectFolder(final HttpServletRequest request, final String fullFolderPath, final User user, final boolean respectFrontendRoles) throws DotDataException, DotSecurityException {<NEW_LINE>final Optional<Host> hostOpt = findHostFromPath(fullFolderPath, user);<NEW_LINE>final Host host = hostOpt.isPresent() ? ho... | ).setAttribute("BrowserAjax", browserAjax); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.