idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,319,322 | final UntagResourceResult executeUntagResource(UntagResourceRequest untagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(untagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
420,065 | ArrayList<Object> new32() /* reduce AAfieldmember2Member */<NEW_LINE>{<NEW_LINE>@SuppressWarnings("hiding")<NEW_LINE>ArrayList<Object> nodeList = new ArrayList<Object>();<NEW_LINE>@SuppressWarnings("unused")<NEW_LINE>ArrayList<Object> nodeArrayList4 = pop();<NEW_LINE>@SuppressWarnings("unused")<NEW_LINE>ArrayList<Objec... | listNode3, ptypeNode4, pnameNode5, tsemicolonNode6); |
992,034 | public final SimpleDescribeStatementContext simpleDescribeStatement() throws RecognitionException {<NEW_LINE>SimpleDescribeStatementContext _localctx = new SimpleDescribeStatementContext(_ctx, getState());<NEW_LINE>enterRule(_localctx, 476, RULE_simpleDescribeStatement);<NEW_LINE>int _la;<NEW_LINE>try {<NEW_LINE>enterO... | Token) _errHandler.recoverInline(this); |
445,145 | public static void passiveTDAgentDemo() {<NEW_LINE>System.out.println("======================");<NEW_LINE>System.out.println("DEMO: Passive-TD-Agent");<NEW_LINE>System.out.println("======================");<NEW_LINE>System.out.println("Figure 21.5");<NEW_LINE>System.out.println("-----------");<NEW_LINE>CellWorld<Double... | , 2), CellWorldAction.Up); |
1,410,129 | private void renderReport() throws Exception {<NEW_LINE>AMedia media = null;<NEW_LINE>Listitem selected = previewType.getSelectedItem();<NEW_LINE>if (selected == null || "PDF".equals(selected.getValue())) {<NEW_LINE>String path = System.getProperty("java.io.tmpdir");<NEW_LINE>String prefix = <MASK><NEW_LINE>if (log.isL... | makePrefix(m_reportEngine.getName()); |
1,243,053 | public GetNetworkSettingsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>GetNetworkSettingsResult getNetworkSettingsResult = new GetNetworkSettingsResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonT... | String currentParentElement = context.getCurrentParentElement(); |
782,680 | private void updateControl() {<NEW_LINE>myBorder.setSelected(Config.getDefault().hasBorder());<NEW_LINE>myBorderColor.setEnabled(Config.getDefault().hasBorder());<NEW_LINE>myHeader.setSelected(Config.getDefault().hasHeader());<NEW_LINE>myHeaderLeft.setText(Config.getDefault().getHeaderLeft());<NEW_LINE>myHeaderLeft.set... | getDefault().hasFooter()); |
199,881 | private void resizePopup() {<NEW_LINE>popupWindow.pack();<NEW_LINE>Point point = new Point(0, 0);<NEW_LINE>SwingUtilities.convertPointToScreen(point, this);<NEW_LINE>Dimension dim = popupWindow.getSize();<NEW_LINE>// #63265<NEW_LINE>Rectangle usableRect = Utilities.getUsableScreenBounds();<NEW_LINE>int sepShift = separ... | + usableRect.width - dim.width; |
321,504 | private boolean processEvent(Event event, List<AlluxioURI> syncPointList, long txId) {<NEW_LINE>boolean fileMatch = false;<NEW_LINE>String filePath = "";<NEW_LINE>String renameFilePath = "";<NEW_LINE>switch(event.getEventType()) {<NEW_LINE>case CREATE:<NEW_LINE>Event.CreateEvent <MASK><NEW_LINE>filePath = createEvent.g... | createEvent = (Event.CreateEvent) event; |
1,157,092 | public boolean enterPropertyNode(PropertyNode propertyNode) {<NEW_LINE>// A property can have both a getter *and* setter!<NEW_LINE>FunctionNode getter = propertyNode.getGetter();<NEW_LINE>FunctionNode setter = propertyNode.getSetter();<NEW_LINE>if (getter != null || setter != null) {<NEW_LINE>handleGetter(getter, prope... | getKey().accept(this); |
834,327 | private void initWorkers() {<NEW_LINE>int base = 0;<NEW_LINE>// init all tasks , workers and worker groups and put them to the corresponding maps<NEW_LINE>for (int i = 0; i < workergroupNumber; i++) {<NEW_LINE>Map<WorkerId, AMWorker> workers = new HashMap<WorkerId, AMWorker>();<NEW_LINE>WorkerId leader = null;<NEW_LINE... | add(new TaskId(base)); |
580,396 | static void autoboxIfNeeded(Class<?> in, Class<?> out, MethodVisitor visitor) {<NEW_LINE>if (in.equals(Boolean.class) && out.equals(Boolean.TYPE)) {<NEW_LINE>visitor.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Boolean", "booleanValue", "()Z", false);<NEW_LINE>}<NEW_LINE>if (in.equals(Boolean.TYPE) && out.equals(Boolean.c... | "java/lang/Integer", "valueOf", "(I)Ljava/lang/Integer;", false); |
200,178 | public Entitlement doCall(final EntitlementApi entitlementApi, final DefaultEntitlementContext updatedPluginContext) throws EntitlementApiException {<NEW_LINE>if (eventsStream.isEntitlementCancelled()) {<NEW_LINE>throw new EntitlementApiException(ErrorCode.SUB_CANCEL_BAD_STATE, getId(), EntitlementState.CANCELLED);<NEW... | recordFutureNotification(entitlementEffectiveCancelDate, notificationEvent, contextWithValidAccountRecordId); |
1,740,105 | public ApiResponse<Order> placeOrderWithHttpInfo(Order body) throws ApiException {<NEW_LINE>Object localVarPostBody = body;<NEW_LINE>// verify the required parameter 'body' is set<NEW_LINE>if (body == null) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/store/ord... | throw new ApiException(400, "Missing the required parameter 'body' when calling placeOrder"); |
636,072 | protected void onActivityResult(int requestCode, int resultCode, Intent data) {<NEW_LINE>// TODO Auto-generated method stub<NEW_LINE>super.onActivityResult(requestCode, resultCode, data);<NEW_LINE>if (resultCode == JavaFileStorage.RESULT_FILECHOOSER_PREPARED) {<NEW_LINE>String path = data.getStringExtra(JavaFileStorage... | (0)).toString(); |
189,646 | public void testDSOverride004() throws Throwable {<NEW_LINE>final long id = atomicID.incrementAndGet();<NEW_LINE>System.out.println("Start executing DSOverrideTestServlet.testDSOverride004");<NEW_LINE>try {<NEW_LINE>// Create a new Entity using the persistence unit's default datasource<NEW_LINE>DSOverrideEntity newEnti... | put(getJTADatasourcePropertyKeyName(), altJTADataSource); |
191,823 | private void processTransportStops(@NonNull Map<Object, IContextMenuProvider> selectedObjects) {<NEW_LINE>List<String> publicTransportTypes = getPublicTransportTypes();<NEW_LINE>if (publicTransportTypes != null) {<NEW_LINE>List<Amenity> transportStopAmenities = new ArrayList<>();<NEW_LINE>for (Object o : selectedObject... | selectedObjects.put(transportStop, transportStopsLayer); |
1,662,304 | private void tryTruncate(LedgerAddress upToAddress) {<NEW_LINE>long traceId = LoggerHelpers.traceEnterWithContext(log, this.traceObjectId, "tryTruncate", upToAddress);<NEW_LINE>// Truncate the metadata and get a new copy of it.<NEW_LINE>val oldMetadata = getLogMetadata();<NEW_LINE>val newMetadata = oldMetadata.truncate... | traceObjectId, "tryTruncate", traceId, upToAddress); |
1,116,850 | protected void handlePostAsync(RoutingContext event, MultiMap form) throws Exception {<NEW_LINE>QuarkusBootstrap existing = <MASK><NEW_LINE>try (TempSystemProperties properties = new TempSystemProperties()) {<NEW_LINE>for (Map.Entry<String, String> i : config.entrySet()) {<NEW_LINE>properties.set(i.getKey(), i.getValue... | (QuarkusBootstrap) DevConsoleManager.getQuarkusBootstrap(); |
574,530 | final DeleteRecommenderResult executeDeleteRecommender(DeleteRecommenderRequest deleteRecommenderRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteRecommenderRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Requ... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
546,273 | public void onPlayerChat(final AsyncPlayerChatEvent event) {<NEW_LINE>final User user = ess.getUser(event.getPlayer());<NEW_LINE>if (user.isMuted()) {<NEW_LINE>event.setCancelled(true);<NEW_LINE>final String dateDiff = user.getMuteTimeout() > 0 ? DateUtil.formatDateDiff(user.getMuteTimeout()) : null;<NEW_LINE>if (dateD... | getLogger().info("Ignore could not block chat due to custom chat plugin event."); |
1,142,771 | public QueueSummary unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AwsJsonReader reader = context.getReader();<NEW_LINE>if (!reader.isContainer()) {<NEW_LINE>reader.skipValue();<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>QueueSummary queueSummary = new QueueSummary();<NEW_LINE>reader.beginObject... | ().unmarshall(context)); |
559,352 | private boolean updateLog(BattleHandler handler, BattleLog log) {<NEW_LINE>serverTimeOffset = log.getServerMs() - api.currentTimeMillis();<NEW_LINE>battleType = log.getBattleType();<NEW_LINE>startTime = log.getBattleStartTimestampMs();<NEW_LINE>endTime = log.getBattleEndTimestampMs();<NEW_LINE>if (log.getBattleActionsC... | ServerAction serverAction = new ServerAction(action); |
10,131 | public HttpResponse execute(HttpRequest req) throws UncheckedIOException {<NEW_LINE>// We're not using ImmutableMap for the outer map because it disallows null values.<NEW_LINE>Map<String, Object> responseMap = new HashMap<>();<NEW_LINE>responseMap.put("sessionId", null);<NEW_LINE>responseMap.put("status", UNKNOWN_COMM... | (responseMap).getBytes(UTF_8); |
1,841,666 | private void upsertPortImplementations(String userId, String serverName, List<PortImplementation> portImplementations, String processGUID, GUIDResponse response, String externalSourceName) {<NEW_LINE>final String methodName = "upsertPortImplementations";<NEW_LINE>if (CollectionUtils.isEmpty(portImplementations)) {<NEW_... | captureExceptions(response, error, methodName); |
1,232,622 | /*<NEW_LINE>* @see<NEW_LINE>* com.sitewhere.grpc.service.DeviceManagementGrpc.DeviceManagementImplBase#<NEW_LINE>* listDeviceAssignments(com.sitewhere.grpc.service.<NEW_LINE>* GListDeviceAssignmentsRequest, io.grpc.stub.StreamObserver)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void listDeviceAssignments(GListDevic... | (DeviceModelConverter.asGrpcDeviceAssignment(api)); |
1,186,053 | public Request<DescribeAlarmHistoryRequest> marshall(DescribeAlarmHistoryRequest describeAlarmHistoryRequest) {<NEW_LINE>if (describeAlarmHistoryRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<DescribeAlarmHistoryRequest> request = new De... | (describeAlarmHistoryRequest.getHistoryItemType())); |
1,017,196 | public void run() {<NEW_LINE>URLConnection connection = null;<NEW_LINE>try {<NEW_LINE>connection = from.openConnection();<NEW_LINE>// connection.setRequestProperty("User-Agent", VERSION);<NEW_LINE>// connection.setRequestProperty("Accept-Encoding", "gzip");<NEW_LINE>connection.setConnectTimeout(CONNECT_TIMEOUT);<NEW_LI... | write(buffer, 0, count); |
992,719 | public static GetDevopsProjectTaskInfoResponse unmarshall(GetDevopsProjectTaskInfoResponse getDevopsProjectTaskInfoResponse, UnmarshallerContext _ctx) {<NEW_LINE>getDevopsProjectTaskInfoResponse.setRequestId(_ctx.stringValue("GetDevopsProjectTaskInfoResponse.RequestId"));<NEW_LINE>getDevopsProjectTaskInfoResponse.setEr... | (_ctx.stringValue("GetDevopsProjectTaskInfoResponse.Object.OrganizationId")); |
749,342 | public static NoSuchBuildTargetException createForMissingBuildRule(UnconfiguredBuildTarget buildTarget, ImmutableList<UnconfiguredBuildTarget> similarTargets, int totalTargets, Function<Path, OptionalLong> fileSizeFetcher, Path buildFilePath) {<NEW_LINE>StringBuilder builder = new StringBuilder(String.format("The rule ... | ("\n%s similar targets in %s are:\n", displayed, buildFilePath)); |
922,450 | // invalidateIt<NEW_LINE>public String prepareIt() {<NEW_LINE>log.info(toString());<NEW_LINE>m_processMsg = ModelValidationEngine.get().<MASK><NEW_LINE>if (m_processMsg != null)<NEW_LINE>return DocAction.STATUS_Invalid;<NEW_LINE>// Lines<NEW_LINE>MPPOrderBOMLine[] lines = getLines(true);<NEW_LINE>if (lines.length == 0)... | fireDocValidate(this, ModelValidator.TIMING_BEFORE_PREPARE); |
708,609 | public Object interpret(ExecutionContext context, boolean debug) {<NEW_LINE>Object lhs = getValue(this.lhsGet, context, getLhs().interpret(context, debug));<NEW_LINE>Long lhsNum = null;<NEW_LINE>if (getOp().equals(">>>")) {<NEW_LINE>lhsNum = Types.toUint32(context, lhs);<NEW_LINE>} else {<NEW_LINE>lhsNum = Types.toInt3... | ) | rhsNum.longValue()); |
760,278 | void loadOptions(String fpOptions) {<NEW_LINE>File fOptions = new File(fpOptions);<NEW_LINE>if (fOptions.isAbsolute()) {<NEW_LINE>if (!fOptions.exists()) {<NEW_LINE>fOptions = null;<NEW_LINE>log(-1, "loadOptions: not exists: %s", fOptions);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>for (File aFile : new File[] { Commons.ge... | log(lvl, "loadOptions: Options file: %s", fOptions); |
225,332 | private void insertDatas(List<String> datas) throws IoTDBConnectionException, StatementExecutionException {<NEW_LINE>int size = datas.size();<NEW_LINE>List<String> deviceIds = new ArrayList<>(size);<NEW_LINE>List<Long> times = new ArrayList<>(size);<NEW_LINE>List<List<String>> measurementsList = new ArrayList<>(size);<... | parseDouble(valuesStr[i])); |
293,309 | public void readSettings(Object settings) {<NEW_LINE>this.wizDescriptor = (WizardDescriptor) settings;<NEW_LINE>TemplateWizard wizard = (TemplateWizard) settings;<NEW_LINE>String targetName = wizard.getTargetName();<NEW_LINE>FileObject resFolder = ResourceUtils.getResourceDirectory(this.helper.getData().getTargetFileOb... | getData().setTargetFileObject(resFolder); |
1,271,826 | public void encodeEnd(FacesContext context, UIComponent component) throws IOException {<NEW_LINE>ResponseWriter writer = context.getResponseWriter();<NEW_LINE>Link link = (Link) component;<NEW_LINE>boolean shouldWriteId = shouldWriteId(link);<NEW_LINE><MASK><NEW_LINE>String style = link.getStyle();<NEW_LINE>String defa... | boolean disabled = link.isDisabled(); |
1,556,283 | public static void saveSonicResourceData(String resourceUrl, String resourceSha1, long resourceSize) {<NEW_LINE>if (SonicUtils.shouldLog(Log.INFO)) {<NEW_LINE>SonicUtils.log(TAG, Log.INFO, "saveSonicResourceData resourceUrl = " + resourceUrl + ", resourceSha1 = " + resourceSha1 + ", resourceSize = " + resourceSize);<NE... | .lastUpdateTime = System.currentTimeMillis(); |
294,673 | public String dump() {<NEW_LINE>if (recordingFrom < 0)<NEW_LINE>return "<no recording>";<NEW_LINE>final StringBuilder buffer = new StringBuilder(super.dump());<NEW_LINE>if (tips.size() == 0)<NEW_LINE>return "";<NEW_LINE>buffer.append("TIPS:");<NEW_LINE>buffer.append(String.format("\n%100s +------------+", ""));<NEW_LIN... | .format("\n%100s | Value |", "Name")); |
992,944 | private static boolean runLdd(File lib) {<NEW_LINE>// ldd -r lib<NEW_LINE>// undefined symbol: _ZN2cv3MatC1ERKS0_RKNS_5Rect_IiEE (./libVisionProxy.so)<NEW_LINE>String cmdRet = runTime.runcmd("ldd -r " + lib);<NEW_LINE>String[] retLines;<NEW_LINE>boolean success = true;<NEW_LINE>retLines = cmdRet.split("continued: build... | (-1, "checking: might not work, has undefined symbols: %s", libName); |
520,211 | private void mv(Transpose trans, double alpha, DoublePointer x, double beta, DoublePointer y) {<NEW_LINE>if (uplo != null) {<NEW_LINE>if (diag != null) {<NEW_LINE>if (alpha == 1.0 && beta == 0.0 && x == y) {<NEW_LINE>BLAS.engine.trmv(layout(), uplo, trans, diag, m, A, ld, y, 1);<NEW_LINE>} else {<NEW_LINE>BLAS.engine.g... | 1, beta, y, 1); |
24,053 | public static GrayU8 localGaussian(GrayU8 input, GrayU8 output, ConfigLength width, float scale, boolean down, GrayU8 storage1, GrayU8 storage2) {<NEW_LINE>int radius = width.computeI(Math.min(input.width, input.height)) / 2;<NEW_LINE>GrayU8 blur = storage1;<NEW_LINE>BlurImageOps.gaussian(input, blur, -1, radius, stora... | .startIndex + y * blur.stride; |
604,193 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {<NEW_LINE>View view = inflater.inflate(R.layout.fragment_example_action, container, false);<NEW_LINE>mResult = (TextView) view.findViewById(R.id.result);<NEW_LINE>mMore = (TextView) view.findViewById(R.id.load_more);<NEW_... | getFlags() | Paint.UNDERLINE_TEXT_FLAG); |
1,521,882 | // Example usage of how to compute the diameter of a graph<NEW_LINE>public static void main(String[] args) {<NEW_LINE>Map<Integer, List<Edge>> graph = createGraph(5);<NEW_LINE>addUndirectedEdge(graph, 4, 2);<NEW_LINE>addUndirectedEdge(graph, 2, 0);<NEW_LINE>addUndirectedEdge(graph, 0, 1);<NEW_LINE>addUndirectedEdge(gra... | System.out.println("Wrong diameter!"); |
1,691,696 | private static ExtensionsType extensionsFromElement(Element extensionsElement) throws Exception {<NEW_LINE>ExtensionsType extensions = new ExtensionsType();<NEW_LINE>if (!EXTENSIONS_ELEMENT.equals(extensionsElement.getLocalName()) || !NAMESPACE.equals(getNamespaceUri(extensionsElement))) {<NEW_LINE>throw new Exception(... | add(element.getTextContent()); |
1,778,158 | public void write(Encoder encoder, ModuleComponentResolveMetadata value) throws Exception {<NEW_LINE>AbstractRealisedModuleComponentResolveMetadata transformed = assertRealized(value);<NEW_LINE>HashMap<ExternalDependencyDescriptor, Integer> deduplicationDependencyCache = Maps.newHashMap();<NEW_LINE>delegate.<MASK><NEW_... | write(encoder, transformed, deduplicationDependencyCache); |
277,065 | protected void doRefresh(LookupCachePurge cachePurge) throws Exception {<NEW_LINE>if (!whitelistService.isWhitelisted(config.url())) {<NEW_LINE>setError(UrlNotWhitelistedException.forUrl(config.url()));<NEW_LINE>publishSystemNotificationForWhitelistFailure();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final boolean urlWasNot... | ), e.getMessage()); |
1,181,689 | public UpdateEndpointsBatchResult updateEndpointsBatch(UpdateEndpointsBatchRequest updateEndpointsBatchRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateEndpointsBatchRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executio... | awsRequestMetrics.endEvent(Field.ClientExecuteTime); |
598,497 | private void appendObject(IRubyObject object, IRubyObject destination) {<NEW_LINE>if (object == null || object instanceof RubyNil) {<NEW_LINE>ensureRemainingCapacity(1);<NEW_LINE>buffer.put(NIL);<NEW_LINE>} else if (object instanceof RubyBoolean) {<NEW_LINE>ensureRemainingCapacity(1);<NEW_LINE>buffer.put(((RubyBoolean)... | isTrue() ? TRUE : FALSE); |
62,389 | public static DescribeVulLevelStatisticsResponse unmarshall(DescribeVulLevelStatisticsResponse describeVulLevelStatisticsResponse, UnmarshallerContext context) {<NEW_LINE>describeVulLevelStatisticsResponse.setRequestId(context.stringValue("DescribeVulLevelStatisticsResponse.RequestId"));<NEW_LINE>describeVulLevelStatis... | ("DescribeVulLevelStatisticsResponse.LevelStatistics[" + i + "].VulDealedTotalNum")); |
2,365 | public String download(HttpServletRequest request, HttpServletResponse response) throws Exception {<NEW_LINE>String fileName = "common_file_server_template.csv";<NEW_LINE>String realPath = new File("").getAbsolutePath();<NEW_LINE>File file = new File(realPath, fileName);<NEW_LINE>if (file.exists()) {<NEW_LINE>try (File... | addHeader("Content-Disposition", "attachment;fileName=" + fileName); |
1,019,267 | private ExportResult<PhotosContainerResource> exportPhotosContainer(PhotosContainerResource container, TokensAndUrlAuthData authData) throws IOException, InvalidTokenException, PermissionDeniedException {<NEW_LINE>ImmutableList.Builder<PhotoAlbum> albumBuilder = ImmutableList.builder();<NEW_LINE>ImmutableList.Builder<P... | subResources = new ArrayList<>(); |
1,703,629 | public synchronized void cancel(OlapTable olapTable, String msg) {<NEW_LINE>// remove tasks<NEW_LINE>for (MaterializedIndex rollupIndex : this.partitionIdToRollupIndex.values()) {<NEW_LINE>for (Tablet rollupTablet : rollupIndex.getTablets()) {<NEW_LINE>long rollupTabletId = rollupTablet.getId();<NEW_LINE>List<Replica> ... | getEditLog().logCancelRollup(this); |
1,825,087 | public <T, ET extends T> TypedSqlQuery<ET> createUUIDSelectionQuery(@NonNull final IContextAware ctx, @NonNull final Class<ET> clazz, @NonNull final String querySelectionUUID) {<NEW_LINE>final String tableName = InterfaceWrapperHelper.getTableName(clazz);<NEW_LINE>final POInfo poInfo = POInfo.getPOInfo(tableName);<NEW_... | (selectionSqlFrom).setOrderBy(selectionOrderBy); |
434,902 | private Void storeResourcesInsideTransaction(List<IBaseResource> theResources, RequestDetails theRequestDetails, TransactionDetails theTransactionDetails) {<NEW_LINE>Map<IIdType, IBaseResource> ids = new HashMap<>();<NEW_LINE>for (IBaseResource next : theResources) {<NEW_LINE>if (!next.getIdElement().hasIdPart()) {<NEW... | >(ids.keySet()); |
1,817,302 | private int calculatePreferredWrapPosition(@Nonnull Editor editor, @Nonnull CharSequence text, int tabSize, int spaceSize, int startLineOffset, int endLineOffset, int targetRangeEndOffset) {<NEW_LINE>boolean hasTabs = false;<NEW_LINE>boolean canOptimize = true;<NEW_LINE>boolean hasNonSpaceSymbols = false;<NEW_LINE>loop... | startLineOffset, endLineOffset, targetRangeEndOffset, reservedWidthInColumns); |
229,020 | /*<NEW_LINE>* sourceTypeKey ! wildcardKey position semi-colon<NEW_LINE>* p.X { capture of ? } --> !*123; (Lp/X; in declaring type except if leaf)<NEW_LINE>* p.X { capture of ? extends p.Y } --> !+Lp/Y;123; (Lp/X; in declaring type except if leaf)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public char[] computeUniqueKey(bo... | int length = buffer.length(); |
1,217,487 | public void init(final PwmDomain pwmDomain, final UserInfo userInfo, final SessionLabel sessionLabel, final Locale locale) throws PwmUnrecoverableException {<NEW_LINE>pwmHttpClient = pwmDomain<MASK><NEW_LINE>this.remoteSessionID = pwmDomain.getSecureService().pwmRandom().randomUUID().toString();<NEW_LINE>this.userInfo ... | .getHttpClientService().getPwmHttpClient(); |
507,151 | public void run() {<NEW_LINE>synchronized (waitingForStateChange) {<NEW_LINE>Preconditions.checkState(!isRunning.getAndSet(true), "already running");<NEW_LINE>if (this.gcThrashingPercentagePerPeriod <= 0 || this.gcThrashingPercentagePerPeriod >= 100) {<NEW_LINE>LOG.warn("gcThrashingPercentagePerPeriod: {} is not valid ... | long now = System.currentTimeMillis(); |
974,851 | private void export(XlsxBorderInfo info) {<NEW_LINE>// if(info.hasBorder())<NEW_LINE>{<NEW_LINE>write("<border");<NEW_LINE>if (info.getDirection() != null) {<NEW_LINE>write(info.getDirection().equals(LineDirectionEnum.TOP_DOWN) ? " diagonalDown=\"1\"" : " diagonalUp=\"1\"");<NEW_LINE>}<NEW_LINE>write(">");<NEW_LINE>exp... | exportBorder(info, XlsxBorderInfo.RIGHT_BORDER); |
10,991 | private <K, V extends spoon.reflect.declaration.CtElement> void replaceInMapIfExist(java.util.Map<K, V> mapProtected, spoon.support.visitor.replace.ReplaceMapListener listener) {<NEW_LINE>java.util.Map<K, V> map = new java.<MASK><NEW_LINE>V shouldBeDeleted = null;<NEW_LINE>K key = null;<NEW_LINE>for (java.util.Map.Entr... | util.HashMap<>(mapProtected); |
160,162 | public WorkflowAction findEntryAction(final Contentlet contentlet, final User user) throws DotDataException, DotSecurityException {<NEW_LINE>WorkflowScheme scheme = null;<NEW_LINE>List<WorkflowScheme> schemes = findSchemesForStruct(contentlet.getStructure());<NEW_LINE>if (null != schemes && schemes.size() == 1) {<NEW_L... | entryAction.getName() + "'"); |
291,141 | // GEN-LAST:event_testConnectionActionPerformed<NEW_LINE>private void removeConfigurationButtonActionPerformed(java.awt.event.ActionEvent evt) {<NEW_LINE>// GEN-FIRST:event_removeConfigurationButtonActionPerformed<NEW_LINE>ConfigurationComboModel model = (ConfigurationComboModel) configurationCombo.getModel();<NEW_LINE... | Message(message, NotifyDescriptor.ERROR_MESSAGE); |
1,588,063 | public Map.Entry<String, String> tryClimb(Map<String, String> map, String owner, String name, int access) {<NEW_LINE>String key = owner + "/" + name;<NEW_LINE>String mapped = map.get(key);<NEW_LINE>if (mapped == null && (access == -1 || (!Modifier.isPrivate(access) && !Modifier.isStatic(access)))) {<NEW_LINE>Collection... | INSTANCE.inheritanceMap.getParents(owner); |
1,014,534 | final ListPredictorBacktestExportJobsResult executeListPredictorBacktestExportJobs(ListPredictorBacktestExportJobsRequest listPredictorBacktestExportJobsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listPredictorBacktestExportJobsRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.star... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
849,111 | public int[] batchUpdate(List<? extends Model> modelList, int batchSize) {<NEW_LINE>if (modelList == null || modelList.size() == 0)<NEW_LINE>return new int[0];<NEW_LINE>Model model = modelList.get(0);<NEW_LINE>Table table = TableMapping.me().getTable(model.getClass());<NEW_LINE>String[<MASK><NEW_LINE>Map<String, Object... | ] pKeys = table.getPrimaryKey(); |
637,382 | public static ListBandwidthackagesResponse unmarshall(ListBandwidthackagesResponse listBandwidthackagesResponse, UnmarshallerContext _ctx) {<NEW_LINE>listBandwidthackagesResponse.setRequestId(_ctx.stringValue("ListBandwidthackagesResponse.RequestId"));<NEW_LINE>listBandwidthackagesResponse.setTotalCount(_ctx.integerVal... | ("ListBandwidthackagesResponse.BandwidthPackages[" + i + "].CreateTime")); |
339,566 | public TransferResult<CFValue, CFStore> visitAssignment(AssignmentNode n, TransferInput<CFValue, CFStore> in) {<NEW_LINE>TransferResult<CFValue, CFStore> result = super.visitAssignment(n, in);<NEW_LINE>// Remove "close" from the type in the store for resource variables.<NEW_LINE>// The Resource Leak Checker relies on t... | fromNode(n.getTarget()); |
352,329 | public List<Field> requiredFields() {<NEW_LINE>List<Field> fields <MASK><NEW_LINE>fields.add(ImmutableHostFolderField.builder().name("Site/Folder").variable(PERSONA_HOST_FOLDER_FIELD_VAR).dataType(DataTypes.SYSTEM).required(true).indexed(true).fixed(true).sortOrder(1).build());<NEW_LINE>fields.add(ImmutableTextField.bu... | = new ArrayList<Field>(); |
1,662,809 | private void sortColumns(final DataFrame sortedDf, final int numColumns, final String[] sortColumn, final boolean sortAsc) {<NEW_LINE>Comparator<Integer> comparator = comparing(i -> sortColumn[i]<MASK><NEW_LINE>if (!sortAsc) {<NEW_LINE>comparator = comparator.reversed();<NEW_LINE>}<NEW_LINE>for (int c = 0; c < numColum... | , nullsLast(naturalOrder())); |
857,395 | boolean reloadModuleListInfo() {<NEW_LINE>assert // NOI18N<NEW_LINE>!SwingUtilities.isEventDispatchThread() : "SingleModuleProperties.reloadModuleListInfo() cannot be called from EDT";<NEW_LINE>if (isActivePlatformValid()) {<NEW_LINE>try {<NEW_LINE>SortedSet<String> allCategories = new TreeSet<String>(Collator.getInsta... | String cat = me.getCategory(); |
1,169,837 | public void join() throws OperationFailedException {<NEW_LINE>if (chatRoomSession == null && chatInvitation == null) {<NEW_LINE>// the session is not set and we don't have a chatInvitatoin<NEW_LINE>// so we try to join the chatRoom again<NEW_LINE>ChatRoomManager chatRoomManager = provider<MASK><NEW_LINE>chatRoomSession... | .getAimConnection().getChatRoomManager(); |
1,242,635 | public void marshall(NetworkResource networkResource, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (networkResource == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(networkResource.getRegisteredGatewayArn... | networkResource.getAwsRegion(), AWSREGION_BINDING); |
1,775,452 | public void marshall(AutoScalingSettingsDescription autoScalingSettingsDescription, AwsJsonWriter jsonWriter) throws Exception {<NEW_LINE>jsonWriter.beginObject();<NEW_LINE>if (autoScalingSettingsDescription.getMinimumUnits() != null) {<NEW_LINE>Long minimumUnits = autoScalingSettingsDescription.getMinimumUnits();<NEW_... | ).marshall(scalingPoliciesItem, jsonWriter); |
382,148 | void addHighlight(StyledDocument doc, int line1, int line2, final java.awt.Color color) {<NEW_LINE>if (line1 > 0) {<NEW_LINE>--line1;<NEW_LINE>}<NEW_LINE>SimpleAttributeSet attrs = new SimpleAttributeSet();<NEW_LINE>StyleConstants.setBackground(attrs, color);<NEW_LINE>attrs.addAttribute(HighlightsContainer.ATTR_EXTENDS... | > it = highlights.listIterator(); |
884,810 | public static byte[] scrambleCachingSha2(byte[] password, byte[] seed) throws DigestException {<NEW_LINE>MessageDigest md;<NEW_LINE>byte[] mysqlScrambleBuff = null;<NEW_LINE>try {<NEW_LINE>md = MessageDigest.getInstance("SHA-256");<NEW_LINE>byte[] dig1 = new byte[cachingSha2DigestLength];<NEW_LINE>byte[] dig2 = new byt... | digest(dig2, 0, cachingSha2DigestLength); |
1,149,632 | public Object eval(SQLMethodInvokeExpr x) {<NEW_LINE>List<SQLExpr> arguments = x.getArguments();<NEW_LINE>if (arguments.size() > 0) {<NEW_LINE>SQLExpr p0 = arguments.get(0);<NEW_LINE>if (p0 instanceof SQLIntegerExpr && ((SQLIntegerExpr) p0).getNumber() instanceof Integer) {<NEW_LINE>int val = ((SQLIntegerExpr) p0)<MASK... | .getNumber().intValue(); |
787,484 | private CustomerTaskFormData buildCustomerTaskFromData(CustomerTask task, ObjectNode taskProgress, TaskInfo taskInfo) {<NEW_LINE>try {<NEW_LINE>CustomerTaskFormData taskData = new CustomerTaskFormData();<NEW_LINE>taskData.percentComplete = taskProgress.<MASK><NEW_LINE>taskData.status = taskProgress.get("status").asText... | get("percent").asInt(); |
1,413,200 | private static MessageValues extractHeaders(byte[] payload, boolean copyRequestHeaders, MessageHeaders requestHeaders) throws Exception {<NEW_LINE>ByteBuffer byteBuffer = ByteBuffer.wrap(payload);<NEW_LINE>int headerCount = byteBuffer.get() & 0xff;<NEW_LINE>if (headerCount == 0xff) {<NEW_LINE>headerCount = byteBuffer.g... | position(), len, "UTF-8"); |
1,240,376 | public SearchForSuggestionsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>SearchForSuggestionsResult searchForSuggestionsResult = new SearchForSuggestionsResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentEleme... | class).unmarshall(context)); |
672,858 | private static ITranslatableString buildMessage(@Nullable final IPricingContext pricingCtx, final int documentLineNo, final ProductId productId) {<NEW_LINE>final TranslatableStringBuilder sb = TranslatableStrings.builder();<NEW_LINE>if (documentLineNo > 0) {<NEW_LINE>if (!sb.isEmpty()) {<NEW_LINE>sb.append(", ");<NEW_L... | (": ").append(productName); |
1,775,008 | private CopySpec configureDistribution(Project project, Distribution mainDistribution, ApplicationPluginConvention pluginConvention) {<NEW_LINE>mainDistribution.getDistributionBaseName().convention(project.provider(pluginConvention::getApplicationName));<NEW_LINE>CopySpec distSpec = mainDistribution.getContents();<NEW_... | ).named(JavaPlugin.JAR_TASK_NAME); |
1,540,595 | public I_AD_PrinterHW_Calibration createCalibrationIfNoneExists(final I_AD_PrinterTray_Matching printerTrayMatching) {<NEW_LINE>final Properties ctx = getCtx(printerTrayMatching);<NEW_LINE>final String trxName = getTrxName(printerTrayMatching);<NEW_LINE>final IPrintingDAO printingDAO = Services.get(IPrintingDAO.class);... | I_AD_PrinterHW_MediaTray hwMediaTray = printerTrayMatching.getAD_PrinterHW_MediaTray(); |
493,823 | public final ViewLayout layoutSideListView() {<NEW_LINE>final ViewLayout.Builder layoutBuilder = ViewLayout.builder().setWindowId(WindowId.of(getAdWindowId())).setEmptyResultText(HARDCODED_TAB_EMPTY_RESULT_TEXT).setEmptyResultHint(HARDCODED_TAB_EMPTY_RESULT_HINT);<NEW_LINE>//<NEW_LINE>// Create UI elements from AD_UI_E... | getFieldNames(), Characteristic.SideListField); |
9,101 | private static Point index2point(Point index) {<NEW_LINE>int indexPos = index.x;<NEW_LINE>int indexLevel = index.y;<NEW_LINE>if (indexPos < indexLevel) {<NEW_LINE>return new Point(indexLevel, indexPos);<NEW_LINE>} else if (indexPos < 3 * indexLevel) {<NEW_LINE>return new Point(indexLevel - (indexPos - indexLevel), inde... | indexLevel) - indexLevel, -indexLevel); |
682,423 | public static ListSharedReportsResponse unmarshall(ListSharedReportsResponse listSharedReportsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listSharedReportsResponse.setRequestId<MASK><NEW_LINE>listSharedReportsResponse.setSuccess(_ctx.booleanValue("ListSharedReportsResponse.Success"));<NEW_LINE>Result result = new Re... | (_ctx.stringValue("ListSharedReportsResponse.RequestId")); |
1,516,008 | public com.amazonaws.services.clouddirectory.model.LimitExceededException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.clouddirectory.model.LimitExceededException limitExceededException = new com.amazonaws.services.clouddirectory.model.LimitExceededException(... | String currentParentElement = context.getCurrentParentElement(); |
1,368,948 | public List<VolumeJoinVO> searchByIds(Long... volIds) {<NEW_LINE>// set detail batch query size<NEW_LINE>int DETAILS_BATCH_SIZE = 2000;<NEW_LINE>String <MASK><NEW_LINE>if (batchCfg != null) {<NEW_LINE>DETAILS_BATCH_SIZE = Integer.parseInt(batchCfg);<NEW_LINE>}<NEW_LINE>// query details by batches<NEW_LINE>List<VolumeJo... | batchCfg = _configDao.getValue("detail.batch.query.size"); |
1,134,454 | private Element findDeclaration(WorkingCopy wc, @NullAllowed Object instanceAttribute) {<NEW_LINE>if (!(instanceAttribute instanceof String)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>String attr = (String) instanceAttribute;<NEW_LINE>if (attr.startsWith("new:")) {<NEW_LINE>return wc.getElements().getTypeElement(attr... | .replace('$', '.')); |
457,021 | public static ListFileSystemWithMountTargetsResponse unmarshall(ListFileSystemWithMountTargetsResponse listFileSystemWithMountTargetsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listFileSystemWithMountTargetsResponse.setRequestId(_ctx.stringValue("ListFileSystemWithMountTargetsResponse.RequestId"));<NEW_LINE>listFile... | ("ListFileSystemWithMountTargetsResponse.FileSystemList[" + i + "].FileSystemType")); |
917,115 | public final boolean apply(Context context, Object object) {<NEW_LINE>if (object == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (object instanceof Map) {<NEW_LINE>Object fieldValue = fieldName == null ? object : ((Map<?, ?>) object).get(fieldName);<NEW_LINE>if (fieldValue == null) {<NEW_LINE>return false;<NEW... | fieldWriter = objectWriter.getFieldWriter(fieldNameNameHash); |
263,121 | static /* testing */<NEW_LINE>ClosableResolver<AwsEndpoint> compositeQueryResolver(final ClusterResolver<AwsEndpoint> remoteResolver, final ClusterResolver<AwsEndpoint> localResolver, final EurekaClientConfig clientConfig, final EurekaTransportConfig transportConfig, final InstanceInfo myInstanceInfo, final EndpointRan... | getAvailabilityZones(clientConfig.getRegion()); |
816,653 | protected void encodeContent(FacesContext context, ConfirmDialog dialog) throws IOException {<NEW_LINE>ResponseWriter writer = context.getResponseWriter();<NEW_LINE>String messageText = dialog.getMessage();<NEW_LINE>UIComponent messageFacet = dialog.getFacet("message");<NEW_LINE>String defaultIcon = dialog.isGlobal() ?... | writer.writeText(messageText, null); |
678,449 | public void index(Record record) {<NEW_LINE>if (this.client == null) {<NEW_LINE>this.init();<NEW_LINE>}<NEW_LINE>String id = null;<NEW_LINE>Map<String, Object> json = new HashMap<String, Object>();<NEW_LINE>for (String propname : record.getProperties()) {<NEW_LINE>Property prop = config.getPropertyByName(propname);<NEW... | .get(values, 0)); |
150,378 | Builder addBindingIntoMap(Key key, Object entryKey, Binding entryValueBinding) {<NEW_LINE>if (key == null)<NEW_LINE>throw new NullPointerException("key == null");<NEW_LINE>if (entryKey == null)<NEW_LINE>throw new NullPointerException("entryKey == null");<NEW_LINE>if (entryValueBinding == null)<NEW_LINE>throw new NullPo... | mapBindings = new LinkedHashMap<>(); |
992,279 | private File buildConfig(File reportFile, File logFile, MockResponse modelItem) throws IOException {<NEW_LINE><MASK><NEW_LINE>ConfigurationDocument configDoc = ConfigurationDocument.Factory.newInstance();<NEW_LINE>Configuration config = configDoc.addNewConfiguration();<NEW_LINE>config.setVerbose(settings.getBoolean(WSI... | Settings settings = modelItem.getSettings(); |
974,171 | public boolean _process(List<Point2D_I32> contour) {<NEW_LINE>this<MASK><NEW_LINE>// ------------- find initial line segments<NEW_LINE>// can't fit a line to a single point<NEW_LINE>if (N <= 1) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// Go around the contour looking for two points on opposite ends which are far ap... | .N = contour.size(); |
610,444 | private Predicate toFilterPredicate(EffectivePerson effectivePerson, Business business, Wi wi) throws Exception {<NEW_LINE>EntityManager em = business.entityManagerContainer().get(Message.class);<NEW_LINE>CriteriaBuilder cb = em.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<Tuple> cq = cb.createQuery(Tuple.class);<NEW_L... | Predicate p = cb.conjunction(); |
1,026,998 | public void postInvoke(Struct[] structs, Pointer primitive, ToNativeContext context) {<NEW_LINE>if (structs != null && primitive != null) {<NEW_LINE>try {<NEW_LINE>int off = 0;<NEW_LINE>for (int i = 0; i < structs.length; i++) {<NEW_LINE>structs[i<MASK><NEW_LINE>int structSize = align(Struct.size(structs[i]), Struct.al... | ] = constructor.newInstance(runtime); |
28,633 | final UpdateFunctionEventInvokeConfigResult executeUpdateFunctionEventInvokeConfig(UpdateFunctionEventInvokeConfigRequest updateFunctionEventInvokeConfigRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateFunctionEventInvokeConfigRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = ... | (super.beforeMarshalling(updateFunctionEventInvokeConfigRequest)); |
382,670 | private Mono<Response<Flux<ByteBuffer>>> createWithResponseAsync(String resourceGroupName, String resourceName, OrchestratorInner parameters, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and ... | error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.