idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,529,054 | final EnableResult executeEnable(EnableRequest enableRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(enableRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<Ena... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
6,987 | private void processLine(ResourceFile file, String configLine, int lineNumber) throws IOException {<NEW_LINE>String trimmedLine = configLine.trim();<NEW_LINE>if (trimmedLine.length() == 0) {<NEW_LINE>// ignore empty lines.<NEW_LINE>return;<NEW_LINE>} else if (trimmedLine.startsWith(NAME_IDENTIFIER)) {<NEW_LINE>processN... | excludeFromGhidraJar = Boolean.valueOf(value); |
884,445 | public static DescribeModelServiceResponse unmarshall(DescribeModelServiceResponse describeModelServiceResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeModelServiceResponse.setRequestId(_ctx.stringValue("DescribeModelServiceResponse.RequestId"));<NEW_LINE>describeModelServiceResponse.setCode(_ctx.stringValue("Des... | (_ctx.stringValue("DescribeModelServiceResponse.Data.ModelServiceInstanceName")); |
342,514 | private boolean checkPreconditions() throws Exception {<NEW_LINE>// Find local changes<NEW_LINE>StatusOperation statusOperation = new StatusOperation(config, options.getStatusOptions());<NEW_LINE>StatusOperationResult statusOperationResult = statusOperation.execute();<NEW_LINE><MASK><NEW_LINE>result.getStatusResult().s... | ChangeSet localChanges = statusOperationResult.getChangeSet(); |
1,090,684 | default Constraint table(IntVar var1, IntVar var2, Tuples tuples, String algo) {<NEW_LINE>Propagator<IntVar> p;<NEW_LINE>if (tuples.allowUniversalValue()) {<NEW_LINE>p = new PropCompactTableStar(new IntVar[] { var1, var2 }, tuples);<NEW_LINE>} else {<NEW_LINE>switch(algo) {<NEW_LINE>case "CT+":<NEW_LINE>p = new PropCom... | PropBinAC3rm(var1, var2, tuples); |
944,963 | private void updateShipmentOrderRequestPO(@NonNull final DeliveryOrder deliveryOrder) {<NEW_LINE>for (// only a single delivery position should exist<NEW_LINE>// only a single delivery position should exist<NEW_LINE>final DeliveryPosition deliveryPosition : deliveryOrder.getDeliveryPositions()) {<NEW_LINE>final Immutab... | .getPackageIds().asList(); |
1,137,175 | public static void simulateClickFromTouchEvent(Event touchevent, Widget widget) {<NEW_LINE>Touch touch = touchevent.getChangedTouches().get(0);<NEW_LINE>final NativeEvent createMouseUpEvent = Document.get().createMouseUpEvent(0, touch.getScreenX(), touch.getScreenY(), touch.getClientX(), touch.getClientY(), false, fals... | false, false, NativeEvent.BUTTON_LEFT); |
1,734,961 | // snippet-start:[workdocs.java2.download_user_docs.main]<NEW_LINE>public static void downloadDoc(WorkDocsClient workDocs, String orgId, String userEmail, String workdocsName, String saveDocFullName) {<NEW_LINE>try {<NEW_LINE>Map<String, String> map = getDocInfo(workDocs, orgId, userEmail, workdocsName);<NEW_LINE>if (m... | "Downloaded " + workdocsName + " to: " + saveDocFullName); |
1,605,719 | protected void loadPreferences(DBPPreferenceStore store) {<NEW_LINE>try {<NEW_LINE>csAutoActivationCheck.setSelection(store.getBoolean(SQLPreferenceConstants.ENABLE_AUTO_ACTIVATION));<NEW_LINE>csHippieActivation.setSelection(store.getBoolean(SQLPreferenceConstants.ENABLE_HIPPIE));<NEW_LINE>csAutoActivationDelaySpinner.... | .getBoolean(SQLPreferenceConstants.INSERT_SPACE_AFTER_PROPOSALS)); |
1,784,845 | private Changes analyse(@NonNull final Context ctx, @NonNull final RootProcessor p, Predicate<ClassFile> accept) throws IOException, IllegalArgumentException {<NEW_LINE>// NOI18N<NEW_LINE>Parameters.notNull("ctx", ctx);<NEW_LINE>if (p.execute(accept)) {<NEW_LINE>if (!p.hasChanges() && timeStampsEmpty()) {<NEW_LINE>asse... | diff(oldState, newState, preBuildArgs); |
1,803,187 | public static ResponseDefinitionBuilder like(ResponseDefinition responseDefinition) {<NEW_LINE>ResponseDefinitionBuilder builder = new ResponseDefinitionBuilder();<NEW_LINE>builder.status = responseDefinition.getStatus();<NEW_LINE>builder.statusMessage = responseDefinition.getStatusMessage();<NEW_LINE>builder.headers =... | .bodyFileName = responseDefinition.getBodyFileName(); |
1,666,688 | public void replaceBlock(@Sender EntityRef sender, @CommandParam("blockName") String uri, @CommandParam(value = "maxDistance", required = false) Integer maxDistanceParam) {<NEW_LINE>int maxDistance = maxDistanceParam != null ? maxDistanceParam : 12;<NEW_LINE>EntityRef playerEntity = sender.getComponent(ClientComponent.... | new Vector3f()), maxDistance); |
1,210,130 | private HttpRequest.Builder createUserRequestBuilder(User body) throws ApiException {<NEW_LINE>// verify the required parameter 'body' is set<NEW_LINE>if (body == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'body' when calling createUser");<NEW_LINE>}<NEW_LINE>HttpRequest.Builder localV... | .BodyPublishers.ofByteArray(localVarPostBody)); |
1,346,791 | private void updateContext(Map<String, Object> value) {<NEW_LINE>if (value == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Object <MASK><NEW_LINE>Map<String, Object> map = new HashMap<>();<NEW_LINE>if (values instanceof ContextEntity) {<NEW_LINE>map = ((ContextEntity) values).getContextMap();<NEW_LINE>} else if (values... | values = value.get("values"); |
1,346,583 | private String loginAndGetId(HttpRequestFactory requestFactory, String tld) throws IOException {<NEW_LINE>logger.atInfo().log("Logging in to MoSAPI.");<NEW_LINE>HttpRequest request = requestFactory.buildGetRequest(new GenericUrl(String.format(LOGIN_URL, tld)));<NEW_LINE>request.getHeaders().setBasicAuthentication(Strin... | .get().getValue(); |
542,087 | public void destroyJoint(Joint j) {<NEW_LINE>assertNotLocked();<NEW_LINE>boolean collideConnected = j.getCollideConnected();<NEW_LINE>joints.removeValueByIdentity(j);<NEW_LINE>// Disconnect from island graph.<NEW_LINE><MASK><NEW_LINE>Body bodyB = j.getBodyB();<NEW_LINE>// Wake up connected bodies.<NEW_LINE>bodyA.setAwa... | Body bodyA = j.getBodyA(); |
1,363,778 | public AssertionCondition putAssertionCondition(String domainName, String policyName, Long assertionId, String auditRef, AssertionCondition assertionCondition) {<NEW_LINE>WebTarget target = base.path("/domain/{domainName}/policy/{policyName}/assertion/{assertionId}/condition").resolveTemplate("domainName", domainName).... | .readEntity(ResourceError.class)); |
674,989 | private void writeFile(String filenameNoExtension, BufferedWriter writer, int pageNumber, int pageCount, List<String> list) throws Exception {<NEW_LINE>writeHeader(writer);<NEW_LINE>writer.write("<P>\n");<NEW_LINE>writer.write("<TABLE BORDER=\"1\">\n");<NEW_LINE>int start = pageNumber * ITEMS_PER_PAGE;<NEW_LINE>if (sta... | list.size() - start); |
226,970 | private Mono<PagedResponse<ConfigurationProfileInner>> listChildResourcesSinglePageAsync(String configurationProfileName, String resourceGroupName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (configurationProfileName == null) {<NEW_LINE>return... | error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); |
1,262,469 | public Object executeCommand(String commandId, List<Object> arguments, IProgressMonitor monitor) throws Exception {<NEW_LINE>Map<String, Object> obj = (Map<String, Object>) arguments.get(0);<NEW_LINE>String uri = (String) obj.get("projectUri");<NEW_LINE>URI projectUri = URI.create(uri);<NEW_LINE>String bindingKey = (<M... | String) obj.get("bindingKey"); |
1,558,258 | private static <SectionInfo, SymbolInfo> LLVMSectionInfo<SectionInfo, SymbolInfo> readSection(Path path, SectionName sectionName, SectionReader<SectionInfo> sectionReader, SymbolReader<SymbolInfo> symbolReader) {<NEW_LINE>byte[] bytes;<NEW_LINE>try {<NEW_LINE>bytes = Files.readAllBytes(path);<NEW_LINE>} catch (IOExcept... | objectFile = LLVM.LLVMCreateObjectFile(buffer); |
436,057 | private static void cycleExistingSearch(final Window parent, final ZyGraph graph, final GraphSearcher searcher, final boolean cycleBackwards, final boolean zoomToResult) {<NEW_LINE>// If the searcher didn't change since last time, we only skip to<NEW_LINE>// the previous (CTRL+ENTER) or next (ENTER) search result. (SHI... | result.getObject(), zoomToResult); |
1,398,634 | public static void notifyFileDeleted(String path) {<NEW_LINE>Log.d(TAG, "Notifying others about deleted file: " + path);<NEW_LINE>if (VERSION.SDK_INT < VERSION_CODES.KITKAT) {<NEW_LINE>// on older devices, fake a remount of the media<NEW_LINE>// The media mounted broadcast is very taxing on the system, so<NEW_LINE>// w... | Intent(Intent.ACTION_MEDIA_MOUNTED, uri); |
820,468 | public void lookupContent(final byte[] hash, final String[] networks, final RelatedContentLookupListener listener) throws ContentException {<NEW_LINE>if (hash == null) {<NEW_LINE>throw (new ContentException("hash is null"));<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>if (net == 0) {<NEW_LINE>throw (new ContentException("No ne... | final byte net = convertNetworks(networks); |
675,093 | public void write(org.apache.thrift.protocol.TProtocol prot, getTableConfiguration_args struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;<NEW_LINE>java.util.BitSet optionals = new java.util.BitSet();<NEW_LINE>if (st... | struct.credentials.write(oprot); |
858,876 | public WebResponse invokeFirstClient(String testcase, WebConversation wc, TestSettings settings, List<validationData> expectations) throws Exception {<NEW_LINE>String thisMethod = "invokeFirstClient";<NEW_LINE>msgUtils.printMethodName(thisMethod);<NEW_LINE>WebRequest request = null;<NEW_LINE>WebResponse response = null... | testcase, e, "Exception occurred in " + thisMethod); |
1,534,040 | public void write(org.apache.thrift.protocol.TProtocol prot, TKey struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache<MASK><NEW_LINE>java.util.BitSet optionals = new java.util.BitSet();<NEW_LINE>if (struct.isSetRow()) {<NEW_LINE>optionals.set(0);<NEW_LINE... | .thrift.protocol.TTupleProtocol) prot; |
1,001,949 | final GetLensVersionDifferenceResult executeGetLensVersionDifference(GetLensVersionDifferenceRequest getLensVersionDifferenceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getLensVersionDifferenceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetri... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
135,219 | public Rule build() {<NEW_LINE>return logicalJoin().then(join -> {<NEW_LINE>if (!join.getOtherJoinCondition().isPresent()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>List<Expression> otherConjuncts = ExpressionUtils.extractConjunction(join.getOtherJoinCondition().get());<NEW_LINE>List<Expression> leftConjuncts = Lists... | ).toRule(RuleType.PUSHDOWN_JOIN_OTHER_CONDITION); |
1,778,052 | public void saveSettings(DBWHandlerConfiguration configuration) {<NEW_LINE>credentialsPanel.saveSettings(configuration, "");<NEW_LINE>final String jumpServerSettingsPrefix = SSHImplementationAbstract.getJumpServerSettingsPrefix(0);<NEW_LINE>jumpServerCredentialsPanel.saveSettings(configuration, jumpServerSettingsPrefix... | setProperty(SSHConstants.PROP_LOCAL_PORT, localPort); |
442,414 | public void mergeType(TransactionType old, TransactionType other) {<NEW_LINE>long totalCountSum = old.getTotalCount() + other.getTotalCount();<NEW_LINE>if (totalCountSum > 0) {<NEW_LINE>double line50Values = old.getLine50Value() * old.getTotalCount() + other.getLine50Value() * other.getTotalCount();<NEW_LINE>double lin... | old.setLine95Value(line95Values / totalCountSum); |
409,333 | static Credentials editCredentials(Credentials existing, Set<String> registries) {<NEW_LINE>assert SwingUtilities.isEventDispatchThread();<NEW_LINE>try {<NEW_LINE>JButton actionButton = new JButton();<NEW_LINE>Mnemonics.setLocalizedText(actionButton, Bundle.LBL_OK());<NEW_LINE>CredentialsPanel panel = new CredentialsPa... | { actionButton, DialogDescriptor.CANCEL_OPTION }); |
590,711 | private void updateHotelRating(@NonNull Sponsored.HotelInfo info) {<NEW_LINE>if (info.mReviews == null || info.mReviews.length == 0) {<NEW_LINE>UiUtils.hide(mHotelReview);<NEW_LINE>} else {<NEW_LINE>UiUtils.show(mHotelReview);<NEW_LINE>mReviewAdapter.setItems(new ArrayList<>(Arrays.asList(info.mReviews)));<NEW_LINE>Obj... | )[mSponsored.getImpress()]; |
352,790 | private Mono<Response<Void>> startWithResponseAsync(String resourceGroupName, String name, 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_LINE>}<NEW_LINE>if (resourc... | client.getApiVersion(), context); |
1,668,207 | private boolean readSafeBlock() throws IOException {<NEW_LINE>if (endOfStream)<NEW_LINE>return false;<NEW_LINE>byte[] storedHmac = baseStream.readBytes(32);<NEW_LINE>if (storedHmac == null || storedHmac.length != 32) {<NEW_LINE>throw new IOException("File corrupted");<NEW_LINE>}<NEW_LINE>byte[] pbBlockIndex = LEDataOut... | (blockKey, (byte) 0); |
431,170 | final DescribeDetectorResult executeDescribeDetector(DescribeDetectorRequest describeDetectorRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeDetectorRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
203,880 | public ServiceDeclarationNode transform(ServiceDeclarationNode serviceDeclarationNode) {<NEW_LINE>MetadataNode metadata = modifyNode(serviceDeclarationNode.metadata().orElse(null));<NEW_LINE>NodeList<Token> qualifiers = modifyNodeList(serviceDeclarationNode.qualifiers());<NEW_LINE>Token serviceKeyword = modifyToken(ser... | modifySeparatedNodeList(serviceDeclarationNode.expressions()); |
1,486,737 | private Object doExecute() {<NEW_LINE>try {<NEW_LINE>if (this.debugger != null) {<NEW_LINE>this.debugger.setGlobalContext(executionContext());<NEW_LINE>}<NEW_LINE>Completion completion = executionContext().execute(program(), this.debugger);<NEW_LINE>if (completion.type == Completion.Type.BREAK || completion.type == Com... | (e.getMessage())); |
797,633 | public void reset(final BaseActivity activity, final RedditCommentListItem comment, final boolean updateOnly) {<NEW_LINE>if (!updateOnly) {<NEW_LINE>if (!comment.isComment()) {<NEW_LINE>throw new RuntimeException("Not a comment");<NEW_LINE>}<NEW_LINE>if (mComment != comment) {<NEW_LINE>if (mComment != null) {<NEW_LINE>... | comment.getIndent()))); |
162,908 | public static VQSLODTranche mergeAndConvertTranches(final List<VQSLODTranche> scatteredTranches, VariantRecalibratorArgumentCollection.Mode mode) {<NEW_LINE>double indexVQSLOD = scatteredTranches.get(0).minVQSLod;<NEW_LINE>int sumNumKnown = 0;<NEW_LINE>double sumKnownTransitions = 0;<NEW_LINE>double sumKnownTransversio... | / (1 + tranche.knownTiTv); |
967,909 | protected void encodeButton(FacesContext context, DataView dataview, String layout, String icon, boolean isActive) throws IOException {<NEW_LINE>ResponseWriter writer = context.getResponseWriter();<NEW_LINE>String clientId = dataview.getClientId(context);<NEW_LINE>String buttonClass = isActive ? DataView.BUTTON_CLASS +... | BUTTON_LEFT_ICON_CLASS + " " + icon, null); |
1,010,012 | public Status insert(String table, String key, Map<String, ByteIterator> values) {<NEW_LINE>try {<NEW_LINE>Set<String> fields = values.keySet();<NEW_LINE>PreparedStatement stmt = INSERT_STMTS.get(fields);<NEW_LINE>// Prepare statement on demand<NEW_LINE>if (stmt == null) {<NEW_LINE>Insert insertStmt = QueryBuilder.inse... | field, QueryBuilder.bindMarker()); |
632,050 | private String decodeName(byte[] b_data, int pos) {<NEW_LINE>try {<NEW_LINE>int Flags = 0;<NEW_LINE>int FlagBits = 0;<NEW_LINE>byte[] Name = b_data;<NEW_LINE>byte[] EncName = b_data;<NEW_LINE>int EncSize = b_data.length;<NEW_LINE>int MaxDecSize = 4096;<NEW_LINE>int[] NameW = new int[MaxDecSize];<NEW_LINE>int EncPos = p... | (HighByte << 8) & 0xff00); |
1,552,262 | void draw(Graphics g) {<NEW_LINE>setBbox(point1, point2, opheight * 2);<NEW_LINE>setVoltageColor(g, volts[0]);<NEW_LINE>drawThickLine(g, in1p[0], in1p[1]);<NEW_LINE>setVoltageColor(g, volts[1]);<NEW_LINE>drawThickLine(g, in2p[0], in2p[1]);<NEW_LINE>setVoltageColor(g, volts[2]);<NEW_LINE><MASK><NEW_LINE>setVoltageColor(... | drawThickLine(g, lead2, point2); |
94,310 | public PendingDeploymentSummary unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>PendingDeploymentSummary pendingDeploymentSummary = new PendingDeploymentSummary();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NE... | JsonToken token = context.getCurrentToken(); |
661,733 | public Observable<ServiceResponse<PersistedFace>> addFaceFromStreamWithServiceResponseAsync(String faceListId, byte[] image, AddFaceFromStreamOptionalParameter addFaceFromStreamOptionalParameter) {<NEW_LINE>if (this.client.azureRegion() == null) {<NEW_LINE>throw new IllegalArgumentException("Parameter this.client.azure... | faceListId, image, userData, targetFace); |
850,233 | public ListChannelsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListChannelsResult listChannelsResult = new ListChannelsResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth =... | class).unmarshall(context)); |
1,424,420 | private void applyBridgeDomainVlanId(BridgeDomain bd, Map<String, Integer> irbVlanIds) {<NEW_LINE><MASK><NEW_LINE>if (vlanId == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String routingInterfaceName = bd.getRoutingInterface();<NEW_LINE>if (routingInterfaceName == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// TODO: ... | BridgeDomainVlanId vlanId = bd.getVlanId(); |
1,378,911 | private LogisimVersion initFromVersionString(String versionString) throws IllegalArgumentException {<NEW_LINE>var major = 0;<NEW_LINE>var minor = 0;<NEW_LINE>var patch = 0;<NEW_LINE>var separator = "";<NEW_LINE>var suffix = "";<NEW_LINE>var pattern = "^(\\d+.\\d+.\\d+)(.*)$";<NEW_LINE>var m = Pattern.compile(pattern, P... | .format("Invalid version suffix format. '%s' found.", sufStr)); |
776,425 | protected void alterColumnType(DdlWrite writer, AlterColumn alter) {<NEW_LINE>String type = <MASK><NEW_LINE>DB2ColumnOptionsParser parser = new DB2ColumnOptionsParser(type);<NEW_LINE>alterTable(writer, alter.getTableName()).append(alterColumn, alter.getColumnName()).append(columnSetType).append(parser.getType());<NEW_L... | convert(alter.getType()); |
218,997 | static // 27th Dec when Tue http://www.gov.za/sites/www.gov.za/files/34881_proc72.pdf<NEW_LINE>ImmutableHolidayCalendar generateJohannesburg() {<NEW_LINE>List<LocalDate> holidays <MASK><NEW_LINE>for (int year = 1950; year <= 2099; year++) {<NEW_LINE>// from 1995 (act of 7 Dec 1994)<NEW_LINE>// older act from 1952 not i... | = new ArrayList<>(2000); |
446,441 | public Response variables(SQL sql, SecurityContext securityContext) {<NEW_LINE>try {<NEW_LINE>RequestValidationHandler.validateSQL(sql);<NEW_LINE>PhysicalPlan physicalPlan = serviceProvider.getPlanner().parseSQLToPhysicalPlan(sql.getSql());<NEW_LINE>if (!(physicalPlan instanceof ShowPlan) && !(physicalPlan instanceof Q... | QueryDataSetHandler.fillGrafanaVariablesResult(queryDataSet, physicalPlan); |
527,102 | public void mouseDragged(Canvas canvas, Graphics g, MouseEvent e) {<NEW_LINE>if (exists) {<NEW_LINE>Canvas.snapToGrid(e);<NEW_LINE>int curX = e.getX();<NEW_LINE>int curY = e.getY();<NEW_LINE>if (!computeMove(curX, curY))<NEW_LINE>return;<NEW_LINE>hasDragged = true;<NEW_LINE><MASK><NEW_LINE>rect.add(start.getX(), start.... | final var rect = new Rectangle(); |
1,504,331 | public static PipelineResult run(FileFormatConversionOptions options) {<NEW_LINE>String inputFileFormat = options.getInputFileFormat().toUpperCase();<NEW_LINE>String outputFileFormat = options.getOutputFileFormat().toUpperCase();<NEW_LINE>validFileFormats.<MASK><NEW_LINE>validFileFormats.put(ValidFileFormats.AVRO, "AVR... | put(ValidFileFormats.CSV, "CSV"); |
1,339,561 | // @since 4.3.0<NEW_LINE>@NonNull<NEW_LINE>private JLatexMathDrawable createInlineDrawable(@NonNull JLatextAsyncDrawable drawable) {<NEW_LINE>final String latex = drawable.getDestination();<NEW_LINE>final JLatexMathTheme theme = config.theme;<NEW_LINE>final JLatexMathTheme.BackgroundProvider backgroundProvider = theme.... | Padding padding = theme.inlinePadding(); |
677,724 | public void processRecord(MetricsRecord record) {<NEW_LINE>LOG.info("metricscache sink processRecord");<NEW_LINE>// Format it into TopologyManager.PublishMetrics<NEW_LINE>// The format of record is "host:port/componentName/instanceId"<NEW_LINE>// So MetricsRecord.getSource().split("/") would be an array with 3 elements... | exceptionStackTrace.split("\r\n|[\r\n]", 3); |
1,043,093 | private static void eulerTest1() {<NEW_LINE>int n = 2;<NEW_LINE>List<List<Edge>> g = createEmptyGraph(n);<NEW_LINE>addDirectedEdge(g, 0, 0, 0);<NEW_LINE>addDirectedEdge(g, 0, 1, 1);<NEW_LINE>addDirectedEdge(<MASK><NEW_LINE>addDirectedEdge(g, 1, 0, 3);<NEW_LINE>addDirectedEdge(g, 1, 0, 4);<NEW_LINE>addDirectedEdge(g, 1,... | g, 0, 1, 2); |
1,395,890 | public void widgetSelected(SelectionEvent event) {<NEW_LINE>String str = readFromClipboard();<NEW_LINE>if (str != null) {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>try {<NEW_LINE>sb.append("key: ");<NEW_LINE>sb.append<MASK><NEW_LINE>sb.append("\r\n");<NEW_LINE>byte[] payload = str.getBytes("UTF-8");<NEW... | (plugin.getPublicKey(is_public)); |
1,197,988 | public ValueDerivatives swapRateDai1(double x, DoubleArray discountedCashFlowFixed, DoubleArray alphaFixed, DoubleArray discountedCashFlowIbor, DoubleArray alphaIbor) {<NEW_LINE>int sizeIbor = discountedCashFlowIbor.size();<NEW_LINE>int sizeFixed = discountedCashFlowFixed.size();<NEW_LINE>ArgChecker.isTrue(sizeIbor == ... | alphaFixed.size(), "Length should be equal"); |
103,830 | public void visitSerializableProperties(final Object object, final JavaBeanProvider.Visitor visitor) {<NEW_LINE>final PropertyDescriptor<MASK><NEW_LINE>for (final PropertyDescriptor property : propertyDescriptors) {<NEW_LINE>ErrorWritingException ex = null;<NEW_LINE>try {<NEW_LINE>final Method readMethod = property.get... | [] propertyDescriptors = getSerializableProperties(object); |
699,787 | public void calc(ComContext context) {<NEW_LINE>if (!addedIndex && seed != null) {<NEW_LINE>random.reSeed(seed);<NEW_LINE>addedIndex = true;<NEW_LINE>}<NEW_LINE>Tuple2<Long, Integer> tuple2 = ((List<Tuple2<Long, Integer>>) context.getObj(LdaVariable.shape)).get(0);<NEW_LINE>int vocabularySize = tuple2.f1;<NEW_LINE>List... | context.getObj(LdaVariable.alpha); |
1,582,844 | // @Override<NEW_LINE>public void updated(String pid, Dictionary<String, ?> properties) throws ConfigurationException {<NEW_LINE>System.<MASK><NEW_LINE>String id = (String) properties.get("id");<NEW_LINE>_properties = cloneDictionary(properties);<NEW_LINE>System.out.println("pid:" + pid + " id:" + id);<NEW_LINE>if (_co... | out.println("Updating configuration properties:" + properties); |
567,585 | List<Pair<String, Object>> newEvent(int i, DateTime timestamp) {<NEW_LINE>List<Pair<String, Object>> event = new ArrayList<>();<NEW_LINE>event.add(Pair.of("timestamp", DATE_TIME_FORMATTER.print(timestamp)));<NEW_LINE>event.add(Pair.of("page", "Gypsy Danger"));<NEW_LINE>event.add(Pair.of("language", "en"));<NEW_LINE>eve... | .of("city", "San Francisco")); |
1,408,646 | public static void removeDictionary(Locale remove) {<NEW_LINE>File toRemove = dictionaryFile(remove.toString(), false);<NEW_LINE>toRemove.delete();<NEW_LINE>toRemove = dictionaryFile(remove.toString(), true);<NEW_LINE>toRemove.delete();<NEW_LINE>if (InstalledFileLocator.getDefault().locate("modules/dict/dictionary_" + ... | + "modules" + File.separator + "dict"; |
1,203,942 | public static <V> V retryAndWrapExceptionIfNecessary(Callable<V> callable, TokenCallable token, String message, Throwable cause) throws RuntimeException {<NEW_LINE>if (token == null || !token.isRetry()) {<NEW_LINE>throw handleWrapException(message, cause);<NEW_LINE>}<NEW_LINE>if (cause instanceof HttpResponseException)... | HttpResponseException.class.cast(cause); |
691,596 | private void updatePropertySheet() {<NEW_LINE>List<Node> nodes = new ArrayList<Node>(metaSelection.size());<NEW_LINE>for (RADVisualComponent metacomp : metaSelection) {<NEW_LINE>RADComponentNode node = metacomp.getNodeReference();<NEW_LINE>if (node == null) {<NEW_LINE>// "metacomp" was just added and the node reference... | nodes.size()])); |
1,403,878 | public void aesDecrypt(final byte[] key, InputStream in, OutputStream out, long inputSize) throws IOException, CryptoError {<NEW_LINE>InputStream decrypted = null;<NEW_LINE>try {<NEW_LINE>byte[] cKey = key;<NEW_LINE><MASK><NEW_LINE>if (macIncluded) {<NEW_LINE>SubKeys subKeys = getSubKeys(bytesToKey(key), true);<NEW_LIN... | boolean macIncluded = inputSize % 2 == 1; |
505,369 | public void run(RegressionEnvironment env) {<NEW_LINE>String[] fields = "c0,c1,c2,c3,c4".split(",");<NEW_LINE>SupportEvalBuilder builder = new SupportEvalBuilder("SupportCollection");<NEW_LINE>builder.expression(fields[0], "strvals.arrayOf()");<NEW_LINE>builder.expression(fields[1], "strvals.arrayOf(v => v)");<NEW_LINE... | INTEGERBOXEDARRAY.getEPType() })); |
1,404,884 | public JRStyledText cloneText() {<NEW_LINE>try {<NEW_LINE>JRStyledText clone = <MASK><NEW_LINE>clone.globalAttributes = cloneAttributesMap(globalAttributes);<NEW_LINE>int runsCount = runs.size();<NEW_LINE>if (runsCount == 0) {<NEW_LINE>clone.runs = Collections.emptyList();<NEW_LINE>} else if (runsCount == 1) {<NEW_LINE... | (JRStyledText) super.clone(); |
906,633 | public Request<TagResourceRequest> marshall(TagResourceRequest tagResourceRequest) {<NEW_LINE>if (tagResourceRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(TagResourceRequest)");<NEW_LINE>}<NEW_LINE>Request<TagResourceRequest> request = new DefaultRequest<TagResourceReq... | jsonWriter = JsonUtils.getJsonWriter(stringWriter); |
962,804 | public void render(AbstractJsonTypeManifold tm, StringBuilder sb, int indent, boolean mutable) {<NEW_LINE>setTm(tm);<NEW_LINE>if (getParent() != null) {<NEW_LINE>sb.append('\n');<NEW_LINE>}<NEW_LINE>String name = getName();<NEW_LINE>String identifier = addActualNameAnnotation(sb, indent, name, false);<NEW_LINE>if (!(ge... | indent(sb, indent + 2); |
636,673 | private boolean createAssociatedVfTables(Program program, List<Address> goodRtti4Locations, TaskMonitor taskMonitor) throws CancelledException {<NEW_LINE>MemoryBytePatternSearcher searcher = new MemoryBytePatternSearcher("RTTI4 Vftables");<NEW_LINE>HashMap<Address, VfTableModel> foundVFtables = new HashMap<>();<NEW_LIN... | = new CreateVfTableBackgroundCmd(vfTableModel, applyOptions); |
1,407,870 | public void waitForConnect() throws ConnectionLostException {<NEW_LINE>while (!abort_) {<NEW_LINE>try {<NEW_LINE>CommPortIdentifier identifier = CommPortIdentifier.getPortIdentifier(name_);<NEW_LINE>CommPort commPort = identifier.open(this.getClass().getName(), 1000);<NEW_LINE>synchronized (this) {<NEW_LINE>if (!abort_... | .getInputStream()), 1024); |
627,565 | // under InjectedLanguageManagerImpl.ourInjectionPsiLock<NEW_LINE>@Nonnull<NEW_LINE>private static PsiFile registerDocument(@Nonnull DocumentWindowImpl newDocumentWindow, @Nonnull PsiFile newInjectedPsi, @Nonnull Place shreds, @Nonnull PsiFile hostPsiFile, @Nonnull PsiDocumentManager documentManager) {<NEW_LINE>List<Do... | .getUserData(FileContextUtil.INJECTED_IN_ELEMENT)); |
922,134 | final ListNodegroupsResult executeListNodegroups(ListNodegroupsRequest listNodegroupsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listNodegroupsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
218,193 | public void printTag(String name, HashMap parameters, boolean insertTab, boolean insertNewLine, boolean closeTag) {<NEW_LINE>if (insertTab) {<NEW_LINE>printTabulation();<NEW_LINE>}<NEW_LINE>this.print('<');<NEW_LINE>this.print(name);<NEW_LINE>if (parameters != null) {<NEW_LINE>int length = parameters.size();<NEW_LINE>M... | entry1 = (Map.Entry) o1; |
536,439 | public EPPreparedQueryResult execute(FAFQueryMethodSelect select, ContextPartitionSelector[] contextPartitionSelectors, FAFQueryMethodAssignerSetter assignerSetter, ContextManagementService contextManagementService) {<NEW_LINE>FireAndForgetProcessor processor = select.getProcessors()[0];<NEW_LINE>FireAndForgetInstance ... | select.getWhereClause(), agentInstanceContext); |
387,739 | public I_PP_Product_BOM verifyProductBOMAndReturnIt(@NonNull final ProductId ppOrderProductId, @NonNull final Date ppOrderStartSchedule, @NonNull final I_PP_Product_BOM ppOrderProductBOM) {<NEW_LINE>// Product BOM should be completed<NEW_LINE>if (!DocStatus.ofCode(ppOrderProductBOM.getDocStatus()).isCompleted()) {<NEW_... | Services.get(IProductDAO.class); |
1,012,604 | public MfaProvider deserialize(JsonParser p, DeserializationContext ctxt) {<NEW_LINE>MfaProvider result = new MfaProvider();<NEW_LINE>JsonNode node = JsonUtils.readTree(p);<NEW_LINE>MfaProviderType type;<NEW_LINE>try {<NEW_LINE>type = MfaProviderType.forValue(getNodeAsString(node, FIELD_TYPE, "google-authenticator"));<... | (node, FIELD_ID, null)); |
796,010 | private void check(APIChangeResourceOwnerMsg msg, Map<String, Quota.QuotaPair> pairs) {<NEW_LINE>String currentAccountUuid = msg.getSession().getAccountUuid();<NEW_LINE>String resourceTargetOwnerAccountUuid = msg.getAccountUuid();<NEW_LINE>if (new QuotaUtil().isAdminAccount(resourceTargetOwnerAccountUuid)) {<NEW_LINE>r... | createQuery(sql, Long.class); |
579,227 | public void roundedRect(double cx, double cy, double width, double height, double rx, double ry) {<NEW_LINE>double halfWidth = width / 2;<NEW_LINE>double halfHeight = height / 2;<NEW_LINE>double dx = rx;<NEW_LINE>double dy = ry;<NEW_LINE>double left = cx - halfWidth;<NEW_LINE>double right = cx + halfWidth;<NEW_LINE>dou... | ONE_MINUS_QUARTER, right, top + dy); |
481,580 | public com.amazonaws.services.organizations.model.InvalidHandshakeTransitionException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.organizations.model.InvalidHandshakeTransitionException invalidHandshakeTransitionException = new com.amazonaws.services.organiz... | String currentParentElement = context.getCurrentParentElement(); |
1,053,425 | public int indentNewLine(Document doc, int offset) {<NEW_LINE>// if ( Util.THIS.isLoggable() ) /* then */ Util.THIS.debug ("\n+ XMLFormatter::indentNewLine: doc = " + doc); // NOI18N<NEW_LINE>// if ( Util.THIS.isLoggable() ) /* then */ Util.THIS.debug ("+ ::indentNewLine: offset = " + offset); // NOI18N<NEW... | super.indentNewLine(doc, offset); |
113,366 | private void addMetric(Event currentRecord, String topic, boolean result, long sendTime) {<NEW_LINE>Map<String, String> dimensions = new HashMap<>();<NEW_LINE>dimensions.put(SortMetricItem.KEY_CLUSTER_ID, this.sinkContext.getClusterId());<NEW_LINE>// metric<NEW_LINE>SortMetricItem.fillInlongId(currentRecord, dimensions... | put(SortMetricItem.KEY_SINK_DATA_ID, topic); |
1,127,020 | protected void addContent(RepositoryResourceWritable res, File assetFile, String name, ArtifactMetadata metadata, String contentUrl) throws RepositoryException {<NEW_LINE>String downloadUrl = contentUrl;<NEW_LINE>String linkTypeString = null;<NEW_LINE>if (metadata != null && metadata.properties != null) {<NEW_LINE>if (... | assetFile, name, downloadUrl, linkType); |
1,228,800 | public List<RecordGroup> splitIntoProcessableSubgroups() {<NEW_LINE>List<RecordGroup> recordGroupList = new LinkedList<>();<NEW_LINE>if (areAllRecordsValid()) {<NEW_LINE>recordGroupList.add(this);<NEW_LINE>return recordGroupList;<NEW_LINE>} else {<NEW_LINE>List<AbstractRecord> recordList = new LinkedList<>();<NEW_LINE>... | recordList = new LinkedList<>(); |
1,625,996 | public I_M_DeliveryDay retrieveDeliveryDay(final IContextAware context, final IDeliveryDayQueryParams params) {<NEW_LINE>final IQueryBuilder<I_M_DeliveryDay> queryBuilder = Services.get(IQueryBL.class).createQueryBuilder(I_M_DeliveryDay.class, context).filter(createDeliveryDayMatcher(params));<NEW_LINE>// Make sure the... | Direction.Descending, Nulls.Last); |
9,870 | protected void prepareOval() {<NEW_LINE>if (hasInnerCorner()) {<NEW_LINE>setOvalLeft(getBorderBox().width() - (2 * getOuterCornerRadius() - getPreBorderWidth() / 2));<NEW_LINE>setOvalTop(getBorderBox().height() - (2 * getOuterCornerRadius() <MASK><NEW_LINE>setOvalRight(getBorderBox().width() - (getPreBorderWidth() / 2)... | - getPostBorderWidth() / 2)); |
714,733 | protected AbstractGCEvent<GCEvent> parseLine(String line, ParseInformation pos) throws ParseException {<NEW_LINE>AbstractGCEvent<GCEvent> event = new GCEvent();<NEW_LINE>try {<NEW_LINE>event.setTimestamp(count);<NEW_LINE>count++;<NEW_LINE>StringTokenizer st = new StringTokenizer(line, " ,->()K\r\n");<NEW_LINE>String to... | setType(AbstractGCEvent.Type.FULL_GC); |
86,782 | public void process(JCas jcas) throws AnalysisEngineProcessException {<NEW_LINE>JCas questionView, resultView, passagesView;<NEW_LINE>try {<NEW_LINE>questionView = jcas.getView("Question");<NEW_LINE><MASK><NEW_LINE>passagesView = jcas.getView("Passages");<NEW_LINE>} catch (CASException e) {<NEW_LINE>throw new AnalysisE... | resultView = jcas.getView("Result"); |
1,742,742 | void handleMdmUpdate(IAnyResource theTargetResource, MatchedGoldenResourceCandidate theMatchedGoldenResourceCandidate, MdmTransactionContext theMdmTransactionContext) {<NEW_LINE>MdmUpdateContext updateContext = new MdmUpdateContext(theMatchedGoldenResourceCandidate, theTargetResource);<NEW_LINE>myMdmSurvivorshipService... | updateContext.getMatchedGoldenResource(), theMdmTransactionContext); |
887,614 | private static void createSpecSuperset() throws Exception {<NEW_LINE>System.out.println("Creating superset");<NEW_LINE>String[] parts = opts.get(OPT_SRCDIR).split(",");<NEW_LINE>File out = new File(outdir, opts.get(OPT_FILENAME));<NEW_LINE><MASK><NEW_LINE>for (int i = 0; i < parts.length; i++) {<NEW_LINE>System.out.pri... | FileWriter writer = new FileWriter(out); |
53,159 | SDChaindcode discoverEndorserEndpoint(TransactionContext transactionContext, final String name) throws ServiceDiscoveryException {<NEW_LINE>Map<String, SDChaindcode> lchaindcodeMap = chaindcodeMap;<NEW_LINE>if (lchaindcodeMap != null) {<NEW_LINE>// check if we have it already.<NEW_LINE>SDChaindcode sdChaindcode = lchai... | ServiceDiscoveryChaincodeCalls serviceDiscoveryChaincodeCalls = new ServiceDiscoveryChaincodeCalls(name); |
1,040,747 | public GraphExtension init(GraphHopper graphhopper) throws Exception {<NEW_LINE>if (storage != null)<NEW_LINE>throw new Exception("GraphStorageBuilder has been already initialized.");<NEW_LINE>if (this.cbReader == null) {<NEW_LINE>// Read the border shapes from the file<NEW_LINE>// First check if parameters are present... | class.getName(), PARAM_KEY_BOUNDARIES); |
101,473 | protected String printMethodArgs(List<Type> args, boolean varArgs, Locale locale) {<NEW_LINE>if (!varArgs) {<NEW_LINE>return visitTypes(args, locale);<NEW_LINE>} else {<NEW_LINE>StringBuilder buf = new StringBuilder();<NEW_LINE>while (args.tail.nonEmpty()) {<NEW_LINE>buf.append(visit(args.head, locale));<NEW_LINE>args ... | args.head.getAnnotationMirrors()); |
1,492,038 | ExecutionEnvironment fromExternalForm(String externalForm) {<NEW_LINE>// TODO: remove this check and refactor clients to use getLocal() instead<NEW_LINE>if (HostInfoUtils.LOCALHOST.equals(externalForm) || "127.0.0.1".equals(externalForm) || "::1".contains(externalForm)) {<NEW_LINE>// NOI18N<NEW_LINE>return LOCAL;<NEW_L... | externalForm.substring(0, pos); |
157,136 | public void lockInterruptibly() throws InterruptedException {<NEW_LINE>long threadId = getThreadId();<NEW_LINE>UUID invocationUid = newUnsecureUUID();<NEW_LINE>for (; ; ) {<NEW_LINE>long sessionId = acquireSession();<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>long fence = doLock(sessionId, threadId, invocationUid).get();<... | verifyLockedSessionIdIfPresent(threadId, sessionId, true); |
305,233 | public void updateState() {<NEW_LINE>ElroConnectsDeviceHandler handler = getHandler();<NEW_LINE>if (handler == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ElroDeviceStatus elroStatus = getStatus();<NEW_LINE>int batteryLevel = 0;<NEW_LINE>String deviceStatus = this.deviceStatus;<NEW_LINE>if (deviceStatus.length() >= 6)... | NONE, "Device " + deviceId + " has a fault"); |
27,671 | public boolean purge() {<NEW_LINE>boolean result = true;<NEW_LINE>final UpdateService service = new UpdateService(serviceClassLoader);<NEW_LINE>final Iterator<CachedWebDataSource<MASK><NEW_LINE>while (iterator.hasNext()) {<NEW_LINE>result &= iterator.next().purge(this);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>final File cac... | > iterator = service.getDataSources(); |
81,904 | public Request decodeRequest(Object packet) throws Exception {<NEW_LINE>Request request = new RpcRequest();<NEW_LINE>DubboPacket dubboPacket = (DubboPacket) packet;<NEW_LINE>request.setCorrelationId(dubboPacket.getHeader().getCorrelationId());<NEW_LINE>// check if it is heartbeat request<NEW_LINE>byte flag = dubboPacke... | setMethodName(dubboRequestBody.getPath()); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.