content
stringlengths 40
137k
|
---|
"private KeyIdResult returnKeyIdsFromEmails(Intent data, String[] encryptionUserIds, boolean isOpportunistic) {\n boolean hasUserIds = (encryptionUserIds != null && encryptionUserIds.length > 0);\n HashSet<Long> keyIds = new HashSet<>();\n ArrayList<String> missingEmails = new ArrayList<>();\n ArrayList<String> duplicateEmails = new ArrayList<>();\n if (!noUserIdsCheck) {\n for (String rawUserId : encryptionUserIds) {\n OpenPgpUtils.UserId userId = KeyRing.splitUserId(rawUserId);\n String email = userId.email != null ? userId.email : rawUserId;\n Uri uri = KeyRings.buildUnifiedKeyRingsFindByEmailUri(email);\n Cursor cursor = getContentResolver().query(uri, KEY_SEARCH_PROJECTION, KEY_SEARCH_WHERE, null, null);\n try {\n if (cursor != null && cursor.moveToFirst()) {\n long id = cursor.getLong(cursor.getColumnIndex(KeyRings.MASTER_KEY_ID));\n keyIds.add(id);\n } else {\n missingUserIdsCheck = true;\n missingEmails.add(email);\n Log.d(Constants.TAG, \"String_Node_Str\");\n }\n if (cursor != null && cursor.moveToNext()) {\n duplicateUserIdsCheck = true;\n duplicateEmails.add(email);\n long id = cursor.getLong(cursor.getColumnIndex(KeyRings.MASTER_KEY_ID));\n keyIds.add(id);\n Log.d(Constants.TAG, \"String_Node_Str\");\n }\n } finally {\n if (cursor != null) {\n cursor.close();\n }\n }\n }\n }\n if (isOpportunistic && (noUserIdsCheck || missingUserIdsCheck)) {\n Intent result = new Intent();\n result.putExtra(OpenPgpApi.RESULT_ERROR, new OpenPgpError(OpenPgpError.OPPORTUNISTIC_MISSING_KEYS, \"String_Node_Str\"));\n result.putExtra(OpenPgpApi.RESULT_CODE, OpenPgpApi.RESULT_CODE_ERROR);\n return new KeyIdResult(result);\n }\n if (noUserIdsCheck || missingUserIdsCheck || duplicateUserIdsCheck) {\n long[] keyIdsArray = getUnboxedLongArray(keyIds);\n ApiPendingIntentFactory piFactory = new ApiPendingIntentFactory(getBaseContext());\n PendingIntent pi = piFactory.createSelectPublicKeyPendingIntent(data, keyIdsArray, missingEmails, duplicateEmails, noUserIdsCheck);\n Intent result = new Intent();\n result.putExtra(OpenPgpApi.RESULT_INTENT, pi);\n result.putExtra(OpenPgpApi.RESULT_CODE, OpenPgpApi.RESULT_CODE_USER_INTERACTION_REQUIRED);\n return new KeyIdResult(result);\n }\n if (keyIds.isEmpty()) {\n Log.e(Constants.TAG, \"String_Node_Str\");\n }\n return new KeyIdResult(keyIds);\n}\n"
|
"public void execute() {\n if (popupMenu != null) {\n popupMenu.hide();\n }\n SolutionBrowserPanel sbp = SolutionBrowserPanel.getInstance();\n if (mode == COMMAND.PROPERTIES) {\n new FilePropertiesCommand(repositoryFile).execute();\n } else if (mode == COMMAND.DELETE) {\n TreeItem item = sbp.getSolutionTree().getSelectedItem();\n RepositoryFileTree tree = (RepositoryFileTree) item.getUserObject();\n new DeleteFolderCommand(tree.getFile()).execute();\n } else if (mode == COMMAND.CREATE_FOLDER) {\n TreeItem item = sbp.getSolutionTree().getSelectedItem();\n RepositoryFileTree tree = (RepositoryFileTree) item.getUserObject();\n new NewFolderCommand(tree.getFile()).execute();\n } else if (mode == COMMAND.EXPORT) {\n new ExportFileCommand(repositoryFile).execute();\n } else if (mode == COMMAND.IMPORT) {\n new ImportFileCommand(repositoryFile).execute();\n } else if (mode == COMMAND.PASTE) {\n new PasteFilesCommand(repositoryFile).execute();\n } else if (mode == COMMAND.EMPTY_TRASH) {\n new DeletePermanentFileCommand(sbp.getSolutionTree().getTrashItems()).execute();\n }\n}\n"
|
"public void onClick(View v) {\n log.info(\"String_Node_Str\");\n mnemonicTextView.setText(\"String_Node_Str\");\n verifyMnemonicAndProceed(seed, true);\n}\n"
|
"public void plusOneDepth() {\n final List<TheRStackFrame> originalStack = new ArrayList<TheRStackFrame>();\n final MockTheRResolvingSession resolvingSession = new MockTheRResolvingSession();\n final TheRXStack stack = new TheRXStack(originalStack, resolvingSession, ExecutorServices.ILLEGAL_EXECUTOR);\n originalStack.add(new TheRStackFrame(new TheRLocation(\"String_Node_Str\", 2), new IllegalTheRVarsLoader(), new IllegalTheRDebuggerEvaluator()));\n originalStack.add(new TheRStackFrame(new TheRLocation(\"String_Node_Str\", 1), new IllegalTheRVarsLoader(), new IllegalTheRDebuggerEvaluator()));\n stack.update();\n assertEquals(2, resolvingSession.myNext);\n assertEquals(0, resolvingSession.myCurrent);\n assertEquals(0, resolvingSession.myDropped);\n check(stack, 2, 1);\n originalStack.add(new TheRStackFrame(new TheRLocation(\"String_Node_Str\", 1), new IllegalTheRVarsLoader(), new IllegalTheRDebuggerEvaluator()));\n stack.update();\n assertEquals(3, resolvingSession.myNext);\n assertEquals(0, resolvingSession.myCurrent);\n assertEquals(0, resolvingSession.myDropped);\n check(stack, 3, 2, 1);\n}\n"
|
"private long getNowUnixTimeUs() {\n if (elapsedRealtimeOffsetMs != 0) {\n return (SystemClock.elapsedRealtime() + elapsedRealtimeOffsetMs) * 1000;\n } else {\n return System.currentTimeMillis() * 1000;\n }\n}\n"
|
"private boolean inMultiSelect() {\n return mCallback.isInMultiSelect();\n}\n"
|
"public synchronized void processImage(int sourceID, long frameID, final BufferedImage buffered, ImageBase input) {\n if (buffered != null) {\n original = ConvertBufferedImage.checkCopy(buffered, original);\n work = ConvertBufferedImage.checkDeclare(buffered, work);\n binary.reshape(work.getWidth(), work.getHeight());\n inputPrev.setTo((T) input);\n SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n Dimension d = guiImage.getPreferredSize();\n if (d.getWidth() < buffered.getWidth() || d.getHeight() < buffered.getHeight()) {\n guiImage.setPreferredSize(new Dimension(buffered.getWidth(), buffered.getHeight()));\n }\n }\n });\n } else {\n input = inputPrev;\n }\n inputToBinary.process((T) input, binary);\n detector.process((T) input, binary);\n SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n viewUpdated();\n }\n });\n}\n"
|
"public boolean clearPlot(final World world, final Plot plot, final boolean isDelete) {\n PlotHelper.runners.put(plot, 1);\n final Plugin plugin = PlotMain.getMain();\n Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n PlotHelper.runners.remove(plot);\n }\n }, 90L);\n final HybridPlotWorld dpw = ((HybridPlotWorld) PlotMain.getWorldSettings(world));\n final Location pos1 = PlotHelper.getPlotBottomLocAbs(world, plot.id).add(1, 0, 1);\n final Location pos2 = PlotHelper.getPlotTopLocAbs(world, plot.id);\n final PlotBlock[] plotfloor = dpw.TOP_BLOCK;\n final PlotBlock[] filling = dpw.MAIN_BLOCK;\n final PlotBlock wall;\n if (isDelete) {\n wall = dpw.WALL_BLOCK;\n } else {\n wall = dpw.CLAIMED_WALL_BLOCK;\n }\n final PlotBlock wall_filling = dpw.WALL_FILLING;\n final Block block = world.getBlockAt(new Location(world, pos1.getBlockX() - 1, 1, pos1.getBlockZ()));\n if ((block.getTypeId() != wall_filling.id) || (block.getData() != wall_filling.data)) {\n setWallFilling(world, dpw, plot.id, wall_filling);\n }\n Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n final Block block = world.getBlockAt(new Location(world, pos1.getBlockX() - 1, dpw.WALL_HEIGHT + 1, pos1.getBlockZ()));\n if ((block.getTypeId() != wall.id) || (block.getData() != wall.data)) {\n setWall(world, dpw, plot.id, wall);\n }\n Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n if ((pos2.getBlockX() - pos1.getBlockX()) < 48) {\n PlotHelper.setSimpleCuboid(world, new Location(world, pos1.getBlockX(), 0, pos1.getBlockZ()), new Location(world, pos2.getBlockX() + 1, 1, pos2.getBlockZ() + 1), new PlotBlock((short) 7, (byte) 0));\n Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n PlotHelper.setSimpleCuboid(world, new Location(world, pos1.getBlockX(), dpw.PLOT_HEIGHT + 1, pos1.getBlockZ()), new Location(world, pos2.getBlockX() + 1, world.getMaxHeight() + 1, pos2.getBlockZ() + 1), new PlotBlock((short) 0, (byte) 0));\n Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n PlotHelper.setCuboid(world, new Location(world, pos1.getBlockX(), 1, pos1.getBlockZ()), new Location(world, pos2.getBlockX() + 1, dpw.PLOT_HEIGHT, pos2.getBlockZ() + 1), filling);\n Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n PlotHelper.setCuboid(world, new Location(world, pos1.getBlockX(), dpw.PLOT_HEIGHT, pos1.getBlockZ()), new Location(world, pos2.getBlockX() + 1, dpw.PLOT_HEIGHT + 1, pos2.getBlockZ() + 1), plotfloor);\n }\n }, 5L);\n }\n }, 5L);\n }\n }, 5L);\n return;\n }\n final int startX = (pos1.getBlockX() / 16) * 16;\n final int startZ = (pos1.getBlockZ() / 16) * 16;\n final int chunkX = 16 + pos2.getBlockX();\n final int chunkZ = 16 + pos2.getBlockZ();\n final Location l1 = PlotHelper.getPlotBottomLoc(world, plot.id);\n final Location l2 = PlotHelper.getPlotTopLoc(world, plot.id);\n final int plotMinX = l1.getBlockX() + 1;\n final int plotMinZ = l1.getBlockZ() + 1;\n final int plotMaxX = l2.getBlockX();\n final int plotMaxZ = l2.getBlockZ();\n Location mn = null;\n Location mx = null;\n for (int i = startX; i < chunkX; i += 16) {\n for (int j = startZ; j < chunkZ; j += 16) {\n final Plot plot1 = PlotHelper.getCurrentPlot(new Location(world, i, 0, j));\n if ((plot1 != null) && (!plot1.getId().equals(plot.getId()))) {\n break;\n }\n final Plot plot2 = PlotHelper.getCurrentPlot(new Location(world, i + 15, 0, j));\n if ((plot2 != null) && (!plot2.getId().equals(plot.getId()))) {\n break;\n }\n final Plot plot3 = PlotHelper.getCurrentPlot(new Location(world, i + 15, 0, j + 15));\n if ((plot3 != null) && (!plot3.getId().equals(plot.getId()))) {\n break;\n }\n final Plot plot4 = PlotHelper.getCurrentPlot(new Location(world, i, 0, j + 15));\n if ((plot4 != null) && (!plot4.getId().equals(plot.getId()))) {\n break;\n }\n final Plot plot5 = PlotHelper.getCurrentPlot(new Location(world, i + 15, 0, j + 15));\n if ((plot5 != null) && (!plot5.getId().equals(plot.getId()))) {\n break;\n }\n if (mn == null) {\n mn = new Location(world, Math.max(i - 1, plotMinX), 0, Math.max(j - 1, plotMinZ));\n mx = new Location(world, Math.min(i + 16, plotMaxX), 0, Math.min(j + 16, plotMaxZ));\n } else if ((mx.getBlockZ() < (j + 15)) || (mx.getBlockX() < (i + 15))) {\n mx = new Location(world, Math.min(i + 16, plotMaxX), 0, Math.min(j + 16, plotMaxZ));\n }\n world.regenerateChunk(i / 16, j / 16);\n }\n }\n final Location max = mx;\n final Location min = mn;\n if (min == null) {\n PlotHelper.setSimpleCuboid(world, new Location(world, pos1.getBlockX(), 0, pos1.getBlockZ()), new Location(world, pos2.getBlockX() + 1, 1, pos2.getBlockZ() + 1), new PlotBlock((short) 7, (byte) 0));\n Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n PlotHelper.setSimpleCuboid(world, new Location(world, pos1.getBlockX(), dpw.PLOT_HEIGHT + 1, pos1.getBlockZ()), new Location(world, pos2.getBlockX() + 1, world.getMaxHeight() + 1, pos2.getBlockZ() + 1), new PlotBlock((short) 0, (byte) 0));\n Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n PlotHelper.setCuboid(world, new Location(world, pos1.getBlockX(), 1, pos1.getBlockZ()), new Location(world, pos2.getBlockX() + 1, dpw.PLOT_HEIGHT, pos2.getBlockZ() + 1), filling);\n Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n PlotHelper.setCuboid(world, new Location(world, pos1.getBlockX(), dpw.PLOT_HEIGHT, pos1.getBlockZ()), new Location(world, pos2.getBlockX() + 1, dpw.PLOT_HEIGHT + 1, pos2.getBlockZ() + 1), plotfloor);\n }\n }, 5L);\n }\n }, 5L);\n }\n }, 5L);\n return;\n } else {\n if (min.getBlockX() < plotMinX) {\n min.setX(plotMinX);\n }\n if (min.getBlockZ() < plotMinZ) {\n min.setZ(plotMinZ);\n }\n if (max.getBlockX() > plotMaxX) {\n max.setX(plotMaxX);\n }\n if (max.getBlockZ() > plotMaxZ) {\n max.setZ(plotMaxZ);\n }\n Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n PlotHelper.setSimpleCuboid(world, new Location(world, plotMinX, 0, plotMinZ), new Location(world, min.getBlockX() + 1, 1, min.getBlockZ() + 1), new PlotBlock((short) 7, (byte) 0));\n Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n PlotHelper.setSimpleCuboid(world, new Location(world, plotMinX, dpw.PLOT_HEIGHT + 1, plotMinZ), new Location(world, min.getBlockX() + 1, world.getMaxHeight() + 1, min.getBlockZ() + 1), new PlotBlock((short) 0, (byte) 0));\n Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n PlotHelper.setCuboid(world, new Location(world, plotMinX, 1, plotMinZ), new Location(world, min.getBlockX() + 1, dpw.PLOT_HEIGHT + 1, min.getBlockZ() + 1), filling);\n Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n PlotHelper.setCuboid(world, new Location(world, plotMinX, dpw.PLOT_HEIGHT, plotMinZ), new Location(world, min.getBlockX() + 1, dpw.PLOT_HEIGHT + 1, min.getBlockZ() + 1), plotfloor);\n }\n }, 1L);\n }\n }, 1L);\n }\n }, 1L);\n }\n }, 21L);\n Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n PlotHelper.setSimpleCuboid(world, new Location(world, min.getBlockX(), 0, plotMinZ), new Location(world, max.getBlockX() + 1, 1, min.getBlockZ() + 1), new PlotBlock((short) 7, (byte) 0));\n Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n PlotHelper.setSimpleCuboid(world, new Location(world, min.getBlockX(), dpw.PLOT_HEIGHT + 1, plotMinZ), new Location(world, max.getBlockX() + 1, world.getMaxHeight() + 1, min.getBlockZ() + 1), new PlotBlock((short) 0, (byte) 0));\n Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n PlotHelper.setCuboid(world, new Location(world, min.getBlockX(), 1, plotMinZ), new Location(world, max.getBlockX() + 1, dpw.PLOT_HEIGHT, min.getBlockZ() + 1), filling);\n Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n PlotHelper.setCuboid(world, new Location(world, min.getBlockX(), dpw.PLOT_HEIGHT, plotMinZ), new Location(world, max.getBlockX() + 1, dpw.PLOT_HEIGHT + 1, min.getBlockZ() + 1), plotfloor);\n }\n }, 1L);\n }\n }, 1L);\n }\n }, 1L);\n }\n }, 25L);\n Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n PlotHelper.setSimpleCuboid(world, new Location(world, max.getBlockX(), 0, plotMinZ), new Location(world, plotMaxX + 1, 1, min.getBlockZ() + 1), new PlotBlock((short) 7, (byte) 0));\n Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n PlotHelper.setSimpleCuboid(world, new Location(world, max.getBlockX(), dpw.PLOT_HEIGHT + 1, plotMinZ), new Location(world, plotMaxX + 1, world.getMaxHeight() + 1, min.getBlockZ() + 1), new PlotBlock((short) 0, (byte) 0));\n Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n PlotHelper.setCuboid(world, new Location(world, max.getBlockX(), 1, plotMinZ), new Location(world, plotMaxX + 1, dpw.PLOT_HEIGHT, min.getBlockZ() + 1), filling);\n Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n PlotHelper.setCuboid(world, new Location(world, max.getBlockX(), dpw.PLOT_HEIGHT, plotMinZ), new Location(world, plotMaxX + 1, dpw.PLOT_HEIGHT + 1, min.getBlockZ() + 1), plotfloor);\n }\n }, 1L);\n }\n }, 1L);\n }\n }, 1L);\n }\n }, 29L);\n Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n PlotHelper.setSimpleCuboid(world, new Location(world, plotMinX, 0, min.getBlockZ()), new Location(world, min.getBlockX() + 1, 1, max.getBlockZ() + 1), new PlotBlock((short) 7, (byte) 0));\n Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n PlotHelper.setSimpleCuboid(world, new Location(world, plotMinX, dpw.PLOT_HEIGHT + 1, min.getBlockZ()), new Location(world, min.getBlockX() + 1, world.getMaxHeight() + 1, max.getBlockZ() + 1), new PlotBlock((short) 0, (byte) 0));\n Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n PlotHelper.setCuboid(world, new Location(world, plotMinX, 1, min.getBlockZ()), new Location(world, min.getBlockX() + 1, dpw.PLOT_HEIGHT, max.getBlockZ() + 1), filling);\n Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n PlotHelper.setCuboid(world, new Location(world, plotMinX, dpw.PLOT_HEIGHT, min.getBlockZ()), new Location(world, min.getBlockX() + 1, dpw.PLOT_HEIGHT + 1, max.getBlockZ() + 1), plotfloor);\n }\n }, 1L);\n }\n }, 1L);\n }\n }, 1L);\n }\n }, 33L);\n Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n PlotHelper.setSimpleCuboid(world, new Location(world, plotMinX, 0, max.getBlockZ()), new Location(world, min.getBlockX() + 1, 1, plotMaxZ + 1), new PlotBlock((short) 7, (byte) 0));\n Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n PlotHelper.setSimpleCuboid(world, new Location(world, plotMinX, dpw.PLOT_HEIGHT + 1, max.getBlockZ()), new Location(world, min.getBlockX() + 1, world.getMaxHeight() + 1, plotMaxZ + 1), new PlotBlock((short) 0, (byte) 0));\n Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n PlotHelper.setCuboid(world, new Location(world, plotMinX, 1, max.getBlockZ()), new Location(world, min.getBlockX() + 1, dpw.PLOT_HEIGHT, plotMaxZ + 1), filling);\n Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n PlotHelper.setCuboid(world, new Location(world, plotMinX, dpw.PLOT_HEIGHT, max.getBlockZ()), new Location(world, min.getBlockX() + 1, dpw.PLOT_HEIGHT + 1, plotMaxZ + 1), plotfloor);\n }\n }, 1L);\n }\n }, 1L);\n }\n }, 1L);\n }\n }, 37L);\n Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n PlotHelper.setSimpleCuboid(world, new Location(world, min.getBlockX(), 0, max.getBlockZ()), new Location(world, max.getBlockX() + 1, 1, plotMaxZ + 1), new PlotBlock((short) 7, (byte) 0));\n Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n PlotHelper.setSimpleCuboid(world, new Location(world, min.getBlockX(), dpw.PLOT_HEIGHT + 1, max.getBlockZ()), new Location(world, max.getBlockX() + 1, world.getMaxHeight() + 1, plotMaxZ + 1), new PlotBlock((short) 0, (byte) 0));\n Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n PlotHelper.setCuboid(world, new Location(world, min.getBlockX(), 1, max.getBlockZ()), new Location(world, max.getBlockX() + 1, dpw.PLOT_HEIGHT, plotMaxZ + 1), filling);\n Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n PlotHelper.setCuboid(world, new Location(world, min.getBlockX(), dpw.PLOT_HEIGHT, max.getBlockZ()), new Location(world, max.getBlockX() + 1, dpw.PLOT_HEIGHT + 1, plotMaxZ + 1), plotfloor);\n }\n }, 1L);\n }\n }, 1L);\n }\n }, 1L);\n }\n }, 41L);\n Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n PlotHelper.setSimpleCuboid(world, new Location(world, max.getBlockX(), 0, min.getBlockZ()), new Location(world, plotMaxX + 1, 1, max.getBlockZ() + 1), new PlotBlock((short) 7, (byte) 0));\n Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n PlotHelper.setSimpleCuboid(world, new Location(world, max.getBlockX(), dpw.PLOT_HEIGHT + 1, min.getBlockZ()), new Location(world, plotMaxX + 1, world.getMaxHeight() + 1, max.getBlockZ() + 1), new PlotBlock((short) 0, (byte) 0));\n Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n PlotHelper.setCuboid(world, new Location(world, max.getBlockX(), 1, min.getBlockZ()), new Location(world, plotMaxX + 1, dpw.PLOT_HEIGHT, max.getBlockZ() + 1), filling);\n Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n PlotHelper.setCuboid(world, new Location(world, max.getBlockX(), dpw.PLOT_HEIGHT, min.getBlockZ()), new Location(world, plotMaxX + 1, dpw.PLOT_HEIGHT + 1, max.getBlockZ() + 1), plotfloor);\n }\n }, 1L);\n }\n }, 1L);\n }\n }, 1L);\n }\n }, 45L);\n Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n PlotHelper.setSimpleCuboid(world, new Location(world, max.getBlockX(), 0, max.getBlockZ()), new Location(world, plotMaxX + 1, 1, plotMaxZ + 1), new PlotBlock((short) 7, (byte) 0));\n Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n PlotHelper.setSimpleCuboid(world, new Location(world, max.getBlockX(), dpw.PLOT_HEIGHT + 1, max.getBlockZ()), new Location(world, plotMaxX + 1, world.getMaxHeight() + 1, plotMaxZ + 1), new PlotBlock((short) 0, (byte) 0));\n Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n PlotHelper.setCuboid(world, new Location(world, max.getBlockX(), 1, max.getBlockZ()), new Location(world, plotMaxX + 1, dpw.PLOT_HEIGHT, plotMaxZ + 1), filling);\n Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n PlotHelper.setCuboid(world, new Location(world, max.getBlockX(), dpw.PLOT_HEIGHT, max.getBlockZ()), new Location(world, plotMaxX + 1, dpw.PLOT_HEIGHT + 1, plotMaxZ + 1), plotfloor);\n }\n }, 1L);\n }\n }, 1L);\n }\n }, 1L);\n }\n }, 49L);\n }\n }\n }, 20L);\n }\n }, 20L);\n return true;\n}\n"
|
"private List<Schema> valueSchemas(ExhibitDescriptor descriptor) {\n List<Schema> schemas = Lists.newArrayList();\n for (AggConfig ac : config.aggregates) {\n ObsDescriptor fd = ac.getFrameDescriptor(descriptor);\n List<Schema.Field> fields = Lists.newArrayList();\n for (Map.Entry<String, String> e : ac.values.entrySet()) {\n ObsDescriptor.Field f = fd.get(fd.indexOf(e.getKey()));\n fields.add(new Schema.Field(e.getValue(), AvroExhibit.getSchema(f.type), \"String_Node_Str\", null));\n }\n Schema wrapper = Schema.createRecord(\"String_Node_Str\" + id + \"String_Node_Str\" + idx, \"String_Node_Str\", \"String_Node_Str\", false);\n wrapper.setFields(fields);\n schemas.add(wrapper);\n idx++;\n }\n return schemas;\n}\n"
|
"public void accountSelected(Account account) {\n errorView.removeAllViews();\n progress(false);\n SearchFieldDataSource dataSource = new JsonSearchFieldDataSource(app);\n int versionCode = 0;\n try {\n versionCode = app.getPackageManager().getPackageInfo(app.getPackageName(), 0).versionCode;\n } catch (NameNotFoundException e) {\n e.printStackTrace();\n }\n String language = getActivity().getResources().getConfiguration().locale.getLanguage();\n if (dataSource.hasSearchFields(app.getLibrary().getIdent()) && dataSource.getLastSearchFieldUpdateVersion(app.getLibrary().getIdent()) == versionCode && language.equals(dataSource.getSearchFieldLanguage(app.getLibrary().getIdent()))) {\n if (task != null && !task.isCancelled()) {\n task.cancel(true);\n }\n fields = dataSource.getSearchFields(app.getLibrary().getIdent());\n buildSearchForm(savedState != null ? OpacClient.bundleToMap(savedState) : saveQuery());\n savedState = null;\n } else {\n executeNewLoadSearchFieldsTask();\n }\n setAdvanced(false);\n}\n"
|
"public void attribute(String namespaceURI, String localName, String qName, String value) {\n try {\n writer.write(' ');\n writer.write(qName);\n writer.write('=');\n writer.write('\\\"');\n writeValue(value, true);\n writer.write('\\\"');\n } catch (IOException e) {\n throw XMLMarshalException.marshalException(e);\n }\n}\n"
|
"public static void main(String[] args) throws Exception {\n Properties config = SimpleAccumuloConfig.loadConfig();\n SimpleAccumuloConfig saConf = SimpleAccumuloConfig.fromConfig(config);\n int nt = Integer.parseInt(config.getProperty(\"String_Node_Str\", \"String_Node_Str\"));\n int port = Integer.parseInt(config.getProperty(\"String_Node_Str\", \"String_Node_Str\"));\n logger.info(\"String_Node_Str\" + port);\n logger.info(\"String_Node_Str\" + nt);\n logger.info(\"String_Node_Str\" + saConf);\n try (SimpleAccumuloStore serv = new SimpleAccumuloStore(saConf, nt)) {\n serv.connect(config.getProperty(\"String_Node_Str\"), new PasswordToken(config.getProperty(\"String_Node_Str\")));\n Processor<SimpleAccumuloStore> proc = new StoreCommunicationService.Processor<>(serv);\n TNonblockingServerTransport transport = new TNonblockingServerSocket(port);\n TNonblockingServer.Args serverArgs = new TNonblockingServer.Args(transport);\n serverArgs = serverArgs.processorFactory(new TProcessorFactory(proc));\n serverArgs = serverArgs.protocolFactory(new TCompactProtocol.Factory());\n serverArgs = serverArgs.transportFactory(new TFramedTransport.Factory(Integer.MAX_VALUE));\n serverArgs.maxReadBufferBytes = Long.MAX_VALUE;\n TNonblockingServer server = new TNonblockingServer(serverArgs);\n logger.info(\"String_Node_Str\");\n server.serve();\n }\n}\n"
|
"public void testInvokingVarargs01_GtoJ() {\n runConformTest(new String[] { \"String_Node_Str\", \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" }, \"String_Node_Str\");\n}\n"
|
"public List<String> getQualifiedInterfaceExtendsList() {\n List<String> result = new UniqueEList<String>();\n if (!isExternalInterface()) {\n String rootExtendsInterface = getGenModel().getRootExtendsInterface();\n if (rootExtendsInterface == null) {\n rootExtendsInterface = \"String_Node_Str\";\n }\n if (getBaseGenClasses().isEmpty()) {\n if (!isEObject() && !isBlank(rootExtendsInterface)) {\n result.add(rootExtendsInterface);\n }\n return result;\n }\n return result;\n }\n boolean needsRootExtendsInterface = true;\n for (GenClass genClass : getAllBaseGenClasses()) {\n if (genClass.getEcoreClass().getInstanceClassName() == null && rootExtendsInterface.equals(genClass.getGenModel().getRootExtendsInterface())) {\n needsRootExtendsInterface = false;\n break;\n }\n }\n if (needsRootExtendsInterface && !isBlank(rootExtendsInterface)) {\n result.add(rootExtendsInterface);\n }\n boolean includeTypeArguments = getEffectiveComplianceLevel().getValue() >= GenJDKLevel.JDK50;\n for (int i = 0, size = getBaseGenClasses().size(); i < size; i++) {\n GenClassImpl genClass = (GenClassImpl) getBaseGenClasses().get(i);\n EGenericType eGenericType = getEcoreClass().getEGenericSuperTypes().get(i);\n if (genClass.isExternalInterface() || genClass.isInterface() || !genClass.getGenModel().isSuppressInterfaces()) {\n if (includeTypeArguments && !eGenericType.getETypeArguments().isEmpty()) {\n result.add(genClass.getInternalQualifiedInterfaceName() + getTypeArguments(this, eGenericType.getETypeArguments(), false));\n } else {\n result.add(genClass.getInternalQualifiedInterfaceName());\n }\n }\n }\n return result;\n}\n"
|
"protected void parseImmunizationEvaluationProperties(JsonObject json, ImmunizationEvaluation res) throws IOException, FHIRFormatError {\n parseDomainResourceProperties(json, res);\n if (json.has(\"String_Node_Str\")) {\n JsonArray array = json.getAsJsonArray(\"String_Node_Str\");\n for (int i = 0; i < array.size(); i++) {\n res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));\n }\n }\n ;\n if (json.has(\"String_Node_Str\"))\n res.setStatusElement(parseEnumeration(json.get(\"String_Node_Str\").getAsString(), ImmunizationEvaluation.ImmunizationEvaluationStatus.NULL, new ImmunizationEvaluation.ImmunizationEvaluationStatusEnumFactory()));\n if (json.has(\"String_Node_Str\"))\n parseElementProperties(json.getAsJsonObject(\"String_Node_Str\"), res.getStatusElement());\n if (json.has(\"String_Node_Str\"))\n res.setPatient(parseReference(json.getAsJsonObject(\"String_Node_Str\")));\n if (json.has(\"String_Node_Str\"))\n res.setDateElement(parseDateTime(json.get(\"String_Node_Str\").getAsString()));\n if (json.has(\"String_Node_Str\"))\n parseElementProperties(json.getAsJsonObject(\"String_Node_Str\"), res.getDateElement());\n if (json.has(\"String_Node_Str\"))\n res.setAuthority(parseReference(json.getAsJsonObject(\"String_Node_Str\")));\n if (json.has(\"String_Node_Str\")) {\n JsonArray array = json.getAsJsonArray(\"String_Node_Str\");\n for (int i = 0; i < array.size(); i++) {\n res.getTargetDisease().add(parseCodeableConcept(array.get(i).getAsJsonObject()));\n }\n }\n ;\n if (json.has(\"String_Node_Str\"))\n res.setImmunizationEvent(parseReference(json.getAsJsonObject(\"String_Node_Str\")));\n if (json.has(\"String_Node_Str\"))\n res.setDoseStatus(parseCodeableConcept(json.getAsJsonObject(\"String_Node_Str\")));\n if (json.has(\"String_Node_Str\")) {\n JsonArray array = json.getAsJsonArray(\"String_Node_Str\");\n for (int i = 0; i < array.size(); i++) {\n res.getDoseStatusReason().add(parseCodeableConcept(array.get(i).getAsJsonObject()));\n }\n }\n ;\n if (json.has(\"String_Node_Str\"))\n res.setDescriptionElement(parseString(json.get(\"String_Node_Str\").getAsString()));\n if (json.has(\"String_Node_Str\"))\n parseElementProperties(json.getAsJsonObject(\"String_Node_Str\"), res.getDescriptionElement());\n if (json.has(\"String_Node_Str\"))\n res.setSeriesElement(parseString(json.get(\"String_Node_Str\").getAsString()));\n if (json.has(\"String_Node_Str\"))\n parseElementProperties(json.getAsJsonObject(\"String_Node_Str\"), res.getSeriesElement());\n Type doseNumber = parseType(\"String_Node_Str\", json);\n if (doseNumber != null)\n res.setDoseNumber(doseNumber);\n Type seriesDoses = parseType(\"String_Node_Str\", json);\n if (seriesDoses != null)\n res.setSeriesDoses(seriesDoses);\n}\n"
|
"public boolean emulateOP(long maxCycles) {\n int pc = readRegister(PC);\n long startCycles = cycles;\n if (cycles >= nextEventCycles) {\n executeEvents();\n }\n if (interruptsEnabled && servicedInterrupt == -1 && interruptMax >= 0) {\n pc = serviceInterrupt(pc);\n }\n if (cpuOff) {\n if (maxCycles >= 0 && maxCycles < nextEventCycles) {\n cycles = cycles < maxCycles ? maxCycles : cycles;\n } else {\n cycles = nextEventCycles;\n }\n return false;\n }\n if (breakPoints[pc] != null) {\n if (breakpointActive) {\n breakPoints[pc].cpuAction(CPUMonitor.BREAK, pc, 0);\n breakpointActive = false;\n return false;\n } else {\n breakpointActive = true;\n }\n }\n instruction = memory[pc] + (memory[pc + 1] << 8);\n op = instruction >> 12;\n int sp = 0;\n int sr = 0;\n boolean word = (instruction & 0x40) == 0;\n int dstRegister = 0;\n int dstAddress = -1;\n boolean dstRegMode = false;\n int dst = 0;\n boolean write = false;\n boolean updateStatus = true;\n pc += 2;\n writeRegister(PC, pc);\n switch(op) {\n case 1:\n {\n dstRegister = instruction & 0xf;\n int ad = (instruction >> 4) & 3;\n int nxtCarry = 0;\n op = instruction & 0xff80;\n if (op == PUSH) {\n sp = readRegister(SP) - 2;\n writeRegister(SP, sp);\n }\n if ((dstRegister == CG1 && ad > AM_INDEX) || dstRegister == CG2) {\n dstRegMode = true;\n cycles++;\n } else {\n switch(ad) {\n case AM_REG:\n dstRegMode = true;\n cycles++;\n break;\n case AM_INDEX:\n dstAddress = readRegisterCG(dstRegister, ad) + memory[pc] + (memory[pc + 1] << 8);\n pc += 2;\n writeRegister(PC, pc);\n cycles += 4;\n break;\n case AM_IND_REG:\n dstAddress = readRegister(dstRegister);\n cycles += 3;\n break;\n case AM_IND_AUTOINC:\n if (dstRegister == PC) {\n dstAddress = readRegister(PC);\n pc += 2;\n writeRegister(PC, pc);\n cycles += 5;\n } else {\n dstAddress = readRegister(dstRegister);\n writeRegister(dstRegister, dstAddress + (word ? 2 : 1));\n cycles += 3;\n }\n break;\n }\n }\n if (dstRegMode) {\n dst = readRegisterCG(dstRegister, ad);\n if (!word) {\n dst &= 0xff;\n }\n } else {\n dst = read(dstAddress, word);\n }\n switch(op) {\n case RRC:\n nxtCarry = (dst & 1) > 0 ? CARRY : 0;\n dst = dst >> 1;\n if (word) {\n dst |= (readRegister(SR) & CARRY) > 0 ? 0x8000 : 0;\n } else {\n dst |= (readRegister(SR) & CARRY) > 0 ? 0x80 : 0;\n }\n write = true;\n writeRegister(SR, (readRegister(SR) & ~CARRY) | nxtCarry);\n break;\n case SWPB:\n int tmp = dst;\n dst = ((tmp >> 8) & 0xff) + ((tmp << 8) & 0xff00);\n write = true;\n break;\n case RRA:\n nxtCarry = (dst & 1) > 0 ? CARRY : 0;\n if (word) {\n dst = (dst & 0x8000) | (dst >> 1);\n } else {\n dst = (dst & 0x80) | (dst >> 1);\n }\n write = true;\n writeRegister(SR, (readRegister(SR) & ~CARRY) | nxtCarry);\n break;\n case SXT:\n dst = (dst & 0x80) > 0 ? dst | 0xff00 : dst & 0x7f;\n write = true;\n break;\n case PUSH:\n if (word) {\n memory[sp] = dst & 0xff;\n memory[sp + 1] = dst >> 8;\n } else {\n memory[sp] = dst & 0xff;\n memory[sp + 1] = 0;\n }\n write = false;\n updateStatus = false;\n break;\n case CALL:\n sp = readRegister(SP) - 2;\n writeRegister(SP, sp);\n pc = readRegister(PC);\n memory[sp] = pc & 0xff;\n memory[sp + 1] = pc >> 8;\n writeRegister(PC, dst);\n write = false;\n updateStatus = false;\n break;\n case RETI:\n sp = readRegister(SP);\n writeRegister(SR, memory[sp++] + (memory[sp++] << 8));\n writeRegister(PC, memory[sp++] + (memory[sp++] << 8));\n writeRegister(SP, sp);\n write = false;\n updateStatus = false;\n if (debugInterrupts) {\n System.out.println(\"String_Node_Str\" + pc + \"String_Node_Str\" + reg[PC] + \"String_Node_Str\" + reg[SP]);\n }\n handlePendingInterrupts();\n break;\n default:\n System.out.println(\"String_Node_Str\" + instruction);\n }\n }\n break;\n case 2:\n case 3:\n int jmpOffset = instruction & 0x3ff;\n jmpOffset = (jmpOffset & 0x200) == 0 ? 2 * jmpOffset : -(2 * (0x200 - (jmpOffset & 0x1ff)));\n boolean jump = false;\n cycles += 2;\n sr = readRegister(SR);\n switch(instruction & 0xfc00) {\n case JNE:\n jump = (sr & ZERO) == 0;\n break;\n case JEQ:\n jump = (sr & ZERO) > 0;\n break;\n case JNC:\n jump = (sr & CARRY) == 0;\n break;\n case JC:\n jump = (sr & CARRY) > 0;\n break;\n case JN:\n jump = (sr & NEGATIVE) > 0;\n break;\n case JGE:\n jump = (sr & NEGATIVE) > 0 == (sr & OVERFLOW) > 0;\n break;\n case JL:\n jump = (sr & NEGATIVE) > 0 != (sr & OVERFLOW) > 0;\n break;\n case JMP:\n jump = true;\n break;\n default:\n System.out.println(\"String_Node_Str\" + Utils.binary16(instruction));\n }\n if (jump) {\n writeRegister(PC, pc + jmpOffset);\n }\n break;\n default:\n dstRegister = instruction & 0xf;\n int srcRegister = (instruction >> 8) & 0xf;\n int as = (instruction >> 4) & 3;\n dstRegMode = ((instruction >> 7) & 1) == 0;\n dstAddress = -1;\n int srcAddress = -1;\n int src = 0;\n if ((srcRegister == CG1 && as != AM_INDEX) || srcRegister == CG2) {\n src = CREG_VALUES[srcRegister - 2][as];\n if (!word) {\n src &= 0xff;\n }\n cycles += dstRegMode ? 1 : 4;\n } else {\n switch(as) {\n case AM_REG:\n src = readRegister(srcRegister);\n if (!word) {\n src &= 0xff;\n }\n cycles += dstRegMode ? 1 : 4;\n break;\n case AM_INDEX:\n srcAddress = readRegisterCG(srcRegister, as) + memory[pc] + (memory[pc + 1] << 8);\n incRegister(PC, 2);\n cycles += dstRegMode ? 3 : 6;\n break;\n case AM_IND_REG:\n srcAddress = readRegister(srcRegister);\n cycles += dstRegMode ? 2 : 5;\n break;\n case AM_IND_AUTOINC:\n if (srcRegister == PC) {\n srcAddress = readRegister(PC);\n pc += 2;\n incRegister(PC, 2);\n cycles += 3;\n } else {\n srcAddress = readRegister(srcRegister);\n incRegister(srcRegister, word ? 2 : 1);\n cycles += dstRegMode ? 2 : 5;\n }\n break;\n }\n }\n if (dstRegMode) {\n if (op != MOV) {\n dst = readRegister(dstRegister);\n if (!word) {\n dst &= 0xff;\n }\n }\n } else {\n pc = readRegister(PC);\n if (dstRegister == 2) {\n dstAddress = memory[pc] + (memory[pc + 1] << 8);\n } else {\n dstAddress = readRegister(dstRegister) + memory[pc] + (memory[pc + 1] << 8);\n }\n if (op != MOV)\n dst = read(dstAddress, word);\n pc += 2;\n incRegister(PC, 2);\n }\n if (srcAddress != -1) {\n srcAddress = srcAddress & 0xffff;\n src = read(srcAddress, word);\n }\n int tmp = 0;\n int tmpAdd = 0;\n switch(op) {\n case MOV:\n dst = src;\n write = true;\n updateStatus = false;\n break;\n case SUB:\n tmpAdd = 1;\n case SUBC:\n src = (src ^ 0xffff) & 0xffff;\n case ADDC:\n if (op == ADDC || op == SUBC)\n tmpAdd = ((readRegister(SR) & CARRY) > 0) ? 1 : 0;\n case ADD:\n sr = readRegister(SR);\n sr &= ~(OVERFLOW | CARRY);\n tmp = (src ^ dst) & (word ? 0x8000 : 0x80);\n dst = dst + src + tmpAdd;\n if (dst > (word ? 0xffff : 0xff)) {\n sr |= CARRY;\n }\n if (tmp == 0 && ((src ^ dst) & (word ? 0x8000 : 0x80)) != 0) {\n sr |= OVERFLOW;\n }\n writeRegister(SR, sr);\n write = true;\n break;\n case CMP:\n int b = word ? 0x8000 : 0x80;\n sr = readRegister(SR);\n sr = (sr & ~(CARRY | OVERFLOW)) | (dst >= src ? CARRY : 0);\n tmp = dst - src;\n if (((src ^ tmp) & b) == 0 && (((src ^ dst) & b) != 0)) {\n sr |= OVERFLOW;\n }\n writeRegister(SR, sr);\n dst = tmp;\n break;\n case DADD:\n if (DEBUG)\n System.out.println(\"String_Node_Str\");\n dst = dst + src + ((readRegister(SR) & CARRY) > 0 ? 1 : 0);\n write = true;\n break;\n case BIT:\n dst = src & dst;\n sr = readRegister(SR);\n sr = sr & ~(CARRY | OVERFLOW);\n if (dst != 0) {\n sr |= CARRY;\n }\n writeRegister(SR, sr);\n break;\n case BIC:\n dst = (~src) & dst;\n write = true;\n updateStatus = false;\n break;\n case BIS:\n dst = src | dst;\n write = true;\n updateStatus = false;\n break;\n case XOR:\n dst = src ^ dst;\n write = true;\n break;\n case AND:\n dst = src & dst;\n write = true;\n break;\n default:\n System.out.println(\"String_Node_Str\" + op + \"String_Node_Str\" + pc);\n }\n }\n if (word) {\n dst &= 0xffff;\n } else {\n dst &= 0xff;\n }\n if (write) {\n if (dstRegMode) {\n writeRegister(dstRegister, dst);\n } else {\n dstAddress &= 0xffff;\n write(dstAddress, dst, word);\n }\n }\n if (updateStatus) {\n sr = readRegister(SR);\n sr = (sr & ~(ZERO | NEGATIVE)) | ((dst == 0) ? ZERO : 0) | (word ? ((dst & 0x8000) > 0 ? NEGATIVE : 0) : ((dst & 0x80) > 0 ? NEGATIVE : 0));\n writeRegister(SR, sr);\n }\n cpuCycles += cycles - startCycles;\n return true;\n}\n"
|
"public Object get(ResultSet rs, String colName) throws SQLException {\n File f = this.createTempFile();\n Clob clob = rs.getClob(colName);\n if (clob == null)\n return null;\n Files.write(f, clob.getCharacterStream());\n return new SimpleClob(f);\n}\n"
|
"public ChannelMap getChannels(final int mipmapLevel) throws IllegalArgumentException {\n final ChannelMap targetChannels = new ChannelMap();\n final double levelScale = (1.0 / Math.pow(2.0, mipmapLevel)) * levelZeroScale;\n final int levelWidth = (int) ((fullScaleWidth * levelScale) + 0.5);\n final int levelHeight = (int) ((fullScaleHeight * levelScale) + 0.5);\n for (final String channelName : channelNames) {\n targetChannels.put(channelName, new ImageProcessorWithMasks(new FloatProcessor(levelWidth, levelHeight), null, null));\n }\n long totalScaleDerivationTime = 0;\n for (final TransformableCanvas canvas : canvasList) {\n final long scaleDerivationStart = System.currentTimeMillis();\n final CoordinateTransformList<CoordinateTransform> renderTransformList = addRenderScaleAndOffset(canvas.getTransformList(), levelZeroScale, levelScale, x, y);\n final MipmapSource source = canvas.getSource();\n final double averageScale = Utils.sampleAverageScale(renderTransformList, source.getFullScaleWidth(), source.getFullScaleHeight(), meshCellSize);\n final int componentMipmapLevel = Utils.bestMipmapLevel(averageScale);\n totalScaleDerivationTime += (System.currentTimeMillis() - scaleDerivationStart);\n mapPixels(source, componentMipmapLevel, renderTransformList, meshCellSize, hasMasks, binaryMask, numberOfMappingThreads, skipInterpolation, targetChannels);\n }\n LOG.debug(\"String_Node_Str\", canvasList.size(), totalScaleDerivationTime);\n return targetChannels;\n}\n"
|
"public void updateEmptyShadeView(boolean visible) {\n int oldVisibility = mEmptyShadeView.willBeGone() ? GONE : mEmptyShadeView.getVisibility();\n int newVisibility = visible ? VISIBLE : GONE;\n if (oldVisibility != newVisibility) {\n if (newVisibility != GONE) {\n if (mEmptyShadeView.willBeGone()) {\n mEmptyShadeView.cancelAnimation();\n } else {\n mEmptyShadeView.setInvisible();\n }\n mEmptyShadeView.setVisibility(newVisibility);\n mEmptyShadeView.setWillBeGone(false);\n updateContentHeight();\n notifyHeightChangeListener(mDismissView);\n } else {\n Runnable onFinishedRunnable = new Runnable() {\n\n public void run() {\n mEmptyShadeView.setVisibility(GONE);\n mEmptyShadeView.setWillBeGone(false);\n updateContentHeight();\n notifyHeightChangeListener(mDismissView);\n }\n });\n }\n }\n}\n"
|
"private void readSingle(final DBObject dbObject, final MappedField mf, final Object entity, Class fieldType, Reference refAnn, EntityCache cache, Mapper mapr) {\n Class referenceObjClass = fieldType;\n DBRef dbRef = (DBRef) mf.getDbObjectValue(dbObject);\n if (dbRef != null) {\n Object resolvedObject = null;\n if (refAnn.lazy() && LazyFeatureDependencies.assertDependencyFullFilled()) {\n if (exists(referenceObjClass, dbRef, cache, mapr)) {\n resolvedObject = createOrReuseProxy(referenceObjClass, dbRef, cache, mapr);\n } else {\n if (!refAnn.ignoreMissing()) {\n throw new MappingException(\"String_Node_Str\" + dbRef.toString() + \"String_Node_Str\" + mf.getFullName());\n }\n }\n } else {\n resolvedObject = resolveObject(dbRef, mf, cache, mapr);\n }\n mf.setFieldValue(entity, resolvedObject);\n }\n}\n"
|
"public boolean performItemClick(View view, int position, long id) {\n if (view instanceof WrapperView) {\n view = ((WrapperView) view).item;\n }\n return super.performItemClick(view, position, id);\n}\n"
|
"public void createOneUnit(final TreeItem treeItem, IndicatorUnit indicatorUnit) {\n final TreeItem indicatorItem = new TreeItem(treeItem, SWT.NONE);\n final IndicatorUnit unit = indicatorUnit;\n IndicatorEnum type = indicatorUnit.getType();\n final IndicatorEnum indicatorEnum = type;\n indicatorItem.setData(COLUMN_INDICATOR_KEY, treeItem.getData(COLUMN_INDICATOR_KEY));\n indicatorItem.setData(INDICATOR_UNIT_KEY, unit);\n indicatorItem.setData(VIEWER_KEY, this);\n String label = indicatorUnit.getIndicatorName();\n if (IndicatorEnum.PatternMatchingIndicatorEnum.compareTo(type) == 0) {\n indicatorItem.setImage(0, ImageLib.getImage(ImageLib.PATTERN_REG));\n }\n indicatorItem.setText(0, label);\n TreeEditor optionEditor;\n optionEditor = new TreeEditor(tree);\n Label optionLabel = new Label(tree, SWT.NONE);\n optionLabel.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));\n optionLabel.setImage(ImageLib.getImage(ImageLib.INDICATOR_OPTION));\n optionLabel.setToolTipText(\"String_Node_Str\");\n optionLabel.pack();\n optionLabel.setData(indicatorUnit);\n optionLabel.addMouseListener(new MouseAdapter() {\n public void mouseDown(MouseEvent e) {\n final IndicatorUnit indicator = (IndicatorUnit) ((Label) e.getSource()).getData();\n final IndicatorOptionsWizard wizard = new IndicatorOptionsWizard(indicator, analysis) {\n public void dispose() {\n activeCount = 0;\n super.dispose();\n }\n };\n try {\n WizardDialog dialog = new WizardDialog(null, wizard) {\n public void openTray(DialogTray tray) throws IllegalStateException, UnsupportedOperationException {\n super.openTray(tray);\n if (tray instanceof HelpTray) {\n HelpTray helpTray = (HelpTray) tray;\n ReusableHelpPart helpPart = helpTray.getHelpPart();\n helpPart.getForm().getForm().notifyListeners(SWT.Activate, new Event());\n }\n }\n };\n dialog.setPageSize(300, 400);\n dialog.create();\n dialog.getShell().addShellListener(new ShellAdapter() {\n public void shellActivated(ShellEvent e) {\n String string = HelpPlugin.PLUGIN_ID + HelpPlugin.INDICATOR_OPTION_HELP_ID;\n if (activeCount < 2) {\n Point point = e.widget.getDisplay().getCursorLocation();\n IContext context = HelpSystem.getContext(string);\n IHelpResource[] relatedTopics = context.getRelatedTopics();\n for (IHelpResource topic : relatedTopics) {\n topic.getLabel();\n topic.getHref();\n }\n IWorkbenchHelpSystem helpSystem = PlatformUI.getWorkbench().getHelpSystem();\n helpSystem.displayContext(context, point.x + 15, point.y);\n activeCount++;\n ReusableHelpPart lastActiveInstance = ReusableHelpPart.getLastActiveInstance();\n if (lastActiveInstance != null) {\n String href = IndicatorParameterTypes.getHref(indicator);\n if (href != null) {\n lastActiveInstance.showURL(href);\n }\n }\n }\n }\n });\n int open = dialog.open();\n if (Window.OK == open) {\n setDirty(wizard.isDirty());\n }\n } catch (AssertionFailedException ex) {\n MessageDialogWithToggle.openInformation(null, \"String_Node_Str\", \"String_Node_Str\");\n }\n }\n });\n optionEditor.minimumWidth = WIDTH1_CELL;\n optionEditor.horizontalAlignment = SWT.CENTER;\n optionEditor.setEditor(optionLabel, indicatorItem, 1);\n TreeEditor delEditor = new TreeEditor(tree);\n Label delLabel = new Label(tree, SWT.NONE);\n delLabel.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));\n delLabel.setImage(ImageLib.getImage(ImageLib.DELETE_ACTION));\n delLabel.setToolTipText(\"String_Node_Str\");\n delLabel.pack();\n delLabel.addMouseListener(new MouseAdapter() {\n public void mouseDown(MouseEvent e) {\n ColumnIndicator columnIndicator = (ColumnIndicator) treeItem.getData(COLUMN_INDICATOR_KEY);\n deleteIndicatorItems(columnIndicator, unit);\n if (indicatorItem.getParentItem() != null && indicatorItem.getParentItem().getData(INDICATOR_UNIT_KEY) != null) {\n setElements(columnIndicators);\n } else {\n removeItemBranch(indicatorItem);\n }\n }\n });\n delEditor.minimumWidth = WIDTH1_CELL;\n delEditor.horizontalAlignment = SWT.CENTER;\n delEditor.setEditor(delLabel, indicatorItem, 2);\n indicatorItem.setData(ITEM_EDITOR_KEY, new TreeEditor[] { optionEditor, delEditor });\n if (indicatorEnum.hasChildren()) {\n indicatorItem.setData(treeItem.getData(COLUMN_INDICATOR_KEY));\n createIndicatorItems(indicatorItem, indicatorUnit.getChildren());\n }\n}\n"
|
"public TdReport findReport(IFile file) {\n if (file != null && FactoriesUtil.REP.equals(file.getFileExtension())) {\n TdReport report = allRepMap.get(file);\n if (report != null) {\n return report;\n }\n return readFromFile(file);\n }\n return null;\n}\n"
|
"private final void _triggerRateEvent(final Time currentTime, final boolean force) throws IllegalActionException {\n if (_debugging) {\n _debugToStdOut(String.format(\"String_Node_Str\", System.identityHashCode(this), currentTime.toString()));\n }\n int curIdx = 0;\n boolean updatedInputVarMdl = false;\n for (Input input : _inputs) {\n assert (input.port.isKnown(0));\n if (input.port.hasNewToken(0)) {\n final Token token = input.port.get(0);\n final ModelPolynomial ivMdl = _inputVariableModels[curIdx];\n _setModelFromToken(ivMdl, token);\n ivMdl.tMdl = currentTime;\n _inputs.get(curIdx).lastInput = token;\n _inputs.get(curIdx).hasChanged = true;\n if (_debugging) {\n _debugToStdOut(String.format(\"String_Node_Str\", System.identityHashCode(this), curIdx, ivMdl.toString()));\n }\n updatedInputVarMdl = true;\n }\n curIdx++;\n }\n assert (_qssSolver.getInputVariableCount() == curIdx);\n if (force || updatedInputVarMdl || _qssSolver.needRateEvent()) {\n if (_debugging) {\n _debugToStdOut(String.format(\"String_Node_Str\", System.identityHashCode(this), force, updatedInputVarMdl, _qssSolver.needRateEvent()));\n }\n try {\n _qssSolver.triggerRateEvent();\n } catch (Exception ee) {\n throw new IllegalActionException(this, ee, \"String_Node_Str\");\n }\n }\n}\n"
|
"public void replaceVarDeclaration(Var oldV, Var newV) {\n if (!this.variables.contains(oldV)) {\n throw new STCRuntimeError(\"String_Node_Str\" + oldV.toString() + \"String_Node_Str\");\n }\n throw new STCRuntimeError(\"String_Node_Str\" + oldV.toString() + \"String_Node_Str\" + \"String_Node_Str\");\n}\n"
|
"public List<NamedObj> decoratedObjects() {\n CompositeEntity container = (CompositeEntity) getContainer();\n return _getEntitiesToDecorate(container);\n}\n"
|
"private Set commitDanglingTransactions() throws IOException {\n Set committedGtrids = new HashSet();\n Map danglingRecords = TransactionManagerServices.getJournal().collectDanglingRecords();\n if (log.isDebugEnabled())\n log.debug(\"String_Node_Str\" + danglingRecords.size() + \"String_Node_Str\");\n Iterator it = danglingRecords.entrySet().iterator();\n while (it.hasNext()) {\n Map.Entry entry = (Map.Entry) it.next();\n Uid gtrid = (Uid) entry.getKey();\n TransactionLogRecord tlog = (TransactionLogRecord) entry.getValue();\n Set uniqueNames = tlog.getUniqueNames();\n Set danglingTransactions = getDanglingTransactionsInRecoveredXids(uniqueNames, tlog.getGtrid());\n if (danglingTransactions.size() > 0) {\n if (log.isDebugEnabled())\n log.debug(\"String_Node_Str\" + gtrid + \"String_Node_Str\" + buildUniqueNamesString(participatingUniqueNames) + \"String_Node_Str\");\n TransactionManagerServices.getJournal().log(Status.STATUS_COMMITTED, tlog.getGtrid(), participatingUniqueNames);\n } else {\n if (log.isDebugEnabled())\n log.debug(\"String_Node_Str\" + gtrid + \"String_Node_Str\");\n committedGtrids.remove(gtrid);\n }\n }\n if (log.isDebugEnabled())\n log.debug(\"String_Node_Str\" + committedGtrids.size() + \"String_Node_Str\");\n return committedGtrids;\n}\n"
|
"private void createInsertAttachmentButton(ToolbarView toolbar, final ParticipantId user) {\n WaveRef waveRef = WaveRef.of(waveId);\n Preconditions.checkState(waveRef != null);\n final String waveRefToken = URL.encode(GwtWaverefEncoder.encodeToUriQueryString(waveRef));\n new ToolbarButtonViewBuilder().setIcon(css.insertAttachment()).setTooltip(\"String_Node_Str\").applyTo(toolbar.addClickButton(), new ToolbarClickButton.Listener() {\n public void onClicked() {\n int tmpCursor = -1;\n FocusedRange focusedRange = editor.getSelectionHelper().getSelectionRange();\n if (focusedRange != null) {\n tmpCursor = focusedRange.getFocus();\n }\n final int cursorLoc = tmpCursor;\n AttachmentPopupView attachmentView = new AttachmentPopupWidget();\n attachmentView.init(new Listener() {\n public void onShow() {\n }\n public void onHide() {\n }\n public void onDone(String encodedWaveRef, String attachmentId, String fullFileName) {\n int lastSlashPos = fullFileName.lastIndexOf(\"String_Node_Str\");\n int lastBackSlashPos = fullFileName.lastIndexOf(\"String_Node_Str\");\n String fileName = fullFileName;\n if (lastSlashPos != -1) {\n fileName = fullFileName.substring(lastSlashPos + 1, fullFileName.length());\n } else if (lastBackSlashPos != -1) {\n fileName = fullFileName.substring(lastBackSlashPos + 1, fullFileName.length());\n }\n XmlStringBuilder xml = XmlStringBuilder.createFromXmlString(fileName);\n int to = -1;\n int docSize = editor.getDocument().size();\n if (cursorLoc != -1) {\n CMutableDocument doc = editor.getDocument();\n Point<ContentNode> point = doc.locate(cursorLoc);\n doc.insertXml(point, xml);\n } else {\n LineContainers.appendLine(editor.getDocument(), xml);\n }\n to = cursorLoc + editor.getDocument().size() - docSize;\n String linkValue = GWT.getHostPageBaseURL() + \"String_Node_Str\" + attachmentId + \"String_Node_Str\" + fileName + \"String_Node_Str\" + encodedWaveRef;\n EditorAnnotationUtil.setAnnotationOverRange(editor.getDocument(), editor.getCaretAnnotations(), Link.KEY, linkValue, cursorLoc, to);\n EditorAnnotationUtil.setAnnotationOverRange(editor.getDocument(), editor.getCaretAnnotations(), \"String_Node_Str\", attachmentId, cursorLoc, to);\n EditorAnnotationUtil.setAnnotationOverRange(editor.getDocument(), editor.getCaretAnnotations(), \"String_Node_Str\", fileName, cursorLoc, to);\n }\n });\n attachmentView.setAttachmentId(attachmentIdGenerator.newAttachmentId());\n attachmentView.setWaveRef(waveRefToken);\n attachmentView.show();\n }\n });\n}\n"
|
"private List<SingleAnalysis> tryWordWithApostrophe(String word) {\n int index = word.indexOf('\\'');\n if (index < 0 || index == 0 || index == word.length() - 1) {\n return Collections.emptyList();\n }\n String stem = word.substring(0, index);\n String ending = word.substring(index + 1);\n StemAndEnding se = new StemAndEnding(stem, ending);\n String stemNormalized = TurkishAlphabet.INSTANCE.normalize(se.stem).replaceAll(\"String_Node_Str\", \"String_Node_Str\");\n String endingNormalized = TurkishAlphabet.INSTANCE.normalize(se.ending);\n String pronunciation = guessPronunciation(stemNormalized);\n DictionaryItem itemProp = new DictionaryItem(Turkish.capitalize(stemNormalized), stemNormalized, pronunciation, PrimaryPos.Noun, SecondaryPos.ProperNoun);\n boolean itemDoesNotExist = !lexicon.containsItem(itemProp);\n if (itemDoesNotExist) {\n itemProp.attributes.add(RootAttribute.Runtime);\n analyzer.getStemTransitions().addDictionaryItem(itemProp);\n }\n String toParse = stemNormalized + endingNormalized;\n List<SingleAnalysis> properResults = analyzer.analyze(toParse);\n analyzer.getStemTransitions().removeDictionaryItem(itemProp);\n return properResults;\n}\n"
|
"private void checkEnumElementCycle(ErrorReporter reporter) {\n JSType referencedType = getReferencedType();\n if (referencedType instanceof EnumElementType && areIdentical(this, ((EnumElementType) referencedType).getPrimitiveType())) {\n handleTypeCycle(reporter);\n }\n}\n"
|
"public XAHdfsAuditEventDao getXAHdfsAuditEvent() {\n if (mHdfsDao == null) {\n mHdfsDao = new XAHdfsAuditEventDao(this);\n }\n return mHdfsDao;\n}\n"
|
"public void testRetryPolicy() {\n Context context = RuntimeEnvironment.application;\n File file = createRandomFile();\n ShadowLooper shadowLooper = Shadows.shadowOf(Looper.getMainLooper());\n Handler handler = new Handler();\n SizeBatchingStrategy strategy = mock(SizeBatchingStrategy.class);\n SizeBatchingStrategy.SizeBatch<Data> firstBatch = new SizeBatchingStrategy.SizeBatch<>(Utils.fakeCollection(5), 5);\n SerializationStrategy serializationStrategy = new GsonSerializationStrategy();\n BatchManager.registerBuiltInTypes(serializationStrategy);\n serializationStrategy.build();\n int errorCode = 500;\n long callbackIdle = 1000;\n int retryCount = 4;\n NetworkPersistedBatchReadyListener.NetworkRequestResponse requestResponse = new NetworkPersistedBatchReadyListener.NetworkRequestResponse(true, errorCode);\n MockNetworkPersistedBatchReadyListener networkBatchListener = spy(new MockNetworkPersistedBatchReadyListener(requestResponse, handler, callbackIdle, context));\n NetworkPersistedBatchReadyListener networkPersistedBatchReadyListener = new NetworkPersistedBatchReadyListener(context, file, serializationStrategy, handler, networkBatchListener, retryCount);\n networkPersistedBatchReadyListener.onReady(strategy, firstBatch);\n shadowLooper.runToEndOfTasks();\n verify(networkBatchListener, times(1)).performNetworkRequest(eq(firstBatch), any(ValueCallback.class));\n shadowLooper.idle(networkPersistedBatchReadyListener.getDefaultTimeoutMs());\n verify(networkBatchListener, times(2)).performNetworkRequest(eq(firstBatch), any(ValueCallback.class));\n shadowLooper.idle(callbackIdle + networkPersistedBatchReadyListener.getDefaultTimeoutMs() * 2);\n verify(networkBatchListener, times(3)).performNetworkRequest(eq(firstBatch), any(ValueCallback.class));\n shadowLooper.idle(callbackIdle + networkPersistedBatchReadyListener.getDefaultTimeoutMs() * 4);\n verify(networkBatchListener, times(4)).performNetworkRequest(eq(firstBatch), any(ValueCallback.class));\n sendFakeNetworkBroadcast(context);\n shadowLooper.idle(callbackIdle + networkPersistedBatchReadyListener.getDefaultTimeoutMs() * 8);\n verify(networkBatchListener, times(4)).performNetworkRequest(eq(firstBatch), any(ValueCallback.class));\n sendFakeNetworkBroadcast(context);\n SizeBatchingStrategy.SizeBatch<Data> secondBatch = new SizeBatchingStrategy.SizeBatch<>(Utils.fakeCollection(5), 5);\n networkPersistedBatchReadyListener.onReady(strategy, secondBatch);\n shadowLooper.idle();\n verify(networkBatchListener, times(5)).performNetworkRequest(eq(firstBatch), any(ValueCallback.class));\n shadowLooper.idle(callbackIdle + networkPersistedBatchReadyListener.getDefaultTimeoutMs());\n sendFakeNetworkBroadcast(context);\n verify(networkBatchListener, times(6)).performNetworkRequest(eq(firstBatch), any(ValueCallback.class));\n requestResponse.complete = true;\n requestResponse.httpErrorCode = 200;\n sendFakeNetworkBroadcast(context);\n shadowLooper.idle(callbackIdle + networkPersistedBatchReadyListener.getDefaultTimeoutMs() * 2);\n verify(networkBatchListener, times(1)).performNetworkRequest(eq(secondBatch), any(ValueCallback.class));\n shadowLooper.runToEndOfTasks();\n verify(networkBatchListener, atLeastOnce()).isNetworkConnected(context);\n verifyNoMoreInteractions(networkBatchListener);\n}\n"
|
"private void doComparePassword(boolean explicit) {\n final String currentPassword = mLockPasswordView.getPassword();\n if (currentPassword.equals(options.password)) {\n exitSuccessCompare();\n mAnalytics.increment(LockerAnalytics.PASSWORD_SUCCESS);\n } else if (explicit) {\n mAnalytics.increment(LockerAnalytics.UNLOCK_ERROR);\n mLockPasswordView.clearPassword();\n updatePassword();\n Toast.makeText(this, R.string.locker_invalid_password, Toast.LENGTH_SHORT).show();\n }\n}\n"
|
"private void tryAllDownloads() {\n int numRequeries = 0;\n long nextRequeryTime = System.currentTimeMillis() + getMinutesToWaitForRequery(numRequeries) * 60 * 1000;\n synchronized (this) {\n buckets = new RemoteFileDescGrouper(allFiles, incompleteFileManager);\n }\n while (true) {\n try {\n setState(QUEUED);\n manager.waitForSlot(this);\n boolean waitForRetry = false;\n try {\n for (Iterator iter = buckets.buckets(); iter.hasNext(); ) {\n List bucket = (List) iter.next();\n if (bucket.size() <= 0)\n continue;\n synchronized (this) {\n RemoteFileDesc rfd = (RemoteFileDesc) bucket.get(0);\n currentFileName = rfd.getFileName();\n currentFileSize = rfd.getSize();\n }\n int status = tryAllDownloads2(bucket);\n if (status == COMPLETE) {\n setState(COMPLETE);\n manager.remove(this, true);\n return;\n } else if (status == COULDNT_MOVE_TO_LIBRARY) {\n setState(COULDNT_MOVE_TO_LIBRARY);\n manager.remove(this, false);\n return;\n } else if (status == WAITING_FOR_RETRY) {\n waitForRetry = true;\n } else {\n Assert.that(status == GAVE_UP, \"String_Node_Str\" + status);\n }\n }\n } catch (InterruptedException e) {\n if (!stopped)\n ManagedDownloader.this.manager.internalError(e);\n }\n manager.yieldSlot(this);\n if (stopped) {\n setState(ABORTED);\n manager.remove(this, false);\n return;\n }\n final long currTime = System.currentTimeMillis();\n if ((currTime >= nextRequeryTime) && (numRequeries++ < REQUERY_ATTEMPTS)) {\n manager.sendQuery(allFiles);\n nextRequeryTime = currTime + (getMinutesToWaitForRequery(numRequeries) * 60 * 1000);\n }\n if (waitForRetry) {\n synchronized (this) {\n retriesWaiting = 0;\n for (Iterator iter = buckets.buckets(); iter.hasNext(); ) {\n List bucket = (List) iter.next();\n retriesWaiting += bucket.size();\n }\n }\n long time = calculateWaitTime();\n setState(WAITING_FOR_RETRY, time);\n reqLock.lock(time);\n } else {\n if (numRequeries <= REQUERY_ATTEMPTS) {\n final long waitTime = nextRequeryTime - System.currentTimeMillis();\n if (waitTime > 0) {\n setState(WAITING_FOR_RESULTS, waitTime);\n reqLock.lock(waitTime);\n }\n } else {\n setState(GAVE_UP);\n manager.remove(this, false);\n return;\n }\n }\n } catch (InterruptedException e) {\n if (stopped) {\n setState(ABORTED);\n manager.remove(this, false);\n return;\n }\n }\n }\n}\n"
|
"public void addValueHolder(AttributeDetails attributeDetails) {\n String attribute = attributeDetails.getAttributeName();\n RuntimeVisibleAnnotations annotations = null;\n if (attributeDetails.getGetterMethodName() == null || attributeDetails.getGetterMethodName().equals(\"String_Node_Str\") || attributeDetails.weaveTransientFieldValueHolders()) {\n annotations = getTransientAnnotation();\n }\n cv.visitField(ACC_PROTECTED, \"String_Node_Str\" + attribute + \"String_Node_Str\", VHI_SIGNATURE, null, annotations);\n}\n"
|
"protected void prePrepare() throws QueryException {\n buildSelectionCriteria(session);\n checkDescriptor(session);\n if (getQueryMechanism().isExpressionQueryMechanism() && getDescriptor().getObjectBuilder().hasJoinedAttributes()) {\n getJoinedAttributeManager().processJoinedMappings();\n if (getJoinedAttributeManager().hasOrderByExpressions()) {\n Iterator<Expression> it = getJoinedAttributeManager().getOrderByExpressions().iterator();\n while (it.hasNext()) {\n addOrdering(it.next());\n }\n }\n }\n if (lockModeType != null) {\n if (lockModeType.equals(NONE)) {\n setLockMode(ObjectBuildingQuery.NO_LOCK);\n } else if (lockModeType.contains(PESSIMISTIC_)) {\n Integer timeout = (waitTimeout == null) ? getSession().getPessimisticLockTimeoutDefault() : waitTimeout;\n if (timeout == null) {\n setLockMode(ObjectBuildingQuery.LOCK);\n } else {\n if (timeout.intValue() == 0) {\n setLockMode(ObjectBuildingQuery.LOCK_NOWAIT);\n } else {\n lockingClause = ForUpdateClause.newInstance(timeout);\n }\n }\n }\n }\n if (isDefaultLock()) {\n setWasDefaultLockMode(true);\n ForUpdateOfClause lockingClause = null;\n if (hasJoining()) {\n lockingClause = getJoinedAttributeManager().setupLockingClauseForJoinedExpressions(lockingClause, getSession());\n }\n if (descriptor.hasPessimisticLockingPolicy()) {\n lockingClause = new ForUpdateOfClause();\n lockingClause.setLockMode(descriptor.getCMPPolicy().getPessimisticLockingPolicy().getLockingMode());\n lockingClause.addLockedExpression(getExpressionBuilder());\n }\n if (lockingClause == null) {\n this.lockingClause = ForUpdateClause.newInstance(NO_LOCK);\n } else {\n this.lockingClause = lockingClause;\n dontUseDistinct();\n }\n } else if ((getLockMode() == NO_LOCK) && (!descriptor.hasPessimisticLockingPolicy())) {\n setWasDefaultLockMode(true);\n }\n if (hasJoining() && hasPartialAttributeExpressions()) {\n session.log(SessionLog.WARNING, SessionLog.QUERY, \"String_Node_Str\", new Object[] { this, this.getName() });\n }\n}\n"
|
"public void valueChanged(TreeSelectionEvent e) {\n DefaultMutableTreeNode n = (DefaultMutableTreeNode) e.getPath().getLastPathComponent();\n if (n.getUserObject() instanceof Word) {\n Word word = (Word) n.getUserObject();\n System.out.println(word);\n final WordBrowser w = new WordBrowser(cm, word);\n JFrame f = new JFrame(\"String_Node_Str\");\n w.spectrogram.setWord(cm, word);\n f.setContentPane(w.mainPane);\n f.setTitle(word.toString());\n f.pack();\n f.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n f.setVisible(true);\n }\n}\n"
|
"public void setDelayTime(final long delayTime, final TimeUnit unit) {\n if (isDefunct.get()) {\n throw new IllegalStateException(\"String_Node_Str\" + loopName + \"String_Node_Str\");\n }\n loopLock.lock();\n try {\n delayTimeNanos = TimeUnit.NANOSECONDS.convert(delayTime, unit);\n if (isLoopRunning()) {\n suspendLoop();\n if (isTaskRunning()) {\n taskWrapper.restartLoopAfterCurrentTaskFinished(new Runnable() {\n\n public void run() {\n logger.finer(\"String_Node_Str\" + loopName + \"String_Node_Str\");\n runLoop();\n }\n });\n }\n } finally {\n loopLock.unlock();\n }\n}\n"
|
"private boolean hasOnGoingMigrationMaster(Level level) {\n Address masterAddress = node.getMasterAddress();\n if (masterAddress == null) {\n return node.joined();\n }\n Operation operation = new HasOngoingMigration();\n OperationService operationService = nodeEngine.getOperationService();\n InvocationBuilder invocationBuilder = operationService.createInvocationBuilder(SERVICE_NAME, operation, masterAddress);\n Future future = invocationBuilder.setTryCount(100).setTryPauseMillis(100).invoke();\n try {\n return (Boolean) future.get(1, TimeUnit.MINUTES);\n } catch (InterruptedException ie) {\n Logger.getLogger(InternalPartitionServiceImpl.class).finest(\"String_Node_Str\", ie);\n } catch (Exception e) {\n logger.log(level, \"String_Node_Str\" + e.toString());\n }\n return false;\n}\n"
|
"public Object getProperty(String name) {\n return svcProperties.getProperty(name);\n}\n"
|
"public static String executeRsyncAIP(AIP aip, boolean hasCompression, boolean syncHistory) throws CommandException {\n String dataTarget = RodaCoreFactory.getRodaConfigurationAsString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n if (dataTarget == null) {\n return PROPERTIES_ERROR_MESSAGE;\n }\n List<String> rsyncCommand = addInitialCommandPart(hasCompression);\n Path sourceAipPath = RodaCoreFactory.getDataPath().resolve(RodaConstants.CORE_STORAGE_FOLDER).resolve(RodaConstants.STORAGE_CONTAINER_AIP).resolve(aip.getId());\n String targetAipPath = dataTarget + RodaConstants.CORE_STORAGE_FOLDER + \"String_Node_Str\" + RodaConstants.STORAGE_CONTAINER_AIP + \"String_Node_Str\" + aip.getId() + \"String_Node_Str\";\n StringBuilder ret = new StringBuilder();\n if (Files.exists(sourceAipPath)) {\n rsyncCommand.add(sourceAipPath + \"String_Node_Str\");\n rsyncCommand.add(targetAipPath);\n String output = CommandUtility.execute(rsyncCommand);\n ret.append(\"String_Node_Str\").append(StringUtils.join(rsyncCommand, \"String_Node_Str\")).append(\"String_Node_Str\");\n ret.append(output);\n }\n Path sourceAipHistoryDataPath = RodaCoreFactory.getDataPath().resolve(RodaConstants.CORE_STORAGE_HISTORY_FOLDER).resolve(RodaConstants.STORAGE_HISTORY_CONTAINER_DATA).resolve(RodaConstants.STORAGE_CONTAINER_AIP).resolve(aip.getId());\n String targetAipHistoryDataPath = dataTarget + RodaConstants.CORE_STORAGE_HISTORY_FOLDER + \"String_Node_Str\" + RodaConstants.STORAGE_HISTORY_CONTAINER_DATA + \"String_Node_Str\" + RodaConstants.STORAGE_CONTAINER_AIP + \"String_Node_Str\" + aip.getId() + \"String_Node_Str\";\n if (Files.exists(sourceAipHistoryDataPath)) {\n List<String> rsyncHistoryDataCommand = addInitialCommandPart(hasCompression);\n rsyncHistoryDataCommand.add(sourceAipHistoryDataPath + \"String_Node_Str\");\n rsyncHistoryDataCommand.add(targetAipHistoryDataPath);\n LOGGER.debug(\"String_Node_Str\", rsyncHistoryDataCommand);\n ret += CommandUtility.execute(rsyncHistoryDataCommand);\n List<String> rsyncHistoryMetadataCommand = addInitialCommandPart(hasCompression);\n rsyncHistoryMetadataCommand.add(sourceAipHistoryMetadataPath + \"String_Node_Str\");\n rsyncHistoryMetadataCommand.add(targetAipHistoryMetadataPath);\n LOGGER.debug(\"String_Node_Str\", rsyncHistoryMetadataCommand);\n ret += CommandUtility.execute(rsyncHistoryMetadataCommand);\n }\n return ret;\n}\n"
|
"public void testBasicIV2() throws Exception {\n this.GEN_add_filter = true;\n this.genBasicIV();\n this.closeArchiveWriter();\n DataEngineContext deContext2 = newContext(DataEngineContext.MODE_UPDATE, fileName, fileName);\n myPreDataEngine = DataEngine.newDataEngine(deContext2);\n this.PRE_add_sort = true;\n this.preBasicIV();\n this.closeArchiveReader();\n this.checkOutputFile();\n}\n"
|
"private void spreadFlames(int cell, float strength) {\n if (strength >= 0 && Level.passable[cell]) {\n affectedCells.add(cell);\n if (strength >= 1.5f) {\n visualCells.remove(cell);\n spreadFlames(cell + PathFinder.CIRCLE[left(direction)], strength - 1.5f);\n spreadFlames(cell + PathFinder.CIRCLE[direction], strength - 1.5f);\n spreadFlames(cell + PathFinder.CIRCLE[right(direction)], strength - 1.5f);\n } else {\n visualCells.add(cell);\n }\n } else if (!Level.passable[cell])\n visualCells.add(cell);\n}\n"
|
"private void setPomForHDLight(IProgressMonitor monitor) {\n if (ProcessUtils.jarNeedsToContainContext()) {\n try {\n Model model = MODEL_MANAGER.readMavenModel(getPomFile());\n List<Plugin> plugins = new ArrayList<Plugin>(model.getBuild().getPlugins());\n out: for (Plugin plugin : plugins) {\n if (plugin.getArtifactId().equals(\"String_Node_Str\")) {\n List<PluginExecution> pluginExecutions = plugin.getExecutions();\n for (PluginExecution pluginExecution : pluginExecutions) {\n if (pluginExecution.getId().equals(\"String_Node_Str\")) {\n Object object = pluginExecution.getConfiguration();\n if (object instanceof Xpp3Dom) {\n Xpp3Dom configNode = (Xpp3Dom) object;\n Xpp3Dom includesNode = configNode.getChild(\"String_Node_Str\");\n Xpp3Dom includeNode = new Xpp3Dom(\"String_Node_Str\");\n includeNode.setValue(\"String_Node_Str\");\n includesNode.addChild(includeNode);\n model.getBuild().setPlugins(plugins);\n PomUtil.savePom(monitor, model, getPomFile());\n break out;\n }\n }\n }\n }\n }\n } catch (Exception e) {\n ExceptionHandler.process(e);\n }\n }\n}\n"
|
"public ItemStack getActiveStack(ItemStack journalStack) {\n NBTTagCompound journalTag = journalStack.getTagCompound();\n if (journalTag != null) {\n NBTTagCompound stackTag = (NBTTagCompound) journalTag.getTag(ACTIVE_ITEMSTACK_TAG);\n if (stackTag != null) {\n return ItemStack.loadItemStackFromNBT(stackTag);\n }\n return null;\n}\n"
|
"public static byte zoomForBounds(Dimension dimension, BoundingBox boundingBox, int tileSize) {\n double dxMax = MercatorProjection.longitudeToPixelX(boundingBox.maxLongitude, (byte) 0, tileSize) / tileSize;\n double dxMin = MercatorProjection.longitudeToPixelX(boundingBox.minLongitude, (byte) 0, tileSize) / tileSize;\n double zoomX = Math.floor(-Math.log(3.8) * Math.log(Math.abs(dxMax - dxMin)) + (float) dimension.width / tileSize);\n double dyMax = MercatorProjection.latitudeToPixelY(boundingBox.maxLatitude, (byte) 0, tileSize) / tileSize;\n double dyMin = MercatorProjection.latitudeToPixelY(boundingBox.minLatitude, (byte) 0, tileSize) / tileSize;\n double zoomY = Math.floor(-Math.log(3.8) * Math.log(Math.abs(dyMax - dyMin)) + dimension.height / tileSize);\n return (byte) Double.valueOf(Math.min(zoomX, zoomY)).intValue();\n}\n"
|
"public void onReceive(final Context context, Intent intent) {\n NotificationManagerCompat notificationManager = NotificationManagerCompat.from(context);\n String notificationDetailsJson = intent.getStringExtra(FlutterLocalNotificationsPlugin.NOTIFICATION_DETAILS);\n boolean repeat = intent.getBooleanExtra(FlutterLocalNotificationsPlugin.REPEAT, false);\n if (repeat) {\n return;\n }\n FlutterLocalNotificationsPlugin.removeNotificationFromCache(notificationId, context);\n}\n"
|
"protected boolean checkPerm(Channel channel, User sender) {\n if (Nexus.getInstance().isAdmin(sender)) {\n return true;\n }\n if (adminOnly()) {\n Nexus.getInstance().sendIRC().message(sender.getNick(), Colors.RED + \"String_Node_Str\");\n return false;\n }\n return true;\n}\n"
|
"public void testDecode() throws Exception {\n Gt06ProtocolDecoder decoder = new Gt06ProtocolDecoder(null);\n decoder.setDataManager(new TestDataManager());\n int[] buf1 = { 0x78, 0x78, 0x11, 0x01, 0x01, 0x23, 0x45, 0x67, 0x89, 0x01, 0x23, 0x45, 0x10, 0x0B, 0x32, 0x01, 0x00, 0x01, 0x71, 0x93, 0x0D, 0x0A };\n assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(buf1))));\n int[] buf2 = { 0x78, 0x78, 0x1F, 0x12, 0x0B, 0x08, 0x1D, 0x11, 0x2E, 0x10, (byte) 0xCC, 0x02, 0x7A, (byte) 0xC7, (byte) 0xEB, 0x0C, 0x46, 0x58, 0x49, 0x00, 0x14, (byte) 0x8F, 0x01, (byte) 0xCC, 0x00, 0x28, 0x7D, 0x00, 0x1F, (byte) 0xB8, 0x00, 0x03, (byte) 0x80, (byte) 0x81, 0x0D, 0x0A };\n verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(buf2))));\n int[] buf3 = { 0x78, 0x78, 0x0D, 0x01, 0x08, 0x64, 0x71, 0x70, 0x03, 0x28, 0x35, (byte) 0x81, 0x00, 0x09, 0x3F, 0x04, 0x0D, 0x0A };\n assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(buf3))));\n int[] buf4 = { 0x78, 0x78, 0x0D, 0x01, 0x01, 0x23, 0x45, 0x67, (byte) 0x89, 0x01, 0x23, 0x45, 0x00, 0x01, (byte) 0x8C, (byte) 0xDD, 0x0D, 0x0A };\n assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(buf4))));\n int[] buf5 = { 0x78, 0x78, 0x0d, 0x01, 0x03, 0x53, 0x41, (byte) 0x90, 0x36, 0x06, 0x60, 0x61, 0x00, 0x03, (byte) 0xc3, (byte) 0xdf, 0x0d, 0x0a };\n assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(buf5))));\n int[] buf6 = { 0x78, 0x78, 0x19, 0x10, 0x0B, 0x03, 0x1A, 0x0B, 0x1B, 0x31, (byte) 0xCC, 0x02, 0x7A, (byte) 0xC7, (byte) 0xFD, 0x0C, 0x46, 0x57, (byte) 0xBF, 0x01, 0x15, 0x21, 0x00, 0x01, 0x00, 0x1C, (byte) 0xC6, 0x07, 0x0D, 0x0A };\n verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(buf6))));\n int[] buf7 = { 78, 0x78, 0x21, 0x12, 0x0C, 0x01, 0x0C, 0x0F, 0x15, 0x1F, (byte) 0xCF, 0x02, 0x7A, (byte) 0xC8, (byte) 0x84, 0x0C, 0x46, 0x57, (byte) 0xEC, 0x00, 0x14, 0x00, 0x01, (byte) 0xCC, 0x00, 0x28, 0x7D, 0x00, 0x1F, 0x72, 0x00, 0x01, 0x00, 0x0F, 0x53, (byte) 0xA0, 0x0D, 0x0A };\n verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(buf7))));\n int[] buf8 = { 0x78, 0x78, 0x25, 0x16, 0x0B, 0x05, 0x1B, 0x09, 0x35, 0x23, (byte) 0xCF, 0x02, 0x7A, (byte) 0xC8, 0x36, 0x0C, 0x46, 0x57, (byte) 0xB3, 0x00, 0x14, 0x00, 0x09, 0x01, (byte) 0xCC, 0x00, 0x26, 0x6A, 0x00, 0x1E, 0x17, 0x40, 0x05, 0x04, 0x00, 0x02, 0x00, 0x08, (byte) 0xD7, (byte) 0xB1, 0x0D, 0x0A };\n verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(buf8))));\n int[] buf9 = { 0x78, 0x78, 0x19, 0x10, 0x0e, 0x01, 0x09, 0x03, 0x23, 0x0e, 0xc8, 0x03, 0xae, 0x32, 0xa6, 0x06, 0x53, 0xcd, 0xed, 0x00, 0x18, 0x00, 0x00, 0x02, 0x00, 0x72, 0xfe, 0xb7, 0x0d, 0x0a };\n verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(buf9))));\n}\n"
|
"private void createPluginSipToAipLayout(PluginParameter parameter) {\n String value = job.getPluginParameters().get(parameter.getId());\n if (value == null) {\n value = parameter.getDefaultValue();\n }\n if (StringUtils.isNotBlank(value)) {\n Label pluginLabel = new Label(parameter.getName());\n PluginInfo sipToAipPlugin = pluginsInfo.get(value);\n RadioButton pluginValue;\n pluginOptions.add(pluginLabel);\n addHelp(parameter.getDescription());\n if (sipToAipPlugin != null) {\n pluginValue = new RadioButton(parameter.getId(), messages.pluginLabelWithVersion(sipToAipPlugin.getName(), sipToAipPlugin.getVersion()));\n pluginValue.setValue(true);\n pluginValue.setEnabled(false);\n pluginOptions.add(pluginValue);\n addHelp(sipToAipPlugin.getDescription());\n } else {\n pluginValue = new RadioButton(parameter.getId(), value);\n pluginValue.setValue(true);\n pluginValue.setEnabled(false);\n pluginOptions.add(pluginValue);\n GWT.log(\"String_Node_Str\" + value);\n }\n pluginLabel.addStyleName(\"String_Node_Str\");\n pluginValue.addStyleName(\"String_Node_Str\");\n }\n}\n"
|
"protected ParsedResult extract(String text, Date refDate, Matcher matcher, ChronoOptions options) {\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(refDate);\n if (matcher.group(2) == null && matcher.group(11) == null && matcher.group(6) == null)\n return null;\n ParsedResult result = new ParsedResult();\n result.start.imply(Components.DayOfMonth, calendar.get(Calendar.DAY_OF_MONTH));\n result.start.imply(Components.Month, calendar.get(Calendar.MONTH) + 1);\n result.start.imply(Components.Year, calendar.get(Calendar.YEAR));\n int hour = 0;\n int minute = 0;\n int second = 0;\n int meridiem = -1;\n if (matcher.group(3).toLowerCase().equals(\"String_Node_Str\")) {\n meridiem = 1;\n hour = 12;\n } else if (matcher.group(3).toLowerCase().equals(\"String_Node_Str\")) {\n meridiem = 0;\n hour = 0;\n } else {\n hour = Integer.parseInt(matcher.group(3));\n }\n if (matcher.group(6) != null) {\n minute = Integer.parseInt(matcher.group(6));\n if (minute >= 60)\n return null;\n } else if (hour > 100) {\n minute = hour % 100;\n hour = hour / 100;\n }\n if (matcher.group(9) != null) {\n second = Integer.parseInt(matcher.group(9));\n if (second >= 60)\n return null;\n }\n if (matcher.group(11) != null) {\n if (hour > 12)\n return null;\n if (matcher.group(11).toLowerCase().equals(\"String_Node_Str\")) {\n meridiem = 0;\n if (hour == 12)\n hour = 0;\n }\n if (matcher.group(11).toLowerCase().equals(\"String_Node_Str\")) {\n meridiem = 1;\n if (hour != 12)\n hour += 12;\n }\n }\n if (hour > 24)\n return null;\n if (hour >= 12)\n meridiem = 1;\n result.index = matcher.start() + matcher.group(1).length();\n result.text = matcher.group().substring(matcher.group(1).length(), matcher.group().length() - matcher.group(12).length());\n if (!result.start.isCertain(Components.Hour)) {\n result.start.assign(Components.Hour, hour);\n result.start.assign(Components.Minute, minute);\n result.start.assign(Components.Second, second);\n if (meridiem >= 0)\n result.start.assign(Components.Meridiem, meridiem);\n }\n Pattern secondPattern = Pattern.compile(SECOND_REG_PATTERN, Pattern.CASE_INSENSITIVE);\n matcher = secondPattern.matcher(text);\n if (!matcher.find(result.index + result.text.length())) {\n return result;\n }\n meridiem = -1;\n minute = 0;\n second = 0;\n hour = Integer.parseInt(matcher.group(2));\n if (matcher.group(5) != null) {\n minute = Integer.parseInt(matcher.group(5));\n if (minute >= 60)\n return result;\n } else if (hour > 100) {\n if (matcher.group(10) == null)\n return result;\n minute = hour % 100;\n hour = hour / 100;\n }\n if (matcher.group(8) != null) {\n second = Integer.parseInt(matcher.group(8));\n if (second >= 60)\n return result;\n }\n if (matcher.group(10) != null) {\n if (hour > 12)\n return result;\n if (matcher.group(10).toLowerCase().equals(\"String_Node_Str\")) {\n if (hour == 12) {\n hour = 0;\n if (result.end == null) {\n result.end = new ParsedDateComponent(result.start);\n }\n result.end.assign(Components.DayOfMonth, result.end.get(Components.DayOfMonth) + 1);\n }\n }\n if (matcher.group(10).toLowerCase().equals(\"String_Node_Str\")) {\n if (hour != 12)\n hour += 12;\n }\n if (!result.start.isCertain(Components.Meridiem)) {\n if (matcher.group(10).toLowerCase().equals(\"String_Node_Str\")) {\n result.start.imply(Components.Meridiem, 0);\n if (result.start.get(Components.Hour) == 12)\n result.start.assign(Components.Hour, 0);\n }\n if (matcher.group(10).toLowerCase().equals(\"String_Node_Str\")) {\n result.start.imply(Components.Meridiem, 1);\n if (result.start.get(Components.Hour) != 12)\n result.start.assign(Components.Hour, result.start.get(Components.Hour) + 12);\n }\n }\n }\n if (hour >= 12)\n meridiem = 1;\n result.text = result.text + matcher.group();\n if (result.end == null) {\n result.end = new ParsedDateComponent(result.start);\n }\n result.end.assign(Components.Hour, hour);\n result.end.assign(Components.Minute, minute);\n result.end.assign(Components.Second, second);\n if (meridiem >= 0)\n result.end.assign(Components.Meridiem, meridiem);\n return result;\n}\n"
|
"public static GroupElementHandle getGroupElementHandle(List modelList) {\n ModuleHandle handle = SessionHandleAdapter.getInstance().getReportDesignHandle();\n if (handle == null) {\n return GroupElementFactory.newGroupElement(handle, Collections.EMPTY_LIST);\n }\n return GroupElementFactory.newGroupElement(SessionHandleAdapter.getInstance().getReportDesignHandle(), modelList);\n}\n"
|
"public void setHome(msg_mission_item msg) {\n this.coordinate = new Coord2D(msg.x, msg.y);\n this.altitude = new Altitude(msg.z);\n myDrone.events.notifyDroneEvent(DroneEventsType.HOME);\n}\n"
|
"public synchronized void registerToRailway(int railway_number) {\n Railway myRailway = Country.getInstance().getRailway(railway_number);\n Station myStation = Country.getInstance().getStation(railway_number);\n myStation.removeTrain(this);\n dlog(\"String_Node_Str\" + this + \"String_Node_Str\" + myRailway);\n while (myRailway.isBusy()) {\n try {\n wait();\n } catch (InterruptedException e) {\n log(\"String_Node_Str\");\n }\n }\n myRailway.addTrain(this);\n try {\n log(\"String_Node_Str\" + myRailway.toStringMini());\n Thread.sleep(slowness * 1000);\n } catch (InterruptedException e) {\n log(\"String_Node_Str\" + myRailway);\n }\n myRailway.removeTrain(this);\n}\n"
|
"public boolean checkTrigger(GameEvent event, Game game) {\n if (event.getType() == EventType.UPKEEP_STEP_PRE) {\n Permanent enchantment = game.getPermanent(this.sourceId);\n if (enchantment != null && enchantment.getAttachedTo() != null) {\n Player player = game.getPlayer(enchantment.getAttachedTo());\n if (player != null && game.getActivePlayerId().equals(player.getId())) {\n this.getEffects().get(0).setTargetPointer(new FixedTarget(player.getId()));\n return true;\n }\n }\n }\n return false;\n}\n"
|
"public void onSuccess(HttpResponse<ArrayList<Repository>> response) {\n mView.hideLoading();\n if (isReLoad || readCacheFirst || repos == null) {\n repos = response.body();\n } else {\n repos.addAll(response.body());\n }\n if (response.body().size() > 0) {\n mView.showRepositories(repos);\n } else {\n mView.setCanLoadMore(false);\n }\n}\n"
|
"public RestResponse<DeploymentTopologyDTO> updateSubstitution(String appId, String environmentId, String nodeId, String locationResourceTemplateId) {\n checkAuthorizations(appId, environmentId);\n DeploymentConfiguration deploymentConfiguration = deploymentTopologyService.updateSubstitution(environmentId, nodeId, locationResourceTemplateId);\n return RestResponseBuilder.<DeploymentTopologyDTO>builder().data(buildDeploymentTopologyDTO(deploymentConfiguration)).build();\n}\n"
|
"public IValue resolve(MarkerList markers, IContext context) {\n this.value = this.value.resolve(markers, context);\n if (this.type == Types.VOID) {\n markers.add(this.position, \"String_Node_Str\");\n this.value.checkTypes(markers, context);\n return this;\n }\n if (!this.type.isResolved()) {\n return this;\n }\n if (!this.typeHint && this.type.equals(this.value.getType())) {\n markers.add(this.position, \"String_Node_Str\");\n this.typeHint = true;\n }\n IValue value1 = this.value.withType(this.type);\n if (value1 != null && value1 != this.value) {\n this.value = value1;\n this.typeHint = true;\n this.value.checkTypes(markers, context);\n this.type = value1.getType();\n return this;\n }\n this.value.checkTypes(markers, context);\n return this;\n}\n"
|
"private void renderRiserTube2D(IPrimitiveRenderer ipr, Object oSource, DataPointHints dpha, Location[] loaFront, Fill f, LineAttributes lia, ChartDimension cd, double dSeriesThickness, boolean bOffset, boolean bTransposed, boolean bDeferred, boolean bInverted, boolean bStacked, int zorder_hint) throws ChartException {\n ArrayList alModel = new ArrayList();\n Fill fBrighter;\n if (!isDimension3D()) {\n f = FillUtil.convertFillToGradient(f, bTransposed);\n fBrighter = FillUtil.getBrighterFill(f);\n } else {\n fBrighter = FillUtil.changeBrightness(f, 0.89);\n f = FillUtil.convertFillToGradient3D(f, bTransposed);\n }\n LineAttributes liaBorder = goFactory.copyOf(lia);\n if (liaBorder.getColor() == null) {\n liaBorder.setColor(FillUtil.getDarkerColor(f));\n }\n PolygonRenderEvent pre = ((EventObjectCache) ipr).getEventObject(oSource, PolygonRenderEvent.class);\n LineRenderEvent lre = ((EventObjectCache) ipr).getEventObject(oSource, LineRenderEvent.class);\n OvalRenderEvent ore = ((EventObjectCache) ipr).getEventObject(oSource, OvalRenderEvent.class);\n ArcRenderEvent are = ((EventObjectCache) ipr).getEventObject(oSource, ArcRenderEvent.class);\n double dWidth = bTransposed ? loaFront[1].getY() - loaFront[0].getY() : loaFront[2].getX() - loaFront[1].getX();\n if (bOffset) {\n for (int i = 0; i < loaFront.length; i++) {\n if (bTransposed) {\n loaFront[i].setX(loaFront[i].getX() + dSeriesThickness);\n } else {\n loaFront[i].setY(loaFront[i].getY() - dSeriesThickness);\n }\n }\n }\n Bounds bottomBounds = null;\n if (bTransposed) {\n bottomBounds = goFactory.createBounds(loaFront[0].getX() - dSeriesThickness, loaFront[0].getY() + dWidth, dSeriesThickness * 2, Math.abs(dWidth));\n } else {\n bottomBounds = goFactory.createBounds(loaFront[0].getX(), loaFront[1].getY() - dSeriesThickness, dWidth, dSeriesThickness * 2);\n }\n Bounds topBounds = null;\n if (bTransposed) {\n topBounds = goFactory.createBounds(loaFront[3].getX() - dSeriesThickness, loaFront[3].getY() + dWidth, dSeriesThickness * 2, Math.abs(dWidth));\n } else {\n topBounds = goFactory.createBounds(loaFront[0].getX(), loaFront[0].getY() - dSeriesThickness, dWidth, dSeriesThickness * 2);\n }\n if (bottomBounds != null) {\n ore.setBounds(bottomBounds);\n ore.setBackground(f);\n ore.setOutline(liaBorder);\n if (bDeferred) {\n alModel.add(ore.copy());\n } else {\n ipr.fillOval(ore);\n }\n are.setBackground(null);\n are.setOutline(liaBorder);\n are.setBounds(ore.getBounds());\n are.setAngleExtent(180);\n are.setStyle(ArcRenderEvent.OPEN);\n if (bTransposed) {\n are.setStartAngle(90);\n } else {\n are.setStartAngle(180);\n }\n if (bDeferred) {\n alModel.add(are.copy());\n } else {\n ipr.drawArc(are);\n }\n }\n pre.setPoints(loaFront);\n pre.setBackground(f);\n pre.setOutline(null);\n if (bDeferred) {\n alModel.add(pre.copy());\n } else {\n ipr.fillPolygon(pre);\n }\n if (bTransposed) {\n lre.setStart(loaFront[1]);\n lre.setEnd(loaFront[2]);\n } else {\n lre.setStart(loaFront[0]);\n lre.setEnd(loaFront[1]);\n }\n lre.setLineAttributes(liaBorder);\n if (bDeferred) {\n alModel.add(lre.copy());\n } else {\n ipr.drawLine(lre);\n }\n if (bTransposed) {\n lre.setStart(loaFront[0]);\n lre.setEnd(loaFront[3]);\n } else {\n lre.setStart(loaFront[2]);\n lre.setEnd(loaFront[3]);\n }\n lre.setLineAttributes(liaBorder);\n if (bDeferred) {\n alModel.add(lre.copy());\n } else {\n ipr.drawLine(lre);\n }\n if (topBounds != null) {\n ore.setBounds(topBounds);\n ore.setBackground(fBrighter);\n ore.setOutline(liaBorder);\n if (bDeferred) {\n alModel.add(ore.copy());\n } else {\n ipr.fillOval(ore);\n ipr.drawOval(ore);\n }\n are.setBackground(null);\n are.setOutline(liaBorder);\n are.setBounds(ore.getBounds());\n are.setAngleExtent(180);\n are.setStyle(ArcRenderEvent.OPEN);\n if (bTransposed) {\n are.setStartAngle(90);\n } else {\n are.setStartAngle(180);\n }\n if (bDeferred) {\n alModel.add(are.copy());\n } else {\n ipr.drawArc(are);\n }\n }\n renderInteractivity(ipr, dpha, ore);\n if (!alModel.isEmpty()) {\n WrappedInstruction wi = new WrappedInstruction(getDeferredCache(), alModel, PrimitiveRenderEvent.FILL, zorder_hint);\n wi.setCompareBounds(compareBounds);\n dc.addModel(wi);\n }\n}\n"
|
"public boolean isTicketPathSet() {\n return (ticket == null) ? false : ticket.isTicketPathSet();\n}\n"
|
"public void write(String s) {\n try {\n reader.print(s);\n if (directWrite) {\n reader.flush();\n } catch (IOException e) {\n throw new RuntimeException(\"String_Node_Str\", e);\n }\n}\n"
|
"public void showAllSurvey(final List<Survey> surveys) {\n SurveyListAdapter surveyListAdapter = new SurveyListAdapter(getActivity(), surveys);\n lv_surveys_list.setAdapter(surveyListAdapter);\n lv_surveys_list.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n public void onItemClick(AdapterView<?> adapterView, View view, int position, long l) {\n mListener.loadSurveyQuestion(surveys.get(position), clientId);\n }\n });\n }\n}\n"
|
"public static void main(String[] args) {\n System.out.println(IntMap.getIntIndex(1, (byte) 0));\n System.out.println(IntMap.getIntIndex(2, (byte) 0));\n System.out.println(IntMap.getIntIndex(3, (byte) 0));\n System.out.println(IntMap.getIntIndex(4, (byte) 0));\n System.out.println(IntMap.getIntIndex(5, (byte) 0));\n System.out.println(IntMap.getIntIndex(6, (byte) 0));\n System.out.println(IntMap.getIntIndex(6, (byte) 1));\n System.out.println(IntMap.getIntIndex(6, (byte) 2));\n System.out.println(IntMap.getIntIndex(7, (byte) 0));\n System.out.println(IntMap.getIntIndex(8, (byte) 0));\n System.out.println(IntMap.getIntIndex(9, (byte) 0));\n System.out.println(IntMap.getIntIndex(10, (byte) 0));\n System.out.println(IntMap.getIntIndex(11, (byte) 0));\n System.out.println(IntMap.getIntIndex(12, (byte) 0));\n System.out.println(IntMap.getIntIndex(13, (byte) 0));\n System.out.println(IntMap.getIntIndex(14, (byte) 0));\n System.out.println(IntMap.getIntIndex(15, (byte) 0));\n System.out.println(IntMap.getIntIndex(16, (byte) 0));\n System.out.println(IntMap.getIntIndex(17, (byte) 0));\n System.out.println(IntMap.getIntIndex(17, (byte) 1));\n System.out.println(IntMap.getIntIndex(17, (byte) 2));\n System.out.println(IntMap.getIntIndex(18, (byte) 0));\n System.out.println(IntMap.getIntIndex(18, (byte) 1));\n System.out.println(IntMap.getIntIndex(18, (byte) 2));\n System.out.println(IntMap.getIntIndex(19, (byte) 0));\n System.out.println(IntMap.getIntIndex(20, (byte) 0));\n System.out.println(IntMap.getIntIndex(21, (byte) 0));\n System.out.println(IntMap.getIntIndex(22, (byte) 0));\n System.out.println(IntMap.getIntIndex(23, (byte) 0));\n System.out.println(IntMap.getIntIndex(24, (byte) 0));\n System.out.println(IntMap.getIntIndex(25, (byte) 0));\n System.out.println(IntMap.getIntIndex(26, (byte) 0));\n System.out.println(IntMap.getIntIndex(27, (byte) 0));\n System.out.println(IntMap.getIntIndex(28, (byte) 0));\n System.out.println(IntMap.getIntIndex(29, (byte) 0));\n System.out.println(IntMap.getIntIndex(30, (byte) 0));\n System.out.println(IntMap.getIntIndex(31, (byte) 0));\n System.out.println(IntMap.getIntIndex(32, (byte) 0));\n System.out.println(IntMap.getIntIndex(33, (byte) 0));\n System.out.println(IntMap.getIntIndex(34, (byte) 0));\n System.out.println(IntMap.getIntIndex(35, (byte) 0));\n System.out.println(IntMap.getIntIndex(35, (byte) 1));\n System.out.println(IntMap.getIntIndex(35, (byte) 2));\n System.out.println(IntMap.getIntIndex(35, (byte) 3));\n System.out.println(IntMap.getIntIndex(35, (byte) 4));\n System.out.println(IntMap.getIntIndex(35, (byte) 5));\n System.out.println(IntMap.getIntIndex(35, (byte) 6));\n System.out.println(IntMap.getIntIndex(35, (byte) 7));\n System.out.println(IntMap.getIntIndex(35, (byte) 8));\n System.out.println(IntMap.getIntIndex(35, (byte) 9));\n System.out.println(IntMap.getIntIndex(35, (byte) 10));\n System.out.println(IntMap.getIntIndex(35, (byte) 11));\n System.out.println(IntMap.getIntIndex(35, (byte) 12));\n System.out.println(IntMap.getIntIndex(35, (byte) 13));\n System.out.println(IntMap.getIntIndex(35, (byte) 14));\n System.out.println(IntMap.getIntIndex(35, (byte) 15));\n System.out.println(IntMap.getIntIndex(36, (byte) 0));\n System.out.println(IntMap.getIntIndex(37, (byte) 0));\n System.out.println(IntMap.getIntIndex(38, (byte) 0));\n System.out.println(IntMap.getIntIndex(39, (byte) 0));\n System.out.println(IntMap.getIntIndex(40, (byte) 0));\n System.out.println(IntMap.getIntIndex(41, (byte) 0));\n System.out.println(IntMap.getIntIndex(42, (byte) 0));\n System.out.println(IntMap.getIntIndex(43, (byte) 0));\n System.out.println(IntMap.getIntIndex(44, (byte) 0));\n System.out.println(IntMap.getIntIndex(44, (byte) 1));\n System.out.println(IntMap.getIntIndex(44, (byte) 2));\n System.out.println(IntMap.getIntIndex(44, (byte) 3));\n System.out.println(IntMap.getIntIndex(45, (byte) 0));\n System.out.println(IntMap.getIntIndex(46, (byte) 0));\n System.out.println(IntMap.getIntIndex(47, (byte) 0));\n System.out.println(IntMap.getIntIndex(48, (byte) 0));\n System.out.println(IntMap.getIntIndex(49, (byte) 0));\n System.out.println(IntMap.getIntIndex(50, (byte) 0));\n System.out.println(IntMap.getIntIndex(51, (byte) 0));\n System.out.println(IntMap.getIntIndex(52, (byte) 0));\n System.out.println(IntMap.getIntIndex(53, (byte) 0));\n System.out.println(IntMap.getIntIndex(54, (byte) 0));\n System.out.println(IntMap.getIntIndex(55, (byte) 0));\n System.out.println(IntMap.getIntIndex(56, (byte) 0));\n System.out.println(IntMap.getIntIndex(57, (byte) 0));\n System.out.println(IntMap.getIntIndex(58, (byte) 0));\n System.out.println(IntMap.getIntIndex(59, (byte) 0));\n System.out.println(IntMap.getIntIndex(60, (byte) 0));\n System.out.println(IntMap.getIntIndex(61, (byte) 0));\n System.out.println(IntMap.getIntIndex(62, (byte) 0));\n System.out.println(IntMap.getIntIndex(63, (byte) 0));\n System.out.println(IntMap.getIntIndex(64, (byte) 0));\n System.out.println(IntMap.getIntIndex(65, (byte) 0));\n System.out.println(IntMap.getIntIndex(66, (byte) 0));\n System.out.println(IntMap.getIntIndex(67, (byte) 0));\n System.out.println(IntMap.getIntIndex(68, (byte) 0));\n System.out.println(IntMap.getIntIndex(69, (byte) 0));\n System.out.println(IntMap.getIntIndex(70, (byte) 0));\n System.out.println(IntMap.getIntIndex(71, (byte) 0));\n System.out.println(IntMap.getIntIndex(72, (byte) 0));\n System.out.println(IntMap.getIntIndex(73, (byte) 0));\n System.out.println(IntMap.getIntIndex(74, (byte) 0));\n System.out.println(IntMap.getIntIndex(75, (byte) 0));\n System.out.println(IntMap.getIntIndex(76, (byte) 0));\n System.out.println(IntMap.getIntIndex(77, (byte) 0));\n System.out.println(IntMap.getIntIndex(78, (byte) 0));\n System.out.println(IntMap.getIntIndex(79, (byte) 0));\n System.out.println(IntMap.getIntIndex(80, (byte) 0));\n System.out.println(IntMap.getIntIndex(81, (byte) 0));\n System.out.println(IntMap.getIntIndex(82, (byte) 0));\n System.out.println(IntMap.getIntIndex(83, (byte) 0));\n System.out.println(IntMap.getIntIndex(84, (byte) 0));\n System.out.println(IntMap.getIntIndex(85, (byte) 0));\n System.out.println(IntMap.getIntIndex(86, (byte) 0));\n System.out.println(IntMap.getIntIndex(87, (byte) 0));\n System.out.println(IntMap.getIntIndex(88, (byte) 0));\n System.out.println(IntMap.getIntIndex(89, (byte) 0));\n System.out.println(IntMap.getIntIndex(90, (byte) 0));\n System.out.println(IntMap.getIntIndex(91, (byte) 0));\n System.out.println(IntMap.getIntIndex(92, (byte) 0));\n System.out.println(IntMap.getIntIndex(93, (byte) 0));\n System.out.println(IntMap.getIntIndex(94, (byte) 0));\n System.out.println(IntMap.getIntIndex(95, (byte) 0));\n System.out.println(IntMap.getIntIndex(96, (byte) 0));\n System.out.println(IntMap.getIntIndex(256, (byte) 0));\n System.out.println(IntMap.getIntIndex(257, (byte) 0));\n System.out.println(IntMap.getIntIndex(258, (byte) 0));\n System.out.println(IntMap.getIntIndex(259, (byte) 0));\n System.out.println(IntMap.getIntIndex(260, (byte) 0));\n System.out.println(IntMap.getIntIndex(261, (byte) 0));\n System.out.println(IntMap.getIntIndex(262, (byte) 0));\n System.out.println(IntMap.getIntIndex(263, (byte) 0));\n System.out.println(\"String_Node_Str\");\n System.out.println(IntMap.getIntIndex(263, (byte) 1));\n System.out.println(IntMap.getIntIndex(264, (byte) 0));\n System.out.println(IntMap.getIntIndex(265, (byte) 0));\n System.out.println(IntMap.getIntIndex(266, (byte) 0));\n System.out.println(IntMap.getIntIndex(267, (byte) 0));\n System.out.println(IntMap.getIntIndex(268, (byte) 0));\n System.out.println(IntMap.getIntIndex(269, (byte) 0));\n System.out.println(IntMap.getIntIndex(270, (byte) 0));\n System.out.println(IntMap.getIntIndex(271, (byte) 0));\n System.out.println(IntMap.getIntIndex(272, (byte) 0));\n System.out.println(IntMap.getIntIndex(273, (byte) 0));\n System.out.println(IntMap.getIntIndex(274, (byte) 0));\n System.out.println(IntMap.getIntIndex(275, (byte) 0));\n System.out.println(IntMap.getIntIndex(276, (byte) 0));\n System.out.println(IntMap.getIntIndex(277, (byte) 0));\n System.out.println(IntMap.getIntIndex(278, (byte) 0));\n System.out.println(IntMap.getIntIndex(279, (byte) 0));\n System.out.println(IntMap.getIntIndex(280, (byte) 0));\n System.out.println(IntMap.getIntIndex(281, (byte) 0));\n System.out.println(IntMap.getIntIndex(282, (byte) 0));\n System.out.println(IntMap.getIntIndex(283, (byte) 0));\n System.out.println(IntMap.getIntIndex(284, (byte) 0));\n System.out.println(IntMap.getIntIndex(285, (byte) 0));\n System.out.println(IntMap.getIntIndex(286, (byte) 0));\n System.out.println(IntMap.getIntIndex(287, (byte) 0));\n System.out.println(IntMap.getIntIndex(288, (byte) 0));\n System.out.println(IntMap.getIntIndex(289, (byte) 0));\n System.out.println(IntMap.getIntIndex(290, (byte) 0));\n System.out.println(IntMap.getIntIndex(291, (byte) 0));\n System.out.println(IntMap.getIntIndex(292, (byte) 0));\n System.out.println(IntMap.getIntIndex(293, (byte) 0));\n System.out.println(IntMap.getIntIndex(294, (byte) 0));\n System.out.println(IntMap.getIntIndex(295, (byte) 0));\n System.out.println(IntMap.getIntIndex(296, (byte) 0));\n System.out.println(IntMap.getIntIndex(297, (byte) 0));\n System.out.println(IntMap.getIntIndex(298, (byte) 0));\n System.out.println(IntMap.getIntIndex(299, (byte) 0));\n System.out.println(IntMap.getIntIndex(300, (byte) 0));\n System.out.println(IntMap.getIntIndex(301, (byte) 0));\n System.out.println(IntMap.getIntIndex(302, (byte) 0));\n System.out.println(IntMap.getIntIndex(303, (byte) 0));\n System.out.println(IntMap.getIntIndex(304, (byte) 0));\n System.out.println(IntMap.getIntIndex(305, (byte) 0));\n System.out.println(IntMap.getIntIndex(306, (byte) 0));\n System.out.println(IntMap.getIntIndex(307, (byte) 0));\n System.out.println(IntMap.getIntIndex(308, (byte) 0));\n System.out.println(IntMap.getIntIndex(309, (byte) 0));\n System.out.println(IntMap.getIntIndex(310, (byte) 0));\n System.out.println(IntMap.getIntIndex(311, (byte) 0));\n System.out.println(IntMap.getIntIndex(312, (byte) 0));\n System.out.println(IntMap.getIntIndex(313, (byte) 0));\n System.out.println(IntMap.getIntIndex(314, (byte) 0));\n System.out.println(IntMap.getIntIndex(315, (byte) 0));\n System.out.println(IntMap.getIntIndex(316, (byte) 0));\n System.out.println(IntMap.getIntIndex(317, (byte) 0));\n System.out.println(IntMap.getIntIndex(318, (byte) 0));\n System.out.println(IntMap.getIntIndex(319, (byte) 0));\n System.out.println(IntMap.getIntIndex(320, (byte) 0));\n System.out.println(IntMap.getIntIndex(321, (byte) 0));\n System.out.println(IntMap.getIntIndex(322, (byte) 0));\n System.out.println(IntMap.getIntIndex(323, (byte) 0));\n System.out.println(IntMap.getIntIndex(324, (byte) 0));\n System.out.println(IntMap.getIntIndex(325, (byte) 0));\n System.out.println(IntMap.getIntIndex(326, (byte) 0));\n System.out.println(IntMap.getIntIndex(327, (byte) 0));\n System.out.println(IntMap.getIntIndex(328, (byte) 0));\n System.out.println(IntMap.getIntIndex(329, (byte) 0));\n System.out.println(IntMap.getIntIndex(330, (byte) 0));\n System.out.println(IntMap.getIntIndex(331, (byte) 0));\n System.out.println(IntMap.getIntIndex(332, (byte) 0));\n System.out.println(IntMap.getIntIndex(333, (byte) 0));\n System.out.println(IntMap.getIntIndex(334, (byte) 0));\n System.out.println(IntMap.getIntIndex(335, (byte) 0));\n System.out.println(IntMap.getIntIndex(336, (byte) 0));\n System.out.println(IntMap.getIntIndex(337, (byte) 0));\n System.out.println(IntMap.getIntIndex(338, (byte) 0));\n System.out.println(IntMap.getIntIndex(339, (byte) 0));\n System.out.println(IntMap.getIntIndex(340, (byte) 0));\n System.out.println(IntMap.getIntIndex(341, (byte) 0));\n System.out.println(IntMap.getIntIndex(342, (byte) 0));\n System.out.println(IntMap.getIntIndex(343, (byte) 0));\n System.out.println(IntMap.getIntIndex(344, (byte) 0));\n System.out.println(IntMap.getIntIndex(345, (byte) 0));\n System.out.println(IntMap.getIntIndex(346, (byte) 0));\n System.out.println(IntMap.getIntIndex(347, (byte) 0));\n System.out.println(IntMap.getIntIndex(348, (byte) 0));\n System.out.println(IntMap.getIntIndex(349, (byte) 0));\n System.out.println(IntMap.getIntIndex(350, (byte) 0));\n System.out.println(\"String_Node_Str\");\n System.out.println(IntMap.getIntIndex(351, (byte) 0));\n System.out.println(IntMap.getIntIndex(351, (byte) 1));\n System.out.println(IntMap.getIntIndex(351, (byte) 2));\n System.out.println(IntMap.getIntIndex(351, (byte) 3));\n System.out.println(IntMap.getIntIndex(351, (byte) 4));\n System.out.println(IntMap.getIntIndex(351, (byte) 5));\n System.out.println(IntMap.getIntIndex(351, (byte) 6));\n System.out.println(IntMap.getIntIndex(351, (byte) 7));\n System.out.println(IntMap.getIntIndex(351, (byte) 8));\n System.out.println(IntMap.getIntIndex(351, (byte) 9));\n System.out.println(IntMap.getIntIndex(351, (byte) 10));\n System.out.println(IntMap.getIntIndex(351, (byte) 11));\n System.out.println(IntMap.getIntIndex(351, (byte) 12));\n System.out.println(IntMap.getIntIndex(351, (byte) 13));\n System.out.println(IntMap.getIntIndex(351, (byte) 14));\n System.out.println(IntMap.getIntIndex(351, (byte) 15));\n System.out.println(IntMap.getIntIndex(352, (byte) 0));\n System.out.println(IntMap.getIntIndex(353, (byte) 0));\n System.out.println(IntMap.getIntIndex(354, (byte) 0));\n System.out.println(IntMap.getIntIndex(355, (byte) 0));\n System.out.println(IntMap.getIntIndex(356, (byte) 0));\n System.out.println(IntMap.getIntIndex(357, (byte) 0));\n System.out.println(IntMap.getIntIndex(358, (byte) 0));\n System.out.println(IntMap.getIntIndex(359, (byte) 0));\n System.out.println(IntMap.getIntIndex(2256, (byte) 0));\n System.out.println(IntMap.getIntIndex(3333, (byte) 0));\n System.out.println(\"String_Node_Str\" + Material.values().length + \"String_Node_Str\" + (Material.values().length + 54));\n System.out.println(\"String_Node_Str\" + IntMap.mapSize);\n System.out.println(\"String_Node_Str\" + new MaterialData(351, (byte) 4));\n}\n"
|
"public String getText(Object element) {\n if (!(element instanceof MDMServerDef))\n return \"String_Node_Str\";\n return ((MDMServerDef) element).getDesc();\n}\n"
|
"private static SortedSet<TreeEntry> getSubtree(SortedSet<TreeEntry> tree, String path, boolean recursive) {\n SortedSet<TreeEntry> subTree = new TreeSet<TreeEntry>(tree.comparator());\n for (TreeEntry entry : tree) {\n String[] comps = entry.getName().split(\"String_Node_Str\");\n if (equals(comps, pathComps)) {\n subTree.add(entry);\n } else if (recursive) {\n if (startsWith(comps, pathComps))\n subTree.add(entry);\n } else {\n if (startsWith(comps, pathComps) && comps.length - pathComps.length == 1)\n subTree.add(entry);\n }\n }\n return subTree;\n}\n"
|
"private ResourceBundle getComponentResourceBundle(IComponent currentComp, String source, AbstractComponentsProvider provider) {\n try {\n AbstractComponentsProvider currentProvider = provider;\n if (currentProvider == null) {\n ComponentsProviderManager componentsProviderManager = ComponentsProviderManager.getInstance();\n Collection<AbstractComponentsProvider> providers = componentsProviderManager.getProviders();\n for (AbstractComponentsProvider curProvider : providers) {\n String path = new Path(curProvider.getInstallationFolder().toString()).toPortableString();\n if (source.startsWith(path)) {\n if (cachedPathSource != null) {\n if (path.contains(cachedPathSource)) {\n currentProvider = curProvider;\n break;\n }\n } else {\n currentProvider = curProvider;\n break;\n }\n }\n }\n }\n String installPath = currentProvider.getInstallationFolder().toString();\n String label = ComponentFilesNaming.getInstance().getBundleName(currentComp.getName(), installPath.substring(installPath.lastIndexOf(IComponentsFactory.COMPONENTS_INNER_FOLDER)));\n if (currentProvider.isUseLocalProvider()) {\n ResourceBundle bundle = null;\n IBrandingService brandingService = (IBrandingService) GlobalServiceRegister.getDefault().getService(IBrandingService.class);\n if (brandingService.isPoweredOnlyCamel()) {\n bundle = currentProvider.getResourceBundle(label);\n } else {\n ITisLocalProviderService service = (ITisLocalProviderService) GlobalServiceRegister.getDefault().getService(ITisLocalProviderService.class);\n bundle = service.getResourceBundle(label);\n }\n return bundle;\n } else {\n ResourceBundle bundle = ResourceBundle.getBundle(label, Locale.getDefault(), new ResClassLoader(currentProvider.getClass().getClassLoader()));\n return bundle;\n }\n } catch (IOException e) {\n ExceptionHandler.process(e);\n }\n return null;\n}\n"
|
"public void destroy() {\n if (shouldInitialize && initialized) {\n synchronized (initLock) {\n if (initialized) {\n ((MapLoaderLifecycleSupport) impl).destroy();\n initialized = false;\n }\n }\n }\n}\n"
|
"public static String vsToRef(String url) {\n if (url.equals(\"String_Node_Str\"))\n return \"String_Node_Str\";\n else if (url.equals(\"String_Node_Str\"))\n return \"String_Node_Str\";\n else if (url.equals(\"String_Node_Str\"))\n return \"String_Node_Str\";\n else if (url.equals(\"String_Node_Str\"))\n return \"String_Node_Str\";\n else if (url.equals(\"String_Node_Str\"))\n return \"String_Node_Str\";\n else if (url.equals(\"String_Node_Str\"))\n return \"String_Node_Str\";\n else if (url.equals(\"String_Node_Str\"))\n return \"String_Node_Str\";\n else if (url.equals(\"String_Node_Str\"))\n return \"String_Node_Str\";\n else if (url.equals(\"String_Node_Str\"))\n return \"String_Node_Str\";\n else if (url.equals(\"String_Node_Str\"))\n return \"String_Node_Str\";\n else if (url.equals(\"String_Node_Str\"))\n return \"String_Node_Str\";\n else\n return null;\n}\n"
|
"private IDataExtractionExtension getDataExtractionExtension(IDataExtractionOption option) throws EngineException {\n IDataExtractionExtension dataExtraction = null;\n String extension = option.getExtension();\n ExtensionManager extensionManager = ExtensionManager.getInstance();\n if (extension != null) {\n dataExtraction = extensionManager.createDataExtractionExtensionById(extension);\n if (dataExtraction == null) {\n logger.log(Level.WARNING, \"String_Node_Str\" + extension + \"String_Node_Str\");\n }\n }\n if (dataExtraction == null) {\n String format = option.getOutputFormat();\n if (format != null) {\n dataExtraction = extensionManager.createDataExtractionExtensionByFormat(format);\n if (dataExtraction == null) {\n logger.log(Level.WARNING, \"String_Node_Str\" + format + \"String_Node_Str\");\n }\n }\n }\n if (dataExtraction == null) {\n throw new EngineException(MessageConstants.INVALID_EXTENSION_ERROR);\n }\n return dataExtraction;\n}\n"
|
"public boolean buyShare(String playerName, Portfolio from, String companyName, int shares, int unit) {\n String errMsg = null;\n int price = 0;\n PublicCompanyI company = null;\n currentPlayer = GameManager.getCurrentPlayer();\n while (true) {\n if (!playerName.equals(currentPlayer.getName())) {\n errMsg = \"String_Node_Str\" + playerName;\n break;\n }\n company = companyMgr.getPublicCompany(companyName);\n if (company == null) {\n errMsg = \"String_Node_Str\";\n break;\n }\n if (isSaleRecorded(currentPlayer, company)) {\n errMsg = currentPlayer.getName() + \"String_Node_Str\" + companyName + \"String_Node_Str\";\n break;\n }\n if (!company.hasStarted()) {\n errMsg = \"String_Node_Str\" + companyName + \"String_Node_Str\";\n break;\n }\n if (companyBoughtThisTurn != null && (companyBoughtThisTurn != company || !company.getCurrentPrice().isNoBuyLimit())) {\n errMsg = currentPlayer.getName() + \"String_Node_Str\" + companyBoughtThisTurn.getName() + \"String_Node_Str\";\n break;\n }\n if (shares > from.ownsShare(company)) {\n errMsg = companyName + \"String_Node_Str\";\n break;\n }\n StockSpaceI currentSpace;\n if (from == ipo && company.hasParPrice()) {\n currentSpace = company.getParPrice();\n } else {\n currentSpace = company.getCurrentPrice();\n }\n if (shares > 1 && !currentSpace.isNoBuyLimit()) {\n errMsg = \"String_Node_Str\" + companyName + \"String_Node_Str\";\n break;\n }\n if (!currentSpace.isNoCertLimit() && !currentPlayer.mayBuyCertificate(company, shares)) {\n errMsg = currentPlayer.getName() + \"String_Node_Str\";\n break;\n }\n if (!currentSpace.isNoHoldLimit() && !currentPlayer.mayBuyCompanyShare(company, shares)) {\n errMsg = currentPlayer.getName() + \"String_Node_Str\";\n break;\n }\n price = currentSpace.getPrice();\n if (currentPlayer.getCash() < shares * price) {\n errMsg = currentPlayer.getName() + \"String_Node_Str\";\n break;\n }\n break;\n }\n if (errMsg != null) {\n Log.error(playerName + \"String_Node_Str\" + shares + \"String_Node_Str\" + companyName + \"String_Node_Str\" + from.getName() + \"String_Node_Str\" + errMsg);\n return false;\n }\n PublicCertificateI cert;\n for (int i = 0; i < shares; i++) {\n cert = from.findCertificate(company, false);\n Log.write(playerName + \"String_Node_Str\" + shares + \"String_Node_Str\" + cert.getShare() + \"String_Node_Str\" + companyName + \"String_Node_Str\" + from.getName() + \"String_Node_Str\" + Bank.format(shares * price) + \"String_Node_Str\");\n currentPlayer.buy(cert, price * cert.getShares());\n }\n companyBoughtThisTurn = company;\n hasPassed = false;\n setPriority();\n if (from == ipo)\n company.checkFlotation();\n return true;\n}\n"
|
"public int compareTo(Var other) {\n int c;\n c = this.numStates - other.numStates;\n if (c != 0) {\n return c;\n }\n c = this.type.compareTo(other.type);\n if (c != 0) {\n return c;\n }\n c = this.name.compareTo(other.name);\n if (c != 0) {\n return c;\n }\n if (this.stateNames == null && other.stateNames != null) {\n return -1;\n } else if (this.stateNames != null && other.stateNames == null) {\n return 1;\n } else if (this.stateNames != null && other.stateNames != null) {\n c = this.stateNames.size() - other.stateNames.size();\n if (c != 0) {\n return c;\n }\n }\n return c;\n}\n"
|
"private void _propagatePort(CompositeActor container, IOPort currentPort, Map entityToFiringsPerIteration, Map externalRates, LinkedList remainingActors, LinkedList pendingActors) throws NotSchedulableException, IllegalActionException {\n ComponentEntity currentActor = (ComponentEntity) currentPort.getContainer();\n if (currentPort.isOutput() && currentPort.getContainer() != container) {\n Iterator connectedPorts = currentPort.deepConnectedPortList().iterator();\n while (connectedPorts.hasNext()) {\n IOPort connectedPort = (IOPort) connectedPorts.next();\n if (connectedPort.isOutput() && connectedPort.getContainer() != container) {\n throw new NotSchedulableException(currentPort, connectedPort, \"String_Node_Str\" + \"String_Node_Str\");\n } else if (connectedPort.isInput() && connectedPort.getContainer() == container) {\n throw new NotSchedulableException(currentPort, connectedPort, \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\");\n }\n }\n }\n if (currentPort.isInput() && currentPort.getContainer() == container) {\n Iterator connectedPorts = currentPort.deepInsidePortList().iterator();\n while (connectedPorts.hasNext()) {\n IOPort connectedPort = (IOPort) connectedPorts.next();\n if (connectedPort.isOutput() && connectedPort.getContainer() != container) {\n throw new NotSchedulableException(currentPort, connectedPort, \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\");\n } else if (connectedPort.isInput() && connectedPort.getContainer() == container) {\n throw new NotSchedulableException(currentPort, connectedPort, \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\");\n }\n }\n }\n Director director = (Director) getContainer();\n CompositeActor model = (CompositeActor) director.getContainer();\n int currentRate;\n if (currentActor == model) {\n currentRate = 1;\n } else {\n currentRate = SDFUtilities._getRate(currentPort);\n }\n if (currentRate < 0) {\n throw new NotSchedulableException(currentPort, \"String_Node_Str\" + currentRate);\n }\n Iterator connectedPorts;\n if (currentPort.getContainer() == container) {\n connectedPorts = currentPort.deepInsidePortList().iterator();\n if (_debugging && VERBOSE) {\n _debug(\"String_Node_Str\" + currentPort);\n while (connectedPorts.hasNext()) {\n _debug(connectedPorts.next().toString());\n }\n }\n connectedPorts = currentPort.deepInsidePortList().iterator();\n } else {\n connectedPorts = currentPort.deepConnectedPortList().iterator();\n }\n while (connectedPorts.hasNext()) {\n IOPort connectedPort = (IOPort) connectedPorts.next();\n ComponentEntity connectedActor = (ComponentEntity) connectedPort.getContainer();\n if (_debugging && VERBOSE) {\n _debug(\"String_Node_Str\" + currentPort + \"String_Node_Str\" + connectedActor.getName());\n }\n int connectedRate = SDFUtilities._getRate(connectedPort);\n Fraction currentFiring = (Fraction) entityToFiringsPerIteration.get(currentActor);\n Fraction desiredFiring;\n if ((currentRate == 0) && (connectedRate > 0)) {\n desiredFiring = Fraction.ZERO;\n } else if ((currentRate > 0) && (connectedRate == 0)) {\n currentFiring = Fraction.ZERO;\n entityToFiringsPerIteration.put(currentActor, currentFiring);\n desiredFiring = new Fraction(1);\n } else if ((currentRate == 0) && (connectedRate == 0)) {\n desiredFiring = currentFiring;\n } else {\n desiredFiring = currentFiring.multiply(new Fraction(currentRate, connectedRate));\n }\n Fraction presentFiring = (Fraction) entityToFiringsPerIteration.get(connectedActor);\n if (_debugging && VERBOSE) {\n _debug(\"String_Node_Str\" + connectedActor + \"String_Node_Str\" + presentFiring);\n }\n if (presentFiring == null) {\n entityToFiringsPerIteration.put(connectedActor, desiredFiring);\n Fraction rate = currentFiring.multiply(new Fraction(currentRate, 1));\n Fraction previousRate = (Fraction) externalRates.get(connectedPort);\n if (previousRate.equals(Fraction.ZERO)) {\n externalRates.put(connectedPort, rate);\n } else if (!rate.equals(previousRate)) {\n throw new NotSchedulableException(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + connectedPort.getFullName());\n }\n _propagatePort(container, connectedPort, entityToFiringsPerIteration, externalRates, remainingActors, pendingActors);\n entityToFiringsPerIteration.remove(connectedActor);\n } else if (presentFiring.equals(_minusOne)) {\n entityToFiringsPerIteration.put(connectedActor, desiredFiring);\n remainingActors.remove(connectedActor);\n pendingActors.addLast(connectedActor);\n } else if (!presentFiring.equals(desiredFiring)) {\n throw new NotSchedulableException(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + connectedPort.getFullName());\n }\n if (_debugging && VERBOSE) {\n _debug(\"String_Node_Str\");\n _debug(entityToFiringsPerIteration.toString());\n }\n }\n}\n"
|
"protected VertexScorer<Vertex, Double> getVertexScorer(Graph subgraph, Map<Vertex, Double> vertexPriors) {\n GraphJung<Graph> graphJung = new GraphJung<Graph>(subgraph);\n PageRankWithPriors<Vertex, Edge> pageRank = new PageRank<Vertex, Edge>(graphJung, edgeWeights, alpha);\n return new PRVertexScorer(pageRank, subgraph, iterations);\n}\n"
|
"private void checkVariants(DomainDto domainDto, ValidationResult validationResult) {\n List<VariantDto> variants = domainDto.getVariants();\n if (null == variants) {\n return;\n }\n for (VariantDto variant : variants) {\n checkMaxLength(variant.getIdnTable(), MAX_LENGTH_255, \"String_Node_Str\", validationResult);\n List<String> relations = variant.getRelation();\n if (null != relations) {\n for (String relation : relations) {\n checkMaxLength(relation, MAX_LENGTH_255, \"String_Node_Str\", validationResult);\n }\n }\n List<VariantNameDto> variantNames = variant.getVariantNames();\n if (null != variantNames) {\n for (VariantNameDto variantName : variantNames) {\n checkNotEmptyAndMaxLength(variantName.getLdhName(), MAX_LENGTH_LDHNAME, \"String_Node_Str\", validationResult);\n checkNotEmptyAndMaxLength(variantName.getUnicodeName(), MAX_LENGTH_UNICODENAME, \"String_Node_Str\", validationResult);\n }\n }\n }\n}\n"
|
"synchronized int add(RemoteFileDesc rfd, boolean checkExisting) {\n repOk();\n File incompleteFile = null;\n try {\n incompleteFile = incompleteFileManager.getFile(rfd);\n } catch (IOException ioe) {\n return -1;\n }\n int n = buckets.size();\n Assert.that(incompletes.size() == n, \"String_Node_Str\" + n + \"String_Node_Str\" + incompletes.size());\n for (int i = 0; i < n; i++) {\n File otherIncompleteFile = (File) incompletes.get(i);\n if (otherIncompleteFile.equals(incompleteFile) && hashEquals(rfd.getSHA1Urn(), sha1s[i])) {\n if (sha1s[i] == null && rfd.getSHA1Urn() != null)\n sha1s[i] = rfd.getSHA1Urn();\n List bucket = (List) buckets.get(i);\n if (checkExisting && bucket.contains(rfd))\n return -1;\n if (bucket.size() > MAX_BUCKET_SIZE)\n return -1;\n bucket.add(rfd);\n repOk();\n return 1;\n }\n }\n List bucket = new ArrayList();\n bucket.add(rfd);\n buckets.add(bucket);\n incompletes.add(incompleteFile);\n int p = incompletes.size();\n URN[] newArray = new URN[p];\n System.arraycopy(sha1s, 0, newArray, 0, sha1s.length);\n newArray[p - 1] = rfd.getSHA1Urn();\n sha1s = newArray;\n repOk();\n return 0;\n}\n"
|
"private void startTest() {\n addTower(0, 82, 120, 40);\n addTower(0, 75, 85, 40);\n addTower(0, 125, 105, 40);\n addTower(0, 94, 71, 40);\n changePlayerOfTower(82, 120, 1);\n changePlayerOfTower(75, 85, 1);\n changePlayerOfTower(125, 105, 1);\n changePlayerOfTower(94, 71, 1);\n}\n"
|
"public TemplateModel get(int i) throws TemplateModelException {\n try {\n return new SimpleScalar(firedEntireInputMatcher.group(i));\n } catch (Exception e) {\n throw new _TemplateModelException(e);\n }\n}\n"
|
"public static int computeNonScalarOffset(DataValueModel dvmodel, Class type) {\n int offset = 0;\n DataValueModel dvmodel2 = dvmodel.nestedModel(type);\n Map.Entry<String, FieldModel>[] entries2 = heapSizeOrderedFields(dvmodel2);\n for (Map.Entry<String, ? extends FieldModel> entry2 : entries2) {\n FieldModel model2 = entry2.getValue();\n int add;\n if (dvmodel2.isScalar(model2.type())) {\n add = fieldSize(model2);\n } else {\n add = computeNonScalarOffset(dvmodel2, model2.type());\n if (model2.isArray())\n add *= model2.indexSize().value();\n }\n offset += add;\n }\n return offset;\n}\n"
|
"public static void handleOnCreate(ForeignContent content, ExecutionContext context) {\n try {\n ReportItemDesign textItemDesign = (ReportItemDesign) content.getGenerateBy();\n IDynamicTextInstance text = new DynamicTextInstance(content, context);\n if (handleJS(text, textItemDesign.getOnCreate(), context).didRun())\n return;\n IDynamicTextEventHandler eh = (IDynamicTextEventHandler) getInstance((TextDataHandle) textItemDesign.getHandle());\n if (eh != null)\n eh.onCreate(text, context.getReportContext());\n } catch (Exception e) {\n log.log(Level.WARNING, e.getMessage(), e);\n }\n}\n"
|
"static HttpMethod extractMethod(final HttpServletRequest httpRequest) throws ODataLibraryException {\n try {\n HttpMethod httpRequestMethod = HttpMethod.valueOf(httpRequest.getMethod());\n if (httpRequestMethod == HttpMethod.POST) {\n String xHttpMethod = httpRequest.getHeader(HttpHeader.X_HTTP_METHOD);\n String xHttpMethodOverride = httpRequest.getHeader(HttpHeader.X_HTTP_METHOD_OVERRIDE);\n if (xHttpMethod == null && xHttpMethodOverride == null) {\n return httpRequestMethod;\n } else if (xHttpMethod == null) {\n return HttpMethod.valueOf(xHttpMethodOverride);\n } else if (xHttpMethodOverride == null) {\n return HttpMethod.valueOf(xHttpMethod);\n } else {\n if (!xHttpMethod.equalsIgnoreCase(xHttpMethodOverride)) {\n throw new ODataHandlerException(\"String_Node_Str\", ODataHandlerException.MessageKeys.AMBIGUOUS_XHTTP_METHOD, xHttpMethod, xHttpMethodOverride);\n }\n return HttpMethod.valueOf(xHttpMethod);\n }\n } else {\n return httpRequestMethod;\n }\n } catch (IllegalArgumentException e) {\n throw new ODataHandlerException(\"String_Node_Str\" + httpRequest.getMethod(), e, ODataHandlerException.MessageKeys.INVALID_HTTP_METHOD, httpRequest.getMethod());\n }\n}\n"
|
"private boolean advance(final Consumer<? super String> action, final boolean all) {\n final int digits = digits();\n final String separator = getSeparator();\n if (normalized == null) {\n normalized = new DirectPosition2D();\n }\n boolean found = false;\n try {\n do {\n cell.setRect(gridX, gridY, step, step);\n if (areaOfInterest.intersects(Shapes2D.transform(gridToAOI, cell, cell))) {\n int x = gridX;\n if (x < xCenter) {\n x += step - 1;\n }\n normalized.setOrdinate(0, x);\n normalized.setOrdinate(1, y);\n final String ref = encoder.encode(this, normalized, false, separator, digits);\n if (ref != null) {\n action.accept(ref);\n found = true;\n }\n }\n if ((gridX += step) >= xEnd) {\n gridX = xStart;\n if (encoder.crsZone >= 0) {\n if ((gridY += step) >= yEnd)\n break;\n } else {\n if ((gridY -= step) <= yEnd)\n break;\n }\n }\n } while (all || !found);\n } catch (FactoryException | TransformException e) {\n throw (ArithmeticException) new ArithmeticException(Errors.format(Errors.Keys.OutsideDomainOfValidity)).initCause(e);\n }\n return found;\n}\n"
|
"public final void triggerImpact(int _damage) {\n health -= (int) ((float) _damage * (1 - 0.15 * (float) defence));\n if (health <= 0) {\n triggerDestroyed();\n }\n}\n"
|
"public static List<IComponent> filterNeededComponents(Item item, RepositoryNode seletetedNode, ERepositoryObjectType type) {\n EDatabaseComponentName name = EDatabaseComponentName.getCorrespondingComponentName(item, type);\n List<IComponent> neededComponents = new ArrayList<IComponent>();\n if (name == null) {\n return neededComponents;\n }\n String productNameWanted = filterProductNameWanted(name, item);\n boolean hl7Related = false;\n boolean hl7Output = false;\n if (item instanceof HL7ConnectionItem) {\n hl7Related = true;\n EList list = ((HL7Connection) ((HL7ConnectionItem) item).getConnection()).getRoot();\n if (list != null && list.size() > 0) {\n hl7Output = true;\n }\n }\n MdmConceptType mdmType = null;\n if (item instanceof MDMConnectionItem) {\n MDMConnectionItem mdmItem = (MDMConnectionItem) item;\n if (seletetedNode != null && seletetedNode.getObject() instanceof MetadataTableRepositoryObject) {\n MetadataTableRepositoryObject object = (MetadataTableRepositoryObject) seletetedNode.getObject();\n if (mdmItem.getConnection() instanceof MDMConnection) {\n MDMConnection connection = (MDMConnection) mdmItem.getConnection();\n for (Object obj : connection.getSchemas()) {\n if (obj instanceof Concept && object.getLabel().equals(((Concept) obj).getLabel())) {\n mdmType = ((Concept) obj).getConceptType();\n }\n }\n }\n }\n }\n Set<IComponent> components = ComponentsFactoryProvider.getInstance().getComponents();\n EmfComponent emfComponent = null;\n for (IComponent component : components) {\n if (component instanceof EmfComponent) {\n emfComponent = (EmfComponent) component;\n String componentProductname = emfComponent.getRepositoryType();\n boolean value = true;\n if (type == ERepositoryObjectType.METADATA_CON_TABLE) {\n if (emfComponent.getName().toUpperCase().endsWith(MAP)) {\n value = false;\n }\n }\n if (hl7Output && !component.getName().equals(\"String_Node_Str\")) {\n value = false;\n } else if (hl7Related && !hl7Output && !component.getName().equals(\"String_Node_Str\")) {\n value = false;\n }\n boolean flag = filterComponent(component, name, type);\n if (((componentProductname != null && productNameWanted.endsWith(componentProductname)) && value) || flag) {\n Pattern pattern = Pattern.compile(\"String_Node_Str\", Pattern.CASE_INSENSITIVE);\n if (name.getDBType() != null && pattern.matcher(name.getDBType()).matches() && (emfComponent.getName().equals(\"String_Node_Str\") || emfComponent.getName().equals(\"String_Node_Str\"))) {\n continue;\n }\n if (item instanceof MDMConnectionItem) {\n if (MdmConceptType.INPUT.equals(mdmType) && emfComponent.getName().endsWith(INPUT)) {\n neededComponents.add(emfComponent);\n } else if (MdmConceptType.OUTPUT.equals(mdmType) && emfComponent.getName().endsWith(OUTPUT)) {\n neededComponents.add(emfComponent);\n } else if (MdmConceptType.RECEIVE.equals(mdmType) && emfComponent.getName().endsWith(RECEIVE)) {\n neededComponents.add(emfComponent);\n }\n } else {\n neededComponents.add(emfComponent);\n }\n }\n }\n }\n return sortFilteredComponnents(item, seletetedNode, type, neededComponents);\n}\n"
|
"public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) {\n String eventKey = ((ListElement) ((ListViewAdapter) adapterView.getAdapter()).getItem(position)).getKey();\n if (!eventKey.equals(\"String_Node_Str\")) {\n startActivity(ViewTeamActivity.newInstance(getActivity(), eventKey));\n }\n}\n"
|
"protected void atFieldAssign(Expr expr, int op, ASTree left, ASTree right, boolean doDup) throws CompileError {\n CtField f = fieldAccess(left, false);\n boolean is_static = resultStatic;\n if (op != '=' && !is_static)\n bytecode.addOpcode(DUP);\n int fi;\n if (op == '=') {\n FieldInfo finfo = f.getFieldInfo2();\n setFieldType(finfo);\n AccessorMaker maker = isAccessibleField(f, finfo);\n if (maker == null)\n fi = addFieldrefInfo(f, finfo);\n else\n fi = 0;\n } else\n fi = atFieldRead(f, is_static);\n int fType = exprType;\n int fDim = arrayDim;\n String cname = className;\n atAssignCore(expr, op, right, fType, fDim, cname);\n boolean is2w = is2word(fType, fDim);\n if (doDup) {\n int dup_code;\n if (is_static)\n dup_code = (is2w ? DUP2 : DUP);\n else\n dup_code = (is2w ? DUP2_X1 : DUP_X1);\n bytecode.addOpcode(dup_code);\n }\n atFieldAssignCore(f, is_static, fi, is2w);\n exprType = fType;\n arrayDim = fDim;\n className = cname;\n}\n"
|
"public void execute(Runnable command) {\n super.execute(WrappedRunnable.wrap(LOG, command));\n}\n"
|
"public PmphGroup addEditorSelcetionGroup(String sessionId, List<PmphGroupMember> list, Long textbookId) throws CheckedServiceException {\n PmphUser pmphUser = SessionUtil.getPmphUserBySessionId(sessionId);\n if (null == pmphUser || null == pmphUser.getId()) {\n throw new CheckedServiceException(CheckedExceptionBusiness.GROUP, CheckedExceptionResult.NULL_PARAM, \"String_Node_Str\");\n }\n if (list.size() == 0) {\n throw new CheckedServiceException(CheckedExceptionBusiness.GROUP, CheckedExceptionResult.NULL_PARAM, \"String_Node_Str\");\n }\n Textbook textbook = textbookService.getTextbookById(textbookId);\n list.get(0).setTextbookId(textbookId);\n list.get(0).setMaterialId(textbook.getMaterialId());\n String groupImage = RouteUtil.DEFAULT_GROUP_IMAGE;\n PmphGroup pmphGroup = new PmphGroup();\n if (ObjectUtil.isNull(pmphGroupDao.getPmphGroupByGroupName(textbook.getTextbookName()))) {\n pmphGroup.setGroupName(textbook.getTextbookName());\n } else {\n Long count = pmphGroupDao.getPmphGroupCount();\n pmphGroup.setGroupName(textbook.getTextbookName() + count);\n }\n pmphGroup.setGroupImage(groupImage);\n pmphGroup.setBookId(textbookId);\n pmphGroup.setFounderId(pmphUser.getId());\n pmphGroupDao.addPmphGroup(pmphGroup);\n if (null != pmphGroup.getId()) {\n PmphGroupMember pmphGroupMember = new PmphGroupMember();\n pmphGroupMember.setGroupId(pmphGroup.getId());\n pmphGroupMember.setIsFounder(true);\n pmphGroupMember.setUserId(pmphUser.getId());\n pmphGroupMember.setDisplayName(pmphUser.getRealname());\n pmphGroupMemberService.addPmphGroupMember(pmphGroupMember);\n pmphGroupMemberService.addPmphGroupMemberOnGroup(pmphGroup.getId(), list, sessionId);\n } else {\n throw new CheckedServiceException(CheckedExceptionBusiness.GROUP, CheckedExceptionResult.OBJECT_NOT_FOUND, \"String_Node_Str\");\n }\n return pmphGroup;\n}\n"
|
"private static boolean isParentInDesign(Param<?> p, Map<String, String> sample) throws InPUTException {\n Element parent = p.getParentElement();\n if (parent.isRootElement())\n return true;\n boolean flag = false;\n if (parent instanceof SParam || parent instanceof NParam) {\n if (SpotDesignInitializer.isStructuralArrayType(parent) && p instanceof SChoice) {\n String compl, choiceNumber;\n for (int j = 1; j <= ((SParam) parent).getDimensions()[0]; j++) {\n compl = p.getParamId() + \"String_Node_Str\" + j;\n choiceNumber = sample.get(compl);\n if (isRelevantComplexChoice((SChoice) p, sample, (SParam) parent, compl, choiceNumber)) {\n flag = true;\n break;\n }\n }\n } else\n flag = isParentInDesign((Param<?>) parent, sample);\n } else if (parent instanceof SChoice) {\n flag = checkChoice(sample, parent, flag);\n }\n return flag;\n}\n"
|
"public void manageSyntheticAccessIfNecessary(BlockScope currentScope) {\n if (binding.alwaysNeedsAccessMethod()) {\n syntheticAccessor = binding.getAccessMethod(true);\n return;\n }\n if (binding.isPrivate() && (currentScope.enclosingSourceType() != binding.declaringClass)) {\n if (currentScope.environment().options.isPrivateConstructorAccessChangingVisibility) {\n binding.tagForClearingPrivateModifier();\n } else {\n syntheticAccessor = ((SourceTypeBinding) binding.declaringClass).addSyntheticMethod(binding);\n currentScope.problemReporter().needToEmulateMethodAccess(binding, this);\n }\n }\n}\n"
|
"public static void init(Config config) {\n if (defaultInstance != null) {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n synchronized (initLock) {\n if (defaultInstance != null) {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n defaultInstance = com.hazelcast.impl.FactoryImpl.newHazelcastInstanceProxy(config);\n }\n}\n"
|
"public List<Camera> getCameras() throws CameraException {\n if (!cameraList.isEmpty()) {\n return cameraList;\n }\n try {\n cameraService.setAllCamerasInactive();\n } catch (ServiceException e) {\n LOGGER.debug(\"String_Node_Str\", e);\n }\n cameraGphotoList = new ArrayList<>();\n cameraModelList = new ArrayList<>();\n cameraPortList = new ArrayList<>();\n cameraList = new ArrayList<>();\n int count = 0;\n final CameraList cl = new CameraList();\n try {\n LOGGER.debug(\"String_Node_Str\" + cl);\n count = cl.getCount();\n Camera camera;\n for (int i = 0; i < count; i++) {\n cameraGphotoList.add(new CameraGphoto());\n Pointer pInfo = cl.getPortInfo(i);\n cameraPortList.add(cl.getPort(i));\n cameraModelList.add(cl.getModel(i));\n LOGGER.debug(\"String_Node_Str\" + pInfo.toString());\n cameraGphotoList.get(i).setPortInfo(cl.getPortPath(cl.getPort(i, true)));\n cameraGphotoList.get(i).initialize();\n cameraGphotoList.get(i).ref();\n try {\n camera = new Camera(-1, \"String_Node_Str\" + i, cameraPortList.get(i), cameraModelList.get(i), \"String_Node_Str\" + i);\n camera = cameraService.cameraExists(camera);\n if (camera == null) {\n camera = new Camera(-1, \"String_Node_Str\" + i, cameraPortList.get(i), cameraModelList.get(i), \"String_Node_Str\" + i);\n cameraService.createCamera(camera);\n }\n cameraService.setCameraActive(camera.getId());\n cameraList.add(camera);\n } catch (ServiceException ex) {\n LOGGER.error(\"String_Node_Str\", ex);\n throw new CameraException(ex.getMessage(), -1);\n }\n }\n } finally {\n CameraUtils.closeQuietly(cl);\n }\n return cameraList;\n}\n"
|
"private static byte[] readBytes(List<MPIBuffer> buffers, int length) {\n byte[] bytes = new byte[length];\n int currentRead = 0;\n int index = 0;\n while (currentRead < length) {\n ByteBuffer byteBuffer = buffers.get(index).getByteBuffer();\n int remaining = byteBuffer.remaining();\n int needRead = length - currentRead;\n int canRead = remaining > needRead ? needRead : remaining;\n byteBuffer.get(bytes, currentRead, canRead);\n currentRead += canRead;\n index++;\n if (currentRead < length && index >= buffers.size()) {\n throw new RuntimeException(\"String_Node_Str\");\n }\n }\n return bytes;\n}\n"
|
"public void setPrimaryClip(ClipData clip, String callingPackage) {\n synchronized (this) {\n if (clip != null && clip.getItemCount() <= 0) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n final int callingUid = Binder.getCallingUid();\n if (mAppOps.noteOp(AppOpsManager.OP_WRITE_CLIPBOARD, callingUid, callingPackage) != AppOpsManager.MODE_ALLOWED) {\n return;\n }\n checkDataOwnerLocked(clip, Binder.getCallingUid());\n clearActiveOwnersLocked();\n PerUserClipboard clipboard = getClipboard();\n clipboard.primaryClip = clip;\n final int n = clipboard.primaryClipListeners.beginBroadcast();\n for (int i = 0; i < n; i++) {\n try {\n ListenerInfo li = (ListenerInfo) clipboard.primaryClipListeners.getBroadcastCookie(i);\n if (mAppOps.checkOpNoThrow(AppOpsManager.OP_READ_CLIPBOARD, li.mUid, li.mPackageName) == AppOpsManager.MODE_ALLOWED) {\n clipboard.primaryClipListeners.getBroadcastItem(i).dispatchPrimaryClipChanged();\n }\n } catch (RemoteException e) {\n }\n }\n clipboard.primaryClipListeners.finishBroadcast();\n }\n}\n"
|
"private void freeze(int time) {\n if (!frozen) {\n frozen = true;\n timer = new Timer();\n int delay = DELAY;\n if (time == DAY) {\n delay = DELAY_DAY;\n } else if (time == NIGHT) {\n delay = DELAY_NIGHT;\n }\n timer.schedule(new TimeFreezer(this, time), 0, delay);\n player.addMessage(\"String_Node_Str\");\n }\n}\n"
|
"protected void openConnection() throws UnknownHostException, IOException {\n Log.d(BLUE, \"String_Node_Str\");\n BluetoothDevice device = findBluetoothDevice();\n if (Build.VERSION.SDK_INT < 9) {\n try {\n bluetoothSocket = device.createRfcommSocketToServiceRecord(UUID.fromString(UUID_SPP_DEVICE));\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n } else {\n Method BTSocketMethod = null;\n try {\n BTSocketMethod = device.getClass().getMethod(\"String_Node_Str\", new Class[] { UUID.class });\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n }\n try {\n bluetoothSocket = (BluetoothSocket) BTSocketMethod.invoke(device, (UUID) UUID.fromString(UUID_SPP_DEVICE));\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n } catch (InvocationTargetException e) {\n e.printStackTrace();\n }\n }\n mBluetoothAdapter.cancelDiscovery();\n bluetoothSocket.connect();\n out = bluetoothSocket.getOutputStream();\n in = bluetoothSocket.getInputStream();\n}\n"
|
"void init(int width) {\n if (width > 0) {\n mTicks = new int[width * 2];\n } else {\n mTicks = null;\n }\n mNumTicks = 0;\n mLastBin = 0;\n}\n"
|
"private List<MissionItem> getSublistToRotateUp() {\n int from = itens.indexOf(selection.get(0));\n int to = from;\n do {\n if (itens.size() < to + 2)\n return itens.subList(0, 0);\n }\n return itens.subList(from, to + 1);\n}\n"
|
"public void init(NutConfig config, ActionInfo ai) throws Throwable {\n method = ai.getMethod();\n moduleType = ai.getModuleType();\n if (Strings.isBlank(ai.getInjectName())) {\n moduleObj = Mirror.me(moduleType).born();\n } else {\n injectName = ai.getInjectName();\n}\n"
|
"public void initFromPipe(Class<? extends Pipe> pipeClass) {\n capacity = LIQUID_IN_PIPE;\n flowRate = fluidCapacities.get(pipeClass);\n travelDelay = MathUtils.clamp(Math.round(16F / (flowRate / BuildCraftTransport.pipeFluidsBaseFlowRate)), 1, MAX_TRAVEL_DELAY);\n}\n"
|
"public int[] createSegmentTree(int[] input) {\n NextPowerOf2 np2 = new NextPowerOf2();\n int nextPowOfTwo = np2.nextPowerOf2(input.length);\n int[] segmentTree = new int[nextPowOfTwo * 2 - 1];\n for (int i = 0; i < segmentTree.length; i++) {\n segmentTree[i] = Integer.MAX_VALUE;\n }\n constructMinSegmentTree(segmentTree, input, 0, input.length - 1, 0);\n return segmentTree;\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.