idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,421,219 | public static MetaValue parse(byte[] dataBytes) throws MetadataStoreException {<NEW_LINE>if (dataBytes == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (dataBytes.length < 4) {<NEW_LINE>throw new MetadataStoreException("Invalid MetaValue data, size=" + dataBytes.length);<NEW_LINE>}<NEW_LINE>ByteBuffer buffer = B... | int formatVersion = buffer.getInt(); |
196,262 | private void open(String path, int memSize) throws FileNotFoundException, IOException {<NEW_LINE>this.path = path;<NEW_LINE>this.memBufferSize = memSize;<NEW_LINE>this.file = new File(this.path + ".hfile");<NEW_LINE>boolean isNew = this.file.exists() == false || this.file.length() < _memHeadReserved;<NEW_LINE>if (isNew... | file.length() - _memHeadReserved); |
522,717 | public final static Object coerceToType(final Object obj, final Class<?> type) throws ELException {<NEW_LINE>if (type == null || Object.class.equals(type) || (obj != null && type.isAssignableFrom(obj.getClass()))) {<NEW_LINE>return obj;<NEW_LINE>}<NEW_LINE>if (String.class.equals(type)) {<NEW_LINE>return coerceToString... | .getClass(), type)); |
1,447,228 | public Object buildAll(String modelName, ModelParameter parameter, Project project) {<NEW_LINE>final LaunchMode mode = LaunchMode.valueOf(parameter.getMode());<NEW_LINE>final List<org.gradle.api.artifacts.Dependency> enforcedPlatforms = ToolingUtils.getEnforcedPlatforms(project);<NEW_LINE>final PlatformImports platform... | ()).setPlatformImports(platformImports); |
1,262,533 | public void onDestroyActionMode(ActionMode mode) {<NEW_LINE>viewModel.endSelection();<NEW_LINE>if (Build.VERSION.SDK_INT >= 21) {<NEW_LINE>TypedArray color = getActivity().getTheme().obtainStyledAttributes(new int[] { android.R.attr.statusBarColor });<NEW_LINE>WindowUtil.setStatusBarColor(getActivity().getWindow(), col... | .R.attr.windowLightStatusBar }); |
523,982 | public static void main(String[] args) throws IOException, URISyntaxException, InterruptedException {<NEW_LINE>// Load Face Detector<NEW_LINE>CascadeClassifier faceDetector = new CascadeClassifier("haarcascade_frontalface_alt2.xml");<NEW_LINE>// Create an instance of Facemark<NEW_LINE>FacemarkKazemi facemark = Facemark... | cvtColor(img, gray, COLOR_BGR2GRAY); |
277,174 | public AggregateResult queryAggData(AggConfig config) throws Exception {<NEW_LINE>Stopwatch stopwatch = Stopwatch.createStarted();<NEW_LINE>SqlHelper sqlHelper = new SqlHelper(getTmpTblName(), false);<NEW_LINE>sqlHelper.setSqlSyntaxHelper(new H2SyntaxHelper().setColumnTypes(getColumnType()));<NEW_LINE>String exec = sql... | ] row = new String[columnCount]; |
1,663,144 | private String serializeGroup(AbstractGroup group) {<NEW_LINE>if (group instanceof AllEntriesGroup) {<NEW_LINE>return serializeAllEntriesGroup();<NEW_LINE>} else if (group instanceof ExplicitGroup) {<NEW_LINE>return serializeExplicitGroup((ExplicitGroup) group);<NEW_LINE>} else if (group instanceof KeywordGroup) {<NEW_... | return serializeSearchGroup((SearchGroup) group); |
1,837,902 | protected int addToSlot(IInvSlot slot, ItemStack stack, int injected, boolean doAdd) {<NEW_LINE>int available = stack.stackSize - injected;<NEW_LINE>int max = Math.min(stack.getMaxStackSize(), inventory.getInventoryStackLimit());<NEW_LINE>ItemStack stackInSlot = slot.getStackInSlot();<NEW_LINE>if (stackInSlot == null) ... | Math.min(available, max); |
479,304 | public com.amazonaws.services.braket.model.ThrottlingException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.braket.model.ThrottlingException throttlingException = new com.amazonaws.services.braket.model.ThrottlingException(null);<NEW_LINE>int originalDepth = ... | JsonToken token = context.getCurrentToken(); |
1,235,030 | public void showPopUpInvoicingWizard(ActionRequest request, ActionResponse response) {<NEW_LINE>try {<NEW_LINE>SaleOrder saleOrder = request.getContext().asType(SaleOrder.class);<NEW_LINE>saleOrder = Beans.get(SaleOrderRepository.class).find(saleOrder.getId());<NEW_LINE>Beans.get(SaleOrderInvoiceService.class).displayE... | ))).map()); |
1,149,885 | public void onItemClick(int position) {<NEW_LINE>ContextMenuItem item = adapter.getItem(position);<NEW_LINE>int standardId = item.getTitleId();<NEW_LINE>ItemClickListener click = item.getItemClickListener();<NEW_LINE>if (click != null) {<NEW_LINE>click.onContextMenuClick(listAdapter, standardId, position, false, null);... | ), true, false, null); |
930,036 | private void shrinkSnapshot(APIShrinkVolumeSnapshotMsg msg, final ReturnValueCompletion<ShrinkResult> completion) {<NEW_LINE>refreshVO();<NEW_LINE>final ErrorCode err = isOperationAllowed(msg);<NEW_LINE>if (err != null) {<NEW_LINE>completion.fail(err);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ShrinkVolumeSnapshotOnPrimaryS... | setSize(shrinkResult.getSize()); |
590,077 | public static QueryRegistrantProfilesResponse unmarshall(QueryRegistrantProfilesResponse queryRegistrantProfilesResponse, UnmarshallerContext _ctx) {<NEW_LINE>queryRegistrantProfilesResponse.setRequestId(_ctx.stringValue("QueryRegistrantProfilesResponse.RequestId"));<NEW_LINE>queryRegistrantProfilesResponse.setTotalIte... | ("QueryRegistrantProfilesResponse.RegistrantProfiles[" + i + "].City")); |
1,265,531 | public void marshall(JobRun jobRun, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (jobRun == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(jobRun.getAttempt(), ATTEMPT_BINDING);<NEW_LINE>protocolMarshaller... | jobRun.getOutputs(), OUTPUTS_BINDING); |
1,295,825 | public static void revertEditorChanges(IEditorPart editorPart) {<NEW_LINE>if (editorPart instanceof IRevertableEditor) {<NEW_LINE>((IRevertableEditor) editorPart).doRevertToSaved();<NEW_LINE>} else if (editorPart instanceof ITextEditor) {<NEW_LINE>((<MASK><NEW_LINE>}<NEW_LINE>// Revert editor's transaction<NEW_LINE>if ... | ITextEditor) editorPart).doRevertToSaved(); |
822,819 | protected Label createDescriptionLabel(Composite parent) {<NEW_LINE>if (isDataSourcePreferencePage()) {<NEW_LINE>Composite composite = UIUtils.createPlaceholder(parent, 2);<NEW_LINE>composite.setFont(parent.getFont());<NEW_LINE>composite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));<NEW_LINE>dataSourc... | , false, 2, 1)); |
543,338 | Boolean castCastToHelper(JSType thisType, JSType thatType) {<NEW_LINE>if (// TODO(johnlenz): restrict to objects<NEW_LINE>thatType.isUnknownType() || thatType.isAllType() || thatType.isNoObjectType() || thatType.isNoType()) {<NEW_LINE>return true;<NEW_LINE>} else if (thisType.isRecordType() || thatType.isRecordType()) ... | ) || thatType.isSubtypeOf(thisType); |
1,084,982 | public void execute(Nitrite nitrite) {<NEW_LINE>initialize(nitrite, collectionName);<NEW_LINE>try (IndexManager indexManager = new IndexManager(oldName, nitrite.getConfig())) {<NEW_LINE>Fields oldField = Fields.withNames(oldName);<NEW_LINE>Collection<IndexDescriptor> matchingIndexDescriptors = indexManager.findMatching... | entry.getFirst(), document); |
1,278,043 | public BackendEntry writeOlapVertex(HugeVertex vertex) {<NEW_LINE>BinaryBackendEntry entry = newBackendEntry(HugeType.OLAP, vertex.id());<NEW_LINE>BytesBuffer buffer = BytesBuffer.allocate(8 + 16);<NEW_LINE>Collection<HugeProperty<?><MASK><NEW_LINE>E.checkArgument(properties.size() == 1, "Expect only 1 property for ola... | > properties = vertex.getProperties(); |
1,319,005 | public View approveOrDeny(@RequestParam Map<String, String> approvalParameters, Map<String, ?> model, SessionStatus sessionStatus, Principal principal) {<NEW_LINE>if (!(principal instanceof Authentication)) {<NEW_LINE>sessionStatus.setComplete();<NEW_LINE>throw new InsufficientAuthenticationException("User must be auth... | (authorizationRequest, (Authentication) principal); |
1,273,450 | private SoftWrapImpl registerSoftWrap(int minOffset, int preferredOffset, int maxOffset, int spaceSize, LogicalLineData lineData) {<NEW_LINE>int softWrapOffset = calculateBackwardSpaceOffsetIfPossible(minOffset, preferredOffset);<NEW_LINE>if (softWrapOffset < 0) {<NEW_LINE>softWrapOffset = calculateBackwardOffsetForEas... | registerSoftWrap(softWrapOffset, spaceSize, lineData); |
693,887 | public static void configureTemporalNamespace(final WorkflowServiceStubs temporalService) {<NEW_LINE>final var client = temporalService.blockingStub();<NEW_LINE>final var describeNamespaceRequest = DescribeNamespaceRequest.newBuilder().<MASK><NEW_LINE>final var currentRetentionGrpcDuration = client.describeNamespace(de... | setNamespace(DEFAULT_NAMESPACE).build(); |
1,640,170 | public void connect(MqttConnectOptions options, MqttToken token) throws MqttException {<NEW_LINE>final String methodName = "connect";<NEW_LINE>synchronized (conLock) {<NEW_LINE>if (isDisconnected() && !closePending) {<NEW_LINE>// @TRACE 214=state=CONNECTING<NEW_LINE>log.fine(CLASS_NAME, methodName, "214");<NEW_LINE>con... | this, token, connect, executorService); |
1,389,810 | final UpdateBrokerStorageResult executeUpdateBrokerStorage(UpdateBrokerStorageRequest updateBrokerStorageRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateBrokerStorageRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | addHandlerContext(HandlerContextKey.SERVICE_ID, "Kafka"); |
247,947 | public Resource merge(@Nullable Resource other) {<NEW_LINE>if (other == null) {<NEW_LINE>return this;<NEW_LINE>}<NEW_LINE>AttributesBuilder attrBuilder = Attributes.builder();<NEW_LINE>attrBuilder.<MASK><NEW_LINE>attrBuilder.putAll(other.getAttributes());<NEW_LINE>if (other.getSchemaUrl() == null) {<NEW_LINE>return cre... | putAll(this.getAttributes()); |
201,813 | public Request<DescribeDocumentClassificationJobRequest> marshall(DescribeDocumentClassificationJobRequest describeDocumentClassificationJobRequest) {<NEW_LINE>if (describeDocumentClassificationJobRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(DescribeDocumentClassifica... | String snippet = stringWriter.toString(); |
457,662 | static <T> Keyframe<T> newInstance(JSONObject json, LottieComposition composition, float scale, AnimatableValue.Factory<T> valueFactory) {<NEW_LINE>PointF cp1 = null;<NEW_LINE>PointF cp2 = null;<NEW_LINE>float startFrame = 0;<NEW_LINE>T startValue = null;<NEW_LINE>T endValue = null;<NEW_LINE>Interpolator interpolator =... | cp2Json = json.optJSONObject("i"); |
548,586 | private void handle(APICreateZoneMsg msg) {<NEW_LINE>String zoneType = msg.getType();<NEW_LINE>if (zoneType == null) {<NEW_LINE>zoneType = BaseZoneFactory.type.toString();<NEW_LINE>}<NEW_LINE>ZoneFactory factory = this.getZoneFactory(ZoneType.valueOf(zoneType));<NEW_LINE>APICreateZoneEvent evt = new APICreateZoneEvent(... | factory.createZone(vo, msg); |
1,786,667 | private void provideAttributeTable() {<NEW_LINE>if (attributeTable == null) {<NEW_LINE>getAttributes().removeTableModelListener(this);<NEW_LINE>attributeTable = new AttributeTable(this);<NEW_LINE>tableHeader = attributeTable.getTableHeader();<NEW_LINE><MASK><NEW_LINE>addTableListeners();<NEW_LINE>if (belongsToNodeView)... | tableHeader.setBackground(AttributeView.HEADER_BACKGROUND); |
1,621,593 | private Binding findImport(char[][] compoundName, int length) {<NEW_LINE>recordQualifiedReference(compoundName);<NEW_LINE>ModuleBinding module = module();<NEW_LINE>Binding binding = this.environment.getTopLevelPackage(compoundName[0]);<NEW_LINE>int i = 1;<NEW_LINE>foundNothingOrType: if (binding != null) {<NEW_LINE>Pac... | type = type.getMemberType(name); |
1,846,185 | public Pair<String, OSVersionInfo> queryFamilyVersionInfo() {<NEW_LINE>perfstat_partition_config_t cfg = config.get();<NEW_LINE>String systemName = System.getProperty("os.name");<NEW_LINE>String archName = System.getProperty("os.arch");<NEW_LINE>String versionNumber = System.getProperty("os.version");<NEW_LINE>if (Util... | idx = releaseNumber.lastIndexOf(' '); |
1,566,931 | public <T> FixedSizeSet<T> with(T one, T two, T three, T four) {<NEW_LINE>if (Objects.equals(one, two)) {<NEW_LINE>return this.of(one, three, four);<NEW_LINE>}<NEW_LINE>if (Objects.equals(one, three)) {<NEW_LINE>return this.of(one, two, four);<NEW_LINE>}<NEW_LINE>if (Objects.equals(one, four)) {<NEW_LINE>return this.of... | of(one, two, three); |
1,605,103 | public static void test(PairwiseModel model, String predictionsName, boolean anaphoricityModel) throws Exception {<NEW_LINE>Redwood.log("scoref-train", "Reading compression...");<NEW_LINE>Compressor<String> compressor = <MASK><NEW_LINE>Redwood.log("scoref-train", "Reading test data...");<NEW_LINE>List<DocumentExamples>... | IOUtils.readObjectFromFile(StatisticalCorefTrainer.compressorFile); |
1,517,679 | private static boolean createAndStartContainer(String name, String image, String cmd, Map<String, String> env, List<String> linkHosts, Map<Integer, Integer> mapPorts, Map<String, String> volumes, List<String> opts) {<NEW_LINE>if (containerExists(name)) {<NEW_LINE>killAndRemoveContainer(name);<NEW_LINE>}<NEW_LINE>List<S... | "-e %s=%s", k, v))); |
1,160,309 | public void convertToJson(BpmnJsonConverterContext converterContext, BaseElement baseElement, ActivityProcessor processor, BpmnModel model, FlowElementsContainer container, ArrayNode shapesArrayNode, double subProcessX, double subProcessY) {<NEW_LINE>MessageFlow messageFlow = (MessageFlow) baseElement;<NEW_LINE>ObjectN... | ).getHeight() / 2.0); |
1,113,540 | /* (non-Javadoc)<NEW_LINE>* @see com.ibm.ws.sib.processor.utils.am.GroupAlarmListener#beginGroupAlarm(java.lang.Object)<NEW_LINE>*/<NEW_LINE>public void beginGroupAlarm(Object firstContext) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(tc, "beginGroupAlarm", <MASK><NEW... | new Object[] { firstContext }); |
464,571 | public void gen(TreeElement t) {<NEW_LINE>// save AST cursor<NEW_LINE>println(labeledElementType + <MASK><NEW_LINE>// If there is a label on the root, then assign that to the variable<NEW_LINE>if (t.root.getLabel() != null) {<NEW_LINE>println(t.root.getLabel() + " = (_t == ASTNULL) ? " + labeledElementASTInit + " : _t;... | " __t" + t.ID + " = _t;"); |
1,151,864 | public void onStartOp(android.os.IBinder token, int code, int uid, java.lang.String packageName) throws android.os.RemoteException {<NEW_LINE>android.os.Parcel _data = android.os.Parcel.obtain();<NEW_LINE>android.os.Parcel _reply = android<MASK><NEW_LINE>try {<NEW_LINE>_data.writeInterfaceToken(DESCRIPTOR);<NEW_LINE>_d... | .os.Parcel.obtain(); |
683,638 | public void run(final FlowTrigger trigger, Map data) {<NEW_LINE>if (context.baseImageCachePath == null) {<NEW_LINE>logger.debug("no base image cache, skip this flow");<NEW_LINE>trigger.next();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>GetMd5Cmd cmd = new GetMd5Cmd();<NEW_LINE>GetMd5TO to = new GetMd5TO();<NEW_LINE>to.resour... | md5s.get(0).md5; |
800,912 | private static void refresh() {<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>float currentCpuUtilization = CPU_MEMORY_READER.getSystemWideCpuUsage() * 100;<NEW_LINE>float currentMemoryUtilization = CPU_MEMORY_READER.getSystemWideMemoryUsage();<NEW_LINE>if (!Float.isNaN(currentCpuUtilization) && currentCpuUtilization >= 0) {... | Instant now = Instant.now(); |
1,135,497 | // Suppress high Cognitive Complexity warning<NEW_LINE>@SuppressWarnings("squid:S3776")<NEW_LINE>public void transferType(SchemaTree schemaTree) throws QueryProcessException {<NEW_LINE>List<MeasurementSchema> measurementSchemas = schemaTree.searchMeasurementSchema(devicePath, Arrays.asList(measurements));<NEW_LINE>if (... | + measurements[i]))); |
193,061 | private JPanel buildInputPanel() {<NEW_LINE>JPanel fileChooserPanel = new JPanel(new BorderLayout());<NEW_LINE>fileChooserPanel.setBorder(new TitledBorder("1... Or choose your audio (wav mono)"));<NEW_LINE>final JFileChooser fileChooser = new JFileChooser();<NEW_LINE>JButton chooseFileButton = new JButton("Choose a fil... | (fileChooser, BoxLayout.PAGE_AXIS)); |
1,449,272 | protected LocalTime readLocalTime5() {<NEW_LINE>if (ch != '"' && ch != '\'') {<NEW_LINE>throw new JSONException("localTime only support string input");<NEW_LINE>}<NEW_LINE>byte c0 = bytes[offset + 0];<NEW_LINE>byte c1 = bytes[offset + 1];<NEW_LINE>byte c2 = bytes[offset + 2];<NEW_LINE>byte c3 = bytes[offset + 3];<NEW_L... | byte h0, h1, i0, i1; |
782,004 | public void collectInformationWithProgress(@Nonnull ProgressIndicator progress) {<NEW_LINE>SyntaxTraverser<PsiElement> s = SyntaxTraverser.psiTraverser(myFile).filter(o -> {<NEW_LINE>IElementType type = PsiUtilCore.getElementType(o);<NEW_LINE>return type instanceof ILazyParseableElementType && !(type instanceof IFileEl... | myPriorityRange, myRestrictRange, getId()); |
1,745,820 | protected void importMarkupStyle1(Pattern titlePattern, Markup titlePrefix, Reader markupText, MarkupLanguage markupLanguage, int levelOffset) {<NEW_LINE>Validate.isTrue(levelOffset <= MAX_TITLE_LEVEL, String.format<MASK><NEW_LINE>Validate.isTrue(levelOffset >= -MAX_TITLE_LEVEL, String.format("Specified levelOffset (%d... | ("Specified levelOffset (%d) > max levelOffset (%d)", levelOffset, MAX_TITLE_LEVEL)); |
655,628 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>if (controller == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Cards cards = new CardsImpl();<NEW_LINE>for (UUID playerId : game.getOpponents(source.getControllerId())) {<NEW_LINE>Play... | .setFaceDown(true, game)); |
504,693 | public static DataMap parseUriParams(Map<String, List<String>> queryParameters) throws PathSegment.PathSegmentSyntaxException {<NEW_LINE>DataMap dataMap = new DataMap();<NEW_LINE>for (Map.Entry<String, List<String>> entry : queryParameters.entrySet()) {<NEW_LINE>String key = entry.getKey();<NEW_LINE>Object value;<NEW_L... | PathSegment.PathSegmentSyntaxException("unexpected repeated query param in URI: " + key); |
858,079 | protected void callSearchModules(SearchRequest searchRequest, List<IndexerSearchCacheEntry> indexersToSearch, SearchCacheEntry searchCacheEntry) {<NEW_LINE>Map<Indexer, List<IndexerSearchResult>> indexerSearchResults = new HashMap<>();<NEW_LINE>for (IndexerSearchCacheEntry entry : indexersToSearch) {<NEW_LINE>indexerSe... | ()).addIndexerSearchResult(indexerSearchResult); |
719,644 | protected Object decode(Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {<NEW_LINE>ByteBuf buf = (ByteBuf) msg;<NEW_LINE>// header<NEW_LINE>buf.skipBytes(2);<NEW_LINE>Position position = new Position(getProtocolName());<NEW_LINE>DeviceSession deviceSession = getDeviceSession(channel, remoteAd... | "mode", buf.readUnsignedByte()); |
452,038 | public static KeyValuePart[] split(MatrixMeta matrixMeta, Vector vector) {<NEW_LINE>KeyHash hasher = HasherFactory.getHasher(matrixMeta.getRouterHash());<NEW_LINE>PartitionKey[] matrixParts = matrixMeta.getPartitionKeys();<NEW_LINE>KeyValuePart[] dataParts <MASK><NEW_LINE>int estSize = (int) (vector.getSize() / matrixM... | = new KeyValuePart[matrixParts.length]; |
40,626 | private void readTypeParameters(NdBinding type, SignatureWrapper wrapper) throws CoreException {<NEW_LINE>char[] genericSignature = wrapper.signature;<NEW_LINE>if (genericSignature.length == 0 || wrapper.charAtStart() != '<') {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>List<TypeParameter> typeParameters = new ArrayList<>();... | genericSignature, wrapper.start, indexOfClosingBracket); |
375,805 | protected void parse() throws ParseException {<NEW_LINE>String s;<NEW_LINE>try {<NEW_LINE>s = getFullText();<NEW_LINE>} catch (java.io.IOException ioe) {<NEW_LINE>throw new ParseException(<MASK><NEW_LINE>}<NEW_LINE>StringTokenizer sk = new StringTokenizer(s, "^^^", false);<NEW_LINE>long starttime = -1;<NEW_LINE>long en... | ioe.getMessage(), ioe); |
1,492,877 | public Iterator<Column<C>> iterator() {<NEW_LINE>class IteratorImpl implements Iterator<Column<C>> {<NEW_LINE><NEW_LINE>Iterator<ColumnOrSuperColumn> base;<NEW_LINE><NEW_LINE>public IteratorImpl(Iterator<ColumnOrSuperColumn> base) {<NEW_LINE>this.base = base;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public bool... | CounterColumn cc = column.getCounter_column(); |
770,309 | private void renderAltTooltip(MatrixStack matrixStack, int mouseX, int mouseY) {<NEW_LINE>if (!listGui.isMouseInList(mouseX, mouseY))<NEW_LINE>return;<NEW_LINE>List<Alt> altList = altManager.getList();<NEW_LINE>int hoveredIndex = <MASK><NEW_LINE>if (hoveredIndex < 0 || hoveredIndex >= altList.size())<NEW_LINE>return;<N... | listGui.getItemAtPosition(mouseX, mouseY); |
1,721,153 | public Object doQuery(Object[] objs) {<NEW_LINE>// for columns<NEW_LINE>super.doQuery(objs);<NEW_LINE>if (objs.length != 1) {<NEW_LINE>throw new RQException("redis strlen param size " + objs.length + " is not 1");<NEW_LINE>} else {<NEW_LINE>Set<Object> set = m_jedisTool.hKeys(objs[0].toString());<NEW_LINE>// System.out... | ArrayList<Object[]>(); |
1,510,209 | protected void processCpuStatItems(List<CpuStatItem> cpuStatItems, CpuStatAttr currStatAttr, long totalTc, int level, ArrayResultCursor result) {<NEW_LINE>List<CpuStatAttr> childrenAttrs = CpuStatAttribute.getChildrenAttr(currStatAttr);<NEW_LINE>if (childrenAttrs != null && childrenAttrs.size() > 0) {<NEW_LINE>for (int... | totalTc, level + 1, result); |
1,383,404 | public static MethodHandle generate(final int size) {<NEW_LINE>MethodHandle h = getClassFromSize(size);<NEW_LINE>if (h != null)<NEW_LINE>return h;<NEW_LINE>final String clsPath = "org/jruby/runtime/scopes/DynamicScope" + size;<NEW_LINE>final String clsName = clsPath.replaceAll("/", ".");<NEW_LINE>// try to load the cla... | p = CDCL.loadClass(clsName); |
1,548,258 | static TypedName<?> parseAttribute(EntityDefaults entityDefaults, JsonNode col) {<NEW_LINE>if (col.isNull() || col.isMissingNode()) {<NEW_LINE>return null;<NEW_LINE>} else if (col.isObject()) {<NEW_LINE>String name = col.path<MASK><NEW_LINE>String type = col.path("type").asText(null);<NEW_LINE>Preconditions.checkArgume... | ("name").asText(null); |
633,613 | private Box createFavouritesPanel() {<NEW_LINE>bxFav = new Vbox();<NEW_LINE>int AD_Role_ID = Env.getAD_Role_ID(Env.getCtx());<NEW_LINE>int AD_Tree_ID = DB.getSQLValue(null, "SELECT COALESCE(r.AD_Tree_Menu_ID, ci.AD_Tree_Menu_ID)" + "FROM AD_ClientInfo ci" + " INNER JOIN AD_Role r ON (ci.AD_Client_ID=r.AD_Client_ID) " +... | (MTreeNode) enTop.nextElement(); |
88,928 | public static void main(String[] args) {<NEW_LINE>try {<NEW_LINE>EJDB2 db = new EJDB2Builder("example.db").truncate().open();<NEW_LINE>long id = db.put("parrots", "{\"name\":\"Bianca\", \"age\": 4}");<NEW_LINE>System.out.println("Bianca record: " + id);<NEW_LINE>id = db.put("parrots", "{\"name\":\"Darko\", \"age\": 8}"... | , ex.getMessage())); |
1,188,040 | public final OnSelectInsertFromClauseContext onSelectInsertFromClause() throws RecognitionException {<NEW_LINE>OnSelectInsertFromClauseContext _localctx = new <MASK><NEW_LINE>enterRule(_localctx, 64, RULE_onSelectInsertFromClause);<NEW_LINE>try {<NEW_LINE>enterOuterAlt(_localctx, 1);<NEW_LINE>{<NEW_LINE>setState(924);<... | OnSelectInsertFromClauseContext(_ctx, getState()); |
761,575 | public static void main(String[] args) {<NEW_LINE>createEmptyDynamicsWorld();<NEW_LINE>// size of cloth patch<NEW_LINE>final float s = 4;<NEW_LINE>// vertices on X axis<NEW_LINE>final int NUM_X = 31;<NEW_LINE>// vertices on Z axis<NEW_LINE>final int NUM_Z = 31;<NEW_LINE>btSoftBody cloth = createSoftBody(s, NUM_X, NUM_Z... | btVector3 position = node.m_x(); |
1,515,675 | public UpdateRoomMembershipResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>UpdateRoomMembershipResult updateRoomMembershipResult = new UpdateRoomMembershipResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentEleme... | JsonToken token = context.getCurrentToken(); |
1,126,931 | public void decode(FacesContext context, UIComponent component) {<NEW_LINE>InputNumber inputNumber = (InputNumber) component;<NEW_LINE>if (!shouldDecode(inputNumber)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>decodeBehaviors(context, inputNumber);<NEW_LINE>String inputId = <MASK><NEW_LINE>String submittedValue = context.g... | inputNumber.getClientId(context) + "_hinput"; |
1,146,047 | public static Point2D computeMnemonicPosition(Font font, String text, int mnemonicIndex, double wrappingWidth, double lineSpacing) {<NEW_LINE>// Input validation<NEW_LINE>if ((font == null) || (text == null) || (mnemonicIndex < 0) || (mnemonicIndex > text.length())) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>// Layout... | (start, mnemonicIndex), 0); |
1,742,903 | public void updateStatus(@NonNull final JsonRequestCandidateResults results) {<NEW_LINE>final AdIssueId generalAdIssueId = createADIssue(results.getError());<NEW_LINE>if (generalAdIssueId != null) {<NEW_LINE>logger.debug("Created AD_Issue_ID={} that applies to all exported shipment schedules", generalAdIssueId.getRepoI... | orgId(shipmentSchedule.getOrgId()); |
281,487 | public void marshall(AutomationExecution automationExecution, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (automationExecution == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(automationExecution.getAuto... | automationExecution.getParameters(), PARAMETERS_BINDING); |
1,206,347 | public static SearchDirectoriesResponse unmarshall(SearchDirectoriesResponse searchDirectoriesResponse, UnmarshallerContext _ctx) {<NEW_LINE>searchDirectoriesResponse.setRequestId(_ctx.stringValue("SearchDirectoriesResponse.RequestId"));<NEW_LINE>searchDirectoriesResponse.setErrorDesc(_ctx.stringValue("SearchDirectorie... | = new ArrayList<ContentItem>(); |
1,307,829 | public static InstalledCode compileAndInstallMethod(StructuredGraph graph) {<NEW_LINE>ResolvedJavaMethod method = graph.method();<NEW_LINE>GraalJVMCICompiler graalCompiler = (GraalJVMCICompiler) JVMCI.getRuntime().getCompiler();<NEW_LINE>RuntimeProvider capability = graalCompiler.getGraalRuntime().getCapability(Runtime... | .asCompilationRequest(compilationID), compilationResult); |
1,579,907 | private void applyPropertySpecs(String path, @Nullable Object probe, RedisPersistentEntity<?> persistentEntity, ExampleMatcherAccessor exampleSpecAccessor, MatchMode matchMode, RedisOperationChain chain) {<NEW_LINE>if (probe == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>PersistentPropertyAccessor propertyAccessor = p... | () : property.getName(); |
1,574,989 | private PactDslResponse createPactDslResponse(Contract contract, PactDslRequestWithPath pactDslRequest) {<NEW_LINE>Response response = contract.getResponse();<NEW_LINE>PactDslResponse pactDslResponse = pactDslRequest.willRespondWith().status((Integer) response.getStatus().getClientValue());<NEW_LINE>PactDslResponse fin... | -> processHeader(finalPactDslResponse, h)); |
1,710,800 | private Mono<PagedResponse<DataPointAnomaly>> listAnomaliesForDetectionConfigSinglePageAsync(String detectionConfigurationId, OffsetDateTime startTime, OffsetDateTime endTime, ListAnomaliesDetectedOptions options, Context context) {<NEW_LINE>Objects.requireNonNull(detectionConfigurationId, "'detectionConfigurationId' i... | context.addData(AZ_TRACING_NAMESPACE_KEY, METRICS_ADVISOR_TRACING_NAMESPACE_VALUE); |
476,891 | public static ProxyServerSelector createProxyServerSelector(Properties properties) {<NEW_LINE>String host = properties.getProperty(PROXY_HOST);<NEW_LINE>if (host != null) {<NEW_LINE>int port = Integer.valueOf(properties.getProperty(PROXY_PORT, "80"));<NEW_LINE>String principal = properties.getProperty(PROXY_USER);<NEW_... | , port).setRealm(realm); |
530,221 | final StartEngagementResult executeStartEngagement(StartEngagementRequest startEngagementRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(startEngagementRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(F... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
1,603,727 | public static DescribeDownloadRecordsResponse unmarshall(DescribeDownloadRecordsResponse describeDownloadRecordsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeDownloadRecordsResponse.setRequestId(_ctx.stringValue("DescribeDownloadRecordsResponse.RequestId"));<NEW_LINE>List<Items> records = new ArrayList<Items>(... | ("DescribeDownloadRecordsResponse.Records[" + i + "].FileName")); |
1,552,342 | protected Object reflectConstruct(Object target, Object argumentsList, Object[] optionalArgs, @Cached IsConstructorNode isConstructorNode) {<NEW_LINE>if (!isConstructorNode.executeBoolean(target)) {<NEW_LINE>errorBranch.enter();<NEW_LINE>throw Errors.createTypeErrorNotAConstructor(target, getContext());<NEW_LINE>}<NEW_... | CONSTRUCT, target, newTarget, args); |
1,091,734 | public static void writeBlockState(PacketBuffer buf, IBlockState state) {<NEW_LINE>Block block = state.getBlock();<NEW_LINE>buf.writeVarInt(Block.REGISTRY.getIDForObject(block));<NEW_LINE>int meta = block.getMetaFromState(state);<NEW_LINE>buf.writeByte(meta);<NEW_LINE>IBlockState readState = block.getStateFromMeta(meta... | differingProperties = new HashMap<>(); |
170,646 | public void beforeChildMovement(@Nonnull final PsiTreeChangeEvent event) {<NEW_LINE>final PsiElement oldParent = event.getOldParent();<NEW_LINE>final PsiElement newParent = event.getNewParent();<NEW_LINE>final PsiElement child = event.getChild();<NEW_LINE>if (newParent instanceof PsiDirectory) {<NEW_LINE>final Module <... | module = ModuleUtil.findModuleForPsiElement(newParent); |
1,788,172 | private void handleClientCoreMessage_TemplateChange(Message msg) {<NEW_LINE>SonicUtils.log(TAG, Log.INFO, "handleClientCoreMessage_TemplateChange wasLoadDataInvoked = " + wasLoadDataInvoked.get() + ",msg arg1 = " + msg.arg1);<NEW_LINE>if (wasLoadDataInvoked.get()) {<NEW_LINE>if (TEMPLATE_CHANGE_REFRESH == msg.arg1) {<N... | setResult(SONIC_RESULT_CODE_TEMPLATE_CHANGE, SONIC_RESULT_CODE_HIT_CACHE, true); |
1,207,489 | public com.amazonaws.services.codedeploy.model.TagLimitExceededException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.codedeploy.model.TagLimitExceededException tagLimitExceededException = new com.amazonaws.services.codedeploy.model.TagLimitExceededException(... | int originalDepth = context.getCurrentDepth(); |
295,765 | private long visitDateTimeConstructor() {<NEW_LINE>DateFormat format = new SimpleDateFormat("EEE MMM dd yyyy HH:mm:ss z", Locale.ENGLISH);<NEW_LINE>verifyToken(JsonTokenType.LEFT_PAREN);<NEW_LINE>JsonToken token = popToken();<NEW_LINE>if (token.getType() == JsonTokenType.RIGHT_PAREN) {<NEW_LINE>return new Date().getTim... | ] values = new long[7]; |
1,038,207 | public String render(ClassModel model, int index, int size, Map<String, Object> session) {<NEW_LINE>StringWriter sw = new StringWriter();<NEW_LINE>PrintWriter writer = new PrintWriter(sw);<NEW_LINE>if (index == 0) {<NEW_LINE>Util.generateLicense(writer);<NEW_LINE>writer.printf("/// <reference types=\"%s\" />\n\n", getN... | .print(includeFileIfPresent("module.footer.mjs")); |
385,837 | public List<CheckFailedResult> doCheck() {<NEW_LINE>List<CheckFailedResult> result = new ArrayList<>();<NEW_LINE>String javaVersion = SystemUtils.JAVA_VERSION;<NEW_LINE>if (!SystemUtils.isJavaVersionAtLeast(JavaVersion.JAVA_1_8) || !SystemUtils.isJavaVersionAtMost(JavaVersion.JAVA_11)) {<NEW_LINE>result.add(new CheckFa... | Properties prop = System.getProperties(); |
177,324 | private static void tryChainedCountSum(RegressionEnvironment env, int numThreads, int numEvents) {<NEW_LINE>// setup statements<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>env.compileDeploy("@public insert into MyStreamOne select count(*) as cnt from SupportBean", path);<NEW_LINE>env.compileDeploy("@n... | ] newEvents = listener.getNewDataListFlattened(); |
737,026 | private void loadNode866() {<NEW_LINE>BaseDataVariableTypeNode node = new BaseDataVariableTypeNode(this.context, Identifiers.BuildInfoType_BuildDate, new QualifiedName(0, "BuildDate"), new LocalizedText("en", "BuildDate"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new DataValue(Variant.NULL_VA... | .expanded(), false)); |
121,518 | final SearchProfilesResult executeSearchProfiles(SearchProfilesRequest searchProfilesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(searchProfilesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
1,566,486 | private AWTEvent mapMetaState(@Nonnull AWTEvent e) {<NEW_LINE>if (myWinMetaPressed) {<NEW_LINE>Application app = ApplicationManager.getApplication();<NEW_LINE>boolean weAreNotActive = app == null || !app.isActive();<NEW_LINE>weAreNotActive |= e instanceof FocusEvent && ((FocusEvent) e).getOppositeComponent() == null;<N... | ), ke.getKeyLocation()); |
1,047,900 | protected List<Contentlet> findContentletsByIdentifier(String identifier, Boolean live, Long languageId) throws DotDataException, DotStateException, DotSecurityException {<NEW_LINE>final List<Contentlet> <MASK><NEW_LINE>final StringBuilder queryBuffer = new StringBuilder();<NEW_LINE>final DotConnect dotConnect = new Do... | contentlets = new ArrayList<>(); |
1,563,089 | private void parseQueueConfig(Config queueConfig) throws RMConfigException {<NEW_LINE>this.maxAdmissibleQuery = queueConfig.hasPath(MAX_ADMISSIBLE_KEY) ? queueConfig.getInt(MAX_ADMISSIBLE_KEY) : MAX_ADMISSIBLE_QUERY_COUNT;<NEW_LINE>this.maxWaitingQuery = queueConfig.hasPath(MAX_WAITING_KEY) ? queueConfig.getInt(MAX_WAI... | this.queryPerNodeResourceShare = parseAndGetNodeShare(queueConfig); |
1,745,621 | protected static void start(Remote remote) throws Exception {<NEW_LINE>setupRMI();<NEW_LINE>banJNDI();<NEW_LINE>if (ourRemote != null)<NEW_LINE>throw new AssertionError("Already started");<NEW_LINE>ourRemote = remote;<NEW_LINE>Registry registry;<NEW_LINE>int port;<NEW_LINE>for (Random random = new Random(); ; ) {<NEW_L... | toHexString(stub.hashCode()); |
781,327 | // Function to implement best fit allocation<NEW_LINE>public static void bestfit() {<NEW_LINE>final int[] barray = new int[20];<NEW_LINE>final int[] parray = new int[20];<NEW_LINE>int[] fragment = new int[20];<NEW_LINE>int temp;<NEW_LINE>int lowest = 9999;<NEW_LINE>// Function call to initialize memory and process bloc... | [j] - process[i]; |
684,406 | public Response verifyUserCode(@QueryParam("user_code") String userCode) {<NEW_LINE>event.event(EventType.OAUTH2_DEVICE_VERIFY_USER_CODE);<NEW_LINE>checkSsl();<NEW_LINE>checkRealm();<NEW_LINE>// So back button doesn't work<NEW_LINE>CacheControlUtil.noBackButtonCacheControlHeader();<NEW_LINE>// code is not known, we can... | store.getByUserCode(realm, formattedUserCode); |
859,111 | public boolean addCassandraHost(CassandraHost cassandraHost) {<NEW_LINE>Properties props = KunderaMetadataManager.getPersistenceUnitMetadata(kunderaMetadata, getPersistenceUnit()).getProperties();<NEW_LINE>String keyspace = null;<NEW_LINE>if (externalProperties != null) {<NEW_LINE>keyspace = (String) externalProperties... | cassandraHost.getPort(), keyspace); |
1,405,774 | private void predictLumaTM(VPXMacroblock above, VPXMacroblock left, int aboveLeft) {<NEW_LINE>Subblock[] leftYSb;<NEW_LINE>Subblock[] aboveYSb = new Subblock[4];<NEW_LINE>leftYSb = new Subblock[4];<NEW_LINE>for (int col = 0; col < 4; col++) aboveYSb[col] = above.ySubblocks[3][col];<NEW_LINE>for (int row = 0; row < 4; r... | * 4 + pCol] - aboveLeft); |
1,749,406 | private static void compareAtomicReferenceArray(DualValue dualValue, ComparisonState comparisonState) {<NEW_LINE>if (!dualValue.isActualFieldAnAtomicReferenceArray()) {<NEW_LINE>comparisonState.addDifference(dualValue, differentTypeErrorMessage(dualValue, "an AtomicReferenceArray"));<NEW_LINE>return;<NEW_LINE>}<NEW_LIN... | , "AtomicReferenceArrays", actualArrayLength, expectedArrayLength)); |
513,114 | public // not thread safe! (duh!)<NEW_LINE>MappeableContainer inot(final int firstOfRange, final int lastOfRange) {<NEW_LINE>// TODO: may need to convert to a RunContainer<NEW_LINE>// TODO: this can be optimized for performance<NEW_LINE>// determine the span of array indices to be affected<NEW_LINE>int startIndex = Buf... | .get(i - cardinalityChange)); |
61,000 | public List<Link> lookupDotLinks(List<Inter> systemDots, SystemInfo system, int profile) {<NEW_LINE>// Need getCenter()<NEW_LINE>final List<Link> links = new ArrayList<>();<NEW_LINE>final Scale scale = system.getSheet().getScale();<NEW_LINE>final Point dotCenter = getCenter();<NEW_LINE>final MeasureStack dotStack = sys... | (DoubleDotRelation.getXOutGapMinimum(profile)); |
1,184,365 | public boolean visit(LambdaExpression node) {<NEW_LINE>if (node.getBody() instanceof Block) {<NEW_LINE>forceContinuousWrapping(node.getBody(), this.tm.firstIndexIn(node, -1));<NEW_LINE>List<Statement> statements = ((Block) node.getBody()).statements();<NEW_LINE>if (!statements.isEmpty()) {<NEW_LINE>int openBraceIndex =... | handleWrap(Alignment.M_ONE_PER_LINE_SPLIT, node); |
1,638,399 | final ListAuditMitigationActionsTasksResult executeListAuditMitigationActionsTasks(ListAuditMitigationActionsTasksRequest listAuditMitigationActionsTasksRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listAuditMitigationActionsTasksRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = ... | (super.beforeMarshalling(listAuditMitigationActionsTasksRequest)); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.