idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
365,260 | protected Boolean isSupportedNamedGroup(int namedGroup) {<NEW_LINE>try {<NEW_LINE>if (NamedGroup.refersToAnXDHCurve(namedGroup)) {<NEW_LINE>switch(namedGroup) {<NEW_LINE>case NamedGroup.x25519:<NEW_LINE>{<NEW_LINE>// helper.createAlgorithmParameters("X25519");<NEW_LINE>helper.createKeyAgreement("X25519");<NEW_LINE>// h... | TlsDHUtils.getNamedDHGroup(namedGroup))); |
44,039 | synchronized long update(long timeMillis, long waitMillis) {<NEW_LINE>for (int i = 0, n = tasks.size; i < n; i++) {<NEW_LINE>Task <MASK><NEW_LINE>synchronized (task) {<NEW_LINE>if (task.executeTimeMillis > timeMillis) {<NEW_LINE>waitMillis = Math.min(waitMillis, task.executeTimeMillis - timeMillis);<NEW_LINE>continue;<... | task = tasks.get(i); |
424,200 | private void deserializePrimitive(Object parent, Map<String, Object> state, String key, Field f, Class ftype) throws IllegalAccessException {<NEW_LINE>Object value = state.get(key);<NEW_LINE>if (ftype == boolean.class)<NEW_LINE>f.set(parent, value);<NEW_LINE>else if (ftype == byte.class)<NEW_LINE>f.set(parent, ((Number... | ) value).intValue()); |
433,919 | public static int multiplyColor(int c1, int c2) {<NEW_LINE>int r1 = (c1 & 0xFF0000) >> 16;<NEW_LINE>int r2 = (c2 & 0xFF0000) >> 16;<NEW_LINE>int g1 = (c1 & 0x00FF00) >> 8;<NEW_LINE>int g2 = <MASK><NEW_LINE>int b1 = (c1 & 0x0000FF);<NEW_LINE>int b2 = (c2 & 0x0000FF);<NEW_LINE>int r = (int) (r1 * (r2 / 255.0F));<NEW_LINE... | (c2 & 0x00FF00) >> 8; |
826,828 | public TypeVar inlineAsVar(UTypeVar var) throws CouldNotResolveImportException {<NEW_LINE>TypeVar typeVar = typeVarCache.get(var.getName());<NEW_LINE>if (typeVar != null) {<NEW_LINE>return typeVar;<NEW_LINE>}<NEW_LINE>Name name = asName(var.getName());<NEW_LINE>TypeSymbol sym = new TypeVariableSymbol(0, name, null, sym... | ().inline(this)); |
5,403 | protected R visitClassElements(List<? extends Concrete.ClassElement> elements, P params) {<NEW_LINE>for (Concrete.ClassElement element : elements) {<NEW_LINE>if (element instanceof Concrete.ClassField) {<NEW_LINE>Concrete.ClassField field = (Concrete.ClassField) element;<NEW_LINE>R result = visitParameters(field.getPar... | ).accept(this, params); |
740,953 | private CommandExecutionResult executeInternal(SequenceDiagram diagram, final RegexResult line0, BlocLines lines) throws NoSuchColorException {<NEW_LINE>final Participant p1 = diagram.getOrCreateParticipant(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(line0.get("P1", 0)));<NEW_LINE>final Participant p2 = di... | ColorParam.noteBackground, ColorParam.noteBorder); |
1,162,867 | final DescribeAcceleratorsResult executeDescribeAccelerators(DescribeAcceleratorsRequest describeAcceleratorsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeAcceleratorsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
916,051 | // -----------------------------------------------------<NEW_LINE>// Actually Crud<NEW_LINE>// -------------<NEW_LINE>@Execute<NEW_LINE>@Secured({ ROLE })<NEW_LINE>public HtmlResponse create(final CreateForm form) {<NEW_LINE>verifyCrudMode(form.crudMode, CrudMode.CREATE);<NEW_LINE>validate(form, messages -> {<NEW_LINE>... | e)), this::asEditHtml); |
1,019,966 | protected void onInitialized(Looper looper) {<NEW_LINE>mWorkerHandler = new Handler(looper);<NEW_LINE>mContentObserver = newContentObserver(mWorkerHandler, this::onWellbeingUriChanged);<NEW_LINE>if (!TextUtils.isEmpty(mWellbeingProviderPkg)) {<NEW_LINE>mContext.registerReceiver(new SimpleBroadcastReceiver(t -> restartO... | ), filter, null, mWorkerHandler); |
1,770,297 | private ObjectNode mergeObjectNodes(ObjectNode targetNode, ObjectNode updateNode) {<NEW_LINE>Iterator<String> fieldNames = updateNode.fieldNames();<NEW_LINE>while (fieldNames.hasNext()) {<NEW_LINE>String fieldName = fieldNames.next();<NEW_LINE>JsonNode targetValue = targetNode.get(fieldName);<NEW_LINE>JsonNode updateVa... | targetNode.set(fieldName, updateValue); |
713,940 | final DescribeMaintenanceStartTimeResult executeDescribeMaintenanceStartTime(DescribeMaintenanceStartTimeRequest describeMaintenanceStartTimeRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeMaintenanceStartTimeRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContex... | (super.beforeMarshalling(describeMaintenanceStartTimeRequest)); |
1,482,028 | private Map<String, ReportData> toReportDataMap(Set<String> newSetData) {<NEW_LINE>Map<String, ReportData> reportDataHashMap = new HashMap<String, ReportData>(100);<NEW_LINE>if (null != newSetData) {<NEW_LINE>JSONObject jsonObject = null;<NEW_LINE>String prefix = null;<NEW_LINE>ReportData reportData = null;<NEW_LINE>fo... | .getString("bytes")) : 0L; |
411,296 | static CosmosUpdateTimeFindToken fromBytes(DataInputStream inputStream) throws IOException {<NEW_LINE>CosmosUpdateTimeFindToken cloudFindToken;<NEW_LINE>DataInputStream stream = new DataInputStream(inputStream);<NEW_LINE>short version = stream.readShort();<NEW_LINE>switch(version) {<NEW_LINE>case VERSION_0:<NEW_LINE>Fi... | long lastUpdateTime = stream.readLong(); |
47,431 | public void start(Stage primaryStage) throws Exception {<NEW_LINE>FXMLLoader loader = new FXMLLoader(getClass().getResource("/NSLMain.fxml"));<NEW_LINE>Locale userLocale = AppPreferences.getInstance().getLocale();<NEW_LINE>ResourceBundle rb = ResourceBundle.getBundle("locale", userLocale);<NEW_LINE>NSLMain.appVersion =... | ("app").getString("_version"); |
1,158,125 | protected void buildLR0Machine() {<NEW_LINE>AssemblyProduction sp = grammar.productionsOf(grammar.getStart()).iterator().next();<NEW_LINE>AssemblyParseStateItem startItem = new AssemblyParseStateItem(sp, 0);<NEW_LINE>AssemblyParseState startState = new AssemblyParseState(grammar, startItem);<NEW_LINE>states.add(startSt... | getKernel().add(ni); |
701,237 | private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents<NEW_LINE>void initComponents() {<NEW_LINE>jScrollPane1 = new javax.swing.JScrollPane();<NEW_LINE>labelsList.setModel(new javax.swing.AbstractListModel() {<NEW_LINE><NEW_LINE>String[] strings = { "item1", "item2", "item3" }... | , 110, Short.MAX_VALUE)); |
1,601,862 | public void handleStatement(Statement st) {<NEW_LINE>Resource context = st.getContext();<NEW_LINE><MASK><NEW_LINE>Resource subject = st.getSubject();<NEW_LINE>Value object = st.getObject();<NEW_LINE>ContextResource sub = new ContextResource(subject.stringValue(), context != null ? context.stringValue() : null);<NEW_LIN... | IRI predicate = st.getPredicate(); |
862,272 | private IProductionMaterial createProductionMaterialIfEligible(final I_PP_Order_BOMLine ppOrderBOMLine) {<NEW_LINE>//<NEW_LINE>// Check if Product is matching the query<NEW_LINE>final <MASK><NEW_LINE>if (queryProduct != null && queryProduct.getM_Product_ID() != ppOrderBOMLine.getM_Product_ID()) {<NEW_LINE>logger.debug(... | I_M_Product queryProduct = query.getM_Product(); |
13,060 | public void createMenuItems(Bundle savedInstanceState) {<NEW_LINE>Context ctx = getContext();<NEW_LINE>listPreference = getListPreference();<NEW_LINE>if (ctx == null || listPreference == null || listPreference.getEntries() == null || listPreference.getEntryValues() == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ctx = ... | String description = listPreference.getDescription(); |
1,851,502 | private void analyzeStarrocksJarUdtf() throws AnalysisException {<NEW_LINE>{<NEW_LINE>// TYPE[] process(INPUT)<NEW_LINE>Method method = mainClass.getMethod(PROCESS_METHOD_NAME, true);<NEW_LINE>mainClass.checkMethodNonStaticAndPublic(method);<NEW_LINE>mainClass.checkArgumentCount(method, argsDef.getArgTypes().length);<N... | setLocation(new HdfsURI(objectFile)); |
1,200,051 | public // wrapper. -- L.A. 4.5<NEW_LINE>DatasetDTO processOAIDCxml(String DcXmlToParse) throws XMLStreamException {<NEW_LINE>// look up DC metadata mapping:<NEW_LINE>ForeignMetadataFormatMapping dublinCoreMapping = findFormatMappingByName(DCTERMS);<NEW_LINE>if (dublinCoreMapping == null) {<NEW_LINE>throw new EJBExcepti... | DatasetDTO datasetDTO = this.initializeDataset(); |
1,250,325 | final StopLabelingJobResult executeStopLabelingJob(StopLabelingJobRequest stopLabelingJobRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(stopLabelingJobRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(F... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
339,020 | // TODO: filter out only the needed variables, otherwise OCE has indrect access to all block level<NEW_LINE>private void addClosureMapToInit(BLangClassDefinition classDef, BVarSymbol mapSymbol) {<NEW_LINE>OCEDynamicEnvironmentData oceData = classDef.oceEnvData;<NEW_LINE>// eg : $map$block$_<num2><NEW_LINE>BLangSimpleVa... | argsExpr = new ArrayList<>(); |
1,490,417 | String pickMainScreenForm() {<NEW_LINE>if (loadedResources.getUIResourceNames() == null || loadedResources.getUIResourceNames().length < 1) {<NEW_LINE>JOptionPane.showMessageDialog(mainPanel, "You must have a UI builder entry for this feature", "Error", JOptionPane.ERROR_MESSAGE);<NEW_LINE>return null;<NEW_LINE>}<NEW_L... | JComboBox main = new JComboBox(arr); |
167,309 | public static Tuple2<TextField, Button> addTextFieldWithEditButton(GridPane gridPane, int rowIndex, String title) {<NEW_LINE>TextField textField = new BisqTextField();<NEW_LINE>textField.setPromptText(title);<NEW_LINE>textField.setEditable(false);<NEW_LINE>textField.setFocusTraversable(false);<NEW_LINE>textField.setPre... | Tuple2<>(textField, button); |
830,006 | // TODO: Use one of the new text classes, like /help ?<NEW_LINE>private void warpList(final CommandSource sender, final String[] args, final IUser user) throws Exception {<NEW_LINE>final IWarps warps = ess.getWarps();<NEW_LINE>final List<String> warpNameList = getAvailableWarpsFor(user);<NEW_LINE>if (warpNameList.isEmp... | () / (double) WARPS_PER_PAGE); |
1,639,833 | private CoreMap fromProto(CoreNLPProtos.Section section, List<CoreMap> annotationSentences) {<NEW_LINE>CoreMap map = new ArrayCoreMap();<NEW_LINE>map.set(CharacterOffsetBeginAnnotation.class, section.getCharBegin());<NEW_LINE>map.set(CharacterOffsetEndAnnotation.class, section.getCharEnd());<NEW_LINE>if (section.hasAut... | set(SentencesAnnotation.class, sentencesList); |
1,595,449 | private static void printInfo(String sizeMessage, String inAlluxioMessage, String path, Optional<String> inMemMessage, Optional<String> workerHostName) {<NEW_LINE>String message;<NEW_LINE>if (inMemMessage.isPresent() && workerHostName.isPresent()) {<NEW_LINE>message = String.format(GROUPED_MEMORY_OPTION_FORMAT, sizeMes... | SHORT_INFO_FORMAT, sizeMessage, inAlluxioMessage, path); |
967,646 | public static void createCluster(String destZkString, String destClusterName, VcrHelixConfig config) {<NEW_LINE>HelixZkClient destZkClient = getHelixZkClient(destZkString);<NEW_LINE>HelixAdmin destAdmin = new ZKHelixAdmin(destZkClient);<NEW_LINE>if (ZKUtil.isClusterSetup(destClusterName, destZkClient)) {<NEW_LINE>error... | clusterSetup.addCluster(destClusterName, true); |
355,093 | public static MockCookie parse(String setCookieHeader) {<NEW_LINE>Assert.notNull(setCookieHeader, "Set-Cookie header must not be null");<NEW_LINE>String[] cookieParts = setCookieHeader.split("\\s*=\\s*", 2);<NEW_LINE>Assert.isTrue(cookieParts.length == 2, () -> "Invalid Set-Cookie header '" + setCookieHeader + "'");<NE... | ) : new String[0]); |
1,530,309 | final BatchUpdateTableRowsResult executeBatchUpdateTableRows(BatchUpdateTableRowsRequest batchUpdateTableRowsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(batchUpdateTableRowsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
124,352 | private static <T extends ReferenceListAwareEnum> ImmutableSet<ReferenceListAwareEnum> extractValuesOrNull(final Class<T> clazz) {<NEW_LINE>//<NEW_LINE>// Enum type<NEW_LINE>final T[] enumConstants = clazz.getEnumConstants();<NEW_LINE>if (enumConstants != null) {<NEW_LINE>return ImmutableSet.copyOf(enumConstants);<NEW_... | > returnType = valuesMethod.getReturnType(); |
980,875 | protected void createRuntimeDataComponents() {<NEW_LINE>if (rDS != null && categoriesDs != null) {<NEW_LINE>Map<String, Object> params = new HashMap<>();<NEW_LINE>params.put("runtimeDs", rDS.getId());<NEW_LINE>params.put("categoriesDs", categoriesDs.getId());<NEW_LINE>params.put("fieldWidth"<MASK><NEW_LINE>params.put("... | , themeConstants.get("cuba.gui.EntityInspectorEditor.field.width")); |
209,872 | public void testWebTargetWithEncoding(Map<String, String> param, StringBuilder ret) {<NEW_LINE>String serverIP = param.get("serverIP");<NEW_LINE>String serverPort = param.get("serverPort");<NEW_LINE>ClientBuilder cb = ClientBuilder.newBuilder();<NEW_LINE>Client c = cb.build();<NEW_LINE>String encodeString = "";<NEW_LIN... | t2 = c.target(decodeString); |
521,647 | public ListAppsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListAppsResult listAppsResult = new ListAppsResult();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.g... | int originalDepth = context.getCurrentDepth(); |
1,694,615 | public static int write(PyObject fd, PyObject bytes) {<NEW_LINE>try (PyBuffer buf = ((BufferProtocol) bytes).getBuffer(PyBUF.SIMPLE)) {<NEW_LINE>// Get a ByteBuffer of that data, setting the position and limit to the real data.<NEW_LINE>ByteBuffer bb = buf.getNIOByteBuffer();<NEW_LINE>Object javaobj = fd.__tojava__(Raw... | bb, bb.position()); |
1,449,089 | final DeleteUserProfileResult executeDeleteUserProfile(DeleteUserProfileRequest deleteUserProfileRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteUserProfileRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.st... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
303,793 | final CreateBotAliasResult executeCreateBotAlias(CreateBotAliasRequest createBotAliasRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createBotAliasRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
137,523 | private SamlToken assertSamlTokens(SoapMessage message) {<NEW_LINE>if (tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(tc, "assertSamlToken(1)");<NEW_LINE>}<NEW_LINE>AssertionInfoMap aim = message.get(AssertionInfoMap.class);<NEW_LINE>if (tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(tc, "asserting saml (WssSamlV20Token11) policy!... | aim.getAssertionInfo(SP12Constants.SAML_TOKEN); |
161,343 | public ByteBuffer sendToOutput(ByteBuffer buffer) {<NEW_LINE>ByteBuffer out = buffer.duplicate();<NEW_LINE>out.order(buffer.order());<NEW_LINE>final int chs = data.length;<NEW_LINE>final int mult = (sbrPresent && config.isSBREnabled()) ? 2 : 1;<NEW_LINE>final int length <MASK><NEW_LINE>float[] cur;<NEW_LINE>int i, j, o... | = mult * config.getFrameLength(); |
1,225,752 | public int executeUpdate(final String sql, final int autoGeneratedKeys) throws SQLException {<NEW_LINE>if (RETURN_GENERATED_KEYS == autoGeneratedKeys) {<NEW_LINE>returnGeneratedKeys = true;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>LogicSQL logicSQL = createLogicSQL(sql);<NEW_LINE>trafficContext = getTrafficContext(logicSQL);... | getRouteContext().getRouteUnits()); |
691,092 | public static SimpleTransformationCustomizer fromLayer(Map<String, Object> values) {<NEW_LINE>SimpleTransformationCustomizer instance = new SimpleTransformationCustomizer();<NEW_LINE>Object <MASK><NEW_LINE>boolean applied = false;<NEW_LINE>if (o instanceof String) {<NEW_LINE>boolean warn = false;<NEW_LINE>A: for (Strin... | o = values.get(ATTR_MODE); |
378,139 | public static Map<String, String> readPasswordFileOptions(final String passwordFileName, boolean withPrefix) throws CommandException {<NEW_LINE>Map<String, String> passwordOptions = new HashMap<String, String>();<NEW_LINE>boolean readStdin = passwordFileName.equals("-");<NEW_LINE>InputStream is = null;<NEW_LINE>try {<N... | passwordOptions.put(optionName, optionValue); |
1,046,823 | public GetResourceLFTagsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>GetResourceLFTagsResult getResourceLFTagsResult = new GetResourceLFTagsResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LI... | JsonToken token = context.getCurrentToken(); |
641,010 | public static void main(String[] args) throws Exception {<NEW_LINE>Properties properties = Utils.readPropertiesFile(ExampleConstants.CONFIG_FILE_NAME);<NEW_LINE>final String eventMeshIp = properties.getProperty(ExampleConstants.EVENTMESH_IP);<NEW_LINE>final int eventMeshTcpPort = Integer.parseInt(properties.getProperty... | UserAgent userAgent = EventMeshTestUtils.generateClient1(); |
1,609,651 | private void executeRunAction(final boolean debug) {<NEW_LINE>final GrailsServerState serverState = project.getLookup().lookup(GrailsServerState.class);<NEW_LINE>Process process = null;<NEW_LINE>if (serverState != null && serverState.isRunning()) {<NEW_LINE>if (!debug) /*|| debug == serverState.isDebug()*/<NEW_LINE>{<N... | newService(callable, descriptor, displayName); |
1,617,704 | // Generally duplicated from SpeedSearchUtil.appendFragmentsForSpeedSearch<NEW_LINE>public void appendFragmentsForSpeedSearch(@NotNull JComponent speedSearchEnabledComponent, @NotNull String text, @NotNull SimpleTextAttributes attributes, boolean selected, @NotNull MultiIconSimpleColoredComponent simpleColoredComponent... | Color fg = attributes.getFgColor(); |
1,728,138 | protected void onSaveInstanceState(Bundle outState) {<NEW_LINE>super.onSaveInstanceState(outState);<NEW_LINE>outState.putInt(getString(R.string.frag_prev_mid), initalMiddleFragment);<NEW_LINE>outState.putInt(getString(R.string.frag_prev_bottom), initalBottomFragment);<NEW_LINE>outState.putInt(getString(R.string.frag_pr... | outState.putBoolean("modeChanges", modeChangesExit); |
1,759,214 | public UBJsonWriter value(JsonValue value) throws IOException {<NEW_LINE>if (value.isObject()) {<NEW_LINE>if (value.name != null)<NEW_LINE>object(value.name);<NEW_LINE>else<NEW_LINE>object();<NEW_LINE>for (JsonValue child = value.child; child != null; child = <MASK><NEW_LINE>pop();<NEW_LINE>} else if (value.isArray()) ... | child.next) value(child); |
537,812 | private void mergeModels(JSONArray rchg) throws UnexpectedSchemaChange {<NEW_LINE>for (JSONObject model : rchg.jsonObjectIterable()) {<NEW_LINE><MASK><NEW_LINE>Model l = mCol.getModels().get(r.getLong("id"));<NEW_LINE>// if missing locally or server is newer, update<NEW_LINE>if (l == null || r.getLong("mod") > l.getLon... | Model r = new Model(model); |
841,929 | private String createURLRegex(String url) {<NEW_LINE>String baseURL;<NEW_LINE>try {<NEW_LINE>URL u = new URL(url);<NEW_LINE>baseURL = u.getProtocol() + ":" + ((u.getAuthority() != null && u.getAuthority().length() > 0) ? "//" + u.getAuthority() : "") + ((u.getPath() != null) ? u.getPath() : "");<NEW_LINE>} catch (Malfo... | baseURL.replace("|", "\\|"); |
1,668,276 | public static String regrace(String disgracefulName) {<NEW_LINE>final char separator = '.';<NEW_LINE>char c = '?';<NEW_LINE>GracefulNamer namer = new GracefulNamer();<NEW_LINE>if (!disgracefulName.isEmpty())<NEW_LINE>namer.finalName.append(c <MASK><NEW_LINE>boolean isGrabbingDigits = false;<NEW_LINE>boolean wasSeparato... | = disgracefulName.charAt(0)); |
1,809,423 | public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {<NEW_LINE>contentView = View.inflate(getContext(), <MASK><NEW_LINE>itemsLayout = contentView.findViewById(R.id.items_layout);<NEW_LINE>if (savedInstanceState != null) {<NEW_LINE>chatId = saved... | R.layout.msg_not_sent_bottom_sheet, null); |
1,068,728 | public static void processBorderVertical(GrayU8 orig, GrayS16 deriv, Kernel1D_S32 kernel, ImageBorder_S32 borderType) {<NEW_LINE>borderType.setImage(orig);<NEW_LINE>ConvolveJustBorder_General_SB.vertical(kernel, borderType, deriv);<NEW_LINE>GrayU8 origSub;<NEW_LINE>GrayS16 derivSub;<NEW_LINE>origSub = orig.subimage(0, ... | vertical(kernel, origSub, derivSub); |
1,194,074 | private Component createDestContactListComponent() {<NEW_LINE>destContactList = GuiActivator.getUIService().createContactListComponent(this);<NEW_LINE>destContactList.removeAllContactSources();<NEW_LINE>destContactList.setContactButtonsVisible(false);<NEW_LINE>destContactList.setRightButtonMenuEnabled(false);<NEW_LINE>... | add(destContactList.getComponent()); |
1,029,666 | public void importPrintTemplate(ActionRequest request, ActionResponse response) {<NEW_LINE>String config = "/data-import/import-print-template-config.xml";<NEW_LINE>try {<NEW_LINE>InputStream inputStream = this.getClass().getResourceAsStream(config);<NEW_LINE>File configFile = File.createTempFile("config", ".xml");<NEW... | TraceBackService.trace(response, e); |
320,525 | public void deserializeNBT(NBTTagCompound nbt) throws InvalidInputDataException {<NEW_LINE>NBTUtilBC.readCompoundList(nbt.getTag("requiredBlockOffsets")).map(NBTUtil::getPosFromTag).forEach(requiredBlockOffsets::add);<NEW_LINE>blockState = NBTUtil.readBlockState<MASK><NEW_LINE>NBTUtilBC.readStringList(nbt.getTag("ignor... | (nbt.getCompoundTag("blockState")); |
399,787 | public void configure(Context context) {<NEW_LINE>this.context = context;<NEW_LINE>port = context.getInteger(ConfigConstants.CONFIG_PORT);<NEW_LINE>host = context.<MASK><NEW_LINE>Configurables.ensureRequiredNonNull(context, ConfigConstants.CONFIG_PORT);<NEW_LINE>Preconditions.checkArgument(ConfStringUtils.isValidIp(hos... | getString(ConfigConstants.CONFIG_HOST, "0.0.0.0"); |
234,560 | public void run() throws JRException {<NEW_LINE>long start = System.currentTimeMillis();<NEW_LINE>// Preparing parameters<NEW_LINE>Image image = Toolkit.getDefaultToolkit().createImage("dukesign.jpg");<NEW_LINE>MediaTracker traker = new MediaTracker(new Panel());<NEW_LINE>traker.addImage(image, 0);<NEW_LINE>try {<NEW_L... | .currentTimeMillis() - start)); |
1,781,299 | // Convert a list of futures to a future of a list<NEW_LINE>public static <T> InternalFuture<List<T>> sequence(final List<InternalFuture<T>> futures, Executor executor) {<NEW_LINE>if (futures.isEmpty()) {<NEW_LINE>return InternalFuture.completedInternalFuture(new LinkedList<>());<NEW_LINE>}<NEW_LINE>final var promise =... | add(future.get()); |
1,344,527 | public static DescribeUserInfoListResponse unmarshall(DescribeUserInfoListResponse describeUserInfoListResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeUserInfoListResponse.setRequestId(_ctx.stringValue("DescribeUserInfoListResponse.RequestId"));<NEW_LINE>describeUserInfoListResponse.setTotalCount(_ctx.longValue(... | ("DescribeUserInfoListResponse.UserInfoList[" + i + "].CertificateNo")); |
711,851 | public boolean shouldRun(Description description) {<NEW_LINE>String methodName = description.getMethodName();<NEW_LINE>if (methodName == null) {<NEW_LINE>// JUnit will give us an org.junit.runner.Description like this for the<NEW_LINE>// test class<NEW_LINE>// itself. It's easier for our filtering to make decisions ju... | String className = description.getClassName(); |
420,856 | public void updatePet(Pet body) throws ApiException {<NEW_LINE>Object localVarPostBody = body;<NEW_LINE>// verify the required parameter 'body' is set<NEW_LINE>if (body == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'body' when calling updatePet");<NEW_LINE>}<NEW_LINE>// create path and... | final String[] localVarAccepts = {}; |
1,229,269 | protected ClickHouseHttpResponse post(String sql, InputStream data, List<ClickHouseExternalTable> tables, Map<String, String> headers) throws IOException {<NEW_LINE>HttpRequest.Builder reqBuilder = HttpRequest.newBuilder().uri(URI.create(url)).timeout(Duration.ofMillis<MASK><NEW_LINE>String boundary = null;<NEW_LINE>if... | (config.getSocketTimeout())); |
141,984 | public void checkForHeaderGet(View view) {<NEW_LINE>Rx2ANRequest.GetRequestBuilder getRequestBuilder = new Rx2ANRequest.GetRequestBuilder(ApiEndPoint.BASE_URL + ApiEndPoint.CHECK_FOR_HEADER);<NEW_LINE>getRequestBuilder.addHeaders("token", "1234").build().setAnalyticsListener(new AnalyticsListener() {<NEW_LINE><NEW_LINE... | d(TAG, " bytesSent : " + bytesSent); |
858,779 | // parse swap rate calculation<NEW_LINE>private RateCalculation parseSwapCalculation(XmlElement legEl, XmlElement calcEl, PeriodicSchedule accrualSchedule, FpmlDocument document) {<NEW_LINE>// supported elements:<NEW_LINE>// 'calculationPeriodAmount/calculation/fixedRateSchedule'<NEW_LINE>// 'calculationPeriodAmount/ca... | get(), accrualSchedule, document); |
441,470 | final CreateTopicResult executeCreateTopic(CreateTopicRequest createTopicRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createTopicRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
1,580,365 | protected Value marshalObjectToNative(Function fn, MarshalerMethod marshalerMethod, MarshaledArg marshaledArg, Type nativeType, Value env, Value object, long flags) {<NEW_LINE>Invokestatic invokestatic = marshalerMethod.getInvokeStatic(sootMethod.getDeclaringClass());<NEW_LINE>trampolines.add(invokestatic);<NEW_LINE>Va... | newVariable(new PointerType(nativeType)); |
727,836 | public void clear() {<NEW_LINE>Iterator<Map.Entry<K, MapEntryValue>> iterator = entries().entrySet().iterator();<NEW_LINE>Map<K, MapEntryValue> entriesToAdd = new HashMap<>();<NEW_LINE>while (iterator.hasNext()) {<NEW_LINE>Map.Entry<K, MapEntryValue> entry = iterator.next();<NEW_LINE>K key = entry.getKey();<NEW_LINE>Ma... | entries().putAll(entriesToAdd); |
1,463,252 | public Coordinate invRotate(Coordinate coord) {<NEW_LINE>double a, b, c, d;<NEW_LINE>assert (Math.abs(norm2() - 1) < 0.00001) : "Quaternion not unit length: " + this;<NEW_LINE>// (a,b,c,d) = (this)^-1 * coord = (w,-x,-y,-z) * (0,cx,cy,cz)<NEW_LINE>a = +x * coord.x + y * coord<MASK><NEW_LINE>b = w * coord.x - y * coord.... | .y + z * coord.z; |
256,315 | public ManufOrder generateManufOrder(Product product, BigDecimal qtyRequested, int priority, boolean isToInvoice, BillOfMaterial billOfMaterial, LocalDateTime plannedStartDateT, LocalDateTime plannedEndDateT, int originType) throws AxelorException {<NEW_LINE>if (billOfMaterial == null) {<NEW_LINE>billOfMaterial = this.... | Company company = billOfMaterial.getCompany(); |
1,550,209 | public <T, S> List<T> sort(SortQuery<K> query, BulkMapper<T, S> bulkMapper, @Nullable RedisSerializer<S> resultSerializer) {<NEW_LINE>List<S> values = sort(query, resultSerializer);<NEW_LINE>if (values == null || values.isEmpty()) {<NEW_LINE>return Collections.emptyList();<NEW_LINE>}<NEW_LINE>int bulkSize = query.getGe... | = new ArrayList<>(bulkSize); |
1,091,855 | private void initComponents() {<NEW_LINE>// NOI18N<NEW_LINE>dialog = new JDialog(parentFrame, NbBundle.getMessage(AboutDialog.class, "LBL_About"), true);<NEW_LINE>dialog.addWindowListener(new WindowAdapter() {<NEW_LINE><NEW_LINE>public void windowClosed(WindowEvent e) {<NEW_LINE>cleanup();<NEW_LINE>}<NEW_LINE>});<NEW_L... | add(aboutDialogPanel, BorderLayout.CENTER); |
523,128 | public void fetch() {<NEW_LINE>collectObj();<NEW_LINE>Iterator<Integer> itr = serverObjMap.keySet().iterator();<NEW_LINE>ActiveSpeedData a = new ActiveSpeedData();<NEW_LINE>while (itr.hasNext()) {<NEW_LINE>int serverId = itr.next();<NEW_LINE>TcpProxy tcp = TcpProxy.getTcpProxy(serverId);<NEW_LINE>try {<NEW_LINE>MapPack... | , serverObjMap.get(serverId)); |
1,405,397 | private boolean existUniqueValueInStore(IndexLabel indexLabel, Object value) {<NEW_LINE>ConditionQuery query = new ConditionQuery(HugeType.UNIQUE_INDEX);<NEW_LINE>query.eq(HugeKeys.INDEX_LABEL_ID, indexLabel.id());<NEW_LINE>query.eq(HugeKeys.FIELD_VALUES, value);<NEW_LINE>boolean exist;<NEW_LINE>Iterator<BackendEntry> ... | "Already has existed unique index record {}", index.elementId()); |
185,670 | private byte[] computeW(final byte[] iv, final byte[] key) throws GeneralSecurityException {<NEW_LINE>// Checks the parameter sizes for which W is defined.<NEW_LINE>// Note, that the caller ensures stricter limits.<NEW_LINE>if (key.length <= 8 || key.length > Integer.MAX_VALUE - 16 || iv.length != 8) {<NEW_LINE>throw n... | data, 0, iv.length); |
687,100 | public int readRawVarInt32() throws IOException {<NEW_LINE>int position = nioBuffer.position();<NEW_LINE>byte tmp = UnsafeDirectBufferUtil.<MASK><NEW_LINE>if (tmp >= 0) {<NEW_LINE>nioBuffer.position(position);<NEW_LINE>return tmp;<NEW_LINE>}<NEW_LINE>int result = tmp & 0x7f;<NEW_LINE>if ((tmp = UnsafeDirectBufferUtil.g... | getByte(address(position++)); |
954,836 | public void fill(Vector min, Vector max, Material outerType, int outerData, Material innerType, int innerData) {<NEW_LINE>int minX = min.getBlockX();<NEW_LINE>int minY = min.getBlockY();<NEW_LINE>int minZ = min.getBlockZ();<NEW_LINE>int maxX = max.getBlockX();<NEW_LINE><MASK><NEW_LINE>int maxZ = max.getBlockZ();<NEW_LI... | int maxY = max.getBlockY(); |
752,071 | @Produces("application/json")<NEW_LINE>public Response deleteBundlesOlderThan(@Context final HttpServletRequest request, @Context final HttpServletResponse response, @PathParam("olderThan") final ISODateParam olderThan) {<NEW_LINE>if (olderThan.after(new Date())) {<NEW_LINE>throw new IllegalArgumentException("To avoid ... | sendErrorDeleteBundleMessage(initData, locale, e); |
629,570 | final ExportServerEngineAttributeResult executeExportServerEngineAttribute(ExportServerEngineAttributeRequest exportServerEngineAttributeRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(exportServerEngineAttributeRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.get... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
1,633,134 | private Object findObjectToSelectAfterDeletion() {<NEW_LINE>Object firstObject = fSelectedObjects[0];<NEW_LINE>TreeItem item = fViewer.findTreeItem(firstObject);<NEW_LINE>if (item == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>TreeItem parentTreeItem = item.getParentItem();<NEW_LINE>// Parent Item not found so mu... | index = tree.indexOf(item); |
195,979 | final DescribeUserHierarchyGroupResult executeDescribeUserHierarchyGroup(DescribeUserHierarchyGroupRequest describeUserHierarchyGroupRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeUserHierarchyGroupRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRe... | false), new DescribeUserHierarchyGroupResultJsonUnmarshaller()); |
1,841,784 | public ActionResult<Wo> call() throws Exception {<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>Business business = new Business(emc);<NEW_LINE>Work work = emc.find(id, Work.class);<NEW_LINE>if (null == w... | reads = new ArrayList<>(); |
1,563,639 | private void appendImageInfo(Map<String, Object> result) {<NEW_LINE>try {<NEW_LINE>List<Map<String, Object>> list = new ArrayList<>();<NEW_LINE>Map<String, Object> checkPoint = new HashMap<>();<NEW_LINE>Storage storage = new Storage(Config.meta_dir + "/image");<NEW_LINE>checkPoint.put("Name", "Version");<NEW_LINE>check... | result.put("CheckpointInfo", list); |
189,693 | public void populateItem(final Item<NavLink> item) {<NEW_LINE>NavLink navLink = item.getModelObject();<NEW_LINE>String linkText = navLink.translationKey;<NEW_LINE>try {<NEW_LINE>// try to lookup translation key<NEW_LINE><MASK><NEW_LINE>} catch (Exception e) {<NEW_LINE>}<NEW_LINE>if (navLink.hiddenPhone) {<NEW_LINE>Wick... | linkText = getString(navLink.translationKey); |
1,438,980 | public CreateHttpNamespaceResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CreateHttpNamespaceResult createHttpNamespaceResult = new CreateHttpNamespaceResult();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDep... | int originalDepth = context.getCurrentDepth(); |
1,808,297 | final UpdateCanaryResult executeUpdateCanary(UpdateCanaryRequest updateCanaryRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateCanaryRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | invoke(request, responseHandler, executionContext); |
324,850 | public void write(org.apache.thrift.protocol.TProtocol oprot, LocalStateData struct) throws org.apache.thrift.TException {<NEW_LINE>struct.validate();<NEW_LINE>oprot.writeStructBegin(STRUCT_DESC);<NEW_LINE>if (struct.serialized_parts != null) {<NEW_LINE>oprot.writeFieldBegin(SERIALIZED_PARTS_FIELD_DESC);<NEW_LINE>{<NEW... | .serialized_parts.size())); |
1,121,224 | public void refresh(TableCell cell) {<NEW_LINE>DownloadManager dm = (DownloadManager) cell.getDataSource();<NEW_LINE>int sr = (dm == null) ? 0 : dm<MASK><NEW_LINE>if (sr == Integer.MAX_VALUE) {<NEW_LINE>sr = Integer.MAX_VALUE - 1;<NEW_LINE>}<NEW_LINE>if (sr == -1) {<NEW_LINE>sr = Integer.MAX_VALUE;<NEW_LINE>}<NEW_LINE>... | .getStats().getShareRatio(); |
813,327 | // gadgetBytes will be null only if gadget_ == null AND empty == true<NEW_LINE>@SuppressWarnings("null")<NEW_LINE>public byte[] toByteArray() {<NEW_LINE>final int preLongs, outBytes;<NEW_LINE>final boolean empty = gadget_ == null;<NEW_LINE>final byte[] gadgetBytes = (gadget_ != null ? gadget_.toByteArray() : null);<NEW... | preLongs << 3) + gadgetBytes.length; |
433,806 | public static Collection<RegressionExecution> executions() {<NEW_LINE>ArrayList<RegressionExecution> execs = new ArrayList<>();<NEW_LINE>execs.add(new ResultSetQueryTypePatternNoWindow());<NEW_LINE>execs.add(new ResultSetQueryTypePatternWithWindow());<NEW_LINE>execs<MASK><NEW_LINE>execs.add(new ResultSetQueryTypeOrderB... | .add(new ResultSetQueryTypeOrderByWildcard()); |
529,322 | public SinkStatus.SinkInstanceStatus.SinkInstanceStatusData fromFunctionStatusProto(InstanceCommunication.FunctionStatus status, String assignedWorkerId) {<NEW_LINE>SinkStatus.SinkInstanceStatus.SinkInstanceStatusData sinkInstanceStatusData = new SinkStatus.SinkInstanceStatus.SinkInstanceStatusData();<NEW_LINE>sinkInst... | setNumReadFromPulsar(status.getNumReceived()); |
1,539,768 | private static org.apache.rocketmq.common.message.Message doConvert(String topic, Message<?> message) {<NEW_LINE>Charset charset = Charset.defaultCharset();<NEW_LINE>Object payloadObj = message.getPayload();<NEW_LINE>byte[] payloads;<NEW_LINE>try {<NEW_LINE>if (payloadObj instanceof String) {<NEW_LINE>payloads = ((Stri... | []) message.getPayload(); |
1,729,511 | private static void storeInitialTextForOneNode(Node node, List<JavaToken> nodeTokens) {<NEW_LINE>if (nodeTokens == null) {<NEW_LINE>nodeTokens = Collections.emptyList();<NEW_LINE>}<NEW_LINE>List<Pair<Range, TextElement>> elements = new LinkedList<>();<NEW_LINE>for (Node child : node.getChildNodes()) {<NEW_LINE>if (!chi... | collect(toList()))); |
311,471 | private void trackProgress() {<NEW_LINE>if (!mTrackingEnabled)<NEW_LINE>return;<NEW_LINE>DownloadManager.Query query = new DownloadManager.Query();<NEW_LINE>query.setFilterByStatus(DownloadManager.STATUS_RUNNING);<NEW_LINE>Cursor cursor = null;<NEW_LINE>try {<NEW_LINE>cursor = mDownloadManager.query(query);<NEW_LINE>cu... | int count = cursor.getCount(); |
1,846,196 | public static void outputResultSet(ResultSet results, Prologue prologue, ResultsFormat outputFormat, PrintStream output) {<NEW_LINE>if (outputFormat.equals(ResultsFormat.FMT_UNKNOWN))<NEW_LINE>outputFormat = ResultsFormat.FMT_TEXT;<NEW_LINE>// Proper ResultSet formats.<NEW_LINE>if (prologue == null)<NEW_LINE>prologue =... | ).write(output, results); |
1,154,764 | public static void createOvfFile(VmwareHypervisorHost host, String diskFileName, String ovfName, String datastorePath, String templatePath, long diskCapacity, long fileSize, ManagedObjectReference morDs) throws Exception {<NEW_LINE><MASK><NEW_LINE>ManagedObjectReference morOvf = context.getServiceContent().getOvfManage... | VmwareContext context = host.getContext(); |
734,764 | public void processMessage(final WebSocketMessage webSocketData) {<NEW_LINE>setDoTransactionNotifications(true);<NEW_LINE>final String keyString = webSocketData.getNodeDataStringValue("key");<NEW_LINE>if (keyString == null) {<NEW_LINE>logger.error("Unable to remove given object from collection: key is null");<NEW_LINE>... | ((RelationshipInterface) obj, callback); |
1,425,481 | public void startUpdateThread() {<NEW_LINE>ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor();<NEW_LINE>Runnable periodicTask = () -> {<NEW_LINE>if (GeyserImpl.getInstance() != null) {<NEW_LINE>// Update player table<NEW_LINE>playerTableModel.getDataVector().removeAllElements();<NEW_LINE>f... | row = new Vector<>(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.