idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
1,759,687
public void onBindViewHolderCursor(ViewHolder holder, Cursor cursor) {<NEW_LINE>holder.transactionId = cursor.getLong(cursor.getColumnIndexOrThrow(DatabaseSchema.TransactionEntry._ID));<NEW_LINE>String description = cursor.getString(cursor.getColumnIndexOrThrow(DatabaseSchema.TransactionEntry.COLUMN_DESCRIPTION));<NEW_...
displayBalance(holder.transactionAmount, amount);
1,308,605
public void applyPermission(UiPermissionDescriptor permissionDescriptor) {<NEW_LINE>checkNotNullArgument(permissionDescriptor);<NEW_LINE>Logger log = LoggerFactory.getLogger(WebFieldGroup.class);<NEW_LINE>String subComponentId = permissionDescriptor.getSubComponentId();<NEW_LINE>ScreenComponentPermission permissionValu...
String actionHolderComponentId = permissionDescriptor.getActionHolderComponentId();
275,485
private void switchTileLayer(final MapSource newSource) {<NEW_LINE>final ITileLayer oldLayer = this.tileLayer;<NEW_LINE>ITileLayer newLayer = null;<NEW_LINE>mapSource = newSource;<NEW_LINE>if (this.mapAttribution != null) {<NEW_LINE>this.mapAttribution.setOnClickListener(new MapAttributionDisplayHandler(() -> this.mapS...
setZoomLevelMax(newLayer.getZoomLevelMax());
1,041,233
protected void paintIconAt1x(Graphics2D g, int x, int y, int width, int height, double scaleFactor) {<NEW_LINE>int iwh = (int) (10 * scaleFactor);<NEW_LINE>int ix = x + ((width - iwh) / 2);<NEW_LINE>int iy = y + ((height - iwh) / 2);<NEW_LINE>float thickness = SystemInfo.isWindows_11_orLater ? (float) scaleFactor : (in...
arc + (1.5 * scaleFactor));
304,451
public static void main(String... args) throws Exception {<NEW_LINE>Config config = Config.create();<NEW_LINE>ServerConfiguration serverConfig = ServerConfiguration.fromConfig(config.get("server"));<NEW_LINE>Map<String, MyUser> users = new HashMap<>();<NEW_LINE>users.put("user", new MyUser("user", "user".toCharArray(),...
webSecurity = WebSecurity.from(config);
338,393
private boolean visitDependentLink(DependentLink parameters) {<NEW_LINE>for (DependentLink link = parameters; link.hasNext(); link = link.getNext()) {<NEW_LINE>DependentLink link1 = link.getNextTyped(null);<NEW_LINE>Expression type = acceptSelf(link1.getTypeExpr(), true);<NEW_LINE>if (type == null) {<NEW_LINE>if (myKee...
getBindings().remove(parameters);
896,890
public void run(CommandLine commandLine) throws Exception {<NEW_LINE>if (!hasCorrectOptions(commandLine)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>IArchimateModel model = CommandLineState.getModel();<NEW_LINE>if (model == null) {<NEW_LINE>throw new IOException(Messages.ExportXMLProvider_1);<NEW_LINE>}<NEW_LINE>// File<NE...
exporter.exportModel(model, outputFile);
1,737,015
public Object read(final InputStream is) {<NEW_LINE>final ART1 result = new ART1();<NEW_LINE>final EncogReadHelper in = new EncogReadHelper(is);<NEW_LINE>EncogFileSection section;<NEW_LINE>while ((section = in.readNextSection()) != null) {<NEW_LINE>if (section.getSectionName().equals("ART1") && section.getSubSectionNam...
(params, PersistConst.PROPERTY_F2_COUNT));
1,225,308
final BatchDescribeMergeConflictsResult executeBatchDescribeMergeConflicts(BatchDescribeMergeConflictsRequest batchDescribeMergeConflictsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(batchDescribeMergeConflictsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.get...
addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
110,397
public LambdaFunctionFailedEventAttributes unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>LambdaFunctionFailedEventAttributes lambdaFunctionFailedEventAttributes = new LambdaFunctionFailedEventAttributes();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement()...
int originalDepth = context.getCurrentDepth();
461,819
final UpdateFirewallPolicyChangeProtectionResult executeUpdateFirewallPolicyChangeProtection(UpdateFirewallPolicyChangeProtectionRequest updateFirewallPolicyChangeProtectionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateFirewallPolicyChangeProtectionRequest);<NEW_LINE>AWSRequestMet...
addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
116,339
public void authenticateToken(ServiceAccountToken serviceAccountToken, String nodeName, ActionListener<Authentication> listener) {<NEW_LINE>logger.trace("attempt to authenticate service account token [{}]", serviceAccountToken.getQualifiedName());<NEW_LINE>if (ElasticServiceAccounts.NAMESPACE.equals(serviceAccountToken...
debug(e.getMessage());
959,022
ImmutableList<CToolchain.Builder> createCrosstools() {<NEW_LINE>ImmutableList.Builder<CToolchain.Builder> toolchains = ImmutableList.builder();<NEW_LINE>// gcc 4.9<NEW_LINE>toolchains.add(createX86Toolchain());<NEW_LINE>// clang<NEW_LINE>CToolchain.Builder x86Clang = // Workaround for https://code.google.com/p/android/...
stlImpl.addStlImpl(x8664, "4.9");
941,880
/*<NEW_LINE>* Tries to convert the given value into an object<NEW_LINE>* of the given type, using an intermediate type<NEW_LINE>* of String for the conversion.<NEW_LINE>*/<NEW_LINE>private static Object convert(Object value, Class type) {<NEW_LINE>// short-circuit<NEW_LINE>if (type.isAssignableFrom(value.getClass())) {...
[] { value, type });
199,647
public void initializeDefaultPreferences() {<NEW_LINE>IEclipsePreferences prefs = DefaultScope.INSTANCE.getNode(CommonEditorPlugin.PLUGIN_ID);<NEW_LINE>prefs.<MASK><NEW_LINE>// $NON-NLS-1$<NEW_LINE>prefs.put(IPreferenceConstants.CHARACTER_PAIR_COLOR, "128,128,128");<NEW_LINE>prefs.putBoolean(IPreferenceConstants.LINK_O...
putBoolean(IPreferenceConstants.ENABLE_CHARACTER_PAIR_COLORING, true);
1,247,126
private void computeV(DMatrixRMaj h1, DMatrixRMaj h2, DMatrixRMaj v) {<NEW_LINE>double h1x = h1.get(0, 0);<NEW_LINE>double h1y = <MASK><NEW_LINE>double h1z = h1.get(2, 0);<NEW_LINE>double h2x = h2.get(0, 0);<NEW_LINE>double h2y = h2.get(1, 0);<NEW_LINE>double h2z = h2.get(2, 0);<NEW_LINE>v.set(0, 0, h1x * h2x);<NEW_LIN...
h1.get(1, 0);
167,054
public int deleteJobsPermanently(StateName state, Instant updatedBefore) {<NEW_LINE>int amount = 0;<NEW_LINE>try (final StatefulRedisConnection<String, String> connection = getConnection()) {<NEW_LINE>RedisCommands<String, String> commands = connection.sync();<NEW_LINE>List<String> zrangeToInspect = commands.zrange(job...
(UUID.fromString(id));
1,638,393
public User createUser(String userId, String email) throws DotDataException, DuplicateUserException {<NEW_LINE>Company comp = com.dotmarketing.cms.factories.PublicCompanyFactory.getDefaultCompany();<NEW_LINE><MASK><NEW_LINE>User defaultUser = APILocator.getUserAPI().getDefaultUser();<NEW_LINE>if (!UtilMethods.isSet(use...
String companyId = comp.getCompanyId();
543,053
public void unmount(RecyclerView view) {<NEW_LINE>ThreadUtils.assertMainThread();<NEW_LINE>if (mIsSubAdapter) {<NEW_LINE>throw new RuntimeException("Can't unmount a RecyclerView in sub adapter mode");<NEW_LINE>}<NEW_LINE>final <MASK><NEW_LINE>final View firstView = layoutManager.findViewByPosition(mCurrentFirstVisibleP...
LayoutManager layoutManager = mLayoutInfo.getLayoutManager();
466,172
public String execute(SampleResult previousResult, Sampler currentSampler) throws InvalidVariableException {<NEW_LINE>String digestAlgorithm = values[0].execute();<NEW_LINE>String stringToEncode = values[1].execute();<NEW_LINE>String salt = values.length > 2 ? values[2].execute() : null;<NEW_LINE>String encodedString =...
.getBytes(StandardCharsets.UTF_8));
568,985
public ModelAndView agentStatusReport(Request request, Response response) throws Exception {<NEW_LINE>String pluginId = request.params("plugin_id");<NEW_LINE>String elasticAgentId = parseElasticAgentId(request);<NEW_LINE>String jobIdString = request.queryParams("job_id");<NEW_LINE>long jobId;<NEW_LINE>try {<NEW_LINE>jo...
format("Status Report for plugin with id: '%s' for agent '%s' is not found.", pluginId, elasticAgentId);
1,639,555
private byte[] loadFile(String url) throws DaemonException {<NEW_LINE>final File file = new File<MASK><NEW_LINE>final BufferedInputStream in;<NEW_LINE>try {<NEW_LINE>in = new BufferedInputStream(new FileInputStream(file));<NEW_LINE>} catch (FileNotFoundException e) {<NEW_LINE>throw new DaemonException(ExceptionType.Fil...
(URI.create(url));
598,024
void replaceTemplateParametersAndLoad(final ActionEvent actionEvent, final Template template, final boolean isTestPlan, File templateFile) {<NEW_LINE>File temporaryGeneratedFile = null;<NEW_LINE>try {<NEW_LINE>// handle customized templates (the .jmx.fmkr files)<NEW_LINE>if (template.getParameters() != null && !templat...
Configuration templateCfg = TemplateUtil.getTemplateConfig();
735,118
public void addNotify() {<NEW_LINE>super.addNotify();<NEW_LINE>this.addMouseListener(mouseListener = new MouseAdapter() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void mousePressed(MouseEvent e) {<NEW_LINE>maybeShowPopup(e);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void mouseReleased(MouseEvent e) {<...
), e.getY());
962,256
final UpdateApplicationResult executeUpdateApplication(UpdateApplicationRequest updateApplicationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateApplicationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Requ...
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
1,180,610
public static <T extends GeneratedMessageV3 & MessageOrBuilder> void execute(Logger log, StreamObserver<T> resp, Function<Response, ? extends GeneratedMessageV3.Builder> respSetter, String spanId, MaxGraphFunctional.CallableForIterator<T> callable) {<NEW_LINE>try {<NEW_LINE>Iterator<T> v = callable.call();<NEW_LINE>whi...
e)).build());
449,193
public Object retrieve(ThreadContext context, IRubyObject self, StaticScope currScope, DynamicScope currDynScope, Object[] temp) {<NEW_LINE>Ruby runtime = context.runtime;<NEW_LINE>RubyHash hash;<NEW_LINE>KeyValuePair<Operand, Operand>[] pairs = this.pairs;<NEW_LINE>int index = 0;<NEW_LINE>if (isKeywordRest()) {<NEW_LI...
self, currScope, currDynScope, temp);
210,341
public void automatedImport(List<String> filenames) {<NEW_LINE>List<Path> files = filenames.stream().map(Path::of).collect(Collectors.toList());<NEW_LINE>BackgroundTask<ParserResult> task = BackgroundTask.wrap(() -> {<NEW_LINE>List<ImportFormatReader.UnknownFormatImport> imports = doImport(files);<NEW_LINE>// Ok, done....
(Localization.lang("No entries found. Please make sure you are using the correct import filter."));
1,624,579
public boolean apply(Game game, Ability source) {<NEW_LINE>Permanent sourcePermanent = source.getSourcePermanentOrLKI(game);<NEW_LINE>if (sourcePermanent == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>int amount = sourcePermanent.getPower().getValue();<NEW_LINE>if (amount < 1) {<NEW_LINE>return false;<NEW_LINE>}...
getSourceId(), source, game);
1,632,028
protected void onSaveInstanceState(@NonNull Bundle outState) {<NEW_LINE>super.onSaveInstanceState(outState);<NEW_LINE>outState.putParcelable(SELECTED_ACCOUNT_STATE, selectedAccount);<NEW_LINE>outState.putString(SUBREDDIT_NAME_STATE, subredditName);<NEW_LINE>outState.putString(SUBREDDIT_ICON_STATE, iconUrl);<NEW_LINE>ou...
VIDEO_URI_STATE, videoUri.toString());
1,456,694
public void onBindViewHolder(Presenter.ViewHolder viewHolder, Object item) {<NEW_LINE>super.onBindViewHolder(viewHolder, item);<NEW_LINE>Video video = (Video) item;<NEW_LINE>ComplexImageCardView cardView = (ComplexImageCardView) viewHolder.view;<NEW_LINE>Context context = cardView.getContext();<NEW_LINE>cardView.setTit...
.round(video.percentWatched));
1,297,673
private void convertBase64StringSave(String base64File) throws IOException {<NEW_LINE>String zipType = <MASK><NEW_LINE>if (base64File.contains("data:" + zipType + ";")) {<NEW_LINE>File filePath = new File(Storage.getDownloadDir("TagMo"), "download.zip");<NEW_LINE>FileOutputStream os = new FileOutputStream(filePath, fal...
getString(R.string.mimetype_zip);
1,455,544
protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_restaurants);<NEW_LINE>ButterKnife.bind(this);<NEW_LINE>Intent intent = getIntent();<NEW_LINE>mCity = (City) intent.getSerializableExtra(EXTRA_MESSAGE_CITY_OBJECT);<NEW_LINE>mHandl...
= new RestaurantsCardViewAdapter(this, restaurantItemEntities);
224,308
public boolean validate(ClusterState state) {<NEW_LINE>IndexMetadata watcherIndexMetadata = WatchStoreUtils.getConcreteIndex(Watch.INDEX, state.metadata());<NEW_LINE>IndexMetadata triggeredWatchesIndexMetadata = WatchStoreUtils.getConcreteIndex(TriggeredWatchStoreField.INDEX_NAME, state.metadata());<NEW_LINE>boolean is...
null || UpgradeField.checkInternalIndexFormat(triggeredWatchesIndexMetadata);
1,088,571
private void onPropertyAdd(EntityCursor entity, EntityType entityType, PropertyCursor propertyCursor, long[] tokens, int propertyKeyId, int[] existingPropertyKeyIds, Value value) {<NEW_LINE>assert noSchemaChangedInTx();<NEW_LINE>Collection<IndexDescriptor> indexes = storageReader.valueIndexesGetRelated(tokens, property...
getPropertyIds(), materializedProperties, memoryTracker);
588,875
public static String replace(@Nonnull final String text, @Nonnull final String oldS, @Nonnull final String newS, final boolean ignoreCase) {<NEW_LINE>if (text.length() < oldS.length())<NEW_LINE>return text;<NEW_LINE>StringBuilder newText = null;<NEW_LINE>int i = 0;<NEW_LINE>while (i < text.length()) {<NEW_LINE>final in...
text.indexOf(oldS, i);
350,412
private static int[][] matrixMultiplication(int[][] matrix1, int[][] matrix2) {<NEW_LINE>// Check if matrices passed can be multiplied<NEW_LINE>int rowsInMatrix1 = matrix1.length;<NEW_LINE>int columnsInMatrix1 = matrix1[0].length;<NEW_LINE>int rowsInMatrix2 = matrix2.length;<NEW_LINE>int <MASK><NEW_LINE>assert columnsI...
columnsInMatrix2 = matrix2[0].length;
184,430
public static void main(String[] args) {<NEW_LINE>if (args.length < 2) {<NEW_LINE><MASK><NEW_LINE>System.exit(-1);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>Twitter twitter = new TwitterFactory().getInstance();<NEW_LINE>long listId = Long.parseLong(args[0]);<NEW_LINE>UserList list = twitter.showUserList(listId);<NEW_LINE>long...
System.out.println("Usage: java twitter4j.examples.list.ShowUserListSubscription [list id] [user id]");
319,002
public static ListWorkFlowTemplatesResponse unmarshall(ListWorkFlowTemplatesResponse listWorkFlowTemplatesResponse, UnmarshallerContext _ctx) {<NEW_LINE>listWorkFlowTemplatesResponse.setRequestId(_ctx.stringValue("ListWorkFlowTemplatesResponse.RequestId"));<NEW_LINE>listWorkFlowTemplatesResponse.setErrorCode(_ctx.strin...
= new ArrayList<WorkflowNode>();
1,236,017
public static String encodeXmlAttribute(String text, boolean exceptApos) {<NEW_LINE>if (text == null || text.length() == 0) {<NEW_LINE>return text;<NEW_LINE>}<NEW_LINE>int length = text.length();<NEW_LINE>// FIXME avoid creating this when not necessary<NEW_LINE>StringBuilder ret = new StringBuilder(length * 12 / 10);<N...
text, ret, i, last);
1,793,637
public <T> T execute(TransactionCallback<T> action, int propagationBehavior) throws TransactionException {<NEW_LINE>Assert.state(this.transactionManager != null, "No PlatformTransactionManager set");<NEW_LINE>DefaultTransactionDefinition transactionDefinition = new DefaultTransactionDefinition();<NEW_LINE>transactionDe...
this.rollbackOnException(status, e);
903,890
protected void fillMapFromExecutable(final Map<String, Object> objMap) {<NEW_LINE>objMap.put(ID_PARAM, this.id);<NEW_LINE>objMap.put(STATUS_PARAM, this.status.toString());<NEW_LINE>objMap.put(START_TIME_PARAM, this.startTime);<NEW_LINE>objMap.put(END_TIME_PARAM, this.endTime);<NEW_LINE>objMap.put(UPDATE_TIME_PARAM, thi...
this.conditionOnJobStatus.toString());
1,501,638
public boolean querySourceCoercion(SqlValidatorScope scope, RelDataType sourceRowType, RelDataType targetRowType, SqlNode query) {<NEW_LINE>final List<RelDataTypeField> sourceFields = sourceRowType.getFieldList();<NEW_LINE>final List<RelDataTypeField> targetFields = targetRowType.getFieldList();<NEW_LINE>final <MASK><N...
int sourceCount = sourceFields.size();
1,271,256
public int onStartCommand(Intent intent, int flags, final int startId) {<NEW_LINE>Bundle b = new Bundle();<NEW_LINE>isRootExplorer = intent.getBooleanExtra(TAG_IS_ROOT_EXPLORER, false);<NEW_LINE>ArrayList<HybridFileParcelable> files = intent.getParcelableArrayListExtra(TAG_COPY_SOURCES);<NEW_LINE>String targetPath = in...
this, 0, notificationIntent, 0);
451,927
public static Object instantiateDefault(final Class inClass) throws Exception {<NEW_LINE>Object result = null;<NEW_LINE>final Class objectClass = primitiveClassToObjectClass(inClass);<NEW_LINE>if (Number.class.isAssignableFrom(objectClass)) {<NEW_LINE>result = instantiateFromString(objectClass, "0");<NEW_LINE>} else if...
java.net.URI("http://www.sun.com");
1,443,574
private void registerRemoveMapWidgetReceiver(@NonNull MapActivity mapActivity) {<NEW_LINE>final WeakReference<MapActivity> mapActivityRef = new WeakReference<>(mapActivity);<NEW_LINE>BroadcastReceiver removeMapWidgetReceiver = new BroadcastReceiver() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onReceive(Context...
connectedApp = connectedApps.get(packName);
994,882
public RecommendationJobResourceLimit unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>RecommendationJobResourceLimit recommendationJobResourceLimit = new RecommendationJobResourceLimit();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCu...
class).unmarshall(context));
767,568
private int addComponentAttributes(RecordComponentBinding recordComponentBinding, int componetAttributeOffset) {<NEW_LINE>// See JVMS 14 Table 4.7-C - Record Preview for allowed attributes<NEW_LINE>int attributesNumber = 0;<NEW_LINE>// add signature attribute<NEW_LINE>char[] genericSignature = recordComponentBinding.ge...
type.collectMissingTypes(this.missingTypes);
898,364
private CompletableFuture<ResponseWithBody> execute(final HttpMethod httpMethod, final String path, final Optional<String> mediaType, final Object requestBody, final BiConsumer<HttpClientResponse, CompletableFuture<ResponseWithBody>> responseHandler) {<NEW_LINE>final VertxCompletableFuture<ResponseWithBody> vcf = new V...
additionalHeaders.forEach(httpClientRequest::putHeader);
481,533
public void testInlineAdditionalProperties(Map<String, String> param, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {<NEW_LINE>Object localVarBody = param;<NEW_LINE>// verify the required parameter 'param' is set<NEW_LINE>if (param == null) {<NEW_LINE>resultHandler.handle(ApiException<MASK><NEW...
.fail(400, "Missing the required parameter 'param' when calling testInlineAdditionalProperties"));
917,397
public void toSrt(Path srtFile) {<NEW_LINE>try (FileOutputStream fos = new FileOutputStream(srtFile.toFile());<NEW_LINE>OutputStreamWriter osw = new OutputStreamWriter(fos, StandardCharsets.UTF_8);<NEW_LINE>PrintWriter writer = new PrintWriter(osw)) {<NEW_LINE>long counter = 1;<NEW_LINE>for (Subtitle title : subtitleLi...
"<font color=\"" + entry.color + "\">");
1,785,408
public void performOperationStep(DeploymentOperation operationContext) {<NEW_LINE>final AbstractProcessApplication processApplication = operationContext.getAttachment(Attachments.PROCESS_APPLICATION);<NEW_LINE>final String paName = processApplication.getName();<NEW_LINE>Class<? extends AbstractProcessApplication> paCla...
exceptionWhileInvokingPaLifecycleCallback(CALLBACK_NAME, paName, e);
724,057
private void postPlugin(boolean isPing) throws IOException {<NEW_LINE>// Construct the post data<NEW_LINE><MASK><NEW_LINE>data.append(encode("guid")).append('=').append(encode(BungeeCord.getInstance().config.getUuid()));<NEW_LINE>encodeDataPair(data, "version", ProxyServer.getInstance().getVersion());<NEW_LINE>encodeDa...
final StringBuilder data = new StringBuilder();
669,887
public void marshall(UpdateDataSourceRequest updateDataSourceRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (updateDataSourceRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(updateDataSourc...
e.getMessage(), e);
295,192
public Distribution read(final Path container, final Distribution.Method method, final LoginCallback prompt) throws BackgroundException {<NEW_LINE>if (Distribution.WEBSITE.equals(method)) {<NEW_LINE>try {<NEW_LINE>final WebsiteConfig configuration = session.getClient().getWebsiteConfig(container.getName());<NEW_LINE>fi...
(container, method), false);
22,176
private String uploadContent(@NonNull String contentType, @NonNull RequestBody requestBody) throws IOException {<NEW_LINE>try {<NEW_LINE>OkHttpClient client = new OkHttpClient.Builder().socketFactory(Network.getSocketFactory()).addInterceptor(new StandardUserAgentInterceptor()).dns(Network.getDns()).build();<NEW_LINE>R...
w(TAG, "Error during upload.", e);
17,463
public void executeAction(ActionListener listener, Object source, String actionCommand) {<NEW_LINE>// create event<NEW_LINE>ActionEvent evt = new ActionEvent(source, ActionEvent.ACTION_PERFORMED, actionCommand);<NEW_LINE>// don't do anything if the action is a wrapper<NEW_LINE>// (like EditAction.Wrapper)<NEW_LINE>if (...
, String.valueOf(_repeatCount));
150,269
private String createResourceFromSnapshot(long csSnapshotId, String rscName, StoragePoolVO storagePoolVO) {<NEW_LINE>final String rscGrp = storagePoolVO.getUserInfo() != null && !storagePoolVO.getUserInfo().isEmpty() ? storagePoolVO.getUserInfo() : "DfltRscGrp";<NEW_LINE>final DevelopersApi linstorApi = LinstorUtil.get...
s_logger.debug("Create new resource definition: " + rscName);
827,961
private void unwrap(DPMethod m, @SuppressWarnings("rawtypes") Map cfg) throws ClassNotFoundException {<NEW_LINE>String before = null;<NEW_LINE>String after = null;<NEW_LINE>Map<String, String> localVar = null;<NEW_LINE>String proxy = "";<NEW_LINE>boolean isUnwrapField = false;<NEW_LINE>Object target = cfg.get("target")...
cfg.get("target") + 1;
499,698
public int update(@NonNull Uri uri, ContentValues contentValues, String selection, String[] selectionArgs) {<NEW_LINE>int uriType = uriMatcher.match(uri);<NEW_LINE>SQLiteDatabase sqlDB = dbOpenHelper.getWritableDatabase();<NEW_LINE>int rowsUpdated;<NEW_LINE>switch(uriType) {<NEW_LINE>case CATEGORIES_ID:<NEW_LINE>if (Te...
).notifyChange(uri, null);
161,497
public void updateDatasetTableTaskStatus(DatasetTableTask datasetTableTask) throws Exception {<NEW_LINE>DatasetTableTask dbDatasetTableTask = datasetTableTaskMapper.selectByPrimaryKey(datasetTableTask.getId());<NEW_LINE>if (dbDatasetTableTask.getStatus().equalsIgnoreCase(TaskStatus.Exec.name()) || dbDatasetTableTask.ge...
setStatus(datasetTableTask.getStatus());
1,012,717
final GetCredentialsForIdentityResult executeGetCredentialsForIdentity(GetCredentialsForIdentityRequest getCredentialsForIdentityRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getCredentialsForIdentityRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequest...
addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
1,839,020
protected ExecutorService createExecutorService() {<NEW_LINE>final ThreadFactory threadFactory = new ThreadFactory() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Thread newThread(Runnable r) {<NEW_LINE>Thread th = new Thread(r);<NEW_LINE>th.setName("jME TerrainGrid Thread");<NEW_LINE>th.setDaemon(true);<NEW_LINE>retu...
= (Future<?>) r;
1,313,830
private boolean checkCacheCurrentColor(int newColor) {<NEW_LINE>// TODO: perhaps instead of the need to create new Integers<NEW_LINE>// use an IntHashTable class I have such class to donate or any other open source class<NEW_LINE>Integer currentColor = new Integer(color);<NEW_LINE>Integer newColorKey = new Integer(newC...
newCache = colorCache.get(newColorKey);
347,204
/*<NEW_LINE>public void handlePressed(MouseEvent e, int sel) {<NEW_LINE>boolean shift = e.isShiftDown();<NEW_LINE>AndroidEditor aeditor = (AndroidEditor) editor;<NEW_LINE><NEW_LINE>switch (sel) {<NEW_LINE>case RUN:<NEW_LINE>if (!shift) {<NEW_LINE>aeditor.handleRunDevice();<NEW_LINE>} else {<NEW_LINE>aeditor.handleRunEm...
AndroidEditor) editor).isDebuggerEnabled();
1,690,708
public void request(PdfFilesListLoadRequest event) {<NEW_LINE>LOG.trace("PDF load from list request received");<NEW_LINE>if (nonNull(event.list)) {<NEW_LINE>executor.execute(() -> {<NEW_LINE>try {<NEW_LINE>PdfLoadRequestEvent loadEvent = new PdfLoadRequestEvent(event.getOwnerModule());<NEW_LINE>new PdfListParser().appl...
.list.toString()));
135,953
public void handleInsert(@NotNull InsertionContext context, LookupElement item) {<NEW_LINE><MASK><NEW_LINE>CharSequence documentText = context.getDocument().getImmutableCharSequence();<NEW_LINE>int offset = skipWhiteSpaces(editor.getCaretModel().getOffset(), documentText);<NEW_LINE>if (documentText.charAt(offset) != '{...
Editor editor = context.getEditor();
485,889
private void testPartitionedRollbackMetric(JobExecution jobExec, long execID) throws Exception {<NEW_LINE>if (!jobExec.getBatchStatus().equals(BatchStatus.FAILED)) {<NEW_LINE>throw new TestFailureException(<MASK><NEW_LINE>}<NEW_LINE>StepExecution step1Exec = null;<NEW_LINE>StepExecution step2Exec = null;<NEW_LINE>for (...
"Didn't fail as expected successfully, returned a Status of: " + jobExec.getBatchStatus());
1,728,581
public int delete(Uri uri, String selection, String[] selectionArgs) {<NEW_LINE>Log.d(TAG, "delete(uri=" + uri + ")");<NEW_LINE>// Open a read / write database to support the transaction.<NEW_LINE>SQLiteDatabase db = myOpenHelper.getWritableDatabase();<NEW_LINE>String rowID = "";<NEW_LINE>int deleteCount = 0;<NEW_LINE>...
" AND (" + selection + ')' : "");
1,613,364
public com.amazonaws.services.codedeploy.model.InvalidDeploymentStatusException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.codedeploy.model.InvalidDeploymentStatusException invalidDeploymentStatusException = new com.amazonaws.services.codedeploy.model.Inval...
JsonToken token = context.getCurrentToken();
899,726
private byte[] ha1(StringBuilder sb, MessageDigest md) {<NEW_LINE>// if algorithm is "MD5" or is unspecified => A1 = username ":" realm-value ":"<NEW_LINE>// passwd<NEW_LINE>// if algorithm is "MD5-sess" => A1 = MD5( username-value ":" realm-value ":"<NEW_LINE>// passwd ) ":" nonce-value ":" cnonce-value<NEW_LINE>sb.ap...
throw new UnsupportedOperationException("Digest algorithm not supported: " + algorithm);
1,220,033
private static <R extends TokenRecord> void checkTokens(TokenStore<R> store, Function<R, ConsistencyReport.NameConsistencyReport> report, Function<DynamicRecord, ConsistencyReport.DynamicConsistencyReport> dynamicRecordReport, PageCacheTracer pageCacheTracer) {<NEW_LINE>DynamicStringStore nameStore = store.getNameStore...
long highId = store.getHighId();
238,619
void postUpdate() {<NEW_LINE>//<NEW_LINE>// Change enclosing properties after successful update<NEW_LINE>//<NEW_LINE>String name = _name.getText().trim();<NEW_LINE>Adapter adapter = getAdapter();<NEW_LINE>if (!name.equals(_oldName)) {<NEW_LINE><MASK><NEW_LINE>adapter.removeProperty(_oldName + ".PublishedEndpoints");<NE...
adapter.removeProperty(_oldName + ".Endpoints");
817,027
public void sendReservationCompleteEmailToOrganizer(PurchaseContext purchaseContext, TicketReservation ticketReservation, Locale language, String username) {<NEW_LINE>Organization organization = organizationRepository.getById(purchaseContext.getOrganizationId());<NEW_LINE>List<String> <MASK><NEW_LINE>Map<String, Object...
cc = notificationManager.getCCForEventOrganizer(purchaseContext);
28,781
private List<String> cleanTypes(Schema[] schemas) throws SQLException {<NEW_LINE>List<String> statements = new ArrayList<>();<NEW_LINE>String schemaList = Arrays.stream(schemas).map(s -> "'" + s.getName() + "'").collect<MASK><NEW_LINE>if (schemaList.isEmpty()) {<NEW_LINE>schemaList = "''";<NEW_LINE>}<NEW_LINE>List<Map<...
(Collectors.joining(","));
1,617,611
public J.VariableDeclarations.NamedVariable visitVariable(J.VariableDeclarations.NamedVariable variable, ExecutionContext ctx) {<NEW_LINE>Cursor <MASK><NEW_LINE>// Does not currently support renaming fields in a J.ClassDeclaration.<NEW_LINE>if (// Does not apply for instance variables of anonymous inner classes<NEW_LIN...
parentScope = getCursorToParentScope(getCursor());
646,346
private static void limitTotalMemory(final KsqlBoundedMemoryRocksDBConfig config, final LruCacheFactory cacheFactory, final WriteBufferManagerFactory bufferManagerFactory) {<NEW_LINE>final long blockCacheSize = config.getLong(KsqlBoundedMemoryRocksDBConfig.BLOCK_CACHE_SIZE);<NEW_LINE>final long totalMemtableMemory = co...
, -1, strictCacheLimit, indexFilterBlockRatio);
714,779
public void marshall(GetResourceConfigHistoryRequest getResourceConfigHistoryRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (getResourceConfigHistoryRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller....
getResourceConfigHistoryRequest.getEarlierTime(), EARLIERTIME_BINDING);
1,809,761
protected void migrateToVersion2() throws SQLException {<NEW_LINE>execute("ALTER TABLE %TABLE% ADD STRATEGY_ID VARCHAR(200)");<NEW_LINE>execute("ALTER TABLE %TABLE% ADD STRATEGY_PARAMS VARCHAR(2000)");<NEW_LINE>Statement updateDataStmt = connection.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE...
updateString(Columns.STRATEGY_PARAMS, paramData);
946,746
public void initGui() {<NEW_LINE>super.initGui();<NEW_LINE>tool = new GuiBetterButton(0, guiLeft + 27, guiTop + 111, 15, StandardButtonTextureSets.SMALL_BUTTON, "+");<NEW_LINE>tool.setToolTip(new ToolTip(new ToolTipLine(LocaleUtil.localize("tip.tool.add"))));<NEW_LINE>buttonList.add(tool);<NEW_LINE>fsButton = new GuiBe...
.localize("tip.tool.fullscreen"))));
762,557
private void writeToFile() throws IOException {<NEW_LINE>File path = new File(DataConnector.SIMULATION_PATH);<NEW_LINE>if (!path.exists()) {<NEW_LINE>path.mkdir();<NEW_LINE>System.out.println("[Info] Directory: " + DataConnector.SIMULATION_PATH + " created");<NEW_LINE>}<NEW_LINE>String filename = dataset + "_" + algori...
BufferedWriter(new FileWriter(file));
51,805
public CodegenModel fromModel(String name, Schema model) {<NEW_LINE>CodegenModel cm = <MASK><NEW_LINE>// TODO Check enum model handling<NEW_LINE>if (cm.interfaces == null) {<NEW_LINE>cm.interfaces = new ArrayList<String>();<NEW_LINE>}<NEW_LINE>Boolean hasDefaultValues = false;<NEW_LINE>// for (de)serializing properties...
super.fromModel(name, model);
1,237,087
public void subscribeActual(Observer<? super R> observer) {<NEW_LINE>ObservableSource<? extends R> other;<NEW_LINE>try {<NEW_LINE>other = Objects.requireNonNull(mapper.apply(value), "The mapper returned a null ObservableSource");<NEW_LINE>} catch (Throwable e) {<NEW_LINE>Exceptions.throwIfFatal(e);<NEW_LINE><MASK><NEW_...
EmptyDisposable.error(e, observer);
911,227
public void start() {<NEW_LINE>if (current != null) {<NEW_LINE>current.show();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Form hi = new Form("Hi World", BoxLayout.y());<NEW_LINE>Button titleCmp = new Button("My Title Button") {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void pointerPressed(int x, int y) {<NEW_LINE>System.o...
).setAlignment(Label.LEFT);
1,016,836
private void buildStaticInit(ClassWriter classWriter, Type methodsFieldType) {<NEW_LINE>GeneratorAdapter staticInit = visitStaticInitializer(classWriter);<NEW_LINE>classWriter.visitField(ACC_PRIVATE | ACC_FINAL | ACC_STATIC, FIELD_METHODS_REFERENCES, methodsFieldType.getDescriptor(), null, null);<NEW_LINE>pushNewArray(...
staticInit.visitMaxs(DEFAULT_MAX_STACK, 1);
1,520,414
public void visit(BLangMapAccessExpr astMapAccessExpr) {<NEW_LINE>boolean variableStore = this.varAssignment;<NEW_LINE>this.varAssignment = false;<NEW_LINE><MASK><NEW_LINE>astMapAccessExpr.expr.accept(this);<NEW_LINE>BIROperand varRefRegIndex = this.env.targetOperand;<NEW_LINE>astMapAccessExpr.indexExpr.accept(this);<N...
BIROperand rhsOp = this.env.targetOperand;
1,423,144
/* Example from slides. */<NEW_LINE>public static void main(String[] args) {<NEW_LINE>int n = 7;<NEW_LINE>List<List<Edge>> g = createEmptyGraph(n);<NEW_LINE>addUndirectedEdge(g, 0, 1, 9);<NEW_LINE>addUndirectedEdge(g, 0, 2, 0);<NEW_LINE>addUndirectedEdge(g, 0, 3, 5);<NEW_LINE>addUndirectedEdge(g, 0, 5, 7);<NEW_LINE>add...
System.out.println("MST edges:");
937,199
public void write() throws IOException {<NEW_LINE>byte[] locations = new byte[SECTOR_SIZE];<NEW_LINE>byte[] timestamps = new byte[SECTOR_SIZE];<NEW_LINE>Map<Integer, byte[]> chunkDataList = new HashMap<>();<NEW_LINE>final int[] maxpos = { 0 };<NEW_LINE>updateChunkLocations(chunkMap);<NEW_LINE>chunkMap.forEach((pos, chu...
createDirectories(filePath.getParent());
678,734
public int countForTargetType(String assetGroup, String parentType, Map<String, String> termsFilter, String applicationFilter, String environmentFilter, int from, int size) throws Exception {<NEW_LINE>int count = 0;<NEW_LINE>String targetType = "vulninfo";<NEW_LINE>Map<String, Object> mustFilterMap = new LinkedHashMap<...
applicationFilterMap1.put("match", applicationFilterMap);
1,182,617
public CertificateList unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CertificateList certificateList = new CertificateList();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDep...
class).unmarshall(context));
316,844
public void layoutContainer(Container parent) {<NEW_LINE>int maxWidth = 0;<NEW_LINE>for (JLabel label : labelMap.values()) {<NEW_LINE>int labelPrefWidth = label.getPreferredSize().width;<NEW_LINE>if (labelPrefWidth > maxWidth) {<NEW_LINE>maxWidth = labelPrefWidth;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Insets insets = parent.g...
.left - insets.right - GUTTER_WIDTH;
1,510,094
// Checks whether a given number is Kaprekar Number or not<NEW_LINE>public static boolean isKaprekarNumber(long num) {<NEW_LINE>String number = Long.toString(num);<NEW_LINE>BigInteger originalNumber = new BigInteger(number);<NEW_LINE>BigInteger numberSquared = originalNumber.multiply(originalNumber);<NEW_LINE>if (numbe...
add(rightDigits).toString();
566,419
public Object apply(@Nonnull Context ctx) {<NEW_LINE>MetricRegistry registry = ctx.require(MetricRegistry.class);<NEW_LINE>Map<String, Metric<MASK><NEW_LINE>if (allMetrics.isEmpty()) {<NEW_LINE>ctx.setResponseCode(StatusCode.NOT_IMPLEMENTED);<NEW_LINE>ctx.setResponseHeader(MetricsModule.CACHE_HEADER_NAME, MetricsModule...
> allMetrics = registry.getMetrics();
1,641,635
private void text(double x, double y, double w, double h, String str, TextAlign align, TextBaseline valign, boolean clip, double rotation) {<NEW_LINE>if (state.fillColor == null) {<NEW_LINE>state.<MASK><NEW_LINE>}<NEW_LINE>if (state.fillColor != null) {<NEW_LINE>x = (state.dx + x) * state.scale;<NEW_LINE>y = (state.dy ...
fillColor = convertColor(state.fillColorValue);
320,483
public BatchDetectKeyPhrasesResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>BatchDetectKeyPhrasesResult batchDetectKeyPhrasesResult = new BatchDetectKeyPhrasesResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NE...
String currentParentElement = context.getCurrentParentElement();
1,438,867
protected Object profile(HttpServletRequest request, HttpServletResponse response) {<NEW_LINE>executeCheckPassword(request, response);<NEW_LINE>checkGlobalAuth(ConnectContext.get().getCurrentUserIdentity(), PrivPredicate.ADMIN);<NEW_LINE>Map<String, Object> feVersionInfo = Maps.newHashMap();<NEW_LINE>feVersionInfo.put(...
put("dorisBuildHash", Version.DORIS_BUILD_HASH);
981,746
// Update rotation when there are two fingers working<NEW_LINE>void handleRotation(MotionEvent event) {<NEW_LINE>if (allowRotate && event.getPointerCount() > 1) {<NEW_LINE>final MotionEvent.PointerCoords p0 = new MotionEvent.PointerCoords();<NEW_LINE>final MotionEvent.PointerCoords p1 = new MotionEvent.PointerCoords();...
event.getPointerCoords(0, p0);
236,946
public final void regexExpression(int lc_stmt) throws RecognitionException, TokenStreamException {<NEW_LINE>returnAST = null;<NEW_LINE>ASTPair currentAST = new ASTPair();<NEW_LINE>AST regexExpression_AST = null;<NEW_LINE>equalityExpression(lc_stmt);<NEW_LINE>astFactory.addASTChild(currentAST, returnAST);<NEW_LINE>{<NEW...
(1), getFilename());
51,825
void receiveCommand(Item item, Command command, ZWaveNode node, ZWaveThermostatModeCommandClass commandClass, int endpointId, Map<String, String> arguments) {<NEW_LINE>ZWaveCommandConverter<?, ?> converter = this.getCommandConverter(command.getClass());<NEW_LINE>if (converter == null) {<NEW_LINE>logger.warn("NODE {}: N...
item.getName(), endpointId);
529,909
private ParseAndValidateResult parse(ExecutionInput executionInput, GraphQLSchema graphQLSchema, InstrumentationState instrumentationState) {<NEW_LINE>InstrumentationExecutionParameters parameters = new InstrumentationExecutionParameters(executionInput, graphQLSchema, instrumentationState);<NEW_LINE>InstrumentationCont...
null, parseResult.getSyntaxException());