idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,573,001 | public static void main(String[] args) {<NEW_LINE>Exercise41_OddLengthDirectedCycle oddLengthDirectedCycle = new Exercise41_OddLengthDirectedCycle();<NEW_LINE>Digraph digraph1 = new Digraph(4);<NEW_LINE>digraph1.addEdge(0, 1);<NEW_LINE>digraph1.addEdge(1, 2);<NEW_LINE>digraph1.addEdge(2, 3);<NEW_LINE>digraph1.addEdge(3... | digraph3.addEdge(0, 1); |
749,067 | private FileIO io(String location) {<NEW_LINE>String impl = implFromLocation(location);<NEW_LINE>FileIO io = ioInstances.get(impl);<NEW_LINE>if (io != null) {<NEW_LINE>return io;<NEW_LINE>}<NEW_LINE>synchronized (ioInstances) {<NEW_LINE>// double check while holding the lock<NEW_LINE>io = ioInstances.get(impl);<NEW_LIN... | loadFileIO(impl, properties, conf); |
59,257 | private static Object readSynchronizedCollectionFrom(Input input, Schema<?> schema, Object owner, IdStrategy strategy, boolean graph, Object collection, boolean ss, boolean list) throws IOException {<NEW_LINE>if (graph) {<NEW_LINE>// update the actual reference.<NEW_LINE>((GraphInput) input).updateLast(collection, owne... | mergeObject(wrapper, strategy.POLYMORPHIC_COLLECTION_SCHEMA); |
1,477,498 | public String describe(ObjectName bean) throws Exception {<NEW_LINE>MBeanInfo <MASK><NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append(bean);<NEW_LINE>sb.append('\n');<NEW_LINE>sb.append(mbinfo.getClassName());<NEW_LINE>sb.append('\n');<NEW_LINE>sb.append(" - " + mbinfo.getDescription());<NEW_LINE>sb.... | mbinfo = mserver.getMBeanInfo(bean); |
1,404,444 | public CompilationUnitDeclaration updatedCompilationUnitDeclaration() {<NEW_LINE>if (this.typeCount > 0) {<NEW_LINE>int existingCount = this.unitDeclaration.types == null ? 0 : this.unitDeclaration.types.length;<NEW_LINE>TypeDeclaration[] typeDeclarations = new <MASK><NEW_LINE>if (existingCount > 0) {<NEW_LINE>System.a... | TypeDeclaration[existingCount + this.typeCount]; |
1,316,493 | public PhyTableOperation buildDeleteForCorrector(List<String> primaryKeys) {<NEW_LINE>initParams(0);<NEW_LINE>// build target table<NEW_LINE>buildTargetTable();<NEW_LINE>// build PKs equals values condition<NEW_LINE>final SqlNode pks, values;<NEW_LINE>if (1 == primaryKeys.size()) {<NEW_LINE>pks = new SqlIdentifier(prim... | SqlDynamicParam(nextDynamicIndex, SqlParserPos.ZERO); |
1,674,466 | public boolean onOptionsItemSelected(MenuItem item) {<NEW_LINE>switch(item.getItemId()) {<NEW_LINE>case R.id.action_follow:<NEW_LINE>mPresenter.followUser(!mPresenter.isFollowing());<NEW_LINE>invalidateOptionsMenu();<NEW_LINE>showSuccessToast(mPresenter.isFollowing() ? getString(R.string.followed) : getString(R.string.... | getUser().getHtmlUrl()); |
514,412 | public Node writeDescriptor(Node parent, String nodeName, ConnectionFactoryDefinitionDescriptor desc) {<NEW_LINE>Node node = appendChild(parent, nodeName);<NEW_LINE>appendTextChild(node, TagNames.CONNECTION_FACTORY_DESCRIPTION, desc.getDescription());<NEW_LINE>appendTextChild(node, TagNames.CONNECTION_FACTORY_NAME, des... | CONNECTION_FACTORY_MIN_POOL_SIZE, desc.getMinPoolSize()); |
1,058,848 | void dataTypeCategoryPathChanged(DataTypeDB dt, CategoryPath oldPath, long oldCatId) {<NEW_LINE>try {<NEW_LINE>if (!(dt instanceof Array) && !(dt instanceof Pointer)) {<NEW_LINE>for (Field arrayId : arrayAdapter.getRecordIdsInCategory(oldCatId)) {<NEW_LINE>long id = arrayId.getLongValue();<NEW_LINE>DBRecord rec = array... | ArrayDB) getDataType(id, rec); |
371,609 | public KVMPhysicalDisk copyPhysicalDisk(KVMPhysicalDisk disk, String name, KVMStoragePool destPool, int timeout) {<NEW_LINE>if (StringUtils.isEmpty(name) || disk == null || destPool == null) {<NEW_LINE>LOGGER.error("Unable to copy physical disk due to insufficient data");<NEW_LINE>throw new CloudRuntimeException("Unabl... | QemuImg qemu = new QemuImg(timeout); |
1,242,478 | protected void paintComponent(Graphics g) {<NEW_LINE>Graphics2D g2 = (Graphics2D) g;<NEW_LINE>if (isEnabled()) {<NEW_LINE>if (checked) {<NEW_LINE>g2.drawImage(checkedImage, 0, 0, null);<NEW_LINE>} else {<NEW_LINE>g2.drawImage(<MASK><NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (mode == Mode.CHECK && checked) {<NEW_LINE>g2.... | normalImage, 0, 0, null); |
334,718 | public void deleteByIdWithResponse(String id, Context context) {<NEW_LINE>String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>throw logger.logExceptionAsError(new IllegalArgumentException(String.format("The resource ID '%s' is not valid. Missin... | resourceGroupName, workspaceName, privateEndpointConnectionName, context); |
343,186 | private Mono<PagedResponse<SpatialAnchorsAccountInner>> listByResourceGroupSinglePageAsync(String resourceGroupName, 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 null."));<NEW_L... | this.client.mergeContext(context); |
112,997 | // actually removes buffers with refcount == 0 (and update happen more then a 'threshold' time ago)<NEW_LINE>public synchronized void deallocateRemovedBuffers(boolean now) {<NEW_LINE>// most cases should 1 or 2<NEW_LINE>HashSet<DbusEventBuffer> set = new HashSet<DbusEventBuffer>(5);<NEW_LINE>// first step remove the ke... | PhysicalPartitionKey pKey = it.next(); |
494,184 | void updateEventList() {<NEW_LINE>String[] producerEvents = producerTool.getToolEventNames();<NEW_LINE>String[] consumedEvents = consumerTool.getConsumedToolEventNames();<NEW_LINE>List<String> pList = Arrays.asList(producerEvents);<NEW_LINE>List<String> cList = Arrays.asList(consumedEvents);<NEW_LINE>ArrayList<String> ... | connectHt.put(event, DISCONNECTED); |
385,323 | private static void config(Session session) {<NEW_LINE>Project project = null;<NEW_LINE>if (session.project == null) {<NEW_LINE>if (session.fo != null) {<NEW_LINE>project = FileOwnerQuery.getOwner(session.fo);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>project = session.project;<NEW_LINE>}<NEW_LINE>// sanity check; we need ... | ProfilerIDESettings gps = ProfilerIDESettings.getInstance(); |
1,851,202 | final UpdatePrimaryRegionResult executeUpdatePrimaryRegion(UpdatePrimaryRegionRequest updatePrimaryRegionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updatePrimaryRegionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
1,742,206 | final RemoveTargetsResult executeRemoveTargets(RemoveTargetsRequest removeTargetsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(removeTargetsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | invoke(request, responseHandler, executionContext); |
1,386,120 | public Description matchSwitch(SwitchTree tree, VisitorState state) {<NEW_LINE>if (!ONE_OF_ENUM.apply(getType(tree.getExpression()), state)) {<NEW_LINE>return NO_MATCH;<NEW_LINE>}<NEW_LINE>ExpressionTree expression = stripParentheses(tree.getExpression());<NEW_LINE>if (!(expression instanceof MethodInvocationTree)) {<N... | ().toString())); |
402,222 | public void addPositionKeyframe(long time, double posX, double posY, double posZ, float yaw, float pitch, float roll, int spectated) {<NEW_LINE>LOGGER.debug("Adding position keyframe at {} pos {}/{}/{} rot {}/{}/{} entId {}", time, posX, posY, posZ, yaw, pitch, roll, spectated);<NEW_LINE>Path path = positionPath;<NEW_L... | keyframe = path.getKeyframe(time); |
1,805,005 | void persistUserMessage(final String userId, final long messageId, final long messageSeq, int type, String target, int line, boolean directing, final int messageContentType) {<NEW_LINE>mScheduler.execute(() -> {<NEW_LINE>Connection connection = null;<NEW_LINE>PreparedStatement statement = null;<NEW_LINE>try {<NEW_LINE>... | printExecption(LOG, e, RDBS_Exception); |
456,101 | public static GetMockRuleByProviderAppIdResponse unmarshall(GetMockRuleByProviderAppIdResponse getMockRuleByProviderAppIdResponse, UnmarshallerContext _ctx) {<NEW_LINE>getMockRuleByProviderAppIdResponse.setRequestId(_ctx.stringValue("GetMockRuleByProviderAppIdResponse.RequestId"));<NEW_LINE>getMockRuleByProviderAppIdRe... | ("GetMockRuleByProviderAppIdResponse.Data[" + i + "].ProviderAppId")); |
998,469 | public void marshall(ListFHIRImportJobsRequest listFHIRImportJobsRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (listFHIRImportJobsRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(<MASK><NE... | listFHIRImportJobsRequest.getDatastoreId(), DATASTOREID_BINDING); |
1,624,392 | public static long pack(double v) {<NEW_LINE>// Not "raw" , so NaNs end up as the same bit pattern when packed.<NEW_LINE>long x = Double.doubleToLongBits(v);<NEW_LINE>long sign = BitsLong.unpack(x, 63, 64);<NEW_LINE>long exp11 = BitsLong.<MASK><NEW_LINE>long exp9 = encode11to9(exp11);<NEW_LINE>if (exp9 == -1)<NEW_LINE>... | unpack(x, 52, 63); |
310,535 | protected String[] doOtherType(Object object, @Cached("createToObject(context)") JSToObjectNode toObjectNode, @Cached("create(context)") JSGetLengthNode getLengthNode, @Cached JSHasPropertyNode hasPropertyNode, @Cached TypeOfNode typeOfNode, @Cached JSToStringNode toStringNode, @Cached @Shared("equalsNode") TruffleStri... | len = getLengthNode.executeLong(localeObj); |
609,723 | public void registerService(String serviceName, String groupName, Instance instance) throws NacosException {<NEW_LINE>NAMING_LOGGER.info("[REGISTER-SERVICE] {} registering service {} with instance: {}", namespaceId, serviceName, instance);<NEW_LINE>String groupedServiceName = NamingUtils.getGroupedName(serviceName, gro... | IP_PARAM, instance.getIp()); |
1,001,825 | private JPanel createScraperProgressPanel() {<NEW_LINE>JPanel scraperProgressPanel = new JPanel();<NEW_LINE>scraperProgressPanel.setLayout(new BoxLayout<MASK><NEW_LINE>List<DataItemSource> activeScrapers = scraperGroupAmalgamationPreference.getActiveScrapersUsedInOverallPreference();<NEW_LINE>// update the state of wha... | (scraperProgressPanel, BoxLayout.Y_AXIS)); |
1,501,534 | public static void processAssemblyRecipeAddIMC(IMCEvent event, IMCMessage msg) {<NEW_LINE>boolean failed = false;<NEW_LINE>if (!msg.isNBTMessage()) {<NEW_LINE>failed = true;<NEW_LINE>} else {<NEW_LINE>NBTTagCompound recipe = msg.getNBTValue();<NEW_LINE>if (!recipe.hasKey("id") || !recipe.hasKey("input", 9) || !recipe.h... | NBTTagList) recipe.getTag("input"); |
588,923 | protected void resolveAnnotations(Scope scope, int location) {<NEW_LINE>Annotation[][] annotationsOnDimensions = getAnnotationsOnDimensions();<NEW_LINE>if (this.annotations != null || annotationsOnDimensions != null) {<NEW_LINE>BlockScope resolutionScope = Scope.typeAnnotationsResolutionScope(scope);<NEW_LINE>if (resol... | LookupEnvironment environment = scope.environment(); |
848,268 | private void loadInfo(DBRProgressMonitor monitor) {<NEW_LINE>if (!isInfoLoaded && !CommonUtils.isEmpty(name)) {<NEW_LINE>try (JDBCSession session = DBUtils.openMetaSession(monitor, this, "Load sequence info")) {<NEW_LINE>try (JDBCStatement dbStat = session.createStatement()) {<NEW_LINE>try (JDBCResultSet dbResult = dbS... | .safeGetObject(dbResult, "minimum_value")); |
1,793,124 | private void addCommon() {<NEW_LINE>this.registerBuildingLootTables(TinkerCommons.blazewood);<NEW_LINE>this.registerBuildingLootTables(TinkerCommons.lavawood);<NEW_LINE>this.registerFenceBuildingLootTables(TinkerMaterials.nahuatl);<NEW_LINE>this.dropSelf(TinkerModifiers.silkyJewelBlock.get());<NEW_LINE>this.dropSelf(<M... | TinkerCommons.goldBars.get()); |
1,279,787 | private void exportPressed() {<NEW_LINE>File chosenFile = null;<NEW_LINE>FileWriter fw = null;<NEW_LINE>String title = res.getString("DViewPem.ExportPem.Title");<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>JFileChooser chooser = FileChooserFactory.getX509FileChooser();<NEW_LINE>chooser.setCurrentDirectory(CurrentDirectory.... | String certPem = jtaPem.getText(); |
275,979 | private static InputStream readPkcs1PrivateKey(byte[] pkcs1Bytes) {<NEW_LINE>int pkcs1Length = pkcs1Bytes.length;<NEW_LINE>int totalLength = pkcs1Length + 22;<NEW_LINE>byte[] pkcs8Header = new byte[] { // Sequence + total length<NEW_LINE>// Sequence + total length<NEW_LINE>0x30, // Sequence + total length<NEW_LINE>(byt... | toString().getBytes()); |
192,614 | public static java.lang.Object decode_(com.jsoniter.JsonIterator iter) throws java.io.IOException {<NEW_LINE>java.util.ArrayList col = (java.util.ArrayList) com.jsoniter.CodegenAccess.resetExistingObject(iter);<NEW_LINE>if (iter.readNull()) {<NEW_LINE>com.<MASK><NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (!com.jsonit... | jsoniter.CodegenAccess.resetExistingObject(iter); |
729,911 | private void visitClassesAndCollectReferences(Collection<String> startingClasses, boolean startsFromAdviceClass) {<NEW_LINE>Queue<String> instrumentationQueue = new ArrayDeque<>(startingClasses);<NEW_LINE>boolean isAdviceClass = startsFromAdviceClass;<NEW_LINE>while (!instrumentationQueue.isEmpty()) {<NEW_LINE>String v... | ), cv.getHelperSuperClasses()); |
1,456,753 | private static void tryFileLock(FileCacheStore.Builder builder, String fileName) throws PathNotExclusiveException {<NEW_LINE>File lockFile <MASK><NEW_LINE>lockFile.deleteOnExit();<NEW_LINE>FileLock dirLock;<NEW_LINE>try {<NEW_LINE>lockFile.createNewFile();<NEW_LINE>if (!lockFile.exists()) {<NEW_LINE>throw new Assertion... | = new File(fileName + ".lock"); |
426,831 | public void generateFiles() {<NEW_LINE>vhdlTop.fireInvalidated();<NEW_LINE>tclRun.fireInvalidated();<NEW_LINE>new File(VhdlSimConstants.SIM_PATH).mkdirs();<NEW_LINE>new File(VhdlSimConstants.SIM_SRC_PATH).mkdirs();<NEW_LINE>new File(<MASK><NEW_LINE>try {<NEW_LINE>Files.copy(this.getClass().getResourceAsStream(VhdlSimCo... | VhdlSimConstants.SIM_COMP_PATH).mkdirs(); |
1,688,389 | public Object createObject(Attributes atts) {<NEW_LINE>StandardChartSettings chartSettings = new StandardChartSettings();<NEW_LINE>String isShowLegend = atts.getValue(JRXmlConstants.ATTRIBUTE_isShowLegend);<NEW_LINE>if (isShowLegend != null && isShowLegend.length() > 0) {<NEW_LINE>chartSettings.setShowLegend(Boolean.va... | .getValue(JRXmlConstants.ATTRIBUTE_hyperlinkTarget)); |
320,172 | public void run() {<NEW_LINE>Thread.currentThread().setName(threadName);<NEW_LINE>final String methodName = "connectBG:run";<NEW_LINE>MqttException mqttEx = null;<NEW_LINE>// @TRACE 220=><NEW_LINE>log.<MASK><NEW_LINE>try {<NEW_LINE>// Reset an exception on existing delivery tokens.<NEW_LINE>// This will have been set i... | fine(CLASS_NAME, methodName, "220"); |
1,358,709 | public void read(org.apache.thrift.protocol.TProtocol prot, continueMultiScan_result 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 <MASK><NEW_LINE>if (incoming.get(0)) {<NEW_LINE>struct... | incoming = iprot.readBitSet(3); |
70,523 | @SaCheckLogin<NEW_LINE>public Object child(@Param("pid") String pid, @Param("wxid") String wxid, HttpServletRequest req) {<NEW_LINE>List<Wx_menu> list = new ArrayList<>();<NEW_LINE>List<NutMap> treeList = new ArrayList<>();<NEW_LINE>Cnd cnd = Cnd.NEW();<NEW_LINE>if (Strings.isBlank(pid)) {<NEW_LINE>cnd.and(Cnd.exps("pa... | ("parentId", "is", null)); |
1,377,486 | public static void main(String[] args) {<NEW_LINE>String calibDir = UtilIO.pathExample("calibration/stereo/Bumblebee2_Chess/");<NEW_LINE>String imageDir = UtilIO.pathExample("stereo/");<NEW_LINE>StereoParameters param = CalibrationIO.load(new File(calibDir, "stereo.yaml"));<NEW_LINE>// load and convert images into a Bo... | UtilImageIO.loadImage(imageDir, "chair01_right.jpg"); |
1,576,340 | protected void calculatePath(Map<String, Object> restControllers, Map<RequestMappingInfo, HandlerMethod> map, Locale locale, OpenAPI openAPI) {<NEW_LINE>TreeMap<RequestMappingInfo, HandlerMethod> methodTreeMap = new TreeMap<>(byReversedRequestMappingInfos());<NEW_LINE>methodTreeMap.putAll(map);<NEW_LINE>Optional<Spring... | toArray(String[]::new); |
1,371,750 | private void saveNormalize(final EncogWriteHelper out) {<NEW_LINE>saveSubSection(out, "NORMALIZE", "CONFIG");<NEW_LINE>out.addSubSection("RANGE");<NEW_LINE>out.addColumn("name");<NEW_LINE>out.addColumn("io");<NEW_LINE>out.addColumn("timeSlice");<NEW_LINE>out.addColumn("action");<NEW_LINE>out.addColumn("high");<NEW_LINE... | "Unknown action: " + field.getAction()); |
1,387,792 | public static void main(String... args) {<NEW_LINE>Map<String, Object> props = new HashMap<>();<NEW_LINE>props.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9092");<NEW_LINE>props.put(ProducerConfig.RETRIES_CONFIG, 0);<NEW_LINE>props.put(ProducerConfig.BATCH_SIZE_CONFIG, 16384);<NEW_LINE>props.put(ProducerCon... | "key:" + i, "value:" + i); |
70,529 | public static Name fromAddress(byte[] addr) {<NEW_LINE>if (addr.length != 4 && addr.length != 16) {<NEW_LINE>throw new IllegalArgumentException("array must contain 4 or 16 elements");<NEW_LINE>}<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>if (addr.length == 4) {<NEW_LINE>for (int i = addr.length - 1; i >=... | ] nibbles = new int[2]; |
150,449 | public void flattenOnTop(Movie movie, File outF) throws IOException {<NEW_LINE>MovieBox moov = movie.getMoov();<NEW_LINE>if (!moov.isPureRefMovie())<NEW_LINE>throw new IllegalArgumentException("movie should be reference");<NEW_LINE>FileChannelWrapper out = null;<NEW_LINE>try {<NEW_LINE>out = NIOUtils.rwChannel(outF);<N... | setPosition(out.size()); |
1,708,437 | protected void insertHistoricVariableUpdateEntity(HistoricVariableUpdateEventEntity historyEvent) {<NEW_LINE>DbEntityManager dbEntityManager = getDbEntityManager();<NEW_LINE>// insert update only if history level = FULL<NEW_LINE>if (shouldWriteHistoricDetail(historyEvent)) {<NEW_LINE>// insert byte array entity (if app... | class, historyEvent.getVariableInstanceId()); |
1,731,898 | private void collectionAction(RESTRequest request, RESTResponse response) {<NEW_LINE>RESTHelper.ensureConsumesJson(request);<NEW_LINE>InputStream is = RESTHelper.getInputStream(request);<NEW_LINE>try {<NEW_LINE>JSONObject obj = (JSONObject) JSON.parse(is);<NEW_LINE>JSONArray filesArray = (JSONArray) obj.get("delete");<... | response.setStatus(APIConstants.STATUS_NO_CONTENT); |
305,946 | final CreateWorldExportJobResult executeCreateWorldExportJob(CreateWorldExportJobRequest createWorldExportJobRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createWorldExportJobRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
807,542 | // Test that a datasource backed by Driver can be used with both the generic properties element and properties.oracle<NEW_LINE>// element when type="java.sql.Driver"<NEW_LINE>@Test<NEW_LINE>public void testDSUsingDriver() throws Exception {<NEW_LINE>Connection conn = driver_ds.getConnection();<NEW_LINE>assertFalse("dri... | ps.setString(2, "twenty"); |
1,074,820 | public double distance(SparseNumberVector v1, SparseNumberVector v2) {<NEW_LINE>// Get the bit masks<NEW_LINE>double accu = 0.;<NEW_LINE>int i1 = v1.iter(), i2 = v2.iter();<NEW_LINE>while (v1.iterValid(i1) && v2.iterValid(i2)) {<NEW_LINE>final int d1 = v1.iterDim(i1), d2 = v2.iterDim(i2);<NEW_LINE>if (d1 < d2) {<NEW_LI... | val = v2.iterDoubleValue(i2); |
704,236 | public void accept(Delta<JiffiesSnapshot> jiffiesDelta) {<NEW_LINE>double procSipDelta = delta.dlt.configureProcSip(powerProfile, jiffiesDelta.dlt.totalJiffies.get());<NEW_LINE>double procSipEnd = delta.end.configureProcSip(powerProfile, jiffiesDelta.<MASK><NEW_LINE>printer.writeLine("inc_prc_sip", String.format(Locale... | end.totalJiffies.get()); |
1,061,693 | private ArrayList<Object> zpkBilinear(Complex[] z, Complex[] p, int k, double fs) {<NEW_LINE>// Return a digital filter from an analog one using a bilinear transform.<NEW_LINE>Complex[] zz = new Complex[z.length];<NEW_LINE>Complex[] pz = new Complex[p.length];<NEW_LINE>double kz;<NEW_LINE>relativeDegree(z, p);<NEW_LINE... | (complexFs2.subtract(aZ)); |
1,399,494 | public List<Cache> selectCachesByGeo(final String clientIp, final DeliveryService deliveryService, final CacheLocation cacheLocation, final Track track, final IPVersions requestVersion) throws GeolocationException {<NEW_LINE>Geolocation clientLocation = null;<NEW_LINE>try {<NEW_LINE>clientLocation = getClientLocation(c... | track.setResult(ResultType.GEO); |
817,332 | private Uri saveToBlobInternal(@NonNull GiphyImage giphyImage, boolean isForMms) throws IOException {<NEW_LINE>String url;<NEW_LINE>String mime;<NEW_LINE>if (isForMms) {<NEW_LINE>url = giphyImage.getGifMmsUrl();<NEW_LINE>mime = MediaUtil.IMAGE_GIF;<NEW_LINE>} else {<NEW_LINE>url = giphyImage.getMp4Url();<NEW_LINE>mime ... | "Unexpected response code: " + response.code()); |
579,211 | private void addPaymentGroup() {<NEW_LINE>paymentTitledGroupBg = addTitledGroupBg(gridPane, gridRow, 1, Res.get("shared.selectTradingAccount"));<NEW_LINE>GridPane.setColumnSpan(paymentTitledGroupBg, 2);<NEW_LINE>HBox paymentGroupBox = new HBox();<NEW_LINE>paymentGroupBox.setAlignment(Pos.CENTER_LEFT);<NEW_LINE>paymentG... | tradingAccountBoxTuple.first.getMinWidth()); |
451,207 | private static int blend_screen(int dst, int src) {<NEW_LINE>int a = src >>> 24;<NEW_LINE>int s_a = a + (a >= 0x7F ? 1 : 0);<NEW_LINE>int d_a = 0x100 - s_a;<NEW_LINE>int d_rb = dst & RB_MASK;<NEW_LINE>int d_gn = dst & GN_MASK;<NEW_LINE>int s_gn = src & GN_MASK;<NEW_LINE>int f_r = (dst & RED_MASK) >> 16;<NEW_LINE>int f_... | s_a) >>> 8 & GN_MASK; |
26,625 | public boolean onTouch(View v, MotionEvent event) {<NEW_LINE>resetNoTouchTimer(getActionBar().isShowing() && mHudVisible == false);<NEW_LINE>mGesDetect.onTouchEvent(event);<NEW_LINE>// Pass the touch event to the native layer for camera control.<NEW_LINE>// Single touch to rotate the camera around the device.<NEW_LINE>... | getX(1) / mScreenSize.x; |
1,047,771 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>// Mapbox access token is configured here. This needs to be called either in your application<NEW_LINE>// object or in the same activity which contains the mapview.<NEW_LINE>Mapbox.getInstance(this, getString(R.st... | setContentView(R.layout.activity_simplify_polyline); |
78,167 | public static XmlResourceValue from(Value proto, Visibility visibility, ResourceType resourceType) {<NEW_LINE>Item item = proto.getItem();<NEW_LINE>String stringValue = null;<NEW_LINE>ImmutableMap.Builder<String, String> attributes = ImmutableMap.builder();<NEW_LINE>if (item.hasStr()) {<NEW_LINE>stringValue = XmlEscape... | StringBuilder(styledString.getValue()); |
1,346,994 | private void loadNode165() {<NEW_LINE>BaseDataVariableTypeNode node = new BaseDataVariableTypeNode(this.context, Identifiers.SessionDiagnosticsArrayType_SessionDiagnostics_ClientConnectionTime, new QualifiedName(0, "ClientConnectionTime"), new LocalizedText("en", "ClientConnectionTime"), LocalizedText.NULL_VALUE, UInte... | .expanded(), false)); |
15,461 | public TableObject unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>TableObject tableObject = new TableObject();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if ... | String currentParentElement = context.getCurrentParentElement(); |
641,725 | private static byte[] textToNumericFormatV4(String ipString) {<NEW_LINE>boolean isIpv6 = false;<NEW_LINE>// handle IPv6 forms of IPv4 addresses<NEW_LINE>if (ipString.toUpperCase(Locale.US).startsWith("::FFFF:")) {<NEW_LINE>ipString = ipString.substring(7);<NEW_LINE>} else if (ipString.startsWith(DOUBLE_COLON)) {<NEW_LI... | 0, data, 12, IPV4_PART_COUNT); |
998,984 | public PhysicalNetworkVO doInTransaction(TransactionStatus status) {<NEW_LINE>// Create the new physical network in the database<NEW_LINE>long id = _physicalNetworkDao.getNextInSequence(Long.class, "id");<NEW_LINE>PhysicalNetworkVO pNetwork = new PhysicalNetworkVO(id, zoneId, vnetRange, networkSpeed, domainId, broadcas... | addDefaultVpcVirtualRouterToPhysicalNetwork(pNetwork.getId()); |
1,234,906 | /*<NEW_LINE>* (non-Javadoc)<NEW_LINE>* @see com.aptana.ide.core.io.ConnectionPoint#loadState(com.aptana.ide.core.io.epl.IMemento)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>protected void loadState(IMemento memento) {<NEW_LINE>super.loadState(memento);<NEW_LINE>IMemento child = memento.getChild(ELEMENT_HOST);<NEW_LINE>if ... | child = memento.getChild(ELEMENT_TRANSFER_TYPE); |
1,002,369 | public void createPrintJobs(@NonNull final IPrintingQueueSource source, @NonNull final ContextForAsyncProcessing printJobContext) {<NEW_LINE>final <MASK><NEW_LINE>int printJobCount = 0;<NEW_LINE>final List<I_C_Print_Job_Instructions> pdfPrintingJobInstructions = new ArrayList<>();<NEW_LINE>try {<NEW_LINE>// important: ... | PrintingQueueProcessingInfo printingQueueProcessingInfo = source.getProcessingInfo(); |
1,104,376 | public static CodegenExpression codegen(IntervalComputerFinishedByThresholdForge forge, CodegenExpression leftStart, CodegenExpression leftEnd, CodegenExpression rightStart, CodegenExpression rightEnd, CodegenMethodScope codegenMethodScope, ExprForgeCodegenSymbol exprSymbol, CodegenClassScope codegenClassScope) {<NEW_L... | ).addParam(IntervalForgeCodegenNames.PARAMS); |
325,537 | private void convertObjects(Map<Uid, NamedManagementObject> objs) {<NEW_LINE>AddressSpaceToIpSpace addressSpaceToIpSpace = new AddressSpaceToIpSpace(objs);<NEW_LINE>objs.values().forEach(obj -> {<NEW_LINE>if (obj instanceof UnknownTypedManagementObject) {<NEW_LINE>UnknownTypedManagementObject utmo = (UnknownTypedManage... | obj.getName(), metadata); |
1,653,424 | // [END on_start_check_user]<NEW_LINE>private void startSignIn() {<NEW_LINE>// [START sign_in_custom]<NEW_LINE>mAuth.signInWithCustomToken(mCustomToken).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onComplete(@NonNull Task<AuthResult> task) {<NEW_L... | Toast.LENGTH_SHORT).show(); |
60,140 | public Properties jpaProperties() {<NEW_LINE>Properties extraProperties = new Properties();<NEW_LINE>// Regular Hibernate Settings<NEW_LINE>extraProperties.put("hibernate.dialect", HapiFhirH2Dialect.class.getName());<NEW_LINE>extraProperties.put("hibernate.format_sql", "true");<NEW_LINE>extraProperties.put("hibernate.s... | put(HibernateOrmMapperSettings.ENABLED, "false"); |
1,265,140 | private void checkCrossRowAfterFoundBufferIterated() {<NEW_LINE>if (crossRowState != NONE && rowsFound > 1) {<NEW_LINE>// Copy last set of first(), last() RowIds from bottom of the previous output to the top<NEW_LINE>long lastFoundIndex = (long) (rowsFound - 1) << ITEMS_PER_OUT_ARRAY_SHIFT;<NEW_LINE>rowIdOutAddress.set... | .get(lastFoundIndex + TIMESTAMP_OUT_INDEX)); |
1,599,502 | public static DescribeDnsProductInstanceResponse unmarshall(DescribeDnsProductInstanceResponse describeDnsProductInstanceResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeDnsProductInstanceResponse.setRequestId(_ctx.stringValue("DescribeDnsProductInstanceResponse.RequestId"));<NEW_LINE>describeDnsProductInstanceRe... | (_ctx.stringValue("DescribeDnsProductInstanceResponse.StartTime")); |
590,077 | public static QueryRegistrantProfilesResponse unmarshall(QueryRegistrantProfilesResponse queryRegistrantProfilesResponse, UnmarshallerContext _ctx) {<NEW_LINE>queryRegistrantProfilesResponse.setRequestId(_ctx.stringValue("QueryRegistrantProfilesResponse.RequestId"));<NEW_LINE>queryRegistrantProfilesResponse.setTotalIte... | ("QueryRegistrantProfilesResponse.RegistrantProfiles[" + i + "].DefaultRegistrantProfile")); |
916,148 | final AddFlowMediaStreamsResult executeAddFlowMediaStreams(AddFlowMediaStreamsRequest addFlowMediaStreamsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(addFlowMediaStreamsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
1,151,979 | public IpAddress assignSystemIp(long networkId, Account owner, boolean forElasticLb, boolean forElasticIp) throws InsufficientAddressCapacityException {<NEW_LINE>Network guestNetwork = _networksDao.findById(networkId);<NEW_LINE>NetworkOffering off = _entityMgr.findById(NetworkOffering.<MASK><NEW_LINE>IpAddress ip = nul... | class, guestNetwork.getNetworkOfferingId()); |
560,310 | public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>env.compileDeploy("@name('create') @public create table MyTableLUIV as (" + "pkey0 string primary key, " + "pkey1 int primary key, " + "col0 int, " + "thecnt count(*))", path);<NEW_LINE>env.compileDeploy("into tab... | new SupportBean("E2", 20)); |
463,315 | 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 + ") ...")... | "Assert that the EntityManager is associated with a transaction.", em.isJoinedToTransaction()); |
1,645,941 | public String nextInvalidWord() {<NEW_LINE>isFirstWordInSentence = false;<NEW_LINE>while (true) {<NEW_LINE>if (endWord == BreakIterator.DONE) {<NEW_LINE>startSentence = endSentence;<NEW_LINE>endSentence = sentences.next();<NEW_LINE>if (endSentence == BreakIterator.DONE) {<NEW_LINE>if (!nextParagraph()) {<NEW_LINE>retur... | ) + word.substring(1); |
1,733,159 | private UpdateItemRequest buildUpdateStatement(OnboardingEvent onboardingEvent) {<NEW_LINE>HashMap<String, AttributeValue> compositeKey = new HashMap<>();<NEW_LINE>AttributeValue primaryKeyValue = AttributeValue.builder().s(String.format("%s%s%s", TENANT_PREFIX, ATTRIBUTE_DELIMITER, onboardingEvent.getTenantId())).buil... | expressionAttributeNames = new HashMap<>(); |
1,623,844 | public static void main(String[] args) {<NEW_LINE>QueueWithStack myQueue = new QueueWithStack();<NEW_LINE>myQueue.insert(1);<NEW_LINE>// Will print 1<NEW_LINE>System.out.println(myQueue.peekBack());<NEW_LINE>// instack: [(top) 1]<NEW_LINE>// outStack: []<NEW_LINE>myQueue.insert(2);<NEW_LINE>// Will print 2<NEW_LINE>Sys... | println(myQueue.peekBack()); |
574,968 | private void referenceUnitDuty(Business business, WoIdentity woIdentity) throws Exception {<NEW_LINE>EntityManager em = business.entityManagerContainer(<MASK><NEW_LINE>CriteriaBuilder cb = em.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<UnitDuty> cq = cb.createQuery(UnitDuty.class);<NEW_LINE>Root<UnitDuty> root = cq.fr... | ).get(UnitDuty.class); |
97,784 | protected boolean cli_wide_to_narrow(String str, Hashtable charset_ht) {<NEW_LINE>boolean ret = true;<NEW_LINE>if (str == null) {<NEW_LINE>bytes = new byte[0];<NEW_LINE>return (true);<NEW_LINE>}<NEW_LINE>bytes = new byte[str.length()];<NEW_LINE>if (charset_ht == null) {<NEW_LINE>for (int i = 0; i < str.length(); i++) b... | (byte) b.intValue(); |
219,478 | Creators collect(TypeFactory typeFactory, JavaType type, Class<?> primaryMixIn) {<NEW_LINE>// 30-Apr-2016, tatu: [databind#1215]: Actually, while true, this does<NEW_LINE>// NOT apply to context since sub-class may have type bindings<NEW_LINE>// TypeResolutionContext typeContext = new TypeResolutionContext.Basic(_typeF... | constructors = _findPotentialConstructors(type, primaryMixIn); |
266,769 | public MTable read(Kryo kryo, Input input, Class<MTable> type) {<NEW_LINE>// read mask<NEW_LINE>byte nullMask = input.readByte();<NEW_LINE>boolean schemaIsNull = (nullMask & 0x1) > 0;<NEW_LINE>boolean dataIsNull = (nullMask & 0x2) > 0;<NEW_LINE>// schema is null and data is null<NEW_LINE>if (schemaIsNull && dataIsNull)... | = new ArrayList<>(dataLen); |
1,802,706 | public void onClose(SocketChannel channel) {<NEW_LINE>LOG.log(Level.SEVERE, "Got a connection close from remote socket address: {0}", new Object[] { channel.socket().getRemoteSocketAddress() });<NEW_LINE>// Unregister the Publisher<NEW_LINE>Metrics.MetricPublisher request = publisherMap.remove(channel.socket().getRemot... | , request.getInstanceIndex() }); |
1,561,272 | private void detectDuplicates(final ImportRecordsSelection selection) {<NEW_LINE>final StringBuilder sql = new StringBuilder(// Concatenate EFT Info<NEW_LINE>"SELECT i.I_BankStatement_ID, l.C_BankStatementLine_ID, i.EftTrxID " + "FROM I_BankStatement i, C_BankStatement s, C_BankStatementLine l " + "WHERE i.I_isImported... | toString(), ITrx.TRXNAME_ThreadInherited); |
1,147,667 | static List<String> substitutePlaceholders(final List<String> jvmOptions, final Map<String, String> substitutions) {<NEW_LINE>final Map<String, String> placeholderSubstitutions = substitutions.entrySet().stream().collect(Collectors.toMap(e -> "${" + e.getKey() + "}"<MASK><NEW_LINE>return jvmOptions.stream().map(jvmOpti... | , Map.Entry::getValue)); |
719,840 | public void writeBufferGeometryJson(OutputStream out) throws IOException {<NEW_LINE>sort();<NEW_LINE>Gson gson = new GsonBuilder().create();<NEW_LINE>JsonWriter json = gson.newJsonWriter(new BufferedWriter(new OutputStreamWriter(out, <MASK><NEW_LINE>// main-object<NEW_LINE>json.beginObject();<NEW_LINE>// set special va... | StandardCharsets.UTF_8), 81920)); |
1,684,657 | private void initSocketOptions(ProgrammaticDriverConfigLoaderBuilder driverConfigBuilder) {<NEW_LINE>driverConfigBuilder.withDuration(DefaultDriverOption.CONNECTION_CONNECT_TIMEOUT, Duration.ofMillis(this.connectTimeoutMillis));<NEW_LINE>driverConfigBuilder.withDuration(DefaultDriverOption.REQUEST_TIMEOUT, Duration.ofM... | DefaultDriverOption.SOCKET_RECEIVE_BUFFER_SIZE, this.receiveBufferSize); |
1,784,505 | public void addSection(NodeSectionPanel section) {<NEW_LINE>scrollPanel.remove(filler);<NEW_LINE>java.awt.GridBagConstraints gridBagConstraints = new java.awt.GridBagConstraints();<NEW_LINE>gridBagConstraints.gridx = 0;<NEW_LINE>gridBagConstraints.gridy = sectionCount;<NEW_LINE>gridBagConstraints.fill = java.awt.GridBa... | section.getNode(), section); |
466,119 | public void randomDisplayTick(@Nonnull IBlockState bs, @Nonnull World world, @Nonnull BlockPos pos, @Nonnull Random rand) {<NEW_LINE>if (PersonalConfig.machineParticlesEnabled.get() && isActive(world, pos) && shouldDoWorkThisTick(world, pos, 5)) {<NEW_LINE>float startX = pos.getX() + 1.0F;<NEW_LINE>float startY = pos.g... | setRBGColorF(0.2f, 0.2f, 0.8f); |
1,263,076 | public static void magnitudeAbs(ImageFlow flowImage, BufferedImage out) {<NEW_LINE>GrayF32 magnitude = new GrayF32(flowImage.width, flowImage.height);<NEW_LINE>float max = 0;<NEW_LINE>for (int y = 0; y < flowImage.height; y++) {<NEW_LINE>for (int x = 0; x < flowImage.width; x++) {<NEW_LINE>ImageFlow.D f = flowImage.uns... | magnitude, 255 / max, magnitude); |
1,019,997 | private static void _testPointsInEnvelope2D(Envelope2D env2D, Point2D[] inputPoints, int count, double tolerance, PiPResult[] testResults) {<NEW_LINE>if (inputPoints.length < count || testResults.length < count)<NEW_LINE>throw new IllegalArgumentException();<NEW_LINE>if (env2D.isEmpty()) {<NEW_LINE>for (int i = 0; i < ... | tolerance * 0.5, tolerance * 0.5); |
263,006 | final DeleteVocabularyResult executeDeleteVocabulary(DeleteVocabularyRequest deleteVocabularyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteVocabularyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
1,525,097 | public void marshall(ConfirmSignUpRequest confirmSignUpRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (confirmSignUpRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(confirmSignUpRequest.get... | e.getMessage(), e); |
1,378,786 | public boolean executeCommand(final String args) {<NEW_LINE>// get filenames<NEW_LINE>final String sourceID = getProp().getPropertyString(ScriptProperties.GENERATE_CONFIG_SOURCE_FILE);<NEW_LINE>final String targetID = getProp().getPropertyString(ScriptProperties.GENERATE_CONFIG_TARGET_FILE);<NEW_LINE>final CSVFormat fo... | getScript().resolveFilename(sourceID); |
1,612,689 | public void marshall(ChannelFlowSummary channelFlowSummary, AwsJsonWriter jsonWriter) throws Exception {<NEW_LINE>jsonWriter.beginObject();<NEW_LINE>if (channelFlowSummary.getChannelFlowArn() != null) {<NEW_LINE>String channelFlowArn = channelFlowSummary.getChannelFlowArn();<NEW_LINE>jsonWriter.name("ChannelFlowArn");<... | ).marshall(processorsItem, jsonWriter); |
282,359 | private void saveTemplate() {<NEW_LINE>try {<NEW_LINE>String newName = nameEditText.getText().toString();<NEW_LINE>String urlToLoad = urlEditText.getText().toString();<NEW_LINE>template.setName(newName);<NEW_LINE>template.setUrlToLoad(urlToLoad.isEmpty() ? null : urlToLoad.replace("{$x}", "{1}").replace("{$y}", "{2}").... | getName().lastIndexOf('.'); |
992,950 | final GetSuppressedDestinationResult executeGetSuppressedDestination(GetSuppressedDestinationRequest getSuppressedDestinationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getSuppressedDestinationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetri... | invoke(request, responseHandler, executionContext); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.