code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public static void removeAllBeansFromContainer(JComponent container,Integer... tab){
int index=0;
if (tab.length > 0) {
index=tab[0].intValue();
}
Vector<Object> components=null;
if (TABBED_COMPONENTS.size() > 0 && index < TABBED_COMPONENTS.size()) {
components=TABBED_COMPONENTS.get(index);
}
if (... | Removes all beans from containing component |
public StringIndexOutOfBoundsException(String s,int offset,int count){
this(s.length(),offset,count);
}
| Used internally for consistent high-quality error reporting. |
public String describeReferenceTo(JavaThing target,Snapshot ss){
JavaThing[] flds=getFields();
for (int i=0; i < flds.length; i++) {
if (flds[i] == target) {
JavaField f=getClazz().getFieldForInstance(i);
return "field " + f.getName();
}
}
return super.describeReferenceTo(target,ss);
}
| Describe the reference that this thing has to target. This will only be called if target is in the array returned by getChildrenForRootset. |
private void drawDivider(Canvas canvas,View view,Divider divider,Position position){
EnumSet<Direction> directions=Direction.getSouthEastCorner();
if (position.getColumn() == 0) {
directions.add(Direction.SOUTH_WEST);
directions.add(Direction.WEST);
}
if (position.getRow() == 0) {
directions.add(Dir... | Draw the provided divider. Each divider is responsible for drawing some of his surroundings. Drawing priorities follows a top-to-bottom and left-to-right rule, this means that the north-west item will draw all his dividers all the other north cells will draw all but west separators, and west cells will draw all but nor... |
public void reset(ActionMapping mapping,HttpServletRequest request){
op="";
subjectAreaId=null;
courseOfferingId=null;
instrOfferingId=null;
courseName="";
title="";
scheduleBookNote="";
demandCourseOfferingId=null;
consent=null;
creditFormat=null;
creditType=null;
creditUnitType=null;
units=n... | Method reset |
@Override public StringBuilder format(final StringBuilder sb,final long w){
final int initPosition=sb.length();
sb.append(mLocalFormat.format(w));
final int currLength=sb.length() - initPosition;
final int pad=mLength - currLength;
if (pad > 0) {
sb.append(mPadding,0,pad);
}
return sb;
}
| Format long into StringBuilder |
public void reverse(){
reverse(0,_pos);
}
| Reverse the order of the elements in the list. |
public static void assertRegex(String regex,String string){
Pattern p=Pattern.compile(regex);
assertTrue(string,p.matcher(string).matches());
}
| Asserts that a string matches a regular expression. |
public void sendSerialMessage(SerialMessage m,SerialListener reply){
sendMessage(m,reply);
}
| Forward a preformatted message to the actual interface. |
private void allocateIndex(){
if (index != null) throw new IllegalStateException();
if (!open.get()) {
throw new IllegalStateException();
}
store=new MemStore(new MemoryManager(DirectBufferPool.INSTANCE));
if (isBTree) {
index=BTree.create(store,metadata);
}
else {
index=HTree.create(store,(H... | Create the persistence capable index. |
FormatSpecifierParser(String format){
this.format=format;
this.length=format.length();
}
| Constructs a new parser for the given format string. |
public static PrivateKey mutate(final PrivateKey key){
return new PrivateKey(key.getRaw().add(BigInteger.ONE));
}
| Mutates key into a slightly different key. |
@DSComment("Private Method") @DSBan(DSCat.PRIVATE_METHOD) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 13:02:35.748 -0500",hash_original_method="8F28A3C0281B6F16DECF00092A03388F",hash_generated_method="E6B3AE3BEB63D05981CAAF6DB37BEC46") private boolean isFreshnessLifetimeHeuristic()... | Returns true if computeFreshnessLifetime used a heuristic. If we used a heuristic to serve a cached response older than 24 hours, we are required to attach a warning. |
public void dispose(IoSession session) throws Exception {
}
| Override this method to dispose all resources related with this decoder. The default implementation does nothing. |
public static boolean nameEquals(char[][] typeName,String string){
StringBuilder sb=new StringBuilder();
boolean first=true;
for ( char[] elem : typeName) {
if (first) first=false;
else sb.append('.');
sb.append(elem);
}
return string.contentEquals(sb);
}
| Checks if an eclipse-style array-of-array-of-characters to represent a fully qualified name ('foo.bar.baz'), matches a plain string containing the same fully qualified name with dots in the string. |
public void cloneSprite() throws IOException {
print("cloneSprite",null);
}
| Description of the Method |
public void dropActionChanged(DragSourceDragEvent dsde){
Debug.message("dndlistener","dropActionChanged(source)");
int action=dsde.getDropAction();
Debug.message("dndlistener","action=" + action);
if (action == default_action) {
dsde.getDragSourceContext().setCursor(getCursor(DragSource.DefaultMoveDrop));
... | Called when the user has modified the drop gesture. This method is invoked when the state of the input device(s) that the user is interacting with changes. Such devices are typically the mouse buttons or keyboard modifiers that the user is interacting with. <P> |
public boolean validate(Node nodeSignature) throws DigitalSignatureValidationException {
DOMValidateContext validationContext=new DOMValidateContext(factory.newKeySelector(nodeSignature),nodeSignature);
return validate(validationContext);
}
| Steps: <ul> <li>create validation context <li>unmarshal the XMLSignature <li>validate </ul> |
public void opc_ifnull(Label l){
short instrBCI=getLength();
emitByte(opc_ifnull);
l.add(this,instrBCI,getLength(),getStack() - 1);
emitShort((short)-1);
decStack();
}
| Control flow with forward-reference BCI. Stack assumes straight control flow. |
protected final void FP_MOV_OP_MOV(Instruction s,Operator op,Operand result,Operand val1,Operand val2){
if (VM.BuildForSSE2) {
UNREACHABLE();
}
else {
EMIT(CPOS(s,MIR_Move.create(IA32_FMOV,D(getFPR(0)),val1)));
EMIT(MIR_BinaryAcc.mutate(s,op,D(getFPR(0)),val2));
EMIT(CPOS(s,MIR_Move.create(IA32_FMO... | Expansion of FP_ADD_ACC, FP_MUL_ACC, FP_SUB_ACC, and FP_DIV_ACC. Moves first value into fp0, accumulates second value into fp0 using op, moves fp0 into result. |
public static int flip(int type,int data,FlipDirection direction){
int flipX=0;
int flipY=0;
int flipZ=0;
switch (direction) {
case NORTH_SOUTH:
flipZ=1;
break;
case WEST_EAST:
flipX=1;
break;
case UP_DOWN:
flipY=1;
break;
}
switch (type) {
case BlockID.TORCH:
case BlockID.REDSTONE_TORCH_OFF:
case BlockID.R... | Flip a block's data value. |
public static double angle(double[] v1,double[] v2){
final int mindim=(v1.length >= v2.length) ? v1.length : v2.length;
double s=0, e1=0, e2=0;
for (int k=0; k < mindim; k++) {
final double r1=v1[k];
final double r2=v2[k];
s+=r1 * r2;
e1+=r1 * r1;
e2+=r2 * r2;
}
for (int k=mindim; k < v1.l... | Compute the angle between two vectors. |
public void add(EventBean[] events){
if (events == null) {
return;
}
for (int i=0; i < events.length; i++) {
add(events[i]);
}
}
| Add events to the buffer. |
public StatMonitorHandler(){
}
| Constructs a new StatMonitorHandler instance |
@Description(summary="Build the h2console.war file.") public void warConsole(){
jar();
copy("temp/WEB-INF",files("src/tools/WEB-INF/web.xml"),"src/tools/WEB-INF");
copy("temp",files("src/tools/WEB-INF/console.html"),"src/tools/WEB-INF");
copy("temp/WEB-INF/lib",files("bin/h2" + getJarSuffix()),"bin");
FileLis... | Build the h2console.war file. |
public MemoryExampleTable(List<Attribute> attributes,DataRowFactory factory,int size){
this(attributes);
dataList=new ArrayList<DataRow>(size);
for (int i=0; i < size; i++) {
DataRow dataRow=factory.create(attributes.size());
for ( Attribute attribute : attributes) {
dataRow.set(attribute,Double.... | Creates a new instance of MemoryExampleTable. |
public void destroyDialog(final Class<?> dialogController){
dialogControllers.get(dialogController).destroyDialog();
}
| Forces destruction of the selected dialog (if an instance is actually kept). Proper UI behavior is ensured only if dialog is not currently shown on the stage. |
public Object[] toArray(Object[] a){
if (a.length < size) {
a=(Object[])java.lang.reflect.Array.newInstance(a.getClass().getComponentType(),size);
}
int i=0;
for (Entry e=header.next; e != header; e=e.next) {
a[i++]=e.element;
}
if (a.length > size) {
a[size]=null;
}
return a;
}
| Returns an array containing all of the elements in this list in the correct order; the runtime type of the returned array is that of the specified array. If the list fits in the specified array, it is returned therein. Otherwise, a new array is allocated with the runtime type of the specified array and the size of th... |
public static byte[] join(byte[]... bufs){
int size=0;
for ( byte[] buf : bufs) {
size+=buf.length;
}
byte[] res=new byte[size];
int position=0;
for ( byte[] buf : bufs) {
arrayCopy(buf,0,res,position,buf.length);
position+=buf.length;
}
return res;
}
| Join byte arrays into single one. |
public boolean zip(File[] src,File dest){
return false;
}
| Implement in your project, bundle files into a zip file. |
public Vector2 mul(Vector2 v){
float x=vals[POS_X] + vals[COS] * v.x + -vals[SIN] * v.y;
float y=vals[POS_Y] + vals[SIN] * v.x + vals[COS] * v.y;
v.x=x;
v.y=y;
return v;
}
| Transforms the given vector by this transform |
private void recreateDirectoryIfVersionChanges(){
boolean recreateBase=false;
if (!mRootDirectory.exists()) {
recreateBase=true;
}
else if (!mVersionDirectory.exists()) {
recreateBase=true;
FileTree.deleteRecursively(mRootDirectory);
}
if (recreateBase) {
try {
FileUtils.mkdirs(mVersi... | Checks if we have to recreate rootDirectory. This is needed because old versions of this storage created too much different files in the same dir, and Samsung's RFS has a bug that after the 13.000th creation fails. So if cache is not already in expected version let's destroy everything (if not in expected version... th... |
public static void parametersToAttributes(HttpServletRequest request){
java.util.Enumeration<String> e=UtilGenerics.cast(request.getParameterNames());
while (e.hasMoreElements()) {
String name=e.nextElement();
request.setAttribute(name,request.getParameter(name));
}
}
| Put request parameters in request object as attributes. |
@DSComment("Private Method") @DSBan(DSCat.PRIVATE_METHOD) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 13:00:09.171 -0500",hash_original_method="35E0733B1286860BF21842013F8FFA5F",hash_generated_method="74ED8BFECD329202BD9A7991EB86B847") private String readName() throws IOException, ... | Returns an element or attribute name. This is always non-empty for non-relaxed parsers. |
public GPUImageDilationFilter(int radius){
this(getVertexShader(radius),getFragmentShader(radius));
}
| Acceptable values for dilationRadius, which sets the distance in pixels to sample out from the center, are 1, 2, 3, and 4. |
private void handleResponse(int response,ResponseData rawData){
mPolicy.processServerResponse(response,rawData);
if (mPolicy.allowAccess()) {
mCallback.allow(response);
}
else {
mCallback.dontAllow(response);
}
}
| Confers with policy and calls appropriate callback method. |
public org.apache.nutch.storage.WebPage.Builder clearMetadata(){
metadata=null;
fieldSetFlags()[22]=false;
return this;
}
| Clears the value of the 'metadata' field |
public static void clearFlow(){
sFlowMap.clear();
}
| Clear flow map. |
public HGPersistentHandle store(byte[] data){
HGPersistentHandle handle=config.getHandleFactory().makeHandle();
store(handle,data);
return handle;
}
| <p>Write raw binary data to the store. A new persistent handle is created to refer to the data.</p> |
public FightBattleDetails waitForBattleSelection(){
return m_battlePanel.waitForBattleSelection();
}
| Blocks until the user selects a battle to fight. |
@Override public void g(float sideMot,float forMot){
if (!CustomEntities.customEntities.contains(this)) {
super.g(sideMot,forMot);
return;
}
if (getSize() != 3) setSize(3);
if (this.passenger != null && this.passenger instanceof EntityHuman && CustomEntities.customEntities.contains(this)) {
this.l... | WASD Control. |
private long startWait(){
return System.nanoTime();
}
| Initialize the timeout timer |
public ColladaVisualScene(String ns){
super(ns);
}
| Construct an instance. |
private void put(final Item i){
if (index + typeCount > threshold) {
int ll=items.length;
int nl=ll * 2 + 1;
Item[] newItems=new Item[nl];
for (int l=ll - 1; l >= 0; --l) {
Item j=items[l];
while (j != null) {
int index=j.hashCode % newItems.length;
Item k=j.next;
j... | Puts the given item in the constant pool's hash table. The hash table <i>must</i> not already contains this item. |
public String toString(){
final String TAB=" ";
StringBuffer retValue=new StringBuffer();
retValue.append("AdressOperator ( ").append("address = ").append(this.address).append(TAB).append(" )");
return retValue.toString();
}
| Constructs a <code>String</code> with all attributes in name = value format. |
public SimpleCompositeService(Iterable<CompositeServiceEntry<? super I,? extends O>> services){
super(services);
}
| Creates a new instance that is composed of the specified entries. |
static void testIsSameFile(Path tmpdir) throws IOException {
Path thisFile=tmpdir.resolve("thisFile");
Path thatFile=tmpdir.resolve("thatFile");
assertTrue(isSameFile(thisFile,thisFile));
try {
isSameFile(thisFile,thatFile);
throw new RuntimeException("IOException not thrown");
}
catch ( IOException... | Tests isSameFile |
public boolean isShunned(DistributedMember m){
if (!shunnedMembers.containsKey(m)) {
return false;
}
latestViewWriteLock.lock();
try {
long shunTime=shunnedMembers.get(m).longValue();
long now=System.currentTimeMillis();
if (shunTime + SHUNNED_SUNSET * 1000 > now) {
return true;
}
... | Indicate whether the given member is in the zombie list (dead or dying) |
@RequestMapping(method=RequestMethod.GET) public String redirectToAdvancedSearch(){
return "redirect:/search/advanced_search";
}
| If the users decides to write "http://localhost:8080/search/" into the browser she should get redirected to the advanced search formular |
public GPathResult parse(final String uri) throws IOException, SAXException {
return parse(new InputSource(uri));
}
| Parse the content of the specified URI into a GPathResult Object |
public SelectItemsIterator(FacesContext ctx,UIComponent parent){
kids=parent.getChildren().listIterator();
this.ctx=ctx;
}
| <p>Construct an iterator instance for the specified parent component.</p> |
public int read() throws IOException {
if (_input == null) throw new IOException("Reader closed");
return (_index < _input.length()) ? _input.charAt(_index++) : -1;
}
| Reads a single character. This method does not block, <code>-1</code> is returned if the end of the character sequence input has been reached. |
@Override public boolean isActive(){
return amIActive;
}
| Used by the Whitebox GUI to tell if this plugin is still running. |
protected List refreshTicksHorizontal(Graphics2D g2,Rectangle2D dataArea,RectangleEdge edge){
List result=new java.util.ArrayList();
Font tickLabelFont=getTickLabelFont();
g2.setFont(tickLabelFont);
if (isAutoTickUnitSelection()) {
selectAutoTickUnit(g2,dataArea,edge);
}
TickUnit tu=getTickUnit();
dou... | Calculates the positions of the tick labels for the axis, storing the results in the tick label list (ready for drawing). |
public void testClearBitNegativeOutside1(){
byte aBytes[]={1,-128,56,100,-2,-76,89,45,91,3,-15,35,26};
int aSign=-1;
int number=150;
byte rBytes[]={-65,-1,-1,-1,-1,-1,-2,127,-57,-101,1,75,-90,-46,-92,-4,14,-36,-26};
BigInteger aNumber=new BigInteger(aSign,aBytes);
BigInteger result=aNumber.clearBit(number);... | clearBit(int n) outside a negative number |
public static boolean deleteFilesInFolder(Context context,@NonNull final File folder){
boolean totalSuccess=true;
String[] children=folder.list();
if (children != null) {
for ( String child : children) {
File file=new File(folder,child);
if (!file.isDirectory()) {
boolean success=delete... | Delete all files in a folder. |
public void removeListener(final IGraphBuilderManagerListener listener){
m_listeners.removeListener(listener);
}
| Removes a previously listening listener. |
public static void validateCertificate(boolean production,X509Certificate certificate) throws CertificateException {
if (certificate == null) throw new CertificateException("Null certificate");
certificate.checkValidity();
final Map<String,String> stringStringMap=CertificateUtils.splitCertificateSubject(certifi... | Checks a certificate for it's validity, as well as that it's a push certificate. |
public static String checkNull(String string1,String string2){
if (string1 != null) return string1;
else if (string2 != null) return string2;
else return "";
}
| Returns the first passed String if not null, otherwise the second if not null, otherwise an empty but non-null String. |
public static boolean supportsAdd(int type){
switch (type) {
case Value.BYTE:
case Value.DECIMAL:
case Value.DOUBLE:
case Value.FLOAT:
case Value.INT:
case Value.LONG:
case Value.SHORT:
return true;
default :
return false;
}
}
| Check if the given value type supports the add operation. |
private static String processStringWithRegex(String text,Pattern pattern,int startIndex,boolean recurseEmojify){
Matcher matcher=pattern.matcher(text);
StringBuffer sb=new StringBuffer();
int resetIndex=0;
if (startIndex > 0) {
matcher.region(startIndex,text.length());
}
while (matcher.find()) {
Str... | Common method used for processing the string to replace with emojis |
public Property millisOfSecond(){
return new Property(this,getChronology().millisOfSecond());
}
| Get the millis of second property |
public static boolean isValidSubnet(int hash){
int bits=0;
while ((hash & 0b1) == 0 && bits < 31) {
hash>>=1;
bits++;
}
while ((hash & 0b1) == 1 && bits < 32) {
hash>>=1;
bits++;
}
return bits == 32;
}
| Makes sure there are no high bits less significant than low bits. |
public int hashCode(){
return name.hashCode();
}
| Returns the hash code for this GeneralName. |
public void paintTabbedPaneTabBackground(SynthContext context,Graphics g,int x,int y,int w,int h,int tabIndex,int orientation){
paintTabbedPaneTabBackground(context,g,x,y,w,h,tabIndex);
}
| Paints the background of a tab of a tabbed pane. This implementation invokes the method of the same name without the orientation. |
private void deleteImpl(final int startIndex,final int endIndex,final int len){
System.arraycopy(buffer,endIndex,buffer,startIndex,size - endIndex);
size-=len;
}
| Internal method to delete a range without validation. |
public final float readFloat() throws IOException {
return Float.intBitsToFloat(readInt());
}
| Reads a <code>float</code> from this file. This method reads an <code>int</code> value as if by the <code>readInt</code> method and then converts that <code>int</code> to a <code>float</code> using the <code>intBitsToFloat</code> method in class <code>Float</code>. <p/> This method blocks until the four bytes are read,... |
protected AssociationRequest(ParameterList params){
super(params);
}
| Constructs an AssociationRequest message from a parameter list. <p> Useful for processing incoming messages. |
public AbLetterFilterListView(Context context){
super(context);
init(context);
}
| Instantiates a new ab letter filter list view. |
protected MoreCode_Impl(){
super();
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public Poloni(){
super(2,2);
}
| Constructs the Poloni problem. |
public RangeCondition includeLower(Boolean includeLower){
this.includeLower=includeLower;
return this;
}
| Sets if the lower value must be included. |
private PathDataEvaluator(){
}
| Create a PathParser.PathDataNode[] that does not reuse the animated value. Care must be taken when using this option because on every evaluation a new <code>PathParser.PathDataNode[]</code> will be allocated. |
@DSComment("From safe class list") @DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:57:21.282 -0500",hash_original_method="217DDC96D1B25C0D1457937D523A3AA4",hash_generated_method="8D3841501153DC8DC4D44C4E93EC71D1") public final void signal(){
if (!isHeldExc... | Moves the longest-waiting thread, if one exists, from the wait queue for this condition to the wait queue for the owning lock. |
public UserActiveException(){
super();
}
| Constructs a new exception with <code>null</code> as its detail message. The cause is not initialized. |
public void updateAccessTime(){
attributes.setLastAccessedTime(System.currentTimeMillis());
}
| Update the last accessed time |
protected List<double[]> categorize(){
int[] n=new int[numberOfGroups];
for ( Observation observation : data) {
n[observation.getGroup()]++;
}
List<double[]> groupedData=new ArrayList<double[]>();
for (int i=0; i < numberOfGroups; i++) {
groupedData.add(new double[n[i]]);
}
for ( Observation obs... | Organizes the observations by their group. |
@Override public void close(){
if (root == null) {
throw new IllegalStateException(ERROR_CLOSED);
}
fileStore.lock.lock();
try {
super.close();
fileStore.close();
if (openCloseEvent != null) {
openCloseEvent.end();
openCloseEvent=null;
}
}
finally {
fileStore.lock.unlock(... | Extended to also close the backing file. |
public <T>DataStream<T> foldNeighbors(T initialValue,final EdgesFold<K,EV,T> foldFunction){
return windowedStream.fold(initialValue,new EdgesFoldFunction<K,EV,T>(foldFunction));
}
| Performs a neighborhood fold on the graph window stream. |
void add(Iterable<S3TimeData> newData){
assert newData != null;
synchronized (mux) {
for ( S3TimeData data : newData) map.put(data.getKey(),data);
mux.notifyAll();
}
}
| Adds list of data this task should look after. |
@Override public boolean isMultiple(){
return getReferenceGeometry().isMultiple();
}
| Method isMultiple() |
public void paintMenuBarBackground(SynthContext context,Graphics g,int x,int y,int w,int h){
}
| Paints the background of a menu bar. |
public String toString(){
return name;
}
| Returns the string representation of this Scale object. The string representation is the name of the Scale object. |
public static void markInActiveUnManagedVolumes(StorageSystem storageSystem,Set<URI> discoveredUnManagedVolumes,DbClient dbClient,PartitionManager partitionManager){
_log.info(" -- Processing {} discovered UnManaged Volumes Objects from -- {}",discoveredUnManagedVolumes.size(),storageSystem.getLabel());
if (discove... | This method cleans up UnManaged Volumes in DB, which had been deleted manually from the Array 1. Get All UnManagedVolumes from DB 2. Store URIs of unmanaged volumes returned from the Provider in unManagedVolumesBookKeepingList. 3. If unmanaged volume is found only in DB, but not in unManagedVolumesBookKeepingList, then... |
public void endPreserveAspectRatio() throws ParseException {
hasPreserveAspectRatio=true;
}
| Invoked when the PreserveAspectRatio parsing ends. |
@Override public int compareTo(Object o){
int result=-1;
if (o != null && o instanceof RyaType) {
result=0;
RyaType other=(RyaType)o;
if (this.data != other.data) {
if (this.data == null) return 1;
if (other.data == null) return -1;
result=this.data.compareTo(other.data);
... | Define a natural ordering based on data and datatype. |
private File createMultiBitRuntime() throws IOException {
File multiBitDirectory=FileHandler.createTempDirectory("CreateAndDeleteWalletsTest");
String multiBitDirectoryPath=multiBitDirectory.getAbsolutePath();
System.out.println("Building MultiBit runtime in : " + multiBitDirectory.getAbsolutePath());
File mult... | Create a working, portable runtime of MultiBit in a temporary directory. |
public void tasks(){
log.info("Started PeerManager tasks.");
garbageCollectPeers();
log.info("Finished with PeerManager tasks.");
}
| Run tasks, e.g. garbage collection of peers, speaker tasks, etc. |
public CToggleSelectedGroupsAction(final ZyGraph graph){
super("Open/Close Selected Groups");
m_graph=Preconditions.checkNotNull(graph,"IE02841: graph argument can not be null");
putValue(ACCELERATOR_KEY,HotKeys.GRAPH_TOGGLE_SELECTED_GROUPS_HK.getKeyStroke());
}
| Creates a new action object. |
public static boolean canReplacePart(World world,BlockPos pos,String oldType,IMultipart newPart){
IMultipartContainer container=getPartContainer(world,pos);
if (container == null) return false;
IMultipart oldPart=null;
for ( IMultipart part : container.getParts()) {
if (part.getType().equals(oldType)) {
... | Checks whether or not a part of the specified type can be replaced by another part to the world. |
public void filter(String query){
mSearchViewExpanded=false;
mFilter=query;
mFavoriteManager.attach(getActivity(),getLoaderManager(),this,mFilter);
}
| Filters list data by given query |
public DeviceScale(Component parent,AppProperties props){
StringParser sd=new StringParser(AppConfig.getInstance().getProperty("machine.scale"));
String sScaleType=sd.nextToken(':');
String sScaleParam1=sd.nextToken(',');
switch (sScaleType) {
case "Adam Equipment":
m_scale=new ScaleAdam(sScaleParam1,parent);... | Creates a new instance of DeviceScale |
public RevealOutputGraph bool2(int k){
int[][] parents=new int[ngenes][];
int[][] lags=new int[ngenes][];
int[] f=new int[ngenes];
int numberTotalInputs=1;
for (int i=0; i < ngenes; i++) {
numberTotalInputs*=2;
}
int numberInputCombinations=1;
for (int i=0; i < k; i++) {
numberInputCombinations*... | Implements the BOOL-2 algorithm of Akutsu, et al, found in section 2.2 of their paper "Algorithms for Inferring Qualitative Models of Biological Networks". </p> The int k is the number of number of regulators of a given gene and corresponds to K in the paper. |
SelectionEventHandler(final VisionWorld visionWorld){
super();
if (visionWorld == null) {
throw new IllegalArgumentException("visionWorld must not be null");
}
this.visionWorld=visionWorld;
this.selectionModel=visionWorld.getSensorSelectionModel();
}
| Create a new selection event handler for the specified vision world. |
public byte[] readBitsArray(final int items,final JBBPBitNumber bitNumber) throws IOException {
return _readArray(items,bitNumber);
}
| Read array of bit sequence. |
public HistogramTableModel(){
}
| Creates a new instance of HistogramTableModel |
public synchronized boolean hasAnyRelationshipToTarget(Vertex target){
Iterator<Relationship> relationships=allRelationships();
while (relationships.hasNext()) {
Relationship relationship=relationships.next();
if (!relationship.isInverse() && relationship.getTarget().equals(target)) {
return true;
... | Return if the vertex has any relationship to any target. |
public static final XResourceBundle loadResourceBundle(String className,Locale locale) throws MissingResourceException {
String suffix=getResourceSuffix(locale);
try {
String resourceName=className + suffix;
return (XResourceBundle)ResourceBundle.getBundle(resourceName,locale);
}
catch ( MissingResource... | Return a named ResourceBundle for a particular locale. This method mimics the behavior of ResourceBundle.getBundle(). |
public synchronized void writeExternal(ObjectOutput os) throws IOException {
if (mimeType != null) {
mimeType.setParameter("humanPresentableName",humanPresentableName);
os.writeObject(mimeType);
mimeType.removeParameter("humanPresentableName");
}
else {
os.writeObject(null);
}
os.writeObject(re... | Serializes this <code>DataFlavor</code>. |
public void miny(int parseInt){
miny=parseInt;
tileBoundsSet=true;
}
| Set the starting y number of the subjar file to create. Depends on the subjar zoom to figure out what that means. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.