idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
826,063 | public List<List<Integer>> verticalOrder(TreeNode root) {<NEW_LINE>if (root == null) {<NEW_LINE>return Collections.emptyList();<NEW_LINE>}<NEW_LINE>Map<Integer, List<Integer>> offsetVals = new TreeMap<>();<NEW_LINE>Map<TreeNode, Integer> nodeOffsets = new HashMap<>();<NEW_LINE>Deque<TreeNode> q = new ArrayDeque<>();<NE... | node.right, offset + 1); |
1,635,100 | private OutputsInfo outputsInfo(RootInfo rootInfo, IResource res) {<NEW_LINE>try {<NEW_LINE>JavaProject proj = rootInfo == null ? (JavaProject) createElement(res.getProject(), IJavaElement.JAVA_PROJECT, null) : rootInfo.project;<NEW_LINE>if (proj != null) {<NEW_LINE>IPath projectOutput = proj.getOutputLocation();<NEW_L... | IPath entryPath = entry.getPath(); |
316,587 | public Observable<Iterable<Person>> call() {<NEW_LINE>String[] firstNames = new String[] { "Alice", "Bob", "Carol", "Chloe", "Dan", "Emily", "Emma", "Eric", "Eva", "Frank", "Gary", "Helen", "Jack", "James", "Jane", "Kevin", "Laura", "Leon", "Lilly", "Mary", "Maria", "Mia", "Nick", "Oliver", "Olivia", "Patrick", "Robert... | insert(people).toObservable(); |
1,429,897 | public void marshall(HlsGroupSettings hlsGroupSettings, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (hlsGroupSettings == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(hlsGroupSettings.getAdMarkers(), ADM... | hlsGroupSettings.getSegmentControl(), SEGMENTCONTROL_BINDING); |
1,581,681 | protected BiPartitionProjection partitionProjections(Map<Projection, IntArrayList> originalProjections, BiPartition biPartition) {<NEW_LINE>IntHashSet part0 = biPartition.getPartition(0);<NEW_LINE>EnumMap<Projection, IntArrayList> projections0 = new EnumMap<>(Projection.class);<NEW_LINE>EnumMap<Projection, IntArrayList... | ()).add(node); |
872,049 | public int add(byte[] value) {<NEW_LINE>int offsetBufferIndex = _numValues >>> OFFSET_BUFFER_SHIFT_OFFSET;<NEW_LINE>int offsetIndex = _numValues & OFFSET_BUFFER_MASK;<NEW_LINE>PinotDataBuffer offsetBuffer;<NEW_LINE>// If this is the first entry in the offset buffer, allocate a new buffer and store the end offset of the... | valueLength - 1) >>> VALUE_BUFFER_SHIFT_OFFSET; |
1,790,392 | private void drawLabels(int originValue, double maxX, double maxY, String title, String xAxisLabel, String yAxisLabel) {<NEW_LINE>Font font = new Font(HELVETICA_FONT, Font.BOLD, 12);<NEW_LINE>StdDraw.setFont(font);<NEW_LINE>StdDraw.setPenColor(StdDraw.RED);<NEW_LINE>// X axis label<NEW_LINE>double xAxisLabelHeight = -(... | valueOf((int) maxX)); |
1,575,625 | public boolean removeVmFromLoadBalancers(long instanceId) {<NEW_LINE>boolean success = true;<NEW_LINE>List<LoadBalancerVMMapVO> <MASK><NEW_LINE>if (maps == null || maps.isEmpty()) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>Map<Long, List<Long>> lbsToReconfigure = new HashMap<Long, List<Long>>();<NEW_LINE>// first set ... | maps = _lb2VmMapDao.listByInstanceId(instanceId); |
1,271,378 | public ListCallAnalyticsCategoriesResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListCallAnalyticsCategoriesResult listCallAnalyticsCategoriesResult = new ListCallAnalyticsCategoriesResult();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LI... | int originalDepth = context.getCurrentDepth(); |
1,370,073 | public static double reLnBn(int n) {<NEW_LINE>if (n < 0)<NEW_LINE>return Double.NaN;<NEW_LINE>if (n == 1)<NEW_LINE>return -log(2);<NEW_LINE>if (n % 2 != 0)<NEW_LINE>return Double.NEGATIVE_INFINITY;<NEW_LINE>if (// rel err < 1e-14<NEW_LINE>n >= 50) {<NEW_LINE>// Log[-2^(3/2 - n) ((3 i)/e)^n n^(1/2 + n) ((3 + 40 n^2)/(-1... | * n * n - 1)); |
575,136 | public void initialize(String imageType) {<NEW_LINE>if ("png".equalsIgnoreCase(imageType)) {<NEW_LINE>this.decisionRequirementsDiagram = new BufferedImage(canvasWidth, canvasHeight, BufferedImage.TYPE_INT_ARGB);<NEW_LINE>} else {<NEW_LINE>this.decisionRequirementsDiagram = new BufferedImage(canvasWidth, canvasHeight, B... | , 255, 255, 0)); |
902,606 | private void drawCross(Graphics2D g2d) {<NEW_LINE>int drawX, drawY;<NEW_LINE>final String cross = "+";<NEW_LINE>g2d.setFont(new Font("arial"<MASK><NEW_LINE>Rectangle2D crossBounds = g2d.getFontMetrics().getStringBounds("+", g2d);<NEW_LINE>final int crossW = (int) crossBounds.getWidth();<NEW_LINE>final int crossH = (int... | , Font.PLAIN, 24)); |
1,530,102 | public static DescribeBackupPlansResponse unmarshall(DescribeBackupPlansResponse describeBackupPlansResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeBackupPlansResponse.setRequestId(_ctx.stringValue("DescribeBackupPlansResponse.RequestId"));<NEW_LINE>describeBackupPlansResponse.setSuccess(_ctx.booleanValue("Descr... | ("DescribeBackupPlansResponse.BackupPlans[" + i + "].Options")); |
873,589 | public void testDeliveryDelayForDifferentDelaysTopic_Tcp(HttpServletRequest request, HttpServletResponse response) throws Exception {<NEW_LINE>boolean testFailed = false;<NEW_LINE>JMSContext jmsContext = jmsTCFTCP.createContext();<NEW_LINE>Topic topic = (Topic) new <MASK><NEW_LINE>JMSProducer jmsProducer = jmsContext.c... | InitialContext().lookup("java:comp/env/eis/topic"); |
766,685 | public static boolean run(Automaton a, String s) {<NEW_LINE>if (a.isSingleton()) {<NEW_LINE>return s.equals(a._singleton);<NEW_LINE>}<NEW_LINE>if (a._deterministic) {<NEW_LINE>State p = a._initial;<NEW_LINE>for (int i = 0; i < s.length(); i++) {<NEW_LINE>State q = p.step(s.charAt(i));<NEW_LINE>if (q == null) {<NEW_LINE... | p.step(c, dest); |
1,117,923 | public void test(Test test, boolean persistent) {<NEW_LINE>ivTest = test;<NEW_LINE>ivExchanger = new Exchanger();<NEW_LINE>TimerData data = getBusinessObject().createTimer(persistent);<NEW_LINE>ivTest.check("initial", new TimerData(data.ivTimer));<NEW_LINE>try {<NEW_LINE>// Wait for the timeout method to be called. Se... | ivTest.check("timeout #1", timeoutData1); |
56,466 | boolean assertionMatch(com.yahoo.athenz.zms.Assertion assertion, String identity, String op, String resource, List<Role> roles, String trustDomain) {<NEW_LINE>// Lowercase action and resource as it is possible to store them case-sensitive<NEW_LINE>String opPattern = StringUtils.patternFromGlob(assertion.getAction().toL... | patternFromGlob(assertion.getRole()); |
1,049,675 | public Object evaluateRecord(OIdentifiable iRecord, ODocument iCurrentResult, OSQLFilterCondition iCondition, Object iLeft, Object iRight, OCommandContext iContext, final ODocumentSerializer serializer) {<NEW_LINE>OLuceneFullTextIndex index = involvedIndex(iRecord, iCurrentResult, iCondition, iLeft, iRight);<NEW_LINE>i... | MemoryIndex) iContext.getVariable(MEMORY_INDEX); |
1,316,225 | private void makeNativeWrite(CodegenMethod method, CodegenClassScope classScope) {<NEW_LINE>boolean first = true;<NEW_LINE>if (desc.getOptionalSupertype() != null && !desc.getOptionalSupertype().getTypes().isEmpty()) {<NEW_LINE>method.getBlock().exprDotMethod(ref("super"), "nativeWrite", ref("writer"));<NEW_LINE>first ... | (ref("writer"), "writeObjectSeparator"); |
1,797,722 | protected void onFragmentCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {<NEW_LINE>if (getArguments().getString(BundleConstant.EXTRA) == null) {<NEW_LINE>throw new NullPointerException("Username is null");<NEW_LINE>}<NEW_LINE>stateLayout.setEmptyText(R.string.no_gists);<NEW_LINE>refresh.setOnRefreshLi... | getPresenter().getPreviousTotal()); |
1,688,440 | public String parseLineText(String line) {<NEW_LINE>if (line.startsWith("#")) {<NEW_LINE>Pattern aName = Pattern.compile("^#[A-Za-z0-9_]+ =$");<NEW_LINE>Matcher mN = aName.matcher(line);<NEW_LINE>if (mN.find()) {<NEW_LINE>return line.substring(1).split(" ")[0];<NEW_LINE>}<NEW_LINE>return "";<NEW_LINE>}<NEW_LINE>Matcher... | ), mI.end()); |
1,470,222 | public MqttMessage toExternal(RowData rowData, MqttMessage output) throws Exception {<NEW_LINE>Map<String, Object> map;<NEW_LINE>int arity = rowData.getArity();<NEW_LINE>ColumnRowData row = (ColumnRowData) rowData;<NEW_LINE>if (emqxConf.getTableFields() != null && emqxConf.getTableFields().size() >= arity && !(row.getF... | .get(i), value); |
486,640 | public void extract(byte[] segmentBytes, Metadata metadata, JpegSegmentType segmentType) {<NEW_LINE>JpegDirectory directory = new JpegDirectory();<NEW_LINE>metadata.addDirectory(directory);<NEW_LINE>// The value of TAG_COMPRESSION_TYPE is determined by the segment type found<NEW_LINE>directory.setInt(JpegDirectory.TAG_... | int samplingFactorByte = reader.getUInt8(); |
220,991 | public String build(OutputType outputType, String className, String serviceName) {<NEW_LINE>HashMap<String, List<MethodParameter.MethodModelParameter>> methods = new HashMap<>();<NEW_LINE>for (MethodParameter.MethodModelParameter methodModelParameter : this.methodModelParameter) {<NEW_LINE>String methodName = methodMod... | (methodName).add(methodModelParameter); |
1,631,114 | public String initNetwork(@Nullable String networkName, @Nullable String networkPrefix) {<NEW_LINE>try {<NEW_LINE>WebTarget webTarget = getTarget(CoordConsts.SVC_RSC_INIT_NETWORK);<NEW_LINE>// postData will close it<NEW_LINE>@SuppressWarnings("PMD.CloseResource")<NEW_LINE>MultiPart multiPart = new MultiPart();<NEW_LINE... | SVC_KEY_API_KEY, _settings.getApiKey()); |
1,019,786 | private void registerScoreFunctions(List<SearchPlugin> plugins) {<NEW_LINE>registerScoreFunction(new ScoreFunctionSpec<>(ScriptScoreFunctionBuilder.NAME, ScriptScoreFunctionBuilder<MASK><NEW_LINE>registerScoreFunction(new ScoreFunctionSpec<>(GaussDecayFunctionBuilder.NAME, GaussDecayFunctionBuilder::new, GaussDecayFunc... | ::new, ScriptScoreFunctionBuilder::fromXContent)); |
1,415,705 | private static void printBoard(Board board) {<NEW_LINE>StringBuilder topLines = new StringBuilder();<NEW_LINE>StringBuilder midLines = new StringBuilder();<NEW_LINE>for (int x = 0; x < board.getSize(); ++x) {<NEW_LINE>topLines.append("+--------");<NEW_LINE>midLines.append("| ");<NEW_LINE>}<NEW_LINE>topLines.appe... | System.out.print("|"); |
1,764,501 | private BeanDefinitionBuilder parseUdp(Element element, ParserContext parserContext) {<NEW_LINE>BeanDefinitionBuilder builder;<NEW_LINE>String multicast = IpAdapterParserUtils.getMulticast(element);<NEW_LINE>if (multicast.equals("true")) {<NEW_LINE>builder = BeanDefinitionBuilder.genericBeanDefinition(MulticastSendingM... | builder, element, IpAdapterParserUtils.UDP_SOCKET_CUSTOMIZER); |
368,668 | public okhttp3.Call readNamespacedCronJobStatusCall(String name, String namespace, String pretty, final ApiCallback _callback) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/st... | HashMap<String, String>(); |
688,003 | private void updateFont(final String font, final boolean force) {<NEW_LINE>final BrowserVersion browserVersion = getBrowserVersion();<NEW_LINE>final String[] details = ComputedFont.getDetails(font, browserVersion);<NEW_LINE>if (details != null || force) {<NEW_LINE>final StringBuilder newFont = new StringBuilder();<NEW_... | ), newFont.toString()); |
561,403 | public void next() {<NEW_LINE>if (iter.hasNext()) {<NEW_LINE>try {<NEW_LINE>Handler<DeliveryContext> handler = iter.next();<NEW_LINE>if (handler != null) {<NEW_LINE>handler.handle(this);<NEW_LINE>} else {<NEW_LINE>next();<NEW_LINE>}<NEW_LINE>} catch (Throwable t) {<NEW_LINE>log.error("Failure in interceptor", t);<NEW_L... | m, message.isLocal()); |
617,640 | protected ArrayList<FileSystem.Classpath> handleModuleSourcepath(String arg) {<NEW_LINE>ArrayList<String> modulePaths = processModulePathEntries(arg);<NEW_LINE>ArrayList<FileSystem.Classpath> result = new ArrayList<>();<NEW_LINE>if ((modulePaths != null) && (modulePaths.size() != 0)) {<NEW_LINE>if (this.destinationPath... | this.modNames[j] = ""; |
1,681,203 | public void toggleLock(final NodeModel node, PasswordStrategy passwordStrategy) {<NEW_LINE>final EncryptionModel encryptionModel = EncryptionModel.getModel(node);<NEW_LINE>if (encryptionModel != null) {<NEW_LINE>final <MASK><NEW_LINE>final boolean wasAccessible = encryptionModel.isAccessible();<NEW_LINE>if (!wasAccessi... | boolean wasFolded = node.isFolded(); |
1,746,668 | public static Container copyContainer(Container currentContainer) throws DotDataException, DotStateException, DotSecurityException {<NEW_LINE>HostAPI hostAPI = APILocator.getHostAPI();<NEW_LINE>// gets the new information for the template from the request object<NEW_LINE>Container newContainer = new Container();<NEW_LI... | ContainerLoader().invalidate(newContainer); |
1,672,285 | public DeploymentCanarySettings unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DeploymentCanarySettings deploymentCanarySettings = new DeploymentCanarySettings();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NE... | )).unmarshall(context)); |
831,896 | public Object deriveTrueTypeFont(Object font, float size, int weight) {<NEW_LINE>java.awt.Font fnt;<NEW_LINE>if (font instanceof int[]) {<NEW_LINE>fnt = createAWTFont((int[]) font);<NEW_LINE>} else {<NEW_LINE>fnt = (java.awt.Font) font;<NEW_LINE>}<NEW_LINE>int style = java.awt.Font.PLAIN;<NEW_LINE>if ((weight & com.cod... | | java.awt.Font.ITALIC; |
98,623 | private void initClasspath() {<NEW_LINE>ClasspathInfo.Builder bld = new ClasspathInfo.Builder(projectInfo.getClassPath(ClasspathInfo.PathKind.BOOT));<NEW_LINE>ClassPath snippetSource = ClassPathSupport.createProxyClassPath(projectInfo.getClassPath(PathKind.SOURCE), ClassPathSupport.createClassPath(editorWorkRoot), Clas... | putProperty("java.classpathInfo", this.cpInfo); |
843,644 | private Collection<Callback> callbacksForDataSource(String dataSourceName) throws ClassNotFoundException, IllegalAccessException, InvocationTargetException, InstantiationException {<NEW_LINE>final Optional<List<String>> callbackConfig = flywayBuildConfig.getConfigForDataSourceName(dataSourceName).callbacks;<NEW_LINE>if... | ().toString())); |
487,288 | private static List<TypeRecord> recursiveDepthFirstSearch(final ArrayDeque<TypeRecord> pathFromRoot, final TypeElement target, final Types types) {<NEW_LINE>if (pathFromRoot.isEmpty()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final <MASK><NEW_LINE>final TypeElement currentElement = currentRecord.element;<NEW_LINE>if... | TypeRecord currentRecord = pathFromRoot.peekLast(); |
1,294,919 | private void initPoiAdditionals(Collection<PoiType> poiAdditionals, Set<String> excludedPoiAdditionalCategories) {<NEW_LINE>Set<String> selectedCategories = new LinkedHashSet<>();<NEW_LINE>Set<String> topTrueOnlyCategories = new LinkedHashSet<>();<NEW_LINE>Set<String> <MASK><NEW_LINE>for (PoiType poiType : poiAdditiona... | topFalseOnlyCategories = new LinkedHashSet<>(); |
501,568 | public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>String eplSchema = "@public create schema Lvl2(id string);\n" + "@public create schema Lvl1(lvl2 Lvl2[]);\n" + "@public @buseventtype create schema Lvl0(lvl1 Lvl1, indexNumber int, lvl0id string);\n";<NEW_LINE>env... | tryInvalidCompile(path, "select me.lvl1.lvl2[indexNumber][indexNumber].id from Lvl0 as me", "Failed to validate select-clause expression 'me.lvl1.lvl2[indexNumber][indexNumb...(41 chars)': Could not perform array operation on type event type 'Lvl2'"); |
1,217,525 | public static void copyFile(File sourceFile, File destFile) throws IOException {<NEW_LINE>final String methodName = "copyFile(File,File)";<NEW_LINE>if (enableLogging) {<NEW_LINE>Log.info(c, methodName, "Copying " + sourceFile + " to " + destFile);<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>if (parentFile != null && !parentFil... | File parentFile = destFile.getParentFile(); |
1,786,878 | private static void tryMT(RegressionEnvironment env, int numSeconds, int numWriteThreads) throws InterruptedException {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>String eplCreateVariable = "@public create table varagg (c0 int, c1 int, c2 int, c3 int, c4 int, c5 int)";<NEW_LINE>env.compileDeploy(eplC... | ] writeThreads = new Thread[numWriteThreads]; |
443,680 | protected FullHttpResponse newHandshakeResponse(FullHttpRequest req, HttpHeaders headers) {<NEW_LINE>CharSequence key = req.headers().get(HttpHeaderNames.SEC_WEBSOCKET_KEY);<NEW_LINE>if (key == null) {<NEW_LINE>throw new WebSocketServerHandshakeException("not a WebSocket request: missing key", req);<NEW_LINE>}<NEW_LINE... | headers().add(headers); |
641,433 | public static List<DrMemoryError> parse(File file, String encoding) {<NEW_LINE>var result = new ArrayList<DrMemoryError>();<NEW_LINE>List<String> elements = getElements(file, encoding);<NEW_LINE>for (var element : elements) {<NEW_LINE>var m = RX_MESSAGE_FINDER.matcher(element);<NEW_LINE>if (m.find()) {<NEW_LINE>var err... | (locationMatcher.group(2)); |
1,039,379 | private void writeClear() {<NEW_LINE>Excerpt excerpt = getExcerpt(16, clear);<NEW_LINE>long eventId = excerpt.index();<NEW_LINE>excerpt.writeEnum(clear);<NEW_LINE>excerpt.finish();<NEW_LINE>if (!notifyOff && !listeners.isEmpty()) {<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>Entry<K, V>[] entrySet = underlying.ent... | [j].getValue()); |
351,371 | public DescribeAlarmHistoryResult unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>DescribeAlarmHistoryResult describeAlarmHistoryResult = new DescribeAlarmHistoryResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.i... | ().unmarshall(context)); |
482,516 | private static int scriptScan(CommandContext<CommandSourceStack> context, BlockPos origin, BlockPos a, BlockPos b, String expr) throws CommandSyntaxException {<NEW_LINE>CommandSourceStack source = context.getSource();<NEW_LINE>CarpetScriptHost host = getHost(context);<NEW_LINE>BoundingBox area = BoundingBox.fromCorners... | host.handleErrorWithStack("Error while processing command", exc); |
1,144,557 | static <T> DelayedTask<Single<T>> createSingle(Supplier<? extends CompletionStage<T>> supplier) {<NEW_LINE>return new DelayedTask<>() {<NEW_LINE><NEW_LINE>// future we returned as a result of invoke command<NEW_LINE>private final LazyValue<CompletableFuture<T>> resultFuture = LazyValue.create(CompletableFuture::new);<N... | result = CompletableFuture.failedStage(e); |
1,825,858 | protected synchronized void processNodeData(NodeDataMessage msg) {<NEW_LINE>if (requestedNodes == null) {<NEW_LINE>logger.debug("Received NodeDataMessage when requestedNodes == null. Dropping peer " + channel);<NEW_LINE>dropConnection();<NEW_LINE>}<NEW_LINE>List<Pair<byte[], byte[]>> ret = new ArrayList<>();<NEW_LINE>i... | disconnect(channel, ReasonCode.TOO_MANY_PEERS); |
332,830 | static synchronized void loadInitialPlugins() {<NEW_LINE>lazyInitialization = true;<NEW_LINE>loadCorePlugin();<NEW_LINE>if (JavaWebStart.isRunningViaJavaWebstart()) {<NEW_LINE>installWebStartPlugins();<NEW_LINE>} else {<NEW_LINE>installStandardPlugins();<NEW_LINE>installUserInstalledPlugins();<NEW_LINE>}<NEW_LINE>Set<E... | url = JavaWebStart.resolveRelativeToJnlpCodebase(value); |
845,489 | protected String convertToPresentation(V modelValue) throws ConversionException {<NEW_LINE>// Vaadin TextField does not permit `null` value<NEW_LINE>if (formatter != null) {<NEW_LINE>return nullToEmpty(formatter.apply(modelValue));<NEW_LINE>}<NEW_LINE>if (datatype != null) {<NEW_LINE>return nullToEmpty(datatype.format(... | > propertyDataType = range.asDatatype(); |
1,235,540 | protected void match(List<?> expected, List<?> computed, int col) {<NEW_LINE>if (col >= columnBindings.length) {<NEW_LINE>check(expected, computed);<NEW_LINE>} else if (columnBindings[col] == null) {<NEW_LINE>match(expected, computed, col + 1);<NEW_LINE>} else {<NEW_LINE>Map<Object, Object> eMap = eSort(expected, col);... | ), cMap.keySet()); |
97,646 | protected void addTo(DatabaseObject foundObject, DatabaseSnapshot snapshot) throws DatabaseException, InvalidExampleException {<NEW_LINE>if (!snapshot.getSnapshotControl().shouldInclude(View.class)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (foundObject instanceof Schema) {<NEW_LINE>Schema schema = (Schema) foundObject... | Database database = snapshot.getDatabase(); |
931,604 | public final void notifyProcess(OriginClusterEvent<?> changeEvent, boolean ignoreTheGrandChild) throws Exception {<NEW_LINE>logger.info("event happen in {}, path: {},type: {},data: {}", this.getClass().getSimpleName(), changeEvent.getPath(), changeEvent.getChangeType(), changeEvent.getValue());<NEW_LINE>// ucore may re... | convertTo(pathMeta.getChildClass()); |
354,268 | private Structure buildRegInfoStructure(boolean elf64) {<NEW_LINE>String prefix = elf64 ? "Elf64" : "Elf32";<NEW_LINE>EnumDataType gprMask = new EnumDataType(prefix + "_GPRMask_MIPS", 4);<NEW_LINE>gprMask.add("gpr_zero", 1);<NEW_LINE>gprMask.add("gpr_at", 2);<NEW_LINE>gprMask.add("gpr_v0", 4);<NEW_LINE>gprMask.add("gpr... | gprMask.add("gpr_t4", 0x1000); |
1,513,364 | private JComponent createSearchField() {<NEW_LINE>_searchField = new JXSearchField("Find");<NEW_LINE>_searchField.setUseNativeSearchFieldIfPossible(true);<NEW_LINE>// _searchField.setLayoutStyle(JXSearchField.LayoutStyle.MAC);<NEW_LINE>_searchField.setMinimumSize(new Dimension(220, 30));<NEW_LINE>_searchField.setPrefer... | findNext(_searchField.getText()); |
393,311 | public void updateConfiguration(Configuration config) {<NEW_LINE>// re-map filesystem schemes to match Amazon Elastic MapReduce<NEW_LINE>config.set("fs.s3.impl", PrestoS3FileSystem.class.getName());<NEW_LINE>config.set("fs.s3a.impl", PrestoS3FileSystem.class.getName());<NEW_LINE>config.set("fs.s3n.impl", PrestoS3FileSy... | config.set(S3_SECRET_KEY, awsSecretKey); |
997,884 | public void serialize(final SiteView siteView, final JsonGenerator jsonGenerator, final SerializerProvider serializers) throws IOException {<NEW_LINE>final Map<String, Object> map = new HashMap<>();<NEW_LINE>map.put("id", siteView.id);<NEW_LINE>map.put("name", siteView.name);<NEW_LINE>map.<MASK><NEW_LINE>if (null != si... | put("configured", siteView.configured); |
1,291,304 | public List<List<String>> accountsMerge(List<List<String>> accounts) {<NEW_LINE>DSU dsu = new DSU();<NEW_LINE>Map<String, String> <MASK><NEW_LINE>Map<String, Integer> emailToId = new HashMap<>();<NEW_LINE>int id = 0;<NEW_LINE>for (List<String> account : accounts) {<NEW_LINE>String name = "";<NEW_LINE>for (String email ... | emailToName = new HashMap<>(); |
1,265,835 | private void writeSingleVersionAccessor(String versionAlias, @Nullable String context, String version, boolean asProvider) throws IOException {<NEW_LINE>writeLn("/**");<NEW_LINE>writeLn(" * Returns the version associated to this alias: " + versionAlias + " (" + version + ")");<NEW_LINE>writeLn(" * If the version is a r... | + toJavaName(leafNodeForAlias(versionAlias)); |
358,225 | private static LinkedHashMap<String, String[]> buildServiceErrorParameters(final ParamError[] paramErrorAnnotations, final Class<?> resourceClass, final Method method) {<NEW_LINE>// Create a mapping of service error codes to their parameters (if any)<NEW_LINE>final LinkedHashMap<String, String[]> paramsMapping = new Li... | String serviceErrorCode = paramErrorAnnotation.code(); |
234,251 | public void defineInterceptors() {<NEW_LINE>InputStream inputStream = getClass().getResourceAsStream("/prometheus/interceptors.yaml");<NEW_LINE>Interceptors interceptors = new Yaml().loadAs(inputStream, Interceptors.class);<NEW_LINE>for (Interceptor each : interceptors.getInterceptors()) {<NEW_LINE>if (null == each.get... | getInstanceAdvice()).build(); |
91,165 | private void buildFlattenedMap(final Map<String, Object> result, final Map<String, Object> source, final String path) {<NEW_LINE>source.forEach((key, value) -> {<NEW_LINE>if (StringUtils.isNotBlank(path)) {<NEW_LINE>if (key.startsWith("[")) {<NEW_LINE>key = path + key;<NEW_LINE>} else {<NEW_LINE>key = path + '.' + key;... | Map<String, Object>) value; |
444,463 | public GovernanceResult<List<FileChunksMetaEntity>> downLoadStatus(String groupId, Integer brokerId, String topic, String nodeAddress) throws GovernanceException {<NEW_LINE>List<FileChunksMetaStatus> fileChunksMetaStatusList = null;<NEW_LINE>List<FileChunksMetaEntity> chunksMetaEntities = new ArrayList<FileChunksMetaEn... | FileChunksMeta chunksMeta = fileChunksMetaStatus.getFile(); |
1,191,733 | final GetPushTemplateResult executeGetPushTemplate(GetPushTemplateRequest getPushTemplateRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getPushTemplateRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(F... | (super.beforeMarshalling(getPushTemplateRequest)); |
204,842 | private void attachJoinGoto(StringLiteralExpression psiElement, List<PsiElement> targets) {<NEW_LINE>MethodMatcher.MethodMatchParameter methodMatchParameter = MatcherUtil.matchJoin(psiElement);<NEW_LINE>if (methodMatchParameter == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>QueryBuilderMethodReferenceParser qb = Query... | psiElement.getContents(), "."); |
509,763 | public static void execute(ManagerService service, boolean isClear) {<NEW_LINE>ByteBuffer buffer = service.allocate();<NEW_LINE>// write header<NEW_LINE>buffer = HEADER.write(buffer, service, true);<NEW_LINE>// write fields<NEW_LINE>for (FieldPacket field : FIELDS) {<NEW_LINE>buffer = field.write(buffer, service, true)... | lastEof.write(buffer, service); |
1,853,538 | final AssociateEntityToThingResult executeAssociateEntityToThing(AssociateEntityToThingRequest associateEntityToThingRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(associateEntityToThingRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_... | false), new AssociateEntityToThingResultJsonUnmarshaller()); |
1,797,457 | public com.amazonaws.services.recyclebin.model.ValidationException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.recyclebin.model.ValidationException validationException = new com.amazonaws.services.<MASK><NEW_LINE>int originalDepth = context.getCurrentDepth()... | recyclebin.model.ValidationException(null); |
1,578,287 | public WorkflowExecutionTerminatedEventAttributes unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>WorkflowExecutionTerminatedEventAttributes workflowExecutionTerminatedEventAttributes = new WorkflowExecutionTerminatedEventAttributes();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_... | JsonToken token = context.getCurrentToken(); |
952,710 | public static ConnectionCostsWriter<ConnectionCosts> build(Path path) throws IOException {<NEW_LINE>try (Reader reader = Files.newBufferedReader(path, StandardCharsets.US_ASCII);<NEW_LINE>LineNumberReader lineReader = new LineNumberReader(reader)) {<NEW_LINE>String line = lineReader.readLine();<NEW_LINE>String[] dimens... | .parseInt(fields[0]); |
454,580 | public static boolean fastApply(Context ctx, RootCommand callback) {<NEW_LINE>try {<NEW_LINE>if (!rulesUpToDate) {<NEW_LINE>Log.i(TAG, "Using full Apply");<NEW_LINE>applySavedIptablesRules(ctx, true, callback);<NEW_LINE>} else {<NEW_LINE>Log.i(TAG, "Using fastApply");<NEW_LINE>List<String> out <MASK><NEW_LINE>List<Stri... | = new ArrayList<String>(); |
430,504 | static Matrix load(DataInputStream dis) throws IOException {<NEW_LINE>int m_ = dis.readInt();<NEW_LINE>int n_ = dis.readInt();<NEW_LINE>float[][] data = new float[m_][n_];<NEW_LINE>int blockSize = n_ * 4;<NEW_LINE>int block = 100_000 * blockSize;<NEW_LINE>long totalByte = (long) m_ * blockSize;<NEW_LINE>if (block > tot... | + start], 0, n_); |
28,699 | protected void readClasses(TargetsTableClassesImpl classTable) throws IOException {<NEW_LINE>int numClasses = bufInput.readLargeInt();<NEW_LINE>List<String> i_interfaceNames = new ArrayList<>();<NEW_LINE>for (int classNo = 0; classNo < numClasses; classNo++) {<NEW_LINE>String className = requireCompact(CLASS_BYTE);<NEW... | i_className, i_superClassName, i_interfaceNames, modifiers); |
890,119 | private void showTrackingListDialog() {<NEW_LINE>List<String> trackingTypes = new ArrayList<>();<NEW_LINE>trackingTypes.add(getString(R.string.none));<NEW_LINE>trackingTypes.add(getString(R.string.none_compass));<NEW_LINE>trackingTypes.add(getString(R.string.none_gps));<NEW_LINE>trackingTypes.add(getString(R.string.tra... | R.layout.simple_list_item_1, trackingTypes); |
291,164 | public ListVirtualRoutersResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListVirtualRoutersResult listVirtualRoutersResult = new ListVirtualRoutersResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonT... | String currentParentElement = context.getCurrentParentElement(); |
823,747 | private static AceRelationMention parseRelationMention(Node node, AceDocument doc) {<NEW_LINE>String id = getAttributeValue(node, "ID");<NEW_LINE>AceCharSeq extent = parseCharSeq<MASK><NEW_LINE>String lc = getAttributeValue(node, "LEXICALCONDITION");<NEW_LINE>// create the mention<NEW_LINE>AceRelationMention mention = ... | (getChildByName(node, "extent")); |
13,097 | final GetPatchBaselineResult executeGetPatchBaseline(GetPatchBaselineRequest getPatchBaselineRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getPatchBaselineRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | (super.beforeMarshalling(getPatchBaselineRequest)); |
378,073 | private void loadPaymentRuleInfo() {<NEW_LINE>if (fPaymentRule.getSelectedItem() == null)<NEW_LINE>return;<NEW_LINE>ValueNamePair pp = fPaymentRule.getSelectedItem().toValueNamePair();<NEW_LINE>if (pp == null)<NEW_LINE>return;<NEW_LINE>String PaymentRule = pp.getValue();<NEW_LINE>log.info("PaymentRule=" + PaymentRule);... | (hrps.get_ValueAsInt("CheckNo")); |
284,038 | public INDArray output(MultiDataSet testSet, boolean print) {<NEW_LINE>INDArray correctOutput = testSet.getLabels()[0];<NEW_LINE>INDArray ret;<NEW_LINE>decoderInputTemplate = testSet.getFeatures()[1].dup();<NEW_LINE>int currentStepThrough = 0;<NEW_LINE>int stepThroughs = (int) correctOutput.size(2) - 1;<NEW_LINE>while ... | )[0], decoderInputTemplate)); |
1,804,121 | protected void readCore() throws IOException {<NEW_LINE>// Note that this structure is core_dumpx defined in<NEW_LINE>// "/usr/include/sys/core.h"<NEW_LINE>seek(0);<NEW_LINE>// Ignore signalNumber<NEW_LINE>readByte();<NEW_LINE>// CORE_TRUNC == 0x80<NEW_LINE>byte flags = readByte();<NEW_LINE>if ((flags & 0x80) != 0) {<N... | = stackVirtualAddress + stackSize - sizeofTopOfStack(); |
91,513 | public static <K extends Kernel2D> SteerableKernel<K> gaussian(Class<K> kernelType, int orderX, int orderY, double sigma, int radius) {<NEW_LINE>if (orderX < 0 || orderX > 4)<NEW_LINE>throw new IllegalArgumentException("derivX must be from 0 to 4 inclusive.");<NEW_LINE>if (orderY < 0 || orderY > 4)<NEW_LINE>throw new I... | kernel1DType, orderY, sigma, radius); |
1,674,254 | private void logCounters(Map<MetricName, Counter> counters, StringBuilder sb) {<NEW_LINE>if (!counters.isEmpty()) {<NEW_LINE>printWithBanner("-- Counters", '-', sb);<NEW_LINE>int maxLength = getMaxLengthOfKeys(counters);<NEW_LINE>sb.append(String.format("%-" <MASK><NEW_LINE>Map<MetricName, Counter> sortedCounters = sor... | + maxLength + "s | count\n", "name")); |
706,975 | public LibraryFile resolveLibrary(Emulator<?> emulator, String soName) {<NEW_LINE>if (!soName.contains("@")) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>String path = soName.replace("@executable_path", file.<MASK><NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug("Try resolve library soName=" + soName + ", path="... | getParentFile().getPath()); |
349,450 | protected void appendXsbCommonSlot(XStringBuilder xsb, SofaTracerSpan span) {<NEW_LINE>SofaTracerSpanContext context = span.getSofaTracerSpanContext();<NEW_LINE>Map<String, String> tagWithStr = span.getTagsWithStr();<NEW_LINE>// span end time<NEW_LINE>xsb.append(Timestamp.format<MASK><NEW_LINE>// appName<NEW_LINE>xsb.a... | (span.getEndTime())); |
737,796 | public List<MetricsValues> readLabeledMetricsValues(final MetricsCondition condition, final String valueColumnName, final List<String> labels, final Duration duration) {<NEW_LINE>final List<PointOfTime> pointOfTimes = duration.assembleDurationPoints();<NEW_LINE>String tableName = IndexController.LogicIndicesRegister.ge... | getOrDefault(valueColumnName, ""))); |
1,217,255 | public static QueryTradeProduceListResponse unmarshall(QueryTradeProduceListResponse queryTradeProduceListResponse, UnmarshallerContext _ctx) {<NEW_LINE>queryTradeProduceListResponse.setRequestId(_ctx.stringValue("QueryTradeProduceListResponse.RequestId"));<NEW_LINE>queryTradeProduceListResponse.setTotalItemNum(_ctx.in... | ("QueryTradeProduceListResponse.Data[" + i + "].PreOrderId")); |
909,105 | private // SQLDCXGRP; PROTOCOL TYPE N-GDA; ENVLID 0xD3; Length Override 1<NEW_LINE>NetSqlca parseSQLDCGRP() {<NEW_LINE>// SQLCODE<NEW_LINE>int sqldcCode = readFdocaInt();<NEW_LINE>String sqldcState = // SQLSTATE<NEW_LINE>readFdocaString(// SQLSTATE<NEW_LINE>5, Typdef.targetTypdef.getCcsidSbcEncoding());<NEW_LINE>// REA... | setSqlerrmcBytes(sqldcMsg.getBytes()); |
1,366,832 | protected List<String> gatherCompletedFlows(List<String> completedActivityInstances, List<String> currentActivityinstances, BpmnModel pojoModel) {<NEW_LINE>List<String> completedFlows = new ArrayList<>();<NEW_LINE>List<String> activities <MASK><NEW_LINE>if (currentActivityinstances != null) {<NEW_LINE>activities.addAll... | = new ArrayList<>(completedActivityInstances); |
1,311,428 | public String readArrayString(VmArrayInstance instance, int index, int length) {<NEW_LINE>if (!instance.elementType().isPrimitive() || !"C".equals(instance.elementType().signature())) {<NEW_LINE>throw new DebuggerException("Wrong array element type while trying to get string from array: " + instance.elementType().signa... | primType.size() * index); |
664,015 | public static boolean dispatch(Object target, String subject, String senderAddress, Object args) {<NEW_LINE>assert (subject != null);<NEW_LINE>assert (target != null);<NEW_LINE>Method handler = resolveHandler(target.getClass(), subject);<NEW_LINE>if (handler == null)<NEW_LINE>return false;<NEW_LINE>try {<NEW_LINE>handl... | handler.getName(), e); |
809,238 | public void executeUpgrade() throws DotDataException {<NEW_LINE>try {<NEW_LINE>Connection conn = DbConnectionFactory.getDataSource().getConnection();<NEW_LINE>conn.setAutoCommit(true);<NEW_LINE>// Drop PK<NEW_LINE>getPrimaryKey(conn, ImmutableList.of(tableName), true);<NEW_LINE>// Drop Indexes<NEW_LINE>this.getIndexes(... | .of(tableName), true); |
244,811 | static void run(final Class<? extends BaseMain> cls, final String... args) throws Throwable {<NEW_LINE>String jvmArgs = ManagementFactory.getRuntimeMXBean().getInputArguments().stream().filter(s -> s.startsWith("-X")).collect(Collectors.joining(" "));<NEW_LINE>Log log = FormattedLog.withLogLevel(Level.DEBUG).withZoneId... | System.out.println("Press [Enter] to start"); |
1,670,344 | // CHECKSTYLE:OFF<NEW_LINE>private List<MavenArtifact> parseDependenciesNode(Node dependenciesNode) {<NEW_LINE>// CHECKSTYLE:ON<NEW_LINE>final List<MavenArtifact> deps = new ArrayList<>();<NEW_LINE>final NodeList dependencyNodes = dependenciesNode.getChildNodes();<NEW_LINE>for (int j = 0; j < dependencyNodes.getLength(... | childDependencyNode = childDependencyNodes.item(k); |
1,096,271 | public List<JoinTransactionBo> decodeValues(Buffer valueBuffer, ApplicationStatDecodingContext decodingContext) {<NEW_LINE>final String id = decodingContext.getApplicationId();<NEW_LINE>final long baseTimestamp = decodingContext.getBaseTimestamp();<NEW_LINE>final long timestampDelta = decodingContext.getTimestampDelta(... | decodeValues(valueBuffer, collectIntervalEncodingStrategy, numValues); |
384,786 | private void confirmCreateWidget() {<NEW_LINE>int backgroundColor = getColorWithAlpha(PlayerWidget.DEFAULT_COLOR, opacitySeekBar.getProgress());<NEW_LINE>SharedPreferences prefs = getSharedPreferences(PlayerWidget.PREFS_NAME, MODE_PRIVATE);<NEW_LINE>SharedPreferences.Editor editor = prefs.edit();<NEW_LINE>editor.putInt... | appWidgetId, ckSkip.isChecked()); |
1,740,377 | private void createDifferences() throws Exception {<NEW_LINE><MASK><NEW_LINE>ProjectData projectData = project.getProjectData();<NEW_LINE>DomainFile file = projectData.getRootFolder().getFile("WinHelloCpp.exe");<NEW_LINE>Program p = (Program) file.getDomainObject(this, false, false, dummyMonitor);<NEW_LINE>int id = p.s... | Project project = env.getProject(); |
143,540 | protected void scheduleInternal(final Iterator<T> it, final String cron, final ScheduledExecutorService ex) {<NEW_LINE>final Date now = new Date();<NEW_LINE>final Date d = ExceptionSoftener.softenSupplier(() -> new CronExpression(cron)).get().getNextValidTimeAfter(now);<NEW_LINE>final long delay = d.getTime() - now.get... | scheduleInternal(it, cron, ex); |
630,077 | public void broadcast() {<NEW_LINE>if (pending.compareAndSet(false, true)) {<NEW_LINE>try {<NEW_LINE>Set<String> oldMetricsNames = metricNames.getAndSet(<MASK><NEW_LINE>if (oldMetricsNames.size() > 0) {<NEW_LINE>LOG.debug("register metrics to nimbus from TM, size:{}", oldMetricsNames.size());<NEW_LINE>Map<String, Long>... | new HashSet<String>()); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.