code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public IndicesAliasesRequestBuilder addAlias(String index,String alias,Map<String,Object> filter){
request.addAlias(alias,filter,index);
return this;
}
| Adds an alias to the index. |
public static void randomizePrimitives(TestCase test){
for ( Statement s : test) {
if (s instanceof PrimitiveStatement<?>) {
if (s instanceof NullStatement) {
continue;
}
((PrimitiveStatement<?>)s).randomize();
}
}
}
| This method allows to reset all primitive values before trying again a local search on the same test case. |
private int readAnnotationTarget(final Context context,int u){
int target=readInt(u);
switch (target >>> 24) {
case 0x00:
case 0x01:
case 0x16:
target&=0xFFFF0000;
u+=2;
break;
case 0x13:
case 0x14:
case 0x15:
target&=0xFF000000;
u+=1;
break;
case 0x40:
case 0x41:
{
target&=0xFF000000;
int n=readUnsignedShort(u... | Parses the header of a type annotation to extract its target_type and target_path (the result is stored in the given context), and returns the start offset of the rest of the type_annotation structure (i.e. the offset to the type_index field, which is followed by num_element_value_pairs and then the name,value pairs). |
public static void defineDeptEmployeeTypes(TypeSystem ts) throws AtlasException {
String _description="_description";
EnumTypeDefinition orgLevelEnum=new EnumTypeDefinition("OrgLevel","OrgLevel" + _description,new EnumValue("L1",1),new EnumValue("L2",2));
StructTypeDefinition addressDetails=createStructTypeDef("A... | Class Hierarchy is: Department(name : String, employees : Array[Person]) Person(name : String, department : Department, manager : Manager) Manager(subordinates : Array[Person]) extends Person <p/> Persons can have SecurityClearance(level : Int) clearance. |
private static LocalDateTime round(LocalDateTime t,String unit){
ChronoUnit uu=CALENDAR_UNITS.get(unit);
if (null == uu) {
throw new IllegalArgumentException("Rounding Unit not recognized: " + unit);
}
switch (uu) {
case YEARS:
return LocalDateTime.of(LocalDate.of(t.getYear(),1,1),LocalTime.MIDNIGHT);
cas... | Returns a modified time by "rounding" down to the specified unit |
public static VOUserSubscription toVOUserSubscription(Subscription subscription,PlatformUser user,LocalizerFacade facade,PerformanceHint scope){
if (subscription == null) {
return null;
}
VOUserSubscription voUsrSub=new VOUserSubscription();
switch (scope) {
case ONLY_IDENTIFYING_FIELDS:
fillIdentifyingFi... | Converts the given domain object to a value object containing the identifying attributes. |
protected void runTests() throws Exception {
int[] lines;
int[] jLines;
String targetName="onion.pickle.Mangle";
startUp(targetName);
if (!stratum.equals("unset")) {
vm().setDefaultStratum(stratum);
}
BreakpointEvent bpe=resumeTo(targetName,"main","([Ljava/lang/String;)V");
waitForInput();
ThreadR... | test core |
public void saveLastState(){
lastStateVector=stateVector.copyInto(lastStateVector);
}
| Copies the "current state" vector into the "last state" vector. This is run at the end of each timestep after all state updates are made. |
static boolean isStatic(Node fullName){
return !(fullName.getFirstChild().isGetProp() && "prototype".equals(fullName.getFirstChild().getLastChild().getString()));
}
| Returns if a name refers to a static member of a class. |
public static StorageSystem[] createSRDFStorageSystems(DbClient dbClient,String label1,Network network1,String[] portWWNs1,VirtualArray varray1,String label2,Network network2,String[] portWWNs2,VirtualArray varray2){
StorageSystem[] storageSystems=new StorageSystem[3];
StorageSystem storageSystem1=PlacementTestUtil... | Create SRDF paired vmax arrays. |
private void readObject(){
}
| <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc --> |
@DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-09-03 14:59:53.888 -0400",hash_original_method="4F3E4875B5D995F245642A033A3E9859",hash_generated_method="34877BF524E2DB7C2C78FF9F429235F5") public static IOFileFilter makeFileOnly(IOFileFilter filter){
if (filter == n... | Decorates a filter so that it only applies to files and not to directories. |
private void hideInvisibleElements(){
final Graph2D graph=getGraph();
for ( final INaviEdge edge : m_rawView.getGraph().getEdges()) {
if (!edge.isVisible()) {
graph.removeEdge(getYEdge(edge));
}
}
for ( final INaviViewNode node : m_rawView.getGraph()) {
if (!node.isVisible()) {
graph.r... | When a graph is initially shown, the logically invisible elements have to be removed explicitly from the yFiles graph. |
public static Document readToken(final String tokenResource) throws SAXException, IOException, ParserConfigurationException {
Validate.notNull(tokenResource);
String resourcePath="/" + tokenResource;
logger.info("Creating assertion token from " + resourcePath);
InputStream is=TestUtils.class.getResourceAsStream... | Create Dom from assertion xml file. |
public static void writeBcdNumber(OutputStream os,String number) throws IOException {
int bcd=0x00;
int n=0;
for (int i=0; i < number.length(); i++) {
switch (number.charAt(i)) {
case '0':
bcd|=0x00;
break;
case '1':
bcd|=0x10;
break;
case '2':
bcd|=0x20;
break;
case '3':
bcd|=0x30;
break;
case '4':
b... | Writes the given phonenumber to the stream (BCD coded) |
public static synchronized Type tMethod(Type returnType,Type argTypes[]){
StringBuffer buf=new StringBuffer();
buf.append(SIG_METHOD);
for (int i=0; i < argTypes.length; i++) {
buf.append(argTypes[i].getTypeSignature());
}
buf.append(SIG_ENDMETHOD);
buf.append(returnType.getTypeSignature());
String si... | Create a method type with arguments. |
public IntegerMap<ProductionRule> show(final PlayerID id,final JFrame parent,final GameData data,final boolean bid,final IntegerMap<ProductionRule> initialPurchase){
if (parent != null) {
final String title="Produce";
final JPanel contents=this;
m_dialog=SwingComponents.newJDialogModal(parent,title,conten... | Shows the production panel, and returns a map of selected rules. |
public CModulesTableModelSynchronizer(final CModulesTable table,final CDebugPerspectiveModel debugPerspectiveModel){
Preconditions.checkNotNull(table,"IE01460: Model argument can not be null");
Preconditions.checkNotNull(debugPerspectiveModel,"IE01461: Debug perspective model argument can not be null");
m_model=t... | Creates a new synchronizer object. |
public OrExpr newOrExpr(Value op1,Value op2){
return new JOrExpr(op1,op2);
}
| Constructs a OrExpr(Immediate, Immediate) grammar chunk. |
public JasperReportsResult(){
super();
}
| Default ctor. |
public WETriangleMesh addMesh(Mesh3D m){
super.addMesh(m);
return this;
}
| Adds all faces from the given mesh to this one. |
private void buildUnitOccupation(String propType,UnitTaxCalculationInfo unit){
LOGGER.debug("Entered into buildUnitOccupation, propType=" + propType);
StringBuilder occupierName=new StringBuilder();
if (OWNERSHIP_TYPE_VAC_LAND.equals(propType)) {
if (OCC_OWNER.equals(unit.getUnitOccupation()) || OCC_COMMERCIA... | unit occupancy in the 2nd column of the Notice/Prativrutta will be like for Open Plot if the occupancy is owner then its "Open Plot". In case of Open Plot if the occupancy is tenant then its "OP-Name of Occupier". In case of State govt and Central govt property's the format is "Prefix-Owner" (ex. SGovt-Owner) In case o... |
public static String fromHashToString(Map map){
String type=null;
String value=null;
String resultado=null;
StringBuffer contenido=null;
if (map != null) {
contenido=new StringBuffer();
contenido.append(ContenidoTags.DETAILS_OPEN_TAG);
Iterator it=map.keySet().iterator();
while (it.hasNext()) ... | Transforma un hash en el xml |
public char nextChar(){
return (char)(next(16));
}
| For completeness' sake, though it's not in java.util.Random. |
public void play(){
if (mediaPlayer.getCurrentMedia() != null) {
if (mediaPlayer.getState() == MediaPlaybackState.Paused || mediaPlayer.getState() == MediaPlaybackState.Playing) {
mediaPlayer.togglePause();
}
else if (mediaPlayer.getState() == MediaPlaybackState.Closed) {
LibraryMediator.inst... | Begins playing the loaded song |
public AbstractIterativeScorerWithPriors(Hypergraph<V,E> g,Function<? super E,? extends Number> edge_weights,Function<? super V,? extends S> vertex_priors,double alpha){
super(g,edge_weights);
this.vertex_priors=vertex_priors;
this.alpha=alpha;
initialize();
}
| Creates an instance for the specified graph, edge weights, vertex priors, and jump probability. |
public void hide(boolean animate){
hide(animate,fadeOut);
}
| Make the badge non-visible in the UI. |
public void beforeFirst(){
if (this.rows.size() > 0) {
this.index=-1;
}
}
| Moves to before first. |
public FXGException(){
super();
arguments=null;
message=null;
lineNumber=-1;
columnNumber=-1;
}
| Instantiates a new fXG exception. |
public int parseInt() throws DecodeException {
return parseIntWithTag(ASN_INTEGER);
}
| Parses an ASN_INTEGER tagged integer from this BER buffer. |
@SuppressWarnings("unchecked") @Override public void eSet(int featureID,Object newValue){
switch (featureID) {
case SGraphPackage.VERTEX__PARENT_REGION:
setParentRegion((Region)newValue);
return;
case SGraphPackage.VERTEX__INCOMING_TRANSITIONS:
getIncomingTransitions().clear();
getIncomingTransitions().addAll((Co... | <!-- begin-user-doc --> <!-- end-user-doc --> |
public void paintSplitPaneDividerBackground(SynthContext context,Graphics g,int x,int y,int w,int h,int orientation){
if (orientation == JSplitPane.HORIZONTAL_SPLIT) {
AffineTransform transform=new AffineTransform();
transform.scale(-1,1);
transform.rotate(Math.toRadians(90));
paintBackground(context,... | Paints the background of the divider of a split pane. This implementation invokes the method of the same name without the orientation. |
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. |
protected String encodeCookie(SerializableCookie cookie){
if (cookie == null) return null;
ByteArrayOutputStream os=new ByteArrayOutputStream();
try {
ObjectOutputStream outputStream=new ObjectOutputStream(os);
outputStream.writeObject(cookie);
}
catch ( IOException e) {
e.printStackTrace();
... | Serializes Cookie object into String |
@Override public void start(DeployService2Impl<I> deploy,Result<I> result){
LifecycleState state=deploy.getState();
if (state.isStopped()) {
deploy.startImpl(result);
}
else if (state.isError()) {
deploy.restartImpl(result);
}
else if (deploy.isModifiedNow()) {
deploy.restartImpl(result);
}
... | Starts the instance. Called from an admin start. |
static private String INT_Min(){
int tempValue=Integer.MIN_VALUE;
return String.valueOf(tempValue);
}
| Get the min value for a int |
private List<CatalogService> filterServicesByACLs(List<CatalogService> services){
List<CatalogService> filteredCatalogServices=Lists.newArrayList();
StorageOSUser storageOSUser=getUserFromContext();
String username=storageOSUser.getName();
if (isAdministrator(storageOSUser)) {
log.debug(username + " has Sys... | filter out the services which user don't have access to |
public void removeActionListener(ActionListener l){
actualButton.removeActionListener(l);
}
| Removes the listener from tracking button events |
private void updateVMAX3AutoTieringPolicy(StorageSystem storage,List<URI> volumeURIs,VirtualPool newVirtualPool,boolean rollback,TaskCompleter taskCompleter) throws Exception {
_log.info("Changing parking storage group for the VMAX3 non-exported volumes based on newPolicyName.");
String newPolicyName=ControllerUtil... | This method is used to change parking storage group for the VMAX3 non exported volumes based on newPolicyName. |
public void startNotification(Episode episode,MediaSession session,Bitmap channelArt){
Notification notification=createNotification(episode,session,channelArt);
if (notification != null) {
if (podcastPlayerService.getPlaybackState() == PlaybackState.STATE_PLAYING) {
podcastPlayerService.startForeground(No... | Starts a notification |
protected void writeHeader() throws IOException {
mOut.write(mHeader.toString().getBytes());
}
| write current header to output stream |
public void cancel(){
cancelled=true;
Thread thread=this.thread;
if (thread != null) {
thread.interrupt();
}
}
| stop execution of the task |
public static void writeUTF(String s,DataOutputStream d) throws IOException {
if (s == null) {
d.writeBoolean(false);
return;
}
d.writeBoolean(true);
d.writeUTF(s);
}
| Writes a string with a null flag, this allows a String which may be null |
protected void reportReturn(String methodCall){
reportAllReturns(methodCall,"");
}
| Conveniance method to report (for logging) that a method returned (void return type). |
public static FormatField parseFormatLine(String line){
return new FormatField(line);
}
| Convert format line into <code>FormatField</code> object |
public int size(){
return size;
}
| Returns the size of the Iterable |
private static char[] zzUnpackCMap(String packed){
char[] map=new char[0x10000];
int i=0;
int j=0;
while (i < 172) {
int count=packed.charAt(i++);
char value=packed.charAt(i++);
do map[j++]=value;
while (--count > 0);
}
return map;
}
| Unpacks the compressed character translation table. |
public void deleteNode(int nTargetNode) throws Exception {
if (m_bNeedsUndoAction) {
addUndoAction(new DeleteNodeAction(nTargetNode));
}
int nAtts=m_Instances.numAttributes() - 1;
int nTargetCard=m_Instances.attribute(nTargetNode).numValues();
Estimator[][] distributions=new Estimator[nAtts][];
for (int... | Delete node from the network, updating instances, parentsets, distributions Conditional distributions are condensed by taking the values for the target node to be its first value. Used for manual manipulation of the Bayesian network. |
protected void flagToRemoveFromQuarantineQueue(NodePortTuple npt){
if (toRemoveFromQuarantineQueue.contains(npt) == false) {
toRemoveFromQuarantineQueue.add(npt);
}
}
| Remove a switch port from the quarantine queue. protected void removeFromQuarantineQueue(NodePortTuple npt) { // Remove all occurrences of the node port tuple from the list. while (quarantineQueue.remove(npt)); } |
public boolean isDeclaredProvidedByRuntime(){
return declaredProvidedByRuntime;
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public static void printError(String msg){
printError(null,msg);
}
| no-package proxy method |
@DSComment("Private Method") @DSBan(DSCat.PRIVATE_METHOD) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:28:42.614 -0500",hash_original_method="957AE60D3A9CE570CB89C0AA6C75F6C8",hash_generated_method="2B124FEB513D2470D3DA6C6DFDC1125F") private final void native_compile(String sql){... | Compiles SQL into a SQLite program. <P>The database lock must be held when calling this method. |
public MatrixAtom(ArrayOfAtoms array,String options){
this(false,array,options);
}
| Creates an empty matrix |
protected int countPositions(){
int count=0;
for ( List<? extends Position> boundary : this.boundaries) {
count+=boundary.size();
}
return count;
}
| Counts the total number of positions in this shape, including all positions in all boundaries. |
@VisibleForTesting void onHandleIntent(Intent intent,ITrackRecordingService service){
String action=intent.getAction();
if (action != null) {
try {
if (action.equals(getString(R.string.track_action_start))) {
service.startNewTrack();
}
else if (action.equals(getString(R.string.track_a... | Handles the intent to start or stop a recording. |
public final int size(){
return keys.length;
}
| Returns the number of key objects. |
private void createQuadProgram() throws IOException {
int program=glCreateProgram();
int vshader=DemoUtils.createShader("org/lwjgl/demo/opengl/raytracing/quad.vs",GL_VERTEX_SHADER,"330");
int fshader=DemoUtils.createShader("org/lwjgl/demo/opengl/raytracing/quad.fs",GL_FRAGMENT_SHADER,"330");
glAttachShader(prog... | Create the full-scren quad shader. |
public String globalInfo(){
return "This filter removes attributes that do not vary at all or that vary " + "too much. All constant attributes are deleted automatically, along " + "with any that exceed the maximum percentage of variance parameter. "+ "The maximum variance test is only applied to nominal attributes.";... | Returns a string describing this filter |
private void buildBrokenAreas(Rect r){
final int SEGMENT_LESS=SEGMENT * 7 / 9;
final int START_LENGTH=(int)(SEGMENT * 1.1);
float linkLen=0;
int repeat=0;
PathMeasure pmNow=new PathMeasure();
PathMeasure pmPre=new PathMeasure();
for (int i=0; i < mConfig.complexity; i++) {
lineRifts[i].setStartLength(... | Build broken area into path |
protected synchronized void applyEvent(final NetworkChangeEvent event){
if (this.changeEvents == null) this.changeEvents=new TreeMap<>();
this.changeEvents.put(event.getStartTime(),event);
if (event.getFreespeedChange() != null) {
this.variableFreespeed.incChangeEvents();
}
if (event.getFlowCapacityChan... | Applies a new change event to the link. |
public static boolean equals(char[] array1,char[] array2){
if (array1 == array2) {
return true;
}
if (array1 == null || array2 == null || array1.length != array2.length) {
return false;
}
for (int i=0; i < array1.length; i++) {
if (array1[i] != array2[i]) {
return false;
}
}
return t... | Compares the two arrays. |
public void testConnectHeadset(){
int iterations=BluetoothTestRunner.sConnectHeadsetIterations;
if (iterations == 0) {
return;
}
BluetoothAdapter adapter=BluetoothAdapter.getDefaultAdapter();
BluetoothDevice device=adapter.getRemoteDevice(BluetoothTestRunner.sDeviceAddress);
mTestUtils.disable(adapter);... | Stress test for connecting and disconnecting the HFP with a hands free device. <p> In this test, the local device plays the role of an HFP audio gateway, and initiates connections and disconnections with a hands free device. |
@GET @Controller @Produces("text/html") @Path("view1/{id}") public String view1(@PathParam("id") String id){
return "/requestDispatcher";
}
| MVC controller to render a book in HTML. |
private CDataflowViewCreator(){
}
| You are not supposed to instantiate this class. |
public OrdinalStatisticalTest(int numberOfGroups,Comparator<RankedObservation> comparator){
super();
this.numberOfGroups=numberOfGroups;
this.comparator=comparator;
data=new ArrayList<RankedObservation>();
}
| Constructs a new ordinal (rank-based) statistical test for the specified number of groups and the comparator for ordering observations. |
public static EnergyNetwork initNetwork(){
Random random=new Random(System.currentTimeMillis());
int id=random.nextInt();
while (usedIds.contains(id)) {
id=random.nextInt();
}
;
EnergyNetwork net=new EnergyNetwork();
usedIds.add(id);
net.networkID=id;
return net;
}
| Create a new network and get an ID |
private void resetBoard(){
for ( NineSwitchesGameSwitch gameSwitch : switches) {
gameSwitch.setState(0);
}
switches.get(4).setState(1);
}
| resets all switches to point back to the left. |
void updateLocalDeviceComponent(VPlexLocalDeviceComponentInfo componentInfo) throws VPlexApiException {
StringBuilder uriBuilder=new StringBuilder();
uriBuilder.append(VPlexApiConstants.VPLEX_PATH);
uriBuilder.append(componentInfo.getPath());
URI requestURI=_vplexApiClient.getBaseURI().resolve(URI.create(uriBui... | Gets the attributes for the passed local device component. |
public static String strip(String s){
return s.replaceAll("\u001B\\[[;\\d]*m","");
}
| Strip a string of its ANSI formatting. This removes colour codes. If you're storing a string to a file, it's likely you want to store it after calling this method to ensure you don't store a mangled mess of ASCII escape codes |
protected String encodeCookie(SerializableHttpCookie cookie){
if (cookie == null) return null;
ByteArrayOutputStream os=new ByteArrayOutputStream();
try {
ObjectOutputStream outputStream=new ObjectOutputStream(os);
outputStream.writeObject(cookie);
}
catch ( IOException e) {
Util.log("IOExceptio... | Serializes Cookie object into String |
@Override public void onShown(Snackbar snackbar){
if (callback != null) {
callback.onShown(snackbar);
}
}
| Notifies that the Snackbar has been shown (made visible). |
public static void sort(int[] keys,int[] values){
hybridsort(keys,values,0,keys.length - 1);
}
| Sorts the keys in an increasing order. Elements key[i] and values[i] are always swapped together in the corresponding arrays. <p> A mixture of several sorting algorithms is used: <p> A radix sort performs better on the numeric data we sort, but requires additional storage to perform the sorting. Therefore only the not-... |
public static void main(String[] args) throws Exception {
new SimpleStatistics().start(args);
}
| Starts the command line utility for computing statistics across multiple data files. |
public String toString(){
return map.toString();
}
| Returns a string representation of the map's contents |
public boolean isEnabledAt(int index){
return pages.get(index).isEnabled();
}
| Returns whether or not the tab at <code>index</code> is currently enabled. |
@Override public IMatrix matrixValue(final IScope scope,final IType contentsType,final boolean copy) throws GamaRuntimeException {
return listValue(scope,contentsType,false).matrixValue(scope,contentsType,false);
}
| Method matrixValue() |
boolean bindAsUser(Properties ldapProperties,String bindDN,String password){
boolean bindSuccessful=false;
Properties p=(Properties)ldapProperties.clone();
p.put(Context.SECURITY_PRINCIPAL,bindDN);
p.put(Context.SECURITY_CREDENTIALS,password);
DirContext ctx=null;
try {
ctx=new InitialDirContext(p);
... | Attempt to bind as a specific DN. |
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 static void pop(){
Thread t=Thread.currentThread();
if (t.getClass() == CODE) {
CodenameOneThread c=(CodenameOneThread)t;
c.popStack();
}
}
| Pops the current method from the stack |
public static PlusMult minusDiv(final double constant){
return new PlusMult(-1 / constant);
}
| <tt>a - b/constant</tt>. |
public void readContent() throws IOException {
if (offset + length > buffer.length) {
throw new ASN1Exception("Unexpected end of encoding");
}
if (in == null) {
offset+=length;
}
else {
int bytesRead=in.read(buffer,offset,length);
if (bytesRead != length) {
int c=bytesRead;
do {
... | Reads the next encoded content from the encoded input stream. The method MUST be used for reading a primitive encoded content. |
public void testFirstElement(){
LinkedBlockingDeque q=populatedDeque(SIZE);
for (int i=0; i < SIZE; ++i) {
assertEquals(i,q.getFirst());
assertEquals(i,q.pollFirst());
}
try {
q.getFirst();
shouldThrow();
}
catch ( NoSuchElementException success) {
}
assertNull(q.peekFirst());
}
| getFirst() returns first element, or throws NSEE if empty |
private void startNotification(Attributes atts){
if (!this.seenNotifications) {
if (!this.seenAttribute && !this.seenOperation) {
pw.println("<tr valign=\"top\">");
pw.println(" <th align=\"left\">Notifications</th>");
pw.println(" <th align=\"left\" colspan=\"2\">Name</th>");
pw.println... | Generates a row in a table for an MBean notification |
public BasicGeneratorConfig(RelationshipGenerator relationshipGenerator,NodeCreator nodeCreator,RelationshipCreator relationshipCreator){
this.relationshipGenerator=relationshipGenerator;
this.nodeCreator=nodeCreator;
this.relationshipCreator=relationshipCreator;
}
| Create a new configuration. |
public static Iterator<IonValue> iterate(ValueFactory valueFactory,IonReader input){
return new IonIteratorImpl(valueFactory,input);
}
| Create a value iterator from a reader. Primarily a trampoline for access permission. |
MemberState completeAppend(long time){
timeBuffer.record(time);
return completeAppend();
}
| Completes an append request to the member. |
@DSSink({DSSinkKind.IO}) @DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-09-03 14:59:52.025 -0400",hash_original_method="2C0F3D6FFED876F2881377B8BBDD2213",hash_generated_method="5DEAFCD23726202EB27453ED04333FE7") public synchronized void writeTo(OutputStream out) thr... | Writes the entire contents of this byte stream to the specified output stream. |
private long endTime(long timeout){
long endTime=U.currentTimeMillis() + timeout;
if (endTime < 0) endTime=Long.MAX_VALUE;
return endTime;
}
| Calculates end time with overflow check. |
public final void clearImageData(){
object_image_name.clear();
object_page_id.clear();
x.clear();
y.clear();
w.clear();
h.clear();
current_item=0;
}
| clear object and reset (does not flush images from disk cache held by ObjectStore) |
public boolean hasListeners(String propertyName){
for ( PropertyChangeListener p : listeners) {
if (!(p instanceof PropertyChangeListenerProxy) || Objects.equal(propertyName,((PropertyChangeListenerProxy)p).getPropertyName())) {
return true;
}
}
return false;
}
| Returns true if there are listeners registered to the property with the given name. |
public BreakpointsRemovedReply(final int packetId,final int errorCode,final List<Pair<RelocatedAddress,Integer>> addresses){
super(packetId,errorCode,addresses);
}
| Creates a new breakpoint removed reply. |
public ReasonHeader createReasonHeader(String protocol,int cause,String text) throws InvalidArgumentException, ParseException {
if (protocol == null) throw new NullPointerException("bad protocol arg");
if (cause < 0) throw new InvalidArgumentException("bad cause");
Reason reason=new Reason();
reason.setProt... | Creates a new ReasonHeader based on the newly supplied reason value. |
public MesosCluster loadCluster(MesosClusterFactory factory){
String clusterId=readClusterId();
if (clusterId != null) {
try {
return MesosCluster.loadCluster(clusterId,factory);
}
catch ( MinimesosException e) {
deleteMinimesosFile();
}
}
return null;
}
| Loads representation of the running cluster |
@Override public String toString(){
return "L" + System.identityHashCode(this);
}
| Returns a string representation of this label. |
protected int drawNextEventTimeDiff(){
int timeDiff=msgInterval[0] == msgInterval[1] ? 0 : rng.nextInt(msgInterval[1] - msgInterval[0]);
return msgInterval[0] + timeDiff;
}
| Generates a (random) time difference between two events |
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 int refresh(){
if (m_refreshing) return 0;
return refresh(true);
}
| Refresh & return number of items read. Get get data of parent lookups |
private void rollSequence() throws IOException {
closeCurrentSequenceFilePair();
mCurrentSeq=seqFilePair(mRollSeqNum,mSizeLimit);
mRollSeqNum++;
}
| Closes current files and creates next ones. |
public int hashCode(){
if (hashCode == 0) {
hashCode=createHashCode();
}
return hashCode;
}
| DOCUMENT ME! |
private Cluster.Member initializeMember(ObjectName mbeanName,Cluster.Member member) throws InstanceNotFoundException, ReflectionException, IOException {
AttributeList attributeList=this.mbs.getAttributes(mbeanName,PulseConstants.MEMBER_MBEAN_ATTRIBUTES);
for (int i=0; i < attributeList.size(); i++) {
Attribute ... | function used to iterate through all member attributes and return the updated member |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.