idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,509,544 | public void takeResult(Player player, ItemStack result, int amount) {<NEW_LINE>// local variable just to prevent race conditions if the field changes, though that is unlikely<NEW_LINE>CraftingRecipe recipe = this.lastRecipe;<NEW_LINE>if (recipe == null || this.level == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// fi... | original = this.getItem(i); |
752,697 | public static PlayerInteractEvent callPlayerInteractEvent(ServerPlayerEntity who, Action action, BlockPos position, Direction direction, ItemStack itemstack, boolean cancelledBlock, Hand hand) {<NEW_LINE>Player player = (who == null) ? null : (Player) ((IMixinServerEntityPlayer) who).getBukkitEntity();<NEW_LINE>CraftIt... | (WorldImpl) player.getWorld(); |
12,512 | public Optional<IdoResolvedResource> resolveCompactId(@Nonnull String compactId) {<NEW_LINE>String url = String.format("https://resolver.api.identifiers.org/%s", compactId);<NEW_LINE>HttpGet httpGet = new HttpGet(url);<NEW_LINE>try {<NEW_LINE>HttpResponse <MASK><NEW_LINE>if (response.getStatusLine().getStatusCode() == ... | response = client.execute(httpGet); |
306,234 | public void onAnimationEnd(Animator animation) {<NEW_LINE>--mDismissAnimationRefCount;<NEW_LINE>if (mDismissAnimationRefCount == 0) {<NEW_LINE>// No active animations, process all pending dismisses.<NEW_LINE>// Sort by descending position<NEW_LINE>Collections.sort(mPendingDismisses);<NEW_LINE>int[] dismissPositions = n... | ACTION_CANCEL, 0, 0, 0); |
1,086,547 | final GetTestGridSessionResult executeGetTestGridSession(GetTestGridSessionRequest getTestGridSessionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getTestGridSessionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetri... | addHandlerContext(HandlerContextKey.SERVICE_ID, "Device Farm"); |
1,713,917 | public Map<String, Object> toMap() {<NEW_LINE>Map<String, Object> m = new LinkedHashMap<String, Object>();<NEW_LINE>m.put("traceid", this.traceId);<NEW_LINE>m.put("spanid", this.spanId);<NEW_LINE>m.put("parentid", this.parentId);<NEW_LINE>m.put("eptype", this.endPointType.toString());<NEW_LINE>m.put("stime", this.start... | put("epinfo", this.endpointInfo); |
1,169,042 | public void update() {<NEW_LINE>Sandbox sandbox = Sandbox.getInstance();<NEW_LINE>OrthographicCamera camera = Sandbox.getInstance().getCamera();<NEW_LINE>int pixelPerWU = sandbox.sceneControl.sceneLoader.getRm().getProjectVO().pixelToWorld;<NEW_LINE>Vector2 position = Pools.obtain(Vector2.class);<NEW_LINE>position.x = ... | getInstance().worldToScreen(position); |
818,715 | public void updateModel(@NonNull Model model) {<NEW_LINE>this.shouldUpdate.set(true);<NEW_LINE>try {<NEW_LINE>modelLock.writeLock().lock();<NEW_LINE>if (replicatedModel instanceof MultiLayerNetwork) {<NEW_LINE>replicatedModel.setParams(model.params().unsafeDuplication(true));<NEW_LINE>Updater updater = ((MultiLayerNetw... | .writeLock().unlock(); |
372,515 | public int compareTo(beginBlobDownload_result other) {<NEW_LINE>if (!getClass().equals(other.getClass())) {<NEW_LINE>return getClass().getName().compareTo(other.getClass().getName());<NEW_LINE>}<NEW_LINE>int lastComparison = 0;<NEW_LINE>lastComparison = Boolean.valueOf(is_set_success()).<MASK><NEW_LINE>if (lastComparis... | compareTo(other.is_set_success()); |
157,466 | public void handleChunkGenerate(ServerWorld world, Chunk chunk) {<NEW_LINE>if (!onchunkgenerate)<NEW_LINE>return;<NEW_LINE>FabricWorld fw = getWorld(world, false);<NEW_LINE>ChunkPos chunkPos = chunk.getPos();<NEW_LINE>int ymax = Integer.MIN_VALUE;<NEW_LINE>int ymin = Integer.MAX_VALUE;<NEW_LINE>ChunkSection[] sections ... | sections[i].getYOffset(); |
691,667 | public void transform() {<NEW_LINE>g = new int[8][8];<NEW_LINE>for (int i = 0; i < 8; i++) {<NEW_LINE>for (int j = 0; j < 8; j++) {<NEW_LINE>double ge = 0.0;<NEW_LINE>for (int x = 0; x < 8; x++) {<NEW_LINE>for (int y = 0; y < 8; y++) {<NEW_LINE>double cg1 = (2.0 * (double) x + 1.0) * (double) i * Math.PI / 16.0;<NEW_LI... | int) Math.round(ge); |
567,814 | private void dealWithUnsatisifedXMLTimers(Map<String, List<com.ibm.ws.javaee.dd.ejb.Timer>> timers1ParmByMethodName, Map<String, List<com.ibm.ws.javaee.dd.ejb.Timer>> timers0ParmByMethodName, BeanMetaData bmd) throws EJBConfigurationException {<NEW_LINE>String oneMethodInError = null;<NEW_LINE>String last1ParmError = d... | ) + " module has an automatic timer configured in the deployment descriptor for the " + oneMethodInError + " method, but no timeout callback method with that name was found."); |
1,573,772 | public static void addMapViewLanguageMenuItems(final Menu menu) {<NEW_LINE>final MenuItem parentMenu = menu.findItem(R.id.menu_select_language);<NEW_LINE>if (languages != null) {<NEW_LINE>final int currentLanguage = Settings.getMapLanguageId();<NEW_LINE>final SubMenu subMenu = parentMenu.getSubMenu();<NEW_LINE>subMenu.... | languages[i].hashCode(); |
34,922 | public void saveGpx(final String fileName) {<NEW_LINE>new SaveGpxAsyncTask(app, getGpx(), fileName, false).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);<NEW_LINE>hasUnsavedChanges = false;<NEW_LINE>app.getMapMarkersHelper().addOrEnableGroup(getGpx());<NEW_LINE>if (listener != null) {<NEW_LINE>listener.onPointsSave... | ().path), null); |
187,951 | public static boolean matchesAqueryFilters(ActionAnalysisMetadata action, AqueryActionFilter actionFilters) {<NEW_LINE>NestedSet<Artifact> inputs = action.getInputs();<NEW_LINE>Iterable<Artifact> outputs = action.getOutputs();<NEW_LINE><MASK><NEW_LINE>if (actionFilters.hasFilterForFunction(MNEMONIC)) {<NEW_LINE>if (!ac... | String mnemonic = action.getMnemonic(); |
98,986 | public void write_scope_int(IndentFileWriter p_file, IdentifierType p_identifier_type) throws java.io.IOException {<NEW_LINE>p_file.start_scope();<NEW_LINE>p_file.write("polygon ");<NEW_LINE>p_identifier_type.write(this.layer.name, p_file);<NEW_LINE>p_file.write(" ");<NEW_LINE>p_file.write((Integer.valueOf(0)).toString... | write(curr_coor.toString()); |
790,151 | public void putFloats(long[] time, float[] value, BitMap bitMap, int start, int end) {<NEW_LINE>checkExpansion();<NEW_LINE>int idx = start;<NEW_LINE>// constraint: time.length + timeIdxOffset == value.length<NEW_LINE>int timeIdxOffset = 0;<NEW_LINE>if (bitMap != null && !bitMap.isAllUnmarked()) {<NEW_LINE>// time array... | clonedTime, 0, end - start); |
822,227 | public void serialize(XPathBodyDTO xPathBodyDTO, JsonGenerator jgen, SerializerProvider provider) throws IOException {<NEW_LINE>jgen.writeStartObject();<NEW_LINE>if (xPathBodyDTO.getNot() != null && xPathBodyDTO.getNot()) {<NEW_LINE>jgen.writeBooleanField("not", xPathBodyDTO.getNot());<NEW_LINE>}<NEW_LINE>if (xPathBody... | getType().name()); |
630,124 | public void execute(final EditorAdaptor editorAdaptor, final int count) throws CommandExecutionException {<NEW_LINE>final IWorkbenchPartSite site = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActivePart().getSite();<NEW_LINE>final EPartService psvc = (EPartService) <MASK><NEW_LINE>final MPar... | site.getService(EPartService.class); |
369,443 | private void pushLaunchPopup() {<NEW_LINE>Config config = context.get(Config.class);<NEW_LINE>TelemetryConfig telemetryConfig = config.getTelemetryConfig();<NEW_LINE>TranslationSystem translationSystem = context.get(TranslationSystem.class);<NEW_LINE><MASK><NEW_LINE>if (!telemetryConfig.isLaunchPopupDisabled()) {<NEW_L... | TelemetryLogstashAppender appender = TelemetryUtils.fetchTelemetryLogstashAppender(); |
1,083,348 | public VmServerAddress unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>VmServerAddress vmServerAddress = new VmServerAddress();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDep... | class).unmarshall(context)); |
1,374,021 | protected boolean decodeMode(AztecPyramid locator, AztecCode marker) {<NEW_LINE>marker.locator.setTo(locator);<NEW_LINE>Structure type = locator.layers.size == 1 ? Structure.COMPACT : Structure.FULL;<NEW_LINE>// Read the pixel values once<NEW_LINE>readModeBitsFromImage(locator);<NEW_LINE>// Determine the orientation<NE... | .get(layerIdx).square); |
1,233,183 | public com.amazonaws.services.organizations.model.EffectivePolicyNotFoundException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.organizations.model.EffectivePolicyNotFoundException effectivePolicyNotFoundException = new com.amazonaws.services.organizations.mo... | JsonToken token = context.getCurrentToken(); |
1,742,011 | public void uncaughtException(Thread thread, Throwable ex) {<NEW_LINE>ShareTinkerLog.e(TAG, "TinkerUncaughtHandler catch exception:" + Log.getStackTraceString(ex));<NEW_LINE>ueh.uncaughtException(thread, ex);<NEW_LINE>if (crashFile != null) {<NEW_LINE>Thread.UncaughtExceptionHandler handler = Thread.getDefaultUncaughtE... | os.Process.myPid()); |
174,913 | private static String formatFolderListingTableHtml(String folderName, List<FileMetadata> fileMetadatas, String apiLocation, boolean originals) {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append(formatFolderListingTableHeaderHtml());<NEW_LINE>for (FileMetadata fileMetadata : fileMetadatas) {<NEW_LINE>... | , subFolder.indexOf('/')); |
528,051 | protected synchronized // but it does not hurt. Just to be safe.<NEW_LINE>void initPool(ResourceAllocator allocator) throws PoolingException {<NEW_LINE>if (poolInitialized) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>this.allocator = allocator;<NEW_LINE>createResources(this.allocator, <MASK><NEW_LINE>// if the idle time out... | steadyPoolSize - ds.getResourcesSize()); |
652,265 | public UriBuilder queryParam(String name, Object... values) throws IllegalArgumentException {<NEW_LINE>if (values == null) {<NEW_LINE>throw new IllegalArgumentException("The values must not be null");<NEW_LINE>}<NEW_LINE>CharSequence ncs;<NEW_LINE>ncs = EncodeOrCheck.nameOrValue(name, true, "query parameter name");<NEW... | query = (StringBuilder) this.query; |
638,622 | private <K, InputT> boolean isApplicable(Map<TupleTag<?>, PCollection<?>> inputs, GlobalCombineFn<InputT, ?, ?> fn) {<NEW_LINE>if (!(fn instanceof CombineFn)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (inputs.size() == 1) {<NEW_LINE>PCollection<KV<K, InputT>> input = (PCollection<KV<K, InputT>>) Iterables.getOnly... | .getSimpleName()), e); |
1,334,090 | final ListLicensesResult executeListLicenses(ListLicensesRequest listLicensesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listLicensesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<ListLicensesRequest> ... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
341,861 | private void snapshotScriptFileTo(String fileName, File sourceFile, File outputFile, boolean binary, boolean wrapped) throws IOException {<NEW_LINE>JSRealm realm = JavaScriptLanguage.getCurrentJSRealm();<NEW_LINE>JSContext context = realm.getContext();<NEW_LINE>Recording.logv("recording snapshot of %s", fileName);<NEW_... | throw new RuntimeException(fileName, e); |
1,820,817 | protected String handleOtherXCosts(Game game, Player controller) {<NEW_LINE>StringBuilder announceString = new StringBuilder();<NEW_LINE>for (VariableCost variableCost : this.costs.getVariableCosts()) {<NEW_LINE>if (!(variableCost instanceof VariableManaCost) && !((Cost) variableCost).isPaid()) {<NEW_LINE>int xValue = ... | + variableCost.getActionText() + ')'; |
1,804,423 | final GetResourceMetricsResult executeGetResourceMetrics(GetResourceMetricsRequest getResourceMetricsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getResourceMetricsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetri... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
1,593,620 | public Serializable doTestWork(EntityManager em, UserTransaction tx, Object managedComponentObject) {<NEW_LINE>System.out.println("Begin Running TestWorkRequest.doTestWork(twr) on " + managedComponentObject + " ...");<NEW_LINE>try {<NEW_LINE>System.out.println("Finding SimpleVersionedEntity10(id=" + identity + ") ...")... | .get(0), findEntity); |
619,934 | // </editor-fold>//GEN-END:initComponents<NEW_LINE>private void chooseFolderButtonActionPerformed(java.awt.event.ActionEvent evt) {<NEW_LINE>// GEN-FIRST:event_chooseFolderButtonActionPerformed<NEW_LINE>JTextComponent comboEditor = ((JTextComponent) urlComboBox.getEditor().getEditorComponent());<NEW_LINE>File file = nu... | File f = fileChooser.getSelectedFile(); |
1,393,211 | public void execute(AdminCommandContext adminCommandContext) {<NEW_LINE>Config targetConfig = targetUtil.getConfig(target);<NEW_LINE>if (targetConfig == null) {<NEW_LINE>adminCommandContext.getActionReport().setMessage("No such config name: " + targetUtil);<NEW_LINE>adminCommandContext.getActionReport().setActionExitCo... | getActionReport().setExtraProperties(extraProperties); |
900,741 | private void uiTest() throws Exception {<NEW_LINE>screens = new Screens(new Framebuffer(config), config.teamName);<NEW_LINE>try {<NEW_LINE>while (true) {<NEW_LINE>String input = screens.readQRCode();<NEW_LINE>if (!screens.approveAction("You are trying to transfer 10000 btc to hackers. Sounds cool?")) {<NEW_LINE>System.... | command = screens.displayQRCode(input); |
1,413,925 | private synchronized void check() {<NEW_LINE>if (closeable.isClosing()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final RequestHeaders headers;<NEW_LINE>final RequestHeadersBuilder builder = RequestHeaders.builder(useGet ? HttpMethod.GET : HttpMethod.HEAD, path).authority(authority);<NEW_LINE>if (maxLongPollingSeconds > 0... | withoutContext(), SubscriptionOption.WITH_POOLED_OBJECTS); |
1,614,301 | static List<ClassNode> createDiffClasses(Heap h1, Heap h2, final boolean retained) {<NEW_LINE>if (retained) {<NEW_LINE>if (!DataType.RETAINED_SIZE.valuesAvailable(h1))<NEW_LINE><MASK><NEW_LINE>if (!DataType.RETAINED_SIZE.valuesAvailable(h2))<NEW_LINE>DataType.RETAINED_SIZE.computeValuesImmediately(h2);<NEW_LINE>}<NEW_L... | DataType.RETAINED_SIZE.computeValuesImmediately(h1); |
176,409 | public DruidExpression toDruidExpression(final PlannerContext plannerContext, final RowSignature rowSignature, final RexNode rexNode) {<NEW_LINE>// EXTRACT(timeUnit FROM arg)<NEW_LINE><MASK><NEW_LINE>final RexLiteral flag = (RexLiteral) call.getOperands().get(0);<NEW_LINE>final TimeUnitRange calciteUnit = (TimeUnitRang... | final RexCall call = (RexCall) rexNode; |
60,802 | public DataStore initialize(Map<String, Object> dsInfos) {<NEW_LINE>String url = (String) dsInfos.get("url");<NEW_LINE>Long zoneId = (Long) dsInfos.get("zoneId");<NEW_LINE>String storagePoolName = (String) dsInfos.get("name");<NEW_LINE>String providerName = (<MASK><NEW_LINE>Long capacityBytes = (Long) dsInfos.get("capa... | String) dsInfos.get("providerName"); |
1,367,336 | final PutEmailIdentityMailFromAttributesResult executePutEmailIdentityMailFromAttributes(PutEmailIdentityMailFromAttributesRequest putEmailIdentityMailFromAttributesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(putEmailIdentityMailFromAttributesRequest);<NEW_LINE>AWSRequestMetrics awsRe... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutEmailIdentityMailFromAttributes"); |
920,759 | public void validate(CreateTable createTable) {<NEW_LINE>for (ValidationCapability c : getCapabilities()) {<NEW_LINE>validateFeature(c, Feature.createTable);<NEW_LINE>validateFeature(c, createTable.isUnlogged(), Feature.createTableUnlogged);<NEW_LINE>validateOptionalFeature(c, createTable.getCreateOptionsStrings(), Fea... | ).getFullyQualifiedName(), false); |
1,819,061 | public Iterator<ChangeSet> iterator() {<NEW_LINE>return new Iterator<ChangeSet>() {<NEW_LINE><NEW_LINE>private final IntSet recursionGuard = IntSets.newHashSet(1000);<NEW_LINE><NEW_LINE>private ChangeSetHolder currentBlock;<NEW_LINE><NEW_LINE>private ChangeSet next = fetchNext();<NEW_LINE><NEW_LINE>public boolean hasNe... | readPrevious(currentBlock.id, recursionGuard); |
1,735,070 | public boolean onTouchEvent(MotionEvent ev) {<NEW_LINE>boolean result;<NEW_LINE>MotionEvent event = MotionEvent.obtain(ev);<NEW_LINE>final int action = event.getActionMasked();<NEW_LINE>if (action == MotionEvent.ACTION_DOWN) {<NEW_LINE>mNestedOffsetY = 0;<NEW_LINE>}<NEW_LINE>int eventY = (int) event.getY();<NEW_LINE><M... | event.offsetLocation(0, mNestedOffsetY); |
1,228,180 | public Log create(SessionID sessionID, String callerFQCN) {<NEW_LINE>String eventCategory = null;<NEW_LINE>String errorEventCategory = null;<NEW_LINE>String incomingMsgCategory = null;<NEW_LINE>String outgoingMsgCategory = null;<NEW_LINE>boolean prependSessionID = true;<NEW_LINE>boolean logHeartbeats = true;<NEW_LINE>t... | settings.getBool(sessionID, SETTING_PREPEND_SESSION_ID); |
1,484,799 | public static ClassPathEntry createEntryForUrl(TreeLogger logger, URL url) throws URISyntaxException, IOException {<NEW_LINE>if (url.getProtocol().equals("file")) {<NEW_LINE>File f = new File(url.toURI());<NEW_LINE>String lowerCaseFileName = f.getName(<MASK><NEW_LINE>if (f.isDirectory()) {<NEW_LINE>return new Directory... | ).toLowerCase(Locale.ROOT); |
557,641 | private void loadNode96() {<NEW_LINE>UaObjectTypeNode node = new UaObjectTypeNode(this.context, Identifiers.ShelvedStateMachineType, new QualifiedName(0, "ShelvedStateMachineType"), new LocalizedText("en", "ShelvedStateMachineType"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger<MASK><NEW_LINE>node.addReferen... | .valueOf(0), false); |
73,049 | public ClassHash computeHash(JavaClass javaClass) {<NEW_LINE>this.className = javaClass.getClassName();<NEW_LINE>Method[] methodList = new Method[javaClass.getMethods().length];<NEW_LINE>// Sort methods<NEW_LINE>System.arraycopy(javaClass.getMethods(), 0, methodList, 0, javaClass.getMethods().length);<NEW_LINE>Arrays.s... | javaClass.getFields().length); |
517,164 | private void maskPayload(ByteBuffer buffer, Frame frame) {<NEW_LINE>byte[] mask = frame.getMask();<NEW_LINE>int maskInt = 0;<NEW_LINE>for (byte maskByte : mask) {<NEW_LINE>maskInt = (maskInt << 8) + (maskByte & 0xFF);<NEW_LINE>}<NEW_LINE>// perform data masking here<NEW_LINE>ByteBuffer payload = frame.getPayload();<NEW... | int start = payload.position(); |
232,792 | public boolean isValidSudoku(char[][] board) {<NEW_LINE>Character[][] column = new Character[9][9];<NEW_LINE>Character[][] sub = new Character[9][9];<NEW_LINE>Character[] row = new Character[9];<NEW_LINE>int m = board.length, n = board[0].length;<NEW_LINE>for (int i = 0; i < m; i++) {<NEW_LINE>for (int j = 0; j < n; j+... | 3) * 3 + j / 3; |
1,342,821 | private JPanel buildMainPanel(GhidraProgramTableModel<T> tableModel, GoToService gotoService) {<NEW_LINE>JPanel panel = new JPanel(new BorderLayout());<NEW_LINE>threadedPanel = new GhidraThreadedTablePanel<>(tableModel);<NEW_LINE>GhidraTable table = threadedPanel.getTable();<NEW_LINE>table.getSelectionModel().addListSe... | table.installNavigation(gotoService, navigatable); |
1,771,590 | protected void iterate2NetbeansActionMapping(Counter counter, Element parent, java.util.Collection list, java.lang.String childTag) {<NEW_LINE>Iterator it = list.iterator();<NEW_LINE>Iterator elIt = parent.getChildren(childTag, parent.getNamespace()).iterator();<NEW_LINE>if (!elIt.hasNext())<NEW_LINE>elIt = null;<NEW_L... | counter.getDepth() + 1); |
1,027,963 | private ClientResponse translate(final ClientRequest requestContext, final HttpResponseStatus status, final HttpResponseHeaders headers, final NonBlockingInputStream entityStream) {<NEW_LINE>final ClientResponse responseContext = new ClientResponse(new Response.StatusType() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>publi... | familyOf(status.getStatusCode()); |
766,545 | public com.amazonaws.services.panorama.model.AccessDeniedException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.panorama.model.AccessDeniedException accessDeniedException = new com.amazonaws.services.panorama.model.AccessDeniedException(null);<NEW_LINE>int or... | JsonToken token = context.getCurrentToken(); |
1,363,435 | public JobDetails unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>JobDetails jobDetails = new JobDetails();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>Jso... | class).unmarshall(context)); |
662,539 | public void onModification(SecurityContext securityContext, ErrorBuffer errorBuffer, final ModificationQueue modificationQueue) throws FrameworkException {<NEW_LINE>super.onModification(securityContext, errorBuffer, modificationQueue);<NEW_LINE>if (Boolean.TRUE.equals(getProperty(deleteMethod))) {<NEW_LINE>StructrApp.g... | e -> e.acknowledge()); |
1,675,111 | public Set keySet(Predicate predicate) {<NEW_LINE>checkTransactionState();<NEW_LINE>checkNotNull(predicate, "Predicate should not be null!");<NEW_LINE>checkNotInstanceOf(PagingPredicate.class, predicate, "Paging is not supported for Transactional queries!");<NEW_LINE>QueryEngine queryEngine = mapServiceContext.getQuery... | new HashSet<Object>(queryResultSet); |
678,686 | protected void internalWrite(Server server, Query query, ImmutableList<Result> results) throws Exception {<NEW_LINE>for (Result result : results) {<NEW_LINE>log.debug("Query result: [{}]", result);<NEW_LINE>if (isNumeric(result.getValue())) {<NEW_LINE>Map<String, Object> map = new HashMap<>();<NEW_LINE>map.put("serverA... | addToIndex = jestClient.execute(index); |
95,662 | public OSelectStatement copy() {<NEW_LINE>OSelectStatement result = null;<NEW_LINE>try {<NEW_LINE>result = getClass().getConstructor(Integer.TYPE).newInstance(-1);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new RuntimeException(e);<NEW_LINE>}<NEW_LINE>result.originalStatement = originalStatement;<NEW_LINE>result.t... | ? null : projection.copy(); |
719,027 | // Run a random test between A* and Dijkstra<NEW_LINE>public static void main(String[] args) {<NEW_LINE>Random RANDOM = new Random();<NEW_LINE>int n = 20 * 20;<NEW_LINE>Map<Integer, List<Edge>> graph = new HashMap<>();<NEW_LINE>for (int i = 0; i < n; i++) graph.put(i, new ArrayList<>());<NEW_LINE>double[] X = new doubl... | locations[2 * k] = node1; |
645,490 | private Object calculateWithOpPriority(OResult iCurrentRecord, OCommandContext ctx) {<NEW_LINE>Deque valuesStack = new ArrayDeque<>();<NEW_LINE>Deque<Operator> operatorsStack = new ArrayDeque<Operator>();<NEW_LINE>OMathExpression nextExpression = childExpressions.get(0);<NEW_LINE>Object val = nextExpression.execute(iCu... | val == null ? NULL_VALUE : val); |
266,649 | static Version of(Stream<String> lines) {<NEW_LINE>final Iterator<String> it = lines.iterator();<NEW_LINE>while (it.hasNext()) {<NEW_LINE>final String line = it.next();<NEW_LINE>final Matcher matcher = PATTERN.matcher(line);<NEW_LINE>if (matcher.find()) {<NEW_LINE>// GraalVM/Mandrel:<NEW_LINE>final String version = mat... | 11 : Integer.parseInt(jFeatureMatch); |
460,181 | public static RecognizeLogoResponse unmarshall(RecognizeLogoResponse recognizeLogoResponse, UnmarshallerContext _ctx) {<NEW_LINE>recognizeLogoResponse.setRequestId(_ctx.stringValue("RecognizeLogoResponse.RequestId"));<NEW_LINE>Data data = new Data();<NEW_LINE>List<Element> elements = new ArrayList<Element>();<NEW_LINE>... | + "].Results[" + j + "].Rate")); |
701,498 | protected Object doWork() {<NEW_LINE>if (roundDown && (staticQuantizationQuals == null || staticQuantizationQuals.isEmpty())) {<NEW_LINE>throw new CommandLineException.BadArgumentValue(ROUND_DOWN_QUANTIZED_LONG_NAME, <MASK><NEW_LINE>}<NEW_LINE>staticQuantizedMapping = constructStaticQuantizedMapping(staticQuantizationQ... | "true", "This option can only be used if " + STATIC_QUANTIZED_QUALS_LONG_NAME + " is also used."); |
1,613,823 | public LambdaCodeHook unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>LambdaCodeHook lambdaCodeHook = new LambdaCodeHook();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth +... | class).unmarshall(context)); |
899,712 | public Map<String, Boolean> updateConfiguration(Map<String, String> propertiesMap) {<NEW_LINE>Map<String, Boolean> result = new HashMap<>();<NEW_LINE>int successCount = 0;<NEW_LINE>for (Map.Entry<String, String> entry : propertiesMap.entrySet()) {<NEW_LINE>try {<NEW_LINE>PropertyKey key = PropertyKey.fromString(entry.g... | getValue(), Source.RUNTIME); |
1,221,989 | private static void saveRegisteredIndicesAndDropUnregisteredOnes(@Nonnull Collection<? extends ID<?, ?>> ids) {<NEW_LINE>if (ApplicationManager.getApplication().isDisposed() || !IndexInfrastructure.hasIndices()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final File registeredIndicesFile = new File(ContainerPathManager.get(... | ).getIndexRoot(), "registered"); |
150,540 | public void onReceive(final Context context, Intent intent) {<NEW_LINE>// Only handle calls received<NEW_LINE>if (!"android.intent.action.PHONE_STATE".equals(intent.getAction())) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>DataHandler dataHandler = KissApplication.getApplication(context).getDataHandler();<NEW... | ContactsProvider contactsProvider = dataHandler.getContactsProvider(); |
216,677 | @ApiOperation(value = "Get a thread dump of the given node")<NEW_LINE>@RequiresPermissions(RestPermissions.THREADS_DUMP)<NEW_LINE>@Path("{nodeId}/threaddump")<NEW_LINE>public SystemThreadDumpResponse threadDump(@ApiParam(name = "nodeId", value = "The id of the node to get a thread dump.", required = true) @PathParam("n... | .threadDump().execute(); |
1,150,198 | public ClientRepresentation update(String clientId, ClientRegistrationContext context) {<NEW_LINE>ClientRepresentation rep = context.getClient();<NEW_LINE>event.event(EventType.CLIENT_UPDATE).client(clientId);<NEW_LINE>ClientModel client = session.getContext().getRealm().getClientByClientId(clientId);<NEW_LINE>Registra... | getClientId()).success(); |
1,701,368 | public static RBCompIntFloatMatrix blas2RBCompDense(BlasFloatMatrix mat, int subDim) {<NEW_LINE>int dim = mat.getNumCols();<NEW_LINE>int numRows = mat.getNumRows();<NEW_LINE>int numComp = (dim + subDim - 1) / subDim;<NEW_LINE>float[] data = mat.getData();<NEW_LINE>CompIntFloatVector[] rows = new CompIntFloatVector[numR... | subDim, part, 0, thisSubDim); |
311,551 | protected void parseBuffer(String itemName, Command aCommand, Direction theDirection, ByteBuffer byteBuffer) {<NEW_LINE>String theUpdate = "";<NEW_LINE>try {<NEW_LINE>theUpdate = new String(byteBuffer.array(), charset).split("\0")[0];<NEW_LINE>} catch (UnsupportedEncodingException e) {<NEW_LINE>logger.warn("Exception w... | eventPublisher.postUpdate(itemName, newState); |
549,309 | final DescribeSpotFleetInstancesResult executeDescribeSpotFleetInstances(DescribeSpotFleetInstancesRequest describeSpotFleetInstancesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeSpotFleetInstancesRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecut... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
1,049,817 | public static Map<String, String> populatePersistenceUnitProperties(PropertyReader reader) {<NEW_LINE>String dbType = reader.getProperty(EthConstants.DATABASE_TYPE);<NEW_LINE>String host = reader.getProperty(EthConstants.DATABASE_HOST);<NEW_LINE>String port = reader.getProperty(EthConstants.DATABASE_PORT);<NEW_LINE>Str... | LOGGER.info("Kundera properties : " + props); |
1,334,216 | static List<IndexChange> readTransactionIndexChanges(OChannelDataInput channel, ORecordSerializerNetworkV37 serializer) throws IOException {<NEW_LINE>List<IndexChange> changes = new ArrayList<>();<NEW_LINE>int val = channel.readInt();<NEW_LINE>while (val-- > 0) {<NEW_LINE>String indexName = channel.readString();<NEW_LI... | changesPerKey.add(id, oper); |
1,103,038 | public static Class<?> _BaseMessageManager() {<NEW_LINE>Class<?> clz = load("com/tencent/mobileqq/app/message/BaseMessageManager");<NEW_LINE>if (clz != null) {<NEW_LINE>return clz;<NEW_LINE>}<NEW_LINE>clz = load("com/tencent/imcore/message/BaseMessageManager");<NEW_LINE>if (clz != null) {<NEW_LINE>return clz;<NEW_LINE>... | getDeclaredField("this$0").getType(); |
418,160 | public boolean incrementToken() throws IOException {<NEW_LINE>if (!input.incrementToken()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>char[] buffer = charTermAttribute.buffer();<NEW_LINE>int length = charTermAttribute.length();<NEW_LINE>int i;<NEW_LINE>for (i = 0; i < length; i++) {<NEW_LINE>if (buffer[i] == aa || bu... | buffer, i + 1, length); |
629,728 | public static Wallet adaptWallet(GeminiBalancesResponse[] response) {<NEW_LINE>// {total, available}<NEW_LINE>Map<String, BigDecimal[]> balancesByCurrency = new HashMap<>();<NEW_LINE>// for each currency we have multiple balances types: exchange, trading, deposit.<NEW_LINE>// each of those may be partially frozen/avail... | add(balance.getAmount()); |
1,294,337 | public static byte[] serialize(Descriptors.Descriptor descriptor) {<NEW_LINE>byte[] schemaDataBytes;<NEW_LINE>try {<NEW_LINE>Map<String, FileDescriptorProto> fileDescriptorProtoCache = new HashMap<>();<NEW_LINE>// recursively cache all FileDescriptorProto<NEW_LINE>serializeFileDescriptor(descriptor.getFile(), fileDescr... | rootMessageTypeName(rootMessageTypeName).build(); |
1,766,621 | private Mono<Response<AutomationAccountInner>> createOrUpdateWithResponseAsync(String resourceGroupName, String automationAccountName, AutomationAccountCreateOrUpdateParameters parameters, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Param... | error(new IllegalArgumentException("Parameter automationAccountName is required and cannot be null.")); |
737,939 | public Action service(AtmosphereRequest req, AtmosphereResponse res) throws IOException, ServletException {<NEW_LINE>Action action;<NEW_LINE>action = suspended(req, res);<NEW_LINE>if (action.type() == Action.TYPE.SUSPEND) {<NEW_LINE>req.setAttribute(SUSPEND, action);<NEW_LINE>} else if (action.type() == Action.TYPE.RES... | req.setAttribute(SUSPEND, action); |
1,804,161 | protected void paintIcon(Graphics2D g2) {<NEW_LINE>final int state = 0;<NEW_LINE>final var wh = scale(12);<NEW_LINE>var x = scale(state);<NEW_LINE>var y = scale(11) + scale(state);<NEW_LINE>final int[] xpos = { x, x + wh, scale(14), scale(3) };<NEW_LINE>final int[] ypos = { y, y, scale(14), scale(14) };<NEW_LINE>g2.set... | x = wh + scale(state); |
95,764 | public void addPersistentProperty(P property) {<NEW_LINE>Assert.notNull(property, "Property must not be null!");<NEW_LINE>if (properties.contains(property)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>properties.add(property);<NEW_LINE>if (!property.isTransient() && !property.isAssociation()) {<NEW_LINE>persistentProperties... | , versionProperty.getField())); |
1,097,711 | public void preparedData() {<NEW_LINE>AlterTableGroupMovePartition alterTableGroupMovePartition = (AlterTableGroupMovePartition) relDdl;<NEW_LINE>String tableGroupName = alterTableGroupMovePartition.getTableGroupName();<NEW_LINE>SqlAlterTableGroup sqlAlterTableGroup = (SqlAlterTableGroup) alterTableGroupMovePartition.g... | addAll(entry.getValue()); |
669,044 | private List<Wo> list(Business business, Wi wi) throws Exception {<NEW_LINE>List<Wo> <MASK><NEW_LINE>List<Unit> os = business.unit().pick(wi.getUnitList());<NEW_LINE>List<String> unitIds = new ArrayList<>();<NEW_LINE>for (Unit o : os) {<NEW_LINE>unitIds.add(o.getId());<NEW_LINE>}<NEW_LINE>EntityManager em = business.en... | wos = new ArrayList<>(); |
1,701,474 | // Populate temporary data structures to build resource group specs and selectors from db<NEW_LINE>private synchronized void populateFromDbHelper(Map<Long, ResourceGroupSpecBuilder> recordMap, Set<Long> rootGroupIds, Map<Long, ResourceGroupIdTemplate> resourceGroupIdTemplateMap, Map<Long, Set<Long>> subGroupIdsToBuild)... | records = resourceGroupsDao.getResourceGroups(environment); |
1,048,507 | private String retrieveFlinkUserJar(FlinkEnv flinkEnv, Application app) {<NEW_LINE>switch(app.getDevelopmentMode()) {<NEW_LINE>case CUSTOMCODE:<NEW_LINE>switch(app.getApplicationType()) {<NEW_LINE>case STREAMPARK_FLINK:<NEW_LINE>return String.format("%s/%s", app.getAppLib(), app.getModule().concat(".jar"));<NEW_LINE>ca... | format("%s/%s", clientPath, sqlDistJar); |
1,229,261 | protected CompletableFuture<Void> initWpt() {<NEW_LINE>assert loc.getAddr() == null;<NEW_LINE>String what = parent.info.getWhat();<NEW_LINE>String exp = what.startsWith(LOC_PREFIX) ? what.substring(LOC_PREFIX.length()) : what;<NEW_LINE>int iid = Unique.assertOne(loc.getInferiorIds());<NEW_LINE>GdbModelTargetInferior in... | get(1).intValue(); |
1,002,231 | public AuthenticationResult authenticate(HttpServletRequest req, HttpServletResponse resp, String authzHeader, SpnegoConfig spnegoConfig) {<NEW_LINE>AuthenticationResult result = CONTINUE;<NEW_LINE>try {<NEW_LINE>byte[] tokenByte = Base64Coder.base64Decode(Base64Coder.getBytes(spnegoUtil.extractAuthzTokenString(authzHe... | reqHostName = getReqHostName(req, spnegoConfig); |
717,642 | private void loadNode118() {<NEW_LINE>BaseDataVariableTypeNode node = new BaseDataVariableTypeNode(this.context, Identifiers.SamplingIntervalDiagnosticsArrayType_SamplingIntervalDiagnostics_SampledMonitoredItemsCount, new QualifiedName(0, "SampledMonitoredItemsCount"), new LocalizedText("en", "SampledMonitoredItemsCoun... | .expanded(), true)); |
816,889 | // ----------------------------------------------------------------<NEW_LINE>static void doMatrix(String verb, String[] args, boolean doCij) {<NEW_LINE>Vector<Hash256> hashes1 = new Vector<Hash256>();<NEW_LINE>Vector<Hash256> hashes2 = new Vector<Hash256>();<NEW_LINE>if (args.length == 0) {<NEW_LINE>HashReaderUtil.load... | , args[1], hashes2); |
1,046,708 | public void addBody(StringBuilder sb, AuthorList al, String tagName, DocBookVersion version) {<NEW_LINE>for (int i = 0; i < al.getNumberOfAuthors(); i++) {<NEW_LINE>sb.append('<').append(tagName).append('>');<NEW_LINE>if (version == DocBookVersion.DOCBOOK_5) {<NEW_LINE>sb.append("<personname>");<NEW_LINE>}<NEW_LINE>Aut... | a = al.getAuthor(i); |
1,477,920 | public Set<DebuggerMappingOffer> offersForEnv(TargetEnvironment env, TargetObject target, boolean includeOverrides) {<NEW_LINE>if (!(target instanceof TargetProcess)) {<NEW_LINE>return Set.of();<NEW_LINE>}<NEW_LINE>TargetProcess process = (TargetProcess) target;<NEW_LINE>if (!env.getDebugger().toLowerCase().contains("f... | "Using os=" + os + " arch=" + arch); |
1,022,705 | final CreateContainerRecipeResult executeCreateContainerRecipe(CreateContainerRecipeRequest createContainerRecipeRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createContainerRecipeRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,600,218 | public int fetchRawData(final StringBuilder stringBuilder) {<NEW_LINE>while (trafficOpsUtils == null || trafficOpsUtils.getHostname() == null || trafficOpsUtils.getHostname().isEmpty()) {<NEW_LINE>LOGGER.error("No traffic ops hostname yet!");<NEW_LINE>try {<NEW_LINE>Thread.sleep(5000L);<NEW_LINE>} catch (Exception e) {... | e.getMessage(), e); |
1,520,458 | public CreateResponsePlanResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CreateResponsePlanResult createResponsePlanResult = new CreateResponsePlanResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NE... | class).unmarshall(context)); |
1,530,483 | @Timed<NEW_LINE>@ExceptionMetered<NEW_LINE>public CreateJobResponse post(@Valid final Job job, @RequestUser final String username) {<NEW_LINE>final Job.Builder clone = // If the job had a hash coming in, preserve it<NEW_LINE>job.toBuilder().setCreatingUser(username).setCreated(clock.now().getMillis()).setHash(job.<MASK... | getId().getHash()); |
1,420,759 | private void loadNode158() {<NEW_LINE>ServerDiagnosticsTypeNode node = new ServerDiagnosticsTypeNode(this.context, Identifiers.Server_ServerDiagnostics, new QualifiedName(0, "ServerDiagnostics"), new LocalizedText("en", "ServerDiagnostics"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), UByte.valu... | .expanded(), true)); |
38,124 | Object postProcessInvocationResult(@Nullable Object result, int nestingLevel, ReturnTypeDescriptor descriptor) {<NEW_LINE>TypeDescriptor <MASK><NEW_LINE>if (returnTypeDescriptor == null) {<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>Class<?> expectedReturnType = returnTypeDescriptor.getType();<NEW_LINE>result = unwrapO... | returnTypeDescriptor = descriptor.getReturnTypeDescriptor(nestingLevel); |
672,182 | public Map<String, INDArray> init(NeuralNetConfiguration conf, INDArray paramsView, boolean initializeParams) {<NEW_LINE>if (!(conf.getLayer() instanceof FeedForwardLayer))<NEW_LINE>throw new IllegalArgumentException("unsupported layer type: " + conf.getLayer().getClass().getName());<NEW_LINE>Map<String, INDArray> para... | <String, INDArray>()); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.