idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,109,469 | public Collection<Object> convert(MappingContext<Object, Collection<Object>> context) {<NEW_LINE><MASK><NEW_LINE>if (source == null)<NEW_LINE>return null;<NEW_LINE>Collection<Object> originalDestination = context.getDestination();<NEW_LINE>Collection<Object> destination = MappingContextHelper.createCollection(context);... | Object source = context.getSource(); |
446,195 | protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) {<NEW_LINE>setFocusBorderAroundIcon(false);<NEW_LINE>final String name = myPanel.getPresentation().getPresentableText(value);<NEW_LINE>ColorValue color = TargetAWT.from(list.getForeground());<NEW_LINE>boolean i... | final PsiElement psiElement = (PsiElement) value; |
399,371 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_main);<NEW_LINE>// get our folding cell<NEW_LINE>final FoldingCell fc = (FoldingCell) findViewById(R.id.folding_cell);<NEW_LINE>// attach click listener to fold btn<NEW_LINE>final ... | findViewById(R.id.toggle_btn); |
945,267 | protected void visitInject(AnnotationMirror annotation, Element element, boolean isMethod) {<NEW_LINE>List<Object> injectList = jsonUtils.getOrCreateList(proxyProperties, isMethod ? "injectMethods" : "injectFields");<NEW_LINE>HashMap<String, Object> attrs = utils.getAnnotationParams(annotation);<NEW_LINE>String type = ... | defaultType = utils.getType(firstParam); |
1,419,695 | public static void resetModuleRoots(@NotNull final Module module) {<NEW_LINE>// noinspection ConstantConditions<NEW_LINE>ApplicationManager.getApplication().runWriteAction(() -> {<NEW_LINE>final ModifiableRootModel modifiableModel = Objects.requireNonNull(ModuleRootManager.getInstance(module)).getModifiableModel();<NEW... | newContentEntry.getUrl(), false); |
921,415 | private static InsnNode convertStringBuilderChain(MethodNode mth, InvokeNode toStrInsn, List<InsnNode> chain) {<NEW_LINE>try {<NEW_LINE>int chainSize = chain.size();<NEW_LINE>if (chainSize < 2) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>List<InsnArg> args = new ArrayList<>(chainSize);<NEW_LINE>InsnNode firstInsn = cha... | mth.addDebugComment("TODO: convert one arg to string using `String.valueOf()`, args: " + args); |
1,344,824 | public DescribeAcceleratorOfferingsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DescribeAcceleratorOfferingsResult describeAcceleratorOfferingsResult = new DescribeAcceleratorOfferingsResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement... | )).unmarshall(context)); |
1,240,540 | private void requestBookmarks(final boolean cleanCache) {<NEW_LINE>progressBar.setVisibility(View.VISIBLE);<NEW_LINE>tvNotSupport.setVisibility(View.GONE);<NEW_LINE>Application.getInstance().runInBackgroundUserRequest(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>boolean support = ... | BookmarkVO> bookmarks = getBookmarks(cleanCache); |
763,170 | public void drawBackground(float partialTicks) {<NEW_LINE>double startX = getX();<NEW_LINE>double startY = getY();<NEW_LINE>final SpriteNineSliced split;<NEW_LINE>interpWidth = interp(lastWidth, currentWidth, partialTicks);<NEW_LINE>interpHeight = interp(lastHeight, currentHeight, partialTicks);<NEW_LINE>if (expandPosi... | startX, startY, interpWidth, interpHeight); |
1,682,071 | public void marshall(ApiGatewayProxySummary apiGatewayProxySummary, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (apiGatewayProxySummary == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(apiGatewayProxySum... | apiGatewayProxySummary.getNlbName(), NLBNAME_BINDING); |
121,547 | byte[] nativeDecompress(ZLibCompObject.NativeZlibCompObject self, PythonContext context, byte[] bytes, int len, int maxLength, @Cached NativeLibrary.InvokeNativeFunction decompressObj, @Cached GetNativeBufferNode getBuffer, @Cached ZlibNativeErrorHandling errorHandling, @Cached ConditionProfile errProfile) {<NEW_LINE>N... | self.getZst(), context); |
1,288,275 | private static boolean isCustomIndexMatch(Map.Entry<IndexMultiKey, EventTableIndexMetadataEntry> index, Map.Entry<QueryGraphValueEntryCustomKeyForge, QueryGraphValueEntryCustomOperationForge> op) {<NEW_LINE>if (index.getValue().getExplicitIndexNameIfExplicit() == null || index.getValue().getOptionalQueryPlanIndexItem()... | Arrays.equals(indexProperties, opProperties); |
1,115,579 | public void onReset() {<NEW_LINE>super.onReset();<NEW_LINE>if (mPluginLayout == null || mPluginLayout.pluginOverlays == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>cordova.getActivity().runOnUiThread(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>mPluginLayout.setBackgroundColor(Co... | pluginOverlay.remove(null, null); |
1,675,587 | static void collectChromaPredictors(DecoderState sharedState, Picture outMB, int mbX) {<NEW_LINE>sharedState.topLeft[1][0] = sharedState.topLine[1][(mbX << 3) + 7];<NEW_LINE>sharedState.topLeft[2][0] = sharedState.topLine[2][(mbX << 3) + 7];<NEW_LINE>arraycopy(outMB.getPlaneData(1), 56, sharedState.topLine[1], mbX << 3... | ], mbX << 3, 8); |
523,580 | public void decode16x8(MBlock mBlock, Picture mb, Frame[][] refs, PartPred p0, PartPred p1) {<NEW_LINE>int mbX = mapper.getMbX(mBlock.mbIdx);<NEW_LINE>int mbY = mapper.getMbY(mBlock.mbIdx);<NEW_LINE>boolean leftAvailable = mapper.leftAvailable(mBlock.mbIdx);<NEW_LINE>boolean topAvailable = <MASK><NEW_LINE>boolean topLe... | mapper.topAvailable(mBlock.mbIdx); |
1,212,552 | public EventBean[] snapshotUpdate(QueryGraph filterQueryGraph, ExprEvaluator optionalWhereClause, EventBeanUpdateHelperWCopy updateHelper, Annotation[] annotations) {<NEW_LINE>agentInstanceContext.getEpStatementAgentInstanceHandle().getStatementAgentInstanceLock().acquireReadLock();<NEW_LINE>try {<NEW_LINE>Collection<E... | EventBean[events.size()]; |
1,661,986 | private ByteBuf constructPacket(Class<? extends Protocol> packetProtocol, boolean skipCurrentPipeline, Direction direction) throws Exception {<NEW_LINE>// Apply current pipeline - for outgoing protocol, the collection will be reversed in the apply method<NEW_LINE>Protocol[] protocols = user().getProtocolInfo().getPipel... | ? index - 1 : index + 1; |
233,619 | private Accessor _initializeAccessor() throws Exception {<NEW_LINE>if (deferFinish) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Class cls = loadClass(className, cw.toByteArray());<NEW_LINE>assert debug("[MVEL JIT Completed Optimization <<" + (expr != null ? new String(expr) : "") + ">>]::" + cls + " (time: " + (System.... | : new String(expr))); |
181,891 | boolean applyMembershipChange(RaftEndpoint leaving, RaftEndpoint joining, long expectedMembersCommitIndex, long newMembersCommitIndex) {<NEW_LINE>checkState(status == ACTIVE, "Cannot apply membership change of Leave: " + leaving + " and Join: " + joining + " since status is: " + status);<NEW_LINE>if (membersCommitIndex... | removed = m.remove(leaving); |
459,957 | FloatBuffer compact(final CompactorReturn cReturn) {<NEW_LINE>if (reqDebug != null) {<NEW_LINE>reqDebug.emitCompactingStart(lgWeight);<NEW_LINE>}<NEW_LINE>final int startRetItems = buf.getCount();<NEW_LINE>final int startNomCap = getNomCapacity();<NEW_LINE>// choose a part of the buffer to compact<NEW_LINE>final int se... | (state) + 1, numSections); |
29,687 | private DefaultTableModel createLogEntriesTableModel(final RecordChangeLog changeLog) {<NEW_LINE>// Check if we are allowed to view the record's change log<NEW_LINE>final UserPreferenceLevelConstraint preferenceLevel = Env.getUserRolePermissions().getPreferenceLevel();<NEW_LINE>if (!preferenceLevel.canViewRecordChangeL... | .getCtx(), "NewValue")); |
1,073,194 | @Produces({ "application/json" })<NEW_LINE>public Response filterAuthenticatedUsers(@QueryParam("searchTerm") String searchTerm, @QueryParam("selectedPage") Integer selectedPage, @QueryParam("itemsPerPage") Integer itemsPerPage, @QueryParam("sortKey") String sortKey) {<NEW_LINE>User authUser;<NEW_LINE>try {<NEW_LINE>au... | ok(userListResult.toJSON()); |
944,734 | public void updateCostCollectorFromOrder(final I_PP_Cost_Collector cc, final I_PP_Order from) {<NEW_LINE>cc.setPP_Order_ID(from.getPP_Order_ID());<NEW_LINE>cc.setAD_Org_ID(from.getAD_Org_ID());<NEW_LINE>cc.setM_Warehouse_ID(from.getM_Warehouse_ID());<NEW_LINE>cc.setAD_OrgTrx_ID(from.getAD_OrgTrx_ID());<NEW_LINE>cc.<MAS... | setC_Activity_ID(from.getC_Activity_ID()); |
1,683,267 | protected Header.Entry entry(String sourceDescription, int index, String name, String typeSpec, Group group, Extractors extractors, Extractor<?> idExtractor, Monitor monitor) {<NEW_LINE>// For nodes it's simply ID,LABEL,PROPERTY. typeSpec can be either ID,LABEL or a type of property,<NEW_LINE>// like 'int' or 'string_a... | String> split = splitTypeSpecAndOptionalParameter(typeSpec); |
885,864 | public static ORidBag readRidbag(BytesContainer bytes) {<NEW_LINE>byte configByte = OByteSerializer.INSTANCE.deserialize(bytes.bytes, bytes.offset++);<NEW_LINE>boolean isEmbedded = (configByte & 1) != 0;<NEW_LINE>UUID uuid = null;<NEW_LINE>// removed deserializing UUID<NEW_LINE>ORidBag ridbag = null;<NEW_LINE>if (isEmb... | new OBonsaiBucketPointer(pageIndex, pageOffset)); |
1,254,478 | public static DescribeProjectNodesResponse unmarshall(DescribeProjectNodesResponse describeProjectNodesResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeProjectNodesResponse.setRequestId(_ctx.stringValue("DescribeProjectNodesResponse.RequestId"));<NEW_LINE>describeProjectNodesResponse.setSuccess(_ctx.booleanValue(... | ("DescribeProjectNodesResponse.Result[" + i + "].TemplateForm")); |
1,365,661 | public Map<Integer, ParameterContext> buildParams() {<NEW_LINE>Map<Integer, ParameterContext> params <MASK><NEW_LINE>int index = 0;<NEW_LINE>MetaDbUtil.setParameter(++index, params, ParameterMethod.setLong, this.planId);<NEW_LINE>MetaDbUtil.setParameter(++index, params, ParameterMethod.setString, this.tableSchema);<NEW... | = new HashMap<>(16); |
389,794 | public static void testRemove(final HugeGraph graph) {<NEW_LINE>// remove vertex (and its edges)<NEW_LINE>List<Vertex> vertices = graph.traversal().V().hasLabel("person").has("age", 19).toList();<NEW_LINE>assert vertices.size() == 1;<NEW_LINE>Vertex james = vertices.get(0);<NEW_LINE>Vertex book6 = graph.addVertex(T.lab... | id(), "", book2Id); |
436,086 | private NumberFormat createCurrencyNumberFormat(final I_C_Invoice_Candidate ic) {<NEW_LINE>final IBPartnerDAO bpartnerDAO = Services.get(IBPartnerDAO.class);<NEW_LINE>final ICurrencyDAO currencyDAO = Services.get(ICurrencyDAO.class);<NEW_LINE>final I_C_BPartner_Location billBPLocation = bpartnerDAO.getBPartnerLocationB... | .getC_Country().getAD_Language(); |
671,933 | public static ListProduceOrdersResponse unmarshall(ListProduceOrdersResponse listProduceOrdersResponse, UnmarshallerContext _ctx) {<NEW_LINE>listProduceOrdersResponse.setRequestId(_ctx.stringValue("ListProduceOrdersResponse.RequestId"));<NEW_LINE>listProduceOrdersResponse.setPageSize(_ctx.integerValue("ListProduceOrder... | ("ListProduceOrdersResponse.Orders[" + i + "].ApplyCaseQuantity")); |
1,176,169 | static Map<String, List<float[]>> readGloVe(File input) throws IOException {<NEW_LINE>Map<String, List<float[]>> vectors = new HashMap<>();<NEW_LINE>for (String line : IOUtils.readLines(new FileReader(input))) {<NEW_LINE>String[] s = line.split("\\s+");<NEW_LINE>if (s.length > 2) {<NEW_LINE>String key = s[0];<NEW_LINE>... | ] = vector[i] / norm; |
779,275 | public BytecodeNode visitConstant(ConstantExpression constant, Context context) {<NEW_LINE>Object value = constant.getValue();<NEW_LINE>Class<?> javaType = constant.getType().getJavaType();<NEW_LINE>BytecodeBlock block = new BytecodeBlock();<NEW_LINE>if (value == null) {<NEW_LINE>return block.comment("constant null").a... | getType().getJavaType()); |
1,231,090 | public final List<AnalyzedTokenReadings> tag(final List<String> sentenceTokens) {<NEW_LINE>List<AnalyzedToken> taggerTokens;<NEW_LINE>List<AnalyzedToken> lowerTaggerTokens;<NEW_LINE>List<AnalyzedToken> upperTaggerTokens;<NEW_LINE>final List<AnalyzedTokenReadings> tokenReadings = new ArrayList<>();<NEW_LINE>int pos = 0;... | (word, null, null)); |
1,810,142 | ActionResult<Wo> execute(EffectivePerson effectivePerson, String flag, JsonElement jsonElement) throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>Business business = new Business(emc);<NEW_... | getApplication(), Application.class); |
1,360,618 | private static byte[] fetchChunk(final FilerClient filerClient, FilerProto.FileChunk chunk) throws IOException {<NEW_LINE>String vid = "" + chunk.getFid().getVolumeId();<NEW_LINE>FilerProto.Locations locations = filerClient.vidLocations.get(vid);<NEW_LINE>if (locations == null) {<NEW_LINE>FilerProto.LookupVolumeRequest... | vidLocations.put(vid, locations); |
759,672 | public void decodeSelectionRowKeys(FacesContext context, DataTable table) {<NEW_LINE>Set<String> rowKeys = null;<NEW_LINE>ValueExpression selectionVE = table.getValueExpression(DataTableBase.PropertyKeys.selection.name());<NEW_LINE>if (selectionVE != null) {<NEW_LINE>Object selection = selectionVE.getValue(context.getE... | o = selectionTmp.get(i); |
88,309 | private ConditionalTaskExecutor makeDebugLoggerExecutor(final PwmLogger pwmLogger, final int processId, final SessionLabel sessionLabel, final Instant startTime, final WordlistZipReader wordlistZipReader) {<NEW_LINE>final Runnable logOutputter = new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {... | AbstractWordlist.DEBUG_OUTPUT_FREQUENCY.asDuration()); |
1,761,476 | private static ICursor search(FileObject fo, Expression exp, Sequence values, String[] selFields, String s, String opt, Context ctx) {<NEW_LINE>boolean isCsv = false;<NEW_LINE>boolean isMultiId = false;<NEW_LINE>boolean isExist = true;<NEW_LINE>if (opt != null) {<NEW_LINE>if (opt.indexOf('b') != -1) {<NEW_LINE>BFileRea... | getFieldValue(index[f])); |
1,821,227 | protected void encodeStage(BsonWriter writer, GraphLookup value, EncoderContext encoderContext) {<NEW_LINE>document(writer, () -> {<NEW_LINE>if (value.getFrom() != null) {<NEW_LINE>value(writer, "from", value.getFrom());<NEW_LINE>} else {<NEW_LINE>writer.writeString("from", getDatastore().getMapper().getEntityModel(val... | "as", value.getAs()); |
461,275 | protected void populateResults(final LocalDate startDate, final LocalDate endDate, final DateTime catalogEffectiveDate, final BigDecimal billedUsage, final BigDecimal toBeBilledUsage, final UsageInArrearAggregate toBeBilledUsageDetails, final boolean areAllBilledItemsWithDetails, final boolean isPeriodPreviouslyBilled,... | areAllBilledItemsWithDetails ? toJson(toBeBilledUsageDetails) : null; |
154,104 | // Tests behavior when shutdownNow occurs while invokeAll is submitting and running tasks. Supply a group of 3 tasks to invokeAll.<NEW_LINE>// The first task should complete successfully. The second task waits for the third to start and then shuts down the executor.<NEW_LINE>// Relying on behavior of policy executor th... | futures = executor.invokeAll(tasks); |
944,830 | public static AnyValue[] build(RoutingResult result) {<NEW_LINE>ListValue routers = asValues(result.routeEndpoints());<NEW_LINE>ListValue readers = asValues(result.readEndpoints());<NEW_LINE>ListValue writers = asValues(result.writeEndpoints());<NEW_LINE>ListValueBuilder servers = ListValueBuilder.newListBuilder();<NEW... | add(builder.build()); |
1,632,396 | public static Collection<EventPayloadInstance> createEventPayloadInstances(VariableScope variableScope, ExpressionManager expressionManager, BaseElement baseElement, EventModel eventDefinition) {<NEW_LINE>List<EventPayloadInstance> <MASK><NEW_LINE>List<ExtensionElement> inParameters = baseElement.getExtensionElements()... | eventPayloadInstances = new ArrayList<>(); |
1,244,466 | public Description matchMethodInvocation(MethodInvocationTree invocationTree, VisitorState state) {<NEW_LINE>if (!ARRAY_FILL_MATCHER.matches(invocationTree, state)) {<NEW_LINE>return Description.NO_MATCH;<NEW_LINE>}<NEW_LINE>Type arrayComponentType = state.getTypes().elemtype(ASTHelpers.getType(invocationTree.getArgume... | reportMismatch(invocationTree, arrayComponentType, trueExpressionType); |
763,462 | private void updateStateOfReplicas(Iterable<DataNodeConfig> dataNodeConfigs) {<NEW_LINE>for (DataNodeConfig dataNodeConfig : dataNodeConfigs) {<NEW_LINE>String instanceName = dataNodeConfig.getInstanceName();<NEW_LINE>long instanceXid = dataNodeConfig.getXid();<NEW_LINE>AmbryDataNode node = instanceNameToAmbryDataNode.... | trace("Ignoring instanceConfig change for partition {} on instance {} because partition override is enabled", partitionId, instanceName); |
454,709 | public static boolean hasSubquery(RelNode rootRel) {<NEW_LINE>class SubqueryFinder extends RelVisitor {<NEW_LINE><NEW_LINE>private List<RexDynamicParam<MASK><NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void visit(RelNode node, int ordinal, RelNode parent) {<NEW_LINE>if (node == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_... | > scalar = Lists.newArrayList(); |
178,189 | public boolean validateReferer(HttpServletRequest request) {<NEW_LINE>final String uri = request.getRequestURI() == null ? "/" : request.getRequestURI().toLowerCase();<NEW_LINE>final String url <MASK><NEW_LINE>final String urlHost = hostFromUrl(url);<NEW_LINE>final String incomingReferer = (request.getHeader("Origin") ... | = request.getServerName() + uri; |
1,763,556 | public String executeFormLogin(HttpClient httpclient, String url, String username, String password, String description) throws Exception {<NEW_LINE>String methodName = "executeFormLogin";<NEW_LINE>Log.info(logClass, methodName, "Submitting Login form (POST) = " + url + " username =" + username + " password=" + passwor... | new BasicNameValuePair("j_description", description)); |
1,303,667 | public RestHighLevelClient initRestClient() {<NEW_LINE>// support es cluster with multi hosts<NEW_LINE>List<HttpHost> hosts = new ArrayList<>();<NEW_LINE>String[] hostArrays = host.split(",");<NEW_LINE>for (String host : hostArrays) {<NEW_LINE>if (StringUtils.isNotEmpty(host)) {<NEW_LINE>hosts.add(new HttpHost(host.tri... | socketTimeout).setConnectionRequestTimeout(connectionRequestTimeout)); |
683,147 | public static void main(String[] args) throws InterruptedException {<NEW_LINE>final Dimension size = WebcamResolution.VGA.getSize();<NEW_LINE>final Webcam webcam = Webcam.getDefault();<NEW_LINE>webcam.setViewSize(size);<NEW_LINE>webcam.open();<NEW_LINE>final ImageSupplier supplier = new ImageSupplier() {<NEW_LINE><NEW_... | colorModel, raster, false, null); |
1,053,615 | public void visitMethodInsn(int opcode, String owner, String name, String desc, boolean itf) {<NEW_LINE>processPendingExceptionHandlerEntry(-1);<NEW_LINE>super.visitMethodInsn(opcode, owner, name, desc, itf);<NEW_LINE>if (waitingForSuper) {<NEW_LINE>// Process the args<NEW_LINE>for (Type arg : Type.getArgumentTypes(des... | pop(arg.getSize()); |
1,161,460 | protected static Entry provider(Bundle bundle, Provider provider) {<NEW_LINE>ca.uhn.fhir.model.dstu2.resource.Organization organizationResource = new ca.uhn.fhir.model.dstu2.resource.Organization();<NEW_LINE>CodeableConceptDt organizationType = mapCodeToCodeableConcept(new Code("http://hl7.org/fhir/ValueSet/organizatio... | String) provider.getResourceID()); |
652,187 | public Stream<MapResult> mapParallel2(@Name("fragment") String fragment, @Name("params") Map<String, Object> params, @Name("list") List<Object> data, @Name("partitions") long partitions, @Name(value = "timeout", defaultValue = "10") long timeout) {<NEW_LINE>final String statement = withParamsAndIterator(fragment, param... | Transaction transaction = db.beginTx(); |
324,590 | protected void addReaderForType(AdditionalReaders additionalReaders, Type paramType) {<NEW_LINE>DotName dotName = paramType.name();<NEW_LINE>if (dotName.equals(JSONP_JSON_NUMBER) || dotName.equals(JSONP_JSON_VALUE) || dotName.equals(JSONP_JSON_STRING)) {<NEW_LINE>additionalReaders.add(ServerJsonValueHandler.class, APPL... | class, APPLICATION_FORM_URLENCODED, MultivaluedMap.class); |
408,245 | private void initDefaultRoutes(Router router) {<NEW_LINE>router.add(GET, "/", RootTask.class);<NEW_LINE>router.add(GET, "", RootRedirectTask.class);<NEW_LINE>router.add(POST, "/reset", ResetTask.class);<NEW_LINE>router.add(GET, "/mappings", GetAllStubMappingsTask.class);<NEW_LINE>router.add(POST, "/mappings", CreateStu... | GET, "/scenarios", GetAllScenariosTask.class); |
466,547 | void handleStreamClosed(Status status) {<NEW_LINE>if (Objects.equal(status.getCode(), Code.UNIMPLEMENTED)) {<NEW_LINE>disabled = true;<NEW_LINE>logger.log(Level.SEVERE, "Backend {0} OpenRcaService is disabled. Server returned: {1}", new Object[] { subchannel<MASK><NEW_LINE>subchannelLogger.log(ChannelLogLevel.ERROR, "O... | .getAllAddresses(), status }); |
1,824,480 | public void purge(SiteMap map, SiteNode node) {<NEW_LINE>SiteNode child = null;<NEW_LINE>synchronized (map) {<NEW_LINE>while (node.getChildCount() > 0) {<NEW_LINE>try {<NEW_LINE>child = (SiteNode) node.getChildAt(0);<NEW_LINE>purge(map, child);<NEW_LINE>} catch (Exception e) {<NEW_LINE>logger.error(e.getMessage(), e);<... | removeFromHistoryList(node.getHistoryReference()); |
657,476 | private Component initMoreFields() {<NEW_LINE>JPanel morePanel = new TransparentPanel(new BorderLayout());<NEW_LINE>morePanel.setOpaque(false);<NEW_LINE>morePanel.setBorder(BorderFactory.createEmptyBorder(0, 15, 5, 15));<NEW_LINE>moreFieldsPannel.setBorder(BorderFactory.createEmptyBorder(10, 30, 0, 0));<NEW_LINE>moreFi... | add(cmdExpandMoreFields, BorderLayout.NORTH); |
1,495,381 | public Dialog onCreateDialog(Bundle savedInstanceState) {<NEW_LINE>Activity activity = requireActivity();<NEW_LINE>ContextThemeWrapper theme = ThemeChanger.getDialogThemeWrapper(activity);<NEW_LINE><MASK><NEW_LINE>LayoutInflater layoutInflater = LayoutInflater.from(theme);<NEW_LINE>@SuppressLint("InflateParams")<NEW_LI... | CustomAlertDialogBuilder alert = new CustomAlertDialogBuilder(theme); |
1,381,391 | public static DebugSymbol selectSymbol(BinaryReader reader, int ptr) throws IOException {<NEW_LINE>short length = reader.readShort(ptr);<NEW_LINE>ptr += BinaryReader.SIZEOF_SHORT;<NEW_LINE>short <MASK><NEW_LINE>ptr += BinaryReader.SIZEOF_SHORT;<NEW_LINE>if (length == 0 || type < 0) {<NEW_LINE>return null;<NEW_LINE>}<NE... | type = reader.readShort(ptr); |
170,625 | public void paint(Graphics g) {<NEW_LINE>Graphics2D g2 = (Graphics2D) g.create();<NEW_LINE>Rectangle r = new Rectangle(getSize());<NEW_LINE>JBInsets.removeFrom(r, JBUI.insets(1, 0, 1, 1));<NEW_LINE>try {<NEW_LINE>g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);<NEW_LINE>g2.setRen... | bw + lw) * 2)); |
439,982 | public static void main(String[] argv) {<NEW_LINE>Integer[] arr = new Integer[] { 5, 6, 2, 9, 10, 11, 12, 8, 3, 12, 3, 7, 12, 32, 458, 12, 5, 3, 78, 45, 12, 32, 58, 45, 65, 45, 98, 45, 65, 2, 3, 47, 21, 35 };<NEW_LINE>ListSort ls = new ListSort();<NEW_LINE>ls.allocateStack(34);<NEW_LINE>ls.sort(arr, new Comparator<Inte... | err.print(integer + ","); |
1,586,796 | public void run() {<NEW_LINE>TcpProxy tcp = TcpProxy.getTcpProxy(serverId);<NEW_LINE>try {<NEW_LINE>MapPack param = new MapPack();<NEW_LINE><MASK><NEW_LINE>param.put("fName", fName);<NEW_LINE>param.put("time", time);<NEW_LINE>MapPack out = (MapPack) tcp.getSingle(RequestCmd.OBJECT_CALL_CPU_PROFILE, param);<NEW_LINE>if ... | param.put("objHash", objHash); |
682,764 | private void initialTable(Composite composite) {<NEW_LINE>propertyTableViewer = new TableViewer(composite, SWT.MULTI | SWT.BORDER);<NEW_LINE>tableColumnLayout = new TableColumnLayout();<NEW_LINE>composite.setLayout(tableColumnLayout);<NEW_LINE>TableViewerColumn c = createTableViewerColumn("Property", 1, 150, SWT.FILL, ... | ((PropertyData) element).property; |
1,321,343 | private Trace readRequestTrace(Object target, Object[] args) {<NEW_LINE>final Invoker invoker = (Invoker) target;<NEW_LINE>// Ignore monitor service.<NEW_LINE>if (DubboConstants.MONITOR_SERVICE_FQCN.equals(invoker.getInterface().getName())) {<NEW_LINE>return traceContext.disableSampling();<NEW_LINE>}<NEW_LINE>final Rpc... | META_FLAGS), (short) 0); |
1,650,751 | private View createVoiceItemView(IndexItem indexItem, LayoutInflater inflater) {<NEW_LINE>View container = inflater.inflate(R.layout.list_item_icon_and_download, null);<NEW_LINE>boolean isTTS = DownloadActivityType.isVoiceTTS(indexItem);<NEW_LINE>if (isTTS && !isDefaultTTS(indexItem)) {<NEW_LINE>container.findViewById(... | (container.getContext())); |
1,665,944 | public static List<Path> scanForDirByPattern(Path directory, String namebase, String nameSep) {<NEW_LINE>Pattern pattern = Pattern.compile(Pattern.quote(namebase) + Pattern.quote(nameSep) + "[\\d]+");<NEW_LINE>List<Path> paths = new ArrayList<>();<NEW_LINE>try (DirectoryStream<Path> stream = Files.newDirectoryStream(di... | toString(), namebase, nameSep); |
1,039,332 | public static void main(String[] args) throws Exception {<NEW_LINE>logger.info("starting");<NEW_LINE>// Process the command-line options<NEW_LINE>CommandOption.setSummary(DBBulkLoader.class, "Efficient tool for importing large amounts of text and saving to an embedded Java database");<NEW_LINE>CommandOption.process(DBB... | AlphabetFactory.loadFromFile(vocabularyFile.value); |
1,235,605 | protected void onDraw(Canvas canvas) {<NEW_LINE>try {<NEW_LINE>Drawable drawable = getDrawable();<NEW_LINE>if (drawable == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (getWidth() == 0 || getHeight() == 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Bitmap bitmap;<NEW_LINE>int w = getWidth<MASK><NEW_LINE>if (w <= 0 || h ... | (), h = getHeight(); |
102,187 | public void loadFiles(@Nullable Uri uri) {<NEW_LINE>executor.submit(() -> {<NEW_LINE>if (apkFile == null) {<NEW_LINE>try {<NEW_LINE>int key = ApkFile.createInstance(apkUri, null);<NEW_LINE>apkFile = ApkFile.getInstance(key);<NEW_LINE>ApkFile.<MASK><NEW_LINE>File cachedFile = baseEntry.getRealCachedFile();<NEW_LINE>cach... | Entry baseEntry = apkFile.getBaseEntry(); |
1,377,329 | private TaskCleanupType pause(SingularityRequestCleanup requestCleanup, Iterable<SingularityTaskId> activeTaskIds) {<NEW_LINE>final long start = System.currentTimeMillis();<NEW_LINE>boolean killTasks = requestCleanup.getKillTasks().orElse(configuration.isDefaultValueForKillTasksOfPausedRequests());<NEW_LINE>if (request... | "Adding task {} to cleanup (pause)", taskId.getId()); |
647,391 | void recordRequestParameters() throws Exception {<NEW_LINE>List<String> missingParams = new ArrayList<String>();<NEW_LINE>formTarget = request.getParameter(PARAM_ORIGINAL_REQ_URL);<NEW_LINE>if (formTarget == null) {<NEW_LINE>missingParams.add(PARAM_ORIGINAL_REQ_URL);<NEW_LINE>}<NEW_LINE>requestMethod = request.getParam... | throw new Exception("The request is missing the following parameters: " + missingParams); |
438,064 | public void marshall(Integration integration, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (integration == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(integration.getApiGatewayManaged(), APIGATEWAYMANAG... | integration.getRequestTemplates(), REQUESTTEMPLATES_BINDING); |
1,522,425 | public boolean livenessHealthCheck(Map<String, Health> healthMap) {<NEW_LINE>Assert.notNull(healthCheckers, () -> "HealthCheckers must not be null");<NEW_LINE>logger.info("Begin SOFABoot HealthChecker liveness check.");<NEW_LINE>String checkComponentNames = healthCheckers.values().stream().map(HealthChecker::getCompone... | true, BinaryOperators.andBoolean()); |
1,249,284 | public static <T> void retryAttempt(int attemptNum, int maxAttempts, Upstream<? extends T> up, Downstream<? super T> down, BiFunction<? super Integer, ? super Throwable, Promise<Duration>> onError) throws Exception {<NEW_LINE>up.connect(down.onError(e -> {<NEW_LINE>if (attemptNum > maxAttempts) {<NEW_LINE>down.error(e)... | onError.apply(attemptNum, e); |
880,349 | public <T extends ThreadPoolTaskExecutor> T configure(T taskExecutor) {<NEW_LINE>PropertyMapper map = PropertyMapper.get().alwaysApplyingWhenNonNull();<NEW_LINE>map.from(this.queueCapacity).to(taskExecutor::setQueueCapacity);<NEW_LINE>map.from(this.corePoolSize).to(taskExecutor::setCorePoolSize);<NEW_LINE>map.from(this... | ).to(taskExecutor::setTaskDecorator); |
573,180 | public ASTNode visitColumnRef(final ColumnRefContext ctx) {<NEW_LINE>int identifierCount = ctx.identifier().size();<NEW_LINE>ColumnSegment result;<NEW_LINE>if (1 == identifierCount) {<NEW_LINE>result = new ColumnSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(), (IdentifierValue) visit(ctx.identifier... | .identifier(0)))); |
1,468,433 | private static HUEditorRowId fromJson(@NonNull final String json, final DocumentId documentId) {<NEW_LINE>//<NEW_LINE>// Split json to parts<NEW_LINE>final Iterator<String> partsIterator;<NEW_LINE>{<NEW_LINE>final List<String> parts = PARTS_SPLITTER.splitToList(json);<NEW_LINE>if (parts.isEmpty()) {<NEW_LINE>throw new ... | idParts.get(1))); |
1,545,443 | protected void createPurchaseMrpLines(Mrp mrp, PurchaseOrderLine purchaseOrderLine, MrpLineType purchaseOrderMrpLineType) throws AxelorException {<NEW_LINE>PurchaseOrder purchaseOrder = purchaseOrderLine.getPurchaseOrder();<NEW_LINE>LocalDate maturityDate = purchaseOrderLine.getEstimatedDelivDate();<NEW_LINE>if (maturi... | setSupplierPartner(purchaseOrder.getSupplierPartner()); |
11,251 | public static ByteBuffer stbi_load_from_memory(@NativeType("stbi_uc const *") ByteBuffer buffer, @NativeType("int *") IntBuffer x, @NativeType("int *") IntBuffer y, @NativeType("int *") IntBuffer channels_in_file, int desired_channels) {<NEW_LINE>if (CHECKS) {<NEW_LINE>check(x, 1);<NEW_LINE>check(y, 1);<NEW_LINE>check(... | channels_in_file.position()))); |
1,515,417 | public Void scan(DocTree docTree, Void unused) {<NEW_LINE><MASK><NEW_LINE>// Don't complain about this unknown tag if we already generated a better fix for it.<NEW_LINE>if (fixedTags.contains(docTree)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (!(docTree instanceof DCBlockTag)) {<NEW_LINE>return null;<NEW_LINE>}<N... | super.scan(docTree, null); |
1,264,831 | private void initListeners() {<NEW_LINE>selectedActionsList.addMouseListener(new DoubleClickDelegator((actionReference) -> {<NEW_LINE>selectedActionsListModel.removeElement(actionReference);<NEW_LINE>changer.changed();<NEW_LINE>}));<NEW_LINE>selectedActionsList.addListSelectionListener(e -> {<NEW_LINE>boolean hasSelect... | selectedActionsList.setSelectedIndex(selectedIndex - 1); |
9,087 | public void execute(Arguments arguments, ClassLoader classLoader) {<NEW_LINE>List<String> oldModels = arguments.repeatedParameter("--old");<NEW_LINE>LOGGER.info(String.format("Setting 'old' Smithy models: %s", String.join(" ", oldModels)));<NEW_LINE>List<String> newModels = arguments.repeatedParameter("--new");<NEW_LIN... | .format("Model diff detected errors: %n%s", result)); |
997,968 | private static CurveNode curveThreeLegBasisCurveNode(String conventionStr, String timeStr, String label, QuoteId quoteId, double spread, CurveNodeDate date, CurveNodeDateOrder order) {<NEW_LINE>Matcher matcher = SIMPLE_YM_TIME_REGEX.matcher(timeStr.toUpperCase(Locale.ENGLISH));<NEW_LINE>if (!matcher.matches()) {<NEW_LI... | + matcher.group(1)); |
1,598,738 | public boolean finalizeVirtualMachineProfile(VirtualMachineProfile profile, DeployDestination dest, ReservationContext context) {<NEW_LINE>UserVmVO vm = _vmDao.findById(profile.getId());<NEW_LINE>Map<String, String> details = userVmDetailsDao.listDetailsKeyPairs(vm.getId());<NEW_LINE>vm.setDetails(details);<NEW_LINE>St... | getDefaultNic(vm.getId()); |
225,337 | final GetRateBasedRuleResult executeGetRateBasedRule(GetRateBasedRuleRequest getRateBasedRuleRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getRateBasedRuleRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
1,538,165 | public void execute(String label) {<NEW_LINE>// move cursor to next insert location<NEW_LINE>Position pos = moveCursorToNextInsertLocation();<NEW_LINE>// truncate length to print margin - 5<NEW_LINE>int printMarginColumn = prefs_.marginColumn().getValue();<NEW_LINE>int length = printMarginColumn - 5;<NEW_LINE>// trunca... | () + 3, 0)); |
1,092,686 | private StringBuilder replace(String wmlTemplateString, int offset, StringBuilder strB, java.util.Map<String, ?> mappings) {<NEW_LINE>int startKey = wmlTemplateString.indexOf("${", offset);<NEW_LINE>if (startKey == -1)<NEW_LINE>return strB.append(wmlTemplateString.substring(offset));<NEW_LINE>else {<NEW_LINE>strB.appen... | append(val.toString()); |
406,689 | final DeleteAcceleratorResult executeDeleteAccelerator(DeleteAcceleratorRequest deleteAcceleratorRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteAcceleratorRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteAcceleratorReq... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
1,190,503 | private StreamHolder payloadToInputStream(Message<?> message) throws MessageDeliveryException {<NEW_LINE>Object payload = message.getPayload();<NEW_LINE>try {<NEW_LINE>if (payload instanceof File) {<NEW_LINE>File inputFile = (File) payload;<NEW_LINE>if (inputFile.exists()) {<NEW_LINE>return new StreamHolder(new Buffere... | filename != null ? filename : "Resource payload"); |
1,715,939 | public com.amazonaws.services.comprehend.model.ResourceInUseException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.comprehend.model.ResourceInUseException resourceInUseException = new com.amazonaws.services.comprehend.model.ResourceInUseException(null);<NEW_L... | String currentParentElement = context.getCurrentParentElement(); |
1,284,457 | private Node tryFoldArrayAccess(Node n, Node left, Node right) {<NEW_LINE>// If GETPROP/GETELEM is used as assignment target the array literal is<NEW_LINE>// acting as a temporary we can't fold it here:<NEW_LINE>// "[][0] += 1"<NEW_LINE>if (NodeUtil.isLValue(n)) {<NEW_LINE>return n;<NEW_LINE>}<NEW_LINE>Double index = t... | elem = NodeUtil.newUndefinedNode(left); |
1,729,256 | public InstanceStateChange unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>InstanceStateChange instanceStateChange = new InstanceStateChange();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument())<NEW_LINE... | XMLEvent xmlEvent = context.nextEvent(); |
1,686,983 | public void validate(FacesContext context) {<NEW_LINE>super.validate(context);<NEW_LINE>if (isValid() && customEvents != null) {<NEW_LINE>for (Map.Entry<String, AjaxBehaviorEvent> event : customEvents.entrySet()) {<NEW_LINE>String eventName = event.getKey();<NEW_LINE>AjaxBehaviorEvent behaviorEvent = event.getValue();<... | .get(clientId + "_itemIndex")); |
225,292 | private static void killConnection(long id, ShardingService service) {<NEW_LINE>// kill myself<NEW_LINE>if (id == service.getConnection().getId()) {<NEW_LINE>service.writeOkPacket();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// todo kill should be rewrite<NEW_LINE>FrontendConnection fc = findFrontConn(id);<NEW_LINE>if (fc =... | info("{} {}", fc, "killed by self"); |
651,186 | // handle the failure, extracted to aid inlining<NEW_LINE>private Map<Measure, Result<?>> handleFailure(RuntimeException ex) {<NEW_LINE>Result<?> failure;<NEW_LINE>String fnName = function.getClass().getSimpleName();<NEW_LINE>String exMsg = ex.getMessage();<NEW_LINE>Optional<String> id = function.identifier(target);<NE... | -> m, m -> failure)); |
120,243 | private static SinkRequest createClickHouseRequest(StreamSink streamSink, InlongStreamInfo streamInfo) {<NEW_LINE>ClickHouseSinkRequest clickHouseSinkRequest = new ClickHouseSinkRequest();<NEW_LINE>ClickHouseSink clickHouseSink = (ClickHouseSink) streamSink;<NEW_LINE>clickHouseSinkRequest.setSinkName(clickHouseSink.get... | setFlushInterval(clickHouseSink.getFlushInterval()); |
1,705,752 | public void concat(final Path dst, final Path[] srcs) throws IOException {<NEW_LINE>statistics.incrementWriteOps(1);<NEW_LINE>if (getFileStatus(dst).getLen() == 0) {<NEW_LINE>throw new IOException(dst + "is empty");<NEW_LINE>}<NEW_LINE>Path dp = dst.getParent();<NEW_LINE>for (Path src : srcs) {<NEW_LINE>if (!src.getPar... | .getRuntime(lib), bufsize); |
1,813,384 | protected void renderBg(PoseStack matrices, float partialTicks, int mouseX, int mouseY) {<NEW_LINE>this.leftPos += this.border.w;<NEW_LINE>this.topPos += this.border.h;<NEW_LINE>int x = this.leftPos;<NEW_LINE>int y = this.topPos;<NEW_LINE>int midW = this.imageWidth - this.border.w * 2;<NEW_LINE>RenderUtils.setup(GENERI... | this.border.draw(matrices); |
211,935 | public OResultSet syncPull(OCommandContext ctx, int nRecords) throws OTimeoutException {<NEW_LINE>getPrev().ifPresent(x -> x.syncPull(ctx, nRecords));<NEW_LINE>return new OResultSet() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public boolean hasNext() {<NEW_LINE>return !executed;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NE... | long size = clazz.count(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.