content
stringlengths
40
137k
"public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {\n if (progress == 0) {\n progress = 1;\n }\n imageWidthText.setText(String.format(Locale.US, \"String_Node_Str\", progress * 10));\n}\n"
"private void okPressedProcess() {\n Utility.setPreferenceStoredMap(JdbcPlugin.JAR_MAP_PREFERENCE_KEY, jarMap);\n Utility.setPreferenceStoredMap(JdbcPlugin.DRIVER_MAP_PREFERENCE_KEY, driverMap);\n Iterator jarsCopyIterator = jarsToBeCopied.values().iterator();\n JDBCDriverManager manager = JDBCDriverManager...
"public boolean onMessage(int source, int path, int target, int flags, Object object) {\n try {\n count++;\n if (count % 1 == 0) {\n LOG.info(\"String_Node_Str\" + source + \"String_Node_Str\" + target + \"String_Node_Str\" + count);\n }\n IntData data = (IntData) object;\n ...
"public void writeData(ObjectDataOutput out) throws IOException {\n out.writeInt(id);\n}\n"
"private void spanWithEmptyData(SheetData sheetData, int currentColumnIndex, int rowspan) {\n SheetData ref = sheetData;\n while (ref.isBlank()) {\n ref = ((BlankData) ref).getData();\n if (ref == null) {\n return;\n }\n }\n int rowIndex = sheetData.getRowIndex();\n for (i...
"public void adjustStreamVolume(int streamType, int direction, int flags) {\n ensureValidDirection(direction);\n ensureValidStreamType(streamType);\n VolumeStreamState streamState = mStreamStates[STREAM_VOLUME_ALIAS[streamType]];\n final int oldIndex = streamState.mIndex;\n boolean adjustVolume = true;\n...
"public void handleCrosstab(CrosstabReportItemHandle crosstab, ITableContent content, IReportContext context) throws BirtException {\n if (handler == null || crosstab == null) {\n return;\n }\n ICrosstabInstance crosstabInst = new CrosstabInstanceImpl(content, crosstab.getModelHandle(), runningState);\n...
"private void parse(String reference) throws InvalidReferenceRuleException {\n log.info(\"String_Node_Str\" + reference);\n int firstDotIndex = reference.indexOf('.');\n if (firstDotIndex == -1)\n throw new InvalidReferenceRuleException(\"String_Node_Str\");\n if (firstDotIndex < 1)\n throw ne...
"protected boolean removeAll(final Collection collection) {\n eagerlyLoadDataCollection();\n boolean result = false;\n if (dataCollection == null) {\n createEmptyDataCollection();\n }\n if (dataCollection != null && !(dataCollection instanceof ProxyCollection) && collection != null && !collection....
"public static ModelElement getModelElement(IFile file) {\n ModelElement modelElement = null;\n String fileExtension = file.getFileExtension();\n if (FactoriesUtil.isProvFile(fileExtension)) {\n TypedReturnCode<TdDataProvider> returnValue = PrvResourceFileHelper.getInstance().findProvider(file);\n ...
"public void testSaveAndLoad() throws IOException, DataException {\n IDocArchiveWriter writer = new FileArchiveWriter(tempFile.getAbsolutePath());\n ICubeQueryDefinition toSave = createQueryDefn();\n CubeQueryDefinitionIOUtil.save(queryResultID, writer, toSave);\n writer.flush();\n writer.finish();\n ...
"public boolean onPreferenceChange(final Preference preference, Object newValue) {\n if (preference.getKey().equals(Settings.BACKGROUND_COLOR_PREFERENCE)) {\n String hex = ColorPickerPreference.convertToARGB(Integer.valueOf(String.valueOf(newValue)));\n preference.setSummary(hex);\n } else if (prefe...
"private static boolean includeIfPackageExists(String jarEntryName, String[] includeOnPackages) {\n if (includeOnPackages == null) {\n return true;\n }\n String packageName = pathToClassName(jarEntryName);\n for (String includeOnPackage : includeOnPackages) {\n if (packageName.startsWith(inclu...
"public boolean hasLambda(ClassNode node) throws IOException {\n ClassesProcessor clprocessor = DecompilerContext.getClassprocessor();\n StructClass cl = node.classStruct;\n if (cl.getBytecodeVersion() < CodeConstants.BYTECODE_JAVA_8) {\n return false;\n }\n StructBootstrapMethodsAttribute bootstr...
"private void deserialize() {\n try {\n FileInputStream fileStream = new FileInputStream(file);\n ObjectInputStream inputStream = new ObjectInputStream(new BufferedInputStream(fileStream));\n try {\n List<URI> list = (List<URI>) inputStream.readObject();\n if (list != null)...
"public Sequence getTypedValue() {\n final Object formParam = request.getFormParam(getParameterAnnotationMapping().getParameterName());\n if (formParam == null) {\n final Literal[] defaultLiterals = getParameterAnnotationMapping().getDefaultValues();\n return literalsToSequence(defaultLiterals);\n ...
"public void remove() {\n super.removeElementFromNamedIndexes();\n if (!globals.getEdgeWrapper().elementExists(id)) {\n return;\n }\n Set<String> indexedKeys = globals.getIndexedKeysListWrapper().getIndexedKeys(Edge.class);\n Map<String, Object> props = globals.getEdgeWrapper().readProperties(this...
"public List<SearchResult> getSearchResults(EntityMetadata m, Queue<FilterClause> filterClauseQueue, String persistenceUnit, ConsistencyLevel consistencyLevel) {\n String columnFamilyName = m.getTableName() + Constants.INDEX_TABLE_SUFFIX;\n Selector selector = Pelops.createSelector(PelopsUtils.generatePoolName(pe...
"private static void runSolrQuery(List<String> args) {\n String collection = args.get(2);\n String solrQueryString = args.get(3);\n try {\n QueryResponse executeSolrQuery = SolrUtils.executeSolrQuery(solr, collection, solrQueryString);\n SolrDocumentList results = executeSolrQuery.getResults();\n...
"public void save() {\n try {\n PreparedStatement ps = DBConnection.sql.getConnection().prepareStatement(loadNameQuery);\n ps.setString(1, uuid.toString());\n ps.setString(2, name);\n ResultSet rs = ps.executeQuery();\n if (!rs.next()) {\n ps = DBConnection.sql.getConnec...
"public IWallet createWallet(String walletLogin) {\n if (walletLogin != null && !walletLogin.trim().isEmpty()) {\n StringTokenizer st = new StringTokenizer(walletLogin, \"String_Node_Str\");\n String walletType = st.nextToken();\n if (\"String_Node_Str\".equalsIgnoreCase(walletType)) {\n ...
"public void testClusterResizeFailure() throws Exception {\n CookieCache.put(\"String_Node_Str\", \"String_Node_Str\");\n BddErrorMessage errorMsg = new BddErrorMessage();\n errorMsg.setMessage(\"String_Node_Str\");\n ObjectMapper mapper = new ObjectMapper();\n StorageRead sr1 = new StorageRead();\n s...
"public void testClassificationEffort() throws Exception {\n try (GraphContext context = factory.create()) {\n ClassificationService classificationService = new ClassificationService(context);\n ProjectModel projectModel = fillData(context)[0];\n ProjectModelTraversal projectModelTraversal = new...
"private void waitForChannel(CommandEvent event) {\n event.replySuccess(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\");\n ew.waitForEvent(GuildMessageReceivedEvent.class, e -> event.getAuthor().equals(e.getAuthor()) && event.getTextChannel().equals(e.getChannel()), e -> {\n...
"public int[] readTile(int x, int y, int width, int height, int band) {\n Rectangle rect = new Rectangle(x, y, width, height);\n rect = rect.intersection(getImage(band).getBounds());\n int[] tile = new int[height * width];\n if (rect.isEmpty()) {\n return tile;\n }\n if (rect.y != preloadedInte...
"private HttpClient getHttpClient() {\n if (s_client == null) {\n MultiThreadedHttpConnectionManager mgr = new MultiThreadedHttpConnectionManager();\n mgr.getParams().setDefaultMaxConnectionsPerHost(1);\n mgr.getParams().setMaxTotalConnections(1000);\n s_client = new HttpClient(mgr);\n ...
"public void updatePlot() {\n Graphics2D g2d = (Graphics2D) buffer.getGraphics();\n g2d.setColor(background);\n g2d.fillRect(0, 0, buffer.getWidth(), buffer.getHeight());\n if (buffer.getWidth() > OFFSET_LEFT + OFFSET_RIGHT + 100 && buffer.getHeight() > OFFSET_TOP + OFFSET_BOTTOM) {\n int width = buf...
"public static void save() {\n String policy = params.get(\"String_Node_Str\");\n Logger.info(\"String_Node_Str\", policy);\n String identity = PolicyManager.sharedManager().save(policy);\n String success = identity == null ? \"String_Node_Str\" : \"String_Node_Str\";\n renderJSON(new ResponseMessage(suc...
"public void e_on_drop() {\n this.w = 32;\n this.h = 32;\n WorldView.highlight_tile(null);\n NE_GUI_Inventory inventory = get_inventory_ctrl();\n inventory.update(inventory.container);\n}\n"
"public T call() throws Exception {\n long start = System.currentTimeMillis();\n T res = call.call();\n LOG.debug(call.toString() + \"String_Node_Str\" + (System.currentTimeMillis() - start) + \"String_Node_Str\");\n return res;\n}\n"
"public IValue resolve(MarkerList markers, IContext context) {\n Name name = this.type.getName();\n IField f = context.resolveField(name);\n if (f != null) {\n FieldAccess access = new FieldAccess(this.position);\n access.name = name;\n access.field = f.theField;\n return access;\n ...
"public UserAccount findByUserName(String userName) {\n getSessionFactory().getStatistics().logSummary();\n String query = \"String_Node_Str\" + getDomainClassName() + \"String_Node_Str\";\n Query q = getCurrentSession().createQuery(query);\n q.setParameter(\"String_Node_Str\", userName);\n return (UserA...
"public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n if (!__authenticate(request, response)) {\n return;\n }\n try {\n String requestType = request.getHeader(ParameterAccessor.HEADER_REQUEST_TYPE);\n boolean isSoapRequest = P...
"private void move(ArrayList<Integer> move_request) {\n ArrayList<Integer> new_position = new ArrayList<Integer>();\n Map<Integer, ArrayList<Integer>> server_response = new HashMap<Integer, ArrayList<Integer>>();\n Boolean moving_allowed = false;\n if (Math.abs(diff_x) + Math.abs(diff_y) == 1) {\n mo...
"public String objToString() {\n return super.objToString() + Character.toString(FIELD_SEPARATOR) + Boolean.toString(isValid) + Character.toString(FIELD_SEPARATOR) + StringUtils.join(categoricalVals, SETLIST_SEPARATOR);\n}\n"
"void addExtraBipartitionsByInput(Map<Integer, Set<Vertex>> clusters, List<Tree> trees, TaxonNameMap taxonMap, boolean extraTreeRooted) {\n int sigmaN = 0;\n int k = trees.size();\n String[] leaves = stTaxa;\n int n = leaves.length;\n STITreeCluster all = clusters.get(n).iterator().next()._cluster;\n ...
"public int doPreprocess() throws IOException, LangDetectException {\n if (stopwordsFile != null && !stopwordsFile.isEmpty()) {\n File sFile = new File(stopwordsFile);\n if (!sFile.exists() || sFile.isDirectory()) {\n System.out.println(\"String_Node_Str\" + sFile.getAbsolutePath());\n ...
"private void deployTypeLib(final Deployer deployer, final Project project) throws TaskException {\n final TypeLib[] typeLibs = project.getTypeLibs();\n for (int i = 0; i < typeLibs.length; i++) {\n final TypeLib typeLib = typeLibs[i];\n final File file = findTypeLib(typeLib.getLibrary());\n ...
"public boolean equals(Object anObject) {\n if (anObject instanceof Proposal) {\n Proposal myOther = (Proposal) anObject;\n if (myOther.getSize() == getSize()) {\n for (Map.Entry<String, byte[]> kv : _values.entrySet()) {\n byte[] myOtherVal = myOther.get(kv.getKey());\n ...
"private void cleanUpConnection(boolean tearDown, String reason) {\n if (DBG)\n log(\"String_Node_Str\" + reason);\n if (mReconnectIntent != null) {\n AlarmManager am = (AlarmManager) phone.getContext().getSystemService(Context.ALARM_SERVICE);\n am.cancel(mReconnectIntent);\n mReconnec...
"public void receivedError(IqRequest iqRequest) {\n if (iqRequest.getOriginalPacket() instanceof JingleIQ) {\n callKiller.immediateKill((JingleIQ) iqRequest.getOriginalPacket(), new Reason(\"String_Node_Str\", Reason.Type.connectivity_error));\n prepareStatesManager.cancelCall((JingleIQ) iqRequest.getO...
"public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.location_fragment, parent, false);\n LinearLayout firstPage = (LinearLayout) v.findViewById(R.id.onePage);\n LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) firs...
"public void setBlockedAndProtected(short x, short y, boolean blocked) {\n final int idx = getIdx(x, y);\n this.blockedGrid.set(idx, blocked);\n this.protectedGrid.set(idx, blocked);\n}\n"
"private void write(Object obj, XmlOutput out, Runnable postInitAction) throws JAXBException {\n if (obj == null)\n throw new IllegalArgumentException(Messages.NOT_MARSHALLABLE.format());\n if (schema != null) {\n ValidatorHandler validator = schema.newValidatorHandler();\n validator.setError...
"protected boolean throwEvent(ICommandSender sender, String[] args) throws InvocationCommandException {\n CommandEvent event = new CommandEvent(this.command, sender, args);\n if (MinecraftForge.EVENT_BUS.post(event)) {\n if (event.getException() != null) {\n throw new InvocationCommandException(...
"public void notifyTransactionIsInBlock(Sha256Hash txHash, StoredBlock block, BlockChain.NewBlockType blockType, int relativityOffset) throws VerificationException {\n lock.lock();\n try {\n Transaction tx = transactions.get(txHash);\n if (tx == null) {\n tx = riskDropped.get(txHash);\n ...
"private void createNewLine() {\n final Composite lineComp = new Composite(expressionComp, SWT.NONE);\n lineComp.setLayout(new GridLayout(5, false));\n final CCombo combo = new CCombo(lineComp, SWT.BORDER);\n combo.setLayoutData(new GridData());\n ((GridData) combo.getLayoutData()).widthHint = 150;\n ...
"public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException {\n switch(code) {\n case START_ACTIVITY_TRANSACTION:\n {\n data.enforceInterface(IActivityManager.descriptor);\n IBinder b = data.readStrongBinder();\n IAp...
"public URI getURI() {\n return uri;\n}\n"
"public Object decorate(ClassLoader ignored, Field field) {\n Object result = defaultElementFieldDecoracor.decorate(ignored, field);\n if (result != null) {\n return result;\n return decorateWidget(field);\n}\n"
"private boolean setValue(String path, ContentKey nextKey, LastUpdated existing) throws Exception {\n try {\n curator.setData().withVersion(existing.version).forPath(path, nextKey.getBytes());\n return true;\n } catch (KeeperException.BadVersionException e) {\n logger.debug(\"String_Node_Str\...
"Set<String> buildGroupByClauses() {\n if (groupByInfos.isEmpty()) {\n return Collections.EMPTY_SET;\n }\n Set<String> groupByClauses = new HashSet<String>();\n boolean conditionalContext = queryGenerator.setConditionalContext(false);\n for (NodeInfo info : groupByInfos) {\n sb.setLength(0)...
"public OverlayVertexWrapper<V, E> getTarget(final OverlayVertexWrapper<V, E> vertex) {\n vertex.wv = we.getTarget(vertex.ref);\n return vertex;\n}\n"
"public static int getBindingLevel(DesignElementHandle holder, DesignElementHandle baseElement) {\n int level = 0;\n for (DesignElementHandle elementHandle = baseElement; elementHandle.getContainer() != null; elementHandle = getBindingHolder(elementHandle).getContainer(), level++) {\n DesignElementHandle b...
"public GeoQuery<T> nearSphere(String key, Point point, double maxDistance, double minDistance) {\n DBObject geometry = new BasicDBObject();\n geometry.put(Operator.GEOMETRY, MapperUtil.toDBObject(point, true));\n geometry.put(Operator.MAX_DISTANCE, maxDistance);\n geometry.put(Operator.MIN_DISTANCE, minDis...
"public void updateOnlineTs(long id) {\n String sql = \"String_Node_Str\";\n this.mainJdbc.update(sql, new Date().getTime() / 1000, ClientStatus.Online, id);\n}\n"
"public void onControllerModeUpdated() {\n final Bundle eventInfo = new Bundle();\n eventInfo.putInt(SoloEventExtras.EXTRA_SOLO_CONTROLLER_MODE, soloComp.getControllerMode());\n notifyDroneAttributeEvent(SoloEvents.SOLO_CONTROLLER_MODE_UPDATED, eventInfo, true);\n}\n"
"private void finishLaunch(ILaunch launch, ILaunchConfiguration config, String command, IProgressMonitor monitor, boolean retry) {\n String errorMessage = \"String_Node_Str\";\n try {\n File workDir = getWorkingDirectory(config);\n if (workDir == null) {\n workDir = new File(System.getPro...
"public void givenBindingStartsBeforeGuiAssignmentThenBindingWaitsForGuiAssignment(final EacGuiService sut, final Intent inputIntent, EacGuiImpl inputGui) throws InterruptedException, ExecutionException {\n Future<IBinder> future = callBindAsync(sut, inputIntent);\n TimeUnit.MILLISECONDS.sleep(2);\n EacGuiServ...
"public void onClick(View view) {\n String uri = \"String_Node_Str\" + gift.user;\n Intent intent = new Intent(Intent.ACTION_DIAL);\n intent.setData(Uri.parse(uri));\n mContext.startActivity(intent);\n}\n"
"public void configure(final OETLProcessor iProcessor, final ODocument iConfiguration, final OBasicCommandContext iContext) {\n super.configure(iProcessor, iConfiguration, iContext);\n if (iConfiguration.containsField(\"String_Node_Str\"))\n dbURL = iConfiguration.field(\"String_Node_Str\");\n if (iConf...
"public void onLivingUpdate() {\n entityAge = 0;\n if (worldObj.isRemote) {\n refreshRoles();\n int chance = 1 + (int) Math.floor(HardcoreEnderExpansion.proxy.getClientSidePlayer().getDistanceToEntity(this) / 20F);\n if (rand.nextInt(chance) == 0) {\n float colFactor = rand.nextFlo...
"public static String encodeHexString(byte[] data) {\n StringBuffer hexString = new StringBuffer();\n for (int i = 0; i < data.length; i++) {\n hexString.append(Character.forDigit((data[i] & 0xF0) >> 4, 16));\n hexString.append(Character.forDigit(data[i] & 0x0F, 16));\n }\n return hexString.to...
"protected TypeLookupResult findType(Expression node, ClassNode declaringType, VariableScope scope, TypeConfidence confidence, boolean isStaticObjectExpression, boolean isPrimaryExpression) {\n MethodNode target;\n if (scope.isMethodCall() && (target = getMethodTarget(node)) != null) {\n return new TypeLoo...
"private void handleItemChanged(final RosterItem item) {\n final RosterItem old = getItemByJID(item.getJID());\n RosterItemChangedEvent event;\n if (old == null) {\n storeItem(item);\n event = new RosterItemChangedEvent(ChangeTypes.added, item);\n } else {\n final SubscriptionState subs...
"public static void setTagLastUpdated(String tagName, String date) {\n if (TextUtils.isEmpty(tagName)) {\n return;\n ContentValues values = new ContentValues();\n values.put(\"String_Node_Str\", tagName);\n values.put(\"String_Node_Str\", date);\n try {\n ReaderDatabase.getWritableDb().inse...
"public void test() throws IOException, ClassFormatException {\n ClassReader reader = new ClassReader(HelloWorld.class.getCanonicalName());\n log(\"String_Node_Str\");\n log(\"String_Node_Str\");\n for (Interface iface : reader.getInterfaces()) {\n log(\"String_Node_Str\" + iface.getName());\n }\n...
"public void render() {\n FloatBuffer mBuffer = BufferUtils.createFloatBuffer(16);\n float[] mFloat = new float[16];\n GL11.glPushMatrix();\n Vector3f cameraPosition = _parent.getActiveCamera().getPosition();\n GL11.glTranslated(-cameraPosition.x, -cameraPosition.y, -cameraPosition.z);\n List<Collisio...
"private void addButtonActionPerformed(ActionEvent e) {\n AddHUDPanel addHUDPanel = new AddHUDPanel(client, session, myPresenceInfo, myPresenceInfo, group, Mode.ADD);\n HUD mainHUD = HUDManagerFactory.getHUDManager().getHUD(\"String_Node_Str\");\n addModeAddHUDComponent = mainHUD.createComponent(addHUDPanel);\...
"public void onPlayerCommand(PlayerChatEvent event) {\n String[] split = event.getMessage().split(\"String_Node_Str\");\n Player player = event.getPlayer();\n if (j2.hasFlag(player, Flag.JAILED)) {\n if (split[0].equalsIgnoreCase(\"String_Node_Str\")) {\n j2.users.getUser(player).dropFlag(Fla...
"protected void onImpact(MovingObjectPosition pos) {\n if (!this.worldObj.isRemote) {\n if (pos.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {\n int var2 = pos.blockX;\n int var3 = pos.blockY;\n int var4 = pos.blockZ;\n switch(pos.sideHit) {\n ...
"public void onServiceConnected(ComponentName name, IBinder service) {\n synchronized (mMethodMap) {\n if (mCurIntent != null && name.equals(mCurIntent.getComponent())) {\n mCurMethod = IInputMethod.Stub.asInterface(service);\n if (mCurClient != null) {\n if (DEBUG)\n ...
"public void startRangingBeaconsInRegion(Region region, Callback callback) {\n synchronized (rangedRegionState) {\n if (rangedRegionState.containsKey(region)) {\n LogManager.i(TAG, \"String_Node_Str\");\n rangedRegionState.remove(region);\n }\n rangedRegionState.put(region,...
"public void addNewSeeds(Collection<Seed> seeds) {\n if (isClosed) {\n log.warn(\"String_Node_Str\");\n return;\n }\n Multimap<String, Seed> segmentSeeds = HashMultimap.create();\n for (Seed seed : seeds) {\n if (seed.getActiveTimeStamp() != null) {\n segmentSeeds.put(String....
"protected void rehashIfNecessary() {\n Entry[] old = hashTable, newTable;\n if (size > old.length * 2 && old.length < Ints.MAX_POWER_OF_TWO) {\n synchronized (hashTable) {\n int newTableSize = old.length * 2, newMask = newTableSize - 1;\n newTable = new Entry[newTableSize];\n ...
"public final ShortPoint2D getPosition(IBuildingOccupyableMovable soldier) {\n for (TowerOccupier curr : occupiers) {\n if (curr.getSoldier() == soldier) {\n return curr.place.getPosition().calculatePoint(super.getPos());\n }\n }\n return null;\n}\n"
"public void createPlayback(Item item, PlaybackState state, Runnable onOk, Runnable onFail) {\n Player.IO_THREAD.execute(() -> {\n try {\n p.open(item.getFile());\n p.setVolume(state.volume.get());\n p.setMute(state.mute.get());\n p.setBalance(state.balance.get());\...
"public int compare(Node n1, Node n2) {\n double point1 = ClosenessCentralityNodeSorter.this.map.get(n1).doubleValue();\n double point2 = ClosenessCentralityNodeSorter.this.map.get(n2).doubleValue();\n int result;\n if (point1 == point2) {\n result = 0;\n } else if (point1 > point2) {\n res...
"private void uploadThrottled(OutputStream ostream) throws IOException {\n while (true) {\n int max = _uploader.getManager().calculateBandwidth();\n int burstSize = max * CYCLE_TIME;\n int c = -1;\n byte[] buf = new byte[1024];\n int burstSent = 0;\n long start = System.curr...
"public static String formatNumber(float number, int digitCount, boolean separateThousands) {\n char[] out = new char[35];\n boolean neg = false;\n if (number == 0) {\n return \"String_Node_Str\";\n }\n boolean zero = false;\n if (number < 1 && number > -1) {\n zero = true;\n }\n i...
"public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) {\n this.tree = tree;\n this.row = row;\n this.isSelected = selected;\n this.treeNode = (TreeNode) value;\n this.rightLabel.setIcon(null);\n DefaultTree...
"public void uninstallModule(String moduleId, String warFileLocation, boolean preview, boolean purge) throws IOException {\n InstalledFiles installedFiles = new InstalledFiles(warFileLocation, moduleId);\n installedFiles.load();\n for (String add : installedFiles.getAdds()) {\n removeFile(warFileLocatio...
"public boolean satisfied(Assignment asign) {\n HashSet<Integer> values = new HashSet<Integer>(9);\n for (SudokuTile v : variables) {\n Integer val = (Integer) asign.getValue(v);\n if (val == null || values.contains(val)) {\n return false;\n values.add(val);\n }\n return true...
"public void testUsedHeapPercentagePolicy() {\n final int maxUsedHeapPercentage = 60;\n final int nodeCount = 1;\n final int putCount = 1000;\n final String mapName = randomMapName();\n final Config config = createConfig(MaxSizeConfig.MaxSizePolicy.USED_HEAP_PERCENTAGE, maxUsedHeapPercentage, mapName);\n...
"public int getColumnType(int index) throws BirtException {\n index = getColumnIndex(index);\n if (null != parentMetaData) {\n return parentMetaData.getColumnType(index);\n } else {\n MetaDataEntry entry = (MetaDataEntry) metaEntries.get(index);\n return entry.type;\n }\n}\n"
"protected CloseableIterator<GeoWaveData<SimpleFeature>> toGeoWaveDataInternal(final WholeFile hfile, final ByteArrayId primaryIndexId, final String globalVisibility) {\n final List<GeoWaveData<SimpleFeature>> featureData = new ArrayList<GeoWaveData<SimpleFeature>>();\n final InputStream in = new ByteArrayInputSt...
"public void messageReceived(WonderlandClientSender sender, WonderlandClientID clientID, CellMessage message) {\n ResponseMessage response;\n logger.fine(\"String_Node_Str\" + message.getClass().getSimpleName());\n if (message instanceof MapRequestMessage) {\n response = handleMapRequest(clientID, (MapR...
"public final void unregisterMBean(final ObjectName objectName) throws InstanceNotFoundException, MBeanRegistrationException {\n if (objectName == null)\n throw new InstanceNotFoundException();\n DynamicInterceptor.ReplicationInfo result = getInstance(objectName);\n try {\n if (result.isTargetAnI...
"private Component createMenuItem(Element aTag) throws Exception {\n final MenuItem component = new MenuItem();\n processEvents(component, aTag);\n Publisher.publish(component);\n if (aTag.hasAttribute(\"String_Node_Str\"))\n component.setText(aTag.getAttribute(\"String_Node_Str\"));\n if (aTag.ha...
"public static void main(String[] args) {\n try {\n OntSdk ontSdk = getOntSdk();\n ontSdk.getWebSocket().startWebsocketThread(false);\n Thread thread = new Thread(new Runnable() {\n public void run() {\n waitResult(lock);\n }\n });\n thread.star...
"public Iterable<? extends Field> getFieldsForSubColumn(String family, Column column, String subName) {\n return makeIterable(new StringField(INTERNAL_FIELDNAME, family + \"String_Node_Str\" + column.getValue(), Store.YES));\n}\n"
"public Object decode(Class targetClass, Object fromDBObject, MappedField optionalExtraInfo) throws MappingException {\n if (fromDBObject == null)\n return null;\n if (fromDBObject instanceof String)\n return (String) fromDBObject;\n }\n return fromDBObject.toString();\n}\n"
"public Expression likeIgnoreCase(Expression theValue) {\n if (shouldUseUpperCaseForIgnoreCase) {\n return toUpperCase().like(theValue.toUpperCase());\n } else {\n return toLowerCase().like(theValue.toLowerCase());\n }\n}\n"
"private void copyAttributes(Node currentNode, Tree treeNode) {\n Map<String, String> attributes = new HashMap<String, String>();\n putIfValueNotNull(attributes, Tree.NODE_NAME, currentNode.getNodeName());\n putIfValueNotNull(attributes, Tree.NODE_VALUE, currentNode.getNodeValue());\n int type = currentNode...
"protected Node objectToXMLNode(Object object, Node rootNode, AbstractSession session, XMLDescriptor descriptor, boolean isXMLRoot) throws XMLMarshalException {\n DocumentPreservationPolicy docPresPolicy = xmlContext.getDocumentPreservationPolicy(session);\n if (docPresPolicy != null && docPresPolicy.shouldPreser...
"public ClassDefinitionBuilder addByteArrayField(String fieldName) {\n check();\n fieldDefinitions.add(new FieldDefinitionImpl(index++, fieldName, FieldType.BYTE_ARRAY));\n return this;\n}\n"
"protected void startEverything() {\n tracker.dropAllTracks();\n createModelMatcher(maxIterations, 4);\n distortAlg = new MotionStabilizePointKey<I, T>(tracker, modelMatcher, modelRefiner, fitModel, thresholdKeyFrame, thresholdReset, largeMotionThreshold);\n totalKeyFrames = 0;\n I image = sequence.next(...
"private String[] getQHConstructor() {\n List<String> qhConstructorTmp = new LinkedList<String>();\n qhConstructorTmp.add(0, qhClassName);\n if (qhConstructor != null) {\n for (String str : qhConstructor) {\n if (str != null)\n qhConstructorTmp.add(str);\n }\n }\n ...
"protected SearchRequestResult executeSearch(List<SearchQuery> query, int pageIndex) throws IOException, OpacErrorException, JSONException {\n final String searchUrl;\n if (!initialised) {\n start();\n }\n try {\n searchUrl = buildSearchUrl(query, pageIndex);\n } catch (URISyntaxException e...
"public DataDefinition getOutputDefinition() {\n if (this.output == null) {\n if (this.result != null) {\n return this.result.getDataDefinition();\n } else {\n return null;\n }\n } else\n return this.output.getDefinition();\n}\n"