code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
protected InputStream _optimizedStreamFromURL(URL url) throws IOException {
if ("file".equals(url.getProtocol())) {
String host=url.getHost();
if (host == null || host.length() == 0) {
return new FileInputStream(url.getPath());
}
}
return url.openStream();
}
| Helper methods used for constructing an optimal stream for parsers to use, when input is to be read from an URL. This helps when reading file content via URL. |
private double[] calcCenter(double[][] points,int worstIdx){
double[] center=new double[points[0].length];
for (int i=0; i < points.length; i++) {
if (i == worstIdx) continue;
for (int j=0; j < center.length; j++) {
center[j]+=points[i][j];
}
}
for (int j=0; j < center.length; j++) {
c... | Average points, excluding point at worstIdx |
@Override protected void firePropertyChange(int action){
super.firePropertyChange(action);
}
| This is here for the listener to be able to call it. <!-- begin-user-doc --> <!-- end-user-doc --> |
@Override public void refresh(){
if (filterMode) {
powerModeLabel.setText("-");
registerSetCombo.setEnabled(false);
pcTextField.setText((cpuStateValidityFlags.pc == 0) ? "" : Format.asHex(cpuState.pc,8));
pcIsaMode16bCheckBox.setSelected(cpuStateValidityFlags.pc == 0 && ((TxCPUState)cpuState).is16bitI... | This method is called whenever the contents needs to be painted based on the current cpuState |
public IconGenerator(Context context){
mContext=context;
mContainer=(ViewGroup)LayoutInflater.from(mContext).inflate(R.layout.text_bubble,null);
mRotationLayout=(RotationLayout)mContainer.getChildAt(0);
mContentView=mTextView=(TextView)mRotationLayout.findViewById(R.id.text);
setStyle(STYLE_DEFAULT);
}
| Creates a new IconGenerator with the default style. |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-02-25 10:38:10.322 -0500",hash_original_method="CC5F7FB4DC48CBC8ED3335B5D2CB27F3",hash_generated_method="55452880AD3979DCEBCC15C80780241B") public NewGroupsOrNewsQuery(Calendar date,boolean gmt){
int num;
String str;
StringBuffer buffer;
... | Creates a new query using the given time as a reference point. <p> |
public void close(boolean ok){
checkDumpStep();
if (ok && pos > 0) {
StepSingle[] newSteps=new StepSingle[pos];
System.arraycopy(steps,0,newSteps,0,pos);
DataProxy.sendProfile(newSteps,context);
}
}
| send the Steps[] data |
@Override public Instances generateExamples() throws Exception {
Instances result;
int i;
result=new Instances(m_DatasetFormat,0);
m_Random=new Random(getSeed());
for (i=0; i < getNumExamplesAct(); i++) {
result.add(generateExample());
}
return result;
}
| Generates all examples of the dataset. Re-initializes the random number generator with the given seed, before generating instances. |
void print(PrintStream ps){
ps.print(getAlgorithm());
ps.println(':');
for ( IndicatorResult indicatorResult : indicatorResults) {
indicatorResult.print(ps);
}
}
| Prints the results to the given stream. |
public synchronized final Map<K,V> snapshot(){
return new LinkedHashMap<K,V>(map);
}
| Returns a copy of the current contents of the cache, ordered from least recently accessed to most recently accessed. |
public SamFilterParamsBuilder excludeVariantInvalid(final boolean val){
mExcludeVariantInvalid=val;
return this;
}
| Exclude records which are invalid for the variant caller (e.g. records with NH=0). |
static public void put(PrintWriter log,String msg,Throwable exception){
java.io.StringWriter sw=new java.io.StringWriter();
String header;
PrintWriter pw=new PrintWriter(sw);
pw.println();
header='[' + getTimeStamp() + ' '+ Thread.currentThread().getName()+ "] ";
pw.print(header);
if (msg != null) {
t... | Logs a message and an exception to the specified log destination. |
public void nextFrame() throws IOException {
writeCode(NEXT_FRAME);
}
| SWFActions interface |
synchronized String[][] internalZoneStrings(){
if (zoneStrings == null) {
zoneStrings=TimeZoneNames.getZoneStrings(locale);
}
return zoneStrings;
}
| Gets zone strings, initializing them if necessary. Does not create a defensive copy, so make sure you do so before exposing the returned arrays to clients. |
public Cache(int pref_size){
this(pref_size,9);
}
| Creates the Cache object of size of 9. |
public static boolean permisionShowDocuments(String sessionID,AxSf axsf) throws SessionException, BookException {
boolean result=true;
try {
CacheBag cacheBag=CacheFactory.getCacheInterface().getCacheEntry(sessionID);
ISicresGenPerms genPerms=(ISicresGenPerms)cacheBag.get(GENPERMS_USER);
ScrOfic scrofic... | Nos dice si el usuario conectado tiene permisos para ver los documentos anexos de un registro que pertenezcan a una oficina diferente a la suya |
public void initOptions(){
CHECK_BOX.setSelected(StatusBarSettings.CONNECTION_QUALITY_DISPLAY_ENABLED.getValue());
}
| Defines the abstract method in <tt>AbstractPaneItem</tt>.<p> Sets the options for the fields in this <tt>PaneItem</tt> when the window is shown. |
public List<VmfsDatastoreOption> queryVmfsDatastoreExtendOptions(HostScsiDisk disk,Datastore datastore){
HostDatastoreSystem datastoreSystem=getDatastoreSystem();
try {
return createList(datastoreSystem.queryVmfsDatastoreExtendOptions(datastore,disk.getDevicePath(),true));
}
catch ( HostConfigFault e) {
... | Query for the VMFS datastore extend options. |
private void runExample(){
try {
String[] command=new String[]{"java","-classpath",System.getProperty("java.class.path"),example.getMainClass().getName()};
output.append("> java -classpath \"");
output.append(System.getProperty("java.class.path"));
output.append("\" ");
output.append(example.getMa... | Runs the example and pipes its output and error streams to the text area. |
public SmartThresholds parse(final Resource thresholdFileResource) throws IOException {
final SmartThresholds holder=new SmartThresholds();
BufferedReader reader=null;
try {
reader=new BufferedReader(new InputStreamReader(thresholdFileResource.getInputStream()));
String line;
while ((line=reader.readL... | Returns a Map of model accession to a Threshold record. |
public static List<PojoClass> enumerateClassesByExtendingType(final String packageName,final Class<?> type,final PojoClassFilter pojoClassFilter){
return ServiceRegistrar.getInstance().getPojoClassLookupService().enumerateClassesByExtendingType(packageName,type,pojoClassFilter);
}
| Return a list of classes that implement/extend a given type |
public boolean isAtributoId(){
return TransferenciasElectronicasConstants.TIPO_ATRIBUTO_SE_ID.equalsIgnoreCase(tipoAtributo);
}
| Indica si el atributo es un Identificador |
final void scheduleAppGcsLocked(){
mHandler.removeMessages(GC_BACKGROUND_PROCESSES_MSG);
if (mProcessesToGc.size() > 0) {
ProcessRecord proc=mProcessesToGc.get(0);
Message msg=mHandler.obtainMessage(GC_BACKGROUND_PROCESSES_MSG);
long when=proc.lastRequestedGc + GC_MIN_INTERVAL;
long now=SystemClock.... | Schedule the execution of all pending app GCs. |
public static LyricPlayerFragment newInstance(String path,String encoding){
LogUtils.i(TAG,String.format("newInstance(%s, %s)",path,encoding));
LyricPlayerFragment fragment=new LyricPlayerFragment();
Bundle args=new Bundle();
args.putString(ARG_PARAM_PATH,path);
args.putString(ARG_PARAM_ENCODING,encoding);
... | Use this factory method to create a new instance of this fragment using the provided parameters. |
@Override public void cancel(){
this.subscription.closeAll();
}
| Cancel the CompletableFutures in this stage of the stream |
public static OsmMBTileSource createFromFile(File file){
SQLiteDatabase db;
int flags=SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY;
int value;
int minZoomLevel;
int maxZoomLevel;
int tileSize=tileSizePixels;
InputStream is=null;
db=SQLiteDatabase.openDatabase(file.getAbsolutePath... | Creates a new MBTileSource from file. Parameters minZoom, maxZoom en tileSizePixels are obtained from the database. If they cannot be obtained from the DB, the default values as defined by this class are used. |
@Override public Collection<ViewNotificationContainer> parse(final Collection<PGNotification> notifications,final SQLProvider provider){
Preconditions.checkNotNull(notifications,"IE02745: notifications argument can not be null");
Preconditions.checkNotNull(provider,"IE02746: provider argument can not be null");
f... | The parser function for view notifications. The function checks for the database table the notification originated from and dispatches the parsing appropriately to the right function. |
public void testTruncateLast(){
OffsetIndex index=new DelegatingOffsetIndex(HeapBuffer.allocate(1024 * 8));
index.index(0,0);
index.index(1,10);
index.index(2,20);
index.index(3,30);
index.index(4,40);
assertEquals(index.truncate(3),40);
}
| Tests truncating entries. |
private void cleanNetwork(){
Set<String> roadModes=CollectionUtils.stringToSet("car,bus");
Network roadNetwork=NetworkTools.filterNetworkByLinkMode(network,roadModes);
Network restNetwork=NetworkTools.filterNetworkExceptLinkMode(network,roadModes);
new NetworkCleaner().run(roadNetwork);
NetworkTools.integrate... | Runs the network cleaner on the street network. |
public void persistBeanData(Object bean,boolean printOnly){
persistBeanTryCatch(bean);
callPersistEmittedKeyValue(printOnly);
}
| This method make bean persist depending on annotations used. |
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. |
private boolean isAlphaUsedForScale(){
return android.os.Build.VERSION.SDK_INT < 11;
}
| Pre API 11, alpha is used to make the progress circle appear instead of scale. |
public synchronized void addGraphListener(GraphListener cl){
m_graphListeners.addElement(cl);
}
| Add a graph listener |
public void removeThread(WaitingThread wt){
if (wt == null) return;
this.waitingThreads.remove(wt);
}
| Removes a waiting thread, if it is queued. |
public void visitEnd(){
if (cv != null) {
cv.visitEnd();
}
}
| Visits the end of the class. This method, which is the last one to be called, is used to inform the visitor that all the fields and methods of the class have been visited. |
public void flush() throws IOException {
}
| Flushes the write output. |
@Override public String version(){
return AppInfoParser.getVersion();
}
| Get the version of this connector. |
public boolean parseBoolean(String text) throws DataParseException {
if (TRUE.equalsIgnoreCase(text)) {
return true;
}
else if (FALSE.equalsIgnoreCase(text)) {
return false;
}
else {
throw new DataParseException("Input does not represent a boolean value: " + text);
}
}
| Parse a boolean value from a text string |
private CProjectTreeNode<?> findNode(){
return findProjectNode(CProjectTreeNodeHelpers.findDatabaseNode(getProjectTree(),m_database),m_projects[0]);
}
| Finds the node for which the menu was built in the project tree. |
@Override @SuppressForbidden(reason="System#out") public void activateOptions(){
if (follow) {
if (target.equals(SYSTEM_ERR)) {
setWriter(createWriter(new SystemErrStream()));
}
else {
setWriter(createWriter(new SystemOutStream()));
}
}
else {
if (target.equals(SYSTEM_ERR)) {
set... | Prepares the appender for use. |
public double[] computeLocal(int states[][][],int destAgentRow,int destAgentColumn,int[][] sourcesAbsolute){
initialise();
int[][] cleanedSources=cleanAbsoluteSources(sourcesAbsolute,destAgentRow,destAgentColumn);
addObservations(states,destAgentRow,destAgentColumn,cleanedSources,true);
return computeLocalFromP... | Standalone routine to compute local separable information for a specific destination in a 3D multivariate time series of the states. First history rows are zeros. This method suitable for heterogeneous agents. |
public void mount(java.io.File ioFile) throws ServerException {
if (!mountRef.maybeSet(new FSMountPoint(getWorkspaceId(),ioFile,eventService,searcherProvider,systemFilter))) {
throw new ServerException(String.format("Local filesystem '%s' already mounted. ",ioFile));
}
}
| Mount backing local filesystem. |
public static boolean isDataUri(final String url){
return url.startsWith(DATA_URI_PREFIX);
}
| Check if the url is actually a dataUri (base64 encoded value). |
public void disconnectFromTEMP(){
}
| used by the monome library by jklabs |
public GameProperties(final GameData data){
super(data);
}
| Creates a new instance of Properties |
public void close() throws IOException {
if (connection != null) {
connection.close();
connection=null;
}
}
| Close the datagram connection |
public String classifierTipText(){
return "Classifier to use for estimating the accuracy of subsets";
}
| Returns the tip text for this property |
public void httpRequest(HttpRequestEvent e) throws java.io.IOException {
String request=e.getRequest();
if (Debug.debugging("shis")) {
Debug.output("SHIS: Handling request - \"" + request + "\"");
}
if (request.charAt(0) == '/') {
request=request.substring(0,request.length());
}
int index=0;
index... | Invoked when an http request is received. |
@Override public boolean equals(Object obj){
if (obj == this) {
return true;
}
if (!(obj instanceof DateTick)) {
return false;
}
DateTick that=(DateTick)obj;
if (!ObjectUtilities.equal(this.date,that.date)) {
return false;
}
return super.equals(obj);
}
| Tests this tick for equality with an arbitrary object. |
@SuppressWarnings("unchecked") public void printTable(HardcopyWriter w){
int columnTotal=0;
int[] columnWidth=new int[this.getColumnCount()];
for (int i=0; i < this.getColumnCount(); i++) {
if (this.getColumnWidth(i) == 0) {
columnWidth[i]=w.getCharactersPerLine() - columnTotal;
}
else {
colu... | Method to self print or print preview the table. Copied from BeanTableDataModel modified to print variable column widths. Final column with size zero runs to extent of page width Printed with headings and vertical lines between each column. Data is word wrapped within a column. Can handle data as strings, integers, com... |
@Override public ColumnList columns(Tuple tuple){
ProfileMeasurement measurement=(ProfileMeasurement)tuple.getValueByField("measurement");
return columnBuilder.columns(measurement);
}
| Defines the columnar structure that will be used when writing the data from a tuple to HBase. |
public BeanSelectCreatePanel(Manager manager,NamedBean defaultSelect){
_manager=manager;
_defaultSelect=defaultSelect;
p=jmri.InstanceManager.getDefault(jmri.UserPreferencesManager.class);
existingItem=new JRadioButton(Bundle.getMessage("UseExisting"),true);
newItem=new JRadioButton(Bundle.getMessage("CreateN... | Create a JPanel, that provides the option to the user to either select an already created bean, or to create one on the fly. This only currently works with Turnouts, Sensors, Memories and Blocks. |
private Integer key(){
int key=0;
while (true) {
Collection<ClusterNode> affNodes=affinity(cache1).mapKeyToPrimaryAndBackups(key);
assert !F.isEmpty(affNodes);
ClusterNode primaryNode=F.first(affNodes);
if (F.eq(primaryNode,cache1.unwrap(Ignite.class).cluster().localNode()) && affNodes.contains(cach... | Get key which will be primary for the first node and backup for the third node. |
public boolean isDefault(){
Object oo=get_Value(COLUMNNAME_IsDefault);
if (oo != null) {
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
| Get Default. |
public void addRows(int nrows){
for (int i=0; i < nrows; ++i) {
addRow();
}
}
| Add a given number of rows to this table. All data columns will be notified and will take on the appropriate default values for the added rows. |
private void showFilterDialog(Filter filter){
int sortOrder=mAdapter.getCount() - 1;
if (filter == null) {
EditFilterActivity.createNewFilter(getActivity(),sortOrder);
}
else {
EditFilterActivity.editFilter(getActivity(),filter,sortOrder);
}
}
| Shows the Filter Dialog |
public NSRecord(Name name,int dclass,long ttl,Name target){
super(name,Type.NS,dclass,ttl,target,"target");
}
| Creates a new NS Record with the given data |
public CsvWriter write() throws CsvException, IOException {
if (rowCount == 0 && writeHeaders) {
if (writeHeaders) {
writeRow(getNames());
rowCount++;
}
}
if (row != null) {
if (rowId != null) {
put(rowId,new Integer(rowCount + 1).toString());
}
if (!nullAutofill && colCount ... | Writes current row, including headers if we are on the first row. |
public synchronized void resetDatas(){
datas=null;
}
| Resets a to-many relationship, making the next get call to query for a fresh result. |
private boolean checkJTSFootprint(String footprint){
try {
JtsSpatialContextFactory factory=new JtsSpatialContextFactory();
JtsSpatialContext ctx=factory.newSpatialContext();
JtsWKTReaderShapeParser parser=new JtsWKTReaderShapeParser(ctx,factory);
parser.parse(footprint);
return true;
}
catch (... | Check JTS Footprint validity |
public synchronized void notifyZoomResetListeners(){
for ( ZoomListener listener : mZoomListeners) {
listener.zoomReset();
}
}
| Notify the zoom listeners about a zoom reset. |
public InvalidPhraseException(String message,ApplicationExceptionBean bean,Throwable cause){
super(message,bean,cause);
}
| Constructs a new exception with the specified detail message, cause, and bean for JAX-WS exception serialization. |
public SyncMusicVideos(final int hostId,Bundle syncExtras){
this.hostId=hostId;
this.syncExtras=syncExtras;
}
| Syncs all the music videos on XBMC, to the local database |
protected void refreshAnchorType(TypeScope scope){
if (resType.isPresent()) {
setFreshRequiredType(resType.get(),scope);
}
else {
setFreshRequiredType(new TypeScope().getVar("res"),scope);
}
}
| Set fresh type for the next typechecking cycle. |
public void runTest() throws Throwable {
Document doc;
DocumentType docType;
NamedNodeMap notations;
Notation notationNode;
String systemId;
doc=(Document)load("staff",false);
docType=doc.getDoctype();
assertNotNull("docTypeNotNull",docType);
notations=docType.getNotations();
assertNotNull("notation... | Runs the test case. |
static synchronized void printData(byte[] buffer,int len){
if (DEBUG) {
System.out.print(" ");
for (int i=0; i < len; i++) {
int c=buffer[i] & 255;
if (c >= ' ' && c <= 127 && c != '[' & c != ']') {
System.out.print((char)c);
}
else {
System.out.print("[" + Integer.toHexStri... | Print the uninterpreted byte array. |
public GuacamoleUnsupportedException(Throwable cause){
super(cause);
}
| Creates a new GuacamoleUnsupportedException with the given cause. |
public boolean offerFirst(E e){
addFirst(e);
return true;
}
| Inserts the specified element at the front of this deque. |
private void updateViewFastScrollFocusState(BaseRecyclerViewFastScrollBar.FastScrollFocusableView v,int pos,boolean animated){
FastBitmapDrawable.State newState=FastBitmapDrawable.State.NORMAL;
if (mCurrentFastScrollSection != null && pos > -1) {
AlphabeticalAppsList.AdapterItem item=mApps.getAdapterItems().get... | Updates the fast scroll focus on all a given view. |
public void testSerializer(){
Serializer serializer=new Serializer();
GenericJacksonSerializer jacksonSerializer=new GenericJacksonSerializer();
Foo foo=new Foo(1234);
HeapBuffer buffer=HeapBuffer.allocate();
jacksonSerializer.write(foo,buffer,serializer);
Foo result=(Foo)jacksonSerializer.read(Foo.class,bu... | Tests the Kryo serializer. |
public void refreshCluster(){
refreshNamespaces();
refreshIndexes();
refreshModules();
}
| refreshes the cached Cluster information |
@Override public void perform(IR ir){
ir.cfg.compactNodeNumbering();
LTDominators.approximate(ir,true);
DominatorTree.perform(ir,true);
LSTGraph.perform(ir);
}
| Build the Loop Structure Tree (LST) for the given IR. NOTE: CFG must be reducible. TODO: Detect irreducible CFG, apply node splitting and then construct LST. |
public boolean addAll(long[] array){
boolean changed=false;
for (int i=array.length; i-- > 0; ) {
if (add(array[i])) {
changed=true;
}
}
return changed;
}
| Adds all of the elements in <tt>array</tt> to the set. |
protected void renderHeaders(final MBasicTable table,final Table datatable) throws BadElementException {
final int columnCount=table.getColumnCount();
final TableColumnModel columnModel=table.getColumnModel();
float totalWidth=0;
for (int i=0; i < columnCount; i++) {
totalWidth+=columnModel.getColumn(i).get... | Effectue le rendu des headers. |
public IllegalAccessException(){
super();
}
| Constructs an <code>IllegalAccessException</code> without a detail message. |
@GET @Path("/ostenants") @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) @CheckPermission(roles={Role.SECURITY_ADMIN}) public OSTenantListRestRep listCoprhdOsTenants(){
_log.debug("Keystone Service - listCoprhdOsTenants");
List<OSTenant> tenants=getOsTenantsFromCoprhdDb();
return map(tenants);
}... | Gets a list of CoprHd representation of OpenStack Tenants (OSTenant). |
public static void unregister(ActivationID id) throws UnknownObjectException, ActivationException, RemoteException {
ActivationGroup.getSystem().unregisterObject(id);
}
| Revokes previous registration for the activation descriptor associated with <code>id</code>. An object can no longer be activated via that <code>id</code>. |
public boolean thisDeviceSpeaksTo(BluetoothDevice other) throws NoSuchAlgorithmException, UnsupportedEncodingException {
if (other == null) {
return false;
}
String otherAddr=other.getAddress();
if (otherAddr == null) {
return false;
}
String myAddr=mBluetoothSpeaker.getAddress();
if (myAddr.equal... | Check whether this device should start an exchange with the other device or allow that device to start an exchange, based on their addresses. |
public static JPanel left(JComponent c){
JPanel p=new JPanel(new FlowLayout(FlowLayout.LEFT,0,0));
p.add(c);
return p;
}
| Left flushes the given component. |
boolean add(DownloadRequest request){
if (query(request.downloadId()) != DownloadState.INVALID || query(request.uri()) != DownloadState.INVALID) {
Log.w(TAG,"the download requst is in downloading");
return false;
}
request.setDownloadRequestQueue(this);
synchronized (currentRequests) {
currentRequests... | Add download request to the download request queue. |
public final String yytext(){
return new String(zzBuffer,zzStartRead,zzMarkedPos - zzStartRead);
}
| Returns the text matched by the current regular expression. |
@Override EventRequest resolveEventRequest(ReferenceType refType) throws AmbiguousMethodException, AbsentInformationException, InvalidTypeException, NoSuchMethodException, LineNotFoundException {
Location location=location(refType);
if (location == null) {
throw new InvalidTypeException();
}
EventRequestMan... | The 'refType' is known to match, return the EventRequest. |
private Map<URI,FileShare> queryFileShares(final List<FileDescriptor> fileShareDescriptors){
List<URI> fileShareURIs=FileDescriptor.getFileSystemURIs(fileShareDescriptors);
List<FileShare> fileShares=dbClient.queryObject(FileShare.class,fileShareURIs);
Map<URI,FileShare> fileShareMap=new HashMap<URI,FileShare>();... | Convenience method to build a Map of URI's to their respective fileshares based on a List of FileDescriptor. |
public Pool(int pp,Object[] pool,Types types){
this.pp=pp;
this.pool=pool;
this.types=types;
this.indices=new HashMap<Object,Integer>(pool.length);
for (int i=1; i < pp; i++) {
if (pool[i] != null) indices.put(pool[i],i);
}
}
| Construct a pool with given number of elements and element array. |
private static MovePath addSteps(MovePath md,Client client){
Entity en=md.getEntity();
IGame game=en.getGame();
MoveStep lastStep=md.getLastStep();
if ((lastStep != null) && ((lastStep.getType() == MoveStepType.LAUNCH) || (lastStep.getType() == MoveStepType.RECOVER) || (lastStep.getType() == MoveStepType.UNDOCK... | Add steps for advanced vector movement based on the given vectors when splitting hexes, choose the hex with less tonnage in case OOC |
@Override public NotificationChain eInverseRemove(InternalEObject otherEnd,int featureID,NotificationChain msgs){
switch (featureID) {
case EipPackage.METADATABLE__OWNED_METADATAS:
return ((InternalEList<?>)getOwnedMetadatas()).basicRemove(otherEnd,msgs);
}
return super.eInverseRemove(otherEnd,featureID,msgs);
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
@DSComment("Private Method") @DSBan(DSCat.PRIVATE_METHOD) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:55:24.411 -0500",hash_original_method="6746D685A6EEFE6F86FE53A5B90B58CB",hash_generated_method="987E98FB86E6924AD630BE8C80953A6B") private boolean isClientDialog(){
SIPTransac... | Return true if this is a client dialog. |
public static void showProgress(boolean isShow){
if (isShow) {
div.setStyleName("valign-wrapper progress-wrapper");
progress.getElement().getStyle().setProperty("margin","auto");
div.add(progress);
RootPanel.get().add(div);
}
else {
div.removeFromParent();
progress.removeFromParent();
}
... | Show a progress loader. |
public final char yycharat(int pos){
return zzBuffer[zzStartRead + pos];
}
| Returns the character at position <tt>pos</tt> from the matched text. It is equivalent to yytext().charAt(pos), but faster |
public XblScopedChildNodes(XBLRecord rec){
super(rec);
}
| Creates a new XblScopedChildNodes object. |
protected List<Position> computeArrowheadPositions(DrawContext dc,Position base,Position tip){
Globe globe=dc.getGlobe();
Vec4 p1=globe.computePointFromPosition(base);
Vec4 pB=globe.computePointFromPosition(tip);
Vec4 vB1=p1.subtract3(pB);
double arrowLengthFraction=this.getArrowLength();
Vec4 arrowBase=pB.... | Determine the positions that make up the arrowhead. |
public static void vibrate(Context context,long milliseconds){
Vibrator vibrator=getInstance(context);
vibrator.vibrate(milliseconds);
}
| Vibrate constantly for the specified period of time. |
public final void transpose(GMatrix m1){
int i, j;
if (nRow != m1.nCol || nCol != m1.nRow) {
throw new MatrixSizeException();
}
if (m1 != this) {
for (i=0; i < nRow; i++) {
for (j=0; j < nCol; j++) {
values[i][j]=m1.values[j][i];
}
}
}
else {
transpose();
}
}
| Places the matrix values of the transpose of matrix m1 into this matrix. |
private static ViewContainer findContainer(final IDatabase database,final IViewContainer container,final List<Database> databases){
final Database apiDatabase=ObjectFinders.getObject(database,databases);
if (container.getAddressSpaces() == null) {
return ObjectFinders.getObject(container.getNative(),apiDatabase... | Searches for the API view container that wraps a given internal view container. |
public void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
doGet(request,response);
}
| The doPost method of the servlet. <br> This method is called when a form has its tag value method equals to post. |
public Class<?> loadClass(String classname){
try {
return HGUtils.loadClass(this.getHyperGraph(),classname);
}
catch ( Exception t) {
throw new HGException("Could not load class " + classname,t);
}
}
| <p> Load a class with the given name the way the <code>HGTypeSystem</code> would try to load it. First try a user-defined class loader with this instance, then try the Thread content class loader, finally try <code>this.getClass().getClassLoader()</code> which is usually the system class loader. </p> |
@Override protected void beginRender(GL10 gl,PLIRenderer renderer){
this.rotate(gl);
this.translate(gl);
}
| render methods |
public static N4JSFactory init(){
try {
N4JSFactory theN4JSFactory=(N4JSFactory)EPackage.Registry.INSTANCE.getEFactory(N4JSPackage.eNS_URI);
if (theN4JSFactory != null) {
return theN4JSFactory;
}
}
catch ( Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new N4JSFacto... | Creates the default factory implementation. <!-- begin-user-doc --> <!-- end-user-doc --> |
public void append(long key,long value){
if (mSize != 0 && key <= mKeys[mSize - 1]) {
put(key,value);
return;
}
int pos=mSize;
if (pos >= mKeys.length) {
growKeyAndValueArrays(pos + 1);
}
mKeys[pos]=key;
mValues[pos]=value;
mSize=pos + 1;
}
| Puts a key/value pair into the array, optimizing for the case where the key is greater than all existing keys in the array. |
@Override protected void fixInstanceClass(EClassifier eClassifier){
if (eClassifier.getInstanceClassName() == null) {
eClassifier.setInstanceClassName("org.yakindu.sct.model.sgen." + eClassifier.getName());
setGeneratedClassName(eClassifier);
}
}
| Sets the instance class on the given classifier. <!-- begin-user-doc --> <!-- end-user-doc --> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.