code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public SBitmap(){
super(GraphicType.GT_Bitmap,RenderType.RT_Unknown,LineType.LT_Unknown,DeclutterType.DC_None);
p1_=new XYPoint((short)0,(short)0);
ll1_=new LLPoint(0f,0f);
width_=0;
height_=0;
x_hot_=0;
y_hot_=0;
bits_=new byte[0];
bmref_=null;
}
| Create empty, add parameters later. |
protected void prepare(){
}
| Prepare - e.g., get Parameters. |
public int count(Predicate<? super A> predicate){
int result=0;
for ( A a : this) {
if (predicate.test(a)) {
result++;
}
}
return result;
}
| Counts the number of elements satisfying a predicate. |
public static String niceStoreTypeName(String storetype){
if (storetype.equalsIgnoreCase("Windows-MY")) {
return "Windows-MY";
}
else if (storetype.equalsIgnoreCase("Windows-ROOT")) {
return "Windows-ROOT";
}
else {
return storetype.toUpperCase(Locale.ENGLISH);
}
}
| Returns standard-looking names for storetype |
public String toString(int depth){
if (depth <= 0) return "";
return (" uid: " + myUID + " kind: "+ (kind == -1 ? "<none>" : kinds[kind])+ getPreCommentsAsString());
}
| Default implementation of toString() to be inherited by subclasses of SemanticNode for implementing ExploreNode interface; the depth parameter is a bound on the depth of the tree that is converted to String. |
public boolean containsBody(Body body){
return this.bodies.contains(body);
}
| Returns true if this world contains the given body. |
protected void childJustAddedHook(Object child,BCSChild bcsc){
}
| subclasses may override this method to simply extend add() semantics after the child has been added and before the event notification has occurred. The method is called with the child synchronized. |
public static void checkPathPortals(OBlock b){
if (log.isDebugEnabled()) log.debug("checkPathPortals for " + b.getDisplayName());
if (_textArea == null) {
_textArea=new javax.swing.JTextArea(10,50);
_textArea.setEditable(false);
_textArea.setTabSize(4);
_textArea.append(Bundle.getMessage("ErrWarnA... | Validation of paths within a block. Gathers messages in a text area that can be displayed after all are written. |
public boolean back(){
if (browser == null || browser.isDisposed()) return false;
return browser.back();
}
| Navigate to the previous session history item. Convenience method that calls the underlying SWT browser. |
public CreateRegionProcessor(CacheDistributionAdvisee newRegion){
this.newRegion=newRegion;
}
| Creates a new instance of CreateRegionProcessor |
public void resume() throws DebuggerException {
try {
vm.resume();
LOG.debug("Resume VM");
}
catch ( VMCannotBeModifiedException e) {
throw new DebuggerException(e.getMessage(),e);
}
finally {
resetCurrentThread();
}
}
| Resume suspended JVM. |
private String readRawTextFile(int resId){
InputStream inputStream=resources.openRawResource(resId);
try {
BufferedReader reader=new BufferedReader(new InputStreamReader(inputStream));
StringBuilder sb=new StringBuilder();
String line;
while ((line=reader.readLine()) != null) {
sb.append(line)... | Converts a raw text file into a string. |
private boolean equals(LabelKey key){
if (key == this) {
return true;
}
if (key.label != label) {
return false;
}
if (key.owner != owner) {
return false;
}
if (key.type != type) {
return false;
}
return key.name.equals(name);
}
| This is used to determine if two keys are the same. Ultimately two keys are equal if they represent the same contact and annotation from that contact. If everything is equal by identity then this will be true. |
public static double logSumExp(Vec vals,double maxValue){
double expSum=0.0;
for (int i=0; i < vals.length(); i++) expSum+=exp(vals.get(i) - maxValue);
return maxValue + log(expSum);
}
| Provides a numerically table way to perform the log of a sum of exponentiations. The computed result is <br> log(<big>∑</big><sub> ∀ val ∈ vals</sub> exp(val) ) |
protected POInfo initPO(Properties ctx){
POInfo poi=POInfo.getPOInfo(ctx,Table_ID,get_TrxName());
return poi;
}
| Load Meta Data |
public static String toJson(Object o) throws Exception {
return objectMapper.writeValueAsString(o);
}
| Convert an object to JSON using Jackson's ObjectMapper |
private void writeWorldData(boolean async){
maybeAsync(async,null);
}
| Save the world data using the metadata service. |
protected void writeEmbeddedTags(AttributeSet attr) throws IOException {
attr=convertToHTML(attr,oConvAttr);
Enumeration names=attr.getAttributeNames();
while (names.hasMoreElements()) {
Object name=names.nextElement();
if (name instanceof HTML.Tag) {
HTML.Tag tag=(HTML.Tag)name;
if (tag == HT... | Searches for embedded tags in the AttributeSet and writes them out. It also stores these tags in a vector so that when appropriate the corresponding end tags can be written out. |
public static <A,B>ImmutableList<B> transform(Collection<A> items,final Function<A,B> funk){
return transform(items,max(1,min(items.size(),MAX_THREADS)),funk);
}
| Runs transform with the default number of threads. |
void test() throws Exception {
Class.forName("org.h2.Driver");
Connection conn=DriverManager.getConnection("jdbc:h2:test","sa","");
Statement stat=conn.createStatement();
stat.execute("DROP TABLE IF EXISTS TEST");
stat.execute("CREATE TABLE TEST(ID INT PRIMARY KEY, NAME VARCHAR)");
PreparedStatement prep=co... | Run the progress test. |
public void onServiceConnected(){
displayServiceBinding(true);
}
| Callback called when service is connected. This method is called when the service is well connected to the RCS service (binding procedure successful): this means the methods of the API may be used. |
public <T>T post(URI postUri,Class<T> returnType,Object requestBody) throws SysClientException {
final WebResource webResource=createRequest(postUri);
ClientResponse response;
final WebResource.Builder resourceBuilder=addSignature(webResource);
_log.info("webResource=" + webResource);
try {
if (requestBod... | Call this method to perform POST action on any URI. |
public <T extends Point2D>T inverse(double x,double y,T ret){
RotationHelper rotationHelper=getRotHelper();
return (rotationHelper == null) ? getProjection().inverse(x,y,ret) : rotationHelper.inverse(x,y,ret);
}
| Checks the rotation set on the MapBean and accounts for it before calling inverse on the projection. |
public void testPorterStemFilter() throws Exception {
assertVocabulary(a,getDataPath("porterTestData.zip"),"voc.txt","output.txt");
}
| Run the stemmer against all strings in voc.txt The output should be the same as the string in output.txt |
public void deleteRow() throws SQLException {
crsInternal.deleteRow();
}
| Deletes the current row from this <code>JoinRowSetImpl</code> object and notifies listeners registered with this rowset that a row has changed. This method cannot be called when the cursor is on the insert row. <P> This method marks the current row as deleted, but it does not delete the row from the underlying data sou... |
public static String ltrim(String s){
if (s == null) {
return null;
}
int index=0;
int len=s.length();
while (index < len && Character.isWhitespace(s.charAt(index))) {
index++;
}
return (index >= len) ? "" : s.substring(index);
}
| Trims specified string from left. |
public void runTest() throws Throwable {
Document doc;
Document ownerDocument;
doc=(Document)load("staff",false);
ownerDocument=doc.getOwnerDocument();
assertNull("documentOwnerDocumentNull",ownerDocument);
}
| Runs the test case. |
public static Long create(User user){
user.createdDate=JodaDateUtil.now();
user.save();
return user.id;
}
| Create a user and set creation date |
@SuppressWarnings("static-access") public String sqlAD_getSystemClients(String vendorName,String catalogName,String schemaName){
String tableName="AD_Client";
ArrayList<String> columnNames=new ArrayList<String>();
columnNames.add("AD_Client_ID");
columnNames.add("Name");
ArrayList<String> aliasNames=new Array... | gets the database specific SQL command to find system clients |
public static void main(final String[] args){
DOMTestCase.doMain(elementsetattributenodenomodificationallowederrEE.class,args);
}
| Runs this test from the command line. |
protected void ensureRow(int row){
if (row >= rowCount) {
setRowCount(row + 1);
}
}
| Make sure this is a legit row, and if not, expand the table. |
public static void printActivityStatistics(String populationFilename){
Scenario sc=ScenarioUtils.createScenario(ConfigUtils.createConfig());
PopulationReader pr=new PopulationReader(sc);
pr.readFile(populationFilename);
LOG.info("Population parsed. Analysing activity types...");
Counter counter=new Counter(" ... | Check the population for unique activity types, and number of occurrences for each type. |
protected void removeThumbnailData(){
clearThumbnailAndStrips();
mIfdDatas[IfdId.TYPE_IFD_1]=null;
}
| Removes the thumbnail and its related tags. IFD1 will be removed. |
public void enableAll(){
if (doNotCheckCapabilities()) {
return;
}
enableAllAttributes();
enableAllAttributeDependencies();
enableAllClasses();
enableAllClassDependencies();
enable(Capability.MISSING_VALUES);
enable(Capability.MISSING_CLASS_VALUES);
}
| enables all attribute and class types (including dependencies) |
public String revertIgnoredSections(String sortedXml){
if (containsIgnoredSections) {
return ignoredSectionsStore.revertIgnoredSections(sortedXml);
}
return sortedXml;
}
| Reverts the processing instruction token back to original content |
public int pickParent(){
return MathUtils.randomChoice(cumulativeFitness);
}
| pick parents randomly but proportional to fitness. |
public boolean genStringAsCharArray(){
return genStringAsCharArray;
}
| Indicates whether text strings are to be generated as char arrays. |
public boolean isUnknown(){
return (type == UNKNOWN);
}
| Is the answer to the query unknown? |
protected void SWAP(int a,int b,Stack<d_node> cover_set){
d_node tmp=cover_set.element(a);
cover_set.set(a,cover_set.element(b));
cover_set.set(b,tmp);
}
| Swap two nodes in a cover set. |
public TransformHashWrapper(){
m_cHashModel.put("htmlEscape",new HtmlEscape());
m_cHashModel.put("compress",new StandardCompress());
m_cHashModel.put("escape",new TransformMethodWrapper1());
m_cHashModel.put("special",new TransformMethodWrapper2());
}
| Creates new TransformHashWrapper |
public final int compareTo(E o){
return ordinal - ((Enum)o).ordinal;
}
| Compares this object to the specified enum object to determine their relative order. This method compares the object's ordinal values, that is, their position in the enum declaration. |
private void db(String val){
VM.sysWrite("IRGEN " + bcodes.getDeclaringClass() + "."+ gc.getMethod().getName()+ ":"+ val+ "\n");
}
| Print a debug string to the sysWrite stream. |
public static <I,A>Parser<I,A> retn(A x){
return null;
}
| Monadic return function, i.e. a parser which returns the supplied value. |
protected File writeJsonManifest(File directory,String manifestFileName,DownloaderOutputManifestDto manifest) throws IOException {
Path resultFilePath=Paths.get(directory.getPath(),manifestFileName);
File resultFile=new File(resultFilePath.toString());
ObjectMapper mapper=new ObjectMapper();
mapper.writeValue(r... | Serializes provided manifest object instance as JSON output, written to a file in the specified directory. |
public boolean growFreeList(int units){
int requiredUnits=units + currentUnits;
if (requiredUnits > maxUnits) {
return false;
}
int blocks=0;
if (requiredUnits > currentCapacity()) {
int unitsReqd=requiredUnits - currentCapacity();
blocks=(unitsReqd + unitsPerBlock() - 1) / unitsPerBlock();
}
... | Grow the free list by a specified number of units. |
public static int binarySearch(long[] array,long value){
return binarySearch(array,0,array.length,value);
}
| Performs a binary search for the specified element in the specified sorted array. |
public static int EWOULDBLOCK(){
return Errno.EWOULDBLOCK.intValue();
}
| Operation would block |
public static final boolean isReallyInParentPath(File testParent,File testChild) throws IOException {
String testParentName=getCanonicalPath(testParent);
File testChildParentFile=testChild.getAbsoluteFile().getParentFile();
if (testChildParentFile == null) testChildParentFile=testChild.getAbsoluteFile();
Stri... | Detects attempts at directory traversal by testing if testDirectory really is a parent of testPath. |
protected void assertBasicDataIsInProperPlaces() throws Exception {
String sql;
sql="select * from employees where emp_no = 1";
checkRowExistsInServerGroup(sql,"fabric_test1_shard2");
checkRowDoesntExistInServerGroup(sql,"fabric_test1_shard1");
this.conn.clearServerSelectionCriteria();
this.conn.setShardTab... | Check data used by basic tests is in proper groups. Test both by direct group selection and shard table/key selection. |
public Graph(int numvert){
nodes=new Vertex[numvert];
Vertex v=null;
for (int i=numvert - 1; i >= 0; i--) {
Vertex tmp=nodes[i]=new Vertex(v,numvert);
v=tmp;
}
addEdges(numvert);
}
| Create a graph. |
public boolean isManual(){
Object oo=get_Value(COLUMNNAME_IsManual);
if (oo != null) {
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
| Get Manual. |
public void enableSpeech(boolean toEnable){
isSpeechEnabled=toEnable;
if (chatTab != null) {
chatTab.enableSpeech(toEnable);
}
if (menu != null) {
menu.enableSpeech(toEnable);
}
}
| Enables or disables the speech recording functionality in the GUI |
public T caseExistentialTypeRef(ExistentialTypeRef object){
return null;
}
| Returns the result of interpreting the object as an instance of '<em>Existential Type Ref</em>'. <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc --> |
private Object readResolve() throws ObjectStreamException {
if (this.equals(DateTickUnitType.YEAR)) {
return DateTickUnitType.YEAR;
}
else if (this.equals(DateTickUnitType.MONTH)) {
return DateTickUnitType.MONTH;
}
else if (this.equals(DateTickUnitType.DAY)) {
return DateTickUnitType.DAY;
}
e... | Ensures that serialization returns the unique instances. |
@Override public void write(int theByte) throws java.io.IOException {
if (suspendEncoding) {
this.out.write(theByte);
return;
}
if (encode) {
buffer[position++]=(byte)theByte;
if (position >= bufferLength) {
this.out.write(encode3to4(b4,buffer,bufferLength,options));
lineLength+=4;
... | Writes the byte to the output stream after converting to/from Base64 notation. When encoding, bytes are buffered three at a time before the output stream actually gets a write() call. When decoding, bytes are buffered four at a time. |
public TokenStreamToDot(String inputText,TokenStream in,PrintWriter out){
this.in=in;
this.out=out;
this.inputText=inputText;
termAtt=in.addAttribute(CharTermAttribute.class);
posIncAtt=in.addAttribute(PositionIncrementAttribute.class);
posLengthAtt=in.addAttribute(PositionLengthAttribute.class);
if (in.h... | If inputText is non-null, and the TokenStream has offsets, we include the surface form in each arc's label. |
@RequestMapping(value="/api/machine",method=RequestMethod.GET) public void infoMachine(HttpServletRequest request,HttpServletResponse response) throws ServiceException, CheckException {
String responseFromCAdvisor=monitoringService.getJsonMachineFromCAdvisor();
try {
response.getWriter().write(responseFromCAdvi... | Is a wrapper to cAdvisor API |
@Override public void applyConfig(final ConfigSettings config){
Object o=config.getConfigParameter(ConfigurationKeys.PATH_OUTPUT_SQL_FILES);
if (o != null) {
this.outputPathField.setText((String)o);
}
else {
this.outputPathField.setText("");
}
o=config.getConfigParameter(ConfigurationKeys.MODE_ZIP_CO... | Reads the configuration parameters described in the panel from the ConfigSettings and and sets the contained values. |
public void compileAllProjects(List<File> pProjectRoots,IssueAcceptor issueAcceptor) throws N4JSCompileException {
List<File> absProjectRoots=HeadlessHelper.toAbsoluteFileList(pProjectRoots);
ArrayList<File> pDir=HeadlessHelper.collectAllProjectPaths(absProjectRoots);
compileProjects(pProjectRoots,pDir,Collection... | Starting from the ProjectRoot all Available sub directories denoting a N4js-Project should be compiled together. |
private static ValueAnimator loadAnimator(Context c,Resources res,Resources.Theme theme,AttributeSet attrs,ValueAnimator anim,float pathErrorScale) throws Resources.NotFoundException {
TypedArray arrayAnimator=null;
TypedArray arrayObjectAnimator=null;
if (theme != null) {
arrayAnimator=theme.obtainStyledAttr... | Creates a new animation whose parameters come from the specified context and attributes set. |
private static Set<Triple> parseTriples(List<Node> variables,Element triplesElement,String s){
Elements elements=triplesElement.getChildElements(s);
Set<Triple> triples=new HashSet<>();
for (int q=0; q < elements.size(); q++) {
Element tripleElement=elements.get(q);
String value=tripleElement.getValue();
... | A triples element has a list of three (comman separated) nodes as text. |
public static boolean gr(double a,double b){
return (a - b > SMALL);
}
| Tests if a is greater than b. |
public void handleRuntimeAccesses(TestCase test){
test.getAccessedEnvironment().clear();
if (Properties.REPLACE_CALLS) {
handleReplaceCalls();
}
if (Properties.VIRTUAL_FS) {
handleVirtualFS(test);
}
if (Properties.REPLACE_SYSTEM_IN) {
handleSystemIn();
}
if (Properties.REPLACE_GUI) {
han... | <p> If access to certain classes was observed at runtime, this method adds test calls to the test cluster which may lead to covering more branches. For example, if file access was observed, statements will be introduced that perform mutations on the accessed files like content modification. <p> (Idea by Gordon, JavaDoc... |
public boolean contains(Playlist p){
return mPlaylists.contains(p);
}
| Returns whether or not the adapter contains the provided Playlist |
public void testDecodeAttributeBody() throws StunException {
byte[] attributeValue=binMessagesFixture.chngReqTestValue1;
char offset=Attribute.HEADER_LENGTH;
char length=(char)(attributeValue.length - offset);
changeRequestAttribute.decodeAttributeBody(attributeValue,offset,length);
assertEquals("decodeAttrib... | Test whether sample binary arrays are properly decoded. |
public byte[] genBytecode() throws Exception {
ClassWriter cw=new ClassWriter(0);
MethodVisitor mv;
FieldVisitor fv;
final boolean itf=false;
cw.visit(V1_8,ACC_FINAL + ACC_SUPER,arrayImplClassName,arrayInterfaceClassSig,"java/lang/Object",new String[]{arrayInterfaceClassName});
{
fv=cw.visitField(ACC_PROT... | Generate bytecodes for runtime class |
public static void isFalse(boolean val){
if (val) throw new IllegalArgumentException("Must be false");
}
| Validates that the value is false |
public void insertBack(int x){
}
| Puts an item at the back of the list. |
public void toggle(){
toggle(false,null,null);
}
| Toggle the badge visibility in the UI. |
public void removeLinkListener(LinkListener listener){
treeDisplay.removeLinkListener(listener);
stackedDisplay.removeLinkListener(listener);
}
| Remove a listener from the list that's notified each time a change to the selection occurs. |
public static QueryExp initialSubString(AttributeValueExp a,StringValueExp s){
return new MatchQueryExp(a,new StringValueExp(escapeString(s.getValue()) + "*"));
}
| Returns a query expression that represents a matching constraint on a string argument. The value must start with the given literal string value. |
public void loadData(){
Config config=ConfigUtils.createConfig();
config.network().setInputFile(this.networkFilename);
Scenario scenario=ScenarioUtils.loadScenario(config);
this.network=scenario.getNetwork();
MatsimCountsReader counts_parser=new MatsimCountsReader(counts);
counts_parser.readFile(this.counts... | Reads the parameters from the config file |
public ByteVector putUTF8(final String s){
int charLength=s.length();
if (charLength > 65535) {
throw new IllegalArgumentException();
}
int len=length;
if (len + 2 + charLength > data.length) {
enlarge(2 + charLength);
}
byte[] data=this.data;
data[len++]=(byte)(charLength >>> 8);
data[len++]=... | Puts an UTF8 string into this byte vector. The byte vector is automatically enlarged if necessary. |
public Map<String,ClassificationResult> test(String nameOfTrain) throws Exception {
System.out.println("Starting KLUE Test");
System.out.println("Tweets: " + this.tweetList.size());
String trainname="";
if (!nameOfTrain.equals("")) {
trainname=nameOfTrain;
}
else {
trainname="Trained-Features-KLUE";
... | Creates all features and instances for the testdata and classifies the Tweet |
private static StorageOSLdapPersonAttributeDao createLDAPAttributeRepository(DbClient dbclient,CoordinatorClient coordinator,final AuthnProvider authenticationConfiguration,LdapServerList servers,String[] returningAttributes){
GroupWhiteList groupWhiteList=createGroupWhiteList(authenticationConfiguration);
StorageO... | Create the AD/LDAP attribute repository |
private byte[] bytes(int... bytesAsInts){
byte[] bytes=new byte[bytesAsInts.length];
for (int i=0; i < bytesAsInts.length; i++) {
bytes[i]=(byte)bytesAsInts[i];
}
return bytes;
}
| Helper to construct a byte array from a bunch of bytes. The inputs are actually ints so that I can use hex notation and not get stupid errors about precision. |
private static Triple<DirectedAcyclicGraph<Action,DefaultEdge>,Action,Action> processSubcomponents(DirectedAcyclicGraph<Action,DefaultEdge> parentGraph) throws WorkflowGraphException, DirectedAcyclicGraph.CycleFoundException {
ConnectivityInspector<Action,DefaultEdge> inspector=new ConnectivityInspector<>(parentGraph... | Processes all connected subcomponents of a given graph |
public void think(){
if (isStopped() || !isEnabled()) {
return;
}
Network network=getShortTermMemory();
List<Vertex> activeMemory=getBot().memory().getActiveMemory();
for (int i=0; i < activeMemory.size(); i++) {
Vertex vertex=network.createVertex(activeMemory.get(i));
log("Processing",Level.FINER... | Analyse the active memory for language. |
@Override public XMLEvent peek() throws XMLStreamException {
log.log(Level.FINE,"peek()");
if (!hasNext()) {
throw new XMLStreamException("The reader is depleted!");
}
log.log(Level.FINE,"peek(): {0}",nextEvent);
return nextEvent;
}
| Check the next XMLEvent without reading it from the stream. Returns null if the stream is at EOF or has no more XMLEvents. A call to peek() will be equal to the next return of next(). |
private void addNewLineAtBottom(RecyclerView.Recycler recycler){
int x=layoutStartPoint().x, y=getDecoratedBottom(getChildAt(getMaxHeightLayoutPositionInLine(getChildCount() - 1)));
int childAdapterPosition=getChildAdapterPosition(getChildCount() - 1) + 1;
if (childAdapterPosition == getItemCount()) {
return;... | Add new line at bottom of views. |
public static String parseCharset(Map<String,String> headers,String defaultCharset){
String contentType=headers.get(HTTP.CONTENT_TYPE);
if (contentType != null) {
String[] params=contentType.split(";");
for (int i=1; i < params.length; i++) {
String[] pair=params[i].trim().split("=");
if (pair.l... | Retrieve a charset from headers |
public boolean equals(Object obj){
if (this == obj) {
return true;
}
if (obj instanceof ECFieldFp) {
return (this.p.equals(((ECFieldFp)obj).p));
}
return false;
}
| Returns whether the specified object is equal to this finite field. |
public Object runSafely(Catbert.FastStack stack) throws Exception {
boolean thumb=false;
if (curNumberOfParameters == 2) {
thumb=evalBool(stack.pop());
}
SeriesInfo si=getSeriesInfo(stack);
if (si == null) return null;
String imageURL=si.getImageURL(thumb);
if (imageURL == null || imageURL.length() ... | Returns the image URL that corresponds to this SeriesInfo if there is one |
public void toEPL(StringWriter writer){
writer.write("create ");
if (unique) {
writer.write("unique ");
}
writer.write("index ");
writer.write(indexName);
writer.write(" on ");
writer.write(windowName);
writer.write('(');
String delimiter="";
for ( CreateIndexColumn prop : columns) {
writer... | Renders the clause in textual representation. |
public boolean isAuthenticationByCertificateNeeded(){
return authenticationByCertificateNeeded;
}
| Returns the authenticationByCertificateNeeded value. |
public boolean wasCancelled(){
return cancelled;
}
| Check whether the statement was cancelled. |
public Object removeNondestructively(int index){
if (index >= numObjs) throw new ArrayIndexOutOfBoundsException(index);
Object ret=objs[index];
if (index < numObjs - 1) System.arraycopy(objs,index + 1,objs,index,numObjs - index - 1);
objs[numObjs - 1]=null;
numObjs--;
return ret;
}
| Removes the object at the given index, shifting the other objects down. |
@PatchMethod(override=true) public static <T>List<T> create(){
return mock(List.class);
}
| Patch create method. |
protected void handleRemoved(final RPEntity entity){
}
| An entity has left the area. This should not apply any actions that <code>handleMovement()</code> does. |
public void remove(Object element){
remove(new Object[]{element});
}
| Removes the given element from this list viewer. The selection is updated if necessary. <p> This method should be called (by the content provider) when a single element has been removed from the model, in order to cause the viewer to accurately reflect the model. This method only affects the viewer, not the model. Note... |
public int status(){
return status;
}
| Gets creator status. |
public void testResultSetMetadate() throws Exception {
final int rows=1;
final int tables=10;
final int columns=100;
Statement st=con.createStatement();
StringBuilder sb=new StringBuilder();
try {
for (int t=0; t < tables; t++) {
sb.setLength(0);
sb.append("create table #TABLE");
sb.ap... | Test for bug [1833720], invalid table names for large result sets. |
public boolean isHeading(){
Object oo=get_Value(COLUMNNAME_IsHeading);
if (oo != null) {
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
| Get Heading only. |
@Override protected void update(){
super.update();
chart.fireChartChanged();
updateToolBar();
dimsLabel.setText(" Dimensions: " + getWorkspaceComponent().getProjector().getUpstairs().getDimensions());
pointsLabel.setText(" Datapoints: " + getWorkspaceComponent().getProjector().getDownstairs().getNumPoint... | Update labels at bottom of component. |
public void testApp(){
assertTrue(true);
}
| Rigourous Test :-) |
public void removeProxy(DistributedMember member,ObjectName objectName,Object oldVal){
try {
if (logger.isDebugEnabled()) {
logger.debug("Removing proxy for ObjectName: {}",objectName);
}
if (!remoteFilterChain.isRemoteMBeanFiltered(objectName)) {
ProxyInfo proxyInfo=proxyRepo.findProxyInfo(ob... | Removes the proxy |
public Label(long labelId,String packageName,String packageSignature,String viewName,String text,String locale,int packageVersion,String screenshotPath,long timestampMillis){
mId=labelId;
mPackageName=packageName;
mPackageSignature=packageSignature;
mViewName=viewName;
mText=text;
mLocale=locale;
mPackage... | Creates a new label, usually one that exists in the local database. |
public boolean MV(){
if (this.cmd.length != 3) {
log.warn("Syntax: MV <from> <to>");
return true;
}
if (notConnected()) {
return LMV();
}
try {
send("RNFR " + this.cmd[1]);
String reply=receive();
if (isNotPositiveCompletion(reply)) {
throw new IOException(reply);
}
send(... | public boolean MOVEUP() { } |
public void markLoggerStarting(long nextMessageInputTime) throws AdeException {
if (m_messageInputDateTime == null) {
return;
}
long prevMessageInputTime=m_messageInputDateTime.getMillis();
if (prevMessageInputTime % TEN_MINUTES > 0) {
prevMessageInputTime=TEN_MINUTES * (prevMessageInputTime / TEN_MINUT... | Add a message to the collection |
public boolean userCanDeleteGroupUser(int connectedUserId,int groupId,String entidad) throws Exception {
boolean can=false;
try {
can=userCanEditGroup(connectedUserId,groupId,entidad);
}
catch ( Exception e) {
_logger.error(e);
throw e;
}
return can;
}
| Obtiene si el usuario conectado puede elimnar usuario de grupo |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.