code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public static String encodeWebSafe(byte[] source,boolean doPadding){
return encode(source,0,source.length,WEBSAFE_ALPHABET,doPadding);
}
| Encodes a byte array into web safe Base64 notation. |
public Parameters(){
}
| Creates an empty parameters object without any parameter types. |
public List<String> names(){
return Collections.unmodifiableList(names);
}
| Returns a list of the names in this object in document order. The returned list is backed by this object and will reflect subsequent changes. It cannot be used to modify this object. Attempts to modify the returned list will result in an exception. |
ContentModelState(Object content,ContentModelState next){
this(content,next,0);
}
| Create a content model state for a content model given the remaining state that needs to be reduce. |
private ITerrain enteredTerrain(){
int type=Terrains.getType((String)choTerrainType.getSelectedItem());
int level=Integer.parseInt(texTerrainLevel.getText());
boolean exitsSpecified=cheTerrExitSpecified.isSelected();
int exits=Integer.parseInt(texTerrExits.getText());
return Terrains.getTerrainFactory().creat... | Returns a new instance of the terrain that is currently entered in the terrain input fields |
private final void sendMessageToConnection(OFMessage m){
connection.messageReceived(m);
}
| Notifies the channel listener that we have a valid baseline connection |
public boolean contains(String identifier){
verifyState();
return resourceCache.get().containsKey(identifier);
}
| Checks if resource with given identifier is cached. |
public String toString(){
return this.token;
}
| Returns the character sequence for the operator. |
private static void bindPreferenceSummaryToValue(Preference preference){
preference.setOnPreferenceChangeListener(sBindPreferenceSummaryToValueListener);
sBindPreferenceSummaryToValueListener.onPreferenceChange(preference,PreferenceManager.getDefaultSharedPreferences(preference.getContext()).getString(preference.ge... | Binds a preference's summary to its value. More specifically, when the preference's value is changed, its summary (line of text below the preference title) is updated to reflect the value. The summary is also immediately updated upon calling this method. The exact display format is dependent on the type of preference. |
@Override public boolean isActive(){
return amIActive;
}
| Used by the Whitebox GUI to tell if this plugin is still running. |
public Triangle(Vec4 a,Vec4 b,Vec4 c){
if (a == null || b == null || c == null) {
String msg=Logging.getMessage("nullValue.PointIsNull");
Logging.logger().severe(msg);
throw new IllegalArgumentException(msg);
}
this.a=a;
this.b=b;
this.c=c;
}
| Construct a triangle from three counter-clockwise ordered vertices. The front face of the triangle is determined by the right-hand rule. |
public double logDensity(Instance instance,double value) throws Exception {
UnivariateDensityEstimator e=getDensityEstimator(instance,true);
return e.logDensity(value);
}
| Returns natural logarithm of density estimate for given value based on given instance. |
public DelegatingSocket(InetAddress address,int port,InetAddress localAddr,int localPort) throws IOException {
this((Socket)null);
}
| Initializes a new <tt>DelegatingSocket</tt>. |
public final ITrackedNodePosition track(ASTNode node){
if (node == null) {
throw new IllegalArgumentException();
}
TextEditGroup group=this.eventStore.getTrackedNodeData(node);
if (group == null) {
group=new TextEditGroup("internal");
this.eventStore.setTrackedNodeData(node,group);
}
return new ... | Returns an object that tracks the source range of the given node across the rewrite to its AST. Upon return, the result object reflects the given node's current source range in the AST. After <code>rewrite</code> is called, the result object is updated to reflect the given node's source range in the rewritten AST. |
public AppliedMigration(int versionRank,int installedRank,MigrationVersion version,String description,MigrationType type,String script,Integer checksum,Date installedOn,String installedBy,int executionTime,boolean success){
this.versionRank=versionRank;
this.installedRank=installedRank;
this.version=version;
th... | Creates a new applied migration. Only called from the RowMapper. |
public LibraryLoader createLibraryLoader(){
return new LibraryLoader(_classLoader);
}
| library-loader: loads jars in a directory, e.g. WEB-INF/lib |
public Builder convertDurationsTo(TimeUnit durationUnit){
this.durationUnit=durationUnit;
return this;
}
| Convert durations to the given time unit. |
public static XmlPullParserFactory newInstance() throws XmlPullParserException {
return newInstance(null,null);
}
| Create a new instance of a PullParserFactory that can be used to create XML pull parsers (see class description for more details). |
void nameReplaced(){
cachedStringRep=null;
}
| This method is invoked when setName() or replaceClassName() in CtClass is called. |
public JobExecutionException(Throwable cause,boolean refireImmediately){
super(cause);
refire=refireImmediately;
}
| <p> Create a JobExcecutionException with the given underlying exception, and the 're-fire immediately' flag set to the given value. </p> |
@Override public String create(){
return getRootDirectoryPath();
}
| Index root directory is created by Elasticsearch. This method returns the path only. |
public static boolean compareDates(final Date firstDate,final Date secondDate){
return firstDate == null || secondDate == null ? true : firstDate.before(secondDate) ? false : true;
}
| This method will return true<br/> if any of the given date is null or firstDate comes before the secondDate or both dates are same<br/> will return false<br/> if firstDate comes after secondDate |
public synchronized void refresh(){
cells.clear();
CellFeed cellFeed=getCellFeed();
if (cellFeed != null) {
for ( CellEntry entry : cellFeed.getEntries()) {
doAddCell(entry);
}
}
int oldMaxRow=maxRow;
int oldMaxCol=maxCol;
maxRow=cellFeed.getRowCount();
maxCol=cellFeed.getColCount();
... | Load all the cells from Google Spreadsheets. |
private String readResourceAsString(Resource resource) throws IOException {
StringBuilder contents=new StringBuilder();
Reader reader=new InputStreamReader(resource.asStream(),"UTF-8");
try {
char buffer[]=new char[8192];
int length;
while ((length=reader.read(buffer)) != -1) {
contents.append(b... | Reads the entire contents of the given resource as a String. The resource is assumed to be encoded in UTF-8. |
protected boolean applySessionVariables(List<ReplOption> options) throws SQLException {
boolean sessionVarChange=false;
if (options != null && conn.supportsSessionVariables()) {
if (currentOptions == null) currentOptions=new HashMap<String,String>();
for ( ReplOption statementDataOption : options) {
... | applyOptionsToStatement adds to the batch queries used to change the connection options, if needed and if possible (if the database support such a feature) |
public GroovyScript(Document doc,File file){
super(doc,file);
}
| Initializes the script. Automatically loads the specified file, if not null. |
public boolean search(final Window window,final String searchText){
Channel chan=channels.getChannelFromWindow(window);
if (chan == null) {
return false;
}
return chan.search(searchText);
}
| Perform search in the currently selected channel. Should only be called from the EDT. |
@DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:55:22.142 -0500",hash_original_method="A3550F5A4A6E2000221840888A01CA8A",hash_generated_method="B0AB0966AE8662F58756095580BB5ED9") public boolean equals(Object other){
if (!this.getClass().equals(other.getCla... | Equals predicate. |
public <T>T[] toArray(T[] a){
if (a.length < size) return (T[])Arrays.copyOf(elementData,size,a.getClass());
System.arraycopy(elementData,0,a,0,size);
if (a.length > size) a[size]=null;
return a;
}
| Returns an array containing all of the elements in this list in proper sequence (from first to last element); the runtime type of the returned array is that of the specified array. If the list fits in the specified array, it is returned therein. Otherwise, a new array is allocated with the runtime type of the specifi... |
public boolean isSetSrcModifiedTime(){
return this.srcModifiedTime != null;
}
| Returns true if field srcModifiedTime is set (has been assigned a value) and false otherwise |
public void cleanup(){
m_allData=null;
}
| Sets reference to training data to null. |
@PUT @Path("/{groupName}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresRole(role=Role.ADMINISTRATOR) public GroupDTO update(@PathParam("groupName") String groupName,GroupDTO group){
PrincipalId id=PrincipalUtil.fromName(groupName);
Validate.isTrue(getSystemDomain().equalsIgn... | Update a group object. <p>Currently supports only replacement of the group description</p> |
public SimpleHistogramBin(double lowerBound,double upperBound){
this(lowerBound,upperBound,true,true);
}
| Creates a new bin. |
@Deprecated @Override public void applyConfig(final ConfigSettings config){
throw new UnsupportedOperationException();
}
| empty method |
public static boolean equalsWithThrowableInformation(ErThrowableInformation erTWI,ThrowableInformation twi) throws NoSuchFieldException, IllegalAccessException {
Field field=twi.getClass().getDeclaredField("category");
field.setAccessible(true);
if (!ErCategoryTest.equalsWithCategory(erTWI.getCategory(),(Category... | ErThrowableInformation is equals with ThrowableInformation |
private void queryForComputeStates(EnumerationContext ctx,Map<String,VirtualMachine> vms){
QueryTask q=new QueryTask();
q.setDirect(true);
q.querySpec=new QueryTask.QuerySpecification();
q.querySpec.options.add(QueryOption.EXPAND_CONTENT);
q.querySpec.query=Query.Builder.create().addKindFieldClause(ComputeSta... | Query all compute states for the cluster filtered by the received set of instance Ids. |
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 void end(Xid xid,int flags) throws XAException {
StringBuilder commandBuf=new StringBuilder(MAX_COMMAND_LENGTH);
commandBuf.append("XA END ");
appendXid(commandBuf,xid);
switch (flags) {
case TMSUCCESS:
break;
case TMSUSPEND:
commandBuf.append(" SUSPEND");
break;
case TMFAIL:
break;
default :
throw n... | Ends the work performed on behalf of a transaction branch. The resource manager disassociates the XA resource from the transaction branch specified and lets the transaction complete. If TMSUSPEND is specified in the flags, the transaction branch is temporarily suspended in an incomplete state. The transaction context i... |
public static _Fields findByThriftId(int fieldId){
switch (fieldId) {
case 1:
return NODE_ID;
case 2:
return VERSION;
default :
return null;
}
}
| Find the _Fields constant that matches fieldId, or null if its not found. |
protected boolean parseUpgrade(final byte[] result) throws ProtocolException {
final int res=ByteArray.byteArrayToInt(result,0);
if (res == Proto.OK) {
if (Cfg.DEBUG) {
Check.log(TAG + " parseUpgrade, OK");
}
final DataBuffer dataBuffer=new DataBuffer(result,4,result.length - 4);
try {
f... | Parses the upgrade. |
public static String normalizeQuotesAndDots(String s){
return s.replaceAll("[\\u201C\\u201D\\u2033\\u02BA\\u301E\\u3003]","\"").replaceAll("[\\u2018\\u2019\\u2032\\u00B4\\u02B9`]","'").replaceAll("[\\u00B7]",".");
}
| Replace smart quotes, curly quotes, back ticks and mid-dots with standard quotes and dots to simplify the required regular expressions. |
public JPanelMenu(MenuDefinition menu){
m_menu=menu;
created=false;
initComponents();
}
| Creates new form JStockMenu |
public void testMergeMultipleSecurityConstraintsOfSamePattern() throws Exception {
String srcXml="<web-app>" + " <security-constraint>" + " <web-resource-collection>"+ " <web-resource-name>resource1</web-resource-name>"+ " <url-pattern>/s1/*</url-pattern>"+ " </web-resource-collection>"+ " <auth-c... | Tests the merging of multiple security constraints with the same pattern. |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:29:19.766 -0500",hash_original_method="8E5F47C036105189BFF71EB5625C4E3F",hash_generated_method="7F42714E474D901B97B6AC9C721582A1") public void viewClicked(View view){
final boolean focusChanged=mServedView != mNextServedView;
check... | Notify the event when the user tapped or clicked the text view. |
private synchronized void logStats(){
FLog.v(TAG,"Count = %d",mMap.size());
}
| Simple 'debug' logging of stats. |
public static ArrayList<GPSRecord> readFileToArray(File file){
int vehID;
long time;
double longitude;
double latitude;
int status;
int speed;
ArrayList<GPSRecord> log=new ArrayList<GPSRecord>();
try {
Scanner input=new Scanner(new BufferedReader(new FileReader(file)));
try {
while (input.... | This method reads the given vehicle file, creates a new <code>GPSRecord</code> for each line, and returns the complete GPS log as an <code>ArrayList</code> of <code>GPSRecord</code>s. |
public static Builder builder(InstallResponse response){
return new Builder(response);
}
| Returns a install response builder for an existing response. |
public static boolean bringWebappToFront(int tabId){
if (tabId == Tab.INVALID_TAB_ID) return false;
for ( WeakReference<Activity> activityRef : ApplicationStatus.getRunningActivities()) {
Activity activity=activityRef.get();
if (activity == null || !(activity instanceof WebappActivity)) continue;
... | Brings a live WebappActivity back to the foreground if one exists for the given tab ID. |
private void storeBootProp(){
try {
saveBootProp();
}
catch ( final IOException e) {
LoneOptionDialog.showMessageDialog("Sorry, an error occurred while downloading the update. Could not write bootProperties");
}
}
| store boot prop (if they were altered during update). |
protected void addWaypoint(WaypointType type) throws SAXException {
if (time == null) {
return;
}
Waypoint waypoint=new Waypoint();
Location location=createLocation();
if (!LocationUtils.isValidLocation(location)) {
throw new SAXException(createErrorMessage("Invalid location detected: " + location));
... | Adds a waypoint. |
public Spkac(InputStream is) throws IOException, SpkacException {
Properties properties=readProperties(is);
if (!properties.containsKey(SPKAC_PROPERTY)) {
throw new SpkacMissingPropertyException(MessageFormat.format(res.getString("SpkacNoIncludeRequiredProperty.exception.message"),SPKAC_PROPERTY));
}
subjec... | Load a SPKAC. |
public static int match(String buf,String[] regexs,String[] groups,int flags){
int index=0;
for ( String regex : regexs) {
Pattern p=Pattern.compile(regex,flags);
Matcher m=p.matcher(buf);
if (m.matches()) {
int ngroups=m.groupCount();
for (int j=1; j <= ngroups; j++) {
groups[j - 1... | Returns the index of the first regex that matches the buffer. If none match, returns -1. Any regex group outputs are returned in groups. The matching text is removed from the buffer. |
public boolean equals(Object object){
if (!(object instanceof Attribute)) {
return false;
}
Attribute val=(Attribute)object;
if (value == null) {
if (val.getValue() == null) {
return name.equals(val.getName());
}
else {
return false;
}
}
return ((name.equals(val.getName())) && (... | Compares the current Attribute Object with another Attribute Object. |
protected void waitForFPSetManager() throws InterruptedException {
}
| Makes the flow of control wait for the IFPSetManager implementation to become fully initialized.<p> For the non-distributed FPSet implementation, this is true right away. |
public void toggleCompact(final boolean maximize){
if (!isVisible()) {
return;
}
final boolean hide=menu.isVisible();
menu.setVisible(!hide);
if (maximize) {
if (hide) {
setExtendedState(MAXIMIZED_BOTH);
}
else {
setExtendedState(NORMAL);
}
}
}
| Toggle the main menubar. Also toggle between maximized/normal if maximize is true. |
public static Matrix fromImageToGeographic(int imageWidth,int imageHeight,Sector sector){
if (imageWidth < 1 || imageHeight < 1) {
String message=Logging.getMessage("generic.InvalidImageSize",imageWidth,imageHeight);
Logging.logger().severe(message);
throw new IllegalArgumentException(message);
}
if (... | Computes a <code>Matrix</code> that will map a aligned 2D grid coordinates to geographic coordinates in degrees. It is assumed that the destination grid is parallel with lines of latitude and longitude, and has its origin in the upper left hand corner. |
public EigenvalueDecomposition eigenvalue(){
return new EigenvalueDecomposition(this);
}
| Eigenvalue Decomposition |
public Weeks toStandardWeeks(){
return Weeks.weeks(getValue() / DateTimeConstants.DAYS_PER_WEEK);
}
| Converts this period in days to a period in weeks assuming a 7 day week. <p> This method allows you to convert between different types of period. However to achieve this it makes the assumption that all weeks are 7 days long. This may not be true for some unusual chronologies. However, it is included as it is a useful ... |
public void reset(AccessibilityNodeInfoCompat newNode){
if (mNode != newNode && mNode != null && mOwned) {
mNode.recycle();
}
mNode=newNode;
mOwned=true;
}
| Resets this object to contain a new node, taking ownership of the new node. |
private void initializeIDPLib(String clientKey,String clientSecret){
String serverIP=Constants.DEFAULT_HOST;
String prefIP=Preference.getString(AuthenticationActivity.this,Constants.PreferenceFlag.IP);
if (prefIP != null) {
serverIP=prefIP;
}
if (serverIP != null && !serverIP.isEmpty()) {
ServerConfig... | Initialize the Android IDP SDK by passing credentials,client ID and client secret. |
public T caseDeprecatableElement(DeprecatableElement object){
return null;
}
| Returns the result of interpreting the object as an instance of '<em>Deprecatable Element</em>'. <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc --> |
@Override public boolean shouldNotBeLogged(){
return true;
}
| Api for the subclasses to decide if this exception should be treated as a bug and hence to be get logged or not in the service layer just before AIDL connection to client. |
public boolean isStartAtZeroEnabled(){
return mStartAtZero;
}
| returns true if the chart is set to start at zero, false otherwise |
public synchronized boolean proxyEquals(final HttpConnection connection){
if (connection == null) {
throw new IllegalArgumentException("Connection may not be null");
}
if (proxyHost != null) {
return proxyHost.getHostName().equalsIgnoreCase(connection.getProxyHost()) && proxyHost.getPort() == connection.g... | Tests if the proxy configuration equals the configuration set on the connection. True only if the proxyHost and proxyPort are equal. |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-02-25 10:38:12.539 -0500",hash_original_method="58256EB8A7EF88EDEB5E4AD1ABF0E125",hash_generated_method="23A41768FB0B8E7E2E1730BDCDF4AD35") @DSComment("Constructor") @DSVerified @DSSafe(DSCat.SAFE_OTHERS) public DatagramSocket createDatagramSoc... | Creates a DatagramSocket on the local host at the first available port. <p> |
public AccessibilityServiceInfo(ResolveInfo resolveInfo,Context context) throws XmlPullParserException, IOException {
ServiceInfo serviceInfo=resolveInfo.serviceInfo;
mId=new ComponentName(serviceInfo.packageName,serviceInfo.name).flattenToShortString();
mResolveInfo=resolveInfo;
XmlResourceParser parser=null;
... | Creates a new instance. |
public static AnimGameItem process(MD5Model md5Model,MD5AnimModel animModel,Vector3f defaultColour) throws Exception {
List<Matrix4f> invJointMatrices=calcInJointMatrices(md5Model);
List<AnimatedFrame> animatedFrames=processAnimationFrames(md5Model,animModel,invJointMatrices);
List<Mesh> list=new ArrayList<>();
... | Constructs and AnimGameItem instace based on a MD5 Model an MD5 Animation |
protected TamsMessage pollMessage(){
if (disablePoll) {
return null;
}
if (!pollQueue.isEmpty()) {
PollMessage pm=pollQueue.peek();
if (pm != null) {
tm=pm.getMessage();
return pm.getMessage();
}
}
return null;
}
| Check Tams MC for status updates |
public boolean isSetIm_true(){
return EncodingUtils.testBit(__isset_bitfield,__IM_TRUE_ISSET_ID);
}
| Returns true if field im_true is set (has been assigned a value) and false otherwise |
public DateTime withEra(int era){
return withMillis(getChronology().era().set(getMillis(),era));
}
| Returns a copy of this datetime with the era field updated. <p> DateTime is immutable, so there are no set methods. Instead, this method returns a new instance with the value of era changed. |
public boolean isLogicalFunction(){
return false;
}
| Max3 is not a logical function. |
public void load(){
if (!deobfMapFile.exists()) {
return;
}
LOG.info("Loading obfuscation map from: {}",deobfMapFile.getAbsoluteFile());
try {
List<String> lines=FileUtils.readLines(deobfMapFile,MAP_FILE_CHARSET);
for ( String l : lines) {
l=l.trim();
if (l.isEmpty() || l.startsWith("... | Loads deobfuscator presets |
public void testUnknownHost(){
String reqdata="Request Data";
Request request=Request.newBuilder().setStrData(reqdata).build();
SocketRpcChannel rpcChannel=new SocketRpcChannel("host",-1,new FakeSocketFactory().throwsException(new UnknownHostException()));
callAsync(rpcChannel,request,ErrorReason.UNKNOWN_HOST);... | Error while creating socket |
public static File resourceToGzFile(final String resource,final File file) throws IOException {
try (InputStream stream=Resources.getResourceAsStream(resource)){
return FileHelper.streamToGzFile(stream,file);
}
}
| Convenience method for turning a resource into a GZIP file that can be used as input. |
public static void insertTag(final JFrame parent,final ITagManager tagManager,final ITreeNode<CTag> parentTag){
try {
tagManager.insertTag(parentTag,"New Tag Node");
}
catch ( final CouldntSaveDataException e) {
CUtilityFunctions.logException(e);
final String innerMessage="E00128: " + "Could not inser... | Inserts a new node tag. |
protected static List<ColumnMetaData> columns(ResultSetMetaData metaData) throws SQLException {
if (metaData == null) {
return Collections.emptyList();
}
final List<ColumnMetaData> columns=new ArrayList<>();
for (int i=1; i <= metaData.getColumnCount(); i++) {
final SqlType sqlType=SqlType.valueOf(metaD... | Converts from JDBC metadata to Avatica columns. |
private void uninstallClientDecorations(JRootPane root){
uninstallBorder(root);
uninstallWindowListeners(root);
setTitlePane(root,null);
uninstallLayout(root);
int style=root.getWindowDecorationStyle();
if (style == JRootPane.NONE) {
root.repaint();
root.revalidate();
}
if (window != null) {
... | Uninstalls any state that <code>installClientDecorations</code> has installed. <p> NOTE: This may be called if you haven't installed client decorations yet (ie before <code>installClientDecorations</code> has been invoked). |
public PortService addPort(int port){
if (port > 0 && port < 65535) this.portList.add(port);
return this;
}
| Adds the specified port to the list for required ports to scan for. |
public UsedClass methodInC1(UsedClass p){
return p;
}
| Method in C1. |
private boolean hasChar(){
return this.pos < this.len;
}
| Are there any characters left to parse? |
@Override public void onTokenRefresh(){
startService(new Intent(this,RegistrationService.class));
}
| If you token is refreshed on GCM server side. GCM will notify that you token has been changed. So we can start service again and update our token. |
public void resetOriginals(){
mStartingStartTrim=0;
mStartingEndTrim=0;
mStartingRotation=0;
setStartTrim(0);
setEndTrim(0);
setRotation(0);
}
| Reset the progress spinner to default rotation, start and end angles. |
protected void appendEncodedStringValue(EncodedStringValue value,int field){
if (null == value) {
throw new NullPointerException();
}
switch (field) {
case BCC:
case CC:
case TO:
break;
default :
throw new RuntimeException("Invalid header field!");
}
ArrayList<EncodedStringValue> list=(ArrayList<EncodedSt... | Append one EncodedStringValue to another. |
public MultivariateTreeParameterModel(TreeModel tree,Parameter parameter,boolean includeRoot,boolean includeTips,int dim){
super(tree,parameter,includeRoot,includeTips);
this.dim=dim;
}
| This class constructs a tree parameter, and will set the dimension of the parameter to match the appropriate number of nodes if necessary. |
private boolean isSimilarSignature(Method possiblyMatchingMethod,String desiredMethodName,Class<?>[] desiredParamTypes){
return possiblyMatchingMethod.getName().equals(desiredMethodName) && match(possiblyMatchingMethod.getParameterTypes(),desiredParamTypes);
}
| Determines if a method has a "similar" signature, especially if wrapping primitive argument types would result in an exactly matching signature. |
public void selectAll(){
checkWidget();
checkNullElement();
this.selection.addAll(this.elements);
updateSelection();
}
| Selects all selected items in the receiver's list. |
public void haltAndCatchFire(){
if (!getWorld().isRemote) {
state=ControllerState.READY;
casings.forEach(null);
final MessageHaltAndCatchFire message=new MessageHaltAndCatchFire(getWorld(),getPos());
final NetworkRegistry.TargetPoint target=Network.getTargetPoint(getWorld(),getPos().getX(),getPos().ge... | Reset the controller, pause for a moment and catch fire. |
@Override public Object clone() throws CloneNotSupportedException {
return super.clone();
}
| Returns a clone of this instance. |
public final int yylength(){
return zzMarkedPos - zzStartRead;
}
| Returns the length of the matched text region. |
public void doSave(IProgressMonitor monitor){
this.commitPages(monitor,true);
model.save(monitor);
model.removeMarkers(Model.TLC_MODEL_ERROR_MARKER_SANY);
boolean revalidate=TLCUIActivator.getDefault().getPreferenceStore().getBoolean(ITLCPreferenceConstants.I_TLC_REVALIDATE_ON_MODIFY);
if (revalidate) {
l... | This method saves the model even if the spec is not parsed. This is probably a good idea, since the user may want to quit in the middle of his work without losing what he's done to the model. |
public void check(SnmpValue x,long var,Object data) throws SnmpStatusException {
switch ((int)var) {
case 4:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 3:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 2:
throw new SnmpStatusException(SnmpStatusExcepti... | Check the value of a scalar variable |
public int LEW(byte[] arr,int off){
return arr[off + 3] << 24 & 0xff000000 | arr[off + 2] << 16 & 0xff0000 | arr[off + 1] << 8 & 0xff00 | arr[off] & 0xFF;
}
| Return value of a Little Endian 32 bit word from the byte array at offset off. |
public Acos(){
super(Number.class,Number.class);
}
| Constructs a new node for calculating the arc cosine of a number. |
protected void makeVisible(){
FHTreeStateNode parent=(FHTreeStateNode)getParent();
if (parent != null) parent.expandParentAndReceiver();
}
| Makes the receiver visible, but invoking <code>expandParentAndReceiver</code> on the superclass. |
public void addEntryForMigration(Entry entry){
addTabId(getCount(),entry.tabId);
if (mEntryMap.indexOfKey(entry.tabId) >= 0) return;
mEntryMap.put(entry.tabId,entry);
}
| Add an entry to the entry map for migration purposes. |
public static <T1>Tuple2od<T1> tuple(T1 v1,double v2){
return new Tuple2od<>(v1,v2);
}
| Creates a tuple of object-double. |
@Override public void eUnset(int featureID){
switch (featureID) {
case N4JSPackage.EXPRESSION_STATEMENT__EXPRESSION:
setExpression((Expression)null);
return;
}
super.eUnset(featureID);
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public UUID parentNodeId(){
return parentNodeId;
}
| Gets parent node ID. |
@Override public String toString(){
String result=m_baseExperiment.toString();
result+="\nRemote Hosts:\n";
for (int i=0; i < m_remoteHosts.size(); i++) {
result+=((String)m_remoteHosts.elementAt(i)) + '\n';
}
return result;
}
| Overides toString in Experiment |
protected void maybeThrowValidationException() throws ValidationException {
if (validationExceptions.size() > 0) {
throw new ValidationException("Encountered " + validationExceptions.size() + " validation exceptions.",validationExceptions);
}
}
| Throws a ValidationException if the number of validationExceptions detected is greater than zero. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.