idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
460,678 | public void visitRelationshipCount(int startLabelId, int relTypeId, int endLabelId, long count) {<NEW_LINE>CountsKey countsKey = relationshipKey(startLabelId, relTypeId, endLabelId);<NEW_LINE>if (relationshipCounter.isValid(startLabelId, relTypeId, endLabelId)) {<NEW_LINE>long expected = unmarkCountVisited(relationship... | , endLabelId, markCountVisited(expected)); |
776,448 | private void updateOptionsButtons() {<NEW_LINE>MapActivity mapActivity = getMapActivity();<NEW_LINE>final View mainView = getMainView();<NEW_LINE>if (mapActivity == null || mainView == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final OsmandApplication app = mapActivity.getMyApplication();<NEW_LINE>RoutingHelper routi... | optionsIcon, R.drawable.ic_action_settings); |
1,614,410 | final CreateLoggerDefinitionVersionResult executeCreateLoggerDefinitionVersion(CreateLoggerDefinitionVersionRequest createLoggerDefinitionVersionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createLoggerDefinitionVersionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionC... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
1,742,305 | public void callMessageWizard(ActionRequest request, ActionResponse response) {<NEW_LINE>Model context = request.getContext().asType(Model.class);<NEW_LINE>String model = request.getModel();<NEW_LINE>LOG.debug("Call message wizard for model : {} ", model);<NEW_LINE>String[] decomposeModel = model.split("\\.");<NEW_LINE... | , simpleModel).map()); |
1,564,872 | protected void processObject(XMLElement e) {<NEW_LINE>imbricatedObjects++;<NEW_LINE>String type = e.getAttribute("type");<NEW_LINE>String data = e.getAttribute("data");<NEW_LINE>if (data != null) {<NEW_LINE>processSrc(e.getName(), data);<NEW_LINE>data = PathUtil.resolveRelativeReference(base, data);<NEW_LINE>}<NEW_LINE... | + attribute.getValue() + "\""; |
852,403 | private void handleRequest(LinkedList<String> packet) throws Exception {<NEW_LINE>if (packet.get(0).startsWith("DROP")) {<NEW_LINE>jobInProgress = false;<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>File requestedFile;<NEW_LINE>String reqFileName = packet.get(0).replaceAll("(^[A-z\\s]+/)|(\\s+?.*$)", "");<NEW_LINE>if (!files.c... | reqFileName + " doesn't exists or have 0 size. Returning 404", EMsgType.FAIL); |
326,444 | public CurrencyAmount presentValueTheta(ResolvedSwaption swaption, RatesProvider ratesProvider, SwaptionVolatilities swaptionVolatilities) {<NEW_LINE>validate(swaption, ratesProvider, swaptionVolatilities);<NEW_LINE>double expiry = swaptionVolatilities.relativeTime(swaption.getExpiry());<NEW_LINE>ResolvedSwap underlyin... | fixedLeg.getCurrency(), 0d); |
242,814 | public static void main(String[] args) throws Exception {<NEW_LINE>dataLocalPath = DownloaderUtility.MODELIMPORT.Download();<NEW_LINE>final String SIMPLE_MLP = new File(<MASK><NEW_LINE>// Keras Sequential models correspond to DL4J MultiLayerNetworks. We enforce loading the training configuration<NEW_LINE>// of the mode... | dataLocalPath, "keras/simple_mlp.h5").getAbsolutePath(); |
1,760,043 | public static ConnectionProfile buildDefaultConnectionProfile(Settings settings) {<NEW_LINE>int connectionsPerNodeRecovery = TransportSettings.CONNECTIONS_PER_NODE_RECOVERY.get(settings);<NEW_LINE>int connectionsPerNodeBulk = TransportSettings.CONNECTIONS_PER_NODE_BULK.get(settings);<NEW_LINE>int connectionsPerNodeReg ... | .CONNECT_TIMEOUT.get(settings)); |
235,245 | protected void writeInternal(Object object, HttpOutputMessage outputMessage) throws IOException, HttpMessageNotWritableException {<NEW_LINE>try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) {<NEW_LINE>HttpHeaders headers = outputMessage.getHeaders();<NEW_LINE>int contentLength;<NEW_LINE>if (object instance... | ex.getMessage(), ex); |
1,142,285 | public boolean openForm(int AD_Form_ID) {<NEW_LINE>Properties ctx = Env.getCtx();<NEW_LINE>//<NEW_LINE>String name = null;<NEW_LINE>String className = null;<NEW_LINE>String sql = "SELECT Name, Description, ClassName, Help FROM AD_Form WHERE AD_Form_ID=?";<NEW_LINE>boolean trl = !Env.isBaseLanguage(ctx, "AD_Form");<NEW_... | Level.SEVERE, sql, e); |
81,957 | public void verifyRubricQuestionDetails(int questionNum, FeedbackRubricQuestionDetails questionDetails) {<NEW_LINE>int numChoices = questionDetails.getNumOfRubricChoices();<NEW_LINE>List<String> choices = questionDetails.getRubricChoices();<NEW_LINE>for (int i = 0; i < numChoices; i++) {<NEW_LINE>assertEquals(choices.g... | 0).getAttribute("value")); |
1,284,152 | public Object evaluate(PebbleTemplateImpl self, EvaluationContextImpl context) {<NEW_LINE>TestInvocationExpression testInvocation = (TestInvocationExpression) this.getRightExpression();<NEW_LINE>ArgumentsNode args = testInvocation.getArgs();<NEW_LINE>if (this.cachedTest == null) {<NEW_LINE>String testName = testInvocat... | getArgumentMap(self, context, test); |
637,026 | public NotebookInstanceLifecycleConfigSummary unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>NotebookInstanceLifecycleConfigSummary notebookInstanceLifecycleConfigSummary = new NotebookInstanceLifecycleConfigSummary();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String curr... | class).unmarshall(context)); |
211,324 | public static void main(String[] args) {<NEW_LINE>Scanner sc = new Scanner(System.in);<NEW_LINE>Queue_LL q = new Queue_LL();<NEW_LINE>boolean flag = true;<NEW_LINE>int val = 0;<NEW_LINE>while (flag) {<NEW_LINE><MASK><NEW_LINE>System.out.println("2. Dequeue()");<NEW_LINE>System.out.println("3. Current Size of Queue");<N... | System.out.println("1. Enqueue()"); |
818,393 | final GetEnvironmentResult executeGetEnvironment(GetEnvironmentRequest getEnvironmentRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getEnvironmentRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.... | invoke(request, responseHandler, executionContext); |
413,300 | public boolean updateAfterApprove(List<InlongStreamApproveRequest> streamApproveList, String operator) {<NEW_LINE>if (CollectionUtils.isEmpty(streamApproveList)) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>if (LOGGER.isDebugEnabled()) {<NEW_LINE>LOGGER.debug("begin to update stream after approve={}", streamApproveList)... | ), streamEntity.getVersion()); |
1,837,143 | private static int goAfterLastNewLine(final TokenSequence<JavaTokenId> seq) {<NEW_LINE>int base = seq.offset();<NEW_LINE>seq.movePrevious();<NEW_LINE>while (seq.moveNext() && nonRelevant.contains(seq.token().id())) ;<NEW_LINE>while (seq.movePrevious() && nonRelevant.contains(seq.token().id())) {<NEW_LINE>switch(seq.tok... | .offset() + i + 1; |
938,460 | private boolean save() {<NEW_LINE>String name = nameField.getText().trim();<NEW_LINE>TeaVMProfile existingProfile = settings.getProfile(name);<NEW_LINE>if (existingProfile != null && existingProfile != profile) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>profile.setName(name);<NEW_LINE>String mainClass = mainClassFiel... | setDebugInformationGenerated(debugInformationButton.getSelection()); |
1,424,165 | final DeleteVpcPeeringConnectionResult executeDeleteVpcPeeringConnection(DeleteVpcPeeringConnectionRequest deleteVpcPeeringConnectionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteVpcPeeringConnectionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRe... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteVpcPeeringConnection"); |
1,319,849 | public final void zoom(int centerX, int centerY, double factor) {<NEW_LINE>// Cache current fitting<NEW_LINE>boolean fitsWidth = fitsWidth();<NEW_LINE>boolean fitsHeight = fitsHeight();<NEW_LINE>// Both fits, no zoom<NEW_LINE>if (fitsWidth && fitsHeight)<NEW_LINE>return;<NEW_LINE>// Resolve current scale<NEW_LINE>doubl... | double dataHeight = dataY - getDataOffsetY(); |
763,709 | protected List<String> splitTextcontent(String textcontent) {<NEW_LINE>List<String> ret = null;<NEW_LINE>int startPos = 0;<NEW_LINE>int endPos = -1;<NEW_LINE>if ((textcontent != null) && (textcontent.length() > 0)) {<NEW_LINE>while ((startPos < textcontent.length()) && (!Character.isDigit(textcontent.charAt(startPos)))... | (textcontent.substring(endPos)); |
309,706 | private boolean hasPreviousSession(ConsoleProxyVO proxy, VMInstanceVO vm) {<NEW_LINE>ConsoleProxyStatus status = null;<NEW_LINE>try {<NEW_LINE>byte[] detailsInBytes = proxy.getSessionDetails();<NEW_LINE>String details = detailsInBytes != null ? new String(detailsInBytes, Charset.forName("US-ASCII")) : null;<NEW_LINE>st... | , proxy.toString())); |
1,079,338 | public ResponseData<Integer> putPolicyIntoCpt(Integer cptId, List<Integer> policyIdList, WeIdPrivateKey weIdPrivateKey) {<NEW_LINE>if (!WeIdUtils.isPrivateKeyValid(weIdPrivateKey) || !isPolicyIdListValid(policyIdList) || cptId < 1) {<NEW_LINE>return new ResponseData<>(-1, ErrorCode.ILLEGAL_INPUT);<NEW_LINE>}<NEW_LINE>C... | intValue(), ErrorCode.SUCCESS); |
829,224 | private Pair<List<? extends CoreMap>, List<T>> applyCompositeRule(SequenceMatchRules.ExtractRule<List<? extends CoreMap>, T> compositeExtractRule, List<? extends CoreMap> merged, List<T> matchedExpressions, int limit) {<NEW_LINE>// Apply higher order rules<NEW_LINE>boolean done = false;<NEW_LINE>// Limit of number of t... | MatchedExpression.replaceMerged(merged, newExprs); |
1,168,789 | final StopInstanceResult executeStopInstance(StopInstanceRequest stopInstanceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(stopInstanceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
1,247,164 | public ProcResult fetchResult() throws AnalysisException {<NEW_LINE>BaseProcResult result = new BaseProcResult();<NEW_LINE>result.setNames(TITLE_NAMES);<NEW_LINE>TabletScheduler tabletScheduler = Catalog.getCurrentCatalog().getTabletScheduler();<NEW_LINE>TabletChecker tabletChecker = Catalog.getCurrentCatalog().getTabl... | ).size()))); |
1,342,835 | protected ByteBuffer map(int prot, int offset, int length) throws ErrnoException {<NEW_LINE>ReflectionHelpers.callInstanceMethod(realObject, "checkOpen");<NEW_LINE>FileDescriptor fileDescriptor = getRealFileDescriptor();<NEW_LINE>int fd = ReflectionHelpers.getField(fileDescriptor, "fd");<NEW_LINE>File file = filesByFd.... | MapMode.READ_WRITE, offset, length); |
652,143 | private void writeEnum(XmlWriter writer, Enum enuum) {<NEW_LINE>XmlAttributes attrs = new XmlAttributes();<NEW_LINE>attrs.addAttribute("NAME", enuum.getDisplayName());<NEW_LINE>attrs.addAttribute("NAMESPACE", enuum.getCategoryPath().getPath());<NEW_LINE>attrs.addAttribute("SIZE", enuum.getLength(), true);<NEW_LINE>writ... | , enuum.getComment(name)); |
721,618 | public Alarm unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>Alarm alarm = new Alarm();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE><MASK><NEW_LINE>if (tok... | JsonToken token = context.getCurrentToken(); |
1,799,115 | public boolean visit(SQLShowColumnsStatement x) {<NEW_LINE>final List<SqlNode> operands = new LinkedList<>();<NEW_LINE>final SqlNode like = convertToSqlNode(x.getLike());<NEW_LINE>final SqlNode where = convertToSqlNode(x.getWhere());<NEW_LINE>final List<SqlSpecialIdentifier> specialIdentifiers = new LinkedList<>();<NEW... | specialIdentifiers.add(SqlSpecialIdentifier.FULL); |
1,617,331 | private BLangBlockStmt rewriteNestedOnFail(BLangOnFailClause onFailClause, BLangFail fail) {<NEW_LINE>BLangOnFailClause currentOnFail = this.onFailClause;<NEW_LINE>BLangBlockStmt onFailBody = ASTBuilderUtil.createBlockStmt(onFailClause.pos);<NEW_LINE>onFailBody.stmts.addAll(onFailClause.body.stmts);<NEW_LINE>onFailBody... | createVariableDef(onFailClause.pos, errorVar); |
1,114,644 | private void buildEnum(StringBuilder resBuf, Enum type, int size) {<NEW_LINE>resBuf.append("<type");<NEW_LINE>appendNameIdAttributes(resBuf, type);<NEW_LINE>long[<MASK><NEW_LINE>String metatype = "uint";<NEW_LINE>for (long key : keys) {<NEW_LINE>if (key < 0) {<NEW_LINE>metatype = "int";<NEW_LINE>break;<NEW_LINE>}<NEW_L... | ] keys = type.getValues(); |
649,110 | private static Matrix apply(BlasFloatMatrix mat, float alpha, IntFloatVector v1, IntDummyVector v2) {<NEW_LINE>float[] data = mat.getData();<NEW_LINE>int m = mat.getNumRows(), n = mat.getNumCols();<NEW_LINE>assert (m == v1.getDim() && n == v2.getDim());<NEW_LINE>if (v1.isDense()) {<NEW_LINE>float[] v1Values = v1.getSto... | int size1 = v1.size(); |
75,385 | protected String buildBaseQuery() {<NEW_LINE>final StringBuilder queryBuf = new StringBuilder(255);<NEW_LINE>if (params.hasConditionQuery()) {<NEW_LINE>appendConditions(queryBuf, params.getConditions());<NEW_LINE>} else {<NEW_LINE>final String query = params.getQuery();<NEW_LINE>if (StringUtil.isNotBlank(query)) {<NEW_... | .toString().trim(); |
1,037,932 | private void recreateCells() {<NEW_LINE>if (cellsMap != null) {<NEW_LINE>Collection<Reference<R>> cells = cellsMap.values();<NEW_LINE>Iterator<Reference<R><MASK><NEW_LINE>while (cellsIter.hasNext()) {<NEW_LINE>Reference<R> cellRef = cellsIter.next();<NEW_LINE>R cell = cellRef.get();<NEW_LINE>if (cell != null) {<NEW_LIN... | > cellsIter = cells.iterator(); |
150,127 | public static AudioFormat parseWavFormat(InputStream inputStream) throws IOException {<NEW_LINE>try {<NEW_LINE>// arbitrary amount, also used by the underlying parsing package from Sun<NEW_LINE>inputStream.mark(200);<NEW_LINE>javax.sound.sampled.AudioFormat format = AudioSystem.getAudioInputStream(inputStream).getForma... | )) * format.getChannels(); |
708,217 | private int quicksortPartitionWithIndices(final float[] values, int lower, int upper, boolean yDown, short[] originalIndices) {<NEW_LINE>float x = values[lower];<NEW_LINE>float y = values[lower + 1];<NEW_LINE>int up = upper;<NEW_LINE>int down = lower;<NEW_LINE>float temp;<NEW_LINE>short tempIndex;<NEW_LINE>while (down ... | y)) up = up - 2; |
1,584,171 | public void newSpace(Location location, SpaceQuality qual) {<NEW_LINE>entry("newSpace", location, qual);<NEW_LINE>if (qual.size == 0) {<NEW_LINE>reportError(location, "Space definition '" + qual.name + "' missing size attribute");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (qual.size <= 0 || qual.size > 8) {<NEW_LINE>thro... | ), AddrSpace.hasphysical, delay); |
1,615,716 | public static void vertical9(Kernel1D_S32 kernel, GrayS32 src, GrayS32 dst, int divisor, @Nullable GrowArray<DogArray_I32> workspaces) {<NEW_LINE>final int[] dataSrc = src.data;<NEW_LINE>final int[] dataDst = dst.data;<NEW_LINE>final int k1 = kernel.data[0];<NEW_LINE>final int k2 = kernel.data[1];<NEW_LINE>final int k3... | (dataSrc[indexSrc]) * k9; |
569,321 | private void loadNode668() {<NEW_LINE>ServerStatusTypeNode node = new ServerStatusTypeNode(this.context, Identifiers.Server_ServerStatus, new QualifiedName(0, "ServerStatus"), new LocalizedText("en", "ServerStatus"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new DataValue(Variant.NULL_VALUE), ... | .expanded(), true)); |
1,205,173 | public MutableHttpResponse<JsonError> processResponse(@NonNull ErrorContext errorContext, @NonNull MutableHttpResponse<?> response) {<NEW_LINE>if (errorContext.getRequest().getMethod() == HttpMethod.HEAD) {<NEW_LINE>return (MutableHttpResponse<JsonError>) response;<NEW_LINE>}<NEW_LINE>JsonError error;<NEW_LINE>if (!err... | getStatus().getReason()); |
212,239 | private Text rawSynopsisUnitText(Help.ColorScheme colorScheme, Set<ArgSpec> outparam_groupArgs) {<NEW_LINE>String infix = exclusive() ? " | " : " ";<NEW_LINE>Text synopsis = colorScheme.ansi().new Text(0);<NEW_LINE>for (ArgSpec arg : args()) {<NEW_LINE>if (synopsis.length > 0) {<NEW_LINE>synopsis = synopsis.concat(infi... | .synopsisText(colorScheme, outparam_groupArgs)); |
638,601 | public void start() {<NEW_LINE>if (current != null) {<NEW_LINE>current.show();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Form hi = new Form("Hi World", new GridLayout(1, 2));<NEW_LINE>hi.setScrollable(false);<NEW_LINE>Container draggable = new Container(new FlowLayout()) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void p... | add(new Label("DropTarget")); |
1,516,982 | // End of variables declaration//GEN-END:variables<NEW_LINE>private void initUserComponents() {<NEW_LINE>treeView = new BeanTreeView();<NEW_LINE>treeView.setRootVisible(false);<NEW_LINE>treeView.setPopupAllowed(false);<NEW_LINE>treeView<MASK><NEW_LINE>treeView.setDefaultActionAllowed(false);<NEW_LINE>java.awt.GridBagCo... | .setBorder(new EtchedBorder()); |
883,159 | protected Object decode(Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {<NEW_LINE>Parser parser = new Parser(PATTERN, (String) msg);<NEW_LINE>if (!parser.matches()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, parser.next(... | (parser.nextDouble(0)); |
220,776 | private void jbInit() throws Exception {<NEW_LINE>this.setTitle(Services.get(IMsgBL.class).translate(Env.getCtx(), "About"));<NEW_LINE>//<NEW_LINE>setResizable(false);<NEW_LINE>labelHeading.setFont(new java.awt.Font("Dialog", 1, 14));<NEW_LINE>labelHeading.setHorizontalAlignment(SwingConstants.CENTER);<NEW_LINE>labelHe... | imageControl.setVerticalTextPosition(SwingConstants.BOTTOM); |
674,840 | private static void toSlime(Cursor summaryObject, ConvergenceSummary summary) {<NEW_LINE>summaryObject.setLong("nodes", summary.nodes());<NEW_LINE>summaryObject.setLong("down", summary.down());<NEW_LINE>summaryObject.setLong(<MASK><NEW_LINE>summaryObject.setLong("upgrading", summary.upgradingPlatform());<NEW_LINE>summa... | "needPlatformUpgrade", summary.needPlatformUpgrade()); |
765,886 | private LLVMValueRef buildCompressFunction(boolean nonNull, int shift) {<NEW_LINE>String funcName = COMPRESS_FUNCTION_BASE_NAME + (nonNull ? "_nonNull" : "") + "_" + shift;<NEW_LINE>LLVMValueRef func = builder.addFunction(funcName, builder.functionType(builder.objectType(true), builder.objectType(false), builder.wordTy... | builder.appendBasicBlock(func, "main"); |
853,694 | final CreateTrafficPolicyInstanceResult executeCreateTrafficPolicyInstance(CreateTrafficPolicyInstanceRequest createTrafficPolicyInstanceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createTrafficPolicyInstanceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.get... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
357,813 | private void callChangeObserver(FindResults results) {<NEW_LINE>int n;<NEW_LINE>log(lvl, "changes: %d in: %s", results.size(), observedRegion);<NEW_LINE>for (String name : eventNames.keySet()) {<NEW_LINE>if (eventTypes.get(name) != ObserveEvent.Type.CHANGE) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>n = (<MASK><NEW_LINE>... | Integer) eventNames.get(name); |
1,507,625 | public Event fromStore(Result result) {<NEW_LINE>if (result == null)<NEW_LINE>return null;<NEW_LINE>Event evt = new Event();<NEW_LINE>evt.setUuid(Bytes.toString(result.getValue(B_AUDIT_CF, B_EVENT_UID)));<NEW_LINE>evt.setSource(Bytes.toString(result.<MASK><NEW_LINE>evt.setType(Bytes.toString(result.getValue(B_AUDIT_CF,... | getValue(B_AUDIT_CF, B_EVENT_SOURCE))); |
158,473 | public void config(EndpointInfoBuilderContext context, EndpointInfo endpointInfo) {<NEW_LINE>InfoStore infoStore = context.getInfoStore();<NEW_LINE>ClassInfo implBeanClassInfo = infoStore.getDelayableClassInfo(endpointInfo.getImplBeanClassName());<NEW_LINE>String seiClassName = endpointInfo.getServiceEndpointInterface(... | ()).getClassLoader()); |
1,589,206 | public void processOpts() {<NEW_LINE>super.processOpts();<NEW_LINE>if (additionalProperties.containsKey(CodegenConstants.OPTIONAL_PROJECT_GUID)) {<NEW_LINE>setPackageGuid((String) additionalProperties.get(CodegenConstants.OPTIONAL_PROJECT_GUID));<NEW_LINE>}<NEW_LINE>additionalProperties.put("packageGuid", packageGuid);... | ("AuthSchemes.mustache", authFolder, "AuthSchemes.fs")); |
1,008,669 | public static void showImageHttpPath(Context a, String path) {<NEW_LINE>final <MASK><NEW_LINE>builder.requestWindowFeature(Window.FEATURE_NO_TITLE);<NEW_LINE>builder.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));<NEW_LINE>builder.setOnDismissListener(new DialogInterface.OnDism... | Dialog builder = new Dialog(a); |
782,176 | public ChannelMembershipPreferences unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ChannelMembershipPreferences channelMembershipPreferences = new ChannelMembershipPreferences();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentPar... | JsonToken token = context.getCurrentToken(); |
1,835,078 | public int compare(File f1, File f2) {<NEW_LINE>String s1 = f1.getName();<NEW_LINE>String s2 = f2.getName();<NEW_LINE>// For directories that are only numbers and files named part.*.log|txt<NEW_LINE>Matcher m1 = FileUtils.file_Pattern.matcher(s1);<NEW_LINE>Matcher m2 = <MASK><NEW_LINE>boolean bothMatch = false;<NEW_LIN... | FileUtils.file_Pattern.matcher(s2); |
1,354,319 | public void paintDeterminate(Graphics g, JComponent c) {<NEW_LINE>if (!(g instanceof Graphics2D)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// area for border<NEW_LINE>Insets b = progressBar.getInsets();<NEW_LINE>int barRectWidth = progressBar.getWidth() - (b.right + b.left);<NEW_LINE>int barRectHeight = progressBar.getHe... | b.top, amountFull, barRectHeight); |
1,269,633 | private int insertReturnAndIndent(final List<FormatterToken> argList, final int argIndex, final int argIndent) {<NEW_LINE>if (functionBracket.contains(Boolean.TRUE))<NEW_LINE>return 0;<NEW_LINE>try {<NEW_LINE>final String defaultLineSeparator = getDefaultLineSeparator();<NEW_LINE>StringBuilder s = new StringBuilder(def... | setString(s.toString()); |
334,234 | public static DescribePdnsThreatStatisticsResponse unmarshall(DescribePdnsThreatStatisticsResponse describePdnsThreatStatisticsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describePdnsThreatStatisticsResponse.setRequestId<MASK><NEW_LINE>describePdnsThreatStatisticsResponse.setTotalCount(_ctx.longValue("DescribePdnsTh... | (_ctx.stringValue("DescribePdnsThreatStatisticsResponse.RequestId")); |
1,710,445 | private void determineProsodicSettings(Document doc) {<NEW_LINE>// Determine the prosodic setting for each prosody element<NEW_LINE>NodeList prosodies = doc.getElementsByTagName(MaryXML.PROSODY);<NEW_LINE>for (int i = 0; i < prosodies.getLength(); i++) {<NEW_LINE>Element prosody = (Element) prosodies.item(i);<NEW_LINE>... | prosody.getAttribute("fricative-duration"))); |
766,789 | public static GetVideoInfoResponse unmarshall(GetVideoInfoResponse getVideoInfoResponse, UnmarshallerContext _ctx) {<NEW_LINE>getVideoInfoResponse.setRequestId(_ctx.stringValue("GetVideoInfoResponse.RequestId"));<NEW_LINE>getVideoInfoResponse.setAI(_ctx.stringValue("GetVideoInfoResponse.AI"));<NEW_LINE>Video video = ne... | (_ctx.stringValue("GetVideoInfoResponse.Video.CreationTime")); |
1,391,821 | public BooleanWithReason check() {<NEW_LINE>//<NEW_LINE>// Group candidates by orders<NEW_LINE>final HashMap<OrderId, Order> orders = new HashMap<>();<NEW_LINE>for (final ShipmentScheduleWithHU candidate : candidates) {<NEW_LINE>final OrderId orderId = candidate.getOrderId();<NEW_LINE>if (orderId == null) {<NEW_LINE>co... | requiredShipmentScheduleIds = shipmentSchedulesRepo.retrieveUnprocessedIdsByOrderId(orderId); |
248,315 | public static void doLoadJarLibrary(Project proj) {<NEW_LINE>final var loader = proj.getLogisimFile().getLoader();<NEW_LINE>final var chooser = loader.createChooser();<NEW_LINE>chooser.setDialogTitle(S.get("loadJarDialogTitle"));<NEW_LINE><MASK><NEW_LINE>int check = chooser.showOpenDialog(proj.getFrame());<NEW_LINE>if ... | chooser.setFileFilter(Loader.JAR_FILTER); |
1,369,777 | public static SpannableString nanoStatus() {<NEW_LINE>SpannableString pingStatus = null;<NEW_LINE>if (lastMessageReceived > 0) {<NEW_LINE>long pingSince = JoH.msSince(lastMessageReceived);<NEW_LINE>if (pingSince > Constants.MINUTE_IN_MS * 30) {<NEW_LINE>pingStatus = Span.colorSpan("No follower sync for: " + JoH.niceTim... | Span.join(true, pingStatus); |
564,288 | public void writeToParcel(Parcel dest, int flags) {<NEW_LINE>dest.writeInt(this.id);<NEW_LINE>dest.writeString(this.name);<NEW_LINE>dest.writeString(this.fullName);<NEW_LINE>dest.writeByte(this.repPrivate ? (byte) 1 : (byte) 0);<NEW_LINE>dest.writeString(this.htmlUrl);<NEW_LINE>dest.writeString(this.description);<NEW_L... | writeParcelable(this.parent, flags); |
1,845,576 | public Set<String> referencedFiles(String tableName) throws TableNotFoundException {<NEW_LINE>log.debug("Collecting referenced files for replication of table {}", tableName);<NEW_LINE>TableId tableId = context.getTableId(tableName);<NEW_LINE>log.debug("Found id of {} for name {}", tableId, tableName);<NEW_LINE>// Get t... | NAME, Authorizations.EMPTY, 4); |
575,465 | public void run(RegressionEnvironment env) {<NEW_LINE>for (EventRepresentationChoice rep : EventRepresentationChoice.values()) {<NEW_LINE>tryAssertionColDefPlain(env, rep);<NEW_LINE>}<NEW_LINE>// test property classname, either simple or fully-qualified.<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>env... | , eventType.getPropertyType("f1")); |
1,150,993 | public static List<GrammaticalStructure> readCoNLLXGrammaticalStructureCollection(String fileName, Map<String, GrammaticalRelation> shortNameToGRel, GrammaticalStructureFromDependenciesFactory factory) throws IOException {<NEW_LINE>try (BufferedReader r = IOUtils.readerFromString(fileName)) {<NEW_LINE>LineNumberReader ... | (tokenFields, shortNameToGRel, factory)); |
212,560 | public static void importGroup(RealmModel realm, GroupModel parent, GroupRepresentation group) {<NEW_LINE>GroupModel newGroup = realm.createGroup(group.getId(), group.getName(), parent);<NEW_LINE>if (group.getAttributes() != null) {<NEW_LINE>for (Map.Entry<String, List<String>> attr : group.getAttributes().entrySet()) ... | addRole(roleName.trim()); |
1,055,025 | public void deleteByIdWithResponse(String id, Context context) {<NEW_LINE>String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>throw logger.logExceptionAsError(new IllegalArgumentException(String.format("The resource ID '%s' is not valid. Missin... | Utils.getValueFromIdByName(id, "managedPrivateEndpoints"); |
1,793,792 | final ListItemsResult executeListItems(ListItemsRequest listItemsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listItemsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_L... | (super.beforeMarshalling(listItemsRequest)); |
1,836,574 | protected void onCreate(Bundle bundle) {<NEW_LINE>super.onCreate(bundle);<NEW_LINE>setContentView(R.layout.activity_webcontainer);<NEW_LINE>UIUtils.setupToolbar(this, R.drawable.logo, getString(R.string.add_facebook), true);<NEW_LINE>webview = (WebView) findViewById(R.id.webcontainer);<NEW_LINE>webview.<MASK><NEW_LINE>... | getSettings().setJavaScriptEnabled(true); |
1,529,866 | public Long parse(Uri uri, InputStream inputStream) throws IOException {<NEW_LINE>String firstLine = new BufferedReader(new InputStreamReader(inputStream, Charsets.UTF_8)).readLine();<NEW_LINE>try {<NEW_LINE>Matcher matcher = TIMESTAMP_WITH_TIMEZONE_PATTERN.matcher(firstLine);<NEW_LINE>if (!matcher.matches()) {<NEW_LIN... | (matcher.group(5)); |
1,769,495 | public Protos.TaskInfo constructMesosTaskInfo(Config heronConfig, Config heronRuntime) {<NEW_LINE>// String taskIdStr, BaseContainer task, Offer offer<NEW_LINE>String taskIdStr = this.taskId;<NEW_LINE>Protos.TaskID mesosTaskID = Protos.TaskID.newBuilder().setValue(taskIdStr).build();<NEW_LINE>Protos.TaskInfo.Builder ta... | .setValue(ev.value)); |
1,403,500 | final ListAccountSettingsResult executeListAccountSettings(ListAccountSettingsRequest listAccountSettingsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listAccountSettingsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,250,509 | private static BakedQuad putQuad(Transformation transform, Direction side, TextureAtlasSprite sprite, int color, int tint, float x1, float y1, float x2, float y2, float z, float u1, float v1, float u2, float v2, int luminosity) {<NEW_LINE>BakedQuadBuilder builder = new BakedQuadBuilder(sprite);<NEW_LINE>builder.setQuad... | u1, v2, color, luminosity); |
1,585,867 | public CreateCampaignResult createCampaign(CreateCampaignRequest createCampaignRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createCampaignRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(... | awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); |
356,857 | private DataSet<Tuple3<Double, Object, Vector>> transform(BatchOperator<?> in, Params params, boolean isRegProc) {<NEW_LINE>String[] featureColNames = params.get(FmTrainParams.FEATURE_COLS);<NEW_LINE>String labelName = params.get(FmTrainParams.LABEL_COL);<NEW_LINE>String weightColName = <MASK><NEW_LINE>String vectorCol... | params.get(FmTrainParams.WEIGHT_COL); |
1,140,727 | private static void refactor(DomProvider p) {<NEW_LINE>final Document doc;<NEW_LINE>try {<NEW_LINE>doc = p.getDocument();<NEW_LINE>} catch (IOException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>NodeList nl = doc.getElementsByTagName("*");<NEW_LINE>final List<Element> l = new ArrayList<Elem... | el2 = doc.createElement(tagname); |
384,947 | public RedisKeeperServer add(KeeperTransMeta keeperTransMeta) {<NEW_LINE>KeeperMeta keeperMeta = keeperTransMeta.getKeeperMeta();<NEW_LINE>enrichKeeperMetaFromKeeperTransMeta(keeperMeta, keeperTransMeta);<NEW_LINE>String keeperServerKey = assembleKeeperServerKey(keeperTransMeta);<NEW_LINE>if (!redisKeeperServers.contai... | getShardDbId())), ex); |
722,820 | public io.kubernetes.client.proto.V1.ConfigMapNodeConfigSource buildPartial() {<NEW_LINE>io.kubernetes.client.proto.V1.ConfigMapNodeConfigSource result = new io.kubernetes.client.<MASK><NEW_LINE>int from_bitField0_ = bitField0_;<NEW_LINE>int to_bitField0_ = 0;<NEW_LINE>if (((from_bitField0_ & 0x00000001) == 0x00000001)... | proto.V1.ConfigMapNodeConfigSource(this); |
657,986 | protected IStatus validateCompilationUnit(IResource resource) {<NEW_LINE>IPackageFragmentRoot root = getPackageFragmentRoot();<NEW_LINE>// root never null as validation is not done for working copies<NEW_LINE>try {<NEW_LINE>if (root.getKind() != IPackageFragmentRoot.K_SOURCE)<NEW_LINE>return new JavaModelStatus(IJavaMo... | JavaModelStatus(IJavaModelStatusConstants.ELEMENT_DOES_NOT_EXIST, this); |
1,407,212 | public void appendHoverText(ItemStack stack, Level level, List<Component> lines, TooltipFlag advancedTooltips) {<NEW_LINE>String firstLineKey = this.getFirstValidTranslationKey(this.getSettingsName(stack) + ".name", this.getSettingsName(stack));<NEW_LINE>lines.add(Tooltips.of(new TranslatableComponent(firstLineKey)));<... | (new TranslatableComponent(tooltipKey))); |
163,529 | private void checkIndex(RuntimeEnvironment env) {<NEW_LINE>if (env.isProjectsEnabled()) {<NEW_LINE>Map<String, Project> projects = env.getProjects();<NEW_LINE>File indexRoot = new File(env.getDataRootPath(), IndexDatabase.INDEX_DIR);<NEW_LINE>if (indexRoot.exists()) {<NEW_LINE>LOGGER.log(Level.FINE, "Checking indexes f... | .getKey()), e); |
1,534,963 | protected Iterator<HugeEdge> queryEdgesFromBackend(Query query) {<NEW_LINE>assert query.resultType().isEdge();<NEW_LINE>QueryResults<BackendEntry> results = this.query(query);<NEW_LINE>Iterator<BackendEntry> entries = results.iterator();<NEW_LINE>Iterator<HugeEdge> edges = new FlatMapperIterator<>(entries, entry -> {<N... | this.filterExpiredResultFromFromBackend(query, edges); |
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... | put(Constants.BUNDLE_LICENSE, "LICENSE"); |
602,352 | private void initComponents() {<NEW_LINE>myRoot = new JPanel(new VerticalLayout(JBUI.scale(5)));<NEW_LINE>myRoot.setOpaque(false);<NEW_LINE>myIconLabel = new JBLabel();<NEW_LINE>myName = new JBTextArea();<NEW_LINE>myName.setBorder(JBUI.Borders.empty());<NEW_LINE>myName.setOpaque(false);<NEW_LINE>myName.setLineWrap(true... | (myDownloads = new JBLabel()); |
1,013,132 | public static List<Geometry> flatFeatureList(Geometry geom) {<NEW_LINE>final List<Geometry> singleGeoms = new ArrayList<>();<NEW_LINE>final Stack<Geometry> <MASK><NEW_LINE>Geometry nextGeom;<NEW_LINE>int nextGeomCount;<NEW_LINE>geomStack.push(geom);<NEW_LINE>while (!geomStack.isEmpty()) {<NEW_LINE>nextGeom = geomStack.... | geomStack = new Stack<>(); |
1,736,631 | 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}")).<MASK><NEW_LINE>// The texts that need be analyzed.<NEW_LINE>List<TextDocumentInput> documen... | endpoint("{endpoint}").buildClient(); |
1,508,218 | @Produces(MediaType.APPLICATION_JSON)<NEW_LINE>@Operation(description = "Delete the provider service from the specified tenant domain. Upon successful completion of this delete request, the server will return NO_CONTENT status code without any data (no object will be returned).")<NEW_LINE>public void deleteTenancy(@Par... | code, e, ResourceError.class); |
1,815,601 | private static Map<String, CountryCode> initcodes() {<NEW_LINE>Map<String, CountryCode> ccs = new HashMap();<NEW_LINE>// US<NEW_LINE>ccs.put("1", new CountryCode("1", false, 10));<NEW_LINE>// Netherlands<NEW_LINE>ccs.put("31", new CountryCode("31"));<NEW_LINE>// France<NEW_LINE>ccs.put(<MASK><NEW_LINE>// Finland<NEW_LI... | "33", new CountryCode("33")); |
1,669,694 | public void marshall(StartEventsDetectionJobRequest startEventsDetectionJobRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (startEventsDetectionJobRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.mar... | startEventsDetectionJobRequest.getLanguageCode(), LANGUAGECODE_BINDING); |
1,682,881 | public NewTableConfiguration attachIterator(IteratorSetting setting, EnumSet<IteratorScope> scopes) {<NEW_LINE>Objects.requireNonNull(setting, "setting cannot be null!");<NEW_LINE>Objects.requireNonNull(scopes, "scopes cannot be null!");<NEW_LINE>try {<NEW_LINE>TableOperationsHelper.checkIteratorConflicts(iteratorProps... | checkDisjoint(properties, iteratorProps, "iterator"); |
1,410,460 | public OtaPackageInfo saveOtaPackageInfo(OtaPackageInfo otaPackageInfo, boolean isUrl) {<NEW_LINE>log.trace("Executing saveOtaPackageInfo [{}]", otaPackageInfo);<NEW_LINE>if (isUrl && (StringUtils.isEmpty(otaPackageInfo.getUrl()) || otaPackageInfo.getUrl().trim().length() == 0)) {<NEW_LINE>throw new DataValidationExcep... | otaPackageInfo.getTenantId(), otaPackageInfo); |
1,453,793 | final DeleteTagsResult executeDeleteTags(DeleteTagsRequest deleteTagsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteTagsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
1,162,617 | public com.amazonaws.services.redshiftdataapi.model.ResourceNotFoundException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.redshiftdataapi.model.ResourceNotFoundException resourceNotFoundException = new com.amazonaws.services.<MASK><NEW_LINE>int originalDepth... | redshiftdataapi.model.ResourceNotFoundException(null); |
1,010,833 | protected void handleRetransmits() throws IOException {<NEW_LINE>// If we have a cachedStream, we are caching the request.<NEW_LINE>if (cachedStream != null || getClient().isAutoRedirect() && KNOWN_HTTP_VERBS_WITH_NO_CONTENT.contains(getMethod()) || authSupplier != null && authSupplier.requiresRequestCaching()) {<NEW_L... | fine(b.toString()); |
927,020 | public CorrelationResult correlation() {<NEW_LINE>if (this.outerProduct == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>DenseMatrix cov = covariance();<NEW_LINE>Vector stv = toSummary().standardDeviation();<NEW_LINE>int n = cov.numRows();<NEW_LINE>for (int i = 0; i < n; i++) {<NEW_LINE>for (int j = i; j < n; j++) ... | cov.get(i, j); |
135,109 | public int compare(ETable.RowMapping rm1, ETable.RowMapping rm2) {<NEW_LINE>Object obj1 = rm1.getTransformedValue(column);<NEW_LINE>Object <MASK><NEW_LINE>if (obj1 == null && obj2 == null) {<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>if (obj1 == null) {<NEW_LINE>return -1;<NEW_LINE>}<NEW_LINE>if (obj2 == null) {<NEW_LINE>r... | obj2 = rm2.getTransformedValue(column); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.