idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
1,247,638
final StartMatchmakingResult executeStartMatchmaking(StartMatchmakingRequest startMatchmakingRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(startMatchmakingRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<StartMatchmakingRequest> request = null;<NEW_LINE>Response<StartMatchmakingResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new StartMatchmakingRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(startMatchmakingRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "GameLift");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StartMatchmaking");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<StartMatchmakingResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StartMatchmakingResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
HandlerContextKey.SIGNING_REGION, getSigningRegion());
1,643,782
final PutFeedbackResult executePutFeedback(PutFeedbackRequest putFeedbackRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(putFeedbackRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<PutFeedbackRequest> request = null;<NEW_LINE>Response<PutFeedbackResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new PutFeedbackRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(putFeedbackRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "DevOps Guru");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutFeedback");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<PutFeedbackResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new PutFeedbackResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
121,116
public boolean onOptionsItemSelected(final MenuItem item) {<NEW_LINE>// handle my own menus<NEW_LINE>switch(item.getItemId()) {<NEW_LINE>case CONTEXT_MENU_SHORTCUT:<NEW_LINE>{<NEW_LINE>AdapterContextMenuInfo info = (AdapterContextMenuInfo) item.getMenuInfo();<NEW_LINE>final Intent shortcutIntent = item.getIntent();<NEW_LINE>FilterListItem filter = ((FilterAdapter.ViewHolder) info.<MASK><NEW_LINE>if (filter instanceof Filter)<NEW_LINE>showCreateShortcutDialog(getActivity(), shortcutIntent, (Filter) filter);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>case CONTEXT_MENU_INTENT:<NEW_LINE>{<NEW_LINE>Intent intent = item.getIntent();<NEW_LINE>getActivity().startActivityForResult(intent, REQUEST_CUSTOM_INTENT);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>default:<NEW_LINE>{<NEW_LINE>TaskListFragment tasklist = (TaskListFragment) getActivity().getSupportFragmentManager().findFragmentByTag(TaskListFragment.TAG_TASKLIST_FRAGMENT);<NEW_LINE>if (tasklist != null && tasklist.isInLayout())<NEW_LINE>return tasklist.onOptionsItemSelected(item);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
targetView.getTag()).item;
385,143
final UpdateJobShipmentStateResult executeUpdateJobShipmentState(UpdateJobShipmentStateRequest updateJobShipmentStateRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateJobShipmentStateRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UpdateJobShipmentStateRequest> request = null;<NEW_LINE>Response<UpdateJobShipmentStateResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UpdateJobShipmentStateRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateJobShipmentStateRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Snowball");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateJobShipmentState");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UpdateJobShipmentStateResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(<MASK><NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
false), new UpdateJobShipmentStateResultJsonUnmarshaller());
1,790,215
final UpdateObjectAttributesResult executeUpdateObjectAttributes(UpdateObjectAttributesRequest updateObjectAttributesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateObjectAttributesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UpdateObjectAttributesRequest> request = null;<NEW_LINE>Response<UpdateObjectAttributesResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UpdateObjectAttributesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateObjectAttributesRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "CloudDirectory");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateObjectAttributes");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UpdateObjectAttributesResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateObjectAttributesResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
endClientExecution(awsRequestMetrics, request, response);
726,097
/*<NEW_LINE>* (non-Javadoc)<NEW_LINE>*<NEW_LINE>* @see<NEW_LINE>* com.sitewhere.grpc.service.DeviceManagementGrpc.DeviceManagementImplBase#<NEW_LINE>* listDeviceGroups(com.sitewhere.grpc.service.GListDeviceGroupsRequest,<NEW_LINE>* io.grpc.stub.StreamObserver)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void listDeviceGroups(GListDeviceGroupsRequest request, StreamObserver<GListDeviceGroupsResponse> responseObserver) {<NEW_LINE>try {<NEW_LINE>GrpcUtils.handleServerMethodEntry(this, DeviceManagementGrpc.getListDeviceGroupsMethod());<NEW_LINE>ISearchResults<? extends IDeviceGroup> apiResult = getDeviceManagement().listDeviceGroups(CommonModelConverter.asApiSearchCriteria(request.getCriteria().getPaging()));<NEW_LINE>GListDeviceGroupsResponse.Builder response = GListDeviceGroupsResponse.newBuilder();<NEW_LINE>GDeviceGroupSearchResults.Builder results = GDeviceGroupSearchResults.newBuilder();<NEW_LINE>for (IDeviceGroup apiGroup : apiResult.getResults()) {<NEW_LINE>results.addDeviceGroups(DeviceModelConverter.asGrpcDeviceGroup(apiGroup));<NEW_LINE>}<NEW_LINE>results.setCount(apiResult.getNumResults());<NEW_LINE>response.<MASK><NEW_LINE>responseObserver.onNext(response.build());<NEW_LINE>responseObserver.onCompleted();<NEW_LINE>} catch (Throwable e) {<NEW_LINE>GrpcUtils.handleServerMethodException(DeviceManagementGrpc.getListDeviceGroupsMethod(), e, responseObserver);<NEW_LINE>} finally {<NEW_LINE>GrpcUtils.handleServerMethodExit(DeviceManagementGrpc.getListDeviceGroupsMethod());<NEW_LINE>}<NEW_LINE>}
setResults(results.build());
675,091
public boolean apply(Game game, Ability source) {<NEW_LINE>Player player = game.getPlayer(source.getControllerId());<NEW_LINE>Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId());<NEW_LINE>if (player == null || sourcePermanent == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (player.getLibrary().hasCards()) {<NEW_LINE>Card card = player.getLibrary().getFromTop(game);<NEW_LINE>if (card == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Cards cards = new CardsImpl();<NEW_LINE>cards.add(card);<NEW_LINE>player.lookAtCards(sourcePermanent.getName(), cards, game);<NEW_LINE>if (player.chooseUse(Outcome.DrawCard, "Reveal the top card of your library?", source, game)) {<NEW_LINE>player.revealCards(sourcePermanent.<MASK><NEW_LINE>if (filter.match(card, game)) {<NEW_LINE>return new TransformSourceEffect().apply(game, source);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
getName(), cards, game);
1,353,175
private String outputModifiedBitmap(Bitmap bitmap, Uri uri, String mimeTypeOfOriginalFile) throws IOException {<NEW_LINE>// Some content: URIs do not map to file paths (e.g. picasa).<NEW_LINE>String realPath = FileHelper.<MASK><NEW_LINE>String fileName = calculateModifiedBitmapOutputFileName(mimeTypeOfOriginalFile, realPath);<NEW_LINE>String modifiedPath = getTempDirectoryPath() + "/" + fileName;<NEW_LINE>OutputStream os = new FileOutputStream(modifiedPath);<NEW_LINE>CompressFormat compressFormat = getCompressFormatForEncodingType(this.encodingType);<NEW_LINE>bitmap.compress(compressFormat, this.mQuality, os);<NEW_LINE>os.close();<NEW_LINE>if (exifData != null && this.encodingType == JPEG) {<NEW_LINE>try {<NEW_LINE>if (this.correctOrientation && this.orientationCorrected) {<NEW_LINE>exifData.resetOrientation();<NEW_LINE>}<NEW_LINE>exifData.createOutFile(modifiedPath);<NEW_LINE>exifData.writeExifData();<NEW_LINE>exifData = null;<NEW_LINE>} catch (IOException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return modifiedPath;<NEW_LINE>}
getRealPath(uri, this.cordova);
669,696
public void readCustomNBT(CompoundTag nbt, boolean descPacket) {<NEW_LINE>int[] <MASK><NEW_LINE>for (int i = 0; i < 6; ++i) {<NEW_LINE>Direction curDir = Direction.from3DDataValue(i);<NEW_LINE>if (i < config.length) {<NEW_LINE>boolean connected = config[i] != 0;<NEW_LINE>sideConfig.put(curDir, connected);<NEW_LINE>if (connected)<NEW_LINE>setValidHandler(curDir);<NEW_LINE>else<NEW_LINE>invalidateHandler(curDir);<NEW_LINE>} else {<NEW_LINE>sideConfig.put(curDir, false);<NEW_LINE>invalidateHandler(curDir);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>cover = ForgeRegistries.BLOCKS.getValue(new ResourceLocation(nbt.getString("cover")));<NEW_LINE>DyeColor oldColor = color;<NEW_LINE>if (nbt.contains("color", NBT.TAG_INT))<NEW_LINE>color = DyeColor.byId(nbt.getInt("color"));<NEW_LINE>else<NEW_LINE>color = null;<NEW_LINE>byte oldConns = connections;<NEW_LINE>connections = nbt.getByte("connections");<NEW_LINE>if (level != null && level.isClientSide && (connections != oldConns || color != oldColor)) {<NEW_LINE>BlockState state = level.getBlockState(worldPosition);<NEW_LINE>level.sendBlockUpdated(worldPosition, state, state, 3);<NEW_LINE>}<NEW_LINE>}
config = nbt.getIntArray("sideConfig");
1,115,699
public int run(String launcherVersion, String launcherMd5, ServerUrlGenerator urlGenerator, Map<String, String> environmentVariables, Map context) {<NEW_LINE>String agentProcessParentClassName = JarUtil.getManifestKey(Downloader.AGENT_BINARY_JAR, GO_AGENT_BOOTSTRAP_CLASS);<NEW_LINE>String tempDirSuffix = new BigInteger(64, new SecureRandom()).toString(16) + "-" + Downloader.AGENT_BINARY_JAR;<NEW_LINE>File tempDir = new File(FileUtil.TMP_PARENT_DIR, "deps-" + tempDirSuffix);<NEW_LINE>try {<NEW_LINE>try (URLClassLoader urlClassLoader = JarUtil.getClassLoaderFromJar(Downloader.AGENT_BINARY_JAR, jarEntryFilter(), tempDir, this.getClass().getClassLoader())) {<NEW_LINE>Class<?> <MASK><NEW_LINE>AgentProcessParent agentProcessParent = (AgentProcessParent) aClass.getDeclaredConstructor().newInstance();<NEW_LINE>return agentProcessParent.run(launcherVersion, launcherMd5, urlGenerator, environmentVariables, context);<NEW_LINE>} catch (ReflectiveOperationException | IOException e) {<NEW_LINE>throw new RuntimeException(e);<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>FileUtils.deleteQuietly(tempDir);<NEW_LINE>}<NEW_LINE>}
aClass = urlClassLoader.loadClass(agentProcessParentClassName);
1,264,585
public static OpenTag query(Node base, String path, boolean caseInsensitive) {<NEW_LINE>StringTokenizer st = new StringTokenizer(path, Character.toString(ELEMENT_PATH_ELEMENTS_DELIMITER));<NEW_LINE>Node found = base;<NEW_LINE>while (st.hasMoreTokens()) {<NEW_LINE>String token = st.nextToken();<NEW_LINE>int indexDelim = token.indexOf(ELEMENT_PATH_INDEX_DELIMITER);<NEW_LINE>String nodeName = indexDelim >= 0 ? token.substring(0, indexDelim) : token;<NEW_LINE>if (caseInsensitive) {<NEW_LINE>nodeName = <MASK><NEW_LINE>}<NEW_LINE>String sindex = indexDelim >= 0 ? token.substring(indexDelim + 1, token.length()) : "0";<NEW_LINE>int index = Integer.parseInt(sindex);<NEW_LINE>int count = 0;<NEW_LINE>OpenTag foundLocal = null;<NEW_LINE>for (Element child : found.children(ElementType.OPEN_TAG)) {<NEW_LINE>OpenTag openTag = (OpenTag) child;<NEW_LINE>if (LexerUtils.equals(openTag.name(), nodeName, caseInsensitive, false) && count++ == index) {<NEW_LINE>foundLocal = openTag;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (foundLocal != null) {<NEW_LINE>found = foundLocal;<NEW_LINE>if (!st.hasMoreTokens()) {<NEW_LINE>// last token, we may return<NEW_LINE>OpenTag openTag = (OpenTag) found;<NEW_LINE>assert LexerUtils.equals(openTag.name(), nodeName, false, false);<NEW_LINE>return openTag;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// no found<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
nodeName.toLowerCase(Locale.ENGLISH);
50,402
public static boolean isAllVariablesDefined(Evaluatee source, String logic) {<NEW_LINE>if (logic == null || logic.length() == 0)<NEW_LINE>return true;<NEW_LINE>//<NEW_LINE>int pos = 0;<NEW_LINE>while (pos < logic.length()) {<NEW_LINE>int first = logic.indexOf('@', pos);<NEW_LINE>if (first == -1)<NEW_LINE>return true;<NEW_LINE>int second = logic.<MASK><NEW_LINE>if (second == -1) {<NEW_LINE>s_log.error("No second @ in Logic: " + logic);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>String variable = logic.substring(first + 1, second - 1);<NEW_LINE>String eval = getValue(source, variable);<NEW_LINE>s_log.trace(variable + "=" + eval);<NEW_LINE>if (eval == null || eval.length() == 0)<NEW_LINE>return false;<NEW_LINE>//<NEW_LINE>pos = second + 1;<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
indexOf('@', first + 1);
1,707,169
public static void main(String[] args) {<NEW_LINE>int n;<NEW_LINE>Scanner sc = new Scanner(System.in);<NEW_LINE>System.out.println();<NEW_LINE>// Taking Array size from the user<NEW_LINE>System.out.print("Enter the size of array: ");<NEW_LINE>n = sc.nextInt();<NEW_LINE>int[] arr = new int[n];<NEW_LINE>System.out.println();<NEW_LINE>// taking array input from the user using loop<NEW_LINE>System.out.println("Enter the elements of the array: ");<NEW_LINE>for (int i = 0; i < n; i++) {<NEW_LINE>arr[<MASK><NEW_LINE>}<NEW_LINE>// printing out the array elements using for loop<NEW_LINE>System.out.print("\nArray elements (before sorting): ");<NEW_LINE>for (int i = 0; i < n; i++) {<NEW_LINE>System.out.print(arr[i] + " ");<NEW_LINE>}<NEW_LINE>// passing root value for creating Binary tree<NEW_LINE>Tree_Sort tree = new Tree_Sort(arr[0]);<NEW_LINE>// inserting values in tree<NEW_LINE>for (int num : arr) {<NEW_LINE>tree.insert(num, tree.root);<NEW_LINE>}<NEW_LINE>// printing sorted array<NEW_LINE>System.out.print("Array elements (after sorting): ");<NEW_LINE>tree.inOrder(tree.root);<NEW_LINE>System.out.println();<NEW_LINE>}
i] = sc.nextInt();
1,475,639
private static void buildFileForCompliance(String file, int length, String[] tokens) {<NEW_LINE>byte[] result = new byte[length * 8];<NEW_LINE>for (int i = 0; i < tokens.length; i = i + 3) {<NEW_LINE>if ("2".equals(tokens[i])) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>int index = Integer.parseInt(tokens[i + 1]);<NEW_LINE>String token = tokens[i + 2].trim();<NEW_LINE>long compliance = 0;<NEW_LINE>if ("1.4".equals(token)) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>compliance = ClassFileConstants.JDK1_4;<NEW_LINE>} else if ("1.5".equals(token)) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>compliance = ClassFileConstants.JDK1_5;<NEW_LINE>} else if ("1.6".equals(token)) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>compliance = ClassFileConstants.JDK1_6;<NEW_LINE>} else if ("1.7".equals(token)) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>compliance = ClassFileConstants.JDK1_7;<NEW_LINE>} else if ("1.8".equals(token)) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>compliance = ClassFileConstants.JDK1_8;<NEW_LINE>} else if ("9".equals(token)) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>compliance = ClassFileConstants.JDK9;<NEW_LINE>} else if ("recovery".equals(token)) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>compliance = ClassFileConstants.JDK_DEFERRED;<NEW_LINE>}<NEW_LINE>int j = index * 8;<NEW_LINE>result[j] = (byte) (compliance >>> 56);<NEW_LINE>result[j + 1] = (byte) (compliance >>> 48);<NEW_LINE>result[j + 2] = (byte) (compliance >>> 40);<NEW_LINE>result[j + 3] = (byte<MASK><NEW_LINE>result[j + 4] = (byte) (compliance >>> 24);<NEW_LINE>result[j + 5] = (byte) (compliance >>> 16);<NEW_LINE>result[j + 6] = (byte) (compliance >>> 8);<NEW_LINE>result[j + 7] = (byte) (compliance);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>buildFileForTable(file, result);<NEW_LINE>}
) (compliance >>> 32);
1,591,471
private static int readSimpleHuffmanCode(int alphabetSizeMax, int alphabetSizeLimit, int[] tableGroup, int tableIdx, State s) {<NEW_LINE>// TODO(eustas): Avoid allocation?<NEW_LINE>int[] codeLengths = new int[alphabetSizeLimit];<NEW_LINE>int[] symbols = new int[4];<NEW_LINE>int maxBits = 1 + log2floor(alphabetSizeMax - 1);<NEW_LINE>int numSymbols = BitReader.readFewBits(s, 2) + 1;<NEW_LINE>for (int i = 0; i < numSymbols; i++) {<NEW_LINE>BitReader.fillBitWindow(s);<NEW_LINE>int symbol = BitReader.readFewBits(s, maxBits);<NEW_LINE>if (symbol >= alphabetSizeLimit) {<NEW_LINE>// COV_NF_LINE<NEW_LINE>throw new BrotliRuntimeException("Can't readHuffmanCode");<NEW_LINE>}<NEW_LINE>symbols[i] = symbol;<NEW_LINE>}<NEW_LINE>checkDupes(symbols, numSymbols);<NEW_LINE>int histogramId = numSymbols;<NEW_LINE>if (numSymbols == 4) {<NEW_LINE>histogramId += BitReader.readFewBits(s, 1);<NEW_LINE>}<NEW_LINE>switch(histogramId) {<NEW_LINE>case 1:<NEW_LINE>codeLengths[symbols[0]] = 1;<NEW_LINE>break;<NEW_LINE>case 2:<NEW_LINE>codeLengths[symbols[0]] = 1;<NEW_LINE>codeLengths[symbols[1]] = 1;<NEW_LINE>break;<NEW_LINE>case 3:<NEW_LINE>codeLengths[symbols[0]] = 1;<NEW_LINE>codeLengths[symbols[1]] = 2;<NEW_LINE>codeLengths[symbols[2]] = 2;<NEW_LINE>break;<NEW_LINE>case // uniform 4-symbol histogram<NEW_LINE>4:<NEW_LINE>codeLengths[symbols[0]] = 2;<NEW_LINE>codeLengths<MASK><NEW_LINE>codeLengths[symbols[2]] = 2;<NEW_LINE>codeLengths[symbols[3]] = 2;<NEW_LINE>break;<NEW_LINE>case // prioritized 4-symbol histogram<NEW_LINE>5:<NEW_LINE>codeLengths[symbols[0]] = 1;<NEW_LINE>codeLengths[symbols[1]] = 2;<NEW_LINE>codeLengths[symbols[2]] = 3;<NEW_LINE>codeLengths[symbols[3]] = 3;<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>// TODO(eustas): Use specialized version?<NEW_LINE>return Huffman.buildHuffmanTable(tableGroup, tableIdx, HUFFMAN_TABLE_BITS, codeLengths, alphabetSizeLimit);<NEW_LINE>}
[symbols[1]] = 2;
658,109
public boolean apply(Game game, Ability source) {<NEW_LINE>Player targetPlayer = game.getPlayer(getTargetPointer().getFirst(game, source));<NEW_LINE>if (targetPlayer != null) {<NEW_LINE>ContinuousEffect effect = new GainControlTargetEffect(Duration.EndOfTurn, targetPlayer.getId());<NEW_LINE>effect.setTargetPointer(new SecondTargetPointer());<NEW_LINE>effect.setText("Target player gains control of up to three target nonattacking creatures until end of turn");<NEW_LINE><MASK><NEW_LINE>Effect effect2 = new UntapTargetEffect();<NEW_LINE>effect2.setTargetPointer(new SecondTargetPointer());<NEW_LINE>effect2.setText("Untap those creatures");<NEW_LINE>effect2.apply(game, source);<NEW_LINE>RequirementEffect effect3 = new BlocksIfAbleTargetEffect(Duration.EndOfTurn);<NEW_LINE>effect3.setTargetPointer(new SecondTargetPointer());<NEW_LINE>effect3.setText("They block this turn if able");<NEW_LINE>game.addEffect(effect3, source);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
game.addEffect(effect, source);
1,526,556
public WebSocket write(AtmosphereResponse r, String data) throws IOException {<NEW_LINE>firstWrite.set(true);<NEW_LINE>if (data == null) {<NEW_LINE>logger.<MASK><NEW_LINE>return this;<NEW_LINE>}<NEW_LINE>if (!isOpen())<NEW_LINE>throw new IOException("Connection remotely closed for " + uuid);<NEW_LINE>logger.trace("WebSocket.write() {}", data);<NEW_LINE>boolean transform = !filters.isEmpty() && r.getStatus() < 400;<NEW_LINE>if (binaryWrite) {<NEW_LINE>byte[] b = data.getBytes(resource().getResponse().getCharacterEncoding());<NEW_LINE>if (transform) {<NEW_LINE>b = transform(r, b, 0, b.length);<NEW_LINE>}<NEW_LINE>if (b != null) {<NEW_LINE>write(b, 0, b.length);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (transform) {<NEW_LINE>byte[] b = data.getBytes(resource().getResponse().getCharacterEncoding());<NEW_LINE>data = new String(transform(r, b, 0, b.length), r.getCharacterEncoding());<NEW_LINE>}<NEW_LINE>if (data != null) {<NEW_LINE>write(data);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>lastWrite = System.currentTimeMillis();<NEW_LINE>return this;<NEW_LINE>}
error("Cannot write null value for {}", resource());
1,526,399
private void extractJavaDoc(Class<?> clazz) {<NEW_LINE>ASTParser parser = ASTParser.newParser(AST.JLS4);<NEW_LINE>parser.setSource(sourceCodeFetcher.get(clazz).toCharArray());<NEW_LINE>parser.setKind(ASTParser.K_COMPILATION_UNIT);<NEW_LINE>final CompilationUnit cu = (CompilationUnit) parser.createAST(null);<NEW_LINE>cu.accept(new ASTVisitor() {<NEW_LINE><NEW_LINE>MethodDeclaration currentMethod = null;<NEW_LINE><NEW_LINE>public boolean visit(Javadoc javaDoc) {<NEW_LINE>if (currentMethod != null) {<NEW_LINE>SMethod method = getSMethod(currentMethod.getName().getIdentifier());<NEW_LINE>if (method == null) {<NEW_LINE>LOGGER.error("Method " + currentMethod.getName(<MASK><NEW_LINE>} else {<NEW_LINE>for (Object tag : javaDoc.tags()) {<NEW_LINE>if (tag instanceof TagElement) {<NEW_LINE>TagElement tagElement = (TagElement) tag;<NEW_LINE>String tagName = tagElement.getTagName() == null ? null : tagElement.getTagName().trim();<NEW_LINE>if ("@param".equals(tagName)) {<NEW_LINE>SParameter parameter = null;<NEW_LINE>for (int i = 0; i < tagElement.fragments().size(); i++) {<NEW_LINE>Object fragment = tagElement.fragments().get(i);<NEW_LINE>if (i == 0 && fragment instanceof SimpleName) {<NEW_LINE>parameter = method.getParameter(((SimpleName) fragment).getIdentifier());<NEW_LINE>} else if (i == 1 && parameter != null && fragment instanceof TextElement) {<NEW_LINE>parameter.setDoc(((TextElement) fragment).getText());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else if ("@return".equals(tagName)) {<NEW_LINE>method.setReturnDoc(extractFullText(tagElement));<NEW_LINE>} else if ("@throws".equals(tagName)) {<NEW_LINE>} else {<NEW_LINE>method.setDoc(extractFullText(tagElement));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return super.visit(javaDoc);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public boolean visit(MethodDeclaration node) {<NEW_LINE>currentMethod = node;<NEW_LINE>return super.visit(node);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void endVisit(MethodDeclaration node) {<NEW_LINE>currentMethod = null;<NEW_LINE>super.endVisit(node);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
).getIdentifier() + " not found in class");
1,658,661
public void apply(Project project) {<NEW_LINE>Provider<ValidateJsonAgainstSchemaTask> validateRestSpecTask = project.getTasks().register("validateRestSpec", ValidateJsonAgainstSchemaTask.class, task -> {<NEW_LINE>task.setInputFiles(Util.getJavaTestAndMainSourceResources(project, filter -> {<NEW_LINE>filter.include(DOUBLE_STAR + "/rest-api-spec/api/" + DOUBLE_STAR + "/*.json");<NEW_LINE>filter.exclude(DOUBLE_STAR + "/_common.json");<NEW_LINE>}));<NEW_LINE>// This must always be specified precisely, so that<NEW_LINE>// projects other than `rest-api-spec` can use this task.<NEW_LINE>task.setJsonSchema(new File(project.getRootDir(), "rest-api-spec/src/main/resources/schema.json"));<NEW_LINE>task.setReport(new File(project.getBuildDir(), "reports/validateJson.txt"));<NEW_LINE>});<NEW_LINE>Provider<ValidateJsonNoKeywordsTask> validateNoKeywordsTask = project.getTasks().register("validateNoKeywords", ValidateJsonNoKeywordsTask.class, task -> {<NEW_LINE>task.setInputFiles(Util.getJavaTestAndMainSourceResources(project, filter -> {<NEW_LINE>filter.include(<MASK><NEW_LINE>filter.exclude(DOUBLE_STAR + "/_common.json");<NEW_LINE>}));<NEW_LINE>task.setJsonKeywords(new File(project.getRootDir(), "rest-api-spec/keywords.json"));<NEW_LINE>task.setReport(new File(project.getBuildDir(), "reports/validateKeywords.txt"));<NEW_LINE>// There's no point running this task if the schema validation fails<NEW_LINE>task.mustRunAfter(validateRestSpecTask);<NEW_LINE>});<NEW_LINE>project.getTasks().named("precommit").configure(t -> t.dependsOn(validateRestSpecTask, validateNoKeywordsTask));<NEW_LINE>}
DOUBLE_STAR + "/rest-api-spec/api/" + DOUBLE_STAR + "/*.json");
360,063
public IRubyObject op_aset(ThreadContext context, IRubyObject arg0, IRubyObject arg1) {<NEW_LINE>if (arg0 instanceof RubyFixnum) {<NEW_LINE>return op_aset(context, RubyNumeric.fix2int((RubyFixnum) arg0), arg1);<NEW_LINE>} else if (arg0 instanceof RubyRegexp) {<NEW_LINE>subpatSet(context, (RubyRegexp) arg0, null, arg1);<NEW_LINE>return arg1;<NEW_LINE>} else if (arg0 instanceof RubyString) {<NEW_LINE>RubyString orig = (RubyString) arg0;<NEW_LINE>int beg = StringSupport.index(this, orig, 0, checkEncoding(orig));<NEW_LINE>if (beg < 0)<NEW_LINE>throw context.runtime.newIndexError("string not matched");<NEW_LINE>beg = subLength(beg);<NEW_LINE>replaceInternal19(beg, orig.strLength(), arg1.convertToString());<NEW_LINE>return arg1;<NEW_LINE>} else if (arg0 instanceof RubyRange) {<NEW_LINE>int[] begLen = ((RubyRange) arg0).begLenInt(strLength(), 2);<NEW_LINE>replaceInternal19(begLen[0], begLen[1], arg1.convertToString());<NEW_LINE>return arg1;<NEW_LINE>} else {<NEW_LINE>StringSites sites = sites(context);<NEW_LINE>if (RubyRange.isRangeLike(context, arg0, sites.respond_to_begin, sites.respond_to_end)) {<NEW_LINE>RubyRange rng = RubyRange.rangeFromRangeLike(context, arg0, sites.begin, sites.end, sites.exclude_end);<NEW_LINE>int[] begLen = rng.begLenInt(strLength(), 2);<NEW_LINE>replaceInternal19(begLen[0], begLen[1], arg1.convertToString());<NEW_LINE>return arg1;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return op_aset(context, RubyNumeric<MASK><NEW_LINE>}
.num2int(arg0), arg1);
612,159
public Object lookup(String name) throws NamingException {<NEW_LINE>final String methodName = "lookup(): ";<NEW_LINE>name = CorbanameUrlContextFactory.Escaper.escapeCorbanameUrlIfNecessary(name);<NEW_LINE>if (tc.isDebugEnabled())<NEW_LINE>Tr.debug(tc, methodName + "");<NEW_LINE>org.omg.CORBA.Object result = orb.string_to_object(name);<NEW_LINE>if (tc.isDebugEnabled())<NEW_LINE>Tr.debug(tc, methodName + ": orb.string_to_object() returned " + result);<NEW_LINE>try {<NEW_LINE>if ((result instanceof NamingContext) || result._is_a(NamingContextHelper.id())) {<NEW_LINE>if (tc.isDebugEnabled())<NEW_LINE>Tr.debug(tc, methodName + "result seems to be a naming context - narrowing");<NEW_LINE>NamingContext cosCtx = NamingContextHelper.unchecked_narrow(result);<NEW_LINE>return new JndiCosNamingContext(name, cosCtx, environment);<NEW_LINE>}<NEW_LINE>} catch (NO_IMPLEMENT e) {<NEW_LINE>if (tc.isDebugEnabled())<NEW_LINE>Tr.debug(<MASK><NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
tc, methodName + ": " + e);
1,517,773
final UpdateSecurityGroupRuleDescriptionsIngressResult executeUpdateSecurityGroupRuleDescriptionsIngress(UpdateSecurityGroupRuleDescriptionsIngressRequest updateSecurityGroupRuleDescriptionsIngressRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateSecurityGroupRuleDescriptionsIngressRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UpdateSecurityGroupRuleDescriptionsIngressRequest> request = null;<NEW_LINE>Response<UpdateSecurityGroupRuleDescriptionsIngressResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UpdateSecurityGroupRuleDescriptionsIngressRequestMarshaller().marshall<MASK><NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EC2");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateSecurityGroupRuleDescriptionsIngress");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<UpdateSecurityGroupRuleDescriptionsIngressResult> responseHandler = new StaxResponseHandler<UpdateSecurityGroupRuleDescriptionsIngressResult>(new UpdateSecurityGroupRuleDescriptionsIngressResultStaxUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
(super.beforeMarshalling(updateSecurityGroupRuleDescriptionsIngressRequest));
11,847
private List<SqlArgument> buildAllParams(final List<SqlArgument> argTypeList, final AggregateFunctionInitArguments initArgs) {<NEW_LINE>if (initArgs.args().isEmpty()) {<NEW_LINE>return argTypeList;<NEW_LINE>}<NEW_LINE>final List<SqlArgument> allParams = new ArrayList<>(argTypeList.size() + initArgs.args().size());<NEW_LINE>allParams.addAll(argTypeList);<NEW_LINE>for (final Object arg : initArgs.args()) {<NEW_LINE>if (arg == null) {<NEW_LINE>allParams.add(null);<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>final SqlBaseType baseType = SchemaConverters.javaToSqlConverter().toSqlType(arg.getClass());<NEW_LINE>try {<NEW_LINE>// Only primitive types currently supported:<NEW_LINE>final SqlPrimitiveType primitiveType = SqlPrimitiveType.of(baseType);<NEW_LINE>allParams.add(SqlArgument.of(primitiveType));<NEW_LINE>} catch (final Exception e) {<NEW_LINE>throw new KsqlFunctionException("Only primitive init arguments are supported by UDAF " + getName(<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>return allParams;<NEW_LINE>}
) + ", but got " + arg, e);
940,915
public static DescribeInstanceSpecificationsResponse unmarshall(DescribeInstanceSpecificationsResponse describeInstanceSpecificationsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeInstanceSpecificationsResponse.setRequestId(_ctx.stringValue("DescribeInstanceSpecificationsResponse.RequestId"));<NEW_LINE>describeInstanceSpecificationsResponse.setCode(_ctx.stringValue("DescribeInstanceSpecificationsResponse.Code"));<NEW_LINE>describeInstanceSpecificationsResponse.setMessage(_ctx.stringValue("DescribeInstanceSpecificationsResponse.Message"));<NEW_LINE>describeInstanceSpecificationsResponse.setSuccess<MASK><NEW_LINE>describeInstanceSpecificationsResponse.setErrorCode(_ctx.stringValue("DescribeInstanceSpecificationsResponse.ErrorCode"));<NEW_LINE>describeInstanceSpecificationsResponse.setTraceId(_ctx.stringValue("DescribeInstanceSpecificationsResponse.TraceId"));<NEW_LINE>List<DataItem> data = new ArrayList<DataItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeInstanceSpecificationsResponse.Data.Length"); i++) {<NEW_LINE>DataItem dataItem = new DataItem();<NEW_LINE>dataItem.setCpu(_ctx.integerValue("DescribeInstanceSpecificationsResponse.Data[" + i + "].Cpu"));<NEW_LINE>dataItem.setEnable(_ctx.booleanValue("DescribeInstanceSpecificationsResponse.Data[" + i + "].Enable"));<NEW_LINE>dataItem.setId(_ctx.integerValue("DescribeInstanceSpecificationsResponse.Data[" + i + "].Id"));<NEW_LINE>dataItem.setMemory(_ctx.integerValue("DescribeInstanceSpecificationsResponse.Data[" + i + "].Memory"));<NEW_LINE>dataItem.setSpecInfo(_ctx.stringValue("DescribeInstanceSpecificationsResponse.Data[" + i + "].SpecInfo"));<NEW_LINE>dataItem.setVersion(_ctx.integerValue("DescribeInstanceSpecificationsResponse.Data[" + i + "].Version"));<NEW_LINE>data.add(dataItem);<NEW_LINE>}<NEW_LINE>describeInstanceSpecificationsResponse.setData(data);<NEW_LINE>return describeInstanceSpecificationsResponse;<NEW_LINE>}
(_ctx.booleanValue("DescribeInstanceSpecificationsResponse.Success"));
441,817
static Class<?> findEnclosingLibraryClass(Class<?> cls) {<NEW_LINE>if (cls == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>// Check for direct-mapped libraries, which won't necessarily<NEW_LINE>// implement com.sun.jna.Library.<NEW_LINE>Map<String, ?> libOptions = typeOptions.get(cls);<NEW_LINE>if (libOptions != null) {<NEW_LINE>Class<?> enclosingClass = (Class<?>) libOptions.get(_OPTION_ENCLOSING_LIBRARY);<NEW_LINE>if (enclosingClass != null) {<NEW_LINE>return enclosingClass;<NEW_LINE>}<NEW_LINE>return cls;<NEW_LINE>}<NEW_LINE>if (Library.class.isAssignableFrom(cls)) {<NEW_LINE>return cls;<NEW_LINE>}<NEW_LINE>if (Callback.class.isAssignableFrom(cls)) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>Class<?> declaring = cls.getDeclaringClass();<NEW_LINE>Class<?> fromDeclaring = findEnclosingLibraryClass(declaring);<NEW_LINE>if (fromDeclaring != null) {<NEW_LINE>return fromDeclaring;<NEW_LINE>}<NEW_LINE>return findEnclosingLibraryClass(cls.getSuperclass());<NEW_LINE>}
cls = CallbackReference.findCallbackClass(cls);
796,201
public static AlertMessage fromByteArray(final byte[] byteArray) throws HandshakeException {<NEW_LINE>DatagramReader reader = new DatagramReader(byteArray);<NEW_LINE>byte levelCode = reader.readNextByte();<NEW_LINE>byte descCode = reader.readNextByte();<NEW_LINE>AlertLevel level = AlertLevel.getLevelByCode(levelCode);<NEW_LINE>AlertDescription description = AlertDescription.getDescriptionByCode(descCode);<NEW_LINE>if (level == null) {<NEW_LINE>throw new HandshakeException(String.format("Unknown alert level code [%d]", levelCode), new AlertMessage(AlertLevel.FATAL, AlertDescription.DECODE_ERROR));<NEW_LINE>} else if (description == null) {<NEW_LINE>throw new HandshakeException(String.format("Unknown alert description code [%d]", descCode), new AlertMessage(AlertLevel.FATAL, AlertDescription.DECODE_ERROR));<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
return new AlertMessage(level, description);
369,275
private JMenu createPluginsMenu() {<NEW_LINE>final List<IMainWindowMenuPlugin> plugins = new ArrayList<IMainWindowMenuPlugin>();<NEW_LINE>for (@SuppressWarnings("rawtypes") final IPlugin plugin : PluginInterface.instance().getPluginRegistry()) {<NEW_LINE>if (plugin instanceof IMainWindowMenuPlugin) {<NEW_LINE>plugins<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>final JMenu menu = new JMenu("Plugins");<NEW_LINE>menu.setMnemonic('U');<NEW_LINE>menu.add(CActionProxy.proxy(new CActionOpenScriptingDialog(getParent())));<NEW_LINE>menu.add(CActionProxy.proxy(new CActionOpenLogConsole()));<NEW_LINE>menu.addSeparator();<NEW_LINE>menu.add(CActionProxy.proxy(new CPluginManagementAction(getParent())));<NEW_LINE>menu.add(CActionProxy.proxy(new CPluginsReloadAction()));<NEW_LINE>menu.addSeparator();<NEW_LINE>for (final IMainWindowMenuPlugin plugin : plugins) {<NEW_LINE>// ESCA-JAVA0166: Catch Exception because we are calling a plugin function.<NEW_LINE>try {<NEW_LINE>final List<JMenuItem> menus = plugin.extendPluginMenu();<NEW_LINE>for (final JMenuItem m : menus) {<NEW_LINE>menu.add(m);<NEW_LINE>}<NEW_LINE>} catch (final Exception exception) {<NEW_LINE>CUtilityFunctions.logException(exception);<NEW_LINE>final String innerMessage = "E00092: " + "Plugin caused an unexpected exception";<NEW_LINE>final String innerDescription = CUtilityFunctions.createDescription(String.format("The plugin %s caused an unexpected exception.", plugin.getName()), new String[] { "The plugin contains a bug." }, new String[] { "The plugin probably behaves erroneously from this point on but it remains active" });<NEW_LINE>NaviErrorDialog.show(getParent(), innerMessage, innerDescription, exception);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return menu;<NEW_LINE>}
.add((IMainWindowMenuPlugin) plugin);
1,167,951
public BufferedImage generateIdenticons(String id, int image_width, int image_height) throws NoSuchAlgorithmException {<NEW_LINE>int width = 5;<NEW_LINE>int height = 5;<NEW_LINE>byte[] hash = hash(id);<NEW_LINE>BufferedImage identicon = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);<NEW_LINE>WritableRaster raster = identicon.getRaster();<NEW_LINE>int[] background = new int[] { 255, 255, 255, 0 };<NEW_LINE>int[] foreground = new int[] { hash[0] & 255, hash[1] & 255, hash[2] & 255, 255 };<NEW_LINE>for (int x = 0; x < width; x++) {<NEW_LINE>// Enforce horizontal symmetry<NEW_LINE>int i = x < 3 ? x : 4 - x;<NEW_LINE>for (int y = 0; y < height; y++) {<NEW_LINE>int[] pixelColor;<NEW_LINE>// toggle pixels based on bit being on/off<NEW_LINE>if ((hash[i] >> y & 1) == 1)<NEW_LINE>pixelColor = foreground;<NEW_LINE>else<NEW_LINE>pixelColor = background;<NEW_LINE>raster.setPixel(x, y, pixelColor);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>BufferedImage finalImage = new BufferedImage(image_width, image_height, BufferedImage.TYPE_INT_ARGB);<NEW_LINE>// Scale image to the size you want<NEW_LINE>AffineTransform at = new AffineTransform();<NEW_LINE>at.scale(image_width / width, image_height / height);<NEW_LINE>AffineTransformOp op = new AffineTransformOp(at, AffineTransformOp.TYPE_NEAREST_NEIGHBOR);<NEW_LINE>finalImage = <MASK><NEW_LINE>return finalImage;<NEW_LINE>}
op.filter(identicon, finalImage);
1,109,630
final DescribeNetworkInterfacesResult executeDescribeNetworkInterfaces(DescribeNetworkInterfacesRequest describeNetworkInterfacesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeNetworkInterfacesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeNetworkInterfacesRequest> request = null;<NEW_LINE>Response<DescribeNetworkInterfacesResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeNetworkInterfacesRequestMarshaller().marshall<MASK><NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EC2");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeNetworkInterfaces");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<DescribeNetworkInterfacesResult> responseHandler = new StaxResponseHandler<DescribeNetworkInterfacesResult>(new DescribeNetworkInterfacesResultStaxUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
(super.beforeMarshalling(describeNetworkInterfacesRequest));
63,709
/*<NEW_LINE>* (non-Javadoc)<NEW_LINE>*<NEW_LINE>* @see com.impetus.kundera.client.Client#findIdsByColumn(java.lang.String,<NEW_LINE>* java.lang.String, java.lang.String, java.lang.String, java.lang.Object,<NEW_LINE>* java.lang.Class)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public Object[] findIdsByColumn(String schemaName, String tableName, String pKeyName, String columnName, Object columnValue, Class entityClazz) {<NEW_LINE>List<Object> rowKeys = new ArrayList<Object>();<NEW_LINE>if (getCqlVersion().equalsIgnoreCase(CassandraConstants.CQL_VERSION_3_0)) {<NEW_LINE>rowKeys = findIdsByColumnUsingCql(schemaName, tableName, pKeyName, columnName, columnValue, entityClazz);<NEW_LINE>} else {<NEW_LINE>Selector selector = clientFactory.getSelector(pool);<NEW_LINE>SlicePredicate slicePredicate = Selector.newColumnsPredicateAll(false, 10000);<NEW_LINE>EntityMetadata metadata = KunderaMetadataManager.getEntityMetadata(kunderaMetadata, entityClazz);<NEW_LINE>IndexClause ix = Selector.newIndexClause(Bytes.EMPTY, 10000, Selector.newIndexExpression(columnName + Constants.JOIN_COLUMN_NAME_SEPARATOR + columnValue, IndexOperator.EQ, Bytes.fromByteArray(PropertyAccessorHelper.getBytes(columnValue))));<NEW_LINE>Map<Bytes, List<Column>> qResults = selector.getIndexedColumns(tableName, ix, slicePredicate, getConsistencyLevel());<NEW_LINE>// iterate through complete map and<NEW_LINE>Iterator<Bytes> rowIter = qResults.keySet().iterator();<NEW_LINE>while (rowIter.hasNext()) {<NEW_LINE>Bytes rowKey = rowIter.next();<NEW_LINE>PropertyAccessor<?> accessor = PropertyAccessorFactory.getPropertyAccessor((Field) metadata.<MASK><NEW_LINE>Object value = accessor.fromBytes(metadata.getIdAttribute().getJavaType(), rowKey.toByteArray());<NEW_LINE>rowKeys.add(value);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (rowKeys != null && !rowKeys.isEmpty()) {<NEW_LINE>return rowKeys.toArray(new Object[0]);<NEW_LINE>}<NEW_LINE>if (log.isInfoEnabled()) {<NEW_LINE>log.info("No row keys found, returning null.");<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
getIdAttribute().getJavaMember());
270,208
public static void energyAnalysis(BaselineAdaptationSet fileSet, EnergyFileHeader energyParams, boolean isForcedAnalysis) throws UnsupportedAudioFileException, IOException {<NEW_LINE>System.err.println("Starting energy analysis...");<NEW_LINE>boolean bAnalyze;<NEW_LINE>EnergyContourRms e = null;<NEW_LINE>for (int i = 0; i < fileSet.items.length; i++) {<NEW_LINE>bAnalyze = true;<NEW_LINE>if (// No f0 detection if ptc file already exists<NEW_LINE>!isForcedAnalysis && FileUtils.exists(fileSet.items[i].energyFile))<NEW_LINE>bAnalyze = false;<NEW_LINE>if (bAnalyze) {<NEW_LINE>e = new EnergyContourRms(fileSet.items[i].audioFile, fileSet.items[i].energyFile, energyParams.windowSizeInSeconds, energyParams.skipSizeInSeconds);<NEW_LINE>System.err.println("Extracted energy contour: " + fileSet.items[i].energyFile);<NEW_LINE>} else<NEW_LINE>System.err.println("Energy file found with identical analysis parameters: " + fileSet<MASK><NEW_LINE>}<NEW_LINE>System.err.println("Energy analysis completed...");<NEW_LINE>}
.items[i].energyFile);
23,510
public void configurationPropertyUsage() {<NEW_LINE>Map<String, String> properties = new HashMap<>();<NEW_LINE>properties.put("azure.sdk.sample.timeout", "1000");<NEW_LINE>properties.put("azure.sdk.sample.retry-count", "3");<NEW_LINE>properties.put("azure.sdk.sample.is-enabled", "true");<NEW_LINE>properties.put("azure.sdk.sample.mode", "mode1");<NEW_LINE>Configuration configuration = new ConfigurationBuilder(new SampleSource(properties)).root("azure.sdk").buildSection("sample");<NEW_LINE>// BEGIN: com.azure.core.util.ConfigurationPropertyBuilder.ofDuration<NEW_LINE>ConfigurationProperty<Duration> timeoutProperty = ConfigurationPropertyBuilder.ofDuration("timeout").build();<NEW_LINE>System.out.println(configuration.get(timeoutProperty));<NEW_LINE>// END: com.azure.core.util.ConfigurationPropertyBuilder.ofDuration<NEW_LINE>// BEGIN: com.azure.core.util.ConfigurationPropertyBuilder<NEW_LINE>ConfigurationProperty<SampleEnumProperty> modeProperty = new ConfigurationPropertyBuilder<>("mode", SampleEnumProperty::fromString).logValue(true).defaultValue(SampleEnumProperty.MODE_1).build();<NEW_LINE>System.out.println(configuration.get(modeProperty));<NEW_LINE>// END: com.azure.core.util.ConfigurationPropertyBuilder<NEW_LINE>// BEGIN: com.azure.core.util.ConfigurationPropertyBuilder.ofBoolean<NEW_LINE>ConfigurationProperty<Boolean> booleanProperty = ConfigurationPropertyBuilder.<MASK><NEW_LINE>System.out.println(configuration.get(booleanProperty));<NEW_LINE>// END: com.azure.core.util.ConfigurationPropertyBuilder.ofBoolean<NEW_LINE>// BEGIN: com.azure.core.util.ConfigurationPropertyBuilder.ofInteger<NEW_LINE>ConfigurationProperty<Integer> integerProperty = ConfigurationPropertyBuilder.ofInteger("retry-count").build();<NEW_LINE>System.out.println(configuration.get(integerProperty));<NEW_LINE>// END: com.azure.core.util.ConfigurationPropertyBuilder.ofInteger<NEW_LINE>}
ofBoolean("is-enabled").build();
386,037
private ListNode<Set<V>> lookupImpl(@NotNull Iterator<T> key) {<NEW_LINE>if (!key.hasNext()) {<NEW_LINE>if (root.values.size() > 0) {<NEW_LINE>return <MASK><NEW_LINE>} else {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// walk down the tree while terms of the key path sequence match the corresponding keys of the nodes<NEW_LINE>// till the end of the key sequence or boundary of the data structure, where no more child nodes could be matched<NEW_LINE>// - nodes to lookup down the tree by the current term from the key sequence<NEW_LINE>ListNode<TrieNode> activeNodes = ListNode.of(root);<NEW_LINE>// - total accumulated values from all the nodes met along the key sequence path<NEW_LINE>ListNode<Set<V>> results = null;<NEW_LINE>do {<NEW_LINE>T term = key.next();<NEW_LINE>ListNode<TrieNode> nextNodes = null;<NEW_LINE>// inspect active nodes on the current level of the tree data structure<NEW_LINE>for (ListNode<TrieNode> currNode = activeNodes; currNode != null; currNode = currNode.next) {<NEW_LINE>TrieNode node = currNode.data;<NEW_LINE>// accumulate values from the current node<NEW_LINE>Set<V> values = node.getValues();<NEW_LINE>if (values.size() > 0) {<NEW_LINE>results = ListNode.push(results, values);<NEW_LINE>}<NEW_LINE>// obtain children nodes by the current term for further inspection<NEW_LINE>nextNodes = node.accumulateSubnodesByTerm(term, nextNodes);<NEW_LINE>}<NEW_LINE>activeNodes = nextNodes;<NEW_LINE>// proceed to the next level of the tree if there is something to look at<NEW_LINE>} while (activeNodes != null && key.hasNext());<NEW_LINE>// accumulate values from the deepest level being reached<NEW_LINE>for (ListNode<TrieNode> currNode = activeNodes; currNode != null; currNode = currNode.next) {<NEW_LINE>results = ListNode.push(results, currNode.data.getValues());<NEW_LINE>}<NEW_LINE>return results;<NEW_LINE>}
ListNode.of(root.values);
148,197
private static void addToEnumMap(RootNode root, EnumMapAttr mapAttr, InsnNode aputInsn) {<NEW_LINE>InsnArg litArg = aputInsn.getArg(2);<NEW_LINE>if (!litArg.isLiteral()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>EnumMapInfo mapInfo = checkEnumMapAccess(root, aputInsn);<NEW_LINE>if (mapInfo == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>InsnArg enumArg = mapInfo.getArg();<NEW_LINE>FieldNode field = mapInfo.getMapField();<NEW_LINE>if (field == null || !enumArg.isInsnWrap()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>InsnNode sget = ((InsnWrapArg) enumArg).getWrapInsn();<NEW_LINE>if (!(sget instanceof IndexInsnNode)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Object index = ((IndexInsnNode) sget).getIndex();<NEW_LINE>if (!(index instanceof FieldInfo)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>FieldNode fieldNode = root<MASK><NEW_LINE>if (fieldNode == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int literal = (int) ((LiteralArg) litArg).getLiteral();<NEW_LINE>mapAttr.add(field, literal, fieldNode);<NEW_LINE>}
.resolveField((FieldInfo) index);
86,272
private static <T> T invokeStatic(Class<?> target, String name, Class<T> returnType) {<NEW_LINE>Method method;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>} catch (NoSuchMethodException e) {<NEW_LINE>throw new IllegalStateException("Unable to find method '" + name + "' on " + target, e);<NEW_LINE>}<NEW_LINE>if (!method.isAccessible()) {<NEW_LINE>method.setAccessible(true);<NEW_LINE>}<NEW_LINE>Object returnValue;<NEW_LINE>try {<NEW_LINE>returnValue = method.invoke(null);<NEW_LINE>} catch (IllegalAccessException e) {<NEW_LINE>throw new IllegalStateException("Unable to invoke method '" + name + "' on " + target, e);<NEW_LINE>} catch (InvocationTargetException e) {<NEW_LINE>Throwable cause = e.getCause();<NEW_LINE>if (cause instanceof RuntimeException)<NEW_LINE>throw (RuntimeException) cause;<NEW_LINE>if (cause instanceof Error)<NEW_LINE>throw (Error) cause;<NEW_LINE>throw new RuntimeException("Exception while reflectively invoking method", e);<NEW_LINE>}<NEW_LINE>return returnType.cast(returnValue);<NEW_LINE>}
method = target.getMethod(name);
862,337
private void verifySchema() throws SQLException {<NEW_LINE>String lastpart = "";<NEW_LINE>if (!tblprefix.equals(""))<NEW_LINE>lastpart = "AND owner = '" + tblprefix.substring(0, tblprefix.length() - 1) + "'";<NEW_LINE>boolean present = JDBCUtils.queryHasResult(stmt, "select * from " + dbtype.getMetaTableName() + " " + "where table_name = 'LINKS'" + lastpart);<NEW_LINE>if (present)<NEW_LINE>return;<NEW_LINE>logger.warn("Table LINKS not found; recreating");<NEW_LINE>stmt.executeUpdate(dbtype.getCreateTable());<NEW_LINE>// creating indexes, too, as that makes processing *much* faster<NEW_LINE>stmt.executeUpdate("create index " + tblprefix + "links_ix_id1 on " + tblprefix + "links (id1)");<NEW_LINE>stmt.executeUpdate("create index " + <MASK><NEW_LINE>}
tblprefix + "links_ix_id2 on " + tblprefix + "links (id2)");
434,107
public static void main(String[] args) throws IOException {<NEW_LINE>// Model converters will be loaded based on naming convention.<NEW_LINE>// Previously it would be loaded through ServiceLoader.load,<NEW_LINE>// which is still an option if dsljson.configuration name is specified.<NEW_LINE>// DSL-JSON loads all services registered into META-INF/services<NEW_LINE>// and falls back to naming based convention of package._NAME_DslJsonConfiguration if not found<NEW_LINE>// Annotation processor will run by default and generate descriptions for JSON encoding/decoding<NEW_LINE>// To include Jackson annotations dsljson.jackson=true must be passed to annotation processor<NEW_LINE>// When conversion is not fully supported by compiler Settings.basicSetup() can be enabled to support runtime analysis<NEW_LINE>// for features not registered by annotation processor. Currently it is enabled due to use of Set and Vector<NEW_LINE>DslJson<Object> dslJson = new DslJson<>(Settings.basicSetup());<NEW_LINE>Model instance = new Model();<NEW_LINE>instance.string = "Hello World!";<NEW_LINE>instance.integers = Arrays.asList(1, 2, 3);<NEW_LINE>instance.decimals = new HashSet<>(Arrays.asList(BigDecimal.ONE, BigDecimal.ZERO));<NEW_LINE>instance.uuids = new UUID[] { new UUID(1L, 2L), new UUID(3L, 4L) };<NEW_LINE>instance.longs = new Vector<>(Arrays.asList(1L, 2L));<NEW_LINE>instance.inheritance = new Model.ParentClass();<NEW_LINE>instance.inheritance.a = 5;<NEW_LINE>instance.inheritance.b = 6;<NEW_LINE>instance.iface = new Model.WithCustomCtor(5, 6);<NEW_LINE>instance.person = new ImmutablePerson("first name", "last name", 35);<NEW_LINE>instance.states = Arrays.asList(Model.State.HI, Model.State.LOW);<NEW_LINE>instance.jsonObject = new Model.JsonObjectReference(43, "abcd");<NEW_LINE>instance.jsonObjects = Collections.singletonList(new Model.JsonObjectReference(34, "dcba"));<NEW_LINE>instance.intList = new ArrayList<>(Arrays<MASK><NEW_LINE>instance.map = new HashMap<>();<NEW_LINE>instance.map.put("abc", 678);<NEW_LINE>instance.map.put("array", new int[] { 2, 4, 8 });<NEW_LINE>instance.factories = Arrays.asList(null, Model.ViaFactory.create("me", 2), Model.ViaFactory.create("you", 3), null);<NEW_LINE>instance.builder = PersonBuilder.builder().firstName("first").lastName("last").age(42).build();<NEW_LINE>ByteArrayOutputStream os = new ByteArrayOutputStream();<NEW_LINE>dslJson.serialize(instance, os);<NEW_LINE>System.out.println(os);<NEW_LINE>ByteArrayInputStream is = new ByteArrayInputStream(os.toByteArray());<NEW_LINE>// deserialization using Stream API<NEW_LINE>Model deser = dslJson.deserialize(Model.class, is);<NEW_LINE>System.out.println(deser.string);<NEW_LINE>}
.asList(123, 456));
740,987
public final int start(Path homeDir, Path configFile, Map<String, String> configOverrides, boolean expandCommands) {<NEW_LINE>addShutdownHook();<NEW_LINE>installSignalHandlers();<NEW_LINE>Config config = Config.newBuilder().commandExpansion(expandCommands).setDefaults(GraphDatabaseSettings.SERVER_DEFAULTS).fromFileNoThrow(configFile).setRaw(configOverrides).set(GraphDatabaseSettings.neo4j_home, homeDir.toAbsolutePath()).build();<NEW_LINE>pidFile = <MASK><NEW_LINE>writePidSilently();<NEW_LINE>Log4jLogProvider userLogProvider = setupLogging(config);<NEW_LINE>userLogFileStream = userLogProvider;<NEW_LINE>dependencies = dependencies.userLogProvider(userLogProvider);<NEW_LINE>log = userLogProvider.getLog(getClass());<NEW_LINE>// Log any messages written before logging was configured.<NEW_LINE>startupLog.replayInto(log);<NEW_LINE>config.setLogger(log);<NEW_LINE>if (requestedMemoryExceedsAvailable(config)) {<NEW_LINE>log.error(format("Invalid memory configuration - exceeds physical memory. Check the configured values for %s and %s", GraphDatabaseSettings.pagecache_memory.name(), BootloaderSettings.max_heap_size.name()));<NEW_LINE>return INVALID_CONFIGURATION_ERROR_CODE;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>serverAddress = config.get(HttpConnector.listen_address).toString();<NEW_LINE>serverLocation = config.get(GraphDatabaseInternalSettings.databases_root_path).toString();<NEW_LINE>log.info("Starting...");<NEW_LINE>databaseManagementService = createNeo(config, dependencies);<NEW_LINE>log.info("Started.");<NEW_LINE>return OK;<NEW_LINE>} catch (ServerStartupException e) {<NEW_LINE>e.describeTo(log);<NEW_LINE>return WEB_SERVER_STARTUP_ERROR_CODE;<NEW_LINE>} catch (TransactionFailureException tfe) {<NEW_LINE>log.error(format("Failed to start Neo4j on %s. Another process may be using databases at location: %s", serverAddress, serverLocation), tfe);<NEW_LINE>return GRAPH_DATABASE_STARTUP_ERROR_CODE;<NEW_LINE>} catch (Exception e) {<NEW_LINE>log.error(format("Failed to start Neo4j on %s.", serverAddress), e);<NEW_LINE>return WEB_SERVER_STARTUP_ERROR_CODE;<NEW_LINE>}<NEW_LINE>}
config.get(BootloaderSettings.pid_file);
860,623
public boolean onMenuItemClick(MenuItem item) {<NEW_LINE>Log.d(TAG, "onMenuItemClick: Setting" + item);<NEW_LINE>switch(item.getItemId()) {<NEW_LINE>case R.id.allowlist_default_on_vpn:<NEW_LINE>Log.d(TAG, "onMenuItemClick: OnVpn");<NEW_LINE>MainActivity.config.allowlist<MASK><NEW_LINE>break;<NEW_LINE>case R.id.allowlist_default_not_on_vpn:<NEW_LINE>Log.d(TAG, "onMenuItemClick: NotOnVpn");<NEW_LINE>MainActivity.config.allowlist.defaultMode = Configuration.Allowlist.DEFAULT_MODE_NOT_ON_VPN;<NEW_LINE>break;<NEW_LINE>case R.id.allowlist_default_intelligent:<NEW_LINE>Log.d(TAG, "onMenuItemClick: Intelligent");<NEW_LINE>MainActivity.config.allowlist.defaultMode = Configuration.Allowlist.DEFAULT_MODE_INTELLIGENT;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>allowlistDefaultText.setText(getResources().getStringArray(R.array.allowlist_defaults)[MainActivity.config.allowlist.defaultMode]);<NEW_LINE>appListGenerator = new AppListGenerator(getContext());<NEW_LINE>appListGenerator.execute();<NEW_LINE>FileHelper.writeSettings(getContext(), MainActivity.config);<NEW_LINE>return true;<NEW_LINE>}
.defaultMode = Configuration.Allowlist.DEFAULT_MODE_ON_VPN;
929,250
public static ClientMessage encodeRequest(java.lang.String name, java.util.UUID txnId, long threadId, com.hazelcast.internal.serialization.Data key, com.hazelcast.internal.serialization.Data value) {<NEW_LINE><MASK><NEW_LINE>clientMessage.setRetryable(false);<NEW_LINE>clientMessage.setOperationName("TransactionalMap.RemoveIfSame");<NEW_LINE>ClientMessage.Frame initialFrame = new ClientMessage.Frame(new byte[REQUEST_INITIAL_FRAME_SIZE], UNFRAGMENTED_MESSAGE);<NEW_LINE>encodeInt(initialFrame.content, TYPE_FIELD_OFFSET, REQUEST_MESSAGE_TYPE);<NEW_LINE>encodeInt(initialFrame.content, PARTITION_ID_FIELD_OFFSET, -1);<NEW_LINE>encodeUUID(initialFrame.content, REQUEST_TXN_ID_FIELD_OFFSET, txnId);<NEW_LINE>encodeLong(initialFrame.content, REQUEST_THREAD_ID_FIELD_OFFSET, threadId);<NEW_LINE>clientMessage.add(initialFrame);<NEW_LINE>StringCodec.encode(clientMessage, name);<NEW_LINE>DataCodec.encode(clientMessage, key);<NEW_LINE>DataCodec.encode(clientMessage, value);<NEW_LINE>return clientMessage;<NEW_LINE>}
ClientMessage clientMessage = ClientMessage.createForEncode();
381,607
public static Histogram add(Histogram... histograms) {<NEW_LINE>int buckets = histograms[0].buckets;<NEW_LINE>int resolution = histograms[0].resolution;<NEW_LINE>int <MASK><NEW_LINE>for (Histogram histogram : histograms) {<NEW_LINE>assert buckets == histogram.buckets;<NEW_LINE>assert resolution == histogram.resolution;<NEW_LINE>assert ordersOfMagnitude == histogram.ordersOfMagnitude;<NEW_LINE>}<NEW_LINE>Histogram ret = new Histogram(buckets, resolution, ordersOfMagnitude);<NEW_LINE>for (Histogram histogram : histograms) {<NEW_LINE>for (int i = 0; i < ordersOfMagnitude; i++) {<NEW_LINE>for (int j = 0; j < buckets; j++) ret.count[i][j] += histogram.count[i][j];<NEW_LINE>}<NEW_LINE>ret.overflow += histogram.overflow;<NEW_LINE>ret.underflow += histogram.underflow;<NEW_LINE>ret.totalCount += histogram.totalCount;<NEW_LINE>}<NEW_LINE>long total2 = ret.underflow + ret.overflow;<NEW_LINE>for (int i = 0; i < ordersOfMagnitude; i++) for (int j = 0; j < buckets; j++) total2 += ret.count[i][j];<NEW_LINE>if (ret.totalCount != total2)<NEW_LINE>throw new AssertionError(ret.totalCount + " != " + total2);<NEW_LINE>return ret;<NEW_LINE>}
ordersOfMagnitude = histograms[0].ordersOfMagnitude;
1,412,803
private void completionOnLocalOrArgumentName(ASTNode astNode, Scope scope) {<NEW_LINE>if (!this.requestor.isIgnored(CompletionProposal.VARIABLE_DECLARATION)) {<NEW_LINE>LocalDeclaration variable = (LocalDeclaration) astNode;<NEW_LINE>int kind;<NEW_LINE>if (variable instanceof CompletionOnLocalName) {<NEW_LINE>this.completionToken = ((CompletionOnLocalName) variable).realName;<NEW_LINE>kind = InternalNamingConventions.VK_LOCAL;<NEW_LINE>} else {<NEW_LINE>CompletionOnArgumentName arg = (CompletionOnArgumentName) variable;<NEW_LINE>this.completionToken = arg.realName;<NEW_LINE>if ((variable.bits & ASTNode.IsTypeElided) != 0) {<NEW_LINE>findKeywords(variable.name, new char[][] { Keywords.VAR }, false, false);<NEW_LINE>// heuristics below need a type, which we don't have here<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>kind = arg.isCatchArgument ? InternalNamingConventions.VK_LOCAL : InternalNamingConventions.VK_PARAMETER;<NEW_LINE>}<NEW_LINE>char[][] alreadyDefinedName = computeAlreadyDefinedName<MASK><NEW_LINE>char[][] forbiddenNames = findVariableFromUnresolvedReference(variable, (BlockScope) scope, alreadyDefinedName);<NEW_LINE>LocalVariableBinding[] locals = ((BlockScope) scope).locals;<NEW_LINE>char[][] discouragedNames = new char[locals.length][];<NEW_LINE>int localCount = 0;<NEW_LINE>for (int i = 0; i < locals.length; i++) {<NEW_LINE>if (locals[i] != null) {<NEW_LINE>discouragedNames[localCount++] = locals[i].name;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>System.arraycopy(discouragedNames, 0, discouragedNames = new char[localCount][], 0, localCount);<NEW_LINE>findVariableNames(this.completionToken, variable.type, discouragedNames, forbiddenNames, kind);<NEW_LINE>}<NEW_LINE>}
((BlockScope) scope, variable);
1,560,505
final EngineDefaults executeDescribeEngineDefaultParameters(DescribeEngineDefaultParametersRequest describeEngineDefaultParametersRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeEngineDefaultParametersRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<DescribeEngineDefaultParametersRequest> request = null;<NEW_LINE>Response<EngineDefaults> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeEngineDefaultParametersRequestMarshaller().marshall(super.beforeMarshalling(describeEngineDefaultParametersRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Neptune");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeEngineDefaultParameters");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<EngineDefaults> responseHandler = new StaxResponseHandler<EngineDefaults>(new EngineDefaultsStaxUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
1,733,552
private static void checksumResourceFilePath(final PwmDomain pwmDomain, final CrcChecksumOutputStream checksumStream) {<NEW_LINE>if (pwmDomain.getPwmApplication().getPwmEnvironment().getContextManager() != null) {<NEW_LINE>try {<NEW_LINE>final Optional<File> webInfPath = pwmDomain.getPwmApplication().getPwmEnvironment().getContextManager().locateWebInfFilePath();<NEW_LINE>if (webInfPath.isPresent() && webInfPath.get().exists()) {<NEW_LINE>final File basePath = webInfPath.get().getParentFile();<NEW_LINE>if (basePath != null && basePath.exists()) {<NEW_LINE>final File resourcePath = new File(basePath.getAbsolutePath() + File.separator + <MASK><NEW_LINE>if (resourcePath.exists()) {<NEW_LINE>final Iterator<FileSystemUtility.FileSummaryInformation> iter = FileSystemUtility.readFileInformation(Collections.singletonList(resourcePath));<NEW_LINE>{<NEW_LINE>while (iter.hasNext()) {<NEW_LINE>final FileSystemUtility.FileSummaryInformation fileSummaryInformation = iter.next();<NEW_LINE>checksumStream.write(JavaHelper.longToBytes(fileSummaryInformation.getChecksum()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (final Exception e) {<NEW_LINE>LOGGER.error(() -> "unable to generate resource path nonce: " + e.getMessage());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
"public" + File.separator + "resources");
823,193
private void handleRequest(final ServerOutput serverOutput, final int partitionId, final long requestId, final DirectBuffer buffer, final int offset, final int length) {<NEW_LINE>requestReader.reset();<NEW_LINE>responseWriter.reset();<NEW_LINE>errorResponseWriter.reset();<NEW_LINE>try {<NEW_LINE>requestReader.<MASK><NEW_LINE>} catch (final RequestReaderException.InvalidTemplateException e) {<NEW_LINE>errorResponseWriter.invalidMessageTemplate(e.actualTemplate, e.expectedTemplate).tryWriteResponseOrLogFailure(serverOutput, partitionId, requestId);<NEW_LINE>return;<NEW_LINE>} catch (final Exception e) {<NEW_LINE>LOG.error("Failed to deserialize message", e);<NEW_LINE>errorResponseWriter.malformedRequest(e).tryWriteResponseOrLogFailure(serverOutput, partitionId, requestId);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>final var result = handle(partitionId, requestId, requestReader, responseWriter, errorResponseWriter);<NEW_LINE>if (result.isLeft()) {<NEW_LINE>result.getLeft().tryWriteResponse(serverOutput, partitionId, requestId);<NEW_LINE>} else {<NEW_LINE>result.get().tryWriteResponse(serverOutput, partitionId, requestId);<NEW_LINE>}<NEW_LINE>} catch (final Exception e) {<NEW_LINE>LOG.error("Error handling request on partition {}", partitionId, e);<NEW_LINE>errorResponseWriter.internalError("Failed to handle request due to internal error; see the broker logs for more").tryWriteResponse(serverOutput, partitionId, requestId);<NEW_LINE>}<NEW_LINE>}
wrap(buffer, offset, length);
1,089,210
private void generateDigraphsAndDoExperiments(int experiments, int vertices, int edges) {<NEW_LINE>StdOut.printf("%25s %15s %8s %8s %31s %20s\n", "Digraph type | ", "Experiments | ", "Vertices | ", "Edges | ", "Probability of finding path | ", "Average path length");<NEW_LINE>int totalPathsFound = 0;<NEW_LINE>int totalPathLengths = 0;<NEW_LINE>// Digraph model 1: Random digraphs<NEW_LINE>String digraphType = "Random digraph";<NEW_LINE>Exercise45_RandomDigraphs exercise45_randomDigraphs = new Exercise45_RandomDigraphs();<NEW_LINE>for (int experiment = 0; experiment < experiments; experiment++) {<NEW_LINE>DigraphInterface randomDigraph = exercise45_randomDigraphs.erdosRenyiDigraph(vertices, edges);<NEW_LINE>int[] experimentResults = doExperiment(randomDigraph);<NEW_LINE>totalPathsFound += experimentResults[0];<NEW_LINE>totalPathLengths += experimentResults[1];<NEW_LINE>}<NEW_LINE>computeAndPrintResults(digraphType, experiments, vertices, edges, totalPathsFound, totalPathLengths);<NEW_LINE>totalPathsFound = 0;<NEW_LINE>totalPathLengths = 0;<NEW_LINE>// Digraph model 2: Random simple digraphs<NEW_LINE>digraphType = "Random simple digraph";<NEW_LINE>Exercise46_RandomSimpleDigraphs exercise46_randomSimpleDigraphs = new Exercise46_RandomSimpleDigraphs();<NEW_LINE>for (int experiment = 0; experiment < experiments; experiment++) {<NEW_LINE>DigraphInterface randomSimpleDigraph = <MASK><NEW_LINE>int[] experimentResults = doExperiment(randomSimpleDigraph);<NEW_LINE>totalPathsFound += experimentResults[0];<NEW_LINE>totalPathLengths += experimentResults[1];<NEW_LINE>}<NEW_LINE>computeAndPrintResults(digraphType, experiments, vertices, edges, totalPathsFound, totalPathLengths);<NEW_LINE>totalPathsFound = 0;<NEW_LINE>totalPathLengths = 0;<NEW_LINE>// Digraph model 3: Random sparse digraphs<NEW_LINE>digraphType = "Random sparse digraph";<NEW_LINE>Exercise47_RandomSparseDigraphs exercise47_randomSparseDigraphs = new Exercise47_RandomSparseDigraphs();<NEW_LINE>List<DigraphInterface> randomSparseDigraphs = exercise47_randomSparseDigraphs.randomSparseDigraph(experiments, vertices);<NEW_LINE>for (DigraphInterface randomSparseDigraph : randomSparseDigraphs) {<NEW_LINE>int[] experimentResults = doExperiment(randomSparseDigraph);<NEW_LINE>totalPathsFound += experimentResults[0];<NEW_LINE>totalPathLengths += experimentResults[1];<NEW_LINE>}<NEW_LINE>int edgesInSparseDigraphs = vertices * 3;<NEW_LINE>computeAndPrintResults(digraphType, experiments, vertices, edgesInSparseDigraphs, totalPathsFound, totalPathLengths);<NEW_LINE>}
exercise46_randomSimpleDigraphs.randomDigraph(vertices, edges);
964,079
public void factoryAdded(Class<?> factoryType, Object factory) {<NEW_LINE>if (factory instanceof RequestTransportFactory) {<NEW_LINE>RequestTransportFactory transportFactory = (RequestTransportFactory) factory;<NEW_LINE>addTransport(transportFactory.getProtocol(), transportFactory.newRequestTransport());<NEW_LINE>}<NEW_LINE>if (factory instanceof RequestFilterFactory) {<NEW_LINE>RequestFilterFactory requestFilterFactory = (RequestFilterFactory) factory;<NEW_LINE>RequestFilter filter = requestFilterFactory.createRequestFilter();<NEW_LINE>String protocol = requestFilterFactory.getProtocol();<NEW_LINE>if (protocol.startsWith(HTTP)) {<NEW_LINE>RequestTransport transport = transports.get(HTTP);<NEW_LINE>transport.insertRequestFilter(filter, wsdlPackagingRequestFilter);<NEW_LINE>} else {<NEW_LINE>RequestTransport <MASK><NEW_LINE>if (transport != null) {<NEW_LINE>transport.addRequestFilter(filter);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>addToCustomRequestFilters(protocol, filter);<NEW_LINE>}<NEW_LINE>}
transport = transports.get(protocol);
1,257,516
public void onDrawOver(@NonNull Canvas c, @NonNull RecyclerView parent, @NonNull RecyclerView.State state) {<NEW_LINE>if (!(prefs.getShowBounds() || prefs.getShowOffsets()))<NEW_LINE>return;<NEW_LINE>int childCount = parent.getChildCount();<NEW_LINE>for (int i = 0; i < childCount; i++) {<NEW_LINE>View <MASK><NEW_LINE>RecyclerView.LayoutManager lm = parent.getLayoutManager();<NEW_LINE>decoratedLeft = lm.getDecoratedLeft(child) + (int) child.getTranslationX();<NEW_LINE>decoratedTop = lm.getDecoratedTop(child) + (int) child.getTranslationY();<NEW_LINE>decoratedRight = lm.getDecoratedRight(child) + (int) child.getTranslationX();<NEW_LINE>decoratedBottom = lm.getDecoratedBottom(child) + (int) child.getTranslationY();<NEW_LINE>left = child.getLeft() + (int) child.getTranslationX();<NEW_LINE>top = child.getTop() + (int) child.getTranslationY();<NEW_LINE>right = child.getRight() + (int) child.getTranslationX();<NEW_LINE>bottom = child.getBottom() + (int) child.getTranslationY();<NEW_LINE>if (prefs.getShowBounds()) {<NEW_LINE>paint.setColor(Color.RED);<NEW_LINE>paint.setStyle(Paint.Style.STROKE);<NEW_LINE>paint.setStrokeWidth(1);<NEW_LINE>c.drawRect(decoratedLeft, decoratedTop, decoratedRight, decoratedBottom, paint);<NEW_LINE>}<NEW_LINE>if (prefs.getShowOffsets()) {<NEW_LINE>paint.setStyle(Paint.Style.FILL);<NEW_LINE>paint.setColor(leftColor);<NEW_LINE>c.drawRect(decoratedLeft, decoratedTop, left, decoratedBottom, paint);<NEW_LINE>paint.setColor(topColor);<NEW_LINE>c.drawRect(decoratedLeft, decoratedTop, decoratedRight, top, paint);<NEW_LINE>paint.setColor(rightColor);<NEW_LINE>c.drawRect(right, decoratedTop, decoratedRight, decoratedBottom, paint);<NEW_LINE>paint.setColor(bottomColor);<NEW_LINE>c.drawRect(decoratedLeft, bottom, decoratedRight, decoratedBottom, paint);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
child = parent.getChildAt(i);
1,127,773
protected String doIt() throws Exception {<NEW_LINE>StringBuffer sql = new StringBuffer("");<NEW_LINE>int cnt = 0;<NEW_LINE>log.info("Set Print Format");<NEW_LINE>try {<NEW_LINE>sql.append("UPDATE AD_PrintFormat pf " + "SET AD_PrintPaper_ID = " + p_Record_ID + " " + "WHERE EXISTS (SELECT * FROM AD_PrintPaper pp " + "WHERE pf.AD_PrintPaper_ID=pp.AD_PrintPaper_ID " + "AND IsLandscape = (SELECT IsLandscape FROM AD_PrintPaper " + "WHERE AD_PrintPaper_ID=" + p_Record_ID + "))");<NEW_LINE>if (p_AD_Client_ID != -1) {<NEW_LINE>sql.append(" AND AD_Client_ID = " + p_AD_Client_ID);<NEW_LINE>}<NEW_LINE>cnt = DB.executeUpdate(sql.toString(), get_TrxName());<NEW_LINE>log.info("Updated " + cnt + " columns");<NEW_LINE>log.fine("Committing ...");<NEW_LINE>DB.commit(true, null);<NEW_LINE>} catch (Exception e) {<NEW_LINE>log.log(<MASK><NEW_LINE>}<NEW_LINE>return "@Copied@=" + cnt;<NEW_LINE>}
Level.SEVERE, "set print format", e);
1,218,059
final ReadJobResult executeReadJob(ReadJobRequest readJobRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(readJobRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ReadJobRequest> request = null;<NEW_LINE>Response<ReadJobResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ReadJobRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(readJobRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Elastic Transcoder");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ReadJob");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ReadJobResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ReadJobResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
797,905
protected Object computeValueAt(int row, int col) {<NEW_LINE>long value;<NEW_LINE>switch(col) {<NEW_LINE>case 0:<NEW_LINE>return flatProfileContainer.getMethodNameAtRow(row);<NEW_LINE>case 1:<NEW_LINE>return (float) flatProfileContainer.getTimeInMcs0AtRow(row);<NEW_LINE>case 2:<NEW_LINE>value = flatProfileContainer.getTimeInMcs0AtRow(row);<NEW_LINE>// NOI18N<NEW_LINE>return (value > 0 ? "+" : "") + StringUtils.mcsTimeToString(value) + " ms";<NEW_LINE>case 3:<NEW_LINE>if (collectingTwoTimeStamps) {<NEW_LINE>value = flatProfileContainer.getTimeInMcs1AtRow(row);<NEW_LINE>// NOI18N<NEW_LINE>return (value > 0 ? "+" : "") + StringUtils.mcsTimeToString(value) + " ms";<NEW_LINE>} else {<NEW_LINE>value = flatProfileContainer.getTotalTimeInMcs0AtRow(row);<NEW_LINE>// NOI18N<NEW_LINE>return (value > 0 ? "+" : "") + StringUtils.mcsTimeToString(value) + " ms";<NEW_LINE>}<NEW_LINE>case 4:<NEW_LINE>if (collectingTwoTimeStamps) {<NEW_LINE><MASK><NEW_LINE>// NOI18N<NEW_LINE>return (value > 0 ? "+" : "") + StringUtils.mcsTimeToString(value) + " ms";<NEW_LINE>} else {<NEW_LINE>value = flatProfileContainer.getNInvocationsAtRow(row);<NEW_LINE>// NOI18N<NEW_LINE>return (value > 0 ? "+" : "") + intFormat.format(value);<NEW_LINE>}<NEW_LINE>case 5:<NEW_LINE>value = flatProfileContainer.getTotalTimeInMcs1AtRow(row);<NEW_LINE>// NOI18N<NEW_LINE>return (value > 0 ? "+" : "") + StringUtils.mcsTimeToString(value) + " ms";<NEW_LINE>case 6:<NEW_LINE>value = flatProfileContainer.getNInvocationsAtRow(row);<NEW_LINE>// NOI18N<NEW_LINE>return (value > 0 ? "+" : "") + intFormat.format(value);<NEW_LINE>default:<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}
value = flatProfileContainer.getTotalTimeInMcs0AtRow(row);
1,277,007
private AnAction processActionElement(@Nonnull SimpleXmlElement element, @Nonnull PluginDescriptor plugin, @Nonnull LocalizeHelper localizeHelper) {<NEW_LINE>PluginId pluginId = plugin.getPluginId();<NEW_LINE>String className = element.getAttributeValue(CLASS_ATTR_NAME);<NEW_LINE>if (className == null || className.isEmpty()) {<NEW_LINE>reportActionError(pluginId, "action element should have specified \"class\" attribute");<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>// read ID and register loaded action<NEW_LINE>String id = obtainActionId(element, className);<NEW_LINE>if (Boolean.valueOf(element.getAttributeValue(INTERNAL_ATTR_NAME)) && !ApplicationManager.getApplication().isInternal()) {<NEW_LINE>myNotRegisteredInternalActionIds.add(id);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>String iconPath = element.getAttributeValue(ICON_ATTR_NAME);<NEW_LINE>String textValue = element.getAttributeValue(TEXT_ATTR_NAME);<NEW_LINE>String descriptionValue = element.getAttributeValue(DESCRIPTION);<NEW_LINE>ActionStub stub = new ActionStub(className, id, plugin, iconPath, () -> {<NEW_LINE>Presentation presentation = new Presentation();<NEW_LINE>presentation.setTextValue(computeActionText(localizeHelper, id, ACTION_ELEMENT_NAME, textValue));<NEW_LINE>presentation.setDescriptionValue(computeDescription(localizeHelper, id, ACTION_ELEMENT_NAME, descriptionValue));<NEW_LINE>return presentation;<NEW_LINE>});<NEW_LINE>processModuleExtensionOptions(element, stub);<NEW_LINE><MASK><NEW_LINE>// process all links and key bindings if any<NEW_LINE>for (SimpleXmlElement e : element.getChildren()) {<NEW_LINE>if (ADD_TO_GROUP_ELEMENT_NAME.equals(e.getName())) {<NEW_LINE>processAddToGroupNode(stub, e, pluginId, isSecondary(e));<NEW_LINE>} else if (SHORTCUT_ELEMENT_NAME.equals(e.getName())) {<NEW_LINE>processKeyboardShortcutNode(e, id, pluginId, keymapManager);<NEW_LINE>} else if (MOUSE_SHORTCUT_ELEMENT_NAME.equals(e.getName())) {<NEW_LINE>processMouseShortcutNode(e, id, pluginId, keymapManager);<NEW_LINE>} else if (ABBREVIATION_ELEMENT_NAME.equals(e.getName())) {<NEW_LINE>processAbbreviationNode(e, id);<NEW_LINE>} else {<NEW_LINE>reportActionError(pluginId, "unexpected name of element \"" + e.getName() + "\"");<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (element.getAttributeValue(USE_SHORTCUT_OF_ATTR_NAME) != null) {<NEW_LINE>keymapManager.bindShortcuts(element.getAttributeValue(USE_SHORTCUT_OF_ATTR_NAME), id);<NEW_LINE>}<NEW_LINE>registerOrReplaceActionInner(element, id, stub, pluginId);<NEW_LINE>return stub;<NEW_LINE>}
KeymapManagerEx keymapManager = KeymapManagerEx.getInstanceEx();
418,785
public InstrumentInterval instrumentGetActiveIntervals() throws TimeoutException, ExecutionException, InterruptedException, ApiException {<NEW_LINE>Object postBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String path = "/instrument/activeIntervals";<NEW_LINE>// query params<NEW_LINE>List<Pair> queryParams = new ArrayList<Pair>();<NEW_LINE>// header params<NEW_LINE>Map<String, String> headerParams = new HashMap<String, String>();<NEW_LINE>// form params<NEW_LINE>Map<String, String> formParams = new HashMap<String, String>();<NEW_LINE>String[<MASK><NEW_LINE>String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";<NEW_LINE>if (contentType.startsWith("multipart/form-data")) {<NEW_LINE>// file uploading<NEW_LINE>MultipartEntityBuilder localVarBuilder = MultipartEntityBuilder.create();<NEW_LINE>HttpEntity httpEntity = localVarBuilder.build();<NEW_LINE>postBody = httpEntity;<NEW_LINE>} else {<NEW_LINE>// normal form params<NEW_LINE>}<NEW_LINE>String[] authNames = new String[] {};<NEW_LINE>try {<NEW_LINE>String localVarResponse = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames);<NEW_LINE>if (localVarResponse != null) {<NEW_LINE>return (InstrumentInterval) ApiInvoker.deserialize(localVarResponse, "", InstrumentInterval.class);<NEW_LINE>} else {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>} catch (ApiException ex) {<NEW_LINE>throw ex;<NEW_LINE>} catch (InterruptedException ex) {<NEW_LINE>throw ex;<NEW_LINE>} catch (ExecutionException ex) {<NEW_LINE>if (ex.getCause() instanceof VolleyError) {<NEW_LINE>VolleyError volleyError = (VolleyError) ex.getCause();<NEW_LINE>if (volleyError.networkResponse != null) {<NEW_LINE>throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>throw ex;<NEW_LINE>} catch (TimeoutException ex) {<NEW_LINE>throw ex;<NEW_LINE>}<NEW_LINE>}
] contentTypes = { "application/json", "application/x-www-form-urlencoded" };
698,699
final ListReceivedLicensesResult executeListReceivedLicenses(ListReceivedLicensesRequest listReceivedLicensesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listReceivedLicensesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListReceivedLicensesRequest> request = null;<NEW_LINE>Response<ListReceivedLicensesResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListReceivedLicensesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listReceivedLicensesRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "License Manager");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListReceivedLicenses");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListReceivedLicensesResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListReceivedLicensesResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
1,315,763
public void testMSExcel() throws IOException {<NEW_LINE>File demoDocument = null;<NEW_LINE>MSExcel msExcel = null;<NEW_LINE>try {<NEW_LINE>msExcel = new MSExcel();<NEW_LINE>System.out.println("MSExcel version: " + msExcel.getVersion());<NEW_LINE>msExcel.setVisible(true);<NEW_LINE>Helper.sleep(5);<NEW_LINE>demoDocument = Helper.createNotExistingFile("jnatest", ".xls");<NEW_LINE>Helper.extractClasspathFileToReal("/com/sun/jna/platform/win32/COM/util/office/resources/jnatest.xls", demoDocument);<NEW_LINE>msExcel.<MASK><NEW_LINE>msExcel.insertValue("A1", "Hello from JNA!");<NEW_LINE>// wait 10sec. before closing<NEW_LINE>Helper.sleep(10);<NEW_LINE>// close and save the active sheet<NEW_LINE>msExcel.closeActiveWorkbook(true);<NEW_LINE>msExcel.newExcelBook();<NEW_LINE>msExcel.insertValue("A1", "Hello from JNA!");<NEW_LINE>// close and save the active sheet<NEW_LINE>msExcel.closeActiveWorkbook(true);<NEW_LINE>} finally {<NEW_LINE>if (msExcel != null) {<NEW_LINE>msExcel.quit();<NEW_LINE>}<NEW_LINE>if (demoDocument != null && demoDocument.exists()) {<NEW_LINE>demoDocument.delete();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
openExcelBook(demoDocument.getAbsolutePath());
1,259,975
public static void vertical11(Kernel1D_S32 kernel, GrayS32 src, GrayS32 dst, int divisor, @Nullable GrowArray<DogArray_I32> workspaces) {<NEW_LINE>final int[] dataSrc = src.data;<NEW_LINE>final int[] dataDst = dst.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 k4 = kernel.data[3];<NEW_LINE>final int k5 = kernel.data[4];<NEW_LINE>final int k6 = kernel.data[5];<NEW_LINE>final int k7 = kernel.data[6];<NEW_LINE>final int k8 = kernel.data[7];<NEW_LINE>final int k9 = kernel.data[8];<NEW_LINE>final int <MASK><NEW_LINE>final int k11 = kernel.data[10];<NEW_LINE>final int radius = kernel.getRadius();<NEW_LINE>final int imgWidth = dst.getWidth();<NEW_LINE>final int imgHeight = dst.getHeight();<NEW_LINE>final int halfDivisor = divisor / 2;<NEW_LINE>final int yEnd = imgHeight - radius;<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(radius, yEnd, y -> {<NEW_LINE>for (int y = radius; y < yEnd; y++) {<NEW_LINE>int indexDst = dst.startIndex + y * dst.stride;<NEW_LINE>int i = src.startIndex + (y - radius) * src.stride;<NEW_LINE>final int iEnd = i + imgWidth;<NEW_LINE>for (; i < iEnd; i++) {<NEW_LINE>int indexSrc = i;<NEW_LINE>int total = (dataSrc[indexSrc]) * k1;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc]) * k2;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc]) * k3;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc]) * k4;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc]) * k5;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc]) * k6;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc]) * k7;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc]) * k8;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc]) * k9;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc]) * k10;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc]) * k11;<NEW_LINE>dataDst[indexDst++] = ((total + halfDivisor) / divisor);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// CONCURRENT_ABOVE });<NEW_LINE>}
k10 = kernel.data[9];
1,223,191
private static List<Datum> convertToGrid(List<RealVector> anchors) {<NEW_LINE>// TODO: Currently only supports 1D and 2D grids.<NEW_LINE>int size = 1;<NEW_LINE>for (RealVector v : anchors) {<NEW_LINE>size *= v.getDimension();<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>List<Datum> grid = new ArrayList<>(size);<NEW_LINE>double[] array = new double[dimension];<NEW_LINE>if (dimension == 1) {<NEW_LINE>for (double x : anchors.get(0).toArray()) {<NEW_LINE>array[0] = x;<NEW_LINE>grid.add(new Datum(new ArrayList<Integer>(), new ArrayRealVector(array)));<NEW_LINE>}<NEW_LINE>} else if (dimension == 2) {<NEW_LINE>for (double x : anchors.get(0).toArray()) {<NEW_LINE>array[0] = x;<NEW_LINE>for (double y : anchors.get(1).toArray()) {<NEW_LINE>array[1] = y;<NEW_LINE>grid.add(new Datum(new ArrayList<Integer>(), new ArrayRealVector(array)));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return grid;<NEW_LINE>}
int dimension = anchors.size();
518,068
private long addFilesInDir(Path path, List<FileStatus> files, boolean logExcludedFiles) throws IOException {<NEW_LINE>final FileSystem fs = FileSystemUtils.getFlinkFileSystem(this.fs, path.toString());<NEW_LINE>long length = 0;<NEW_LINE>for (FileStatus dir : fs.listStatus(path)) {<NEW_LINE>if (dir.isDir()) {<NEW_LINE>if (acceptFile(dir) && enumerateNestedFiles) {<NEW_LINE>length += addFilesInDir(dir.getPath(), files, logExcludedFiles);<NEW_LINE>} else {<NEW_LINE>if (logExcludedFiles && LOG.isDebugEnabled()) {<NEW_LINE>LOG.debug("Directory " + dir.getPath().<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (acceptFile(dir)) {<NEW_LINE>files.add(dir);<NEW_LINE>length += dir.getLen();<NEW_LINE>testForUnsplittable(dir);<NEW_LINE>} else {<NEW_LINE>if (logExcludedFiles && LOG.isDebugEnabled()) {<NEW_LINE>LOG.debug("Directory " + dir.getPath().toString() + " did not pass the file-filter and is excluded" + ".");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return length;<NEW_LINE>}
toString() + " did not pass the file-filter and is excluded" + ".");
621,087
private void readMapIndex(MapIndex index, boolean onlyInitEncodingRules) throws IOException {<NEW_LINE>int defaultId = 1;<NEW_LINE>int oldLimit;<NEW_LINE>int encodingRulesSize = 0;<NEW_LINE>while (true) {<NEW_LINE>int t = codedIS.readTag();<NEW_LINE>int tag = WireFormat.getTagFieldNumber(t);<NEW_LINE>switch(tag) {<NEW_LINE>case 0:<NEW_LINE>// encoding rules are required!<NEW_LINE>if (onlyInitEncodingRules) {<NEW_LINE>index.finishInitializingTags();<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>case OsmandOdb.OsmAndMapIndex.NAME_FIELD_NUMBER:<NEW_LINE>index.setName(codedIS.readString());<NEW_LINE>break;<NEW_LINE>case OsmandOdb.OsmAndMapIndex.RULES_FIELD_NUMBER:<NEW_LINE>if (onlyInitEncodingRules) {<NEW_LINE>if (encodingRulesSize == 0) {<NEW_LINE>encodingRulesSize = codedIS.getTotalBytesRead();<NEW_LINE>}<NEW_LINE>int len = codedIS.readInt32();<NEW_LINE>oldLimit = codedIS.pushLimit(len);<NEW_LINE>readMapEncodingRule(index, defaultId++);<NEW_LINE>codedIS.popLimit(oldLimit);<NEW_LINE>index.encodingRulesSizeBytes = (codedIS.getTotalBytesRead() - encodingRulesSize);<NEW_LINE>} else {<NEW_LINE>skipUnknownField(t);<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case OsmandOdb.OsmAndMapIndex.LEVELS_FIELD_NUMBER:<NEW_LINE>int length = readInt();<NEW_LINE>int filePointer = codedIS.getTotalBytesRead();<NEW_LINE>if (!onlyInitEncodingRules) {<NEW_LINE>oldLimit = codedIS.pushLimit(length);<NEW_LINE>MapRoot mapRoot <MASK><NEW_LINE>mapRoot.length = length;<NEW_LINE>mapRoot.filePointer = filePointer;<NEW_LINE>index.getRoots().add(mapRoot);<NEW_LINE>codedIS.popLimit(oldLimit);<NEW_LINE>}<NEW_LINE>codedIS.seek(filePointer + length);<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>skipUnknownField(t);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
= readMapLevel(new MapRoot());
173,141
final UpdateMailboxQuotaResult executeUpdateMailboxQuota(UpdateMailboxQuotaRequest updateMailboxQuotaRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateMailboxQuotaRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UpdateMailboxQuotaRequest> request = null;<NEW_LINE>Response<UpdateMailboxQuotaResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new UpdateMailboxQuotaRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateMailboxQuotaRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "WorkMail");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateMailboxQuota");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UpdateMailboxQuotaResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateMailboxQuotaResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
989,426
/*<NEW_LINE>* (non-Javadoc)<NEW_LINE>*<NEW_LINE>* @see com.ibm.wsspi.runtime.component.WsComponent#destroy()<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void destroy() throws Exception {<NEW_LINE>String thisMethodName = CLASS_NAME + ".destroy()";<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {<NEW_LINE>SibTr.entry(tc, thisMethodName, "");<NEW_LINE>}<NEW_LINE>// Destroy the ME's we created<NEW_LINE>Enumeration meEnum = _messagingEngines.elements();<NEW_LINE>// Destroy each ME on this server. Any exceptions are caught and<NEW_LINE>// deliberately not<NEW_LINE>// rethrown as errors in one ME must not affect any others that might<NEW_LINE>// exist.<NEW_LINE>while (meEnum.hasMoreElements()) {<NEW_LINE>Object o = meEnum.nextElement();<NEW_LINE>Object c = ((MessagingEngine) o).getRuntime();<NEW_LINE>if (c instanceof BaseMessagingEngineImpl) {<NEW_LINE>try {<NEW_LINE>((BaseMessagingEngineImpl) c).destroy();<NEW_LINE>mbeanServiceReg.unregister();<NEW_LINE>} catch (Exception e) {<NEW_LINE>FFDCFilter.processException(e, thisMethodName, "1:910:1.108", this);<NEW_LINE><MASK><NEW_LINE>SibTr.error(tc, "INTERNAL_ERROR_SIAS0003", e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>_messagingEngines = null;<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {<NEW_LINE>SibTr.exit(tc, thisMethodName);<NEW_LINE>}<NEW_LINE>}
SibTr.exception(tc, e);
529,355
private String createAppClientProfileData(ActionContext context, MonitorDataFrame mdf, String appid, String appurl, String appgroup, Map<String, Object> appProfile) {<NEW_LINE>List<Map> clients = mdf.getElemInstances(appid, "clients");<NEW_LINE>long checkTime = System.currentTimeMillis();<NEW_LINE>long expireTime = 60000;<NEW_LINE>for (int i = 0; i < clients.size(); i++) {<NEW_LINE>Map <MASK><NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>Map<String, Object> cVals = (Map<String, Object>) client.get("values");<NEW_LINE>Long client_ts = (Long) cVals.get("ts");<NEW_LINE>if (client_ts == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>long client_timeout = checkTime - client_ts;<NEW_LINE>if (client_timeout < expireTime) {<NEW_LINE>cVals.put("state", "1");<NEW_LINE>} else if (client_timeout >= expireTime && client_timeout < expireTime * 2) {<NEW_LINE>cVals.put("state", "0");<NEW_LINE>} else if (client_timeout >= expireTime * 2) {<NEW_LINE>cVals.put("state", "-1");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String clientsStr = JSONHelper.toString(clients);<NEW_LINE>this.listener.onAppClientProfileCreate(context, mdf, appid, appurl, appgroup, appProfile, clients);<NEW_LINE>return clientsStr;<NEW_LINE>}
client = clients.get(i);
516,562
public static GetCustomFieldsByTemplateIdResponse unmarshall(GetCustomFieldsByTemplateIdResponse getCustomFieldsByTemplateIdResponse, UnmarshallerContext _ctx) {<NEW_LINE>getCustomFieldsByTemplateIdResponse.setRequestId(_ctx.stringValue("GetCustomFieldsByTemplateIdResponse.RequestId"));<NEW_LINE>getCustomFieldsByTemplateIdResponse.setCode(_ctx.integerValue("GetCustomFieldsByTemplateIdResponse.Code"));<NEW_LINE>getCustomFieldsByTemplateIdResponse.setSuccess(_ctx.booleanValue("GetCustomFieldsByTemplateIdResponse.Success"));<NEW_LINE>List<DataItem> data = new ArrayList<DataItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("GetCustomFieldsByTemplateIdResponse.Data.Length"); i++) {<NEW_LINE>DataItem dataItem = new DataItem();<NEW_LINE>dataItem.setCreatedAt(_ctx.longValue("GetCustomFieldsByTemplateIdResponse.Data[" + i + "].CreatedAt"));<NEW_LINE>dataItem.setDefaultValue(_ctx.stringValue("GetCustomFieldsByTemplateIdResponse.Data[" + i + "].DefaultValue"));<NEW_LINE>dataItem.setDescription(_ctx.stringValue("GetCustomFieldsByTemplateIdResponse.Data[" + i + "].Description"));<NEW_LINE>dataItem.setDynamic(_ctx.booleanValue("GetCustomFieldsByTemplateIdResponse.Data[" + i + "].Dynamic"));<NEW_LINE>dataItem.setEditable(_ctx.booleanValue("GetCustomFieldsByTemplateIdResponse.Data[" + i + "].Editable"));<NEW_LINE>dataItem.setFieldFormat(_ctx.stringValue("GetCustomFieldsByTemplateIdResponse.Data[" + i + "].FieldFormat"));<NEW_LINE>dataItem.setId(_ctx.integerValue("GetCustomFieldsByTemplateIdResponse.Data[" + i + "].Id"));<NEW_LINE>dataItem.setIsDelete(_ctx.booleanValue("GetCustomFieldsByTemplateIdResponse.Data[" + i + "].IsDelete"));<NEW_LINE>dataItem.setIsRemember(_ctx.booleanValue("GetCustomFieldsByTemplateIdResponse.Data[" + i + "].IsRemember"));<NEW_LINE>dataItem.setIsRequired(_ctx.booleanValue("GetCustomFieldsByTemplateIdResponse.Data[" + i + "].IsRequired"));<NEW_LINE>dataItem.setMaxLength(_ctx.integerValue("GetCustomFieldsByTemplateIdResponse.Data[" + i + "].MaxLength"));<NEW_LINE>dataItem.setMinLength(_ctx.integerValue("GetCustomFieldsByTemplateIdResponse.Data[" + i + "].MinLength"));<NEW_LINE>dataItem.setName(_ctx.stringValue("GetCustomFieldsByTemplateIdResponse.Data[" + i + "].Name"));<NEW_LINE>dataItem.setNameI18N(_ctx.stringValue("GetCustomFieldsByTemplateIdResponse.Data[" + i + "].NameI18N"));<NEW_LINE>dataItem.setOther(_ctx.stringValue("GetCustomFieldsByTemplateIdResponse.Data[" + i + "].Other"));<NEW_LINE>dataItem.setPossibleValues(_ctx.stringValue("GetCustomFieldsByTemplateIdResponse.Data[" + i + "].PossibleValues"));<NEW_LINE>dataItem.setType(_ctx.stringValue("GetCustomFieldsByTemplateIdResponse.Data[" + i + "].Type"));<NEW_LINE>dataItem.setUpdatedAt(_ctx.longValue<MASK><NEW_LINE>data.add(dataItem);<NEW_LINE>}<NEW_LINE>getCustomFieldsByTemplateIdResponse.setData(data);<NEW_LINE>return getCustomFieldsByTemplateIdResponse;<NEW_LINE>}
("GetCustomFieldsByTemplateIdResponse.Data[" + i + "].UpdatedAt"));
525,602
final PutDraftAppVersionTemplateResult executePutDraftAppVersionTemplate(PutDraftAppVersionTemplateRequest putDraftAppVersionTemplateRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(putDraftAppVersionTemplateRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<PutDraftAppVersionTemplateRequest> request = null;<NEW_LINE>Response<PutDraftAppVersionTemplateResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new PutDraftAppVersionTemplateRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(putDraftAppVersionTemplateRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "resiliencehub");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutDraftAppVersionTemplate");<NEW_LINE>request.<MASK><NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<PutDraftAppVersionTemplateResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new PutDraftAppVersionTemplateResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
1,816,344
private void processFiles(RootModule rootModule, final SeverityLevelCounter warningCounter, final String checkstyleVersion) {<NEW_LINE>final long startTime = System.currentTimeMillis();<NEW_LINE>final List<File> files = getFilesToCheck();<NEW_LINE>final long endTime = System.currentTimeMillis();<NEW_LINE>log("To locate the files took " + (endTime - startTime) + TIME_SUFFIX, Project.MSG_VERBOSE);<NEW_LINE>log("Running Checkstyle " + Objects.toString(checkstyleVersion, "") + " on " + files.size() + " files", Project.MSG_INFO);<NEW_LINE>log("Using configuration " + config, Project.MSG_VERBOSE);<NEW_LINE>final int numErrs;<NEW_LINE>try {<NEW_LINE>final long processingStartTime = System.currentTimeMillis();<NEW_LINE>numErrs = rootModule.process(files);<NEW_LINE>final long processingEndTime = System.currentTimeMillis();<NEW_LINE>log("To process the files took " + (processingEndTime - processingStartTime) + TIME_SUFFIX, Project.MSG_VERBOSE);<NEW_LINE>} catch (CheckstyleException ex) {<NEW_LINE>throw new BuildException("Unable to process files: " + files, ex);<NEW_LINE>}<NEW_LINE>final int numWarnings = warningCounter.getCount();<NEW_LINE>final boolean okStatus = numErrs <= maxErrors && numWarnings <= maxWarnings;<NEW_LINE>// Handle the return status<NEW_LINE>if (!okStatus) {<NEW_LINE>final String failureMsg = "Got " <MASK><NEW_LINE>if (failureProperty != null) {<NEW_LINE>getProject().setProperty(failureProperty, failureMsg);<NEW_LINE>}<NEW_LINE>if (failOnViolation) {<NEW_LINE>throw new BuildException(failureMsg, getLocation());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
+ numErrs + " errors and " + numWarnings + " warnings.";
976,303
public boolean retryRequest(IOException exception, int executionCount, HttpContext ctx) {<NEW_LINE>log.fine(() -> String.format("retryRequest(exception='%s', executionCount='%d', ctx='%s'", exception.getClass().getName(), executionCount, ctx));<NEW_LINE>HttpClientContext clientCtx = HttpClientContext.adapt(ctx);<NEW_LINE>if (!predicate.test(exception, clientCtx)) {<NEW_LINE>log.fine(() -> String.format("Not retrying for '%s'", ctx));<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (executionCount > maxRetries) {<NEW_LINE>log.fine(() -> String.format("Max retries exceeded for '%s'", ctx));<NEW_LINE>retryFailedConsumer.<MASK><NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Duration delay = delaySupplier.getDelay(executionCount);<NEW_LINE>log.fine(() -> String.format("Retrying after %s for '%s'", delay, ctx));<NEW_LINE>retryConsumer.onRetry(exception, delay, executionCount, clientCtx);<NEW_LINE>sleeper.sleep(delay);<NEW_LINE>return true;<NEW_LINE>}
onRetryFailed(exception, executionCount, clientCtx);
1,416,665
static MongoDatabase createMongoDatabase(JaversMongoProperties properties, Optional<MongoClientSettings> mongoClientSettings) {<NEW_LINE>if (properties.getMongodb().getUri() != null) {<NEW_LINE>ConnectionString connectionString = new ConnectionString(properties.getMongodb().getUri());<NEW_LINE>MongoClient mongoClient = MongoClients.create(connectionString);<NEW_LINE>return mongoClient.getDatabase(connectionString.getDatabase());<NEW_LINE>}<NEW_LINE>if (properties.getMongodb().getHost() != null) {<NEW_LINE>String host = properties.getMongodb().getHost() == null ? DEFAULT_HOST : properties.getMongodb().getHost();<NEW_LINE>int port = properties.getMongodb().getPort() == null ? DEFAULT_PORT : properties.getMongodb().getPort();<NEW_LINE>Builder clientBuilder = mongoClientSettings.map(s -> MongoClientSettings.builder(s)).orElse(MongoClientSettings.builder());<NEW_LINE>clientBuilder.applyToClusterSettings(b -> b.hosts(Lists.asList(new ServerAddress(host, port))));<NEW_LINE>MongoCredential credentials = getCredentials(properties);<NEW_LINE>if (credentials != null) {<NEW_LINE>clientBuilder.credential(credentials);<NEW_LINE>}<NEW_LINE>MongoClient mongoClient = MongoClients.create(clientBuilder.build());<NEW_LINE>return mongoClient.getDatabase(properties.<MASK><NEW_LINE>}<NEW_LINE>throw new JaversException(JaversExceptionCode.MALFORMED_JAVERS_MONGODB_PROPERTIES);<NEW_LINE>}
getMongodb().getDatabase());
1,792,635
public synchronized void fit(MultiDataSetIterator multi) {<NEW_LINE>if (flattenedGradients == null) {<NEW_LINE>initGradientsView();<NEW_LINE>}<NEW_LINE>if (!multi.hasNext() && multi.resetSupported()) {<NEW_LINE>multi.reset();<NEW_LINE>}<NEW_LINE>for (TrainingListener tl : trainingListeners) {<NEW_LINE>tl.onEpochStart(this);<NEW_LINE>}<NEW_LINE>boolean destructable = false;<NEW_LINE>MultiDataSetIterator multiDataSetIterator;<NEW_LINE>if (multi.asyncSupported()) {<NEW_LINE>multiDataSetIterator = new AsyncMultiDataSetIterator(multi, Math.max(Nd4j.getAffinityManager().getNumberOfDevices() * 2, 2), true);<NEW_LINE>destructable = true;<NEW_LINE>} else<NEW_LINE>multiDataSetIterator = multi;<NEW_LINE>long time1 = System.currentTimeMillis();<NEW_LINE>while (multiDataSetIterator.hasNext()) {<NEW_LINE>MultiDataSet mds = multiDataSetIterator.next();<NEW_LINE>long time2 = System.currentTimeMillis();<NEW_LINE>lastEtlTime.<MASK><NEW_LINE>fit(mds.getFeatures(), mds.getLabels(), mds.getFeaturesMaskArrays(), mds.getLabelsMaskArrays());<NEW_LINE>time1 = System.currentTimeMillis();<NEW_LINE>}<NEW_LINE>if (destructable)<NEW_LINE>((AsyncMultiDataSetIterator) multiDataSetIterator).shutdown();<NEW_LINE>for (TrainingListener tl : trainingListeners) {<NEW_LINE>tl.onEpochEnd(this);<NEW_LINE>}<NEW_LINE>incrementEpochCount();<NEW_LINE>}
set((time2 - time1));
1,123,562
public void createNewSibling() {<NEW_LINE>O property <MASK><NEW_LINE>if (property == null) {<NEW_LINE>// Shouldn't really get here, because the<NEW_LINE>// action should be disabled<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// We need to apply the changes in the active ontology<NEW_LINE>OWLEntityCreationSet<O> creationSet = createProperty();<NEW_LINE>if (creationSet != null) {<NEW_LINE>// Combine the changes that are required to create the OWLAnnotationProperty, with the<NEW_LINE>// changes that are required to make it a sibling property.<NEW_LINE>List<OWLOntologyChange> changes = new ArrayList<>();<NEW_LINE>changes.addAll(creationSet.getOntologyChanges());<NEW_LINE>OWLOntology ont = getOWLModelManager().getActiveOntology();<NEW_LINE>for (O parentProperty : getHierarchyProvider().getParents(property)) {<NEW_LINE>if (shouldAddAsParentOfNewlyCreatedProperty(parentProperty)) {<NEW_LINE>OWLAxiom ax = getSubPropertyAxiom(creationSet.getOWLEntity(), parentProperty);<NEW_LINE>changes.add(new AddAxiom(ont, ax));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>getOWLModelManager().applyChanges(changes);<NEW_LINE>getTree().setSelectedOWLObject(creationSet.getOWLEntity());<NEW_LINE>}<NEW_LINE>}
= getTree().getSelectedOWLObject();
622,874
public void run(RegressionEnvironment env) {<NEW_LINE>sendTimeEvent(env, 1, 8, 0, 0, 0);<NEW_LINE>env.compileDeploy("on SupportBean set myint = intPrimitive, mystring = theString");<NEW_LINE>String expression = "@name('s0') select symbol from SupportMarketDataBean#length(2) output when myint = 1 and mystring like 'F%'";<NEW_LINE>env.compileDeploy(expression).setSubscriber("s0");<NEW_LINE>sendEvent(env, "S1", 0);<NEW_LINE>env.sendEventBean(new SupportBean("E1", 1));<NEW_LINE>env.assertRuntime(runtime -> {<NEW_LINE>assertEquals(1, runtime.getVariableService().getVariableValue(null, "myint"));<NEW_LINE>assertEquals("E1", runtime.getVariableService().getVariableValue(null, "mystring"));<NEW_LINE>});<NEW_LINE>sendEvent(env, "S2", 0);<NEW_LINE>sendTimeEvent(env, 1, 8, 0, 1, 0);<NEW_LINE>env.assertSubscriber("s0", subscriber -> assertFalse(subscriber.isInvoked()));<NEW_LINE>env.sendEventBean(new SupportBean("F1", 0));<NEW_LINE>env.assertRuntime(runtime -> {<NEW_LINE>assertEquals(0, runtime.getVariableService().getVariableValue(null, "myint"));<NEW_LINE>assertEquals("F1", runtime.getVariableService()<MASK><NEW_LINE>});<NEW_LINE>sendTimeEvent(env, 1, 8, 0, 2, 0);<NEW_LINE>sendEvent(env, "S3", 0);<NEW_LINE>env.assertSubscriber("s0", subscriber -> assertFalse(subscriber.isInvoked()));<NEW_LINE>env.sendEventBean(new SupportBean("F2", 1));<NEW_LINE>env.assertRuntime(runtime -> {<NEW_LINE>assertEquals(1, runtime.getVariableService().getVariableValue(null, "myint"));<NEW_LINE>assertEquals("F2", runtime.getVariableService().getVariableValue(null, "mystring"));<NEW_LINE>});<NEW_LINE>sendEvent(env, "S4", 0);<NEW_LINE>env.assertSubscriber("s0", subscriber -> EPAssertionUtil.assertEqualsExactOrder(new Object[] { "S1", "S2", "S3", "S4" }, subscriber.getAndResetLastNewData()));<NEW_LINE>env.undeployAll();<NEW_LINE>}
.getVariableValue(null, "mystring"));
854,023
public void initSubDevices() {<NEW_LINE>ModelFactory factory = ModelFactory.eINSTANCE;<NEW_LINE>AccelerometerDirection x = factory.createAccelerometerDirection();<NEW_LINE>x.setDirection(AccelerometerCoordinate.X);<NEW_LINE>x.setUid(getUid());<NEW_LINE>String subIdX = "x";<NEW_LINE>logger.debug("{} addSubDevice {}", LoggerConstants.TFINIT, subIdX);<NEW_LINE>x.setSubId(subIdX);<NEW_LINE>x.init();<NEW_LINE>x.setMbrick(this);<NEW_LINE>AccelerometerDirection y = factory.createAccelerometerDirection();<NEW_LINE>y.setDirection(AccelerometerCoordinate.Y);<NEW_LINE>y.setUid(getUid());<NEW_LINE>String subIdY = "y";<NEW_LINE>logger.debug("{} addSubDevice {}", LoggerConstants.TFINIT, subIdY);<NEW_LINE>y.setSubId(subIdY);<NEW_LINE>y.init();<NEW_LINE>y.setMbrick(this);<NEW_LINE><MASK><NEW_LINE>z.setDirection(AccelerometerCoordinate.Z);<NEW_LINE>z.setUid(getUid());<NEW_LINE>String subIdZ = "z";<NEW_LINE>logger.debug("{} addSubDevice {}", LoggerConstants.TFINIT, subIdZ);<NEW_LINE>z.setSubId(subIdZ);<NEW_LINE>z.init();<NEW_LINE>z.setMbrick(this);<NEW_LINE>AccelerometerTemperature temperature = factory.createAccelerometerTemperature();<NEW_LINE>temperature.setUid(getUid());<NEW_LINE>String subIdTemperature = "temperature";<NEW_LINE>logger.debug("{} addSubDevice {}", LoggerConstants.TFINIT, subIdTemperature);<NEW_LINE>temperature.setSubId(subIdTemperature);<NEW_LINE>temperature.init();<NEW_LINE>temperature.setMbrick(this);<NEW_LINE>AccelerometerLed led = factory.createAccelerometerLed();<NEW_LINE>led.setUid(getUid());<NEW_LINE>String subIdLed = "led";<NEW_LINE>logger.debug("{} addSubDevice {}", LoggerConstants.TFINIT, subIdLed);<NEW_LINE>led.setSubId(subIdLed);<NEW_LINE>led.init();<NEW_LINE>led.setMbrick(this);<NEW_LINE>}
AccelerometerDirection z = factory.createAccelerometerDirection();
145,602
private Object createFeature(FeatureFlagConfigurationSetting item) {<NEW_LINE>String key = getFeatureSimpleName(item);<NEW_LINE>Feature feature = new Feature(key, item);<NEW_LINE>Map<Integer, FeatureFlagFilter> featureEnabledFor = feature.getEnabledFor();<NEW_LINE>// Setting Enabled For to null, but enabled = true will result in the feature<NEW_LINE>// being on. This is the case of a feature is on/off and set to on. This is to<NEW_LINE>// tell the difference between conditional/off which looks exactly the same...<NEW_LINE>// It should never be the case of Conditional On, and no filters coming from<NEW_LINE>// Azure, but it is a valid way from the config file, which should result in<NEW_LINE>// false being returned.<NEW_LINE>if (featureEnabledFor.size() == 0 && item.isEnabled()) {<NEW_LINE>return true;<NEW_LINE>} else if (!item.isEnabled()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>for (int filter = 0; filter < feature.getEnabledFor().size(); filter++) {<NEW_LINE>FeatureFlagFilter featureFilterEvaluationContext = featureEnabledFor.get(filter);<NEW_LINE>Map<String, Object> parameters = featureFilterEvaluationContext.getParameters();<NEW_LINE>if (parameters == null || !TARGETING_FILTER.equals(featureEnabledFor.get(filter).getName())) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>Object audienceObject = parameters.get(AUDIENCE);<NEW_LINE>if (audienceObject != null) {<NEW_LINE>parameters = (Map<String, Object>) audienceObject;<NEW_LINE>}<NEW_LINE>List<Object> users = convertToListOrEmptyList(parameters, USERS_CAPS);<NEW_LINE>List<Object> groupRollouts = convertToListOrEmptyList(parameters, GROUPS_CAPS);<NEW_LINE>switchKeyValues(parameters, USERS_CAPS, USERS, mapValuesByIndex(users));<NEW_LINE>switchKeyValues(parameters, GROUPS_CAPS, GROUPS, mapValuesByIndex(groupRollouts));<NEW_LINE>switchKeyValues(parameters, DEFAULT_ROLLOUT_PERCENTAGE_CAPS, DEFAULT_ROLLOUT_PERCENTAGE<MASK><NEW_LINE>featureFilterEvaluationContext.setParameters(parameters);<NEW_LINE>featureEnabledFor.put(filter, featureFilterEvaluationContext);<NEW_LINE>feature.setEnabledFor(featureEnabledFor);<NEW_LINE>}<NEW_LINE>return feature;<NEW_LINE>}
, parameters.get(DEFAULT_ROLLOUT_PERCENTAGE_CAPS));
1,016,977
public List<Event> findRelatedEvents(String parentEvent, Date fromDate, Date toDate) throws DotDataException, DotSecurityException, PortalException, SystemException {<NEW_LINE>Logger.debug(this, "findRelatedEvents: parentEvent = " + parentEvent + <MASK><NEW_LINE>// Retrieving the current user<NEW_LINE>User user = PortalUtil.getUser(request);<NEW_LINE>boolean respectCMSAnon = false;<NEW_LINE>if (user == null) {<NEW_LINE>// Assuming is a front-end access<NEW_LINE>respectCMSAnon = true;<NEW_LINE>user = (User) request.getSession().getAttribute(WebKeys.CMS_USER);<NEW_LINE>}<NEW_LINE>List<Event> eventsList = new ArrayList<Event>();<NEW_LINE>Event parentEv = eventAPI.find(parentEvent, true, user, respectCMSAnon);<NEW_LINE>List<Event> events = eventAPI.findRelatedEvents(parentEv, fromDate, toDate, true, user, respectCMSAnon);<NEW_LINE>for (Event ev : events) {<NEW_LINE>ev.setTags();<NEW_LINE>eventsList.add(ev);<NEW_LINE>}<NEW_LINE>return eventsList;<NEW_LINE>}
", fromDate: " + fromDate + ", toDate = " + toDate);
883,309
private void makeUnidirectional(DeployBeanPropertyAssocMany<?> oneToMany) {<NEW_LINE>DeployBeanDescriptor<?> targetDesc = targetDescriptor(oneToMany);<NEW_LINE>Class<?> owningType = oneToMany.getOwningType();<NEW_LINE>if (!oneToMany.getCascadeInfo().isSave()) {<NEW_LINE>// The property MUST have persist cascading so that inserts work.<NEW_LINE>Class<?> targetType = oneToMany.getTargetType();<NEW_LINE>String msg = "Error on " + oneToMany.getFullBeanName() + ". @OneToMany MUST have ";<NEW_LINE>msg += "Cascade.PERSIST or Cascade.ALL because this is a unidirectional ";<NEW_LINE>msg += "relationship. That is, there is no property of type " + owningType + " on " + targetType;<NEW_LINE>throw new PersistenceException(msg);<NEW_LINE>}<NEW_LINE>// mark this property as unidirectional<NEW_LINE>oneToMany.setUnidirectional();<NEW_LINE>// specify table and table alias...<NEW_LINE>BeanTable beanTable = beanTable(owningType);<NEW_LINE>// define the TableJoin<NEW_LINE>DeployTableJoin oneToManyJoin = oneToMany.getTableJoin();<NEW_LINE>if (!oneToManyJoin.hasJoinColumns()) {<NEW_LINE>throw new RuntimeException("No join columns");<NEW_LINE>}<NEW_LINE>createUnidirectional(<MASK><NEW_LINE>}
targetDesc, owningType, beanTable, oneToManyJoin);
1,484,560
public void run(RegressionEnvironment env) {<NEW_LINE>String[] fields = new String[] { "theString" };<NEW_LINE>String epl = "@name('s0') create window NW#expr(sum(intPrimitive) < 10) as SupportBean;\n" + "insert into NW select * from SupportBean;\n" + "on SupportBean_A delete from NW where theString = id;\n";<NEW_LINE>env.compileDeploy(epl).addListener("s0");<NEW_LINE>env.sendEventBean(new SupportBean("E1", 1));<NEW_LINE>env.assertPropsPerRowIRPairFlattened("s0", fields, new Object[][] { { "E1" } }, null);<NEW_LINE>env.sendEventBean(new SupportBean("E2", 8));<NEW_LINE>env.assertPropsPerRowIRPairFlattened("s0", fields, new Object[][] { { "E2" } }, null);<NEW_LINE>env.milestone(0);<NEW_LINE>env.<MASK><NEW_LINE>env.assertPropsPerRowIRPairFlattened("s0", fields, null, new Object[][] { { "E2" } });<NEW_LINE>env.sendEventBean(new SupportBean("E3", 7));<NEW_LINE>env.assertPropsPerRowIRPairFlattened("s0", fields, new Object[][] { { "E3" } }, null);<NEW_LINE>env.sendEventBean(new SupportBean("E4", 2));<NEW_LINE>env.assertPropsPerRowIRPairFlattened("s0", fields, new Object[][] { { "E4" } }, new Object[][] { { "E1" } });<NEW_LINE>env.undeployAll();<NEW_LINE>}
sendEventBean(new SupportBean_A("E2"));
1,655,244
public final Object sendResponse(final Map<String, Object> event, final Context context, final String responseStatus, ObjectNode responseData) {<NEW_LINE>String responseUrl = (String) event.get("ResponseURL");<NEW_LINE>LOGGER.info("ResponseURL: {}", responseUrl);<NEW_LINE>try {<NEW_LINE>URL url = new URL(responseUrl);<NEW_LINE>HttpURLConnection connection = (HttpURLConnection) url.openConnection();<NEW_LINE>connection.setDoOutput(true);<NEW_LINE><MASK><NEW_LINE>connection.setRequestMethod("PUT");<NEW_LINE>ObjectNode responseBody = JsonNodeFactory.instance.objectNode();<NEW_LINE>responseBody.put("Status", responseStatus);<NEW_LINE>responseBody.put("RequestId", (String) event.get("RequestId"));<NEW_LINE>responseBody.put("LogicalResourceId", (String) event.get("LogicalResourceId"));<NEW_LINE>responseBody.put("StackId", (String) event.get("StackId"));<NEW_LINE>responseBody.put("PhysicalResourceId", (String) event.get("LogicalResourceId"));<NEW_LINE>if (!"FAILED".equals(responseStatus)) {<NEW_LINE>responseBody.set("Data", responseData);<NEW_LINE>} else {<NEW_LINE>responseBody.put("Reason", responseData.get("Reason").asText());<NEW_LINE>}<NEW_LINE>LOGGER.info("Response Body: " + responseBody.toString());<NEW_LINE>try (OutputStreamWriter response = new OutputStreamWriter(connection.getOutputStream())) {<NEW_LINE>response.write(responseBody.toString());<NEW_LINE>} catch (IOException ioe) {<NEW_LINE>LOGGER.error("Failed to call back to CFN response URL");<NEW_LINE>LOGGER.error(Utils.getFullStackTrace(ioe));<NEW_LINE>}<NEW_LINE>LOGGER.info("Response Code: {}", connection.getResponseCode());<NEW_LINE>connection.disconnect();<NEW_LINE>} catch (IOException e) {<NEW_LINE>LOGGER.error("Failed to open connection to CFN response URL");<NEW_LINE>LOGGER.error(Utils.getFullStackTrace(e));<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
connection.setRequestProperty("Content-Type", "");
1,672,787
private Computer makeBigIntegerComputer(EPTypeClass typeOne, EPTypeClass typeTwo) {<NEW_LINE>if ((typeOne.getType() == BigDecimal.class) && (typeTwo.getType() == BigDecimal.class)) {<NEW_LINE>return computers.get(new MathArithDesc(EPTypePremade.BIGDECIMAL.getEPType(), this));<NEW_LINE>}<NEW_LINE>if ((typeOne.getType() == BigInteger.class) && (typeTwo.getType() == BigInteger.class)) {<NEW_LINE>Computer computer = computers.get(new MathArithDesc(EPTypePremade.BIGINTEGER.getEPType(), this));<NEW_LINE>if (computer != null) {<NEW_LINE>return computer;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>SimpleNumberBigIntegerCoercer convertorOne = SimpleNumberCoercerFactory.getCoercerBigInteger(typeOne);<NEW_LINE>SimpleNumberBigIntegerCoercer <MASK><NEW_LINE>if (this == ADD) {<NEW_LINE>return new AddBigIntConvComputer(convertorOne, convertorTwo);<NEW_LINE>}<NEW_LINE>if (this == SUBTRACT) {<NEW_LINE>return new SubtractBigIntConvComputer(convertorOne, convertorTwo);<NEW_LINE>}<NEW_LINE>if (this == MULTIPLY) {<NEW_LINE>return new MultiplyBigIntConvComputer(convertorOne, convertorTwo);<NEW_LINE>}<NEW_LINE>if (this == DIVIDE) {<NEW_LINE>return new DivideBigIntConvComputer(convertorOne, convertorTwo);<NEW_LINE>}<NEW_LINE>return new ModuloLong();<NEW_LINE>}
convertorTwo = SimpleNumberCoercerFactory.getCoercerBigInteger(typeTwo);
1,399,564
private List<PartitionMeta> loadPartitionInfoFromHDFS(String path, MatrixContext matrixContext, Configuration conf) throws IOException {<NEW_LINE>Path meteFilePath = new Path(new Path(path, matrixContext.getName<MASK><NEW_LINE>MatrixFilesMeta meta = new MatrixFilesMeta();<NEW_LINE>FileSystem fs = meteFilePath.getFileSystem(conf);<NEW_LINE>LOG.info("Load matrix meta for matrix " + matrixContext.getName());<NEW_LINE>if (!fs.exists(meteFilePath)) {<NEW_LINE>throw new IOException("matrix meta file does not exist ");<NEW_LINE>}<NEW_LINE>FSDataInputStream input = fs.open(meteFilePath);<NEW_LINE>try {<NEW_LINE>meta.read(input);<NEW_LINE>} catch (Throwable e) {<NEW_LINE>throw new IOException("Read meta failed ", e);<NEW_LINE>} finally {<NEW_LINE>input.close();<NEW_LINE>}<NEW_LINE>List<PartitionMeta> matrixPartitions = new ArrayList<>();<NEW_LINE>Map<Integer, MatrixPartitionMeta> partMetas = meta.getPartMetas();<NEW_LINE>int matrixId = 0;<NEW_LINE>try {<NEW_LINE>writeLock.lock();<NEW_LINE>matrixId = maxMatrixId++;<NEW_LINE>} finally {<NEW_LINE>writeLock.unlock();<NEW_LINE>}<NEW_LINE>for (Map.Entry<Integer, MatrixPartitionMeta> partMetaEntry : partMetas.entrySet()) {<NEW_LINE>matrixPartitions.add(new PartitionMeta(matrixId, partMetaEntry.getKey(), partMetaEntry.getValue().getStartRow(), partMetaEntry.getValue().getEndRow(), partMetaEntry.getValue().getStartCol(), partMetaEntry.getValue().getEndCol()));<NEW_LINE>}<NEW_LINE>return matrixPartitions;<NEW_LINE>}
()), ModelFilesConstent.modelMetaFileName);
1,039,695
public static ExtensionElement parseExtensionElement(XMLStreamReader xtr) throws Exception {<NEW_LINE>ExtensionElement extensionElement = new ExtensionElement();<NEW_LINE>BpmnXMLUtil.addXMLLocation(extensionElement, xtr);<NEW_LINE>extensionElement.setName(xtr.getLocalName());<NEW_LINE>if (StringUtils.isNotEmpty(xtr.getNamespaceURI())) {<NEW_LINE>extensionElement.setNamespace(xtr.getNamespaceURI());<NEW_LINE>}<NEW_LINE>if (StringUtils.isNotEmpty(xtr.getPrefix())) {<NEW_LINE>extensionElement.setNamespacePrefix(xtr.getPrefix());<NEW_LINE>}<NEW_LINE>for (int i = 0; i < xtr.getAttributeCount(); i++) {<NEW_LINE>ExtensionAttribute extensionAttribute = new ExtensionAttribute();<NEW_LINE>extensionAttribute.setName(xtr.getAttributeLocalName(i));<NEW_LINE>extensionAttribute.setValue<MASK><NEW_LINE>if (StringUtils.isNotEmpty(xtr.getAttributeNamespace(i))) {<NEW_LINE>extensionAttribute.setNamespace(xtr.getAttributeNamespace(i));<NEW_LINE>}<NEW_LINE>if (StringUtils.isNotEmpty(xtr.getAttributePrefix(i))) {<NEW_LINE>extensionAttribute.setNamespacePrefix(xtr.getAttributePrefix(i));<NEW_LINE>}<NEW_LINE>extensionElement.addAttribute(extensionAttribute);<NEW_LINE>}<NEW_LINE>boolean readyWithExtensionElement = false;<NEW_LINE>while (!readyWithExtensionElement && xtr.hasNext()) {<NEW_LINE>xtr.next();<NEW_LINE>if (xtr.isCharacters() || XMLStreamReader.CDATA == xtr.getEventType()) {<NEW_LINE>if (StringUtils.isNotEmpty(xtr.getText().trim())) {<NEW_LINE>extensionElement.setElementText(xtr.getText().trim());<NEW_LINE>}<NEW_LINE>} else if (xtr.isStartElement()) {<NEW_LINE>ExtensionElement childExtensionElement = parseExtensionElement(xtr);<NEW_LINE>extensionElement.addChildElement(childExtensionElement);<NEW_LINE>} else if (xtr.isEndElement() && extensionElement.getName().equalsIgnoreCase(xtr.getLocalName())) {<NEW_LINE>readyWithExtensionElement = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return extensionElement;<NEW_LINE>}
(xtr.getAttributeValue(i));
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>// targetDb: { targetTb: [{ rowIndex, [pk1, pk2] }] }<NEW_LINE>final Map<String, Map<String, List<org.apache.calcite.util.Pair<Integer, List<Object>>>>> <MASK><NEW_LINE>// Foreach row to be updated or deleted<NEW_LINE>final List<String> skNames = skMetas.stream().map(ColumnMeta::getName).collect(Collectors.toList());<NEW_LINE>for (int i = 0; i < values.size(); i++) {<NEW_LINE>List<Object> row = values.get(i);<NEW_LINE>// Shard<NEW_LINE>List<Object> skValues = Mappings.permute(row, skMapping).stream().map(value -> {<NEW_LINE>if (value instanceof ZeroDate || value instanceof ZeroTime || value instanceof ZeroTimestamp) {<NEW_LINE>// For date like "0000-00-00" partition result is different for ZeroDate and String.<NEW_LINE>// INSERT and SELECT use String data type, so UPDATE/DELETE here should keep same.<NEW_LINE>return value.toString();<NEW_LINE>}<NEW_LINE>return value;<NEW_LINE>}).collect(Collectors.toList());<NEW_LINE>Pair<String, String> dbAndTable = BuildPlanUtils.shardSingleRow(skValues, skMetas, skNames, logicalTableName, schemaName, ec, isGetShardResultForReplicationTable, ec.getSchemaManager(schemaName).getTable(logicalTableName));<NEW_LINE>// Add primary keys to the map<NEW_LINE>List<Object> primaryKeyValues = Mappings.permute(row, pkMapping);<NEW_LINE>result.computeIfAbsent(dbAndTable.getKey(), b -> new HashMap<>()).computeIfAbsent(dbAndTable.getValue(), b -> new ArrayList<>()).add(org.apache.calcite.util.Pair.of(i, primaryKeyValues));<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
result = new HashMap<>();
1,389,759
private static void addTorRules(List<String> cmds, List<Integer> uids, Boolean whitelist, Boolean ipv6) {<NEW_LINE>for (Integer uid : uids) {<NEW_LINE>if (uid != null && uid >= 0) {<NEW_LINE>if (G.enableInbound() || ipv6) {<NEW_LINE>cmds.add("-A " + AFWALL_CHAIN_NAME + "-tor-reject -m owner --uid-owner " + uid + " -j afwall-reject");<NEW_LINE>}<NEW_LINE>if (!ipv6) {<NEW_LINE>cmds.add("-t nat -A " + AFWALL_CHAIN_NAME + "-tor-check -m owner --uid-owner " + uid + " -j " + AFWALL_CHAIN_NAME + "-tor-filter");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (ipv6) {<NEW_LINE>cmds.add("-A " + AFWALL_CHAIN_NAME + " -j " + AFWALL_CHAIN_NAME + "-tor-reject");<NEW_LINE>} else {<NEW_LINE>Integer socks_port = 9050;<NEW_LINE>Integer http_port = 8118;<NEW_LINE>Integer dns_port = 5400;<NEW_LINE>Integer tcp_port = 9040;<NEW_LINE>cmds.add("-t nat -A " + AFWALL_CHAIN_NAME + "-tor-filter -d 127.0.0.1 -p tcp --dport " + socks_port + " -j RETURN");<NEW_LINE>cmds.add("-t nat -A " + AFWALL_CHAIN_NAME + "-tor-filter -d 127.0.0.1 -p tcp --dport " + http_port + " -j RETURN");<NEW_LINE>cmds.add("-t nat -A " + AFWALL_CHAIN_NAME + "-tor-filter -p udp --dport 53 -j REDIRECT --to-ports " + dns_port);<NEW_LINE>cmds.add("-t nat -A " + AFWALL_CHAIN_NAME + "-tor-filter -p tcp --tcp-flags FIN,SYN,RST,ACK SYN -j REDIRECT --to-ports " + tcp_port);<NEW_LINE>cmds.<MASK><NEW_LINE>cmds.add("-t nat -A " + AFWALL_CHAIN_NAME + " -j " + AFWALL_CHAIN_NAME + "-tor-check");<NEW_LINE>cmds.add("-A " + AFWALL_CHAIN_NAME + "-tor -m mark --mark 0x500 -j " + AFWALL_CHAIN_NAME + "-reject");<NEW_LINE>cmds.add("-A " + AFWALL_CHAIN_NAME + " -j " + AFWALL_CHAIN_NAME + "-tor");<NEW_LINE>}<NEW_LINE>if (G.enableInbound()) {<NEW_LINE>cmds.add("-A " + AFWALL_CHAIN_NAME + "-input -j " + AFWALL_CHAIN_NAME + "-tor-reject");<NEW_LINE>}<NEW_LINE>}
add("-t nat -A " + AFWALL_CHAIN_NAME + "-tor-filter -j MARK --set-mark 0x500");
1,842,736
protected RequestTemplate resolve(Object[] argv, RequestTemplate mutable, Map<String, Object> variables) {<NEW_LINE>boolean alwaysEncodeBody = mutable.methodMetadata().alwaysEncodeBody();<NEW_LINE>Object body = null;<NEW_LINE>if (!alwaysEncodeBody) {<NEW_LINE>body = argv[metadata.bodyIndex()];<NEW_LINE>checkArgument(body != null, "Body parameter %s was null", metadata.bodyIndex());<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>if (alwaysEncodeBody) {<NEW_LINE>body = argv == null ? new Object[0] : argv;<NEW_LINE>encoder.encode(body, <MASK><NEW_LINE>} else {<NEW_LINE>encoder.encode(body, metadata.bodyType(), mutable);<NEW_LINE>}<NEW_LINE>} catch (EncodeException e) {<NEW_LINE>throw e;<NEW_LINE>} catch (RuntimeException e) {<NEW_LINE>throw new EncodeException(e.getMessage(), e);<NEW_LINE>}<NEW_LINE>return super.resolve(argv, mutable, variables);<NEW_LINE>}
Object[].class, mutable);
1,498,983
public SipMediaApplicationLoggingConfiguration unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>SipMediaApplicationLoggingConfiguration sipMediaApplicationLoggingConfiguration = new SipMediaApplicationLoggingConfiguration();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE><MASK><NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("EnableSipMediaApplicationMessageLogs", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>sipMediaApplicationLoggingConfiguration.setEnableSipMediaApplicationMessageLogs(context.getUnmarshaller(Boolean.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return sipMediaApplicationLoggingConfiguration;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
1,179,899
@Produces({ "application/rdf+xml", "text/plain", "text/turtle", "text/n3", "application/trig", "application/ld+json", "application/n-quads", "text/x-turtlestar", "application/x-trigstar" })<NEW_LINE>public Response exportOnto(@Context DatabaseManagementService gds, @PathParam("dbname") String dbNameParam, @QueryParam("format") String format, @HeaderParam("accept") String acceptHeaderParam) {<NEW_LINE>return Response.ok().entity((StreamingOutput) outputStream -> {<NEW_LINE>GraphDatabaseService neo4j = gds.database(dbNameParam);<NEW_LINE>RDFWriter writer = startRdfWriter(getFormat(acceptHeaderParam, format), outputStream);<NEW_LINE>writer.handleNamespace("owl", OWL.NAMESPACE);<NEW_LINE>writer.handleNamespace("rdfs", RDFS.NAMESPACE);<NEW_LINE>try (Transaction tx = neo4j.beginTx()) {<NEW_LINE>GraphConfig gc = getGraphConfig(tx);<NEW_LINE>ExportProcessor proc;<NEW_LINE>if (gc == null || gc.getHandleVocabUris() == GRAPHCONF_VOC_URI_IGNORE || gc.getHandleVocabUris() == GRAPHCONF_VOC_URI_MAP) {<NEW_LINE>proc = new LPGToRDFProcesssor(neo4j, tx, gc, null, false, false);<NEW_LINE>} else {<NEW_LINE>proc = new LPGRDFToRDFProcesssor(neo4j, tx, gc, isRdfStarSerialisation<MASK><NEW_LINE>}<NEW_LINE>proc.streamLocalImplicitOntology().forEach(writer::handleStatement);<NEW_LINE>endRDFWriter(writer);<NEW_LINE>} catch (Exception e) {<NEW_LINE>handleSerialisationError(outputStream, e, acceptHeaderParam, format);<NEW_LINE>}<NEW_LINE>}).build();<NEW_LINE>}
(writer.getRDFFormat()));
705,663
public static IsNullValue merge(IsNullValue a, IsNullValue b) {<NEW_LINE>if (a == b) {<NEW_LINE>return a;<NEW_LINE>}<NEW_LINE>if (a.equals(b)) {<NEW_LINE>return a;<NEW_LINE>}<NEW_LINE>int aKind = a.kind & 0xff;<NEW_LINE><MASK><NEW_LINE>int aFlags = a.getFlags();<NEW_LINE>int bFlags = b.getFlags();<NEW_LINE>int combinedFlags = aFlags & bFlags;<NEW_LINE>if (!(a.isNullOnSomePath() || a.isDefinitelyNull()) && b.isException()) {<NEW_LINE>combinedFlags |= EXCEPTION;<NEW_LINE>} else if (!(b.isNullOnSomePath() || b.isDefinitelyNull()) && a.isException()) {<NEW_LINE>combinedFlags |= EXCEPTION;<NEW_LINE>}<NEW_LINE>// Left hand value should be >=, since it is used<NEW_LINE>// as the first dimension of the matrix to index.<NEW_LINE>if (aKind < bKind) {<NEW_LINE>int tmp = aKind;<NEW_LINE>aKind = bKind;<NEW_LINE>bKind = tmp;<NEW_LINE>}<NEW_LINE>assert aKind >= bKind;<NEW_LINE>int result = mergeMatrix[aKind][bKind];<NEW_LINE>IsNullValue resultValue = (result == NO_KABOOM_NN) ? noKaboomNonNullValue(a.locationOfKaBoom) : instanceByFlagsList[combinedFlags >> FLAG_SHIFT][result];<NEW_LINE>return resultValue;<NEW_LINE>}
int bKind = b.kind & 0xff;
1,665,559
private void printEntityInstantiation(HDLNodeBuildIn node, int num, File root) throws IOException, HDLException {<NEW_LINE>String entityName = node.getHdlEntityName();<NEW_LINE>out.print("gate").print(num).print(": entity work.").print(entityName);<NEW_LINE>final String label = node.getElementAttributes().getLabel();<NEW_LINE>if (label != null && label.length() > 0)<NEW_LINE>out.print(" -- ").print(label.replace('\n', ' '));<NEW_LINE>out.println().inc();<NEW_LINE>if (!(node instanceof HDLNodeCustom))<NEW_LINE>library.getEntity(node).writeGenericMap(out, node, root);<NEW_LINE>out.println("port map (").inc();<NEW_LINE>Separator sep <MASK><NEW_LINE>for (HDLNodeBuildIn.InputAssignment i : node) {<NEW_LINE>sep.check();<NEW_LINE>out.print(i.getTargetName()).print(" => ");<NEW_LINE>printExpression(i.getExpression());<NEW_LINE>}<NEW_LINE>for (HDLPort o : node.getOutputs()) if (o.getNet() != null) {<NEW_LINE>sep.check();<NEW_LINE>out.print(o.getName()).print(" => ").print(o.getNet().getName());<NEW_LINE>}<NEW_LINE>for (HDLPort o : node.getInOutputs()) if (o.getNet() != null) {<NEW_LINE>sep.check();<NEW_LINE>out.print(o.getName()).print(" => ").print(o.getNet().getName());<NEW_LINE>}<NEW_LINE>out.println(");").dec().dec();<NEW_LINE>}
= new Separator(out, ",\n");
470,577
private void generateEncoderGroups(final StringBuilder sb, final String outerClassName, final List<Token> tokens, final String indent, final boolean isSubGroup) throws IOException {<NEW_LINE>for (int i = 0, size = tokens.size(); i < size; i++) {<NEW_LINE>final Token groupToken = tokens.get(i);<NEW_LINE>if (groupToken.signal() != Signal.BEGIN_GROUP) {<NEW_LINE>throw new IllegalStateException("tokens must begin with BEGIN_GROUP: token=" + groupToken);<NEW_LINE>}<NEW_LINE>final int index = i;<NEW_LINE>final String groupName = groupToken.name();<NEW_LINE>final String groupClassName = encoderName(groupName);<NEW_LINE>++i;<NEW_LINE>final int groupHeaderTokenCount = tokens.get(i).componentTokenCount();<NEW_LINE>i += groupHeaderTokenCount;<NEW_LINE>final List<Token> fields = new ArrayList<>();<NEW_LINE>i = collectFields(tokens, i, fields);<NEW_LINE>final List<Token> groups = new ArrayList<>();<NEW_LINE>i = collectGroups(tokens, i, groups);<NEW_LINE>final List<Token> varData = new ArrayList<>();<NEW_LINE>i = collectVarData(tokens, i, varData);<NEW_LINE>generateGroupEncoderProperty(sb, groupName, groupToken, indent, isSubGroup);<NEW_LINE>generateTypeJavadoc(<MASK><NEW_LINE>if (shouldGenerateGroupOrderAnnotation) {<NEW_LINE>generateAnnotations(indent + INDENT, groupClassName, groups, sb, this::encoderName);<NEW_LINE>}<NEW_LINE>generateGroupEncoderClassHeader(sb, groupName, outerClassName, tokens, groups, index, indent + INDENT);<NEW_LINE>generateEncoderFields(sb, groupClassName, fields, indent + INDENT);<NEW_LINE>generateEncoderGroups(sb, outerClassName, groups, indent + INDENT, true);<NEW_LINE>generateEncoderVarData(sb, groupClassName, varData, indent + INDENT);<NEW_LINE>sb.append(indent).append(" }\n");<NEW_LINE>}<NEW_LINE>}
sb, indent + INDENT, groupToken);
497,266
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {<NEW_LINE>if (!getIdBytes().isEmpty()) {<NEW_LINE>com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);<NEW_LINE>}<NEW_LINE>if (!getNameBytes().isEmpty()) {<NEW_LINE>com.google.protobuf.GeneratedMessageV3.<MASK><NEW_LINE>}<NEW_LINE>if (((bitField0_ & 0x00000001) != 0)) {<NEW_LINE>com.google.protobuf.GeneratedMessageV3.writeString(output, 3, source_);<NEW_LINE>}<NEW_LINE>for (int i = 0; i < dimensions_.size(); i++) {<NEW_LINE>com.google.protobuf.GeneratedMessageV3.writeString(output, 4, dimensions_.getRaw(i));<NEW_LINE>}<NEW_LINE>for (int i = 0; i < classifications_.size(); i++) {<NEW_LINE>output.writeMessage(5, classifications_.get(i));<NEW_LINE>}<NEW_LINE>unknownFields.writeTo(output);<NEW_LINE>}
writeString(output, 2, name_);
999,871
private void testSubmit(ExecutorService xsvc) throws Exception {<NEW_LINE>AtomicInteger counter = new AtomicInteger();<NEW_LINE>Callable<Integer> task1 = new CounterTask(counter);<NEW_LINE>Runnable task2 = new CounterTask(counter);<NEW_LINE>Future<Integer> <MASK><NEW_LINE>Future<?> future2 = xsvc.submit(task2);<NEW_LINE>Future<Integer> future3 = xsvc.submit(task2, 3);<NEW_LINE>int result1 = future1.get(TIMEOUT, TimeUnit.MILLISECONDS);<NEW_LINE>if (result1 < 1 || result1 > 3)<NEW_LINE>throw new Exception("Unexpected result of task1: " + result1);<NEW_LINE>Object result2 = future2.get(TIMEOUT, TimeUnit.MILLISECONDS);<NEW_LINE>if (result2 != null)<NEW_LINE>throw new Exception("Unexpected result of task2: " + result2);<NEW_LINE>int result3 = future3.get(TIMEOUT, TimeUnit.MILLISECONDS);<NEW_LINE>if (result3 != 3)<NEW_LINE>throw new Exception("Unexpected result of task3: " + result3);<NEW_LINE>int count = counter.get();<NEW_LINE>if (count != 3)<NEW_LINE>throw new Exception("Expecting to run 3 tasks, not " + count);<NEW_LINE>try {<NEW_LINE>xsvcDefault.submit((Callable<Object>) null);<NEW_LINE>throw new Exception("submit(null callable) must raise NullPointerException");<NEW_LINE>} catch (NullPointerException x) {<NEW_LINE>}<NEW_LINE>// expected<NEW_LINE>try {<NEW_LINE>xsvcDefault.submit((Runnable) null);<NEW_LINE>throw new Exception("submit(null runnable) must raise NullPointerException");<NEW_LINE>} catch (NullPointerException x) {<NEW_LINE>}<NEW_LINE>// expected<NEW_LINE>try {<NEW_LINE>xsvcDefault.submit(null, "result");<NEW_LINE>throw new Exception("submit(null, result) must raise NullPointerException");<NEW_LINE>} catch (NullPointerException x) {<NEW_LINE>}<NEW_LINE>// expected<NEW_LINE>}
future1 = xsvc.submit(task1);
1,208,674
public void endTransfer() {<NEW_LINE>pgl.deleteSync(fences[tail]);<NEW_LINE>pgl.bindBuffer(PGL.PIXEL_PACK_BUFFER, pbos[tail]);<NEW_LINE>ByteBuffer readBuffer = pgl.mapBuffer(<MASK><NEW_LINE>if (readBuffer != null) {<NEW_LINE>int format = primaryGraphics ? OPENGL_NATIVE_OPAQUE : OPENGL_NATIVE;<NEW_LINE>PImage target = asyncImageSaver.getAvailableTarget(widths[tail], heights[tail], format);<NEW_LINE>if (target == null)<NEW_LINE>return;<NEW_LINE>readBuffer.rewind();<NEW_LINE>readBuffer.asIntBuffer().get(target.pixels);<NEW_LINE>pgl.unmapBuffer(PGL.PIXEL_PACK_BUFFER);<NEW_LINE>asyncImageSaver.saveTargetAsync(PGraphicsOpenGL.this, target, files[tail]);<NEW_LINE>}<NEW_LINE>pgl.bindBuffer(PGL.PIXEL_PACK_BUFFER, 0);<NEW_LINE>size--;<NEW_LINE>tail = (tail + 1) % BUFFER_COUNT;<NEW_LINE>}
PGL.PIXEL_PACK_BUFFER, PGL.READ_ONLY);
58,618
private static void appendLength(ByteBuffer buffer, int length, boolean masked) {<NEW_LINE>if (length < 0) {<NEW_LINE>throw new IllegalArgumentException("Length cannot be negative");<NEW_LINE>}<NEW_LINE>byte b = (masked ? (byte) 0x80 : 0x00);<NEW_LINE>if (length > 0xFFFF) {<NEW_LINE>buffer.put((byte) (b | 0x7F));<NEW_LINE>buffer.put((byte) 0x00);<NEW_LINE>buffer.put((byte) 0x00);<NEW_LINE>buffer.put((byte) 0x00);<NEW_LINE>buffer.put((byte) 0x00);<NEW_LINE>buffer.put((byte) ((length >> 24) & 0xFF));<NEW_LINE>buffer.put((byte) ((length <MASK><NEW_LINE>buffer.put((byte) ((length >> 8) & 0xFF));<NEW_LINE>buffer.put((byte) (length & 0xFF));<NEW_LINE>} else if (length >= 0x7E) {<NEW_LINE>buffer.put((byte) (b | 0x7E));<NEW_LINE>buffer.put((byte) (length >> 8));<NEW_LINE>buffer.put((byte) (length & 0xFF));<NEW_LINE>} else {<NEW_LINE>buffer.put((byte) (b | length));<NEW_LINE>}<NEW_LINE>}
>> 16) & 0xFF));
1,388,661
public static SendMessageBatchV2RequestHeader buildHeader(final Map<String, Object> headerParam) {<NEW_LINE>SendMessageBatchV2RequestHeader header = new SendMessageBatchV2RequestHeader();<NEW_LINE>header.setCode(MapUtils.getString(headerParam, ProtocolKey.REQUEST_CODE));<NEW_LINE>header.setVersion(ProtocolVersion.get(MapUtils.getString(headerParam, ProtocolKey.VERSION)));<NEW_LINE>header.setProtocolType(MapUtils.getString(headerParam, ProtocolKey.PROTOCOL_TYPE));<NEW_LINE>header.setProtocolVersion(MapUtils.getString(headerParam, ProtocolKey.PROTOCOL_VERSION));<NEW_LINE>header.setProtocolDesc(MapUtils.getString(headerParam, ProtocolKey.PROTOCOL_DESC));<NEW_LINE>String lan = StringUtils.isBlank(MapUtils.getString(headerParam, ProtocolKey.LANGUAGE)) ? Constants.LANGUAGE_JAVA : MapUtils.<MASK><NEW_LINE>header.setLanguage(lan);<NEW_LINE>header.setEnv(MapUtils.getString(headerParam, ProtocolKey.ClientInstanceKey.ENV));<NEW_LINE>header.setIdc(MapUtils.getString(headerParam, ProtocolKey.ClientInstanceKey.IDC));<NEW_LINE>header.setSys(MapUtils.getString(headerParam, ProtocolKey.ClientInstanceKey.SYS));<NEW_LINE>header.setPid(MapUtils.getString(headerParam, ProtocolKey.ClientInstanceKey.PID));<NEW_LINE>header.setIp(MapUtils.getString(headerParam, ProtocolKey.ClientInstanceKey.IP));<NEW_LINE>header.setUsername(MapUtils.getString(headerParam, ProtocolKey.ClientInstanceKey.USERNAME));<NEW_LINE>header.setPasswd(MapUtils.getString(headerParam, ProtocolKey.ClientInstanceKey.PASSWD));<NEW_LINE>return header;<NEW_LINE>}
getString(headerParam, ProtocolKey.LANGUAGE);
1,746,698
private List<NameValueCountPair> groupByCreatorPerson(Business business, Predicate predicate) throws Exception {<NEW_LINE>EntityManager em = business.entityManagerContainer().get(Review.class);<NEW_LINE>CriteriaBuilder cb = em.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<Tuple> cq = cb.createQuery(Tuple.class);<NEW_LINE>Root<Review> root = cq.from(Review.class);<NEW_LINE>Path<String> pathCreatorPerson = root.get(Review_.creatorPerson);<NEW_LINE>cq.multiselect(pathCreatorPerson, cb.count(root)).where(predicate).groupBy(pathCreatorPerson);<NEW_LINE>List<Tuple> os = em.createQuery(cq).getResultList();<NEW_LINE>List<NameValueCountPair> list = new ArrayList<>();<NEW_LINE>NameValueCountPair pair = null;<NEW_LINE>for (Tuple o : os) {<NEW_LINE>pair = new NameValueCountPair();<NEW_LINE>pair.setName(o.get(pathCreatorPerson));<NEW_LINE>pair.setValue<MASK><NEW_LINE>pair.setCount(o.get(1, Long.class));<NEW_LINE>list.add(pair);<NEW_LINE>}<NEW_LINE>return list.stream().sorted(Comparator.comparing(NameValueCountPair::getCount).reversed()).collect(Collectors.toList());<NEW_LINE>}
(o.get(pathCreatorPerson));
1,080,367
public Object unwrap(Object obj) {<NEW_LINE>if (obj == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (!(obj instanceof JsonValue)) {<NEW_LINE>return obj;<NEW_LINE>}<NEW_LINE>switch(((JsonValue) obj).getValueType()) {<NEW_LINE>case ARRAY:<NEW_LINE>if (mutableJson && obj instanceof JsonArrayProxy) {<NEW_LINE>return (JsonArray) obj;<NEW_LINE>} else {<NEW_LINE>return ((JsonArray) obj).getValuesAs((JsonValue v) -> unwrap(v));<NEW_LINE>}<NEW_LINE>case STRING:<NEW_LINE>return ((<MASK><NEW_LINE>case NUMBER:<NEW_LINE>if (((JsonNumber) obj).isIntegral()) {<NEW_LINE>// return ((JsonNumber) obj).bigIntegerValueExact();<NEW_LINE>try {<NEW_LINE>return ((JsonNumber) obj).intValueExact();<NEW_LINE>} catch (ArithmeticException e) {<NEW_LINE>return ((JsonNumber) obj).longValueExact();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// return ((JsonNumber) obj).bigDecimalValue();<NEW_LINE>return ((JsonNumber) obj).doubleValue();<NEW_LINE>}<NEW_LINE>case TRUE:<NEW_LINE>return Boolean.TRUE;<NEW_LINE>case FALSE:<NEW_LINE>return Boolean.FALSE;<NEW_LINE>case NULL:<NEW_LINE>return null;<NEW_LINE>default:<NEW_LINE>return obj;<NEW_LINE>}<NEW_LINE>}
JsonString) obj).getString();
331,558
private void learnTransition(final HiddenMarkovModel hmm) {<NEW_LINE>for (int i = 0; i < hmm.getStateCount(); i++) {<NEW_LINE>for (int j = 0; j < hmm.getStateCount(); j++) {<NEW_LINE>hmm.setTransitionProbability(i, j, 0.);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (final MLDataSet obsSeq : this.sequnces.getSequences()) {<NEW_LINE>if (obsSeq.size() < 2) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>int first_state;<NEW_LINE>int second_state = this.clusters.cluster(obsSeq.get(0));<NEW_LINE>for (int i = 1; i < obsSeq.size(); i++) {<NEW_LINE>first_state = second_state;<NEW_LINE>second_state = this.clusters.cluster(obsSeq.get(i));<NEW_LINE>hmm.setTransitionProbability(first_state, second_state, hmm.getTransitionProbability<MASK><NEW_LINE>}<NEW_LINE>}
(first_state, second_state) + 1.);
756,028
public void translateTransform(PTransform<PCollection<T>, PCollection<T>> transform, AbstractTranslationContext context) {<NEW_LINE>Window.Assign<T> assignTransform = (Window.Assign<T>) transform;<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>final PCollection<T> input = (PCollection<T>) context.getInput();<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>final PCollection<T> output = (PCollection<T>) context.getOutput();<NEW_LINE>Dataset<WindowedValue<T>> inputDataset = context.getDataset(input);<NEW_LINE>if (WindowingHelpers.skipAssignWindows(assignTransform, context)) {<NEW_LINE>context.putDataset(output, inputDataset);<NEW_LINE>} else {<NEW_LINE>WindowFn<T, ?<MASK><NEW_LINE>WindowedValue.FullWindowedValueCoder<T> windowedValueCoder = WindowedValue.FullWindowedValueCoder.of(input.getCoder(), windowFn.windowCoder());<NEW_LINE>Dataset<WindowedValue<T>> outputDataset = inputDataset.map(WindowingHelpers.assignWindowsMapFunction(windowFn), EncoderHelpers.fromBeamCoder(windowedValueCoder));<NEW_LINE>context.putDataset(output, outputDataset);<NEW_LINE>}<NEW_LINE>}
> windowFn = assignTransform.getWindowFn();
1,583,144
public static void main(String[] args) throws Exception {<NEW_LINE>Exchange itbit = ItBitDemoUtils.createExchange();<NEW_LINE>AccountService account = itbit.getAccountService();<NEW_LINE>TradeService tradeService = itbit.getTradeService();<NEW_LINE>AccountInfo accountInfo = account.getAccountInfo();<NEW_LINE>System.<MASK><NEW_LINE>printOpenOrders(tradeService);<NEW_LINE>String placeLimitOrderXBT = tradeService.placeLimitOrder(new LimitOrder(OrderType.BID, BigDecimal.valueOf(0.001), new CurrencyPair("XBT", "USD"), "0", new Date(), BigDecimal.valueOf(300)));<NEW_LINE>String placeLimitOrderBTC = tradeService.placeLimitOrder(new LimitOrder(OrderType.BID, BigDecimal.valueOf(0.001), new CurrencyPair("BTC", "USD"), "0", new Date(), BigDecimal.valueOf(360)));<NEW_LINE>System.out.println("limit order id " + placeLimitOrderXBT);<NEW_LINE>System.out.println("limit order id " + placeLimitOrderBTC);<NEW_LINE>printOrderStatus(tradeService, placeLimitOrderXBT);<NEW_LINE>printOrderStatus(tradeService, placeLimitOrderBTC);<NEW_LINE>printOpenOrders(tradeService);<NEW_LINE>System.out.println("Cancelling " + placeLimitOrderXBT);<NEW_LINE>tradeService.cancelOrder(placeLimitOrderXBT);<NEW_LINE>printOrderStatus(tradeService, placeLimitOrderXBT);<NEW_LINE>printOpenOrders(tradeService);<NEW_LINE>System.out.println("Cancelling " + placeLimitOrderBTC);<NEW_LINE>tradeService.cancelOrder(placeLimitOrderBTC);<NEW_LINE>printOrderStatus(tradeService, placeLimitOrderBTC);<NEW_LINE>printOpenOrders(tradeService);<NEW_LINE>Trades tradeHistory = tradeService.getTradeHistory(tradeService.createTradeHistoryParams());<NEW_LINE>System.out.println("Trade history: " + tradeHistory);<NEW_LINE>printOrderStatus(tradeService, placeLimitOrderXBT);<NEW_LINE>printOrderStatus(tradeService, placeLimitOrderBTC);<NEW_LINE>printOpenOrders(tradeService);<NEW_LINE>}
out.println("Account Info: " + accountInfo);
1,066,711
public String createNewWSReliableMessagingRequest(WsdlRequest wsrmContainer, String identifier, long msgNumber, String endpoint) {<NEW_LINE>try {<NEW_LINE>Element header = getHeader();<NEW_LINE>header.setAttribute("xmlns:" + "wsrm", wsrmContainer.getWsrmConfig().getVersionNameSpace());<NEW_LINE>Element sequence = header.getOwnerDocument().createElementNS(wsrmContainer.getWsrmConfig().getVersionNameSpace(), "Sequence");<NEW_LINE>Element identifierElement = sequence.getOwnerDocument().createElementNS(wsrmContainer.getWsrmConfig().getVersionNameSpace(), "Identifier");<NEW_LINE>Text txtElm = identifierElement.getOwnerDocument().createTextNode(identifier);<NEW_LINE>identifierElement.appendChild(txtElm);<NEW_LINE>sequence.appendChild(identifierElement);<NEW_LINE>Element messageId = sequence.getOwnerDocument().createElementNS(wsrmContainer.getWsrmConfig(<MASK><NEW_LINE>Text txtElm2 = identifierElement.getOwnerDocument().createTextNode(String.valueOf(msgNumber));<NEW_LINE>messageId.appendChild(txtElm2);<NEW_LINE>sequence.appendChild(messageId);<NEW_LINE>header.appendChild(sequence);<NEW_LINE>content = xmlContentObject.xmlText();<NEW_LINE>wsrmContainer.getWsaConfig().setWsaEnabled(true);<NEW_LINE>if (wsrmContainer.getWsaConfig().getAction() == null) {<NEW_LINE>wsrmContainer.getWsaConfig().setAddDefaultAction(true);<NEW_LINE>}<NEW_LINE>wsrmContainer.getWsaConfig().setTo(endpoint);<NEW_LINE>wsrmContainer.getWsaConfig().setGenerateMessageId(true);<NEW_LINE>WsaUtils wsaUtils = new WsaUtils(content, wsrmContainer.getOperation().getInterface().getSoapVersion(), null, new DefaultPropertyExpansionContext(wsrmContainer));<NEW_LINE>content = wsaUtils.addWSAddressingRequest(wsrmContainer);<NEW_LINE>} catch (Exception e) {<NEW_LINE>SoapUI.logError(e);<NEW_LINE>}<NEW_LINE>return content;<NEW_LINE>}
).getVersionNameSpace(), "MessageNumber");
83,843
public PlanFragment visitPhysicalTopN(PhysicalTopN<? extends Plan> topN, PlanTranslatorContext context) {<NEW_LINE>PlanFragment <MASK><NEW_LINE>SortNode sortNode = (SortNode) childFragment.getPlanRoot();<NEW_LINE>sortNode.setOffset(topN.getOffset());<NEW_LINE>sortNode.setLimit(topN.getLimit());<NEW_LINE>// isPartitioned() == false means there is only one instance, so no merge phase<NEW_LINE>if (!childFragment.isPartitioned()) {<NEW_LINE>return childFragment;<NEW_LINE>}<NEW_LINE>PlanFragment mergeFragment = createParentFragment(childFragment, DataPartition.UNPARTITIONED, context);<NEW_LINE>ExchangeNode exchangeNode = (ExchangeNode) mergeFragment.getPlanRoot();<NEW_LINE>exchangeNode.setMergeInfo(sortNode.getSortInfo());<NEW_LINE>exchangeNode.setOffset(topN.getOffset());<NEW_LINE>exchangeNode.setLimit(topN.getLimit());<NEW_LINE>return mergeFragment;<NEW_LINE>}
childFragment = visitAbstractPhysicalSort(topN, context);
952,577
public static QueryPictureSearchJobResultResponse unmarshall(QueryPictureSearchJobResultResponse queryPictureSearchJobResultResponse, UnmarshallerContext _ctx) {<NEW_LINE>queryPictureSearchJobResultResponse.setRequestId(_ctx.stringValue("QueryPictureSearchJobResultResponse.RequestId"));<NEW_LINE>queryPictureSearchJobResultResponse.setSuccess(_ctx.booleanValue("QueryPictureSearchJobResultResponse.Success"));<NEW_LINE>queryPictureSearchJobResultResponse.setCode(_ctx.stringValue("QueryPictureSearchJobResultResponse.Code"));<NEW_LINE>queryPictureSearchJobResultResponse.setErrorMessage(_ctx.stringValue("QueryPictureSearchJobResultResponse.ErrorMessage"));<NEW_LINE>Data data = new Data();<NEW_LINE>data.setTotal(_ctx.integerValue("QueryPictureSearchJobResultResponse.Data.Total"));<NEW_LINE>data.setPageCount(_ctx.integerValue("QueryPictureSearchJobResultResponse.Data.PageCount"));<NEW_LINE>data.setCurrentPage(_ctx.integerValue("QueryPictureSearchJobResultResponse.Data.CurrentPage"));<NEW_LINE>data.setPageSize(_ctx.integerValue("QueryPictureSearchJobResultResponse.Data.PageSize"));<NEW_LINE>List<SearchData> pageData = new ArrayList<SearchData>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("QueryPictureSearchJobResultResponse.Data.PageData.Length"); i++) {<NEW_LINE>SearchData searchData = new SearchData();<NEW_LINE>searchData.setVectorId(_ctx.stringValue("QueryPictureSearchJobResultResponse.Data.PageData[" + i + "].VectorId"));<NEW_LINE>searchData.setEventTime(_ctx.longValue("QueryPictureSearchJobResultResponse.Data.PageData[" + i + "].EventTime"));<NEW_LINE>searchData.setThreshold(_ctx.floatValue("QueryPictureSearchJobResultResponse.Data.PageData[" + i + "].Threshold"));<NEW_LINE>searchData.setPicUrl(_ctx.stringValue("QueryPictureSearchJobResultResponse.Data.PageData[" + i + "].PicUrl"));<NEW_LINE>searchData.setIotId(_ctx.stringValue("QueryPictureSearchJobResultResponse.Data.PageData[" + i + "].IotId"));<NEW_LINE>searchData.setGatewayIotId(_ctx.stringValue("QueryPictureSearchJobResultResponse.Data.PageData[" + i + "].GatewayIotId"));<NEW_LINE>searchData.setDeviceNickName(_ctx.stringValue<MASK><NEW_LINE>pageData.add(searchData);<NEW_LINE>}<NEW_LINE>data.setPageData(pageData);<NEW_LINE>queryPictureSearchJobResultResponse.setData(data);<NEW_LINE>return queryPictureSearchJobResultResponse;<NEW_LINE>}
("QueryPictureSearchJobResultResponse.Data.PageData[" + i + "].DeviceNickName"));