idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
665,412 | final AssociateWirelessGatewayWithThingResult executeAssociateWirelessGatewayWithThing(AssociateWirelessGatewayWithThingRequest associateWirelessGatewayWithThingRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(associateWirelessGatewayWithThingRequest);<NEW_LINE>AWSRequestMetrics awsRequest... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
107,199 | private static void calcAxisInfo(AxisInfo axisInfo, CellSetAxis axis) {<NEW_LINE>final List<Hierarchy> hierarchies = axis.getAxisMetaData().getHierarchies();<NEW_LINE>final int hCount = hierarchies.size();<NEW_LINE>final List<Integer>[] levels = new List[hCount];<NEW_LINE>final HashSet<Integer>[][] usedLevels = new Has... | ] maxDepth = new int[hCount]; |
295,379 | protected boolean onSignInteract(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException, ChargeException, MaxMoneyException {<NEW_LINE>Trade items = getTrade(sign, 1, 2, player, ess);<NEW_LINE>Trade charge = getTrade(sign, 3, ess);<NEW_LINE>// Check if the player is tryi... | = new Trade(pricePerSingleItem, ess); |
410,746 | protected void processOpSendMsg(OpSendMsg op) {<NEW_LINE>if (op == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>if (op.msg != null && isBatchMessagingEnabled()) {<NEW_LINE>batchMessageAndSend(false);<NEW_LINE>}<NEW_LINE>if (isMessageSizeExceeded(op)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>pendingMessages... | this.connectionHandler.getEpoch()); |
1,234,383 | final CreatePolicyResult executeCreatePolicy(CreatePolicyRequest createPolicyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createPolicyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | (super.beforeMarshalling(createPolicyRequest)); |
1,376,671 | public static <EVIDENCE, A extends Allele> List<EVIDENCE> selectAlleleBiasedEvidence(final Map<A, List<EVIDENCE>> alleleEvidenceMap, final double contaminationFraction) {<NEW_LINE>final int totalEvidence = Utils.nonNull(alleleEvidenceMap).values().stream().mapToInt(list -> list.<MASK><NEW_LINE>// no checks here - done ... | size()).sum(); |
347,457 | public static Story from(Cursor cursor) {<NEW_LINE>Long internalId = cursor.<MASK><NEW_LINE>Long id = cursor.getLong(HNewsContract.StoryEntry.COLUMN_ITEM_ID);<NEW_LINE>String type = cursor.getString(HNewsContract.StoryEntry.COLUMN_TYPE);<NEW_LINE>String by = cursor.getString(HNewsContract.StoryEntry.COLUMN_BY);<NEW_LIN... | getLong(HNewsContract.StoryEntry.COLUMN_ID); |
1,309,036 | private Stream<IShipmentScheduleSegment> explodeByPickingBOMs(final IShipmentScheduleSegment segment) {<NEW_LINE>if (segment.isAnyProduct()) {<NEW_LINE>return Stream.of(segment);<NEW_LINE>}<NEW_LINE>final PickingBOMsReversedIndex pickingBOMsReversedIndex = pickingBOMService.getPickingBOMsReversedIndex();<NEW_LINE>final... | Stream.of(segment, pickingBOMsSegment); |
1,760,009 | public void exitBrbr_ports(Brbr_portsContext ctx) {<NEW_LINE>Set<String> ports = toStrings(ctx.ports);<NEW_LINE>List<String> subinterfaces = ports.stream().filter(port -> SUBINTERFACE_PATTERN.matcher(port).matches()).collect(ImmutableList.toImmutableList());<NEW_LINE>if (!subinterfaces.isEmpty()) {<NEW_LINE>_w.redFlag(... | getBridge().setPorts(ports); |
833,077 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_main);<NEW_LINE>Log.d("Tag", "I'm a log which you don't see easily, hehe");<NEW_LINE>Log.d("json content", "{ \"key\": 3, \n \"value\": something}");<NEW_LINE>Log.d("error", "There... | .asList("foo", "bar")); |
712,313 | public void removeFirstLines(int amount) {<NEW_LINE>if (amount < 1) {<NEW_LINE>amount = 1;<NEW_LINE>}<NEW_LINE>if (doc.getDefaultRootElement().getElementCount() == 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Element firstToRemove = doc.getDefaultRootElement().getElement(0);<NEW_LINE>Element lastToRemove = doc.getDefaultR... | int endOffset = lastToRemove.getEndOffset(); |
755,182 | public static void main(String[] args) {<NEW_LINE>// This OAuth 2.0 access scope allows for full read/write access to the<NEW_LINE>// authenticated user's account.<NEW_LINE>List<String> <MASK><NEW_LINE>try {<NEW_LINE>// Authorize the request.<NEW_LINE>Credential credential = Auth.authorize(scopes, "localizations");<NEW... | scopes = Lists.newArrayList("https://www.googleapis.com/auth/youtube"); |
977,992 | public Object doNormalize(Object value) {<NEW_LINE>try {<NEW_LINE>if (value instanceof BigDecimal) {<NEW_LINE>return stripTrailingZeros((BigDecimal) value);<NEW_LINE>}<NEW_LINE>if (value instanceof String) {<NEW_LINE>return stripTrailingZeros(new BigDecimal((String) value));<NEW_LINE>}<NEW_LINE>if (value instanceof Byt... | ) value).setScale(1); |
54,542 | public void iteration() {<NEW_LINE>int prevRow = this.currentRow - 1;<NEW_LINE>for (int i = 0; i < this.sourceUniverse.getColumns() - 2; i++) {<NEW_LINE>boolean result = false;<NEW_LINE>boolean a = this.sourceUniverse.get(prevRow, i).get(0) > 0;<NEW_LINE>boolean b = this.sourceUniverse.get(prevRow, i + 1).get(0) > 0;<N... | result = this.output[2]; |
1,217,660 | static <T extends EppResource> CriteriaQueryBuilder<T> queryItemsSql(Class<T> clazz, String filterField, RdapSearchPattern partialStringQuery, Optional<String> cursorString, DeletedItemHandling deletedItemHandling) {<NEW_LINE>replicaJpaTm().assertInTransaction();<NEW_LINE>if (partialStringQuery.getInitialString().lengt... | builder = builder.orderByAsc(filterField); |
1,599,122 | public OResult next() {<NEW_LINE>OResult result = upstream.next();<NEW_LINE>long begin = profilingEnabled ? System.nanoTime() : 0;<NEW_LINE>try {<NEW_LINE>if (result.isElement()) {<NEW_LINE>OIdentifiable elem = result<MASK><NEW_LINE>ORecord record = elem.getRecord();<NEW_LINE>if (record instanceof ODocument) {<NEW_LINE... | .getElement().get(); |
692,027 | protected void onCreate(@Nullable Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>// Instead of fragments, you can also use our default slide<NEW_LINE>// Just set a title, description, background and image. AppIntro will do the rest.<NEW_LINE>CustomSlideBigText welcome = CustomSlideBi... | newInstance(R.layout.custom_slide_big_text); |
1,621,430 | public int compareTo(updateCompactionStatus_args other) {<NEW_LINE>if (!getClass().equals(other.getClass())) {<NEW_LINE>return getClass().getName().compareTo(other.getClass().getName());<NEW_LINE>}<NEW_LINE>int lastComparison = 0;<NEW_LINE>lastComparison = java.lang.Boolean.compare(isSetTinfo(), other.isSetTinfo());<NE... | ), other.isSetCredentials()); |
641,303 | public static void toJSON(OutputWriter outputWriter, PackageDefinition packageDefinition) {<NEW_LINE>outputWriter.addLinks(linksWriter -> {<NEW_LINE>linksWriter.addLink("self", Routes.Packages.self(packageDefinition.getId()));<NEW_LINE>linksWriter.addAbsoluteLink("doc", Routes.Packages.DOC);<NEW_LINE>linksWriter.addLin... | , packageDefinition.getConfiguration())); |
1,619,404 | public static ClassDirectory forClassLoader(ClassLoader loader) {<NEW_LINE>Preconditions.checkNotNull(loader, "classLoader");<NEW_LINE>ImmutableSetMultimap.Builder<String, String<MASK><NEW_LINE>try {<NEW_LINE>Enumeration<URL> urls = loader.getResources("META-INF/classes.lst");<NEW_LINE>while (urls.hasMoreElements()) {<... | > mapping = ImmutableSetMultimap.builder(); |
708,696 | /* ------------------------------------------------------------------- */<NEW_LINE>protected void sendDirectory(HttpServletRequest request, HttpServletResponse response, Resource resource, String pathInContext) throws IOException {<NEW_LINE>if (!_dirAllowed) {<NEW_LINE>response.sendError(HttpServletResponse.SC_FORBIDDE... | setHeader(HeaderFramework.CACHE_CONTROL, "no-cache, no-store"); |
1,758,033 | private void compressSnapshotDir(SnapshotWriter writer, Map<String, String> snapshotDirMaps) {<NEW_LINE>String writerPath = writer.getPath();<NEW_LINE>for (Map.Entry<String, String> entry : snapshotDirMaps.entrySet()) {<NEW_LINE>String snapshotDir = entry.getKey();<NEW_LINE><MASK><NEW_LINE>String snapshotDirTar = Paths... | String diskTableKey = entry.getValue(); |
454,573 | private void handleResultForAsyncAvailabilityCheck_Success(final PurchaseRowsList rows, final AvailabilityMultiResult availabilityResults) {<NEW_LINE>final List<DocumentId> changedRowIds = new ArrayList<>();<NEW_LINE>for (final TrackingId trackingId : availabilityResults.getTrackingIds()) {<NEW_LINE>final PurchaseRow l... | logger.warn("No row found for {}. Skip updating the row with availability results.", trackingId); |
667,756 | public void onError(java.lang.Exception e) {<NEW_LINE>byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;<NEW_LINE>org.apache.thrift.TSerializable msg;<NEW_LINE>finishFateOperation_result result = new finishFateOperation_result();<NEW_LINE>if (e instanceof org.apache.accumulo.core.clientImpl.thrift.ThriftSecu... | _LOGGER.error("TApplicationException inside handler", e); |
221,662 | public void onError(Throwable t) {<NEW_LINE>if (this.outboundDone) {<NEW_LINE>Operators.onErrorDropped(t, this.inboundSubscriber.currentContext());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>boolean wasThrowableAdded = Exceptions.addThrowable(INBOUND_ERROR, this, new CancellationException("Outbound has terminated with an err... | this.allocator, streamId, t); |
418,529 | public int compare(Object o1, Object o2) {<NEW_LINE>// Get Objects to compare<NEW_LINE>Object cmp1 = o1;<NEW_LINE>if (cmp1 instanceof NamePair)<NEW_LINE>cmp1 = ((NamePair) cmp1).getName();<NEW_LINE>Object cmp2 = o2;<NEW_LINE>if (cmp2 instanceof NamePair)<NEW_LINE>cmp2 = ((NamePair) cmp2).getName();<NEW_LINE>// Comparin... | String s = cmp1.toString(); |
1,486,088 | private static ObjcCommon common(ObjcCommon.Purpose purpose, RuleContext ruleContext, IntermediateArtifacts intermediateArtifacts, List<Artifact> transpiledSources, List<Artifact> transpiledHeaders, List<PathFragment> headerSearchPaths, List<String> dependentAttributes, List<TransitiveInfoCollection> otherDeps) throws ... | ObjcCommon.Builder(purpose, ruleContext); |
640,117 | public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) throws AuthenticationException {<NEW_LINE>// token<NEW_LINE>final String requestHeader = request.getHeader(super.getTokenHeader());<NEW_LINE>String username = null;<NEW_LINE>final String authToken;<NEW_LINE>authToken =... | ) -> new CustomAuthenticationException("Missing Authentication Token")); |
1,331,802 | protected void read(CompoundTag compound, boolean clientPacket) {<NEW_LINE>boolean overStressedBefore = overStressed;<NEW_LINE>clearKineticInformation();<NEW_LINE>// DO NOT READ kinetic information when placed after movement<NEW_LINE>if (wasMoved) {<NEW_LINE>super.read(compound, clientPacket);<NEW_LINE>return;<NEW_LINE... | networkTag = compound.getCompound("Network"); |
553,066 | void decode(Decoder decoder, Instruction instruction) {<NEW_LINE>if (decoder.is64bMode) {<NEW_LINE>if (decoder.state_operandSize != OpSize.SIZE16) {<NEW_LINE>instruction.setCode(code64);<NEW_LINE>instruction.setOp0Kind(OpKind.IMMEDIATE32TO64);<NEW_LINE>instruction.setImmediate32(decoder.readUInt32());<NEW_LINE>} else {... | instruction.setOp0Kind(OpKind.IMMEDIATE32); |
623,232 | public void render(Component comp, Writer out) throws IOException {<NEW_LINE>final SmartWriter wh = new SmartWriter(out);<NEW_LINE><MASK><NEW_LINE>final String uuid = self.getUuid();<NEW_LINE>final String zcls = self.getZclass();<NEW_LINE>final Execution exec = Executions.getCurrent();<NEW_LINE>String tableStyle = AEnv... | final Combobox self = (Combobox) comp; |
846,441 | final ListBulkDeploymentDetailedReportsResult executeListBulkDeploymentDetailedReports(ListBulkDeploymentDetailedReportsRequest listBulkDeploymentDetailedReportsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listBulkDeploymentDetailedReportsRequest);<NEW_LINE>AWSRequestMetrics awsRequest... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
1,249,344 | public static Runnable updateInjectedFoldRegions(@Nonnull final Editor editor, @Nonnull final PsiFile file, final boolean applyDefaultState) {<NEW_LINE>if (file instanceof PsiCompiledElement)<NEW_LINE>return null;<NEW_LINE>ApplicationManager.getApplication().assertReadAccessAllowed();<NEW_LINE>final Project project = f... | project).isUncommited(document)); |
870,395 | final DeleteIPSetResult executeDeleteIPSet(DeleteIPSetRequest deleteIPSetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteIPSetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
749,000 | private boolean matchElement(Object item, Filter filter) {<NEW_LINE>if (filter instanceof AndFilter) {<NEW_LINE>List<Filter> filters = ((AndFilter) filter).getFilters();<NEW_LINE>for (Filter f : filters) {<NEW_LINE>if (!matchElement(item, f)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE... | NotFilter) filter).getFilter(); |
309,427 | @ApiOperation(value = "Delete a table", notes = "Delete a single table in the specified keyspace.")<NEW_LINE>@ApiResponses(value = { @ApiResponse(code = 204, message = "No Content"), @ApiResponse(code = 401, message = "Unauthorized", response = ApiError.class), @ApiResponse(code = 500, message = "Internal server error"... | Status.NO_CONTENT).build(); |
180,883 | protected void _prepareElements(int availableHeight, boolean isOverflowAllowed) throws JRException {<NEW_LINE>currentOverflowWithElements = false;<NEW_LINE>currentOverflowWithWhiteSpace = false;<NEW_LINE>currentOverflowAllowed = isOverflowAllowed;<NEW_LINE>int calculatedStretchHeight = getContainerHeight();<NEW_LINE>fi... | (element), isOverflow) || currentOverflowWithElements; |
22,589 | final ListIndexResult executeListIndex(ListIndexRequest listIndexRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listIndexRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<ListIndexRequest> request = null;<NE... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
276,462 | private void importData(String preset) {<NEW_LINE>Editor editor = new Editor(SwingUtilities.getWindowAncestor(this));<NEW_LINE>editor.setAllowLinebreaks(true);<NEW_LINE>String result = editor.showDialog("Import entries (one entry per line)", preset, "Can also copy&paste in table to trigger export/import.");<NEW_LINE>if... | Level.SEVERE, null, ex); |
1,683,851 | private static Collection<SummaryReport> calculateSummaryResults(long userId, long deviceId, Date from, Date to, boolean daily) throws StorageException {<NEW_LINE>ArrayList<Position> positions = new ArrayList<>(Context.getDataManager().getPositions(deviceId, from, to));<NEW_LINE>ArrayList<SummaryReport> results = new A... | next().getFixTime()); |
1,357,747 | public long handle(Emulator<?> emulator) {<NEW_LINE>RegisterContext context = emulator.getContext();<NEW_LINE>UnidbgPointer object = context.getPointerArg(1);<NEW_LINE>int start = context.getIntArg(2);<NEW_LINE>int length = context.getIntArg(3);<NEW_LINE>Pointer buf = context.getPointerArg(4);<NEW_LINE>ByteArray array ... | data, 0, data.length); |
1,397,483 | public Status check() {<NEW_LINE>OperatingSystemMXBean operatingSystemMXBean = ManagementFactory.getOperatingSystemMXBean();<NEW_LINE>double load;<NEW_LINE>try {<NEW_LINE>Method method = OperatingSystemMXBean.class.getMethod("getSystemLoadAverage", new <MASK><NEW_LINE>load = (Double) method.invoke(operatingSystemMXBean... | Class<?>[0]); |
1,405,176 | private String generateChoicePut(final PrimitiveType type, final String bitIdx, final String byteOrder) {<NEW_LINE>switch(type) {<NEW_LINE>case UINT8:<NEW_LINE>return " byte bits = buffer.getByte(offset);\n" + " bits = (byte)(value ? bits | (1 << " + bitIdx + ") : bits & ~(1 << " + bitIdx + "));\n" + " ... | throw new IllegalArgumentException("primitive type not supported: " + type); |
901,387 | public static void createJar(SourceSet ss, RunContext ctx, File compileDir, File jarFile) throws IOException {<NEW_LINE>String mainclass = ctx.getMainClassOr(ss);<NEW_LINE>Manifest manifest = new Manifest();<NEW_LINE>manifest.getMainAttributes().put(Attributes.Name.MANIFEST_VERSION, "1.0");<NEW_LINE>if (mainclass != nu... | ).putValue(ATTR_JBANG_JAVA_OPTIONS, runtimeOpts); |
421,806 | public UUID controlsTurn(UUID playerId) {<NEW_LINE>ListIterator<TurnMod> it = this.<MASK><NEW_LINE>TurnMod controlPlayerTurnMod = null;<NEW_LINE>while (it.hasPrevious()) {<NEW_LINE>TurnMod turnMod = it.previous();<NEW_LINE>if (turnMod.getNewControllerId() != null && turnMod.getPlayerId().equals(playerId)) {<NEW_LINE>co... | listIterator(this.size()); |
249,558 | public void run(TaskMonitor monitor) {<NEW_LINE>if (filter == null) {<NEW_LINE>runOnSwingThread(() -> tree.swingRestoreNonFilteredRootNode());<NEW_LINE>restoreInSameTask(monitor);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>GTreeNode root = tree.getModelRoot();<NEW_LINE>try {<NEW_LINE>monitor.setMessage("Loading/Organizing Tr... | error(this, "Got Unexpected CloneNotSupportedException", e); |
901,129 | public TrafficHistogram clusterTrafficOfLastDays(Duration duration, Interval interval) {<NEW_LINE>final ImmutableMap.Builder<DateTime, Long> inputBuilder = ImmutableMap.builder();<NEW_LINE>final ImmutableMap.Builder<DateTime, Long<MASK><NEW_LINE>final ImmutableMap.Builder<DateTime, Long> decodedBuilder = ImmutableMap.b... | > outputBuilder = ImmutableMap.builder(); |
1,538,206 | public static StandardSync updateConnectionObject(final WorkspaceHelper workspaceHelper, final StandardSync original, final StandardSync update) {<NEW_LINE>validateWorkspace(workspaceHelper, original.getSourceId(), original.getDestinationId(), new HashSet<>(update.getOperationIds()));<NEW_LINE>final StandardSync newCon... | (false).withSchedule(newSchedule); |
1,077,712 | private DefaultEclipseProject buildHierarchy(Project project) {<NEW_LINE>List<DefaultEclipseProject> children = new ArrayList<>();<NEW_LINE>for (Project child : project.getChildProjects().values()) {<NEW_LINE>children.add(buildHierarchy(child));<NEW_LINE>}<NEW_LINE>EclipseModel eclipseModel = project.getExtensions().ge... | EclipseProject internalProject = eclipseModel.getProject(); |
636,588 | public static UnresolvedSuperInstr decode(IRReaderDecoder d) {<NEW_LINE>if (RubyInstanceConfig.IR_READING_DEBUG)<NEW_LINE>System.out.println("decoding call");<NEW_LINE>int callTypeOrdinal = d.decodeInt();<NEW_LINE>CallType callType = CallType.fromOrdinal(callTypeOrdinal);<NEW_LINE>if (RubyInstanceConfig.IR_READING_DEBU... | System.out.println("before result"); |
1,244,793 | public synchronized String format(LogRecord record) {<NEW_LINE>this.buffer.setLength(0);<NEW_LINE>this.date.setTime(record.getMillis());<NEW_LINE>this.position.setBeginIndex(0);<NEW_LINE>this.formatter.format(this.date, this.buffer, this.position);<NEW_LINE>this.buffer.append(' ');<NEW_LINE>if (record.getSourceClassNam... | this.buffer.append(' '); |
345,482 | public static DescribeGatewayBlockVolumesResponse unmarshall(DescribeGatewayBlockVolumesResponse describeGatewayBlockVolumesResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeGatewayBlockVolumesResponse.setRequestId(_ctx.stringValue("DescribeGatewayBlockVolumesResponse.RequestId"));<NEW_LINE>describeGatewayBlockVol... | ("DescribeGatewayBlockVolumesResponse.BlockVolumes[" + i + "].Name")); |
750,702 | public void complete(@NotNull final PlaceholderAPIPlugin plugin, @NotNull final CommandSender sender, @NotNull final String alias, @NotNull @Unmodifiable final List<String> params, @NotNull final List<String> suggestions) {<NEW_LINE>if (params.size() > 2) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (params.size() <= 1) {... | : params.get(0)); |
1,808,284 | public void translate(GeyserSession session, AnimatePacket packet) {<NEW_LINE>// Stop the player sending animations before they have fully spawned into the server<NEW_LINE>if (!session.isSpawned()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>switch(packet.getAction()) {<NEW_LINE>case SWING_ARM -><NEW_LINE>// Delay so entity... | packet.getRowingTime() > 0.0); |
1,705,547 | public String compressType(String type) {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>if (this.packagePrefix == null) {<NEW_LINE>throw new IllegalStateException();<NEW_LINE>}<NEW_LINE>Matcher m = TYPE_PATTERN.matcher(type);<NEW_LINE>int pos = 0;<NEW_LINE>while (true) {<NEW_LINE>boolean found = m.find(pos)... | name = m.group(0); |
1,399,668 | private double prevailingDirection_(EditShape shape, int half_edge) {<NEW_LINE>int cluster = m_topo_graph.getHalfEdgeOrigin(half_edge);<NEW_LINE>int clusterTo = m_topo_graph.getHalfEdgeTo(half_edge);<NEW_LINE>int signTotal = 0;<NEW_LINE>int signCorrect = 0;<NEW_LINE>for (int iterator = m_topo_graph.getClusterVertexIter... | 0 ? signCorrect : signTotal) * len; |
1,399,952 | final ListRepositorySyncDefinitionsResult executeListRepositorySyncDefinitions(ListRepositorySyncDefinitionsRequest listRepositorySyncDefinitionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listRepositorySyncDefinitionsRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Fie... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
1,711,492 | private void adjustDate(Calendar calendar, String unit, float value, int intValue, boolean seenHoursAsLowerCaseH) {<NEW_LINE>String lUnit = unit.toLowerCase();<NEW_LINE>if (lUnit.startsWith("sec")) {<NEW_LINE>calendar.add(Calendar.SECOND, -intValue);<NEW_LINE>} else if (lUnit.startsWith("min") || (unit.equals("m") && s... | (Calendar.SECOND, -seconds); |
1,129,076 | private static // }<NEW_LINE>void generateDelegateMethods(EclipseNode typeNode, List<BindingTuple> methods, DelegateReceiver delegateReceiver) {<NEW_LINE>CompilationUnitDeclaration top = (CompilationUnitDeclaration) typeNode<MASK><NEW_LINE>List<MethodDeclaration> addedMethods = new ArrayList<MethodDeclaration>();<NEW_L... | .top().get(); |
646,249 | public Response execute(Command command) throws WebDriverException {<NEW_LINE>if (DriverCommand.NEW_SESSION.equals(command.getName())) {<NEW_LINE>serviceOptional.ifPresent(driverService -> {<NEW_LINE>try {<NEW_LINE>driverService.start();<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new WebDriverException(e.getMess... | .getMessage(), rootCause)); |
18,544 | public final DM mutate(DMD derivedDelta) throws ClobberException, InvocationTargetException {<NEW_LINE>if (derivedDelta == null)<NEW_LINE>throw new NullPointerException();<NEW_LINE>assert lock.canWrite();<NEW_LINE>DM oldValue;<NEW_LINE>synchronized (LOCK) {<NEW_LINE>assertStateConsistent();<NEW_LINE>assert !mutating;<N... | ClobberException(this, oldValue, derivedDelta); |
49,215 | public static void createAsset(WebAsset webasset, String userId, Folder parent) throws DotDataException, DotStateException, DotSecurityException {<NEW_LINE>webasset.setModDate(new java.util.Date());<NEW_LINE>webasset.setModUser(userId);<NEW_LINE>// persists the webasset<NEW_LINE>HibernateUtil.saveOrUpdate(webasset);<NE... | ).createNew(webasset, parent); |
1,239,697 | private boolean invokeWizardImpl(Boolean doUninstall, Boolean doEnable, Callable<OperationContainer> refresher) {<NEW_LINE>assert doUninstall != null || doEnable != null : "At least one action is enabled";<NEW_LINE>assert !(doUninstall != <MASK><NEW_LINE>assert doUninstall == null || Containers.forUninstall() != null :... | null && doEnable != null) : "Only once action is enabled"; |
1,486,673 | private void flattenReferencesToCollapsibleDescendantNames(Name n, String alias, Set<Name> escaped) {<NEW_LINE>if (n.props == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (n.isCollapsingExplicitlyDenied()) {<NEW_LINE>logDecisionForName(n, "@nocollapse: will not flatten descendant name references");<NEW_LINE>return;<... | .MODULE_EXPORT || p.isModuleExport(); |
834,816 | private RelativePoint relativePointByQuickSearch(@Nonnull DataContext dataContext) {<NEW_LINE>Rectangle dominantArea = dataContext.getData(PlatformDataKeys.DOMINANT_HINT_AREA_RECTANGLE);<NEW_LINE>if (dominantArea != null) {<NEW_LINE>final Component focusedComponent = getWndManager().getFocusedComponent(myProject);<NEW_... | getPointOn(location.getComponent()); |
777,421 | public void open(JComponent progressComponent) {<NEW_LINE>holder.add(progressComponent, BorderLayout.CENTER);<NEW_LINE>DialogDescriptor dd = new DialogDescriptor(this, NbBundle.getMessage(ProgressPanel.class, "MSG_PleaseWait"), true, new Object[0], DialogDescriptor.NO_OPTION, DialogDescriptor.DEFAULT_ALIGN, null, null,... | jDialog = ((JDialog) dialog); |
639,164 | private static Map<Object, Object> toCqlMap(Column.ColumnType type, List<Object> jsonEntries) {<NEW_LINE>if (jsonEntries.isEmpty()) {<NEW_LINE>return Collections.emptyMap();<NEW_LINE>}<NEW_LINE>Column.ColumnType keyType = type.<MASK><NEW_LINE>Column.ColumnType valueType = type.parameters().get(1);<NEW_LINE>LinkedHashMa... | parameters().get(0); |
1,745,676 | public int decodeNumeric(PackedBits8 data, int bitLocation, int lengthBits) {<NEW_LINE>int length = data.read(bitLocation, lengthBits, true);<NEW_LINE>bitLocation += lengthBits;<NEW_LINE>while (length >= 3) {<NEW_LINE>if (data.size < bitLocation + 10) {<NEW_LINE>if (verbose != null)<NEW_LINE>verbose.printf("overflow: n... | char) (valA + '0')); |
661,650 | // (int argc, const char* argv[], const char* envp[], const char* apple[], const struct ProgramVars* vars)<NEW_LINE>private static void callModInit(Emulator<?> emulator, long address, int argc, UnidbgPointer argv, UnidbgPointer envp, UnidbgPointer apple, UnidbgPointer vars) {<NEW_LINE>List<Number> list = new ArrayList<... | emulator, argv.peer))); |
1,617,265 | public void write(JsonWriter out, PetWithRequiredTags value) throws IOException {<NEW_LINE>JsonObject obj = thisAdapter.<MASK><NEW_LINE>obj.remove("additionalProperties");<NEW_LINE>// serialize additonal properties<NEW_LINE>if (value.getAdditionalProperties() != null) {<NEW_LINE>for (Map.Entry<String, Object> entry : v... | toJsonTree(value).getAsJsonObject(); |
1,713,723 | public SyncConfig unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>SyncConfig syncConfig = new SyncConfig();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (tok... | String currentParentElement = context.getCurrentParentElement(); |
357,120 | private void dfs(List<String> res, StringBuilder sb, String num, int pos, int target, long prev, long multi) {<NEW_LINE>if (pos == num.length()) {<NEW_LINE>if (target == prev) {<NEW_LINE>res.add(sb.toString());<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>for (int i = pos; i < num.length(); i++) {<NEW_LINE>if (num.c... | , prev - curr, -curr); |
194,620 | public UpdateResponseHeadersPolicyResult unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>UpdateResponseHeadersPolicyResult updateResponseHeadersPolicyResult = new UpdateResponseHeadersPolicyResult();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocu... | int originalDepth = context.getCurrentDepth(); |
1,766,733 | public void onError(java.lang.Exception e) {<NEW_LINE>byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;<NEW_LINE>org.apache.thrift.TSerializable msg;<NEW_LINE>getTabletServerStatus_result result = new getTabletServerStatus_result();<NEW_LINE>if (e instanceof org.apache.accumulo.core.clientImpl.thrift.Thrift... | .thrift.protocol.TMessageType.EXCEPTION; |
1,290,955 | public void fromMatrix(Mat4f mat) {<NEW_LINE>// FIXME: Should reimplement to follow Horn's advice of using<NEW_LINE>// eigenvector decomposition to handle roundoff error in given<NEW_LINE>// matrix.<NEW_LINE>float tr, s;<NEW_LINE>int i, j, k;<NEW_LINE>tr = mat.get(0, 0) + mat.get(1, 1) + mat.get(2, 2);<NEW_LINE>if (tr ... | i + 1, s * 0.5f); |
983,263 | public void createEntity() {<NEW_LINE>TableAsyncClient tableAsyncClient = createAsyncClient();<NEW_LINE>// BEGIN: com.azure.data.tables.tableAsyncClient.createEntity#TableEntity<NEW_LINE>String partitionKey = "partitionKey";<NEW_LINE>String rowKey = "rowKey";<NEW_LINE>TableEntity tableEntity = new TableEntity(partition... | ).addProperty("Property", "Value"); |
1,291,446 | static Set<Op03SimpleStatement> followNopGotoBackwards(Op03SimpleStatement eventualtarget) {<NEW_LINE>final Set<Op03SimpleStatement> result = SetFactory.newSet();<NEW_LINE>new GraphVisitorDFS<Op03SimpleStatement>(eventualtarget, new BinaryProcedure<Op03SimpleStatement, GraphVisitor<Op03SimpleStatement>>() {<NEW_LINE><N... | Statement statement = source.getStatement(); |
464,347 | protected void perform(@Nonnull final XDebugSession session, final DataContext dataContext) {<NEW_LINE>final XDebuggerEditorsProvider editorsProvider = session.getDebugProcess().getEditorsProvider();<NEW_LINE>final XStackFrame stackFrame = session.getCurrentStackFrame();<NEW_LINE>final XDebuggerEvaluator evaluator = se... | .getDebugProcess().getEvaluator(); |
800,107 | private void processBindingConfiguration() {<NEW_LINE>if (m_config.containsKey("refresh")) {<NEW_LINE>m_refreshInterval = Integer.parseInt(m_config.get("refresh"));<NEW_LINE>logger.info("refresh interval set to {}s", m_refreshInterval / 1000);<NEW_LINE>}<NEW_LINE>long deadDeviceCount = 10;<NEW_LINE>if (m_config.contain... | (m_config.get("modem_db_retry_timeout")); |
1,126,377 | public RemoteMethodCallActionNode transform(RemoteMethodCallActionNode remoteMethodCallActionNode) {<NEW_LINE>ExpressionNode expression = formatNode(remoteMethodCallActionNode.expression(), 0, 0);<NEW_LINE>Token rightArrowToken = formatToken(remoteMethodCallActionNode.rightArrowToken(), 0, 0);<NEW_LINE>SimpleNameRefere... | withCloseParenToken(closeParenToken).apply(); |
124,227 | public Request<UpdateIndexingConfigurationRequest> marshall(UpdateIndexingConfigurationRequest updateIndexingConfigurationRequest) {<NEW_LINE>if (updateIndexingConfigurationRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(UpdateIndexingConfigurationRequest)");<NEW_LINE>}<... | ).marshall(thingGroupIndexingConfiguration, jsonWriter); |
205,821 | private EGLConfig chooseConfig(EGL10 egl, EGLDisplay display, EGLConfig[] configs) {<NEW_LINE>// Use score to avoid "No config chosen"<NEW_LINE>int configIndex = 0;<NEW_LINE>int maxScore = 0;<NEW_LINE>for (int i = 0, n = configs.length; i < n; i++) {<NEW_LINE>final EGLConfig config = configs[i];<NEW_LINE>final int redS... | display, config, EGL10.EGL_RED_SIZE); |
631,895 | public static int compare(Number a, Number b) {<NEW_LINE>int aType = getType(a);<NEW_LINE>int bType = getType(b);<NEW_LINE>int compType = (aType >= bType) ? aType : bType;<NEW_LINE>switch(compType) {<NEW_LINE>case INT:<NEW_LINE>int li = a.intValue();<NEW_LINE>int ri = b.intValue();<NEW_LINE>return (li < ri) ? -1 : (li ... | ll == rl) ? 0 : 1; |
476,820 | private CctopInvoice createEDIInvoiceFromXMLBean(final EDICctopInvoicVType xmlCctopInvoice, final DecimalFormat decimalFormat, final Exchange exchange) {<NEW_LINE>final CctopInvoice invoice = new CctopInvoice();<NEW_LINE>invoice.setCbPartnerLocationID(formatNumber(xmlCctopInvoice.getCBPartnerLocationID(), decimalFormat... | CCreditMemoReasonEnum creditMemoReason = xmlCctopInvoice.getCreditMemoReason(); |
211,322 | public static void removeUnwantedFromSearch(List<Entry> entries, List<FeedEntryKeyword> keywords) {<NEW_LINE>Iterator<Entry> it = entries.iterator();<NEW_LINE>while (it.hasNext()) {<NEW_LINE>Entry entry = it.next();<NEW_LINE>boolean keep = true;<NEW_LINE>for (FeedEntryKeyword keyword : keywords) {<NEW_LINE>String title... | getContent()).text(); |
1,530,128 | public SandBox retrieveNamedSandBox(SandBoxType sandBoxType, String sandboxName, Long authorId) {<NEW_LINE>CriteriaBuilder builder = sandBoxEntityManager.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<SandBox> criteria = builder.createQuery(SandBox.class);<NEW_LINE>Root<SandBoxManagementImpl> sandbox = criteria.from(Sand... | get("name"), sandboxName)); |
349,558 | private static void compareEntrySets(Set<Map.Entry<String, Object>> expected, Set<Map.Entry<String, Object>> actual) {<NEW_LINE>assertEquals(expected.size(), actual.size());<NEW_LINE>assertEquals(expected.isEmpty(), actual.isEmpty());<NEW_LINE>EPAssertionUtil.assertEqualsExactOrder(expected.toArray(), actual.toArray())... | collect(Collectors.toList()); |
1,042,180 | protected void withTableProperties(Map<String, String> props, Action action) {<NEW_LINE>Map<String, String> tableProps = table.properties();<NEW_LINE>Map<String, String<MASK><NEW_LINE>props.keySet().forEach(propKey -> {<NEW_LINE>if (tableProps.containsKey(propKey)) {<NEW_LINE>String currentPropValue = tableProps.get(pr... | > currentPropValues = Maps.newHashMap(); |
905,327 | public MethodWriter generateTagStart() throws JspCoreException {<NEW_LINE>tagStartWriter = new MethodWriter();<NEW_LINE>if (hasBody) {<NEW_LINE>// LIDB4147-24<NEW_LINE>if (!jspOptions.isDisableResourceInjection()) {<NEW_LINE>// PM06063<NEW_LINE>// have CDI create and inject the managed object<NEW_LINE>tagStartWriter.pr... | print(tagClassInfo.getTagClassName()); |
1,481,950 | public String toDebugStringTree() {<NEW_LINE>// We are recursively going through scopes from global to nested and need to build parent =><NEW_LINE>// children map as it doesn't exist at the moment.<NEW_LINE>ImmutableListMultimap.Builder<SymbolScope, SymbolScope> childrenScopesBuilder = ImmutableListMultimap.builder();<... | "", symbol.propertyScope, childrenScopes); |
718,328 | private ModeImpl unSlide(TopComponent tc, ModeImpl source) {<NEW_LINE>String tcID = WindowManagerImpl.getInstance().findTopComponentID(tc);<NEW_LINE>ModeImpl targetMode = model.getModeTopComponentPreviousMode(source, tcID);<NEW_LINE>int targetIndex = model.getModeTopComponentPreviousIndex(source, tcID);<NEW_LINE>if ((t... | .getInstance().getDefaultViewMode(); |
1,834,882 | public Elements buildAssetElements(EntityDetail entityDetail) {<NEW_LINE>if (entityDetail == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Elements element = new Elements();<NEW_LINE>element.<MASK><NEW_LINE>element.setType(convertInstanceType(entityDetail.getType()));<NEW_LINE>element.setProperties(extractPropertie... | setGuid(entityDetail.getGUID()); |
980,819 | private void flushBufferedData(ByteBuf out) {<NEW_LINE>final <MASK><NEW_LINE>if (flushableBytes == 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>checksum.reset();<NEW_LINE>checksum.update(buffer.internalNioBuffer(buffer.readerIndex(), flushableBytes));<NEW_LINE>final int check = (int) checksum.getValue();<NEW_LINE>final in... | int flushableBytes = buffer.readableBytes(); |
964,616 | protected JdbcIndex convertIndex(Map<String, Object> recordMap) {<NEW_LINE>JdbcIndex jdbcIndex = new JdbcIndex();<NEW_LINE>jdbcIndex.setTableCatalog(safeToString(recordMap.get("TABLE_CAT")));<NEW_LINE>jdbcIndex.setTableSchema(safeToString(recordMap.get("TABLE_SCHEM")));<NEW_LINE>jdbcIndex.setTableName(safeToString(reco... | ).put(columnName, ascOrDesc); |
933,166 | protected List<String> buildUpdateByPrimaryKeyAnnotations(List<IntrospectedColumn> columnList) {<NEW_LINE>List<String> answer = new ArrayList<>();<NEW_LINE>// $NON-NLS-1$<NEW_LINE>answer.add("@Update({");<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>javaIndent(sb, 1);<NEW_LINE>// $NON-NLS-1$<NEW_LINE>sb.ap... | IntrospectedColumn introspectedColumn = iter.next(); |
224,255 | public void marshall(Speaker speaker, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (speaker == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(speaker.getCreatedAt(), CREATEDAT_BINDING);<NEW_LINE>protocolMa... | e.getMessage(), e); |
514,018 | public void executeActions(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException {<NEW_LINE>final String wfActionAssign = request.getParameter(Contentlet.WORKFLOW_ASSIGN_KEY);<NEW_LINE>final String wfActionComments = request.getParameter(Contentlet.WORKFLOW_COMMENTS_... | WorkflowAPI workflowAPI = APILocator.getWorkflowAPI(); |
1,564,484 | private void fixPermissions(XML mf) {<NEW_LINE>boolean hasWakeLock = false;<NEW_LINE>boolean hasVibrate = false;<NEW_LINE>boolean hasReadExtStorage = false;<NEW_LINE>boolean hasCameraAccess = false;<NEW_LINE>for (XML kid : mf.getChildren("uses-permission")) {<NEW_LINE>String name = kid.getString("android:name");<NEW_LI... | setString("android:name", PERMISSION_PREFIX + "CAMERA"); |
1,030,701 | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException {<NEW_LINE>String[] keys = request.getParameterMap().get("key");<NEW_LINE>String[] values = request.getParameterMap().get("value");<NEW_LINE>String key = "";<NEW_LINE>String value = "";<NEW_LINE>if (keys != null) {<NEW_LI... | m = Move.valueOf(value); |
1,071,157 | private void onRender(MatrixStack matrices, int tickDelta, CallbackInfo ci) {<NEW_LINE>if (!Modules.get().get(BetterChat.class).displayPlayerHeads())<NEW_LINE>return;<NEW_LINE>if (mc.options.chatVisibility == ChatVisibility.HIDDEN)<NEW_LINE>return;<NEW_LINE>int maxLineCount = mc.inGameHud.getChatHud().getVisibleLineCou... | * mc.options.chatLineSpacing + 8.0D; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.