idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
294,891
void activatePartContexts(IWorkbenchPart part) {<NEW_LINE>IContextService contextService = PlatformUI.getWorkbench().getService(IContextService.class);<NEW_LINE>if (contextService == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>contextService.deferUpdates(true);<NEW_LINE>// if (part instanceof INavigator...
ConnectionCommands.CMD_TOGGLE_AUTOCOMMIT, SQLEditorCommands.CMD_TOGGLE_SEPARATE_CONNECTION);
1,086,614
protected void exportColumn(FacesContext context, T table, UIColumn column, List<UIComponent> components, boolean joinComponents, Consumer<String> callback) {<NEW_LINE>if (column.getExportValue() != null) {<NEW_LINE>callback.<MASK><NEW_LINE>} else if (column.getExportFunction() != null) {<NEW_LINE>MethodExpression expo...
accept(column.getExportValue());
1,108,332
public void exportItems(@PathVariable String appId, @PathVariable String env, @PathVariable String clusterName, @PathVariable String namespaceName, HttpServletResponse res) {<NEW_LINE>List<String> fileNameSplit = Splitter.on(".").splitToList(namespaceName);<NEW_LINE>String fileName = namespaceName;<NEW_LINE>// properti...
configFileContent = NamespaceBOUtils.convert2configFileContent(namespaceBO);
469,798
/*<NEW_LINE>TODO partial implementation supporting WRAPPER_OBJECT with JsonTypeInfo.Id.CLASS and JsonTypeInfo.Id.NAME<NEW_LINE><NEW_LINE>Also note that JsonTypeInfo on interfaces are not considered as multiple interfaces might have conflicting<NEW_LINE>annotations, although Jackson seems to apply them if present on an ...
wrapperSchema.addProperties(name, model);
1,326,077
static // /CLOVER:OFF<NEW_LINE>void printNode(RBBINode n) {<NEW_LINE>if (n == null) {<NEW_LINE>System.out.print(" -- null --\n");<NEW_LINE>} else {<NEW_LINE>RBBINode.printInt(n.fSerialNum, 10);<NEW_LINE>RBBINode.printString(nodeTypeNames[n.fType], 11);<NEW_LINE>RBBINode.printInt(n.fParent == null ? 0 : n.fParent.fSeria...
printInt(n.fVal, 7);
225,318
private void multiPartUpload(File source, Map<String, String> configValues, RetryPolicy retryPolicy, Throttle throttle, String key) throws Exception {<NEW_LINE>InitiateMultipartUploadRequest initRequest = new InitiateMultipartUploadRequest(configValues.get(CONFIG_BUCKET.getKey()), key);<NEW_LINE>InitiateMultipartUpload...
bytesRead = in.read(buffer);
954,049
public void finish() {<NEW_LINE>if (this.fieldAdders != null) {<NEW_LINE>for (FieldAdder fieldAdder : this.fieldAdders) {<NEW_LINE>fieldAdder.generateField(this.classWriter, this);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (this.clinitAdders != null) {<NEW_LINE>MethodVisitor mv = this.classWriter.visitMethod(ACC_PUBLIC | ACC_S...
"<clinit>", "()V", null, null);
1,283,592
static String encodeValue(Object value) throws IOException {<NEW_LINE>ByteArrayOutputStream bos = new ByteArrayOutputStream();<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>oos.writeObject(value);<NEW_LINE>oos.close();<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw (IOException) ExternalUtil.copyAnnotation(new IOException()...
ObjectOutputStream oos = new ObjectOutputStream(bos);
768,853
public static void register(Lang lang) {<NEW_LINE>if (lang == null)<NEW_LINE>throw new IllegalArgumentException("null for language");<NEW_LINE>// Expel previous registration.<NEW_LINE>if (isMimeTypeRegistered(lang)) {<NEW_LINE>// Find previous registration (uses primary MIME type).<NEW_LINE>Lang prev = contentTypeToLan...
.getLabel()), lang);
967,619
public void serialize(ColumnDef def, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException {<NEW_LINE>jgen.writeStartObject();<NEW_LINE>jgen.writeStringField("type", def.getType());<NEW_LINE>jgen.writeStringField("name", def.getName());<NEW_LINE>if (def instanceof StringColumnDef)...
)) jgen.writeString(s);
166,718
public SamlServiceProvider deserialize(JsonParser jp, DeserializationContext ctxt) {<NEW_LINE>SamlServiceProvider result = new SamlServiceProvider();<NEW_LINE>// determine the type of IdentityProvider<NEW_LINE>JsonNode node = JsonUtils.readTree(jp);<NEW_LINE>// deserialize based on type<NEW_LINE>String config = getNode...
(node, FIELD_ENTITY_ID, null));
1,111,538
private JComboBox createComboBox(DataItem item, Font font, FocusListener listener) {<NEW_LINE>List<ItemVariant> variants = item.getVariants();<NEW_LINE>JComboBox combo = new JComboBox(variants.toArray());<NEW_LINE>combo.setSelectedItem(item.getDefaultVariant());<NEW_LINE>// NOI18N<NEW_LINE>combo.getAccessibleContext()....
combo.getInputMap(JComboBox.WHEN_FOCUSED);
391,879
public void initIpTable(InputStream ipFile) {<NEW_LINE>BufferedReader reader = null;<NEW_LINE>try {<NEW_LINE>reader = new <MASK><NEW_LINE>int size = Integer.parseInt(reader.readLine());<NEW_LINE>String line;<NEW_LINE>String[] strs;<NEW_LINE>m_starts = new long[size];<NEW_LINE>m_ends = new long[size];<NEW_LINE>m_areaIds...
BufferedReader(new InputStreamReader(ipFile));
1,401,695
private ArgumentBuilder buildArgs(StringToStringMap values, WsdlInterface modelItem) {<NEW_LINE>values.put(OUTPUT, Tools.ensureDir(values.get(OUTPUT), ""));<NEW_LINE>ArgumentBuilder builder = new ArgumentBuilder(values);<NEW_LINE>builder.startScript(WSDL2JAVA_SCRIPT_NAME);<NEW_LINE>builder.addArgs("-uri", getWsdlUrl(va...
builder.addString(DATABINDING, "-d");
1,628,953
public void validateIDTokenPayload(JSONObject tokenInfo, TestSettings settings, String testSigAlg) throws Exception {<NEW_LINE>String thisMethod = "validateIDTokenPayload";<NEW_LINE>msgUtils.printMethodName(thisMethod, "Start of");<NEW_LINE>ArrayList<String> shouldntExistKeys = new ArrayList<String>();<NEW_LINE>// make...
requiredKeys.add(Constants.IDTOK_AT_HASH_KEY);
1,151,635
protected void doPost(HttpServletRequest request, HttpServletResponse response) {<NEW_LINE>try {<NEW_LINE>String contract = request.getReader().lines().collect(Collectors.joining(System.lineSeparator()));<NEW_LINE>Util.checkBodySize(contract);<NEW_LINE>JSONObject input = JSONObject.parseObject(contract);<NEW_LINE>boole...
getWriter().println("{}");
708,407
final CopyImageResult executeCopyImage(CopyImageRequest copyImageRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(copyImageRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CopyImageRequest> request = null;<NEW_LINE>Response<CopyImag...
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
1,330,930
final DescribeChannelMembershipResult executeDescribeChannelMembership(DescribeChannelMembershipRequest describeChannelMembershipRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeChannelMembershipRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequest...
addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeChannelMembership");
256,586
private void optimizeJsLoop(Collection<JsNode> toInline) throws InterruptedException {<NEW_LINE>int optimizationLevel = options.getOptimizationLevel();<NEW_LINE>List<OptimizerStats> allOptimizerStats = Lists.newArrayList();<NEW_LINE>int counter = 0;<NEW_LINE>while (true) {<NEW_LINE>counter++;<NEW_LINE>if (Thread.interr...
= new OptimizerStats("Pass " + counter);
841,971
final ListAccountAliasesResult executeListAccountAliases(ListAccountAliasesRequest listAccountAliasesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listAccountAliasesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetri...
addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
109,880
public static void pushOntoStack(OperationResourceInfo ori, MultivaluedMap<String, String> params, Message msg) {<NEW_LINE>OperationResourceInfoStack stack = msg.get(OperationResourceInfoStack.class);<NEW_LINE>if (stack == null) {<NEW_LINE>stack = new OperationResourceInfoStack();<NEW_LINE>msg.put(OperationResourceInfo...
params.size() - 1);
1,464,132
final CreateRuleResult executeCreateRule(CreateRuleRequest createRuleRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createRuleRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateRuleRequest> request = null;<NEW_LINE>Response<Cr...
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
1,644,922
private TorrentDetails torrentDetails(Log log, String torrentId) throws DaemonException {<NEW_LINE>List<String> trackers = new ArrayList<>();<NEW_LINE>List<String> <MASK><NEW_LINE>try {<NEW_LINE>JSONObject jsonTorrent = authGet(log, "SYNO.DownloadStation.Task", "1", "DownloadStation/task.cgi", "&method=getinfo&id=" + t...
errors = new ArrayList<>();
739,700
public void handle(AnnotationValues<ToString> annotation, Annotation ast, EclipseNode annotationNode) {<NEW_LINE>handleFlagUsage(annotationNode, ConfigurationKeys.TO_STRING_FLAG_USAGE, "@ToString");<NEW_LINE>ToString ann = annotation.getInstance();<NEW_LINE>boolean onlyExplicitlyIncluded = annotationNode.getAst().getBo...
Boolean callSuper = ann.callSuper();
1,834,353
public GroundStationData unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>GroundStationData groundStationData = new GroundStationData();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurr...
String currentParentElement = context.getCurrentParentElement();
1,754,528
private void rotateDate() {<NEW_LINE>this.startDate = System.currentTimeMillis();<NEW_LINE>if (handler != null) {<NEW_LINE>handler.close();<NEW_LINE>}<NEW_LINE>SimpleDateFormat format = dateFormatThreadLocal.get();<NEW_LINE>String newPattern = pattern.replace("%d", format.format(new Date()));<NEW_LINE>// Get current da...
set(Calendar.MILLISECOND, 0);
67,104
private void createPackageDeclaration(ModuleNode moduleNode) {<NEW_LINE>if (moduleNode.hasPackageName()) {<NEW_LINE>String packageName = moduleNode.getPackageName();<NEW_LINE>if (packageName.endsWith(".")) {<NEW_LINE>packageName = packageName.substring(0, packageName.length() - 1);<NEW_LINE>}<NEW_LINE>PackageNode packa...
positions, true, Flags.AccDefault);
953,518
public static <T extends Model> List<T> processCursor(Class<? extends Model> type, Cursor cursor) {<NEW_LINE>TableInfo tableInfo = Cache.getTableInfo(type);<NEW_LINE>String idName = tableInfo.getIdName();<NEW_LINE>final List<T> entities = new ArrayList<T>();<NEW_LINE>try {<NEW_LINE>Constructor<?> entityConstructor = ty...
columnsOrdered.indexOf(idName)));
1,022,574
public Expr apply(final List<Expr> args) {<NEW_LINE>if (args.size() != 2) {<NEW_LINE>throw new IAE(ExprUtils.createErrMsg(name(), "must have 2 arguments"));<NEW_LINE>}<NEW_LINE>SubnetUtils.SubnetInfo subnetInfo = getSubnetInfo(args);<NEW_LINE>Expr arg = args.get(0);<NEW_LINE>class IPv4AddressMatchExpr extends ExprMacro...
isStringMatch(eval.asString());
407,530
public void checkClasses(ABCAnalysis abcAnalysis) throws AxelorException {<NEW_LINE>List<ABCAnalysisClass<MASK><NEW_LINE>BigDecimal classQty, classWorth;<NEW_LINE>BigDecimal totalQty = BigDecimal.ZERO, totalWorth = BigDecimal.ZERO;<NEW_LINE>BigDecimal comparisonValue = new BigDecimal(100);<NEW_LINE>for (ABCAnalysisClas...
> abcAnalysisClassList = abcAnalysis.getAbcAnalysisClassList();
1,160,458
final ListComponentVersionsResult executeListComponentVersions(ListComponentVersionsRequest listComponentVersionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listComponentVersionsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>...
addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListComponentVersions");
397,721
public DescribeAccessPointsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DescribeAccessPointsResult describeAccessPointsResult = new DescribeAccessPointsResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentEleme...
)).unmarshall(context));
323,991
private Mono<PagedResponse<ClusterInner>> listByResourceGroupSinglePageAsync(String resourceGroupName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE...
error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
163,884
public void weaveJarFile(String sourceJarFileName, String destJarFileName) throws IOException {<NEW_LINE>JarFile jarFile = new JarFile(sourceJarFileName);<NEW_LINE>ArrayList<JarEntry> entries = Collections.list(jarFile.entries());<NEW_LINE><MASK><NEW_LINE>JarOutputStream out = new JarOutputStream(os);<NEW_LINE>int n = ...
OutputStream os = new FileOutputStream(destJarFileName);
676,155
public static ResAttr factory(ResReferenceValue parent, Duo<Integer, ResScalarValue>[] items, ResValueFactory factory, ResPackage pkg) throws AndrolibException {<NEW_LINE>int type = ((ResIntValue) items[0].m2).getValue();<NEW_LINE>int scalarType = type & 0xffff;<NEW_LINE>Integer min = null, max = null;<NEW_LINE>Boolean...
min, max, l10n, attrItems);
726,211
public LongAnalysisCounter merge(LongAnalysisCounter other) {<NEW_LINE><MASK><NEW_LINE>long newCountMinValue;<NEW_LINE>if (getMinValueSeen() == otherMin) {<NEW_LINE>newCountMinValue = countMinValue + other.getCountMinValue();<NEW_LINE>} else if (getMinValueSeen() > otherMin) {<NEW_LINE>// Keep other, take count from ot...
long otherMin = other.getMinValueSeen();
22,349
private void submitForm() {<NEW_LINE>if (!validateForm()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);<NEW_LINE>imm.hideSoftInputFromWindow(et_user.getWindowToken(), 0);<NEW_LINE>if (!isOnline(this)) {<NEW_LINE>loginLoggingIn.setVisibility(...
loginLoggingIn.setVisibility(View.VISIBLE);
560,885
public BreakStatement convert(org.eclipse.jdt.internal.compiler.ast.BreakStatement statement) {<NEW_LINE>BreakStatement breakStatement = new BreakStatement(this.ast);<NEW_LINE>if (this.ast.apiLevel == AST.JLS12_INTERNAL && this.ast.isPreviewEnabled()) {<NEW_LINE>breakStatement.setImplicit(statement.isImplicit);<NEW_LIN...
sourceEnd - statement.sourceStart + 1);
446,687
public List<CompletionProposal> complete(CodeCompletionContext ccContext, CompletionContext jsCompletionContext, String prefix) {<NEW_LINE>List<CompletionProposal> <MASK><NEW_LINE>int caretOffset = ccContext.getParserResult().getSnapshot().getEmbeddedOffset(ccContext.getCaretOffset());<NEW_LINE>String pref = ccContext....
resultList = new ArrayList<>();
891,612
private List<Wo> list(Business business, Wi wi) throws Exception {<NEW_LINE>List<Wo> wos = new ArrayList<>();<NEW_LINE>Identity identity = business.identity().pick(wi.getIdentity());<NEW_LINE>if (null != identity) {<NEW_LINE>EntityManager em = business.entityManagerContainer().get(UnitDuty.class);<NEW_LINE><MASK><NEW_L...
CriteriaBuilder cb = em.getCriteriaBuilder();
1,387,281
protected k8055BindingConfig parseBindingConfig(String bindingConfig) throws BindingConfigParseException {<NEW_LINE>k8055BindingConfig config = new k8055BindingConfig();<NEW_LINE>String[] configParts = bindingConfig.split(":");<NEW_LINE>if (configParts.length != 2) {<NEW_LINE>throw new BindingConfigParseException("Unab...
BindingConfigParseException("Unable to parse k8055 binding string: " + bindingConfig + ". IO channel number was greater than the number of physical channels ");
1,485,983
public void generateSources(InitSettings settings, TemplateFactory templateFactory) {<NEW_LINE>for (String subproject : settings.getSubprojects()) {<NEW_LINE>List<String> sourceTemplates = new ArrayList<>();<NEW_LINE>List<String> <MASK><NEW_LINE>List<String> integrationTestSourceTemplates = new ArrayList<>();<NEW_LINE>...
testSourceTemplates = new ArrayList<>();
572,288
// The magic is here<NEW_LINE>private void drawCutIcon(TextureAtlasSprite icon, int x, int y, int width, int height, int cut) {<NEW_LINE>Tessellator tess = Tessellator.getInstance();<NEW_LINE>VertexBuffer vb = tess.getBuffer();<NEW_LINE>vb.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX);<NEW_LINE>vertexUV(vb, x...
, icon.getInterpolatedV(height));
1,842,994
public static void flipCopyWithGamma(FloatBuffer srcBuf, int srcStep, FloatBuffer dstBuf, int dstStep, double gamma, boolean flip, int channels) {<NEW_LINE>assert srcBuf != dstBuf;<NEW_LINE>int w = Math.min(srcStep, dstStep);<NEW_LINE>int srcLine = srcBuf.position(), dstLine = dstBuf.position();<NEW_LINE>float[] buffer...
Math.pow(in, gamma);
1,285,950
public static void dumpComponentProperties(Object cmp, String indent) {<NEW_LINE>Class cls = cmp.getClass();<NEW_LINE>Method[] methods = cls.getMethods();<NEW_LINE>Arrays.sort(methods, new Comparator<Method>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public int compare(Method o1, Method o2) {<NEW_LINE>return methodPrope...
out.println(indent + "}");
824,787
static void writeUpdateOfUpdaterJar(JarEntry updaterJarEntry, File zipFileWithUpdater, File targetCluster) throws IOException {<NEW_LINE>JarFile jf = new JarFile(zipFileWithUpdater);<NEW_LINE>String entryPath = updaterJarEntry.getName();<NEW_LINE>String entryName = entryPath.contains("/") ? entryPath.substring(entryPat...
FileUtil.copy(is, fos);
1,783,382
public com.amazonaws.services.cloud9.model.ConcurrentAccessException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.cloud9.model.ConcurrentAccessException concurrentAccessException = new com.amazonaws.services.cloud9.model.ConcurrentAccessException(null);<NEW_L...
JsonToken token = context.getCurrentToken();
1,846,486
public CreateUploadResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CreateUploadResult createUploadResult = new CreateUploadResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.get...
String currentParentElement = context.getCurrentParentElement();
1,580,133
public void testTaskIsRunning(HttpServletRequest request, HttpServletResponse response) throws Exception {<NEW_LINE>String jndiName = request.getParameter("jndiName");<NEW_LINE>long taskId = Long.parseLong(request.getParameter("taskId"));<NEW_LINE>PersistentExecutor executor = (PersistentExecutor) new InitialContext()....
int result1 = status.getResult();
415,241
public static void dbcOpenEnd(Object stat, Throwable thr) {<NEW_LINE>if (stat == null)<NEW_LINE>return;<NEW_LINE>LocalContext lctx = (LocalContext) stat;<NEW_LINE>MethodStep step = (MethodStep) lctx.stepSingle;<NEW_LINE>if (step == null)<NEW_LINE>return;<NEW_LINE>TraceContext tctx = lctx.context;<NEW_LINE>if (tctx == n...
, hash, 0, 0));
854,195
static OVChipCredit create(byte[] data) {<NEW_LINE>if (data == null) {<NEW_LINE>data = new byte[16];<NEW_LINE>}<NEW_LINE>final int banbits = ByteUtils.<MASK><NEW_LINE>final int id = ByteUtils.getBitsFromBuffer(data, 9, 12);<NEW_LINE>final int creditId = ByteUtils.getBitsFromBuffer(data, 56, 12);<NEW_LINE>// Skipping th...
getBitsFromBuffer(data, 0, 9);
1,542,936
void drawResult(Canvas canvas) {<NEW_LINE>if (barcodeResult.isEmpty())<NEW_LINE>return;<NEW_LINE>float width = canvas.getWidth();<NEW_LINE>float height = canvas.getHeight();<NEW_LINE>float bottomBorder = getBottomBorder(width, height);<NEW_LINE>float leftBorder = getLeftBorder(width, height);<NEW_LINE>textHeigh = Math....
+= (textWidth - measuredWidth) / 2f;
1,212,300
protected Lookup.Handler createAddHandler(final MetaProperty metaProperty, final CollectionDatasource propertyDs) {<NEW_LINE>Lookup.Handler result = items -> {<NEW_LINE>for (Object item : items) {<NEW_LINE>Entity entity = (Entity) item;<NEW_LINE>if (!propertyDs.getItems().contains(entity)) {<NEW_LINE>MetaProperty inver...
), datasource.getItem());
1,457,164
public void putVector(long t, TsPrimitiveType[] v) {<NEW_LINE>if (writeCurArrayIndex == capacity) {<NEW_LINE>if (capacity >= CAPACITY_THRESHOLD) {<NEW_LINE>timeRet.add(new long[capacity]);<NEW_LINE>vectorRet.add(new TsPrimitiveType[capacity][]);<NEW_LINE>writeCurListIndex++;<NEW_LINE>writeCurArrayIndex = 0;<NEW_LINE>} ...
(writeCurListIndex)[writeCurArrayIndex] = t;
1,780,173
public static HttpClientResponse request(HttpMethod method, HttpUrl url, HttpHeaders requestHeaders, String requestBody) {<NEW_LINE>reactor.netty.http.client.HttpClient client = reactor.netty.http<MASK><NEW_LINE>if (url.getScheme().equals("https")) {<NEW_LINE>client = client.secure();<NEW_LINE>}<NEW_LINE>client = clien...
.client.HttpClient.create();
979,352
protected void prepareInstall(File installDir) throws IOException {<NEW_LINE>createInfoPList(installDir);<NEW_LINE>generateDsym(<MASK><NEW_LINE>if (isDeviceArch(arch)) {<NEW_LINE>// strip local symbols<NEW_LINE>strip(installDir, getExecutable());<NEW_LINE>// remove bitcode to minimize binary size if not required<NEW_LI...
installDir, getExecutable(), false);
656,605
public static DescribeAuditContentItemResponse unmarshall(DescribeAuditContentItemResponse describeAuditContentItemResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeAuditContentItemResponse.setRequestId(_ctx.stringValue("DescribeAuditContentItemResponse.RequestId"));<NEW_LINE>describeAuditContentItemResponse.setPa...
("DescribeAuditContentItemResponse.AuditContentItemList[" + i + "].Audit"));
1,068,051
public static IntFloatVector mergeSparseFloatVector(IndexGetParam param, List<PartitionGetResult> partResults) {<NEW_LINE>int dim = (int) PSAgentContext.get().getMatrixMetaManager().getMatrixMeta(param.getMatrixId()).getColNum();<NEW_LINE>IntFloatVector vector = VFactory.sparseFloatVector(dim, param.size());<NEW_LINE>f...
i], values[i]);
1,355,489
public static void drawNumbers(Graphics2D g2, List<PointIndex2D_F64> points, @Nullable Point2Transform2_F32 transform, double scale) {<NEW_LINE>Font regular = new Font(<MASK><NEW_LINE>g2.setFont(regular);<NEW_LINE>Point2D_F32 adj = new Point2D_F32();<NEW_LINE>AffineTransform origTran = g2.getTransform();<NEW_LINE>for (...
"Serif", Font.PLAIN, 16);
103,682
private void readIndices(PersistentCollection<?> collection) throws IOException {<NEW_LINE>// move to [<NEW_LINE>parser.nextToken();<NEW_LINE>// loop till token equal to "]"<NEW_LINE>while (parser.nextToken() != JsonToken.END_ARRAY) {<NEW_LINE>// loop until end of collection object<NEW_LINE>while (parser.nextToken() !=...
.getIndexType()), fieldNames);
1,638,087
public AggregateResult aggregate(KeyType key, int keyHash) {<NEW_LINE>final ByteBuffer keyBuffer = keySerde.toByteBuffer(key);<NEW_LINE>if (keyBuffer == null) {<NEW_LINE>// This may just trigger a spill and get ignored, which is ok. If it bubbles up to the user, the message will<NEW_LINE>// be correct.<NEW_LINE>return ...
init(tableBuffer, bucketStartOffset + baseAggregatorOffset);
1,060,866
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {<NEW_LINE>if (((bitField0_ & 0x00000001) != 0)) {<NEW_LINE>com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);<NEW_LINE>}<NEW_LINE>if (((bitField0_ & 0x00000002) != 0)) {<NEW_LINE>com.google.protobuf.Generate...
output.writeUInt32(7, buildNumber_);
1,162,078
public RecrawlPolicy unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>RecrawlPolicy recrawlPolicy = new RecrawlPolicy();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCu...
int originalDepth = context.getCurrentDepth();
673,381
public void marshall(CreateUserPoolClientRequest createUserPoolClientRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createUserPoolClientRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(cre...
createUserPoolClientRequest.getAllowedOAuthFlowsUserPoolClient(), ALLOWEDOAUTHFLOWSUSERPOOLCLIENT_BINDING);
1,323,186
private void displaySubComponents(String appName, ActionReport report, ActionReport.MessagePart part, final Subject subject) {<NEW_LINE><MASK><NEW_LINE>CommandRunner.CommandInvocation inv = commandRunner.getCommandInvocation("list-sub-components", subReport, subject);<NEW_LINE>final ParameterMap parameters = new Parame...
ActionReport subReport = report.addSubActionsReport();
1,673,860
static URLConnection openConnection(Task task, final URL url, URI[] connectedVia) throws IOException {<NEW_LINE>long connectTimeoutMs = getProjectPropertyInt(task, "downloadBinaries.connectTimeoutMs", 15000);<NEW_LINE>task.log("Connect timeout set to " + connectTimeoutMs + " milliseconds prior to connecting to " + url,...
URLConnection[] conn = { null };
24,694
public void marshall(NFSFileShareInfo nFSFileShareInfo, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (nFSFileShareInfo == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(nFSFileShareInfo.getNFSFileShareDefa...
nFSFileShareInfo.getCacheAttributes(), CACHEATTRIBUTES_BINDING);
807,774
public void initialise() throws FileNotFoundException {<NEW_LINE>bSilent = false;<NEW_LINE>// double [] tmpx = input.getAllData();<NEW_LINE>// double [] x = new double[origLen+pm.totalZerosToPadd];<NEW_LINE>// Arrays.fill(x, 0.0);<NEW_LINE>// System.arraycopy(tmpx, 0, x, 0, origLen);<NEW_LINE>psFrm = new PsolaFrameProv...
modParams.fs, modParams.numPeriods);
447,307
private static void runStatementWithRetry(ShouldRetry retryAnnotation, Statement base, Description description) {<NEW_LINE>Preconditions.checkArgument(retryAnnotation.numAttempts() > 0, "Number of attempts should be positive, but found %s", retryAnnotation.numAttempts());<NEW_LINE>for (int attempt = 1; attempt <= retry...
, retryAnnotation.numAttempts()));
1,748,100
protected void clearPinnedAllocations(boolean extended) {<NEW_LINE>if (isDebug.get())<NEW_LINE>log.info("Workspace [{}] device_{} threadId {} cycle {}: clearing pinned allocations...", id, Nd4j.getAffinityManager().getDeviceForCurrentThread(), Thread.currentThread().getId(), cyclesCount.get());<NEW_LINE>while (!pinnedA...
long stepCurrent = stepsCount.get();
1,356,045
public void testFailureStackShowsCallerOfJoin() throws Exception {<NEW_LINE>CompletableFuture<?> future = defaultManagedExecutor.failedFuture(CANCELLATION_X_CAUSED_BY_ARRAY_X);<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>fail("Got result " + result + " by joining a failed future");<NEW_LINE>} catch (CancellationException x...
Object result = future.join();
1,723,421
protected void processFlowElements(Collection<FlowElement> flowElementList, BaseElement parentScope) {<NEW_LINE>for (FlowElement flowElement : flowElementList) {<NEW_LINE>if (flowElement instanceof SequenceFlow) {<NEW_LINE>SequenceFlow sequenceFlow = (SequenceFlow) flowElement;<NEW_LINE>FlowNode sourceNode = getFlowNod...
getIncomingFlows().add(sequenceFlow);
192,272
final UpdateQueueResult executeUpdateQueue(UpdateQueueRequest updateQueueRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateQueueRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi...
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
1,733,206
public static void horizontal9(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 ...
indexSrc++] & 0xFF) * k5;
1,120,580
// this is needed because the heron executor ignores the override.yaml<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>public static void applyOverridesToStateManagerConfig(Path overridesPath, Path stateManagerPath) throws IOException {<NEW_LINE>final Path tempStateManagerPath = Files.createTempFile("statemgr-", CONFI...
.toFile().delete();
1,647,046
/*<NEW_LINE>* (non-Javadoc)<NEW_LINE>*<NEW_LINE>* @see<NEW_LINE>* org.openhab.core.persistence.PersistenceService#store(org.openhab.core<NEW_LINE>* .items.Item, java.lang.String)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void store(Item item, String alias) {<NEW_LINE>if (isAgentConnected()) {<NEW_LINE>String hwid ...
toBigDecimal().doubleValue());
282,261
public static void main(String[] args) {<NEW_LINE>System.out.println("the number is " + parseLongDecSubstring("number=78 ", 7));<NEW_LINE>System.out.println("the number is " + parseIntDecSubstring("number=78x ", 7, 9));<NEW_LINE>Random r = new Random(1);<NEW_LINE>String[<MASK><NEW_LINE>for (int i = 0; i < s.length; i++...
] s = new String[1000000];
1,819,494
public boolean onOptionsItemSelected(MenuItem item) {<NEW_LINE>switch(item.getItemId()) {<NEW_LINE>case R.id.action_share_file:<NEW_LINE>{<NEW_LINE>mContainerActivity.getFileOperationsHelper().showShareFile(getFile());<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>case R.id.action_open_file_with:<NEW_LINE>{<NEW_LINE>openFi...
).syncFile(getFile());
1,293,668
protected void save() {<NEW_LINE>preferences.activateAccelerometer(true);<NEW_LINE>preferences.activateCamera(true);<NEW_LINE>preferences.activateMicrophone(true);<NEW_LINE>setPhoneNumber();<NEW_LINE>boolean videoMonitoringActive = ((SwitchPreference) findPreference(mActivity.getResources().getString(R.string.video_act...
mActivity.setResult(AppCompatActivity.RESULT_OK);
1,598,196
private void logConnectionPoolBusy(ConnectionPoolBusyInfo info, long waitMillis, int connectionFlags) {<NEW_LINE>StringBuilder msg = new StringBuilder();<NEW_LINE>if (waitMillis != 0) {<NEW_LINE>final Thread thread = Thread.currentThread();<NEW_LINE>msg.append("The connection pool for database '").append(info.label);<N...
.idleConnections).append(" idle, ");
1,103,700
public void testBizIntLookupXmlBasedComp_StatelessTwoNames() throws Exception {<NEW_LINE>UserTransaction userTran = null;<NEW_LINE>// --------------------------------------------------------------------<NEW_LINE>// Lookup SLSB by XML name and execute the test<NEW_LINE>// ------------------------------------------------...
lookupDefaultBindingEJBJavaApp(businessInterface, module, beanName2);
788,146
public ContainerInstanceHealthStatus unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ContainerInstanceHealthStatus containerInstanceHealthStatus = new ContainerInstanceHealthStatus();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurren...
)).unmarshall(context));
1,624,579
public boolean apply(Game game, Ability source) {<NEW_LINE>Permanent sourcePermanent = source.getSourcePermanentOrLKI(game);<NEW_LINE>if (sourcePermanent == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>int amount = sourcePermanent.getPower().getValue();<NEW_LINE>if (amount < 1) {<NEW_LINE>return false;<NEW_LINE>}...
source.getSourceId(), game);
1,027,180
V putInternal(K key, V value, ExpirationPolicy expirationPolicy, long expirationNanos) {<NEW_LINE>writeLock.lock();<NEW_LINE>try {<NEW_LINE>ExpiringEntry<K, V> entry = entries.get(key);<NEW_LINE>V oldValue = null;<NEW_LINE>if (entry == null) {<NEW_LINE>entry = new ExpiringEntry<K, V>(key, value, variableExpiration ? ne...
> expiredEntry = entries.first();
170,808
private void loadWorlds() {<NEW_LINE>File f = new File(core.getDataFolder(), "forgeworlds.yml");<NEW_LINE>if (f.canRead() == false) {<NEW_LINE>useSaveFolder = true;<NEW_LINE>ForgeWorld.setSaveFolderMapping();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ConfigurationNode cn = new ConfigurationNode(f);<NEW_LINE>cn.load();<NEW_L...
fw.getName(), fw);
1,101,201
private boolean handleEarlyCancellation(ClientRequestContext ctx, HttpRequest req, DecodedHttpResponse res) {<NEW_LINE>if (res.isOpen()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>assert responseDecoder != null;<NEW_LINE>responseDecoder.decrementUnfinishedResponses();<NEW_LINE>// The response has been closed even bef...
.logBuilder().endRequest();
885,096
void deleteOldArtifacts() {<NEW_LINE>ServerConfig serverConfig = goConfigService.serverConfig();<NEW_LINE>Double requiredSpaceInGb = serverConfig.getPurgeUpto();<NEW_LINE>if (serverConfig.isArtifactPurgingAllowed()) {<NEW_LINE>double requiredSpace = requiredSpaceInGb * GoConstants.GIGA_BYTE;<NEW_LINE>LOGGER.info(<MASK>...
"Clearing old artifacts as the disk space is low. Current space: '{}'. Need to clear till we hit: '{}'.", availableSpace(), requiredSpace);
1,807,357
private Model internalBuildModel(WSDLDocument document) {<NEW_LINE>numPasses++;<NEW_LINE>// build the jaxbModel to be used latter<NEW_LINE>buildJAXBModel(document);<NEW_LINE>QName modelName = new QName(document.getDefinitions().getTargetNamespaceURI(), document.getDefinitions().getName() == null ? "model" : document.<M...
getDefinitions().getName());
184,753
private boolean areAttributeMinimumsFeasible(SingularityOfferHolder offerHolder, SingularityTaskRequest taskRequest, List<SingularityTaskId> activeTaskIdsForRequest) {<NEW_LINE>if (!taskRequest.getRequest().getAgentAttributeMinimums().isPresent()) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>Map<String, String> offerAtt...
.get().getAttributes();
386,261
private ClusterState applyCreateIndexRequestWithExistingMetadata(final ClusterState currentState, final CreateIndexClusterStateUpdateRequest request, final boolean silent, final IndexMetadata sourceMetadata, final BiConsumer<Metadata.Builder, IndexMetadata> metadataTransformer) throws Exception {<NEW_LINE>logger.info("...
xContentRegistry, request.mappings());
58,403
public List<EditOperation> calculatePath() {<NEW_LINE>LinkedList<EditOperation> ops = new LinkedList<>();<NEW_LINE>int i = seq1.length();<NEW_LINE>int j = seq2.length();<NEW_LINE>int dist = matrix[i][j];<NEW_LINE>while (i > 0 && j > 0 && dist > 0) {<NEW_LINE>int ins = matrix[i][j - 1];<NEW_LINE>int del = matrix[i - 1][...
addOrUpdate(ops, DELETE, 1);
562,566
public void draw(final Canvas pCanvas, final Projection pProjection) {<NEW_LINE>final Paint background;<NEW_LINE>final Paint foreground;<NEW_LINE>if (mIsDragged) {<NEW_LINE>background = mDragBackground != null ? mDragBackground : mBackground;<NEW_LINE>foreground = mDragForeground != null ? mDragForeground : mForeground...
mPoint, mRadius, mIntersection1, mIntersection2);
248,514
public Map<File, IndexProcessingResults> processIndex(Set<File> replicaDirs, Set<StoreKey> filterSet, int parallelism, boolean detectDuplicatesAcrossKeys) {<NEW_LINE>if (detectDuplicatesAcrossKeys && parallelism != 1) {<NEW_LINE>throw new IllegalArgumentException("Parallelism cannot be > 1 because StoreKeyConverter is ...
logger.info("Processing segment files for replica {} ", replicaDir);
182,060
public synchronized Map<String, Object> asMap(boolean withDetails) {<NEW_LINE>E.checkState(this.type != null, "Task type can't be null");<NEW_LINE>E.checkState(this.name != null, "Task name can't be null");<NEW_LINE>Map<String, Object> map = new HashMap<>();<NEW_LINE>map.put(Hidden.unHide(P<MASK><NEW_LINE>map.put(Hidde...
.ID), this.id);
1,655,628
boolean matches(LocalDate date) {<NEW_LINE>for (FieldPart part : parts) {<NEW_LINE>if ("L".equals(part.modifier)) {<NEW_LINE>YearMonth ym = YearMonth.of(date.getYear(), date.getMonth().getValue());<NEW_LINE>return date.getDayOfWeek() == DayOfWeek.of(part.from) && date.getDayOfMonth() > (ym.lengthOfMonth() - DAYS_IN_WEE...
0 ? num : num + 1);
732,280
public static Project readXML(File f) throws IOException, SAXException {<NEW_LINE>InputStream in = new BufferedInputStream(new FileInputStream(f));<NEW_LINE>Project project = new Project();<NEW_LINE>try {<NEW_LINE>String tag = Util.getXMLType(in);<NEW_LINE>SAXBugCollectionHandler handler;<NEW_LINE>if ("Project".equals(...
IOException("Can't load a project from a " + tag + " file");
214,516
private void executeAndShowTextFind() {<NEW_LINE>String textToFind = textToFindField.getText();<NEW_LINE>if (this.searchProvider != null) {<NEW_LINE>// new search?<NEW_LINE>if (lastTextTofind != null && !lastTextTofind.equals(textToFind)) {<NEW_LINE>searchProvider.resetTextToFind();<NEW_LINE>textToFindField.setBackgrou...
("error_title"), JOptionPane.WARNING_MESSAGE);
1,477,254
public Response<Void> deleteByIdWithResponse(String id, Context context) {<NEW_LINE>String resourceGroupName = <MASK><NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>throw logger.logExceptionAsError(new IllegalArgumentException(String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'."...
Utils.getValueFromIdByName(id, "resourceGroups");
130,521
final DisassociateElasticIpResult executeDisassociateElasticIp(DisassociateElasticIpRequest disassociateElasticIpRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(disassociateElasticIpRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<...
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
1,053,147
public void initData() {<NEW_LINE>if (disposable != null)<NEW_LINE>return;<NEW_LINE>ACache aCache = ACache.get(mView.getContext(), "findCache");<NEW_LINE>Single.create((SingleOnSubscribe<List<RecyclerViewData>>) e -> {<NEW_LINE>List<RecyclerViewData> group = new ArrayList<>();<NEW_LINE>boolean showAllFind = MApplicatio...
, pair.second, false));