code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
protected String cleanUp(String classname){
String result;
result=classname;
if (result.indexOf("/") > -1) {
result=result.replace("/",".");
}
if (result.indexOf("\\") > -1) {
result=result.replace("\\",".");
}
if (result.endsWith(".class")) {
result=result.substring(0,result.length() - 6);
... | Fixes the classname, turns "/" and "\" into "." and removes ".class". |
@Override public void configureZone(final StendhalRPZone zone,final Map<String,String> attributes){
buildNPC(zone);
}
| Configure a zone. |
public LanguageSetting(Option opt){
elem=null;
name=opt.getLanguage();
String[] suffixArray=opt.getSuffixes();
StringBuffer strbuf=new StringBuffer();
for (int i=0; i < suffixArray.length; i++) {
strbuf.append(suffixArray[i]);
if (i != suffixArray.length - 1) strbuf.append(',');
}
this.suffixe... | Constructs an element-less LanguageSetting object out of a Option object. The set methods may not be used for the resulting object! |
public BulletParser parseText(final boolean parseText){
this.parseText=parseText;
return this;
}
| Sets the text handler flag. |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 13:01:37.464 -0500",hash_original_method="A08FDF345D6DF4C8E7F68B5A61C56D39",hash_generated_method="FF43837979E318AAAF2EA6D300F148F5") private static boolean isSpecialDomain(final String domain){
final String ucDomain=domain.toUpperCase(... | Checks if the given domain is in one of the seven special top level domains defined by the Netscape cookie specification. |
private static void initBlocksInIfNodes(BlockNode block){
List<InsnNode> instructions=block.getInstructions();
if (instructions.size() == 1) {
InsnNode insn=instructions.get(0);
if (insn.getType() == InsnType.IF) {
((IfNode)insn).initBlocks(block);
}
}
}
| Init 'then' and 'else' blocks for 'if' instruction. |
public static char convertByte2Uint8(byte b){
return (char)(b & 0xff);
}
| Convert char into uint8( we treat char as uint8 ) |
public void clear(){
fields.clear();
}
| Removes all the fields from document. |
private void createLoanProductEntity(){
System.out.println("---------------------------------CREATING LOAN PRODUCT------------------------------------------");
final String loanProductJSON=new LoanProductTestBuilder().withPrincipal(loanPrincipalAmount).withNumberOfRepayments(numberOfRepayments).withinterestRatePerP... | create a new loan product |
@UiThreadTest @SmallTest public void testEnd() throws Exception {
mRunning=true;
mAnimator.end();
}
| Verify that calling end on an unstarted animator starts/ends an animator. |
public boolean any(Func1<? super T,Boolean> predicate){
for ( T item : this) {
if (predicate.call(item)) return true;
}
return false;
}
| Returns true if any of stream items satisfy a given condition. |
public CustomElementHandler(String tagName){
this.tagName=tagName;
}
| Constructs the handler, given the name of the element in use. |
public Object nextToken() throws JSONException {
char c;
char q;
StringBuffer sb;
do {
c=next();
}
while (Character.isWhitespace(c));
switch (c) {
case 0:
throw syntaxError("Misshaped element");
case '<':
throw syntaxError("Misplaced '<'");
case '>':
return XML.GT;
case '/':
return XML.SLASH;
case ... | Get the next XML Token. These tokens are found inside of angle brackets. It may be one of these characters: <code>/ > = ! ?</code> or it may be a string wrapped in single quotes or double quotes, or it may be a name. |
public boolean isEnabled(){
checkWidget();
return this.enabled;
}
| Returns <code>true</code> if the receiver is enabled, and <code>false</code> otherwise. A disabled control is typically not selectable from the user interface and draws with an inactive or "grayed" look. |
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 static void closeSilently(InputStream in){
if (in != null) {
try {
trace("closeSilently",null,in);
in.close();
}
catch ( Exception e) {
}
}
}
| Close an input stream without throwing an exception. |
protected void addValuePropertyDescriptor(Object object){
itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),getResourceLocator(),getString("_UI_StringLiteral_value_feature"),getString("_UI_PropertyDescriptor_description","_UI_StringLiteral_val... | This adds a property descriptor for the Value feature. <!-- begin-user-doc --> <!-- end-user-doc --> |
@DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:30:40.866 -0500",hash_original_method="C5038B1CABC8B8B00C688F0FD76B923F",hash_generated_method="EA410BB510FFBBB53A8F600AEE5AEF65") @Override public boolean hasFocus(){
return this.isEnabled();
}
| Pretend like this view always has focus, so its highlight and cursor will be displayed. |
public String sql(){
return sql;
}
| The modified SQL statement where ? placeholders have been added for inlined elements. |
public void animateY(int durationMillis){
if (android.os.Build.VERSION.SDK_INT < 11) return;
ObjectAnimator animatorY=ObjectAnimator.ofFloat(this,"phaseY",0f,1f);
animatorY.setDuration(durationMillis);
animatorY.addUpdateListener(mListener);
animatorY.start();
}
| Animates the rendering of the chart on the y-axis with the specified animation time. If animate(...) is called, no further calling of invalidate() is necessary to refresh the chart. |
boolean isRead(){
return pos >= len;
}
| Returns true when all characters in the text segment have been read |
public boolean equals(Object b){
if ((b == null) || !(b.getClass().equals(this.getClass()))) {
return false;
}
boolean ok=true;
boolean l;
if (b instanceof DecisionTableHashKey) {
DecisionTableHashKey n=(DecisionTableHashKey)b;
for (int i=0; i < attributes.length; i++) {
l=n.missing[i];
... | Tests if two instances are equal |
public VerletParticle3D unlock(){
clearVelocity();
isLocked=false;
return this;
}
| Unlocks particle again |
public RandomDestinationPortal(){
super(questslot);
initLocations();
}
| Create a new <code>RandomDestinationPortal</code> |
static short[] buildSuperclassIds(RVMType t){
int depth=t.getTypeDepth();
short[] tsi;
if (t.isJavaLangObjectType()) {
if (VM.VerifyAssertions) VM._assert(depth == 0);
tsi=MemoryManager.newNonMovingShortArray(1);
}
else {
int size=MIN_SUPERCLASS_IDS_SIZE <= depth ? depth + 1 : MIN_SUPERCLASS_ID... | Create the superclass Id vector for a RVMType. |
public void test_CONTEXTS() throws Exception {
if (getTestMode() != TestMode.quads) return;
doInsertbyURL("POST",packagePath + "test_estcard.trig");
final Collection<Resource> contexts=m_repo.getContexts();
assertEquals(3,contexts.size());
}
| Test the CONTEXTS method. |
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 void closeListeners() throws GenericServiceException {
loadable=0;
for ( String serverKey : listeners.keySet()) {
closeListener(serverKey);
}
}
| Close all the JMS message listeners. |
private ObjectNode fetchAllQueriesFromFile(){
InputStream inputStream=null;
JsonNode queriesJSON=mapper.createObjectNode();
try {
inputStream=new FileInputStream(Repository.get().getPulseConfig().getQueryHistoryFileName());
String inputStreamString=new Scanner(inputStream,"UTF-8").useDelimiter("\\A").next... | generateQueryKey method fetches queries from query history file |
public Dataset(GCTrace gcTrace,GCTraceCheckpoint checkpoint,int metric){
super(gcTrace.getGCActivityNamesArray());
this.gcTrace=gcTrace;
this.checkpoint=checkpoint;
this.metric=metric;
}
| It creates a new instance of this dataset generator. |
public static void openURL(String url){
openURL(null,url);
}
| opens the URL in a browser. |
public TiledImageCompressionOperation(BinaryTable binaryTable){
super(TileCompressionOperation.class);
this.binaryTable=binaryTable;
}
| create a TiledImageCompressionOperation based on a compressed image data. |
public void reverse(){
reverse(0,_pos);
}
| Reverse the order of the elements in the list. |
LongBuffer(int size){
data=new long[size];
length=0;
}
| construct a new instance of the specified capacity |
public void endElement(StylesheetHandler handler,String uri,String localName,String rawName) throws org.xml.sax.SAXException {
ElemTemplateElement elem=handler.getElemTemplateElement();
if (elem instanceof ElemLiteralResult) {
if (((ElemLiteralResult)elem).getIsLiteralResultAsStylesheet()) {
handler.popSt... | Receive notification of the end of an element. |
public void lockUI(){
progressWindow=new BusyDialog();
progressWindow.setPage(this.getPage());
progressWindow.doHighlighted();
}
| Lock User Interface. Called from the Worker before processing |
public boolean approveIt(){
log.info("approveIt - " + toString());
setIsApproved(true);
return true;
}
| Approve Document |
public R proceed(){
return fn.get();
}
| Proceed and execute wrapped Supplier |
public String useResamplingTipText(){
return "Whether resampling is used instead of reweighting.";
}
| Returns the tip text for this property |
public RemoveStatementsOperation(Resource subj,IRI pred,Value obj,Resource... contexts){
super(contexts);
setSubject(subj);
setPredicate(pred);
setObject(obj);
}
| Creates a RemoveStatementsOperation. |
private SlowCodecReaderWrapper(){
}
| No instantiation |
public void init(ServletConfig config) throws ServletException {
super.init(config);
if (!WebEnv.initWeb(config)) throw new ServletException("Counter.init");
}
| Initialize global variables |
public int hashCode(){
int result=17;
if (null != this.getStart()) result=result + this.getStart().hashCode();
if (null != this.getEnd()) result=result + this.getEnd().hashCode();
return result;
}
| Returns a hash code for this object instance. The approach described by Joshua Bloch in "Effective Java" has been used here: <p> <code>http://developer.java.sun.com/developer/Books/effectivejava /Chapter3.pdf</code> |
public int next(){
moveToNextIndex();
return _hash._set[_index];
}
| Advances the iterator to the next element in the underlying collection and returns it. |
public Builder dlConf(DistributedLogConfiguration dlConf){
this._dlConf=dlConf;
return this;
}
| DistributedLog Configuration |
void removeProducer(final MessageProducer producer){
if (ActiveMQRASession.trace) {
ActiveMQRALogger.LOGGER.trace("removeProducer(" + producer + ")");
}
synchronized (producers) {
producers.remove(producer);
}
}
| Remove producer |
protected DateTimeConverter makeConverter(){
return new DateConverter();
}
| Create the Converter with no default value. |
public boolean isConnected(){
return !isDisconnected();
}
| Indicates if this assignment is currently connected to a channel source |
public KeyRecordIterator select(String namespace,String set,Filter filter,Qualifier... qualifiers){
Statement stmt=new Statement();
stmt.setNamespace(namespace);
stmt.setSetName(set);
if (filter != null) stmt.setFilters(filter);
return select(stmt,qualifiers);
}
| Select records filtered by a Filter and Qualifiers |
public SearchSynchronizer(final IDebugger debugger,final ListenerProvider<IDebugEventListener> listeners){
super(debugger,listeners);
}
| Creates a new Attach synchronizer. |
public static void editGlobalCodeNodeComment(final SQLProvider provider,final INaviCodeNode codeNode,final Integer commentId,final Integer userId,final String newComment) throws CouldntSaveDataException {
Preconditions.checkNotNull(provider,"IE02485: provider argument can not be null");
Preconditions.checkNotNull(c... | Edits a global code node comment |
public void prepareMatrixValuePx(float xChartMin,float deltaX,float deltaY,float yChartMin){
float scaleX=(float)((mViewPortHandler.contentWidth()) / deltaX);
float scaleY=(float)((mViewPortHandler.contentHeight()) / deltaY);
mMatrixValueToPx.reset();
mMatrixValueToPx.postTranslate(-xChartMin,-yChartMin);
mMa... | Prepares the matrix that transforms values to pixels. Calculates the scale factors from the charts size and offsets. |
public IllegalArgumentException(){
super();
}
| Constructs a new exception with <code>null</code> as its detail message. The cause is not initialized. |
public void testBug32577() throws Exception {
if (!versionMeetsMinimum(5,0)) {
return;
}
createTable("testBug32577","(id INT, field_datetime DATETIME, field_timestamp TIMESTAMP)");
Properties props=new Properties();
props.setProperty("useLegacyDatetimeCode","false");
props.setProperty("sessionVariables"... | Tests fix for BUG#32577 - no way to store two timestamp/datetime values that happens over the DST switchover, as the hours end up being the same when sent as the literal that MySQL requires. Note that to get this scenario to work with MySQL (since it doesn't support per-value timezones), you need to configure your serv... |
public static String classNamePath(String className){
String filename=className.replace(".",File.separator);
filename=filename.replaceFirst("[$][0-9]+","");
if (filename.indexOf("$") > 0) {
filename=filename.substring(0,filename.indexOf("$"));
}
return "src" + File.separator + filename+ ".java";
}
| Returns the relative path for a fully qualified classname. Adds "src/" before the pathname for the class. Strips away internal class names. |
public boolean isInvalidAfterConnect(){
return invalidAfterConnect;
}
| Ruft den Wert der invalidAfterConnect-Eigenschaft ab. |
public void dispose(){
m_debugPerspectiveModel.removeListener(m_debugListener);
synchronizeDebugger(m_debugPerspectiveModel.getCurrentSelectedDebugger(),null);
}
| Frees allocated resources. |
@Override public boolean supportsAlterTableWithAddColumn(){
debugCodeCall("supportsAlterTableWithAddColumn");
return true;
}
| Returns whether alter table with add column is supported. |
public Boolean isAutoOpen(){
return autoOpen;
}
| Gets the value of the autoOpen property. |
public void close(){
super.close();
}
| The file channel is closed, but according to http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4724038 there is no way to guarentee when the mapped file will be released. |
@Override public boolean supportsCapability(OperatorCapability lc){
if (lc == OperatorCapability.NUMERICAL_ATTRIBUTES) {
return true;
}
if (lc == OperatorCapability.BINOMINAL_LABEL) {
return true;
}
if (lc == OperatorCapability.FORMULA_PROVIDER) {
return true;
}
return false;
}
| Returns true for numerical attributes, binominal classes, and numerical target attributes. |
public QualityStats(double maxGoodPoints,long searchTime){
this.maxGoodPoints=maxGoodPoints;
this.searchTime=searchTime;
this.recallPoints=new ArrayList<>();
pAt=new double[MAX_POINTS + 1];
}
| Construct a QualityStats object with anticipated maximal number of relevant hits. |
public static String[] stringArrayFromString(String string){
return stringArrayFromString(string,',');
}
| Returns a String[] of strings from a string that is formatted in what toString(String[]) returns. |
@Override public float generatorSortValue(String url,WebPage row,float initSort) throws ScoringFilterException {
for ( ScoringFilter filter : filters) {
initSort=filter.generatorSortValue(url,row,initSort);
}
return initSort;
}
| Calculate a sort value for Generate. |
public void init(ActionListener doneAction){
super.init(doneAction);
}
| Init for conversion of plain track to indicator track |
public ExceptionWithContext(String message){
this(message,null);
}
| Constructs an instance. |
public static int dehexchar(char c){
if (c >= '0' && c <= '9') {
return c - '0';
}
if (c >= 'A' && c <= 'F') {
return c - ('A' - 10);
}
if (c >= 'a' && c <= 'f') {
return c - ('a' - 10);
}
return -1;
}
| Get the hex value of a character (base16). |
public Crypto(final byte[] key,boolean encrypt) throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, InvalidAlgorithmParameterException {
this(key);
if (encrypt) {
cipherEnc=Cipher.getInstance(M.e("AES/CBC/NoPadding"));
cipherEnc.init(Cipher.ENCRYPT_MODE,skey_spec,ivSpec);
}
else... | Instantiates a new crypto. |
public void runTest() throws Throwable {
Document doc;
NodeList elementList;
Node testEmployee;
NamedNodeMap attributes;
Attr streetAttr;
String value;
Node removedNode;
doc=(Document)load("staff",true);
elementList=doc.getElementsByTagName("address");
testEmployee=elementList.item(2);
attributes=... | Runs the test case. |
private int computeNumberOfObservations(boolean[] sourceValid,boolean[] destValid) throws Exception {
TransferEntropyCalculatorMultiVariateKraskov tecmvKras=new TransferEntropyCalculatorMultiVariateKraskov();
tecmvKras.initialise(k);
Vector<int[]> startAndEndTimePairs=tecmvKras.computeStartAndEndTimePairs(sourceV... | Dummy method to compute the number of observations for the given validities |
protected void cancelPressed(){
boolean close=rasterLayerPanel.cancelPressed() || vectorLayerPanel.cancelPressed();
if (close) {
mainFrame.dispose();
System.exit(0);
}
else {
applyButton.setEnabled(true);
}
}
| Cancel button was pressed |
@NonNull public Builder fromUri(@NonNull Uri uri){
return fromUri(uri,SystemClock.INSTANCE);
}
| Extracts authorization response parameters from the query portion of a redirect URI. |
public static void initialiseLinks(TraceCompletionInformation ci,long fragmentBaseTime,Node n,StringBuilder nodeId){
TraceCompletionInformation.Communication c=new TraceCompletionInformation.Communication();
c.getIds().add(nodeId.toString());
c.setMultipleConsumers(true);
c.setBaseDuration(n.getTimestamp() - fr... | This method initialises the completion time information for a trace instance. |
public void reinitializeContacts(EvolutionState state){
}
| Initializes contacts with other processes, if that's what you're doing. Called after restarting from a checkpoint. It doesn't do anything, as this exchanger works on only 1 computer. |
private boolean isMessageEligibleForMyVersion(UpdateMessage msg){
return msg.getVersion() == null || msg.getMessageType().equalsIgnoreCase("update") || !UpdateManager.isFrostWireOld(msg);
}
| Checks if FrostWire isn't too old for this message. If the message has no version info, it doesn't matter then, it should be eligible for all versions. When it's an update message: If the message is an update message then it doesn't matter what version it's sent, it should be valid because we need to use the version in... |
public boolean isOpenNativeNavigationAppSupported(){
return true;
}
| Returns true if the underlying OS supports opening the native navigation application |
@Override public void startCounting(ExampleSet exampleSet,boolean useExampleWeights) throws OperatorException {
super.startCounting(exampleSet,useExampleWeights);
Iterator<Example> reader=exampleSet.iterator();
this.loss=0.0d;
this.counter=0.0d;
Attribute labelAttr=exampleSet.getAttributes().getLabel();
Att... | Calculates the margin. |
public STGroupFile(URL url,String encoding,char delimiterStartChar,char delimiterStopChar){
super(delimiterStartChar,delimiterStopChar);
this.url=url;
this.encoding=encoding;
this.fileName=null;
}
| Pass in a URL with the location of a group file. E.g., STGroup g = new STGroupFile(loader.getResource("org/foo/templates/g.stg"), "UTF-8", '<', '>'); |
public void attemptLogin(){
if (mAuthTask != null) {
return;
}
mEmailView.setErrorEnabled(false);
mPasswordView.setErrorEnabled(false);
String email=mEmailView.getEditText().getText().toString();
String password=mPasswordView.getEditText().getText().toString();
boolean cancel=false;
View focusView=n... | Attempts to sign in or register the account specified by the login form. If there are form errors (invalid email, missing fields, etc.), the errors are presented and no actual login attempt is made. |
public static boolean replace(RTextArea textArea,String toFind,String replaceWith,boolean forward,boolean matchCase,boolean wholeWord,boolean regex) throws PatternSyntaxException {
textArea.beginAtomicEdit();
try {
if (regex) {
return regexReplace(textArea,toFind,replaceWith,forward,matchCase,wholeWord);
... | Finds the next instance of the text/regular expression specified from the caret position. If a match is found, it is replaced with the specified replacement string. |
public boolean isOnMonday(){
Object oo=get_Value(COLUMNNAME_OnMonday);
if (oo != null) {
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
| Get Monday. |
public MekaTable(int numRows,int numColumns){
super(numRows,numColumns);
initGUI();
}
| Constructs a <code>BaseTable</code> with <code>numRows</code> and <code>numColumns</code> of empty cells using <code>DefaultTableModel</code>. The columns will have names of the form "A", "B", "C", etc. |
private void drawTickLine(Graphics2D graphics,long frequency,boolean major){
graphics.setColor(mColorSpectrumLine);
double xAxis=getAxisFromFrequency(frequency);
double start=getSize().getHeight() - mSpectrumInset;
double end=start + (major ? 9.0d : 3.0d);
graphics.draw(new Line2D.Double(xAxis,start,xAxis,end... | Draws a vertical line at the xaxis |
public synchronized void dispose(){
CloseableReference.closeSafely(mPreviewBitmap);
mPreviewBitmap=null;
CloseableReference.closeSafely(mDecodedFrames);
mDecodedFrames=null;
}
| Disposes the result, which releases the reference to any bitmaps. |
public static int rulealt(int rule,int alt){
if (rule == -1) return -1;
return rule << 16 | alt;
}
| Pack a rule index and an alternative number into the same 32-bit integer. |
public Jerry eq(int value){
List<Node> result=new NodeList(1);
int index=0;
int matchingIndex=value >= 0 ? value : nodes.length + value;
for ( Node node : nodes) {
if (index == matchingIndex) {
result.add(node);
break;
}
index++;
}
return new Jerry(this,result);
}
| Reduces the set of matched elements to the one at the specified index. |
@Override public boolean onUnbind(Intent intent){
mOperationsBinder.clearListeners();
return false;
}
| Called when ALL the bound clients were unbound. |
protected void addSuperScopePropertyDescriptor(Object object){
itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),getResourceLocator(),getString("_UI_ExecutionScope_superScope_feature"),getString("_UI_PropertyDescriptor_description","_UI_Execut... | This adds a property descriptor for the Super Scope feature. <!-- begin-user-doc --> <!-- end-user-doc --> |
public C method(){
return null;
}
| Here is a relative link in a method: <a href="relative-method-link.html">relative method link</a>. |
@Override public int length(){
return _head - _tail;
}
| Returns the current size of the buffer. |
public Object execute(Object o) throws IllegalAccessException, InvocationTargetException {
if (method == null) return null;
return method.invoke(o,null);
}
| Execute method against context. |
public GotoStmt newGotoStmt(Unit target){
return new JGotoStmt(target);
}
| Constructs a GotoStmt(Stmt) grammar chunk. |
public static boolean makeDirsIfNeeded(File dir){
return dir.exists() || dir.mkdirs();
}
| Create a new directory if not exists. |
public <K,V>Cache<K,V> createCache(CacheType cacheType,String carbonStorePath){
if (!dictionaryCacheAlreadyExists(cacheType)) {
synchronized (lock) {
if (!dictionaryCacheAlreadyExists(cacheType)) {
if (null == cacheTypeToLRUCacheMap.get(cacheType)) {
createLRULevelCacheInstance(cacheType);
... | This method will check if a cache already exists for given cache type and create in case it is not present in the map |
public <T>T toNova(Object nativeObject){
Objects.requireNonNull(nativeObject);
NativeConverter converter=findConverter(nativeConverters,nativeObject);
if (converter == null) {
throw new NativeException("NativeManager.toNova: Converter for " + nativeObject + " with class "+ nativeObject.getClass()+ " does not ... | Converts a native object to a nova object. This method has autocast, is DANGEROUS and may crash. |
private static boolean stubClassExists(Class<?> remoteClass){
if (!withoutStubs.containsKey(remoteClass)) {
try {
Class.forName(remoteClass.getName() + "_Stub",false,remoteClass.getClassLoader());
return true;
}
catch ( ClassNotFoundException cnfe) {
withoutStubs.put(remoteClass,null);
... | Returns true if a stub class for the given impl class can be loaded, otherwise returns false. |
private static void findAll(File baseFile,String regex,List<File> found){
if (baseFile.getAbsolutePath().matches(regex)) {
found.add(baseFile);
}
if (baseFile.exists() && baseFile.isDirectory()) {
for ( File child : listFiles(baseFile)) {
findAll(child,regex,found);
}
}
}
| Implementation of findAll. |
protected void notifyReconnectionFailed(Exception exception){
if (isReconnectionAllowed()) {
for ( ConnectionListener listener : connection.connectionListeners) {
listener.reconnectionFailed(exception);
}
}
}
| Fires listeners when a reconnection attempt has failed. |
static int indexOf(char[] source,int sourceOffset,int sourceCount,char[] target,int targetOffset,int targetCount,int fromIndex){
if (fromIndex >= sourceCount) {
return (targetCount == 0 ? sourceCount : -1);
}
if (fromIndex < 0) {
fromIndex=0;
}
if (targetCount == 0) {
return fromIndex;
}
char ... | Code shared by String and StringBuffer to do searches. The source is the character array being searched, and the target is the string being searched for. |
protected void log(String message){
benchmark.log(message);
}
| Convenience method to create a debug log message. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.