idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
618,264
protected List findByCompanyId(String companyId, int begin, int end, OrderByComparator obc) throws SystemException {<NEW_LINE>Session session = null;<NEW_LINE>try {<NEW_LINE>session = openSession();<NEW_LINE>StringBuffer query = new StringBuffer();<NEW_LINE>query.append("FROM AdminConfig IN CLASS com.liferay.portlet.ad...
.setString(queryPos++, companyId);
516,562
public static GetCustomFieldsByTemplateIdResponse unmarshall(GetCustomFieldsByTemplateIdResponse getCustomFieldsByTemplateIdResponse, UnmarshallerContext _ctx) {<NEW_LINE>getCustomFieldsByTemplateIdResponse.setRequestId(_ctx.stringValue("GetCustomFieldsByTemplateIdResponse.RequestId"));<NEW_LINE>getCustomFieldsByTempla...
("GetCustomFieldsByTemplateIdResponse.Data[" + i + "].NameI18N"));
318,066
public boolean onReceiveMessage(Message message) {<NEW_LINE>mHistoryMessages.add(message);<NEW_LINE>OtrChatManager cm = OtrChatManager.getInstance();<NEW_LINE>if (cm != null) {<NEW_LINE>SessionStatus otrStatus = cm.getSessionStatus(message.getTo().getAddress(), message.getFrom().getAddress());<NEW_LINE>SessionID sId = ...
setType(Imps.MessageType.INCOMING_ENCRYPTED);
1,197,557
public static PrefixMapping calcInUsePrefixMapping(Graph graph, PrefixMapping prefixMapping) {<NEW_LINE>// Map prefix to URI.<NEW_LINE>Map<String, String> pmap = prefixMapping.getNsPrefixMap();<NEW_LINE>// Map URI to prefix, with partial lookup (all uri keys that partly match the URI)<NEW_LINE>Trie<String> trie = new T...
inUse = new HashSet<>();
1,097,141
private Mono<Response<NetworkRuleSetListResultInner>> listNetworkRuleSetWithResponseAsync(String resourceGroupName, String namespaceName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cann...
getSubscriptionId(), accept, context);
1,314,645
public static int long2bytes(final long value, final OutputStream iStream) throws IOException {<NEW_LINE>final int beginOffset = iStream instanceof OMemoryStream ? ((OMemoryStream) iStream).getPosition() : -1;<NEW_LINE>iStream.write((int) (value >>> 56) & 0xFF);<NEW_LINE>iStream.write((int) (value >>> 48) & 0xFF);<NEW_...
>>> 24) & 0xFF);
441,947
private void updateTextDisplayName(final Hashtable<CallPeer, String> peerNamesTable) {<NEW_LINE>if (!SwingUtilities.isEventDispatchThread()) {<NEW_LINE>SwingUtilities.invokeLater(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>updateTextDisplayName(peerNamesTable);<NEW_LINE>}<NEW_LIN...
label = getCallLabels()[1];
409,108
public void putDouble(long t, double v) {<NEW_LINE>if (writeCurArrayIndex == capacity) {<NEW_LINE>if (capacity >= CAPACITY_THRESHOLD) {<NEW_LINE>timeRet.add(new long[capacity]);<NEW_LINE>doubleRet.add(new double[capacity]);<NEW_LINE>writeCurListIndex++;<NEW_LINE>writeCurArrayIndex = 0;<NEW_LINE>} else {<NEW_LINE>int ne...
0, newValueData, 0, capacity);
1,434,939
public void assertHasPublicMethods(AssertionInfo info, Class<?> actual, String... methods) {<NEW_LINE>assertNotNull(info, actual);<NEW_LINE>Method[] actualMethods = actual.getMethods();<NEW_LINE>SortedSet<String> expectedMethodNames = newTreeSet(methods);<NEW_LINE>SortedSet<MASK><NEW_LINE>Map<String, Integer> methodNam...
<String> missingMethodNames = newTreeSet();
1,285,282
public static void printExceptionTraceback(PythonContext context, PBaseException pythonException) {<NEW_LINE>Object type = GetClassNode.getUncached().execute(pythonException);<NEW_LINE>Object tb = GetExceptionTracebackNode.getUncached().execute(pythonException);<NEW_LINE>Object hook = context.lookupBuiltinModule("sys"<...
).getAttribute(BuiltinNames.EXCEPTHOOK);
995,219
public IndependentSequenceModel<T> train(SequenceDataset<T> sequenceExamples, Map<String, Provenance> runProvenance) {<NEW_LINE>if (sequenceExamples.getOutputInfo().getUnknownCount() > 0) {<NEW_LINE>throw new IllegalArgumentException("The supplied Dataset contained unknown Outputs, and this Trainer is supervised.");<NE...
, flatDataset.size()));
1,083,834
public static void main(String[] args) {<NEW_LINE>Exercise26_CriticalEdges criticalEdges = new Exercise26_CriticalEdges();<NEW_LINE>EdgeWeightedGraph edgeWeightedGraph1 = new EdgeWeightedGraph(4);<NEW_LINE>// Critical edge<NEW_LINE>edgeWeightedGraph1.addEdge(new Edge(0, 1, 1));<NEW_LINE>edgeWeightedGraph1.addEdge(new E...
(1, 2, 3));
354,783
public void showRolePermissions(final RequestContext context) {<NEW_LINE>final String roleId = context.pathVar("roleId");<NEW_LINE>final AbstractFreeMarkerRenderer renderer = new SkinRenderer(context, "admin/role-permissions.ftl");<NEW_LINE>final Map<String, Object> dataModel = renderer.getDataModel();<NEW_LINE>final J...
dataModelService.fillHeaderAndFooter(context, dataModel);
568,944
public void decreaseStreamRetentionPeriod(DecreaseStreamRetentionPeriodRequest decreaseStreamRetentionPeriodRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(decreaseStreamRetentionPeriodRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetr...
new JsonResponseHandler<Void>(null);
677,174
public void addDistanceText(Graphics2D g, ZonePoint point, float size, double distance, double distanceWithoutTerrain) {<NEW_LINE>if (distance == 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Grid grid = zone.getGrid();<NEW_LINE>double cwidth = grid.getCellWidth() * getScale();<NEW_LINE>double cheight = grid.getCellHeight(...
(int) (fontSize * 0.75);
383,181
protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>_shareUtil = new ShareUtil(this);<NEW_LINE>setContentView(R.layout.main__activity);<NEW_LINE>ButterKnife.bind(this);<NEW_LINE>setSupportActionBar(findViewById(R.id.toolbar));<NEW_LINE>optShowRate();<NEW_LINE>try {...
applySpecialLaunchersVisibility(_appSettings.isSpecialFileLaunchersEnabled());
420,884
protected void scripts() {<NEW_LINE>String psUuid = q(VolumeVO.class).select(VolumeVO_.primaryStorageUuid).eq(VolumeVO_.<MASK><NEW_LINE>if (psUuid == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!q(PrimaryStorageVO.class).eq(PrimaryStorageVO_.uuid, psUuid).eq(PrimaryStorageVO_.type, NfsPrimaryStorageConstant.NFS_PR...
uuid, volumeUuid).findValue();
869,940
private Value invokeRemoteMethod(BVariable resultVar) throws EvaluationException {<NEW_LINE><MASK><NEW_LINE>String className = resultVar.getDapVariable().getValue();<NEW_LINE>Optional<ClassSymbol> classDef = classDefResolver.findBalClassDefWithinModule(className);<NEW_LINE>if (classDef.isEmpty()) {<NEW_LINE>// Resolves...
ClassDefinitionResolver classDefResolver = new ClassDefinitionResolver(context);
801,450
private boolean onPaste(boolean isPastedAsPlainText) {<NEW_LINE>ClipboardManager clipboardManager = (ClipboardManager) getContext().getSystemService(Context.CLIPBOARD_SERVICE);<NEW_LINE>StringBuilder text = new StringBuilder();<NEW_LINE>StringBuilder html = new StringBuilder();<NEW_LINE>if (clipboardManager != null && ...
, html.toString()));
56,422
public static BigInteger modOddInverse(BigInteger M, BigInteger X) {<NEW_LINE>if (!M.testBit(0)) {<NEW_LINE>throw new IllegalArgumentException("'M' must be odd");<NEW_LINE>}<NEW_LINE>if (M.signum() != 1) {<NEW_LINE>throw new ArithmeticException("BigInteger: modulus not positive");<NEW_LINE>}<NEW_LINE>if (X.signum() < 0...
Nat.fromBigInteger(bits, X);
295,586
protected void paintTabBackground(Graphics g, int index, int x, int y, int width, int height) {<NEW_LINE>// shrink rectangle - don't affect border and tab header<NEW_LINE>y += 3;<NEW_LINE>width -= 1;<NEW_LINE>height -= 4;<NEW_LINE>// background body, colored according to state<NEW_LINE>boolean selected = isSelected(ind...
width, height, a, b);
774,118
private void copyFromLocalFile(AlluxioURI srcPath, AlluxioURI dstPath) throws AlluxioException, IOException {<NEW_LINE>File src = new File(srcPath.getPath());<NEW_LINE>if (src.isDirectory()) {<NEW_LINE>throw new IOException("Source " + src.getAbsolutePath() + " is not a file.");<NEW_LINE>}<NEW_LINE>// If the dstPath is...
join(src.getName());
1,569,563
public boolean readExtensions(GPXFile res, XmlPullParser parser) throws IOException, XmlPullParserException {<NEW_LINE>if (ITINERARY_GROUP.equalsIgnoreCase(parser.getName())) {<NEW_LINE>ItineraryGroupInfo groupInfo = new ItineraryGroupInfo();<NEW_LINE>int tok;<NEW_LINE>while ((tok = parser.next()) != XmlPullParser.END_...
path = readText(parser, tagName);
1,259,300
private void addObjectRecord(final String name) throws IOException {<NEW_LINE>assert name != null;<NEW_LINE>final ObjectRecordValue<?> value = getObjectRecordValue();<NEW_LINE>final long key;<NEW_LINE>switch(insert) {<NEW_LINE>case AS_FIRST_CHILD:<NEW_LINE>if (parents.peek() == Fixed.NULL_NODE_KEY.getStandardProperty()...
Fixed.NULL_NODE_KEY.getStandardProperty());
913,293
private JPanel parallelTab(final ComponentAssembly boosters) {<NEW_LINE>JPanel motherPanel = new JPanel(new MigLayout("fill"));<NEW_LINE>// radial distance method<NEW_LINE>JLabel radiusMethodLabel = new JLabel(trans.get("RocketComponent.Position.Method.Radius.Label"));<NEW_LINE>motherPanel.add(radiusMethodLabel, "align...
(trans.get("StageConfig.parallel.angle"));
1,848,447
protected void onDraw(Canvas canvas) {<NEW_LINE>canvas.save();<NEW_LINE>if (processing != null)<NEW_LINE>processing.onDraw(canvas);<NEW_LINE>// Draw how fast it is running<NEW_LINE>long current = System.currentTimeMillis();<NEW_LINE>long elapsed = current - previous;<NEW_LINE>previous = current;<NEW_LINE>history[histor...
String message = e.getMessage();
998,331
public static void yv12ToPlanarRgb_U8(byte[] dataYV, Planar<GrayU8> output) {<NEW_LINE>GrayU8 R = output.getBand(0);<NEW_LINE>GrayU8 G = output.getBand(1);<NEW_LINE>GrayU8 B = output.getBand(2);<NEW_LINE>final int yStride = output.width;<NEW_LINE>final int uvStride = output.width / 2;<NEW_LINE>final int startU = yStrid...
- 218 * cb) >> 10;
1,129,423
private void superPostActivate(InvocationContext inv) {<NEW_LINE>try {<NEW_LINE>Object resultsObject = getResultsObject(inv);<NEW_LINE>addPostActivate(resultsObject, CLASS_NAME, "superPostActivate");<NEW_LINE>// Validate and update context data.<NEW_LINE>Map<String, Object> map = inv.getContextData();<NEW_LINE>String d...
throw new EJBException("unexpected Throwable", e);
616,126
public static EventType resolve(String name, String moduleName, NameAccessModifier accessModifier, EventTypeNameResolver publics, Map<String, EventType> locals, PathRegistry<String, EventType> path) {<NEW_LINE>EventType type;<NEW_LINE>// public can only see public<NEW_LINE>if (accessModifier == NameAccessModifier.PRECO...
? null : pair.getFirst();
732,125
public TsiFrameProtector createFrameProtector(int maxFrameSize, ByteBufAllocator alloc) {<NEW_LINE>Preconditions.checkState<MASK><NEW_LINE>byte[] key = handshaker.getKey();<NEW_LINE>Preconditions.checkState(key.length == AltsChannelCrypter.getKeyLength(), "Bad key length.");<NEW_LINE>// Frame size negotiation is not pe...
(!isInProgress(), "Handshake is not complete.");
356,300
public void publishAdditionalModelData(JavaSparkContext sparkContext, PMML pmml, JavaRDD<String> newData, JavaRDD<String> pastData, Path modelParentPath, TopicProducer<String, String> modelUpdateTopic) {<NEW_LINE>// Send item updates first, before users. That way, user-based endpoints like /recommend<NEW_LINE>// may ta...
("X", updateBroker, topic));
722,321
public OutboundSseEvent buildEvent(Builder eventBuilder, Set<String> itemNames) {<NEW_LINE>Map<String, StateDTO> payload = new HashMap<<MASK><NEW_LINE>for (String itemName : itemNames) {<NEW_LINE>try {<NEW_LINE>Item item = itemRegistry.getItem(itemName);<NEW_LINE>StateDTO stateDto = new StateDTO();<NEW_LINE>stateDto.st...
>(itemNames.size());
492,766
public Answer execute(final SecurityGroupRulesCmd command, final LibvirtComputingResource libvirtComputingResource) {<NEW_LINE>String vif = null;<NEW_LINE>String brname = null;<NEW_LINE>try {<NEW_LINE>final LibvirtUtilitiesHelper libvirtUtilitiesHelper = libvirtComputingResource.getLibvirtUtilitiesHelper();<NEW_LINE>fi...
VirtualMachineTO vm = command.getVmTO();
1,817,465
public void removeOAuthApproval(String clientId, String xSdsAuthToken) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// verify the required parameter 'clientId' is set<NEW_LINE>if (clientId == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'clientId' when calling ...
= new ArrayList<Pair>();
436,922
private Mono<Response<Flux<ByteBuffer>>> deletePortMirroringWithResponseAsync(String resourceGroupName, String portMirroringId, String privateCloudName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW...
error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
1,818,935
protected TestSuiteChromosome createMergedSolution(TestSuiteChromosome solution) {<NEW_LINE>// Deactivate in case a test is executed and would access the archive as this might cause a<NEW_LINE>// concurrent access<NEW_LINE>Properties.TEST_ARCHIVE = false;<NEW_LINE>TestSuiteChromosome mergedSolution = solution.clone();<...
solutionsSampledFromArchive = new LinkedHashSet<>();
356,156
/*<NEW_LINE>* (non-Javadoc)<NEW_LINE>*<NEW_LINE>* @see com.vaadin.ui.AbstractComponent#readDesign(org.jsoup.nodes .Element,<NEW_LINE>* com.vaadin.ui.declarative.DesignContext)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void readDesign(Element design, DesignContext designContext) {<NEW_LINE>// handle default attribu...
setSplitPosition(getSplitPosition(), reversed);
1,434,916
public void onScrolled(@NonNull @NotNull RecyclerView recyclerView, int dx, int dy) {<NEW_LINE>super.onScrolled(recyclerView, dx, dy);<NEW_LINE>mEmojiPalettesAdapter.onPageScrolled();<NEW_LINE>final int offset = recyclerView.computeVerticalScrollOffset();<NEW_LINE>final <MASK><NEW_LINE>final int range = recyclerView.co...
int extent = recyclerView.computeVerticalScrollExtent();
915,924
final GetChannelPolicyResult executeGetChannelPolicy(GetChannelPolicyRequest getChannelPolicyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getChannelPolicyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv...
HandlerContextKey.SIGNING_REGION, getSigningRegion());
721,157
private boolean areVariablesFormattersEqual(VariablesFormatter savedFormatter, VariablesFormatter currentFormatter) {<NEW_LINE>return savedFormatter.getName().equals(currentFormatter.getName()) && savedFormatter.getChildrenExpandTestCode().equals(currentFormatter.getChildrenExpandTestCode()) && savedFormatter.getChildr...
() == currentFormatter.isUseChildrenVariables();
1,374,029
public static void decisionListDemo() {<NEW_LINE>try {<NEW_LINE>System.out.println(Util<MASK><NEW_LINE>System.out.println("DecisionList Demo - Inducing a DecisionList from the Restaurant DataSet\n ");<NEW_LINE>System.out.println(Util.ntimes("*", 100));<NEW_LINE>DataSet ds = DataSetFactory.getRestaurantDataSet();<NEW_LI...
.ntimes("*", 100));
1,541,068
public void connect(String hostName, int port) throws IOException {<NEW_LINE>try {<NEW_LINE>// logmet seems to have a keepalive of about 20-30 seconds.<NEW_LINE>// Proactively close our connection if this connection hasn't been used in a while<NEW_LINE>boolean refreshingConnection = false;<NEW_LINE>if (lumberjackClient...
, String.valueOf(port));
432,776
public double score(Mention antecedent, Mention anaphor, Counter<String> antecedentFeatures, Counter<String> anaphorFeatures, Counter<String> pairFeatures, Map<Integer, SimpleMatrix> antecedentCache, Map<Integer, SimpleMatrix> anaphorCache) {<NEW_LINE>SimpleMatrix antecedentVector = NARepresentation;<NEW_LINE>if (antec...
anaphor)).plus(pairFeaturesBias);
1,710,664
public Concrete.FunctionDefinition function(@NotNull ArendRef ref, @NotNull FunctionKind kind, @NotNull Collection<? extends ConcreteParameter> parameters, @Nullable ConcreteExpression resultType, @Nullable ConcreteExpression resultTypeLevel, @NotNull ConcreteFunctionBody body) {<NEW_LINE>if (!(ref instanceof ConcreteL...
(GlobalReferable.kindFromFunction(kind));
584,144
/* Sample generated code:<NEW_LINE>*<NEW_LINE>* @com.ibm.j9ddr.GeneratedFieldAccessor(offsetFieldName="_ramConstantPoolOffset_", declaredType="UDATA*")<NEW_LINE>* public UDATAPointer ramConstantPool() throws CorruptDataException {<NEW_LINE>* return UDATAPointer.cast(getPointerAtOffset(J9Class._ramConstantPoolOffset...
className, "getPointerAtOffset", longFromLong, false);
853,954
private void openStream() throws IOException {<NEW_LINE>ServiceException lastException = null;<NEW_LINE>String errorMessage = String.format("Failed to open key: %s bucket: %s", mKey, mBucketName);<NEW_LINE>while (mRetryPolicy.attempt()) {<NEW_LINE>try {<NEW_LINE>GSObject object;<NEW_LINE>if (mPos > 0) {<NEW_LINE>object...
null, null, mPos, null);
886,753
static CodeRangeable strDeleteBang(CodeRangeable rubyString, boolean[] squeeze, TrTables tables, Encoding enc) {<NEW_LINE>rubyString.modify();<NEW_LINE>rubyString.keepCodeRange();<NEW_LINE>final ByteList value = rubyString.getByteList();<NEW_LINE>int s = value.getBegin();<NEW_LINE>int t = s;<NEW_LINE>int send = s + val...
t - value.getBegin());
1,386,792
public AwsJobExponentialRolloutRate unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AwsJsonReader reader = context.getReader();<NEW_LINE>if (!reader.isContainer()) {<NEW_LINE>reader.skipValue();<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>AwsJobExponentialRolloutRate awsJobExponentialRolloutRate =...
().unmarshall(context));
1,543,809
private void writeOp(SelectionKey key, RapidoidConnection conn, SocketChannel socketChannel) throws IOException {<NEW_LINE>synchronized (conn.outgoing) {<NEW_LINE>if (conn.outgoing.hasRemaining()) {<NEW_LINE>conn.log("WRITING");<NEW_LINE>// conn.log(conn.outgoing.asText());<NEW_LINE><MASK><NEW_LINE>int wrote = conn.out...
BufUtil.startWriting(conn.outgoing);
1,645,587
public void navigate(AnActionEvent e, boolean openLibraryEditor) {<NEW_LINE>final OrderEntry entry = getSelectedEntry();<NEW_LINE>ProjectStructureSelector selector = e.getData(ProjectStructureSelector.KEY);<NEW_LINE>if (entry instanceof ModuleOrderEntry) {<NEW_LINE>Module module = ((ModuleOrderEntry) entry).getModule()...
selector.select(sdk, true);
288,706
public DeviceFleetSummary unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DeviceFleetSummary deviceFleetSummary = new DeviceFleetSummary();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth =...
JsonToken token = context.getCurrentToken();
1,642,190
public List<Product> readProductsByIds(List<Long> productIds) {<NEW_LINE>if (productIds == null || productIds.size() == 0) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (productIds.size() > 100) {<NEW_LINE>logger.warn("Not recommended to use the readProductsByIds method for long lists of productIds, since " + "Hiberna...
builder.createQuery(Product.class);
482,633
protected Session createSession(Host hc, String user, String host, int port, FS fs) throws JSchException {<NEW_LINE>Session session = super.createSession(hc, <MASK><NEW_LINE>try {<NEW_LINE>List<Proxy> proxies = ProxySelector.getDefault().select(new URI("socket", null, host, port == -1 ? 22 : port, null, null, null));<N...
user, host, port, fs);
822,991
protected RelDataType deriveRowType() {<NEW_LINE>final RelDataTypeFactory typeFactory = getCluster().getTypeFactory();<NEW_LINE>List<RelDataTypeFieldImpl> columns = new ArrayList<>();<NEW_LINE>columns.add(new RelDataTypeFieldImpl("NODE", 0, typeFactory.createSqlType(SqlTypeName.VARCHAR)));<NEW_LINE>columns.add(new RelD...
createSqlType(SqlTypeName.VARCHAR)));
1,164,178
private boolean tryAbortTransactions(String keyspace, TransactionsTableInteraction txnInteraction, Statement abortStatement, Statement checkStatement, long startTs, long commitTs) {<NEW_LINE>log.info("Aborting transaction", SafeArg.of("startTs", startTs), SafeArg.of("commitTs", commitTs), SafeArg.of("keyspace", keyspac...
all().iterator());
1,601,438
ActionResult<Wo> execute(EffectivePerson effectivePerson, String id) throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>Business business = new Business(emc);<NEW_LINE>Folder2 folder = emc.f...
] bs = os.toByteArray();
1,315,395
public boolean onOptionsItemSelected(final MenuItem item) {<NEW_LINE>if (MenuDoubleTabUtil.shouldIgnoreTap()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>switch(item.getItemId()) {<NEW_LINE>case android.R.id.home:<NEW_LINE>deleteAccountAndReturnIfNecessary();<NEW_LINE>break;<NEW_LINE>case R.id.action_show_block_list:<...
getJid().toEscapedString());
984,344
/*<NEW_LINE>* No need to process SwitchKey TODO test and reason<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public DavaFlowSet processASTSwitchNode(ASTSwitchNode node, DavaFlowSet input) {<NEW_LINE>if (DEBUG) {<NEW_LINE>System.out.println("Processing switch node");<NEW_LINE>}<NEW_LINE>if (!isReachable(input)) {<NEW_LINE>//...
(label, tmb, node));
406,414
final EngineDefaults executeDescribeEngineDefaultClusterParameters(DescribeEngineDefaultClusterParametersRequest describeEngineDefaultClusterParametersRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeEngineDefaultClusterParametersRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetri...
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
1,374,282
private Dimension calcPreferredSize(HtmlRendererImpl r) {<NEW_LINE>Insets ins = r.getInsets();<NEW_LINE>Dimension prefSize = new java.awt.Dimension(ins.left + ins.right, ins.top + ins.bottom);<NEW_LINE>String text = r.getText();<NEW_LINE>Graphics g = r.getGraphics();<NEW_LINE>Icon icon = r.getIcon();<NEW_LINE>Font font...
r.isHtml()) + 4;
548,954
public RelRoot expandView(RelDataType rowType, String queryString, List<String> schemaPath, List<String> viewPath) {<NEW_LINE>SqlParser parser = <MASK><NEW_LINE>SqlNode sqlNode;<NEW_LINE>try {<NEW_LINE>sqlNode = parser.parseQuery();<NEW_LINE>} catch (SqlParseException e) {<NEW_LINE>throw new RuntimeException("parse fai...
SqlParser.create(queryString, parserConfig);
1,443,321
public SenderIdFilter unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>SenderIdFilter senderIdFilter = new SenderIdFilter();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth +...
class).unmarshall(context));
1,752,078
static WebServer startServer(Routing routing) {<NEW_LINE>WebServer server = WebServer.create(routing);<NEW_LINE>long t = System.nanoTime();<NEW_LINE>CountDownLatch cdl = new CountDownLatch(1);<NEW_LINE>server.start().thenAccept(webServer -> {<NEW_LINE>long time = System.nanoTime() - t;<NEW_LINE>System.out.printf("Serve...
System.out.println("User role required:");
1,383,952
private static void copySymbols(Project project, File outDir, ICanceled canceled) throws IOException, CompileExceptionError {<NEW_LINE>final boolean has_symbols = project.hasOption("with-symbols");<NEW_LINE>if (!has_symbols) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>File symbolsDir = new File(outDir, getProjectTitle(proje...
final String exeName = getBinaryNameFromProject(project);
719,885
public void register(Iterable<Row<?>> rows, boolean overwrite) {<NEW_LINE>registeredRows.getAndUpdate(oldRows -> {<NEW_LINE>// for some reason the compiler needs type assistance by creating this intermediate variable.<NEW_LINE>Stream<Meter.Id> idStream = StreamSupport.stream(rows.spliterator(), false).map(row -> {<NEW_...
commonId.withTags(row.uniqueTags);
1,562,050
public void updateVisuals() {<NEW_LINE>new Thread(() -> {<NEW_LINE>double max;<NEW_LINE>switch(whichDeriv) {<NEW_LINE>case 0 -><NEW_LINE>VisualizeImageData.colorizeGradient(derivX, derivY, -1, renderedImage);<NEW_LINE>case 1 -><NEW_LINE>{<NEW_LINE><MASK><NEW_LINE>VisualizeImageData.colorizeSign(derivX, renderedImage, m...
max = GImageStatistics.maxAbs(derivX);
1,770,475
private Optional<LiteSession> initSession(String modelPath, MSConfig msConfig, boolean isDynamicInferModel) {<NEW_LINE>if (modelPath == null) {<NEW_LINE>logger.severe(Common.addTag("modelPath cannot be empty"));<NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_LINE>// only lite session support dynamic shape<NEW_LINE>if...
createTrainSession(modelPath, msConfig, false);
1,769,922
public boolean write_specctra_session_file(BoardFrame p_board_frame) {<NEW_LINE>final java.util.ResourceBundle resources = java.util.ResourceBundle.getBundle("app.freerouting.gui.BoardMenuFile", p_board_frame.get_locale());<NEW_LINE>String design_file_name = this.get_name();<NEW_LINE>String[] file_name_parts = design_f...
+ resources.getString("message_7"));
1,489,839
public void initRedirect() {<NEW_LINE>Debug.log(3, "EditorConsolePane: starting redirection to message area");<NEW_LINE>int npipes = 2;<NEW_LINE>// npipes * Runner.getRunners().size() + npipes;<NEW_LINE>NUM_PIPES = npipes;<NEW_LINE>pin = new PipedInputStream[NUM_PIPES];<NEW_LINE>reader = new Thread[NUM_PIPES];<NEW_LINE...
[1].setDaemon(true);
1,539,037
protected JComponent createCenterPanel() {<NEW_LINE>Splitter splitter = new Splitter(false, (float) 0.6);<NEW_LINE>JPanel result = new JPanel(new BorderLayout());<NEW_LINE>if (myTree == null) {<NEW_LINE>myTree = createTree();<NEW_LINE>} else {<NEW_LINE>final CheckedTreeNode root = (CheckedTreeNode) myTree.getModel().ge...
(MethodNodeBase) selectionPath.getLastPathComponent();
455,169
private ThrustCurveMotor selectMotor(ThrustCurveMotorSet set) {<NEW_LINE>if (set.getMotorCount() == 0) {<NEW_LINE>throw new BugException("Attempting to select motor from empty ThrustCurveMotorSet: " + set);<NEW_LINE>}<NEW_LINE>if (set.getMotorCount() == 1) {<NEW_LINE>return set.getMotors().get(0);<NEW_LINE>}<NEW_LINE>/...
Collections.sort(list, MOTOR_COMPARATOR);
1,243,228
public void onClick(View v) {<NEW_LINE>switch(v.getId()) {<NEW_LINE>case R.id.tvInnerDemo:<NEW_LINE>AssetsChooserActivity.startActivity(this, "inner_demo");<NEW_LINE>break;<NEW_LINE>case R.id.tvCourse:<NEW_LINE>WebActivity.startActivity(this, URL_COURSE);<NEW_LINE>break;<NEW_LINE>case R.id.tvInstance:<NEW_LINE>WebActiv...
+ "gallery/meilishuo.lua" : Constants.ASSETS_PREFIX + "gallery_x64/meilishuo.lua";
252,914
private Object[] readObjectArrayForListModel(DataInputStream in, Resources res) throws IOException {<NEW_LINE>Object[] elements = new Object[in.readInt()];<NEW_LINE>int elen = elements.length;<NEW_LINE>for (int iter = 0; iter < elen; iter++) {<NEW_LINE>switch(in.readByte()) {<NEW_LINE>case // String<NEW_LINE>1:<NEW_LIN...
val.put(key, value);
1,545,800
public TopologyAPI.InputStream.Builder buildStream(String componentName, String streamId) {<NEW_LINE>TopologyAPI.InputStream.Builder bldr <MASK><NEW_LINE>bldr.setStream(TopologyAPI.StreamId.newBuilder().setId(streamId).setComponentName(componentName));<NEW_LINE>bldr.setGtype(TopologyAPI.Grouping.FIELDS);<NEW_LINE>Topol...
= TopologyAPI.InputStream.newBuilder();
1,374,835
private void updateViews() {<NEW_LINE>if (!mDebugging) {<NEW_LINE>mViewDebug.setVisibility(View.GONE);<NEW_LINE>mLvDebug.setVisibility(View.GONE);<NEW_LINE>if (mIsLoading && !mSharedPrefs.getBoolean("pref_disable_splash", false)) {<NEW_LINE><MASK><NEW_LINE>mImageLoading.setVisibility(View.VISIBLE);<NEW_LINE>} else {<NE...
mIitcWebView.setVisibility(View.GONE);
432,407
protected void okPressed() {<NEW_LINE>// Set props<NEW_LINE>driver.setName(driverNameText.getText());<NEW_LINE>driver.setDescription(CommonUtils.notEmpty(driverDescText.getText()));<NEW_LINE>driver.setDriverClassName(driverClassText.getText());<NEW_LINE>driver.setSampleURL(driverURLText.getText());<NEW_LINE>driver.setD...
(!nonInstantiableCheck.getSelection());
907,843
public boolean update(BookmarkBase bookmark) {<NEW_LINE>// start a transaction<NEW_LINE>SQLiteDatabase db = getWritableDatabase();<NEW_LINE>db.beginTransaction();<NEW_LINE>// bookmark settings<NEW_LINE>ContentValues values = new ContentValues();<NEW_LINE>values.put(BookmarkDB.<MASK><NEW_LINE>values.put(BookmarkDB.DB_KE...
DB_KEY_BOOKMARK_LABEL, bookmark.getLabel());
513,420
public void onStartup(Set<Class<?>> set, ServletContext ctx) throws ServletException {<NEW_LINE>MetricsServiceConfiguration configuration = Globals.getDefaultBaseServiceLocator().getService(MetricsServiceConfiguration.class);<NEW_LINE>if (!"".equals(ctx.getContextPath())) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Check...
addServlet("microprofile-metrics-resource", MetricsResource.class);
508,618
public int readCodedBlockFlagLuma64(MDecoder decoder, int blkX, int blkY, int comp, MBType left, MBType top, boolean leftAvailable, boolean topAvailable, int leftCBPLuma, int topCBPLuma, int curCBPLuma, MBType cur, boolean is8x8Left, boolean is8x8Top) {<NEW_LINE>int blkOffLeft = blkX & 3, blkOffTop = blkY & 3;<NEW_LINE...
codedBlockCtxOff + tLeft + 2 * tTop);
571,538
private boolean initNetwork(List<String> options, List<String> parameters) {<NEW_LINE>if (options.contains("-setname")) {<NEW_LINE>if (!isValidArgument(options, parameters, 1, 1, 1, Command.INIT_NETWORK)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>_currContainerName = _workHelper.initNetwork(parameters.get(0), null);...
_workHelper.initNetwork(null, containerPrefix);
136,546
public byte[] decrypt(final byte[] ciphertext, final byte[] contextInfo) throws GeneralSecurityException {<NEW_LINE>int modSizeInBytes = RsaKem.bigIntSizeInBytes(recipientPrivateKey.getModulus());<NEW_LINE>if (ciphertext.length < modSizeInBytes) {<NEW_LINE>throw new GeneralSecurityException(String.format("Ciphertext mu...
, modSizeInBytes, ciphertext.length));
1,436,089
final SetUserSettingsResult executeSetUserSettings(SetUserSettingsRequest setUserSettingsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(setUserSettingsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(F...
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
1,825,618
// ========== static ==========<NEW_LINE>public static void main(String... args) throws Exception {<NEW_LINE>if (ArrayUtils.getLength(args) < 2) {<NEW_LINE>// LOGGER.warn("Expected 2 argument: [0]-server, [1]-<path to config yaml file>");<NEW_LINE>String foundConf = null;<NEW_LINE>for (String p : DEFAULT_CONF_LOCATIONS...
GrobidServiceApplication().run(args);
254,879
private static void put(final RheaKVStore rheaKVStore) {<NEW_LINE>final CompletableFuture<Boolean> r1 = rheaKVStore.put("compareAndPut", writeUtf8("compareAndPutExpect"));<NEW_LINE>if (FutureHelper.get(r1)) {<NEW_LINE>LOG.info("Async put compareAndPut {} success.", readUtf8(rheaKVStore.bGet("compareAndPut")));<NEW_LINE...
"compareAndPutUpdate"), writeUtf8("compareAndPutUpdate2"));
1,520,886
public DynamicInvokeResult tryInvokeMethod(String name, Object... arguments) {<NEW_LINE>DynamicInvokeResult result = super.tryInvokeMethod(name, arguments);<NEW_LINE>if (result.isFound()) {<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>DynamicInvokeResult propertyResult = tryGetProperty(name);<NEW_LINE>if (propertyResult...
closure.setResolveStrategy(Closure.DELEGATE_FIRST);
693,538
public void removeDeployment(String deploymentId, boolean cascade) {<NEW_LINE>DeploymentEntityManager deploymentEntityManager = Context.getCommandContext().getDeploymentEntityManager();<NEW_LINE>DeploymentEntity <MASK><NEW_LINE>if (deployment == null) {<NEW_LINE>throw new ActivitiObjectNotFoundException("Could not find...
deployment = deploymentEntityManager.findDeploymentById(deploymentId);
809,340
public void renderIndexPaging(String indexFile) throws Exception {<NEW_LINE>long totalPosts = db.getPublishedCount("post");<NEW_LINE>int postsPerPage = config.getPostsPerPage();<NEW_LINE>if (totalPosts == 0) {<NEW_LINE>// paging makes no sense. render single index file instead<NEW_LINE>renderIndex(indexFile);<NEW_LINE>...
= new PagingHelper(totalPosts, postsPerPage);
894,777
public void createEncryptedPdf(View v) {<NEW_LINE>String path = root.getAbsolutePath() + "/crypt.pdf";<NEW_LINE>// 128 bit is the highest currently supported<NEW_LINE>int keyLength = 128;<NEW_LINE>// Limit permissions of those without the password<NEW_LINE>AccessPermission ap = new AccessPermission();<NEW_LINE>ap.setCa...
StandardProtectionPolicy("12345", "hi", ap);
1,299,601
protected void mapResources(int index) {<NEW_LINE>NV_ENC_MAP_INPUT_RESOURCE mapInputResource = new NV_ENC_MAP_INPUT_RESOURCE();<NEW_LINE>mapInputResource.version(NV_ENC_MAP_INPUT_RESOURCE_VER);<NEW_LINE>mapInputResource.registeredResource(this.registeredResources.get(index));<NEW_LINE>try {<NEW_LINE>checkNvCodecApiCall...
index, mapInputResource.mappedResource());
1,821,568
private static RetryPolicy retryPolicy(Map<String, ?> retryPolicy, int maxAttemptsLimit) {<NEW_LINE>int maxAttempts = checkNotNull(ServiceConfigUtil<MASK><NEW_LINE>checkArgument(maxAttempts >= 2, "maxAttempts must be greater than 1: %s", maxAttempts);<NEW_LINE>maxAttempts = Math.min(maxAttempts, maxAttemptsLimit);<NEW_...
.getMaxAttemptsFromRetryPolicy(retryPolicy), "maxAttempts cannot be empty");
1,073,758
public boolean onChildClick(ExpandableListView parent, View v, int groupPosition, int childPosition, long id) {<NEW_LINE>Object child = listAdapter.getChild(groupPosition, childPosition);<NEW_LINE>if (child instanceof DownloadResourceGroup) {<NEW_LINE>String uniqueId = ((DownloadResourceGroup) child).getUniqueId();<NEW...
DownloadItemFragment.createInstance(regionId, childPosition);
1,806,952
private void addErrorPayload(Map<String, Object> resultMap, String message, String path, int line, int column, Map<String, Object> extensions) {<NEW_LINE>LinkedList<Map<String, Object>> errorList = (LinkedList<Map<String, Object>>) resultMap.computeIfAbsent(ERRORS, it -> new LinkedList<Map<String, Object>>());<NEW_LINE...
newErrorMap.put(MESSAGE, message);
744,663
public OUser authenticate(ODatabaseSession session, final String username, final String password) {<NEW_LINE>if (delegate == null)<NEW_LINE><MASK><NEW_LINE>if (session == null)<NEW_LINE>throw new OSecurityAccessException("OSymmetricKeySecurity.authenticate() Database is null for username: " + username);<NEW_LINE>final ...
throw new OSecurityAccessException("OSymmetricKeySecurity.authenticate() Delegate is null for username: " + username);
1,328,520
public InputStream requestStream(ApiResource.RequestMethod method, String url, Map<String, Object> params, RequestOptions options) throws StripeException {<NEW_LINE>StripeRequest request = new StripeRequest(method, url, params, options);<NEW_LINE>StripeResponseStream responseStream = httpClient.requestStreamWithRetries...
.getMessage()), e);
1,518,663
private void loadCache() throws Exception {<NEW_LINE>TransactionMonitor.DEFAULT.logTransaction("MetaCache", "load", new Task() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void go() throws Exception {<NEW_LINE>List<DcTbl> dcs = dcService.findAllDcNames();<NEW_LINE>List<DcMeta> dcMetas = new LinkedList<>();<NEW_LINE>f...
> redisCheckRuleTbls = redisCheckRuleService.getAllRedisCheckRules();
1,610,817
public void run(RegressionEnvironment env) {<NEW_LINE>// prepare<NEW_LINE>RegressionPath path = preloadData(env, false);<NEW_LINE>// test join<NEW_LINE>String eplJoin = "@name('s0') select * from SupportBean_S0 as s0 unidirectional, AWindow(p00='x') as aw where aw.id = s0.id";<NEW_LINE>env.compileDeploy(eplJoin, path)....
2, SupportCountAccessEvent.getAndResetCountGetterCalled());
1,687,370
public boolean apply(Game game, Ability source) {<NEW_LINE>Player player = game.getPlayer(source.getControllerId());<NEW_LINE>if (player == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>new TreasureToken().putOntoBattlefield(player.rollDice(outcome, source, game, 4), game, source, source.getControllerId());<NEW_LI...
permanent = source.getSourcePermanentIfItStillExists(game);
6,301
public static ByteProcessor limitedOpeningByReconstruction(final ImageProcessor ip, final ImageProcessor ipBackground, final double radius, final double maxBackground) {<NEW_LINE>// Apply (initial) morphological opening<NEW_LINE>final RankFilters rf = new RankFilters();<NEW_LINE>ipBackground.setRoi(ip.getRoi());<NEW_LI...
ipBackground, radius, RankFilters.MIN);
1,224,925
public void execute() throws BuildException {<NEW_LINE>try {<NEW_LINE>// XXX workaround for http://issues.apache.org/bugzilla/show_bug.cgi?id=43398<NEW_LINE>pseudoTests = new LinkedHashMap<>();<NEW_LINE>if (getProject().getProperty("allmodules") != null) {<NEW_LINE>modules = new TreeSet<>(Arrays.asList(getProject().get...
(Collectors.toSet()));
1,040,697
private Optional<JsonResponseUpsert> persistForBPartnerWithinTrx(@Nullable final String orgCode, @NonNull final ExternalIdentifier bpartnerIdentifier, @NonNull final JsonRequestContactUpsert jsonContactUpsert, @NonNull final SyncAdvise parentSyncAdvise) {<NEW_LINE>final OrgId orgId = retrieveOrgIdOrDefault(orgCode);<NE...
bpartnerCompositeRepository.save(bpartnerComposite, true);