idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
76,460 | protected Object resultByBlockNumber(final JsonRpcRequestContext requestContext, final long blockNumber) {<NEW_LINE>if (requestContext.getRequest().getParamLength() != 2) {<NEW_LINE>return new JsonRpcErrorResponse(requestContext.getRequest().getId(), JsonRpcError.INVALID_PARAMS);<NEW_LINE>}<NEW_LINE>final TraceCallMany... | get().getBlockHeaderByNumber(blockNumber); |
48,425 | public Container add(int begin, int end) {<NEW_LINE>if (end == begin) {<NEW_LINE>return clone();<NEW_LINE>}<NEW_LINE>if ((begin > end) || (end > (1 << 16))) {<NEW_LINE>throw new IllegalArgumentException("Invalid range [" + <MASK><NEW_LINE>}<NEW_LINE>// TODO: may need to convert to a RunContainer<NEW_LINE>int indexstart... | begin + "," + end + ")"); |
471,736 | public List<GcodeCommand> generateOutlineCommands(File gcodeFile) throws IOException, GcodeParserException {<NEW_LINE>List<LineSegment> gcodeLineList = parseGcodeLinesFromFile(gcodeFile);<NEW_LINE>// We only care about carving motion, filter those commands out<NEW_LINE>List<PartialPosition> pointList = gcodeLineList.pa... | (UnitUtils.Units.MM)); |
1,514,702 | private void storeToTempFile() {<NEW_LINE>String suffix = isHssf <MASK><NEW_LINE>Path path = TempFileOperator.createTempFile("s_t_r_p", suffix);<NEW_LINE>tempFilePaths.add(path);<NEW_LINE>try {<NEW_LINE>if (context.executorService != null) {<NEW_LINE>Workbook tempWorkbook = workbook;<NEW_LINE>Sheet tempSheet = sheet;<N... | ? Constants.XLS : Constants.XLSX; |
956,620 | private void miniAdjust() {<NEW_LINE>// add<NEW_LINE>if (this.nodeHigh > this.MAX_NODE_HEIGHT) {<NEW_LINE>this.nodeHigh = this.MAX_NODE_HEIGHT;<NEW_LINE>}<NEW_LINE>if (this.nodeWidth > this.MAX_NODE_HEIGHT * this.nodeRatio) {<NEW_LINE>this.nodeWidth = (int) (this.MAX_NODE_HEIGHT * this.nodeRatio);<NEW_LINE>}<NEW_LINE>i... | this.MIN_SPACE_HEIGHT * this.spaceRatio); |
125,857 | public Vector std(int axis) {<NEW_LINE>// axis = 0: on rows<NEW_LINE>// axis = 1: on cols<NEW_LINE>assert (axis == 0 || axis == 1);<NEW_LINE>float[] rdVec = null;<NEW_LINE>float[] rdVec2 = null;<NEW_LINE>switch(axis) {<NEW_LINE>case // on row<NEW_LINE>0:<NEW_LINE>rdVec = new float[numCols];<NEW_LINE>rdVec2 = new float[... | avg1 = rdVec[j] / numRows; |
1,409,253 | public static void renderTransparentCuboid(PoseStack matrices, MultiBufferSource buffer, FluidCuboid cube, FluidStack fluid, int opacity, int light) {<NEW_LINE>// nothing to render? skip<NEW_LINE>if (opacity < 0 || fluid.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>FluidAttributes attributes = fluid.getFluid().get... | , attributes.getLuminosity(fluid)); |
204,453 | public void selectTab(int index) {<NEW_LINE><MASK><NEW_LINE>final Tab oldSelected = selected;<NEW_LINE>if (oldSelected == newSelected) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>newSelected.setStyleNames(true, isFirstVisibleTabClient(index), true);<NEW_LINE>newSelected.setTabulatorIndex(getTabsheet().tabulatorIndex);<NEW_L... | final Tab newSelected = getTab(index); |
676,676 | HistogramGenerator addRead(final GATKRead read) {<NEW_LINE>final byte[] quals = (useOriginalQualities ? ReadUtils.getOriginalBaseQualities(read) : read.getBaseQualities());<NEW_LINE>if (quals == null) {<NEW_LINE>return this;<NEW_LINE>}<NEW_LINE>final int length = quals.length;<NEW_LINE>final boolean isReverseStrand = r... | [cycle] += quals[i]; |
805,966 | private void tryAssertionSubqNWCorrelated(RegressionEnvironment env, String epl) {<NEW_LINE>String[] fieldSelected = "c0".split(",");<NEW_LINE>String[] fieldInside = "val0".split(",");<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>env.compileDeploy(EventRepresentationChoice.MAP.getAnnotationText() + " @... | new SupportBean("E0", 0)); |
908,909 | public void process(String workID, byte[] data) {<NEW_LINE>ReplicationTarget target = DistributedWorkQueueWorkAssignerHelper.fromQueueKey(workID).getValue();<NEW_LINE>String file = new String(data, UTF_8);<NEW_LINE>log.debug("Received replication work for {} to {}", file, target);<NEW_LINE>ReplicaSystem replica;<NEW_LI... | throw new RuntimeException("Could not parse Status for work record", e); |
789,624 | private JPanel initSearchResultsHeaderPane() {<NEW_LINE>JPanel panel = new JPanel(new GridLayout(1, 2));<NEW_LINE>panel.setOpaque(false);<NEW_LINE>JLabel label = new JLabel(FontUtils.elegantIconHtml("", MessageUtils.getLocalizedMessage("search.label.results")));<NEW_LINE><MASK><NEW_LINE>label.setBorder(BorderFa... | label.setHorizontalTextPosition(JLabel.LEFT); |
1,686,727 | public OCFile saveFileWithParent(OCFile ocFile, Context context) {<NEW_LINE>if (ocFile.getParentId() == 0 && !OCFile.ROOT_PATH.equals(ocFile.getRemotePath())) {<NEW_LINE>String remotePath = ocFile.getRemotePath();<NEW_LINE>String parentPath = remotePath.substring(0, remotePath.lastIndexOf(ocFile.getFileName()));<NEW_LI... | Exception exception = result.getException(); |
567,513 | private void markupHashTable(TaskMonitor monitor) {<NEW_LINE>ElfDynamicTable dynamicTable = elf.getDynamicTable();<NEW_LINE>if (dynamicTable == null || !dynamicTable.containsDynamicValue(ElfDynamicType.DT_HASH)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>DataType dt = DWordDataType.dataType;<NEW_LINE>Address hashTableAddr ... | (elf.adjustAddressForPrelink(value)); |
465,756 | public static String login(final Response response, final String userId, final boolean rememberLogin) {<NEW_LINE>try {<NEW_LINE>final BeanManager beanManager = BeanManager.getInstance();<NEW_LINE>final UserRepository userRepository = beanManager.getReference(UserRepository.class);<NEW_LINE>final JSONObject user = userR... | "Login user [id=" + userId + "] failed", e); |
107,004 | private List<ContentProviderDescriptor> findMatchingProviders(URI uri) {<NEW_LINE>List<String> preferredProviderIds = preferenceManager.getPreferences().getPreferredContentProviderIds();<NEW_LINE>Set<<MASK><NEW_LINE>if (descriptors.isEmpty()) {<NEW_LINE>JavaLanguageServerPlugin.logError("No content providers found");<N... | ContentProviderDescriptor> descriptors = getDescriptors(preferredProviderIds); |
181,028 | final ListDataSourceSyncJobsResult executeListDataSourceSyncJobs(ListDataSourceSyncJobsRequest listDataSourceSyncJobsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listDataSourceSyncJobsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_... | false), new ListDataSourceSyncJobsResultJsonUnmarshaller()); |
1,575,086 | public void beforeStartNewCreatedVm(VmInstanceSpec spec) {<NEW_LINE>String providerUuid = new NetworkServiceProviderLookup(<MASK><NEW_LINE>Map<String, List<String>> vmStaticIps = new StaticIpOperator().getStaticIpbyVmUuid(spec.getVmInventory().getUuid());<NEW_LINE>// make sure the Flat DHCP acquired DHCP server IP befo... | ).lookupUuidByType(FlatNetworkServiceConstant.FLAT_NETWORK_SERVICE_TYPE_STRING); |
210,719 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {<NEW_LINE>View view = inflater.inflate(R.layout.fragment_rounded, container, false);<NEW_LINE>PicassoAdapter adapter = new PicassoAdapter(getActivity());<NEW_LINE>((ListView) view.findViewById(R.id.main_list)).setAdapter(... | ("http://25.media.tumblr.com/104330dfee76bb4713ea6c424a339b31/tumblr_mzgz92BX471st5lhmo1_1280.jpg", ScaleType.FIT_END)); |
1,099,212 | public static GetK8sClusterResponse unmarshall(GetK8sClusterResponse getK8sClusterResponse, UnmarshallerContext _ctx) {<NEW_LINE>getK8sClusterResponse.setRequestId(_ctx.stringValue("GetK8sClusterResponse.RequestId"));<NEW_LINE>getK8sClusterResponse.setCode(_ctx.integerValue("GetK8sClusterResponse.Code"));<NEW_LINE>getK... | ("GetK8sClusterResponse.ClusterPage.ClusterList[" + i + "].ClusterName")); |
1,709,245 | protected void drawCommonContent(PropertiesParserState state) {<NEW_LINE>DrawHandler drawer = state.getDrawer();<NEW_LINE>double w = getRealSize().getWidth();<NEW_LINE>double h = getRealSize().getHeight();<NEW_LINE>List<PointDouble> p = Arrays.asList(new PointDouble(0, BORDER), new PointDouble(BORDER, 0), new PointDoub... | , p.get(0)); |
920,302 | public void loadAllFromSysConfigTo(final UIDefaults uiDefaults) {<NEW_LINE>if (!DB.isConnected()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final String prefix = createSysConfigPrefix() + ".";<NEW_LINE>final boolean removePrefix = true;<NEW_LINE>final Properties ctx = Env.getCtx();<NEW_LINE>final ClientAndOrgId clientAndO... | getValuesForPrefix(prefix, removePrefix, clientAndOrgId); |
1,021,658 | void accumulateAndMaybeThrowExceptions() throws ActionExecutionException {<NEW_LINE>for (SkyKey key : requestedSkyKeys) {<NEW_LINE>try {<NEW_LINE>SkyValue value = inputDeps.nextOrThrow(SourceArtifactException.class, ActionExecutionException.class, ArtifactNestedSetEvalException.class);<NEW_LINE>if (key instanceof Artif... | (skyKey, (ActionExecutionException) inputException); |
1,477,224 | public PlanWithProperties visitAggregation(AggregationNode node, HashComputationSet parentPreference) {<NEW_LINE>Optional<HashComputation> groupByHash = Optional.empty();<NEW_LINE>List<VariableReferenceExpression> groupingKeys = node.getGroupingKeys();<NEW_LINE>if (!node.isStreamable() && !canSkipHashGeneration(node.ge... | ) : ImmutableMap.of()); |
793,658 | public static DescribeVmMigrationPlanResponse unmarshall(DescribeVmMigrationPlanResponse describeVmMigrationPlanResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeVmMigrationPlanResponse.setRequestId(_ctx.stringValue("DescribeVmMigrationPlanResponse.RequestId"));<NEW_LINE>describeVmMigrationPlanResponse.setSuccess(... | (_ctx.stringValue("DescribeVmMigrationPlanResponse.Message")); |
1,024,372 | static String doString(String self, int tabsize) {<NEW_LINE>StringBuilder sb = PythonUtils.<MASK><NEW_LINE>int linePos = 0;<NEW_LINE>// It's ok to iterate with charAt, we just pass surrogates through<NEW_LINE>for (int i = 0; i < self.length(); i++) {<NEW_LINE>char ch = PString.charAt(self, i);<NEW_LINE>if (ch == '\t') ... | newStringBuilder(self.length()); |
286,332 | private org.batfish.datamodel.GeneratedRoute toAggregateRoute(AggregateRoute route) {<NEW_LINE>org.batfish.datamodel.GeneratedRoute.Builder newRoute = org.batfish.datamodel.GeneratedRoute.builder();<NEW_LINE>newRoute<MASK><NEW_LINE>newRoute.setAdmin(route.getPreference());<NEW_LINE>if (route.getAsPath() != null) {<NEW_... | .setGenerationPolicy(computeGenerationPolicy(route)); |
237,134 | public List<Path> run(final Session<?> session) throws BackgroundException {<NEW_LINE>final Delete delete;<NEW_LINE>if (trash) {<NEW_LINE>if (null == session.getFeature(Trash.class)) {<NEW_LINE>log.warn(String.format("No trash feature available for %s", session));<NEW_LINE>delete = session.getFeature(Delete.class);<NEW... | recursive = new LinkedHashMap<>(); |
489,002 | public ElementOrderer<T> addDeleteButton(final int minEntries) {<NEW_LINE>buttons.add(new // 274C is not visible on Windows, 2715,2716,2717,2718 works an linux<NEW_LINE>// 274C is not visible on Windows, 2715,2716,2717,2718 works an linux<NEW_LINE>ToolTipAction("\u2717") {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public v... | > minEntries).createJButton()); |
347,257 | private static CommandLine parseCommandLine(String[] args) {<NEW_LINE>Option host = new Option(BROKER_NAME, true, "kafka broker");<NEW_LINE>host.setRequired(false);<NEW_LINE>Option jmxPort = new Option(JMX_PORT, true, "kafka jmx port number");<NEW_LINE>jmxPort.setArgName("kafka jmx port number");<NEW_LINE>Option zookee... | (primaryNetworkInterfaceName).addOption(disableEc2metadata); |
457,194 | public Function<byte[], Object> parseDecoder(String valueDecoder) {<NEW_LINE>if (valueDecoder == null) {<NEW_LINE>throw new CacheConfigException("no serialPolicy");<NEW_LINE>}<NEW_LINE>valueDecoder = valueDecoder.trim();<NEW_LINE>URI <MASK><NEW_LINE>valueDecoder = uri.getPath();<NEW_LINE>Map<String, String> params = pa... | uri = URI.create(valueDecoder); |
830,976 | public void marshall(CreateLaunchProfileRequest createLaunchProfileRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createLaunchProfileRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(create... | createLaunchProfileRequest.getDescription(), DESCRIPTION_BINDING); |
1,410,572 | public static void test() throws Exception {<NEW_LINE>int spout_parallelism_hint = JStormUtils.parseInt(conf.get(TOPOLOGY_SPOUT_PARALLELISM_HINT), 1);<NEW_LINE>int split_parallelism_hint = JStormUtils.parseInt(conf.get(TOPOLOGY_SPLIT_PARALLELISM_HINT), 1);<NEW_LINE>int count_parallelism_hint = JStormUtils.parseInt(conf... | , new FastRandomSentenceSpout(), spout_parallelism_hint); |
1,312,925 | public com.amazonaws.services.codecommit.model.DefaultBranchCannotBeDeletedException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.codecommit.model.DefaultBranchCannotBeDeletedException defaultBranchCannotBeDeletedException = new com.amazonaws.services.codecom... | String currentParentElement = context.getCurrentParentElement(); |
845,273 | private static SelectionGroup computeSelectionGroup(Module module, ImmutableMap<ModuleNameAndCompatibilityLevel, ImmutableSortedSet<Version>> allowedVersionSets) {<NEW_LINE>ImmutableSortedSet<Version> allowedVersionSet = allowedVersionSets.get(ModuleNameAndCompatibilityLevel.create(module.getName()<MASK><NEW_LINE>if (a... | , module.getCompatibilityLevel())); |
1,224,463 | public String generate() {<NEW_LINE>StringBuilder builder = new StringBuilder();<NEW_LINE>appendPackageAndCommonImports(builder, null, Arrays.asList(schema));<NEW_LINE>builder.append("import " + HollowFactory.class.getName() + ";\n");<NEW_LINE>builder.append("import " + HollowTypeDataAccess.<MASK><NEW_LINE>builder.appe... | class.getName() + ";\n"); |
929,654 | public void addHeader(String name, String value, boolean first) {<NEW_LINE>if (name == null || name.equals("") || value == null) {<NEW_LINE>throw new NullPointerException("The name or value is null");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>Header header = getHeadersFactory(<MASK><NEW_LINE>m_message.addHeader(header, first)... | ).createHeader(name, value); |
53,991 | protected void writePartialUpdate(PartialUpdate<?> update, RedisData sink) {<NEW_LINE>RedisPersistentEntity<?> entity = mappingContext.getRequiredPersistentEntity(update.getTarget());<NEW_LINE>write(<MASK><NEW_LINE>for (String key : sink.getBucket().keySet()) {<NEW_LINE>if (typeMapper.isTypeKey(key)) {<NEW_LINE>sink.ge... | update.getValue(), sink); |
1,015,096 | public static // function y => x.<NEW_LINE>Formula reverseFormula(Formula rawFormula) {<NEW_LINE>if (rawFormula instanceof ValueFormula) {<NEW_LINE>@SuppressWarnings({ "unchecked" })<NEW_LINE>ValueFormula<NameValue> vf = (ValueFormula<NameValue>) rawFormula;<NEW_LINE>return reverseNameFormula(vf);<NEW_LINE>} else if (r... | VariableFormula(formula.var))); |
79,490 | private void sortTail() {<NEW_LINE>// size > limit here<NEW_LINE>T[] d = data;<NEW_LINE>int l = limit, s = size;<NEW_LINE>Comparator<? super T> cmp = comparator;<NEW_LINE>Arrays.sort(d, l, s, cmp);<NEW_LINE>if (cmp.compare(d[s - 1], d[0]) < 0) {<NEW_LINE>// Common case: descending sequence<NEW_LINE>// Assume size - lim... | ++] = d[i++]; |
175,309 | public Request<ModifyInstancePlacementRequest> marshall(ModifyInstancePlacementRequest modifyInstancePlacementRequest) {<NEW_LINE>if (modifyInstancePlacementRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<ModifyInstancePlacementRequest... | (modifyInstancePlacementRequest.getTenancy())); |
345,643 | public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {<NEW_LINE>// record variable initialization if any<NEW_LINE>if ((flowInfo.tagBits & FlowInfo.UNREACHABLE_OR_DEAD) == 0) {<NEW_LINE>// only set if actually reached<NEW_LINE>this.bits |= ASTNode.IsLocalDeclarationReachable;<... | checkNPEbyUnboxing(currentScope, flowContext, flowInfo); |
1,387,650 | final IndexFacesResult executeIndexFaces(IndexFacesRequest indexFacesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(indexFacesRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<IndexFacesRequest> request = null;<NEW_LINE>Response<In... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
1,144,884 | private Int2ObjectOpenHashMap<ModifiableDBIDs> makeClusterMap(ArrayDBIDs ids, int[] assignment) {<NEW_LINE>Int2ObjectOpenHashMap<ModifiableDBIDs> map = new Int2ObjectOpenHashMap<>();<NEW_LINE>DBIDArrayIter i1 = ids.iter();<NEW_LINE>for (int i = 0; i1.valid(); i1.advance(), i++) {<NEW_LINE>int c = assignment[i];<NEW_LIN... | > entry = iter.next(); |
1,595,573 | @Path("/{queryname}/axis/{axis}/dimension/{dimension}/member/")<NEW_LINE>public Response removeMembers(@PathParam("queryname") String queryName, @PathParam("axis") String axisName, @PathParam("dimension") String dimensionName, MultivaluedMap<String, String> formParams) {<NEW_LINE>try {<NEW_LINE>if (log.isDebugEnabled()... | .class, SelectionRestObject.class)); |
1,203,362 | public VerifyResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>VerifyResult verifyResult = new VerifyResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_... | class).unmarshall(context)); |
1,418,155 | public void render(TeslaCoilTileEntity tile, float partialTicks, PoseStack matrixStack, MultiBufferSource bufferIn, int combinedLightIn, int combinedOverlayIn) {<NEW_LINE>if (tile.isDummy() || !tile.getWorldNonnull().hasChunkAt(tile.getBlockPos()))<NEW_LINE>return;<NEW_LINE>for (LightningAnimation animation : TeslaCoil... | animation.createLightning(Utils.RAND); |
1,718,840 | private // ////////////////////////////////////////////////////////////////////////////<NEW_LINE>SqlPredicateFragment betweenStringHelper(final String cn, final FieldPredicate<?> model, final boolean negated) {<NEW_LINE><MASK><NEW_LINE>switch(inclusion) {<NEW_LINE>case START_EXCLUSIVE_END_EXCLUSIVE:<NEW_LINE>return pre... | final Inclusion inclusion = getInclusionOperand(model); |
1,841,156 | public void copyRowDataToOtherRows(Element row, Element[] otherRows, Column[] columnsToCopy) {<NEW_LINE>if (columnsToCopy != null) {<NEW_LINE>for (Column column : columnsToCopy) {<NEW_LINE>// Copy all except id and computed attributes:<NEW_LINE>if (canChangeColumnData(column)) {<NEW_LINE>for (Element otherRow : otherRo... | value = row.getAttribute(column); |
1,192,678 | private void createPermissionListeners() {<NEW_LINE>PermissionListener feedbackViewPermissionListener = new SamplePermissionListener(this);<NEW_LINE>MultiplePermissionsListener feedbackViewMultiplePermissionListener = new SampleMultiplePermissionListener(this);<NEW_LINE>allPermissionsListener = new CompositeMultiplePer... | mipmap.ic_logo_karumi).build(); |
1,262,672 | private boolean hasThis(int methodId) {<NEW_LINE>String methodName = status.getInstrMethodNames()[methodId];<NEW_LINE>if (methodName.equals("<init>")) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>String className = status.getInstrMethodClasses()[methodId];<NEW_LINE>String signature = status.getInstrMethodSignatures()[m... | Level.SEVERE, null, ex); |
294,140 | final DescribeDataRepositoryAssociationsResult executeDescribeDataRepositoryAssociations(DescribeDataRepositoryAssociationsRequest describeDataRepositoryAssociationsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeDataRepositoryAssociationsRequest);<NEW_LINE><MASK><NEW_LINE>awsRequ... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
866,388 | public SavingsPlansCoverage unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>SavingsPlansCoverage savingsPlansCoverage = new SavingsPlansCoverage();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targe... | JsonToken token = context.getCurrentToken(); |
1,349,139 | final BatchMeterUsageResult executeBatchMeterUsage(BatchMeterUsageRequest batchMeterUsageRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(batchMeterUsageRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(F... | invoke(request, responseHandler, executionContext); |
688,910 | protected void serializeFromStream() {<NEW_LINE>super.serializeFromStream();<NEW_LINE>try {<NEW_LINE>className = document.field("className");<NEW_LINE>final List<ODocument> inds = document.field("indexDefinitions");<NEW_LINE>final List<String> indClasses = document.field("indClasses");<NEW_LINE>indexDefinitions.clear()... | new OIndexException("Error during composite index deserialization"), e); |
175,371 | public void read(org.apache.thrift.protocol.TProtocol prot, compactionCompleted_args struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;<NEW_LINE>java.util.BitSet incoming = iprot.readBitSet(5);<NEW_LINE>if (incoming.... | .securityImpl.thrift.TCredentials(); |
171,685 | private void readKeyFromStorage() {<NEW_LINE>SharedPreferences settings = ContextFactory.getContext().getSharedPreferences(m_strPrefName, Context.MODE_PRIVATE);<NEW_LINE>String strOldKey = settings.getString(m_strDBPartition, "");<NEW_LINE>if (strOldKey != null && strOldKey.length() > 0) {<NEW_LINE>// , Base64.DEFAULT)... | I(TAG, "Encoded key: " + strOldKey); |
1,683,074 | private static Slot[] intoSlots(int[] slotsAndTheirSizes) {<NEW_LINE>Slot[] slots = new Slot[slotsAndTheirSizes.length];<NEW_LINE>int bitCursor = 0;<NEW_LINE>for (int i = 0; i < slotsAndTheirSizes.length; i++) {<NEW_LINE>int bits = slotsAndTheirSizes[i];<NEW_LINE>if (bits > 1 && bitCursor % Byte.SIZE != 0) {<NEW_LINE>t... | throw new IllegalArgumentException("Max number of bits is " + MAX_BITS); |
131,568 | public MethodVisitor visitMethod(int access, String methodName, String descriptor, String signature, String[] exceptions) {<NEW_LINE>userMethods.add(methodName + "/" + descriptor);<NEW_LINE>MethodVisitor superVisitor = super.visitMethod(access, methodName, descriptor, signature, exceptions);<NEW_LINE>if (Modifier.isSta... | superVisitor, method, thisClass, methodCustomizers); |
1,071,385 | public final boolean canSerialize(final Type manifest) {<NEW_LINE>JsonWriter.WriteObject writer = writers.get(manifest);<NEW_LINE>if (writer != null)<NEW_LINE>return true;<NEW_LINE>if (manifest instanceof Class<?>) {<NEW_LINE>final Class<?> content = (Class<?>) manifest;<NEW_LINE>if (JsonObject.class.isAssignableFrom(c... | pt.getActualTypeArguments()[0]; |
522,029 | public static IRubyObject doAccept(RubySocket sock, ThreadContext context, boolean ex) {<NEW_LINE>Ruby runtime = context.runtime;<NEW_LINE>Channel channel = sock.getChannel();<NEW_LINE>try {<NEW_LINE>if (channel instanceof ServerSocketChannel) {<NEW_LINE>ServerSocketChannel serverChannel = (ServerSocketChannel) sock.ge... | SocketChannel socket = serverChannel.accept(); |
748,596 | public static BatchBindTemplatesResponse unmarshall(BatchBindTemplatesResponse batchBindTemplatesResponse, UnmarshallerContext _ctx) {<NEW_LINE>batchBindTemplatesResponse.setRequestId(_ctx.stringValue("BatchBindTemplatesResponse.RequestId"));<NEW_LINE>List<Result> results = new ArrayList<Result>();<NEW_LINE>for (int i ... | ("BatchBindTemplatesResponse.Results[" + i + "].Error")); |
1,453,969 | public void sendAppliedToNode(final DiscoveryNode node, final ClusterState clusterState, final Exception exception) {<NEW_LINE>try {<NEW_LINE>logger.trace("sending commit for cluster state [{}] to [{}]", clusterState.metaData().x2(), node);<NEW_LINE>TransportRequestOptions options = TransportRequestOptions.builder().wi... | metaData().x2()); |
1,569,098 | public RelDataType createTypeWithNullability(RelDataType type, boolean nullable) {<NEW_LINE>if (HazelcastTypeUtils.isJsonType(type)) {<NEW_LINE>return HazelcastJsonType.create(nullable);<NEW_LINE>} else if (HazelcastTypeUtils.isNumericIntegerType(type.getSqlTypeName())) {<NEW_LINE>return HazelcastIntegerType.create((Ha... | super.createTypeWithNullability(type, nullable); |
222,562 | public static void addHospitalExtensions(Provider h, Organization organizationResource) {<NEW_LINE>Table<Integer, String, AtomicInteger> utilization = h.getUtilization();<NEW_LINE>// calculate totals for utilization<NEW_LINE>int totalEncounters = utilization.column(Provider.ENCOUNTERS).values().stream().mapToInt(ai -> ... | get()).sum(); |
351,028 | public DownloadFileResult downloadFile(DownloadFileRequest downloadFileRequest) throws Throwable {<NEW_LINE>GenericRequest genericRequest = new GenericRequest(downloadFileRequest.getBucketName(<MASK><NEW_LINE>String versionId = downloadFileRequest.getVersionId();<NEW_LINE>if (versionId != null) {<NEW_LINE>genericReques... | ), downloadFileRequest.getKey()); |
685,266 | final SearchAssociatedTranscriptsResult executeSearchAssociatedTranscripts(SearchAssociatedTranscriptsRequest searchAssociatedTranscriptsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(searchAssociatedTranscriptsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.get... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
5,889 | public SingularSortedSet2<T> build() {<NEW_LINE>java.util.SortedSet<java.lang.Object> rawTypes = new java.util.TreeSet<java.lang.Object>();<NEW_LINE>if (this.rawTypes != null)<NEW_LINE>rawTypes.addAll(this.rawTypes);<NEW_LINE>rawTypes = java.util.Collections.unmodifiableSortedSet(rawTypes);<NEW_LINE>java.util.SortedSet... | util.Collections.unmodifiableSortedSet(generics); |
216,947 | protected void showTextFieldPanel() {<NEW_LINE>final JLayeredPane layeredPane = getLayeredPane();<NEW_LINE>final Dimension preferredTextFieldPanelSize = myTextFieldPanel.getPreferredSize();<NEW_LINE>final int x = (layeredPane.getWidth() - preferredTextFieldPanelSize.width) / 2;<NEW_LINE>final int paneHeight = layeredPa... | setSize(bounds.getSize()); |
798,085 | public void dispatch(Message message) throws DaemonException.ConnectException {<NEW_LINE>LOG.debug("thread {}: dispatching {}", Thread.currentThread().getId(<MASK><NEW_LINE>try {<NEW_LINE>dispatchLock.lock();<NEW_LINE>try {<NEW_LINE>connection.dispatch(message);<NEW_LINE>connection.flush();<NEW_LINE>} finally {<NEW_LIN... | ), message.getClass()); |
308,090 | public FullHttpRequest toFullHttpRequest() {<NEW_LINE>ByteBuf buffer = Unpooled.buffer();<NEW_LINE>MessageContent content = getContent();<NEW_LINE>if (content != null) {<NEW_LINE>buffer.<MASK><NEW_LINE>}<NEW_LINE>QueryStringEncoder encoder = new QueryStringEncoder(uri);<NEW_LINE>for (Map.Entry<String, String[]> entry :... | writeBytes(content.getContent()); |
1,792,758 | final DeleteMedicalVocabularyResult executeDeleteMedicalVocabulary(DeleteMedicalVocabularyRequest deleteMedicalVocabularyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteMedicalVocabularyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();... | (super.beforeMarshalling(deleteMedicalVocabularyRequest)); |
1,644,375 | private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents<NEW_LINE>void initComponents() {<NEW_LINE>listLabel = new javax.swing.JLabel();<NEW_LINE>listPanel = new javax.swing.JPanel();<NEW_LINE>// NOI18N<NEW_LINE>listLabel.setText(org.openide.util.NbBundle.getMessage<MASK><NEW_LI... | (SelectProjectPanel.class, "SelectProjectPanel.listLabel.text")); |
1,028,987 | private void propagateDepth(Chunk adjChunk, Side side, boolean propagateExternal, Function<Vector3ic, Integer> indexProvider, BlockRegion edgeRegion, int[] depths) {<NEW_LINE>Vector3i adjPos = new Vector3i();<NEW_LINE>int[] adjDepth = new int[depths.length];<NEW_LINE>int dimA = (side == Side.LEFT || side == Side.RIGHT)... | depthIndex = indexProvider.apply(pos); |
545,802 | public static DescribeServerInstancesResponse unmarshall(DescribeServerInstancesResponse describeServerInstancesResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeServerInstancesResponse.setRequestId(_ctx.stringValue("DescribeServerInstancesResponse.RequestId"));<NEW_LINE>describeServerInstancesResponse.setSuccess(... | ("DescribeServerInstancesResponse.ServerInstances[" + i + "].InstanceChargeType")); |
619,487 | private Mono<Response<Void>> deletePremierAddOnWithResponseAsync(String resourceGroupName, String name, String premierAddOnName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be nul... | this.client.mergeContext(context); |
1,113,800 | public RestoreOperationResult execute() throws Exception {<NEW_LINE>logger.log(Level.INFO, "");<NEW_LINE>logger.log(Level.INFO, "Running 'Restore' at client " + config.getMachineName() + " ...");<NEW_LINE>logger.log(Level.INFO, "--------------------------------------------");<NEW_LINE>// Find file history<NEW_LINE>File... | restoreFileVersion, options.getRelativeTargetPath()); |
221,797 | protected void onNext() {<NEW_LINE>try {<NEW_LINE>ConnectionSecurity connectionSecurity = getSelectedSecurity();<NEW_LINE>String username = mUsernameView.getText().toString().trim();<NEW_LINE>String password = null;<NEW_LINE>String clientCertificateAlias = null;<NEW_LINE>AuthType authType = getSelectedAuthType();<NEW_L... | .getText().toString(); |
610,294 | public VpcConfigResponse unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>VpcConfigResponse vpcConfigResponse = new VpcConfigResponse();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = ori... | class).unmarshall(context)); |
1,299,699 | private IndexedFreightCosts retrieveIndexedFreightCosts() {<NEW_LINE>final List<I_M_FreightCost> records = queryBL.createQueryBuilderOutOfTrx(I_M_FreightCost.class).addOnlyActiveRecordsFilter().create().stream().collect(ImmutableList.toImmutableList());<NEW_LINE>final Set<FreightCostId> freightCostIds = records.stream(... | ofRepoId(record.getM_FreightCost_ID()); |
18,540 | protected Map<Range, String> internalLoadTransform(String filename) throws TransformationException {<NEW_LINE>try (FileReader reader = new FileReader(filename)) {<NEW_LINE>final Map<Range, String> data = new LinkedHashMap<>();<NEW_LINE>final OrderedProperties properties = new OrderedProperties();<NEW_LINE>properties.lo... | value = properties.getProperty(entry); |
1,034,427 | public boolean intersectsFrustum(Camera cam, TempVars vars) {<NEW_LINE>if (spotRange == 0) {<NEW_LINE>// The algorithm below does not support infinite spot range.<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>Vector3f farPoint = vars.vect1.set(position).addLocal(vars.vect2.set(<MASK><NEW_LINE>for (int i = 5; i >= 0; i--) {... | direction).multLocal(spotRange)); |
1,565,730 | public static File saveJunitXml(String targetDir, FeatureResult result, String fileName) {<NEW_LINE>DecimalFormat formatter = (DecimalFormat) NumberFormat.getNumberInstance(Locale.US);<NEW_LINE>formatter.applyPattern("0.######");<NEW_LINE>Document doc = XmlUtils.newDocument();<NEW_LINE>Element root = doc.createElement(... | stepsHolder = doc.createElement("failure"); |
1,244,962 | protected Object createNode(JSContext context, JSBuiltin builtin, boolean construct, boolean newTarget, TemporalPlainYearMonthPrototype builtinEnum) {<NEW_LINE>switch(builtinEnum) {<NEW_LINE>case calendar:<NEW_LINE>case year:<NEW_LINE>case month:<NEW_LINE>case monthCode:<NEW_LINE>case daysInMonth:<NEW_LINE>case daysInY... | 1).createArgumentNodes(context)); |
1,176,128 | public void saveProcessInfoOnly(final ProcessInfo pi) {<NEW_LINE>//<NEW_LINE>// Create/Load the AD_PInstance<NEW_LINE>final I_AD_PInstance adPInstance;<NEW_LINE>if (pi.getPinstanceId() == null) {<NEW_LINE>adPInstance = newInstanceOutOfTrx(I_AD_PInstance.class);<NEW_LINE>setValue(adPInstance, I_AD_PInstance.COLUMNNAME_A... | Language reportingLanguage = pi.getReportLanguage(); |
1,388,007 | public void resize(DataObject data, AsyncCompletionCallback<CreateCmdResult> callback) {<NEW_LINE>VolumeObject vol = (VolumeObject) data;<NEW_LINE>StoragePool pool = (StoragePool) data.getDataStore();<NEW_LINE>ResizeVolumePayload resizeParameter = (ResizeVolumePayload) vol.getpayload();<NEW_LINE>ResizeVolumeCommand res... | = new CreateCmdResult(null, null); |
856,279 | protected Deferred<Object> importDataPoint(final TSDB tsdb, final String[] words) {<NEW_LINE>// Ditch the "put".<NEW_LINE>words[0] = null;<NEW_LINE>if (words.length < 5) {<NEW_LINE>// Need at least: metric timestamp value tag<NEW_LINE>// ^ 5 and not 4 because words[0] is "put".<NEW_LINE>throw new IllegalArgumentExcepti... | .parseLong(words[2]); |
903,675 | final ListModelBiasJobDefinitionsResult executeListModelBiasJobDefinitions(ListModelBiasJobDefinitionsRequest listModelBiasJobDefinitionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listModelBiasJobDefinitionsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.get... | endClientExecution(awsRequestMetrics, request, response); |
443,958 | public void mapSimpleJavaTypesPredefined(Map definedElementMap) {<NEW_LINE>// System.out.println("Hit mapSimpleJavaTypesPredefined");<NEW_LINE><MASK><NEW_LINE>// These guys are already defined in XML Schema. The java<NEW_LINE>// types have 1-to-1 mappings.<NEW_LINE>String[] types = new String[] { "java.lang.String", "... | String namespace = getXSDNamespace() + ":"; |
193,644 | private void displaySearchResult(List<GeocodeResult> geocodeResults) {<NEW_LINE>// dismiss any callout<NEW_LINE>if (mMapView.getCallout() != null && mMapView.getCallout().isShowing()) {<NEW_LINE>mMapView.getCallout().dismiss();<NEW_LINE>}<NEW_LINE>// clear map of existing graphics<NEW_LINE>mMapView.getGraphicsOverlays(... | result.getAttributes(), mPinSourceSymbol); |
365,272 | public static List<Column> genColumnsFromEs(EsRestClient client, String indexName, String mappingType) {<NEW_LINE>String mapping = client.getMapping(indexName);<NEW_LINE>JSONObject mappingProps = getMappingProps(indexName, mapping, mappingType);<NEW_LINE>List<String> arrayFields = getArrayFields(mapping);<NEW_LINE>Set<... | String>) mappingProps.keySet(); |
1,516,105 | // NOTE: this can convert segments in v1 and v2 format to v3.<NEW_LINE>// we use variable names with v2 prefix for readability<NEW_LINE>@Override<NEW_LINE>public void convert(File v2SegmentDirectory) throws Exception {<NEW_LINE>Preconditions.checkNotNull(v2SegmentDirectory, "Segment directory should not be null");<NEW_... | copyIndexData(v2SegmentDirectory, v2Metadata, v3TempDirectory); |
318,356 | static void emitFromNativeConversion(AsmBuilder builder, SkinnyMethodAdapter mv, FromNativeType fromNativeType, Class nativeClass) {<NEW_LINE>// If there is a result converter, retrieve it and put on the stack<NEW_LINE>FromNativeConverter fromNativeConverter = fromNativeType.getFromNativeConverter();<NEW_LINE>if (fromN... | fromNativeConverter.nativeType(), nativeClass); |
200,508 | public void openReaderContext(ShardId shardId, TimeValue keepAlive, ActionListener<ShardSearchContextId> listener) {<NEW_LINE>checkKeepAliveLimit(keepAlive.millis());<NEW_LINE>final IndexService indexService = indicesService.indexServiceSafe(shardId.getIndex());<NEW_LINE>final IndexShard shard = indexService.getShard(s... | -> searchOperationListener.onFreeReaderContext(finalReaderContext)); |
802,266 | void changeDeviceIdWithoutMergeInternal(DeviceIdType type, @Nullable String deviceId) {<NEW_LINE>if (type == null) {<NEW_LINE>L.e("[ModuleDeviceId] changeDeviceIdWithoutMerge, type cannot be null");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (type == DeviceIdType.DEVELOPER_SUPPLIED && deviceId == null) {<NEW_LINE>L.e("[Mo... | _cly.moduleRequestQueue.sendEventsIfNeeded(true); |
1,376,099 | private void reloadProjectMarkdown(ProjectModel project) {<NEW_LINE>// project markdown<NEW_LINE>File pmkd = new File(repositoryManager.getRepositoriesFolder(), (project.isRoot ? "" : project.name) + "/project.mkd");<NEW_LINE>if (pmkd.exists()) {<NEW_LINE>Date lm = new Date(pmkd.lastModified());<NEW_LINE>if (!projectMa... | FileUtils.readContent(pmkd, "\n"); |
1,164,656 | public void customImageDialog(Context context, boolean cancelable, String title, File file, String positiveButton, String negativeButton) {<NEW_LINE>LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);<NEW_LINE>View listLayout = inflater.inflate(R.layout.dialog_image, nu... | decodeFile(file.getAbsolutePath()); |
214,464 | private static void fixAMSBinderCache(IBinder fakeBinder) throws Throwable {<NEW_LINE>Object singletonObj = null;<NEW_LINE>try {<NEW_LINE>final Class<?> amsNativeClazz = Class.forName("android.app.ActivityManagerNative");<NEW_LINE>final Field gDefaultField = <MASK><NEW_LINE>singletonObj = gDefaultField.get(null);<NEW_L... | ShareReflectUtil.findField(amsNativeClazz, "gDefault"); |
1,514,548 | private List<VariableTree> generateEJBLookupCode(TreeMaker maker, TypeElement srcClass, ExecutableElement srcMethod) {<NEW_LINE>// NOI18N<NEW_LINE>final String ejbContainerPackage = "javax.ejb.embeddable.EJBContainer";<NEW_LINE>List<VariableTree> trees = new ArrayList<>();<NEW_LINE>// TODO: there are probably better wa... | container = maker.Identifier(ejbContainerPackage); |
1,772,618 | public CostCategoryValues unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CostCategoryValues costCategoryValues = new CostCategoryValues();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.get... | String currentParentElement = context.getCurrentParentElement(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.