idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
1,788,894
public void change(final Event e, @Nullable final Object[] delta, final ChangeMode mode) {<NEW_LINE>if (mode == ChangeMode.SET) {<NEW_LINE>assert delta != null;<NEW_LINE>final Entity[] ps = getExpr().getArray(e);<NEW_LINE>if (ps.length == 0)<NEW_LINE>return;<NEW_LINE>final Object o = delta[0];<NEW_LINE>if (o instanceof...
change(e, delta, mode);
407,198
private static DataFlowActivationResult handleDataflowActivation(ViewFactoryForgeArgs args, StreamSpecCompiled streamSpec) throws ExprValidationException {<NEW_LINE>if (!(streamSpec instanceof FilterStreamSpecCompiled)) {<NEW_LINE>throw new ExprValidationException("Dataflow operator only allows filters for event types ...
ViewableActivatorDataFlowForge viewableActivator = new ViewableActivatorDataFlowForge(eventType);
713,150
private boolean identifiedPHD(ZipFile zip, ZipEntry entry, ArrayList<ManagedImageSource> candidates) throws IOException {<NEW_LINE>// now check to see if the file that has been located in the zip is a core file or not<NEW_LINE>InputStream stream = zip.getInputStream(entry);<NEW_LINE>if (FileSniffer.isPHDFile(stream, en...
getName(), ImageSourceType.PHD);
531,155
private GeoPoint pickProximate(final GeoPoint[] points) {<NEW_LINE>if (points.length == 0) {<NEW_LINE>throw new IllegalArgumentException("No off-plane intersection points were found; can't compute traversal");<NEW_LINE>} else if (points.length == 1) {<NEW_LINE>return points[0];<NEW_LINE>} else {<NEW_LINE>final double p...
(points[0], intersectionPoint);
471,333
public void takeSnap(final ReadableMap jsOptions, final Promise promise) {<NEW_LINE>FileSource.getInstance(mContext).activate();<NEW_LINE>mContext.runOnUiQueueThread(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>final String snapshotterID = UUID.randomUUID().toString();<NEW_LINE>fi...
Log.w(REACT_CLASS, error);
828,320
final DisassociateCustomerGatewayResult executeDisassociateCustomerGateway(DisassociateCustomerGatewayRequest disassociateCustomerGatewayRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(disassociateCustomerGatewayRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.get...
HandlerContextKey.SIGNING_REGION, getSigningRegion());
1,392,987
public List<Expectation> buildExpectations(String specUrlOrPayload, Map<String, String> operationsAndResponses) {<NEW_LINE>OpenAPI openAPI = buildOpenAPI(specUrlOrPayload, mockServerLogger);<NEW_LINE>AtomicInteger expectationCounter = new AtomicInteger(0);<NEW_LINE>return openAPI.getPaths().values().stream().flatMap(pa...
collect(Collectors.toList());
418,959
private static void addGroupByExpressionsToProjections(QueryPlanningInfo info) {<NEW_LINE>if (info.groupBy == null || info.groupBy.getItems() == null || info.groupBy.getItems().size() == 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>OGroupBy <MASK><NEW_LINE>int i = 0;<NEW_LINE>for (OExpression exp : info.groupBy.getItems()...
newGroupBy = new OGroupBy(-1);
815,448
public void showActions(com.zeroc.IceGridGUI.LiveDeployment.TreeNode node) {<NEW_LINE>boolean[] availableActions = _liveActionsForMenu.setTarget(node);<NEW_LINE>_appActionsForMenu.setTarget(null);<NEW_LINE>_newServerMenu.setEnabled(false);<NEW_LINE>_newServiceMenu.setEnabled(false);<NEW_LINE>_newTemplateMenu.setEnabled...
.LiveDeployment.TreeNode.SHUTDOWN_NODE]);
1,081,369
public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>Card aura = game.getCard(source.getFirstTarget());<NEW_LINE>if (controller == null || aura == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>TargetControlledPermanent tar...
FilterControlledCreaturePermanent FILTER = new FilterControlledCreaturePermanent("Choose a creature you control");
894,109
public void createPartControl(Composite parent) {<NEW_LINE>Server server = ServerManager.<MASK><NEW_LINE>this.setPartName("Connections[" + server.getName() + "]");<NEW_LINE>GridLayout layout = new GridLayout(1, true);<NEW_LINE>layout.marginHeight = 5;<NEW_LINE>layout.marginWidth = 5;<NEW_LINE>parent.setLayout(layout);<...
getInstance().getServer(serverId);
1,129,100
public Avatar uploadAvatarAsMultipart(File file, String xSdsAuthToken) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// verify the required parameter 'file' is set<NEW_LINE>if (file == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'file' when calling uploadAvatar...
localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
983,457
public Response<Void> deleteByIdWithResponse(String id, Context context) {<NEW_LINE>String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format("The resource ID '%s' is not val...
Utils.getValueFromIdByName(id, "factories");
351,598
public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {<NEW_LINE>if (evt instanceof ProtocolNegotiationEvent) {<NEW_LINE>pne = (ProtocolNegotiationEvent) evt;<NEW_LINE>} else if (evt instanceof SslHandshakeCompletionEvent) {<NEW_LINE>SslHandshakeCompletionEvent handshakeEvent = (SslHand...
FINE, ctx, "TLS negotiation failed for new client.", null);
1,623,680
public static void HtoRt(CvMat H, CvMat R, CvMat t) {<NEW_LINE>CvMat M = M3x2.get(), S = S2x2.get(), U = U3x2.get(), V = V2x2.get();<NEW_LINE>M.put(H.get(0), H.get(1), H.get(3), H.get(4), H.get(6), H.get(7));<NEW_LINE>cvSVD(M, <MASK><NEW_LINE>double lambda = S.get(3);<NEW_LINE>t.put(H.get(2) / lambda, H.get(5) / lambda...
S, U, V, CV_SVD_V_T);
1,274,238
private static JSFunctionData createFormatFunctionData(JSContext context) {<NEW_LINE>return JSFunctionData.createCallOnly(context, new JavaScriptRootNode(context.getLanguage(), null, null) {<NEW_LINE><NEW_LINE>@Child<NEW_LINE>private PropertyGetNode getBoundObjectNode = PropertyGetNode.createGetHidden(BOUND_OBJECT_KEY,...
toIntlMVValueNode = ToIntlMathematicalValue.create(false);
664,114
public void run(RegressionEnvironment env) {<NEW_LINE>String epl = "@name('create') create window MyWindow#keepall as select theString as a, intPrimitive as b from SupportBean;\n" + "on SupportBean_A delete from MyWindow where id = a;\n" + "insert into MyWindow select theString as a, intPrimitive as b from SupportBean;...
env, "S" + i, i);
143,833
public List<Endpoint> findEndpoint(String keyword, String serviceId, int limit) throws IOException {<NEW_LINE>StringBuilder sql = new StringBuilder();<NEW_LINE>List<Object> condition = new ArrayList<>(5);<NEW_LINE>sql.append("select * from ").append(EndpointTraffic<MASK><NEW_LINE>sql.append(EndpointTraffic.SERVICE_ID)....
.INDEX_NAME).append(" where ");
826,023
static void unloadShapeData(RandomAccessFile raf, ImageData icon) {<NEW_LINE>int bpl = (icon.width * <MASK><NEW_LINE>int pad = icon.scanlinePad;<NEW_LINE>int srcBpl = (bpl + pad - 1) / pad * pad;<NEW_LINE>int destBpl = (bpl + 3) / 4 * 4;<NEW_LINE>byte[] buf = new byte[destBpl];<NEW_LINE>int offset = (icon.height - 1) *...
icon.depth + 7) / 8;
1,058,178
private static void computePorts(Map<String, String> ip, Map<String, String> createProps, boolean useDefaultPorts) {<NEW_LINE>int portBase = 8900;<NEW_LINE>int kicker = ((new Date()).toString() + ip.get(PayaraModule.DOMAINS_FOLDER_ATTR) + ip.get(PayaraModule.DOMAIN_NAME_ATTR)).hashCode() % 40000;<NEW_LINE>kicker = kick...
.get(PayaraModule.ADMINPORT_ATTR));
790,864
public PointSensitivityBuilder presentValueSensitivityRatesStickyModel(ResolvedSwaption swaption, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities) {<NEW_LINE>validate(swaption, ratesProvider, swaptionVolatilities);<NEW_LINE>ZonedDateTime expiryDateTime = swaption.getExpiry();<NEW_LINE>double ...
expiry, tenor, strike, forward);
1,535,393
private void onlyCreateIndex(final CreateIndexClusterStateUpdateRequest request, final ActionListener<ClusterStateUpdateResponse> listener) {<NEW_LINE>normalizeRequestSetting(request);<NEW_LINE>clusterService.submitStateUpdateTask("create-index [" + request.index() + "], cause [" + request.cause() + "]", new AckedClust...
.index()), e);
1,455,385
public static void registerSmeltings() {<NEW_LINE>for (SmeltQueue smelt : TiCQueues.getSmeltQueue()) {<NEW_LINE>// 1st because it may provide fluids for later<NEW_LINE>if (smelt.getFluidOutput() == null) {<NEW_LINE>FluidStack fluid = getFluidForItems(smelt.getOutput());<NEW_LINE>if (fluid == null) {<NEW_LINE>Log.warn("...
.getOutput()) + "' doesn't smelt into a fluid");
416,730
protected boolean isUsableAddress(NetworkInterface networkInterface, InetAddress address) {<NEW_LINE>boolean result = super.isUsableAddress(networkInterface, address);<NEW_LINE>if (result) {<NEW_LINE>// TODO: Workaround Android DNS reverse lookup issue, still a problem on ICS+?<NEW_LINE>// http://4thline.org/projects/m...
SEVERE, "Failed injecting hostName to work around Android InetAddress DNS bug: " + address, ex);
905,850
public static SQLQueryAdapter generate(MariaDBSchema s) {<NEW_LINE>ExpectedErrors errors = new ExpectedErrors();<NEW_LINE>StringBuilder sb = new StringBuilder("CREATE ");<NEW_LINE>errors.add("Key/Index cannot be defined on a virtual generated column");<NEW_LINE>if (Randomly.getBoolean()) {<NEW_LINE>errors.add("Duplicat...
nonEmptySubset(randomTable.getColumns());
1,457,523
private DegraderLoadBalancerStrategyV3 newLoadBalancer(String serviceName, Map<String, Object> strategyProperties, Map<String, String> degraderProperties, String path, String clusterName) {<NEW_LINE>debug(LOG, "created a degrader load balancer strategyV3");<NEW_LINE>Map<String, Object> strategyPropertiesCopy = new Hash...
put(PropertyKeys.CLUSTER_NAME, clusterName);
1,795,584
public static void unbox(MethodVisitor mv, Type primitiveType) {<NEW_LINE>String wrapper;<NEW_LINE>String method;<NEW_LINE>String descriptor;<NEW_LINE>switch(primitiveType.getSort()) {<NEW_LINE>case Type.BOOLEAN:<NEW_LINE>wrapper = "java/lang/Boolean";<NEW_LINE>method = "booleanValue";<NEW_LINE>descriptor = "()Z";<NEW_...
wrapper, method, descriptor, false);
694,123
private Mono<Response<Void>> regeneratePrimaryKeyWithResponseAsync(String resourceGroupName, String serviceName, AccessIdName accessName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cann...
), accessName, accept, context);
236,172
private boolean validateUserPermisionInChildGroup(String userNo, int currentGroupId) throws SQLException {<NEW_LINE>boolean havePermison = false;<NEW_LINE>int userId = BeanGetter.getDaoOfLoginUser().getUserByNo(userNo).getId();<NEW_LINE>List<GroupRelation> relations = BeanGetter.getGroupRelationDao().getAllGroupRelatio...
> ite = relations.iterator();
1,070,616
private void processSymbolTables() throws Exception {<NEW_LINE>monitor.setMessage("Processing symbol tables...");<NEW_LINE>List<SymbolTableCommand> commands = machoHeader.getLoadCommands(SymbolTableCommand.class);<NEW_LINE>for (SymbolTableCommand symbolTableCommand : commands) {<NEW_LINE>List<NList> symbols = symbolTab...
String string = symbol.getString();
1,228,572
private static InetSocketAddress tryParseIpV4(final String str, final String uriParamName, final boolean isReResolution, final NameResolver nameResolver) {<NEW_LINE>IpV4State state = IpV4State.HOST;<NEW_LINE>int separatorIndex = -1;<NEW_LINE>final <MASK><NEW_LINE>for (int i = 0; i < length; i++) {<NEW_LINE>final char c...
int length = str.length();
992,561
private boolean matchInputMap(Item[][] input) {<NEW_LINE>Map<Integer, Map<Integer, Item>> map = this.getIngredientMap();<NEW_LINE>// match the given items to the requested items<NEW_LINE>for (int y = 0, y2 = this.getHeight(); y < y2; ++y) {<NEW_LINE>for (int x = 0, x2 = this.getWidth(); x < x2; ++x) {<NEW_LINE>Item giv...
[y][x] = null;
956,207
public Optional<BoardHistoryNode> draw(Graphics2D g, int posx, int posy, int width, int height, boolean calc) {<NEW_LINE>if (width <= 0 || height <= 0) {<NEW_LINE>// we don't have enough space<NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_LINE>// Use dense tree for saving space if large-subboard<NEW_LINE>YSPACING = ...
setStroke(new BasicStroke(1));
909,284
public void receive(Event event) {<NEW_LINE>if (callback != null) {<NEW_LINE>logger.trace("Received Event: Source: {} Topic: {} Type: {} Payload: {}", event.getSource(), event.getTopic(), event.getType(), event.getPayload());<NEW_LINE>Map<String, Object> values = new HashMap<>();<NEW_LINE>if (event instanceof ItemStat...
ItemStateChangedEvent) event).getItemState();
1,764,638
private void resolveParentDependenciesRecursively(List<Pom> pomAncestry) {<NEW_LINE>Pom pom = pomAncestry.get(0);<NEW_LINE>for (Profile profile : pom.getProfiles()) {<NEW_LINE>if (profile.isActive(activeProfiles)) {<NEW_LINE>mergeDependencyManagement(profile.getDependencyManagement(), pom);<NEW_LINE><MASK><NEW_LINE>}<N...
mergeRequestedDependencies(profile.getDependencies());
1,769,291
public void run() {<NEW_LINE>liveSnippets = shellSession.getSnippets(true, true);<NEW_LINE>prepareDeclarations();<NEW_LINE>createStatementsText();<NEW_LINE>prepareImports();<NEW_LINE>try {<NEW_LINE>FileObject replaced = targetFolder.getFileObject(className, "java");<NEW_LINE>if (replaced != null) {<NEW_LINE>replaced.de...
toPhase(JavaSource.Phase.RESOLVED);
838,062
private static void findNestedAnnotationsInternal(Object object, String annotationFqn, List<AnnotationMirror> result) {<NEW_LINE>Collection<? extends AnnotationValue> annotationValueCollection = null;<NEW_LINE>if (object instanceof AnnotationMirror) {<NEW_LINE>AnnotationMirror annotationMirror = (AnnotationMirror) obje...
> annotationMap = annotationMirror.getElementValues();
493,162
private static void insideTag(DocTreePath tag, JavadocContext jdctx, int caretOffset) {<NEW_LINE>TokenSequence<JavadocTokenId> jdts = jdctx.jdts;<NEW_LINE>assert jdts.token() != null;<NEW_LINE>int start = (int) jdctx.positions.getStartPosition(jdctx.javac.getCompilationUnit(), jdctx.comment, tag.getLeaf());<NEW_LINE>bo...
= caretOffset - jdts.offset();
1,211,334
public void run() {<NEW_LINE>alarm.cancelAllRequests();<NEW_LINE>String prefix = mySpeedSearch.getEnteredPrefix();<NEW_LINE>myTree.getEmptyText().setText(StringUtil.isEmpty(prefix) ? "Structure is empty" : "'" + prefix + "' not found");<NEW_LINE>if (prefix == null)<NEW_LINE>prefix = "";<NEW_LINE>if (!filter.equals(pref...
() < filter.length();
1,442,100
public ApiScenarioWithBLOBs buildSaveScenario(SaveApiScenarioRequest request) {<NEW_LINE>ApiScenarioWithBLOBs scenario = new ApiScenarioWithBLOBs();<NEW_LINE>scenario.setId(request.getId());<NEW_LINE>scenario.setName(request.getName());<NEW_LINE>scenario.setProjectId(request.getProjectId());<NEW_LINE>scenario.setCustom...
setModulePath(request.getModulePath());
1,661,647
public NewColorAndFontPanel createPanel(@Nonnull ColorAndFontOptions options) {<NEW_LINE>final SchemesPanel schemesPanel = new SchemesPanel(options);<NEW_LINE>CompositeColorDescriptionPanel descriptionPanel = new CompositeColorDescriptionPanel();<NEW_LINE>descriptionPanel.addDescriptionPanel(new ColorAndFontDescription...
schemesPanel, getDiffGroup(), descriptionPanel);
1,058,764
private void shareItems(Set<Recording> selected) {<NEW_LINE>FragmentActivity activity = getActivity();<NEW_LINE>if (activity != null) {<NEW_LINE>ArrayList<Uri> uris = new ArrayList<>();<NEW_LINE>for (Recording rec : selected) {<NEW_LINE>File file = rec == SHARE_LOCATION_FILE ? generateGPXForRecordings(selected) : rec.g...
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
1,446,956
public static void main(String[] args) throws IOException {<NEW_LINE>if (args.length != 4) {<NEW_LINE>logger.info("Usage: MnistConverter dataFile labelFile outFile propsFile");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>DataInputStream xStream = IOUtils.getDataInputStream(args[0]);<NEW_LINE>DataInputStream yStream = IOUtils....
int yMagic = yStream.readInt();
428,136
public AttackResult completed(@RequestParam String password) {<NEW_LINE>Zxcvbn zxcvbn = new Zxcvbn();<NEW_LINE>StringBuffer output = new StringBuffer();<NEW_LINE>DecimalFormat df = new DecimalFormat("0", DecimalFormatSymbols.getInstance(Locale.ENGLISH));<NEW_LINE>df.setMaximumFractionDigits(340);<NEW_LINE>Strength stre...
strength.getScore() + "/4 </div>");
1,488,053
public void run(IAction action) {<NEW_LINE>try {<NEW_LINE>Path p = new Path(XMLUtil.XSD_DIR + "/" + getSchemaFilename());<NEW_LINE>Bundle bundle = Platform.getBundle(VALIDATION_PLUGINNAME);<NEW_LINE>URL xsdURL = FileLocator.find(bundle, p, null);<NEW_LINE>Source xml = new StreamSource(selectedFile.getContents());<NEW_L...
getShell(), "OpenDDS XML Validation", "Validation completed with no XML Schema violations detected");
309,627
public int computeIndentAfterNewline(IDocument d, int offset) throws BadLocationException {<NEW_LINE>Token token = getTokenBefore(d, offset);<NEW_LINE>int line = (token == null ? 0 : getLineNumber(token));<NEW_LINE>int orgIndentLevel = (token == null ? 0 : getLineIndentLevel(d, line));<NEW_LINE>List<Token> tokens = get...
+= getPrefs().getIndentationSize();
716,300
public PutEmailIdentityDkimSigningAttributesResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>PutEmailIdentityDkimSigningAttributesResult putEmailIdentityDkimSigningAttributesResult = new PutEmailIdentityDkimSigningAttributesResult();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = c...
int originalDepth = context.getCurrentDepth();
898,631
public void callOnSwipe(byte[] data, int dataLen) {<NEW_LINE>Logger.D(TAG, "onSwipe API");<NEW_LINE>Logger.D(TAG, "data: " + data + " datalen: " + dataLen);<NEW_LINE>if ((data == null) || (dataLen < MIN_DATA_LENGTH)) {<NEW_LINE>Log.e(TAG, "MSR has returned no valid data");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Bundle b ...
Log.e(TAG, "Cannot processSwipeOutput: IllegalArgumentException");
473,561
public OutlierResult run(Relation<? extends NumberVector> relation) {<NEW_LINE>DoubleMinMax mm = new DoubleMinMax();<NEW_LINE>// resulting scores<NEW_LINE>WritableDoubleDataStore oscores = DataStoreUtil.makeDoubleStorage(relation.getDBIDs(), DataStoreFactory.HINT_TEMP | DataStoreFactory.HINT_HOT);<NEW_LINE>// Compute m...
transposeTimesTimes(x, covarianceTransposed, x);
1,725,286
/*<NEW_LINE>* (non-Javadoc)<NEW_LINE>*<NEW_LINE>* @see javax.resource.spi.ResourceAdapter#endpointDeactivation(javax.resource.spi.endpoint.MessageEndpointFactory, javax.resource.spi.ActivationSpec)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void endpointDeactivation(MessageEndpointFactory msgEndpointFac, Activation...
"prop1:" + aSpec.getProp1());
1,109,589
public List<SingularityTaskId> rebalanceRacks(SingularityRequest request, List<SingularityTaskId> remainingActiveTasks, Optional<String> user) {<NEW_LINE>List<SingularityTaskId> <MASK><NEW_LINE>int activeRacksWithCapacityCount = slaveAndRackManager.getActiveRacksWithCapacityCount();<NEW_LINE>double perRack = request.ge...
extraCleanedTasks = new ArrayList<>();
802,298
final GetDevicesResult executeGetDevices(GetDevicesRequest getDevicesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getDevicesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<GetDevicesRequest> request = nu...
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
255,740
public static void dump(DocFlavor docFlavor) {<NEW_LINE>System.out.println();<NEW_LINE>System.out.println("DocFlavor=" + docFlavor);<NEW_LINE>PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();<NEW_LINE>PrintService[] pss = PrintServiceLookup.lookupPrintServices(docFlavor, pras);<NEW_LINE>for (int i = 0...
ServiceUIFactory.ABOUT_UIROLE, ServiceUIFactory.JDIALOG_UI);
1,746,050
public static void average(Planar<GrayS16> from, GrayS16 to) {<NEW_LINE>int numBands = from.getNumBands();<NEW_LINE>if (numBands == 1) {<NEW_LINE>to.setTo(from.getBand(0));<NEW_LINE>} else if (numBands == 3) {<NEW_LINE>GrayS16 band0 = from.getBand(0);<NEW_LINE>GrayS16 band1 = from.getBand(1);<NEW_LINE>GrayS16 band2 = f...
[b].data[indexFrom];
548,939
private void sortedMerge(int[] input, int low, int high) {<NEW_LINE>int middle = (low + high) / 2;<NEW_LINE>int[] temp = new int[high - low + 1];<NEW_LINE>int i = low;<NEW_LINE>int j = middle + 1;<NEW_LINE>int r = 0;<NEW_LINE>while (i <= middle && j <= high) {<NEW_LINE>if (input[i] <= input[j]) {<NEW_LINE>temp[r++] = i...
++] = temp[k++];
32,605
private Box createMdat(final List<StreamingSample> samples) {<NEW_LINE>return new Box() {<NEW_LINE><NEW_LINE>public String getType() {<NEW_LINE>return "mdat";<NEW_LINE>}<NEW_LINE><NEW_LINE>public long getSize() {<NEW_LINE>long l = 8;<NEW_LINE>for (StreamingSample streamingSample : samples) {<NEW_LINE>l += streamingSamp...
.fourCCtoBytes(getType()));
247,307
public Dialog onCreateDialog(Bundle savedInstanceState) {<NEW_LINE>if (getArguments() != null && getArguments().containsKey(TomahawkFragment.PREFERENCEID)) {<NEW_LINE>String id = getArguments().getString(TomahawkFragment.PREFERENCEID);<NEW_LINE>mScriptResolver = PipeLine.get().getResolver(id);<NEW_LINE>}<NEW_LINE>TextV...
AlertDialog.Builder(getActivity());
156,450
public PaymentMethod apply(final PaymentMethodModelDao paymentMethodModelDao) {<NEW_LINE>PaymentMethodPlugin paymentMethodPlugin = null;<NEW_LINE>if (pluginApi != null) {<NEW_LINE>try {<NEW_LINE>paymentMethodPlugin = pluginApi.getPaymentMethodDetail(paymentMethodModelDao.getAccountId(), paymentMethodModelDao.getId(), p...
return new DefaultPaymentMethod(paymentMethodModelDao, paymentMethodPlugin);
1,770,724
boolean fitLine(int contourIndex0, int contourIndex1, LineGeneral2D_F64 line) {<NEW_LINE>int numPixels = CircularIndex.distanceP(contourIndex0, contourIndex1, contour.size());<NEW_LINE>// if its too small<NEW_LINE>if (numPixels < minimumLineLength)<NEW_LINE>return false;<NEW_LINE>Point2D_I32 c0 = contour.get(contourInd...
1) / (numSamples - 1);
605,471
public void rewriteClientbound(ByteBuf packet, int oldId, int newId, int protocolVersion) {<NEW_LINE>// Special cases<NEW_LINE><MASK><NEW_LINE>int packetId = DefinedPacket.readVarInt(packet);<NEW_LINE>int packetIdLength = packet.readerIndex() - readerIndex;<NEW_LINE>if (packetId == spawnPlayerId) {<NEW_LINE>// Entity I...
int readerIndex = packet.readerIndex();
239,426
public RuntimeValue<DataSourcesHealthSupport> configureDataSourcesHealthSupport(DataSourcesBuildTimeConfig config) {<NEW_LINE>Stream.Builder<String> configured = Stream.builder();<NEW_LINE>Stream.Builder<String> excluded = Stream.builder();<NEW_LINE>if (config.defaultDataSource.dbKind.isPresent()) {<NEW_LINE>configured...
excluded.add(DataSourceUtil.DEFAULT_DATASOURCE_NAME);
1,020,930
private void varInstantiated(int var, int val) throws ContradictionException {<NEW_LINE>if (isPassive()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// last in [0,n-1]<NEW_LINE>int last = end[val].get();<NEW_LINE>// start in [0,n-1]<NEW_LINE>int start = origin[var].get();<NEW_LINE>if (origin[val].get() != val) {<NEW_LINE>//...
instantiateTo(start + offset, this);
36,406
private RequestId createRequest(final InboundEMailConfig config, final InboundEMail email) {<NEW_LINE>final I_R_Request request = InterfaceWrapperHelper.newInstance(I_R_Request.class);<NEW_LINE>request.setSummary(email.getSubject());<NEW_LINE>request.setConfidentialType(X_R_Request.CONFIDENTIALTYPE_Internal);<NEW_LINE>...
(BPartnerId.toRepoId(bpartnerId));
777,384
private static final <T extends Comparable<T>> void visit(Map<Vertex<T>, Integer> map, List<List<Vertex<T>>> list, Vertex<T> v, int c) {<NEW_LINE>map.put(v, c);<NEW_LINE>List<Vertex<T>> r = null;<NEW_LINE>if (c == list.size()) {<NEW_LINE>r = new ArrayList<Vertex<T>>();<NEW_LINE>list.add(r);<NEW_LINE>} else {<NEW_LINE>r...
> to = e.getToVertex();
1,202,878
private ORawBuffer readRecord(final ORecordId rid, final boolean prefetchRecords) {<NEW_LINE>checkOpennessAndMigration();<NEW_LINE>if (!rid.isPersistent()) {<NEW_LINE>throw new ORecordNotFoundException(rid, "Cannot read record " + rid + " since the position is invalid in database '" + name + '\'');<NEW_LINE>}<NEW_LINE>...
doReadRecord(cluster, rid, prefetchRecords);
1,379,738
public String loginUser(String username, String password) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// verify the required parameter 'username' is set<NEW_LINE>if (username == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'username' when calling loginUser");<...
HashMap<String, String>();
156,292
private static void makeShorter(int[] coords, int tabsWiderThan, int maxTabWidth, int widthToDistribute) {<NEW_LINE>int tabCount = countTabsWiderThan(coords, tabsWiderThan);<NEW_LINE>if (0 == tabCount)<NEW_LINE>return;<NEW_LINE>int total = 0;<NEW_LINE>int delta = Math.max(widthToDistribute / tabCount, 1);<NEW_LINE>for ...
tabWidth -= coords[i - 1];
1,013,275
public List<String> checkForBadges(Profile authUser, HttpServletRequest req) {<NEW_LINE>List<String> badgelist = new ArrayList<String>();<NEW_LINE>if (authUser != null && !isAjaxRequest(req)) {<NEW_LINE>long oneYear = authUser.getTimestamp() + (365 * 24 * 60 * 60 * 1000);<NEW_LINE>addBadgeOnce(authUser, Profile.Badge.E...
).split(",")));
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 ...
localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
1,805,456
private static String expand(Map<String, String> params, String str, boolean url_decode) {<NEW_LINE>int pos = 0;<NEW_LINE>String result = "";<NEW_LINE>while (true) {<NEW_LINE>int new_pos = str.indexOf('$', pos);<NEW_LINE>if (new_pos == -1) {<NEW_LINE>result += str.substring(pos);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>res...
c = str.charAt(i);
558,296
public PathAttributes toAttributes(final StorageObject object) {<NEW_LINE>final PathAttributes attributes = new PathAttributes();<NEW_LINE>if (StringUtils.isNotBlank(object.getMd5sum())) {<NEW_LINE>// For manifest files, the ETag in the response for a GET or HEAD on the manifest file is the MD5 sum of<NEW_LINE>// the c...
String lastModified = object.getLastModified();
504,584
void removeGroupUserSettings(String groupId, List<String> users) {<NEW_LINE>Connection connection = null;<NEW_LINE>PreparedStatement statement = null;<NEW_LINE>try {<NEW_LINE>connection = DBUtil.getConnection();<NEW_LINE>StringBuilder sb = new StringBuilder("delete from t_user_setting where _scope in (1,3,5,7) and _uid...
int count = statement.executeUpdate();
1,279,446
public static QueryInventoryOfItemsInBizItemGroupResponse unmarshall(QueryInventoryOfItemsInBizItemGroupResponse queryInventoryOfItemsInBizItemGroupResponse, UnmarshallerContext _ctx) {<NEW_LINE>queryInventoryOfItemsInBizItemGroupResponse.setRequestId(_ctx.stringValue("QueryInventoryOfItemsInBizItemGroupResponse.Reques...
= new ArrayList<Sku>();
498,685
public boolean openRightClickMenu(int x, int y) {<NEW_LINE>if (Lizzie.leelaz.isKataGo) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Optional<int[]> boardCoordinates = boardRenderer.convertScreenToCoordinates(x, y);<NEW_LINE>if (!boardCoordinates.isPresent()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (isPlayingAga...
rightClickMenu.storeXY(x, y);
474,949
public boolean refresh(TypeElement typeElement) {<NEW_LINE>Map<String, ? extends AnnotationMirror> types = getHelper().getAnnotationsByType(getHelper().getCompilationController().getElements().getAllAnnotationMirrors(typeElement));<NEW_LINE>// NOI18N<NEW_LINE>AnnotationMirror annotationMirror = types.get("javax.faces.c...
"createTag", Boolean.class, null);
871,408
private void collectJavaProcRunInfo(JVMAgentInfo appServerInfo) {<NEW_LINE>javaCommand = appServerInfo.getAgentProperties().getProperty("sun.java.command");<NEW_LINE>String[] jCommands = javaCommand.split(" ");<NEW_LINE>javaMain = jCommands[0];<NEW_LINE>String[] javaMainClassInfo = javaMain.split("\\.");<NEW_LINE>javaM...
getSystemProperties().getProperty("java.home");
942,547
public static void reloadConfig(EnumRestartRequirement restarted) {<NEW_LINE>if (EnumRestartRequirement.WORLD.hasBeenRestarted(restarted)) {<NEW_LINE>mjPerMillibucket = propMjPerMillibucket.getLong();<NEW_LINE>if (mjPerMillibucket < MJ_REQ_MILLIBUCKET_MIN) {<NEW_LINE>mjPerMillibucket = MJ_REQ_MILLIBUCKET_MIN;<NEW_LINE>...
basePowerRate * 4, 32, false);
965,815
public Request<StopInstancesRequest> marshall(StopInstancesRequest stopInstancesRequest) {<NEW_LINE>if (stopInstancesRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<StopInstancesRequest> request = new DefaultRequest<MASK><NEW_LINE>requ...
<StopInstancesRequest>(stopInstancesRequest, "AmazonEC2");
392,763
private static AttributesAndLocation generatorAttributesForMacros(Package.Builder pkgBuilder, BuildLangTypedAttributeValuesMap args, ImmutableList<CallStackEntry> stack) {<NEW_LINE>// For a callstack [BUILD <toplevel>, .bzl <function>, <rule>],<NEW_LINE>// location is that of the caller of 'rule' (the .bzl function).<N...
size() - 2).location;
1,184,834
public JPopupMenu createPopupMenu(int row, int column, Node[] selectedNodes, Component component) {<NEW_LINE>Action[] actions = NodeOp.findActions(selectedNodes);<NEW_LINE>JPopupMenu res = Utilities.actionsToPopup(actions, component);<NEW_LINE>if ((component instanceof ETable) && (column >= 0)) {<NEW_LINE>ETable et = (...
JMenu menu = new JMenu(s);
1,718,069
public List<Node> generateMenuTreeForRole(List<ZTreeNode> list) {<NEW_LINE>List<Node> nodes = new ArrayList<>(20);<NEW_LINE>for (ZTreeNode menu : list) {<NEW_LINE>Node permissionNode = new Node();<NEW_LINE>permissionNode.setId(menu.getId());<NEW_LINE>permissionNode.setName(menu.getName());<NEW_LINE>permissionNode.setPi...
= new ArrayList<>(20);
1,430,653
public void handleMessage(ReleaseMessage message, String channel) {<NEW_LINE>logger.info("message received - channel: {}, message: {}", channel, message);<NEW_LINE>String releaseMessage = message.getMessage();<NEW_LINE>if (!Topics.APOLLO_RELEASE_TOPIC.equals(channel) || Strings.isNullOrEmpty(releaseMessage)) {<NEW_LINE...
findByAppIdAndClusterNameAndNamespaceName(appId, cluster, namespace);
398,619
public PointSensitivityBuilder presentValueSensitivity(CapitalIndexedBondPaymentPeriod period, RatesProvider ratesProvider, IssuerCurveDiscountFactors issuerDiscountFactors) {<NEW_LINE>if (period.getPaymentDate().isBefore(ratesProvider.getValuationDate())) {<NEW_LINE>return PointSensitivityBuilder.none();<NEW_LINE>}<NE...
discountFactor(period.getPaymentDate());
33,911
public UpdateDataSourcePermissionsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>UpdateDataSourcePermissionsResult updateDataSourcePermissionsResult = new UpdateDataSourcePermissionsResult();<NEW_LINE>updateDataSourcePermissionsResult.setStatus(context.getHttpResponse().getStatusCode());...
String currentParentElement = context.getCurrentParentElement();
58,081
public static SAML11AuthorizationDecisionStatementType parseSAML11AuthorizationDecisionStatement(XMLEventReader xmlEventReader) throws ParsingException {<NEW_LINE>SAML11AuthorizationDecisionStatementType authzDecision = null;<NEW_LINE>StartElement startElement = StaxParserUtil.getNextStartElement(xmlEventReader);<NEW_L...
xmlEvent = StaxParserUtil.peek(xmlEventReader);
685,163
public static String convertToUnhexExpression(byte[] bytes) {<NEW_LINE>int len = bytes != null ? bytes.length : 0;<NEW_LINE>if (len == 0) {<NEW_LINE>return EMPTY_STRING_EXPR;<NEW_LINE>}<NEW_LINE>int offset = UNHEX_PREFIX.length;<NEW_LINE>byte[] hexChars = new byte[len * 2 + offset + UNHEX_SUFFIX.length];<NEW_LINE>Syste...
0, hexChars, 0, offset);
552,410
public Map<String, Number> result() {<NEW_LINE>long totalCount = values != null ? values.getTotalCount() : doubles.getTotalCount();<NEW_LINE>boolean empty = totalCount == 0;<NEW_LINE>Map<String, Number> result = new LinkedHashMap<>(percentiles.size() + 6);<NEW_LINE>result.put("min", minValue);<NEW_LINE>result.put("minN...
.getValueAtPercentile(percentile * 100D));
687,838
public boolean isConference(Call call) {<NEW_LINE>// If we're the focus of the conference.<NEW_LINE>if (call.isConferenceFocus())<NEW_LINE>return true;<NEW_LINE>// If one of our peers is a conference focus, we're in a<NEW_LINE>// conference call.<NEW_LINE>Iterator<? extends CallPeer> callPeers = call.getCallPeers();<NE...
CallPeer callPeer = callPeers.next();
893,659
protected SingleVariableDeclaration convertToSingleVariableDeclaration(LocalDeclaration localDeclaration) {<NEW_LINE>final SingleVariableDeclaration variableDecl = new SingleVariableDeclaration(this.ast);<NEW_LINE>setModifiers(variableDecl, localDeclaration);<NEW_LINE>final SimpleName name <MASK><NEW_LINE>name.internal...
= new SimpleName(this.ast);
1,289,845
private LdapBrowseResult doBrowseImpl(final DomainID domainID, final String profileID, final String dn) throws PwmUnrecoverableException, ChaiUnavailableException, ChaiOperationException {<NEW_LINE>final LdapBrowseResult.LdapBrowseResultBuilder result = LdapBrowseResult.builder();<NEW_LINE>updateBrowseResultChildren(do...
parentDN(parentEntry.getEntryDN());
521,825
private void populatePartitionAndLocalReplicaMaps(Collection<? extends PartitionId> allPartitions, Map<String, SortedMap<Integer, List<PartitionId>>> partitionIdsByClassAndLocalReplicaCount, Map<PartitionId, List<ReplicaId>> partitionIdToLocalReplicas, String localDatacenterName) {<NEW_LINE>for (PartitionId partition :...
-> new TreeMap<>());
546,852
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {<NEW_LINE>final View mRootView = inflater.inflate(R.layout.fragment_chat, container, false);<NEW_LINE>Context context = requireContext();<NEW_LINE>LinearLayoutManager llm = new LinearLayoutManager(context);<NEW_LINE>llm.s...
findViewById(R.id.chat_input_divider);
1,691,493
private void fillNotificationCount(final String userId, final Map<String, Object> dataModel) {<NEW_LINE>final int unreadCommentedNotificationCnt = notificationQueryService.getUnreadNotificationCountByType(userId, Notification.DATA_TYPE_C_COMMENTED);<NEW_LINE>dataModel.put(Common.UNREAD_COMMENTED_NOTIFICATION_CNT, unrea...
put(Common.UNREAD_NEW_FOLLOWER_NOTIFICATION_CNT, unreadNewFollowerNotificationCnt);
713,880
protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_view_pager);<NEW_LINE>Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);<NEW_LINE>setSupportActionBar(toolbar);<NEW_LINE>getSupportActionBar().setDisplayHomeAsUpEnabled(true);...
? insets.consumeSystemWindowInsets() : insets;
1,460,140
public void preOpExecution(SameDiff sd, At at, SameDiffOp op, OpContext oc) {<NEW_LINE>if (op.getOp().isInPlace()) {<NEW_LINE>// Don't check inplace op<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (op.getOp() instanceof Op) {<NEW_LINE>Op o = (Op) op.getOp();<NEW_LINE>if (oc.getInputArray(0) == null) {<NEW_LINE>// No input o...
, oc.getInputArray(1) };
1,286,709
// todo to remove sometime later<NEW_LINE>@Deprecated<NEW_LINE>private void writeJarDirectories(@Nonnull Element element) {<NEW_LINE>final List<OrderRootType> rootTypes = sortRootTypes(myRoots.keySet());<NEW_LINE>for (OrderRootType rootType : rootTypes) {<NEW_LINE>VirtualFilePointerContainer container = myRoots.get(roo...
>(container.getJarDirectories());
7,913
private void initImpl(String dialogUIID, String dialogTitleUIID, Layout lm) {<NEW_LINE>super.getContentPane().setUIID(dialogUIID);<NEW_LINE>super.getTitleComponent().setText("");<NEW_LINE>super.getTitleComponent().setVisible(false);<NEW_LINE>super.getTitleArea().setVisible(false);<NEW_LINE>super.getTitleArea().setUIID(...
getStyle().setBgImage(null);
1,111,262
private void makeRunMenu() {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>runMenu = makeMenuRes("run", 'R');<NEW_LINE>// $NON-NLS-1$<NEW_LINE>runStart = makeMenuItemRes("start", 'S', ActionNames.ACTION_START, KeyStrokes.ACTION_START);<NEW_LINE>// $NON-NLS-1$<NEW_LINE>runStartNoTimers = makeMenuItemRes("start_no_timers", 'N', Actio...
ActionNames.CLEAR, KeyStrokes.CLEAR);
185,505
public SqlNode visit(SqlIdentifier id) {<NEW_LINE>// raw tables and views and such will have a IdentifierNamespace<NEW_LINE>// since we are scoped to identifiers here, we should only pick up these<NEW_LINE>SqlValidatorNamespace namespace = validator.getNamespace(id);<NEW_LINE>if (namespace != null && namespace.isWrappe...
resourceName = qualifiedNameParts.get(1);
611,452
protected INDArray createWeightMatrix(NeuralNetConfiguration conf, INDArray weightView, boolean initializeParams) {<NEW_LINE>ConvolutionLayer layerConf = (ConvolutionLayer) conf.getLayer();<NEW_LINE>if (initializeParams) {<NEW_LINE>int[] kernel = layerConf.getKernelSize();<NEW_LINE>int[<MASK><NEW_LINE>val inputDepth = ...
] stride = layerConf.getStride();