idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
182,698 | private void writeRoundInternal(long seq, V round) {<NEW_LINE>String name = getFilenameFromSeq(seq);<NEW_LINE>File tmpFile = new File(path, name + TMP_FILE_SUFFIX);<NEW_LINE>// compute checksum hash<NEW_LINE>byte[] bytes = round.persistToBytes();<NEW_LINE>byte[] hash = Sha256Hash.<MASK><NEW_LINE>PaxosPersistence.PaxosH... | computeHash(bytes).getBytes(); |
1,011,848 | private synchronized int loadData(final Uri uri) {<NEW_LINE>int numBytesLoaded = 0;<NEW_LINE>String msg;<NEW_LINE>InputStream inStr;<NEW_LINE>try {<NEW_LINE>inStr = context.getContentResolver().openInputStream(uri);<NEW_LINE>numBytesLoaded = inStr != null ? inStr.available() : 0;<NEW_LINE>msg = context.getString(R.stri... | (PvList) oIn.readObject(); |
1,204,384 | private void verifyUpdateAllowed(Update command, DomainBase existingDomain, DateTime now) throws EppException {<NEW_LINE>verifyOptionalAuthInfo(authInfo, existingDomain);<NEW_LINE>AddRemove add = command.getInnerAdd();<NEW_LINE>AddRemove remove = command.getInnerRemove();<NEW_LINE>String tld = existingDomain.getTld();<... | getUpdatePrice(registry, targetId, now); |
1,803,269 | public void init(GameServer gameServer) {<NEW_LINE>IServerConfiguration configuration = gameServer.getConfig();<NEW_LINE>GameRegistry registry = gameServer.getRegistry();<NEW_LINE>listeners.add(new WorldCreationListener(configuration.getInt("settlement_spawn_rate")));<NEW_LINE>listeners.add(new CpuInitialisationListene... | registry.registerGameObject(HackedNPC.class); |
386,682 | private void recalculateLineIndexes() throws BadLocationException {<NEW_LINE>for (List<Line> lines : formattingContext.getIndentationData()) {<NEW_LINE>List<Line> l = new ArrayList<Line>();<NEW_LINE>Line previousLine = null;<NEW_LINE>for (Line line : lines) {<NEW_LINE><MASK><NEW_LINE>// Java formatter is touching lines... | line.recalculateLineIndex(getDocument()); |
608,491 | public void run(RegressionEnvironment env) {<NEW_LINE>String[] fields = "value".split(",");<NEW_LINE>String text = "@name('s0') select * from SupportRecogBean#length(10) " + "match_recognize (" + " partition by value" + " measures E1.value as value" + " pattern (E1 E2 | E2 E1 ) " + " define " + " E1 as E1.theStr... | new SupportRecogBean("B", 3)); |
399,060 | public // 25.846: [Full GC 25.847: [CMS: 0K->7019K(2015232K), 5.6129510 secs] 11161K->7019K(2097088K), [CMS Perm : 68104K->67271K(13520K)] icms_dc=0 , 25.6146105 secs]<NEW_LINE>void fullGCiCMS(GCLogTrace trace, String line) {<NEW_LINE>FullGC collection;<NEW_LINE>if (trace.gcCause() == GCCause.JAVA_LANG_SYSTEM)<NEW_LINE... | (trace.getIntegerGroup(25)); |
760,551 | public static SSLConfiguration load(String filePath) throws FileNotFoundException, IOException {<NEW_LINE>checkNotNull(filePath, "Argument [filePath] may not be null");<NEW_LINE>logger.debug("load SSL configuration file:{}", filePath);<NEW_LINE>KeyStoreInfo keyStoreInfo = null;<NEW_LINE>KeyStoreInfo trustKeyStoreInfo =... | KeyStoreInfo(trustKeystorePath, trustPassword, trustType); |
625,824 | public <K> KVScatterGatherResult<K, EntityResponse<T>> buildRequests(BatchGetEntityRequest<K, T> request, RequestContext requestContext) throws ServiceUnavailableException {<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>final Set<K> idObjects = (Set<<MASK><NEW_LINE>final MapKeyResult<URI, K> mapKeyResult = mapKeys(r... | K>) request.getObjectIds(); |
1,725,812 | private double _modelToView(int line, double componentHeight, double usableHeight) {<NEW_LINE>try {<NEW_LINE>int r = getModelToViewImpl(line);<NEW_LINE>if (r == (-1))<NEW_LINE>return -1.0;<NEW_LINE>if (ERR.isLoggable(ErrorManager.INFORMATIONAL)) {<NEW_LINE>// NOI18N<NEW_LINE>ERR.log(<MASK><NEW_LINE>// ERR.log(ErrorMana... | ErrorManager.INFORMATIONAL, "AnnotationView.modelToView: line=" + line); |
1,444,680 | public static void bitmapToInterleaved(Bitmap input, InterleavedF32 output) {<NEW_LINE>final int h = output.height;<NEW_LINE>final int w = output.width;<NEW_LINE>// read one row at a time instead of the entire image to reduce memory requirements<NEW_LINE>int[] pixels = new int[w];<NEW_LINE>for (int y = 0; y < h; y++) {... | (rgb >> 24) & 0xFF; |
1,549,016 | public void removeServiceEntry(String linkName) {<NEW_LINE>// remove servlet entry in web.xml<NEW_LINE>WebApp webApp = getWebApp();<NEW_LINE>Servlet[] servlets = webApp.getServlet();<NEW_LINE>for (int i = 0; i < servlets.length; i++) {<NEW_LINE>Servlet servlet = servlets[i];<NEW_LINE>if (servlet.getServletName().equals... | getDefault().notify(ndd); |
1,671,850 | public long next(long instant, int standardOffset, int saveMillis, GregorianCalendar calendar) {<NEW_LINE>int offset;<NEW_LINE>if (iMode == 'w') {<NEW_LINE>offset = standardOffset + saveMillis;<NEW_LINE>} else if (iMode == 's') {<NEW_LINE>offset = standardOffset;<NEW_LINE>} else {<NEW_LINE>offset = 0;<NEW_LINE>}<NEW_LI... | set(Calendar.MINUTE, 0); |
448,177 | public BossBarMessage decode(ByteBuf buffer) throws IOException {<NEW_LINE>UUID uuid = GlowBufUtils.readUuid(buffer);<NEW_LINE>Action action = Action.fromInt(ByteBufUtils.readVarInt(buffer));<NEW_LINE>switch(action) {<NEW_LINE>case ADD:<NEW_LINE>TextMessage title = GlowBufUtils.readChat(buffer);<NEW_LINE>float health =... | (ByteBufUtils.readVarInt(buffer)); |
130,903 | private void makeConstructor() {<NEW_LINE>this.mv = this.classWriter.visitMethod(ACC_PUBLIC, CONSTRUCTOR_METHOD_NAME, "(Lcom/googlecode/aviator/AviatorEvaluatorInstance;Ljava/util/List;Lcom/googlecode/aviator/lexer/SymbolTable;)V", null, null);<NEW_LINE>this.mv.visitCode();<NEW_LINE>this.mv.visitVarInsn(ALOAD, 0);<NEW_... | this.mv.visitLdcInsn(outterName); |
679,801 | private Set<String> parseHandlesOutput(File pluginOutputFile) {<NEW_LINE>String line;<NEW_LINE>Set<String> fileSet = new HashSet<>();<NEW_LINE>try (BufferedReader br = new BufferedReader(new FileReader(pluginOutputFile))) {<NEW_LINE>// Ignore the first two header lines<NEW_LINE>br.readLine();<NEW_LINE>br.readLine();<NE... | file_path = line.substring(57); |
1,457,909 | public void doFilter(final ServletRequest servletRequest, final ServletResponse servletResponse, final FilterChain filterChain) throws IOException, ServletException {<NEW_LINE>final HttpServletRequest request = (HttpServletRequest) servletRequest;<NEW_LINE>final HttpServletResponse response = (HttpServletResponse) serv... | Writer writer = servletResponse.getWriter(); |
1,803,074 | private String[] sortedCopy(String... labels) {<NEW_LINE>if (labels.length % 2 != 0) {<NEW_LINE>throw new IllegalArgumentException("labels are name/value pairs, expecting an even number");<NEW_LINE>}<NEW_LINE>String[] result = new String[labels.length];<NEW_LINE>int charsTotal = 0;<NEW_LINE>for (int i = 0; i < labels.l... | result[j + 3] = tmp; |
27,582 | private void createDropAllTable(PrintWriter pw, Collection<TableDefinition> tableDefinitions, DaoGenConfig config) {<NEW_LINE>pw.println(" /** Drop all tables */");<NEW_LINE>pw.println(" public void dropAllTable() {");<NEW_LINE>pw.println(" String[] sqls = new String[" + tableDefinitions.size() + "];");<NE... | + tableDefinition.getTable_name() + " CASCADE;"; |
537,029 | public Response load(Uri uri, int networkPolicy) throws IOException {<NEW_LINE>if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {<NEW_LINE>installCacheIfNeeded(context);<NEW_LINE>}<NEW_LINE>HttpURLConnection connection = openConnection(uri);<NEW_LINE>connection.setUseCaches(true);<NEW_LINE>if (netwo... | StringBuilder builder = CACHE_HEADER_BUILDER.get(); |
1,331,772 | public List<String> processCommand(String command, GcodeState state) throws GcodeParserException {<NEW_LINE>Position c = state.currentPoint;<NEW_LINE>if (c != null) {<NEW_LINE>Position p = new Position(c.x, c.y, c.z, state.isMetric ? Units.MM : Units.INCH).getPositionIn(defaultUnits);<NEW_LINE>// Update min<NEW_LINE>mi... | min.y, p.y); |
293,597 | public Macro read(Decoder decoder) throws Exception {<NEW_LINE><MASK><NEW_LINE>if (tag == SIMPLE) {<NEW_LINE>String name = decoder.readString();<NEW_LINE>IncludeType type = enumSerializer.read(decoder);<NEW_LINE>String value = decoder.readNullableString();<NEW_LINE>return new MacroWithSimpleExpression(name, type, value... | byte tag = decoder.readByte(); |
1,776,369 | public void marshall(BatchWriteOperationResponse batchWriteOperationResponse, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (batchWriteOperationResponse == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(bat... | batchWriteOperationResponse.getUpdateObjectAttributes(), UPDATEOBJECTATTRIBUTES_BINDING); |
1,372,993 | public synchronized StringBuffer insert(int index, char[] chars) {<NEW_LINE>int currentLength = lengthInternalUnsynchronized();<NEW_LINE>if (0 <= index && index <= currentLength) {<NEW_LINE>move(chars.length, index);<NEW_LINE>if (String.COMPACT_STRINGS) {<NEW_LINE>// Check if the StringBuffer is compressed<NEW_LINE>if ... | value, index, chars.length); |
809,289 | public EdgeLabel build() {<NEW_LINE>Id id = this.validOrGenerateId(HugeType.EDGE_LABEL, this.id, this.name);<NEW_LINE><MASK><NEW_LINE>EdgeLabel edgeLabel = new EdgeLabel(graph, id, this.name);<NEW_LINE>edgeLabel.sourceLabel(graph.vertexLabel(this.sourceLabel).id());<NEW_LINE>edgeLabel.targetLabel(graph.vertexLabel(this... | HugeGraph graph = this.graph(); |
1,752,021 | // Call on EDT<NEW_LINE>private void addMBeanInfo(XMBean mbean, MBeanInfo mbeanInfo) {<NEW_LINE>// NOI18N<NEW_LINE>String border = Resources.getText("LBL_MBeanInfo");<NEW_LINE>// NOI18N<NEW_LINE>String text = Resources.getText("LBL_Info");<NEW_LINE>DefaultTableModel tableModel = (DefaultTableModel) infoTable.getModel()... | = new TableRowDivider(border, lightSalmon); |
324,510 | protected void checkLink(XMLElement e, String attrNS, String attr) {<NEW_LINE>String href = e.getAttributeNS(attrNS, attr);<NEW_LINE>String rel = e.getAttributeNS(attrNS, "rel");<NEW_LINE>if (xrefChecker.isPresent() && href != null && rel != null && rel.toLowerCase(Locale.ROOT).contains("stylesheet")) {<NEW_LINE>href =... | href, XRefChecker.Type.STYLESHEET); |
91,580 | public static ProjectViewEdit editLocalProjectView(Project project, ProjectViewEditor editor) {<NEW_LINE>List<Modification> modifications = Lists.newArrayList();<NEW_LINE>ProjectViewSet oldProjectViewSet = reloadProjectView(project);<NEW_LINE>if (oldProjectViewSet == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Pr... | ProjectViewFile projectViewFile = oldProjectViewSet.getTopLevelProjectViewFile(); |
370,661 | public DataStreamSource build(CDCBuilder cdcBuilder, StreamExecutionEnvironment env, CustomTableEnvironment customTableEnvironment, DataStreamSource<String> dataStreamSource) {<NEW_LINE>final List<Schema<MASK><NEW_LINE>final String schemaFieldName = config.getSchemaFieldName();<NEW_LINE>if (Asserts.isNotNullCollection(... | > schemaList = config.getSchemaList(); |
176,349 | public Either<Failure, CatchEventTuple> findCatchEvent(final DirectBuffer errorCode, ElementInstance instance, final Optional<DirectBuffer> jobErrorMessage) {<NEW_LINE>// assuming that error events are used rarely<NEW_LINE>// - just walk through the scope hierarchy and look for a matching catch event<NEW_LINE>final Arr... | var instanceRecord = instance.getValue(); |
203,325 | private static /* We arrange some constants description to better fit in narrow space<NEW_LINE>* in property sheet, e.g. instead of HORIZONTAL_SCROLLBAR_AS_NEEDED we<NEW_LINE>* show only AS_NEEDED. We keep the uppercase letters to preserve the<NEW_LINE>* feeling that the value is a constant.<NEW_LINE>*/<NEW_LINE>void t... | int n2 = arrangedEnumLabels.length / 2; |
167,602 | protected void toXmlP(StringBuilder sb, boolean pretty, String indent, String... attributeNames) {<NEW_LINE>String topTag = underscore(getClass().getSimpleName());<NEW_LINE>if (pretty) {<NEW_LINE>sb.append(indent);<NEW_LINE>}<NEW_LINE>sb.append('<').append(topTag).append('>');<NEW_LINE>if (pretty) {<NEW_LINE>sb.append(... | (name).append('>'); |
1,787,355 | public com.squareup.okhttp.Call throttleGetCall(String query, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String ... | = new ArrayList<Pair>(); |
821,212 | /*-[<NEW_LINE>void *start_routine(void *arg) {<NEW_LINE>JavaLangThread <MASK><NEW_LINE>pthread_setspecific(java_thread_key, thread);<NEW_LINE>pthread_setname_np([thread->name_ UTF8String]);<NEW_LINE>@autoreleasepool {<NEW_LINE>@try {<NEW_LINE>[thread run];<NEW_LINE>} @catch (JavaLangThrowable *t) {<NEW_LINE>JavaLangThr... | *thread = (JavaLangThread *)arg; |
1,852,551 | public void run() {<NEW_LINE>for (TransactionPair<PortfolioTransaction> transaction : transactionList) {<NEW_LINE>Portfolio portfolio = (Portfolio) transaction.getOwner();<NEW_LINE>Account account = portfolio.getReferenceAccount();<NEW_LINE>PortfolioTransaction deliveryTransaction = transaction.getTransaction();<NEW_LI... | entry.getPortfolioTransaction()::addUnit); |
1,311,864 | public void run(RegressionEnvironment env) {<NEW_LINE>String epl = "@public create window PointWindow#keepall as (id string, px double, py double);\n" + "create index MyIndex on PointWindow((px,py) pointregionquadtree(0,0,100,100,2,12));\n" + "insert into PointWindow select id, px, py from SupportSpatialPoint;\n" + "@n... | env, "P7", 64.81513547235994, 74.40317040273223); |
1,167,555 | protected void initializePrivilege(String restAdminId, String privilegeName) {<NEW_LINE>boolean restApiPrivilegeMappingExists = false;<NEW_LINE>Privilege privilege = idmIdentityService.createPrivilegeQuery().privilegeName(privilegeName).singleResult();<NEW_LINE>if (privilege != null) {<NEW_LINE>restApiPrivilegeMappingE... | privilege.getId(), restAdminId); |
522,506 | private void collectContextTraits(final CdmAttributeContext subAttCtx, final HashSet<String> inheritedTraitNames, final Map<CdmAttributeContext, HashSet<String>> ctx2traitNames) {<NEW_LINE>final LinkedHashSet<String> traitNamesHere = new LinkedHashSet<>(inheritedTraitNames);<NEW_LINE>final CdmTraitCollection traitsHere... | ctx2traitNames.put(subAttCtx, traitNamesHere); |
340,345 | public void run(RegressionEnvironment env) {<NEW_LINE>AtomicInteger milestone = new AtomicInteger();<NEW_LINE>String epl = "@name('s0') select " + "first(intPrimitive, 0) as f0, " + "first(intPrimitive, 1) as f1, " + "first(intPrimitive, 2) as f2, " + "first(intPrimitive, 3) as f3, " + "last(intPrimitive, 0) as l0, " +... | new Object[] { 10 }); |
37,497 | protected boolean afterSave(boolean newRecord, boolean success) {<NEW_LINE>if (!success)<NEW_LINE>return false;<NEW_LINE>//<NEW_LINE>String sql = "SELECT count(*) FROM AD_Package_Exp_Detail WHERE AD_Package_Exp_ID = ?";<NEW_LINE>int recordCount = DB.getSQLValue(get_TrxName(<MASK><NEW_LINE>if (recordCount == 0) {<NEW_LI... | ), sql, getAD_Package_Exp_ID()); |
84,125 | public Object apply(final ActionContext ctx, final Object caller, final Object[] sources) {<NEW_LINE>try {<NEW_LINE>assertArrayHasLengthAndAllElementsNotNull(sources, 1);<NEW_LINE>final SecurityContext securityContext = ctx.getSecurityContext();<NEW_LINE>final String name = sources[0].toString();<NEW_LINE>if (securityC... | ), ctx.isJavaScriptContext()); |
1,007,167 | protected Object dateGetter(Object thisObj, @Cached("create(getContext())") TemporalCalendarGetterNode calendarGetterNode) {<NEW_LINE>JSTemporalPlainYearMonthObject temporalYM = (JSTemporalPlainYearMonthObject) thisObj;<NEW_LINE>switch(property) {<NEW_LINE>case calendar:<NEW_LINE>return temporalYM.getCalendar();<NEW_LI... | temporalYM.getCalendar(), temporalYM); |
539,503 | public DeleteImageBuilderResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DeleteImageBuilderResult deleteImageBuilderResult = new DeleteImageBuilderResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonT... | String currentParentElement = context.getCurrentParentElement(); |
697,449 | public Query writeQuery(Query query) {<NEW_LINE><MASK><NEW_LINE>// Serialize edge condition query (TODO: add VEQ(for EOUT/EIN))<NEW_LINE>if (type.isEdge() && query.conditionsSize() > 0) {<NEW_LINE>if (query.idsSize() > 0) {<NEW_LINE>throw new BackendException("Not supported query edge by id " + "and by condition at the... | HugeType type = query.resultType(); |
1,667,996 | private Map<String, Object> readPrivateDict(DictData privateDict) {<NEW_LINE>Map<String, Object> privDict = new LinkedHashMap<String, Object>(17);<NEW_LINE>privDict.put("BlueValues", privateDict.getDelta("BlueValues", null));<NEW_LINE>privDict.put("OtherBlues", privateDict.getDelta("OtherBlues", null));<NEW_LINE>privDi... | .getNumber("nominalWidthX", 0)); |
660,514 | public String generateUserKey(String username, String keyname) throws ServletException {<NEW_LINE>// set key type<NEW_LINE>int type = KeyPair.RSA;<NEW_LINE>if ("dsa".equals(SSHUtil.KEY_TYPE)) {<NEW_LINE>type = KeyPair.DSA;<NEW_LINE>} else if ("ecdsa".equals(SSHUtil.KEY_TYPE)) {<NEW_LINE>type = KeyPair.ECDSA;<NEW_LINE>}... | getPassphrase().getBytes()); |
1,016,590 | public void actionPerformed(ActionEvent ev) {<NEW_LINE>CoverageManagerImpl manager = CoverageManagerImpl.getInstance();<NEW_LINE>switch(action) {<NEW_LINE>case ACTION_TOGGLE_COLLECT:<NEW_LINE>{<NEW_LINE>boolean enabled = ((JCheckBoxMenuItem) ev.getSource()).isSelected();<NEW_LINE><MASK><NEW_LINE>break;<NEW_LINE>}<NEW_L... | manager.setEnabled(project, enabled); |
1,226,704 | public final void write(final byte[] bytes, final int off, final int len) throws IOException {<NEW_LINE>int start = off;<NEW_LINE>for (int i = off; i < off + len; i++) {<NEW_LINE>int b = bytes[i];<NEW_LINE>if (inString) {<NEW_LINE>if (b == '"' && !inEscape) {<NEW_LINE>inString = false;<NEW_LINE>} else {<NEW_LINE><MASK>... | inEscape = !inEscape && b == '\\'; |
832,489 | private static void attemptWriteAndDeleteDynamodbItem(final DynamodbDestinationConfig dynamodbDestinationConfig, final String outputTableName) throws Exception {<NEW_LINE>final DynamoDB dynamoDB = new DynamoDB(getAmazonDynamoDB(dynamodbDestinationConfig));<NEW_LINE>final // create table<NEW_LINE>Table // create table<N... | error(e.getMessage()); |
430,674 | public //<NEW_LINE>ResponseEntity<JsonAttachment> //<NEW_LINE>attachFile(//<NEW_LINE>@PathVariable("dataSourceName") final String dataSourceName, @ApiParam(required = true, value = "`externalheaderId` of the order line candidates to which the given file shall be attached") @PathVariable("externalHeaderId") final String... | String fileName = file.getOriginalFilename(); |
181,630 | public ListenerResult listen(WorkflowContext context) throws WorkflowListenerException {<NEW_LINE>GroupResourceProcessForm form = (GroupResourceProcessForm) context.getProcessForm();<NEW_LINE>String groupId = form.getInlongGroupId();<NEW_LINE>log.info("try to create consumer group for groupId {}", groupId);<NEW_LINE>In... | groupInfo = groupService.get(groupId); |
921,254 | public com.amazonaws.services.cloudtrail.model.InvalidInsightSelectorsException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.cloudtrail.model.InvalidInsightSelectorsException invalidInsightSelectorsException = new com.amazonaws.services.cloudtrail.model.Inval... | int originalDepth = context.getCurrentDepth(); |
1,046,092 | protected SearchResultItem createSearchResultItem(NewznabXmlItem item) throws NzbHydraException {<NEW_LINE>SearchResultItem searchResultItem = new SearchResultItem();<NEW_LINE>String link = getEnclosureUrl(item);<NEW_LINE>searchResultItem.setLink(link);<NEW_LINE>if (item.getRssGuid().isPermaLink()) {<NEW_LINE>searchRes... | setPubDate(item.getPubDate()); |
332,136 | private void generateAnnotatedSourceFile(final MutationTestSummaryData mutationMetaData) {<NEW_LINE>final String fileName = mutationMetaData.getPackageName() + File.separator + mutationMetaData.getFileName() + ".html";<NEW_LINE>try (Writer writer = this.outputStrategy.createWriterForFile(fileName)) {<NEW_LINE>final Str... | "tests", mutationMetaData.getTests()); |
1,559,980 | private Image createDelegatePaintedImage(Component c) {<NEW_LINE>double toolkitScale = Toolkit.getDefaultToolkit().getScreenResolution() / 96.0;<NEW_LINE>final int EXTRA_PIXELS = 2;<NEW_LINE>BufferedImage img = new BufferedImage(EXTRA_PIXELS + (int) Math.ceil(delegate.getIconWidth() * toolkitScale), EXTRA_PIXELS + (int... | Graphics2D g = img.createGraphics(); |
58,057 | static Map<String, Uri> buildCidToAttachmentUriMap(AttachmentInfoExtractor attachmentInfoExtractor, Part rootPart) {<NEW_LINE>HashMap<String, Uri> result = new HashMap<>();<NEW_LINE>Stack<Part> partsToCheck = new Stack<>();<NEW_LINE>partsToCheck.push(rootPart);<NEW_LINE>while (!partsToCheck.isEmpty()) {<NEW_LINE>Part p... | put(contentId, attachmentInfo.internalUri); |
783,987 | static CodeBlock generateStateUpdateDelegatingCall(SpecModel specModel, int methodIndex, SpecMethodModel<UpdateStateMethod, Void> updateStateMethod, boolean withTransition) {<NEW_LINE>final CodeBlock.Builder codeBlock = CodeBlock.builder();<NEW_LINE>codeBlock.add("case $L:\n$>", methodIndex);<NEW_LINE>final StringBuild... | addStatement("$L.set(this.$L)", name, name); |
607,881 | public void deleteHistory(Model model, String timeBucketColumnName, int ttl) {<NEW_LINE>ElasticSearchClient client = getClient();<NEW_LINE>if (!model.isRecord()) {<NEW_LINE>if (!DownSampling.Minute.equals(model.getDownsampling())) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>long deadline = Long.parseLong(new Date... | latestIndex = TimeSeriesUtils.latestWriteIndexName(model); |
844,861 | protected boolean isDelimiter(String peek, ParserContext context, int col, int colIgnoringWhitespace) {<NEW_LINE>Delimiter delimiter = context.getDelimiter();<NEW_LINE>if (peek.startsWith(delimiter.getEscape() + delimiter.getDelimiter())) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>if (delimiter.shouldBeAloneOnLine()) ... | peek, context, col, colIgnoringWhitespace); |
908,306 | protected void initDisplayOptions(Options displayOptions) {<NEW_LINE>// display options for local variables handled by FieldFactory base class<NEW_LINE>colorOptionName = "Variable Color";<NEW_LINE>styleOptionName = "Variable Style";<NEW_LINE>super.initDisplayOptions();<NEW_LINE>parameterFieldOptions = new ParameterFiel... | = new ParameterFieldOptions(OptionsGui.PARAMETER_CUSTOM); |
765,469 | public void run() {<NEW_LINE>CassandraConnector connector = new CassandraConnector();<NEW_LINE>connector.connect("127.0.0.1", 9042, "datacenter1");<NEW_LINE>CqlSession session = connector.getSession();<NEW_LINE><MASK><NEW_LINE>keyspaceRepository.createKeyspace("testKeyspace", 1);<NEW_LINE>keyspaceRepository.useKeyspace... | KeyspaceRepository keyspaceRepository = new KeyspaceRepository(session); |
700,954 | protected JPanel positionTab() {<NEW_LINE>JPanel panel = new JPanel(new MigLayout("gap rel unrel", "[][65lp::][30lp::]", ""));<NEW_LINE>// // Radial position<NEW_LINE>// // Radial distance:<NEW_LINE>panel.add(new JLabel(trans.get("MassComponentCfg.lbl.Radialdistance")));<NEW_LINE>DoubleModel m = new DoubleModel(compon... | component, "RadialDirection", UnitGroup.UNITS_ANGLE); |
37,177 | static ByteBuf encodeMetadataHeader(ByteBufAllocator allocator, String customMime, int metadataLength) {<NEW_LINE>ByteBuf metadataHeader = allocator.buffer(4 + customMime.length());<NEW_LINE>// reserve 1 byte for the customMime length<NEW_LINE>// /!\ careful not to read that first byte, which is random at this point<NE... | NumberUtils.encodeUnsignedMedium(metadataHeader, metadataLength); |
620,656 | protected void filterDirectory(List<String> dirContent, DirPattern dirPattern, String parentPath) throws IOException {<NEW_LINE>// setup the working directory<NEW_LINE>File workingDirectory = new File(source, parentPath);<NEW_LINE>// If the directory doesn't exist, we should not archive it.<NEW_LINE>if (workingDirector... | parentPath + file.getName()); |
1,288,767 | public final // JPA2.g:542:1: entity_type_literal : WORD ;<NEW_LINE>JPA2Parser.entity_type_literal_return entity_type_literal() throws RecognitionException {<NEW_LINE>JPA2Parser.entity_type_literal_return retval = new JPA2Parser.entity_type_literal_return();<NEW_LINE>retval.start = input.LT(1);<NEW_LINE>Object root_0 =... | retval.start, retval.stop); |
881,990 | /*<NEW_LINE>* RunningQuery factory.<NEW_LINE>*/<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>protected AbstractRunningQuery newRunningQuery(/*final QueryEngine queryEngine,*/<NEW_LINE>final UUID queryId, final boolean controller, final IQueryClient clientProxy, final UUID queryControllerId, final PipelineOp query, ... | .class, IChunkMessage.class }); |
1,492,189 | public void resourceChanged(IResourceChangeEvent event) {<NEW_LINE>try {<NEW_LINE>if (event.getDelta() == null && event.getSource() != ResourcesPlugin.getWorkspace()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Map<IPath, IProject> renamedFrom = new HashMap<>();<NEW_LINE>Map<IPath, IProject> renamedTo = new HashMap<>();<NEW... | newProject = renamedTo.get(path); |
335,566 | protected void read(Node node) {<NEW_LINE>String nodeName;<NEW_LINE>boolean ignoreUnknown = false;<NEW_LINE>boolean keepText = false;<NEW_LINE>if (peekCurrent() instanceof AnyNode || peekCurrent() instanceof Documentation || peekCurrent() instanceof AppInfo || peekCurrent() instanceof TextNode) {<NEW_LINE>keepText = tr... | .getLocalName().intern(); |
711,275 | private EncryptionPolicy selectPolicy(byte[] crypto_provide, EncryptionPolicy localEncryptionPolicy) {<NEW_LINE>boolean plaintextProvided = (crypto_provide[3] & 0x01) == 0x01;<NEW_LINE>boolean encryptionProvided = (crypto_provide[3] & 0x02) == 0x02;<NEW_LINE>EncryptionPolicy selected = null;<NEW_LINE>if (plaintextProvi... | ? EncryptionPolicy.REQUIRE_ENCRYPTED : EncryptionPolicy.REQUIRE_PLAINTEXT; |
183,616 | public StateMachineModel<String, String> build() {<NEW_LINE>ResourcerResolver resourceResolver = null;<NEW_LINE>if (this.location != null) {<NEW_LINE>resourceResolver = new ResourcerResolver(getResourceLoader(), location, additionalLocations);<NEW_LINE>} else if (this.resource != null) {<NEW_LINE>resourceResolver = new... | ), dataHolder.getTransitionsData()); |
1,827,594 | public void call(ClientSide clientSide, String data) {<NEW_LINE>Room room = ServerContains.getRoom(clientSide.getRoomId());<NEW_LINE>LinkedList<ClientSide> roomClientList = room.getClientSideList();<NEW_LINE>// Send the points of poker<NEW_LINE>List<List<Poker>> pokersList = PokerHelper.distributePoker();<NEW_LINE>int ... | (pokersList.get(3)); |
1,674,009 | public void failTasksForWorker(long workerId) {<NEW_LINE>synchronized (mPlanInfo) {<NEW_LINE>if (mPlanInfo.getStatus().isFinished()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>List<Long> <MASK><NEW_LINE>if (taskIds == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>boolean statusChanged = false;<NEW_LINE>for (Long taskId : ta... | taskIds = mWorkerIdToTaskIds.get(workerId); |
416,524 | protected void doClose() throws Throwable {<NEW_LINE>final long st = System.currentTimeMillis();<NEW_LINE>try {<NEW_LINE>if (channel != null) {<NEW_LINE>// unbind.<NEW_LINE>channel.close();<NEW_LINE>channel = null;<NEW_LINE>}<NEW_LINE>if (channelGroup != null) {<NEW_LINE>ChannelGroupFuture closeFuture = channelGroup.cl... | logger.warn("Interrupted while shutting down", e); |
712,049 | public CompletableFuture<byte[]> readMemory(long addr, int len) {<NEW_LINE>AssertionError defaultErr = new AssertionError("No data available even after a successful read?");<NEW_LINE>AtomicReference<Throwable> exc = new AtomicReference<>(defaultErr);<NEW_LINE>// Msg.debug(this, "Reading " + len + " bytes at " + Long.to... | (addr, 16) + " even after a successful read?"); |
1,287,617 | protected void acquireExclusiveLock() {<NEW_LINE>if (concurrent)<NEW_LINE>if (timeout > 0) {<NEW_LINE>try {<NEW_LINE>if (lock.writeLock().tryLock(timeout, TimeUnit.MILLISECONDS))<NEW_LINE>// OK<NEW_LINE>return;<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>if (ignoreThreadInterruption) {<NEW_LINE>// IGNORE THE T... | .currentThread().interrupt(); |
753,088 | public DescribeJobTemplateResult describeJobTemplate(DescribeJobTemplateRequest describeJobTemplateRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeJobTemplateRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionCont... | DescribeJobTemplateRequestMarshaller().marshall(describeJobTemplateRequest); |
1,073,026 | private Object toCommon(Class srcClass, Class targetClass, BigDecimal value) {<NEW_LINE>if (targetClass == srcClass) {<NEW_LINE>return value;<NEW_LINE>}<NEW_LINE>if (targetClass == Double.class || targetClass == double.class || targetClass == Float.class || targetClass == float.class) {<NEW_LINE>return toCommon(srcClas... | targetClass, value.doubleValue()); |
1,235,615 | private boolean isClinitAlreadyDesugared(ImmutableList<String> companionsToAccessToTriggerInterfaceClinit) {<NEW_LINE>InsnList instructions = clInitMethodNode.instructions;<NEW_LINE>if (instructions.size() <= companionsToAccessToTriggerInterfaceClinit.size()) {<NEW_LINE>// The <clinit> must end with RETURN, so if the i... | > iterator = instructions.iterator(); |
1,274,817 | public static <T> SizeEstimator<T> create(DataType<?> type) {<NEW_LINE>switch(type.id()) {<NEW_LINE>case UndefinedType.ID:<NEW_LINE>return (SizeEstimator<T>) new ConstSizeEstimator(UNKNOWN_DEFAULT_RAM_BYTES_USED);<NEW_LINE>case ObjectType.ID:<NEW_LINE>case GeoShapeType.ID:<NEW_LINE>return (SizeEstimator<T>) new Samplin... | SizeEstimator<T>) RegprocSizeEstimator.INSTANCE; |
897,632 | private void unsollicitedUpdate(String data) {<NEW_LINE>// Example of<NEW_LINE>// I=00000000000000000000000000000000&O=10000000000000000000000000000000&\<NEW_LINE>// A0=0&A1=0&A2=0&A3=0&A4=0&A5=0&A6=0&A7=0&A8=0&A9=0&A10=0&A11=0&A12=0&A13=0&A14=0&A15=0&C1=47&C2=0&C3=0&C4=0&C5=0&C6=0&C7=0&C8=0<NEW_LINE>final Pattern VALI... | sepIndex = command.indexOf("="); |
476,835 | private void captureImage() {<NEW_LINE>errorTextView.setVisibility(View.GONE);<NEW_LINE>Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);<NEW_LINE>// We give the camera an absolute filename/path where to put the<NEW_LINE>// picture because of bug:<NEW_LINE>// http://code.google.com/p/android... | intent, uri, getContext()); |
835,972 | public static DescribeApplicationInstancesResponse unmarshall(DescribeApplicationInstancesResponse describeApplicationInstancesResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeApplicationInstancesResponse.setRequestId(_ctx.stringValue("DescribeApplicationInstancesResponse.RequestId"));<NEW_LINE>describeApplicatio... | ("DescribeApplicationInstancesResponse.Data.Instances[" + i + "].PackageVersion")); |
963,553 | public int parseContentLength() {<NEW_LINE>try {<NEW_LINE>byte[] byteBufferForContentLength = new byte[ContentLengthBufferSize];<NEW_LINE>inputStream().read(byteBufferForContentLength, 0, TWO_CRLF.length());<NEW_LINE>for (int pos = TWO_CRLF.length(); pos < ContentLengthBufferSize; pos++) {<NEW_LINE>inputStream().read(b... | println(ex.toString()); |
867,458 | private static BatchOperator<?> unpackBatchOp(BatchOperator<?> data, TableSchema schema) {<NEW_LINE>DataSet<Row> rows = data.getDataSet();<NEW_LINE>final TypeInformation<?>[] types = schema.getFieldTypes();<NEW_LINE>rows = rows.map(new RichMapFunction<Row, Row>() {<NEW_LINE><NEW_LINE>private static final long serialVer... | .getField(1)).f1; |
4,668 | public void remove(final QualifiedName name, final Set<String> tags, final boolean updateUserMetadata) {<NEW_LINE>try {<NEW_LINE>final List<SqlParameterValue> params = Lists.newArrayList();<NEW_LINE>params.add(new SqlParameterValue(Types.VARCHAR, name.toString()));<NEW_LINE>jdbcTemplate.update(String.format(SQL_DELETE_... | getValues().removeAll(tags); |
1,456,464 | public UpdateServicePipelineResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>UpdateServicePipelineResult updateServicePipelineResult = new UpdateServicePipelineResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentE... | ().unmarshall(context)); |
891,200 | // Find subtraction of 2 Matrices and store it in matrix3<NEW_LINE>public static void subtract_matrices(int[][] matrix1, int[][] matrix2) {<NEW_LINE>int index1, index2 = 0;<NEW_LINE>int[][] matrix3 = new int[matrix1.length][matrix1[0].length];<NEW_LINE>for (index1 = 0; index1 < matrix1.length; index1++) {<NEW_LINE>for ... | index1][index2] + " "); |
1,345,291 | public ListThingRegistrationTaskReportsResult listThingRegistrationTaskReports(ListThingRegistrationTaskReportsRequest listThingRegistrationTaskReportsRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listThingRegistrationTaskReportsReque... | awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); |
1,368,232 | public void marshall(CreateDevEndpointRequest createDevEndpointRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createDevEndpointRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(createDevEnd... | createDevEndpointRequest.getExtraJarsS3Path(), EXTRAJARSS3PATH_BINDING); |
1,363,032 | /*<NEW_LINE>public Set<VariableExprToken> addLocalScope(){<NEW_LINE>return addLocalScope(false);<NEW_LINE>}<NEW_LINE><NEW_LINE>public Set<VariableExprToken> addLocalScope(boolean isRoot){<NEW_LINE>Set<VariableExprToken> local = new HashSet<VariableExprToken>();<NEW_LINE>localStack.push(local);<NEW_LINE>if (isRoot)<NEW_... | clazz.getName() + "' not found"); |
1,740,939 | public static void fixServiceArgument(@NotNull YAMLKeyValue yamlKeyValue) {<NEW_LINE>YAMLKeyValue argumentsKeyValue = YamlHelper.getYamlKeyValue(yamlKeyValue, "arguments");<NEW_LINE>List<String> yamlMissingArgumentTypes = ServiceActionUtil.getYamlMissingArgumentTypes(yamlKeyValue.getProject(), ServiceActionUtil.Service... | getProject(), argumentsKeyValue, yamlKeyValue); |
1,666,192 | public List<T> doShrink(SourceOfRandomness random, T largestGeneric) {<NEW_LINE>if (largestGeneric.equals(leastMagnitude()))<NEW_LINE>return emptyList();<NEW_LINE>// We work with BigDecimal, so convert all inputs<NEW_LINE>BigDecimal largest = widen().apply(largestGeneric);<NEW_LINE>BigDecimal least = widen().apply(leas... | results.add(leastMagnitude()); |
304,182 | protected void stopAllDownloads(boolean for_close, GlobalMangerProgressListener listener) {<NEW_LINE>if (for_close) {<NEW_LINE>if (progress_listener != null) {<NEW_LINE>progress_listener.reportCurrentTask(MessageText.getString("splash.unloadingTorrents"));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>long lastListenerUpdate = 0;<NEW... | reportPercent(100 * currentDownload / nbDownloads); |
758,431 | public Object decodeFrame(ByteBuf frame) {<NEW_LINE>byte b0 = frame.readByte();<NEW_LINE>byte b1 = frame.readByte();<NEW_LINE>if (ProtocolConstants.MAGIC_CODE_BYTES[0] != b0 || ProtocolConstants.MAGIC_CODE_BYTES[1] != b1) {<NEW_LINE>throw new IllegalArgumentException("Unknown magic code: " + b0 + ", " + b1);<NEW_LINE>}... | (serializer.deserialize(bs)); |
727,327 | private <T> void genCreateObject(MethodWriter mw, String classNameType, String TYPE_OBJECT, int FEATURES, boolean fieldBased) {<NEW_LINE>final int JSON_READER = 1;<NEW_LINE>if (fieldBased) {<NEW_LINE>mw.visitVarInsn(Opcodes.ALOAD, THIS);<NEW_LINE>mw.visitVarInsn(Opcodes.ALOAD, JSON_READER);<NEW_LINE>mw.<MASK><NEW_LINE>... | visitVarInsn(Opcodes.LLOAD, FEATURES); |
627,822 | protected Expression asExpression(AST node) {<NEW_LINE>AST leftNode = node.getFirstChild();<NEW_LINE>Expression leftExpression = expression(leftNode);<NEW_LINE>AST rightNode = leftNode.getNextSibling();<NEW_LINE>ClassNode type = makeTypeWithArguments(rightNode);<NEW_LINE>CastExpression asExpression = CastExpression.asE... | new SyntaxException("Cannot cast or coerce `super`", asExpression)); |
190,862 | // BenchMark IntStack vs ArrayDeque.<NEW_LINE>private static void benchMarkTest() {<NEW_LINE>int n = 10000000;<NEW_LINE>IntStack intStack = new IntStack(n);<NEW_LINE>// IntStack times at around 0.0324 seconds<NEW_LINE>long start = System.nanoTime();<NEW_LINE>for (int i = 0; i < n; i++) intStack.push(i);<NEW_LINE>for (i... | (end - start) / 1e9); |
668,535 | protected DataFlowOperations dataFlowOperations() {<NEW_LINE>final RestTemplate restTemplate = DataFlowTemplate.getDefaultDataflowRestTemplate();<NEW_LINE>validateUsernamePassword(this.composedTaskProperties.getDataflowServerUsername(), this.composedTaskProperties.getDataflowServerPassword());<NEW_LINE>HttpClientConfig... | = this.composedTaskProperties.getDataflowServerAccessToken(); |
1,183,164 | public void showHint(@Nonnull final JComponent component, @Nonnull RelativePoint p, int flags, int timeout) {<NEW_LINE>LOG.assertTrue(SwingUtilities.isEventDispatchThread());<NEW_LINE>myHideAlarm.cancelAllRequests();<NEW_LINE><MASK><NEW_LINE>final JBPopup popup = JBPopupFactory.getInstance().createComponentPopupBuilder... | hideHints(HIDE_BY_OTHER_HINT, false, false); |
1,697,273 | private void updateShowOnMap(final OsmandApplication app, final File f, final View pView, final ImageButton showOnMap) {<NEW_LINE>final <MASK><NEW_LINE>final SelectedGpxFile selected = selectedGpxHelper.getSelectedFileByPath(f.getAbsolutePath());<NEW_LINE>if (selected != null) {<NEW_LINE>showOnMap.setImageDrawable(app.... | GpxSelectionHelper selectedGpxHelper = app.getSelectedGpxHelper(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.