idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
194,999
public MagnetUri parse(URI uri) {<NEW_LINE>if (!SCHEME.equals(uri.getScheme())) {<NEW_LINE>throw new IllegalArgumentException("Invalid scheme: " + uri.getScheme());<NEW_LINE>}<NEW_LINE>Map<String, List<String>> paramsMap = collectParams(uri);<NEW_LINE>Set<String> infoHashes = getRequiredParam(UriParams.TORRENT_ID, para...
, infoHashes.size()));
1,513,524
public MaterialInstance findMaterialInstance(MaterialConfig materialConfig) {<NEW_LINE>String cacheKey = materialKey(materialConfig.getFingerprint());<NEW_LINE>MaterialInstance materialInstance = (<MASK><NEW_LINE>if (materialInstance == null) {<NEW_LINE>synchronized (cacheKey) {<NEW_LINE>materialInstance = (MaterialIns...
MaterialInstance) goCache.get(cacheKey);
493,601
public int vote(Authentication authentication, FilterInvocation filter, Collection<ConfigAttribute> attributes) {<NEW_LINE>if ("anonymousUser".equals(authentication.getPrincipal())) {<NEW_LINE>return ACCESS_DENIED;<NEW_LINE>}<NEW_LINE>if (!(authentication.getPrincipal() instanceof SecuredUser)) {<NEW_LINE>return ACCESS...
cast(authentication.getPrincipal());
789,376
public void createMenuItems(Bundle savedInstanceState) {<NEW_LINE>OsmandApplication app = requiredMyApplication();<NEW_LINE>if (savedInstanceState != null) {<NEW_LINE>minZoom = savedInstanceState.getInt(MIN_ZOOM_KEY);<NEW_LINE><MASK><NEW_LINE>dialogDescrRes = savedInstanceState.getInt(DIALOG_DESCR_RES_KEY);<NEW_LINE>sl...
maxZoom = savedInstanceState.getInt(MAX_ZOOM_KEY);
534,733
public BuildRule createBuildRule(BuildRuleCreationContextWithTargetGraph context, BuildTarget buildTarget, BuildRuleParams params, AppleToolchainSetDescriptionArg args) {<NEW_LINE>Verify.verify(!buildTarget.isFlavored());<NEW_LINE>ImmutableList.Builder<AppleCxxPlatform> appleCxxPlatformsBuilder = ImmutableList.builder(...
getActionGraphBuilder().getRule(target);
1,833,691
public boolean replaceEvent(GameEvent event, Ability source, Game game) {<NEW_LINE>Permanent creature = game.getPermanent(event.getSourceId());<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>if (creature != null && controller != null) {<NEW_LINE>if (exertOnlyOncePerTurn) {<NEW_LINE>Mage...
"", creature.getControllerId());
1,849,015
private void handleDescribeModel(ChannelHandlerContext ctx, String modelName) throws ModelNotFoundException {<NEW_LINE>ModelManager modelManager = ModelManager.getInstance();<NEW_LINE>Model model = modelManager.getModels().get(modelName);<NEW_LINE>if (model == null) {<NEW_LINE>throw new ModelNotFoundException("Model no...
setMinWorkers(model.getMinWorkers());
976,456
public EPCompiled compile(Module module, CompilerArguments arguments) throws EPCompileException {<NEW_LINE>if (arguments == null) {<NEW_LINE>arguments = new CompilerArguments(new Configuration());<NEW_LINE>}<NEW_LINE>// determine module name<NEW_LINE>String moduleName = determineModuleName(arguments.getOptions(), modul...
module.getImports(), compileTimeServices);
1,641,903
private static AppDatabase buildDatabase(final Context appContext, final AppExecutors executors) {<NEW_LINE>return Room.databaseBuilder(appContext, AppDatabase.class, DATABASE_NAME).addCallback(new Callback() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onCreate(@NonNull SupportSQLiteDatabase db) {<NEW_LINE>supe...
insertData(database, products, comments);
353,001
private Drawable applyRippleEffectWhenNeeded(Drawable selectable) {<NEW_LINE>if (mRippleColor != null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && selectable instanceof RippleDrawable) {<NEW_LINE>int[][] states = new int[][] { new int[] { android.R.attr.state_enabled } };<NEW_LINE>int[] colors = new int[...
) selectable).setColor(colorStateList);
566,367
public Result processWorkPackage(final I_C_Queue_WorkPackage workPackage, final String localTrxName) {<NEW_LINE>final ILoggable loggable = Loggables.get();<NEW_LINE>final IParams params = getParameters();<NEW_LINE>//<NEW_LINE>// Extract param: SQL code to execute (and normalize it)<NEW_LINE>final String workPackageSqlR...
ctx = InterfaceWrapperHelper.getCtx(workPackage);
1,479,336
public void actionPerformed(ActionEvent e) {<NEW_LINE>try {<NEW_LINE>// XmlObject xmlObject = XmlObject.Factory.parse(<NEW_LINE>// inputArea.getText() );<NEW_LINE>XmlObject xmlObject = XmlUtils.<MASK><NEW_LINE>XmlObject[] objects;<NEW_LINE>// xquery?<NEW_LINE>if (queryTabs.getSelectedIndex() == 0) {<NEW_LINE>objects = ...
createXmlObject(inputArea.getText());
453,079
protected static void patchEs256ForAuth(String deviceId, String publicKeyFilePath, String projectId, String cloudRegion, String registryName) throws GeneralSecurityException, IOException {<NEW_LINE>GoogleCredentials credential = GoogleCredentials.getApplicationDefault().createScoped(CloudIotScopes.all());<NEW_LINE>Json...
HttpRequestInitializer init = new HttpCredentialsAdapter(credential);
543,014
protected void logRefChange(Collection<ReceiveCommand> commands) {<NEW_LINE>boolean isRefCreationOrDeletion = false;<NEW_LINE>// log ref changes<NEW_LINE>for (ReceiveCommand cmd : commands) {<NEW_LINE>if (Result.OK.equals(cmd.getResult())) {<NEW_LINE>// add some logging for important ref changes<NEW_LINE>switch(cmd.get...
().name()));
586,142
public DocumentExamples extract(int id, Document document, Map<Pair<Integer, Integer>, Boolean> labeledPairs, Compressor<String> compressor) {<NEW_LINE>List<Mention> mentionsList = CorefUtils.getSortedMentions(document);<NEW_LINE>Map<Integer, List<Mention>> mentionsByHeadIndex = new HashMap<>();<NEW_LINE>for (Mention m...
mentionsToExtract.add(m2.mentionID);
758,599
public int insert(SequenceOptRecord record) {<NEW_LINE>try {<NEW_LINE>DdlMetaLogUtil.logSql(INSERT_SEQ_OPT_TABLE, record.buildInsertParams());<NEW_LINE>return MetaDbUtil.insert(INSERT_SEQ_OPT_TABLE, <MASK><NEW_LINE>} catch (SQLException e) {<NEW_LINE>String extraMsg = "";<NEW_LINE>if (checkIfDuplicate(e)) {<NEW_LINE>Se...
record.buildInsertParams(), connection);
575,950
private void catchup(final Account account) {<NEW_LINE>synchronized (this.queries) {<NEW_LINE>for (Iterator<Query> iterator = this.queries.iterator(); iterator.hasNext(); ) {<NEW_LINE>Query query = iterator.next();<NEW_LINE>if (query.getAccount() == account) {<NEW_LINE>iterator.remove();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>...
this.queries.add(query);
1,608,847
private void checkAndHandlePrivateTransaction(final Transaction transaction, final GoQuorumSendRawTxArgs rawTxArgs, final JsonRpcRequestContext requestContext) {<NEW_LINE>// rawTxArgs cannot be null as the call to getRequiredParameter would have failed if it was not<NEW_LINE>// available<NEW_LINE>if (rawTxArgs.getPriva...
throw new JsonRpcErrorResponseException(JsonRpcError.GOQUORUM_NO_PRIVATE_FOR);
1,673,227
public static int launchJavaVM(final Activity activity, final List<String> JVMArgs) throws Throwable {<NEW_LINE>JREUtils.relocateLibPath(activity);<NEW_LINE>// For debugging only!<NEW_LINE>setJavaEnvironment(activity);<NEW_LINE>final String graphicsLib = loadGraphicsLibrary();<NEW_LINE>List<String> userArgs = getJavaAr...
userArgs.add(0, "java");
1,744,947
public Clustering<BiclusterWithInversionsModel> biclustering() {<NEW_LINE>double[][] mat = RelationUtil.relationAsMatrix(relation, rowIDs);<NEW_LINE>BiclusterCandidate cand = new BiclusterCandidate(getRowDim(), getColDim());<NEW_LINE>Clustering<BiclusterWithInversionsModel> result = new Clustering<>();<NEW_LINE>Metadat...
rowcard + "x" + cand.colcard);
1,661,125
public ShareClientBuilder connectionString(String connectionString) {<NEW_LINE>StorageConnectionString storageConnectionString = StorageConnectionString.create(connectionString, LOGGER);<NEW_LINE><MASK><NEW_LINE>if (endpoint == null || endpoint.getPrimaryUri() == null) {<NEW_LINE>throw LOGGER.logExceptionAsError(new Il...
StorageEndpoint endpoint = storageConnectionString.getFileEndpoint();
48,582
public void addDetailedEntries(@Nonnull ItemStack itemstack, @Nullable EntityPlayer entityplayer, @Nonnull List<String> list, boolean flag) {<NEW_LINE>if (!SpecialTooltipHandler.showDurability(flag)) {<NEW_LINE>list.add(ItemUtil.getDurabilityString(itemstack));<NEW_LINE>}<NEW_LINE>String str = EnergyUpgradeManager.getS...
Lang.AXE_MULTIHARVEST.get());
522,460
public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder source, RecyclerView.ViewHolder target) {<NEW_LINE>if (source.getItemViewType() != target.getItemViewType()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (NekoConfig.enableStickerPin.Bool() && currentType == MediaDataController.TYPE_IMAGE) {<NE...
listAdapter.swapElements(from, to);
812,242
public void receiveMessages(Duration timeout, boolean returnOnTimeout, Manager.ReceiveMessageHandler handler) throws IOException {<NEW_LINE>needsToRetryFailedMessages = true;<NEW_LINE>hasCaughtUpWithOldMessages = false;<NEW_LINE>// Use a Map here because java Set doesn't have a get method ...<NEW_LINE>Map<HandleAction,...
queuedActions = new HashMap<>();
587,485
protected String doIt() throws Exception {<NEW_LINE>log.info("C_OrderLine_ID=" + p_C_OrderLine_ID);<NEW_LINE>if (p_C_OrderLine_ID == 0)<NEW_LINE>throw new IllegalArgumentException("No OrderLine");<NEW_LINE>//<NEW_LINE>MOrderLine line = new MOrderLine(getCtx(), p_C_OrderLine_ID, get_TrxName());<NEW_LINE>if (line.get_ID(...
throw new IllegalArgumentException("Production has already been created: " + docNo);
147,706
// creates the rate computation<NEW_LINE>private RateComputation createRateComputation(SchedulePeriod period, DateAdjuster fixingDateAdjuster, Function<SchedulePeriod, Schedule> resetScheduleFn, Function<LocalDate, IborIndexObservation> iborObservationFn, int scheduleIndex, Optional<SchedulePeriod> scheduleInitialStub,...
(fixingRelativeTo.selectBaseDate(period));
1,667,799
public void writeAsBibtexCitation(OutputStream os) throws IOException {<NEW_LINE>// Use UTF-8<NEW_LINE>Writer out = new BufferedWriter(new OutputStreamWriter(os, "utf-8"));<NEW_LINE>if (getFileTitle() != null && isDirect()) {<NEW_LINE>out.write("@incollection{");<NEW_LINE>} else {<NEW_LINE>out.write("@data{");<NEW_LINE...
"_" + year + "," + "\r\n");
1,311,716
public void onStart() {<NEW_LINE>super.onStart();<NEW_LINE>createSessionViewModel.getProgress().observe(this, this::showProgress);<NEW_LINE>createSessionViewModel.getDismiss().observe(this, <MASK><NEW_LINE>createSessionViewModel.getSuccess().observe(this, this::onSuccess);<NEW_LINE>createSessionViewModel.getError().obs...
(dismiss) -> dismiss());
1,698,892
public ValueNode canonical(CanonicalizerTool tool, ValueNode forX, ValueNode forY) {<NEW_LINE>NodeView <MASK><NEW_LINE>if (forX.isConstant() && forY.isConstant()) {<NEW_LINE>long yConst = forY.asJavaConstant().asLong();<NEW_LINE>if (yConst == 0) {<NEW_LINE>// Replacing a previous never 0 with constant zero can create t...
view = NodeView.from(tool);
639,600
private void initTabs(@NonNull PullRequest pullRequest) {<NEW_LINE>TabLayout.Tab tab1 = tabs.getTabAt(0);<NEW_LINE>TabLayout.Tab tab2 = tabs.getTabAt(1);<NEW_LINE>TabLayout.Tab tab3 = tabs.getTabAt(2);<NEW_LINE>if (tab3 != null) {<NEW_LINE>tab3.setText(SpannableBuilder.builder().append(getString(R.string.files)).append...
)).append(")"));
189,486
private void drawShape(Fixture fixture, Transform transform, Color color) {<NEW_LINE>if (fixture.getType() == Type.Circle) {<NEW_LINE>CircleShape circle = (CircleShape) fixture.getShape();<NEW_LINE>t.set(circle.getPosition());<NEW_LINE>transform.mul(t);<NEW_LINE>drawSolidCircle(t, circle.getRadius(), axis.set(transform...
.mul(vertices[i]);
1,399,287
private DruidScanResponse parseResponse(ArrayNode responses) {<NEW_LINE>String segmentId = "empty";<NEW_LINE>ArrayList<ObjectNode> events = new ArrayList<>();<NEW_LINE>ArrayList<String> <MASK><NEW_LINE>if (responses.size() > 0) {<NEW_LINE>ObjectNode firstNode = (ObjectNode) responses.get(0);<NEW_LINE>segmentId = firstN...
columns = new ArrayList<>();
1,290,248
public RegisterGameServerResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>RegisterGameServerResult registerGameServerResult = new RegisterGameServerResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NE...
().unmarshall(context));
67,453
public Object call(Method m, Object[] args) {<NEW_LINE>U.must(!config.isEmpty(), "Cannot find configuration for the REST client interface: %s", clientInterface.getSimpleName());<NEW_LINE>Config cfg = config.sub(m.getName());<NEW_LINE>String verb = verbOf(cfg);<NEW_LINE>String url = cfg.entry(verb).str().get();<NEW_LINE...
String.format(url, args);
209,144
public InboundCrossClusterSearchConnection unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>InboundCrossClusterSearchConnection inboundCrossClusterSearchConnection = new InboundCrossClusterSearchConnection();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int tar...
String currentParentElement = context.getCurrentParentElement();
1,410,371
public void Output(IFragment<Long, Long, Long, Double> frag) {<NEW_LINE>String prefix = "/tmp/pagerank_parallel_output";<NEW_LINE>logger.info("sum double " + sumDoubleTime / 10e9 + " swap time " + swapTime / 10e9);<NEW_LINE>String filePath = prefix + "_frag_" + String.valueOf(frag.fid());<NEW_LINE>try {<NEW_LINE>FileWr...
> innerNodes = frag.innerVertices();
1,130,431
public static final MiosBindingConfig create(String context, String itemName, String unitName, int id, String stuff, Class<? extends Item> itemType, String commandTransform, String inTransform, String outTransform) throws BindingConfigParseException {<NEW_LINE>ParameterDefaults pd = paramDefaults.get(stuff);<NEW_LINE>i...
trace("Scene ParameterDefaults '{}' defaulted in: to '{}'", itemName, inTransform);
1,548,835
public String login(int AD_Org_ID, int AD_Role_ID, int AD_User_ID) {<NEW_LINE>if (!Ini.isSwingClient())<NEW_LINE>return null;<NEW_LINE>//<NEW_LINE>// UI<NEW_LINE>boolean changed = false;<NEW_LINE>final ISysConfigBL sysConfigBL = <MASK><NEW_LINE>ValueNamePair laf = getLookByName(sysConfigBL.getValue(SYSCONFIG_UILookFeel...
Services.get(ISysConfigBL.class);
1,643,999
public AutoTuneOptions unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AutoTuneOptions autoTuneOptions = new AutoTuneOptions();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDep...
class).unmarshall(context));
1,081,433
public DateType invoke() {<NEW_LINE>if (!SQLDataTypeImpl.class.isInstance(dataType)) {<NEW_LINE>return this;<NEW_LINE>}<NEW_LINE>String[] signed = { "UNSIGNED", "SIGNED" };<NEW_LINE>String name = dataType.getName();<NEW_LINE>String dataTypeString = null;<NEW_LINE>if (signed[1].equalsIgnoreCase(name)) {<NEW_LINE>if (!da...
sqlExpr = arguments.get(0);
1,738,043
public Sequence list(VDB vdb, String opt) {<NEW_LINE>ArchiveDir[] subDirs = this.subDirs;<NEW_LINE>if (subDirs == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>int size = subDirs.length;<NEW_LINE>Sequence seq = new Sequence(size);<NEW_LINE>boolean listFiles = true, listDirs = false;<NEW_LINE>if (opt != null) {<NEW_...
getSection(vdb.getLibrary());
624,485
final CreateContainerServiceDeploymentResult executeCreateContainerServiceDeployment(CreateContainerServiceDeploymentRequest createContainerServiceDeploymentRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createContainerServiceDeploymentRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetri...
(super.beforeMarshalling(createContainerServiceDeploymentRequest));
27,631
public void adjustAllBy(long offset) {<NEW_LINE>// fix up the timers<NEW_LINE>synchronized (this) {<NEW_LINE>// as we're adjusting all events by the same amount the ordering remains valid<NEW_LINE>Iterator<TimerEvent> it = events.iterator();<NEW_LINE>boolean resort = false;<NEW_LINE>while (it.hasNext()) {<NEW_LINE>Time...
new ArrayList<>(events));
175,464
public final void hide(Duration fadeOutDuration) {<NEW_LINE>log.info("hide:" + fadeOutDuration.toString());<NEW_LINE>// We must remove EventFilter in order to prevent memory leak.<NEW_LINE>if (ownerWindow != null) {<NEW_LINE>ownerWindow.removeEventFilter(WindowEvent.WINDOW_CLOSE_REQUEST, closePopOverOnOwnerWindowClose)...
= new FadeTransition(fadeOutDuration, skinNode);
1,203,036
public PriceScheduleSpecification unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>PriceScheduleSpecification priceScheduleSpecification = new PriceScheduleSpecification();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.i...
().unmarshall(context));
423,626
/* Build call for applicationsApplicationIdPut */<NEW_LINE>private com.squareup.okhttp.Call applicationsApplicationIdPutCall(String applicationId, Application body, String contentType, String ifMatch, String ifUnmodifiedSince, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.Progr...
localVarHeaderParams.put("Content-Type", localVarContentType);
271,575
public void marshall(Application application, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (application == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(application.getName(), NAME_BINDING);<NEW_LINE>prot...
application.getMetadata(), METADATA_BINDING);
1,530,014
private void convertSharedDirtyPagesToLocal() {<NEW_LINE>for (final Map.Entry<PageKey, OLogSequenceNumber> entry : dirtyPages.entrySet()) {<NEW_LINE>final OLogSequenceNumber localLSN = localDirtyPages.get(entry.getKey());<NEW_LINE>if (localLSN == null || localLSN.compareTo(entry.getValue()) > 0) {<NEW_LINE>localDirtyPa...
localDirtyPagesBySegment.put(segment, pages);
632,665
private void updateDependencyVersions() {<NEW_LINE>// Remove all dangling nodes in the graph builder.<NEW_LINE>graphBuilder.removeDanglingNodes();<NEW_LINE>// Get unresolved nodes. This list is based on the sticky option.<NEW_LINE>Collection<MASK><NEW_LINE>List<DependencyNode> errorNodes = new ArrayList<>();<NEW_LINE>/...
<DependencyNode> unresolvedNodes = getUnresolvedNode();
1,776,673
private void decodeSpkac(byte[] der) throws SpkacException {<NEW_LINE>try {<NEW_LINE>ASN1Sequence signedPublicKeyAndChallenge = ASN1Sequence.getInstance(der);<NEW_LINE>ASN1Sequence publicKeyAndChallenge = (ASN1Sequence) signedPublicKeyAndChallenge.getObjectAt(0);<NEW_LINE>ASN1Sequence signatureAlgorithm = (ASN1Sequence...
ASN1Sequence) publicKeyAndChallenge.getObjectAt(0);
229,170
public static DescribePropertyScaDetailResponse unmarshall(DescribePropertyScaDetailResponse describePropertyScaDetailResponse, UnmarshallerContext _ctx) {<NEW_LINE>describePropertyScaDetailResponse.setRequestId(_ctx.stringValue("DescribePropertyScaDetailResponse.RequestId"));<NEW_LINE>PageInfo pageInfo = new PageInfo(...
("DescribePropertyScaDetailResponse.Propertys[" + i + "].ProcessUser"));
427,027
public int compare(ClusterModelStats stats1, ClusterModelStats stats2) {<NEW_LINE>// Number of balanced brokers in the highest priority resource cannot be more than the pre-optimized<NEW_LINE>// stats. This constraint is applicable for the rest of the resources, if their higher priority resources<NEW_LINE>// have the s...
).get(resource());
408,552
private HttpURLConnection connect0(final URI ipUri, final String method, final byte[] entity, final Map<String, List<String>> headers, final String endpointHost) throws IOException {<NEW_LINE>if (log.isTraceEnabled()) {<NEW_LINE>log.trace("req: {} {} {} {} {} {}", method, ipUri, headers.size(), Joiner.on(',').withKeyVa...
header.getKey(), value);
921,678
private static Constraint parseQualifiedValueShape(Graph g, Node s, Node p, Node o, Map<Node, Shape> parsed, Set<Node> traversed) {<NEW_LINE>Shape sub = ShapesParser.parseShapeStep(traversed, parsed, g, o);<NEW_LINE>// [PARSE] Syntax check needed<NEW_LINE>Node qMin = G.getZeroOrOneSP(g, s, SHACL.qualifiedMinCount);<NEW...
g, s, SHACL.qualifiedValueShapesDisjoint);
1,270,918
public void removeACL(Collection<String> listIPs, int from, int to) {<NEW_LINE>AmazonEC2 client = null;<NEW_LINE>try {<NEW_LINE>client = getEc2Client();<NEW_LINE>List<IpPermission> ipPermissions = new ArrayList<>();<NEW_LINE>ipPermissions.add(new IpPermission().withFromPort(from).withIpProtocol("tcp").withIpRanges(list...
.join(listIPs, ","));
609,421
public static long createAuditRecord(String userId, String filename) {<NEW_LINE>DotConnect db = new DotConnect();<NEW_LINE>db.setSQL("SELECT max(id) as max FROM import_audit");<NEW_LINE>ArrayList<Map<String, String>> ret;<NEW_LINE>try {<NEW_LINE>ret = db.loadResults();<NEW_LINE>} catch (DotDataException e1) {<NEW_LINE>...
.get("max")) + 1;
953,963
private void fixIndentOfMovedNode(NodeText nodeText, int index) {<NEW_LINE>if (index <= 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>TextElement currentSpaceCandidate = null;<NEW_LINE>for (int i = index - 1; i >= 0; i--) {<NEW_LINE>TextElement spaceCandidate = nodeText.getTextElement(i);<NEW_LINE>if (spaceCandidate.isSpac...
.SPACE.getKind()));
1,596,794
protected FieldMetadata createExplicitEnumerationIndividualOptionField(ProductOption option, int order) {<NEW_LINE>BasicFieldMetadata metadata = new BasicFieldMetadata();<NEW_LINE>List<ProductOptionValue> allowedValues = option.getAllowedValues();<NEW_LINE>if (CollectionUtils.isNotEmpty(allowedValues)) {<NEW_LINE>metad...
1] = value.getAttributeValue();
971,518
public boolean verifyColumnMasterKeyMetadata(String masterKeyPath, boolean allowEnclaveComputations, byte[] signature) throws SQLServerException {<NEW_LINE>if (!allowEnclaveComputations) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>KeyStoreProviderCommon.validateNonEmptyMasterKeyPath(masterKeyPath);<NEW_LINE>CMKMetadat...
CMKMetadataSignatureInfo(masterKeyPath, allowEnclaveComputations, signature);
824,426
private boolean sameScalar(ScalarValue want, JsonObject parent, String name) throws Exception {<NEW_LINE>trace("comparing object scalar property " + name);<NEW_LINE>String regexp = want.getRegexp();<NEW_LINE>if (want instanceof StringValue) {<NEW_LINE>return sameString(((StringValue) want).getValue(), regexp<MASK><NEW_...
, parent.getString(name));
1,084,970
public static Action<MapProperty<String, String>> bundleDefaults(Project project) {<NEW_LINE>return properties -> {<NEW_LINE>project.getPlugins().withType(PublishingPlugin.class).configureEach(publishingPlugin -> {<NEW_LINE>project.getExtensions().getByType(PublishingExtension.class).getPublications().withType(MavenPub...
"." + project.getName());
195,702
private void visitGeneratedElements(RoundEnvironment roundEnv, TypeElement generatedElement) {<NEW_LINE>for (Element ae : roundEnv.getElementsAnnotatedWith(generatedElement)) {<NEW_LINE>String comments = getGeneratedComments(ae, generatedElement);<NEW_LINE>if (comments == null || !comments.startsWith(Metadata.ANNOTATIO...
UsageAsInputReportingJavaFileObject) file).markUsed();
1,852,404
public void fillCompletionVariants(@NotNull CompletionParameters parameters, @NotNull CompletionResultSet result) {<NEW_LINE>final Optional<SwaggerFileType> maybeFileType = swaggerIndexService.getFileType(parameters);<NEW_LINE>maybeFileType.ifPresent(fileType -> {<NEW_LINE>final PathResolver pathResolver = PathResolver...
).ifPresent(FieldCompletion::fill);
1,067,173
public void test2(Tester arg) {<NEW_LINE>Tester local = new Tester();<NEW_LINE>// Do we correctly distinguish checkArgument from checkState?<NEW_LINE>// BUG: Suggestion includes "checkArgument(arg.hasId())"<NEW_LINE>checkNotNull(arg.hasId());<NEW_LINE>// BUG: Suggestion includes "checkState(field.hasId())"<NEW_LINE>che...
(!local.hasId());
1,854,467
void readExternal(Element element) {<NEW_LINE>myId = element.getAttributeValue(ATTRIBUTE_ID);<NEW_LINE>myTipFileName = element.getAttributeValue(ATTRIBUTE_TIP_FILE);<NEW_LINE><MASK><NEW_LINE>myDaysBeforeFirstShowUp = Integer.parseInt(element.getAttributeValue(ATTRIBUTE_FIRST_SHOW));<NEW_LINE>myDaysBetweenSuccesiveShowU...
myDisplayName = FeatureStatisticsBundle.message(myId);
101,317
final BatchGetCustomDataIdentifiersResult executeBatchGetCustomDataIdentifiers(BatchGetCustomDataIdentifiersRequest batchGetCustomDataIdentifiersRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(batchGetCustomDataIdentifiersRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionC...
addHandlerContext(HandlerContextKey.SERVICE_ID, "Macie2");
1,259,242
public void run(RegressionEnvironment env) {<NEW_LINE>ConditionHandlerFactoryContext conditionHandlerFactoryContext = SupportConditionHandlerFactory.getFactoryContexts().get(0);<NEW_LINE>assertEquals(conditionHandlerFactoryContext.getRuntimeURI(), env.runtimeURI());<NEW_LINE>handler = SupportConditionHandlerFactory.get...
new Object[] { "C" });
1,727,652
static private // the ValueWithPath instance itself should not be.<NEW_LINE>ResultWithPath findInObject(AbstractConfigObject obj, ResolveContext context, Path path) throws NotPossibleToResolve {<NEW_LINE>// resolve ONLY portions of the object which are along our path<NEW_LINE>if (ConfigImpl.traceSubstitutionsEnabled())...
partiallyResolved.context.restrict(restriction);
153,358
protected void allocateInputBuffers(int numInputBuffers) {<NEW_LINE>if (!this.isHWEncoderInitialized()) {<NEW_LINE>System.err.println("Encoder intialization failed");<NEW_LINE>}<NEW_LINE>// for MEOnly mode we need to allocate seperate set of buffers for reference frame<NEW_LINE>int numCount = this.motionEstimationOnly ...
LongPointer deviceFramePointer = new LongPointer(1);
8,184
private void layoutVertical(int left, int top, int right, int bottom) {<NEW_LINE>int paddingLeft = this.getPaddingLeft();<NEW_LINE>int paddingRight = this.getPaddingRight();<NEW_LINE>int paddingTop = this.getPaddingTop();<NEW_LINE><MASK><NEW_LINE>int childTop = 0;<NEW_LINE>int childLeft = paddingLeft;<NEW_LINE>int chil...
int paddingBottom = this.getPaddingBottom();
1,060,886
protected void validateAndUpdateUsernameIfNeeded(UpdateUserCmd updateUserCmd, UserVO user, Account account) {<NEW_LINE>String userName = updateUserCmd.getUsername();<NEW_LINE>if (userName == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (StringUtils.isBlank(userName)) {<NEW_LINE>throw new InvalidParameterValueExcepti...
findById(duplicatedUserAccountWithUserThatHasTheSameUserName.getDomainId());
812,635
public void insertString(int offset, String str, AttributeSet attributeSet) throws BadLocationException {<NEW_LINE>final int off;<NEW_LINE>final int docLen = getLength();<NEW_LINE>// start of input<NEW_LINE>final int inputOff = docLen - inBuffer.length();<NEW_LINE>if (inputOff != lastInputOff) {<NEW_LINE>// output writ...
int length = getLength() - start;
1,608,834
public void onConnectionWrapped(ConnectionInformation connectionInformation) {<NEW_LINE>final Metric2Registry metricRegistry = corePlugin.getMetricRegistry();<NEW_LINE>// at the moment stagemonitor only supports monitoring connections initiated via a DataSource<NEW_LINE>if (connectionInformation.getDataSource() instanc...
incrementAndGetContextValue(span, TIME_TO_GET_CONNECTION_MS_ATTRIBUTE, timeToGetConnectionMs);
742,300
public void createUsersWithListInput(List<User> body) throws TimeoutException, ExecutionException, InterruptedException, ApiException {<NEW_LINE>Object postBody = body;<NEW_LINE>// verify the required parameter 'body' is set<NEW_LINE>if (body == null) {<NEW_LINE>VolleyError error = new VolleyError("Missing the required...
= new ArrayList<Pair>();
460,962
public void visit(BLangBinaryExpr binaryExpr) {<NEW_LINE>BLangExpression lhsExpr = binaryExpr.lhsExpr;<NEW_LINE>BLangExpression rhsExpr = binaryExpr.rhsExpr;<NEW_LINE>OperatorKind opKind = binaryExpr.opKind;<NEW_LINE>if (opKind == OperatorKind.EQUAL || opKind == OperatorKind.NOT_EQUAL) {<NEW_LINE>// eg a == 5, a == (),...
narrowTypeForEqualOrNotEqual(binaryExpr, lhsExpr, rhsExpr);
902,957
public void onStyleLoaded(@NonNull Style style) {<NEW_LINE>// Use Turf to calculate the coordinates for the outer ring of the final Polygon<NEW_LINE>Polygon outerCirclePolygon = getTurfPolygon(OUTER_CIRCLE_MILE_RADIUS, centerPoint);<NEW_LINE>// Use Turf to calculate the coordinates for the inner ring of the final Polyg...
(innerCirclePolygon, false))));
1,555,067
protected void registerInterceptors(final IModelValidationEngine engine) {<NEW_LINE>// Role and included roles<NEW_LINE>engine.addModelValidator(de.metas.security.model.interceptor.AD_Role.instance);<NEW_LINE>engine.addModelValidator(de.metas.security.model.interceptor.AD_Role_Included.instance);<NEW_LINE>engine.addMod...
model.interceptor.AD_Process.instance);
278,652
public JSONObject view(String packageName) {<NEW_LINE>List<String> params = new ArrayList<>();<NEW_LINE>// NOI18N<NEW_LINE>params.add("view");<NEW_LINE>// NOI18N<NEW_LINE>params.add("--json");<NEW_LINE>params.add(packageName);<NEW_LINE>JSONObject info = null;<NEW_LINE>try {<NEW_LINE>StringBuilderInputProcessorFactory f...
Level.INFO, null, ex);
1,535,754
public synchronized Map<String, String> loadCache(int entrySize) throws IOException {<NEW_LINE>Map<String, String> <MASK><NEW_LINE>try (BufferedReader reader = new BufferedReader(new FileReader(cacheFile))) {<NEW_LINE>int count = 1;<NEW_LINE>String line = reader.readLine();<NEW_LINE>while (line != null && count <= entr...
properties = new HashMap<>();
937,498
final CreateActivationResult executeCreateActivation(CreateActivationRequest createActivationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createActivationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv...
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
7,213
public static void main(String[] args) throws java.lang.Exception {<NEW_LINE>EventQueue.invokeAndWait(new Runnable() {<NEW_LINE><NEW_LINE>public void run() {<NEW_LINE>try {<NEW_LINE>canvasFrame = new GLCanvasFrame("Some Title");<NEW_LINE>canvasFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);<NEW_LINE>// canvasFram...
canvasFrame.showColor(Color.RED);
1,287,632
public static WritableComparable convertToWritableComparable(Object value, FieldSpec.DataType dataType) {<NEW_LINE>if (value instanceof Number) {<NEW_LINE>Number numberValue = (Number) value;<NEW_LINE>switch(dataType) {<NEW_LINE>case INT:<NEW_LINE>return new IntWritable(numberValue.intValue());<NEW_LINE>case LONG:<NEW_...
LongWritable(numberValue.longValue());
365,303
public boolean validateTableStatusFunction(Properties props, Logger log, RefExecutionAction action) {<NEW_LINE>if (jobDS == null) {<NEW_LINE>jobDS = DataDruidFactory.getJobInstance(props, log);<NEW_LINE>if (jobDS == null) {<NEW_LINE>log.error("Error getting Druid DataSource instance");<NEW_LINE>return false;<NEW_LINE>}...
log.info("(DataChecker info) database table partition info : " + dataCheckerInfo);
83,408
final DescribeIdentityResult executeDescribeIdentity(DescribeIdentityRequest describeIdentityRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeIdentityRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv...
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
258,471
protected void collectAdditionalElementsToRename(List<Pair<PsiElement, TextRange>> stringUsages) {<NEW_LINE>if (isReplaceAllOccurrences()) {<NEW_LINE>for (E expression : getOccurrences()) {<NEW_LINE>LOG.assertTrue(expression.isValid(), expression.getText());<NEW_LINE>stringUsages.add(Pair.<PsiElement, TextRange>create(...
), expr.getText());
386,507
public static void horizontal(GrayU16 src, GrayF32 dst) {<NEW_LINE>if (src.width < dst.width)<NEW_LINE>throw new IllegalArgumentException("src width must be >= dst width");<NEW_LINE>if (src.height != dst.height)<NEW_LINE>throw new IllegalArgumentException("src height must equal dst height");<NEW_LINE>float scale = src....
src.getIndex(isrcX0, y);
1,452,704
public void axpy(long n, double alpha, INDArray x, INDArray y) {<NEW_LINE>if (Nd4j.getExecutioner().getProfilingMode() == OpExecutioner.ProfilingMode.ALL)<NEW_LINE>OpProfiler.getInstance().processBlasCall(false, x, y);<NEW_LINE>if (x.data().dataType() == DataType.DOUBLE) {<NEW_LINE>DefaultOpExecutioner.validateDataType...
DataType.DOUBLE, x, y);
265,437
private void encodeUtf8ComponentSlow(CharSequence s, int start, int len) {<NEW_LINE>for (int i = start; i < len; i++) {<NEW_LINE>char c = s.charAt(i);<NEW_LINE>if (c < 0x80) {<NEW_LINE>if (dontNeedEncoding(c)) {<NEW_LINE>uriBuilder.append(c);<NEW_LINE>} else {<NEW_LINE>appendEncoded(c);<NEW_LINE>}<NEW_LINE>} else if (c...
, s.charAt(i));
1,754,180
/*TODO readd<NEW_LINE>@Override<NEW_LINE>public void openManual()<NEW_LINE>{<NEW_LINE>if(improveReadability())<NEW_LINE>{<NEW_LINE>((IEItemFontRender)this.fontRenderer).spacingModifier = -.5f;<NEW_LINE>((IEItemFontRender)this.fontRenderer).customSpaceWidth = 1f;<NEW_LINE>}<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LI...
this.fontRenderer).verticalBoldness = false;
515,732
public List<TextRange> select(final PsiElement e, final CharSequence editorText, final int cursorOffset, final Editor editor) {<NEW_LINE>final VirtualFile file = e.getContainingFile().getVirtualFile();<NEW_LINE>final FileType fileType = file == null ? null : file.getFileType();<NEW_LINE>if (fileType == null)<NEW_LINE>r...
add(e.getTextRange());
37,770
// /////////////////////////////////////////////////////////////////////////////////////////<NEW_LINE>// TradeProtocol implementation<NEW_LINE>// /////////////////////////////////////////////////////////////////////////////////////////<NEW_LINE>@Override<NEW_LINE>protected void onAckMessage(AckMessage ackMessage, NodeA...
), ackMessage.getErrorMessage());
748,612
public boolean hasPlayerFaceImage(String playername, FaceType facetype) {<NEW_LINE>String baseKey = prefix + "tiles/faces/" + facetype.id + "/" + playername + ".png";<NEW_LINE>boolean exists = false;<NEW_LINE>S3Client s3 = getConnection();<NEW_LINE>try {<NEW_LINE>ListObjectsV2Request req = ListObjectsV2Request.builder(...
maxKeys(1).build();
673,185
private void loadSegment() throws IOException {<NEW_LINE>// Try filling the ciphertextSegment<NEW_LINE>while (!endOfCiphertext && ciphertextSegment.remaining() > 0) {<NEW_LINE>int read = in.read(ciphertextSegment.array(), ciphertextSegment.position(), ciphertextSegment.remaining());<NEW_LINE>if (read > 0) {<NEW_LINE>ci...
segmentNr + " endOfCiphertext:" + endOfCiphertext, ex);
135,314
private List<LogisticalForm> findPendingLogisticalForms(LogisticalForm logisticalForm) {<NEW_LINE>Preconditions.checkNotNull(logisticalForm);<NEW_LINE>Preconditions.checkNotNull(logisticalForm.getDeliverToCustomerPartner());<NEW_LINE>QueryBuilder<LogisticalForm> queryBuilder = QueryBuilder.of(LogisticalForm.class);<NEW...
.build().fetch();
1,707,954
public void actionMove(int pointerId, long time, float x, float y) {<NEW_LINE>float jmeX = iosInput.getJmeX(x);<NEW_LINE>float jmeY = iosInput.invertY(iosInput.getJmeY(y));<NEW_LINE>Vector2f lastPos = lastPositions.get(pointerId);<NEW_LINE>if (lastPos == null) {<NEW_LINE>lastPos = new Vector2f(jmeX, jmeY);<NEW_LINE>las...
float dX = jmeX - lastPos.x;
121,012
static Geometry calculateConvexHull_(Geometry geom, ProgressTracker progress_tracker) {<NEW_LINE>if (geom.isEmpty())<NEW_LINE>return geom.createInstance();<NEW_LINE>Geometry.Type type = geom.getType();<NEW_LINE>if (Geometry.isSegment(type.value())) {<NEW_LINE>// Segments are always returned either as a Point or Polylin...
Polyline(geom.getDescription());
211,719
public List<ResponseInfo> sendAndPoll(List<RequestInfo> requestInfos, Set<Integer> requestsToDrop, int pollTimeoutMs) {<NEW_LINE>if (closed) {<NEW_LINE>throw new IllegalStateException("The client is closed.");<NEW_LINE>}<NEW_LINE>// TODO: do anything with requestsToDrop?<NEW_LINE>// The AmbryRequest sessions run in a t...
long startTime = time.milliseconds();
313,361
public Dataset deleteDatasetTags(String datasetId, List<String> datasetTagList, Boolean deleteAll) {<NEW_LINE>try (var session = modelDBHibernateUtil.getSessionFactory().openSession()) {<NEW_LINE>var transaction = session.beginTransaction();<NEW_LINE>var stringQueryBuilder = new StringBuilder("delete from TagsMapping t...
.setLockMode(LockMode.PESSIMISTIC_WRITE));
1,086,246
protected byte[] engineSign() throws SignatureException {<NEW_LINE>if (key == null) {<NEW_LINE>// This can't actually happen, but you never know...<NEW_LINE>throw new SignatureException("No key provided");<NEW_LINE>}<NEW_LINE>int output_size = NativeCrypto.ECDSA_size(key.getNativeRef());<NEW_LINE>byte[] outputBuffer = ...
outputBuffer, key.getNativeRef());
430,745
protected void drawLineWithText(Canvas canvas, int startX, int startY, int endX, int endY, int endPointSpace) {<NEW_LINE>if (startX == endX && startY == endY) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (startX > endX) {<NEW_LINE>int tempX = startX;<NEW_LINE>startX = endX;<NEW_LINE>endX = tempX;<NEW_LINE>}<NEW_LINE>if (s...
) / 2, startY - textLineDistance);