idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
774,601
public void validateExistingType(EventType existingType, AvroSchemaEventType proposedType) {<NEW_LINE>if (!(existingType instanceof AvroSchemaEventType)) {<NEW_LINE>throw new EventAdapterException("Type by name '" + proposedType.getName() + "' is not a compatible type " + "(target type underlying is '" + existingType.g...
+ AvroSchemaUtil.toSchemaStringSafe(proposed));
1,054,361
public void onUpdate(double tpf) {<NEW_LINE>// we need to apply table friction manually since the ball is effectively moving in 3D<NEW_LINE>// but the physics engine only knows about 2 dimensions<NEW_LINE>double frictionPerFrame = TABLE_FRICTION * tpf;<NEW_LINE>var vx = p.getVelocityX();<NEW_LINE>var vy = p.getVelocity...
getBody().setAngularVelocity(0);
262,210
public void run() {<NEW_LINE>final long vmSize = readVmSize();<NEW_LINE>if (vmSize < 0) {<NEW_LINE>MatrixLog.e(TAG, "Fail to read vss size, skip checking this time.");<NEW_LINE>mSampleHandler.postDelayed(this, mVmSizeSampleInterval);<NEW_LINE>} else {<NEW_LINE>// (vmsize / 4G > ratio) => (vmsize > ratio * 4G)<NEW_LINE>...
mSampleHandler.postDelayed(this, mVmSizeSampleInterval);
26,579
final DescribeEnvironmentsResult executeDescribeEnvironments(DescribeEnvironmentsRequest describeEnvironmentsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeEnvironmentsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe...
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
150,142
public static void runSample() {<NEW_LINE><MASK><NEW_LINE>System.out.println(" Starting Cosmos Sample");<NEW_LINE>System.out.println("================================================================");<NEW_LINE>if (AZURE_COSMOS_ENDPOINT == null || AZURE_COSMOS_ENDPOINT.isEmpty()) {<NEW_LINE>System.err.println("azure_co...
System.out.println("\n================================================================");
1,202,493
private void addResourceRequest(Priority priority, String resourceName, Resource capability) {<NEW_LINE>Map<String, Map<Resource, ResourceRequest>> remoteRequests = this.remoteRequestsTable.get(priority);<NEW_LINE>if (remoteRequests == null) {<NEW_LINE>remoteRequests = new HashMap<String, Map<Resource, ResourceRequest>...
remoteRequests.put(resourceName, reqMap);
810,910
private void initData(LinkedBlockingDeque<TaskProfile> taskHistory) {<NEW_LINE>StatisticsAdapter.TableCell[] titles = new StatisticsAdapter.TableCell[5];<NEW_LINE>int width = getActivity().getWindowManager().getDefaultDisplay().getWidth() / titles.length;<NEW_LINE>for (int i = 0; i < titles.length; i++) {<NEW_LINE>titl...
new StatisticsAdapter.TableRow(titles));
1,200,025
public static DescribeGeoipInstanceDataInfosResponse unmarshall(DescribeGeoipInstanceDataInfosResponse describeGeoipInstanceDataInfosResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeGeoipInstanceDataInfosResponse.setRequestId<MASK><NEW_LINE>List<DataInfo> dataInfos = new ArrayList<DataInfo>();<NEW_LINE>for (int i...
(_ctx.stringValue("DescribeGeoipInstanceDataInfosResponse.RequestId"));
935,501
protected boolean processSysEvent(DispatcherState curState, DbusEvent event) {<NEW_LINE>boolean success = true;<NEW_LINE>boolean debugEnabled <MASK><NEW_LINE>Checkpoint ckptInEvent = null;<NEW_LINE>int eventSrcId = event.getSourceId();<NEW_LINE>if (event.isCheckpointMessage()) {<NEW_LINE>ByteBuffer eventValue = event.v...
= getLog().isDebugEnabled();
425,994
public void tableChanged(TableModelEvent e) {<NEW_LINE>if (e.getColumn() != 0)<NEW_LINE>return;<NEW_LINE>log.config("Row=" + e.getFirstRow() + "-" + e.getLastRow() + ", Col=" + e.getColumn() + ", Type=" + e.getType());<NEW_LINE>boolean isUpdate = (e.getType() == TableModelEvent.UPDATE);<NEW_LINE>int row = e.getFirstRow...
int matchedRow = matchedPaymentTable.getSelectedRow();
1,000,114
public void addDebugTask(String qid, List<String> docIds, JsonNode jsonQuery) {<NEW_LINE>if (debugTasks.containsKey(qid))<NEW_LINE>throw new IllegalArgumentException("existed qid");<NEW_LINE>debugTasks.put(qid, pool.submit(() -> {<NEW_LINE>List<FeatureExtractor> localExtractors = new ArrayList<>();<NEW_LINE>for (Featur...
features = new ArrayList<>();
1,498,193
private void writeColorParams(Canvas canvas) {<NEW_LINE>if (mHSVenabled) {<NEW_LINE>canvas.drawText("H: " + (int) (mHSV[0] / 360.0f * 255), TEXT_HSV_POS[0], TEXT_HSV_POS[1] + mTextSizePx, mText);<NEW_LINE>canvas.drawText("S: " + (int) (mHSV[1] * 255), TEXT_HSV_POS[0], TEXT_HSV_POS[1<MASK><NEW_LINE>canvas.drawText("V: "...
] + mTextSizePx * 2, mText);
921,531
public static void takeSignature(IMethodResult result, String imgFormat, Bitmap bitmap, String filePath, int penColor, int bgColor) {<NEW_LINE>Logger.D(TAG, "takeSignature+");<NEW_LINE>try {<NEW_LINE>String outputFilePath;<NEW_LINE>if (imgFormat.equals("jpg")) {<NEW_LINE>outputFilePath = saveJpg(bitmap, filePath);<NEW_...
result.setError("IOException: " + ex);
1,471,922
public double g(double[] w, double[] g) {<NEW_LINE>double f = IntStream.range(0, partitions).parallel().mapToDouble(r -> {<NEW_LINE>double<MASK><NEW_LINE>Arrays.fill(gradient, 0.0);<NEW_LINE>int begin = r * partitionSize;<NEW_LINE>int end = (r + 1) * partitionSize;<NEW_LINE>if (end > x.length)<NEW_LINE>end = x.length;<...
[] gradient = gradients[r];
1,599,968
public void testVariance(double[] x) {<NEW_LINE>int[] batchSizes = { 10, 20, 35, 50, 75, 150, 300, 500, 750, 1000, 5000, 10000 };<NEW_LINE>double[] varResult;<NEW_LINE>PrintWriter file = null;<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>file = new PrintWriter(new FileOutputStream("var.out"), true);<NEW_LINE>} catch (IOExce...
NumberFormat nf = new DecimalFormat("0.000E0");
1,732,220
public void onNext(Notification<T> args) {<NEW_LINE>synchronized (gate) {<NEW_LINE>if (!DisposableHelper.isDisposed(get())) {<NEW_LINE>if (args.isOnError()) {<NEW_LINE>try {<NEW_LINE>onError.<MASK><NEW_LINE>} catch (Throwable ex) {<NEW_LINE>Exceptions.throwIfFatal(ex);<NEW_LINE>RxJavaPlugins.onError(new CompositeExcept...
accept(args.getError());
1,821,823
public List<Node> querySelectorAll(Node node, String selector) {<NEW_LINE>List<Node<MASK><NEW_LINE>JSONObject params = new JSONObject();<NEW_LINE>// NOI18N<NEW_LINE>params.put("nodeId", node.getNodeId());<NEW_LINE>// NOI18N<NEW_LINE>params.put("selector", selector);<NEW_LINE>// NOI18N<NEW_LINE>Response response = trans...
> list = Collections.emptyList();
178,691
private void resizeWizard(Window parentWindow, Dimension prevSize) {<NEW_LINE>assert SwingUtilities.isEventDispatchThread() : "getComponent() must be called in EQ only.";<NEW_LINE>Dimension curSize = data.getIterator(this).current().getComponent().getPreferredSize();<NEW_LINE>// only enlarge if needed, don't shrink<NEW...
min(screenBounds.height, newHeight);
238,704
public void generateStart(OptimizedTagContext context) {<NEW_LINE>// PK65013 - start<NEW_LINE>String pageContextVar = Constants.JSP_PAGE_CONTEXT_ORIG;<NEW_LINE>JspOptions jspOptions = context.getJspOptions();<NEW_LINE>if (jspOptions != null) {<NEW_LINE>if (context.isTagFile() && jspOptions.isModifyPageContextVariable()...
end + "; " + index + "++) {");
188,703
public static SecurityScheme createInstance(AnnotationModel annotation, ApiContext context) {<NEW_LINE>SecuritySchemeImpl from = new SecuritySchemeImpl();<NEW_LINE>EnumModel type = annotation.getValue("type", EnumModel.class);<NEW_LINE>if (type != null) {<NEW_LINE>from.setType(SecurityScheme.Type.valueOf(type.getValue(...
("scheme", String.class));
291,727
private static int processRequest(List<String> args) throws Exception {<NEW_LINE>OptionsParser optionsParser = OptionsParser.builder().optionsClasses(Options.class).allowResidue(true).argsPreProcessor(new ShellQuotedParamsFilePreProcessor(FileSystems.getDefault())).build();<NEW_LINE>Options options;<NEW_LINE>try {<NEW_...
optionsParser.getOptions(Options.class);
1,454,864
public VoidResponse unmapValidValues(String serverName, String userId, String validValue1GUID, String validValue2GUID, NullRequestBody requestBody) {<NEW_LINE>final String methodName = "unmapValidValues";<NEW_LINE>RESTCallToken token = restCallLogger.<MASK><NEW_LINE>VoidResponse response = new VoidResponse();<NEW_LINE>...
logRESTCall(serverName, userId, methodName);
296,654
public void handle(String method, String path, HashMap<String, String> headers, Map<String, String> queries, InputStream input, EmbedHttpServer.ResponseOutputStream response) throws Exception {<NEW_LINE>String lastSync = queries.get("lastSync");<NEW_LINE>FreelineCore.saveLastDynamicSyncId(Long.parseLong(lastSync));<NEW...
Log.i(TAG, "with dex changes, need to restart the process (activity stack will be reserved)");
1,032,984
public UpdateDatasetResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>UpdateDatasetResult updateDatasetResult = new UpdateDatasetResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDep...
class).unmarshall(context));
1,749,830
final EnableAWSOrganizationsAccessResult executeEnableAWSOrganizationsAccess(EnableAWSOrganizationsAccessRequest enableAWSOrganizationsAccessRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(enableAWSOrganizationsAccessRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContex...
invoke(request, responseHandler, executionContext);
1,504,472
private void handle(final RecoverVmInstanceMsg msg) {<NEW_LINE>thdf.chainSubmit(new ChainTask(msg) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public String getSyncSignature() {<NEW_LINE>return syncThreadName;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run(final SyncTaskChain chain) {<NEW_LINE>final Recov...
getState(), SysErrors.OPERATION_ERROR);
92,644
public void paintObjectGroup(Graphics2D g, ObjectGroup group) {<NEW_LINE>// NOTE: Direct copy from OrthoMapView (candidate for generalization)<NEW_LINE>for (MapObject mo : group) {<NEW_LINE>double ox = mo.getX();<NEW_LINE>double oy = mo.getY();<NEW_LINE>if (mo.getWidth() == 0 || mo.getHeight() == 0) {<NEW_LINE>g.setRen...
getHeight().intValue());
365,884
public RecordFieldWithDefaultValueNode transform(RecordFieldWithDefaultValueNode recordField) {<NEW_LINE>MetadataNode metadata = formatNode(recordField.metadata().orElse(null), 0, 1);<NEW_LINE>Token readonlyKeyword = formatNode(recordField.readonlyKeyword().orElse(null), 1, 0);<NEW_LINE>Node typeName = formatNode(recor...
expression(), 0, 0);
73,345
public static org.springframework.integration.context.IntegrationProperties integrationGlobalProperties(IntegrationProperties properties) {<NEW_LINE>org.springframework.integration.context.IntegrationProperties integrationProperties = new org.springframework.integration.context.IntegrationProperties();<NEW_LINE>Propert...
).to(integrationProperties::setErrorChannelRequireSubscribers);
1,127,737
public void enterSy_authentication_order(Sy_authentication_orderContext ctx) {<NEW_LINE>if (_currentLine != null) {<NEW_LINE>// in system services/ports hierarchy<NEW_LINE>_currentAuthenticationOrder = _currentLine.getAaaAuthenticationLoginList();<NEW_LINE>if (_currentAuthenticationOrder == null || _currentAuthenticati...
getJf().setSystemAuthenticationOrder(_currentAuthenticationOrder);
1,489,298
public boolean onTouchEvent(MotionEvent event) {<NEW_LINE>if (!isEnabled()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>switch(event.getAction()) {<NEW_LINE>case MotionEvent.ACTION_DOWN:<NEW_LINE>setSelected(true);<NEW_LINE>setPressed(true);<NEW_LINE>if (changeListener != null) {<NEW_LINE>changeListener.onStartTrackin...
getHeight(), 0, 0);
322,521
private ByteBuffer toByteArray(BufferedImage image, int width, int height, int bpp, int targetBpp) throws IOException {<NEW_LINE><MASK><NEW_LINE>ByteBuffer buffer = ByteBuffer.allocateDirect(dataSize);<NEW_LINE>int[] rasterData = new int[width * height * 4];<NEW_LINE>image.getRaster().getPixels(0, 0, width, height, ras...
int dataSize = width * height * bpp;
1,140,071
private void exportEvent(final LoggedEvent event) {<NEW_LINE>final ActorFuture<Boolean> wrapRetryFuture = recordWrapStrategy.runWithRetry(() -> {<NEW_LINE>recordExporter.wrap(event);<NEW_LINE>return true;<NEW_LINE>}, this::isClosed);<NEW_LINE>actor.runOnCompletion(wrapRetryFuture, (b, t) -> {<NEW_LINE>assert t == null ...
error(ERROR_MESSAGE_EXPORTING_ABORTED, event, throwable);
494,239
public void onClick(int position) {<NEW_LINE>if (MultiClickGuard.allowClick(getClass().getName())) {<NEW_LINE>switch(position) {<NEW_LINE>case 0:<NEW_LINE><MASK><NEW_LINE>break;<NEW_LINE>case 1:<NEW_LINE>forumTabHelper.openWebPageInCustomTab(this, forumUri);<NEW_LINE>break;<NEW_LINE>case 2:<NEW_LINE>Intent shareIntent ...
websiteTabHelper.openWebPageInCustomTab(this, websiteUri);
1,745,875
public void generateMultiSupplierInvoice(ActionRequest request, ActionResponse response) {<NEW_LINE>try {<NEW_LINE>List<Map> stockMoveMap = (List<Map>) request.getContext().get("supplierStockMoveToInvoice");<NEW_LINE>List<Long> stockMoveIdList = new ArrayList<>();<NEW_LINE>List<StockMove> stockMoveList = new ArrayList<...
viewBuilder = ActionView.define("Suppl. Invoices");
950,146
private void updateSelectedContent() {<NEW_LINE>TableRowCore[] rows = tv_subs_results.getSelectedRows();<NEW_LINE>ArrayList<ISelectedContent> valid = new ArrayList<>();<NEW_LINE>last_selected_content.clear();<NEW_LINE>for (int i = 0; i < rows.length; i++) {<NEW_LINE>SBC_SearchResult rc = (SBC_SearchResult) rows[i].getD...
DownloadUrlInfo(getDownloadURI(rc)));
697,678
public void write(org.apache.thrift.protocol.TProtocol prot, unloadTablet_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 (struct.isSe...
oprot.writeBitSet(optionals, 6);
1,739,518
public static void main(String[] args) throws Exception {<NEW_LINE>final String fileNameInit = "/tmp/log-1.hpl";<NEW_LINE>final String fileNameUpd = "/tmp/log-2.hpl";<NEW_LINE>final int samplingIntervalInit = 41;<NEW_LINE>final int samplingIntervalUpd = 333;<NEW_LINE>final int maxFramesToCaptureInit = 42;<NEW_LINE>fina...
Agent.getSamplingIntervalMax(), "update max sampling interval when profiler is running");
1,384,695
static void findFieldsForComponents(JavaComponentInfo ci) {<NEW_LINE>// Components by UID:<NEW_LINE>int n = countComponents(ci);<NEW_LINE>long[] uids = new long[n];<NEW_LINE>JavaComponentInfo[] components = new JavaComponentInfo[n];<NEW_LINE><MASK><NEW_LINE>Arrays.sort(components, new JavaComponentInfoUIDComparator());...
fillComponents(ci, components, 0);
1,270,567
public static void startMethod(@Advice.This Query query, @Advice.Local("otelCallDepth") CallDepth callDepth, @Advice.Local("otelHibernateOperation") HibernateOperation hibernateOperation, @Advice.Local("otelContext") Context context, @Advice.Local("otelScope") Scope scope) {<NEW_LINE>callDepth = CallDepth.forClass(Hibe...
sessionInfo = criteriaVirtualField.get(query);
1,174,371
// TODO(malcon): Create a builder like LogCmd, etc.<NEW_LINE>ImmutableList<TreeElement> lsTree(GitRevision reference, @Nullable String treeish, boolean recursive, boolean fullName) throws RepoException {<NEW_LINE>ImmutableList.Builder<TreeElement> result = ImmutableList.builder();<NEW_LINE>List<String> args = Lists.new...
sha1 = matcher.group(3);
1,079,238
public static ListEventsResponse unmarshall(ListEventsResponse listEventsResponse, UnmarshallerContext context) {<NEW_LINE>listEventsResponse.setRequestId(context.stringValue("ListEventsResponse.RequestId"));<NEW_LINE>listEventsResponse.setCode(context.stringValue("ListEventsResponse.Code"));<NEW_LINE>listEventsRespons...
("ListEventsResponse.Events[" + i + "].Id"));
541,797
public static DropTableBuilder createBuilder(String schemaName, String logicalTableName, boolean ifExists, ExecutionContext executionContext) {<NEW_LINE>ReplaceTableNameWithQuestionMarkVisitor visitor = new ReplaceTableNameWithQuestionMarkVisitor(schemaName, executionContext);<NEW_LINE>SqlIdentifier logicalTableNameNod...
create(cluster, sqlDropTable, logicalTableNameNode);
370,200
public static KeyValuePart[] split(MatrixMeta matrixMeta, int rowId, int[] keys, IElement[] values, boolean isSorted) {<NEW_LINE>if (!isSorted) {<NEW_LINE>Sort.quickSort(keys, values, 0, keys.length - 1);<NEW_LINE>}<NEW_LINE>PartitionKey[<MASK><NEW_LINE>KeyValuePart[] dataParts = new KeyValuePart[matrixParts.length];<N...
] matrixParts = matrixMeta.getPartitionKeys();
1,550,601
protected void doHealthCheck(Health.Builder builder) throws Exception {<NEW_LINE>try {<NEW_LINE>this.lock.lock();<NEW_LINE>if (this.adminClient == null) {<NEW_LINE>this.adminClient = AdminClient.create(this.adminClientProperties);<NEW_LINE>}<NEW_LINE>final ListTopicsResult listTopicsResult = this.adminClient.listTopics...
invoke(kStream.state());
608,458
public Object calculate(Context ctx) {<NEW_LINE>if (param == null) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("ftp_cd" + mm.getMessage("function.missingParam"));<NEW_LINE>}<NEW_LINE>int size = param.getSubSize();<NEW_LINE>// if (size != 2) {<NEW_LINE>// MessageManager mm = Engine...
MessageManager mm = EngineMessage.get();
874,963
static void writeSystemInformation(@NonNull Application application, @NonNull FileWriter fw) throws IOException {<NEW_LINE>fw.write("Android version: " + Build.VERSION.SDK_INT + "\n");<NEW_LINE>fw.write("Device: " + Utils.getFullDeviceModel() + "\n");<NEW_LINE>fw.write("App version: " + BuildConfig.APPLICATION_ID + " "...
"Locale : " + Locale.getDefault());
183,677
private static List<Map<String, String>> loadWords(InputStream stream) {<NEW_LINE>List<Map<String, String>> list = new ArrayList<>();<NEW_LINE>try (InputStreamReader isr = new InputStreamReader(stream, FILE_ENCODING);<NEW_LINE>BufferedReader br = new BufferedReader(isr)) {<NEW_LINE>String line;<NEW_LINE>Tokenizer wordT...
tokens = wordTokenizer.tokenize(wrongForm);
663,932
public static int VROverlay_ShowKeyboard(@NativeType("EGamepadTextInputMode") int eInputMode, @NativeType("EGamepadTextInputLineMode") int eLineInputMode, @NativeType("uint32_t") int unFlags, @NativeType("char const *") CharSequence pchDescription, @NativeType("uint32_t") int unCharMax, @NativeType("char const *") Char...
long pchDescriptionEncoded = stack.getPointerAddress();
1,673,963
public static Message<byte[]> generateMessage(byte[] payload, MessageHeaders headers, Type inputType, JsonMapper objectMapper, @Nullable Context awsContext) {<NEW_LINE>if (logger.isInfoEnabled()) {<NEW_LINE>logger.info("Incoming JSON Event: " + new String(payload));<NEW_LINE>}<NEW_LINE>if (FunctionTypeUtils.isMessage(i...
) request).remove("headers");
1,391,491
private void okPressed() {<NEW_LINE>Date notBefore = jdtNotBefore.getDateTime();<NEW_LINE>Date notAfter = jdtNotAfter.getDateTime();<NEW_LINE>if ((notBefore == null) && (notAfter == null)) {<NEW_LINE>JOptionPane.showMessageDialog(this, res.getString("DPrivateKeyUsagePeriod.ValueReq.message"), getTitle(), JOptionPane.WA...
DERGeneralizedTime notBeforeGenTime = new DERGeneralizedTime(notBefore);
155,382
public void marshall(PutEventTypeRequest putEventTypeRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (putEventTypeRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(putEventTypeRequest.getName...
e.getMessage(), e);
368,032
public static long sizeStringToBytes(String str) {<NEW_LINE>String numStr = str.substring(0, str.length() - 1);<NEW_LINE>String suffix = str.substring(str.length() - 1);<NEW_LINE>if (!validSuffix.contains(suffix)) {<NEW_LINE>return Long.parseLong(str);<NEW_LINE>}<NEW_LINE>long <MASK><NEW_LINE>if (suffix.equals(T_SUFFIX...
size = Long.parseLong(numStr);
287,995
private void printInputData() {<NEW_LINE>System.out.println("nbHouses = " + HOUSE_NUMBER + ";");<NEW_LINE>System.out.println("MarioHouse = " + MARIO_HOUSE_ID + ";");<NEW_LINE>System.out.println("LuigiHouse = " + LUIGI_HOUSE_ID + ";");<NEW_LINE>System.out.println("fuelMax = " + FUEL + ";");<NEW_LINE>System.out.println(<...
"goldTotalAmount = " + MAX_GOLD * HOUSE_NUMBER + ";");
281,580
public static String condenseManaCostString(String rawCost) {<NEW_LINE>int total = 0;<NEW_LINE>int index = 0;<NEW_LINE>// Split the string in to an array of numbers and colored mana symbols<NEW_LINE>String[] splitCost = rawCost.replace("{", "").replace("}", " ").split(" ");<NEW_LINE>// Sort alphabetically which will pu...
finalCost, shift, splitCostLength - index);
1,382,560
public Dialog onCreateDialog(Bundle savedInstanceState) {<NEW_LINE>int primaryColor = themeColorUtils.primaryColor(getActivity());<NEW_LINE>mParentFolder = getArguments().getParcelable(ARG_PARENT_FOLDER);<NEW_LINE>// Inflate the layout for the dialog<NEW_LINE>LayoutInflater inflater = requireActivity().getLayoutInflate...
setTitle(R.string.uploader_info_dirname);
1,308,512
private Mono<Response<CheckNameAvailabilityResultInner>> checkNameAvailabilityWithResponseAsync(String resourceGroupName, String namespaceName, CheckNameAvailabilityParameter parameters, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Paramet...
error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));
87,776
private void cmd_zoom() {<NEW_LINE>int M_Lot_ID = 0;<NEW_LINE>KeyNamePair pp = (KeyNamePair) fieldLot.getSelectedItem();<NEW_LINE>if (pp != null)<NEW_LINE>M_Lot_ID = pp.getKey();<NEW_LINE>MQuery zoomQuery = new MQuery("M_Lot");<NEW_LINE>zoomQuery.addRestriction("M_Lot_ID", MQuery.EQUAL, M_Lot_ID);<NEW_LINE>log.info(zoo...
setCursor(Cursor.getDefaultCursor());
1,566,266
public void testGetNextTimeoutWithActualExpiration() {<NEW_LINE>// 2 minutes<NEW_LINE>Date scheduledEnd = new Date(System.currentTimeMillis() + 2 * 60 * 1000);<NEW_LINE>ScheduleExpression se = new ScheduleExpression();<NEW_LINE>se.hour("*");<NEW_LINE>se.minute("*");<NEW_LINE>se.end(scheduledEnd);<NEW_LINE>svLogger.info...
assertEquals("timer.getNextTimeout() threw unexpected exception", "NoMoreTimeoutsException", failure);
200,666
public void write(org.apache.thrift.protocol.TProtocol prot, waitForFlush_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 (struct.isSe...
oprot.writeBitSet(optionals, 7);
289,732
private static String askForSaveDirectory(DiskManagerFileInfo fileInfo, String message) {<NEW_LINE>// On Windows, Directory dialog doesn't seem to get mouse scroll focus<NEW_LINE>// unless we have a shell.<NEW_LINE>Shell anyShell = Utils.findAnyShell();<NEW_LINE>Shell shell = new Shell(anyShell.getDisplay(), SWT.NO_TRI...
String open = dDialog.open();
768,659
// Parameters example: 6 0.5 100<NEW_LINE>public static void main(String[] args) {<NEW_LINE>int vertices = Integer.parseInt(args[0]);<NEW_LINE>double radius = Double.parseDouble(args[1]);<NEW_LINE>int numberOfGraphs = Integer.parseInt(args[2]);<NEW_LINE>List<Exercise30_EuclideanWeightedGraphs.EuclideanEdgeWeightedGraph...
"Expected to be connected: " + (radius > thresholdValue));
1,765,992
private void processTransactionTrigger(BlockCapsule newBlock) {<NEW_LINE>List<TransactionCapsule> transactionCapsuleList = newBlock.getTransactions();<NEW_LINE>// need to set eth compatible data from transactionInfoList<NEW_LINE>if (EventPluginLoader.getInstance().isTransactionLogTriggerEthCompatible()) {<NEW_LINE>Tran...
Builder transactionInfoListBuilder = TransactionInfoList.newBuilder();
969,980
protected Map<String, Number> readRegisters(long threadOffset) throws IOException {<NEW_LINE>if (!hasVersionBeenDetermined) {<NEW_LINE>calculateThreadStructureSizes(threadOffset);<NEW_LINE>}<NEW_LINE>_fileReader.seek(threadOffset + sizeofThreadEntry64);<NEW_LINE>Map<String, Number> registers = new TreeMap<String, Numbe...
.valueOf(readInt()));
1,704,563
private void parseAndSet_trigger(JSONObject jsonObject_trigger, int version) throws IllegalStorageDataException {<NEW_LINE>try {<NEW_LINE>String trigger_type = jsonObject_trigger.getString(C.TYPE);<NEW_LINE>switch(trigger_type) {<NEW_LINE>case C.TriggerType.T_RAW:<NEW_LINE>EventData eventData = parse_eventData(jsonObje...
(context).get(condition_name);
1,654,258
public void askDeleteItems(@NonNull final List<Content> contents, @NonNull final List<Group> groups, @Nullable final Runnable onSuccess, @NonNull final SelectExtension<?> selectExtension) {<NEW_LINE>// TODO display the number of books and groups that will be deleted<NEW_LINE>MaterialAlertDialogBuilder builder = new Mat...
contents, groups, false, onSuccess);
672,487
private static void updateTranslatedPathIds(Collection<? extends URL> roots, TaggedClassPath tcp, Map<URL, PathIds> pathIdsResult, Map<String, Set<URL>> pathIdToRootsResult) {<NEW_LINE>Set<String> sids = new HashSet<>();<NEW_LINE>Set<String> mimeTypes = new HashSet<>();<NEW_LINE>for (String blid : tcp.getPathIds().getB...
getMimeTypes().addAll(mimeTypes);
408,288
public MaterializationKey defineMaterialization(final CalciteSchema schema, TileKey tileKey, String viewSql, List<String> viewSchemaPath, String suggestedTableName, TableFactory tableFactory, boolean create, boolean existing) {<NEW_LINE>final MaterializationActor.QueryKey queryKey = new MaterializationActor.QueryKey(vi...
put(queryKey, materialization.key);
634,857
public void readAdditional(CompoundNBT compound) {<NEW_LINE>this.thrower = null;<NEW_LINE>if (compound.contains(THROWER_NBT, NBTtypesMBE.COMPOUND_NBT_ID)) {<NEW_LINE>this.throwerUUID = NBTUtil.readUniqueId(compound.getCompound(THROWER_NBT));<NEW_LINE>}<NEW_LINE>boolean isInFlight = compound.getBoolean(IN_FLIGHT_NBT);<N...
(compound.getCompound(FLIGHT_PATH_NBT));
1,787,027
private static void fetchThreadPoolMetrics(long now, MBeanServer mbs, List<Metric> metrics) throws JMException {<NEW_LINE>final <MASK><NEW_LINE>final Set<ObjectName> names = mbs.queryNames(threadPoolName, null);<NEW_LINE>if (names == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>for (ObjectName name : names) {<NEW_LINE>...
ObjectName threadPoolName = new ObjectName("Catalina:type=ThreadPool,*");
560,773
public boolean isCached(RequestAuthenticator authenticator) {<NEW_LINE>logger.debug("Checking if {} is cached", authenticator);<NEW_LINE>SecurityContext context = SecurityContextHolder.getContext();<NEW_LINE>KeycloakAuthenticationToken token;<NEW_LINE>KeycloakSecurityContext keycloakSecurityContext;<NEW_LINE>if (contex...
.getAccount().getKeycloakSecurityContext();
723,698
// beforeSave<NEW_LINE>@Override<NEW_LINE>protected boolean afterSave(boolean newRecord, boolean success) {<NEW_LINE>if (!success)<NEW_LINE>return success;<NEW_LINE>if (newRecord) {<NEW_LINE>StringBuffer sb = new StringBuffer("INSERT INTO AD_TreeNodeCMM " + "(AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,U...
debug("#" + no + " - TreeType=CMM");
419,869
private void clipCycles(ReadClipperWithData clipper) {<NEW_LINE>if (cyclesToClip != null) {<NEW_LINE>GATKRead read = clipper.getRead();<NEW_LINE>ClippingData data = clipper.getData();<NEW_LINE>for (Pair<Integer, Integer> p : cyclesToClip) {<NEW_LINE>// iterate over each cycle range<NEW_LINE>int cycleStart = p.getLeft()...
int stop = startStop.getRight();
1,542,096
void write() throws IOException, ConfigurationException {<NEW_LINE>// Clear the configuration before saving to drop preferences which are unused anymore<NEW_LINE>configuration.clear();<NEW_LINE>// Get opened main frames list<NEW_LINE>List<MainFrame> mainFrames = WindowManager.getMainFrames();<NEW_LINE>// Save windows c...
int nbMainFrames = mainFrames.size();
524,356
final UpdateUserHierarchyStructureResult executeUpdateUserHierarchyStructure(UpdateUserHierarchyStructureRequest updateUserHierarchyStructureRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateUserHierarchyStructureRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContex...
addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
73,399
public static String relativePath(IPath fullPath, int skipSegmentCount) {<NEW_LINE>boolean hasTrailingSeparator = fullPath.hasTrailingSeparator();<NEW_LINE>String[<MASK><NEW_LINE>// compute length<NEW_LINE>int length = 0;<NEW_LINE>int max = segments.length;<NEW_LINE>if (max > skipSegmentCount) {<NEW_LINE>for (int i1 = ...
] segments = fullPath.segments();
627,251
public Inventory createInventoryHeader(@NonNull final InventoryHeaderCreateRequest request) {<NEW_LINE>final I_M_Inventory inventoryRecord = newInstance(I_M_Inventory.class);<NEW_LINE>inventoryRecord.setAD_Org_ID(request.getOrgId().getRepoId());<NEW_LINE>inventoryRecord.setDocStatus(DocStatus.Drafted.getCode());<NEW_LI...
(request.getDescription()));
1,506,694
private Optional<Integer> toInteger(ParserRuleContext messageCtx, Named_icmp_typeContext ctx) {<NEW_LINE>if (ctx.DESTINATION_UNREACHABLE() != null) {<NEW_LINE>return Optional.of(IcmpType.DESTINATION_UNREACHABLE);<NEW_LINE>} else if (ctx.ECHO_REPLY() != null) {<NEW_LINE>return Optional.of(IcmpType.ECHO_REPLY);<NEW_LINE>...
Optional.of(IcmpType.DESTINATION_UNREACHABLE);
709,097
public <T> boolean tryExecute(Class<T> remoteInterface, T object, ExecutorService executorService, long timeout, TimeUnit timeUnit) throws InterruptedException {<NEW_LINE>String requestQueueName = getRequestQueueName(remoteInterface);<NEW_LINE>RBlockingQueue<String> requestQueue = getBlockingQueue(requestQueueName, Str...
requestQueue.poll(timeout, timeUnit);
351,288
final ListMobileDeviceAccessOverridesResult executeListMobileDeviceAccessOverrides(ListMobileDeviceAccessOverridesRequest listMobileDeviceAccessOverridesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listMobileDeviceAccessOverridesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = ...
addHandlerContext(HandlerContextKey.SERVICE_ID, "WorkMail");
1,715,352
public void visit(BIRBasicBlock birBasicBlock) {<NEW_LINE>// Name of the basic block<NEW_LINE>addCpAndWriteString(birBasicBlock.id.value);<NEW_LINE>// Number of instructions<NEW_LINE>// Adding the terminator instruction as well.<NEW_LINE>buf.writeInt(birBasicBlock.instructions.size() + 1);<NEW_LINE>birBasicBlock.instru...
instruction.kind.getValue());
1,541,162
static app.freerouting.board.FixedState calc_fixed(Scanner p_scanner) {<NEW_LINE>try {<NEW_LINE>app.freerouting.board.FixedState result = app.freerouting.board.FixedState.UNFIXED;<NEW_LINE>Object next_token = p_scanner.next_token();<NEW_LINE>if (next_token == SHOVE_FIXED) {<NEW_LINE>result = app.freerouting.board.Fixed...
.freerouting.board.FixedState.UNFIXED;
1,804,777
public void createProcessInstanceIdentityLinkComment(ExecutionEntity processInstance, String userId, String groupId, String type, boolean create, boolean forceNullUserId) {<NEW_LINE>if (isHistoryLevelAtLeast(HistoryLevel.AUDIT, processInstance.getProcessDefinitionId())) {<NEW_LINE>String authenticatedUserId = Authentic...
[] { userId, type });
604,924
public SimulatePrincipalPolicyResult unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>SimulatePrincipalPolicyResult simulatePrincipalPolicyResult = new SimulatePrincipalPolicyResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>i...
().unmarshall(context));
1,040,802
ArrayList<Object> new84() /* reduce ADeclaration */<NEW_LINE>{<NEW_LINE>@SuppressWarnings("hiding")<NEW_LINE>ArrayList<Object> nodeList = new ArrayList<Object>();<NEW_LINE>@SuppressWarnings("unused")<NEW_LINE>ArrayList<Object> nodeArrayList3 = pop();<NEW_LINE>@SuppressWarnings("unused")<NEW_LINE>ArrayList<Object> nodeA...
PJimpleType) nodeArrayList1.get(0);
1,757,410
private static void walkAndSolve(ObjectNode n, ObjectNode root, OpenAPI oas) {<NEW_LINE>if (n.has("$ref")) {<NEW_LINE><MASK><NEW_LINE>} else if (n.has("allOf")) {<NEW_LINE>for (JsonNode jsonNode : n.get("allOf")) {<NEW_LINE>// We assert that parser validated allOf as array of objects<NEW_LINE>walkAndSolve((ObjectNode) ...
replaceRef(n, root, oas);
564,467
public void joinChatRoom(String chatRoomName, ChatRoomProviderWrapper chatRoomProvider) {<NEW_LINE>OperationSetMultiUserChat groupChatOpSet = chatRoomProvider.getProtocolProvider().getOperationSet(OperationSetMultiUserChat.class);<NEW_LINE>ChatRoom chatRoom = null;<NEW_LINE>try {<NEW_LINE>chatRoom = groupChatOpSet.find...
trace("Un exception occurred while searching for room:" + chatRoomName, e);
1,503,296
public StockMove generateStockMove(Inventory inventory, boolean isEnteringStock) throws AxelorException {<NEW_LINE>StockLocation toStockLocation;<NEW_LINE>StockLocation fromStockLocation;<NEW_LINE>Company company = inventory.getCompany();<NEW_LINE>if (isEnteringStock) {<NEW_LINE>toStockLocation = inventory.getStockLoca...
String inventorySeq = inventory.getInventorySeq();
1,630,479
public ListInfrastructureConfigurationsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListInfrastructureConfigurationsResult listInfrastructureConfigurationsResult = new ListInfrastructureConfigurationsResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String curr...
class).unmarshall(context));
1,086,718
public static SourceMapping parse(String contents, SourceMapSupplier supplier) throws SourceMapParseException {<NEW_LINE>// Version 1, starts with a magic string<NEW_LINE>if (contents.startsWith("/** Begin line maps. **/")) {<NEW_LINE>throw new SourceMapParseException("This appears to be a V1 SourceMap, which is not su...
consumer.parse(sourceMapObject, supplier);
314,187
private void initFields() {<NEW_LINE>System.out.println(getClass().getSimpleName() + ": Init Fields...");<NEW_LINE>List<?> fieldNodes = fields.selectNodes("//dataroot/Fields");<NEW_LINE>for (Object o : fieldNodes) {<NEW_LINE>Node node = (Node) o;<NEW_LINE>String tag = getSingleNodeTextSafe(node, "Tag");<NEW_LINE>String...
fieldName, type, desc, notReqXML);
392,275
public static void convolveBorder(GrayF64 integral, IntegralKernel kernel, GrayF64 output, int borderX, int borderY) {<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(0, integral.width, x -> {<NEW_LINE>for (int x = 0; x < integral.width; x++) {<NEW_LINE>for (int y = 0; y < borderY; y++) {<NEW_LINE>double total = 0...
set(x, y, total);
410,718
public void parseTasklet(Element stepElement, Element taskletElement, AbstractBeanDefinition bd, ParserContext parserContext, boolean stepUnderspecified) {<NEW_LINE>bd.setBeanClass(StepParserStepFactoryBean.class);<NEW_LINE>bd.setAttribute("isNamespaceStep", true);<NEW_LINE>String <MASK><NEW_LINE>String taskletMethod =...
taskletRef = taskletElement.getAttribute(TASKLET_REF_ATTR);
314,173
final DescribeCampaignResult executeDescribeCampaign(DescribeCampaignRequest describeCampaignRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeCampaignRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv...
invoke(request, responseHandler, executionContext);
1,315,197
// Fourth we get the onParseBlockComplete called after all rawTxs of blocks have been parsed<NEW_LINE>public void onParseBlockComplete(Block block) {<NEW_LINE>if (parseBlockChainComplete)<NEW_LINE>log.info("Parse block completed: Block height {}, {} BSQ transactions.", block.getHeight(), block.getTxs().size());<NEW_LIN...
-> l.onParseBlockCompleteAfterBatchProcessing(block));
911,307
public void run(RegressionEnvironment env) {<NEW_LINE>String epl = "@name('s0') select " + "first(theString) as f1, " + "first(sb.*) as f2, " + "first(*) as f3, " + "last(theString) as l1, " + "last(sb.*) as l2, " + "last(*) as l3 " + "from SupportBean as sb";<NEW_LINE>env.compileDeploy(epl).addListener("s0");<NEW_LINE...
env, "E1", 1d, 1);
933,135
public Object calculate(Context ctx) {<NEW_LINE>if (param == null) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("ftp_mget" <MASK><NEW_LINE>}<NEW_LINE>int size = param.getSubSize();<NEW_LINE>if (size < 4) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQExcep...
+ mm.getMessage("function.missingParam"));
67,667
public static FetchPhotosResponse unmarshall(FetchPhotosResponse fetchPhotosResponse, UnmarshallerContext context) {<NEW_LINE>fetchPhotosResponse.setRequestId(context.stringValue("FetchPhotosResponse.RequestId"));<NEW_LINE>fetchPhotosResponse.setCode(context.stringValue("FetchPhotosResponse.Code"));<NEW_LINE>fetchPhoto...
= new ArrayList<Photo>();
243,062
protected void popContextData() {<NEW_LINE>if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINEST)) {<NEW_LINE>logger.entering(CLASS_NAME, "popContextData", this);<NEW_LINE>}<NEW_LINE>// save off this thread's class loader and use the class loader of the thread that launch this threa...
exiting(CLASS_NAME, "popContextData", this);
155,539
public DescribeInstanceResult describeInstance(DescribeInstanceRequest describeInstanceRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeInstanceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsReque...
new JsonResponseHandler<DescribeInstanceResult>(unmarshaller);