idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
1,642,643
private static List<Entry> calculateElevationArray(GPXTrackAnalysis analysis, GPXDataSetAxisType axisType, float divX, float convEle, boolean useGeneralTrackPoints, boolean calcWithoutGaps) {<NEW_LINE>List<Entry> values = new ArrayList<>();<NEW_LINE>List<Elevation> elevationData = analysis.elevationData;<NEW_LINE>float...
, lastEntry.getY()));
428,261
protected final <R extends AbstractPutObjectRequest> R wrapWithCipher(final R request, ContentCryptoMaterial cekMaterial) {<NEW_LINE>// Create a new metadata object if there is no metadata already.<NEW_LINE>ObjectMetadata metadata = request.getMetadata();<NEW_LINE>if (metadata == null) {<NEW_LINE>metadata = new ObjectM...
(request, cekMaterial, plaintextLength));
1,840,839
protected void dswap(long N, INDArray X, int incX, INDArray Y, int incY) {<NEW_LINE>Nd4j.getExecutioner().push();<NEW_LINE>CudaContext ctx = allocator.getFlowController().prepareAction(Y, X);<NEW_LINE>CublasPointer xCPointer = new CublasPointer(X, ctx);<NEW_LINE>CublasPointer yCPointer = new CublasPointer(Y, ctx);<NEW_...
yCPointer.getDevicePointer(), incY);
1,502,003
private JPanel optionalSettings() {<NEW_LINE>JPanel panel = <MASK><NEW_LINE>panel.setOpaque(false);<NEW_LINE>JPanel description = new JPanel();<NEW_LINE>description.setLayout(new BoxLayout(description, BoxLayout.Y_AXIS));<NEW_LINE>description.setOpaque(false);<NEW_LINE>JPanel name = new JPanel(new FlowLayout(FlowLayout...
new JPanel(new BorderLayout());
973,377
private void reorderNode(ProgramNode destNode, int dropAction, int relativeMousePos, ProgramNode parentNode, ProgramNode dropNode) throws NotFoundException, CircularDependencyException, DuplicateGroupException {<NEW_LINE>if (!reorderChildren(destNode, dropNode, relativeMousePos)) {<NEW_LINE>int index;<NEW_LINE>// this ...
destNode, dropNode, index, dropAction);
850,852
protected void onActivityResult(int requestCode, int resultCode, Intent data) {<NEW_LINE>super.onActivityResult(requestCode, resultCode, data);<NEW_LINE>if (requestCode == Constants.INTENT_SETTINGS_AUTHENTICATE) {<NEW_LINE>if (resultCode == RESULT_OK) {<NEW_LINE>byte[] authKey = data.getByteArrayExtra(Constants.EXTRA_A...
handleOnActivityResult(requestCode, resultCode, data);
1,260,667
public Request<UpdateApplicationSettingsRequest> marshall(UpdateApplicationSettingsRequest updateApplicationSettingsRequest) {<NEW_LINE>if (updateApplicationSettingsRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(UpdateApplicationSettingsRequest)");<NEW_LINE>}<NEW_LINE>R...
.toString(content.length));
693,306
public void processImage(int sourceID, long frameID, BufferedImage buffered, ImageBase input) {<NEW_LINE>GIntegralImageOps.transform((T) input, integral);<NEW_LINE>intensity.reshape(integral.width, input.height);<NEW_LINE>List<BufferedImage> layers = new ArrayList<>();<NEW_LINE>List<String> labels = new ArrayList<>();<...
, octave + 1, size));
732,267
private void maybeUpdateExportDeclaration(NodeTraversal t, Node n) {<NEW_LINE>if (!currentScript.isModule || !n.getString().equals("exports") || !isAssignTarget(n)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Node assignNode = n.getParent();<NEW_LINE>Node rhs = assignNode.getLastChild();<NEW_LINE>if (rhs != currentScript.de...
.getParent().detach();
1,079,003
public ConstraintDefinition createPropertyExistenceConstraint(String name, RelationshipType type, String propertyKey) {<NEW_LINE>try {<NEW_LINE>TokenWrite tokenWrite = transaction.tokenWrite();<NEW_LINE>int typeId = tokenWrite.<MASK><NEW_LINE>int[] propertyKeyId = getOrCreatePropertyKeyIds(tokenWrite, propertyKey);<NEW...
relationshipTypeGetOrCreateForName(type.name());
463,713
public final AttributedList<Path> list(final Path directory, final ListProgressListener listener) throws BackgroundException {<NEW_LINE>if ((!session.isSingleSite() && directory.isRoot()) || (session.isSingleSite() && session.isHome(directory))) {<NEW_LINE>return getRoot(directory, listener);<NEW_LINE>}<NEW_LINE>final ...
).list(directory, listener);
1,628,315
private void writeSummary() {<NEW_LINE>final File summaryFile = new File(dir, STRTableFile.SUMMARY_FILE_NAME);<NEW_LINE>try (final PrintWriter writer = new PrintWriter(new FileWriter(summaryFile))) {<NEW_LINE>writer.println("##########################################################################################");<N...
actualDecimation * 100) / 100.0));
1,417,763
protected void mapAnnotation(IRI n, Map<IRI, Collection<OWLAnnotation>> anns, Set<OWLAnnotation> nodeAnns, IRI p) {<NEW_LINE>OWLAnnotationProperty ap = df.getOWLAnnotationProperty(p);<NEW_LINE>IRI resVal = getResourceObject(n, p, true);<NEW_LINE>while (resVal != null) {<NEW_LINE>IRI annotation = getSubjectForAnnotatedP...
getSubjectForAnnotatedPropertyAndObject(n, p, litVal);
131,718
public final <X> P8<A, B, X, D, E, F, G, H> map3(final fj.F<C, X> f) {<NEW_LINE>return new P8<A, B, X, D, E, F, G, H>() {<NEW_LINE><NEW_LINE>public A _1() {<NEW_LINE>return P8.this._1();<NEW_LINE>}<NEW_LINE><NEW_LINE>public B _2() {<NEW_LINE>return P8.this._2();<NEW_LINE>}<NEW_LINE><NEW_LINE>public X _3() {<NEW_LINE>re...
return P8.this._8();
1,761,018
public JsonResult execute() throws InvalidHttpRequestBodyException, InvalidOperationException {<NEW_LINE>CourseCreateRequest courseCreateRequest = getAndValidateRequestBody(CourseCreateRequest.class);<NEW_LINE>String newCourseTimeZone = courseCreateRequest.getTimeZone();<NEW_LINE>String timeZoneErrorMessage = FieldVali...
newCourseId, userInfo.getId());
167,842
protected byte[] createKeyWithService(UUID universeUUID, UUID configUUID, EncryptionAtRestConfig config) {<NEW_LINE>final String algorithm = "AES";<NEW_LINE>final int keySize = 256;<NEW_LINE>final ObjectNode validateResult = validateEncryptionKeyParams(algorithm, keySize);<NEW_LINE>if (!validateResult.get("result").asB...
Util.buildURL(baseUrl, endpoint);
1,354,310
public void mouseDragged(final MouseEvent e) {<NEW_LINE>final NodeView nodeV = getNodeView(e);<NEW_LINE>if (!isDragActive()) {<NEW_LINE>if (!nodeV.isSelected())<NEW_LINE>super.mouseDragged(e);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if ((e.getModifiersEx() & InputEvent.BUTTON1_DOWN_MASK) == (InputEvent.BUTTON1_DOWN_MASK))...
NodeModel node = nodeV.getModel();
1,184,498
final TagResourceResult executeTagResource(TagResourceRequest tagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(tagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi...
(super.beforeMarshalling(tagResourceRequest));
207,419
private void checkThisAndSuperAsPropertyAccess(PropertyExpression expression) {<NEW_LINE>if (expression.isImplicitThis())<NEW_LINE>return;<NEW_LINE><MASK><NEW_LINE>if (prop == null)<NEW_LINE>return;<NEW_LINE>if (!prop.equals("this") && !prop.equals("super"))<NEW_LINE>return;<NEW_LINE>ClassNode type = expression.getObje...
String prop = expression.getPropertyAsString();
268,082
private STNode parseAnnotationDeclWithOptionalType(STNode metadata, STNode qualifier, STNode constKeyword, STNode annotationKeyword) {<NEW_LINE>// We come here if the type name also and identifier.<NEW_LINE>// However, if it is a qualified identifier, then it has to be the type-desc.<NEW_LINE>STNode typeDescOrAnnotTag ...
constKeyword, annotationKeyword, typeDesc, annotTag);
1,777,290
protected Map<Object, Object> createInstance() {<NEW_LINE>if (this.sourceMap == null) {<NEW_LINE>throw new IllegalArgumentException("'sourceMap' is required");<NEW_LINE>}<NEW_LINE>Map<Object, Object> result = null;<NEW_LINE>if (this.targetMapClass != null) {<NEW_LINE>result = BeanUtils.instantiateClass(this.targetMapCl...
result.putAll(this.sourceMap);
473,974
protected List<Select> query2Select(String table, Query query) {<NEW_LINE>// Build query<NEW_LINE>Selection selection = QueryBuilder.select();<NEW_LINE>// Set aggregate<NEW_LINE>Aggregate aggregate = query.aggregate();<NEW_LINE>if (aggregate != null) {<NEW_LINE>if (aggregate.countAll()) {<NEW_LINE>selection.countAll();...
LOG.debug("Query only by id(s): {}", ids);
875,897
static public void copyDir(File sourceDir, File targetDir) throws IOException {<NEW_LINE>if (sourceDir.equals(targetDir)) {<NEW_LINE>final String urDum = "source and target directories are identical";<NEW_LINE>throw new IllegalArgumentException(urDum);<NEW_LINE>}<NEW_LINE>targetDir.mkdirs();<NEW_LINE>String[] files = s...
(sourceDir, files[i]);
603,490
public SrcClass makeSrcClassStub(String fqn, JavaFileManager.Location location, DiagnosticListener<JavaFileObject> errorHandler) {<NEW_LINE>BasicJavacTask javacTask = /*location != null && JavacPlugin.instance() != null ? JavacPlugin.instance().getJavacTask() :*/<NEW_LINE>getJavacTask_PlainFileMgr();<NEW_LINE>Pair<Symb...
ClassSymbol classSymbol = pair.getFirst();
1,423,300
public static DataHighLevelShaderLanguageSymbolInternals parse32(AbstractPdb pdb, PdbByteReader reader) throws PdbException {<NEW_LINE>DataHighLevelShaderLanguageSymbolInternals32 result = new DataHighLevelShaderLanguageSymbolInternals32(pdb);<NEW_LINE>result.typeRecordNumber = RecordNumber.parse(pdb, <MASK><NEW_LINE>r...
reader, RecordCategory.TYPE, 32);
1,178,392
public static List<?> repeat(Iterable<?> iterable, long amount, boolean perItem) {<NEW_LINE>if (iterable == null)<NEW_LINE>return ImmutableList.of();<NEW_LINE>if (amount < 1)<NEW_LINE>return ImmutableList.of();<NEW_LINE>if (amount == 1)<NEW_LINE>return ImmutableList.copyOf(iterable);<NEW_LINE>if (perItem) {<NEW_LINE><M...
Iterator iterator = iterable.iterator();
545,940
private void jTextField1KeyReleased(java.awt.event.KeyEvent evt, int index) {<NEW_LINE>ResourceConfigData data = this.helper.getData();<NEW_LINE>String item = (String) ((JTextField) jFields[index]).getText();<NEW_LINE>String fieldName = fields[index].getName();<NEW_LINE>String val = data.getString(fieldName);<NEW_LINE>...
data.setString(fieldName, item);
244,903
private static String createCaseDataBaseName(String candidateDbName) {<NEW_LINE>String dbName;<NEW_LINE>if (!candidateDbName.isEmpty()) {<NEW_LINE>// NON-NLS<NEW_LINE>dbName = candidateDbName.replaceAll("[^\\p{ASCII}]", "_");<NEW_LINE>// NON-NLS<NEW_LINE>dbName = <MASK><NEW_LINE>// NON-NLS<NEW_LINE>dbName = dbName.repl...
dbName.replaceAll("[\\p{Cntrl}]", "_");
1,642,528
protected final InputOutput createInputOutput() {<NEW_LINE>if (GradleSettings.getDefault().isReuseOutputTabs()) {<NEW_LINE>synchronized (FREE_TABS) {<NEW_LINE>for (Map.Entry<InputOutput, AllContext<?>> entry : FREE_TABS.entrySet()) {<NEW_LINE>InputOutput free = entry.getKey();<NEW_LINE>AllContext<?> allContext = entry....
getIO(name, createNewTabActions());
484,255
protected void installStrings(JFileChooser fc) {<NEW_LINE>super.installStrings(fc);<NEW_LINE>Locale l = fc.getLocale();<NEW_LINE>lookInLabelMnemonic = UIManager.getInt("FileChooser.lookInLabelMnemonic");<NEW_LINE>lookInLabelText = UIManager.getString("FileChooser.lookInLabelText", l);<NEW_LINE>saveInLabelText = UIManag...
getMessage(DirectoryChooserUI.class, "TLTP_UpFolder");
1,455,816
public void initialize() throws IOException {<NEW_LINE>if (this.compliance == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>this.releaseInHex = Integer.toHexString(Integer.parseInt(this.compliance)).toUpperCase();<NEW_LINE>// $NON-NLS-1$ //$NON-NLS-2$<NEW_LINE>Path filePath = this.jdkHome.toPath().resolve("lib").resolve...
FileSystems.newFileSystem(uri, env);
553,126
protected static Mat createMat(BufferedImage img) {<NEW_LINE>if (img != null) {<NEW_LINE>Debug timer = Debug.startTimer("Mat create\t (%d x %d) from \n%s", img.getWidth(), img.getHeight(), img);<NEW_LINE>Mat mat_ref = new Mat(img.getHeight(), img.getWidth(), CvType.CV_8UC4);<NEW_LINE>timer.lap("init");<NEW_LINE>byte[] ...
mat, Imgproc.COLOR_RGBA2BGR, 3);
1,625,799
void predict(RatingPredictor pred, DataAccessObject dao, long user, List<Long> items, TableWriter outW) throws IOException {<NEW_LINE>logger.info("predicting {} items", items.size());<NEW_LINE>Stopwatch timer = Stopwatch.createStarted();<NEW_LINE>Map<Long, Double> preds = pred.predict(user, items);<NEW_LINE>System.<MAS...
out.format("predictions for user %d:%n", user);
420,610
public PullSchemaResp queryTimeSeriesSchema(PullSchemaRequest request) throws CheckConsistencyException, MetadataException {<NEW_LINE>// try to synchronize with the leader first in case that some schema logs are accepted but<NEW_LINE>// not committed yet<NEW_LINE>dataGroupMember.syncLeaderWithConsistencyCheck(false);<N...
DataOutputStream dataOutputStream = new DataOutputStream(byteArrayOutputStream);
715,763
public static QueryPlanIndexItemForge validateCompileExplicitIndex(String indexName, boolean unique, List<CreateIndexItem> columns, EventType eventType, StatementRawInfo statementRawInfo, StatementCompileTimeServices services) throws ExprValidationException {<NEW_LINE>List<IndexedPropDesc> hashProps = new ArrayList<Ind...
= new HashSet<String>();
191,562
private void initParametersAndDoExperiment() {<NEW_LINE>int[] numberOfSizesAndQueries = { 100000, 1000000, 10000000, 100000000 };<NEW_LINE>int maxSize = numberOfSizesAndQueries[numberOfSizesAndQueries.length - 1];<NEW_LINE>int[] randomIntKeys = new int[maxSize];<NEW_LINE>double[<MASK><NEW_LINE>int[] queriesInt = new in...
] randomDoubleKeys = new double[maxSize];
459,274
private void saveVisualComponent(RADVisualComponent component, StringBuffer buf, String indent) {<NEW_LINE><MASK><NEW_LINE>if (component.isInLayeredPane()) {<NEW_LINE>formModel.raiseVersionLevel(FormModel.FormVersion.NB74, FormModel.FormVersion.NB74);<NEW_LINE>formModel.setMaxVersionLevel(FormModel.LATEST_VERSION);<NEW...
saveComponent(component, buf, indent);
175,442
public String run(String[] args) throws Exception {<NEW_LINE>parseParameters(args);<NEW_LINE>// if the benchmark execute multiple tasks<NEW_LINE>if (mParameters.mWriteType.equals("ALL")) {<NEW_LINE>List<String> writeTypes = ImmutableList.of("MUST_CACHE", "CACHE_THROUGH", "ASYNC_THROUGH", "THROUGH");<NEW_LINE>System.out...
out.format("Now executing write type %s... %n", type);
789,378
public static double[] nextMVNormalWithCholesky(double[] mean, double[] precisionLowerTriangular, Randoms random) {<NEW_LINE>int n = mean.length;<NEW_LINE>// Initialize vector z to standard normals<NEW_LINE>// [NB: using the same array for z and x]<NEW_LINE>double[] result = new double[n];<NEW_LINE>for (int i = 0; i < ...
(n * j) + i];
812,570
private static ImmutableMap<Artifact, Artifact> generateTranslatedIdlArtifacts(RuleContext ruleContext, Collection<Artifact> idls) {<NEW_LINE>ImmutableMap.Builder<Artifact, Artifact<MASK><NEW_LINE>String ruleName = ruleContext.getRule().getName();<NEW_LINE>// for each aidl file use aggregated preprocessed files to gene...
> outputJavaSources = ImmutableMap.builder();
1,620,867
public void updateE(ClusterFeature cf, double wei) {<NEW_LINE>assert cf.getDimensionality() == mean.length;<NEW_LINE>assert wei >= 0 && wei < Double.POSITIVE_INFINITY : wei;<NEW_LINE>if (wei < Double.MIN_NORMAL) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final int dim = mean.length;<NEW_LINE>final double nwsum = wsum + wei...
cf.covariance(), wei);
109,607
private static Layer3VniConfig create(@Nullable @JsonProperty(PROP_VNI) Integer vni, @Nullable @JsonProperty(PROP_VRF) String vrf, @Nullable @JsonProperty(PROP_ROUTE_DISTINGUISHER) RouteDistinguisher rd, @Nullable @JsonProperty(PROP_ROUTE_TARGET) ExtendedCommunity routeTarget, @Nullable @JsonProperty(PROP_IMPORT_ROUTE_...
importRouteTarget != null, "Missing %s", PROP_ROUTE_TARGET);
759,450
public void handleMessage(final Message msg) {<NEW_LINE>final LatinIME latinIme = getOwnerInstance();<NEW_LINE>if (latinIme == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final KeyboardSwitcher switcher = latinIme.mKeyboardSwitcher;<NEW_LINE>switch(msg.what) {<NEW_LINE>case MSG_UPDATE_SHIFT_STATE:<NEW_LINE>switcher.re...
Log.i(TAG, "Timeout waiting for dictionary load");
41,994
public void actionPerformed(ActionEvent e) {<NEW_LINE>log.info(Markers.USER_MARKER, "Splitting " + component.getComponentName() + " into separate fins, fin count=" + ((FinSet) component).getFinCount());<NEW_LINE>// Do change in future for overall safety<NEW_LINE>SwingUtilities.invokeLater(new Runnable() {<NEW_LINE><NEW...
index = parent.getChildPosition(component);
1,729,101
public void doFilter(ServletRequest req, ServletResponse res, FilterChain fc) throws IOException, ServletException {<NEW_LINE>HttpServletRequest request = (HttpServletRequest) req;<NEW_LINE>// Get the IP address of client machine.<NEW_LINE><MASK><NEW_LINE>// Log the IP address and current timestamp.<NEW_LINE>LOG.info("...
String ipAddress = request.getRemoteAddr();
1,128,950
private boolean visitRule(RenderingRule rule, boolean loadOutput) {<NEW_LINE>boolean input = checkInputProperties(rule);<NEW_LINE>if (!input) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (!loadOutput && !rule.isGroup()) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>// accept it<NEW_LINE>if (!rule.isGroup()) {<NEW_LINE...
|| !rule.isGroup());
614,855
final DeleteRouteResult executeDeleteRoute(DeleteRouteRequest deleteRouteRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteRouteRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<DeleteRouteRequest> reques...
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
1,440,969
public void gotData(String k, int flags, byte[] data) {<NEW_LINE>if (isWrongKeyReturned(key, k))<NEW_LINE>return;<NEW_LINE>if (log.isDebugEnabled() && client.getPool().getEVCacheClientPoolManager().shouldLog(appName))<NEW_LINE>log.debug("Read data : key " + key + "; flags : " + flags + "; data : " + data);<NEW_LINE>if ...
debug("Key : " + key + "; val is null");
1,252,533
public void startup() {<NEW_LINE>if (!enabled)<NEW_LINE>return;<NEW_LINE>if (serverInstance.getDatabases() instanceof OrientDBDistributed)<NEW_LINE>((OrientDBDistributed) serverInstance.getDatabases()).setPlugin(this);<NEW_LINE>OGlobalConfiguration.STORAGE_TRACK_CHANGED_RECORDS_IN_WAL.setValue(true);<NEW_LINE>// REGIST...
this::dumpStats, statsDelay, statsDelay);
565,907
private static void addPipeUpgradeRecipe(ItemPipeHolder from, ItemPipeHolder to, Object additional) {<NEW_LINE>if (from == null || to == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (additional == null) {<NEW_LINE>throw new NullPointerException("additional");<NEW_LINE>}<NEW_LINE>IRecipe returnRecipe = new ShapelessO...
> list = NonNullList.create();
413,134
public void actionPerformed(ActionEvent e) {<NEW_LINE>JMenuItem tt = (JMenuItem) e.getSource();<NEW_LINE>try {<NEW_LINE>GV.appFrame.openSheetFile(tt.getText());<NEW_LINE>} catch (Throwable t) {<NEW_LINE>GM.showException(t);<NEW_LINE>if (StringUtils.isValidString(tt.getText())) {<NEW_LINE>File f = new File(tt.getText())...
- 1].addActionListener(this);
1,069,073
public static void rotateCW(GrayF64 image) {<NEW_LINE>if (image.width != image.height)<NEW_LINE>throw new IllegalArgumentException("Image must be square");<NEW_LINE>int w = image.height / 2 + image.height % 2;<NEW_LINE>int h = image.height / 2;<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(0, h, y0->{<NEW_LINE>f...
[index0] = (double) tmp3;
420,175
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, String[] args) {<NEW_LINE>if (args.length == 1) {<NEW_LINE>final McMMOPlayer mcMMOPlayer = UserManager.getPlayer((Player) sender);<NEW_LINE>if (mcMMOPlayer == null) {<NEW_LINE>sender.sendMessage(LocaleLoader.getStri...
String partyName = playerParty.getName();
1,804,099
public DataRecord deserialize(final DataInput source, @NonNegative final long recordID, final SirixDeweyID deweyID, final PageReadOnlyTrx pageReadTrx) throws IOException {<NEW_LINE>final BigInteger <MASK><NEW_LINE>// Node delegate.<NEW_LINE>final NodeDelegate nodeDel = deserializeNodeDelegate(source, recordID, deweyID,...
hashCode = getHash(source, pageReadTrx);
1,837,902
protected int addToSlot(IInvSlot slot, ItemStack stack, int injected, boolean doAdd) {<NEW_LINE><MASK><NEW_LINE>int max = Math.min(stack.getMaxStackSize(), inventory.getInventoryStackLimit());<NEW_LINE>ItemStack stackInSlot = slot.getStackInSlot();<NEW_LINE>if (stackInSlot == null) {<NEW_LINE>int wanted = Math.min(avai...
int available = stack.stackSize - injected;
1,285,854
private void writeToFile(StringBuffer sb, String fileName) {<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>// not created if it exists<NEW_LINE>if (out.exists())<NEW_LINE>return;<NEW_LINE>Writer fw = new OutputStreamWriter(new FileOutputStream(out, false), "UTF-8");<NEW_LINE>for (int i = 0; i < sb.length(); i++) {<NEW_LINE>c...
File out = new File(fileName);
1,367,050
@Consumes(MediaType.APPLICATION_JSON)<NEW_LINE>@Produces(MediaType.APPLICATION_JSON)<NEW_LINE>@ApiOperation(value = "Creates a new policy condition", response = PolicyCondition.class, code = 201)<NEW_LINE>@ApiResponses(value = { @ApiResponse(code = 401, message = "Unauthorized"), @ApiResponse(code = 404, message = "The...
entity(pc).build();
1,685,439
public boolean addRequiredModules(String originalPathType, FileObject projectArtifact, Collection<URL> moduleNames) throws IOException {<NEW_LINE>assert projectArtifact != null;<NEW_LINE>assert originalPathType != null;<NEW_LINE>Project p = FileOwnerQuery.getOwner(projectArtifact);<NEW_LINE>if (p == null) {<NEW_LINE>re...
addRequiredModules(originalPathType, projectArtifact, moduleNames);
1,286,533
public Mono<TopicDTO> recreateTopic(KafkaCluster cluster, String topicName) {<NEW_LINE>return loadTopic(cluster, topicName).flatMap(t -> deleteTopic(cluster, topicName).thenReturn(t).delayElement(Duration.ofSeconds(recreateDelayInSeconds)).flatMap(topic -> adminClientService.get(cluster).flatMap(ac -> ac.createTopic(to...
map(clusterMapper::toTopic)));
1,258,104
public ListenerResult listen(WorkflowContext context) throws Exception {<NEW_LINE>StreamResourceProcessForm form = (StreamResourceProcessForm) context.getProcessForm();<NEW_LINE>InlongStreamInfo streamInfo = form.getStreamInfo();<NEW_LINE>final String operator = context.getOperator();<NEW_LINE>final GroupOperateType op...
RESTARTING.getCode(), operator);
1,493,147
public void fileDataCreated(final FileEvent fe) {<NEW_LINE>RP.post(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>FileObject fo = fe.getFile();<NEW_LINE>boolean accepted = acceptEvent(fo);<NEW_LINE>if (!accepted) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (DEBUG) {<NEW_LINE>Debug.log...
+ "]: " + files[i]);
279,265
final ListReportsForReportGroupResult executeListReportsForReportGroup(ListReportsForReportGroupRequest listReportsForReportGroupRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listReportsForReportGroupRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequest...
addHandlerContext(HandlerContextKey.SERVICE_ID, "CodeBuild");
778,372
private void configure() {<NEW_LINE>final LogManager manager = LogManager.getLogManager();<NEW_LINE>final String className = this.getClass().getName();<NEW_LINE>final String level = <MASK><NEW_LINE>this.setLevel((level == null) ? Level.INFO : Level.parse(level));<NEW_LINE>final Level levelStdOut = this.parseLevel(manag...
manager.getProperty(className + ".level");
1,741,090
public void execute(final OfficeTask task) throws OfficeException {<NEW_LINE>Future<?> futureTask = taskExecutor.submit(new Runnable() {<NEW_LINE><NEW_LINE>public void run() {<NEW_LINE>if (settings.getMaxTasksPerProcess() > 0 && ++taskCount == settings.getMaxTasksPerProcess() + 1) {<NEW_LINE>logger.info(String.format("...
execute(managedOfficeProcess.getConnection());
675,368
private String replacePathMacroRecursively(String text, final String path, boolean caseSensitive) {<NEW_LINE>if (text.length() < path.length()) {<NEW_LINE>return text;<NEW_LINE>}<NEW_LINE>if (path.isEmpty())<NEW_LINE>return text;<NEW_LINE>final StringBuilder newText = new StringBuilder();<NEW_LINE>final boolean isWindo...
(text.substring(i));
1,384,205
private <R extends IBaseResource> R populateResourceMetadataRi(Class<R> theResourceType, IBaseResourceEntity theEntity, @Nullable Collection<? extends BaseTag> theTagList, boolean theForHistoryOperation, IAnyResource res, Long theVersion) {<NEW_LINE>R retVal = (R) res;<NEW_LINE>if (theEntity.getDeleted() != null) {<NEW...
.getProfile().clear();
559,682
private static void createOperandExpression(final SQLProvider provider, final INaviOperandTreeNode node, final int parent) throws SQLException {<NEW_LINE>if (node.getId() != -1) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final ExpressionType type = node.getType();<NEW_LINE>final String value = getValue(type, node.getValue(...
getConnection().prepareStatement(query);
259,603
public void showPurchaseOrderOfProduct(ActionRequest request, ActionResponse response) {<NEW_LINE>Map<String, Long> mapId = Beans.get(ProjectedStockService.class).getProductIdCompanyIdStockLocationIdFromContext(request.getContext());<NEW_LINE>if (mapId == null || mapId.get("productId") == 0L) {<NEW_LINE>return;<NEW_LIN...
stockLocationId = mapId.get("stockLocationId");
271,025
private static void upsert() {<NEW_LINE>Map<Integer, ParameterContext> params = new HashMap<>();<NEW_LINE>int i = 1;<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append("insert into " + FEATURE_USAGE_STATISTICS_TABLE + " (name, val) values");<NEW_LINE>for (Map.Entry<String, AtomicLong> cacheItem : CACHE...
"Failed to query the system table '" + FEATURE_USAGE_STATISTICS_TABLE + "'", e);
1,567,082
private void sendSPSandPPS(MediaFormat mediaFormat) {<NEW_LINE>// H265<NEW_LINE>if (type.equals(CodecUtil.H265_MIME)) {<NEW_LINE>List<ByteBuffer> byteBufferList = extractVpsSpsPpsFromH265<MASK><NEW_LINE>oldSps = byteBufferList.get(1);<NEW_LINE>oldPps = byteBufferList.get(2);<NEW_LINE>oldVps = byteBufferList.get(0);<NEW...
(mediaFormat.getByteBuffer("csd-0"));
301,937
private ReentrantCycleDetectingLock<?> addAllLockIdsAfter(Thread thread, ReentrantCycleDetectingLock<?> lock, ListMultimap<Thread, ID> potentialLocksCycle) {<NEW_LINE>boolean found = false;<NEW_LINE>Collection<ReentrantCycleDetectingLock<?>> <MASK><NEW_LINE>Preconditions.checkNotNull(ownedLocks, "Internal error: No loc...
ownedLocks = locksOwnedByThread.get(thread);
893,939
public void truncateOffset(long offset) {<NEW_LINE>Object[] mfs = this.copyMappedFiles();<NEW_LINE>if (mfs == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>List<MmapFile> willRemoveFiles = new ArrayList<MmapFile>();<NEW_LINE>for (int i = 0; i < mfs.length; i++) {<NEW_LINE>MmapFile file = (MmapFile) mfs[i];<NEW_LINE>long...
.getFileFromOffset() + this.mappedFileSize;
622,465
public static PaymentAccount fromProto(protobuf.PaymentAccount proto, CoreProtoResolver coreProtoResolver) {<NEW_LINE>String paymentMethodId = proto.getPaymentMethod().getId();<NEW_LINE>List<TradeCurrency> tradeCurrencies = proto.getTradeCurrenciesList().stream().map(TradeCurrency::fromProto).collect(Collectors.toList(...
getTradeCurrencies().addAll(tradeCurrencies);
182,722
public void visitType(JavacNode typeNode, JCClassDecl type) {<NEW_LINE>AnnotationValues<FieldDefaults> fieldDefaults = null;<NEW_LINE>JavacNode source = typeNode;<NEW_LINE>boolean levelIsExplicit = false;<NEW_LINE>boolean makeFinalIsExplicit = false;<NEW_LINE>FieldDefaults fd = null;<NEW_LINE>for (JavacNode jn : typeNo...
: defaultToPrivate ? AccessLevel.PRIVATE : null;
690,023
public static Query<Collection<ActivityIndex>> activityIndexForNewPlayers(long after, long before, Long threshold) {<NEW_LINE>String selectNewUUIDs = SELECT + UsersTable.USER_UUID + FROM + UsersTable.TABLE_NAME + WHERE + UsersTable.REGISTERED + "<=?" + AND + UsersTable.REGISTERED + ">=?";<NEW_LINE>String sql = SELECT +...
statement, 3, threshold, before);
934,752
protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_chromecast_example);<NEW_LINE>youTubePlayerView = findViewById(R.id.youtube_player_view);<NEW_LINE>mediaRouteButtonRoot = findViewById(R.id.media_route_button_root);<NEW_LINE>chrom...
this, googlePlayServicesAvailabilityRequestCode, this::initChromeCast);
1,095,820
private static void try_load_from_jar() throws IOException {<NEW_LINE>// create temp directory<NEW_LINE>Path tempDirectory = Files.createTempDirectory("tmplibvw");<NEW_LINE>tempDirectory.toFile().deleteOnExit();<NEW_LINE>// Extract library and dependencies<NEW_LINE>File jarFile = new File(Native.class.getProtectionDoma...
getLocation().getPath());
752,021
final CreateRecommenderConfigurationResult executeCreateRecommenderConfiguration(CreateRecommenderConfigurationRequest createRecommenderConfigurationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createRecommenderConfigurationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = execu...
endClientExecution(awsRequestMetrics, request, response);
225,380
public void onClick(View v) {<NEW_LINE>switch(v.getId()) {<NEW_LINE>case R.id.IV_main_setting_add_topic:<NEW_LINE>TopicDetailDialogFragment createTopicDialogFragment = TopicDetailDialogFragment.newInstance(false, -1, -1, "", -1, Color.BLACK);<NEW_LINE>createTopicDialogFragment.show(getFragmentManager(), "createTopicDia...
getActivity().startActivity(backupIntent);
289,432
protected AssemblyResolution solveLeftCircularShift(PatternExpression expValue, PatternExpression expShift, int size, int dir, MaskedLong goal, Map<String, Long> vals, AssemblyResolvedPatterns cur, Set<SolverHint> hints, String description) throws NeedsBackfillException, SolverException {<NEW_LINE>MaskedLong valValue =...
vals, cur, hints, description);
151,584
public static DescribePreCheckProgressListResponse unmarshall(DescribePreCheckProgressListResponse describePreCheckProgressListResponse, UnmarshallerContext _ctx) {<NEW_LINE>describePreCheckProgressListResponse.setRequestId(_ctx.stringValue("DescribePreCheckProgressListResponse.RequestId"));<NEW_LINE>describePreCheckPr...
(_ctx.integerValue("DescribePreCheckProgressListResponse.HttpStatusCode"));
950,545
// Returns as iterator to traverse the tree in order<NEW_LINE>private java.util.Iterator<T> inOrderTraversal() {<NEW_LINE>final int expectedNodeCount = nodeCount;<NEW_LINE>final java.util.Stack<Node> stack = new java.util.Stack<>();<NEW_LINE>stack.push(root);<NEW_LINE>return new java.util.Iterator<T>() {<NEW_LINE><NEW_...
null && !stack.isEmpty();
1,347,164
VirtualMachineScaleSetMsiHandler withoutLocalManagedServiceIdentity() {<NEW_LINE>if (this.scaleSet.innerModel().identity() == null || this.scaleSet.innerModel().identity().type() == null || this.scaleSet.innerModel().identity().type().equals(ResourceIdentityType.NONE) || this.scaleSet.innerModel().identity().type().equ...
).withType(ResourceIdentityType.USER_ASSIGNED);
350,428
private boolean verifyMagicChecksumAndDecryptPage(final ByteBuffer buffer, final int intId, final long pageIndex) {<NEW_LINE>assert buffer.order<MASK><NEW_LINE>buffer.position(MAGIC_NUMBER_OFFSET);<NEW_LINE>final long magicNumber = OLongSerializer.INSTANCE.deserializeFromByteBufferObject(buffer);<NEW_LINE>if ((aesKey =...
() == ByteOrder.nativeOrder();
1,459,321
public static DescribeLoghubDetailResponse unmarshall(DescribeLoghubDetailResponse describeLoghubDetailResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeLoghubDetailResponse.setRequestId(_ctx.stringValue("DescribeLoghubDetailResponse.RequestId"));<NEW_LINE>LoghubInfo loghubInfo = new LoghubInfo();<NEW_LINE>loghubI...
(_ctx.stringValue("DescribeLoghubDetailResponse.LoghubInfo.AccessKey"));
1,278,241
private Bootstrap newBootstrap(ChannelFactory<? extends Channel> channelFactory, EventLoopGroup eventLoopGroup, AsyncHttpClientConfig config) {<NEW_LINE>@SuppressWarnings("deprecation")<NEW_LINE>Bootstrap bootstrap = new Bootstrap().channelFactory(channelFactory).group(eventLoopGroup).option(ChannelOption.ALLOCATOR, co...
SO_RCVBUF, config.getSoRcvBuf());
1,692,004
public int session_read_data(String connected_device_name, byte[] buf, int max_length) {<NEW_LINE>if (!mBluetoothIsEnabled)<NEW_LINE>return 0;<NEW_LINE>RhoBluetoothManager.logi(TAG, "session_read_data()");<NEW_LINE>if ((buf == null) || (max_length == 0)) {<NEW_LINE>return mInputBufferSize;<NEW_LINE>}<NEW_LINE>int real_...
[i] = mInputBuffer[i];
1,352,471
private void calculateFutureDateFlags(final PwmRequest pwmRequest, final GuestRegistrationBean guestRegistrationBean) {<NEW_LINE>final PwmDateFormat dateFormat = MiscUtil.newPwmDateFormat("yyyy-MM-dd");<NEW_LINE>final long maxValidDays = pwmRequest.getDomainConfig().readSettingAsLong(PwmSetting.GUEST_MAX_VALID_DAYS);<N...
format(Instant.now());
734,253
private Map<String, List<String>> freshMap() throws IOException {<NEW_LINE>final String body = new RqPrint(this.req).printBody();<NEW_LINE>final Map<String, List<String>> map = new HashMap<>(1);<NEW_LINE>// @checkstyle MultipleStringLiteralsCheck (1 line)<NEW_LINE>for (final String pair : body.split("&")) {<NEW_LINE>if...
, new LinkedList<>());
1,830,668
protected Response handleLogoutResponse(SAMLDocumentHolder holder, StatusResponseType responseType, String relayState) {<NEW_LINE>if (relayState == null) {<NEW_LINE>logger.error("no valid user session");<NEW_LINE>event.event(EventType.LOGOUT);<NEW_LINE>event.error(Errors.USER_SESSION_NOT_FOUND);<NEW_LINE>return ErrorPa...
event.event(EventType.LOGOUT);
1,140,102
private void processMouseClickInLayout(RADComponent metacomp, MouseEvent e) {<NEW_LINE>if (formDesigner.getMenuEditLayer().isVisible()) {<NEW_LINE>if (!formDesigner.getMenuEditLayer().isMenuLayerComponent(metacomp)) {<NEW_LINE>formDesigner.getMenuEditLayer().hideMenuLayer();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (metacomp ...
getLayoutDesigner().getToolTipText(p);
1,805,091
public void execute() throws BuildException {<NEW_LINE>if (url != null ^ file == null)<NEW_LINE>throw new BuildException("You must define the url or file attributes", getLocation());<NEW_LINE>if (url == null) {<NEW_LINE>url = file<MASK><NEW_LINE>}<NEW_LINE>log("Browsing: " + url);<NEW_LINE>try {<NEW_LINE>URL u = new UR...
.toURI().toString();
96,590
public InteractionResultHolder<ItemStack> use(Level worldIn, Player playerIn, @NotNull InteractionHand handIn) {<NEW_LINE>ItemStack itemstack = playerIn.getItemInHand(handIn);<NEW_LINE>if (!worldIn.isClientSide) {<NEW_LINE>ThrownEnderpearl enderpearlentity = new ThrownEnderpearl(worldIn, playerIn);<NEW_LINE>enderpearle...
.bridge$getBukkitEntity().updateInventory();
743,293
protected StateMachineConfig<S, E> performBuild() throws Exception {<NEW_LINE>// TODO: should prevent calling state/transition builder if model is given<NEW_LINE>StateMachineModelBuilder<?, ?> modelBuilder = getSharedObject(StateMachineModelBuilder.class);<NEW_LINE>StateMachineConfigurationBuilder<?, ?> configurationBu...
transitionBuilder = getSharedObject(StateMachineTransitionBuilder.class);
1,626,096
public <E extends Exception & QueryExceptionMarkerInterface> void findTargetsBeneathDirectory(RepositoryName repository, String originalPattern, String directory, boolean rulesOnly, ImmutableSet<PathFragment> repositoryIgnoredSubdirectories, ImmutableSet<PathFragment> excludedSubdirectories, BatchCallback<Void, E> call...
? FilteringPolicies.RULES_ONLY : FilteringPolicies.NO_FILTER;
255,068
// / Create an enumeration data type.<NEW_LINE>public <T extends Sort> void enumExampleTyped(Context ctx) throws TestFailedException {<NEW_LINE>System.out.println("EnumExample");<NEW_LINE>Log.append("EnumExample");<NEW_LINE>Symbol name = ctx.mkSymbol("fruit");<NEW_LINE>EnumSort<T> fruit = ctx.mkEnumSort(name, ctx.mkSym...
fruit.getConsts()[0];
294,831
public void filterWrite(NextFilter nextFilter, IoSession session, WriteRequest request) throws Exception {<NEW_LINE>log.trace("filterWrite nextFilter: {} session: {} request: {}", nextFilter, session, request);<NEW_LINE>Cipher cipher = (Cipher) session.getAttribute(RTMPConnection.RTMPE_CIPHER_OUT);<NEW_LINE>if (cipher ...
new EncryptedWriteRequest(request, messageEncrypted));
34,521
final ListEventSourcesResult executeListEventSources(ListEventSourcesRequest listEventSourcesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listEventSourcesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv...
HandlerContextKey.SIGNING_REGION, getSigningRegion());
535,823
// todo: remove/move this, we no longer support xml access like this<NEW_LINE>private void generateXMLAccess(BLangXMLAccessExpr xmlAccessExpr, BIROperand tempVarRef, BIROperand varRefRegIndex, BIROperand keyRegIndex) {<NEW_LINE>this.env.targetOperand = tempVarRef;<NEW_LINE>InstructionKind insKind;<NEW_LINE>if (xmlAcces...
, tempVarRef, keyRegIndex, varRefRegIndex));
880,060
public void visitModuleDeclaration(ModuleDeclaration moduleDeclaration) {<NEW_LINE>logger.trace("PRINT " + moduleDeclaration.getName());<NEW_LINE>currentModuleName = getCurrentModuleName();<NEW_LINE>String dependenciesNamesString = null;<NEW_LINE>if (context.libModules.contains(currentModuleName)) {<NEW_LINE>List<Strin...
.get(i) + "\"");