idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
293,088 | private static void pointAddVar(boolean negate, PointExt p, PointExt r) {<NEW_LINE>int[] a = F.create();<NEW_LINE>int[] b = F.create();<NEW_LINE>int[] c = F.create();<NEW_LINE>int[<MASK><NEW_LINE>int[] e = F.create();<NEW_LINE>int[] f = F.create();<NEW_LINE>int[] g = F.create();<NEW_LINE>int[] h = F.create();<NEW_LINE>... | ] d = F.create(); |
546,741 | public static boolean relog() {<NEW_LINE>MinecraftClient mc = MinecraftClient.getInstance();<NEW_LINE>if (mc.isInSingleplayer()) {<NEW_LINE>IntegratedServer server = MinecraftClient.getInstance().getServer();<NEW_LINE>if (server == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>String levelName = server.getSavePath... | (new TranslatableText("selectWorld.data_read"))); |
837,486 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player player = game.getPlayer(source.getControllerId());<NEW_LINE>if (player == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>TargetCardInLibrary targetCardInLibrary = new TargetCardWithDifferentNameInLibrary(0, 3, filter);<NEW_LINE>targetCardInLibrary.se... | getPlayer(targetOpponent.getFirstTarget()); |
1,311,864 | public void run(RegressionEnvironment env) {<NEW_LINE>String epl = "@public create window PointWindow#keepall as (id string, px double, py double);\n" + "create index MyIndex on PointWindow((px,py) pointregionquadtree(0,0,100,100,2,12));\n" + "insert into PointWindow select id, px, py from SupportSpatialPoint;\n" + "@n... | env, "P3", 2.013086221651661, 79.96973017670842); |
1,728,658 | public void paintInstance(InstancePainter painter) {<NEW_LINE>final var showState = painter.getShowState();<NEW_LINE>final var g = painter.getGraphics();<NEW_LINE>painter.drawClock(CK, Direction.EAST);<NEW_LINE>painter.drawBounds();<NEW_LINE>painter.drawPort(CLR);<NEW_LINE>painter.drawPort(RE);<NEW_LINE>painter.drawPor... | (painter.getAttributeValue(ATTR_BUFFER)); |
695,703 | final CreateNetworkInterfacePermissionResult executeCreateNetworkInterfacePermission(CreateNetworkInterfacePermissionRequest createNetworkInterfacePermissionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createNetworkInterfacePermissionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetri... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
724,698 | private void initializeFcmCheck() {<NEW_LINE>if (!SignalStore.account().isRegistered()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>PlayServicesUtil.PlayServicesStatus fcmStatus = PlayServicesUtil.getPlayServicesStatus(this);<NEW_LINE>if (fcmStatus == PlayServicesUtil.PlayServicesStatus.DISABLED) {<NEW_LINE>if (SignalStore.... | .add(new RefreshAttributesJob()); |
1,340,035 | private boolean validate(ActionReport actionReport) {<NEW_LINE>boolean result = false;<NEW_LINE>if (startPort != null) {<NEW_LINE>try {<NEW_LINE>int port = Integer.parseInt(startPort);<NEW_LINE>if (port < 0 || port > Short.MAX_VALUE * 2) {<NEW_LINE>actionReport.failure(logger, "start port must be greater than zero or l... | failure(logger, "startPort is not a valid integer", nfe); |
538,193 | public void disableLoggers() {<NEW_LINE>contextDiagnosticListener = context.get(DiagnosticListener.class);<NEW_LINE>context.put(DiagnosticListener.class, (DiagnosticListener<?>) null);<NEW_LINE>errWriterField.pauze(log);<NEW_LINE>warnWriterField.pauze(log);<NEW_LINE>noticeWriterField.pauze(log);<NEW_LINE>if (deferDiagn... | deferredDiagnosticsField.set(log, empty); |
78,076 | public void computePolygonSeparation(EPAxis axis) {<NEW_LINE>axis.type = EPAxis.Type.UNKNOWN;<NEW_LINE>axis.index = -1;<NEW_LINE>axis.separation = -Float.MAX_VALUE;<NEW_LINE>perp.x = -m_normal.y;<NEW_LINE>perp.y = m_normal.x;<NEW_LINE>for (int i = 0; i < m_polygonB.count; ++i) {<NEW_LINE>Vec2 normalB = m_polygonB.norma... | MathUtils.min(s1, s2); |
1,246,510 | private static void groupNodes(final ZyGraph graph, final List<NaviNode> nodes) {<NEW_LINE>final StringBuilder stringBuilder = new StringBuilder();<NEW_LINE>final List<INaviViewNode> rawNodes = new ArrayList<INaviViewNode>();<NEW_LINE>// ATTENTION: DO NOT MOVE THIS LINE BELOW THE REMOVEELEMENT LINE<NEW_LINE>final INavi... | appendComment(stringBuilder.toString()); |
1,832,535 | private synchronized void addFileCloserHook() {<NEW_LINE>if (fileCloser == null) {<NEW_LINE>final Runnable fileCloserRunnable = () -> {<NEW_LINE>if (embeddedFonts != null) {<NEW_LINE>for (PrismFontFile font : embeddedFonts.values()) {<NEW_LINE>font.disposeOnShutdown();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (tmpFonts != nul... | getRuntime().addShutdownHook(fileCloser); |
1,825,118 | protected IFigure createFigure() {<NEW_LINE>innerLayers = new LayeredPane();<NEW_LINE>printableLayers = new LayeredPane();<NEW_LINE>Layer layer = new Layer();<NEW_LINE>layer.setLayoutManager(new StackLayout());<NEW_LINE>printableLayers.add(layer, PRIMARY_LAYER);<NEW_LINE>layer = new ConnectionLayer();<NEW_LINE>layer.se... | innerLayers.add(printableLayers, PRINTABLE_LAYERS); |
1,247,793 | public QueryDataSet execute(QueryContext context) throws StorageEngineException, QueryProcessException, IOException {<NEW_LINE>RowRecord record = new RowRecord(queryTime);<NEW_LINE>Filter timeFilter = initFillExecutorsAndContructTimeFilter(context);<NEW_LINE>Pair<List<VirtualStorageGroupProcessor>, Map<VirtualStorageGr... | initQueryDataSourceCache(processorToSeriesMap, context, timeFilter); |
1,450,714 | private Prediction<T> innerPredictThreadPool(ExecutorService pool, ThreadLocal<PriorityQueue<OutputDoublePair<T>>> queuePool, DistanceType distType, Example<T> example) {<NEW_LINE>SparseVector vector = SparseVector.<MASK><NEW_LINE>List<Future<List<OutputDoublePair<T>>>> futures = new ArrayList<>();<NEW_LINE>for (int i ... | createSparseVector(example, featureIDMap, false); |
804,263 | public static byte[] encrypt(String password, byte[] data) throws UnsupportedEncodingException, InvalidCipherTextException {<NEW_LINE>Preconditions.checkArgument(data.length <= BUFFER_SIZE, "Cannot encrypt data of length %d that is greater than block size %d, currently only n = 1" + " blocks (chunks) are supported.", d... | ] encryptedData = new byte[outputLength]; |
1,581,885 | private void saveCurrentSelections() {<NEW_LINE>JSONArray ar = new JSONArray();<NEW_LINE>for (SelectedGpxFile s : selectedGPXFiles) {<NEW_LINE>if (s.gpxFile != null && !s.notShowNavigationDialog) {<NEW_LINE>JSONObject obj = new JSONObject();<NEW_LINE>try {<NEW_LINE>if (s.isShowCurrentTrack()) {<NEW_LINE>obj.put(CURRENT... | obj.put(CURRENT_TRACK, true); |
1,052,242 | private void calcPositionAndShow(Project project, JBPopup balloon) {<NEW_LINE>Point savedLocation = WindowStateService.getInstance(myProject).getLocation(LOCATION_SETTINGS_KEY);<NEW_LINE>// for first show and short mode popup should be shifted to the top screen half<NEW_LINE>if (savedLocation == null && mySearchEverywh... | .getCurrentKeyboardFocusManager().getFocusedWindow(); |
1,745,677 | public String createFirebaseToken(Game game, String userId) {<NEW_LINE>final AppIdentityService appIdentity = AppIdentityServiceFactory.getAppIdentityService();<NEW_LINE>final <MASK><NEW_LINE>String header = base64.encode("{\"typ\":\"JWT\",\"alg\":\"RS256\"}".getBytes());<NEW_LINE>// Construct the claim<NEW_LINE>String... | BaseEncoding base64 = BaseEncoding.base64(); |
799,560 | public Object call(String serviceName, String port, String functionName, String[] values) throws Exception {<NEW_LINE>if (this.services.size() == 0)<NEW_LINE>throw new Exception("no service found [" + serviceName + "]");<NEW_LINE>Service serv = this.services.get(serviceName);<NEW_LINE>if (serv == null) {<NEW_LINE>if (t... | serv.ports.get(port); |
1,839,794 | public RexNode toDnf(RexNode rex) {<NEW_LINE>final List<RexNode> operands;<NEW_LINE>switch(rex.getKind()) {<NEW_LINE>case AND:<NEW_LINE>operands = flattenAnd(((RexCall) rex).getOperands());<NEW_LINE>final RexNode head = operands.get(0);<NEW_LINE>final RexNode headDnf = toDnf(head);<NEW_LINE>final List<RexNode> headDnfs... | list = new ArrayList<>(); |
955,053 | private List<Pack> searchXLogPackList(final SearchXLogRequest searchXLogRequest) {<NEW_LINE>MapPack paramPack = new MapPack();<NEW_LINE>paramPack.put(ParamConstant.DATE, searchXLogRequest.getYyyymmdd());<NEW_LINE>paramPack.put(ParamConstant.XLOG_START_TIME, searchXLogRequest.getStartTimeMillis());<NEW_LINE>paramPack.pu... | put(ParamConstant.XLOG_TEXT_2, textTemp); |
1,199,216 | private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents<NEW_LINE>void initComponents() {<NEW_LINE>namePanel = new javax.swing.JPanel();<NEW_LINE>nameLabel = new javax.swing.JLabel();<NEW_LINE>nameText = new javax.swing.JTextField();<NEW_LINE>memberspanel = new javax.swing.JPane... | java.awt.BorderLayout()); |
993,556 | private void loadNode1153() {<NEW_LINE>PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.NonTransparentNetworkRedundancyType_ServerNetworkGroups, new QualifiedName(0, "ServerNetworkGroups"), new LocalizedText("en", "ServerNetworkGroups"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valu... | .expanded(), true)); |
260,703 | private synchronized boolean authbindContext(String userName, String pass) throws NamingException {<NEW_LINE>String userDN = userNameRDN + "=" + userName + "," + userBase;<NEW_LINE>Hashtable env = new Hashtable(11);<NEW_LINE>env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");<NEW_LINE>env.put(... | put(Context.SECURITY_PRINCIPAL, userDN); |
456,227 | public Rule parseRule(String id, String rule, boolean silent) throws ParseException {<NEW_LINE>final ParseContext parseContext = new ParseContext(silent);<NEW_LINE>final SyntaxErrorListener errorListener = new SyntaxErrorListener(parseContext);<NEW_LINE>final RuleLangLexer lexer = new <MASK><NEW_LINE>lexer.removeErrorL... | RuleLangLexer(new ANTLRInputStream(rule)); |
878,169 | private void addCodeCompletionItems(ParserResult controller, CodeCompletionHandler completer, int offset, String prefix) {<NEW_LINE>QueryType qtype = queryType == 9 ? QueryType.ALL_COMPLETION : QueryType.COMPLETION;<NEW_LINE>CodeCompletionContext context = new CodeCompletionContextImpl(offset, <MASK><NEW_LINE>CodeCompl... | controller, prefix, true, qtype); |
903,603 | protected Ftile doStep2(Ftile inner, Ftile result) {<NEW_LINE>final Style style = getStyleSignature().getMergedStyle(skinParam().getCurrentStyleBuilder());<NEW_LINE>final HColor borderColor;<NEW_LINE>final HColor backColor;<NEW_LINE>if (UseStyle.useBetaStyle()) {<NEW_LINE>borderColor = style.value(PName.LineColor).asCo... | FtileUtils.addConnection(result, conns); |
795,868 | public void storeTemporaryDataAt(final int index, final int rawMask) {<NEW_LINE>final int index2 = 2 * index;<NEW_LINE>final int index3 = 3 * index;<NEW_LINE>final int index4 = 4 * index;<NEW_LINE>// scalars<NEW_LINE>if (ParticleDataMask.ENERGY.isEnabled(rawMask)) {<NEW_LINE>energy[index] = temporaryParticleData.energy... | = temporaryParticleData.previousPosition.x(); |
673,350 | private void dumpCsv() {<NEW_LINE>String dump = mAdapter.dumpConnectionsCsv();<NEW_LINE>if (mCsvFname != null) {<NEW_LINE>Log.d(TAG, "Writing CSV file: " + mCsvFname);<NEW_LINE>boolean error = true;<NEW_LINE>try {<NEW_LINE>OutputStream stream = requireActivity().getContentResolver().openOutputStream(mCsvFname);<NEW_LIN... | .string.file_saved_with_name), fname); |
1,396,794 | final CreateReturnShippingLabelResult executeCreateReturnShippingLabel(CreateReturnShippingLabelRequest createReturnShippingLabelRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createReturnShippingLabelRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequest... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
1,642,420 | private void maybeUpdateBBox() {<NEW_LINE>if (setBottomCounter < 1024 || (setBottomCounter & 0x3F) == 0x3F) {<NEW_LINE><MASK><NEW_LINE>Rectangle box = Rectangle.fromPointDistance(pointLat, pointLon, SloppyMath.haversinMeters(hit.distanceSortKey));<NEW_LINE>// System.out.println(" update bbox to " + box);<NEW_LINE>mi... | NearestHit hit = hitQueue.peek(); |
680,076 | // DELETE /api/admin/elevateword/setting/{id}<NEW_LINE>@Execute<NEW_LINE>public JsonResponse<ApiResult> delete$setting(final String id) {<NEW_LINE>try {<NEW_LINE>elevateWordService.getElevateWord(id).ifPresent(entity -> {<NEW_LINE>try {<NEW_LINE>elevateWordService.delete(entity);<NEW_LINE>suggestHelper.deleteElevateWor... | .OK).result()); |
1,614,447 | public Map<String, INDArray> init(NeuralNetConfiguration conf, INDArray paramsView, boolean initializeParams) {<NEW_LINE>org.deeplearning4j.nn.conf.ocnn.OCNNOutputLayer ocnnOutputLayer = (org.deeplearning4j.nn.conf.ocnn.OCNNOutputLayer) conf.getLayer();<NEW_LINE>Map<String, INDArray> params = Collections.synchronizedMa... | createWeightMatrix(conf, weightsTwoView, initializeParams); |
1,691,807 | public void fromStream() {<NEW_LINE>super.fromStream();<NEW_LINE>String query = document.getProperty("query");<NEW_LINE>this.cfg = new OViewConfig(getName(), query);<NEW_LINE>this.cfg.setUpdatable(Boolean.TRUE.equals(document.getProperty("updatable")));<NEW_LINE>List<Map<String, Object>> <MASK><NEW_LINE>for (Map<String... | idxData = document.getProperty("indexes"); |
1,507,960 | public ListVersionsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListVersionsResult listVersionsResult = new ListVersionsResult();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken t... | int originalDepth = context.getCurrentDepth(); |
124,732 | private static int threeSumCount(int[] values) {<NEW_LINE>// Count triples that sum to 0<NEW_LINE>Map<Integer, List<Integer>> <MASK><NEW_LINE>for (int i = 0; i < values.length; i++) {<NEW_LINE>List<Integer> indexesOfNumber = numbers.get(values[i]);<NEW_LINE>if (indexesOfNumber == null) {<NEW_LINE>List<Integer> indexes ... | numbers = new HashMap<>(); |
135,108 | final DeleteSuppressedDestinationResult executeDeleteSuppressedDestination(DeleteSuppressedDestinationRequest deleteSuppressedDestinationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteSuppressedDestinationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.get... | endClientExecution(awsRequestMetrics, request, response); |
520,774 | public NotificationSettings updateProjectNotificationSettings(long projectId, NotificationSettings settings) throws GitLabApiException {<NEW_LINE>GitLabApiForm formData = new GitLabApiForm().withParam("level", settings.getLevel()).withParam("email", settings.getEmail());<NEW_LINE><MASK><NEW_LINE>if (events != null) {<N... | Events events = settings.getEvents(); |
344,486 | private void preMerge() {<NEW_LINE>if (getSpillFiles() == null || getSpillFiles().size() <= MAX_SPILL_FILES) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>while (getSpillFiles().size() > MAX_SPILL_FILES) {<NEW_LINE>Sink<E> sink = serializationFactory.createSerializer(getSpillStream());<NEW_LINE>Iterator<E> ssi ... | getSpillFiles().removeAll(toRemove); |
1,034,705 | public static void validate(JReleaserContext context) {<NEW_LINE>try {<NEW_LINE>Errors errors = context.validateModel();<NEW_LINE>if (context.getMode() != JReleaserContext.Mode.CHANGELOG) {<NEW_LINE>new JReleaserModelPrinter.Plain(context.getLogger().getTracer()).print(context.getModel().asMap(true));<NEW_LINE>}<NEW_LI... | ) + errors.asString()); |
972,956 | private void selectFiles() {<NEW_LINE>CompactionHelper localHelper;<NEW_LINE>synchronized (this) {<NEW_LINE>if (!closed && fileMgr.beginSelection()) {<NEW_LINE>localHelper = this.chelper;<NEW_LINE>} else {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>Set<StoredTabletFile> selectingFile... | var allFiles = tablet.getDatafiles(); |
1,631,397 | private void _logChanges() {<NEW_LINE>Pair<List<String>, List<String>> result = _changes();<NEW_LINE>List<String> added = result.first;<NEW_LINE>List<MASK><NEW_LINE>ArrayList<Object[]> media = new ArrayList<>(added.size() + removed.size());<NEW_LINE>for (String f : added) {<NEW_LINE>String path = new File(dir(), f).get... | <String> removed = result.second; |
1,755,005 | public static StepResult fromKarateJson(File workingDir, Scenario scenario, Map<String, Object> map) {<NEW_LINE>Map<String, Object> stepMap = (Map) map.get("step");<NEW_LINE>Step step = Step.fromKarateJson(scenario, stepMap);<NEW_LINE>Result result = Result.fromKarateJson((Map) map.get("result"));<NEW_LINE>StepResult s... | ArrayList(embedsList.size()); |
776,940 | private void initJson(String firstPath, Object firstValue, boolean repeatValue) throws IOException {<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug("Initializing JSON with first absolute path: " + firstPath);<NEW_LINE>}<NEW_LINE>String[] segments = firstPath.split("\\.");<NEW_LINE>String currentPath = "";<NEW_... | parent = pathToObjectNode.get(parentPath); |
693,883 | public Void call() {<NEW_LINE>LOG.info("{} start...", dataSourceInfo.getUrl());<NEW_LINE>stop = false;<NEW_LINE>String name = Thread.currentThread().getName();<NEW_LINE>try {<NEW_LINE>Thread.currentThread().setName(dataSourceInfo.getUrl());<NEW_LINE><MASK><NEW_LINE>while ((!isStop() && !timeout(begin))) {<NEW_LINE>Date... | long begin = System.currentTimeMillis(); |
1,447,763 | public static ListAccessPointsResponse unmarshall(ListAccessPointsResponse listAccessPointsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listAccessPointsResponse.setRequestId(_ctx.stringValue("ListAccessPointsResponse.RequestId"));<NEW_LINE>listAccessPointsResponse.setTotalCount(_ctx.integerValue("ListAccessPointsResp... | ("ListAccessPointsResponse.AccessPoints[" + i + "].ActiveSmartAGCount")); |
651,672 | private void testBackup() {<NEW_LINE>File f = new File(MMKV.getRootDir());<NEW_LINE>String backupRootDir = f.getParent() + "/mmkv_backup_3";<NEW_LINE>String mmapID = "test/AES";<NEW_LINE>String otherDir = getFilesDir<MASK><NEW_LINE>boolean ret = MMKV.backupOneToDirectory(mmapID, backupRootDir, otherDir);<NEW_LINE>Log.i... | ().getAbsolutePath() + "/mmkv_3"; |
1,526,526 | public void notifyOfPartitionDeletion(final MetacatDeleteTablePartitionPostEvent event) {<NEW_LINE>log.debug("Received DeleteTablePartition event {}", event);<NEW_LINE>final String name = event.getName().toString();<NEW_LINE>final long timestamp = event.getRequestContext().getTimestamp();<NEW_LINE>final String requestI... | .getRequestContext().getId(); |
1,830,482 | protected List<MetricDatum> metricOfRequestOrRetryCount(Field metricType, Request<?> req, Object resp) {<NEW_LINE>AWSRequestMetrics m = req.getAWSRequestMetrics();<NEW_LINE>TimingInfo ti = m.getTimingInfo();<NEW_LINE>// Always retrieve the request count even for retry which is equivalent<NEW_LINE>// to the number of re... | ()).debug("request count must be at least one"); |
690,973 | static byte[] convert(String source, FileFormat fileFormat, StructurizrPlantUMLExporter structurizrPlantUMLExporter, JsonObject options) {<NEW_LINE>StructurizrDslParser parser = new StructurizrDslParser();<NEW_LINE>try {<NEW_LINE>parser.parse(source);<NEW_LINE>Collection<View> views = parser.getWorkspace().getViews().g... | BadRequestException("Unable to find view for key: " + viewKey + "."); |
267,860 | public static void main(final String[] args) throws IOException {<NEW_LINE>final Circle circle = new Circle();<NEW_LINE>circle.Type = Type.Circle;<NEW_LINE>circle.Radius = 3.14;<NEW_LINE>final Rectangle rectangle = new Rectangle();<NEW_LINE>rectangle.Type = Type.Rectangle;<NEW_LINE>rectangle.Width = 10.0;<NEW_LINE>rect... | .cast(Shape.BOND_TYPE)); |
1,535,069 | public static void convert(GrayS16 input, GrayI8 output) {<NEW_LINE>if (input.isSubimage() || output.isSubimage()) {<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(0, input.height, y -> {<NEW_LINE>for (int y = 0; y < input.height; y++) {<NEW_LINE>int indexSrc = input.getIndex(0, y);<NEW_LINE>int indexDst = output... | int i0 = 0, i1 = N; |
573,143 | protected boolean isAutodetectedBearerOnly(HttpFacade.Request request) {<NEW_LINE>if (!deployment.isAutodetectBearerOnly())<NEW_LINE>return false;<NEW_LINE>String headerValue = facade.getRequest().getHeader("X-Requested-With");<NEW_LINE>if (headerValue != null && headerValue.equalsIgnoreCase("XMLHttpRequest")) {<NEW_LI... | getRequest().getHeader("SOAPAction"); |
1,669,911 | private void sendItems(Filter filter, OutputStream out, PropagationMode propagationMode, boolean sendLocation) throws IOException {<NEW_LINE>ContextBootstrap.debug(MessageID.PROPAGATION_STARTED, "Outgoing");<NEW_LINE>SimpleMap map = getMapIfItExists();<NEW_LINE>if (map != null) {<NEW_LINE>ContextBootstrap.debug(<MASK><... | MessageID.USING_WIRE_ADAPTER, "Writing to", wireAdapter); |
1,177,391 | public static void main(String[] args) throws Exception {<NEW_LINE>AmazonDynamoDB client = AmazonDynamoDBClientBuilder.standard().withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration("http://localhost:8000", "us-west-2")).build();<NEW_LINE>DynamoDB dynamoDB = new DynamoDB(client);<NEW_LINE>Table table =... | println(e.getMessage()); |
1,459,165 | public static TimeValue parseTimeValue(String sValue, TimeValue defaultValue, String settingName) {<NEW_LINE>settingName = Objects.requireNonNull(settingName);<NEW_LINE>if (sValue == null) {<NEW_LINE>return defaultValue;<NEW_LINE>}<NEW_LINE>final String normalized = sValue.toLowerCase(Locale.ROOT).trim();<NEW_LINE>if (... | settingName + "] with value [" + sValue + "] as a time value: unit is missing or unrecognized"); |
82,991 | /*<NEW_LINE>* Performs the logging.<NEW_LINE>*<NEW_LINE>* @param format format-able message.<NEW_LINE>* @param args Arguments for the message, if an exception is being logged last argument is the throwable.<NEW_LINE>*/<NEW_LINE>private void performLogging(LogLevel logLevel, String format, Object... args) {<NEW_LINE>Thr... | MessageFormatter.arrayFormat(format, args); |
1,397,292 | public ByteMatchTuple unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ByteMatchTuple byteMatchTuple = new ByteMatchTuple();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth +... | class).unmarshall(context)); |
1,746,560 | private static int dbInstanceUrlCheck(String stmt, int offset) throws SQLSyntaxErrorException {<NEW_LINE>if (stmt.length() > offset + 11) {<NEW_LINE>char c2 = stmt.charAt(++offset);<NEW_LINE>char c3 = stmt.charAt(++offset);<NEW_LINE>char c4 = stmt.charAt(++offset);<NEW_LINE>char c5 = stmt.charAt(++offset);<NEW_LINE>cha... | "please following the dble hint syntax: /*!" + Versions.ANNOTATION_NAME + "db_instance_url=? */ sql"); |
738,726 | protected void finishInitialSetup(final Avatar avatar) {<NEW_LINE>runOnUiThread(() -> {<NEW_LINE>SoftKeyboardUtils.hideSoftKeyboard(EditAccountActivity.this);<NEW_LINE>final Intent intent;<NEW_LINE>final <MASK><NEW_LINE>final boolean wasFirstAccount = xmppConnectionService != null && xmppConnectionService.getAccounts()... | XmppConnection connection = mAccount.getXmppConnection(); |
342,500 | void chooseClientCertificate(byte[] keyTypeBytes, int[] signatureAlgs, byte[][] asn1DerEncodedPrincipals) throws SSLException, CertificateEncodingException {<NEW_LINE>Set<String> keyTypesSet = SSLUtils.getSupportedClientKeyTypes(keyTypeBytes, signatureAlgs);<NEW_LINE>String[] keyTypes = keyTypesSet.toArray(new String[0... | = new X500Principal[asn1DerEncodedPrincipals.length]; |
1,218,610 | private static String[] makeRuleNames() {<NEW_LINE>return new String[] { "T__0", "T__1", "T__2", "T__3", "T__4", "T__5", "T__6", "T__7", "T__8", "T__9", "T__10", "T__11", "T__12", "T__13", "T__14", "T__15", "T__16", "T__17", "T__18", "T__19", "T__20", "T__21", "T__22", "T__23", "T__24", "T__25", "T__26", "T__27", "T__2... | "STRING_CHAR", "IDENTIFIER", "STRING_LITERAL", "NUMERIC_LITERAL" }; |
52,336 | public void update() {<NEW_LINE>int times = <MASK><NEW_LINE>int type = sp.getInt(TYPE, TYPE_WEEK);<NEW_LINE>long currentTime = System.currentTimeMillis();<NEW_LINE>SharedPreferences.Editor editor = sp.edit();<NEW_LINE>editor.putLong(LAST_SHOW_SMS_KEY, currentTime);<NEW_LINE>switch(type) {<NEW_LINE>case TYPE_WEEK:<NEW_L... | sp.getInt(TIMES, 1); |
494,317 | private boolean evalStrPredicate(DataSnapshot data, EntityKeyValue ekv, StringFilterPredicate predicate, AlarmConditionFilter filter) {<NEW_LINE>String val = getStrValue(ekv);<NEW_LINE>if (val == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>String predicateValue = getPredicateValue(data, predicate.getValue(), fil... | "Operation not supported: " + predicate.getOperation()); |
610,083 | public T linkFrom(BatchOperator<?>... inputs) {<NEW_LINE>BatchOperator<?> in = checkAndGetFirst(inputs);<NEW_LINE>rewriteTreeType(getParams());<NEW_LINE>rewriteLabelType(in.<MASK><NEW_LINE>getParams().set(ModelParamName.FEATURE_TYPES, FlinkTypeConverter.getTypeString(TableUtil.findColTypesWithAssertAndHint(in.getSchema... | getSchema(), getParams()); |
1,084,036 | private void computeAttributeList(Set<AttributeSet> attrsSet) {<NEW_LINE>final var attrSet = new LinkedHashSet<Attribute<?>>();<NEW_LINE>final var sit = attrsSet.iterator();<NEW_LINE>if (sit.hasNext()) {<NEW_LINE>final var first = sit.next();<NEW_LINE>attrSet.addAll(first.getAttributes());<NEW_LINE>while (sit.hasNext()... | >[attrSet.size()]; |
71,861 | public boolean matchStrings(String str, Map<String, String> uriTemplateVariables) {<NEW_LINE>Matcher matcher = <MASK><NEW_LINE>if (matcher.matches()) {<NEW_LINE>if (uriTemplateVariables != null) {<NEW_LINE>if (this.variableNames.size() != matcher.groupCount()) {<NEW_LINE>throw new IllegalArgumentException("The number o... | this.pattern.matcher(str); |
1,793,949 | protected void onDraw(Canvas canvas) {<NEW_LINE>final int viewHeight = getHeight();<NEW_LINE>for (final Star star : stars) {<NEW_LINE>final float starSizeOne = star.scale * baseSize;<NEW_LINE>final float starSizeTwo = star.scale * baseSizeTwo;<NEW_LINE>final float starSizeThree = star.scale * baseSizeThree;<NEW_LINE>if... | , -sizeOne, sizeOne, sizeOne); |
1,794,548 | public RuleMatch[] match(AnalyzedSentence sentence) throws IOException {<NEW_LINE>List<RuleMatch> ruleMatches = new ArrayList<>();<NEW_LINE>AnalyzedTokenReadings[<MASK><NEW_LINE>for (int i = 1; i < tokens.length; i++) {<NEW_LINE>String token = tokens[i].getToken();<NEW_LINE>if (getSubjects().contains(token)) {<NEW_LINE... | ] tokens = sentence.getTokensWithoutWhitespace(); |
645,862 | private static void retrieveMultipleItemsBatchGet() {<NEW_LINE>try {<NEW_LINE>TableKeysAndAttributes forumTableKeysAndAttributes = new TableKeysAndAttributes(forumTableName);<NEW_LINE>// Add a partition key<NEW_LINE>forumTableKeysAndAttributes.addHashOnlyPrimaryKeys("Name", "Amazon S3", "Amazon DynamoDB");<NEW_LINE><MA... | TableKeysAndAttributes threadTableKeysAndAttributes = new TableKeysAndAttributes(threadTableName); |
1,779,163 | private void rebuildPollingTable() {<NEW_LINE>// Rebuild the polling table<NEW_LINE>pollingList.clear();<NEW_LINE>if (converterHandler == null) {<NEW_LINE>logger.debug("ConverterHandler not initialised. Polling disabled.");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Loop all binding providers for the Z-wave binding.<NEW_L... | .getRefreshInterval(eachProvider, name)); |
372,139 | public static DescribeOpenApiUsageResponse unmarshall(DescribeOpenApiUsageResponse describeOpenApiUsageResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeOpenApiUsageResponse.setRequestId(_ctx.stringValue("DescribeOpenApiUsageResponse.RequestId"));<NEW_LINE>describeOpenApiUsageResponse.setTotalCount(_ctx.integerVal... | ("DescribeOpenApiUsageResponse.OpenApiUsageList[" + i + "].ReviewCount")); |
12,885 | public void start() throws Exception {<NEW_LINE>String filename = "upload.txt";<NEW_LINE>FileSystem fs = vertx.fileSystem();<NEW_LINE>WebClient client = WebClient.create(vertx);<NEW_LINE>fs.props(filename, ares -> {<NEW_LINE>FileProps props = ares.result();<NEW_LINE>System.out.println("props is " + props);<NEW_LINE>lon... | "Got HTTP response with status " + response.statusCode()); |
1,050,726 | public void run() {<NEW_LINE>String name = syncItem.getName();<NEW_LINE>String mimeType = getMimeType();<NEW_LINE>// remote stream<NEW_LINE>final StreamSource remoteStream = getRemoteStreamSource(name, mimeType);<NEW_LINE>if (remoteStream == null) {<NEW_LINE>// some error, already processed<NEW_LINE>return;<NEW_LINE>}<... | showError(Bundle.DiffPanel_error_cannotReadFiles()); |
701,409 | private X509Certificate readCert(String assetName) {<NEW_LINE>if (assetName == null || assetName.isEmpty()) {<NEW_LINE>LOGGER.severe(Common.addTag("[SSLSocketFactoryTools] the parameter of <assetName> is null or empty, " + "please check!"));<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>InputStream inputStream = null;<NEW_... | + ex.getMessage())); |
1,676,733 | public void handleGET(CoapExchange exchange) {<NEW_LINE>// get request to read out details<NEW_LINE>Request request = exchange.advanced().getRequest();<NEW_LINE>int accept = request.getOptions().getAccept();<NEW_LINE>if (accept == UNDEFINED) {<NEW_LINE>accept = TEXT_PLAIN;<NEW_LINE>}<NEW_LINE>Response response = new Re... | "Type \"" + ct + "\" is not supported for this resource!", TEXT_PLAIN); |
539,261 | public void unIndex(Class entityClazz, Object entity, EntityMetadata entityMetadata, MetamodelImpl metamodel) {<NEW_LINE>String indexTableName = getIndexTableName(entityMetadata);<NEW_LINE>// byte[] id = PropertyAccessorHelper.get(entity,<NEW_LINE>// (Field)entityMetadata.getIdAttribute().getJavaMember());<NEW_LINE>Obj... | AbstractAttribute) attribute).getBindableJavaType(); |
231,275 | public Regressor convertToOutput(Tensor tensor, ImmutableOutputInfo<Regressor> outputIDInfo) {<NEW_LINE>FloatNdArray predictions = getBatchPredictions(tensor, outputIDInfo.size());<NEW_LINE>long[] shape = predictions.shape().asArray();<NEW_LINE>if (shape[0] != 1) {<NEW_LINE>throw new IllegalArgumentException("Supplied ... | ).getNames()[0]; |
794,585 | public ValueDerivatives optionPriceAdjoint(OptionFunction function, RecombiningTrinomialTreeData data) {<NEW_LINE>int nSteps = data.getNumberOfSteps();<NEW_LINE>ArgChecker.isTrue(nSteps == function.getNumberOfSteps(), "mismatch in number of steps");<NEW_LINE>DoubleArray values = function.getPayoffAtExpiryTrinomial(data... | (i), values, i); |
522,157 | public void initialize() throws InitializationException {<NEW_LINE>try {<NEW_LINE>com.dianping.cat.core.config.Config config = m_configDao.findByName(getConfigName(), ConfigEntity.READSET_FULL);<NEW_LINE>String content = config.getContent();<NEW_LINE>m_configId = config.getId();<NEW_LINE><MASK><NEW_LINE>} catch (DalNot... | m_config = DefaultSaxParser.parse(content); |
698,433 | protected static Map<RenderingHints.Key, Object> buildRenderingHints(Object dithering, Object interpolation) {<NEW_LINE>Map<RenderingHints.Key, Object> rhMap = new HashMap<>();<NEW_LINE>rhMap.put(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);<NEW_LINE>rhMap.put(RenderingHints... | RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON); |
1,086,678 | public void run(RegressionEnvironment env) {<NEW_LINE>String epl = "@name('s0') select theString as currSymbol, " + "prior(2, symbol) as priorSymbol, " + "prior(1, price) as priorPrice " + "from SupportBean#keepall, SupportMarketDataBean#time_batch(1 min)";<NEW_LINE>env.compileDeploy(epl).addListener("s0");<NEW_LINE>//... | sendMarketEvent(env, "C3", 13); |
1,255,675 | public void store() {<NEW_LINE>BrandingModel branding = getBranding();<NEW_LINE>SplashUISupport.setValue(branding.getSplashRunningTextFontSize(), SplashUISupport.numberToString((Number) fontSize.getValue()));<NEW_LINE>SplashUISupport.setValue(branding.getSplashRunningTextBounds(), SplashUISupport.boundsToString((Rectan... | getWidth(null), 10)); |
1,151,495 | private void reconcileStatusBarStyleOnLollipop(final Activity activity, ReadableMap prev, ReadableMap next, boolean firstCall) {<NEW_LINE>if (firstCall || numberHasChanged("statusBarColor", prev, next)) {<NEW_LINE>boolean animated = false;<NEW_LINE>if (next.hasKey("statusBarAnimation")) {<NEW_LINE>animated = !("none".e... | color = next.getInt("statusBarColor"); |
772,787 | public boolean predict(String modelName, byte[] content, CharSequence contentType) throws InterruptedException, IOException {<NEW_LINE>Channel channel = connect(bootstrap, inferencePort);<NEW_LINE>DefaultFullHttpRequest req = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.POST, "/predictions/" + URLEncoder... | .closeFuture().sync(); |
623,351 | /*<NEW_LINE>private void trimUnsafeCommits() throws IOException {<NEW_LINE>assert currentEngineReference.get() == null || currentEngineReference.get() instanceof ReadOnlyEngine : "a write engine is running";<NEW_LINE>final String translogUUID = store.readLastCommittedSegmentsInfo().getUserData(<MASK><NEW_LINE>final lon... | ).get(Translog.TRANSLOG_UUID_KEY); |
271,036 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player opponent = game.getPlayer(this.getTargetPointer()<MASK><NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>if (opponent != null && controller != null) {<NEW_LINE>if (!opponent.getHand().isEmpty()) {<NEW_LINE>opponent.revealCa... | .getFirst(game, source)); |
1,599,145 | /*<NEW_LINE>* JsonReferenceProcessor relies on all of the json in consumes being in a file system (not in a<NEW_LINE>* jar). This method copies all of the json configs out of the jar into a temporary directory so<NEW_LINE>* that JsonReferenceProcessor can find them.<NEW_LINE>*/<NEW_LINE>public static <T> Path prepareSc... | collect(Collectors.toList()); |
925,632 | public static void handleArchiveFileException(DataTypeManagerPlugin plugin, ResourceFile archiveFile, Throwable t) {<NEW_LINE>if (t instanceof FileNotFoundException) {<NEW_LINE>Msg.showError(plugin, plugin.getProvider().getComponent(), "File Not Found", <MASK><NEW_LINE>} else if (t instanceof IOException) {<NEW_LINE>Th... | archiveFile.getAbsolutePath() + " not found!"); |
1,167,940 | public static ListPlansResponse unmarshall(ListPlansResponse listPlansResponse, UnmarshallerContext _ctx) {<NEW_LINE>listPlansResponse.setRequestId<MASK><NEW_LINE>List<Plan> plans = new ArrayList<Plan>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListPlansResponse.Plans.Length"); i++) {<NEW_LINE>Plan plan = new Pl... | (_ctx.stringValue("ListPlansResponse.RequestId")); |
1,166,429 | protected void translateCore(final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions) {<NEW_LINE>final IOperandTreeNode registerOperand1 = instruction.getOperands().get(0).getRootNode().getChildren().get(0);<NEW_LINE>final IOperandTreeNode registerOperand2 = i... | ReilHelpers.nextReilAddress(instruction, instructions); |
344,511 | public String adapt(Tagging tagging) {<NEW_LINE>StringBuilder tagBuilder = new StringBuilder();<NEW_LINE>if (tagging != null && !tagging.tagSet().isEmpty()) {<NEW_LINE>Tagging taggingClone = tagging.toBuilder().build();<NEW_LINE>Tag firstTag = taggingClone.tagSet().get(0);<NEW_LINE>tagBuilder.append(SdkHttpUtils.urlEnc... | (t.key())); |
386,753 | public void discardUpdates() {<NEW_LINE>ApplicationDescriptor desc = null;<NEW_LINE>if (_live) {<NEW_LINE>desc = _coordinator.getLiveDeploymentRoot().getApplicationDescriptor(_id);<NEW_LINE>assert desc != null;<NEW_LINE>desc = com.zeroc.IceGridGUI.<MASK><NEW_LINE>} else if (_file != null) {<NEW_LINE>desc = _coordinator... | Application.Root.copyDescriptor(desc); |
1,809,716 | public GameButton recoverData(Context context, CallCustomizeKeyboard call, Controller controller, CkbManager manager) {<NEW_LINE>GameButton gb = new GameButton(<MASK><NEW_LINE>gb.setKeyMaps(this.keyMaps);<NEW_LINE>gb.setKeyTypes(this.keyTypes);<NEW_LINE>gb.setDesignIndex(this.designIndex);<NEW_LINE>gb.setCornerRadius(t... | context, call, controller, manager); |
1,097,684 | public MapEntryUpdateResult<K, byte[]> putAndGet(K key, byte[] value, long ttl) {<NEW_LINE>MapEntryValue oldValue = entries().get(key);<NEW_LINE>MapEntryValue newValue = new MapEntryValue(MapEntryValue.Type.VALUE, getCurrentIndex(), value, getWallClock().getTime().unixTimestamp(), ttl);<NEW_LINE>// Check if there's a p... | , key, toVersioned(oldValue)); |
1,016,388 | public void translate(final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions) throws InternalTranslationException {<NEW_LINE>TranslationHelpers.checkTranslationArguments(environment, instruction, instructions, "movsx");<NEW_LINE>if (instruction.getOperands().... | String sourceOperand = sourceResult.getRegister(); |
1,829,156 | public boolean isInheritedFrom(String fullyQualifiedTypeName) {<NEW_LINE>if (declaringType == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Stack<FullyQualified> interfaces = new Stack<>();<NEW_LINE>interfaces.addAll(declaringType.getInterfaces());<NEW_LINE>while (!interfaces.isEmpty()) {<NEW_LINE>FullyQualified d... | addAll(declaring.getInterfaces()); |
72,425 | public void handleControlMessage(SIBUuid8 sourceMEUuid, ControlMessage cMsg) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(tc, "handleControlMessage", new Object<MASK><NEW_LINE>InvalidOperationException e = new InvalidOperationException(nls.getFormattedMessage("INTERNA... | [] { sourceMEUuid, cMsg }); |
1,721,996 | /* soft right bound */<NEW_LINE>@Reviewed(when = "16/11/2020")<NEW_LINE>@Original(version = "2.38.0", path = "lib/dotgen/flat.c", name = "flat_limits", key = "3bc4otcsxj1dujj49ydbb19oa", definition = "static int flat_limits(graph_t * g, edge_t * e)")<NEW_LINE>public static int flat_limits(ST_Agraph_s g, ST_Agedge_s e) ... | ] bounds = new int[4]; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.