idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
1,096,744
public static void createPersistenceXml(String storeName) {<NEW_LINE>String configPropertyName = AppContextLoader.PERSISTENCE_CONFIG;<NEW_LINE>String fileName = "persistence.xml";<NEW_LINE>if (!Stores.isMain(storeName)) {<NEW_LINE>configPropertyName = configPropertyName + "_" + storeName;<NEW_LINE>fileName = storeName ...
configProperty = AppContext.getProperty(configPropertyName);
1,419,562
private void addMultiAsFile(BytecodeCreator methodCreator, AssignableResultHandle multipartForm, String formParamName, String partType, FieldInfo field, ResultHandle multi) {<NEW_LINE>if (partType == null) {<NEW_LINE>throw new IllegalArgumentException("No @PartType annotation found on multipart form field " + field.dec...
methodCreator.load(partType)));
1,001,049
private void updateStoragePoolHostVOAndDetails(StoragePool pool, long hostId, ModifyStoragePoolAnswer mspAnswer) {<NEW_LINE>StoragePoolHostVO poolHost = storagePoolHostDao.findByPoolHost(pool.getId(), hostId);<NEW_LINE>if (poolHost == null) {<NEW_LINE>poolHost = new StoragePoolHostVO(pool.getId(), hostId, mspAnswer.get...
.replaceAll("//", "/"));
956,321
protected Map<String, Object> createEditorScreenOptions(WindowInfo windowInfo, NavigationState requestedState, AppUI ui) {<NEW_LINE>UrlChangeHandler urlChangeHandler = ui.getUrlChangeHandler();<NEW_LINE>String idParam = MapUtils.isNotEmpty(requestedState.getParams()) ? requestedState.getParams().get("id") : NEW_ENTITY_...
entity = dataManager.load(ctx);
1,205,247
// activateBean<NEW_LINE>@Override<NEW_LINE>public EJBObject activateBean(Object primaryKey) throws FinderException, RemoteException {<NEW_LINE>// d215317<NEW_LINE>EJSWrapperCommon wrappers = null;<NEW_LINE>// Single-object ejbSelect methods may result in a null value,<NEW_LINE>// and since this code path also supports...
Tr.debug(tc, "activateBean : key = null, returning null");
25,697
private void refreshList(JTable table, JButton refreshbutton, JTextField filterfield, LinkedList<Object[]> list, String resourcestring) {<NEW_LINE>// first check whether we have any saved values at all<NEW_LINE>if (list != null) {<NEW_LINE>// table-values might be changed, so selection listener should not react<NEW_LIN...
addRow(iterator.next());
1,353,615
private static StringBuilder appendPath(StringBuilder sb, int indent, PathIterator pathIterator) {<NEW_LINE>double[] coords = new double[6];<NEW_LINE>while (!pathIterator.isDone()) {<NEW_LINE>int <MASK><NEW_LINE>String typeStr;<NEW_LINE>int endIndex;<NEW_LINE>switch(type) {<NEW_LINE>case PathIterator.SEG_CLOSE:<NEW_LIN...
type = pathIterator.currentSegment(coords);
1,344,595
private void singleLine(float x1, float y1, float x2, float y2, int color) {<NEW_LINE>float r = strokeWeight * 0.5f;<NEW_LINE>float dx = x2 - x1;<NEW_LINE>float dy = y2 - y1;<NEW_LINE>float d = PApplet.sqrt(dx * dx + dy * dy);<NEW_LINE>float tx = dy / d * r;<NEW_LINE>float ty = dx / d * r;<NEW_LINE>if (strokeCap == PRO...
segments = circleDetail(r, HALF_PI);
621,260
final ListAggregatedUtterancesResult executeListAggregatedUtterances(ListAggregatedUtterancesRequest listAggregatedUtterancesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listAggregatedUtterancesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetri...
HandlerContextKey.SIGNING_REGION, getSigningRegion());
755,546
public void startBlock(String block) {<NEW_LINE>if (block.equals("paging")) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Object node;<NEW_LINE>if (stack.size() == 0) {<NEW_LINE>if (root == null) {<NEW_LINE>root = "entry";<NEW_LINE>}<NEW_LINE>node = new Vector() {<NEW_LINE><NEW_LINE>public synchronized void addElement(Object ...
.putAll((Hashtable) obj);
932,225
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {<NEW_LINE>builder.startObject().startArray(TYPES_ALLOWED.getPreferredName());<NEW_LINE>for (String type : typesAllowed.stream().sorted().collect(Collectors.toList())) {<NEW_LINE>builder.value(type);<NEW_LINE>}<NEW_LINE>builder...
startArray(LANGUAGE_CONTEXTS.getPreferredName());
26,493
public static void testAlternating() {<NEW_LINE>System.out.println("Alternating case... universe = [0," + universe_size + ")");<NEW_LINE>RoaringBitmap r = new RoaringBitmap();<NEW_LINE>for (int i = 1; i < universe_size; i++) {<NEW_LINE>if (i % 2 == 0)<NEW_LINE>r.add(i);<NEW_LINE>}<NEW_LINE>System.out.println("Adding al...
System.out.println("As a bitmap it would look like 01010101... ");
710,821
private Mono<Response<RemediationInner>> cancelAtSubscriptionWithResponseAsync(String remediationName, 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...
this.client.mergeContext(context);
691,447
public void queryAlertsForDetection() {<NEW_LINE>// BEGIN: readme-sample-listAnomaliesForAlert<NEW_LINE>String alertConfigurationId = "9ol48er30-6e6e-4391-b78f-b00dfee1e6f5";<NEW_LINE>final OffsetDateTime startTime = OffsetDateTime.parse("2020-01-01T00:00:00Z");<NEW_LINE>final OffsetDateTime endTime = OffsetDateTime.pa...
getSeriesKey().asMap());
890,432
public ReportSettings prepareReportSettings(StockMove stockMove, String format) throws AxelorException {<NEW_LINE>if (stockMove.getPrintingSettings() == null) {<NEW_LINE>throw new AxelorException(TraceBackRepository.CATEGORY_MISSING_FIELD, String.format(I18n.get(IExceptionMessage.STOCK_MOVES_MISSING_PRINTING_SETTINGS),...
.getStockMoveSeq()), stockMove);
1,537,011
public static DescribeLiveSnapshotConfigResponse unmarshall(DescribeLiveSnapshotConfigResponse describeLiveSnapshotConfigResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeLiveSnapshotConfigResponse.setRequestId(_ctx.stringValue("DescribeLiveSnapshotConfigResponse.RequestId"));<NEW_LINE>describeLiveSnapshotConfigRe...
(_ctx.integerValue("DescribeLiveSnapshotConfigResponse.TotalPage"));
1,844,025
public void populateOnGround(World world, Random random, Chunk chunk) {<NEW_LINE>int sourceX = chunk.getX() << 4;<NEW_LINE>int sourceZ = chunk.getZ() << 4;<NEW_LINE>for (int i = 0; i < 7; i++) {<NEW_LINE>int x = <MASK><NEW_LINE>int z = sourceZ + random.nextInt(16);<NEW_LINE>int y = world.getHighestBlockYAt(x, z);<NEW_L...
sourceX + random.nextInt(16);
601,432
public void write(org.apache.thrift.protocol.TProtocol prot, compactionCompleted_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 (stru...
struct.credentials.write(oprot);
1,343,053
private void deleteIsomorphism() {<NEW_LINE>int[] compacted = new int[nextFreeCell - _removedCells];<NEW_LINE>int[] nodes = new int[_nodesToRemove.size() + 1];<NEW_LINE>int[] gains = new int[_nodesToRemove.size() + 1];<NEW_LINE>int idx = 1;<NEW_LINE>if (_nodesToRemove.isEmpty()) {<NEW_LINE>// If no equality detected, s...
gain, compacted, from, to);
1,795,586
private JComponent createButtonPanel() {<NEW_LINE>JPanel fileChooserPanel = new JPanel(new GridLayout(1, 0));<NEW_LINE>fileChooserPanel.<MASK><NEW_LINE>fileChooser = new JFileChooser();<NEW_LINE>final JButton chooseFileButton = new JButton("Open...");<NEW_LINE>chooseFileButton.addActionListener(new ActionListener() {<N...
setBorder(new TitledBorder("Actions"));
1,087,193
// It's Map<Long, DataFlavor> actually, but javac complains if the type isn't erased...<NEW_LINE>@Override<NEW_LINE>protected void startDrag(Transferable trans, long[] formats, Map formatMap) {<NEW_LINE>activeDSContextPeer = this;<NEW_LINE>// NOTE: we ignore the formats[] and the formatMap altogether.<NEW_LINE>// AWT p...
transferable.updateData(trans, true);
330,265
public void extractKeyParts(final CacheKeyBuilder keyBuilder, final Object targetObject, final Object[] params) {<NEW_LINE><MASK><NEW_LINE>if (ctxObj == null) {<NEW_LINE>keyBuilder.setSkipCaching();<NEW_LINE>final CacheGetException ex = new CacheGetException("Got null context parameter.").setTargetObject(targetObject)....
final Object ctxObj = params[parameterIndex];
1,661,813
private void initHotkeys() {<NEW_LINE>// Don't change focus on TAB<NEW_LINE>setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, new HashSet<KeyStroke>());<NEW_LINE>final InputMap inputMap = this.getInputMap();<NEW_LINE>final ActionMap actionMap = getActionMap();<NEW_LINE>inputMap.put(KeyStroke.getKeyStro...
actionMap.put("shift LEFT", m_leftAction);
889,709
private Pair<Integer, Set<JMeterTreeNode>> searchInTree(GuiPackage guiPackage, Searcher searcher, String wordToSearch) {<NEW_LINE>int numberOfMatches = 0;<NEW_LINE>JMeterTreeModel jMeterTreeModel = guiPackage.getTreeModel();<NEW_LINE>Set<JMeterTreeNode> nodes = new LinkedHashSet<>();<NEW_LINE>for (JMeterTreeNode jMeter...
this.lastSearchResult.addAll(nodes);
390,393
private static String simplifyModuleID(String candidateID, String fallbackExt) {<NEW_LINE>String moduleID = null;<NEW_LINE>if (candidateID == null) {<NEW_LINE>moduleID = "_default_" + fallbackExt;<NEW_LINE>} else if (candidateID.equals("")) {<NEW_LINE>moduleID = "_default_" + fallbackExt;<NEW_LINE>}<NEW_LINE>if (null =...
).replace('/', '_');
1,573,947
protected void onPostExecute(BitmapWithMetadata bitmapWithMetadata) {<NEW_LINE>if (bitmapWithMetadata != null) {<NEW_LINE><MASK><NEW_LINE>Log.d(LOG_TAG_DECODE_TASK, "Decoded image size: [" + bitmapWithMetadata.getBitmap().getWidth() + ", " + bitmapWithMetadata.getBitmap().getHeight() + "].");<NEW_LINE>decoded.add(bitma...
new DecodeTask().execute();
574,968
private void referenceUnitDuty(Business business, WoIdentity woIdentity) throws Exception {<NEW_LINE>EntityManager em = business.entityManagerContainer().get(UnitDuty.class);<NEW_LINE>CriteriaBuilder cb = em.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<UnitDuty> cq = cb.createQuery(UnitDuty.class);<NEW_LINE>Root<UnitDu...
.get(UnitDuty_.identityList));
1,095,204
private String PPVAL(final int index, final boolean showBinary) {<NEW_LINE>if (index >= getKeys().size())<NEW_LINE>return "-";<NEW_LINE>if (index > getKeys().capacity()) {<NEW_LINE>throw new RuntimeException("index=" + index + ", keys.size=" + getKeys().size() + ", keys.capacity=" + getKeys().capacity());<NEW_LINE>}<NE...
getKeys().get(index);
1,428,035
public final void typeDefinitionStart() throws RecognitionException, TokenStreamException {<NEW_LINE>returnAST = null;<NEW_LINE>ASTPair currentAST = new ASTPair();<NEW_LINE>AST typeDefinitionStart_AST = null;<NEW_LINE>modifiersOpt();<NEW_LINE>{<NEW_LINE>switch(LA(1)) {<NEW_LINE>case LITERAL_class:<NEW_LINE>{<NEW_LINE>m...
(1), getFilename());
178,347
protected String doInBackground(Void... params) {<NEW_LINE>try {<NEW_LINE>if (json_req == null)<NEW_LINE>return "Error creating the request!";<NEW_LINE>// check sdcard state<NEW_LINE>File root;<NEW_LINE>try {<NEW_LINE>root = AnyplaceUtils.getRadioMapFoler(ctx, mBuildID, mFloor_number);<NEW_LINE>} catch (Exception e) {<...
NetworkUtils.downloadHttpClientJsonPost(parameters, cred_str);
202,493
public static void main(String[] args) {<NEW_LINE>Scanner sc = new Scanner(System.in);<NEW_LINE>int TC = sc.nextInt();<NEW_LINE>while (TC-- > 0) {<NEW_LINE>// these two values are not used<NEW_LINE>int xsize = sc.nextInt(), ysize = sc.nextInt();<NEW_LINE>int[] x = new int[11], y = new int[11];<NEW_LINE>x[0] = sc.nextIn...
i] = sc.nextInt();
1,258,492
public long insertMessageOutbox(long threadId, OutgoingTextMessage message, boolean forceSms, long date, InsertListener insertListener) {<NEW_LINE>SQLiteDatabase db = databaseHelper.getSignalWritableDatabase();<NEW_LINE>long type = Types.BASE_SENDING_TYPE;<NEW_LINE>if (message.isKeyExchange())<NEW_LINE>type |= Types.KE...
threads().setLastSeenSilently(threadId);
1,829,666
final ListTagsForResourceResult executeListTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listTagsForResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest...
addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListTagsForResource");
537,016
public boolean apply(Game game, Ability source) {<NEW_LINE>// Outcome.Benefit - AI will boost all the time (Feather choice)<NEW_LINE>// TODO: add AI hint logic in the choice method, see Tyrant's Choice as example<NEW_LINE>TwoChoiceVote vote = new TwoChoiceVote("Feather (+1/+1 counter)", "Quill (draw a card)", Outcome.B...
featherCount = vote.getVoteCount(true);
376,745
private void storeCaches(final Set<String> geocodes, final Set<Integer> listIds) {<NEW_LINE>final <MASK><NEW_LINE>waitDialog = new ProgressDialog(activity);<NEW_LINE>waitDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);<NEW_LINE>waitDialog.setCancelable(true);<NEW_LINE>waitDialog.setCancelMessage(loadDetailsHan...
LoadDetailsHandler loadDetailsHandler = new LoadDetailsHandler(this);
1,090,463
static boolean isClockwiseRing(MultiPathImpl polygon, int iring) {<NEW_LINE>int high_point_index = polygon.getHighestPointIndex(iring);<NEW_LINE>int path_start = polygon.getPathStart(iring);<NEW_LINE>int path_end = polygon.getPathEnd(iring);<NEW_LINE>Point2D q = polygon.getXY(high_point_index);<NEW_LINE>Point2D p, r;<N...
r = polygon.getXY(path_start);
331,761
private Set<Artifact> resolveArtifact(Artifact artifact, MavenParameters mavenParameters, PluginParameters pluginParameters, ConfigurationVersion configurationVersion) throws MojoFailureException {<NEW_LINE>notNull(mavenParameters.getLocalRepository(), "Maven parameter localRepository should be provided by maven contai...
exception.getMessage(), exception);
307,747
private Mono<Response<Flux<ByteBuffer>>> createWithResponseAsync(String resourceGroupName, String monitorName, LogzMonitorResourceInner body, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>retur...
error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
1,123,144
public static void horizontal3(Kernel1D_F32 kernel, GrayF32 image, GrayF32 dest) {<NEW_LINE>final float[] dataSrc = image.data;<NEW_LINE>final float[] dataDst = dest.data;<NEW_LINE>final float k1 = kernel.data[0];<NEW_LINE>final float k2 = kernel.data[1];<NEW_LINE>final float k3 = kernel.data[2];<NEW_LINE>final int rad...
int width = image.getWidth();
1,626,315
public Table build() {<NEW_LINE>List<ColumnVector> columns = new ArrayList<>(types.size());<NEW_LINE>try {<NEW_LINE>for (int i = 0; i < types.size(); i++) {<NEW_LINE>DataType dataType = types.get(i);<NEW_LINE><MASK><NEW_LINE>Object dataArray = typeErasedData.get(i);<NEW_LINE>if (dtype.isNestedType()) {<NEW_LINE>if (dty...
DType dtype = dataType.getType();
55,307
public void translate(final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions) throws InternalTranslationException {<NEW_LINE>TranslationHelpers.checkTranslationArguments(environment, instruction, instructions, "crnand");<NEW_LINE>final IOperandTreeNode target...
)), bt, tmpVar1));
1,386,329
@Path("/runningqueries")<NEW_LINE>public Response listRunningQueries() {<NEW_LINE>try {<NEW_LINE>int queriesWaitingCount = m_queuingManager.getQueryWaitingCount();<NEW_LINE>ArrayList<Pair<String, QueryMetric>> runningQueries = m_queuingManager.getRunningQueries();<NEW_LINE>JsonArray queryInfo = new JsonArray();<NEW_LIN...
"query JSON", queryMetric.getJsonObj());
1,262,324
final CreateNodeFromTemplateJobResult executeCreateNodeFromTemplateJob(CreateNodeFromTemplateJobRequest createNodeFromTemplateJobRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createNodeFromTemplateJobRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequest...
addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateNodeFromTemplateJob");
1,581,028
public void marshall(Trail trail, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (trail == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(trail.getName(), NAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(...
trail.getKmsKeyId(), KMSKEYID_BINDING);
481,594
private void initComponents() {<NEW_LINE>// GEN-BEGIN:initComponents<NEW_LINE>java.awt.GridBagConstraints gridBagConstraints;<NEW_LINE>jLabel1 = new javax.swing.JLabel();<NEW_LINE>folderPanel = new javax.swing.JPanel();<NEW_LINE>setLayout(new java.awt.GridBagLayout());<NEW_LINE>getAccessibleContext().setAccessibleDescr...
= java.awt.GridBagConstraints.REMAINDER;
686,921
public // }<NEW_LINE>GanttExportSettings createExportSettings() {<NEW_LINE>GanttExportSettings result = new GanttExportSettings();<NEW_LINE>if (myRootPreferences != null) {<NEW_LINE>String exportRange = myRootPreferences.get("exportRange", null);<NEW_LINE>if (exportRange == null) {<NEW_LINE>result.setStartDate(myExport...
rangeBounds = exportRange.split(" ");
254,649
private void action_loadBOM() {<NEW_LINE>// m_frame.setBusy(true);<NEW_LINE>m_frame.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));<NEW_LINE>reload = false;<NEW_LINE>int M_Product_ID = getM_Product_ID();<NEW_LINE>if (M_Product_ID == 0)<NEW_LINE>return;<NEW_LINE>MProduct M_Product = MProduct.get(getCtx(), M_P...
(M_Product.isActive()));
526,216
private void checkCallDestroyed(long chatId, long callId, int endCallReason, boolean isIgnored) {<NEW_LINE>getChatManagement().setOpeningMeetingLink(chatId, false);<NEW_LINE>if (shouldNotify(this)) {<NEW_LINE>toSystemSettingNotification(this);<NEW_LINE>}<NEW_LINE>if (wakeLock != null && wakeLock.isHeld()) {<NEW_LINE>wa...
notificationBuilder.showMissedCallNotification(chatId, callId);
291,373
public void onReceive(final Context context, Intent intent) {<NEW_LINE>if (null == context || null == intent)<NEW_LINE>return;<NEW_LINE>final Long id = intent.getLongExtra(KEXTRA_ID, 0);<NEW_LINE>final Integer pid = intent.getIntExtra(KEXTRA_PID, 0);<NEW_LINE>if (0 == id || 0 == pid)<NEW_LINE>return;<NEW_LINE>if (pid !...
] next = it.next();
491,553
public Object doGetDataFromControllerByName(String name) {<NEW_LINE>Controller controller = JbootControllerContext.get();<NEW_LINE>if (name.contains(".")) {<NEW_LINE>String[] modelAndAttr = name.split("\\.");<NEW_LINE>String modelName = modelAndAttr[0];<NEW_LINE>String attr = modelAndAttr[1];<NEW_LINE>Object object = c...
+ StrKit.firstCharToUpperCase(attr));
1,190,384
public int compare(final LoadedRow x, final LoadedRow y) {<NEW_LINE>for (final SortedField t : this.sort.getSortOrder()) {<NEW_LINE>final int index = t.getIndex();<NEW_LINE>final String xStr = x.getData()[index];<NEW_LINE>final String yStr = <MASK><NEW_LINE>switch(t.getSortType()) {<NEW_LINE>case SortDecimal:<NEW_LINE>...
y.getData()[index];
1,571,815
public boolean isValidForSlot(Slot s, ItemStack is) {<NEW_LINE>final ItemStack top = getHost().getInternalInventory().getStackInSlot(0);<NEW_LINE>final ItemStack bot = getHost().getInternalInventory().getStackInSlot(1);<NEW_LINE>if (s == this.middle) {<NEW_LINE>ItemDefinition<MASK><NEW_LINE>if (press.isSameAs(top) || p...
<?> press = AEItems.NAME_PRESS;
362,152
public com.tencent.mars.sample.chat.proto.Messagepush.MessagePush buildPartial() {<NEW_LINE>com.tencent.mars.sample.chat.proto.Messagepush.MessagePush result = new com.tencent.mars.sample.chat.<MASK><NEW_LINE>int from_bitField0_ = bitField0_;<NEW_LINE>int to_bitField0_ = 0;<NEW_LINE>if (((from_bitField0_ & 0x00000001) ...
proto.Messagepush.MessagePush(this);
197,449
final DescribeDimensionResult executeDescribeDimension(DescribeDimensionRequest describeDimensionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeDimensionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.st...
HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
253,986
public String format(long timestamp) {<NEW_LINE>// If the format is unknown, use the default formatter.<NEW_LINE>if (invalidFormat) {<NEW_LINE>return formatter.format(timestamp);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>long delta = timestamp - refTimestamp;<NEW_LINE>sb.setLength(0);<NEW_LINE>// If we need to reformat<NEW_LI...
, position.getEndIndex()));
1,845,908
private void validate(String name, Map<String, Object> parsed, Map<String, ConfigValue> configs) {<NEW_LINE>if (!_configKeys.containsKey(name)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ConfigKey key = _configKeys.get(name);<NEW_LINE>ConfigValue value = configs.get(name);<NEW_LINE>if (key._recommender != null) {<NEW_LINE>...
= new HashSet<>(originalRecommendedValues);
302,821
final ListRuleNamesByTargetResult executeListRuleNamesByTarget(ListRuleNamesByTargetRequest listRuleNamesByTargetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listRuleNamesByTargetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>...
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
658,455
public static FeedbackResponseCommentAttributes valueOf(FeedbackResponseComment comment) {<NEW_LINE>FeedbackResponseCommentAttributes frca = new FeedbackResponseCommentAttributes();<NEW_LINE>frca.courseId = comment.getCourseId();<NEW_LINE>frca.feedbackSessionName = comment.getFeedbackSessionName();<NEW_LINE>frca.commen...
.lastEditorEmail = frca.getCommentGiver();
1,682,018
public List<byte[]> sendBatch(String streamName, List<byte[]> data) {<NEW_LINE>if (data == null || data.isEmpty()) {<NEW_LINE>return Collections.emptyList();<NEW_LINE>}<NEW_LINE>final PutRecordsRequest request = new PutRecordsRequest();<NEW_LINE>request.setStreamName(streamName);<NEW_LINE>final List<PutRecordsRequestEn...
getRequestClientOptions().appendUserAgent(userAgent);
1,675,801
private void completeParseSingular(@NotNull final CommandSender sender, @NotNull @Unmodifiable final List<String> params, @NotNull final List<String> suggestions) {<NEW_LINE>if (params.size() <= 1) {<NEW_LINE>if (sender instanceof Player && (params.isEmpty() || "me".startsWith(params.get(0).toLowerCase(Locale.ROOT)))) ...
(cloud.getPlaceholders()));
1,327,773
public void tokenize(final SourceCode sourceCode, final Tokens tokenEntries) {<NEW_LINE>final AntlrTokenManager tokenManager = getLexerForSource(sourceCode);<NEW_LINE>tokenManager.setFileName(sourceCode.getFileName());<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>AntlrToken currentToken = tokenFilter.getNextToken();<NEW_LIN...
final AntlrTokenFilter tokenFilter = getTokenFilter(tokenManager);
1,049,946
public void ariseAlert(final int serverId, final AlertPack alert) {<NEW_LINE>ExUtil.exec(table, new Runnable() {<NEW_LINE><NEW_LINE>public void run() {<NEW_LINE>while (table.getItemCount() > 500) {<NEW_LINE>table.remove(table.getItemCount() - 1);<NEW_LINE>}<NEW_LINE>AlertData data = new AlertData(serverId, alert);<NEW_...
p.objHash, serverId) });
159,272
public Ddl scan() {<NEW_LINE>Ddl.Builder builder = Ddl.builder();<NEW_LINE>listDatabaseOptions(builder);<NEW_LINE>listTables(builder);<NEW_LINE>listViews(builder);<NEW_LINE>listColumns(builder);<NEW_LINE>listColumnOptions(builder);<NEW_LINE>Map<String, NavigableMap<String, Index.Builder>> indexes = Maps.newHashMap();<N...
), fkBuilder.referencedTable());
362,072
public static long[] queryRWICount(final MultiProtocolURL targetBaseURL, final Seed target, int timeout) {<NEW_LINE>// prepare request<NEW_LINE>final String salt = crypt.randomSalt();<NEW_LINE>// send request<NEW_LINE>try {<NEW_LINE>final Map<String, ContentBody> parts = basicRequestParts(Switchboard.getSwitchboard(), ...
, UTF8.StringBody("rwicount"));
130,524
final GetNotificationChannelResult executeGetNotificationChannel(GetNotificationChannelRequest getNotificationChannelRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getNotificationChannelRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_...
(super.beforeMarshalling(getNotificationChannelRequest));
183,748
public static StatViewAdditionalPropsForge make(ExprNode[] validated, int startIndex, EventType parentEventType, ViewForgeEnv viewForgeEnv) {<NEW_LINE>if (validated.length <= startIndex) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>List<String> additionalProps = new ArrayList<>();<NEW_LINE>List<ExprNode> lastValueForges...
addPropsArr, valueExprArr, typeArr, additionalForges);
1,606,750
private boolean isMockTcpPortIsInRange(int port) {<NEW_LINE>boolean inRange = false;<NEW_LINE>if (StringUtils.isNotEmpty(this.tcpMockPorts)) {<NEW_LINE>try {<NEW_LINE>if (this.tcpMockPorts.contains("-")) {<NEW_LINE>String[] tcpMockPortArr = this.tcpMockPorts.split("-");<NEW_LINE>int num1 = Integer.parseInt(tcpMockPortA...
= num1 < num2 ? num2 : num1;
475,800
public Cursor handle(RelNode logicalPlan, ExecutionContext executionContext) {<NEW_LINE>LogicalDal logicalDal = (LogicalDal) logicalPlan;<NEW_LINE>SqlSetDefaultRole sqlNode = <MASK><NEW_LINE>PolarPrivManager manager = PolarPrivManager.getInstance();<NEW_LINE>List<PolarAccountInfo> toUsers = sqlNode.getUsers().stream()....
(SqlSetDefaultRole) logicalDal.getNativeSqlNode();
914,276
final DescribeJobResult executeDescribeJob(DescribeJobRequest describeJobRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeJobRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi...
UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
1,708,452
public void printWarning(int daysBeforeExpireWarning, String keyStoreName, String alias, X509Certificate cert) {<NEW_LINE>try {<NEW_LINE>long millisDelta = ((((daysBeforeExpireWarning * 24L) * 60L) * 60L) * 1000L);<NEW_LINE>long millisBeforeExpiration = cert.getNotAfter().getTime() - System.currentTimeMillis();<NEW_LIN...
getName(), "printWarning", this);
1,099,129
private Component createStatusBar() {<NEW_LINE>// stateLabel<NEW_LINE>callStatusLabel.setForeground(Color.WHITE);<NEW_LINE>dtmfLabel.setForeground(Color.WHITE);<NEW_LINE>callStatusLabel.setText(callPeer.getState().getLocalizedStateString());<NEW_LINE>PeerStatusPanel statusPanel = new PeerStatusPanel(new GridBagLayout()...
statusPanel.add(securityStatusLabel, constraints);
552,056
public static Map<Object, Object> createBrokerProps() {<NEW_LINE>Map<Object, Object> props = new HashMap<>();<NEW_LINE>props.put("metric.reporters", CruiseControlMetricsReporter.class.getName());<NEW_LINE>StringJoiner csvJoiner = new StringJoiner(",");<NEW_LINE>csvJoiner.add(SecurityProtocol.PLAINTEXT.name + "://localh...
put(CruiseControlMetricsReporterConfig.CRUISE_CONTROL_METRICS_TOPIC_NUM_PARTITIONS_CONFIG, "1");
1,436,161
public void addUsage(Content content, HostAddress hostAddress) throws TskCoreException {<NEW_LINE>String key = content.getDataSource().getId() + "#" + hostAddress.getId() + "#" + content.getId();<NEW_LINE>Boolean cachedValue = hostAddressUsageCache.getIfPresent(key);<NEW_LINE>if (null != cachedValue) {<NEW_LINE>return;...
connection.executeUpdate(s, insertSQL);
69,051
public CreateBillingGroupResult createBillingGroup(CreateBillingGroupRequest createBillingGroupRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createBillingGroupRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.g...
CreateBillingGroupRequestMarshaller().marshall(createBillingGroupRequest);
976,393
public void prepare(Map<String, Object> conf, TopologyContext context, OutputCollector collector) {<NEW_LINE>String mdF = ConfUtils.getString(conf, metadataFilterParamName);<NEW_LINE>if (StringUtils.isNotBlank(mdF)) {<NEW_LINE>// split it in key value<NEW_LINE>int equals = mdF.indexOf('=');<NEW_LINE>if (equals != -1) {...
(conf, textLengthParamName, -1);
1,022,555
public AckArgs deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException {<NEW_LINE>List<Object> args = new ArrayList<Object>();<NEW_LINE><MASK><NEW_LINE>ObjectMapper mapper = (ObjectMapper) jp.getCodec();<NEW_LINE>JsonNode root = mapper.readTree(jp);<NEW_LINE>AckCallback<?> ca...
AckArgs result = new AckArgs(args);
680,271
public void finish() {<NEW_LINE>wizard.completed = true;<NEW_LINE>int upLimit = wizard.getUploadLimit();<NEW_LINE>if (upLimit > 0) {<NEW_LINE>COConfigurationManager.setParameter(TransferSpeedValidator.AUTO_UPLOAD_ENABLED_CONFIGKEY, false);<NEW_LINE>COConfigurationManager.setParameter(TransferSpeedValidator.AUTO_UPLOAD_...
setParameter("TCP.Listen.Port", wizard.serverTCPListenPort);
1,500,585
public static void main(String[] args) throws Throwable {<NEW_LINE>logger.info("JSweet candy scaffold tool - version: " + JSweetDefTranslatorConfig.getVersionNumber());<NEW_LINE>JSAP jsapSpec = defineArgs();<NEW_LINE>JSAPResult jsapArgs = parseArgs(jsapSpec, args);<NEW_LINE>if (!jsapArgs.success() || jsapArgs.getBoolea...
(jsapArgs.getString("coreVersion"));
596,018
private URLConnection connection(String name, boolean cacheMetadata) throws IOException {<NEW_LINE>LOG.log(Level.FINE, "metadata in {0}: {1}", new Object[] { baseURL, name });<NEW_LINE>URLConnection conn = new ConnectionBuilder().job(job).url(new URL(baseURL, Utilities.uriEncode(name))).timeout(TIMEOUT).connection();<N...
int contentLength = conn.getContentLength();
426,572
private void paintInstanceClassic(InstancePainter painter) {<NEW_LINE>final var g = painter.getGraphics();<NEW_LINE>final var bds = painter.getBounds();<NEW_LINE>final var state = (StateData) painter.getData();<NEW_LINE>final var widthVal = painter.getAttributeValue(StdAttr.WIDTH);<NEW_LINE>final var width = widthVal =...
.getAttributeValue(StdAttr.LABEL_COLOR));
523,408
public static void main(String[] args) {<NEW_LINE>// Sequence of input pairs to produce a tree of height 4:<NEW_LINE>// 0 1<NEW_LINE>// 0 2<NEW_LINE>// 0 3<NEW_LINE>// 6 7<NEW_LINE>// 8 9<NEW_LINE>// 6 8<NEW_LINE>// 0 6<NEW_LINE>// 10 11<NEW_LINE>// 10 12<NEW_LINE>// 10 13<NEW_LINE>// 10 14<NEW_LINE>// 10 15<NEW_LINE>/...
weightedQuickUnionPathCompression.union(6, 8);
154,703
//<NEW_LINE>private void showRequestValues(HttpServletRequest servletRequest, HttpServletResponse servletResponse, PrintWriter responseWriter) {<NEW_LINE>Enumeration<String> headerNames = servletRequest.getHeaderNames();<NEW_LINE>while (headerNames.hasMoreElements()) {<NEW_LINE>String headerName = headerNames.nextEleme...
> parameterNames = servletRequest.getParameterNames();
1,050,329
private static boolean insertPreHeader(MethodNode mth, LoopInfo loop) {<NEW_LINE>BlockNode start = loop.getStart();<NEW_LINE>List<BlockNode> preds = start.getPredecessors();<NEW_LINE>// don't count back edge<NEW_LINE>int predsCount = preds.size() - 1;<NEW_LINE>if (predsCount == 1) {<NEW_LINE>return false;<NEW_LINE>}<NE...
replaceConnection(pred, start, preHeader);
99,477
private boolean isReachable(int timeOut) {<NEW_LINE>boolean reachable = false;<NEW_LINE>Socket socket = new Socket();<NEW_LINE>try {<NEW_LINE>System.out.println("before socketAddress...host=" + host + " AND port" + port);<NEW_LINE>SocketAddress socketAddress = new InetSocketAddress(host, port);<NEW_LINE>s = System.cur...
(int) (f - s);
1,634,294
final GetParametersByPathResult executeGetParametersByPath(GetParametersByPathRequest getParametersByPathRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getParametersByPathRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetParamet...
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
1,636,304
protected void paintIcon(Graphics2D g2) {<NEW_LINE>g2.setColor(Color.BLUE.<MASK><NEW_LINE>final int[] xpos = { 0, scale(6), scale(4), scale(2) };<NEW_LINE>final int[] ypos = { scale(13), scale(13), scale(15), scale(15) };<NEW_LINE>g2.fillPolygon(xpos, ypos, 4);<NEW_LINE>for (var i = 0; i < 4; i++) {<NEW_LINE>xpos[i] +=...
darker().darker());
90,393
// Initialize a BundleData from a resource quota and configurations and modify the quota accordingly.<NEW_LINE>private BundleData initializeBundleData(final ResourceQuota quota, final ShellArguments arguments) {<NEW_LINE>final double messageRate = (quota.getMsgRateIn() + quota.getMsgRateOut()) / 2;<NEW_LINE>final int m...
.msgThroughputIn = quota.getBandwidthIn();
1,607,808
public ProcessorConfiguration unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ProcessorConfiguration processorConfiguration = new ProcessorConfiguration();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>i...
JsonToken token = context.getCurrentToken();
282,640
private boolean doDatabaseUpdate() {<NEW_LINE>ArrayList<ContentProviderOperation> batch = new ArrayList<>(addToTheseLists.size() + removeFromTheseLists.size());<NEW_LINE>for (String listId : addToTheseLists) {<NEW_LINE>String listItemId = SeriesGuideContract.ListItems.generateListItemId(itemStableId, itemType, listId);...
applyInSmallBatches(getContext(), batch);
979,613
/* (non-Javadoc)<NEW_LINE>* @see com.kkalice.adempiere.migrate.DBObjectInterface#loadContents(java.util.HashMap, com.kkalice.adempiere.migrate.MigrateLogger, com.kkalice.adempiere.migrate.MigrateDBEngine, com.kkalice.adempiere.migrate.DBConnection, java.lang.String)<NEW_LINE>*/<NEW_LINE>public void loadContents(HashMap...
parent.getResultSetString(rs, "VIEW_NAME");
134,310
final DescribePublicIpv4PoolsResult executeDescribePublicIpv4Pools(DescribePublicIpv4PoolsRequest describePublicIpv4PoolsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describePublicIpv4PoolsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();...
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
408,390
public static void codeableConcepts() {<NEW_LINE>// START SNIPPET: codeableConcepts<NEW_LINE>Patient patient = new Patient();<NEW_LINE>// Coded types can naturally be set using plain strings<NEW_LINE>Coding statusCoding = patient<MASK><NEW_LINE>statusCoding.setSystem("http://hl7.org/fhir/v3/MaritalStatus");<NEW_LINE>st...
.getMaritalStatus().addCoding();
114,434
final TagResourceResult executeTagResource(TagResourceRequest tagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(tagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi...
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
326,724
private void putPlotInFirstFreeMatrixSpace(DrawHandler drawer, PlotState plotState) {<NEW_LINE>// Go through all lines and all values in each line<NEW_LINE>for (int ySeq = 0; ySeq < matrix.rows(); ySeq++) {<NEW_LINE>List<List<AbstractPlot>> oneLine = matrix.row(ySeq);<NEW_LINE>for (int xSeq = 0; xSeq < oneLine.size(); ...
, xSeq, ySeq, "no coordinate specified -> free space found"));
1,809,323
public void preVisit(ExploreNode exploreNode) {<NEW_LINE>if (skipNode(exploreNode)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final ExploreNode parent = stack.peek();<NEW_LINE>if (exploreNode == this.rootModule) {<NEW_LINE>assert parent == null;<NEW_LINE><MASK><NEW_LINE>this.writer.append(Integer.toString(mn.hashCode()));...
final ModuleNode mn = (ModuleNode) exploreNode;
890,848
private void checkAssignment(Varnode output, Varnode value, PcodeOp op, TaskMonitor monitor) throws CancelledException {<NEW_LINE>Varnode[] inputs = op.getInputs();<NEW_LINE>int opcode = op.getOpcode();<NEW_LINE>if (output != null && !output.isUnique() && opcode != PcodeOp.LOAD && opcode != PcodeOp.STORE && opcode != P...
"SET: " + output + " = " + value);
1,049,567
public void write(org.apache.thrift.protocol.TProtocol prot, grayUpgrade_args struct) throws org.apache.thrift.TException {<NEW_LINE>TTupleProtocol oprot = (TTupleProtocol) prot;<NEW_LINE>BitSet optionals = new BitSet();<NEW_LINE>if (struct.is_set_topologyName()) {<NEW_LINE>optionals.set(0);<NEW_LINE>}<NEW_LINE>if (str...
struct.workers.size());
1,276,228
public int compareTo(getBlobReplication_result other) {<NEW_LINE>if (!getClass().equals(other.getClass())) {<NEW_LINE>return getClass().getName().compareTo(other.getClass().getName());<NEW_LINE>}<NEW_LINE>int lastComparison = 0;<NEW_LINE>lastComparison = Boolean.valueOf(is_set_success()).compareTo(other.is_set_success(...
this.success, other.success);
770,672
private Map<String, List<String>> processAllowedCodes(RuntimeResourceDefinition theResDef, List<AllowedCodeInValueSet> theAllowedCodeInValueSet) {<NEW_LINE>Map<String, <MASK><NEW_LINE>for (AllowedCodeInValueSet next : theAllowedCodeInValueSet) {<NEW_LINE>String resourceName = next.getResourceName();<NEW_LINE>String val...
List<String>> retVal = null;
1,010,353
public List<T> query(String filter, String sortBy, boolean ascending, String zoneId) {<NEW_LINE>validateOrderBy(queryConverter.map(sortBy));<NEW_LINE>SearchQueryConverter.ProcessedFilter where = queryConverter.convert(filter, sortBy, ascending, zoneId);<NEW_LINE>logger.debug("Filtering groups with SQL: " + where);<NEW_...
"Filter '" + filter + "' generated invalid SQL", e);