content
stringlengths
40
137k
"public void onDestroy() {\n Log.d(TAG, \"String_Node_Str\");\n stopSearchingForUriBeacons();\n mMdnsUrlDiscoverer.stopScanning();\n unregisterReceiver(mScreenStateBroadcastReceiver);\n mUrlToUrlMetadata = new HashMap<>();\n mNotificationManager.cancelAll();\n}\n"
"public boolean isReadable(Class type, Type genericType, Annotation[] annotations, MediaType mediaType) {\n AMFMapper mapper = AMFMapperIntrospector.getAMFMapper(type, genericType);\n if (mapper instanceof CustomAMFMapper) {\n return type.isAssignableFrom(((CustomAMFMapper) mapper).getJaxbClass());\n } ...
"protected IStatus runImpl(IProgressMonitor monitor) throws Exception {\n IResource resource = ((this.project == null) ? this.model : this.project);\n this.pvdbFile = getContext().getPreviewVdb(resource);\n if (this.pvdbFile.exists() && !this.pvdbFile.getLocation().toFile().exists()) {\n this.pvdbFile.d...
"private void testFactTableSaveAndLoad2(IDocumentManager documentManager) throws IOException, BirtException {\n Dimension[] dimensions = new Dimension[3];\n String[] levelNames = new String[3];\n levelNames[0] = \"String_Node_Str\";\n levelNames[1] = \"String_Node_Str\";\n levelNames[2] = \"String_Node_S...
"public static Animator createCircularReveal(View view, int centerX, int centerY, float startRadius, float endRadius) {\n if (!(view.getParent() instanceof RevealAnimator)) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n RevealAnimator revealLayout = (RevealAnimator) view.getParent();...
"public final String getCtx(final HttpServletRequest request) {\n final String ret;\n if (prefix == null) {\n try {\n String encoding = request.getCharacterEncoding();\n if (StringUtils.isBlank(encoding)) {\n encoding = this.defaultEncoding;\n }\n ...
"public static Point getTopLeftPoint(MapPosition mapPosition, Dimension canvasDimension) {\n LatLong centerPoint = mapPosition.latLong;\n byte zoomLevel = mapPosition.zoomLevel;\n int halfCanvasWidth = canvasDimension.width / 2;\n int halfCanvasHeight = canvasDimension.height / 2;\n double pixelX = Math....
"protected void createTable() {\n if (concept == null) {\n return;\n }\n if (metadataTable == null) {\n metadataTable = ConnectionFactory.eINSTANCE.createMetadataTable();\n IProxyRepositoryFactory factory = ProxyRepositoryFactory.getInstance();\n metadataTable.setId(factory.getNextI...
"private TemplateModel dealWithRangeKey(TemplateModel targetModel, Range range, Environment env) throws TemplateException {\n int start = EvaluationUtil.getNumber(range.left, env).intValue();\n int end = 0;\n boolean hasRhs = range.hasRhs();\n if (hasRhs) {\n end = EvaluationUtil.getNumber(range.righ...
"public BitmapIndexCursor getCursor(int key, long maxValue) {\n if (key >= keyCount) {\n updateKeyCount();\n }\n if (key == 0 && unindexedNullCount > 0) {\n nullCursor.nullCount = unindexedNullCount;\n nullCursor.of(key, maxValue);\n return nullCursor;\n }\n if (key < keyCount...
"private void addParticleDetail(XSDSchema xsdSchema, XSDParticle xsdParticle, ATreeNode parentNode, String currentPath) throws OdaException {\n XSDTerm xsdTerm = xsdParticle.getTerm();\n if (xsdTerm instanceof XSDElementDeclaration) {\n XSDElementDeclaration xsdElementDeclarationParticle = (XSDElementDecla...
"protected String toAmbiguousInjectString() {\n if (alternatives.length == 1) {\n return alternatives[0].toAmbiguousInjectString();\n } else if (selectedIndex != -1) {\n return alternatives[selectedIndex].toAmbiguousInjectString();\n } else {\n List<InjectionPlan<?>> alts = new ArrayList<>...
"private void setNodeCapabilityProperty(FlowExecutionContext context, LocationResourceTemplate locationResourceTemplate, NodeTemplate nodeTemplate, String capabilityName, DeploymentMatchingConfiguration matchingConfiguration) throws ConstraintViolationException, ConstraintValueDoNotMatchPropertyTypeException {\n Cap...
"protected void initializeProperties() {\n WebArtifactUtil.setContextParamValue(properties, BIRT_RESOURCE_FOLDER_SETTING, txtResourceFolder.getText());\n WebArtifactUtil.setContextParamValue(properties, BIRT_WORKING_FOLDER_SETTING, txtWorkingFolder.getText());\n WebArtifactUtil.setContextParamValue(properties,...
"void restartServer(String serverVM, String serverVersion, String serverHost, String interfacesToListenOn, int serverPort, String fullDbDirPath) throws Exception {\n stopServer(serverVM, serverVersion, serverHost, serverPort);\n startServer(serverVM, serverVersion, serverHost, interfacesToListenOn, serverPort, db...
"public void onSandCannon(EntityChangeBlockEvent event) {\n BukkitEntity entity = new BukkitEntity(event.getEntity());\n if (manager.isPlotWorld(entity) && event.getEntityType().equals(EntityType.FALLING_BLOCK)) {\n if (event.getTo().equals(Material.AIR)) {\n entity.setMetadata(\"String_Node_Str...
"public ServerResponse<User> getUserInfo(HttpSession session) {\n User user = (User) session.getAttribute(Const.CURRENT_USER);\n if (user != null) {\n return ServerResponse.createBySuccess(user);\n }\n return iUserService.getUserInfo(currentUser.getId());\n}\n"
"protected void setStyleName(String styleClass, IContent content) {\n StringBuffer classBuffer = new StringBuffer();\n if (enableMetadata) {\n String metadataStyleClass = metadataEmitter.getMetadataStyleClass(content);\n if (null != metadataStyleClass) {\n classBuffer.append(metadataStyle...
"public void addPredicate(int key, Vector<XPathExpression> xpe) {\n predicates.put(DataUtil.integer(key), xpe);\n}\n"
"public ChangesResult getChanges() {\n final URI uri = uriBuilder.query(\"String_Node_Str\", \"String_Node_Str\").build();\n return dbc.get(uri, ChangesResult.class);\n}\n"
"public int getMajorVersion() {\n return 1;\n}\n"
"public Object get(int index) {\n RangeCheck(index);\n if (index / cacheSize != this.currentCacheNo) {\n try {\n saveToDisk();\n } catch (DataException e) {\n e.printStackTrace();\n }\n this.currentCacheNo = index / CACHESIZE;\n try {\n loadFromD...
"public static HDFSConnectionBean convert2HDFSConnectionBean(HDFSConnection connection) {\n ContextType contextType = null;\n if (connection.isContextMode()) {\n contextType = ConnectionContextHelper.getContextTypeForContextMode(connection);\n }\n HDFSConnectionBean bean = new HDFSConnectionBean();\n...
"private void initSelectionElements() {\n boolean createValues = (values == null) || (values.length == 0);\n if (createValues) {\n values = new String[keys.length];\n for (int i = 0; i < keys.length; i++) {\n values[i] = translator.translate(keys[i]);\n }\n }\n String[] items...
"public void inventoryChangeAcknowledge(InventoryChangeAcknowledgedRequest event, EntityRef entity) {\n AbstractMoveItemRequest removedRequest = pendingMoves.remove(event.getChangeId());\n if (removedRequest != null) {\n destroyClientTempEntities(removedRequest);\n }\n recalculatePredictedState();\n}...
"public IType resolve(MarkerList markers, IContext context) {\n if (this.theClass != null) {\n return this;\n }\n IClass iclass;\n if (this.fullName != null) {\n iclass = Package.rootPackage.resolveClass(this.fullName);\n } else {\n iclass = context.resolveClass(this.qualifiedName);\...
"public void close() throws OdaException {\n logger.logp(java.util.logging.Level.FINEST, Connection.class.getName(), \"String_Node_Str\", \"String_Node_Str\");\n if (jdbcConn == null) {\n return;\n }\n try {\n if (this.appContext != null && jdbcConn != null) {\n Object option = this...
"public void endContainer(IContent content, boolean finished, IContentEmitter emitter, boolean visible) {\n if (content != null && visible) {\n ContentEmitterUtil.endContent(content, emitter);\n }\n}\n"
"public void cleanupAndDelete(Owner owner, boolean revokeCerts) {\n log.info(\"String_Node_Str\", owner);\n List<String> ids = ownerCurator.getConsumerUuids(owner.getKey()).list();\n List<Consumer> consumers = consumerCurator.lockAndLoadBatch(ids);\n for (Consumer c : consumers) {\n log.info(\"String...
"protected Void doInBackground(Void... params) {\n Loggi.i(\"String_Node_Str\" + intent);\n mayBeCleanDB();\n final String extraAction = intent.getStringExtra(CommonMusicAppReceiver.EXTRA_ACTION);\n if (extraAction == null || extraAction.lastIndexOf('.') == -1) {\n Loggi.e(\"String_Node_Str\");\n ...
"public static void applyScript(String scriptText, Connection aConnection) throws Exception {\n String[] commandsTexts = scriptText.split(EAS_SQL_SCRIPT_DELIMITER);\n aConnection.setAutoCommit(false);\n if (commandsTexts != null) {\n boolean autoCommit = aConnection.getAutoCommit();\n try {\n ...
"private boolean doProcess(String idOfComponent, String appId, String instanceId) {\n ParentComponent component;\n Map<String, Group> groups;\n Map<String, ClusterDataHolder> clusterData;\n if (log.isDebugEnabled()) {\n log.debug(\"String_Node_Str\" + \"String_Node_Str\" + idOfComponent + \"String_No...
"private ClassLoader setupClassLoader(String serverURL) {\n ModulePluginList list = ModuleUtils.fetchPluginJars(serverURL);\n List<URL> urls = new ArrayList<URL>();\n if (list == null) {\n logger.warning(\"String_Node_Str\" + \"String_Node_Str\");\n return getClass().getClassLoader();\n }\n ...
"public static void main(String[] args) {\n RegressionModelCUBIC model = new RegressionModelCUBIC();\n SemanticModule semMod = model.getSemanticModule();\n semMod.start();\n ArrayList<BehaviourManager> storage = new ArrayList<BehaviourManager>();\n for (int i = 0; i < 100; i++) {\n RampedHalfAndHa...
"protected Vector computeGradient(Vector point) throws NonSmoothFunctionException {\n return subProblemObjectiveFunction.getGradient(point).add(point.sub(consensusVariables).add(lagrangeMultipliers.div(penaltyParameter)).mult(penaltyParameter));\n}\n"
"public void notifyUser(int userId, Date upTo, boolean emailEnabled, MailConfig mailConfig) {\n Date lastSent = queries.lastEmailSent(userId);\n User user = userRepository.findById(userId);\n Date fromDate = ObjectUtils.firstNonNull(lastSent, DateUtils.addDays(upTo, -1));\n List<Event> events = user.getSkip...
"protected void addPages() {\n masterPage = new ConnnectionInfoPage(this, \"String_Node_Str\", \"String_Node_Str\");\n try {\n addPage(masterPage);\n } catch (PartInitException e) {\n MessageBoxExceptionHandler.process(e);\n }\n}\n"
"public static void disableWalkthrough(Activity activity) {\n WalkthroughStep ws = new WalkthroughStep(true);\n DBAccessor dba = new DBAccessor(activity);\n dba.updateWalkthrough(ws);\n}\n"
"public IContent execute() {\n if (!executed) {\n executed = true;\n try {\n if (offset != -1) {\n generateUniqueID();\n content = reader.loadContent(offset);\n content.setGenerateBy(design);\n instanceId = content.getInstanceID();\...
"public void endElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord, Object collection) {\n if (unmarshalRecord.isNil() && unmarshalRecord.getXMLReader().isNullRepresentedByXsiNil(xmlCompositeCollectionMapping.getNullPolicy()) && (unmarshalRecord.getChildRecord() == null)) {\n if (unmarshalRe...
"public Iterator<T> iterator() {\n final Iterator<? extends T> it = set.iterator();\n return new Iterator<T>() {\n public boolean hasNext() {\n return it.hasNext();\n }\n public T next() {\n return it.next();\n }\n public void remove() {\n throw ...
"public IWarhead getModule(ItemStack stack) {\n IWarhead warhead = WarheadCasings.get(stack).buildModule(stack);\n if (warhead != null && stack.getTagCompound() != null) {\n warhead.load(stack.getTagCompound());\n }\n return warhead;\n}\n"
"public List<String> getSchemaNames(final String kind) {\n final List<String> schemaNames = new ArrayList<String>();\n try {\n final List<SchemaTO> userSchemas = Arrays.asList(restTemplate.getForObject(baseURL + \"String_Node_Str\" + kind + \"String_Node_Str\", SchemaTO[].class));\n for (SchemaTO sc...
"public boolean execute(Player plr, String... args) {\n if (!PlayerFunctions.isInPlot(plr)) {\n PlayerFunctions.sendMessage(plr, C.NOT_IN_PLOT);\n return false;\n }\n Plot plot = PlayerFunctions.getCurrentPlot(plr);\n if (!plot.hasRights(plr) && !plr.hasPermission(\"String_Node_Str\")) {\n ...
"public void add(double value) {\n if (Double.isInfinite(value) && !allowInfinite) {\n throw new RuntimeException(\"String_Node_Str\");\n }\n if (Double.isNaN(value) && !allowNaN) {\n throw new RuntimeException(\"String_Node_Str\");\n }\n if (!isMoveValid(value)) {\n if (logger.isWar...
"public void taskLoop() throws InterruptedException {\n while (!shouldStop) {\n int seq_start = taskReadySeq.get();\n List<String> paths = null;\n paths = getTaskList();\n if (paths == null) {\n LOG.warn(\"String_Node_Str\" + watcher.splitLogZNode + \"String_Node_Str\");\n ...
"public <T> String toString(T obj) throws ReflectiveOperationException {\n if (null == obj) {\n return \"String_Node_Str\";\n }\n Class<T> type = (Class<T>) obj.getClass();\n String typeName = obj.getClass().getCanonicalName();\n if (typeName.equals(\"String_Node_Str\")) {\n return obj.toSt...
"public String getBaseOwner() {\n if (baseOwner == null) {\n baseOwner = owner;\n }\n return baseOwner;\n}\n"
"public static ConsoleProxyClientStatsCollector getStatsCollector() {\n synchronized (connectionMap) {\n return new ConsoleProxyClientStatsCollector(connectionMap);\n }\n}\n"
"public void echoLong() throws ParseException {\n Invocation invocation = new Invocation(\"String_Node_Str\");\n invocation.setParameter(\"String_Node_Str\", \"String_Node_Str\");\n Operation op = xrService.getOperation(invocation.getName());\n Object result = op.invoke(xrService, invocation);\n assertNo...
"public List<String> getTables(String schema) throws VerdictException {\n List<String> tables = new ArrayList<String>();\n List<Row> rows = getTablesInDataFrame(schema).collectAsList();\n for (Row row : rows) {\n String table = row.getString(1);\n tables.add(table);\n }\n return tables;\n}\...
"private final Map<UUID, Tokenization> tokenizationIdToTokenizationMap() {\n final Map<UUID, Tokenization> toRet = new HashMap<>();\n List<Sentence> stList = new ArrayList<>(this.sentIdToSentenceMap.values());\n for (Sentence st : stList) {\n Tokenization tok = st.getTokenization();\n UUID tId = ...
"public Color getColor(Color parentColor) {\n if (mode.equals(Mode.CUSTOM) && customColor != null) {\n return customColor;\n }\n return customColor;\n}\n"
"protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n NextcloudTalkApplication.getSharedApplication().getComponentApplication().inject(this);\n requestWindowFeature(Window.FEATURE_NO_TITLE);\n getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN | View.SYST...
"private long openPartition(int partitionIndex, int columnBase, boolean last) {\n try {\n Path path = partitionPathGenerator.generate(this, partitionIndex);\n final long partitionSize;\n if (ff.exists(path)) {\n path.chopZ();\n if (last) {\n partitionSize = t...
"protected void fillDebugInfo(Element element, Node node) {\n if (!context.isDebug())\n return;\n Token token = null;\n while (token == null && node != null) {\n token = sourceMiner.findToken(node);\n node = node.parent();\n }\n if (token == null)\n return;\n int lineNumber...
"public final void process(final Class<?> clazz, EntityMetadata metadata) {\n if (clazz != null) {\n metadata.setIndexName(clazz.getSimpleName());\n }\n Index idx = clazz.getAnnotation(Index.class);\n IndexCollection indexes = clazz.getAnnotation(IndexCollection.class);\n List<String> columnsNameT...
"public void match(PactRecord value1, PactRecord value2, Collector out) throws Exception {\n IntPair partAndSupplierKey = value1.getField(0, this.partAndSupplierKey);\n PactString supplyCostStr = value1.getField(1, this.supplyCostStr);\n Tuple ordersValue = value2.getField(1, this.ordersValue);\n PactIntege...
"public boolean isStackValidForSlot(int slot, ItemStack itemstack) {\n if (itemstack == null) {\n return true;\n }\n if (slot == SLOT_OUTLET) {\n return BRRegistry.getDataForFuel(itemstack) != null;\n } else if (slot == SLOT_INLET) {\n return BRRegistry.getDataForWaste(itemstack) != nul...
"public default double[] colMeans() {\n int m = nrows();\n int n = ncols();\n double[] x = new double[n];\n ;\n for (int j = 0; j < n; j++) {\n for (int i = 0; i < m; i++) {\n x[j] += get(i, j);\n }\n x[j] /= m;\n }\n return x;\n}\n"
"public void run() {\n ISelection selection = this.getSelection();\n boolean onlyDeleteReportFile = true;\n for (Object obj : ((IStructuredSelection) selection).toArray()) {\n if (obj instanceof RepositoryNode) {\n RepositoryNode node = (RepositoryNode) obj;\n if (node instanceof R...
"public void readFromPacket(DatagramPacket packet) {\n ByteArrayInputStream bis = new ByteArrayInputStream(packet.getData(), 0, packet.getLength());\n DataInputStream dis = new DataInputStream(bis);\n try {\n readData(dis);\n } catch (IOException e) {\n e.printStackTrace();\n }\n}\n"
"public CacheResult fetchImpl(RuleKey ruleKey, LazyPath output, HttpArtifactCacheEvent.Finished.Builder eventBuilder) throws IOException {\n BuckCacheFetchRequest fetchRequest = new BuckCacheFetchRequest();\n BuckCacheRequest cacheRequest = new BuckCacheRequest();\n cacheRequest.setType(BuckCacheRequestType.FE...
"private static ArrayList<ColumnDefinition> getColumnDefinitions(Element element) {\n List<VariableElement> variableElements = ElementFilter.fieldsIn(element.getEnclosedElements());\n ArrayList<ColumnDefinition> columns = new ArrayList<>();\n for (VariableElement variableElement : variableElements) {\n ...
"public Set<CFGNode> getImmediatelyNestedNodesInTrueControlFlow() {\n Set<CFGNode> nestedNodes = new LinkedHashSet<CFGNode>();\n AbstractStatement abstractStatement = getStatement();\n if (abstractStatement instanceof CompositeStatementObject) {\n Set<AbstractStatement> nestedStatements = new LinkedHash...
"private void startJoin() {\n logger.finest(\"String_Node_Str\");\n lock.lock();\n try {\n try {\n joinInProgress = true;\n node.getPartitionService().pauseMigration();\n final Collection<MemberImpl> members = getMemberList();\n final Collection<MemberInfo> me...
"public final void testAsyncServiceLifecycle() throws InterruptedException {\n ExecutorService executor = Executors.newSingleThreadExecutor();\n final CountDownLatch startLatch = new CountDownLatch(1);\n final CountDownLatch stopLatch = new CountDownLatch(1);\n AsyncService service = new AsyncService(execut...
"public Vertex getVertexFor(Object value, CascadeType cascade, Map<String, Object> objectsBeingUpdated) {\n if (containedClass.isInstance(value)) {\n Vertex returned = getIdVertexFor(containedClass.cast(value), allowIdGeneration);\n if (returned == null) {\n doUpdate(containedClass.cast(valu...
"private static InputStream getInputStream(AbstractFile file) throws IOException {\n AbstractFile backup;\n FileURL test;\n test = (FileURL) file.getURL().clone();\n test.setPath(test.getPath() + BACKUP_SUFFIX);\n backup = FileFactory.getFile(test);\n if (backup != null && backup.exists() && (file.get...
"protected Hashtable buildFieldTypes() {\n Hashtable fieldTypeMapping;\n fieldTypeMapping = new Hashtable();\n fieldTypeMapping.put(Boolean.class, new FieldTypeDefinition(\"String_Node_Str\", false));\n fieldTypeMapping.put(Integer.class, new FieldTypeDefinition(\"String_Node_Str\", false));\n fieldTypeM...
"public ChannelConfig createChannel(ChannelConfig configuration) {\n logger.info(\"String_Node_Str\", configuration);\n channelValidator.validate(configuration, null, false);\n channelConfigDao.upsert(configuration);\n notify(configuration, null);\n TagWebhook.updateTagWebhooksDoToChannelConfigChange(con...
"protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_pull_to_zoom_scroll_view);\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n scrollView = (PullToZoomScrollViewEx) findViewById(R.id.scroll_view);\n scrollView.getPullRo...
"public void combine(Iterator<PactRecord> records, Collector out) throws Exception {\n int sum = 0;\n PactRecord record = new PactRecord();\n while (records.hasNext()) {\n record = records.next();\n combineValue = record.getField(1, combineValue);\n sum += Integer.parseInt(combineValue.toS...
"public CharSequence getSummary() {\n final CharSequence baseSummary = super.getSummary();\n if (TextUtils.isEmpty(baseSummary))\n return baseSummary;\n else\n return String.format(baseSummary.toString(), getEntry());\n}\n"
"private boolean addDefineRowToTable(XhtmlNode t, ConceptDefinitionComponent c, int i, boolean comment, boolean deprecated, Map<ConceptMap, String> maps) {\n boolean hasExtensions = false;\n XhtmlNode tr = t.addTag(\"String_Node_Str\");\n XhtmlNode td = tr.addTag(\"String_Node_Str\");\n String s = Utilities...
"public void basicTimeoutTest() throws Exception {\n final SettableFuture<Void> serverConnection1Open = SettableFuture.create();\n final SettableFuture<Void> clientConnection1Open = SettableFuture.create();\n final SettableFuture<Void> serverConnection1Closed = SettableFuture.create();\n final SettableFutur...
"public final void hit(float strength) {\n if (health >= 0) {\n health -= strength * 0.1f;\n if (health <= 0) {\n this.kill();\n } else {\n strategy.gotHitEvent();\n }\n }\n}\n"
"String isLinked(Node node1, Node node2){\n\tif (node1 != null || node2.isFather(node1)){\n\t\twhile (node1.getType == Cast){\n\t\t\tnode1 = node1.getCast();\n\t\t}\n\t\twhile (node2.getType == Cast){\n\t\t\tnode2 = node2.getCast();\n\t\t}\n\t\treturn node1.isLinked(node2);\n\t}\n\treturn false;\n}\n"
"public void clickTrigger(NPCRightClickEvent event) {\n if (!event.getNPC().hasTrait(TriggerTrait.class))\n return;\n dNPC npc = DenizenAPI.getDenizenNPC(event.getNPC());\n if (!npc.getTriggerTrait().isEnabled(name))\n return;\n if (!npc.getTriggerTrait().trigger(this, event.getClicker()))\n ...
"protected JSONObject getExpectedParameters(int sdlVersion) {\n JSONObject result = new JSONObject(), audioPass = new JSONObject(), softButton = new JSONObject(), button = new JSONObject(), display = new JSONObject(), image = new JSONObject(), resolution = new JSONObject(), screen = new JSONObject(), touch = new JSO...
"public IOException wrap() throws IOException {\n IOException ex = new IOException(getMessage());\n if (getCause() != null) {\n ex.initCause(getCause());\n }\n throw ex;\n}\n"
"public void complexIndexOfInSelectClauseTest() {\n EntityManager em = createEntityManager();\n beginTransaction(em);\n ExpertBeerConsumer consumer = new ExpertBeerConsumer();\n consumer.getDesignations().add(\"String_Node_Str\");\n consumer.getDesignations().add(\"String_Node_Str\");\n em.persist(con...
"public void computeTile(Band targetBand, Tile targetTile, ProgressMonitor pm) throws OperatorException {\n try {\n final Rectangle targetTileRectangle = targetTile.getRectangle();\n final int x0 = targetTileRectangle.x;\n final int y0 = targetTileRectangle.y;\n final int w = targetTileRe...
"private void runIteration(Random rng, Data data, int m, int nbtrees) {\n int nblabels = data.getDataset().nblabels();\n log.info(\"String_Node_Str\");\n Data train = data.clone();\n Data test = train.rsplit(rng, (int) (data.size() * 0.1));\n int[] labels = data.extractLabels();\n int[] testLabels = t...
"public final void renderTemplate(String page, String name, Writer writer, Context context, Map<String, String> params, Map<String, String> replaceRules, Map<String, String> parameters) throws IOException {\n Target target = new Target(page, context, parameters);\n String content = getResourceAsString(target).toS...
"private void moveCommonRepNode(IRepositoryNode sourceNode, IRepositoryNode targetNode) {\n IRepositoryViewObject objectToMove = sourceNode.getObject();\n ERepositoryObjectType targetObjectType = targetNode.getContentType();\n IPath fullPath = getNodeFullPath(targetObjectType);\n IPath makeRelativeTo = full...
"public String commitAction() {\n String orgId = null;\n URIBuilder requestUri = MMSUtils.getServiceOrgsUri(project);\n if (requestUri == null) {\n Application.getInstance().getGUILog().log(\"String_Node_Str\");\n return null;\n }\n try {\n orgId = MMSUtils.getMmsOrg(project);\n }...
"private Solution solve(float initial, float velocity) {\n float cmk = c * c - 4 * m * k;\n if (cmk == 0) {\n final float r = -c / (2 * m);\n final float c1 = initial;\n final float c2 = velocity / (r * initial);\n return new Solution() {\n public float x(float t) {\n ...
"public boolean onConsoleCommand(String[] split) {\n String server = Colors.LightGreen + \"String_Node_Str\" + Colors.DarkPurple;\n if (split[0].equalsIgnoreCase(\"String_Node_Str\")) {\n if (split.length > 1) {\n String args = \"String_Node_Str\" + etc.combineSplit(1, split, \"String_Node_Str\"...
"public boolean passesFilter(RawSign sign) {\n if (type == ViewFilterType.All) {\n String text1 = sign.text1.trim();\n String text2 = sign.text2.trim();\n String text3 = sign.text3.trim();\n String text4 = sign.text4.trim();\n return (text1.startsWith(\"String_Node_Str\") || text2....
"private static boolean isLocalHost(String host) {\n if (host != null) {\n try {\n String normalizedHost = host;\n if (!includesScheme(normalizedHost)) {\n normalizedHost = \"String_Node_Str\" + normalizedHost;\n }\n InetAddress hostAddr = InetAddress...
"public void close() throws IOException {\n if (cipherInputStream != null) {\n cipherInputStream = null;\n upstream.close();\n }\n}\n"
"private void openListAssignment() {\n GUIListAssignments guiListAssignments = new GUIListAssignments(calendarState, customer, this);\n guiListAssignments.setVisible(true);\n}\n"
"private String getPaymentUri() {\n String prefix = accountDisplayStrategy.getLabel() + \"String_Node_Str\";\n final StringBuilder uri = new StringBuilder(prefix);\n uri.append(getBitcoinAddress());\n if (!CurrencyValue.isNullOrZero(_amount)) {\n if (accountDisplayType == AccountDisplayType.COLU_ACCO...
"public long open(DataSpec dataSpec) throws IOException {\n if (dataSpec.length == C.LENGTH_UNBOUNDED) {\n Assertions.checkArgument(dataSpec.position < data.length);\n } else {\n Assertions.checkArgument(dataSpec.position + dataSpec.length <= data.length);\n }\n readPosition = (int) dataSpec.p...
"public void updateLayout(int index) {\n Orientation orient = getStackedPlot().getOrientation();\n int plotCount = getStackedPlot().getAllPlots().size();\n int plotSpacing = getPlotSpacing();\n int plotSize = getSize();\n if (!isVisible()) {\n plotSpacing = 0;\n plotSize = 0;\n }\n if...
"public Alignment<S> localAlignSmithWaterGotoh(S a, S b) {\n float[][] D = new float[a.length() + 1][b.length() + 1];\n float[][] P = new float[a.length() + 1][b.length() + 1];\n float[][] Q = new float[a.length() + 1][b.length() + 1];\n for (int i = 1; i <= a.length(); i++) {\n D[i][0] = 0.0f;\n ...
"public void unpack(File zipFile, File rootDir) throws IOException {\n ZipFile zip = new ZipFile(zipFile);\n Enumeration<ZipEntry> entries = (Enumeration<ZipEntry>) zip.entries();\n ZipEntry entry = null;\n while (entries.hasMoreElements()) {\n entry = entries.nextElement();\n java.io.File f =...
"public synchronized void remove(ManagedDownloader downloader, boolean success) {\n active.remove(downloader);\n waiting.remove(downloader);\n notify();\n callback.removeDownload(downloader);\n}\n"
"public void testFrequentUpdates() {\n try {\n String path = \"String_Node_Str\";\n EventList sourceListTS = new ThreadSafeList(new BasicEventList());\n NetworkList sourceList = peer.publish(sourceListTS, path, ByteCoderFactory.serializable());\n NetworkList targetList = peer.subscribe(\"...