code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public CCpTest(String name){
super(name);
}
| Initializes the test. |
public Subscription then(final Action1<T> fulfilmentCallback,final Action1<Throwable> rejectedCallback,final Action0 onFinally){
return this.observable.subscribe(fulfilmentCallback,rejectedCallback,onFinally);
}
| Attach callbacks for when the promise is fulfilled, rejected and for when it's either fulfilled or rejected. |
protected int extractColumnType(ResultSet columnList) throws SQLException {
int columnType=columnList.getInt("DATA_TYPE");
int returnType=java.sql.Types.NULL;
switch (columnType) {
case java.sql.Types.BIGINT:
returnType=java.sql.Types.NUMERIC;
break;
case 0:
String typeName=columnList.getString("TYPE_NAME");
... | Determine the java.sql.Types type of a column based on the column metadata |
public void resumeWork(){
mExitTasksEarly=false;
setPause(false);
if (DEBUG) {
Log.d(Log_TAG,String.format("work_status: resumeWork %s",this));
}
}
| Resume the work |
public void log(final LogLevel logLevel,final String msg){
logger.log(logLevel.level,msg);
}
| Logs a message with the specified log level. |
public boolean has(String key){
return this.map.containsKey(key);
}
| Determine if the JSONObject contains a specific key. |
public MandatoryUdaMissingException(String message,Object[] params){
super(message,params);
}
| Constructs a new exception with the specified detail message and message parameters. The cause is not initialized. |
public static Map<String,Collection<Category>> readDict(final File modelFolder,final Set<Category> lexicalCategories) throws IOException {
final Map<String,Collection<Category>> result=new HashMap<>();
final Multimap<Category,Category> categoryToAnnotatedCategories=HashMultimap.create();
for ( final Category cat... | Loads a tag dictionary from the model folder |
@Override public boolean isActive(){
return amIActive;
}
| Used by the Whitebox GUI to tell if this plugin is still running. |
public void onHarvestBlockEvent(ArrayList<ItemStack> aDrops,ItemStack aStack,EntityPlayer aPlayer,Block aBlock,int aX,int aY,int aZ,byte aMetaData,int aFortune,boolean aSilkTouch,BlockEvent.HarvestDropsEvent aEvent){
IToolStats tStats=getToolStats(aStack);
if (isItemStackUsable(aStack) && getDigSpeed(aStack,aBlock,... | Called by the Block Harvesting Event within the GT_Proxy |
@Override public E pollLast(){
throw new UnsupportedOperationException(ERROR_MSG);
}
| Guaranteed to throw an exception and leave the set unmodified. |
public final void removeCallbacks(Runnable r,Object token){
final WeakRunnable runnable=mRunnables.remove(r);
if (runnable != null) {
mExec.removeCallbacks(runnable,token);
}
}
| Remove any pending posts of Runnable <var>r</var> with Object <var>token</var> that are in the message queue. If <var>token</var> is null, all callbacks will be removed. |
protected void parseCommands(List<PLIToken> tokens,int tokenIndex){
if (tokenIndex < tokens.size()) {
PLIToken token=tokens.get(tokenIndex++);
if (token.getType() == PLTokenType.PLTokenTypeFunction) {
String fx=token.getSequence();
PLITokenInfo tokenInfo=new PLTokenInfo(fx);
if (fx.equals("l... | parse methods |
public void schedule(TimerTask task,long delay){
if (delay < 0) {
throw new IllegalArgumentException("delay < 0: " + delay);
}
scheduleImpl(task,delay,-1,false);
}
| Schedule a task for single execution after a specified delay. |
protected void logVarstat(DoubleStatistic varstat,double[] varsum){
if (varstat == null) {
return;
}
double s=0.;
for ( double v : varsum) {
s+=v;
}
varstat.setDouble(s);
getLogger().statistics(varstat);
}
| Log statistics on the variance sum. |
default Task<?> stop(){
return Task.done();
}
| It must be possible to call stop twice. <br> Convention: If stop is called more than once it must return the same future. |
public boolean isInsideUnion(final Coordinate point){
Point p=geomFactory.createPoint(point);
if (globalUnion.intersects(p)) {
return true;
}
return false;
}
| Determine if the Coordinate is within the bounding Geometry of the field's geometries. <p> Call computeUnion() first. |
public boolean hasTerrainfactor(){
for ( int type : hsTerrains) {
if (terrains[type].getTerrainFactor() > 0) {
return true;
}
}
return false;
}
| Returns true if this hex has a terrain with a non-zero terrain factor |
public static void analyzeClass(String className,List<String> classPath) throws RuntimeException, ClassNotFoundException {
initInheritanceTree(classPath);
analyze(className,classPath);
}
| Start analysis from target class |
@Override public boolean isCaseSensitive(int columnIndex){
return true;
}
| Returns true. |
public boolean equals(Object obj){
if (!(obj instanceof Rational)) {
return false;
}
Rational that=(Rational)obj;
return this.doubleValue() == that.doubleValue();
}
| Compares two <code>Rational</code> instances, returning true if they are mathematically equivalent. |
private void calcScreenCoords(int n){
if (m_nodes[n].m_top == 32000) {
m_nodes[n].m_top=((int)(m_nodes[n].m_node.getTop() * m_viewSize.height)) + m_viewPos.height;
m_nodes[n].m_center=((int)(m_nodes[n].m_node.getCenter() * m_viewSize.width)) + m_viewPos.width;
}
}
| Converts the internal coordinates of the node found from <i>n</i> and converts them to the actual screen coordinates. |
@Override protected RStarTreeNode createNewLeafNode(){
return new RStarTreeNode(leafCapacity,true);
}
| Creates a new leaf node with the specified capacity. |
public boolean hasSVUID(){
return hasSVUID;
}
| Returns true if the class already has a SVUID field. The result of this method is only valid when visitEnd is or has been called. |
protected VoidTypeImpl(){
super();
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-03-24 16:05:58.702 -0400",hash_original_method="4C39D33D36F039D96E99CA904F9EF3AF",hash_generated_method="E5A661D667B20970BF8F3702A989F785") @Override synchronized public boolean isRunning(){
return isProcessing;
}
| Check if background processing is happening |
public static <T extends CodedEnum>void writeEnum(final OutputStream output,final T e) throws IOException {
writeVarInt32(output,e.getCode());
}
| Write an enum whose code is stored as a varint. |
public lalr_item_set items(){
return _items;
}
| The item set for this state. |
public static byte[] sha3_512(final byte[]... inputs){
return hash("SHA3-512",inputs);
}
| Performs a SHA3-512 hash of the concatenated inputs. |
public CatalogServiceRestRep update(URI id,CatalogServiceUpdateParam input){
return client.put(CatalogServiceRestRep.class,input,getIdUrl(),id);
}
| Updates the given catalog service by ID. <p> API Call: <tt>PUT /catalog/services/{id}</tt> |
public static boolean contains(Object[] array,Object objectToFind){
return indexOf(array,objectToFind) != INDEX_NOT_FOUND;
}
| <p>Checks if the object is in the given array.</p> <p>The method returns <code>false</code> if a <code>null</code> array is passed in.</p> |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:36:21.763 -0500",hash_original_method="6BE9C825DC583F0CB57790078D9D850C",hash_generated_method="A56A9EB534D0001D160743C198ECB5AA") public SSLSessionCache(File dir) throws IOException {
mSessionCache=FileClientSessionCache.usingDirect... | Create a session cache using the specified directory. Individual session entries will be files within the directory. Multiple instances for the same directory share data internally. |
public static GenericDraweeHierarchy mockDraweeHierarchy(){
return mockDraweeHierarchyOf(DrawableTestUtils.mockDrawable());
}
| Creates a mock GenericDraweeHierarchy with some methods stubbed. |
public T gone(){
return visibility(View.GONE);
}
| Set view visibility to View.GONE. |
private void assertNumerics(String msg,Object expected,Object actual){
if (null == expected || null == actual) {
assertEquals(msg,expected,actual);
return;
}
assertEquals(msg + " ... values do not have the same type: " + expected+ " vs "+ actual,expected.getClass(),actual.getClass());
if (expected insta... | Given two objects returned as stat values asserts that they are they are either both <code>null</code> or all of the following are true: <ul> <li>They have the exact same class</li> <li>They are both Numbers or they are both Dates -- in the later case, their millisecond's since epoch are used for all subsequent compa... |
public static String join(String separator,double... elements){
if (elements == null || elements.length == 0) {
return "";
}
List<Number> list=new ArrayList<Number>(elements.length);
for ( Double elem : elements) {
list.add(elem);
}
return join(separator,list);
}
| Returns a string with all double values concatenated by a specified separator. |
public int maxFrameSize(){
return reader.getInteger(MAX_FRAME_SIZE,DEFAULT_MAX_FRAME_SIZE);
}
| The maximum frame size. |
public void testTranscriptionError(){
setDefaultParameters();
this.simulator.setRawDataSaved(true);
this.simulator.setMeasuredDataSaved(false);
this.simulator.simulate(this.history);
double[][][] rawData=this.simulator.getRawData();
assertEquals(3,rawData.length);
assertEquals(4,rawData[0].length);
asse... | Save out the raw data using default parameters and make sure that Gene1:t2 has the specified standard deviation. Should be 0.05. (Gene1 has only itself as parent.) |
@Override public String generateURL(CategoryDataset dataset,int series,int item){
return getURL(series,item);
}
| Generates a URL. |
public boolean increment(long key){
return adjustValue(key,1);
}
| Increments the primitive value mapped to key by 1 |
public void deleteRow(int selectedRow){
int i=0;
for ( final TradelogSummary element : getData().getTradelogSummary()) {
if (i == selectedRow) {
getData().getTradelogSummary().remove(element);
final Vector<Object> currRow=rows.get(selectedRow);
rows.remove(currRow);
this.fireTableRowsDe... | deleteRow() - |
public void updateGestor(String idSerie,String idGestor){
StringBuffer qual=new StringBuffer("WHERE ").append(DBUtils.generateEQTokenField(CAMPO_ID,idSerie));
Map toUpdate=Collections.singletonMap(SerieDBEntityImpl.CAMPO_IDUSRGESTOR,idGestor);
updateFields(qual.toString(),toUpdate,TABLE_NAME_SERIE);
}
| Actualiza la columna de la tabla de series en la que se especifica el gestor de la serie |
public static Builder newBuilder(){
return new Builder();
}
| Create a new builder for this exception type. |
public InternalDistributedMember(NetMember m){
netMbr=m;
MemberAttributes attr=m.getAttributes();
this.hostName=SocketCreator.resolve_dns ? SocketCreator.getHostName(m.getInetAddress()) : m.getInetAddress().getHostAddress();
if (attr == null) {
}
else {
this.dcPort=attr.getPort();
this.vmPid=attr.get... | Construct a InternalDistributedMember based on the given NetMember. <p> This is not the preferred way of creating an instance since the NetMember may not have all required information (e.g., a JGroups address without direct-port and other information). |
public static String gensalt(final int log_rounds){
return gensalt(log_rounds,new SecureRandom());
}
| Generate a salt for use with the BCrypt.hashpw() method |
public void enableForceDetect(){
mIsForceDetect=true;
}
| enable force detect |
public final double z(){
return this.z;
}
| Reader for z in internal axis representation (positive going to top of screen). |
public void mouseDragged(MouseEvent e){
JMenu menu=(JMenu)menuItem;
if (!menu.isEnabled()) return;
MenuSelectionManager.defaultManager().processMouseEvent(e);
}
| Invoked when a mouse button is pressed on the menu and then dragged. Delegates the mouse event to the MenuSelectionManager. |
@DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:56:13.263 -0500",hash_original_method="FC3424D2079ACBF27BEC7269ECB48C94",hash_generated_method="3C1589722F7DF9BF4FE6C3BC09F89D05") public boolean isSynthetic(){
int flags=getFieldModifiers(declaringClass,slot... | Indicates whether or not this field is synthetic. |
public void testEnableExtFunc(){
Policy p=new SimplePolicy(new AllPermission());
Policy.setPolicy(p);
System.setSecurityManager(new SecurityManager());
TransformerFactory factory=TransformerFactory.newInstance();
boolean isExtensionSupported=enableExtensionFunction(factory);
try {
transform(factory);
... | Security is enabled, use new feature: enableExtensionFunctions |
CanMessage createPacket(String s){
CanMessage m;
CbusAddress a=new CbusAddress(s);
if (a.check()) {
m=a.makeMessage(tc.getCanid());
}
else {
m=new CanMessage(tc.getCanid());
if (s.charAt(0) == '[') {
m.setExtended(true);
int i=s.indexOf(']');
String h=s.substring(1,i);
m.set... | Create a well-formed message from a String String is expected to be space seperated hex bytes or CbusAddress, e.g.: 12 34 56 +n4e1 |
public Object remove(){
int size=size();
if (size == 0) {
throw new BufferUnderflowException();
}
return remove(size - 1);
}
| Removes the element on the top of the stack. |
private final void checkBuffer() throws IOException, SpaceExceededException {
if (this.buffer.size() >= this.buffersize) flushBuffer();
}
| check size of buffer in such a way that a put into the buffer is possible afterwards without exceeding the given maximal buffersize |
public boolean startsWith(XMLString prefix,int toffset){
return m_str.startsWith(prefix.toString(),toffset);
}
| Tests if this string starts with the specified prefix beginning a specified index. |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-09-03 14:59:48.606 -0400",hash_original_method="57BF6134D4D06867A32AED7093522EF0",hash_generated_method="4923CB1035D8F90EFB179A95E61D22AE") public String metaphone(String txt){
boolean hard=false;
if ((txt == null) || (txt.length() == 0)) {... | Find the metaphone value of a String. This is similar to the soundex algorithm, but better at finding similar sounding words. All input is converted to upper case. Limitations: Input format is expected to be a single ASCII word with only characters in the A - Z range, no punctuation or numbers. |
public static Boolean toBoolean(Object o,Boolean defaultValue){
if (o instanceof Boolean) return ((Boolean)o);
else if (o instanceof Number) return ((Number)o).intValue() == 0 ? Boolean.FALSE : Boolean.TRUE;
else if (o instanceof String) {
int rtn=stringToBooleanValueEL(o.toString());
if (rtn == 1) ... | cast a Object to a boolean value (refrence type), Exception Less |
public boolean isEnabled(){
return enabled && applicationInfo.enabled;
}
| Return whether this component and its enclosing application are enabled. |
private void render(ListItem item,Object data){
Listcell listcell=null;
int colIndex=0;
int rowIndex=item.getIndex();
WListbox table=null;
if (item.getListbox() instanceof WListbox) {
table=(WListbox)item.getListbox();
}
int colorCode=0;
if (table != null) {
colorCode=table.getColorCode(rowIndex... | Renders the <code>data</code> to the specified <code>Listitem</code>. |
public static String joinParas(Map<String,String> parasMap){
if (parasMap == null || parasMap.size() == 0) {
return null;
}
StringBuilder paras=new StringBuilder();
Iterator<Map.Entry<String,String>> ite=parasMap.entrySet().iterator();
while (ite.hasNext()) {
Map.Entry<String,String> entry=(Map.Entry<... | join paras |
public void addRestriction(String ColumnName,String Operator,int Code){
Restriction r=new Restriction(ColumnName,Operator,new Integer(Code),null,null,true,0);
m_list.add(r);
}
| Add Restriction |
public static String pojoClassToString(final PojoClass pojoClass,final Object instance){
return String.format(POJOCLASS_TOSTRING_FORMAT,pojoClass.getName(),Integer.toHexString(System.identityHashCode(instance)),PojoFieldsToString(pojoClass.getPojoFields(),instance));
}
| This method takes an object instance for a pojoClass and flattens it into a properly formatted string. |
public int limit(){
return _buf.limit();
}
| Returns the capacity of this buffer |
public synchronized UDAudio reset(){
final MediaPlayer player=getMediaPlayer();
if (player != null) {
try {
player.reset();
}
catch ( Exception e) {
e.printStackTrace();
}
}
return this;
}
| reset from error state |
private void validateUniqueAttribute(String entityType,String attributeName) throws AtlasException {
ClassType type=typeSystem.getDataType(ClassType.class,entityType);
AttributeInfo attribute=type.fieldMapping().fields.get(attributeName);
if (!attribute.isUnique) {
throw new IllegalArgumentException(String.fo... | Validate that attribute is unique attribute |
public void init() throws ServletException {
}
| Initialization of the servlet. <br> |
public void curve(float x1,float y1,float x2,float y2,float x3,float y3,float x4,float y4){
g.curve(x1,y1,x2,y2,x3,y3,x4,y4);
}
| Draws a segment of Catmull-Rom curve. <p/> As of 0070, this function no longer doubles the first and last points. The curves are a bit more boring, but it's more mathematically correct, and properly mirrored in curvePoint(). <p/> Identical to typing out:<PRE> beginShape(); curveVertex(x1, y1); curveVertex(x2, y2); curv... |
public void onReceive(Object message) throws Exception {
if (message instanceof TaskRedriverDetails && ((TaskRedriverDetails)message).getAction().equals(TaskRedriverDetails.RegisterAction.Redrive)) {
Long taskId=((TaskRedriverDetails)message).getTaskId();
fluxRuntimeConnector.redriveTask(taskId);
}
else {
... | Actor call back method for executing stalled Tasks |
public void addGenerator(GenericClass target,GenericAccessibleObject<?> call){
if (!generators.containsKey(target)) generators.put(target,new LinkedHashSet<GenericAccessibleObject<?>>());
logger.debug("Adding generator for class " + target + ": "+ call);
generators.get(target).add(call);
}
| Add a generator reflection object |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-02-25 10:38:02.488 -0500",hash_original_method="8916849FEAA1058F51E2B631594FEB81",hash_generated_method="CBEF0068B01DA9E71E94F4AC651103D9") @DSVerified @DSSpec(DSCat.IO) @DSSink({DSSinkKind.NETWORK}) public int turn() throws IOException {
ret... | A convenience method to send the SMTP TURN command to the server, receive the reply, and return the reply code. <p> |
public ClasspathPath(FilesystemPath root,String userPath,String path){
super(root,userPath,path);
if (_root == null) _root=this;
}
| Creates a new classpath sub path. |
@Override public String toString(){
final StringBuffer nodeString=new StringBuffer();
for ( final Instruction instruction : m_instructions) {
nodeString.append(instruction.toString());
nodeString.append('\n');
}
return nodeString.toString();
}
| Returns a string representation of the code node. |
public JPaymentCashPos(JPaymentNotifier notifier,DataLogicSystem dlSystem){
m_notifier=notifier;
initComponents();
m_jTendered.addPropertyChangeListener("Edition",new RecalculateState());
m_jTendered.addEditorKeys(m_jKeys);
priceWith00=("true".equals(AppConfig.getInstance().getProperty("till.pricewith00")));
... | Creates new form JPaymentCash |
public static void surfaceSqlException(SQLException e){
boolean chained=false;
String loggerMsg;
while (e != null) {
if (chained) {
loggerMsg=String.format("Next in SQLException chain: State=%s, ErrorCode=%d, Message=(%s)\n%s",e.getSQLState(),e.getErrorCode(),e.getMessage(),stackTraceToString(e));
... | Surface a String describing a SQL Exception via this class' Logger. Since SQL Exceptions typically have a chain of related exceptions, do the same for these. This chaining appears to superscede the normal exception "causedBy" paradigm. |
public void append(ResultEntry entry) throws IOException {
numberOfEntries++;
List<Solution> feasibleSolutions=new ArrayList<Solution>();
for ( Solution solution : entry.getPopulation()) {
if (!solution.violatesConstraints()) {
feasibleSolutions.add(solution);
}
}
Properties properties=entry.ge... | Appends the decision variables, objectives and optional properties to the output file. Constraint violating solutions are not recorded. |
private void addCountsSimRealPerHourGraphs(final FolderType folder,final int timestep,final TimeSpanType timespan){
try {
String filenameBoard=getSimRealGraphName(PtCountsType.Boarding,timestep), filenameAlight=getSimRealGraphName(PtCountsType.Alighting,timestep), filenameOccupancy=getSimRealGraphName(PtCountsTyp... | Creates CountsSimRealPerHourGraphs and adds them to the kmz in the given folder. The creation of the graphs is only done if the map attribute of this class for CountsSimRealPerHourGraphs is null. |
public static int[][] MCSCE1contingencyTable(boolean useTrainingData,GEPIndividual ind,double bestValueThreshold,double secondBestValueThreshold){
int classWithTheMaximumPredictedValue;
int classWithTheSecondBestPredictedValue;
GEPDependentVariable dv;
if (useTrainingData) dv=GEPDependentVariable.trainingData... | MCSCE1contingencyTable Simple classification error for multiple chromosome classification problems For each object (example) the expected values of the dependent variables are given by a BINARY vector of length equal to the number of classes (chromosomes). So each row in an example will look like: <br> x1, x2, ... xn... |
public boolean userCanMoveUser(int connectedUserId,int UserId,int dstDeptId,String entidad) throws Exception {
boolean can=false;
int parentId=Defs.NULL_ID;
int deptMgrId=Defs.NULL_ID;
int dstMgrId=Defs.NULL_ID;
try {
parentId=getUserParentId(UserId,entidad);
deptMgrId=getDeptMgrId(parentId,entidad);
... | Obtiene si el usuario conectado puede mover el usuario indicado al departamento indicado. |
public static UnaryExpression isNotNull(String propertyName){
return new UnaryExpression(Operator.NOT_NULL,propertyName);
}
| Apply an "is not null" constraint to the named property |
private void sortTransportsToLoad(final List<Unit> transports,final Route route){
if (transports.isEmpty()) {
return;
}
Collections.sort(transports,UnitComparator.getLoadableTransportsComparator(transports,route,getUnitOwner(transports)));
}
| Sort the specified transports in preferred load order. |
public final Object returnInstanceToRun(final Operation operation,final Map<String,Object> keyMap,int index) throws BaseCollectionException, IllegalAccessException, InvocationTargetException {
Object instanceToReturn=null;
if (operation.getInstance() instanceof Argument) {
Argument instanceArg=(Argument)operati... | Get the Instance on which method needs to be run. |
Deque<Block> schedule(Block entry){
Deque<Block> code=dfs(entry);
Deque<Block> scheduled=new ArrayDeque<Block>();
SetMap<Block,Edge> pred=preds(code);
Map<Block,Block> idom=idoms(code,pred);
EdgeMap<Block> loops=findLoops(code,idom,pred);
if (!loops.isEmpty()) verboseStatus("LOOPS " + loops);
for ( Blo... | layout blocks. Normal forward flow is laid out in reverse postorder. Loops are handled specially to keep blocks in the loop body close to each other. loop exit blocks are postponed until after the loop. |
public void stop(){
debug("pre: stop");
m_Stopping=true;
m_Initializing=false;
m_Running=false;
notifyExecutionStageListeners(ExecutionStageEvent.Stage.STOPPING);
m_Evaluator.stop();
debug("post: stop");
}
| Stops the experiment if running. |
public MinkowskiDistance(){
super();
}
| Constructs an Minkowski Distance object, Instances must be still set. |
@RequestMapping(value={"/",""},method=RequestMethod.POST) @ResponseBody public RestWrapper update(@ModelAttribute("properties") @Valid Properties properties,BindingResult bindingResult,Principal principal){
RestWrapper restWrapper=null;
if (bindingResult.hasErrors()) {
BindingResultError bindingResultError=new ... | This method calls proc UpdateProperties and updates the values passed. It also validates the values passed. |
private static void addFieldValues(CatalogServiceRestRep service,Collection<? extends ServiceItemRestRep> items,Map<String,String> values,Map<String,String> locked){
for ( ServiceItemRestRep item : items) {
if (item instanceof ServiceFieldTableRestRep) {
addColumnValues(service,(ServiceFieldTableRestRep)it... | Adds the field values from the service item container to the map. |
public KMLPair(String namespaceURI){
super(namespaceURI);
}
| Construct an instance. |
@SuppressWarnings("resource") @Override public void writeMap(File file,OsmMap mapData,BoundingBox bb){
try {
OutputStream os=new BufferedOutputStream(new FileOutputStream(file));
if (compressorClass != null && file.getName().endsWith(".bz2")) {
Constructor<?> c=compressorClass.getConstructor(new Class[]... | Writes all data from <code>mapData</code> to file. |
boolean nextRead(){
if (log.isDebugEnabled()) {
log.debug("nextRead scans " + varList.size() + " variables");
}
while ((varList.size() > 0) && (varListIndex < varList.size())) {
int varNum=varList.get(varListIndex).intValue();
int vState=_varModel.getState(varNum);
VariableValue var=_varModel.getV... | If there are any more read operations to be done on this pane, do the next one. <P> Each invocation of this method reads one variable or CV; completion of that request will cause it to happen again, reading the next one, until there's nothing left to read. <P> |
static public long count(File path){
int result=0;
if (path.exists()) {
if (path.isDirectory()) {
File[] files=path.listFiles();
if (files != null) for (int i=0; i < files.length; i++) {
result+=count(files[i]);
}
}
result++;
}
return result;
}
| Given a path, get a count of the contained folders and files |
public static String pathNodesToString(ArrayList<PathParser.PathDataNode> nodes,boolean onlyCommands){
DecimalFormat floatFormatter=new DecimalFormat("###.#########");
StringBuilder sb=new StringBuilder();
for ( PathParser.PathDataNode n : nodes) {
sb.append(n.type);
sb.append(' ');
if (!onlyCommands... | Create a VectorDrawable sequence from a list of nodes |
private boolean isAuthorized(String lwM2mEndPointName,Identity clientIdentity){
SecurityInfo expectedSecurityInfo=securityStore.getByEndpoint(lwM2mEndPointName);
return SecurityCheck.checkSecurityInfo(lwM2mEndPointName,clientIdentity,expectedSecurityInfo);
}
| Return true if the client with the given lightweight M2M endPoint is authorized to communicate with the given security parameters. |
@DSComment("From safe class list") @DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:27:57.965 -0500",hash_original_method="A3AFC4271D337C51C9B090DAD80C0547",hash_generated_method="66D44934BBD9D417F0DC3C1EA648ECE2") protected boolean scrollUp(TextView widget,S... | Performs a scroll up action. Scrolls up by the specified number of lines. |
public JCExpression ClassLiteral(ClassSymbol clazz){
return ClassLiteral(clazz.type);
}
| Create a tree representing a class literal. |
public boolean isExportedAsDefault(){
return (this.isExported() && ((ExportDeclaration)this.eContainer()).isDefaultExport());
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public JStackPanel(final IStackModel model){
super(new BorderLayout());
Preconditions.checkNotNull(model,"Error: Model argument can not be null");
m_model=model;
m_model.addListener(m_listener);
setFocusable(true);
setFont(m_font);
setPreferredSize(new Dimension(400,400));
}
| Creates a new stack view. |
protected boolean isPotentialBeanType(Class<?> type){
return (ClassUtil.canBeABeanType(type) == null) && !ClassUtil.isProxyType(type);
}
| Helper method used to skip processing for types that we know can not be (i.e. are never consider to be) beans: things like primitives, Arrays, Enums, and proxy types. <p> Note that usually we shouldn't really be getting these sort of types anyway; but better safe than sorry. |
public void startMessagingActivity(Context context){
startMessagingActivity(context,null);
}
| Method is used internally for starting default activity or activity added in delegate |
private final void processMainRequest(){
sender=getSender();
startTimeMillis=System.currentTimeMillis();
timeoutDuration=Duration.create(request.getActorMaxOperationTimeoutSec(),TimeUnit.SECONDS);
actorMaxOperationTimeoutSec=request.getActorMaxOperationTimeoutSec();
if (request.getProtocol() == RequestProtoco... | the 1st request from the manager. |
@Override protected void emit_fdiv(){
if (SSE2_BASE) {
asm.emitMOVSS_Reg_RegDisp(XMM0,SP,ONE_SLOT);
asm.emitDIVSS_Reg_RegInd(XMM0,SP);
adjustStack(WORDSIZE,true);
asm.emitMOVSS_RegInd_Reg(SP,XMM0);
}
else {
asm.emitFLD_Reg_RegDisp(FP0,SP,ONE_SLOT);
asm.emitFDIV_Reg_RegInd(FP0,SP);
adjus... | Emit code to implement the fdiv bytecode |
protected final void INT_TO_LONG_MUL(Instruction s,RegisterOperand result,Operand value1,Operand value2,boolean signed){
if (value2.isConstant()) {
Operand temp=value1;
value1=value2;
value2=temp;
}
if (value1.isRegister()) {
RegisterOperand value1RO=value1.asRegister();
RegisterOperand lhsRO;... | Expansion of LONG_MULs whose operands are ints |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.