content
stringlengths
40
137k
"public List readData(final String tableName, Class clazz, EntityMetadata m, final Object rowKey, List<String> relationNames, String... columns) throws IOException {\n List output = null;\n Object entity = null;\n HTableInterface hTable = null;\n hTable = gethTable(tableName);\n if (getFilter(tableName) ...
"public void cloneOldRoleTO(RoleTO roleTO) {\n oldRole = new RoleTO();\n oldRole.setId(roleTO.getId());\n oldRole.setName(new String(roleTO.getName()));\n oldRole.setParent(new Long(roleTO.getParent()));\n List<AttributeTO> attributes = new ArrayList<AttributeTO>();\n AttributeTO attributeTO;\n Lis...
"private void doStartup(PlatformConfig config) throws BirtException {\n if (frameworkClassLoader != null) {\n logger.log(Level.WARNING, \"String_Node_Str\");\n return;\n }\n platformConfig = config;\n IPlatformContext context = config.getPlatformContext();\n if (context == null) {\n ...
"public static void beginDelayedTransition(final ViewGroup sceneRoot, Transition transition) {\n if (!sPendingTransitions.contains(sceneRoot) && sceneRoot.hasLayout()) {\n if (Transition.DBG) {\n Log.d(LOG_TAG, \"String_Node_Str\" + sceneRoot + \"String_Node_Str\" + transition);\n }\n ...
"private static DefaultFeatureType worldMetropolis(final DefaultFeatureType metropolis, final DefaultFeatureType universityCity, final DefaultAttributeType<?> temperature, final Class<?> regionType) {\n return new DefaultFeatureType(name(\"String_Node_Str\"), false, new DefaultFeatureType[] { metropolis, universityC...
"protected void internalTransform(Body b, String phaseName, Map options) {\n ReachableMethods reachableMethods = Scene.v().getReachableMethods();\n SootMethod method = b.getMethod();\n if (reachableMethods.contains(method))\n return;\n JimpleBody body = (JimpleBody) method.getActiveBody();\n Patch...
"public void searchForOtherClusters(SplitBrainHandler splitBrainHandler) {\n final Collection<Address> colPossibleAddresses;\n try {\n colPossibleAddresses = getPossibleAddresses();\n } catch (Throwable e) {\n logger.log(Level.SEVERE, e.getMessage(), e);\n return;\n }\n colPossibleAd...
"public void setUp() throws Exception {\n this.createTestMetadata();\n server = new Server(7070);\n ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS);\n context.setContextPath(\"String_Node_Str\");\n server.setHandler(context);\n configA = KylinConfig.getInstanc...
"public void computeDerivatives(final double t, final double[] z, final double[] zDot) throws DerivativeException {\n System.arraycopy(z, 0, y, 0, n);\n ode.computeDerivatives(t, y, yDot);\n ode.computeJacobians(t, y, yDot, dFdY, dFdP);\n System.arraycopy(yDot, 0, zDot, 0, n);\n for (int i = 0; i < n; ++...
"public static String executeRsyncAgents(boolean hasCompression) 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<Strin...
"protected Visit getVisitResult(Iterable<Pair<SkyKey, SkyKey>> keys) throws InterruptedException {\n Collection<SkyKey> filteredKeys = new ArrayList<>();\n Map<SkyKey, Collection<SkyKey>> reverseDepsMap = Maps.newHashMap();\n for (DepAndRdep depAndRdep : depAndRdeps) {\n if (depAndRdep.dep == null && va...
"private void buildProcess() {\n process = new Process(property);\n process.getContextManager().getListContext().addAll(node.getProcess().getContextManager().getListContext());\n process.getContextManager().setDefaultContext(this.selectContext);\n outputComponent = ComponentsFactoryProvider.getInstance().ge...
"public Set<K> keySet(Predicate predicate) {\n Set<K> result = new HashSet<K>();\n Set<Map.Entry<K, V>> entries = super.entrySet();\n for (Map.Entry<K, V> entry : entries) {\n if (apply(predicate, entry)) {\n result.add(entry.getKey());\n }\n }\n return result;\n}\n"
"public Transaction addSign(Transaction tx, String addr, String password) throws Exception {\n if (tx.sigs == null) {\n tx.sigs = new Sig[0];\n }\n Sig[] sigs = new Sig[tx.sigs.length + 1];\n for (int i = 0; i < tx.sigs.length; i++) {\n sigs[i] = tx.sigs[i];\n }\n sigs[tx.sigs.length] = ...
"public void onEventMainThread(UploadService.UploadMediaSuccessEvent event) {\n if (event.mediaModelList != null && !event.mediaModelList.isEmpty()) {\n UploadUtils.onMediaUploadedSnackbarHandler(this, findViewById(R.id.tab_layout), false, event.mediaModelList, event.successMessage);\n }\n}\n"
"private void replaceValsRec(GlobalConstants consts, Continuation cont, Map<Block, Congruences> congruences, InitState init) {\n InitState contInit = init.enterContinuation(cont);\n List<InitState> branchInits = new ArrayList<InitState>();\n for (Block contBlock : cont.getBlocks()) {\n InitState branchI...
"private Collection createDynamicSelectionChoices(String pattern, String dataSetName, String labelStmt, String valueStmt, String dataType, int limit, boolean fixedOrder, boolean isDistinct, String sortDirection, String sortBy) {\n boolean sortDirectionValue = \"String_Node_Str\".equalsIgnoreCase(sortDirection);\n ...
"private void rewriteServiceNames(Deploy deploy, List<File> referencedFiles, String csarName) throws WSDLException, FileNotFoundException {\n WSDLFactory factory = WSDLFactory.newInstance();\n WSDLReader reader = factory.newWSDLReader();\n WSDLWriter writer = factory.newWSDLWriter();\n List<TInvoke> invokes...
"public void changeTask(Notification notification) {\n ((ITaskChangeListener) task).changeTask(notification);\n if (notification.getNotifier() instanceof Axis) {\n getParentTask().updateTree();\n }\n}\n"
"public void setAvatarUrl(String url) {\n if (url != null) {\n this.avatarUrl = url;\n }\n}\n"
"public void run() {\n setName(\"String_Node_Str\");\n log(\"String_Node_Str\");\n try {\n while (true) {\n Thread.sleep(random.nextInt(100 * Country.RandomCargoPeriodSecs));\n Cargo recurrent = Cargo.getRandomCargo();\n Country.getInstance().deliverCargoToAppropriateSta...
"public Page<T> readByExample(final Pageable pageable, final Sort sort, final T... examples) {\n Assert.notNull(pageable, \"String_Node_Str\");\n if (null == examples || examples.length == 0) {\n return readAll(pageable, sort);\n }\n Criteria countCriteria = prepareCriteria(examples);\n countCrite...
"public <T> T call(Callable<T> callable, CallArgs args) throws Exception {\n String stage = MDC.get(Constants.MDC_STAGE_KEY);\n if (stage == null) {\n return delegate.call(callable);\n }\n MDC.remove(Constants.MDC_STAGE_KEY);\n try {\n return delegate.call(callable, args);\n } finally {\...
"public static List getAllowedTypes() {\n if (allowedTypes != null)\n return allowedTypes;\n allowedTypes = new ArrayList();\n Iterator iter = MetaDataDictionary.getInstance().getPropertyTypes().iterator();\n while (iter.hasNext()) {\n PropertyType propType = (PropertyType) iter.next();\n ...
"private void welcomeCmdPreview(Context ctx) {\n onGuildMemberJoin(new GuildMemberJoinEvent(ctx.jda, ctx.event.getResponseNumber(), ctx.member));\n}\n"
"public void setColumnFloat(float columnFloat) {\n realmSetter$columnFloat(columnFloat);\n}\n"
"protected Process launch(CommandLine command, Map env, File dir) throws IOException {\n String cmdWorkingDirAbsolutePath = FilenameUtils.getFullPathNoEndSeparator(dir.getAbsolutePath());\n String executable = command.getExecutable();\n File commandFile = new File(dir.getCanonicalFile(), executable);\n bool...
"protected void writeArguments(MethodWriter writer, IValue receiver, ArgumentList arguments) throws BytecodeException {\n if (receiver != null && !receiver.isIgnoredClassAccess() && this.hasModifier(Modifiers.INFIX) && !this.parameters.isEmpty()) {\n arguments.writeValues(writer, this.parameters, 1);\n ...
"public void metaContactMoved(MetaContactMovedEvent evt) {\n Element metaContactNode = findMetaContactNode(evt.getSourceMetaContact().getMetaUID());\n Element newParentNode = findMetaContactGroupNode(evt.getNewParent().getMetaUID());\n if (metaContactNode == null) {\n logger.error(\"String_Node_Str\" + ...
"private static CharSequence recreateView(String text, int caret, int selectionLength, boolean hasFocus, Highlighter... highlighters) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"String_Node_Str\");\n ColorModel colorModel = new ColorModel(text.length());\n for (Highlighter highlighter : highli...
"public String getRequestUrl(String baseUri, boolean includeServletPath) {\n final String servletPath = includeServletPath ? delegate.getServletPath() : \"String_Node_Str\";\n final String pathInfo = delegate.getPathInfo() == null ? \"String_Node_Str\" : delegate.getPathInfo();\n return baseUri == null ? deleg...
"public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {\n Element element;\n if (namespaceURI == null) {\n element = document.createElement(qName);\n } else {\n element = document.createElementNS(namespaceURI, qName);\n }\n node ...
"private List<String> resolveClasspathEntries(IClasspathEntry[] classpathEntries, boolean needExported) {\n ArrayList<String> newClassPath = new ArrayList<String>();\n IWorkspace space = ResourcesPlugin.getWorkspace();\n IWorkspaceRoot root = space.getRoot();\n for (int i = 0; i < classpathEntries.length; i...
"void incActiveServices() {\n if (mCommonProcess != this) {\n mCommonProcess.incActiveServices(serviceName);\n }\n mNumActiveServices++;\n}\n"
"private void sendWorklog() {\n try {\n sendWorkLogButton.setEnabled(false);\n worklogListModel.sendWorklog();\n } finally {\n sendWorkLogButton.setEnabled(true);\n }\n}\n"
"public String getAsHtml() throws OseeCoreException {\n BranchQuery query = OrcsApplication.getOrcsApi().getQueryFactory(null).branchQuery();\n ResultSet<BranchReadable> results = query.andIsOfType(BranchType.BASELINE, BranchType.WORKING).getResults();\n HtmlWriter writer = new HtmlWriter(uriInfo);\n return...
"private static void getModulesInTable(final IProcess process, IElementParameter curParam, List<ModuleNeeded> modulesNeeded) {\n if (!(curParam.getValue() instanceof List)) {\n return;\n }\n List<Map<String, Object>> values = (List<Map<String, Object>>) curParam.getValue();\n if (values != null && !v...
"void warning(int pos, InputBuffer input, int code, String errorArg1, String errorArg2, String errorArg3) {\n if (first_pass || (enabledMap.containsKey(code) && !enabledMap.get(code)) || ignorableFile(input) || (pos == 0))\n return;\n CodeLocation loc = new CodeLocation();\n loc.pos = pos;\n loc.inpu...
"public Result execute(Result result, int arg1) throws KettleException {\n result.setNrErrors(0);\n Log4jFileAppender appender = null;\n String logFileName = \"String_Node_Str\" + this.getName();\n try {\n appender = LogWriter.createFileAppender(logFileName, false, false);\n LogWriter.getInsta...
"public void connectionRemoved(Connection connection) {\n LifecycleServiceImpl lifecycleService = (LifecycleServiceImpl) node.factory.getLifecycleService();\n if (connection.equals(this.conn) && !lifecycleService.paused.get()) {\n destroyEndpointThreads();\n rollbackTransactions();\n removeEn...
"public static CodeBlock.Builder getContentValuesStatement(String elementName, BaseColumnAccess columnAccess, String columnName, TypeName elementTypeName, boolean isModelContainerAdapter) {\n String statement = columnAccess.getColumnAccessString(elementTypeName, elementName, isModelContainerAdapter, ModelUtils.getVa...
"protected void checkStateServer() {\n if (!isValid()) {\n counter = 1;\n return;\n }\n counter--;\n if (counter > 0) {\n return;\n }\n counter = 20;\n TileEntity tileEntity = worldObj.getTileEntity(monitorX, monitorY, monitorZ);\n if (!EnergyTools.isEnergyTE(tileEntity)) {\...
"public Boolean handleDrop(final IRepositoryNode targetNode) {\n boolean result = Boolean.FALSE;\n RepositoryWorkUnit<Object> repositoryWorkUnit = new RepositoryWorkUnit<Object>(\"String_Node_Str\", this) {\n protected void run() throws LoginException, PersistenceException {\n String[] pathBefor...
"public void getCurrentVel(Vector3d vel, Vector3d dvel) {\n if (myNodes != null) {\n double[] coords = myCoords.getBuffer();\n vel.setZero();\n for (int i = 0; i < myNodes.length; i++) {\n vel.scaledAdd(coords[i], myNodes[i].getVelocity(), vel);\n }\n if (dvel != null) {...
"public void loadRoles(final GwtProject project, final String userName) {\n this.showLoadingStatusBar();\n currentState.setProjectName(project.getName());\n currentState.setCaseName(project.getCases().getName());\n currentState.setProjectInspectionStatus(null);\n if (project.getInspectionStatus() != null...
"public float getPollData() {\n int data = ((int) mouseData[index + 3] << 24) | ((int) mouseData[index + 2] << 16) | ((int) mouseData[index + 1] << 8) | ((int) mouseData[index]);\n return (float) data;\n}\n"
"private static void test4() throws Exception {\n ClfDataSet dataSet = TRECFormat.loadClfDataSet(new File(DATASETS, \"String_Node_Str\"), DataSetType.CLF_SPARSE, true);\n ClfDataSet testSet = TRECFormat.loadClfDataSet(new File(DATASETS, \"String_Node_Str\"), DataSetType.CLF_SPARSE, true);\n System.out.println(...
"public void testInvokingWithGoldTier() throws Exception {\n applicationNameGold = APPLICATION_NAME + TIER_GOLD;\n apiStoreClientUser1.addApplication(applicationNameGold, APIMIntegrationConstants.APPLICATION_TIER.UNLIMITED, \"String_Node_Str\", \"String_Node_Str\");\n apiCreationRequestBean = new APICreationRe...
"public int length() {\n return indices.length;\n}\n"
"public void visitReturn(SSAReturnInstruction instruction) {\n breakBasicBlock(index);\n}\n"
"private Map getParsedParameters(IViewerReportDesignHandle design, InputOptions options, Map parameters) throws ReportServiceException {\n Locale locale = (Locale) options.getOption(InputOptions.OPT_LOCALE);\n Collection parameterList = getParameterDefinitions(design, options);\n Map paramMap = new HashMap();\...
"private Object parseItem(PageDefinition pgdef, NodeInfo parent, Element el, AnnotationHelper annHelper, boolean bNativeContent, ParsingState parsingState) throws Exception {\n final String nm = el.getLocalName();\n final Namespace ns = el.getNamespace();\n final String pref = ns != null ? ns.getPrefix() : \"S...
"private void addTypedParameter(Type type, String parameter, UpdateClause clause) {\n if (type != null) {\n if (typedParameter == null) {\n typedParameter = new TypedParameter(type);\n }\n if (typedParameter.getType().equals(type)) {\n typedParameter.addParameters(parameter...
"public void handle(Long timerID) {\n JsonObject json = new JsonObject().putString(\"String_Node_Str\", \"String_Node_Str\");\n try {\n _sendTextFrame(json);\n } catch (IllegalActionException e) {\n _exception = e;\n }\n}\n"
"public static int launch(String path) throws IOException {\n path = path.toLowerCase();\n if (!path.endsWith(\"String_Node_Str\") && !path.endsWith(\"String_Node_Str\") && !path.endsWith(\"String_Node_Str\") && !path.endsWith(\"String_Node_Str\") && !path.endsWith(\"String_Node_Str\") && !path.endsWith(\"String_...
"public void initialize() {\n SettingsManager settings = SettingsManager.instance();\n int port = settings.getPort();\n this.acceptor = new Acceptor(port, callback);\n this.manager = createConnectionManager();\n this.catcher = createHostCatcher();\n this.downloader = new DownloadManager();\n this.u...
"public void appendContactFilterAsNestedQuery(StringBuilder sb, String filterParam) {\n sb.append(\"String_Node_Str\" + \"String_Node_Str\" + RawContacts.CONTACT_ID + \"String_Node_Str\" + Tables.RAW_CONTACTS + \"String_Node_Str\" + Tables.NAME_LOOKUP + \"String_Node_Str\" + RawContactsColumns.CONCRETE_ID + \"String...
"public View getChildView(int groupPosition, final int childPosition, boolean isLastChild, View convertView, ViewGroup parent) {\n final SingleItemModel children = (SingleItemModel) getChild(groupPosition, childPosition);\n if (convertView == null) {\n convertView = inflater.inflate(R.layout.stats_list_cel...
"protected void loadLang() {\n if (FMLLaunchHandler.side() == Side.CLIENT) {\n try {\n loadClientLang();\n return;\n } catch (Throwable t) {\n _log.error(AbstractLogger.CATCHING_MARKER, \"String_Node_Str\", t);\n }\n }\n String path = \"String_Node_Str\" + ...
"public boolean isInheritAttributes() {\n return isBooleanAsCharacter(inheritAttributes);\n}\n"
"public void openSerialPort(String port, int speed) {\n this.serialport = port;\n this.serialspeed = speed;\n openSerialPort();\n}\n"
"public String buildHTTPQuery(HttpServletRequest request) {\n String querystring = \"String_Node_Str\";\n HashMap queryHash = buildQueryHash(request);\n Iterator i = queryHash.keySet().iterator();\n while (i.hasNext()) {\n String key = (String) i.next();\n String value = (String) queryHash.get...
"public void AddGuest(String[] args, User user) {\n Block pointedAt = ((Player) user.getHandle()).getTargetBlock(null, 4);\n ProtectedBlock block;\n if (args.length == 2) {\n if ((block = BenCmd.getProtections().getProtection(BenCmd.getProtections().getProtection(pointedAt.getLocation()))) != null) {\n ...
"public void testAbsolutePathChangeLog() throws Exception {\n if (database == null) {\n return;\n }\n Enumeration<URL> urls = new JUnitFileOpener().getResources(includedChangeLog);\n URL completeChangeLogURL = urls.nextElement();\n String absolutePathOfChangeLog = completeChangeLogURL.toExternalFo...
"protected void onListItemClick(ListView l, View v, int position, long id) {\n super.onListItemClick(l, v, position, id);\n final ScanResult result = mAdapter.getItem(position);\n if (result != null) {\n final Keygen keygen = mWifiMatcher.getKeygen(result);\n if (keygen != null && (result.capabil...
"public DataSetViewData[] populateAllOutputColumns(DataSetHandle dataSetHandle, DataRequestSession session) throws BirtException {\n try {\n DataService.getInstance().registerSession(dataSetHandle, session);\n IResultMetaData metaData = session.getDataSetMetaData(dataSetHandle, false);\n if (met...
"private void doLayout_tmp(IDisplayServer xs, Chart cm, Bounds boFull, RunTimeContext rtc) throws ChartException {\n final boolean isRightToLeft = rtc.isRightToLeft();\n Block bl = cm.getBlock();\n bl.setBounds(boFull);\n Insets ins = bl.getInsets();\n Bounds bo = boFull.adjustedInstance(ins);\n Legen...
"private void importSchemaFromFile(String fileName) throws Exception {\n InputSource source = null;\n Pattern httpUrl = Pattern.compile(\"String_Node_Str\");\n Matcher match = httpUrl.matcher(fileName);\n if (match.matches()) {\n URL url = new URL(fileName);\n String urlContent = IOUtils.toStr...
"private int proxyReturnInt(final EventId eventId) {\n final long startTime = Time.currentTimeMillis();\n return readInt(sendEvent(startTime, eventId, VOID_PARAMETERS), startTime);\n}\n"
"private void addSession(final MetaDataSession session) throws SQLCannotConnectException {\n if (_allSessions.contains(session)) {\n return;\n try {\n session.getMetaData();\n session.setAutoCommit(true);\n } catch (SQLCannotConnectException e) {\n SQLExplorerPlugin.error(e);\n ...
"protected void setServerInput() {\n if (serversToUpdate == null) {\n serversToUpdate = new ArrayList<ExternalToolLaunchCommandsServer>();\n }\n serversViewer.setInput(serversToUpdate.toArray());\n serversViewer.setExpandedElements(serversToUpdate.toArray());\n setServiceCommandInput(null);\n s...
"public double getUpperLon(int stNum) {\n if (profileData != null && profileList.containsKey((Integer) stNum)) {\n return profileList.get(stNum).getLatLon().getLongitude();\n } else {\n return Invalid_Value;\n }\n}\n"
"public ItemStack getNextItemStack() {\n return inventory.size() > 0 ? inventory.remove(0).getItemStack() : null;\n}\n"
"public boolean IsNoService() {\n return errorClass == TerminologyServiceErrorClass.NOSERVICE;\n}\n"
"public NewCRFBean toNewCRF(javax.sql.DataSource ds, ResourceBundle resPageMsg) throws IOException, CRFReadingException {\n String dbName = SQLInitServlet.getDBName();\n NewCRFBean ncrf = new NewCRFBean(ds, crfId);\n ncrf.setCrfId(crfId);\n StringBuffer buf = new StringBuffer();\n HSSFWorkbook wb = new H...
"public void found(int x, int y, int z, VoxelData start) {\n boolean[] badPaths = new boolean[paths.length];\n badPathCount = 0;\n for (int i = 0; i < paths.length; i++) {\n if (canIgnore(i, x, y, z)) {\n return;\n }\n escaped = true;\n paths[i].init(pos, grid.getWidth(),...
"private void shareEntry(long id) {\n Cursor note = mDbHelper.fetchNote(id);\n startManagingCursor(note);\n byte[] blob = note.getBlob(note.getColumnIndexOrThrow(NotesDbAdapter.KEY_DATA));\n if (blob != null) {\n try {\n NoteUtils.shareImage(this, blob);\n } catch (IOException e) {\...
"public void setProperty(String name, Base value) throws FHIRException {\n if (name.equals(\"String_Node_Str\"))\n this.author = castToType(value);\n else if (name.equals(\"String_Node_Str\"))\n this.time = castToDateTime(value);\n else if (name.equals(\"String_Node_Str\"))\n this.text = c...
"public void setName(String name) {\n this.name = name == null ? \"String_Node_Str\" : name;\n}\n"
"public boolean addSeedToStorage(ItemStack stack) {\n return this.tile.addStackToInventory(stack);\n}\n"
"public static void sideCheck(PipeEventItem.SideCheck event) {\n for (EnumFacing side : EnumFacing.VALUES) {\n if (!event.isAllowed(side)) {\n continue;\n }\n IPipe neighbour = event.holder.getNeighbouringPipe(side);\n if (neighbour == null) {\n continue;\n }\...
"public float[] generateTransformedValuesBubble(List<? extends Entry> entries, float phaseX, float phaseY, int from, int to) {\n final int count = (int) Math.ceil(to - from) * 2;\n float[] valuePoints = new float[count];\n for (int j = 0; j < count; j += 2) {\n Entry e = entries.get(j / 2 + from);\n ...
"public void onCreateOptionsMenu(final Menu menu, final MenuInflater inflater) {\n final String metadataUri = MetadataDbHelper.getMetadataUriAsString(getActivity(), mClientId);\n if (!TextUtils.isEmpty(metadataUri)) {\n mUpdateNowMenu = menu.add(Menu.NONE, MENU_UPDATE_NOW, 0, R.string.check_for_updates_now...
"public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException {\n System.out.println(\"String_Node_Str\");\n if (!MODE_TRACE_EXPLORE.equals(mode)) {\n throw new CoreException(new Status(IStatus.ERROR, TLCActivator.PLUGIN_ID, \"String_Nod...
"public BundleEntry getEntry(String path) {\n BundleEntry be = super.getEntry(path);\n if (be == null && !generation.getRevision().getSymbolicName().endsWith(\"String_Node_Str\")) {\n if (path.endsWith(\"String_Node_Str\")) {\n if (path.startsWith(\"String_Node_Str\")) {\n path = ...
"private void internalTick(double value) {\n pos = (pos + 1) % precise;\n double oldValue = data[pos];\n data[pos] = value;\n if (pos == 0) {\n averageRaw = 0;\n for (double iValue : data) {\n averageRaw += iValue;\n }\n } else {\n averageRaw = averageRaw - oldValue...
"public void mouseClicked() {\n int action = world.mousePressed(mouseX, mouseY);\n switch(action) {\n case 1:\n change = true;\n nextScreen = new World(this);\n break;\n default:\n break;\n }\n}\n"
"private void insertData(File file, DataAccess data, Document dbTable) throws IOException, DatabaseTableInconsistencyException {\n HashMap<Column, Object> entry = data.toDatabaseEntryList();\n if (data.isInconsistent()) {\n throw new DatabaseTableInconsistencyException(\"String_Node_Str\");\n }\n Ele...
"public void actionPerformed(ActionEvent e) {\n if (((JCheckBox) e.getSource()).isSelected()) {\n compare_count = swap_count = 0;\n DefaultMutableTreeNode r = deepCopyTree(root, (DefaultMutableTreeNode) root.clone());\n sortTree3(r);\n System.out.format(\"String_Node_Str\", compare_count)...
"protected GitModelObject[] getChildrenImpl() {\n TreeWalk tw = createTreeWalk();\n List<GitModelObject> result = new ArrayList<GitModelObject>();\n try {\n RevTree actualTree = baseCommit.getTree();\n int actualNth = tw.addTree(actualTree);\n int baseNth = -1;\n if (baseCommit != n...
"public static void main(String[] args) {\n String dir = \"String_Node_Str\";\n StereoParameters param = BoofMiscOps.loadXML(dir + \"String_Node_Str\");\n boolean leftHanded = true;\n BufferedImage origLeft = UtilImageIO.loadImage(dir + \"String_Node_Str\");\n BufferedImage origRight = UtilImageIO.loadIm...
"protected IContentEmitter createContentEmitter() throws EngineException {\n String format = executionContext.getOutputFormat();\n if (\"String_Node_Str\".equalsIgnoreCase(format)) {\n bodyOnly = false;\n } else {\n bodyOnly = true;\n }\n ExtensionManager extManager = ExtensionManager.getIn...
"protected static List<String> chop(ChatColor color, String longLine, int length) {\n List<String> result = new ArrayList<String>();\n int i = 0;\n for (i = 0; i < longLine.length(); i += length) {\n int endIndex = Math.min(i + length, longLine.length());\n String line = longLine.substring(i, end...
"private static ParameterGroupDefinition convertParameterGroup(IParameterGroupDefn engineParam, IGetParameterDefinitionTask task) {\n boolean cascade = engineParam instanceof ICascadingParameterGroup;\n ParameterGroupDefinition paramGroup = new ParameterGroupDefinition(engineParam.getName(), engineParam.getDispla...
"public boolean isInUseableZone(Game game, MageObject source, GameEvent event) {\n if (zone.equals(Zone.COMMAND)) {\n if (this.getSourceId() == null) {\n return true;\n }\n MageObject object = game.getObject(this.getSourceId());\n if (object != null && object instanceof Emblem)...
"protected void deleteTable(TableNode tableItem) {\n Collection<MetadataTable> tables = new ArrayList<MetadataTable>();\n Iterator<MetadataTable> iterate = ConnectionHelper.getTables(getConnection()).iterator();\n while (iterate.hasNext()) {\n MetadataTable metadata = iterate.next();\n if (metada...
"public void mouseClicked(MouseEvent e) {\n if (DesktopManager.isRightMouseButton(e)) {\n JPopupMenu popupMenu = new JPopupMenu();\n popupMenu.add(ActionManager.getActionInstance(com.mucommander.ui.action.ToggleCommandBarAction.class, mainFrame));\n popupMenu.add(ActionManager.getActionInstance(...
"public SkyValue compute(SkyKey skyKey, Environment env) throws WorkspaceFileFunctionException, InterruptedException {\n WorkspaceFileKey key = (WorkspaceFileKey) skyKey.argument();\n RootedPath workspaceRoot = key.getPath();\n WorkspaceASTValue workspaceASTValue = (WorkspaceASTValue) env.getValue(WorkspaceAST...
"public void setPrimaryResultSetName(String resultSetName) {\n primaryResultSetName = resultSetName == null ? null : (resultSetName.trim().length() == 0 ? null : resultSetName);\n}\n"
"private void updateInputElementAttrsToReportParam(InputElementAttributes elementAttrs, InputElementAttributes cachedElementAttrs, ScalarParameterHandle reportParam, OdaDataSetHandle setHandle) throws SemanticException {\n if (elementAttrs == null)\n return;\n String defaultValue = elementAttrs.getDefaultS...