idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
443,700 | public FixedResponseActionConfig unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>FixedResponseActionConfig fixedResponseActionConfig = new FixedResponseActionConfig();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isSta... | ().unmarshall(context)); |
212,189 | protected void addAnnotationFromFieldInvariant(AnnotatedTypeMirror type, AnnotatedTypeMirror accessedVia, VariableElement field) {<NEW_LINE>TypeMirror declaringType = accessedVia.getUnderlyingType();<NEW_LINE>// Find the first upper bound that isn't a wildcard or type variable<NEW_LINE>while (declaringType.getKind() ==... | getQualifiersFor(field.getSimpleName()); |
449,153 | final CreateComponentVersionResult executeCreateComponentVersion(CreateComponentVersionRequest createComponentVersionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createComponentVersionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_... | addHandlerContext(HandlerContextKey.SERVICE_ID, "GreengrassV2"); |
1,323,725 | public boolean editCellAt(int row, int column, EventObject e) {<NEW_LINE>boolean editResult = super.editCellAt(row, column, e);<NEW_LINE>if (e instanceof MouseEvent && isTreeColumn(column)) {<NEW_LINE>MouseEvent me = (MouseEvent) e;<NEW_LINE><MASK><NEW_LINE>if (getRowHeight() != myTree.getRowHeight()) {<NEW_LINE>// fix... | int y = me.getY(); |
1,096,826 | public void check() {<NEW_LINE>if (iDate().before(legacyFieldDate))<NEW_LINE>return;<NEW_LINE>if (values() != null) {<NEW_LINE>final String[] tempVals = StringUtil.split(values().replaceAll("\r\n", "|").trim(), "|");<NEW_LINE>for (int i = 1; i < tempVals.length; i += 2) {<NEW_LINE>try {<NEW_LINE>if (dataType() == DataT... | .parseInt(tempVals[i]); |
1,165,225 | // rb_check_argv<NEW_LINE>public static RubyString checkArgv(ThreadContext context, IRubyObject[] argv) {<NEW_LINE>Ruby runtime = context.runtime;<NEW_LINE>IRubyObject tmp;<NEW_LINE>RubyString prog;<NEW_LINE>int i;<NEW_LINE>Arity.checkArgumentCount(runtime, argv, 1, Integer.MAX_VALUE);<NEW_LINE>prog = null;<NEW_LINE>//... | (runtime, argv[i]); |
983,907 | public void instanceCodegen(CodegenInstanceAux instance, CodegenClassScope classScope, CodegenCtor factoryCtor, List<CodegenTypedParam> factoryMembers) {<NEW_LINE>instance.getMethods().addMethod(SelectExprProcessor.EPTYPE, "getSelectExprProcessor", Collections.emptyList(), this.getClass(), classScope, methodNode -> met... | generateOutputBatchedSingleCodegen(this, classScope, instance); |
496,600 | public static double d(int[] x1, int[] x2, int radius) {<NEW_LINE>int n1 = x1.length;<NEW_LINE>int n2 = x2.length;<NEW_LINE>double[][] table = new double[2][n2 + 1];<NEW_LINE>table[0][0] = 0;<NEW_LINE>for (int i = 1; i <= n2; i++) {<NEW_LINE>table[0][i] = Double.POSITIVE_INFINITY;<NEW_LINE>}<NEW_LINE>for (int i = 1; i ... | [0][j - 1]; |
392,386 | public void fillMenu(String sColumnName, Menu menu) {<NEW_LINE>List<Object> ds = tv.getSelectedDataSources();<NEW_LINE>final List<ChatInstance> chats = new ArrayList<>();<NEW_LINE>for (Object obj : ds) {<NEW_LINE>if (obj instanceof ChatInstance) {<NEW_LINE>chats.add((ChatInstance) obj);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>/... | .getUIFunctions().getMDI(); |
484,340 | public void read(Configuration cfg) {<NEW_LINE>setHostName(cfg.getValue(FtpConnectionProvider.HOST));<NEW_LINE>setPort(cfg.getValue(FtpConnectionProvider.PORT));<NEW_LINE>setEncryption(cfg.getValue(FtpConnectionProvider.ENCRYPTION));<NEW_LINE>setOnlyLoginSecured(Boolean.valueOf(cfg.getValue(FtpConnectionProvider.ONLY_L... | .getValue(FtpConnectionProvider.KEEP_ALIVE_INTERVAL)); |
1,077,188 | static List<Mat> applySortedIndsToElements(List<Mat> mats, Mat sortedInds) {<NEW_LINE>int nChannels = mats.get(0).channels();<NEW_LINE>int nRows = mats.get(0).rows();<NEW_LINE>int nCols = mats.get(0).cols();<NEW_LINE><MASK><NEW_LINE>assert sortedInds.cols() == nImages;<NEW_LINE>assert sortedInds.rows() == nRows * nCols... | int nImages = mats.size(); |
1,169,289 | private Integer findSegment(int ip, int index, boolean createIfNotExists) throws IOException {<NEW_LINE>Map<Integer, Integer> map = m_table.get(ip);<NEW_LINE>if (map == null && createIfNotExists) {<NEW_LINE>map = new HashMap<Integer, Integer>();<NEW_LINE>m_table.put(ip, map);<NEW_LINE>}<NEW_LINE>Integer segmentId = map... | m_segment.writeLong(m_offset, value); |
182,913 | public String buildMergeStatement(String replicaTable, String stagingTable, List<String> primaryKeyFields, List<String> orderByFields, String deletedFieldName, List<String> allFields) {<NEW_LINE>// Key/Value Map used to replace values in template<NEW_LINE>Map<String, String> mergeQueryValues = new HashMap<>();<NEW_LINE... | buildTimestampCheck(getPrimarySortField(orderByFields))); |
33,176 | public static DescribeEmgVulGroupResponse unmarshall(DescribeEmgVulGroupResponse describeEmgVulGroupResponse, UnmarshallerContext context) {<NEW_LINE>describeEmgVulGroupResponse.setRequestId(context.stringValue("DescribeEmgVulGroupResponse.RequestId"));<NEW_LINE>describeEmgVulGroupResponse.setTotalCount(context.integer... | ("DescribeEmgVulGroupResponse.EmgVulGroupList[" + i + "].Description")); |
1,009,193 | final GetTrafficPolicyInstanceResult executeGetTrafficPolicyInstance(GetTrafficPolicyInstanceRequest getTrafficPolicyInstanceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getTrafficPolicyInstanceRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NE... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
1,606,116 | private void handleJobHistoryPage(final HttpServletRequest req, final HttpServletResponse resp, final Session session) throws ServletException, IOException {<NEW_LINE>final Page page = newPage(req, resp, session, "azkaban/webapp/servlet/velocity/jobhistorypage.vm");<NEW_LINE>final String jobId = getParam(req, "job");<N... | "errorMsg", "Project " + projectName + " doesn't exist."); |
1,623,259 | public boolean defaultNetworkRules(final Connect conn, final String vmName, final NicTO nic, final Long vmId, final String secIpStr, final boolean isFirstNic, final boolean checkBeforeApply) {<NEW_LINE>if (!_canBridgeFirewall) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>final List<InterfaceDef> intfs = getInterfaces(c... | String brname = intf.getBrName(); |
497,654 | private void compare(String sent, EventBean[] received, String measures, SupportTestCaseItem testDesc) {<NEW_LINE>String message = "For sent: " + sent;<NEW_LINE>if (testDesc.getExpected() == null) {<NEW_LINE>assertEquals(message, 0, received.length);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String[] receivedText = new Stri... | (testDesc.getExpected())); |
1,783,638 | public NDArray truncatedNormal(float loc, float scale, Shape shape, DataType dataType) {<NEW_LINE>if (DataType.STRING.equals(dataType)) {<NEW_LINE>throw new IllegalArgumentException("String data type is not supported!");<NEW_LINE>}<NEW_LINE>NDArray axes = create(shape.getShape());<NEW_LINE>TfOpExecutor opBuilder = opEx... | = getEngine().getSeed(); |
448,854 | public static Class<?> type(String fqn, ClassLoader cl, boolean useCallChain) {<NEW_LINE>int dims = 0;<NEW_LINE>int iBracket = fqn.indexOf('[');<NEW_LINE>String componentFqn = fqn;<NEW_LINE>if (iBracket > 0) {<NEW_LINE>dims = (fqn.length() - iBracket) / 2;<NEW_LINE>componentFqn = <MASK><NEW_LINE>}<NEW_LINE>// openPacka... | fqn.substring(0, iBracket); |
367,078 | public void createVmDataCommand(final VirtualRouter router, final UserVm vm, final NicVO nic, final String publicKey, final Commands cmds) {<NEW_LINE>if (vm != null && router != null && nic != null) {<NEW_LINE>final String serviceOffering = _serviceOfferingDao.findByIdIncludingRemoved(vm.getId(), vm.<MASK><NEW_LINE>fin... | getServiceOfferingId()).getDisplayText(); |
919,564 | // snippet-start:[transcribe.java2.bidir_streaming.main]<NEW_LINE>public static void convertAudio(TranscribeStreamingAsyncClient client) throws Exception {<NEW_LINE>try {<NEW_LINE>StartStreamTranscriptionRequest request = StartStreamTranscriptionRequest.builder().mediaEncoding(MediaEncoding.PCM).languageCode(LanguageCo... | TargetDataLine mic = Microphone.get(); |
435,411 | public org.python.Object __add__(org.python.Object other) {<NEW_LINE>if (other instanceof org.python.types.Int) {<NEW_LINE>long other_val = ((org.python.types.Int) other).value;<NEW_LINE>return new org.python.types.Float(this.value + ((double) other_val));<NEW_LINE>} else if (other instanceof org.python.types.Bool) {<N... | Float(this.value + other_val); |
1,083,661 | private static boolean isBroadcast(List<TargetDB> targetDBs, String schemaName, ExecutionContext executionContext) {<NEW_LINE>if (targetDBs.size() != 1) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>TargetDB db = targetDBs.get(0);<NEW_LINE>if (db.getTableNames().size() != 1) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>... | getSchemaManager(schemaName).getTddlRuleManager(); |
121,780 | public void configure(Binder binder) {<NEW_LINE>// Instantiate eagerly so that we get everything registered and put into the Lifecycle as early as possible<NEW_LINE>// Lifecycle scope is INIT to ensure stop runs in the last phase of lifecycle stop.<NEW_LINE>try {<NEW_LINE>ClassLoader loader = Thread<MASK><NEW_LINE>if (... | .currentThread().getContextClassLoader(); |
270,374 | protected SettableBeanProperty _resolveManagedReferenceProperty(DeserializationContext ctxt, SettableBeanProperty prop) throws JsonMappingException {<NEW_LINE>String refName = prop.getManagedReferenceName();<NEW_LINE>if (refName == null) {<NEW_LINE>return prop;<NEW_LINE>}<NEW_LINE>JsonDeserializer<?<MASK><NEW_LINE>Sett... | > valueDeser = prop.getValueDeserializer(); |
1,327,564 | protected void run(URL url, Map<String, String> headers) {<NEW_LINE>this.listener = new WatcherWebSocketListener<>(this);<NEW_LINE>Builder builder = client.newWebSocketBuilder();<NEW_LINE>headers.forEach(builder::header);<NEW_LINE>builder.uri(URI.create(url.toString()));<NEW_LINE>this.websocketFuture = builder.buildAsy... | ).build(), status); |
737,725 | private static void concludeHostParams(ExchangeSpecification exchangeSpecification) {<NEW_LINE>if (exchangeSpecification.getExchangeSpecificParameters() != null) {<NEW_LINE>final boolean useSandbox = exchangeSpecification.getExchangeSpecificParametersItem(PARAM_USE_SANDBOX).equals(true);<NEW_LINE>final boolean usePrime... | ) exchangeSpecification.getExchangeSpecificParametersItem(PARAM_PRIME_HOST)); |
1,804,702 | final ListInferenceRecommendationsJobsResult executeListInferenceRecommendationsJobs(ListInferenceRecommendationsJobsRequest listInferenceRecommendationsJobsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listInferenceRecommendationsJobsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetri... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
1,091,104 | protected final boolean checkBinaryIndexers(@NullAllowed Pair<Long, Map<Pair<String, Integer>, Integer>> lastState, @NonNull Map<BinaryIndexerFactory, Context> contexts) throws IOException {<NEW_LINE>if (lastState == null || lastState.first() == 0L) {<NEW_LINE>// Nothing known about the last state<NEW_LINE>return false... | BinaryIndexerFactory bif = e.getKey(); |
39,214 | private static void runNonCompile(RegressionEnvironment env, SupportEvalBuilder builder) {<NEW_LINE>EventType eventType = env.runtime().getEventTypeService().getEventTypePreconfigured(builder.getEventType());<NEW_LINE>if (eventType == null) {<NEW_LINE>throw new IllegalArgumentException("Cannot find preconfigured event ... | builder.getEventType() + "'"); |
1,538,725 | private void dispatch() throws IOException {<NEW_LINE><MASK><NEW_LINE>MysqlCommand command = MysqlCommand.fromCode(code);<NEW_LINE>if (command == null) {<NEW_LINE>ErrorReport.report(ErrorCode.ERR_UNKNOWN_COM_ERROR);<NEW_LINE>ctx.getState().setError(ErrorCode.ERR_UNKNOWN_COM_ERROR, "Unknown command(" + code + ")");<NEW_... | int code = packetBuf.get(); |
1,239,971 | private void decode(SourceData sourceData) {<NEW_LINE>long start = System.currentTimeMillis();<NEW_LINE>Result rawResult = null;<NEW_LINE>sourceData.setCropRect(cropRect);<NEW_LINE>LuminanceSource source = createSource(sourceData);<NEW_LINE>if (source != null) {<NEW_LINE>rawResult = decoder.decode(source);<NEW_LINE>}<N... | R.id.zxing_possible_result_points, resultPoints); |
1,403,147 | protected void testQueryVertex(GraphManager graph, int threads, int thread, int multiple) {<NEW_LINE>int total = threads * multiple * 100;<NEW_LINE>for (int i = 1; i <= total; i *= 10) {<NEW_LINE>LOG.info(">>>> limit {} <<<<", i);<NEW_LINE>long current = System.currentTimeMillis();<NEW_LINE>List<Vertex> persons = graph... | assert persons.size() == i; |
1,041,239 | private static CompoundTag createEndEntry() {<NEW_LINE>CompoundTag tag = new CompoundTag();<NEW_LINE>tag.put("piglin_safe", new ByteTag((byte) 0));<NEW_LINE>tag.put("natural", new ByteTag((byte) 0));<NEW_LINE>tag.put("ambient_light", new FloatTag(0));<NEW_LINE>tag.put("infiniburn", new StringTag("minecraft:infiniburn_e... | ByteTag((byte) 0)); |
346,085 | private List<Mismatch> checkMatch(ClassRef reference, TypePool typePool, ClassLoader loader) {<NEW_LINE>try {<NEW_LINE>if (helperClassPredicate.isHelperClass(reference.getClassName())) {<NEW_LINE>// make sure helper class is registered<NEW_LINE>if (!helperClassNames.contains(reference.getClassName())) {<NEW_LINE>return... | .MissingClass(reference, className)); |
1,483,232 | private static List<Converter> prepareConverters() {<NEW_LINE>List<Converter> converters = new ArrayList<>();<NEW_LINE>// Boolean converter.<NEW_LINE>converters.add(BooleanConverter.INSTANCE);<NEW_LINE>// Converters for exact numeric types.<NEW_LINE>converters.add(ByteConverter.INSTANCE);<NEW_LINE>converters.add(ShortC... | converters.add(IntervalConverter.YEAR_MONTH); |
716,825 | // Computes LP smoothed spectrum from LP coefficients<NEW_LINE>public static double[] calcSpecLinear(double[] alpha, double sqrtGain, int fftSize, ComplexArray expTerm) {<NEW_LINE>int p = alpha.length;<NEW_LINE>int maxFreq = SignalProcUtils.halfSpectrumSize(fftSize);<NEW_LINE>double[] vtSpectrum = new double[maxFreq];<... | expTerm = calcExpTerm(fftSize, p); |
173,831 | private void deleteFile(File fileToDelete) {<NEW_LINE>verifyStoragePermissions();<NEW_LINE>// removeThumbnails(RhodesActivity.getContext().getContentResolver(), null);<NEW_LINE>final String strFileToDelete = fileToDelete.toString();<NEW_LINE>new Timer().schedule(new TimerTask() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>p... | fileToDelete.getName() + " is deleted."); |
530,541 | // query.from() is non-inclusive<NEW_LINE>OverallSummaryCollector readOverallSummary(String agentRollupId, SummaryQuery query, boolean autoRefresh) throws Exception {<NEW_LINE>OverallSummaryCollector collector = new OverallSummaryCollector();<NEW_LINE>long revisedFrom = query.from();<NEW_LINE>long revisedTo;<NEW_LINE>i... | long lastRolledUpTime = collector.getLastCaptureTime(); |
1,675,838 | public static DescribeEtlJobLogsResponse unmarshall(DescribeEtlJobLogsResponse describeEtlJobLogsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeEtlJobLogsResponse.setRequestId(_ctx.stringValue("DescribeEtlJobLogsResponse.RequestId"));<NEW_LINE>describeEtlJobLogsResponse.setHttpStatusCode(_ctx.integerValue("Desc... | (_ctx.stringValue("DescribeEtlJobLogsResponse.ErrMessage")); |
1,172,020 | public void addPackage(PackageInfo packageInfo, PackageStats packageStats) {<NEW_LINE>synchronized (lock) {<NEW_LINE>if (packageInfo.applicationInfo != null && (packageInfo.applicationInfo.flags & ApplicationInfo.FLAG_INSTALLED) == 0) {<NEW_LINE>Log.w(TAG, "Adding not installed package: " + packageInfo.packageName);<NE... | packageInfo.packageName, PackageManager.COMPONENT_ENABLED_STATE_DEFAULT); |
1,605,216 | public IRubyObject invoke(ThreadContext context, IRubyObject[] args) {<NEW_LINE>checkArity(context, args.length - 1);<NEW_LINE>final IRubyObject invokee = args[0];<NEW_LINE>final Object[] arguments = convertArguments(args, 1);<NEW_LINE>if (invokee.isNil()) {<NEW_LINE>return invokeWithExceptionHandling(context, method, ... | ).getName() + ")"); |
290,928 | private void addMember(SrcLinkedClass srcClass, NamedNode member, Type type, String name, Predicate<String> duplicateChecker) {<NEW_LINE>SrcType getterType = makeSrcType(srcClass, type, false);<NEW_LINE>SrcType setterType = makeSrcType(srcClass, type, false, true);<NEW_LINE>String propName = makeIdentifier(name, true);... | srcClass, member, name, getter); |
1,202,158 | public void load(Map<CharSequence, Object> attrs) {<NEW_LINE>Long creationTime = (<MASK><NEW_LINE>if (creationTime != null) {<NEW_LINE>this.creationTime = Instant.ofEpochMilli(creationTime);<NEW_LINE>}<NEW_LINE>Long lastAccessedTime = (Long) attrs.remove(LAST_ACCESSED_TIME_ATTR);<NEW_LINE>if (lastAccessedTime != null) ... | Long) attrs.remove(CREATION_TIME_ATTR); |
911,925 | public Bundle installBundle(String url, InputStream in) throws BundleException {<NEW_LINE>final String pref = "reference:";<NEW_LINE>if (url.startsWith(pref)) {<NEW_LINE>// workaround for problems with space in path<NEW_LINE>url = <MASK><NEW_LINE>String filePart = url.substring(pref.length());<NEW_LINE>if (installArea ... | url.replace("%20", " "); |
100,963 | public final void run() {<NEW_LINE>if (logger.isDebugEnabled()) {<NEW_LINE>logger.debug("Starting the AcquireTimeoutTask to clean for endpoint [{}].", this.pool.remoteAddress());<NEW_LINE>}<NEW_LINE>long currentNanoTime = System.nanoTime();<NEW_LINE>while (true) {<NEW_LINE>AcquireListener removedTask = this<MASK><NEW_L... | .pool.pendingAcquisitions.poll(); |
794,758 | public void onPermissionGranted() {<NEW_LINE>drawer.refreshDrawer();<NEW_LINE>TabFragment tabFragment = getTabFragment();<NEW_LINE>boolean b = getBoolean(PREFERENCE_NEED_TO_SET_HOME);<NEW_LINE>// reset home and current paths according to new storages<NEW_LINE>if (b) {<NEW_LINE>TabHandler tabHandler = TabHandler.getInst... | MainFragment) main).updateList(); |
1,514,786 | private static Optional<I_M_ProductPrice> retrieveProductPriceAttributeIfValid(final IPricingContext pricingCtx, final int productPriceId) {<NEW_LINE>if (productPriceId <= 0) {<NEW_LINE>logger.debug("Returning null because M_ProductPrice_ID is not set: {}", pricingCtx);<NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_... | logger.debug("Returning null because M_ProductPrice_ID={} was not found", productPriceId); |
697,791 | public void onDeleteAsUserAction(final I_M_PickingSlot_HU pickingSlotHU) {<NEW_LINE>final boolean isUserAction = InterfaceWrapperHelper.isUIAction(pickingSlotHU);<NEW_LINE>final IHUPickingSlotBL pickingSlotBL = <MASK><NEW_LINE>final I_M_PickingSlot pickingSlot = InterfaceWrapperHelper.load(pickingSlotHU.getM_PickingSlo... | Services.get(IHUPickingSlotBL.class); |
1,439,476 | protected EntityTypesMap retrieveEntityTypesMap() {<NEW_LINE>final List<EntityTypeEntry> entries = new ArrayList<>(50);<NEW_LINE>PreparedStatement pstmt = null;<NEW_LINE>ResultSet rs = null;<NEW_LINE>final String sql = "SELECT * FROM AD_EntityType WHERE IsActive=? ORDER BY AD_EntityType_ID";<NEW_LINE>final Object[] sql... | DBException(e, sql, sqlParams); |
715,039 | protected void onResumeFragments() {<NEW_LINE>super.onResumeFragments();<NEW_LINE>if (BuildConfig.LOG_DEBUG)<NEW_LINE>LogUtils.d(TAG);<NEW_LINE>if (runnableOnResumeFragments != null) {<NEW_LINE>runnableOnResumeFragments.run();<NEW_LINE>runnableOnResumeFragments = null;<NEW_LINE>}<NEW_LINE>LocalBroadcastManager bm = Loc... | new IntentFilter(AppIntent.ACTION_FOLLOW_LINK_TO_NOTE_WITH_PROPERTY)); |
570,768 | public static Query<Collection<ActivityIndex>> activityIndexForNewPlayers(long after, long before, ServerUUID serverUUID, Long threshold) {<NEW_LINE>String selectNewUUIDs = SELECT + UserInfoTable.USER_UUID + FROM + UserInfoTable.TABLE_NAME + WHERE + UserInfoTable.REGISTERED + "<=?" + AND + UserInfoTable.REGISTERED + ">... | + AND + UserInfoTable.SERVER_UUID + "=?"; |
808,042 | private void transformTimerEventDefinition(final ExpressionLanguage expressionLanguage, final ExecutableCatchEventElement executableElement, final TimerEventDefinition timerEventDefinition) {<NEW_LINE>final Expression expression;<NEW_LINE>if (timerEventDefinition.getTimeDuration() != null) {<NEW_LINE>final String durat... | ).map(RepeatingInterval::parse); |
1,710,283 | void doGeneric(JSDynamicObject target, Object key, Object value, Object receiver, @Cached("create()") ToArrayIndexNode toArrayIndexNode, @Cached("createBinaryProfile()") ConditionProfile getType, @Cached("create()") JSClassProfile jsclassProfile, @Cached("createBinaryProfile()") ConditionProfile highFrequency, @Cached(... | arrayIndex = toArrayIndexNode.execute(key); |
975,837 | public void visit(RelNode node, int ordinal, RelNode parent) {<NEW_LINE>if (node instanceof LogicalProject) {<NEW_LINE>for (RexNode rexNode : ((LogicalProject) node).getProjects()) {<NEW_LINE>rexNode.accept(accessFiledFinder);<NEW_LINE>RexUtil.DynamicDeepFinder dynamicDeepFinder = new RexUtil.DynamicDeepFinder(Lists.ne... | DynamicDeepFinder(Lists.newLinkedList()); |
196,676 | private static // can't find a good import tool framework, may ref mysqlimport<NEW_LINE>void insertImportByRange(int X, List<CSVRecord> rows, SqlExecutor router, String dbName, String tableName) {<NEW_LINE>int quotient = rows.size() / X;<NEW_LINE>int remainder = rows.size() % X;<NEW_LINE>// range is [left, right)<NEW_L... | .of(start, rangeEnd)); |
588,037 | private UncachedKeyRing fetchKeyFromFacebook(@NonNull ParcelableProxy proxy, OperationLog log, ParcelableKeyRing entry) throws PgpGeneralException, IOException {<NEW_LINE>if (facebookServer == null) {<NEW_LINE>facebookServer = FacebookKeyserverClient.getInstance();<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>log.add(LogType.MSG... | ), proxy).getBytes(); |
1,787,986 | public static Object value(String strValue, Field field) {<NEW_LINE>requireNonNull(field);<NEW_LINE>// if field is not primitive type<NEW_LINE>Type fieldType = field.getGenericType();<NEW_LINE>if (fieldType instanceof ParameterizedType) {<NEW_LINE>Class<?> clazz = (Class<?>) ((ParameterizedType) field.getGenericType()<... | ).getActualTypeArguments()[0]; |
931,961 | public InitializationConfiguration unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>InitializationConfiguration initializationConfiguration = new InitializationConfiguration();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentE... | JsonToken token = context.getCurrentToken(); |
1,563,056 | final DescribeAvailablePatchesResult executeDescribeAvailablePatches(DescribeAvailablePatchesRequest describeAvailablePatchesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeAvailablePatchesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetri... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
810,883 | static DataFrameClassifier of(Formula formula, DataFrame data, Properties params, Classifier.Trainer<double[], ?> trainer) {<NEW_LINE>DataFrame X = formula.x(data);<NEW_LINE>StructType schema = X.schema();<NEW_LINE>double[][] x = X.<MASK><NEW_LINE>int[] y = formula.y(data).toIntArray();<NEW_LINE>Classifier<double[]> mo... | toArray(false, CategoricalEncoder.DUMMY); |
1,850,605 | public String serializeLoginData() {<NEW_LINE>Date loginTime = this.loginTime;<NEW_LINE>if (refreshToken == null || loginTime == null) {<NEW_LINE>return "";<NEW_LINE>}<NEW_LINE>StringBuilder builder = new StringBuilder();<NEW_LINE>// version<NEW_LINE>builder.append("7\n");<NEW_LINE>builder.append(frc);<NEW_LINE>builder... | .getCookieStore().getCookies(); |
301,356 | static Frame read(final int marker, final DataInput data, final int length) throws IOException {<NEW_LINE>int samplePrecision = data.readUnsignedByte();<NEW_LINE>int lines = data.readUnsignedShort();<NEW_LINE>int samplesPerLine = data.readUnsignedShort();<NEW_LINE>int componentsInFrame = data.readUnsignedByte();<NEW_LI... | (sub & 0xF), qtSel); |
706,714 | public static Object resolveVariables(final String iText, final String iBegin, final String iEnd, final OVariableParserListener iListener, final Object iDefaultValue) {<NEW_LINE>if (iListener == null)<NEW_LINE>throw new IllegalArgumentException("Missed VariableParserListener listener");<NEW_LINE>int beginPos = iText.la... | path, iBegin, iEnd, iListener); |
399,359 | protected long doI64(VirtualFrame frame, long left, long right, boolean cf) {<NEW_LINE>long c = cf ? 1 : 0;<NEW_LINE>long result = left + right + c;<NEW_LINE>boolean overflow;<NEW_LINE>boolean carry;<NEW_LINE>if (noCfProfile.profile(!cf)) {<NEW_LINE>overflow = (result < 0 && left > 0 && right > 0) || (result >= 0 && le... | frame, overflow, carry, result); |
284,390 | public static void main(String[] args) {<NEW_LINE>Region region = Region.US_EAST_1;<NEW_LINE>DynamoDbClient ddb = DynamoDbClient.builder().region(region).build();<NEW_LINE>AttributeValue att1 = AttributeValue.builder().s("Acme Band").build();<NEW_LINE>AttributeValue att2 = AttributeValue.builder().s("PartiQL Rocks").bu... | (ddb, "UPDATE Music REMOVE AwardDetail.Grammys[2] where Artist=? and SongTitle=?", parameters)); |
373,076 | final UntagStreamResult executeUntagStream(UntagStreamRequest untagStreamRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(untagStreamRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<UntagStreamRequest> reques... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
583,256 | public static int ycbcrToRgb(int y, int cb, int cr) {<NEW_LINE>// multiply coefficients in book by 1024, which is 2^10<NEW_LINE>y = 1191 * (y - 16);<NEW_LINE>if (y < 0)<NEW_LINE>y = 0;<NEW_LINE>cb -= 128;<NEW_LINE>cr -= 128;<NEW_LINE>int r = (y + 1836 * cr) >> 10;<NEW_LINE>int g = (y - 547 * cr <MASK><NEW_LINE>int b = ... | - 218 * cb) >> 10; |
1,489,771 | private void updateCompassPaths(QuadPoint center, float innerRadiusLength, float radiusLength) {<NEW_LINE>compass.addCircle(center.x, center.y, radiusLength, Path.Direction.CCW);<NEW_LINE>arrowArc.addArc(new RectF(center.x - radiusLength, center.y - radiusLength, center.x + radiusLength, center.y + radiusLength), -45, ... | * (radiusLength - shortLineMargin - shortLineHeight); |
1,082,961 | final TagResourceResult executeTagResource(TagResourceRequest tagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(tagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi... | false), new TagResourceResultJsonUnmarshaller()); |
1,621,094 | public void create() throws IOException {<NEW_LINE>cx = Context.enter();<NEW_LINE>cx.setOptimizationLevel(9);<NEW_LINE>cx.setLanguageVersion(Context.VERSION_ES6);<NEW_LINE>scope = new Global(cx);<NEW_LINE>runCode(cx, scope, "testsrc/benchmarks/caliper/fieldTests.js");<NEW_LINE>Object[<MASK><NEW_LINE>for (int i = 0; i <... | ] sarray = new Object[stringKeys]; |
802,006 | // Method to deserialize the Enum using property based methodology<NEW_LINE>protected Object deserializeEnumUsingPropertyBased(final JsonParser p, final DeserializationContext ctxt, final PropertyBasedCreator creator) throws IOException {<NEW_LINE>PropertyValueBuffer buffer = creator.startBuilding(p, ctxt, null);<NEW_L... | creatorProp = creator.findCreatorProperty(propName); |
1,312,953 | public JSONObject toJSON() {<NEW_LINE>JSONObject json = new JSONObject();<NEW_LINE>if (originalLocation != null) {<NEW_LINE>json.put("lat", String.format(Locale.US, "%.5f", originalLocation.getLatitude()));<NEW_LINE>json.put("lon", String.format(Locale.US, "%.5f", originalLocation.getLongitude()));<NEW_LINE>}<NEW_LINE>... | json.put("sortByName", sortByName); |
934,530 | protected void addEventRegistryProperties(FlowElement flowElement, ObjectNode propertiesNode) {<NEW_LINE>String eventType = getExtensionValue("eventType", flowElement);<NEW_LINE>if (StringUtils.isNotEmpty(eventType)) {<NEW_LINE>setPropertyValue(PROPERTY_EVENT_REGISTRY_EVENT_KEY, eventType, propertiesNode);<NEW_LINE>set... | setPropertyValue(PROPERTY_EVENT_REGISTRY_KEY_DETECTION_JSON_POINTER, keyDetectionValue, propertiesNode); |
1,512,995 | public static void main(String[] args) {<NEW_LINE>String dstDir = "./data/";<NEW_LINE>String[] path = new String[] { null, null };<NEW_LINE>for (int i = 0; i < args.length; i++) {<NEW_LINE>if (args[i].equals("-src")) {<NEW_LINE>path[0] = args[++i];<NEW_LINE>} else if (args[i].equals("-region")) {<NEW_LINE>path[1] = arg... | println("Usage: java -jar dbMaker.jar " + "-src [source text file path] " + "-region [global region file path]"); |
435,400 | void addEntries(String category, GwtLocale locale, InputFactory cldrFactory, String prefix, String tag, String keyAttribute) {<NEW_LINE>Map<String, String> <MASK><NEW_LINE>InputFile cldr = cldrFactory.load(allLocales.get(locale));<NEW_LINE>XPathParts parts = new XPathParts();<NEW_LINE>for (String path : cldr.listPaths(... | map = getMap(category, locale); |
1,489,665 | public DataSerializableFactory createFactory() {<NEW_LINE>ConstructorFunction<Integer, IdentifiedDataSerializable>[] constructors = new ConstructorFunction[LEN];<NEW_LINE>constructors[JSON_QUERY] = arg -> new JsonQueryFunction();<NEW_LINE>constructors[JSON_PARSE] = arg -> new JsonParseFunction();<NEW_LINE>constructors[... | arg -> new RootResultConsumerSink.Supplier(); |
313,028 | public CreateGroupResult createGroup(CreateGroupRequest createGroupRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createGroupRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>aws... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
1,073,154 | public void delete(@PathParam("organizationId") String organizationId) throws OrganizationNotFoundException, NotAuthorizedException, EntityStillActiveException {<NEW_LINE>securityContext.<MASK><NEW_LINE>try {<NEW_LINE>storage.beginTx();<NEW_LINE>OrganizationBean organizationBean = getOrganizationFromStorage(organizatio... | checkPermissions(PermissionType.orgAdmin, organizationId); |
393,150 | protected AlGetMembersModel doInBackground() {<NEW_LINE>AlGetMembersModel model = new AlGetMembersModel();<NEW_LINE>try {<NEW_LINE>ChannelFeedListResponse response = ChannelClientService.getInstance(context.get()).getMemebersFromContactGroupIds(groupIds, groupNames, groupType);<NEW_LINE>if (response != null) {<NEW_LINE... | size()]), false); |
148,545 | private void assignExportedMethodsKeys(String moduleName, List<Map<String, Object>> exportedMethodsInfos) {<NEW_LINE>if (mExportedMethodsKeys.get(moduleName) == null) {<NEW_LINE>mExportedMethodsKeys.put(moduleName, new HashMap<String, Integer>());<NEW_LINE>}<NEW_LINE>if (mExportedMethodsReverseKeys.get(moduleName) == n... | .values().size(); |
1,140,225 | private DDlogExpression aggregateComplete(Node node, String aggregate, DDlogExpression value, DDlogType resultType) {<NEW_LINE>switch(aggregate) {<NEW_LINE>case "avg":<NEW_LINE>{<NEW_LINE>String suffix;<NEW_LINE>DDlogType argType = value.getType();<NEW_LINE>DDlogTTuple tuple = argType.as(DDlogTTuple.class, "Expected a ... | as(DDlogTUser.class, "expected a set"); |
472,084 | public void execute() {<NEW_LINE>final BaseDMLHandler nextHandler = this.nextHandler;<NEW_LINE>final boolean left = this.isLeft;<NEW_LINE>DbleServer.getInstance().getComplexQueryExecutor().execute(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>try {<NEW_LINE>final MySQLResponseServi... | <FieldPacket> fields = makeField(); |
1,313,548 | protected Content prepare(@Nonnull T field, @Nonnull Function<? super String, String> onShow) {<NEW_LINE>Font font = field.getFont();<NEW_LINE>FontMetrics metrics = font == null ? null : field.getFontMetrics(font);<NEW_LINE>int height = metrics == null ? 16 : metrics.getHeight();<NEW_LINE>Dimension size = new Dimension... | add(eastPanel, BorderLayout.EAST); |
665,979 | public void readFrom(StreamInput in) throws IOException {<NEW_LINE>super.readFrom(in);<NEW_LINE>cause = in.readString();<NEW_LINE>name = in.readString();<NEW_LINE>if (in.getVersion().onOrAfter(Version.V_6_0_0_alpha1)) {<NEW_LINE>indexPatterns = in.readStringList();<NEW_LINE>} else {<NEW_LINE>indexPatterns = Collections... | int aliasesSize = in.readVInt(); |
37,961 | private void saveGridFSFile(GridFSInputFile gfsInputFile, EntityMetadata m) {<NEW_LINE>try {<NEW_LINE>DBCollection coll = mongoDb.getCollection(m.getTableName() + MongoDBUtils.FILES);<NEW_LINE>createUniqueIndexGFS(coll, ((AbstractAttribute) m.getIdAttribute()).getJPAColumnName());<NEW_LINE>gfsInputFile.save();<NEW_LINE... | getTableName() + MongoDBUtils.FILES); |
250,636 | private void handleContentCrashIntent(@NonNull final Intent intent) {<NEW_LINE>Log.e(LOGTAG, "Got content crashed intent");<NEW_LINE>final String dumpFile = <MASK><NEW_LINE>final String extraFile = intent.getStringExtra(GeckoRuntime.EXTRA_EXTRAS_PATH);<NEW_LINE>Log.d(LOGTAG, "Dump File: " + dumpFile);<NEW_LINE>Log.d(LO... | intent.getStringExtra(GeckoRuntime.EXTRA_MINIDUMP_PATH); |
1,625,096 | public Void scan(Tree tree, Void p) {<NEW_LINE>if (tree != null) {<NEW_LINE>long endPos = sourcePositions.getEndPosition(getCurrentPath().getCompilationUnit(), tree);<NEW_LINE>if (endPos == (-1) && tree.getKind() == Kind.ASSIGNMENT && getCurrentPath().getLeaf().getKind() == Kind.ANNOTATION) {<NEW_LINE>ExpressionTree va... | super.scan(tree, p); |
1,744,381 | protected boolean checkValidityInPercentage(MoveTemplate moveTemplate) {<NEW_LINE>BigDecimal debitPercent = BigDecimal.ZERO;<NEW_LINE>BigDecimal creditPercent = BigDecimal.ZERO;<NEW_LINE>for (MoveTemplateLine line : moveTemplate.getMoveTemplateLineList()) {<NEW_LINE>LOG.debug(<MASK><NEW_LINE>if (MoveTemplateLineReposit... | "Adding percent: {}", line.getPercentage()); |
1,414,321 | private S internalTest(E event, C context) {<NEW_LINE>checkState(status != StateMachineStatus.ERROR && status != StateMachineStatus.TERMINATED, "Cannot test state machine under " + status + " status.");<NEW_LINE>S testResult = null;<NEW_LINE>queuedTestEvents.add(new Pair<E, <MASK><NEW_LINE>if (!isProcessingTestEvent) {... | C>(event, context)); |
356,105 | public void handleWindow(Window window, int eventID) {<NEW_LINE>final String MESSAGE_STUB = DIALOG_TITLE + " dialog; ";<NEW_LINE>final String INFO_MESSAGE = MESSAGE_STUB + "{}";<NEW_LINE>final String ERROR_MESSAGE = MESSAGE_STUB + "error: {}";<NEW_LINE>final String COULD_NOT_HANDLE_MESSAGE = MESSAGE_STUB + "could not h... | ).getString("ExistingSessionDetectedAction", "manual"); |
461,746 | private Optional<ImportIssueInfo> buildImportIssueInfo(@NonNull final Issue issue, @NonNull final ImportIssuesRequest importIssuesRequest, @NonNull final HashMap<GithubIdSearchKey, String> seenExternalIdsByKey) {<NEW_LINE>final GithubIdSearchKey githubIdSearchKey = GithubIdSearchKey.builder().repository(importIssuesReq... | importInfoBuilder.status(Status.CLOSED); |
803,904 | public void relocate(ElfRelocationContext elfRelocationContext, ElfRelocation relocation, Address relocationAddress) throws MemoryAccessException, NotFoundException {<NEW_LINE>ElfHeader elf = elfRelocationContext.getElfHeader();<NEW_LINE>if (elf.e_machine() != ElfConstants.EM_MIPS) {<NEW_LINE>return;<NEW_LINE>}<NEW_LIN... | int type = relocation.getType(); |
1,494,921 | public static Boolean writeCsvFile(SessionDataSet sessionDataSet, String filePath) throws IOException, IoTDBConnectionException, StatementExecutionException {<NEW_LINE>CSVPrinter printer = CSVFormat.Builder.create(CSVFormat.DEFAULT).setHeader().setSkipHeaderRecord(true).setEscape('\\').setQuoteMode(QuoteMode.NONE).buil... | (names.get(i)); |
1,508,407 | public static JCExpression unbox(Types types, TreeMaker make, Names names, Context context, CompilationUnitTree compUnit, JCExpression tree, Type primitive) {<NEW_LINE>Type unboxedType = <MASK><NEW_LINE>if (unboxedType.hasTag(NONE)) {<NEW_LINE>unboxedType = primitive;<NEW_LINE>if (!unboxedType.isPrimitive()) {<NEW_LINE... | types.unboxedType(tree.type); |
1,486,808 | public String format(final String input) {<NEW_LINE>Objects.requireNonNull(input);<NEW_LINE>if (regex == null || replacement == null) {<NEW_LINE>return input;<NEW_LINE>}<NEW_LINE>Matcher escapedOpeningCurlyBrace = ESCAPED_OPENING_CURLY_BRACE.matcher(input);<NEW_LINE>String <MASK><NEW_LINE>Matcher escapedClosingCurlyBra... | inputWithPlaceholder = escapedOpeningCurlyBrace.replaceAll(PLACEHOLDER_FOR_OPENING_CURLY_BRACE); |
91,675 | public Set<Veto> filter(UnusedResource resource, ResourceRequest request) {<NEW_LINE>// Apply veto filtering rules from higher to lower score making sure we cut over and return<NEW_LINE>// early any time a veto from a score group is applied. This helps to more accurately report<NEW_LINE>// a veto reason in the NearestF... | of(maintenanceVeto.get()); |
199,744 | private static SegmentGenerationJobSpec generateSegmentUploadSpec(String tableName, BatchConfig batchConfig, @Nullable AuthContext authContext) {<NEW_LINE>TableSpec tableSpec = new TableSpec();<NEW_LINE>tableSpec.setTableName(tableName);<NEW_LINE>PinotClusterSpec pinotClusterSpec = new PinotClusterSpec();<NEW_LINE>pino... | = new PinotClusterSpec[] { pinotClusterSpec }; |
1,140,494 | public static void main(String[] args) {<NEW_LINE>Loader.loadNativeLibraries();<NEW_LINE>// [START solver]<NEW_LINE>// Create the linear solver with the GLOP backend.<NEW_LINE>MPSolver solver = MPSolver.createSolver("GLOP");<NEW_LINE>if (solver == null) {<NEW_LINE>System.out.println("Could not create solver SCIP");<NEW... | "x = " + x.solutionValue()); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.