idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
1,503,479
public static void main(String[] args) {<NEW_LINE>Adempiere.startup(true);<NEW_LINE>Ini.setProperty(Ini.P_UID, "SuperUser");<NEW_LINE>Ini.setProperty(Ini.P_PWD, "System");<NEW_LINE>Ini.setProperty(Ini.P_ROLE, "GardenWorld Admin");<NEW_LINE>Ini.setProperty(Ini.P_CLIENT, "GardenWorld");<NEW_LINE>Ini.setProperty(Ini.P_ORG...
WMRuleEngine engine = WMRuleEngine.get();
1,681,325
private void loadNode1200() throws IOException, SAXException {<NEW_LINE>DataTypeDescriptionTypeNode node = new DataTypeDescriptionTypeNode(this.context, Identifiers.OpcUa_XmlSchema_AxisInformation, new QualifiedName(0, "AxisInformation"), new LocalizedText("en", "AxisInformation"), LocalizedText.NULL_VALUE, UInteger.va...
DataValue(new Variant(o));
1,390,037
static BitSet buildReachableBytecodesMask(byte[] code) {<NEW_LINE>NavigableSet<Integer> gotos = new TreeSet<>();<NEW_LINE><MASK><NEW_LINE>BitSet ret = new BitSet(code.length);<NEW_LINE>int lastPush = 0;<NEW_LINE>int lastPushPC = 0;<NEW_LINE>do {<NEW_LINE>// reachable bytecode<NEW_LINE>ret.set(it.getPC());<NEW_LINE>if (...
ByteCodeIterator it = new ByteCodeIterator(code);
1,382,656
public static void passiveADPAgentDemo() {<NEW_LINE>System.out.println("=======================");<NEW_LINE>System.out.println("DEMO: Passive-ADP-Agent");<NEW_LINE>System.out.println("=======================");<NEW_LINE>System.out.println("Figure 21.3");<NEW_LINE>System.out.println("-----------");<NEW_LINE>CellWorld<Do...
, 1), CellWorldAction.Up);
678,988
private Runnable createCopyWatchTask(final ImageWatcher watcher, final String assemblyName, final MojoParameters mojoParameters, final String containerBaseDir) throws MojoExecutionException {<NEW_LINE>final ImageConfiguration imageConfig = watcher.getImageConfiguration();<NEW_LINE>final AssemblyFiles files = archiveSer...
getAssemblyFiles(imageConfig, assemblyName, mojoParameters);
154,802
private static void addField(servletProperties prop, int c, SchemaDeclaration field) {<NEW_LINE>prop.put("fields_" + c + "_solrname", field.getSolrFieldName());<NEW_LINE>prop.put("fields_" + c + "_type", field.getType().printName());<NEW_LINE>prop.put("fields_" + c + <MASK><NEW_LINE>prop.put("fields_" + c + "_indexedCh...
"_comment", field.getComment());
1,627,026
protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.mobicom_multi_attachment_activity);<NEW_LINE>String jsonString = FileUtils.loadSettingsJsonFile(getApplicationContext());<NEW_LINE>if (!TextUtils.isEmpty(jsonString)) {<NEW_LINE>alCustomiza...
putExtra(Intent.EXTRA_LOCAL_ONLY, true);
1,360,158
void deserialize(final Map<String, SchemaNode> schemaNodes, final SchemaProperty property) {<NEW_LINE>setDefaultValue(property.getDefaultValue());<NEW_LINE>setCompound(property.isCompound());<NEW_LINE>setRequired(property.isRequired());<NEW_LINE>setUnique(property.isUnique());<NEW_LINE>setIndexed(property.isIndexed());...
property.getProperty(SchemaProperty.validators);
645,816
final ListPoolOriginationIdentitiesResult executeListPoolOriginationIdentities(ListPoolOriginationIdentitiesRequest listPoolOriginationIdentitiesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listPoolOriginationIdentitiesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionC...
addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListPoolOriginationIdentities");
1,107,275
// </editor-fold>//GEN-END:initComponents<NEW_LINE>private void addVarButtonActionPerformed(java.awt.event.ActionEvent evt) {<NEW_LINE>// GEN-FIRST:event_addVarButtonActionPerformed<NEW_LINE>final DefaultTableModel model = (DefaultTableModel) childrenVariablesTable.getModel();<NEW_LINE>model.addRow(new Object[] { "", "...
).setSelectionInterval(index, index);
246,906
private void prepare(IParam param, Context ctx) {<NEW_LINE>if (param != null && param.getType() == IParam.Semicolon) {<NEW_LINE>moveParam = param.getSub(1);<NEW_LINE>param = param.getSub(0);<NEW_LINE>}<NEW_LINE>if (param == null) {<NEW_LINE>level = 0;<NEW_LINE>} else if (param.isLeaf()) {<NEW_LINE>Object obj = param.ge...
+ mm.getMessage("function.missingParam"));
1,811,233
public void invoke(@NotNull Project project, @NotNull PsiFile file, @Nullable("is null when called from inspection") Editor editor, @NotNull PsiElement startElement, @NotNull PsiElement endElement) {<NEW_LINE>if (editor == null) {<NEW_LINE>LOG.error("Cannot run quick fix without editor: " + getClass().getSimpleName(), ...
(GoTypeUtil.getExpectedTypes(call));
1,475,662
static Set<DayOfWeek> mapDayOfWeek(DayOfWeekEnumeration value) {<NEW_LINE>switch(value) {<NEW_LINE>case MONDAY:<NEW_LINE>return EnumSet.of(DayOfWeek.MONDAY);<NEW_LINE>case TUESDAY:<NEW_LINE>return EnumSet.of(DayOfWeek.TUESDAY);<NEW_LINE>case WEDNESDAY:<NEW_LINE>return EnumSet.of(DayOfWeek.WEDNESDAY);<NEW_LINE>case THUR...
EnumSet.of(DayOfWeek.SATURDAY);
571,612
private static void propagateNewSource(KineticTileEntity currentTE) {<NEW_LINE>BlockPos pos = currentTE.getBlockPos();<NEW_LINE>Level world = currentTE.getLevel();<NEW_LINE>for (KineticTileEntity neighbourTE : getConnectedNeighbours(currentTE)) {<NEW_LINE>float speedOfCurrent = currentTE.getTheoreticalSpeed();<NEW_LINE...
abs(speedOfNeighbour) / 256f / 256f;
890,487
public void marshall(AdvancedFieldSelector advancedFieldSelector, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (advancedFieldSelector == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(advancedFieldSelector...
e.getMessage(), e);
272,240
public Request<DisassociateKmsKeyRequest> marshall(DisassociateKmsKeyRequest disassociateKmsKeyRequest) {<NEW_LINE>if (disassociateKmsKeyRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(DisassociateKmsKeyRequest)");<NEW_LINE>}<NEW_LINE>Request<DisassociateKmsKeyRequest> r...
.toString(content.length));
103,671
public static Models create(Shell shell, Settings settings, ExceptionHandler handler, Client client, StatusBar status) {<NEW_LINE>Analytics analytics = new Analytics(client, settings, handler);<NEW_LINE>Capture capture = new Capture(shell, analytics, client, settings);<NEW_LINE>Devices devices = new Devices(shell, anal...
capture, devices, commands, settings);
263,658
protected void checkFormat() {<NEW_LINE>JdbcConf conf = format.getJdbcConf();<NEW_LINE>StringBuilder sb = new StringBuilder(256);<NEW_LINE>if (StringUtils.isBlank(conf.getJdbcUrl())) {<NEW_LINE>sb.append("No jdbc url supplied;\n");<NEW_LINE>}<NEW_LINE>if (conf.getParallelism() > 1) {<NEW_LINE>if (StringUtils.isBlank(co...
), conf.getSplitPk());
122,126
public Alert alertFrom(DBObject dbo) {<NEW_LINE>String id = dbo.<MASK><NEW_LINE>String checkId = getString(dbo, "checkId");<NEW_LINE>BigDecimal value = getBigDecimal(dbo, "value");<NEW_LINE>String target = getString(dbo, "target");<NEW_LINE>BigDecimal warn = getBigDecimal(dbo, "warn");<NEW_LINE>BigDecimal error = getBi...
get("_id").toString();
1,022,727
protected C remove(Node node) {<NEW_LINE>Node previous = node.parent;<NEW_LINE>if (node.childrenSize > 0) {<NEW_LINE>// The node which contains the input string and has children, just<NEW_LINE>// NULL out the string<NEW_LINE>node.isWord = false;<NEW_LINE>} else {<NEW_LINE>// The node which contains the input string doe...
previous.childIndex(node.character);
303,215
private void cancelTimeoutOrLog(@Nullable Throwable cause, Consumer<Throwable> actionOnNotTimedOut) {<NEW_LINE>CancellationScheduler responseCancellationScheduler = null;<NEW_LINE>if (ctx instanceof DefaultClientRequestContext) {<NEW_LINE>responseCancellationScheduler = ((DefaultClientRequestContext) ctx).responseCance...
.request().authority();
1,518,492
private void createDataBase() throws ClassNotFoundException, IOException, SQLException {<NEW_LINE>String goalUrl = properties.getProperty("spring.datasource.url");<NEW_LINE>this.user = properties.getProperty("spring.datasource.username");<NEW_LINE>this.password = properties.getProperty("spring.datasource.password");<NE...
runScript(defaultUrl, flag, tableSqlList);
1,505,867
private AscendingLongIterator predicateIterator(Predicate predicate, TypeConverter converter) {<NEW_LINE>if (predicate instanceof AndPredicate) {<NEW_LINE>Predicate[] predicates = ((AndPredicate) predicate).getPredicates();<NEW_LINE>assert predicates.length > 0;<NEW_LINE>if (predicates.length == 1) {<NEW_LINE>return pr...
(predicates[0], converter);
822,949
public static String dayify(String x) {<NEW_LINE>StringBuffer sb = new StringBuffer();<NEW_LINE>if (daysOfWeek == null) {<NEW_LINE>daysOfWeek = new HashMap<String, String>();<NEW_LINE>daysOfWeek.put("M", "Monday");<NEW_LINE>daysOfWeek.put("T", "Tuesday");<NEW_LINE><MASK><NEW_LINE>daysOfWeek.put("R", "Thursday");<NEW_LI...
daysOfWeek.put("W", "Wednesday");
1,423,125
protected void flowThrough(AnalysisInfo in, Unit u, List<AnalysisInfo> fallOut, List<AnalysisInfo> branchOuts) {<NEW_LINE>AnalysisInfo out = new AnalysisInfo(in);<NEW_LINE>AnalysisInfo outBranch = new AnalysisInfo(in);<NEW_LINE>Stmt s = (Stmt) u;<NEW_LINE>// in case of an if statement, we neet to compute the branch-flo...
).getOp(), NON_NULL);
1,644,328
protected Control createContents(Composite parent) {<NEW_LINE>Composite main = new Composite(parent, SWT.NONE);<NEW_LINE>main.setLayoutData(new GridData(SWT.FILL, SWT<MASK><NEW_LINE>GridLayout layout = new GridLayout(2, false);<NEW_LINE>layout.marginHeight = 0;<NEW_LINE>layout.marginWidth = 0;<NEW_LINE>main.setLayout(l...
.FILL, true, true));
1,630,873
public ListRunsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListRunsResult listRunsResult = new ListRunsResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth +...
class).unmarshall(context));
837,522
public int copyPhasesFrom(final MProject fromProject) {<NEW_LINE>if (isProcessed() || fromProject == null)<NEW_LINE>return 0;<NEW_LINE>int count = 0;<NEW_LINE>int taskCount = 0;<NEW_LINE>// Get Phases<NEW_LINE>final <MASK><NEW_LINE>final MProjectPhase[] fromPhases = fromProject.getPhases();<NEW_LINE>// Copy Phases<NEW_...
MProjectPhase[] myPhases = getPhases();
1,433,812
protected ExpandItem createSnippetDrawer(ExpandBar expandBar, SnippetCategoryElement category, List<SnippetData> snippets) {<NEW_LINE>Composite composite = new Composite(expandBar, SWT.NONE);<NEW_LINE>composite.setForeground(UIUtils.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BORDER));<NEW_LINE>composite.setLayout(Gri...
.getIconURL()) : genericSnippetImage);
471,587
public Continuation<ContainerResponse> apply(ContainerResponse responseContext) {<NEW_LINE>final ArrayList<Iterable<RankedProvider<ContainerResponseFilter>>> rankedProviders <MASK><NEW_LINE>rankedProviders.add(filters);<NEW_LINE>rankedProviders.add(responseContext.getRequestContext().getResponseFilters());<NEW_LINE>Ite...
= new ArrayList<>(2);
1,814,060
public static Builder newBuilder(GeneratorSettings copy) {<NEW_LINE>Builder builder = new Builder();<NEW_LINE>builder.generatorName = copy.getGeneratorName();<NEW_LINE>builder.apiPackage = copy.getApiPackage();<NEW_LINE>builder.modelPackage = copy.getModelPackage();<NEW_LINE>builder.invokerPackage = copy.getInvokerPack...
.httpUserAgent = copy.getHttpUserAgent();
933,806
protected void readNodeChildren(org.w3c.dom.Node node, java.util.Map namespacePrefixes) {<NEW_LINE>org.w3c.dom.NodeList children = node.getChildNodes();<NEW_LINE>for (int i = 0, size = children.getLength(); i < size; ++i) {<NEW_LINE>org.w3c.dom.Node childNode = children.item(i);<NEW_LINE>String childNodeName = (childNo...
getLocalName().intern());
116,299
protected JComponent createSouthPanel() {<NEW_LINE>final JPanel buttonPanel = new JPanel(new GridBagLayout());<NEW_LINE>GridBagConstraints gbc = new GridBagConstraints();<NEW_LINE>gbc.insets.right = 5;<NEW_LINE>gbc.fill = GridBagConstraints.BOTH;<NEW_LINE>gbc.gridx = 0;<NEW_LINE>gbc.gridy = 0;<NEW_LINE>buttonPanel.add(...
(new JLabel(), NOBUTTONS);
1,247,564
public void restartOpt(SourceRequest request, String operator) {<NEW_LINE>StreamSourceEntity existEntity = sourceMapper.selectByIdForUpdate(request.getId());<NEW_LINE>SourceStatus curState = SourceStatus.forCode(existEntity.getStatus());<NEW_LINE>SourceStatus nextState = SourceStatus.TO_BE_ISSUED_ACTIVE;<NEW_LINE>if (!...
throw new BusinessException(ErrorCodeEnum.CONFIG_EXPIRED);
1,458,374
public static String formatNotUniqueProperties(String id, Node node, Map<String, Set<String>> uniqueConstraints, Set<String> indexedProperties, boolean jsonStyle) {<NEW_LINE>Map<String, Object> properties = new LinkedHashMap<>();<NEW_LINE>List<String> keys = Iterables.asList(node.getPropertyKeys());<NEW_LINE>Collection...
get(key), jsonStyle));
574,530
final DeleteRecommenderResult executeDeleteRecommender(DeleteRecommenderRequest deleteRecommenderRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteRecommenderRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.st...
addHandlerContext(HandlerContextKey.SERVICE_ID, "Personalize");
1,097,461
public void build() {<NEW_LINE>// add a comment to the debug log.<NEW_LINE>// /////////////////////////////////<NEW_LINE>// Comment group<NEW_LINE>// /////////////////////////////////<NEW_LINE>StringParameterImpl commentBox = new StringParameterImpl("AutoSpeedv2.comment", "ConfigTransferAutoSpeed.add.comment.to.log");<...
("ConfigTransferAutoSpeed.upload.capacity.usage", ucuDL, ucuLabel));
450,598
public static CharSequence userInfo(CharSequence userInfo, boolean encode) throws IllegalArgumentException {<NEW_LINE>final int length = userInfo.length();<NEW_LINE>final StringBuilder stb = new StringBuilder(length);<NEW_LINE>for (int i = 0; i < length; i++) {<NEW_LINE>final char <MASK><NEW_LINE>if (c == '{') {<NEW_LI...
c = userInfo.charAt(i);
928,029
public static SargableConditionInference infer(SubqueryWrapperLabel wrapperLabel, List<RexNode> predicates, List<RelDataTypeField> fields, ExtractorContext context) {<NEW_LINE>final RelOptCluster cluster = wrapperLabel.getRel().getCluster();<NEW_LINE>final RelDataType rowType = RelUtils.buildRowType(fields, cluster);<N...
classify(decorrelated, equalityPreds, valuePreds);
708,843
private AttackResult processZipUpload(MultipartFile file) {<NEW_LINE>var tmpZipDirectory = Files.createTempDirectory(getWebSession().getUserName());<NEW_LINE>var uploadDirectory = new File(getWebGoatHomeDirectory(), "/PathTraversal/" + getWebSession().getUserName());<NEW_LINE>var currentImage = getProfilePictureAsBase6...
), uploadedZipFile.toFile());
900,168
private void initializeMulticastSocket() {<NEW_LINE>try {<NEW_LINE>int port = getOrDefault(MulticastProperties.PORT, DEFAULT_MULTICAST_PORT);<NEW_LINE>PortValueValidator validator = new PortValueValidator();<NEW_LINE>validator.validate(port);<NEW_LINE>String group = getOrDefault(MulticastProperties.GROUP, DEFAULT_MULTI...
(InetAddress.getByName(group));
1,378,743
private void updateHelpImage() {<NEW_LINE>if (Build.VERSION.SDK_INT >= 18) {<NEW_LINE>OsmandSettings settings = getSettings();<NEW_LINE>int count = settings.DISPLAYED_MARKERS_WIDGETS_COUNT.get();<NEW_LINE>LinkedList<Drawable> imgList = new LinkedList<>();<NEW_LINE><MASK><NEW_LINE>if (settings.SHOW_LINES_TO_FIRST_MARKER...
imgList.add(getDeviceImg());
774,736
private PriamInstance claimToken(PriamInstance originalInstance) {<NEW_LINE>String hostIP = config.usePrivateIP() ? myInstanceInfo.getPrivateIP() : myInstanceInfo.getHostIP();<NEW_LINE>if (originalInstance.getInstanceId().equals(myInstanceInfo.getInstanceId()) && originalInstance.getHostName().equals(myInstanceInfo.get...
setApp(config.getAppName());
464,826
protected RowData convertToRow(Result result, GenericRowData resultRow, GenericRowData[] familyRows) {<NEW_LINE>for (int i = 0; i < fieldLength; i++) {<NEW_LINE>if (rowkeyIndex == i) {<NEW_LINE>assert keyDecoder != null;<NEW_LINE>Object rowkey = keyDecoder.decode(result.getRow());<NEW_LINE>resultRow.setField(rowkeyInde...
rowkeyIndex) ? i - 1 : i;
1,444,709
public byte[] doInTransform(Instrumentor instrumentor, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {<NEW_LINE>if (className.equals(CLASS_STATEMENT)) {<NEW_LINE>if (instrumentor.exist(loader, CLASS_STATEMENT_WRA...
extends Interceptor> executeUpdateInterceptor = StatementExecuteUpdateInterceptor.class;
1,377,450
public void processStream(InputStream input) throws IOException {<NEW_LINE>BufferedReader in = new BufferedReader(new InputStreamReader(input));<NEW_LINE>String line = "";<NEW_LINE>int lineno = 0;<NEW_LINE>boolean hasStarted = false;<NEW_LINE>Matcher matcher = ANNOTATE_PATTERN.matcher(line);<NEW_LINE>while ((line = in....
rev = matcher.group(1);
1,659,539
// ==================================================================================================================<NEW_LINE>private static VariantContext annotateWithImpreciseEvidenceLinks(final VariantContext variant, final PairedStrandedIntervalTree<EvidenceTargetLink> evidenceTargetLinks, final SAMSequenceDiction...
overlappers = evidenceTargetLinks.overlappers(svcIntervals);
646,133
private void renderRestOfShapes() {<NEW_LINE>ArrayList<DiagramShape> shapes = diagram.getAllDiagramShapes();<NEW_LINE>ArrayList<DiagramShape> <MASK><NEW_LINE>shapes.sort(new ShapeAreaComparator());<NEW_LINE>for (DiagramShape shape : shapes) {<NEW_LINE>if (shape.getType() == DiagramShape.TYPE_POINT_MARKER) {<NEW_LINE>po...
pointMarkers = new ArrayList<>();
69,648
public static void main(String[] args) {<NEW_LINE>final String queue_name = "testQueue" + new Date().getTime();<NEW_LINE>AmazonSQS sqs = AmazonSQSClientBuilder.defaultClient();<NEW_LINE>// first, create a queue (unless it exists already)<NEW_LINE>try {<NEW_LINE>CreateQueueResult cq_result = sqs.createQueue(queue_name);...
getQueueUrl(queue_name).getQueueUrl();
1,331,934
private TIntLongHashMap readPoiNameIndex(Collator instance, String query, SearchRequest<Amenity> req) throws IOException {<NEW_LINE>TIntLongHashMap offsets = new TIntLongHashMap();<NEW_LINE>List<TIntArrayList> listOffsets = null;<NEW_LINE>List<TIntLongHashMap> listOfSepOffsets = new ArrayList<TIntLongHashMap>();<NEW_LI...
skipRawBytes(codedIS.getBytesUntilLimit());
956,702
public static Point2D showText(PdfContentByte cb, BaseFont baseFont, float fontSize, String text) {<NEW_LINE>GlyphVector glyphVector = computeGlyphVector(baseFont, fontSize, text);<NEW_LINE>if (!hasAdjustments(glyphVector)) {<NEW_LINE>cb.showText(glyphVector);<NEW_LINE>Point2D p = glyphVector.getGlyphPosition(glyphVect...
getGlyphPosition(glyphVector.getNumGlyphs());
1,144,037
public static Map<String, Map<String, List<Pair<Integer, List<Object>>>>> buildResultForShardingTable(String schemaName, String logicalTableName, List<List<Object>> values, List<ColumnMeta> skMetas, Mapping skMapping, Mapping pkMapping, ExecutionContext ec, boolean isGetShardResultForReplicationTable) {<NEW_LINE>// tar...
schemaName).getTable(logicalTableName));
802,318
public void add(long member) {<NEW_LINE>assert member >= 0;<NEW_LINE>int prefix = (int) (member >>> Integer.SIZE);<NEW_LINE>if (prefix == lastPrefix) {<NEW_LINE>Storage32 newStorage = lastStorage<MASK><NEW_LINE>if (newStorage != lastStorage) {<NEW_LINE>// storage was upgraded<NEW_LINE>lastStorage = newStorage;<NEW_LINE...
.add((int) member);
115,160
public Action onFragment(final DirectBuffer buffer, final int offset, final int length, final Header header) {<NEW_LINE>Action action = Action.CONTINUE;<NEW_LINE>final byte flags = header.flags();<NEW_LINE>if ((flags & UNFRAGMENTED) == UNFRAGMENTED) {<NEW_LINE>action = onMessage(buffer, offset, header);<NEW_LINE>} else...
int limit = builder.limit();
1,127,016
public com.amazonaws.services.fsx.model.StorageVirtualMachineNotFoundException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.fsx.model.StorageVirtualMachineNotFoundException storageVirtualMachineNotFoundException = new com.amazonaws.services.fsx.model.StorageV...
String currentParentElement = context.getCurrentParentElement();
596,372
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {<NEW_LINE>String requestUri = request.getRequestURI();<NEW_LINE>int pos = requestUri.lastIndexOf('.');<NEW_LINE>if (pos > -1) {<NEW_LINE>// interception for favicon.ico<...
requestUri.substring(pos + 1);
1,623,820
public void updateFileListModel(File currentlySelectedDirectory, boolean keepSelectionsAndReferences) {<NEW_LINE>// make sure this happens on the event dispatch thread, since it can be called from, for example, a background thread that is writing the files<NEW_LINE>SwingUtilities.invokeLater(() -> {<NEW_LINE>try {<NE...
[] filesToList = showFileListSorted(currentlySelectedDirectory);
136,434
/*<NEW_LINE>* Ensures that this.macInstance is initialized<NEW_LINE>* In-case of credential change, optimistically will try to refresh the macInstance<NEW_LINE>*<NEW_LINE>* Implementation is non-blocking, the one which acquire the lock will try to refresh<NEW_LINE>* with new credentials<NEW_LINE>*<NEW_LINE>* NOTE: Call...
macInstance = Mac.getInstance("HMACSHA256");
175,524
Node processFormalParameterList(FormalParameterListTree tree) {<NEW_LINE>Node params = newNode(Token.PARAM_LIST);<NEW_LINE>params.setTrailingComma(tree.hasTrailingComma);<NEW_LINE>if (!checkParameters(tree)) {<NEW_LINE>return params;<NEW_LINE>}<NEW_LINE>ImmutableList<MASK><NEW_LINE>List<SourcePosition> zones = getEndOf...
<ParseTree> parameters = tree.parameters;
1,013,820
public List<File> doCheck() throws SystemCheckException {<NEW_LINE>File walFolderFile = SystemFileFactory.INSTANCE.getFile(walFolder);<NEW_LINE>logger.info("Checking folder: {}", walFolderFile.getAbsolutePath());<NEW_LINE>if (!walFolderFile.exists() || !walFolderFile.isDirectory()) {<NEW_LINE>throw new SystemCheckExcep...
failedFiles = new ArrayList<>();
1,040,863
public static DeleteCompliancePacksResponse unmarshall(DeleteCompliancePacksResponse deleteCompliancePacksResponse, UnmarshallerContext _ctx) {<NEW_LINE>deleteCompliancePacksResponse.setRequestId(_ctx.stringValue("DeleteCompliancePacksResponse.RequestId"));<NEW_LINE>OperateCompliancePacksResult operateCompliancePacksRe...
("DeleteCompliancePacksResponse.OperateCompliancePacksResult.OperateCompliancePacks[" + i + "].CompliancePackId"));
254,336
public SConcreteRevision convertToSObject(ConcreteRevision input) {<NEW_LINE>if (input == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>SConcreteRevision result = new SConcreteRevision();<NEW_LINE>result.setOid(input.getOid());<NEW_LINE>result.setUuid(input.getUuid());<NEW_LINE>result.setRid(input.getRid());<NEW_LI...
IfcHeader ifcHeaderVal = input.getIfcHeader();
1,792,584
public static ListAlarmContactGroupsResponse unmarshall(ListAlarmContactGroupsResponse listAlarmContactGroupsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listAlarmContactGroupsResponse.setRequestId(_ctx.stringValue("ListAlarmContactGroupsResponse.RequestId"));<NEW_LINE>listAlarmContactGroupsResponse.setHttpCode(_ctx....
(_ctx.integerValue("ListAlarmContactGroupsResponse.PageSize"));
865,036
public void marshall(CreateEntityRequest createEntityRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createEntityRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(createEntityRequest.getComp...
createEntityRequest.getDescription(), DESCRIPTION_BINDING);
1,317,821
public static void main(String[] args) throws Exception {<NEW_LINE>TopologyBuilder builder = new TopologyBuilder();<NEW_LINE>builder.setSpout("word0", new TestWordSpout(), 2);<NEW_LINE>builder.setSpout("word1", new TestWordSpout(), 2);<NEW_LINE>builder.setSpout("word2", new TestWordSpout(), 2);<NEW_LINE>builder.setBolt...
"word0", ExampleResources.getComponentRam());
208,127
public static void createGlobalSimpleType(final Datatype d, final SchemaModel sm, final SchemaComponent sc, final SchemaGenerator.UniqueId id, SchemaGenerator.PrimitiveCart pc) {<NEW_LINE>if (d != null) {<NEW_LINE>NamedComponentReference<GlobalSimpleType> ref = null;<NEW_LINE>if (isPrimitiveType(d)) {<NEW_LINE>ref = Sc...
(id.nextId()));
113,301
final CreateLoadBalancerPolicyResult executeCreateLoadBalancerPolicy(CreateLoadBalancerPolicyRequest createLoadBalancerPolicyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createLoadBalancerPolicyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetri...
addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
441,826
public void draw() throws Exception {<NEW_LINE>node("DeployAppDeciderNode");<NEW_LINE>node("DeployAppCreateComponentNode");<NEW_LINE>node("DeployAppCreateResourceAddonNode");<NEW_LINE>node("DeployAppCreateCustomAddonNode");<NEW_LINE>node("DeployAppWaitComponentNode");<NEW_LINE>node("DeployAppWaitAddonNode");<NEW_LINE>n...
.COMPONENT_TYPE, ComponentTypeEnum.CUSTOM_ADDON));
1,278,589
protected void serializeToByteBuffer(ByteBuffer buffer) {<NEW_LINE>buffer.put(rollback ? (byte) 1 : 0);<NEW_LINE>if (atomicOperationMetadataMap.size() > 0) {<NEW_LINE>for (final Map.Entry<String, OAtomicOperationMetadata<?>> entry : atomicOperationMetadataMap.entrySet()) {<NEW_LINE>if (entry.getKey().equals(ORecordOper...
IllegalStateException("Invalid metadata key " + ORecordOperationMetadata.RID_METADATA_KEY);
1,016,335
private CanonicalSubscription canonicalizeR4(IBaseResource theSubscription) {<NEW_LINE>org.hl7.fhir.r4.model.Subscription subscription = (org.hl7.fhir.r4.model.Subscription) theSubscription;<NEW_LINE>CanonicalSubscription retVal = new CanonicalSubscription();<NEW_LINE>retVal.setStatus(subscription.getStatus());<NEW_LIN...
getChannel().getEndpoint());
846,994
private static void testStringMethods() {<NEW_LINE>String string1 = "string1";<NEW_LINE>String whitespaceString = string1 + " ";<NEW_LINE>assertTrue(whitespaceString.trim().equals(string1));<NEW_LINE>whitespaceString = " " + string1 + " ";<NEW_LINE>assertTrue(whitespaceString.trim().equals(string1));<NEW_LINE>// subst...
2).equals("ring1"));
1,480,441
public boolean toolBarItemActivated(ToolBarItem item, long activationType, Object datasource) {<NEW_LINE>boolean isTableSelected = false;<NEW_LINE>if (tv instanceof TableViewImpl) {<NEW_LINE>isTableSelected = ((TableViewImpl) tv).isTableSelected();<NEW_LINE>}<NEW_LINE>if (!isTableSelected) {<NEW_LINE>UISWTViewCore acti...
).toArray(), false);
947,730
static Shape indexToView(TextLayout textLayout, Rectangle2D textLayoutBounds, int index, Position.Bias bias, int maxIndex, Shape alloc) {<NEW_LINE>if (textLayout == null) {<NEW_LINE>// Leave given bounds<NEW_LINE>return alloc;<NEW_LINE>}<NEW_LINE>assert // NOI18N<NEW_LINE>(maxIndex <= textLayout.getCharacterCount()) : ...
Math.min(index, maxIndex);
9,072
private void listProfiles(String[] args) throws CmdException {<NEW_LINE>if (args.length > 2)<NEW_LINE>throw new CmdSyntaxError();<NEW_LINE>ArrayList<Path> files = WURST.getHax().listProfiles();<NEW_LINE>int page = parsePage(args);<NEW_LINE>int pages = (int) Math.ceil(files.size() / 8.0);<NEW_LINE>pages = Math.max(pages...
= (page - 1) * 8;
541,818
public void create(IProject project, CommandLine commandLine) {<NEW_LINE>String[] args = commandLine.getValues(Options.ARGS_OPTION);<NEW_LINE>DefaultParser parser = new DefaultParser();<NEW_LINE>org.apache.commons.cli.Options options = new org.apache.commons.cli.Options();<NEW_LINE>options.addOption(Option.builder().ha...
get(info.getGrammarVersion());
504,713
final SetTopicAttributesResult executeSetTopicAttributes(SetTopicAttributesRequest setTopicAttributesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(setTopicAttributesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetri...
endClientExecution(awsRequestMetrics, request, response);
436,290
public void run(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception {<NEW_LINE>if (args.length < 2) {<NEW_LINE>throw new NotEnoughArgumentsException();<NEW_LINE>}<NEW_LINE>String message = getFinalArg(args, 1);<NEW_LINE>final boolean canWildcard = <MASK><NEW...
sender.isAuthorized("essentials.msg.multiple", ess);
665,026
protected void performDefaults() {<NEW_LINE>fMagicConnectorPolarity1Button.setSelection(getPreferenceStore().getDefaultBoolean(MAGIC_CONNECTOR_POLARITY));<NEW_LINE>fMagicConnectorPolarity2Button.setSelection(!getPreferenceStore().getDefaultBoolean(MAGIC_CONNECTOR_POLARITY));<NEW_LINE>fDoAntiAliasButton.setSelection(get...
().getDefaultBoolean(USE_LINE_JUMPS));
36,184
protected void createChannels(ActiveConfiguration newConfig) {<NEW_LINE>Map<Object, Object> chanProps;<NEW_LINE>Map<String, Object> udpOptions = GenericEndpointImpl.getUdpOptions();<NEW_LINE>// Endpoint<NEW_LINE>// define is a simple replace of the old value known to the endpointMgr<NEW_LINE>EndPointInfo ep = endpointM...
String) udpOptions.get("type");
1,499,010
protected Expression transformPropertyExpression(PropertyExpression pe) {<NEW_LINE>boolean itlp = isTopLevelProperty;<NEW_LINE>boolean ipe = inPropertyExpression;<NEW_LINE>Expression objectExpression = pe.getObjectExpression();<NEW_LINE>inPropertyExpression = true;<NEW_LINE>isTopLevelProperty = objectExpression<MASK><N...
.getClass() != PropertyExpression.class;
1,088,214
public EntityClassifier<EntityViewInfo> createNightViewClassifier() {<NEW_LINE>EntityClassifier<MASK><NEW_LINE>result.replaceRule("highway", "path", createWayInfo(1f / 100000, 1f / 3500, 38, UColor.YELLOW.darker(), 1));<NEW_LINE>result.replaceRule("highway", "track", createWayInfo(1f / 60000, 1f / 3500, 37, UColor.YELL...
<EntityViewInfo> result = createDefaultClassifier();
658,030
public void glVertexAttribPointer(int indx, int size, int type, boolean normalized, int stride, Buffer buffer) {<NEW_LINE>if (buffer instanceof ByteBuffer) {<NEW_LINE>if (type == GL_BYTE)<NEW_LINE>GLES20.glVertexAttribPointer(indx, size, type, normalized, stride, (ByteBuffer) buffer);<NEW_LINE>else if (type == GL_UNSIG...
).getName() + " with this method. Use ByteBuffer instead.");
278,296
private static boolean parseLayoutDirection(String name, ResTable_config out) {<NEW_LINE>if (Objects.equals(name, kWildcardName)) {<NEW_LINE>if (out != null) {<NEW_LINE>out.screenLayout = (out.screenLayout & ~ResTable_config.MASK_LAYOUTDIR) | ResTable_config.LAYOUTDIR_ANY;<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>} el...
ResTable_config.MASK_LAYOUTDIR) | ResTable_config.LAYOUTDIR_RTL;
870,538
/*<NEW_LINE>* (non-Javadoc)<NEW_LINE>*<NEW_LINE>* @see javax.jms.JMSContext#createDurableConsumer(javax.jms.Topic, java.lang.String, java.lang.String, boolean)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public JMSConsumer createDurableConsumer(Topic topic, String name, String messageSelector, boolean noLocal) throws Inval...
getJMS2Exception(jmse, JMSRuntimeException.class);
829,728
private void handle(final GetDownloadBitsFromKVMHostProgressMsg msg) {<NEW_LINE>HypervisorFactory f = getHypervisorFactoryByHostUuid(msg.getHostUuid());<NEW_LINE>HypervisorBackend <MASK><NEW_LINE>bkd.handle(msg, new ReturnValueCompletion<GetDownloadBitsFromKVMHostProgressReply>(msg) {<NEW_LINE><NEW_LINE>public void suc...
bkd = f.getHypervisorBackend(self);
432,008
private static int putMediaInfo(final serverObjects prop, final String[] wordArray, int c, final Map<AnchorURL, String> media, final String type, boolean dark, final String agentName) {<NEW_LINE>int i = 0;<NEW_LINE>for (final Map.Entry<AnchorURL, String> entry : media.entrySet()) {<NEW_LINE>// the name attribute<NEW_LI...
"viewMode_links_" + c + "_text", text);
428,097
private void loadNode224() throws IOException, SAXException {<NEW_LINE>PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.ConditionType_ConditionRefresh2_InputArguments, new QualifiedName(0, "InputArguments"), new LocalizedText("en", "InputArguments"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), ...
this.nodeManager.addNode(node);
1,192,363
public void testLocalMethodwithRemoteExAndSub() throws Exception {<NEW_LINE>SLRemoteExLocal remoteExLocal = lookupSLRemoteExBeanLocal();<NEW_LINE>// verify method with throws exception may be called without an exception<NEW_LINE>remoteExLocal.testMethodwithRemoteExAndSub("none");<NEW_LINE>try {<NEW_LINE>remoteExLocal.t...
Throwable rootex = ex.getCause();
160,556
private void addRow(List<String> row, boolean escapeText) {<NEW_LINE>StringBuilder builder = new StringBuilder();<NEW_LINE>// NON-NLS<NEW_LINE>builder.append("\t<tr>\n");<NEW_LINE>for (String cell : row) {<NEW_LINE>String cellText = escapeText ? EscapeUtil.escapeHtml(cell) : cell;<NEW_LINE>// NON-NLS<NEW_LINE>builder.a...
Level.SEVERE, "Failed to write row to out.", ex);
1,291,373
public static List<Integer> nextPermutation(List<Integer> perm) {<NEW_LINE>// Find the first entry from the right that is smaller than the entry<NEW_LINE>// immediately after it.<NEW_LINE>int inversionPoint = perm.size() - 2;<NEW_LINE>while (inversionPoint >= 0 && perm.get(inversionPoint) >= perm.get(inversionPoint + 1...
swap(perm, inversionPoint, i);
1,743,831
public int doStartTag() throws JspException {<NEW_LINE>if (log.isLoggable(Level.FINE)) {<NEW_LINE>log.fine("JSF 1.2 Spec : Create a new instance of the ActionListener");<NEW_LINE>}<NEW_LINE>ActionListener actionListener <MASK><NEW_LINE>UIComponentClassicTagBase tag = UIComponentClassicTagBase.getParentUIComponentClassi...
= new SetPropertyActionListener(target, value);
1,419,252
ActionResult<Wo> execute(HttpServletRequest request, HttpServletResponse response, EffectivePerson effectivePerson, String code) throws Exception {<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>String url...
find(personId, Person.class);
274,532
private Application updateApplicationWithJobStatusCV(Application app, JobStatusCV jobStatus) {<NEW_LINE>// infer the final flink job state<NEW_LINE>Enumeration.Value state = jobStatus.jobState();<NEW_LINE>Enumeration.Value preState = toK8sFlinkJobState(FlinkAppState.of(app.getState()));<NEW_LINE>state = FlinkJobStatusW...
setTotalTask(jobStatus.taskTotal());
640,990
private static Vector combineServerIntLongRowSplits(List<ServerRow> rowSplits, MatrixMeta matrixMeta, int rowIndex) {<NEW_LINE>int colNum = <MASK><NEW_LINE>int elemNum = 0;<NEW_LINE>int size = rowSplits.size();<NEW_LINE>for (int i = 0; i < size; i++) {<NEW_LINE>elemNum += rowSplits.get(i).size();<NEW_LINE>}<NEW_LINE>In...
(int) matrixMeta.getColNum();
1,818,508
public static WorkflowStepResult parseResponse(String externalData) {<NEW_LINE>try (StringReader reader = new StringReader(externalData)) {<NEW_LINE>JsonObject response = Json.createReader(reader).readObject();<NEW_LINE>String status = null;<NEW_LINE>// Lower case is documented, upper case is deprecated<NEW_LINE>if (re...
return new Failure(reason, message);
1,693,865
private BsonDocument generateTimer(Timer timer) {<NEW_LINE>var document = new BsonDocument();<NEW_LINE>final var snapshot = timer.getSnapshot();<NEW_LINE>document.append("count", new BsonInt64(timer.getCount()));<NEW_LINE>document.append("max", new BsonDouble(snapshot.getMax() * durationFactor));<NEW_LINE>document.appe...
.getFifteenMinuteRate() * rateFactor));
371,028
public static Supplier<BinaryData> createBinaryDataSupplier(CorePerfStressOptions options) {<NEW_LINE>switch(options.getBinaryDataSource()) {<NEW_LINE>case BYTES:<NEW_LINE>byte[] bytes = new byte[(int) options.getSize()];<NEW_LINE>new <MASK><NEW_LINE>return () -> BinaryData.fromBytes(bytes);<NEW_LINE>case FILE:<NEW_LIN...
Random().nextBytes(bytes);
106,730
SchemaGrant createDatabaseSchema(final App app, final AbstractSchemaNode schemaNode) throws FrameworkException {<NEW_LINE>final PropertyMap getOrCreateProperties = new PropertyMap();<NEW_LINE>final PropertyMap updateProperties = new PropertyMap();<NEW_LINE>final List<Principal> principals = app.nodeQuery(Principal.clas...
SchemaGrant.allowAccessControl, getAllowAccessControl());
1,322,529
public void visitElement(@NotNull PsiElement element) {<NEW_LINE>if (hasFragments.get()) {<NEW_LINE>// done<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (element instanceof GraphQLDefinition) {<NEW_LINE>if (element instanceof GraphQLFragmentDefinition) {<NEW_LINE>hasFragments.set(true);<NEW_LINE>}<NEW_LINE>// no need to vis...
getInstance(element.getProject());
584,213
public CalculateRouteCarModeOptions unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AwsJsonReader reader = context.getReader();<NEW_LINE>if (!reader.isContainer()) {<NEW_LINE>reader.skipValue();<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>CalculateRouteCarModeOptions calculateRouteCarModeOptions =...
().unmarshall(context));