idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,712,768 | private static String fallbackThreadDump(String dumpName) {<NEW_LINE>StringBuilder dump = new StringBuilder();<NEW_LINE>dump.append(dumpName);<NEW_LINE>ThreadMXBean threadMXBean = ManagementFactory.getThreadMXBean();<NEW_LINE>for (ThreadInfo info : threadMXBean.getThreadInfo(threadMXBean.getAllThreadIds(), 500)) {<NEW_... | ("\n at ").append(stackTraceElement); |
605,929 | final DescribeEventsForOrganizationResult executeDescribeEventsForOrganization(DescribeEventsForOrganizationRequest describeEventsForOrganizationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeEventsForOrganizationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionC... | addHandlerContext(HandlerContextKey.SERVICE_ID, "Health"); |
822,534 | private boolean checkMembershipIntersectionSetEmpty(SplitBrainJoinMessage joinMessage) {<NEW_LINE>Collection<Address> targetMemberAddresses = joinMessage.getMemberAddresses();<NEW_LINE>Address joinMessageAddress = joinMessage.getAddress();<NEW_LINE>if (targetMemberAddresses.contains(node.getThisAddress())) {<NEW_LINE>/... | ) + " CANNOT merge to " + joinMessageAddress + ", because it thinks this-node as its member."); |
72,099 | public static void decomposePolygon(Polygon polygon, boolean orientation, List<Polygon> collector) {<NEW_LINE>if (polygon.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Last point is repeated<NEW_LINE>int numEdges = polygon.getPolygon().length() - 1;<NEW_LINE>for (int i = 0; i < polygon.getNumberOfHoles(); i++) {... | , edges), holeComponents, numHoles); |
470,859 | public static final void writeInt(final JsonStream stream, int value) throws IOException {<NEW_LINE>stream.ensure(12);<NEW_LINE>byte[] buf = stream.buf;<NEW_LINE>int pos = stream.count;<NEW_LINE>if (value < 0) {<NEW_LINE>if (value == Integer.MIN_VALUE) {<NEW_LINE>System.arraycopy(MIN_INT, 0, buf, pos, MIN_INT.length);<... | final int v1 = DIGITS[r1]; |
720,312 | protected void channelRead0(ChannelHandlerContext ctx, FullHttpResponse response) {<NEW_LINE>if (!response.decoderResult().isSuccess()) {<NEW_LINE>failAndClose(new IOException("Failed to parse the HTTP response."), ctx);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>checkState(userPromise != null, "response before request");<NE... | .status().toString(); |
1,735,883 | private void advanceTimeSpanInternal(long targetTime, Long optionalResolution) {<NEW_LINE>long currentTime = services.getSchedulingService().getTime();<NEW_LINE>while (currentTime < targetTime) {<NEW_LINE>if ((optionalResolution != null) && (optionalResolution > 0)) {<NEW_LINE>currentTime += optionalResolution;<NEW_LIN... | getSchedulingService().setTime(currentTime); |
282,640 | private boolean doDatabaseUpdate() {<NEW_LINE>ArrayList<ContentProviderOperation> batch = new ArrayList<>(addToTheseLists.size() + removeFromTheseLists.size());<NEW_LINE>for (String listId : addToTheseLists) {<NEW_LINE>String listItemId = SeriesGuideContract.ListItems.generateListItemId(itemStableId, itemType, listId);... | listItemId)).build()); |
239,456 | public String evaluate(Double val1, Double val2) {<NEW_LINE>if (val1 == null || val2 == null) {<NEW_LINE>LOG.error(" Null values found :: " + val1 + " == " + val2);<NEW_LINE>System.err.println(<MASK><NEW_LINE>throw new RuntimeException(" Null values found :: " + val1 + " == " + val2);<NEW_LINE>}<NEW_LINE>if (!val1.equa... | " Null values found :: " + val1 + " == " + val2); |
1,528,216 | public static <T extends Output<T>> DenseVector createDenseVector(Example<T> example, ImmutableFeatureMap featureInfo, boolean addBias) {<NEW_LINE>int numFeatures = addBias ? featureInfo.size() + 1 : featureInfo.size();<NEW_LINE>double[<MASK><NEW_LINE>boolean found = false;<NEW_LINE>for (Feature f : example) {<NEW_LINE... | ] values = new double[numFeatures]; |
1,576,987 | protected void writeProperty(ElasticsearchPersistentProperty property, Object value, MapValueAccessor sink) {<NEW_LINE>Optional<Class<?>> customWriteTarget = conversions.getCustomWriteTarget(value.getClass());<NEW_LINE>if (customWriteTarget.isPresent()) {<NEW_LINE>Class<?> writeTarget = customWriteTarget.get();<NEW_LIN... | from(value.getClass()); |
1,838,888 | public boolean allocWeights(long lowerLimit, long upperLimit, int n) {<NEW_LINE>// Call getWeightRanges() and then determine heuristically<NEW_LINE>// which ranges to use for a given number of weights between (excluding)<NEW_LINE>// two limits.<NEW_LINE>// puts("");<NEW_LINE>if (!getWeightRanges(lowerLimit, upperLimit)... | minLength = ranges[0].length; |
1,826,089 | public static void registerCodecs() {<NEW_LINE>if (registered) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>registered = true;<NEW_LINE>PRUDPPacketReplyDecoder reply_decoder = new PRUDPPacketReplyDecoder() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public PRUDPPacketReply decode(PRUDPPacketHandler handler, InetSocketAddress ori... | reply_decoders = new HashMap<>(); |
315,350 | private Map<String, PipelineTableMetaData> loadTableMetaData0(final Connection connection, final String tableNamePattern) throws SQLException {<NEW_LINE>Map<String, Map<String, PipelineColumnMetaData>> tablePipelineColumnMetaDataMap = new LinkedHashMap<>();<NEW_LINE>// TODO if tableNamePattern is '%', it might return i... | columnName, dataType, dataTypeName, primaryKey); |
337 | public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException {<NEW_LINE>String path = req.getRequestURI();<NEW_LINE>if (path.startsWith("/favicon.ico")) {<NEW_LINE>// ignore the request for favicon.ico<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>MemcacheService syncCache = MemcacheS... | increment(countKey, 1L, 0L); |
1,327,464 | static public void apply(Bone bone, float targetX, float targetY, boolean compress, boolean stretch, boolean uniform, float alpha) {<NEW_LINE>if (bone == null)<NEW_LINE>throw new IllegalArgumentException("bone cannot be null.");<NEW_LINE>Bone p = bone.parent;<NEW_LINE>float pa = p.a, pb = p.b, pc = p.c, pd = p.d;<NEW_L... | * s * bone.skeleton.scaleY; |
1,641,407 | public boolean onCreateOptionsMenu(final Menu menu) {<NEW_LINE>try (ContextLogger ignore = new ContextLogger(Log.LogLevel.DEBUG, "MainActivity.onCreateOptionsMenu")) {<NEW_LINE>getMenuInflater().inflate(R.menu.main_activity_options, menu);<NEW_LINE>MenuCompat.setGroupDividerEnabled(menu, true);<NEW_LINE>final SearchMan... | setEnabled(Settings.useInternalRouting()); |
1,001,927 | public String[][] readStringArray2D(String name, String[][] defVal) throws IOException {<NEW_LINE>try {<NEW_LINE>Element tmpEl;<NEW_LINE>if (name != null) {<NEW_LINE>tmpEl = findChildElement(currentElem, name);<NEW_LINE>} else {<NEW_LINE>tmpEl = currentElem;<NEW_LINE>}<NEW_LINE>if (tmpEl == null) {<NEW_LINE>return defV... | NodeList nodes = currentElem.getChildNodes(); |
1,490,260 | protected void processDeviceStateEvent(ProcessedEventPayload payload) throws SiteWhereException {<NEW_LINE>// Only process events that affect state.<NEW_LINE>IDeviceEvent event = payload.getEvent();<NEW_LINE><MASK><NEW_LINE>// IDeviceState original = getDeviceStateManagement()<NEW_LINE>// .getDeviceStateByDeviceAssignm... | IDeviceEventContext context = payload.getEventContext(); |
7,428 | public Object invoke(MethodInvocation methodInvocation) throws Throwable {<NEW_LINE>Context parentContext = currentContext();<NEW_LINE>Method method = methodInvocation.getMethod();<NEW_LINE>// Since this interceptor is the outermost interceptor, non-Repository methods<NEW_LINE>// including Object methods will also flow... | repositoryInterface, method.getName()); |
500,646 | public static void horizontal11(Kernel1D_S32 kernel, GrayU8 image, GrayI8 dest, int divisor) {<NEW_LINE>final byte[] dataSrc = image.data;<NEW_LINE>final byte[] dataDst = dest.data;<NEW_LINE>final int k1 = kernel.data[0];<NEW_LINE>final int k2 = kernel.data[1];<NEW_LINE>final int k3 = kernel.data[2];<NEW_LINE>final int... | k10 = kernel.data[9]; |
1,799,288 | public static AppDashboardData makeDashboardData(final PwmDomain pwmDomain, final ContextManager contextManager, final Locale locale, final Flag... flags) throws PwmUnrecoverableException {<NEW_LINE>final Instant startTime = Instant.now();<NEW_LINE>final AppDashboardDataBuilder builder = AppDashboardData.builder();<NEW... | .isMaster() ? "This node is the current master" : "This node is not the current master"; |
1,312,572 | public void populateTable(Context context, String dbPassword) {<NEW_LINE>try {<NEW_LINE>try {<NEW_LINE>SQLiteDatabase.loadLibs(context);<NEW_LINE>String dbPath = context.getDatabasePath("Players.db").getPath();<NEW_LINE>File dbPathFile = new File(dbPath);<NEW_LINE>if (!dbPathFile.exists()) {<NEW_LINE>dbPathFile.getPare... | this, "An database error occurred.", Toast.LENGTH_LONG); |
1,695,455 | public ListApiKeysResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListApiKeysResult listApiKeysResult = new ListApiKeysResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = ori... | )).unmarshall(context)); |
1,374,440 | public void printInfo(boolean isSample, boolean includeIndexDetails) throws IOException {<NEW_LINE>PrintStream out = System.out;<NEW_LINE>out.printf("%-24s : %s\n", (isSample ? "Sample " : "") + "Locality group ", (isDefaultLG ? "<DEFAULT>" : name));<NEW_LINE>if (version == RINDEX_VER_3 || version == RINDEX_VER_4 || ve... | printf("\t%-22s : %s\n", "Last key", lastKey); |
185,705 | private void calculatePanelData() {<NEW_LINE>// Get from controller<NEW_LINE>BigDecimal collectDetail = getCollectDetailAmt();<NEW_LINE>BigDecimal balance = <MASK><NEW_LINE>// Change View<NEW_LINE>String currencyISOCode = pos.getCurSymbol();<NEW_LINE>// fieldGrandTotal.setText(currencyISOCode + " "<NEW_LINE>// + pos.ge... | getBalance(pos.getOpenAmt()); |
62,938 | public void updateCycleParticipants(ArrayList prereqChain, LinkedHashSet cycleParticipants, IWorkspaceRoot workspaceRoot, HashSet traversed, Map preferredClasspaths) {<NEW_LINE>IPath path = getPath();<NEW_LINE>prereqChain.add(path);<NEW_LINE>traversed.add(path);<NEW_LINE>try {<NEW_LINE>IClasspathEntry[] classpath = nul... | ]) preferredClasspaths.get(this); |
694,192 | private SwaggerParseResult readContents(String swaggerAsString, List<AuthorizationValue> auth, ParseOptions options, String location) {<NEW_LINE>if (swaggerAsString == null || swaggerAsString.trim().isEmpty()) {<NEW_LINE>return SwaggerParseResult.ofError("Null or empty definition");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>f... | result = parseJsonNode(location, rootNode); |
162,349 | public void marshall(TypedLinkAttributeDefinition typedLinkAttributeDefinition, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (typedLinkAttributeDefinition == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(... | typedLinkAttributeDefinition.getName(), NAME_BINDING); |
437,930 | public static MeshDefinition createInsideMesh() {<NEW_LINE>var deformation = new CubeDeformation(0.01F);<NEW_LINE>var mesh = new MeshDefinition();<NEW_LINE>var root = mesh.getRoot();<NEW_LINE>root.addOrReplaceChild("head", CubeListBuilder.create(), PartPose.ZERO);<NEW_LINE>root.addOrReplaceChild("hat", CubeListBuilder.... | create(), PartPose.ZERO); |
1,704,523 | public static GetLindormInstanceResponse unmarshall(GetLindormInstanceResponse getLindormInstanceResponse, UnmarshallerContext _ctx) {<NEW_LINE>getLindormInstanceResponse.setRequestId(_ctx.stringValue("GetLindormInstanceResponse.RequestId"));<NEW_LINE>getLindormInstanceResponse.setVpcId(_ctx.stringValue("GetLindormInst... | = new ArrayList<Engine>(); |
707,991 | public // sub-level<NEW_LINE>void // sub-level<NEW_LINE>forSubResourceMethod(// sub-level<NEW_LINE>ClassCreator subClassCreator, // sub-level<NEW_LINE>MethodCreator subConstructor, // sub-level<NEW_LINE>MethodCreator subClinit, // sub-level<NEW_LINE>MethodCreator subMethodCreator, // sub-level<NEW_LINE>ClassInfo rootIn... | headerFillersByName = new HashMap<>(); |
594,936 | private void importDynamicTable(ImportRecord record, ImportModel model) throws Exception {<NEW_LINE>JsonElement jsonElement = gson.fromJson(record.getData(), JsonElement.class);<NEW_LINE>JsonObject jsonObject = gson.fromJson(model.getData(), JsonObject.class);<NEW_LINE>String tableId = jsonObject.getAsJsonObject("dynam... | setModelId(record.getModelId()); |
66,977 | private void addThinkTimeToChildren(GuiPackage guiPackage, JMeterTreeNode parentNode) throws IllegalUserActionException {<NEW_LINE>guiPackage.updateCurrentNode();<NEW_LINE>boolean insertThinkTime;<NEW_LINE>try {<NEW_LINE>int index = 0;<NEW_LINE>while (true) {<NEW_LINE>if (index == parentNode.getChildCount()) {<NEW_LINE... | Object userObject = childNode.getUserObject(); |
1,591,680 | private void invokeRegisterModules(Map<String, Object> modules, List<Map<String, Object>> failReceiver) {<NEW_LINE>if (modules == null || !isJSFrameworkInit()) {<NEW_LINE>if (!isJSFrameworkInit()) {<NEW_LINE>WXLogUtils.d("[WXinvokeRegisterModulesBridgeManager] invokeRegisterModules: framework.js uninitialized.");<NEW_L... | WX_KEY_EXCEPTION_INVOKE_REGISTER_MODULES, "invokeRegisterModules", errorMsg, null); |
679,955 | public boolean visit(SQLPropertyExpr x) {<NEW_LINE>TableMapping mapping = null;<NEW_LINE>SchemaObject schemaObject = null;<NEW_LINE>boolean aliasOwer = false;<NEW_LINE>SQLObject ownerObject = x.getResolvedOwnerObject();<NEW_LINE>if (ownerObject instanceof SQLExprTableSource) {<NEW_LINE>SQLExprTableSource exprTableSourc... | String srcName = x.getName(); |
1,346,623 | // private String intentId;<NEW_LINE>@Override<NEW_LINE>protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_intent_sender);<NEW_LINE>intentKeys = new ArrayList<String>();<NEW_LINE>if (getIntent() != null) {<NEW_LINE>exportedReceiver... | putString(ExportedReceiverListFragment.EXPORTED_RECEIVER_ID, exportedReceiverId); |
1,727,900 | public void configure(ODocument iConfiguration, OCommandContext iContext) {<NEW_LINE><MASK><NEW_LINE>if (iConfiguration.containsField("lock"))<NEW_LINE>lockFile = iConfiguration.<Boolean>field("lock");<NEW_LINE>if (iConfiguration.containsField("skipBOM"))<NEW_LINE>skipBOM = iConfiguration.field("skipBOM", Boolean.class... | super.configure(iConfiguration, iContext); |
1,120,053 | private void generatePremultiplyAlpha(File out) {<NEW_LINE>try {<NEW_LINE>BufferedImage outImage = new BufferedImage(image.getWidth(), image.getHeight(), BufferedImage.TYPE_INT_ARGB);<NEW_LINE>float[] color = new float[4];<NEW_LINE><MASK><NEW_LINE>WritableRaster outRaster = outImage.getRaster();<NEW_LINE>for (int x = 0... | WritableRaster raster = image.getRaster(); |
1,680,707 | public void renderSummaryTo(ClassDoc classDoc, Element parent) {<NEW_LINE><MASK><NEW_LINE>Element summarySection = document.createElement("section");<NEW_LINE>parent.appendChild(summarySection);<NEW_LINE>Element title = document.createElement("title");<NEW_LINE>summarySection.appendChild(title);<NEW_LINE>title.appendCh... | Document document = parent.getOwnerDocument(); |
1,130,632 | private void paymentWriteOff(final I_C_Payment payment) {<NEW_LINE>final PaymentId paymentId = PaymentId.<MASK><NEW_LINE>final Money paymentOpenAmt = Money.of(paymentDAO.getAvailableAmount(paymentId), CurrencyId.ofRepoId(payment.getC_Currency_ID()));<NEW_LINE>// Skip this payment if the open amount is above given limit... | ofRepoId(payment.getC_Payment_ID()); |
1,305,748 | private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents<NEW_LINE>void initComponents() {<NEW_LINE>runAsLabel = new javax.swing.JLabel();<NEW_LINE>runAsCB = new javax.swing.JComboBox();<NEW_LINE>setOpaque(false);<NEW_LINE>runAsLabel.setLabelFor(runAsCB);<NEW_LINE>// NOI18N<NEW_L... | 358, Short.MAX_VALUE))); |
165,104 | protected XFormParams combineXFormParams(XFormParams defaultParams, XFormParams conditionalParams) {<NEW_LINE>XFormParams response = new XFormParams();<NEW_LINE>Map<String, Boolean> templateSkipMap = new LinkedHashMap<>();<NEW_LINE>List<String> templates = new ArrayList<>();<NEW_LINE>List<Boolean> skips = new ArrayList... | templates.size()])); |
756,486 | public void removeTable(UUID tableId) {<NEW_LINE>TableController tableController = controllers.get(tableId);<NEW_LINE>if (tableController != null) {<NEW_LINE>Lock w = controllersLock.writeLock();<NEW_LINE>w.lock();<NEW_LINE>try {<NEW_LINE>controllers.remove(tableId);<NEW_LINE>} finally {<NEW_LINE>w.unlock();<NEW_LINE>}... | gamesRoomManager().removeTable(tableId); |
1,069,272 | public void createLocalSessionFromDistributedApplicationPackage(long sessionId) {<NEW_LINE>if (applicationRepo.sessionExistsInFileSystem(sessionId)) {<NEW_LINE>log.log(Level.FINE, () -> "Local session for session id " + sessionId + " already exists");<NEW_LINE>createSessionFromId(sessionId);<NEW_LINE>return;<NEW_LINE>}... | (configserverConfig.fileReferencesDir())); |
822,603 | private int createProgram(String vertexSource, String fragmentSource) {<NEW_LINE>mVShaderHandle = loadShader(GLES20.GL_VERTEX_SHADER, vertexSource);<NEW_LINE>if (mVShaderHandle == 0) {<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>mFShaderHandle = loadShader(GLES20.GL_FRAGMENT_SHADER, fragmentSource);<NEW_LINE>if (mFShaderHan... | (GLES20.glGetProgramInfoLog(program)); |
1,130,311 | public ByteBuf encode(ByteBuf buf, UnlockRecipesMessage message) throws IOException {<NEW_LINE>ByteBufUtils.writeVarInt(buf, message.getAction());<NEW_LINE>buf.writeBoolean(message.isBookOpen());<NEW_LINE>buf.writeBoolean(message.isFilterOpen());<NEW_LINE>buf.<MASK><NEW_LINE>buf.writeBoolean(message.isSmeltingFilterOpe... | writeBoolean(message.isSmeltingBookOpen()); |
534,417 | public IpAddressUpdate unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>IpAddressUpdate ipAddressUpdate = new IpAddressUpdate();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDep... | class).unmarshall(context)); |
916,559 | public Object calculate(Context ctx) {<NEW_LINE>Object fo = null;<NEW_LINE>String distribute = null;<NEW_LINE>if (param == null) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("create" + mm.getMessage("function.missingParam"));<NEW_LINE>} else if (param.isLeaf()) {<NEW_LINE>fo = para... | (partitions[i], fileName); |
101,317 | final BatchGetCustomDataIdentifiersResult executeBatchGetCustomDataIdentifiers(BatchGetCustomDataIdentifiersRequest batchGetCustomDataIdentifiersRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(batchGetCustomDataIdentifiersRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionC... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "BatchGetCustomDataIdentifiers"); |
41,163 | public void run() {<NEW_LINE>EventLoopGroup bossGroup = new NioEventLoopGroup(1);<NEW_LINE>EventLoopGroup workerGroup = new NioEventLoopGroup();<NEW_LINE>try {<NEW_LINE>ServerBootstrap bootstrap = new ServerBootstrap();<NEW_LINE>bootstrap.<MASK><NEW_LINE>bootstrap.group(bossGroup, workerGroup).channel(NioServerSocketCh... | option(ChannelOption.SO_BACKLOG, 1024); |
715,579 | public void write(JsonWriter writer, SentryEnvelopeItemHeader value) throws IOException {<NEW_LINE>if (value == null) {<NEW_LINE>writer.nullValue();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>writer.beginObject();<NEW_LINE>if (value.getContentType() != null) {<NEW_LINE>writer.name("content_type");<NEW_LINE>writer.value(value... | .toLowerCase(Locale.ROOT)); |
1,684,164 | private void executeInternal(OCommandContext ctx, OResultInternal result) {<NEW_LINE><MASK><NEW_LINE>OClassEmbedded clazz = (OClassEmbedded) db.getMetadata().getSchema().getClass(className.getStringValue());<NEW_LINE>if (clazz == null) {<NEW_LINE>throw new OCommandExecutionException("Class not found: " + className.getS... | ODatabase db = ctx.getDatabase(); |
1,333,516 | public PropertiesKeyMapper init(String propertyMapName) {<NEW_LINE>InputStream is = checkNotNull(PropertiesKeyMapper.class.getClassLoader().getResourceAsStream(propertyMapName));<NEW_LINE><MASK><NEW_LINE>while (scanner.hasNextLine()) {<NEW_LINE>String line = StringUtils.trimToEmpty(scanner.nextLine());<NEW_LINE>if (lin... | Scanner scanner = new Scanner(is); |
111,323 | public static AsyncResult<Void> editToolSettings(final Project project, final InspectionProfile inspectionProfile, final boolean canChooseDifferentProfile, final String selectedToolShortName) {<NEW_LINE>final ShowSettingsUtil settingsUtil = ShowSettingsUtil.getInstance();<NEW_LINE>final ErrorsConfigurable errorsConfigu... | ), InspectionProfileManager.getInstance()); |
1,238,455 | public HttpResponse createUserForHttpResponse(User body, Map<String, Object> params) throws IOException {<NEW_LINE>// verify the required parameter 'body' is set<NEW_LINE>if (body == null) {<NEW_LINE>throw new IllegalArgumentException("Missing the required parameter 'body' when calling createUser");<NEW_LINE>}<NEW_LINE... | , (Object[]) value); |
898,954 | public static String lastGreenDate(Context context, int minutesAgo) {<NEW_LINE>// minutesAgo = 1442;<NEW_LINE>Calendar calGreen = Calendar.getInstance();<NEW_LINE>calGreen.add(Calendar.MINUTE, -minutesAgo);<NEW_LINE>Calendar calToday = Calendar.getInstance();<NEW_LINE>Calendar calYesterday = Calendar.getInstance();<NEW... | TimeZone tz = calGreen.getTimeZone(); |
1,644,607 | public MockResponse selectMockResponse(MockRequest request, MockResult result) throws DispatchException {<NEW_LINE>String dispatchScript = getMockOperation().getScript();<NEW_LINE>if (StringUtils.hasContent(dispatchScript)) {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>MockService mockService = getMockOperation().getMockSe... | SoapUIScriptEngine scriptEngine = scriptEnginePool.getScriptEngine(); |
723,720 | public void write(AwtImage image, ImageMetadata metadata, OutputStream out) throws IOException {<NEW_LINE>javax.imageio.ImageWriter writer = ImageIO.getImageWritersByFormatName("jpeg").next();<NEW_LINE>ImageWriteParam params = writer.getDefaultWriteParam();<NEW_LINE>if (compression < 100) {<NEW_LINE>params.setCompressi... | MemoryCacheImageOutputStream output = new MemoryCacheImageOutputStream(out); |
1,338,113 | private QueryMetadataHolder handleTablePullQuery(final ImmutableAnalysis analysis, final ServiceContext serviceContext, final ConfiguredStatement<Query> configured, final Map<String, Object> requestProperties, final Optional<Boolean> isInternalRequest, final SlidingWindowRateLimiter pullBandRateLimiter, final AtomicRef... | optionalDecrementer = Optional.ofNullable(decrementer); |
706,111 | public Concrete.Expression visitArray(ArrayExpression expr, Void params) {<NEW_LINE>Concrete.Expression elementsType = hasFlag(PrettyPrinterFlag.SHOW_IMPLICIT_ARGS) && hasFlag(PrettyPrinterFlag.SHOW_BIN_OP_IMPLICIT_ARGS) ? expr.getElementsType().accept(this, null) : null;<NEW_LINE>Concrete.Expression result;<NEW_LINE>i... | null, result, elementsType, false); |
665,957 | public static Collection<String> resolveAttribute(UserModel user, String name, boolean aggregateAttrs) {<NEW_LINE>List<String> values = user.getAttributeStream(name).collect(Collectors.toList());<NEW_LINE>Set<String> aggrValues <MASK><NEW_LINE>if (!values.isEmpty()) {<NEW_LINE>if (!aggregateAttrs) {<NEW_LINE>return val... | = new HashSet<String>(); |
712,772 | static Map<String, Object> remoteMessageToMap(RemoteMessage remoteMessage) {<NEW_LINE>Map<String, Object> messageMap = new HashMap<>();<NEW_LINE>Map<String, Object> <MASK><NEW_LINE>if (remoteMessage.getCollapseKey() != null) {<NEW_LINE>messageMap.put(KEY_COLLAPSE_KEY, remoteMessage.getCollapseKey());<NEW_LINE>}<NEW_LIN... | dataMap = new HashMap<>(); |
256,177 | private void labelLoadTable(JumpTable.LoadTable loadtable, Address[] switchCases, Symbol[] caseSymbols, Namespace space, TaskMonitor monitor) throws CancelledException {<NEW_LINE>DataTypeManager dtmanager = program.getDataTypeManager();<NEW_LINE>Address[] <MASK><NEW_LINE>boolean usingPointers = false;<NEW_LINE>Address ... | pointers = getPointerTable(loadtable, switchCases); |
1,299,849 | public int create(User registrar) throws IdentityException, InvalidArgumentException {<NEW_LINE>if (this.deleted) {<NEW_LINE>throw new IdentityException("Identity has been deleted");<NEW_LINE>}<NEW_LINE>if (registrar == null) {<NEW_LINE>throw new InvalidArgumentException("Registrar should be a valid member");<NEW_LINE>... | = new IdentityException(msg, e); |
1,212,313 | public MdiEntry createMDiEntry(String id) {<NEW_LINE>final DownloadHistoryManager history_manager = (DownloadHistoryManager) CoreFactory.getSingleton().getGlobalManager().getDownloadHistoryManager();<NEW_LINE>final ViewTitleInfo title_info = new ViewTitleInfo() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Object getT... | history_manager.addListener(history_listener, false); |
1,447,374 | private static NimbusJwtDecoder buildDecoder(RegisteredClient registeredClient) {<NEW_LINE>JwsAlgorithm jwsAlgorithm = registeredClient<MASK><NEW_LINE>if (jwsAlgorithm instanceof SignatureAlgorithm) {<NEW_LINE>String jwkSetUrl = registeredClient.getClientSettings().getJwkSetUrl();<NEW_LINE>if (!StringUtils.hasText(jwkS... | .getClientSettings().getTokenEndpointAuthenticationSigningAlgorithm(); |
657,770 | public void marshall(IdentityMailFromDomainAttributes _identityMailFromDomainAttributes, Request<?> request, String _prefix) {<NEW_LINE>String prefix;<NEW_LINE>if (_identityMailFromDomainAttributes.getMailFromDomain() != null) {<NEW_LINE>prefix = _prefix + "MailFromDomain";<NEW_LINE>String mailFromDomain = _identityMai... | String behaviorOnMXFailure = _identityMailFromDomainAttributes.getBehaviorOnMXFailure(); |
951,666 | protected String resolveHyperlinkURL(int reportIndex, JRPrintHyperlink link) {<NEW_LINE>String href = null;<NEW_LINE>Boolean ignoreHyperlink = HyperlinkUtil.getIgnoreHyperlink(HtmlReportConfiguration.PROPERTY_IGNORE_HYPERLINK, link);<NEW_LINE>if (ignoreHyperlink == null) {<NEW_LINE>ignoreHyperlink = getCurrentItemConfi... | .getHyperlinkPage().toString(); |
495,553 | public void run() {<NEW_LINE>try {<NEW_LINE>XMLModelExporter xmlModelExporter = new XMLModelExporter();<NEW_LINE>xmlModelExporter.<MASK><NEW_LINE>xmlModelExporter.setSaveOrganisation(wizard.doSaveOrganisation());<NEW_LINE>xmlModelExporter.setIncludeXSD(wizard.doIncludeXSD());<NEW_LINE>xmlModelExporter.setLanguageCode(w... | setMetadata(wizard.getMetadata()); |
1,817,087 | @Produces(MediaType.APPLICATION_JSON)<NEW_LINE>public JSONArray autoComplete(@FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey, @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion, @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName, /* Optional: not needed for some completions */<N... | "WMS:autoComplete exception: %s\n", e.getMessage()); |
305,671 | final CreateGrantResult executeCreateGrant(CreateGrantRequest createGrantRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createGrantRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
268,391 | private void buildSettingsDialog() {<NEW_LINE>analytics.trackEvent(CLICKED_ON_SETTINGS_IN_NAV_DRAWER, loggedIn);<NEW_LINE>LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);<NEW_LINE>final View customView = inflater.inflate(R.layout.settings_dialog_layout, null);<NEW_LINE>Switc... | (!analytics.isAnalyticsEnabled()); |
570,612 | public void addReader(String process, String readerGroup, String readerId) throws CheckpointStoreException {<NEW_LINE>String path = getReaderGroupPath(process, readerGroup);<NEW_LINE>try {<NEW_LINE>updateReaderGroupData(path, groupData -> {<NEW_LINE>if (groupData.getState() == ReaderGroupData.State.Sealed) {<NEW_LINE>t... | CheckpointStoreException.Type.Connectivity, e); |
740,617 | private /*<NEW_LINE>@Override<NEW_LINE>public void paint(Graphics g) {<NEW_LINE>super.paint(g);<NEW_LINE>Graphics2D g2d = (Graphics2D) g;<NEW_LINE>drawDecoration(g2d);<NEW_LINE>g2d.setColor(new Color(0, 128, 128, 128));<NEW_LINE>g2d.drawRoundRect(3, 3, getWidth() - 7, getHeight() - 7, 5, 5);<NEW_LINE>}<NEW_LINE>*/<NEW_... | String strSim = null, strOffset = null; |
1,599,267 | public void marshall(SharePointConfiguration sharePointConfiguration, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (sharePointConfiguration == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(sharePointConfi... | sharePointConfiguration.getExclusionPatterns(), EXCLUSIONPATTERNS_BINDING); |
1,522,327 | protected void generateStatementsImpl() throws CustomChangeException {<NEW_LINE>try {<NEW_LINE>PreparedStatement statement = jdbcConnection.prepareStatement("select ID, PRIVATE_KEY, CERTIFICATE from " + getTableName("REALM"));<NEW_LINE>try {<NEW_LINE>ResultSet resultSet = statement.executeQuery();<NEW_LINE>try {<NEW_LI... | certificatePem = resultSet.getString(3); |
310,005 | public List<Integer> spiralOrder(int[][] matrix) {<NEW_LINE>List<Integer> result = new ArrayList<Integer>();<NEW_LINE>if (matrix == null || matrix.length == 0) {<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>int rowStart = 0;<NEW_LINE>int rowEnd = matrix.length - 1;<NEW_LINE>int colStart = 0;<NEW_LINE>int colEnd = matrix... | matrix[rowStart][i]); |
1,107,518 | public Haplotype composeHaplotypeBasedOnReference(final int index, final int paddingSize, final ReferenceMultiSparkSource reference) {<NEW_LINE>Utils.nonNull(reference, "the input reference cannot be null");<NEW_LINE>ParamUtils.isPositiveOrZero(paddingSize, "the input padding must be 0 or greater");<NEW_LINE>ParamUtils... | dictionary.getSequence(getContig()); |
451,705 | public HollowObjectSchema findCommonSchema(HollowObjectSchema otherSchema) {<NEW_LINE>if (!getName().equals(otherSchema.getName())) {<NEW_LINE>throw new IllegalArgumentException("Cannot find common schema of two schemas with different names!");<NEW_LINE>}<NEW_LINE>int commonFields = 0;<NEW_LINE>for (String fieldName : ... | .getPosition(fieldNames[i]); |
1,522,931 | protected void createLines() {<NEW_LINE>final IHUContext huContext = handlingUnitsBL.createMutableHUContext(getCtx(), ITrx.TRXNAME_ThreadInherited);<NEW_LINE>for (final HUToReturn huToReturnInfo : getHUsToReturn()) {<NEW_LINE>final HUPackingMaterialsCollector collector = new HUPackingMaterialsCollector(huContext);<NEW_... | setQtyEnteredTU(new BigDecimal(qtyTU)); |
1,004,893 | private String toEndPoint(NodeSource nodeSource) {<NEW_LINE>try {<NEW_LINE>// TODO<NEW_LINE>if (nodeSource.getRedirect() != null) {<NEW_LINE>final URI uri = nodeSource.getAddr();<NEW_LINE>if (uri != null) {<NEW_LINE>return HostAndPort.toHostAndPortString(uri.getHost(), uri.getPort());<NEW_LINE>}<NEW_LINE>} else if (nod... | debug("Unexpected error. nodeSource={}", nodeSource, ignore); |
349,943 | public String runTask(String[] args) throws Exception {<NEW_LINE>final String schema = args[0];<NEW_LINE>String version = args[1];<NEW_LINE>final String hadoopJobIdFile = args[2];<NEW_LINE>final HadoopIngestionSpec theSchema = HadoopDruidIndexerConfig.JSON_MAPPER.readValue(schema, HadoopIngestionSpec.class);<NEW_LINE>f... | log.error(e, "Encountered exception in HadoopIndexGeneratorInnerProcessing."); |
53,214 | private JComponent createRevisionsSide(Dimension prefToolBarSize) {<NEW_LINE>ActionGroup actions = createRevisionsActions();<NEW_LINE>myToolBar = createRevisionsToolbar(actions);<NEW_LINE>myRevisionsList = new RevisionsList(new RevisionsList.SelectionListener() {<NEW_LINE><NEW_LINE>public void revisionsSelected(final i... | add(myToolBar.getComponent()); |
1,743,629 | public static DescribeRegionsResponse unmarshall(DescribeRegionsResponse describeRegionsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeRegionsResponse.setRequestId(_ctx.stringValue("DescribeRegionsResponse.RequestId"));<NEW_LINE>describeRegionsResponse.setTotalCount(_ctx.integerValue("DescribeRegionsResponse.To... | ("DescribeRegionsResponse.Regions[" + i + "].LocalName")); |
1,669,784 | private void processErrorsInReport(Errors errors, String sourcePath, List<IProblem> items, List<String> filters) {<NEW_LINE>CssError[] cssErrors = errors.getErrors();<NEW_LINE>for (CssError cssError : cssErrors) {<NEW_LINE>Throwable t = cssError.getException();<NEW_LINE>// $NON-NLS-1$<NEW_LINE>String message = (t == nu... | int lineNumber = cssError.getLine(); |
1,108,974 | void filterFiles() {<NEW_LINE>nspMap.values().removeIf(f -> {<NEW_LINE>if (f.isFile())<NEW_LINE>return false;<NEW_LINE>File[] subFiles = f.listFiles((file, name) -> name.matches("[0-9]{2}"));<NEW_LINE>if (subFiles == null || subFiles.length == 0) {<NEW_LINE>print("TransferModule: Exclude folder: " + f.<MASK><NEW_LINE>r... | getName(), EMsgType.WARNING); |
645,189 | private void replaceWithSuperType(TreePath path, VariableTree oldVarTree, VariableElement varElement, Element superTypeElement) {<NEW_LINE>Types types = workingCopy.getTypes();<NEW_LINE>TypeMirror supTypeErasure = types.erasure(superTypeElement.asType());<NEW_LINE>DeclaredType varType = (DeclaredType) varElement.asType... | supertype = supertypes.remove(0); |
668,244 | public void processFlushQuery(ControlAreYouFlushed flushQuery) throws SIResourceException {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(tc, "processFlushQuery", new Object[] { flushQuery });<NEW_LINE>SIBUuid12 streamID = flushQuery.getGuaranteedStreamUUID();<NEW_LINE>t... | downControl.sendFlushedMessage(requestor, streamID); |
880,340 | private void findWordsHelper(int i, int j, Trie trie, HashSet<String> result, String s, char[][] board, int ml, int nl) {<NEW_LINE>if (i < 0 || i > ml - 1 || j < 0 || j > nl - 1 || board[i][j] == '#')<NEW_LINE>return;<NEW_LINE>s += board[i][j];<NEW_LINE>trie = trie.node[board[i][j] - 'a'];<NEW_LINE>if (trie == null)<NE... | s, board, ml, nl); |
642,627 | final IRubyObject uptoEndless(ThreadContext context, Block block) {<NEW_LINE>Ruby runtime = context.runtime;<NEW_LINE>StringSites sites = sites(context);<NEW_LINE>CallSite succ = sites.succ;<NEW_LINE>boolean isAscii = scanForCodeRange() == CR_7BIT;<NEW_LINE>RubyString current = strDup(context.runtime);<NEW_LINE>if (isA... | value.length() + 5); |
106,184 | /*<NEW_LINE>* (non-Javadoc)<NEW_LINE>* @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void initializeDefaultPreferences() {<NEW_LINE>IEclipsePreferences pref = DefaultScope.INSTANCE.getNode(CSSFormatterPlugin.PLUGIN_I... | putInt(CSSFormatterConstants.SPACES_AFTER_SEMICOLON, 0); |
1,184,158 | public static <T extends BftConfigOptions, U extends BftFork> ForksSchedule<T> create(final T initial, final List<U> forks, final BftSpecCreator<T, U> specCreator) {<NEW_LINE>checkArgument(forks.stream().allMatch(f -> f.getForkBlock() > 0), "Transition cannot be created for genesis block");<NEW_LINE>checkArgument(forks... | forks.size(), "Duplicate transitions cannot be created for the same block"); |
272,974 | private static int add(CommandContext<CommandSourceStack> context, int level) throws CommandSyntaxException {<NEW_LINE>Modifier modifier = ModifierArgument.getModifier(context, "modifier");<NEW_LINE>List<LivingEntity> successes = HeldModifiableItemIterator.apply(context, (living, stack) -> {<NEW_LINE>// add modifier<NE... | stack, level + currentLevel, modifiers); |
255,281 | public okhttp3.Call prepareGarbageCollectionCommitsCall(String repository, GarbageCollectionPrepareRequest garbageCollectionPrepareRequest, final ApiCallback _callback) throws ApiException {<NEW_LINE>Object localVarPostBody = garbageCollectionPrepareRequest;<NEW_LINE>// create path and map variables<NEW_LINE>String loc... | (repository.toString())); |
1,592,058 | private void initChat() {<NEW_LINE>this.validateOAuth();<NEW_LINE>if (!TwitchValidate.instance().isChatValid()) {<NEW_LINE>com.gmt2001.Console.warn.println();<NEW_LINE>com.gmt2001.Console.warn.println("OAuth was invalid, not starting TMI (Chat)");<NEW_LINE>com.gmt2001.Console.warn.println("Please go the the bots built-... | () / 1000) + " seconds"); |
274,350 | final CreateServiceResult executeCreateService(CreateServiceRequest createServiceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createServiceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
915,610 | public void marshall(ServiceInstance serviceInstance, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (serviceInstance == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(serviceInstance.getArn(), ARN_BINDING);... | serviceInstance.getDeploymentStatus(), DEPLOYMENTSTATUS_BINDING); |
158,156 | public Endpoint unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>Endpoint endpoint = new Endpoint();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument())<NEW_LINE>targetDepth += 2;<NEW_LINE>while (true) {<N... | ().unmarshall(context)); |
307,174 | public Object doSwaggerApi(Invoker invoker) throws IOException {<NEW_LINE>HttpServletRequest httpRequest = invoker.getHttpRequest();<NEW_LINE>String localName = httpRequest.getHeader("Host");<NEW_LINE>if (StringUtils.isBlank(localName)) {<NEW_LINE>int localPort = httpRequest.getLocalPort();<NEW_LINE>localName = httpReq... | (contextPath) ? contextPath : "/"); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.