idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
998,881
public static void validateCnnKernelStridePadding(int[] kernelSize, int[] stride, int[] padding) {<NEW_LINE>if (kernelSize == null || kernelSize.length != 2) {<NEW_LINE>throw new IllegalStateException("Invalid kernel size: expected int[] of length 2, got " + (kernelSize == null ? null : Arrays.toString(kernelSize)));<N...
+ Arrays.toString(padding));
21,819
public void onApplicationEvent(final CustomerPersistedEvent event) {<NEW_LINE>Customer dbCustomer = event.getCustomer();<NEW_LINE>// if there is an active request, remove the session-based customer if it exists and update CustomerState<NEW_LINE>WebRequest request = BroadleafRequestContext<MASK><NEW_LINE>if (request != ...
.getBroadleafRequestContext().getWebRequest();
523,375
protected void convertSendEventServiceTaskXMLProperties(SendEventServiceTask sendEventServiceTask, BpmnModel bpmnModel, XMLStreamReader xtr) throws Exception {<NEW_LINE>String triggerable = BpmnXMLUtil.getAttributeValue(ATTRIBUTE_TRIGGERABLE, xtr);<NEW_LINE>if ("true".equalsIgnoreCase(triggerable)) {<NEW_LINE>sendEvent...
get(0).getElementText();
794,531
protected Void doInBackground() throws Exception {<NEW_LINE>addPropertyChangeListener(new PropertyChangeListener() {<NEW_LINE><NEW_LINE>public void propertyChange(PropertyChangeEvent evt) {<NEW_LINE>if ("progress".equals(evt.getPropertyName())) {<NEW_LINE>progressBar.setValue((Integer) evt.getNewValue());<NEW_LINE>}<NE...
progress += Util.calcSize(copyable);
1,647,606
public Optional<String> writeProfile(SignalServiceProfileWrite signalServiceProfileWrite, ProfileAvatarData profileAvatar) throws NonSuccessfulResponseCodeException, PushNetworkException, MalformedResponseException {<NEW_LINE>String requestBody = JsonUtil.toJson(signalServiceProfileWrite);<NEW_LINE>ProfileAvatarUploadA...
getOutputStreamFactory(), null, null);
525,663
public Security lookup(String isin, String tickerSymbol, String wkn, String name, Supplier<Security> creationFunction) {<NEW_LINE>List<String> attributes = Arrays.asList(isin, tickerSymbol, wkn, name);<NEW_LINE>int idOfAttributeWithDuplicateSecurities = -1;<NEW_LINE>// first: check the identifying attributes (ISIN, Tic...
attributes.get(idOfAttributeWithDuplicateSecurities)));
1,389,202
private void addPubDate(Map<Field, String> fields, PubDate pubDate) {<NEW_LINE>if (pubDate.getYear() == null) {<NEW_LINE>// if year of the pubdate is null, the medlineDate shouldn't be null<NEW_LINE>fields.put(StandardField.YEAR, extractYear<MASK><NEW_LINE>} else {<NEW_LINE>fields.put(StandardField.YEAR, pubDate.getYea...
(pubDate.getMedlineDate()));
28,899
public void typeCheck() {<NEW_LINE>if (!getTypeBound(0).type().isTypeVariable() && !getTypeBound(0).type().isClassDecl() && !getTypeBound(0).type().isInterfaceDecl()) {<NEW_LINE>error("the first type bound must be either a type variable, or a class or interface type which " + getTypeBound(0).type().fullName() + " is no...
(MethodDecl) iter.next();
574,328
public void processResult(int ccRC, String ccPath, Object ccCtx, List<String> ccChildren) {<NEW_LINE>KeeperException.Code code = KeeperException.Code.get(ccRC);<NEW_LINE>// we don't have to handle CONNECTIONLOSS here; it would be handled by the retry version of getChildren<NEW_LINE>switch(code) {<NEW_LINE>case OK:<NEW_...
ourChild, false, inspector, null);
1,007,375
public void init() {<NEW_LINE>Font font = FontUtils.getLcdFont();<NEW_LINE>Font boldFont = FontUtils.getSansBoldFont();<NEW_LINE>Font regularFont = FontUtils.getSansFont();<NEW_LINE>workCoordinateFont.add(font.deriveFont(Font.PLAIN, 18));<NEW_LINE>workCoordinateFont.add(font.deriveFont(Font.PLAIN, 24));<NEW_LINE>workCo...
(Font.PLAIN, 20));
452,667
private void login(final RoutingContext routingContext, final AuthenticationProvider credentialAuthProvider) {<NEW_LINE>final JsonObject requestBody = routingContext.getBodyAsJson();<NEW_LINE>if (requestBody == null) {<NEW_LINE>routingContext.response().setStatusCode(HttpResponseStatus.BAD_REQUEST.code()).setStatusMess...
().getValue(USERNAME));
793,317
private void loadNode398() throws IOException, SAXException {<NEW_LINE>PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.CertificateGroupFolderType_DefaultHttpsGroup_TrustList_Open_InputArguments, new QualifiedName(0, "InputArguments"), new LocalizedText("en", "InputArguments"), LocalizedText.NULL_...
String xml = sb.toString();
1,263,984
private boolean incrementRGBColor(RTextArea textArea) {<NEW_LINE>try {<NEW_LINE>int caretPosition = textArea.getCaretPosition();<NEW_LINE>int[] result = findColorAt(textArea, caretPosition);<NEW_LINE>if (result == null)<NEW_LINE>return false;<NEW_LINE>int start = result[0];<NEW_LINE>int len = result[1];<NEW_LINE>// fin...
Integer.parseInt(str, 16);
258,707
protected StructurePackResult pack() {<NEW_LINE>boolean componentsChanged = false;<NEW_LINE>int componentCount = 0;<NEW_LINE>AlignedComponentPacker packer = new AlignedComponentPacker(structure.getStoredPackingValue(), dataOrganization);<NEW_LINE>// Remove any default components from list<NEW_LINE>Iterator<? extends In...
AlignmentType alignmentType = structure.getAlignmentType();
1,225,044
private void processJar(@NonNull File input, @NonNull File output, @NonNull TransformInvocation invocation) {<NEW_LINE>waitableExecutor.execute(() -> {<NEW_LINE>ExceptionRunnable fileCreator = createFile(input, output, invocation);<NEW_LINE>if (userCache != null) {<NEW_LINE>FileCache.Inputs key = new FileCache.Inputs.B...
createFile(output, key, fileCreator);
1,326,226
private static Relation convCompare2UserpropRelation(HugeGraph graph, HugeType type, HasContainer has) {<NEW_LINE>BiPredicate<?, ?> bp = has.getPredicate().getBiPredicate();<NEW_LINE>assert bp instanceof Compare;<NEW_LINE>String key = has.getKey();<NEW_LINE>PropertyKey pkey = graph.propertyKey(key);<NEW_LINE>Id pkeyId ...
Condition.gt(pkeyId, value);
381,915
public File createLocalFile(@Nonnull String url) throws IOException {<NEW_LINE>int <MASK><NEW_LINE>if (ast != -1) {<NEW_LINE>url = url.substring(0, ast);<NEW_LINE>}<NEW_LINE>int last = url.lastIndexOf('/');<NEW_LINE>String baseName;<NEW_LINE>if (last == url.length() - 1) {<NEW_LINE>baseName = url.substring(url.lastInde...
ast = url.indexOf('?');
1,005,306
protected List<SuggestedReplacement> filterSuggestions(List<SuggestedReplacement> suggestions) {<NEW_LINE>suggestions.removeIf(suggestion -> isProhibited<MASK><NEW_LINE>List<SuggestedReplacement> newSuggestions = new ArrayList<>();<NEW_LINE>for (SuggestedReplacement suggestion : suggestions) {<NEW_LINE>String replaceme...
(suggestion.getReplacement()));
1,708,009
private R executeBatch(WaitingTask<T, R> currentWaitingNode) {<NEW_LINE>List<WaitingTask<T, R>> waitingNodes = takeAllWaitingTasksOrFreeLock();<NEW_LINE>if (waitingNodes.size() == 1) {<NEW_LINE>T singleCommand = waitingNodes.get(0).wrappedTask;<NEW_LINE>return taskExecutor.apply(singleCommand);<NEW_LINE>}<NEW_LINE>try ...
commandsInBatch.add(waitingNode.wrappedTask);
818,449
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {<NEW_LINE>postponeEnterTransition();<NEW_LINE>Bundle arguments = requireArguments();<NEW_LINE>@Nullable<NEW_LINE>final String <MASK><NEW_LINE>if (transitionName == null) {<NEW_LINE>throw new IllegalArg...
transitionName = arguments.getString(ARG_TRANSITION_NAME);
1,377,301
private void doLegacyThinJarGeneration(CurateOutcomeBuildItem curateOutcomeBuildItem, OutputTargetBuildItem outputTargetBuildItem, TransformedClassesBuildItem transformedClasses, ApplicationArchivesBuildItem applicationArchivesBuildItem, ApplicationInfoBuildItem applicationInfo, PackageConfig packageConfig, List<Genera...
mainClassBuildItem.getClassName(), applicationInfo);
1,026,132
public void resolvePackageDirectives(CompilationUnitScope cuScope) {<NEW_LINE>if (this.binding == null) {<NEW_LINE>this.ignoreFurtherInvestigation = true;<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (this.hasResolvedPackageDirectives)<NEW_LINE>return;<NEW_LINE>this.hasResolvedPackageDirectives = true;<NEW_LINE>Set<PlainPac...
ref = this.opens[i];
245,873
protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_main);<NEW_LINE>// authentication with an API key or named user is required to access basemaps and other<NEW_LINE>// location services<NEW_LINE>ArcGISRuntimeEnvironment.setApiKey(B...
12000, 0, 45, 0);
14,454
public void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>getSupportActionBar().setDisplayHomeAsUpEnabled(true);<NEW_LINE>// Load the raw preferences to show in this screen<NEW_LINE>init(R.xml.pref_server, ApplicationSettings_.getInstance_(this).getMaxNormalServer());<NEW_L...
initTextPreference("server_ssltrustkey", null, "server_sslenabled");
1,451,437
public GetSlotTypeVersionsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>GetSlotTypeVersionsResult getSlotTypeVersionsResult = new GetSlotTypeVersionsResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement()...
JsonToken token = context.getCurrentToken();
203,829
private void showSubject(SslCertificate.DName subject, View dialogView) {<NEW_LINE>TextView cnView = dialogView.findViewById(R.id.value_subject_CN);<NEW_LINE>cnView.setText(subject.getCName());<NEW_LINE>cnView.setVisibility(View.VISIBLE);<NEW_LINE>TextView oView = dialogView.<MASK><NEW_LINE>oView.setText(subject.getONa...
findViewById(R.id.value_subject_O);
474,208
final DescribePageResult executeDescribePage(DescribePageRequest describePageRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describePageRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec...
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
988,859
private static void v1doc(Path basedir, Path output) throws Exception {<NEW_LINE>Path v1source = basedir.resolve("v1");<NEW_LINE>FileUtils.cleanDirectory(v1source.toFile());<NEW_LINE>Files.createDirectories(v1source);<NEW_LINE>Git git = new Git("jooby-project", "jooby", v1source);<NEW_LINE>git.clone("--single-branch", ...
("CNAME").toFile());
65,768
protected void loadSpaces() throws VersionException, IOException {<NEW_LINE>for (DBTraceSpaceEntry ent : spaceStore.asMap().values()) {<NEW_LINE><MASK><NEW_LINE>AddressSpace space = addressFactory.getAddressSpace(ent.spaceName);<NEW_LINE>if (space == null) {<NEW_LINE>Msg.error(this, "Space " + ent.spaceName + " does no...
AddressFactory addressFactory = trace.getBaseAddressFactory();
1,769,092
public DescribeClassicLinkInstancesResult unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>DescribeClassicLinkInstancesResult describeClassicLinkInstancesResult = new DescribeClassicLinkInstancesResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalD...
().unmarshall(context));
460,730
void recreate() {<NEW_LINE>if (claOS == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>// NOTIFYICONDATA iconData = isUnicode ? new NOTIFYICONDATAW() : new NOTIFYICONDATAA();<NEW_LINE>Object iconData = isUnicode ? NOTIFYICONDATAW.newInstance() : NOTIFYICONDATAA.newInstance();<NEW_LINE>// iconData.cbSize = ...
.class), TrayItemRecreate.class);
1,535,432
public static void horizontal(Kernel1D_F32 kernel, ImageBorder_IL_F32 src, InterleavedF32 dst) {<NEW_LINE>final int offset = kernel.getOffset();<NEW_LINE>final int kernelWidth = kernel.getWidth();<NEW_LINE>final int width = dst.getWidth();<NEW_LINE>final int height = dst.getHeight();<NEW_LINE>final int borderRight = ke...
+ (width - borderRight) * numBands;
751,527
private void instantiateStores() throws IOException {<NEW_LINE>neoStores = newStoreFactory(databaseLayout, idGeneratorFactory, pageCacheTracer, immutable.empty()).openAllNeoStores(true);<NEW_LINE>propertyKeyRepository = new BatchingPropertyKeyTokenRepository(neoStores.getPropertyKeyTokenStore());<NEW_LINE>labelReposito...
BatchingRelationshipTypeTokenRepository(neoStores.getRelationshipTypeTokenStore());
56,998
public static final String toOneLineStackTraceString(@NonNull final StackTraceElement[] stacktrace) {<NEW_LINE>final StringBuilder stackTraceStr = new StringBuilder();<NEW_LINE>int ste_Considered = 0;<NEW_LINE>boolean ste_lastSkipped = false;<NEW_LINE>for (final StackTraceElement ste : stacktrace) {<NEW_LINE>if (ste_Co...
String classname = ste.getClassName();
1,530,291
public void fixPageChains(Program program, DyldCacheHeader dyldCacheHeader, boolean addRelocations, MessageLog log, TaskMonitor monitor) throws MemoryAccessException, CancelledException {<NEW_LINE>long fixedAddressCount = 0;<NEW_LINE>List<DyldCacheMappingInfo> mappingInfos = dyldCacheHeader.getMappingInfos();<NEW_LINE>...
deltaShift, valueAdd, addRelocations, monitor);
1,041,276
public MediaConcurrency unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>MediaConcurrency mediaConcurrency = new MediaConcurrency();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentT...
String currentParentElement = context.getCurrentParentElement();
522,668
private static String urlFromImgurDirectoryName(String dir) {<NEW_LINE>if (!dir.startsWith("imgur_")) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (dir.contains(" ")) {<NEW_LINE>dir = dir.substring(0, dir.indexOf(" "));<NEW_LINE>}<NEW_LINE>List<String> fields = Arrays.asList(dir.split("_"));<NEW_LINE>String album = f...
url += fields.get(2);
170,118
public void readMixedExcitationFilters(InputStream mixFiltersStream) throws IOException {<NEW_LINE>String line;<NEW_LINE>// first read the taps and then divide the total amount equally among the number of filters<NEW_LINE>Vector<Double> taps <MASK><NEW_LINE>line = s.nextLine();<NEW_LINE>// System.out.println("comment: ...
= new Vector<Double>();
939,798
public String serialize(int numberOfSpacesToIndent, HttpRequestModifier request) {<NEW_LINE>StringBuffer output = new StringBuffer();<NEW_LINE>if (request != null) {<NEW_LINE>appendNewLineAndIndent(numberOfSpacesToIndent * INDENT_SIZE, output);<NEW_LINE>output.append("requestModifier()");<NEW_LINE>if (request.getPath()...
, output).append(".withHeaders(");
1,779,503
public Object draw(Graphics2D g2, Rectangle2D area, Object params) {<NEW_LINE>// check if we need to collect chart entities from the container<NEW_LINE>EntityBlockParams ebp;<NEW_LINE>StandardEntityCollection sec = null;<NEW_LINE>if (params instanceof EntityBlockParams) {<NEW_LINE>ebp = (EntityBlockParams) params;<NEW_...
), bounds.getHeight());
1,061,483
private void broadcastWarmedUp(Context context) {<NEW_LINE>try {<NEW_LINE>File warmedUpFile = WarmUpUtility.warmUpMarkedFile(context);<NEW_LINE>warmedUpFile.createNewFile();<NEW_LINE>WarmUpUtility.writeContentToFile(warmedUpFile, <MASK><NEW_LINE>} catch (IOException e) {<NEW_LINE>MatrixLog.printErrStackTrace(TAG, e, ""...
context.getApplicationInfo().nativeLibraryDir);
554,039
private EntryConfig parseConfig() throws IOException {<NEW_LINE>long start = is.getPos();<NEW_LINE>int size = is.readInt32();<NEW_LINE>if (size < 28) {<NEW_LINE>throw new IOException("Config size < 28");<NEW_LINE>}<NEW_LINE>short mcc = (short) is.readInt16();<NEW_LINE>short mnc = (short) is.readInt16();<NEW_LINE>char[]...
(byte) is.readInt8();
1,508,667
private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents<NEW_LINE>void initComponents() {<NEW_LINE>outlineView = new org.openide.explorer.view.OutlineView();<NEW_LINE>messagePanel = new javax.swing.JPanel();<NEW_LINE>messageLabel = new javax.swing.JLabel();<NEW_LINE>setLayout(ne...
.CardLayout(5, 5));
805,007
public static int reformat(final BaseDocument doc, final int startOffset, final int endOffset) throws BadLocationException {<NEW_LINE>final Reformat formatter = Reformat.get(doc);<NEW_LINE>formatter.lock();<NEW_LINE>try {<NEW_LINE>final Object[<MASK><NEW_LINE>doc.runAtomicAsUser(new Runnable() {<NEW_LINE><NEW_LINE>@Ove...
] result = new Object[1];
1,258,791
public void write(org.apache.thrift.protocol.TProtocol prot, TRange struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;<NEW_LINE>java.util.BitSet optionals = new java.util.BitSet();<NEW_LINE>if (struct.isSetStart()) {...
oprot.writeBitSet(optionals, 6);
900,049
private void sendUsageDetailed(Sender sender, String label) {<NEW_LINE>List<GenericChildCommand> subs = this.children.stream().filter(s -> s.isAuthorized(sender, this.type)).<MASK><NEW_LINE>if (!subs.isEmpty()) {<NEW_LINE>switch(this.type) {<NEW_LINE>case USER:<NEW_LINE>Message.MAIN_COMMAND_USAGE_HEADER.send(sender, ge...
collect(Collectors.toList());
1,581,590
private void createTileCache() {<NEW_LINE>// TODO: Refactor this to avoid replicating logic from QuPathGUI private method<NEW_LINE><MASK><NEW_LINE>// Max available memory<NEW_LINE>long maxAvailable = rt.maxMemory();<NEW_LINE>if (maxAvailable == Long.MAX_VALUE) {<NEW_LINE>logger.warn("No inherent maximum memory set - fo...
Runtime rt = Runtime.getRuntime();
1,622,557
public void visitField(final FieldNode fieldNode) {<NEW_LINE>onLineNumber(fieldNode, "visitField: " + fieldNode.getName());<NEW_LINE><MASK><NEW_LINE>String signature = BytecodeHelper.getGenericsBounds(t);<NEW_LINE>Expression initialValueExpression = fieldNode.getInitialValueExpression();<NEW_LINE>ConstantExpression cex...
ClassNode t = fieldNode.getType();
998,550
public List<AssertSchemaResult> assertConstraints(Map<String, List<Object>> constraints0, boolean dropExisting) throws ExecutionException, InterruptedException {<NEW_LINE>Map<String, List<Object>> constraints = copyMapOfObjects(constraints0);<NEW_LINE>List<AssertSchemaResult> result = new ArrayList<>(constraints.size()...
Schema schema = tx.schema();
1,332,506
public void marshall(HarvestJob harvestJob, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (harvestJob == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(harvestJob.getArn(), ARN_BINDING);<NEW_LINE>protocolMa...
harvestJob.getId(), ID_BINDING);
1,699,080
private void updateStatus() {<NEW_LINE>try {<NEW_LINE>long now = System.currentTimeMillis();<NEW_LINE>if (this.eta == null) {<NEW_LINE>this.eta = "---";<NEW_LINE>}<NEW_LINE>if (converting) {<NEW_LINE>progress = this.convertPrg;<NEW_LINE>} else if (assembling) {<NEW_LINE>long len = length > 0 ? length : downloaded;<NEW_...
partPrg / chunks.size());
1,087,827
private void createFilteredTree(Composite parent) {<NEW_LINE>// Create a FilteredTree for the categories and wizards<NEW_LINE>FilteredTree filteredTree = new FilteredTree(parent, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER<MASK><NEW_LINE>viewer = filteredTree.getViewer();<NEW_LINE>filteredTree.setFont(parent....
, new WizardPatternFilter(), true);
425,635
final PurchaseHostReservationResult executePurchaseHostReservation(PurchaseHostReservationRequest purchaseHostReservationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(purchaseHostReservationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();...
(super.beforeMarshalling(purchaseHostReservationRequest));
467,197
public static String makeAdvancedSearchFilter(final List<String> defaultObjectClasses, final List<FormConfiguration> searchAttributes, final Map<String, String> attributesInSearchRequest) {<NEW_LINE>final StringBuilder filter = new StringBuilder();<NEW_LINE>// open AND clause for objectclasses and attributes<NEW_LINE>f...
(searchAttribute).append("%)");
1,502,018
public ChangeProgressStage unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ChangeProgressStage changeProgressStage = new ChangeProgressStage();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDep...
"unixTimestamp").unmarshall(context));
162,664
public static ClassNode inferLoopElementType(final ClassNode collectionType) {<NEW_LINE>ClassNode componentType = collectionType.getComponentType();<NEW_LINE>if (componentType == null) {<NEW_LINE>if (implementsInterfaceOrIsSubclassOf(collectionType, ITERABLE_TYPE)) {<NEW_LINE>ClassNode intf = <MASK><NEW_LINE>GenericsTy...
GenericsUtils.parameterizeType(collectionType, ITERABLE_TYPE);
559,454
public static void main(String[] args) {<NEW_LINE>// Instantiate a client that will be used to call the service.<NEW_LINE>TextAnalyticsClient client = new TextAnalyticsClientBuilder().credential(new AzureKeyCredential("{key}")).endpoint("{endpoint}").buildClient();<NEW_LINE>// The text that needs be analyzed.<NEW_LINE>...
), scores.getNegative());
785,257
public String incrementalComplete() {<NEW_LINE>if (Helper.okToUse(fProposalShell) && fFilteredProposals != null) {<NEW_LINE>completeCommonPrefix();<NEW_LINE>} else {<NEW_LINE>final Control control = fContentAssistSubjectControlAdapter.getControl();<NEW_LINE>if (fKeyListener == null) {<NEW_LINE>fKeyListener = new Propos...
char) 0, 0, fInvocationOffset);
933,135
public Object calculate(Context ctx) {<NEW_LINE>if (param == null) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("ftp_mget" + mm.getMessage("function.missingParam"));<NEW_LINE>}<NEW_LINE>int size = param.getSubSize();<NEW_LINE>if (size < 4) {<NEW_LINE>MessageManager mm = EngineMessa...
option.indexOf("t") >= 0;
805,966
private void tryAssertionSubqNWCorrelated(RegressionEnvironment env, String epl) {<NEW_LINE>String[] <MASK><NEW_LINE>String[] fieldInside = "val0".split(",");<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>env.compileDeploy(EventRepresentationChoice.MAP.getAnnotationText() + " @public create window MyWin...
fieldSelected = "c0".split(",");
508,081
private void init() {<NEW_LINE>// fix flat spot, if needed<NEW_LINE>this.flatSpot = new double[this.currentFlatNetwork.getActivationFunctions().length];<NEW_LINE>if (this.shouldFixFlatSpot) {<NEW_LINE>for (int i = 0; i < this.currentFlatNetwork.getActivationFunctions().length; i++) {<NEW_LINE>final ActivationFunction a...
this.indexable.getRecordCount());
143,596
public void render() {<NEW_LINE>String latex = "\\begin{array}{cc}";<NEW_LINE>latex += "\\fbox{\\text{A framed box with \\textdbend}}&\\shadowbox{\\text{A shadowed box}}\\cr";<NEW_LINE>latex += "\\doublebox{\\text{A double framed box}}&\\ovalbox{\\text{An oval framed box}}\\cr";<NEW_LINE>latex += "\\end{array}";<NEW_LI...
(context)).build();
1,721,629
public static QueryMediaSettleInfoResponse unmarshall(QueryMediaSettleInfoResponse queryMediaSettleInfoResponse, UnmarshallerContext _ctx) {<NEW_LINE>queryMediaSettleInfoResponse.setRequestId(_ctx.stringValue("QueryMediaSettleInfoResponse.RequestId"));<NEW_LINE>queryMediaSettleInfoResponse.setCode(_ctx.stringValue("Que...
("QueryMediaSettleInfoResponse.Model.MediaSettleInfoList[" + i + "].ModifiedDate"));
33,548
public static void main(String[] args) {<NEW_LINE>JFrame view = new JFrame("airline1");<NEW_LINE><MASK><NEW_LINE>SDateField dep = new SDateField();<NEW_LINE>SDateField ret = new SDateField();<NEW_LINE>Cell<Boolean> valid = dep.date.lift(ret.date, (d, r) -> d.compareTo(r) <= 0);<NEW_LINE>SButton ok = new SButton("OK", v...
view.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
475,573
public InternalAggregation buildAggregation(long owningBucketOrdinal) throws IOException {<NEW_LINE>consumeBucketsAndMaybeBreak(keys.length + <MASK><NEW_LINE>List<InternalFilters.InternalBucket> buckets = new ArrayList<>(keys.length);<NEW_LINE>for (int i = 0; i < keys.length; i++) {<NEW_LINE>long bucketOrd = bucketOrd(...
(showOtherBucket ? 1 : 0));
111,735
public static void main(String[] args) throws Exception {<NEW_LINE>String filename = "iris.data";<NEW_LINE><MASK><NEW_LINE>File irisText = new File(filename);<NEW_LINE>if (!irisText.exists()) {<NEW_LINE>FileUtils.copyURLToFile(url, irisText);<NEW_LINE>}<NEW_LINE>SparkConf conf = new SparkConf();<NEW_LINE>conf.setMaster...
URL url = new URL("https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data");
45,272
public void subscribe(String topicName, int qos) throws MqttException {<NEW_LINE>// Connect to the MQTT server<NEW_LINE>client.connect(conOpt);<NEW_LINE>log("Connected to " + brokerUrl + " with client ID " + client.getClientId());<NEW_LINE>// Subscribe to the requested topic<NEW_LINE>// The QoS specified is the maximum...
client.subscribe(topicName, qos);
1,772,954
public static LockInfo from(CompositeData compositeData) {<NEW_LINE>LockInfo element = null;<NEW_LINE>if (compositeData != null) {<NEW_LINE>// Verify the element<NEW_LINE>ManagementUtils.verifyFieldNumber(compositeData, 2);<NEW_LINE>// $NON-NLS-1$ //$NON-NLS-2$<NEW_LINE>String[<MASK><NEW_LINE>ManagementUtils.verifyFiel...
] attributeNames = { "className", "identityHashCode" };
1,775,590
public static <T> ServerServiceDefinition useMarshalledMessages(final ServerServiceDefinition serviceDef, final MethodDescriptor.Marshaller<T> marshaller) {<NEW_LINE>List<ServerMethodDefinition<?, ?>> wrappedMethods = new ArrayList<>();<NEW_LINE>List<MethodDescriptor<?, ?>> wrappedDescriptors = new ArrayList<>();<NEW_L...
> originalMethodDescriptor = definition.getMethodDescriptor();
921,876
protected void branchSessionLock(GlobalSession globalSession, BranchSession branchSession) throws TransactionException {<NEW_LINE>String applicationData = branchSession.getApplicationData();<NEW_LINE>boolean autoCommit = true;<NEW_LINE>boolean skipCheckLock = false;<NEW_LINE>if (StringUtils.isNotBlank(applicationData))...
, branchSession.getBranchId()));
1,577,859
static int utf8DecodeValid(AbstractTruffleString a, Object arrayA, int i) {<NEW_LINE>int b = readS0(a, arrayA, i);<NEW_LINE>if (b < 0x80) {<NEW_LINE>return b;<NEW_LINE>}<NEW_LINE>int nBytes = utf8CodePointLength(b);<NEW_LINE>int codepoint = b & (0xff >>> nBytes);<NEW_LINE>assert 1 < nBytes && nBytes < 5 : nBytes;<NEW_L...
isUTF8ContinuationByte(a, arrayA, j);
621,856
public void createContents(Composite dialogArea) {<NEW_LINE>List<Disposable> disposables = new ArrayList<>();<NEW_LINE>dialogArea.addDisposeListener(de -> {<NEW_LINE>for (Disposable d : disposables) {<NEW_LINE>d.dispose();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>// Favourites pulldown composite<NEW_LINE>Composite sbComposite ...
model.getSearchBox(), true);
1,543,906
void assembleMessageParameters() {<NEW_LINE>final ByteBuffer paramsBuffer;<NEW_LINE>LOG.info("Element address: " + MeshAddress<MASK><NEW_LINE>LOG.info("Model: " + CompositionDataParser.formatModelIdentifier(modelIdentifier, false));<NEW_LINE>// We check if the model identifier value is within the range of a 16-bit valu...
.formatAddress(elementAddress, true));
489,483
public int execute(Meterpreter meterpreter, TLVPacket request, TLVPacket response) throws Exception {<NEW_LINE>stdapi_fs_stat statCommand = (stdapi_fs_stat) meterpreter.getCommandManager().getCommand(CommandId.STDAPI_FS_STAT);<NEW_LINE>String pathString = request.getStringValue(TLVType.TLV_TYPE_DIRECTORY_PATH);<NEW_LIN...
.TLV_TYPE_FILE_NAME, entries[i]);
517,681
public void drawLine(TerminalPosition p1, TerminalPosition p2, TextCharacter character) {<NEW_LINE>// http://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm<NEW_LINE>// Implementation from Graphics Programming Black Book by Michael Abrash<NEW_LINE>// Available at http://www.gamedev.net/page/resources/_/technical/gra...
deltaX, deltaY, false, character);
12,204
private void enrichFromUsersAndGroups(RoleBindingBuilder builder, List<String> userNames, List<String> groupNames) {<NEW_LINE>builder.withSubjects();<NEW_LINE>if (userNames != null) {<NEW_LINE>for (String userName : userNames) {<NEW_LINE>if (userName.startsWith("system:serviceaccount:")) {<NEW_LINE>String[] splitUserNa...
withName(groupName).endSubject();
1,176,571
// ===================================================================================<NEW_LINE>// Basic Override<NEW_LINE>// ==============<NEW_LINE>@Override<NEW_LINE>protected String doBuildColumnString(String dm) {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append(dm).append(createdBy);<NEW_LINE>s...
(dm).append(includedPaths);
122,362
final DeleteConnectionResult executeDeleteConnection(DeleteConnectionRequest deleteConnectionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteConnectionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv...
HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
1,541,036
public List<String> buildByVmUuid(String vmUuid) {<NEW_LINE>List<String> userdataList = new ArrayList<>();<NEW_LINE>String userdata = VmSystemTags.USERDATA.getTokenByResourceUuid(vmUuid, VmSystemTags.USERDATA_TOKEN);<NEW_LINE>if (userdata != null) {<NEW_LINE>userdata = new String(Base64.getDecoder().decode(userdata.get...
getTokenByResourceUuid(vmUuid, VmSystemTags.SSHKEY_TOKEN);
610,634
protected void initLayout() {<NEW_LINE>ThemeConstants theme = App.getInstance().getThemeConstants();<NEW_LINE>VerticalLayout root = new VerticalLayout();<NEW_LINE>root.setWidthUndefined();<NEW_LINE>root.setSpacing(true);<NEW_LINE>root.setMargin(false);<NEW_LINE>setContent(root);<NEW_LINE>messages = AppBeans.get(Message...
addClickListener(event -> forceClose());
95,828
public static WebAsset publishAsset(WebAsset currWebAsset) throws DotStateException, DotDataException, DotSecurityException {<NEW_LINE>Logger.<MASK><NEW_LINE>// gets the identifier for this asset<NEW_LINE>Identifier identifier = APILocator.getIdentifierAPI().find(currWebAsset);<NEW_LINE>// gets the current working asse...
debug(WebAssetFactory.class, "Publishing asset!!!!");
1,593,237
private void addTelemetrySection(TelemetryCategory telemetryCategory, ColumnLayout layout, Map<String, ?> map) {<NEW_LINE>UILabel categoryHeader = new UILabel(translationSystem.translate(telemetryCategory.displayName()));<NEW_LINE>categoryHeader.setFamily("subheading");<NEW_LINE>UICheckbox uiCheckbox = new UICheckbox(t...
, 0.1f).setHorizontalSpacing(horizontalSpacing);
860,976
public static void show(final TorrentsActivity activity) {<NEW_LINE>View inputLayout = LayoutInflater.from(activity).inflate(R.layout.dialog_url, null);<NEW_LINE>final EditText urlEdit = (EditText) inputLayout.findViewById(R.id.url_edit);<NEW_LINE>ClipboardManager clipboard = (ClipboardManager) activity.getSystemServic...
(0).coerceToText(activity);
247,760
public static Collection<? extends RegressionExecution> executions(boolean withStats) {<NEW_LINE>List<FilterTestMultiStmtPermutable> cases = new ArrayList<FilterTestMultiStmtPermutable>();<NEW_LINE>FilterTestMultiStmtAssertStats[] stats = FilterTestMultiStmtAssertStats.makeSingleStat("P0=(fh:1,fi:1),P1=(fh:0,fi:0,fipar...
makeBean("B"), false));
1,219,441
public static void markup(LoadConfigDirectory lcd, Program program, MessageLog log, NTHeader ntHeader) {<NEW_LINE>boolean is64bit = ntHeader.getOptionalHeader().is64bit();<NEW_LINE>AddressSpace space = program.getAddressFactory().getDefaultAddressSpace();<NEW_LINE>Memory mem = program.getMemory();<NEW_LINE>SymbolTable ...
markupCfgAddressTakenIatEntryTable(lcd, program, log);
1,479,700
public void createAndAddFor(@NonNull final I_M_ShipmentSchedule_QtyPicked shipmentScheduleQtyPicked) {<NEW_LINE>final HUTraceEventBuilder builder = HUTraceEvent.builder().orgId(OrgId.ofRepoId(shipmentScheduleQtyPicked.getAD_Org_ID())).eventTime(shipmentScheduleQtyPicked.getUpdated().toInstant()).shipmentScheduleId(Ship...
vhus = huAccessService.retrieveVhus(luHUId);
241,650
public ImageData createImageData(FilterContext fctx, Filterable src) {<NEW_LINE>if (!(src instanceof PrImage)) {<NEW_LINE>throw new IllegalArgumentException("Identity source must be PrImage");<NEW_LINE>}<NEW_LINE>Image img = ((PrImage) src).getImage();<NEW_LINE>int w = img.getWidth();<NEW_LINE>int h = img.getHeight();<...
Usage.DEFAULT, WrapMode.CLAMP_TO_EDGE);
1,333,267
public static TaobaoFilmGetSchedulesResponse unmarshall(TaobaoFilmGetSchedulesResponse taobaoFilmGetSchedulesResponse, UnmarshallerContext _ctx) {<NEW_LINE>taobaoFilmGetSchedulesResponse.setRequestId(_ctx.stringValue("TaobaoFilmGetSchedulesResponse.RequestId"));<NEW_LINE>taobaoFilmGetSchedulesResponse.setErrorCode(_ctx...
("TaobaoFilmGetSchedulesResponse.Schedules[" + i + "].ShowId"));
1,749,851
private void handleIrChildren(GraphNode topNode, Set<GraphNode> set) throws DFANodeSplitBailoutException {<NEW_LINE>ArrayDeque<GraphNode> dfsList = new ArrayDeque<>();<NEW_LINE>ArrayList<Set<GraphNode>> sccList = new ArrayList<>();<NEW_LINE>for (GraphNode child : topNode.getDomChildren(this)) {<NEW_LINE>if (!isDone(chi...
scc = StateSet.create(this);
912,218
protected final void addTableCacheConfig(final ITableCacheConfig cacheConfig, final boolean override) {<NEW_LINE>if (!Adempiere.isUnitTestMode()) {<NEW_LINE>final POInfo poInfo = POInfo.getPOInfo(cacheConfig.getTableName());<NEW_LINE>if (!poInfo.isSingleKeyColumnName()) {<NEW_LINE>logger.warn("Skip adding {} because th...
info("Registering table cache config: {} \nPrevious table caching config: {}", cacheConfig, previousConfig);
25,323
private boolean handlePropertyValue(CssDeclaration declaration, CssToken start, CssTokenIterator iter, boolean isStyleAttribute) {<NEW_LINE>// we dont worry about EOF here, throw to caller<NEW_LINE>while (true) {<NEW_LINE>if (start.type == CssToken.Type.IMPORTANT) {<NEW_LINE>declaration.important = true;<NEW_LINE>} els...
iter, MATCH_SEMI_CLOSEBRACE, ContextRestrictions.PROPERTY_VALUE);
610,848
protected void doExecute() throws InterruptedException, ExecutionException {<NEW_LINE>new InfoReplicationCommand(clientPool, scheduled).execute().addListener(new CommandFutureListener<RedisInfo>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void operationComplete(CommandFuture<RedisInfo> commandFuture) throws Interr...
setFailure(commandFuture.cause());
103,967
public static Annotation[] createConstructorProperties(ASTNode source, Collection<EclipseNode> fields) {<NEW_LINE>if (fields.isEmpty())<NEW_LINE>return null;<NEW_LINE>int pS = source.sourceStart, pE = source.sourceEnd;<NEW_LINE>long p = (long) pS << 32 | pE;<NEW_LINE>long[] poss = new long[3];<NEW_LINE>Arrays.fill(poss...
fieldName, pS, pE, 0);
647,810
List<CallableUserFunction> compileFunction(Class<?> fcnDefinition, boolean isBuiltin) throws KernelException {<NEW_LINE>try {<NEW_LINE>List<Method> functionMethods = Arrays.stream(fcnDefinition.getDeclaredMethods()).filter(m -> m.isAnnotationPresent(UserFunction.class)).collect(Collectors.toList());<NEW_LINE>if (functi...
, funcName.toString()));
1,122,448
public void download(final Manifest downloadsManifest) throws DownloadException {<NEW_LINE>// Validate all destination directories exist<NEW_LINE>for (final File targetDirectory : downloadsManifest.getTargetDirectories()) {<NEW_LINE>if (!targetDirectory.exists()) {<NEW_LINE>throw new DownloadException("Target directory...
"Target file exists: " + targetFile.getAbsolutePath());
431,488
private void updateTrackingImages(SeekBar seekBar, KrollDict d) {<NEW_LINE>String leftImage = TiConvert.toString(d, "leftTrackImage");<NEW_LINE>String rightImage = TiConvert.toString(d, "rightTrackImage");<NEW_LINE>Drawable leftDrawable = null;<NEW_LINE>Drawable rightDrawable = null;<NEW_LINE>TiFileHelper tfh = new TiF...
e(TAG, "Unable to locate left image for progress bar: " + leftUrl);
786,797
public ObjectMetadata downloadTo(final OutputStream output, RequestMetricCollector requestMetricCollector) {<NEW_LINE>final GetObjectRequest req = new GetObjectRequest(getBucketName(), getKey<MASK><NEW_LINE>final S3Object s3Object = getAmazonS3Client().getObject(req);<NEW_LINE>final S3ObjectInputStream objectContent = ...
()).withRequestMetricCollector(requestMetricCollector);
708,775
public Subnet unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>Subnet subnet = new Subnet();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument())<NEW_LINE>targetDepth += 1;<NEW_LINE>while (true) {<NEW_LINE>...
().unmarshall(context));
1,075,095
private void columnMenuAboutToShow(IMenuManager manager, Dashboard.Column column, Composite columnControl) {<NEW_LINE>MenuManager subMenu = new MenuManager(Messages.MenuNewWidget);<NEW_LINE>manager.add(subMenu);<NEW_LINE>Map<String, MenuManager> <MASK><NEW_LINE>group2menu.put(null, subMenu);<NEW_LINE>for (WidgetFactory...
group2menu = new HashMap<>();
1,533,943
public void onClick(View view) {<NEW_LINE>BottomSheetItemWithCompoundButton item = (BottomSheetItemWithCompoundButton) itemSwitchLiveUpdate;<NEW_LINE>boolean checked = item.isChecked();<NEW_LINE>item.setChecked(!checked);<NEW_LINE>if (onLiveUpdatesForLocalChange != null && onLiveUpdatesForLocalChange.onUpdateLocalIndex...
setItemsEnabled(localUpdatePreference.get());