idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,025,688 | // ----- protected methods -----<NEW_LINE>protected void serializeObject(final DataOutputStream dos, final Object value) throws IOException {<NEW_LINE>if (value != null) {<NEW_LINE>final Integer typeKey = TypeMap.get(value.getClass());<NEW_LINE>if (typeKey != null) {<NEW_LINE>dos.writeInt(typeKey);<NEW_LINE>switch(type... | value.getClass() + ", cannot serialize!"); |
504,504 | private static void buildMaps() {<NEW_LINE>map(AbstractBeamInter.class, BeamStemRelation.class, StemInter.class);<NEW_LINE>map(AbstractChordInter.class, ChordDynamicsRelation.class, DynamicsInter.class);<NEW_LINE>map(AbstractChordInter.class, ChordPedalRelation.class, PedalInter.class);<NEW_LINE>map(AbstractChordInter.... | ChordStemRelation.class, StemInter.class); |
535,546 | public GetBackendStorageResourceConfig unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>GetBackendStorageResourceConfig getBackendStorageResourceConfig = new GetBackendStorageResourceConfig();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.g... | ().unmarshall(context)); |
1,816,226 | public static BufferedImage loadPGM(InputStream inputStream, @Nullable BufferedImage storage) throws IOException {<NEW_LINE>DataInputStream in = new DataInputStream(inputStream);<NEW_LINE>readLine(in);<NEW_LINE>String line = readLine(in);<NEW_LINE>while (line.charAt(0) == '#') line = readLine(in);<NEW_LINE>String[] s =... | w, h, BufferedImage.TYPE_BYTE_GRAY); |
1,363,497 | private boolean projectVertices(Model model, int localX, int localY, int localZ, final int vertexOrientation) {<NEW_LINE>final int vertexCount = model.getVerticesCount();<NEW_LINE>Perspective.modelToCanvas(client, vertexCount, localX, localY, localZ, vertexOrientation, model.getVerticesX(), model.getVerticesZ(), model.... | Math.min(croppedX1, x); |
1,048,093 | public VariableDeclarationNode transform(VariableDeclarationNode variableDeclarationNode) {<NEW_LINE>NodeList<AnnotationNode> annotationNodes = formatNodeList(variableDeclarationNode.annotations(), 0, 1, 0, 1);<NEW_LINE>Token finalToken = formatToken(variableDeclarationNode.finalKeyword().orElse(null), 1, 0);<NEW_LINE>... | hasInit ? 1 : 0, 0); |
295,856 | public void print(ReadOnlyTStore<T> zs, ZooReader zk, ServiceLock.ServiceLockPath lockPath, Formatter fmt, Set<Long> filterTxid, EnumSet<TStatus> filterStatus) throws KeeperException, InterruptedException {<NEW_LINE>FateStatus fateStatus = getStatus(zs, zk, lockPath, filterTxid, filterStatus);<NEW_LINE>for (Transaction... | ), entry.getValue()); |
359,851 | public void onError(java.lang.Exception e) {<NEW_LINE>byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;<NEW_LINE>org.apache.thrift.TSerializable msg;<NEW_LINE>getActiveTservers_result result = new getActiveTservers_result();<NEW_LINE>if (e instanceof org.apache.accumulo.core.clientImpl.thrift.ThriftSecurity... | _LOGGER.error("Exception writing to internal frame buffer", ex); |
437,505 | public ServiceResponse serviceImpl(Query call, HttpServletResponse response, Authorization authorization, final JsonObjectWithDefault permissions) throws APIException {<NEW_LINE>JSONObject json = new JSONObject();<NEW_LINE>JSONObject object = new JSONObject();<NEW_LINE>object.put("category", call.get("category", ""));<... | call.get("id", ""); |
965,479 | private Mono<PagedResponse<ConfigurationSetting>> listFirstPageSettings(SettingSelector selector, Context context) {<NEW_LINE>try {<NEW_LINE>if (selector == null) {<NEW_LINE>return service.listKeyValues(serviceEndpoint, null, null, apiVersion, null, null, context.addData(AZ_TRACING_NAMESPACE_KEY, APP_CONFIG_TRACING_NAM... | .warning("Failed to list all ConfigurationSetting", error)); |
508,018 | static BiFunction<String, String, Transport.Connection> buildConnectionLookup(String requestClusterAlias, Function<String, DiscoveryNode> localNodes, BiFunction<String, String, DiscoveryNode> remoteNodes, BiFunction<String, DiscoveryNode, Transport.Connection> nodeToConnection) {<NEW_LINE>return (clusterAlias, nodeId) ... | discoveryNode = localNodes.apply(nodeId); |
1,422,755 | public void marshall(SampledHTTPRequest sampledHTTPRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (sampledHTTPRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(sampledHTTPRequest.getRequest(... | sampledHTTPRequest.getLabels(), LABELS_BINDING); |
422,244 | protected Object decode(ChannelHandlerContext ctx, Channel channel, final Object msg) throws Exception {<NEW_LINE>if (decodeWorker != null) {<NEW_LINE>decodeWorker.execute(new decodeTask(msg));<NEW_LINE>return null;<NEW_LINE>} else {<NEW_LINE>if (msg == null) {<NEW_LINE>throw new NullPointerException("you cannot pass i... | .getByteBuffer().clear(); |
1,723,558 | public void doImageSave() {<NEW_LINE>if (!isGif) {<NEW_LINE>if (Reddit.appRestart.getString("imagelocation", "").isEmpty()) {<NEW_LINE>showFirstDialog();<NEW_LINE>} else if (!new File(Reddit.appRestart.getString("imagelocation", "")).exists()) {<NEW_LINE>showErrorDialog();<NEW_LINE>} else {<NEW_LINE>Intent i = new Inte... | i.putExtra("subreddit", subreddit); |
124,193 | public void run(RegressionEnvironment env) {<NEW_LINE>String text = "@name('s0') select * from SupportBean(2*intBoxed=doubleBoxed)";<NEW_LINE>env.compileDeployAddListenerMile(text, "s0", 0);<NEW_LINE>sendBeanIntDouble(env, 20, 50d);<NEW_LINE>env.assertListenerNotInvoked("s0");<NEW_LINE>sendBeanIntDouble(env, 25, 50d);<... | compileDeployAddListenerMile(text, "s1", 1); |
1,495,100 | public static String format(QualityGate.Condition condition) {<NEW_LINE>Metric<?> metric = CoreMetrics.<MASK><NEW_LINE>if (metric.getType() == Metric.ValueType.RATING) {<NEW_LINE>return String.format("%s %s (%s %s)", Rating.valueOf(Integer.parseInt(condition.getValue())), metric.getName(), condition.getOperator() == Qu... | getMetric(condition.getMetricKey()); |
653,911 | private Object transformImpl(final GraphQLSchema schema, GraphQLSchemaElement schemaElement, GraphQLTypeVisitor visitor, Consumer<GraphQLSchema.Builder> postTransformation) {<NEW_LINE>DummyRoot dummyRoot;<NEW_LINE>GraphQLCodeRegistry.Builder codeRegistry = null;<NEW_LINE>if (schema != null) {<NEW_LINE>dummyRoot = new D... | changedTypes = new LinkedHashMap<>(); |
1,307,194 | private CompletableFuture<List<Wo>> searchScript(final Wi wi, final List<String> appIdList, final List<String> designerIdList) {<NEW_LINE>CompletableFuture<List<Wo>> cf = CompletableFuture.supplyAsync(() -> {<NEW_LINE>List<Wo> resWos = new ArrayList<>();<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainer... | ), wi.getMatchRegExp()); |
1,446,503 | private Partition storePartition0(final Partition partition) {<NEW_LINE>final PlainContextAware ctxAware = PlainContextAware.newWithThreadInheritedTrx(Env.getCtx());<NEW_LINE>//<NEW_LINE>// create and save the new partition record<NEW_LINE>final I_DLM_Partition partitionDB;<NEW_LINE>if (partition.getDLM_Partition_ID() ... | recordsAdded = storeRecordsPartitionID(ctxAware, intermediatePartition); |
237,282 | static void updateVideoInfo(final VideoFile thisVideo, final SecurityContext ctx) {<NEW_LINE>try (final Tx tx = StructrApp.getInstance(ctx).tx()) {<NEW_LINE>final Map<String, Object> info = AVConv.newInstance(ctx, thisVideo).getVideoInfo();<NEW_LINE>if (info != null && info.containsKey("streams")) {<NEW_LINE>final List... | >) info.get("streams"); |
825,631 | static void lookupCodeInfo(CodeInfo info, long ip, SimpleCodeInfoQueryResult codeInfoQueryResult) {<NEW_LINE>long sizeEncoding = initialSizeEncoding();<NEW_LINE>long entryIP = lookupEntryIP(ip);<NEW_LINE>long entryOffset = loadEntryOffset(info, ip);<NEW_LINE>do {<NEW_LINE>int entryFlags = loadEntryFlags(info, entryOffs... | entryOffset = advanceOffset(entryOffset, entryFlags); |
289,751 | protected String run() throws Exception {<NEW_LINE>final Jenkins jenkins = Jenkins.get();<NEW_LINE>final Item item = getItemForCredentials(getContext());<NEW_LINE>final SlackNotifier.DescriptorImpl slackDesc = jenkins.<MASK><NEW_LINE>final String email = step.email;<NEW_LINE>final String tokenCredentialId = step.tokenC... | getDescriptorByType(SlackNotifier.DescriptorImpl.class); |
718,919 | public BulkUpdateAdminsResult bulkUpdate(Username currentUser, List<String> usersToAdd, List<String> usersToRemove, List<String> rolesToAdd, List<String> rolesToRemove, String md5) {<NEW_LINE>Set<Admin> existingAdmins = new HashSet<>(systemAdmins());<NEW_LINE>BulkUpdateAdminsResult result = validateUsersAndRolesForBulk... | new CaseInsensitiveString(user)))); |
841,681 | String replaceTokens(ComponentInfo info, String message) {<NEW_LINE>Map<String, String> tokens = new HashMap<>();<NEW_LINE>Path graalPath = input.getGraalHomePath().normalize();<NEW_LINE>Path archPath = SystemUtils.getRuntimeLibDir(graalPath, true);<NEW_LINE>tokens.put(CommonConstants.<MASK><NEW_LINE>// NOI18N<NEW_LINE... | TOKEN_GRAALVM_PATH, graalPath.toString()); |
1,551,221 | public char[] readableName(boolean showGenerics) /*java.lang.Object, p.X<T> */<NEW_LINE>{<NEW_LINE>char[] readableName;<NEW_LINE>if (isMemberType()) {<NEW_LINE>readableName = CharOperation.concat(enclosingType().readableName(showGenerics && hasEnclosingInstanceContext()), this.sourceName, '.');<NEW_LINE>} else {<NEW_L... | concatWith(this.compoundName, '.'); |
1,136,160 | public static TransactionArguments processArguments(CallArguments argsParam, TransactionPool transactionPool, Account senderAccount, byte defaultChainId) {<NEW_LINE>TransactionArguments argsRet = new TransactionArguments();<NEW_LINE>argsRet.setFrom(argsParam.getFrom());<NEW_LINE>argsRet.setTo(stringHexToByteArray(argsP... | () -> BigInteger.ZERO)); |
1,516,779 | public void paint(Graphics g) {<NEW_LINE>if (grabbedImage != null) {<NEW_LINE>Frame frame = grabberConverter.convert(grabbedImage);<NEW_LINE>BufferedImage image = paintConverter.getBufferedImage(frame, 2.2 / grabber.getGamma());<NEW_LINE>Graphics2D g2 = image.createGraphics();<NEW_LINE>if (faces != null) {<NEW_LINE>g2.... | setStroke(new BasicStroke(2)); |
721,299 | static void registerRenderers(EntityRenderersEvent.RegisterRenderers event) {<NEW_LINE>event.registerBlockEntityRenderer(TinkerSmeltery.tank.get(), TankBlockEntityRenderer::new);<NEW_LINE>event.registerBlockEntityRenderer(TinkerSmeltery.faucet.get(), FaucetBlockEntityRenderer::new);<NEW_LINE>event.registerBlockEntityRe... | get(), MelterBlockEntityRenderer::new); |
1,749,294 | private int updateForecast() {<NEW_LINE>List<Object> parameters = new ArrayList<Object>();<NEW_LINE>StringBuilder update = new StringBuilder();<NEW_LINE>update.append("UPDATE "<MASK><NEW_LINE>update.append(" SET ");<NEW_LINE>update.append(" QtyCalculated = NVL(M_ForecastLine.QtyCalculated,0) + NVL(frr.QtyCalculated,0),... | ).append(MForecastLine.Table_Name); |
1,141,661 | public void unbind(Name name) throws NamingException {<NEW_LINE>checkWritable();<NEW_LINE>while ((!name.isEmpty()) && (name.get(0).length() == 0)) name = name.getSuffix(1);<NEW_LINE>if (name.isEmpty())<NEW_LINE>throw new NamingException(rb.getString(LogFacade.INVALID_NAME));<NEW_LINE>NamingEntry entry = bindings.get(na... | (name.get(0)); |
1,173,408 | private static List<Archive> init() {<NEW_LINE>List<Archive> result = new ArrayList<>();<NEW_LINE>Path home = Paths.get(System.getProperty("java.home"));<NEW_LINE>try {<NEW_LINE>if (home.endsWith("jre")) {<NEW_LINE>// jar files in <javahome>/jre/lib<NEW_LINE>result.addAll(addJarFiles(<MASK><NEW_LINE>if (home.getParent(... | home.resolve("lib"))); |
1,548,070 | // important: inputs should not be reused<NEW_LINE>protected static MutableRoaringBitmap lazyor(final ImmutableRoaringBitmap x1, final ImmutableRoaringBitmap x2) {<NEW_LINE>final MutableRoaringBitmap answer = new MutableRoaringBitmap();<NEW_LINE>MappeableContainerPointer i1 = x1.highLowContainer.getContainerPointer();<... | = x2.highLowContainer.getContainerPointer(); |
1,052,220 | public static ExecutionStatus tryCatchException(Exception e) {<NEW_LINE>ExecutionStatus responseResult = new ExecutionStatus();<NEW_LINE>if (e instanceof QueryProcessException) {<NEW_LINE>responseResult.setMessage(e.getMessage());<NEW_LINE>responseResult.setCode(((QueryProcessException) e).getErrorCode());<NEW_LINE>} e... | ) e).getErrorCode()); |
916,467 | public void eval(EvaluationContext ctx) {<NEW_LINE>for (int i = 0; i < variablesPositionCounts; i++) {<NEW_LINE>children[variablesPositions[i]].eval(ctx);<NEW_LINE>}<NEW_LINE>MutableChunk chunk = ctx.getPreAllocatedChunk();<NEW_LINE>int len = chunk.batchSize();<NEW_LINE>int[] sel = chunk.selection();<NEW_LINE>RandomAcc... | outputSlot.setElementAt(i, convertedRet); |
416,870 | private // if the required system property has been set then parse it and add the paths to the classloader search path<NEW_LINE>void configureSearchPath() {<NEW_LINE>// The search path can be set by a system property or environment variable with the sys prop taking precedence<NEW_LINE>// TODO handle quoted string, blan... | property = System.getProperty(PLUGIN_SYSTEM_PROPERTY); |
1,582,858 | public int best(final Object obj) {<NEW_LINE>if (obj instanceof Phi[]) {<NEW_LINE>return this.next();<NEW_LINE>}<NEW_LINE>final String label;<NEW_LINE>if (obj instanceof Long || obj instanceof String || obj instanceof Character || obj instanceof Double || obj instanceof Boolean) {<NEW_LINE>label = obj.toString();<NEW_L... | .class.cast(obj)); |
1,785,874 | // Mirrors wkt<NEW_LINE>private static void exportPolygonToGeoJson_(int export_flags, Polygon polygon, JsonWriter json_writer) {<NEW_LINE>MultiPathImpl polygon_impl = (MultiPathImpl) (polygon._getImpl());<NEW_LINE>if ((export_flags & GeoJsonExportFlags.geoJsonExportFailIfNotSimple) != 0) {<NEW_LINE>int simple = polygon... | polygon_impl.getAttributeStreamRef(Semantics.M); |
385,935 | void writeKeys(XMLExtendedStreamWriter writer, ModelNode model) throws XMLStreamException {<NEW_LINE>if (!model.isDefined()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>boolean contains = false;<NEW_LINE>for (Property key : model.asPropertyList()) {<NEW_LINE>if (!contains) {<NEW_LINE>writer.writeStartElement(Constants.XML.K... | attr, keyAttributes, false, writer); |
1,069,909 | public User updateUser(String userId, String password, String firstName, String middleName, String lastName, String nickName, boolean male, Date birthday, String emailAddress, String smsId, String aimId, String icqId, String msnId, String ymId, String favoriteActivity, String favoriteBibleVerse, String favoriteFood, St... | user = UserUtil.findByPrimaryKey(userId); |
1,611,448 | private void updatePushHooks() {<NEW_LINE>if (onto != null && upstream != null && origHead != null) {<NEW_LINE>Collection<GitHook> hooks = VCSHooks.getInstance(<MASK><NEW_LINE>if (!hooks.isEmpty() && !pm.isCanceled()) {<NEW_LINE>progress.setProgress(Bundle.MSG_RebaseAction_updatingHooks());<NEW_LINE>try {<NEW_LINE>GitH... | ).getHooks(GitHook.class); |
546,598 | private // Note that the keys stored in the BatchHolders are not moved around.<NEW_LINE>void resizeAndRehashIfNeeded() {<NEW_LINE>if (numEntries < threshold) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (EXTRA_DEBUG) {<NEW_LINE>logger.<MASK><NEW_LINE>}<NEW_LINE>// If the table size is already MAXIMUM_CAPACITY, don't resiz... | debug("Hash table numEntries = {}, threshold = {}; resizing the table...", numEntries, threshold); |
1,683,134 | public Explanation explain(LeafReaderContext context, int doc) throws IOException {<NEW_LINE>boolean match = false;<NEW_LINE>double max = 0;<NEW_LINE>double otherSum = 0;<NEW_LINE>List<Explanation> subs = new ArrayList<>();<NEW_LINE>for (Weight wt : weights) {<NEW_LINE>Explanation e = wt.explain(context, doc);<NEW_LINE... | ? "max of:" : "max plus " + tieBreakerMultiplier + " times others of:"; |
1,698,225 | private void callExternalProgram() throws LoginException {<NEW_LINE>AtomicReference<Process> process = new AtomicReference<>();<NEW_LINE>try (Watchdog watchdog = new Watchdog(timeout_ms, () -> {<NEW_LINE>Process local_p = process.get();<NEW_LINE>if (local_p != null) {<NEW_LINE>local_p.destroyForcibly();<NEW_LINE>}<NEW_... | Process p = process.get(); |
690,936 | private I_C_Flatrate_Term createNewTerm(@NonNull final ContractExtendingRequest context) {<NEW_LINE>final I_C_Flatrate_Term currentTerm = context.getContract();<NEW_LINE>final <MASK><NEW_LINE>Check.errorIf(currentTerm.getC_FlatrateTerm_Next_ID() > 0, "{} has C_FlatrateTerm_Next_ID = {} (should be <= 0)", currentTerm, c... | Timestamp nextTermStartDate = context.getNextTermStartDate(); |
1,047,419 | public void process(Operator operator, List<COSBase> arguments) throws IOException {<NEW_LINE>if (arguments.size() < 2) {<NEW_LINE>throw new MissingOperandException(operator, arguments);<NEW_LINE>}<NEW_LINE>COSBase base0 = arguments.get(0);<NEW_LINE>COSBase base1 = arguments.get(1);<NEW_LINE>if (!(base0 instanceof COSN... | getResources().getFont(fontName); |
295,604 | protected String doIt() throws Exception {<NEW_LINE>Optional<MProjectType> projectTypeFromOptiional = Optional.of(new MProjectType(getCtx(), getProjectTypeId(), get_TrxName()));<NEW_LINE>projectTypeFromOptiional.ifPresent(projectTypeFrom -> {<NEW_LINE>projectTypeFrom.getPhases().stream().forEach(fromPhase -> {<NEW_LINE... | setC_Phase_ID(projectTypePhase.getC_Phase_ID()); |
1,366,620 | /*<NEW_LINE>* Check that the signature timestamp applies to this signature.<NEW_LINE>* Match the hash present in the signature timestamp token against the hash<NEW_LINE>* of this signature.<NEW_LINE>*/<NEW_LINE>private void verifyTimestamp(TimestampToken token) throws NoSuchAlgorithmException, SignatureException {<NEW_... | AlgorithmId digestAlgId = token.getHashAlgorithm(); |
335,835 | public CloseableIterator<E> createIterator(int skip, int take) {<NEW_LINE>try {<NEW_LINE>StatementListener listener = configuration.getStatementListener();<NEW_LINE>listener.<MASK><NEW_LINE>ResultSet results = statement.executeQuery();<NEW_LINE>listener.afterExecuteQuery(statement);<NEW_LINE>// read the result meta dat... | beforeExecuteQuery(statement, sql, boundParameters); |
1,025,006 | protected void execute(Terminal terminal, OptionSet options, Environment env) throws UserException {<NEW_LINE>if (options.nonOptionArguments().isEmpty() == false) {<NEW_LINE>throw new UserException(ExitCodes.USAGE, "Positional arguments not allowed, found " + options.nonOptionArguments());<NEW_LINE>}<NEW_LINE>if (optio... | daemonize, pidFile, quiet, env); |
1,099,574 | protected void addSlots() {<NEW_LINE>int xoff = 0, x = 0, y = 0;<NEW_LINE>EntityEquipmentSlot last = null;<NEW_LINE>for (int i = 0; i < getItemHandler().getSlots(); i++) {<NEW_LINE>EntityEquipmentSlot current = getItemHandler().getHandlerFromSlot(i).getEquipmentSlot();<NEW_LINE>if (current != last) {<NEW_LINE>xoff = (9... | getSlotIndex()).getEquipmentSlot(); |
6,979 | final GetVpnConnectionDeviceSampleConfigurationResult executeGetVpnConnectionDeviceSampleConfiguration(GetVpnConnectionDeviceSampleConfigurationRequest getVpnConnectionDeviceSampleConfigurationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getVpnConnectionDeviceSampleConfigurationRequest... | invoke(request, responseHandler, executionContext); |
653,853 | private void createDispatcherCallingInitCtors() {<NEW_LINE>MethodMember[] ctors = typeDescriptor.getConstructors();<NEW_LINE>for (MethodMember ctor : ctors) {<NEW_LINE>String desc = ctor.getDescriptor();<NEW_LINE>MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "___init___", desc, null, null);<NEW_LINE>mv.visitFieldInsn(G... | mv.visitVarInsn(ALOAD, 0); |
611,204 | // Suppress unclosed resource warning<NEW_LINE>@SuppressWarnings("squid:S2095")<NEW_LINE>@Override<NEW_LINE>public SyncStatus checkDataDigest(String digestOfSender) {<NEW_LINE>String digestOfReceiver = (new BigInteger(1, messageDigest.get().digest())).toString(16);<NEW_LINE>try {<NEW_LINE>if (currentFileWriter.get() !=... | (currentFile.get())); |
436,273 | public boolean process(@Nonnull VirtualFile file, IntList list) {<NEW_LINE>for (int i = 0, len = list.size(); i < len; i += 2) {<NEW_LINE>ProgressManager.checkCanceled();<NEW_LINE>if (list.get(i + 1) != myHash2)<NEW_LINE>continue;<NEW_LINE>int <MASK><NEW_LINE>if (myFileIndex.isInSourceContent(virtualFile)) {<NEW_LINE>i... | offset = list.get(i); |
138,692 | public Description matchCompilationUnit(CompilationUnitTree tree, VisitorState state) {<NEW_LINE>if (!ASTHelpers.getGeneratedBy(state).isEmpty()) {<NEW_LINE>return NO_MATCH;<NEW_LINE>}<NEW_LINE>ImmutableRangeSet<Long> linesWithComments = linesWithComments(state);<NEW_LINE>new SuppressibleTreePathScanner<Void, Void>() {... | getEndPosition(parent)) + 1); |
776,477 | public static DescribeCrossRegionLogBackupFilesResponse unmarshall(DescribeCrossRegionLogBackupFilesResponse describeCrossRegionLogBackupFilesResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeCrossRegionLogBackupFilesResponse.setRequestId(_ctx.stringValue("DescribeCrossRegionLogBackupFilesResponse.RequestId"));<NE... | ("DescribeCrossRegionLogBackupFilesResponse.Items[" + i + "].CrossBackupRegion")); |
91,135 | // endregion private helpers<NEW_LINE>// region converting map to bundle<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>static Bundle mapToBundle(Map<String, Object> map) {<NEW_LINE>Bundle bundle = new Bundle();<NEW_LINE>for (Map.Entry<String, Object> entry : map.entrySet()) {<NEW_LINE>Object value = entry.getValue()... | = (List<Object>) value; |
835,466 | private void createSky() {<NEW_LINE>Texture west = assetManager.loadTexture("Textures/Sky/Lagoon/lagoon_west.jpg");<NEW_LINE>Texture east = assetManager.loadTexture("Textures/Sky/Lagoon/lagoon_east.jpg");<NEW_LINE>Texture north = assetManager.loadTexture("Textures/Sky/Lagoon/lagoon_north.jpg");<NEW_LINE>Texture south =... | north, south, up, down); |
1,345,347 | public static void dexoatAndDisableInline(String dexFilePath, String oatFilePath) throws IOException {<NEW_LINE>final File oatFile = new File(oatFilePath);<NEW_LINE>if (!oatFile.exists()) {<NEW_LINE>oatFile.getParentFile().mkdirs();<NEW_LINE>}<NEW_LINE>final List<String> commandAndParams = new ArrayList<>();<NEW_LINE>c... | consumeInputStream(dex2oatProcess.getInputStream()); |
691,247 | private static void decode9(DataInput in, long[] tmp, long[] longs) throws IOException {<NEW_LINE>in.readLongs(tmp, 0, 18);<NEW_LINE>shiftLongs(tmp, 18, longs, 0, 7, MASK16_9);<NEW_LINE>for (int iter = 0, tmpIdx = 0, longsIdx = 18; iter < 2; ++iter, tmpIdx += 9, longsIdx += 7) {<NEW_LINE>long l0 = (tmp[tmpIdx + 0] & MA... | + 5] & MASK16_6) << 3; |
756,839 | public void sendMessageToAllEdges(Vertex<OID_T, VDATA_T, EDATA_T> vertex, OUT_MSG_T message) {<NEW_LINE>VertexImpl<OID_T, VDATA_T, EDATA_T> vertexImpl = (VertexImpl<OID_T, VDATA_T, EDATA_T>) vertex;<NEW_LINE>long lid = vertexImpl.getLocalId();<NEW_LINE>long <MASK><NEW_LINE>long oeBeginOffset = JavaRuntime.getLong(offse... | offset = idParser.getOffset(lid); |
861,644 | public ListMilestonesResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListMilestonesResult listMilestonesResult = new ListMilestonesResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targe... | JsonToken token = context.getCurrentToken(); |
1,499,608 | public void purchaseOrderProcess(Invoice invoice) throws AxelorException {<NEW_LINE>PurchaseOrder invoicePurchaseOrder = invoice.getPurchaseOrder();<NEW_LINE>if (invoicePurchaseOrder != null) {<NEW_LINE>log.debug("Update the invoiced amount of the purchase order : {}", invoicePurchaseOrder.getPurchaseOrderSeq());<NEW_L... | .getId(), true)); |
275,291 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player player = game.getPlayer(source.getControllerId());<NEW_LINE>if (player == null || player.getHand().count(StaticFilters.FILTER_CARD_CREATURE, game) < 1 || !player.chooseUse(Outcome.PutCardInPlay, "Put a creature card " + "from your hand onto the battlefie... | getCard(target.getFirstTarget()); |
102,312 | void listTimeSeriesReduce() throws IOException {<NEW_LINE>// [START monitoring_read_timeseries_reduce]<NEW_LINE>MetricServiceClient metricServiceClient = MetricServiceClient.create();<NEW_LINE>String projectId = System.getProperty("projectId");<NEW_LINE>ProjectName <MASK><NEW_LINE>// Restrict time to last 20 minutes<NE... | name = ProjectName.of(projectId); |
459,103 | public JPanel buildOverviewPanel(HttpTestRequestStep testStep) {<NEW_LINE>HttpTestRequestInterface<?> request = testStep.getTestRequest();<NEW_LINE>JPropertiesTable<HttpTestRequestInterface<?>> table = new JPropertiesTable<HttpTestRequestInterface<?>>("HTTP TestRequest Properties");<NEW_LINE>// basic properties<NEW_LIN... | { null, "UTF-8", "iso-8859-1" }); |
1,369,057 | // ~ Methods ----------------------------------------------------------------<NEW_LINE>public void onMatch(RelOptRuleCall call) {<NEW_LINE>final Intersect intersect = call.rel(0);<NEW_LINE>if (intersect.all) {<NEW_LINE>// nothing we can do<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final RelOptCluster cluster = intersect.get... | , relBuilder.countStar(null)); |
69,874 | private // Also write out what sort of message we think we have (first).<NEW_LINE>void dumpJmfMessage(IncidentStream is, JMFMessage jmfMsg, Object msg) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(tc, "dumpJmfMessage");<NEW_LINE>if (msg != null) {<NEW_LINE>is.writeLin... | is.writeLine("No JMF message available", ""); |
791,499 | private void generateRSS1(final CreativeCommons module, final Element element) {<NEW_LINE>// throw new RuntimeException( "Generating RSS1 Feeds not currently Supported.");<NEW_LINE>LOG.debug(element.getName());<NEW_LINE>if (element.getName().equals("channel")) {<NEW_LINE>// Do all licenses list.<NEW_LINE>final License[... | getParentElement().addContent(license); |
1,506,389 | final SetLoadBalancerListenerSSLCertificateResult executeSetLoadBalancerListenerSSLCertificate(SetLoadBalancerListenerSSLCertificateRequest setLoadBalancerListenerSSLCertificateRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(setLoadBalancerListenerSSLCertificateRequest);<NEW_LINE>AWSReque... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
952,373 | public void onDataReceived(@NonNull final BluetoothDevice device, @NonNull final Data data) {<NEW_LINE>super.onDataReceived(device, data);<NEW_LINE>if (data.size() < 1) {<NEW_LINE>onInvalidDataReceived(device, data);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Decode the new data<NEW_LINE>int offset = 0;<NEW_LINE>final int... | Data.FORMAT_UINT32_LE, offset) & 0xFFFFFFFFL; |
629,574 | public AuthenticatedClientSessionModel createClientSession(RealmModel realm, ClientModel client, UserSessionModel userSession) {<NEW_LINE>MapAuthenticatedClientSessionEntity entity = new MapAuthenticatedClientSessionEntity(null, userSession.getId(), realm.getId(), client.getId(), false);<NEW_LINE>entity.getNotes().put(... | entity = clientSessionTx.create(entity); |
926,361 | final UpdateStudioSessionMappingResult executeUpdateStudioSessionMapping(UpdateStudioSessionMappingRequest updateStudioSessionMappingRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateStudioSessionMappingRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRe... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
959,143 | protected void encodeMarkup(FacesContext context, InputMask inputMask) throws IOException {<NEW_LINE>ResponseWriter writer = context.getResponseWriter();<NEW_LINE>String clientId = inputMask.getClientId(context);<NEW_LINE>String styleClass = createStyleClass(inputMask, InputMask.STYLE_CLASS);<NEW_LINE>writer.startEleme... | inputMask.getType(), "text"); |
287,117 | private void doOpenHelper(String filename) {<NEW_LINE>File file = new File(filename);<NEW_LINE>if (!file.exists()) {<NEW_LINE>Notifier.getInstance().showError(filename + " does not exist");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Config.getInstance().setOpenFileHome(file.getAbsoluteFile().getParent());<NEW_LINE>DiagramHan... | getGui().jumpTo(handler); |
710,910 | private void internalRegionCompareAndPutAll(final Region region, final List<CASEntry> subEntries, final CompletableFuture<Boolean> future, final int retriesLeft, final Errors lastCause) {<NEW_LINE>final RegionEngine regionEngine = getRegionEngine(region.getId(), true);<NEW_LINE>final RetryRunner retryRunner = retryCaus... | setRegionId(region.getId()); |
937,358 | private void bondAction(JSONArray args, CallbackContext callbackContext) {<NEW_LINE>if (!isBondReceiverRegistered) {<NEW_LINE>cordova.getActivity().registerReceiver(mBondReceiver, new IntentFilter(BluetoothDevice.ACTION_BOND_STATE_CHANGED));<NEW_LINE>isBondReceiverRegistered = true;<NEW_LINE>}<NEW_LINE>if (isNotInitial... | addProperty(returnObj, keyError, errorBond); |
897,986 | public boolean updateAlarm(SonosAlarm alarm) {<NEW_LINE>if (alarm != null && isConfigured()) {<NEW_LINE>Service service = device.findService(new UDAServiceId("AlarmClock"));<NEW_LINE>Action action = service.getAction("ListAlarms");<NEW_LINE>ActionInvocation invocation = new ActionInvocation(action);<NEW_LINE>DateTimeFo... | (alarm.getID())); |
1,326,254 | private ArrayList<MatOfPoint> findContours(Mat src) {<NEW_LINE>Mat grayImage = null;<NEW_LINE>Mat cannedImage = null;<NEW_LINE>Mat resizedImage = null;<NEW_LINE>double ratio = src.size().height / 500;<NEW_LINE>int height = Double.valueOf(src.size().height / ratio).intValue();<NEW_LINE>int width = Double.valueOf(src.siz... | = new Size(width, height); |
1,566,237 | public static void dexpatchUpdate(Context context, UpdateInfo updateInfo, File patchFile, final IDexpatchMonitor coldMonitor, boolean enableHot, IDexpatchMonitor hotMonitor) throws Exception {<NEW_LINE>if (null == updateInfo || !updateInfo.dexPatch) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String versionName = null;<NEW_... | installColdPatch(updateInfo, patchFile, coldMonitor); |
942,097 | private PixelReader parseMetaData(int bytesOfKeyValueData, DataInput in) throws IOException {<NEW_LINE>PixelReader pixelReader = null;<NEW_LINE>for (int i = 0; i < bytesOfKeyValueData; ) {<NEW_LINE>// reading key values<NEW_LINE>int keyAndValueByteSize = in.readInt();<NEW_LINE>byte[] keyValue = new byte[keyAndValueByte... | (keyAndValueByteSize + 3) % 4); |
1,052,236 | private void isFoundInDataOrNot(SearchPatternsSequential searchPatterns, boolean positiveSearch) throws Exception {<NEW_LINE>String thisMethod = "isFoundInDataOrNot";<NEW_LINE>boolean searchedOnce = false;<NEW_LINE>String firstSearchedSequenceNum, lastSearchedSequenceNum = "noneSearched";<NEW_LINE>if (positiveSearch) {... | logClass, thisMethod, "----- Started searching audit log at eventSequenceNumber: " + firstSearchedSequenceNum); |
1,001,989 | public int compareTo(archive_args 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 = java.lang.Boolean.valueOf(isSetMid()).compareTo(other.isSetMid());<NEW_LINE>if... | compareTo(other.isSetOffset()); |
447,252 | void connectNode(LatticeNodeImpl rNode) {<NEW_LINE>int begin = rNode.begin;<NEW_LINE>// connection matrix needs to be in the current stack frame to elide field<NEW_LINE>// accesses in the hot loop<NEW_LINE>final Connection conn = grammar.getConnection();<NEW_LINE>int leftId = rNode.leftId;<NEW_LINE>// elide some compil... | .totalCost = minLeftCost + rNode.cost; |
255,198 | public Container createContainer(MediaFile item) {<NEW_LINE>MusicAlbum container = new MusicAlbum();<NEW_LINE>if (item.isAlbum()) {<NEW_LINE>container.setAlbumArtURIs(new URI[] { getDispatcher().getAlbumProcessor().getAlbumArtURI(item.getId()) });<NEW_LINE>if (item.getArtist() != null) {<NEW_LINE>container.setArtists(g... | MediaFile> children = getChildren(item); |
717,486 | final DescribeEventSubscriptionsResult executeDescribeEventSubscriptions(DescribeEventSubscriptionsRequest describeEventSubscriptionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeEventSubscriptionsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRe... | DescribeEventSubscriptionsResult>(new DescribeEventSubscriptionsResultStaxUnmarshaller()); |
1,730,212 | public static void appendXmlEscaped(StringBuilder buf, String src, boolean supportUTF8) {<NEW_LINE>char c;<NEW_LINE>int i = 0;<NEW_LINE>while (i < src.length()) {<NEW_LINE>c = src.charAt(i++);<NEW_LINE>if (c > '~') {<NEW_LINE>// 126<NEW_LINE>if (!supportUTF8) {<NEW_LINE>int codepoint = c;<NEW_LINE>// surrogate characte... | Character.toCodePoint(c, low); |
1,318,591 | public boolean visualizationVarStatus(ModStatusVar pchkInput, Command cmd, Item item, EventPublisher eventPublisher) {<NEW_LINE>// We are actually not meant to visualize anything.<NEW_LINE>// But (just in case) someone is really lazy in doing the item-definitions, we try to be helpful by implementing<NEW_LINE>// some O... | ? OnOffType.ON : OnOffType.OFF; |
582,231 | private void readPublicResolversMd(String path, List<String> lines) {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>boolean lockServer = false;<NEW_LINE>boolean lockMD = false;<NEW_LINE>boolean lockTOML = false;<NEW_LINE>boolean lockRoutes = false;<NEW_LINE>ArrayList<String> dnsServerNames = new ArrayList<>... | routes = new ArrayList<>(); |
1,831,588 | public static DescribeProjectAttachmentsResponse unmarshall(DescribeProjectAttachmentsResponse describeProjectAttachmentsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeProjectAttachmentsResponse.setRequestId(_ctx.stringValue("DescribeProjectAttachmentsResponse.RequestId"));<NEW_LINE>describeProjectAttachmentsRe... | ("DescribeProjectAttachmentsResponse.Result[" + i + "].Content")); |
1,106,357 | private void authorise(Match curMatch, User webUser, Handler<AsyncResult<Boolean>> handler) {<NEW_LINE>// step 1: match against the raw user, if a AuthZ handler is in the path it could have already<NEW_LINE>// loaded the authorizations<NEW_LINE>if (curMatch.requiredAuthority.match(webUser)) {<NEW_LINE>handler.handle(Fu... | (res.cause())); |
1,517,192 | public SeekableStreamSequenceNumbers<PartitionIdType, SequenceOffsetType> minus(SeekableStreamSequenceNumbers<PartitionIdType, SequenceOffsetType> other) {<NEW_LINE>if (this.getClass() != other.getClass()) {<NEW_LINE>throw new IAE("Expected instance of %s, got %s", this.getClass().getName(), other.getClass().getName())... | newMap = new HashMap<>(); |
229,000 | private MenuItem addElementAction(Menu menu, final EClass type) {<NEW_LINE>final MenuItem item = new MenuItem(menu, SWT.CASCADE);<NEW_LINE>item.setText(ArchiLabelProvider.INSTANCE.getDefaultName(type));<NEW_LINE>item.setImage(ArchiLabelProvider.INSTANCE.getImage(type));<NEW_LINE>// Add arm listener to notify Hints View... | getFactory().setElementType(type); |
799,596 | public IBundleProvider encounterInstanceEverything(HttpServletRequest theServletRequest, IIdType theId, IPrimitiveType<Integer> theCount, IPrimitiveType<Integer> theOffset, DateRangeParam theLastUpdated, SortSpec theSort) {<NEW_LINE>SearchParameterMap paramMap = new SearchParameterMap();<NEW_LINE>if (theCount != null) ... | .INCLUDE_ALL.asRecursive())); |
1,707,091 | final ListAvailableResourceMetricsResult executeListAvailableResourceMetrics(ListAvailableResourceMetricsRequest listAvailableResourceMetricsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listAvailableResourceMetricsRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.Cl... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
825,973 | public static void main(String[] args) throws Exception {<NEW_LINE>Logger.configure(new LoggerConfig());<NEW_LINE>Logger.addOutput(new ConsoleOutput(), LoggerLevel.DEBUG);<NEW_LINE>var server = new NetService().newUDPServer(55555);<NEW_LINE>server.setOnConnected(connection -> {<NEW_LINE>connection.addMessageHandler((co... | ).newUDPClient("localhost", 55555); |
1,362,256 | public void draw(PoseStack matrices) {<NEW_LINE>// draw fire<NEW_LINE>int fuel = fuelModule.getFuel();<NEW_LINE>int fuelQuality = fuelModule.getFuelQuality();<NEW_LINE>if (fuel > 0 && fuelQuality > 0) {<NEW_LINE>FIRE.drawScaledYUp(matrices, fireX + screen.leftPos, fireY + screen.topPos, 14 * fuel / fuelQuality);<NEW_LI... | y, width, height, 100); |
1,731,255 | public void deleteWorkflowTaskByLanguage(final Language language) throws DotDataException {<NEW_LINE>final List<WorkflowTask> tasksToClearFromCache = this.convertListToObjects(new DotConnect().setSQL("SELECT * FROM workflow_task WHERE language_id=?").addParam(language.getId()).loadObjectResults(), WorkflowTask.class);<... | getId()).loadResult(); |
212,497 | private static UnionDataSchema buildUnionDataSchemaByProjection(UnionDataSchema unionDataSchema, DataMap maskMap, Collection<String> nonSchemaFieldsToAllowInProjectionMask) {<NEW_LINE>List<UnionDataSchema.Member> newUnionMembers = new ArrayList<>();<NEW_LINE>StringBuilder errorMessageBuilder = new StringBuilder();<NEW_... | (), wildcardMask, nonSchemaFieldsToAllowInProjectionMask)); |
1,587,733 | public static int[] HSLtoRGB(final float h, final float s, final float l, final float alpha) {<NEW_LINE>if (s < 0.0f || s > 100.0f) {<NEW_LINE>Timber.w("Color parameter outside of expected range - Saturation");<NEW_LINE>}<NEW_LINE>if (l < 0.0f || l > 100.0f) {<NEW_LINE>Timber.w("Color parameter outside of expected rang... | q, hr) * 256)); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.