code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public String toString(){
StringBuilder sb=new StringBuilder("[CDPStatusBlock: OFFSET=0x");
sb.append(Long.toHexString(offset));
sb.append(", SIZE=0x");
sb.append(Long.toHexString(size));
sb.append(", unknownDatapoints=");
sb.append(unknownDatapoints);
sb.append(", value=");
sb.append(value);
sb.appen... | Returns a summary the contents of this CDP status block. |
private int heightHint(String text,int maxWidth,int maxHeight){
Point fontPoint=gc.textExtent(text);
int rows=(fontPoint.x / (maxWidth - 50)) + 1;
return Math.min(rows * fontPoint.y,maxHeight);
}
| Returns the height hint for the text that should fit into specified maximum width. If the calculated height hint is higher than the given max height, then max height is returned. |
static String add_escapes(String str){
StringBuffer retval=new StringBuffer();
char ch;
for (int i=0; i < str.length(); i++) {
switch (str.charAt(i)) {
case '\b':
retval.append("\\b");
continue;
case '\t':
retval.append("\\t");
continue;
case '\n':
retval.append("\\n");
continue;
case '\f':
retval.app... | Used to convert raw characters to their escaped version when these raw version cannot be used as part of an ASCII string literal. |
public static void evolve_symmetric(RealVariable v1,RealVariable v2,double distributionIndex,boolean swap){
double y1, y2, betaq, beta, alpha, rand;
double x1=v1.getValue();
double x2=v2.getValue();
double lb=v1.getLowerBound();
double ub=v1.getUpperBound();
if (Math.abs(x1 - x2) > Settings.EPS) {
if (x... | Evolves the specified variables using the SBX operator using symmetric distributions. |
Iterator<AbstractPage> childIterator(){
return new ChildIterator();
}
| Iterator visits the direct child nodes in the external key ordering. |
@Override public void put(final T dataItem) throws IOException {
try {
final int rndRangesToUpdateCount=rangesConfig.getRandomCount();
final List<ByteRange> ranges=rangesConfig.getFixedByteRanges();
if (rndRangesToUpdateCount > 0) {
dataItem.scheduleRandomUpdates(rndRangesToUpdateCount);
if (s... | intercepts the data items which should be scheduled for update or append |
private static synchronized void gj_divide(double[][] A,int i,int j,int m){
for (int q=j + 1; q < m; q++) {
A[i][q]/=A[i][j];
}
A[i][j]=1;
}
| Method gj_divide. |
protected void discoverInitiator(Host host,Initiator initiator,HostFibreChannelHba hba){
setInitiatorHost(initiator,host);
initiator.setProtocol(Protocol.FC.name());
initiator.setInitiatorNode(SanUtils.normalizeWWN(hba.nodeWorldWideName));
initiator.setInitiatorPort(SanUtils.normalizeWWN(hba.portWorldWideName))... | Discover FC Initiator |
private void showFeedback(String message){
if (myHost != null) {
myHost.showFeedback(message);
}
else {
System.out.println(message);
}
}
| Used to communicate feedback pop-up messages between a plugin tool and the main Whitebox user-interface. |
private void testViewConstraintFromColumnExpression() throws SQLException {
deleteDb("view");
Connection conn=getConnection("view");
Statement stat=conn.createStatement();
stat.execute("create table t0(id1 int primary key CHECK ((ID1 % 2) = 0))");
stat.execute("create table t1(id2 int primary key CHECK ((ID2 ... | Make sure that the table constraint is still available when create a view of other table. |
private void addCrashView(){
Log.i(TAG,"addCrashView");
if (appCrashView != null && !isCrashViewVisible) {
isCrashViewVisible=true;
setCrashViewPosition();
windowManager.addView(appCrashView,params);
}
}
| Add crash view to window |
public FiltersAggregationBuilder otherBucketKey(String otherBucketKey){
this.otherBucketKey=otherBucketKey;
return this;
}
| The key to use for the bucket for documents not matching any filter. Will implicitly enable the other bucket if set. |
public static Gas register(Gas gas){
if (gas == null) {
return null;
}
registeredGasses.add(gas);
return getGas(gas.getName());
}
| Register a new gas into GasRegistry. |
@Bean @ConditionalOnMissingBean(Scheduler.class) public Scheduler fixedDelayScheduler(){
return new EveryTenSecondsScheduler(aggregator);
}
| Scheduler that is updating the status every ten seconds. This is used by default, if no other scheduler is configured. |
public TLongFloatHashMap(int initialCapacity,TLongHashingStrategy strategy){
super(initialCapacity,strategy);
}
| Creates a new <code>TLongFloatHashMap</code> instance whose capacity is the next highest prime above <tt>initialCapacity + 1</tt> unless that value is already prime. |
public MapBuilder<K,V> withUnit(Unit unit){
if (memoryManager != null) {
throw new IllegalStateException("Can not change unit after the memory manager initalized");
}
this.unit=unit;
return this;
}
| Define the unit for the native memory. By default it is MB. |
Stylesheet popStylesheet(){
if (!m_stylesheetLocatorStack.isEmpty()) m_stylesheetLocatorStack.pop();
if (!m_stylesheets.isEmpty()) m_lastPoppedStylesheet=(Stylesheet)m_stylesheets.pop();
return m_lastPoppedStylesheet;
}
| Pop the last stylesheet pushed, and return the stylesheet that this handler is constructing, and set the last popped stylesheet member. Also pop the stylesheet locator stack. |
public static JFrame showTreeWindow(Tree t,String labelField){
JPrefuseTree tree=new JPrefuseTree(t,labelField);
String title=t.toString();
if (t instanceof VisualTree) {
title=((VisualTree)t).getGroup() + " " + title;
}
JFrame frame=new JFrame(title);
frame.getContentPane().add(new JScrollPane(tree));
... | Create a new window displaying the contents of the input Tree as a Swing JTree. |
private void appendMembers(){
context.checkThread();
if (isOpen()) {
appender.appendEntries();
}
}
| Sends AppendEntries requests to members of the cluster that haven't heard from the leader in a while. |
public HGTransactionManager(HGTransactionFactory factory){
this.factory=factory;
}
| <p> Construct a new transaction manager with the given storage transaction factory. This method is normally called only internally. To obtain the transaction manager bound to a HyperGraph, use <code>HyperGraph.getTransactionManager</code>. </p> |
public static void main(String[] args){
runFileLoader(new ArffLoader(),args);
}
| Main method. |
public static CallSite altMetafactory(MethodHandles.Lookup caller,String invokedName,MethodType invokedType,Object... args){
throw new UnsupportedOperationException();
}
| Stub method needed to satisfy Java 8 compilers when compiling lambdas. |
public final boolean isEnabled(){
return mEnabled;
}
| Indicates if this instance is currently active. |
private static String findCommonPrefix(String a,String b){
int minLength=Math.min(a.length(),b.length());
for (int i=0; i < minLength; i++) {
if (a.toLowerCase().charAt(i) != b.toLowerCase().charAt(i)) {
return a.substring(0,i);
}
}
return a.substring(0,minLength);
}
| Finds the common prefix between two strings. |
@Deprecated public static int floatToEdits(float minimumSimilarity,int termLen){
if (minimumSimilarity >= 1f) {
return (int)Math.min(minimumSimilarity,LevenshteinAutomata.MAXIMUM_SUPPORTED_DISTANCE);
}
else if (minimumSimilarity == 0.0f) {
return 0;
}
else {
return Math.min((int)((1D - minimumSimi... | Helper function to convert from deprecated "minimumSimilarity" fractions to raw edit distances. |
protected synchronized void initInterface(Iterator<OMEvent> it,boolean setSelected){
if (logger.isLoggable(Level.FINE)) {
logger.fine("initing interface");
}
DefaultListModel listModel=new DefaultListModel();
int selectedIndex=-1;
int curIndex=0;
while (it.hasNext()) {
OMEvent curEvent=it.next();
... | Resets the event list. |
public static QosSpecification updateQos(VirtualPool virtualPool,QosSpecification qosSpecification,DbClient dbClient){
_log.debug("Updating Qos Specification, id: " + qosSpecification.getId());
StringMap specs=qosSpecification.getSpecs();
String protocols=virtualPool.getProtocols().toString();
if (!qosSpecifica... | Update QoS specification associated with provided VirtualPool. |
protected void updateSprings(){
if (springs.size() > 0) {
for (int i=numIterations; i > 0; i--) {
for ( VerletSpring2D s : springs) {
s.update(i == 1);
}
}
}
}
| Updates all spring connections based on new particle positions |
public static String tailSystemLog(File logFile,final int numLines) throws IOException {
if (logFile == null || logFile.equals(new File(""))) {
return null;
}
int maxBuffer=65500;
long fileLength=logFile.length();
if (fileLength == 0) {
return null;
}
byte[] buffer=(fileLength > maxBuffer) ? new b... | returns the tail of the log file |
public void displayImage(String url,ImageView image){
ImageAware imageAware=new ImageViewAware(image,false);
loader.displayImage(url,imageAware);
}
| Downloads the image for the url |
public BaseShareCollectionPage(final BaseShareCollectionResponse response,final IShareCollectionRequestBuilder builder){
super(response.value,builder);
}
| A collection page for Share. |
public void windowClosing(WindowEvent e){
m_Viewer.saveSize();
}
| Invoked when a window is in the process of being closed. |
static public void showDepthWarningXYZ(String method){
PGraphics.showDepthWarningXYZ(method);
}
| Display a warning that the specified method that takes x, y, z parameters can only be used with x and y parameters in this renderer. |
public void addListener(final BreakpointManagerListener listener){
listeners.addListener(Preconditions.checkNotNull(listener,"IE00723: listener argument can not be null"));
}
| Adds a breakpoint listener that is notified about relevant changes in the breakpoint manager. |
public SimpleSetupPanel(Experiment exp){
this();
setExperiment(exp);
}
| Creates the setup panel with the supplied initial experiment. |
@DSComment("From safe class list") @DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:56:33.659 -0500",hash_original_method="A570339C802CFE5901F930FCAA1CB116",hash_generated_method="7F8B0D286435B57612BBCABE86B8E8D3") public static boolean isNaN(double d){
ret... | Indicates whether the specified double is a <em>Not-a-Number (NaN)</em> value. |
@Override public void onDestroyFloatView(View floatView){
((ImageView)floatView).setImageDrawable(null);
mFloatBitmap.recycle();
mFloatBitmap=null;
}
| Removes the Bitmap from the ImageView created in onCreateFloatView() and tells the system to recycle it. |
private void checkIfAllowedToCreate(Product product) throws OperationNotPermittedException {
if (!product.isAllowedToCreateReview(getLoggedInUser())) {
throw new OperationNotPermittedException("Your organization must be subscribed and you must either have a usage license or be administrator.");
}
}
| Check if the caller is allowed to create review |
@Override public void debug(String msg){
if (logger.isLoggable(Level.FINE)) {
log(SELF,Level.FINE,msg,null);
}
}
| Log a message object at level FINE. |
public void addCircle(final float x,final float y,final float radius){
if (this.isDisposed()) {
SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
}
this.addArc(x,y,radius,radius,0,360);
}
| Adds to the receiver the circle specified by x, y, radius |
public static MeanVarianceMinMax[] newArray(int dimensionality){
MeanVarianceMinMax[] arr=new MeanVarianceMinMax[dimensionality];
for (int i=0; i < dimensionality; i++) {
arr[i]=new MeanVarianceMinMax();
}
return arr;
}
| Create and initialize a new array of MeanVarianceMinMax |
public static boolean equipWithMoney(final Player player,final int amount){
return equipWithStackableItem(player,"money",amount);
}
| Equip the player with the given amount of money. |
public static void main(String[] args){
runFilter(new RemoveByName(),args);
}
| runs the filter with the given arguments. |
public final boolean isAccept(int state){
return accept[state];
}
| Returns acceptance status for given state. |
public boolean isPsuedoVar(){
java.lang.String ns=m_qname.getNamespaceURI();
if ((null != ns) && ns.equals(RedundentExprEliminator.PSUEDOVARNAMESPACE)) {
if (m_qname.getLocalName().startsWith("#")) return true;
}
return false;
}
| Tell if this is a psuedo variable reference, declared by Xalan instead of by the user. |
private static <E extends FType>boolean isUserDefinedType(FTypeRef typeRef,Class<E> clazz){
if (typeRef == null) return false;
FType type=getActualDerived(typeRef);
if (type != null) {
if (clazz.isInstance(type)) {
return true;
}
}
return false;
}
| Returns true if the referenced type is a given user-defined type. This function handles typedefs correctly. |
private void createStorageProviderForVPlexSystem(StorageSystem vplexSystem){
StorageProvider vplexMgmntSvr=new StorageProvider();
URI vplexMgmntSvrURI=URIUtil.createId(StorageProvider.class);
vplexMgmntSvr.setId(vplexMgmntSvrURI);
vplexMgmntSvr.setInterfaceType(StorageProvider.InterfaceType.vplex.name());
vpl... | Creates a new storage provider representing the VPLEX management server used to manage the pass VPLEX storage system. Also, updates the VPLEX storage system itself to set the provider list and active provider to this new storage provider. |
private void clearMap(){
String[] keys;
try {
keys=prefs.keys();
for (int i=0; i < keys.length; i++) {
String string=keys[i];
if (string.startsWith("CONTROL_MAPPING")) {
prefs.remove(string);
}
}
}
catch ( BackingStoreException ex) {
Logger.getLogger(ControlMap.class.ge... | Clears the used preferences from all mappings |
private void updateProgress(int progress){
if (myHost != null && progress != previousProgress) {
myHost.updateProgress(progress);
}
previousProgress=progress;
}
| Used to communicate a progress update between a plugin tool and the main Whitebox user interface. |
public Label(int geomIndex,int onLoc){
elt[0]=new TopologyLocation(Location.NONE);
elt[1]=new TopologyLocation(Location.NONE);
elt[geomIndex].setLocation(onLoc);
}
| Construct a Label with a single location for both Geometries. Initialize the location for the Geometry index. |
public void resetViews(Runnable before){
this.resetViews(before,true);
}
| Resets the views (Graphs and Trees) and logs a event message. |
public void unregisterRemoteControlDisplay(IRemoteControlDisplay rcd){
if (DEBUG_RC) Log.d(TAG,"<<< unregisterRemoteControlDisplay(" + rcd + ")");
synchronized (mRCStack) {
if (rcd == null) {
return;
}
boolean displayWasPluggedIn=false;
final Iterator<DisplayInfoForServer> displayIterator=mRcD... | Unregister an IRemoteControlDisplay. No effect if the IRemoteControlDisplay hasn't been successfully registered. |
public Properties loadProperties(String resource) throws Exception {
Properties p=new Properties();
InputStream is=getClass().getResourceAsStream(resource);
p.load(new InputStreamReader(new BufferedInputStream(is)));
return p;
}
| Load a Properties object from a file. |
public static void main(String[] args) throws IgniteException {
try (Ignite ignite=Ignition.start("examples/config/example-ignite.xml")){
System.out.println();
System.out.println(">>> Cache API example started.");
CacheConfiguration<Integer,String> cfg=new CacheConfiguration<>();
cfg.setCacheMode(Cach... | Executes example. |
public static boolean isAnnotation(int flags){
return (flags & AccAnnotation) != 0;
}
| Returns whether the given integer has the <code>AccAnnotation</code> bit set. |
public static boolean routeHasStopSequenceLoop(TransitRoute transitRoute){
Set<String> parentFacilities=new HashSet<>();
for ( TransitRouteStop stop : transitRoute.getStops()) {
if (!parentFacilities.add(getParentId(stop.getStopFacility().getId().toString()))) {
return true;
}
}
return false;
}
| checks if a stop is accessed twice in a stop sequence |
CSVParser(char separator,char quotechar,char escape,boolean strictQuotes,boolean ignoreLeadingWhiteSpace,boolean ignoreQuotations,CSVReaderNullFieldIndicator nullFieldIndicator){
if (anyCharactersAreTheSame(separator,quotechar,escape)) {
throw new UnsupportedOperationException("The separator, quote, and escape ch... | Constructs CSVParser with supplied separator and quote char. Allows setting the "strict quotes" and "ignore leading whitespace" flags. |
public static File applyPath(Iterable<? extends File> paths,String relFile){
File path=searchPaths(paths,relFile);
if (path != null) {
return new File(path,relFile);
}
return null;
}
| Given a relative file path and a list of "search paths" returns the "full" path relative to the current directory |
public final CharSequence yytext(){
return zzBuffer.subSequence(zzStartRead,zzMarkedPos);
}
| Returns the text matched by the current regular expression. |
public double[] distributionForInstance(Instance instance) throws Exception {
if (m_ZeroR != null) {
return m_ZeroR.distributionForInstance(instance);
}
if (m_Train.numInstances() == 0) {
throw new Exception("No training instances!");
}
m_NNSearch.addInstanceInfo(instance);
int k=m_Train.numInstance... | Calculates the class membership probabilities for the given test instance. |
@Override public Object eInvoke(int operationID,EList<?> arguments) throws InvocationTargetException {
switch (operationID) {
case N4JSPackage.VARIABLE_ENVIRONMENT_ELEMENT___APPLIES_ONLY_TO_BLOCK_SCOPED_ELEMENTS:
return appliesOnlyToBlockScopedElements();
}
return super.eInvoke(operationID,arguments);
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
@Deprecated public static CommitParams create(@NotNull String container,@NotNull String repository){
return new CommitParams().withContainer(container).withRepository(repository);
}
| Creates arguments holder with required parameters. |
public static ShardPath loadShardPath(ESLogger logger,NodeEnvironment env,ShardId shardId,Settings indexSettings) throws IOException {
final String indexUUID=indexSettings.get(IndexMetaData.SETTING_INDEX_UUID,IndexMetaData.INDEX_UUID_NA_VALUE);
final Path[] paths=env.availableShardPaths(shardId);
Path loadedPath=... | This method walks through the nodes shard paths to find the data and state path for the given shard. If multiple directories with a valid shard state exist the one with the highest version will be used. <b>Note:</b> this method resolves custom data locations for the shard. |
protected void cropImage(){
if (mOptions.noOutputImage) {
setResult(null,null,1);
}
else {
Uri outputUri=getOutputUri();
mCropImageView.saveCroppedImageAsync(outputUri,mOptions.outputCompressFormat,mOptions.outputCompressQuality,mOptions.outputRequestWidth,mOptions.outputRequestHeight,mOptions.outputRe... | Execute crop image and save the result tou output uri. |
@Nullable public static BashFunctionDef findBroadestFunctionScope(PsiElement startElement){
BashFunctionDef lastValidScope=null;
PsiElement element=PsiTreeUtil.getStubOrPsiParent(startElement);
while (element != null) {
if (element instanceof BashFunctionDef) {
lastValidScope=(BashFunctionDef)element;
... | Returns the broadest scope of the variable definition. |
public Sprite createFancyTextBox(final String text,final Color textColor,final int width,final int leftMargin,final int rightMargin,final int topMargin,final int bottomMargin,final BackgroundPainter background){
List<AttributedCharacterIterator> lines=createFormattedLines(text,textColor,width);
int imageWidth=getMa... | Create a text box with an image background. |
protected void startClients(ChannelPipelineFactory pipelineFactory){
final ClientBootstrap bootstrap=new ClientBootstrap(new NioClientSocketChannelFactory(bossExecutor,workerExecutor));
bootstrap.setOption("child.reuseAddr",true);
bootstrap.setOption("child.keepAlive",true);
bootstrap.setOption("child.tcpNoDela... | Connect to remote servers. We'll initiate the connection to any nodes with a lower ID so that there will be a single connection between each pair of nodes which we'll use symmetrically |
public boolean isSingleAuthenticator(){
Debug.logInfo(this.getClass().getName() + " Authenticator isSingleAuthenticator()",module);
return false;
}
| Is this expected to be the only authenticator, if so errors will be thrown when users cannot be found |
@Override public boolean supportsCatalogsInTableDefinitions(){
debugCodeCall("supportsCatalogsInTableDefinitions");
return true;
}
| Returns whether the catalog name in CREATE TABLE is supported. |
public AccountMetaDataPair(final AccountInfo account,final AccountMetaData metaData){
super("account","meta",account,metaData);
}
| Creates a new pair. |
public Object withBuilder(FactoryBuilderSupport builder,Closure closure){
if (builder == null || closure == null) {
return null;
}
Object result=null;
Object previousContext=getProxyBuilder().getContext();
FactoryBuilderSupport previousProxyBuilder=localProxyBuilder.get();
try {
localProxyBuilder.se... | Switches the builder's proxyBuilder during the execution of a closure.<br> This is useful to temporary change the building context to another builder without the need for a contrived setup. It will also take care of restoring the previous proxyBuilder when the execution finishes, even if an exception was thrown from in... |
public Builder visible(boolean visible){
this.visible=visible;
return this;
}
| Sets the visibility of the ActionBar. Defaults to true. |
public String testNextToken() throws IOException {
Token t=super.nextToken();
return Integer.toString(t.type) + ";" + t.content+ ";";
}
| Calls super.nextToken() and prints out a String representation of token type and content. |
protected boolean beforeSave(boolean newRecord){
MSystem system=MSystem.get(getCtx());
if (system.getName().equals("?") || system.getUserName().equals("?")) {
log.saveError("Error","Define System first");
return false;
}
return true;
}
| Before Save |
public CProcessListPanel(final ProcessList processList){
super(new BorderLayout());
m_processList=processList;
final CProcessListModel model=new CProcessListModel(processList);
m_sorter=new TableRowSorter<CProcessListModel>(model);
m_table=new JTable(model);
m_table.setSelectionMode(ListSelectionModel.SINGL... | Creates a new panel object. |
@Override protected void initGUI(){
java.util.List<String> classnames;
super.initGUI();
m_TabbedPane=new JTabbedPane();
add(m_TabbedPane,BorderLayout.CENTER);
m_Tabs.add(new BasicSetup());
m_Tabs.add(new ExpertSetup());
classnames=AbstractExperimenterTab.getTabs();
for ( String classname : classnames) ... | Initializes the widgets. |
public String globalInfo(){
return "Visualize performance charts (such as ROC).";
}
| Global info for this bean |
public Builder preProcessor(BitmapProcessor preProcessor){
this.preProcessor=preProcessor;
return this;
}
| Sets bitmap processor which will be process bitmaps before they will be cached in memory. So memory cache will contain bitmap processed by incoming preProcessor.<br /> Image will be pre-processed even if caching in memory is disabled. |
public void removeVertex(Vertex vertex){
Vertex managed=findById(vertex.getId());
if (managed == null) {
return;
}
this.entityManager.remove(managed);
if (vertex.hasData()) {
this.verticiesByData.remove(vertex.getData());
if (vertex.getData() instanceof Data) {
this.entityManager.remove(find... | Remove the vertex from the network. Note that the vertex must be no longer referenced by any other vertex in the network. |
protected Vec4 geodeticToEllipsoidal(Angle latitude,Angle longitude,double metersElevation){
if (latitude == null || longitude == null) {
String message=Logging.getMessage("nullValue.LatitudeOrLongitudeIsNull");
Logging.logger().severe(message);
throw new IllegalArgumentException(message);
}
double co... | Maps a position to ellipsoidal coordinates. The Y axis points to the north pole. The Z axis points to the intersection of the prime meridian and the equator, in the equatorial plane. The X axis completes a right-handed coordinate system, and is 90 degrees east of the Z axis and also in the equatorial plane. Sea level i... |
protected ForStatementImpl(){
super();
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public PKCS9Attributes(DerInputStream in) throws IOException {
this(in,false);
}
| Construct a set of PKCS9 Attributes from the contents of its DER encoding on a DerInputStream. Accept all attributes supported by class PKCS9Attribute and reject any unsupported attributes. |
private static void applyTypeface(ViewGroup viewGroup,TypefaceCollection typefaceCollection){
for (int i=0; i < viewGroup.getChildCount(); i++) {
View childView=viewGroup.getChildAt(i);
if (childView instanceof ViewGroup) {
applyTypeface((ViewGroup)childView,typefaceCollection);
}
else {
appl... | Apply typeface to all ViewGroup childs |
public java.util.ArrayList<TreeNode<E>> path(E e){
java.util.ArrayList<TreeNode<E>> list=new java.util.ArrayList<>();
TreeNode<E> current=root;
while (current != null) {
list.add(current);
if (e.compareTo(current.element) < 0) {
current=current.left;
}
else if (e.compareTo(current.element) ... | Return a path from the root leadting to the specified element |
public boolean isCellBasedAccessibility(){
return cellBasedAccessibility;
}
| Gets the value of the cellBasedAccessibility property. |
protected Command dropFilter(DatapathId sw,OFPacketIn pi,FloodlightContext cntx){
Command result=Command.CONTINUE;
OFPort inPort=(pi.getVersion().compareTo(OFVersion.OF_12) < 0 ? pi.getInPort() : pi.getMatch().get(MatchField.IN_PORT));
if (isAllowed(sw,inPort) == false) {
if (log.isTraceEnabled()) {
log... | If the packet-in switch port is disabled for all data traffic, then the packet will be dropped. Otherwise, the packet will follow the normal processing chain. |
public static double mapValueFromRangeToRange(double value,double fromLow,double fromHigh,double toLow,double toHigh){
double fromRangeSize=fromHigh - fromLow;
double toRangeSize=toHigh - toLow;
double valueScale=(value - fromLow) / fromRangeSize;
return toLow + (valueScale * toRangeSize);
}
| Map a value within a given range to another range. |
@DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-09-03 14:59:52.207 -0400",hash_original_method="9026BE33E3D40906CA316E83E271B1B8",hash_generated_method="CFB1D0EEE0FAD6485D92FB638ECDBAE6") private Writer initWriter(File file,Charset encoding,boolean append) throws IOE... | Initialise the wrapped file writer. Ensure that a cleanup occurs if the writer creation fails. |
@Override public Range findRangeBounds(XYDataset dataset){
if (dataset != null) {
return DatasetUtilities.findStackedRangeBounds((TableXYDataset)dataset);
}
else {
return null;
}
}
| Returns the range of values the renderer requires to display all the items from the specified dataset. |
private CModuleLoader(){
}
| Static helper class. |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-01-27 09:54:12.398 -0500",hash_original_method="954FE01203E8E0B89D8DDB8D29119B01",hash_generated_method="EC6AADF753D5966CC946C3ECD22E2424") public void put(int key,E value){
int i=binarySearch(mKeys,0,mSize,key);
if (i >= 0) {
mValues[i... | Adds a mapping from the specified key to the specified value, replacing the previous mapping from the specified key if there was one. |
@Override protected Object createJobInstance(final TriggerFiredBundle bundle){
try {
final JobDataMap jobDataMap=bundle.getJobDetail().getJobDataMap();
final SchedulerContext schedulerContext=SchedulerRepository.getInstance().lookup(jobDataMap.getString("moduleName") + SCHEDULER_NAME_SUFFIX).getContext();
... | An implementation of SpringBeanJobFactory that retrieves the bean from the Spring application context for a particular module and wrap it up with other values from jobDataAsMap. |
public SQLRecoverableException(String reason,Throwable cause){
super(reason,cause);
}
| Creates an SQLRecoverableException object. The Reason string is set to the given and the cause Throwable object is set to the given cause Throwable object. |
@Override public void actionPerformed(ActionEvent event){
String command=event.getActionCommand();
if (command.equals("TickUnitValue")) {
validateTickUnit();
}
else {
super.actionPerformed(event);
}
}
| Handles actions from within the property panel. |
public static void addDocumentPartitioners(Document document,Map<String,DocumentPartitioner> partitioners){
Iterator<String> e=partitioners.keySet().iterator();
while (e.hasNext()) {
String partitioning=e.next();
DocumentPartitioner partitioner=partitioners.get(partitioning);
partitioner.connect(documen... | Connects the given document with all document partitioners stored in the given map under their partitioning name. This method cleans the given map. |
protected void debugCodeCall(String methodName){
if (trace.isDebugEnabled()) {
trace.debugCode(getTraceObjectName() + "." + methodName+ "();");
}
}
| Write trace information as a method call in the form objectName.methodName(). |
@Override public boolean isActive(){
return amIActive;
}
| Used by the Whitebox GUI to tell if this plugin is still running. |
public IItemRequest buildRequest(){
return buildRequest(getOptions());
}
| Creates the request |
public PartitionNotAvailableException(String message){
super(message);
}
| Creates a new <code>PartitionNotAvailableException</code> with the given detail message. |
@Override public void cancel() throws SQLException {
try {
debugCodeCall("cancel");
checkClosed();
CommandInterface c=executingCommand;
try {
if (c != null) {
c.cancel();
cancelled=true;
}
}
finally {
setExecutingStatement(null);
}
}
catch ( Exception e)... | Cancels a currently running statement. This method must be called from within another thread than the execute method. Operations on large objects are not interrupted, only operations that process many rows. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.