code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public RandomSeedGenerator(int row,int column){
this.row=row;
this.column=column;
}
| Constructs and returns a new seed generator; you normally won't need to use this method. <p> The position <tt>[row,column]</tt> indicates the iteration starting point within a (virtual) seed matrix. The seed matrix is a n*m matrix with <tt>1 + Integer.MAX_VALUE</tt> (virtual) rows and <tt>RandomSeedTable.COLUMNS</tt> c... |
public Comparator<Point2D> polarOrder(){
return new PolarOrder();
}
| Compares two points by polar angle (between 0 and 2pi) with respect to this point. |
public static boolean validateIpList(String iplist){
String[] ips=iplist.split(",");
try {
for ( String ip : ips) {
ip=ip.trim();
if (ip.contains("/")) {
String[] ipcomps=ip.split("/");
if (ipcomps.length != 2 || !InetAddresses.isInetAddress(ipcomps[0].trim())) {
return ... | Validate ip list |
public void add(char[] w,int wLen){
if (i + wLen >= b.length) {
char[] new_b=new char[i + wLen + INC];
for (int c=0; c < i; c++) new_b[c]=b[c];
b=new_b;
}
for (int c=0; c < wLen; c++) b[i++]=w[c];
}
| Adds wLen characters to the word being stemmed contained in a portion of a char[] array. This is like repeated calls of add(char ch), but faster. |
public static Integer createServerCache() throws Exception {
Properties props=new Properties();
props.setProperty(DELTA_PROPAGATION,"false");
ClientConflationDUnitTest test=new ClientConflationDUnitTest();
cacheServer=test.createCache(props);
AttributesFactory factory=new AttributesFactory();
factory.setSco... | create a server cache and start the server |
public boolean isFillBelowLine(){
return mFillBelowLine;
}
| Returns if the chart should be filled below the line. |
protected ReactionEffectImpl(){
super();
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public void defineImagesQuality(boolean highResolution){
DisplayMetrics dm=context.getResources().getDisplayMetrics();
int densityDpi=dm.densityDpi;
if (((context.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_XLARGE) && MyApplication.getI... | Define required image quality. On really big screens is higher quality always requested. |
public DTMDOMException(short code,String message){
super(code,message);
}
| Constructs a DOM/DTM exception. |
private void registerToolbarActions(IActionBars actionBars){
IToolBarManager toolBarManager=actionBars.getToolBarManager();
toolBarManager.add(new CollapseAllAction(this.fOutlineViewer));
IMenuManager viewMenuManager=actionBars.getMenuManager();
viewMenuManager.add(new Separator("EndFilterGroup"));
viewMenuMa... | Register toolbar actions. |
public void copyZip(final String srcFile,final String destFile) throws Exception {
loadDefaultExcludePattern(getRootFolderInZip(srcFile));
final ZipFile zipSrc=new ZipFile(srcFile);
final ZipOutputStream out=new ZipOutputStream(new FileOutputStream(destFile));
try {
final Enumeration<? extends ZipEntry> ent... | Copy zip file and remove ignored files |
private static boolean checkTargetConstraint(BeanInstance candidate,Vector<Object> listToCheck,Integer... tab){
int tabIndex=0;
if (tab.length > 0) {
tabIndex=tab[0].intValue();
}
Vector<BeanConnection> connections=TABBED_CONNECTIONS.get(tabIndex);
for (int i=0; i < connections.size(); i++) {
BeanConn... | A candidate BeanInstance can't be an input if it is the target of a connection from a source that is in the listToCheck |
BigInteger copy(){
prepareJavaRepresentation();
int[] copyDigits=new int[numberLength];
System.arraycopy(digits,0,copyDigits,0,numberLength);
return new BigInteger(sign,numberLength,copyDigits);
}
| Returns a copy of the current instance to achieve immutability |
private Dimension insetSize(Container parent){
Insets insets=parent.getInsets();
int w=insets.left + insets.right;
int h=insets.top + insets.bottom;
return new Dimension(w,h);
}
| Returns the size of the parents insets. |
public void op(GridCacheOperation op){
this.op=op;
}
| Sets cache operation. |
public final boolean readLine(CharBuffer cb,boolean isChop) throws IOException {
if (_readEncoding != null) return readlnEncoded(cb,isChop);
int capacity=cb.capacity();
int offset=cb.length();
char[] buf=cb.buffer();
byte[] readBuffer=_readBuffer;
while (true) {
int readOffset=_readOffset;
int rea... | Reads a line into the character buffer. \r\n is converted to \n. |
protected int diff_commonOverlap(String text1,String text2){
int text1_length=text1.length();
int text2_length=text2.length();
if (text1_length == 0 || text2_length == 0) {
return 0;
}
if (text1_length > text2_length) {
text1=text1.substring(text1_length - text2_length);
}
else if (text1_length <... | Determine if the suffix of one string is the prefix of another. |
public boolean bool(){
return (Double.isNaN(m_val) || (m_val == 0.0)) ? false : true;
}
| Cast result object to a boolean. |
@Uninterruptible public static Address unwindNativeStackFrame(Address currfp){
if (VM.BuildForIA32) {
return currfp;
}
Address callee_fp;
Address fp=Magic.getCallerFramePointer(currfp);
Address ip;
do {
callee_fp=fp;
ip=Magic.getReturnAddressUnchecked(fp);
fp=Magic.getCallerFramePointer(fp);... | Skip over all frames below currfp with saved code pointers outside of heap (C frames), stopping at the native frame immediately preceding the glue frame which contains the method ID of the native method (this is necessary to allow retrieving the return address of the glue frame). |
public static double length(Point2D.Double p1,Point2D.Double p2){
return sqrt(length2(p1.x,p1.y,p2.x,p2.y));
}
| Gets the distance between to points |
public void clearYTextLabels(){
clearYTextLabels(0);
}
| Clears the existing text labels on the Y axis. |
public static long murmur3(final BitVector bv,final long prefixLength,final long[] hh1,final long[] hh2,final long[] cc1,final long cc2[],final long lcp){
final int startStateWord=(int)(Math.min(lcp,prefixLength) / (2 * Long.SIZE));
long from=startStateWord * 2L * Long.SIZE;
long h1=hh1[startStateWord];
long h2... | Constant-time MurmurHash3 64-bit hashing reusing precomputed state partially. <p><strong>Warning</strong>: this code is still experimental. |
public void commit(){
if (!mWriting) {
throw new IllegalStateException("no file to commit");
}
mWriting=false;
mTemp.renameTo(mReal);
}
| Commit changes. |
public PrereadNames(final File preread,LongRange region,boolean suffixes) throws IOException {
mSuffixes=suffixes;
final IndexFile id=new IndexFile(preread);
if (!id.hasNames()) {
throw new FileNotFoundException("Error: SDF contains no name data");
}
final long start=Math.max(region.getStart(),0);
final... | Construct from a preread. |
public void testSetF18Momentary(){
boolean f18Momentary=false;
AbstractThrottle instance=new AbstractThrottleImpl();
instance.setF18Momentary(f18Momentary);
}
| Test of setF18Momentary method, of class AbstractThrottle. |
@Override public void onPrepared(MediaPlayer player){
LogUtils.d(TAG,"onPrepared from MediaPlayer");
configMediaPlayerState();
}
| Called when media player is done preparing. |
public int compareTo(cp_info constant_pool[],cp_info cp,cp_info cp_constant_pool[]){
if (tag != cp.tag) return tag - cp.tag;
CONSTANT_String_info cu=(CONSTANT_String_info)cp;
return ((CONSTANT_Utf8_info)(constant_pool[string_index])).compareTo(cp_constant_pool[cu.string_index]);
}
| Compares this entry with another cp_info object (which may reside in a different constant pool). |
public static UTMCoord fromUTM(int zone,String hemisphere,double easting,double northing,Globe globe){
final UTMCoordConverter converter=new UTMCoordConverter(globe);
long err=converter.convertUTMToGeodetic(zone,hemisphere,easting,northing);
if (err != UTMCoordConverter.UTM_NO_ERROR) {
String message=Logging.... | Create a set of UTM coordinates for the given <code>Globe</code>. |
@Override public String basePath(){
return "/wm/topology";
}
| Set the base path for the Topology |
public static String gensalt(){
return gensalt(GENSALT_DEFAULT_LOG2_ROUNDS);
}
| Generate a salt for use with the BCrypt.hashpw() method, selecting a reasonable default for the number of hashing rounds to apply |
public void execute(){
DataModel source=getDataModel();
if (!(source instanceof DataSet)) {
throw new IllegalArgumentException("Expecting a rectangular data set.");
}
DataSet data=(DataSet)source;
if (!data.isContinuous()) {
throw new IllegalArgumentException("Expecting a continuous data set.");
}
... | Executes the algorithm, producing (at least) a result workbench. Must be implemented in the extending class. |
public void readFrom(ChannelBuffer data){
if (this.hardwareAddress == null) this.hardwareAddress=new byte[OFP_ETH_ALEN];
data.readBytes(this.hardwareAddress);
data.readBytes(new byte[2]);
byte[] name=new byte[16];
data.readBytes(name);
int index=0;
for ( byte b : name) {
if (0 == b) break;
... | Read this message off the wire from the specified ByteBuffer |
public void repaint(){
repaint(getFirstVisibleItem(),getLastVisibleItem(),PAINT_ALL);
}
| Overridden for performance |
public ObjectReference retainForFinalize(ObjectReference object){
return traceObject(object);
}
| An object is unreachable and is about to be added to the finalizable queue. The collector must ensure the object is not collected (despite being otherwise unreachable), and should return its forwarded address if keeping the object alive involves forwarding. This is only ever called once for an object.<p> <i>For many c... |
public CBCBlockCipherMac(BlockCipher cipher,int macSizeInBits){
this(cipher,macSizeInBits,null);
}
| create a standard MAC based on a block cipher with the size of the MAC been given in bits. This class uses CBC mode as the basis for the MAC generation. <p> Note: the size of the MAC must be at least 24 bits (FIPS Publication 81), or 16 bits if being used as a data authenticator (FIPS Publication 113), and in general s... |
private void readDict(Range r){
pos=r.getStart();
while (pos < r.getEnd()) {
int cmd=readCommand(false);
if (cmd == 1006) {
charstringtype=(int)stack[0];
}
else if (cmd == 1007) {
if (stackptr == 4) {
at=Utils.createMatrix((float)stack[0],(float)stack[1],(float)stack[2],(float)s... | read a dictionary that exists within some range, parsing the entries within the dictionary. |
public ActivityChooserView(Context context){
this(context,null);
}
| Create a new instance. |
public Report findOneThrowExceptionIfNotFound(final Long id){
final Report report=this.reportRepository.findOne(id);
if (report == null) {
throw new ReportNotFoundException(id);
}
return report;
}
| Retrieves an entity by its id |
public static int clearListInfo(Delegator delegator,String shoppingListId) throws GenericEntityException {
delegator.removeByAnd("ShoppingListItemSurvey",UtilMisc.toMap("shoppingListId",shoppingListId));
return delegator.removeByAnd("ShoppingListItem",UtilMisc.toMap("shoppingListId",shoppingListId));
}
| Remove all items from the given list. |
public void clearPool(){
try {
publisherObjectPool.clear();
}
catch ( Exception e) {
logger.error("While clear pool.",e);
}
}
| Clear all pool. publisher client will call disconnect. |
@SuppressWarnings("nullness") @Override public int remove(@Nullable Object element,int occurrences){
if (occurrences == 0) {
return count(element);
}
checkArgument(occurrences > 0,"Invalid occurrences: %s",occurrences);
while (true) {
int current=count(element);
if (current == 0) {
return 0;
... | Removes a number of occurrences of the specified element from this multiset. If the multiset contains fewer than this number of occurrences to begin with, all occurrences will be removed. |
public MemberByNameAndAccessMap(List<? extends TMember> members){
this.members=members;
}
| Create new map for the list of members. |
public Alias indexRouting(String indexRouting){
this.indexRouting=indexRouting;
return this;
}
| Associates an index routing value to the alias |
public static void write(int descriptor,MouseEvent me,float latPoint,float lonPoint,LinkProperties props,Link link) throws IOException {
if (props.getProperty(LPC_GRAPHICID) != null) {
descriptor=LinkUtil.setMask(descriptor,GRAPHIC_ID_MASK);
}
link.start(Link.ACTION_REQUEST_HEADER);
link.dos.writeFloat(vers... | Write a MouseEvent on the link to the server. |
public Iterable<Result<Upload>> listIncompleteUploads(String bucketName,String prefix) throws XmlPullParserException {
return listIncompleteUploads(bucketName,prefix,true,true);
}
| Lists incomplete uploads of objects in given bucket and prefix. |
private void collectingToASet(List<Trade> trades){
Set<Trade> bigTrades=trades.stream().filter(null).collect(toSet());
bigTrades.forEach(null);
}
| This method demontrates the mechanism of collecting big trades to a set |
public boolean isUpdate(){
return oneRowChange.getAction() == RowChangeData.ActionType.UPDATE;
}
| Returns true if this is an update. |
public static void cancelMessage(Runnable runnable){
handler.removeCallbacks(runnable);
}
| Cancel a message already sent to the future. |
private boolean itemIsObscuredByHeader(RecyclerView parent,View item,View header,int orientation){
RecyclerView.LayoutParams layoutParams=(RecyclerView.LayoutParams)item.getLayoutParams();
Rect headerMargins=mDimensionCalculator.getMargins(header);
int adapterPosition=parent.getChildAdapterPosition(item);
if (a... | Determines if an item is obscured by a header |
public Shape triangle_up(float x,float y,float height){
m_path.reset();
m_path.moveTo(x,y + height);
m_path.lineTo(x + height / 2,y);
m_path.lineTo(x + height,(y + height));
m_path.closePath();
return m_path;
}
| Returns a up-pointing triangle of the given dimenisions. |
public static void addHandler(Handler handler){
LogManager.getLogManager().getLogger("").addHandler(handler);
}
| Add a handler to the root logger. |
public boolean isShowMatch(){
return showMatch;
}
| Returns whether index time tokens that match query time tokens will be marked as a "match". |
protected void printComponent(Graphics g){
paintComponent(g);
}
| This is invoked during a printing operation. This is implemented to invoke <code>paintComponent</code> on the component. Override this if you wish to add special painting behavior when printing. |
@Deprecated public Detector[] instantiateDetectorsInPass(BugReporter bugReporter){
int count;
count=0;
for ( DetectorFactory factory : orderedFactoryList) {
if (factory.isDetectorClassSubtypeOf(Detector.class)) {
count++;
}
}
Detector[] detectorList=new Detector[count];
count=0;
for ( Dete... | Instantiate all of the detectors in this pass as objects implementing the BCEL-only Detector interface. Detectors that do not support this interface will not be created. Therefore, new code should use the instantiateDetector2sInPass() method, which can support all detectors. |
public MemberTable(final MemberTableModel model,final List<BaseType> baseTypes){
super(model);
setSurrendersFocusOnKeystroke(true);
addMouseListener(new MemberTableMouseListener(this));
getColumnModel().getColumn(MemberTableModel.TYPE_COLUMN).setCellEditor(new DefaultCellEditor(new TypeComboBox(new TypeListMode... | Instantiates a new member table. |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-02-24 13:04:39.865 -0500",hash_original_method="4CBE318B56F1B985563A577FAF49DFF2",hash_generated_method="5BFD624F16B9244833249DF0E5BD5398") public void removeGesture(String entryName,Gesture gesture){
ArrayList<Gesture> gestures=mNamedGesture... | Remove a gesture from the library. If there are no more gestures for the given entry, the gesture entry will be removed. |
public String toString(){
StringBuffer result=new StringBuffer();
result.append("[");
int s1=sizes.size();
for (int i=0; i < s1; ++i) {
int s2=sizes.get(i);
result.append("[");
for (int j=0; j < s2; ++j) {
result.append(vector[i][j]);
if (j + 1 < s2) result.append(", ");
}
... | Returns a text representation of this vector. |
public static String toASCII(String name){
Info info=new Info();
StringBuilder result=new StringBuilder();
UTS46_INSTANCE.nameToASCII(name,result,info);
if (info.hasErrors()) {
throw new IllegalArgumentException("Errors: " + Joiner.on(',').join(info.getErrors()));
}
return result.toString();
}
| Translates a string from Unicode to ASCII Compatible Encoding (ACE), as defined by the ToASCII operation of <a href="http://www.ietf.org/rfc/rfc3490.txt">RFC 3490</a>. <p>This method always uses <a href="http://unicode.org/reports/tr46/">UTS46 transitional processing</a>. |
public boolean firstTimeIn(){
try {
mRetainedFragment=(RetainedFragment)mFragmentManager.get().findFragmentByTag(mRetainedFragmentTag);
if (mRetainedFragment == null) {
Log.d(TAG,"Creating new RetainedFragment " + mRetainedFragmentTag);
mRetainedFragment=new RetainedFragment();
mFragmentMana... | Initializes the RetainedFragment the first time it's called. |
protected void shutdown(){
this.initiationListenerExecutor.shutdownNow();
}
| Shuts down the listeners executor service. |
public static void dropAllTables(SQLiteDatabase db,boolean ifExists){
GroupVideoDao.dropTable(db,ifExists);
}
| Drops underlying database table using DAOs. |
private MotionEvent swapXY(MotionEvent ev){
float width=getWidth();
float height=getHeight();
float newX=(ev.getY() / height) * width;
float newY=(ev.getX() / width) * height;
ev.setLocation(newX,newY);
return ev;
}
| Swaps the X and Y coordinates of your touch event. |
public boolean isStatic(){
return isStatic;
}
| isStatic returns the default that a field is not static. |
public caption addElement(Element element){
addElementToRegistry(element);
return (this);
}
| Add an element to the element |
public SettingsPanel(){
setLayout(new BorderLayout());
buttonBar=new JPanel();
buttonBar.setUI(new ButtonBarUI());
EqualsLayout layout=new EqualsLayout(EqualsLayout.LEFT,0);
buttonBar.setLayout(layout);
add("North",buttonBar);
buttonGroup=new ButtonGroup();
panelTmmSettings=new TmmSettingsContainerPanel... | Create the panel. |
public KerberosTicket(byte[] asn1Encoding,KerberosPrincipal client,KerberosPrincipal server,byte[] sessionKey,int keyType,boolean[] flags,Date authTime,Date startTime,Date endTime,Date renewTill,InetAddress[] clientAddresses){
init(asn1Encoding,client,server,sessionKey,keyType,flags,authTime,startTime,endTime,renewTi... | Constructs a KerberosTicket using credentials information that a client either receives from a KDC or reads from a cache. |
public static void dropTable(SQLiteDatabase db,boolean ifExists){
String sql="DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "'FRIEND'";
db.execSQL(sql);
}
| Drops the underlying database table. |
public static void NV21toI420SemiPlanar(byte[] nv21bytes,byte[] i420bytes,int width,int height){
System.arraycopy(nv21bytes,0,i420bytes,0,width * height);
for (int i=width * height; i < nv21bytes.length; i+=2) {
i420bytes[i]=nv21bytes[i + 1];
i420bytes[i + 1]=nv21bytes[i];
}
}
| NV21 is a 4:2:0 YCbCr, For 1 NV21 pixel: YYYYYYYY VUVU I420YUVSemiPlanar is a 4:2:0 YUV, For a single I420 pixel: YYYYYYYY UVUV Apply NV21 to I420YUVSemiPlanar(NV12) Refer to https://wiki.videolan.org/YUV/ |
public TObjectIntHashMap(){
super();
}
| Creates a new <code>TObjectIntHashMap</code> instance with the default capacity and load factor. |
public String toString(){
StringBuffer sb=new StringBuffer("MPaymentProcessor[").append(get_ID()).append("-").append(getName()).append("]");
return sb.toString();
}
| String representation |
public SpecificInsteonLight(String systemName,SerialTrafficController tc){
super(systemName,tc);
this.tc=tc;
}
| Create a Light object, with only system name. <P> 'systemName' was previously validated in SerialLightManager |
public void addDocument(String name,int parentDivId,String fileExt,int sortOrder,InputStream inputStreamDocumentFile,Reader readerAnnFile) throws Exception {
checkExistsParent(parentDivId);
checkValidDocumentName(parentDivId,name);
m_documents.addNewDocument(name,parentDivId,fileExt,sortOrder,inputStreamDocumentF... | Agrega un nuevo documento a un clasificador |
public ScheduledThreadPoolExecutor(int corePoolSize,ThreadFactory threadFactory,RejectedExecutionHandler handler){
super(corePoolSize,Integer.MAX_VALUE,0,NANOSECONDS,new DelayedWorkQueue(),threadFactory,handler);
}
| Creates a new ScheduledThreadPoolExecutor with the given initial parameters. |
public DockerContainersUtil kill(){
return kill(false);
}
| Removes all containers in the util object |
@Override public void deleteBlob(String blobName) throws IOException {
throw new UnsupportedOperationException("URL repository is read only");
}
| This operation is not supported by URLBlobContainer |
public void connect(Context context,BluetoothDevice device){
setState(State.STATE_CONNECTING);
mBluetoothGatt=device.connectGatt(context,false,mBTGattCallback);
}
| Connect to a GATT server. |
public void testGetLinkTravelTime_NoFilterModes(){
Network network=NetworkUtils.createNetwork();
TravelTimeCalculatorConfigGroup config=new TravelTimeCalculatorConfigGroup();
config.setTraveltimeBinSize(900);
config.setAnalyzedModes("");
config.setFilterModes(false);
TravelTimeCalculator ttc=new TravelTimeC... | Disable filtering but also set analyzed modes to an empty string. Expect that still all modes are counted. |
private static void addDefaultProfile(SpringApplication app,SimpleCommandLinePropertySource source){
if (!source.containsProperty("spring.profiles.active") && !System.getenv().containsKey("SPRING_PROFILES_ACTIVE")) {
app.setAdditionalProfiles(Constants.SPRING_PROFILE_DEVELOPMENT);
}
}
| If no profile has been configured, set by default the "dev" profile. |
public static boolean check(LocPathIterator path){
HasPositionalPredChecker hppc=new HasPositionalPredChecker();
path.callVisitors(null,hppc);
return hppc.m_hasPositionalPred;
}
| Process the LocPathIterator to see if it contains variables or functions that may make it context dependent. |
public boolean login() throws LoginException {
switch (status) {
case UNINITIALIZED:
default :
throw new LoginException("The login module is not initialized");
case INITIALIZED:
case AUTHENTICATED:
if (token && !nullStream) {
throw new LoginException("if keyStoreType is " + P11KEYSTORE + " then keyStoreURL mu... | Authenticate the user. <p> Get the Keystore alias and relevant passwords. Retrieve the alias's principal and credentials from the Keystore. <p> |
public String globalInfo(){
return "Class for building an ensemble of randomizable base classifiers. Each " + "base classifiers is built using a different random number seed (but based " + "one the same data). The final prediction is a straight average of the "+ "predictions generated by the individual base classifie... | Returns a string describing classifier |
public OnePlayerRoomDoor(final String clazz){
super(clazz);
SingletonRepository.getTurnNotifier().notifyInTurns(60,new PeriodicOpener());
}
| Creates a new OnePlayerRoomDoor. |
public NotificationChain basicSetVersionConstraint(VersionConstraint newVersionConstraint,NotificationChain msgs){
VersionConstraint oldVersionConstraint=versionConstraint;
versionConstraint=newVersionConstraint;
if (eNotificationRequired()) {
ENotificationImpl notification=new ENotificationImpl(this,Notifica... | <!-- begin-user-doc --> <!-- end-user-doc --> |
protected AssociationDefinition_Impl(){
super();
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
private void initBPartner(){
m_greeting=fillGreeting();
m_gbc.anchor=GridBagConstraints.NORTHWEST;
m_gbc.gridx=0;
m_gbc.gridy=0;
m_gbc.gridwidth=1;
m_gbc.weightx=0;
m_gbc.weighty=0;
m_gbc.fill=GridBagConstraints.HORIZONTAL;
m_gbc.ipadx=0;
m_gbc.ipady=0;
m_line=0;
fValue=new VString("Value",true,... | Dynamic Init |
public TreeLoader createTreeLoader(){
return new TreeLoader(_classLoader);
}
| tree-loader: loads jars in a directory tree |
private void applyWithImport(QualifiedName qualifiedName,String alias,IDocument document,ConfigurableCompletionProposal proposal) throws BadLocationException {
int topPixel=-1;
StyledText widget=viewer.getTextWidget();
if (widget != null) topPixel=widget.getTopPixel();
ITextViewerExtension viewerExtension=nul... | Applies the proposal and imports the given qualifiedName with the given alias (may be null). Prevents flickering by temporarily disabling redraw on the text viewer widget. |
private void growSpine(){
int size=(spine.length << 1) + 1;
spine=new int[size];
spineEmpty=new int[size];
threshold=(int)(spine.length * loadFactor);
Arrays.fill(spineEmpty,-1);
GridUnsafe.copyMemory(spineEmpty,INT_ARR_OFF,spine,INT_ARR_OFF,spineEmpty.length << 2);
for (int i=0; i < this.size; i++) {
... | Expands the hash "spine" - equivalent to increasing the number of buckets in a conventional hash table. |
public boolean match(Object other){
if (!this.getClass().equals(other.getClass())) return false;
GenericObjectList that=(GenericObjectList)other;
ListIterator hisIterator=that.listIterator();
outer: while (hisIterator.hasNext()) {
Object hisobj=hisIterator.next();
Object myobj=null;
ListIterator... | Match with a template (return true if we have a superset of the given template. This can be used for partial match (template matching of SIP objects). Note -- this implementation is not unnecessarily efficient :-) |
private String replaceInlist(String str){
try {
Pattern pt=Pattern.compile("(?i)\\s*IN\\s*\\('?\\d+'?,");
Matcher m=pt.matcher(str);
if (m.find()) {
int start=m.start();
int idx=str.indexOf(')',start);
if (idx < 0 || idx == str.length() - 1) return str.substring(0,start) + " IN (..... | We might have a case processlist cannot print the full inlist This should be used after all other normalize operations |
public void paintChildren(Graphics g){
paintChildren(g,null);
paintPainters(g);
}
| Same as JComponent.paintChildren() except any PaintListeners are notified and the border is painted over the children. |
private void updateProgress(String progressLabel,int progress){
if (myHost != null && ((progress != previousProgress) || (!progressLabel.equals(previousProgressLabel)))) {
myHost.updateProgress(progressLabel,progress);
}
previousProgress=progress;
previousProgressLabel=progressLabel;
}
| Used to communicate a progress update between a plugin tool and the main Whitebox user interface. |
@Override public boolean isActive(){
return amIActive;
}
| Used by the Whitebox GUI to tell if this plugin is still running. |
public void moveNextPosition(boolean smooth){
if (getRealAdapter() == null) throw new IllegalStateException("You did not set a slider adapter");
if (baseSliderAdapter.getCount() <= 2 || (!isCycling && simpleViewPager.getCurrentItem() == baseSliderAdapter.getCount() - 1)) simpleViewPager.setCurrentItem(0,false);... | move to next slide. |
public String optString(int index){
return this.optString(index,"");
}
| Get the optional string value associated with an index. It returns an empty string if there is no value at that index. If the value is not a string and is not null, then it is coverted to a string. |
public void release(ServerCommit commit){
pool.add(commit);
}
| Releases a commit back to the pool. |
public void overrideDifferenceListener(final DifferenceListener listener){
if (listener != null) {
_listeners.clear();
_listeners.add(listener);
}
}
| Overrides DifferenceListener.<br> <p/>Method will clear all the DifferenceListeners and put only one <p/>DifferenceListener passed as an argument |
public void onChatMessageDisplayReportSent(String chatId,ContactId remote,String msgId){
mChatService.onDisplayReportSent(chatId,remote,msgId);
}
| Handle imdn DISPLAY report sent for message |
public void renderPathTile(Object ctx,byte[] atile,int offset,int tilesize,int x,int y,int w,int h){
TileContext context=(TileContext)ctx;
PaintContext paintCtxt=context.paintCtxt;
CompositeContext compCtxt=context.compCtxt;
SunGraphics2D sg=context.sunG2D;
Raster srcRaster=paintCtxt.getRaster(x,y,w,h);
Col... | GeneralCompositePipe.renderPathTile works with custom composite operator provided by an application |
public int hashCode(){
return reduce_with().hashCode();
}
| Compute a hash code. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.