code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
protected void tearDown(){
}
| Tears down the fixture, for example, close a network connection. This method is called after a test is executed. |
@KnownFailure("Fixed on DonutBurger, Wrong Exception thrown") public void test_unwrap_ByteBuffer$ByteBuffer_02(){
String host="new host";
int port=8080;
ByteBuffer bbs=ByteBuffer.allocate(10);
ByteBuffer bbR=ByteBuffer.allocate(100).asReadOnlyBuffer();
ByteBuffer[] bbA={bbR,ByteBuffer.allocate(10),ByteBuffer.... | javax.net.ssl.SSLEngine#unwrap(ByteBuffer src, ByteBuffer[] dsts) ReadOnlyBufferException should be thrown. |
public static CstFloat make(int bits){
return new CstFloat(bits);
}
| Makes an instance for the given value. This may (but does not necessarily) return an already-allocated instance. |
public long size(){
long size=0;
if (parsedGeneExpressions == null) parseGenes();
for (int i=0; i < parsedGeneExpressions.length; i++) size+=parsedGeneExpressions[i].numberOfNodes();
return size;
}
| Returns the "size" of the chromosome, namely, the number of nodes in all of its parsed genes -- does not include the linking functions. |
public void increment(View view){
if (quantity == 100) {
return;
}
quantity=quantity + 1;
displayQuantity(quantity);
}
| This method is called when the plus button is clicked. |
public void trimToSize(){
++modCount;
if (size < elementData.length) {
elementData=Arrays.copyOf(elementData,size);
}
}
| Trims the capacity of this <tt>ArrayHashList</tt> instance to be the list's current size. An application can use this operation to minimize the storage of an <tt>ArrayHashList</tt> instance. |
public SyncValueResponseMessage(SyncValueResponseMessage other){
__isset_bitfield=other.__isset_bitfield;
if (other.isSetHeader()) {
this.header=new AsyncMessageHeader(other.header);
}
this.count=other.count;
}
| Performs a deep copy on <i>other</i>. |
public void clearParsers(){
if (parserManager != null) {
parserManager.clearParsers();
}
}
| Removes all parsers from this text area. |
@Override public void run(){
while (doWork) {
deliverLock();
while (tomLayer.isRetrievingState()) {
System.out.println("-- Retrieving State");
canDeliver.awaitUninterruptibly();
if (tomLayer.getLastExec() == -1) System.out.println("-- Ready to process operations");
}
try {
... | This is the code for the thread. It delivers decisions to the TOM request receiver object (which is the application) |
private byte[] calculateUValue(byte[] generalKey,byte[] firstDocIdValue,int revision) throws GeneralSecurityException, EncryptionUnsupportedByProductException {
if (revision == 2) {
Cipher rc4=createRC4Cipher();
SecretKey key=createRC4Key(generalKey);
initEncryption(rc4,key);
return crypt(rc4,PW_PADDI... | Calculate what the U value should consist of given a particular key and document configuration. Correponds to Algorithms 3.4 and 3.5 of the PDF Reference version 1.7 |
private void assign(HashMap<String,DBIDs> labelMap,String label,DBIDRef id){
if (labelMap.containsKey(label)) {
DBIDs exist=labelMap.get(label);
if (exist instanceof DBID) {
ModifiableDBIDs n=DBIDUtil.newHashSet();
n.add((DBID)exist);
n.add(id);
labelMap.put(label,n);
}
else {
... | Assigns the specified id to the labelMap according to its label |
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. |
public CDeleteAction(final BackEndDebuggerProvider debuggerProvider,final int[] rows){
super(rows.length == 1 ? "Remove Breakpoint" : "Remove Breakpoints");
m_debuggerProvider=Preconditions.checkNotNull(debuggerProvider,"IE01344: Debugger provider argument can not be null");
m_rows=rows.clone();
}
| Creates a new action object. |
public Yaml(BaseConstructor constructor,Representer representer,DumperOptions dumperOptions,Resolver resolver){
if (!constructor.isExplicitPropertyUtils()) {
constructor.setPropertyUtils(representer.getPropertyUtils());
}
else if (!representer.isExplicitPropertyUtils()) {
representer.setPropertyUtils(con... | Create Yaml instance. It is safe to create a few instances and use them in different Threads. |
public void testHitEndAfterFind(){
hitEndTest(true,"#01.0","r((ege)|(geg))x","regexx",false);
hitEndTest(true,"#01.1","r((ege)|(geg))x","regex",false);
hitEndTest(true,"#01.2","r((ege)|(geg))x","rege",true);
hitEndTest(true,"#01.2","r((ege)|(geg))x","xregexx",false);
hitEndTest(true,"#02.0","regex","rexreger"... | Regression test for HARMONY-4396 |
public void add(Individual individual){
individuals.add(individual);
}
| Adds a single individual. |
public boolean removeSession(IgniteUuid sesId){
GridTaskSessionImpl ses=sesMap.get(sesId);
assert ses == null || ses.isFullSupport();
if (ses != null && ses.release()) {
sesMap.remove(sesId,ses);
return true;
}
return false;
}
| Removes session for a given session ID. |
public static Bitmap loadBitmapOptimized(Uri uri,Context context,int limit) throws ImageLoadException {
return loadBitmapOptimized(new UriSource(uri,context){
}
,limit);
}
| Loading bitmap with optimized loaded size less than specific pixels count |
protected BasePeriod(long duration){
super();
iType=PeriodType.standard();
int[] values=ISOChronology.getInstanceUTC().get(DUMMY_PERIOD,duration);
iValues=new int[8];
System.arraycopy(values,0,iValues,4,4);
}
| Creates a period from the given millisecond duration with the standard period type and ISO rules, ensuring that the calculation is performed with the time-only period type. <p> The calculation uses the hour, minute, second and millisecond fields. |
public FlatBufferBuilder(){
this(1024);
}
| Start with a buffer of 1KiB, then grow as required. |
public PbrpcConnectionException(String arg0,Throwable arg1){
super(arg0,arg1);
}
| Creates a new instance of PbrpcConnectionException. |
public void uninstallUI(JComponent a){
for (int i=0; i < uis.size(); i++) {
((ComponentUI)(uis.elementAt(i))).uninstallUI(a);
}
}
| Invokes the <code>uninstallUI</code> method on each UI handled by this object. |
public static void shutdown(){
if (instance != null) {
instance.save();
}
}
| Saves the configuration file. |
public boolean GE(Word w2){
return value.GE(w2.value);
}
| Greater-than or equal comparison |
public static UnionCoder of(List<Coder<?>> elementCoders){
return new UnionCoder(elementCoders);
}
| Builds a union coder with the given list of element coders. This list corresponds to a mapping of union tag to Coder. Union tags start at 0. |
public void testFileDeletion() throws Exception {
File testDir=createTestDir("testFileDeletion");
String prefix1="testFileDeletion1";
File[] files1=createFiles(testDir,prefix1,5);
String prefix2="testFileDeletion2";
File[] files2=createFiles(testDir,prefix2,5);
FileCommands.deleteFiles(files1,true);
asser... | Verify ability to delete a list of files. |
public boolean isOnClasspath(String classpath){
return this.classpath.equals(classpath);
}
| Evaluates if the Dependency is targeted for a classpath type. |
protected void source(String ceylon){
String providerPreSrc="provider/" + ceylon + "_pre.ceylon";
String providerPostSrc="provider/" + ceylon + "_post.ceylon";
String clientSrc="client/" + ceylon + "_client.ceylon";
compile(providerPreSrc,providerModuleSrc,providerPackageSrc);
compile(clientSrc,clientModuleSr... | Checks that we can still compile a client after a change |
public PerformanceMonitor(){
initComponents();
if (Display.getInstance().getCurrent() != null) {
refreshFrameActionPerformed(null);
}
resultData.setModel(new Model());
performanceLog.setLineWrap(true);
resultData.setRowSorter(new TableRowSorter<Model>((Model)resultData.getModel()));
}
| Creates new form PerformanceMonitor |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-09-03 15:01:15.190 -0400",hash_original_method="F262A3A18BABECF7EC492736953EAF6E",hash_generated_method="94A4545C167C029CC38AACEACF2087E9") private void unparkSuccessor(Node node){
int ws=node.waitStatus;
if (ws < 0) compareAndSetWaitStat... | Wakes up node's successor, if one exists. |
@DSComment("From safe class list") @DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 13:02:44.364 -0500",hash_original_method="EA3734ADDEB20313C9CAB09B48812C54",hash_generated_method="4858AFE909DDE63867ACB561D5449C13") static public void assertFalse(String messag... | Asserts that a condition is false. If it isn't it throws an AssertionFailedError with the given message. |
@Override protected void initData(){
Intent intent=new Intent(this,PushMessageService.class);
this.startService(intent);
this.bindService(intent,this.connection,Context.BIND_AUTO_CREATE);
}
| Initialize the Activity data |
public static Date parseDateDay(String dateString) throws ParseException {
return getSimplDateFormat(DF_DEF).parse(dateString);
}
| Returns date parsed from string in format: yyyy.MM.dd. |
private boolean doesStoragePortExistsInVArray(StoragePort umfsStoragePort,VirtualArray virtualArray){
List<URI> virtualArrayPorts=returnAllPortsInVArray(virtualArray.getId());
if (virtualArrayPorts.contains(umfsStoragePort.getId())) {
return true;
}
return false;
}
| Checks if the given storage port is part of VArray |
public SpringVaadinServletService(VaadinServlet servlet,DeploymentConfiguration deploymentConfiguration,String serviceUrl) throws ServiceException {
super(servlet,deploymentConfiguration);
this.serviceUrl=serviceUrl;
}
| Create a servlet service instance that allows the use of a custom service URL. |
private static List<TranslationResult> translateChildrenOfNode(final ITranslationEnvironment environment,final IOperandTreeNode expression,OperandSize size,final boolean loadOperand,Long baseOffset) throws InternalTranslationException {
final List<TranslationResult> partialResults=new ArrayList<>();
final List<? ex... | Iterates over the children of a node in the operand tree and generates translations for them. |
public void removeShutdownLatch(final CountDownLatch latch){
removeShutdownLatch(latch,false);
}
| Releases the latch and removes it from the latches being handled by this handler. |
public Version(){
this(CommonReflection.getVersionTag());
}
| Constructs a new Version from the current server version running |
public static void startActivity(Context context,String chatId){
Intent intent=new Intent(context,SendGroupFile.class);
intent.putExtra(EXTRA_CHAT_ID,chatId);
context.startActivity(intent);
}
| Start SendGroupFile activity |
public Index excludedDataCenters(String excludedDataCenters){
this.excludedDataCenters=excludedDataCenters;
return this;
}
| Sets the list of excluded data centers. |
public final int read() throws IOException {
int result=src.read();
if (result != -1) {
++pointer;
}
return result;
}
| Forwards the request to the real <code>InputStream</code>. |
public static boolean compareAndSwapInt(Object obj,long off,int exp,int upd){
return UNSAFE.compareAndSwapInt(obj,off,exp,upd);
}
| Integer CAS. |
public static String dec2Bin(int value){
String result="";
return dec2Bin(value,result);
}
| Methods converts a decimal number into a binary number as a string |
public void apply(RecyclerView recyclerView,Iterable<Item> items){
if (items != null) {
HashMap<Integer,Stack<RecyclerView.ViewHolder>> cache=new HashMap<>();
for ( Item d : items) {
if (!cache.containsKey(d.getType())) {
cache.put(d.getType(),new Stack<RecyclerView.ViewHolder>());
}
... | init the cache on your own. |
public void incNumOverflowOnDisk(long delta){
this.stats.incLong(numOverflowOnDiskId,delta);
}
| Increments the current number of entries whose value has been overflowed to disk by a given amount. |
public void paint(Graphics a,JComponent b){
for (int i=0; i < uis.size(); i++) {
((ComponentUI)(uis.elementAt(i))).paint(a,b);
}
}
| Invokes the <code>paint</code> method on each UI handled by this object. |
public void updateUI(){
setUI((TableHeaderUI)UIManager.getUI(this));
TableCellRenderer renderer=getDefaultRenderer();
if (renderer instanceof Component) {
SwingUtilities.updateComponentTreeUI((Component)renderer);
}
}
| Notification from the <code>UIManager</code> that the look and feel (L&F) has changed. Replaces the current UI object with the latest version from the <code>UIManager</code>. |
public static RefactoringStatus create(IStatus status){
if (status.isOK()) return new RefactoringStatus();
if (!status.isMultiStatus()) {
switch (status.getSeverity()) {
case IStatus.OK:
return new RefactoringStatus();
case IStatus.INFO:
return RefactoringStatus.createWarningStatus(status.getMessage());... | Creates a new <code>RefactoringStatus</code> from the given <code>IStatus</code>. An OK status is mapped to an OK refactoring status, an information status is mapped to a warning refactoring status, a warning status is mapped to an error refactoring status and an error or cancel status is mapped to a fatal refactoring ... |
public void debug(String msg){
debugLogger.debug(msg);
}
| Log a Setup and/or administrative log message for log4jdbc. |
public int size(){
return codon.length;
}
| Returns the length of the integer codon representation of this grammar. |
public Diff decode() throws UnsupportedEncodingException, DecodingException {
int header=r.read(3);
if (DiffAction.parse(header) != DiffAction.DECODER_DATA) {
throw new DecodingException("Invalid codecData code: " + header);
}
int blockSize_C=3;
int blockSize_S=r.read(5);
int blockSize_E=r.read(5);
in... | Decodes the information and returns the Diff. |
public FontSizeLocator(){
}
| Creates a new instance. |
@SuppressWarnings({"unchecked","rawtypes"}) static <E extends Comparable<E>>AutoSortedCollection<E> createAutoSortedCollection(Collection<? extends E> values){
return createAutoSortedCollection(null,values);
}
| Construct new auto sorted collection using natural order. |
@Override public String toString(){
return super.toString();
}
| Returns the super class implementation of toString(). |
public boolean useLayoutEditor(SignalMast destination){
if (!destList.containsKey(destination)) {
return false;
}
return destList.get(destination).useLayoutEditor();
}
| Query if we are using the layout editor panels to build the signal mast logic, blocks, turnouts . |
private static String unescapePathComponent(String name){
return name.replaceAll("\\\\(.)","$1");
}
| Convert a path component that contains backslash escape sequences to a literal string. This is necessary when you want to explicitly refer to a path that contains globber metacharacters. |
public AbstractExampleTable(List<Attribute> attributes){
addAttributes(attributes);
}
| Creates a new ExampleTable. |
public void zoomOut(){
Matrix save=mViewPortHandler.zoomOut(getWidth() / 2f,-(getHeight() / 2f));
mViewPortHandler.refresh(save,this,true);
}
| Zooms out by 0.7f, from the charts center. center. |
public Media createBackgroundMedia(String uri) throws IOException {
return impl.createBackgroundMedia(uri);
}
| Creates an audio media that can be played in the background. |
private boolean hasNextTlsMode(){
return nextTlsMode != TLS_MODE_NULL;
}
| Returns true if there's another TLS mode to try. |
protected void copyToOpsw(){
opsw[1]=fullmode.isSelected();
opsw[2]=twoaspects.isSelected();
opsw[11]=semaphore.isSelected();
opsw[12]=pulsed.isSelected();
opsw[13]=disableDS.isSelected();
opsw[14]=fromloconet.isSelected();
opsw[15]=disablelocal.isSelected();
opsw[17]=sigaddress.isSelected();
opsw[18]... | Copy from the GUI to the opsw array. <p> Used before write operations start |
@Override public void onRequestPermissionsResult(int requestCode,@NonNull String[] permissions,@NonNull int[] grantResults){
if (requestCode == ALLOW_PERMISSIONS && grantResults.length > 0) {
List<String> permissionsNotAllowed=new ArrayList<>();
for (int i=0; i < permissions.length; i++) {
if (grantResu... | This method is a callback. Check the user's answer after requesting permission. |
public String rowGet(String key){
String resolvedKey=resolveRowKey(key);
String cachedValue=rowMapCache.get(resolvedKey);
if (cachedValue != null) {
return cachedValue;
}
String value=rowMap.get(resolvedKey);
if (value == null && parent != null) {
value=parent.rowGet(resolvedKey);
}
if (value ==... | Looks up and returns the RowSpec associated with the given key. First looks for an association in this LayoutMap. If there's no association, the lookup continues with the parent map - if any. |
public void postEvaluationStatistics(final EvolutionState state){
super.postEvaluationStatistics(state);
state.output.println("\nGeneration: " + state.generation,Output.V_NO_GENERAL,statisticslog);
for (int x=0; x < state.population.subpops.length; x++) for (int y=1; y < state.population.subpops[x].individuals.... | Logs the best individual of the generation. |
private void checkUserExists(String entidad) throws Exception {
int count;
UsersTable table=new UsersTable();
DbConnection dbConn=new DbConnection();
try {
dbConn.open(DBSessionManager.getSession());
if (_id == ISicresAdminDefsKeys.NULL_ID) count=DbSelectFns.selectCount(dbConn,table.getBaseTableName... | Comprueba que el usuario tiene distinto nombre a los que ya existen. |
@Transactional public Role createRoleWithPermissions(Role role,Set<Long> permissionIds){
Role current=findRoleByRoleName(role.getRoleName());
Preconditions.checkState(current == null,"Role %s already exists!",role.getRoleName());
Role createdRole=roleRepository.save(role);
if (!CollectionUtils.isEmpty(permissio... | Create role with permissions, note that role name should be unique |
protected void generateNewCursorBox(){
if ((old_m_x2 != -1) || (old_m_y2 != -1) || (Math.abs(commonValues.m_x2 - old_m_x2) > 5)|| (Math.abs(commonValues.m_y2 - old_m_y2) > 5)) {
int top_x=commonValues.m_x1;
if (commonValues.m_x1 > commonValues.m_x2) {
top_x=commonValues.m_x2;
}
int top_y=commonV... | generate new cursorBox and highlight extractable text, if hardware acceleration off and extraction on<br> and update current cursor box displayed on screen |
public OMGraphicList(int initialCapacity){
graphics=Collections.synchronizedList(new ArrayList<OMGraphic>(initialCapacity));
}
| Construct an OMGraphicList with an initial capacity. |
private void saveToSettings(){
List<String> dataToSave=new LinkedList<>();
for ( UsercolorItem item : data) {
dataToSave.add(item.getId() + "," + HtmlColors.getColorString(item.getColor()));
}
settings.putList("usercolors",dataToSave);
}
| Copy the current data to the settings. |
public static boolean isArrayForName(String value){
return ARRAY_FOR_NAME_PATTERN.matcher(value).matches();
}
| Returns true if the given string looks like a Java array name. |
public double length(){
return Math.sqrt(this.x * this.x + this.y * this.y);
}
| Calculates the length of the vector. |
public String toString(){
return schema;
}
| Returns this' media-type (a MIME content-type category) (previously returned a description key) |
public void restoreStarting(int numPackages){
}
| The restore operation has begun. |
private boolean resourceIsGwtXmlAndInGwt(IResource resource) throws CoreException {
return GWTNature.isGWTProject(resource.getProject()) && resource.getName().endsWith(".gwt.xml");
}
| If the resource is a .gwt.xml file and we're in a gwt-enabled project, return true. |
public GlowCreature(Location location,EntityType type,double maxHealth){
super(location,maxHealth);
this.type=type;
}
| Creates a new monster. |
public CacheLayer(){
}
| Construct a default CacheLayer. |
protected Address buildAndroidAddress(JSONObject jResult) throws JSONException {
Address gAddress=new Address(mLocale);
gAddress.setLatitude(jResult.getDouble("lat"));
gAddress.setLongitude(jResult.getDouble("lng"));
int addressIndex=0;
if (jResult.has("streetName")) {
gAddress.setAddressLine(addressIndex... | Build an Android Address object from the Gisgraphy address in JSON format. |
public JDBCCategoryDataset(Connection connection,String query) throws SQLException {
this(connection);
executeQuery(query);
}
| Creates a new dataset with the given database connection, and executes the supplied query to populate the dataset. |
public static Map<String,Object> generateReqsFromCancelledPOItems(DispatchContext dctx,Map<String,? extends Object> context){
Delegator delegator=dctx.getDelegator();
LocalDispatcher dispatcher=dctx.getDispatcher();
GenericValue userLogin=(GenericValue)context.get("userLogin");
Locale locale=(Locale)context.get... | Generates a product requirement for the total cancelled quantity over all order items for each product |
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException {
s.defaultReadObject();
if (bayesIm == null) {
throw new NullPointerException();
}
if (variables == null) {
throw new NullPointerException();
}
}
| Adds semantic checks to the default deserialization method. This method must have the standard signature for a readObject method, and the body of the method must begin with "s.defaultReadObject();". Other than that, any semantic checks can be specified and do not need to stay the same from version to version. A readObj... |
boolean contains(ProtocolVersion protocolVersion){
if (protocolVersion == ProtocolVersion.SSL20Hello) {
return false;
}
return protocols.contains(protocolVersion);
}
| Return whether this list contains the specified protocol version. SSLv2Hello is not a real protocol version we support, we always return false for it. |
@Override protected EClass eStaticClass(){
return DatatypePackage.Literals.OBJECT_PROPERTY_TYPE;
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:34:35.806 -0500",hash_original_method="E14DF72F5869874CC38AD67447F5264E",hash_generated_method="127365361841BB38033FE96228DFD635") public final Iterator<String> typesIterator(){
return mDataTypes != null ? mDataTypes.iterator() : nul... | Return an iterator over the filter's data types. |
public void registerGUI(final ConfigGUI gui){
this.gui=gui;
}
| Sets the reference of the GUI. |
public IntersectionMatrix(IntersectionMatrix other){
this();
matrix[Location.INTERIOR][Location.INTERIOR]=other.matrix[Location.INTERIOR][Location.INTERIOR];
matrix[Location.INTERIOR][Location.BOUNDARY]=other.matrix[Location.INTERIOR][Location.BOUNDARY];
matrix[Location.INTERIOR][Location.EXTERIOR]=other.matrix... | Creates an <code>IntersectionMatrix</code> with the same elements as <code>other</code>. |
public long readUnsignedInt(){
long result=shiftIntoLong(data,position,4);
position+=4;
return result;
}
| Reads the next four bytes as an unsigned value. |
public void emit(final SpannableStringBuilder out,final Block root){
root.removeSurroundingEmptyLines();
switch (root.type) {
case NONE:
break;
case PARAGRAPH:
this.config.decorator.openParagraph(out);
break;
case BLOCKQUOTE:
this.config.decorator.openBlockquote(out);
break;
case UNORDERED_LIST:
this.config.dec... | Transforms the given block recursively into HTML. |
public boolean isInternable(){
return (classAnnotations != null) && (fieldAnnotations == null) && (methodAnnotations == null)&& (parameterAnnotations == null);
}
| Returns whether this item is a candidate for interning. The only interning candidates are ones that <i>only</i> have a non-null set of class annotations, with no other lists. |
public URI(final String scheme,final String userinfo,final String host,final int port,final String path,final String query,final String fragment) throws URIException {
this(scheme,(host == null) ? null : ((userinfo != null) ? userinfo + '@' : "") + host + ((port != -1) ? ":" + port : ""),path,query,fragment);
}
| Construct a general URI from the given components. |
public void addUser(User user){
users.addElement(user);
}
| Add a user |
protected void engineUpdate(byte b) throws SignatureException {
msgDigest.update(b);
}
| Updates data to sign or to verify. |
public RqMtFake(final Request req,final Request... dispositions) throws IOException {
this.fake=new RqMtBase(new RqMtFake.FakeMultipartRequest(req,dispositions));
}
| Fake ctor. |
public static Video randomVideo(){
String id=UUID.randomUUID().toString();
String title="Video-" + id;
String url="http://coursera.org/some/video-" + id;
long duration=60 * (int)Math.rint(Math.random() * 60) * 1000;
return new Video(title,url,duration);
}
| Construct and return a Video object with a rnadom name, url, and duration. |
public void addHeader(String header,String value){
clientHeaderMap.put(header,value);
}
| Sets headers that will be added to all requests this client makes (before sending). |
public void addPostalAddress(PostalAddress postalAddress){
getPostalAddresses().add(postalAddress);
}
| Adds a new contact postal address. |
public CaughtExceptionRef newCaughtExceptionRef(){
return new JCaughtExceptionRef();
}
| Constructs a CaughtExceptionRef() grammar chunk. |
public void actionPerformed(ActionEvent e){
if (e.getSource() instanceof PerformanceIndicator) {
PerformanceIndicator pi=(PerformanceIndicator)e.getSource();
log.info(pi.getName());
MGoal goal=pi.getGoal();
if (goal.getMeasure() != null) new PerformanceDetail(goal);
}
}
| Action Listener for Drill Down |
public Iterator<AbstractNode> childIterator(final boolean dirtyNodesOnly){
if (dirtyNodesOnly) {
return new DirtyChildIterator(this);
}
else {
return new ChildIterator(this);
}
}
| Iterator visits the direct child nodes in the external key ordering. |
public static int maxIndex(double[] doubles){
double maximum=0;
int maxIndex=0;
for (int i=0; i < doubles.length; i++) {
if ((i == 0) || (doubles[i] > maximum)) {
maxIndex=i;
maximum=doubles[i];
}
}
return maxIndex;
}
| Returns index of maximum element in a given array of doubles. First maximum is returned. |
private List<PreferenceIndex> crawlSingleIndexableResource(IndexableFragment indexableFragment){
List<PreferenceIndex> indexablePreferences=new ArrayList<>();
XmlPullParser parser=mContext.getResources().getXml(indexableFragment.xmlRes);
int type;
try {
while ((type=parser.next()) != XmlPullParser.END_DOCUM... | Skim through the xml preference file. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.