code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
private static Class registerTypeMapping(RPCServer server,Class clazz){
java.lang.reflect.Method[] methods=clazz.getMethods();
java.lang.reflect.Method method;
Class[] params;
for (int i=0; i < methods.length; i++) {
method=methods[i];
if (method.getDeclaringClass() == clazz) {
_registerTypeMappin... | search in methods of a class for complex types |
public void destroy(){
m_filterConfig=null;
}
| Take this filter out of service. |
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. |
public String toString(){
return new String(chars);
}
| Reasonable toString method. |
public void removeColumnListener(ColumnListener listener){
m_listeners.remove(listener);
}
| Removes a listener, causing it to no longer be notified of changes |
public EvaluationStatisticsTableModel(){
this(new ArrayList<EvaluationStatistics>());
}
| Initializes the model with no statistics. |
public List<Long> fillChart(PieChart chart,StatisticType type){
if (chart == null) return null;
chart.clear();
List<Long> shownChallenges=new ArrayList<>();
PieData data;
switch (type) {
case TYPE_DUE:
data=mDataLogic.findDueData();
chart.setCenterText(mApplication.getString(R.string.due_chart_center_te... | Creates a PieData object containing entries with the numbers of due and not due challenges. |
public void testVerifyJBossHomeWhenMissingRunJar() throws Exception {
this.fsManager.resolveFile("ram:///jboss/bin/shutdown.jar").createFile();
this.fsManager.resolveFile("ram:///jboss/client/something").createFile();
this.fsManager.resolveFile("ram:///jboss/lib/something").createFile();
this.fsManager.resolveF... | Test JBoss home when run.jar is missing. |
public boolean calculateSrcSpans(){
return calculateSrcSpans;
}
| Look at MediaWikiParserFactory for a description... |
public String toString(){
return length > 0 ? new String(ch,offset,length) : "";
}
| Returns a string representation of this object. |
public final Address pop2(){
return uncheckedDequeue();
}
| Pop the second address in a pair from the address queue. |
synchronized void killPlayThread(){
setThreadShouldStop(true);
try {
if (playThread != null) {
do {
try {
synchronized (simulation.state.schedule) {
playThread.interrupt();
}
}
catch ( SecurityException ex) {
}
playThread.join(50);
}
whi... | Interrupts the play thread and asks it to die. Spin-waits until it dies, repeatedly interrupting it. |
public BusinessObjectFormatEntity createBusinessObjectFormatEntity(BusinessObjectFormatKey businessObjectFormatKey,String businessObjectFormatDescription,Boolean businessObjectFormatLatestVersion,String businessObjectFormatPartitionKey){
return createBusinessObjectFormatEntity(businessObjectFormatKey.getNamespace(),b... | Creates and persists a new business object format entity. |
public void checkFontSaved(final Object glyph,final String name,final PdfFont currentFontData){
pageObjects.addElement(glyph);
objectType.addElement(DynamicVectorRenderer.MARKER);
areas.addElement(null);
currentItem++;
if (fontsUsed.contains(name) || currentFontData.isFontSubsetted()) {
fonts.put(name,cur... | for font if we are generatign glyph on first render |
public boolean hasTradePosition(){
if (null == getTradePosition()) return false;
return true;
}
| Method hasTradePosition. |
@Override public void process(HashMap<K,V> tuple){
for ( Map.Entry<K,V> e : tuple.entrySet()) {
if (key.isConnected()) {
key.emit(cloneKey(e.getKey()));
}
if (val.isConnected()) {
val.emit(cloneValue(e.getValue()));
}
if (keyval.isConnected()) {
keyval.emit(new KeyValPair<K,V>(c... | Emits key, key/val pair, and val based on port connections |
public Boolean isMemory(){
return memory;
}
| Gets the value of the memory property. |
public void writeBackupProperties(URI backupLoc,String backupId,Properties props) throws IOException {
URI dest=repository.resolve(backupLoc,backupId,BACKUP_PROPS_FILE);
try (Writer propsWriter=new OutputStreamWriter(repository.createOutput(dest),StandardCharsets.UTF_8)){
props.store(propsWriter,"Backup propert... | This method stores the backup properties at the specified location in the repository. |
public T caseAnonymous_singleIsA_1_(Anonymous_singleIsA_1_ object){
return null;
}
| Returns the result of interpreting the object as an instance of '<em>Anonymous single Is A1</em>'. <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc --> |
public static StringBuilder formatTo(StringBuilder buf,int[] d,String sep){
if (d == null) {
return buf.append("null");
}
if (d.length == 0) {
return buf;
}
buf.append(d[0]);
for (int i=1; i < d.length; i++) {
buf.append(sep);
buf.append(d[i]);
}
return buf;
}
| Formats the int array d. |
private double maxMoved(double[][] means,double[][] newmeans,double[] dists){
assert (means.length == k);
assert (newmeans.length == k);
assert (dists.length == k);
boolean issquared=(distanceFunction instanceof SquaredEuclideanDistanceFunction);
double max=0.;
for (int i=0; i < k; i++) {
double d=dista... | Maximum distance moved. |
public static void write(byte[] from,File to) throws IOException {
asByteSink(to).write(from);
}
| Overwrites a file with the contents of a byte array. |
public Record[] run(){
if (done) reset();
if (name.isAbsolute()) resolve(name,null);
else if (searchPath == null) resolve(name,Name.root);
else {
if (name.labels() > defaultNdots) resolve(name,Name.root);
if (done) return answers;
for (int i=0; i < searchPath.length; i++) {
resol... | Performs the lookup, using the specified Cache, Resolver, and search path. |
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. |
public static double tCdf(double x,double df){
double t, y, b, a, z, j, n, cdf;
n=df;
z=1.0;
t=x * x;
y=t / n;
b=1.0 + y;
if ((n > Math.floor(n)) || ((n >= 20.0) && (t < n)) || (n > 20.0)) {
if ((n < 2.0) && (n != 1.0)) {
double da=0.5, db=0.5 * n, dx, dp;
dx=db / (db + da * t);
dp=b... | CACM Algorithm 395, by G. W. Hill |
public void appendToFsb(org.apache.xml.utils.FastStringBuffer fsb){
fsb.append((char[])m_obj,m_start,m_length);
}
| Cast result object to a string. |
private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException {
in.defaultReadObject();
doReadObject(in);
}
| Read the map in using a custom routine. |
public void addBreakpointListener(final BreakpointListener listener){
breakpointListeners.add(listener);
}
| Adds a breakpoint listener. |
@Override public void updateTask(){
EntityLivingBase entitylivingbase=this.entity.getAttackTarget();
if (entitylivingbase != null) {
double d0=this.entity.getDistanceSq(entitylivingbase.posX,entitylivingbase.getEntityBoundingBox().minY,entitylivingbase.posZ);
boolean flag=this.entity.getEntitySenses().canSe... | Updates the task |
public boolean isIdent(){
return isIdent;
}
| Returns whether the value is an identifier. |
protected void doDrawToStereoDevice(DrawContext dc){
GL2 gl=dc.getGL().getGL2();
View dcView=dc.getView();
if (this.isSwapEyes()) gl.glDrawBuffer(GL2.GL_BACK_RIGHT);
else gl.glDrawBuffer(GL2.GL_BACK_LEFT);
gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
super.draw(dc);
Angle viewHeading=dc... | Implement stereo using the stereo-enabled graphics device. The mode has an effect only if the display device implements stereo. |
@Interruptible private static void printColumnNames(){
Log.write("GC\t");
for (int c=0; c < counters; c++) {
if (counter[c].mergePhases()) {
Log.write(counter[c].getName());
Log.write(counter[c].getColumnSuffix());
Log.write("\t");
}
else {
Log.write(counter[c].getName());
Log... | Print out statistics column names |
public void testSomeSequences(){
assertTrue(asBytes("").isValidUtf8());
assertTrue(asBytes("\u0000abc\u007f").isValidUtf8());
assertTrue(asBytes("\u00a2\u00a2").isValidUtf8());
assertTrue(asBytes("\u020ac\u020ac").isValidUtf8());
assertTrue(asBytes("\u024B62\u024B62").isValidUtf8());
assertTrue(asBytes("a\u... | Tests some hard-coded test cases. |
public void addArrayDimension(){
arrayDims++;
}
| Used by the grammar to indicate dimensions of array types during parsing. |
public static byte[] decode(byte[] source){
byte[] decoded=null;
try {
decoded=decode(source,0,source.length,Base64.NO_OPTIONS);
}
catch ( java.io.IOException ex) {
assert false : "IOExceptions only come from GZipping, which is turned off: " + ex.getMessage();
}
return decoded;
}
| Low-level access to decoding ASCII characters in the form of a byte array. <strong>Ignores GUNZIP option, if it's set.</strong> This is not generally a recommended method, although it is used internally as part of the decoding process. Special case: if len = 0, an empty array is returned. Still, if you need more speed ... |
public ByteArrayOutputStream(){
this(1024);
}
| Creates a new byte array output stream. The buffer capacity is initially 1024 bytes, though its size increases if necessary. |
public IllegalTriangleException(double side1,double side2,double side3){
super("Illegal sides " + side1 + " "+ side2+ " "+ side3);
this.side1=side1;
this.side2=side2;
this.side3=side3;
}
| Construct an IllegalTriangleException |
@Override protected EClass eStaticClass(){
return MappingPackage.Literals.STATUS_SOURCE;
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public static byte[] encode(byte[] source,int off,int len,byte[] alphabet,int maxLineLength){
int lenDiv3=(len + 2) / 3;
int len43=lenDiv3 * 4;
byte[] outBuff=new byte[len43 + (len43 / maxLineLength)];
int d=0;
int e=0;
int len2=len - 2;
int lineLength=0;
for (; d < len2; d+=3, e+=4) {
int inBuff=((... | Encodes a byte array into Base64 notation. |
RollupWindow(int windowID,DTVCCDirection direction){
this.rect=null;
this.windowID=windowID;
this.direction=direction;
}
| 708 animation |
private static void startIntent(Context context,String uri){
Intent intent=new Intent(Intent.ACTION_VIEW,Uri.parse(uri));
context.startActivity(intent);
}
| Start the maps intent which should launch the Maps app |
protected final void GET_TIME_BASE(Instruction s,RegisterOperand result){
if (VM.BuildFor32Addr) {
Register highReg=result.getRegister();
Register lowReg=regpool.getSecondReg(highReg);
EMIT(CPOS(s,MIR_RDTSC.create(IA32_RDTSC,new RegisterOperand(getEAX(),TypeReference.Int),new RegisterOperand(getEDX(),Type... | Expansion of RDTSC (called GET_TIME_BASE for consistency with PPC) |
public void subscribe(boolean subscribe){
if (subscribe) setSubscribeDate(null);
else setOptOutDate(null);
}
| Subscribe. User action only. |
public Map<Integer,Double> compute(int... dataset){
return computeInPlace(intsToDoubles(dataset));
}
| Computes the quantile values of the given dataset. |
public Set(Class<?> type,String name){
super(type,type);
this.name=name;
}
| Constructs a new node for assigning the value of a named variable within the current scope. |
@DSSafe(DSCat.SAFE_OTHERS) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-02-25 10:38:09.099 -0500",hash_original_method="A088283C6D3AFB361E7B10D0999AC3A3",hash_generated_method="7C560D97AD8C6B301BF770F86C880C01") public void disconnect() throws IOException {
super.disconnect();
_reader... | Closes the connection to the NNTP server and sets to null some internal data so that the memory may be reclaimed by the garbage collector. The reply text and code information from the last command is voided so that the memory it used may be reclaimed. <p> |
public double squaredNorm(){
return x * x + y * y + z * z;
}
| Calculates the squared norm of this vector. This is faster than manually multiplying the norm by itself. |
public static void main(String[] args){
JavadocTester tester=new AccessSummary();
run(tester,JAVADOC_ARGS,TESTARRAY1,new String[][]{});
tester.printSummary();
}
| The entry point of the test. |
public static Complex subtract(Complex first,Complex second){
return new Complex(first.left() - second.left(),first.right() - second.right());
}
| Adds the two complex samples returning a new complex sample with the result |
protected void handleSectionStateChange(AllocatedSection as){
if (!isInAllocatedList(as)) {
addAllocatedSection(as);
}
}
| Notification methods Handle notification of change in state and occupancy of Sections and Blocks to track the train around the Transit |
public int markInputPosition(){
return ptr;
}
| Mark the position for backtracking. |
private void doWaitFor(Process process){
startReadStreamThread(process.getInputStream());
startReadStreamThread(process.getErrorStream());
try {
process.waitFor();
}
catch ( InterruptedException e) {
log.warn("e=",e);
}
}
| Redirect stdout/stderr of given process to current log until process exits. |
public LimeTextField(String text){
super(text);
init();
}
| Constructs a new LimeTextField with the given text. |
@DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-09-03 14:59:53.476 -0400",hash_original_method="423B72A848C918F2592E84C74B14F648",hash_generated_method="F90A3FFCCBFE0EFFBA55263D9E24990E") @Override public boolean accept(File file){
return file.isHidden();
}
| Checks to see if the file is hidden. |
public static boolean isProfile(File path){
if (path.isDirectory()) {
if ((new File(path,SHARED_PROPERTIES)).canRead()) {
return true;
}
if ((new File(path,PROPERTIES)).canRead()) {
return true;
}
}
return false;
}
| Test if the given path is a Profile. |
public void runTest() throws Throwable {
String namespaceURI="http://www.example.gov";
Document doc;
NodeList elementList;
Node testAddr;
doc=(Document)load("hc_staff",true);
elementList=doc.getElementsByTagName("em");
testAddr=elementList.item(0);
{
boolean success=false;
try {
((Element)te... | Runs the test case. |
public char currentChar(){
return desc.charAt(curPos);
}
| Returns the first character of the current element. |
public int hashCode(){
return m_hashCode;
}
| Return the cached hashcode of the qualified name. |
@SuppressWarnings("unchecked") public synchronized E lastElement(){
try {
return (E)elementData[elementCount - 1];
}
catch ( IndexOutOfBoundsException e) {
throw new NoSuchElementException();
}
}
| Returns the last element in this vector. |
@PostConstruct void init(){
createComponents();
buildLayout();
restoreState();
eventBus.subscribe(this);
ui=UI.getCurrent();
}
| Initialize the upload layout. |
public HeapLayout(){
super(Harness.options,"Heap Layout","Heap Layout",Integer.valueOf(System.getProperty("mmtk.harness.heap-layout","0")));
}
| Create the option. |
public static void checkGreaterOrEqualToZero(int number,String message){
if (number < 0) {
throw new IllegalArgumentException(message);
}
}
| Validation method, which checks is an integer number is positive |
public static boolean saveStringToFile(String saveFilePathAndName,String saveString){
if ((saveFilePathAndName == null) || saveFilePathAndName.isEmpty() || (saveString == null)|| saveString.isEmpty()) {
return false;
}
BufferedWriter writer=null;
try {
File outputFile=new File(saveFilePathAndName);
... | This is a quiet method. |
private void onRenameFileOperationFinish(RenameFileOperation operation,RemoteOperationResult result){
dismissLoadingDialog();
OCFile renamedFile=operation.getFile();
if (result.isSuccess()) {
FileFragment details=getSecondFragment();
if (details != null) {
if (details instanceof FileDetailFragment &... | Updates the view associated to the activity after the finish of an operation trying to rename a file. |
public ElementalGenerationMethod elementalmethod(){
return elementalmethod;
}
| The method used for generating elemental vectors. |
public static double[][] chi2(Instances D){
int L=D.classIndex();
double X[][]=new double[L][L];
for (int j=0; j < L; j++) {
for (int k=j + 1; k < L; k++) {
X[j][k]=chi2(D,j,k);
}
}
return X;
}
| Chi^2 - Do the chi-squared test on all pairs of labels. |
public IllegalArgumentException(java.lang.String s){
}
| Constructs an IllegalArgumentException with the specified detail message. s - the detail message. |
protected Object clone() throws CloneNotSupportedException {
AbstractHashedMap cloned=(AbstractHashedMap)super.clone();
cloned.data=new HashEntry[data.length];
cloned.entrySet=null;
cloned.keySet=null;
cloned.values=null;
cloned.modCount=0;
cloned.size=0;
cloned.init();
cloned.putAll(this);
return c... | Clones the map without cloning the keys or values. <p> To implement <code>clone()</code>, a subclass must implement the <code>Cloneable</code> interface and make this method public. |
@Override public void updateNull(String columnLabel) throws SQLException {
try {
debugCodeCall("updateNull",columnLabel);
update(columnLabel,ValueNull.INSTANCE);
}
catch ( Exception e) {
throw logAndConvert(e);
}
}
| Updates a column in the current or insert row. |
@Override public String printCheckStats(){
StringBuilder sb=new StringBuilder("Permission Check Statistics:\n");
checkStats.entrySet().stream().sorted(Map.Entry.comparingByValue()).forEachOrdered(null);
String stats=sb.toString();
log.trace(stats);
return stats;
}
| Print the permission check statistics |
public boolean canScrollDown(){
return mScroll > mMinScroll;
}
| Check if can scroll down to show top |
@Override public Operand copy(){
return new BranchOperand(target);
}
| Returns a copy of this branch operand. |
public void decode(FacesContext context,UIComponent component){
if (context == null || component == null) {
return;
}
UIInput input=(UIInput)component;
String id=input.getId();
Object value=input.getValue();
GameBoard board=(GameBoard)value;
input.setValue(value);
Map parameters=context.getExternalC... | Reconfigure the size of the game board (if necessary), and record current coordinates coming from the client device. |
void trackMotionScroll(float deltaAngle){
if (getChildCount() == 0) {
return;
}
for (int i=0; i < getAdapter().getCount(); i++) {
CarouselItemView child=(CarouselItemView)getAdapter().getView(i,null,null);
float angle=child.getCurrentAngle();
angle+=deltaAngle;
while (angle > 360.0f) angle... | Tracks a motion scroll. In reality, this is used to do just about any movement to items (touch scroll, arrow-key scroll, set an item as selected). |
public void addChild(ValueNode<V> node){
children.add(node);
}
| Adds a child object to this node |
public Object encode(Object pObject) throws EncoderException {
if (!(pObject instanceof java.lang.String)) {
throw new EncoderException("Parameter supplied to Metaphone encode is not of type java.lang.String");
}
return metaphone((String)pObject);
}
| Encodes an Object using the metaphone algorithm. This method is provided in order to satisfy the requirements of the Encoder interface, and will throw an EncoderException if the supplied object is not of type java.lang.String. |
public ExtractConstantDescriptor(){
super(IJavaRefactorings.EXTRACT_CONSTANT);
}
| Creates a new refactoring descriptor. |
@Override @Deprecated public void invalidate(){
LOGGER.warn("deprecated method 'invalidate()' used...");
}
| Invalidate the list - effectively resetting its caches. |
public void bindAsVertexBuffer(DrawContext dc){
if (dc == null) {
String message=Logging.getMessage("nullValue.DrawContextIsNull");
Logging.logger().severe(message);
throw new IllegalArgumentException(message);
}
this.buffer.bindAsVertexBuffer(dc);
}
| Binds this buffer as the source of vertex coordinates to use when rendering OpenGL primitives. The vertex size is equal to coordsPerVertex, the vertex type is equal to buffer's underlying BufferWrapper GL type, the stride is 0, and the normal data itself is this buffer's backing NIO Buffer. This buffer's vector size mu... |
public WSPortConnector(String remoteWsdlUrl,String userName,String password,String host) throws IOException, WSDLException {
this.userName=userName;
this.password=password;
URL url=new URL(remoteWsdlUrl);
if (requiresUserAuthentication(userName,password)) {
url=BasicAuthLoader.load(url,userName,password);
... | Creates an instance of port connector. |
public void onDrawerOpened(View drawerView){
super.onDrawerOpened(drawerView);
}
| Called when a drawer has settled in a completely open state. |
static short readShort(final byte[] b,final int index){
return (short)(((b[index] & 0xFF) << 8) | (b[index + 1] & 0xFF));
}
| Reads a signed short value in the given byte array. |
public TagObject(int id){
this.id=id;
}
| This method was generated by MyBatis Generator. This method corresponds to the database table tag |
private void updateProgress(int progress){
if (myHost != null) {
myHost.updateProgress(progress);
}
else {
System.out.println("Progress: " + progress + "%");
}
}
| Used to communicate a progress update between a plugin tool and the main Whitebox user interface. |
public synchronized void waitUntilDone() throws InterruptedException {
boolean interrupted=false;
while (!(interrupted=Thread.interrupted()) && !done) wait(1000);
if (interrupted) throw new InterruptedException();
}
| Blocks until the copy is complete, or until the thread is interrupted |
@Override public synchronized void stop(){
if (running) {
if (statusLogger != null) {
statusLogger.cancel(false);
}
deduplicator.stop();
clear();
running=false;
}
}
| Stops this store and purges all registered exchanges. |
public Method find(String methodName,Object[] args) throws AmbiguousException {
List methodList=get(methodName);
if (methodList == null) {
return null;
}
int l=args.length;
Class[] classes=new Class[l];
for (int i=0; i < l; ++i) {
Object arg=args[i];
classes[i]=arg == null ? null : arg.getClass(... | <p> Find a method. Attempts to find the most specific applicable method using the algorithm described in the JLS section 15.12.2 (with the exception that it can't distinguish a primitive type argument from an object type argument, since in reflection primitive type arguments are represented by their object counterpart... |
@Override public boolean isIntensityVariable(){
return false;
}
| Check if this object can handle variable intensity. <P> |
private ScenarioResult createScenario(){
switch (specification.getScenario()) {
case EXTENDS:
return createExtensionScenario();
case IMPLEMENTS:
return createImplementationScenario();
case REFERENCES:
return createReferenceScenario();
}
throw new IllegalArgumentException("Unexpected scenario: " + specification.ge... | Creates the scenario for the given. To be more precise, this method creates the classifiers that participate in the scenario, but not the required members. |
private static void last(int[] n1,int[] n2,int[] sum){
int b=n1.length;
int carry=0;
while (--b >= 0) {
int s=n1[b] + n2[b] + carry;
if (s > 9) {
sum[b + 1]=s - 10;
carry=1;
}
else {
sum[b + 1]=s;
carry=0;
}
}
sum[0]=carry;
}
| Add implementation number 4. |
public final void delete(int index){
m_Instances.removeElementAt(index);
}
| Removes an instance at the given position from the set. |
public Clean(){
super();
}
| Cleans the video library from non-existent items. |
public void testSingleLineStringRoundTrip() throws SQLException {
LineStringGenerator pg=new LineStringGenerator();
pg.setGeometryFactory(geometryFactory);
pg.setBoundingBox(new Envelope(0,10,0,10));
pg.setNumberPoints(10);
LineString pt=(LineString)pg.create();
OraWriter ow=new OraWriter();
STRUCT st=ow.... | Round Trip test for a single line string |
public boolean createBookmarkRollbackStep(String stepId){
WorkflowStepCompleter.stepExecuting(stepId);
_log.info(String.format("rollbackCreateBookmarkStep - Nothing to rollback for step id [%s], return",stepId));
WorkflowStepCompleter.stepSucceded(stepId);
return true;
}
| Rollback method for create bookmark step. Currently, this is just a dummy step and does nothing. |
public void endVisit(IfStatement node){
}
| End of visit the given type-specific AST node. <p> The default implementation does nothing. Subclasses may reimplement. </p> |
protected void updateHeader(){
TextView label=(TextView)mDayNamesHeader.findViewById(R.id.wk_label);
label.setVisibility(View.GONE);
int offset=mFirstDayOfWeek - 1;
for (int i=1; i < 8; i++) {
label=(TextView)mDayNamesHeader.getChildAt(i);
if (i < mDaysPerWeek + 1) {
int position=(offset + i) % 7;... | Fixes the day names header to provide correct spacing and updates the label text. Override this to set up a custom header. |
public boolean isCase2(){
return isCase2;
}
| Returns true if this is a switch-type case. |
protected RuleMatchPair matchWithRule(IOFSwitch sw,OFPacketIn pi,FloodlightContext cntx){
FirewallRule matched_rule=null;
Ethernet eth=IFloodlightProviderService.bcStore.get(cntx,IFloodlightProviderService.CONTEXT_PI_PAYLOAD);
AllowDropPair adp=new AllowDropPair(sw.getOFFactory());
synchronized (rules) {
Iter... | Iterates over the firewall rules and tries to match them with the incoming packet (flow). Uses the FirewallRule class's matchWithFlow method to perform matching. It maintains a pair of wildcards (allow and deny) which are assigned later to the firewall's decision, where 'allow' wildcards are applied if the matched rule... |
@Override public synchronized void put(String key,Entry entry){
pruneIfNeeded(entry.data.length);
File file=getFileForKey(key);
try {
BufferedOutputStream fos=new BufferedOutputStream(new FileOutputStream(file));
CacheHeader e=new CacheHeader(key,entry);
boolean success=e.writeHeader(fos);
if (!su... | Puts the entry with the specified key into the cache. |
public String toString(){
StringBuffer buffer=new StringBuffer();
buffer.append(Constants.INDENT);
buffer.append("mechanism: ");
buffer.append(mechanism);
buffer.append(Constants.NEWLINE);
buffer.append(Constants.INDENT);
buffer.append("pParameter: ");
buffer.append(pParameter.toString());
buffer.appe... | Returns the string representation of CK_MECHANISM. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.