method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
@Test public void testSlaves() throws Exception { SlaveServer slave = createSlaveServer( "" ); repository.save( slave, VERSION_COMMENT_V1, null ); assertNotNull( slave.getObjectId() ); ObjectRevision version = slave.getObjectRevision(); assertNotNull( version ); assertTrue( hasVersionWithCom...
void function() throws Exception { SlaveServer slave = createSlaveServer( "" ); repository.save( slave, VERSION_COMMENT_V1, null ); assertNotNull( slave.getObjectId() ); ObjectRevision version = slave.getObjectRevision(); assertNotNull( version ); assertTrue( hasVersionWithComment( slave, VERSION_COMMENT_V1 ) ); assert...
/** * save(slave) loadSlaveServer() exists() deleteSlave() getSlaveID() getSlaveIDs() getSlaveNames() getSlaveServers() */
save(slave) loadSlaveServer() exists() deleteSlave() getSlaveID() getSlaveIDs() getSlaveNames() getSlaveServers()
testSlaves
{ "repo_name": "wseyler/pentaho-kettle", "path": "plugins/pur/core/src/test/java/org/pentaho/di/repository/RepositoryTestBase.java", "license": "apache-2.0", "size": 85327 }
[ "org.junit.Assert", "org.pentaho.di.cluster.SlaveServer" ]
import org.junit.Assert; import org.pentaho.di.cluster.SlaveServer;
import org.junit.*; import org.pentaho.di.cluster.*;
[ "org.junit", "org.pentaho.di" ]
org.junit; org.pentaho.di;
1,114,599
public ColorModeCallback getColorModeCallback() { return colorModeCallback; }
ColorModeCallback function() { return colorModeCallback; }
/** * Returns the color mode callback, if set, otherwise <code>null</code>. * * @return the color mode callback, if set, otherwise <code>null</code>. */
Returns the color mode callback, if set, otherwise <code>null</code>
getColorModeCallback
{ "repo_name": "pepstock-org/Charba", "path": "src/org/pepstock/charba/client/sankey/SankeyDataset.java", "license": "apache-2.0", "size": 34482 }
[ "org.pepstock.charba.client.sankey.callbacks.ColorModeCallback" ]
import org.pepstock.charba.client.sankey.callbacks.ColorModeCallback;
import org.pepstock.charba.client.sankey.callbacks.*;
[ "org.pepstock.charba" ]
org.pepstock.charba;
1,529,756
public void test4() { Pattern pat = Pattern.compile("(\\sLog\\b)"); String s = "abcd Log ="; Matcher m = pat.matcher(s); assertTrue(m.find()); String r = m.replaceAll(" Logger"); assertEquals("abcd Logger =", r); String s2 = "Logabcd "; m = pat.matche...
void function() { Pattern pat = Pattern.compile(STR); String s = STR; Matcher m = pat.matcher(s); assertTrue(m.find()); String r = m.replaceAll(STR); assertEquals(STR, r); String s2 = STR; m = pat.matcher(s2); assertFalse(m.find()); String s3 = STR; m = pat.matcher(s3); assertFalse(m.find()); String s4 = STR; m = pat.m...
/** * In this test we try to replace keyword Log without influence on String * containg Log We see that we have to use two differents Patterns */
In this test we try to replace keyword Log without influence on String containg Log We see that we have to use two differents Patterns
test4
{ "repo_name": "geekboxzone/mmallow_external_slf4j", "path": "slf4j-migrator/src/test/java/org/slf4j/migrator/AternativeApproach.java", "license": "mit", "size": 5322 }
[ "java.util.regex.Matcher", "java.util.regex.Pattern" ]
import java.util.regex.Matcher; import java.util.regex.Pattern;
import java.util.regex.*;
[ "java.util" ]
java.util;
2,119,742
public boolean isProxy() { return this.challengeState != null && this.challengeState == ChallengeState.PROXY; }
boolean function() { return this.challengeState != null && this.challengeState == ChallengeState.PROXY; }
/** * Returns <code>true</code> if authenticating against a proxy, <code>false</code> * otherwise. */
Returns <code>true</code> if authenticating against a proxy, <code>false</code> otherwise
isProxy
{ "repo_name": "mcomella/FirefoxAccounts-android", "path": "thirdparty/src/main/java/ch/boye/httpclientandroidlib/impl/auth/AuthSchemeBase.java", "license": "mpl-2.0", "size": 6116 }
[ "ch.boye.httpclientandroidlib.auth.ChallengeState" ]
import ch.boye.httpclientandroidlib.auth.ChallengeState;
import ch.boye.httpclientandroidlib.auth.*;
[ "ch.boye.httpclientandroidlib" ]
ch.boye.httpclientandroidlib;
495,279
public Map<WebService, Map<String, String>> getServicesWithInputContainedInModel( edu.isi.karma.rep.model.Model semanticModel, Integer serviceLimit) { List<Source> serviceList = getSourcesDetailedInfo(serviceLimit); Map<WebService, Map<String, String>> servicesAndMappings = new HashMap<>(); M...
Map<WebService, Map<String, String>> function( edu.isi.karma.rep.model.Model semanticModel, Integer serviceLimit) { List<Source> serviceList = getSourcesDetailedInfo(serviceLimit); Map<WebService, Map<String, String>> servicesAndMappings = new HashMap<>(); Model jenaModel = semanticModel.getJenaModel(); for (Source ser...
/** * Searches the repository to find the services whose input model is contained in the semantic model parameter. * Note that the services in the return list only include the operations that match the model parameter. * @param semanticModel The input model whose pattern will be searched in the repository * @re...
Searches the repository to find the services whose input model is contained in the semantic model parameter. Note that the services in the return list only include the operations that match the model parameter
getServicesWithInputContainedInModel
{ "repo_name": "usc-isi-i2/Web-Karma", "path": "karma-common/src/main/java/edu/isi/karma/model/serialization/WebServiceLoader.java", "license": "apache-2.0", "size": 33950 }
[ "com.hp.hpl.jena.rdf.model.Model", "edu.isi.karma.rep.sources.Source", "edu.isi.karma.rep.sources.WebService", "java.util.HashMap", "java.util.Iterator", "java.util.List", "java.util.Map" ]
import com.hp.hpl.jena.rdf.model.Model; import edu.isi.karma.rep.sources.Source; import edu.isi.karma.rep.sources.WebService; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map;
import com.hp.hpl.jena.rdf.model.*; import edu.isi.karma.rep.sources.*; import java.util.*;
[ "com.hp.hpl", "edu.isi.karma", "java.util" ]
com.hp.hpl; edu.isi.karma; java.util;
1,126,813
@Override public void onCreate(SQLiteDatabase db, ConnectionSource connectionSource) { try { Log.i(DatabaseHelper.class.getName(), "onCreate"); // Create the databases we're using TableUtils.createTable(connectionSource, Person.class); TableUtils.createTab...
void function(SQLiteDatabase db, ConnectionSource connectionSource) { try { Log.i(DatabaseHelper.class.getName(), STR); TableUtils.createTable(connectionSource, Person.class); TableUtils.createTable(connectionSource, Stream.class); TableUtils.createTable(connectionSource, Message.class); TableUtils.createTable(connecti...
/** * This is called when the database is first created. Usually you should * call createTable statements here to create the tables that will store * your data. */
This is called when the database is first created. Usually you should call createTable statements here to create the tables that will store your data
onCreate
{ "repo_name": "abhaymaniyar/zulip-android", "path": "app/src/main/java/com/zulip/android/database/DatabaseHelper.java", "license": "apache-2.0", "size": 4064 }
[ "android.database.sqlite.SQLiteDatabase", "android.util.Log", "com.j256.ormlite.support.ConnectionSource", "com.j256.ormlite.table.TableUtils", "com.zulip.android.models.Emoji", "com.zulip.android.models.Message", "com.zulip.android.models.MessageRange", "com.zulip.android.models.Person", "com.zulip...
import android.database.sqlite.SQLiteDatabase; import android.util.Log; import com.j256.ormlite.support.ConnectionSource; import com.j256.ormlite.table.TableUtils; import com.zulip.android.models.Emoji; import com.zulip.android.models.Message; import com.zulip.android.models.MessageRange; import com.zulip.android.model...
import android.database.sqlite.*; import android.util.*; import com.j256.ormlite.support.*; import com.j256.ormlite.table.*; import com.zulip.android.models.*; import java.sql.*;
[ "android.database", "android.util", "com.j256.ormlite", "com.zulip.android", "java.sql" ]
android.database; android.util; com.j256.ormlite; com.zulip.android; java.sql;
1,097,100
private void createAndCloseGeoPackage(GeoPackageDatabase db) { GeoPackageConnection connection = new GeoPackageConnection(db); // Set the GeoPackage application id and user version connection.setApplicationId(); connection.setUserVersion(); // Create the minimum required t...
void function(GeoPackageDatabase db) { GeoPackageConnection connection = new GeoPackageConnection(db); connection.setApplicationId(); connection.setUserVersion(); GeoPackageTableCreator tableCreator = new GeoPackageTableCreator(connection); tableCreator.createRequired(); connection.close(); } /** * {@inheritDoc}
/** * Create the required GeoPackage application id and tables in the newly created and open database connection. Then close the connection. * * @param db database connection */
Create the required GeoPackage application id and tables in the newly created and open database connection. Then close the connection
createAndCloseGeoPackage
{ "repo_name": "ngageoint/geopackage-android", "path": "geopackage-sdk/src/main/java/mil/nga/geopackage/GeoPackageManagerImpl.java", "license": "mit", "size": 54233 }
[ "mil.nga.geopackage.db.GeoPackageConnection", "mil.nga.geopackage.db.GeoPackageDatabase", "mil.nga.geopackage.db.GeoPackageTableCreator" ]
import mil.nga.geopackage.db.GeoPackageConnection; import mil.nga.geopackage.db.GeoPackageDatabase; import mil.nga.geopackage.db.GeoPackageTableCreator;
import mil.nga.geopackage.db.*;
[ "mil.nga.geopackage" ]
mil.nga.geopackage;
1,213,486
public void error(String msg, Object arg0) { logIfEnabled(Level.ERROR, null, msg, arg0, UNKNOWN_ARG, UNKNOWN_ARG, null); }
void function(String msg, Object arg0) { logIfEnabled(Level.ERROR, null, msg, arg0, UNKNOWN_ARG, UNKNOWN_ARG, null); }
/** * Log a error message. */
Log a error message
error
{ "repo_name": "lobo12/ormlite-core", "path": "src/main/java/com/j256/ormlite/logger/Logger.java", "license": "isc", "size": 17397 }
[ "com.j256.ormlite.logger.Log" ]
import com.j256.ormlite.logger.Log;
import com.j256.ormlite.logger.*;
[ "com.j256.ormlite" ]
com.j256.ormlite;
1,833,754
public Date addToDate(Date base) { Calendar calendar = Calendar.getInstance(); calendar.setTime(base); calendar.add(getCalendarField(this.unit), this.count); return calendar.getTime(); }
Date function(Date base) { Calendar calendar = Calendar.getInstance(); calendar.setTime(base); calendar.add(getCalendarField(this.unit), this.count); return calendar.getTime(); }
/** * Calculates a new date by adding this unit to the base date. * * @param base the base date. * * @return A new date one unit after the base date. * * @see #addToDate(Date, TimeZone) */
Calculates a new date by adding this unit to the base date
addToDate
{ "repo_name": "ibestvina/multithread-centiscape", "path": "CentiScaPe2.1/src/main/java/org/jfree/chart/axis/DateTickUnit.java", "license": "mit", "size": 13135 }
[ "java.util.Calendar", "java.util.Date" ]
import java.util.Calendar; import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
545,467
@Test public void testT1RV8D3_T1LV4D9() { test_id = getTestId("T1RV8D3", "T1LV4D9", "86"); String src = selectTRVD("T1RV8D3"); String dest = selectTLVD("T1LV4D9"); String result = "."; try { result = TRVD_TLVD_Action(src, dest); } catch (RecognitionException e) { e.printStackTrace();...
void function() { test_id = getTestId(STR, STR, "86"); String src = selectTRVD(STR); String dest = selectTLVD(STR); String result = "."; try { result = TRVD_TLVD_Action(src, dest); } catch (RecognitionException e) { e.printStackTrace(); } catch (TokenStreamException e) { e.printStackTrace(); } assertTrue(ParamFailure2,...
/** * Perform the test for the given matrix column (T1RV8D3) and row (T1LV4D9). * */
Perform the test for the given matrix column (T1RV8D3) and row (T1LV4D9)
testT1RV8D3_T1LV4D9
{ "repo_name": "jason-rhodes/bridgepoint", "path": "src/org.xtuml.bp.als.oal.test/src/org/xtuml/bp/als/oal/test/SingleDimensionFixedArrayAssigmentTest_16_Generics.java", "license": "apache-2.0", "size": 186177 }
[ "org.xtuml.bp.ui.graphics.editor.GraphicalEditor" ]
import org.xtuml.bp.ui.graphics.editor.GraphicalEditor;
import org.xtuml.bp.ui.graphics.editor.*;
[ "org.xtuml.bp" ]
org.xtuml.bp;
572,932
public FileHandle getFile() { return _file; }
FileHandle function() { return _file; }
/** * Returns the file for this job. This file is used to tell the slaves what * file to transfer & receive. */
Returns the file for this job. This file is used to tell the slaves what file to transfer & receive
getFile
{ "repo_name": "d-fens/drftpd", "path": "src/plugins/org.drftpd.plugins.jobmanager/src/org/drftpd/plugins/jobmanager/Job.java", "license": "gpl-2.0", "size": 15027 }
[ "org.drftpd.vfs.FileHandle" ]
import org.drftpd.vfs.FileHandle;
import org.drftpd.vfs.*;
[ "org.drftpd.vfs" ]
org.drftpd.vfs;
2,475,355
return bool ? TRUE : FALSE; } /** * Constructs a new {@code Optional&lt;Boolean&gt;} from the given {@link Boolean}. * * @param bool The boolean * @return The constructed Optional, or {@link Optional#empty()}
return bool ? TRUE : FALSE; } /** * Constructs a new {@code Optional&lt;Boolean&gt;} from the given {@link Boolean}. * * @param bool The boolean * @return The constructed Optional, or {@link Optional#empty()}
/** * Constructs a new {@code Optional&lt;Boolean&gt;} from the given boolean. * * @param bool The boolean * @return The constructed Optional */
Constructs a new Optional&lt;Boolean&gt; from the given boolean
of
{ "repo_name": "natrolite/natrolite", "path": "natrolite-api/src/main/java/org/natrolite/util/OptBool.java", "license": "gpl-3.0", "size": 3036 }
[ "java.util.Optional" ]
import java.util.Optional;
import java.util.*;
[ "java.util" ]
java.util;
993,913
public synchronized void rollback() throws HeuristicCommitException, HeuristicMixedException, HeuristicHazardException, SystemException { if (tc.isEntryEnabled()) Tr.entry(tc, "rollback", this); // Ensure timeout cannot rollback the underlying transaction ((DistributableTransact...
synchronized void function() throws HeuristicCommitException, HeuristicMixedException, HeuristicHazardException, SystemException { if (tc.isEntryEnabled()) Tr.entry(tc, STR, this); ((DistributableTransaction) _transaction).addAssociation(); boolean sysException = false; EmbeddableTimeoutManager.setTimeout(_transaction,...
/** * Informs the object that the transaction is to be rolled back. * <p> * Passes the superior Coordinator's rollback request on to the TransactionImpl * that registered the CoordinatorResourceImpl, using a private interface. * <p> * If the TransactionImpl does not raise any heuristic exc...
Informs the object that the transaction is to be rolled back. Passes the superior Coordinator's rollback request on to the TransactionImpl that registered the CoordinatorResourceImpl, using a private interface. If the TransactionImpl does not raise any heuristic exception, the CoordinatorResourceImpl destroys itself
rollback
{ "repo_name": "kgibm/open-liberty", "path": "dev/com.ibm.ws.tx.embeddable/src/com/ibm/tx/remote/TransactionWrapper.java", "license": "epl-1.0", "size": 45681 }
[ "com.ibm.tx.jta.TransactionManagerFactory", "com.ibm.tx.jta.embeddable.impl.EmbeddableTimeoutManager", "com.ibm.tx.jta.embeddable.impl.EmbeddableTranManagerSet", "com.ibm.tx.jta.impl.TransactionState", "com.ibm.websphere.ras.Tr", "com.ibm.ws.Transaction", "com.ibm.ws.ffdc.FFDCFilter", "javax.transacti...
import com.ibm.tx.jta.TransactionManagerFactory; import com.ibm.tx.jta.embeddable.impl.EmbeddableTimeoutManager; import com.ibm.tx.jta.embeddable.impl.EmbeddableTranManagerSet; import com.ibm.tx.jta.impl.TransactionState; import com.ibm.websphere.ras.Tr; import com.ibm.ws.Transaction; import com.ibm.ws.ffdc.FFDCFilter;...
import com.ibm.tx.jta.*; import com.ibm.tx.jta.embeddable.impl.*; import com.ibm.tx.jta.impl.*; import com.ibm.websphere.ras.*; import com.ibm.ws.*; import com.ibm.ws.ffdc.*; import javax.transaction.*;
[ "com.ibm.tx", "com.ibm.websphere", "com.ibm.ws", "javax.transaction" ]
com.ibm.tx; com.ibm.websphere; com.ibm.ws; javax.transaction;
556,592
public static Actions read(final int actionClass, final SeekableInputStream stream, final SpecialActionTable specialActionTable) throws IOException { Action action; int quantity; List<Integer> offsets; int endOffset; int pos; int offset; Actions ac...
static Actions function(final int actionClass, final SeekableInputStream stream, final SpecialActionTable specialActionTable) throws IOException { Action action; int quantity; List<Integer> offsets; int endOffset; int pos; int offset; Actions actions; actions = new Actions(); pos = (int) stream.tell(); offsets = new Ar...
/** * Creates and returns a new Actions object. * * @param actionClass * The action class * @param stream * The input stream * @param specialActionTable * The special action table * @return The Actions object * @throws IOException *...
Creates and returns a new Actions object
read
{ "repo_name": "delMar43/wlandsuite", "path": "src/main/java/de/ailis/wlandsuite/game/parts/Actions.java", "license": "mit", "size": 7100 }
[ "de.ailis.wlandsuite.io.SeekableInputStream", "java.io.IOException", "java.util.ArrayList", "java.util.List" ]
import de.ailis.wlandsuite.io.SeekableInputStream; import java.io.IOException; import java.util.ArrayList; import java.util.List;
import de.ailis.wlandsuite.io.*; import java.io.*; import java.util.*;
[ "de.ailis.wlandsuite", "java.io", "java.util" ]
de.ailis.wlandsuite; java.io; java.util;
2,049,049
protected final void packShareHandle(String shareName, RpcPacket rpc) { // Indicate that a handle follows, pack the handle rpc.packInt(Rpc.True); NFSHandle.packShareHandle(shareName, rpc, NFS.FileHandleSize); }
final void function(String shareName, RpcPacket rpc) { rpc.packInt(Rpc.True); NFSHandle.packShareHandle(shareName, rpc, NFS.FileHandleSize); }
/** * Pack a share handle * * @param shareName String * @param rpc RpcPacket */
Pack a share handle
packShareHandle
{ "repo_name": "loftuxab/community-edition-old", "path": "projects/alfresco-jlan/source/java/org/alfresco/jlan/oncrpc/nfs/NFSServer.java", "license": "lgpl-3.0", "size": 140029 }
[ "org.alfresco.jlan.oncrpc.Rpc", "org.alfresco.jlan.oncrpc.RpcPacket" ]
import org.alfresco.jlan.oncrpc.Rpc; import org.alfresco.jlan.oncrpc.RpcPacket;
import org.alfresco.jlan.oncrpc.*;
[ "org.alfresco.jlan" ]
org.alfresco.jlan;
1,629,323
@ApiStatus.NonExtendable public interface JoinConfiguration extends Buildable<JoinConfiguration, JoinConfiguration.Builder>, Examinable { static @NotNull Builder builder() { return new JoinConfigurationImpl.BuilderImpl(); }
@ApiStatus.NonExtendable interface JoinConfiguration extends Buildable<JoinConfiguration, JoinConfiguration.Builder>, Examinable { static @NotNull Builder function() { return new JoinConfigurationImpl.BuilderImpl(); }
/** * Creates a new builder. * * @return a new builder * @since 4.9.0 */
Creates a new builder
builder
{ "repo_name": "KyoriPowered/text", "path": "api/src/main/java/net/kyori/adventure/text/JoinConfiguration.java", "license": "mit", "size": 9144 }
[ "net.kyori.adventure.util.Buildable", "net.kyori.examination.Examinable", "org.jetbrains.annotations.ApiStatus", "org.jetbrains.annotations.NotNull" ]
import net.kyori.adventure.util.Buildable; import net.kyori.examination.Examinable; import org.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.NotNull;
import net.kyori.adventure.util.*; import net.kyori.examination.*; import org.jetbrains.annotations.*;
[ "net.kyori.adventure", "net.kyori.examination", "org.jetbrains.annotations" ]
net.kyori.adventure; net.kyori.examination; org.jetbrains.annotations;
1,708,048
public CounterName withOriginalName(String originalName) { return create( name(), origin(), stepName(), prefix(), checkNotNull(originalName, "Expected original name in string %s", originalName), contextSystemName(), originalRequestingStepName(), inpu...
CounterName function(String originalName) { return create( name(), origin(), stepName(), prefix(), checkNotNull(originalName, STR, originalName), contextSystemName(), originalRequestingStepName(), inputIndex()); }
/** * Returns a {@link CounterName} identical to this, but with the {@code originalName} from a * {@link String}. */
Returns a <code>CounterName</code> identical to this, but with the originalName from a <code>String</code>
withOriginalName
{ "repo_name": "lukecwik/incubator-beam", "path": "runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/counters/CounterName.java", "license": "apache-2.0", "size": 9370 }
[ "org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions" ]
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.*;
[ "org.apache.beam" ]
org.apache.beam;
2,156,005
public void paintComponent(Graphics og) { super.paintComponent(og); Graphics2D g = (Graphics2D) og; g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); double width = getWidth(); double height = getHeight(); g.setColor(FILLCOLOUR); g.fillRect(1, 1, (int) width-...
void function(Graphics og) { super.paintComponent(og); Graphics2D g = (Graphics2D) og; g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); double width = getWidth(); double height = getHeight(); g.setColor(FILLCOLOUR); g.fillRect(1, 1, (int) width-1, (int) height-1); g.setColor(BORDE...
/** * Overridden to paint the histogram image. * @see JPanel#paintComponent(Graphics) */
Overridden to paint the histogram image
paintComponent
{ "repo_name": "simleo/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/metadata/rnd/GraphicsPaneUI.java", "license": "gpl-2.0", "size": 7405 }
[ "java.awt.Graphics", "java.awt.Graphics2D", "java.awt.RenderingHints" ]
import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.RenderingHints;
import java.awt.*;
[ "java.awt" ]
java.awt;
876,005
@Generated @Deprecated @Selector("currentInputMode") public static native UITextInputMode currentInputMode();
@Selector(STR) static native UITextInputMode function();
/** * The current input mode. Nil if unset. */
The current input mode. Nil if unset
currentInputMode
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/uikit/UITextInputMode.java", "license": "apache-2.0", "size": 6203 }
[ "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
994,490
public void println() throws IOException { onNewLine = true; aligned = false; needsNewLine = false; out.write(lineSep); } String lineSep = System.getProperty("line.separator"); private static class UncheckedIOException extends Error { static final long serialVe...
void function() throws IOException { onNewLine = true; aligned = false; needsNewLine = false; out.write(lineSep); } String lineSep = System.getProperty(STR); private static class UncheckedIOException extends Error { static final long serialVersionUID = -4032692679158424751L; UncheckedIOException(IOException e) { super(...
/** Print new line. */
Print new line
println
{ "repo_name": "digitalheir/lombok", "path": "src/delombok/lombok/delombok/PrettyCommentsPrinter.java", "license": "mit", "size": 49628 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
909,844
private static int[][] parse(String members) { // Create vector to hold int[] elements, each element being one range // parsed out of members. Vector theRanges = new Vector(); // Run state machine over members. int n = (members == null ? 0 : members.length()); int i ...
static int[][] function(String members) { Vector theRanges = new Vector(); int n = (members == null ? 0 : members.length()); int i = 0; int state = 0; int lb = 0; int ub = 0; char c; int digit; while (i < n) { c = members.charAt(i ++); switch (state) { case 0: if (Character.isWhitespace(c)) { state = 0; } else if ((dig...
/** * Parse the given string, returning canonical array form. */
Parse the given string, returning canonical array form
parse
{ "repo_name": "shun634501730/java_source_cn", "path": "src_en/javax/print/attribute/SetOfIntegerSyntax.java", "license": "apache-2.0", "size": 19979 }
[ "java.util.Vector" ]
import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
1,716,864
public long getEstimatedResourceConstrainedSize() { return estimatedResourceConstrainedSize; } /** * Writes a JSON representation of the data to the specified {@link PrintWriter}. The data has the * following form: <code> * <br>{ * <br>&nbsp;&nbsp;estimatedNewSize = &lt;number&gt;, * <br>&nbsp...
long function() { return estimatedResourceConstrainedSize; } /** * Writes a JSON representation of the data to the specified {@link PrintWriter}. The data has the * following form: <code> * <br>{ * <br>&nbsp;&nbsp;estimatedNewSize = &lt;number&gt;, * <br>&nbsp;&nbsp;estimatedChangedSize = &lt;number&gt;, * <br>&nbsp;&n...
/** * Returns the sum total of the sizes of all entries that could have been uncompressed for * patching but have been prevented due to resource constraints by a {@link * TotalRecompressionLimiter}. As noted in {@link EntryExplanation#getCompressedSizeInPatch()}, * this is an <strong>approximation</strong>....
Returns the sum total of the sizes of all entries that could have been uncompressed for patching but have been prevented due to resource constraints by a <code>TotalRecompressionLimiter</code>. As noted in <code>EntryExplanation#getCompressedSizeInPatch()</code>, this is an approximation
getEstimatedResourceConstrainedSize
{ "repo_name": "google/archive-patcher", "path": "explainer/src/main/java/com/google/archivepatcher/explainer/PatchExplanation.java", "license": "apache-2.0", "size": 11393 }
[ "java.io.PrintWriter" ]
import java.io.PrintWriter;
import java.io.*;
[ "java.io" ]
java.io;
2,396,745
public void removeTmpStore(IMXStore store) { if (null != store) { mTmpStores.remove(store); } }
void function(IMXStore store) { if (null != store) { mTmpStores.remove(store); } }
/** * Remove the dedicated store from the tmp stores list. * @param store the store to remove */
Remove the dedicated store from the tmp stores list
removeTmpStore
{ "repo_name": "floviolleau/vector-android", "path": "vector/src/main/java/im/vector/Matrix.java", "license": "apache-2.0", "size": 24868 }
[ "org.matrix.androidsdk.data.IMXStore" ]
import org.matrix.androidsdk.data.IMXStore;
import org.matrix.androidsdk.data.*;
[ "org.matrix.androidsdk" ]
org.matrix.androidsdk;
2,201,616
@Override public void send(String name, String value, long timestamp) throws IOException { try { writer.write(dateFormat.format(new Date(timestamp*1000))); writer.write(' '); writer.write(sanitize(name)); writer.write(' '); writer.write(sanitize(value)); writer.write('\n'); ...
void function(String name, String value, long timestamp) throws IOException { try { writer.write(dateFormat.format(new Date(timestamp*1000))); writer.write(' '); writer.write(sanitize(name)); writer.write(' '); writer.write(sanitize(value)); writer.write('\n'); writer.flush(); } catch (IOException e) { throw e; } }
/** * Writes the given measurement to the console. * * @param name the name of the metric * @param value the value of the metric * @param timestamp the timestamp of the metric * @throws IOException if there was an error sending the metric */
Writes the given measurement to the console
send
{ "repo_name": "chetan/sewer", "path": "src/main/java/net/pixelcop/sewer/sink/debug/GraphiteConsole.java", "license": "apache-2.0", "size": 1673 }
[ "java.io.IOException", "java.util.Date" ]
import java.io.IOException; import java.util.Date;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,366,755
public void processPacket(INetHandlerPlayClient handler) { handler.handleTabComplete(this); }
void function(INetHandlerPlayClient handler) { handler.handleTabComplete(this); }
/** * Passes this Packet on to the NetHandler for processing. */
Passes this Packet on to the NetHandler for processing
processPacket
{ "repo_name": "Hexeption/Youtube-Hacked-Client-1.8", "path": "minecraft/net/minecraft/network/play/server/S3APacketTabComplete.java", "license": "mit", "size": 1856 }
[ "net.minecraft.network.play.INetHandlerPlayClient" ]
import net.minecraft.network.play.INetHandlerPlayClient;
import net.minecraft.network.play.*;
[ "net.minecraft.network" ]
net.minecraft.network;
2,503,674
public String testString() { return mTestString; } } public static enum EventValueType { UNKNOWN(0), INT(1), LONG(2), STRING(3), LIST(4), TREE(5); private final static Pattern STORAGE_PATTERN = Pattern.compile("^(\\d+)@(...
String function() { return mTestString; } } public static enum EventValueType { UNKNOWN(0), INT(1), LONG(2), STRING(3), LIST(4), TREE(5); private final static Pattern STORAGE_PATTERN = Pattern.compile(STR); private int mValue;
/** * Returns a short string representing the comparison. */
Returns a short string representing the comparison
testString
{ "repo_name": "i25ffz/screenshot", "path": "src/com/android/ddmlib/log/EventContainer.java", "license": "apache-2.0", "size": 15661 }
[ "java.util.regex.Pattern" ]
import java.util.regex.Pattern;
import java.util.regex.*;
[ "java.util" ]
java.util;
2,604,013
private static HttpHeaders getActiveHeaders(FullHttpMessage msg) { return msg.content().isReadable() ? msg.trailingHeaders() : msg.headers(); } /** * This method will add the {@code headers} to the out of order headers map * @param streamId The stream id associated with {@code headers}
static HttpHeaders function(FullHttpMessage msg) { return msg.content().isReadable() ? msg.trailingHeaders() : msg.headers(); } /** * This method will add the {@code headers} to the out of order headers map * @param streamId The stream id associated with {@code headers}
/** * Get either the header or the trailing headers depending on which is valid to add to * @param msg The message containing the headers and trailing headers * @return The headers object which can be appended to or modified */
Get either the header or the trailing headers depending on which is valid to add to
getActiveHeaders
{ "repo_name": "sameira/netty", "path": "codec-http2/src/main/java/io/netty/handler/codec/http2/InboundHttp2ToHttpPriorityAdapter.java", "license": "apache-2.0", "size": 9936 }
[ "io.netty.handler.codec.http.FullHttpMessage", "io.netty.handler.codec.http.HttpHeaders" ]
import io.netty.handler.codec.http.FullHttpMessage; import io.netty.handler.codec.http.HttpHeaders;
import io.netty.handler.codec.http.*;
[ "io.netty.handler" ]
io.netty.handler;
1,644,459
protected void addTab(String title, int iconStateId, int offShade, int onShade, Intent intent) { int[] iconStates = {iconStateId, offShade, onShade}; states.add(iconStates); intentList.add(intent); titleList.add(title); //commit(); }
void function(String title, int iconStateId, int offShade, int onShade, Intent intent) { int[] iconStates = {iconStateId, offShade, onShade}; states.add(iconStates); intentList.add(intent); titleList.add(title); }
/** * <b><i>protected void addTab(String title, int iconStateId, int offShade, int onShade, Intent intent)</i></b> <p><p> * Add a tab to the navigation bar by specifying the title, and 1 image for the button. Default yellow/gray shade is used for button on/off state<p> * @param title a String that spe...
protected void addTab(String title, int iconStateId, int offShade, int onShade, Intent intent) Add a tab to the navigation bar by specifying the title, and 1 image for the button. Default yellow/gray shade is used for button on/off state
addTab
{ "repo_name": "kkooff114/LJWCommon", "path": "src/com/loujiwei/common/activity/LJWScrollableTabActivity.java", "license": "gpl-3.0", "size": 12151 }
[ "android.content.Intent" ]
import android.content.Intent;
import android.content.*;
[ "android.content" ]
android.content;
1,674,831
@Override @JsonIgnore public void setExpires(Date expires) { this.expires = expires; }
void function(Date expires) { this.expires = expires; }
/** * Set the expiry date/time for this lock. Set to null for never expires. * * @param expires the expires to set */
Set the expiry date/time for this lock. Set to null for never expires
setExpires
{ "repo_name": "loftuxab/community-edition-old", "path": "projects/remote-api/source/java/org/alfresco/repo/webdav/LockInfoImpl.java", "license": "lgpl-3.0", "size": 10151 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,880,701
if (userName == null) throw new NullPointerException("user name not set"); if (userName.length() == 0) throw new IllegalArgumentException("empty user name not allowed"); removeAttributes(USER_NAME); addAttribute(new StringAttribute(USER_NAME, userName)); }
if (userName == null) throw new NullPointerException(STR); if (userName.length() == 0) throw new IllegalArgumentException(STR); removeAttributes(USER_NAME); addAttribute(new StringAttribute(USER_NAME, userName)); }
/** * Sets the RadUser-Name attribute of this Access-Request. * * @param userName * user name to set */
Sets the RadUser-Name attribute of this Access-Request
setUserName
{ "repo_name": "talkincode/ToughRADIUS", "path": "src/main/java/org/tinyradius/packet/AccessRequest.java", "license": "lgpl-3.0", "size": 19483 }
[ "org.tinyradius.attribute.StringAttribute" ]
import org.tinyradius.attribute.StringAttribute;
import org.tinyradius.attribute.*;
[ "org.tinyradius.attribute" ]
org.tinyradius.attribute;
2,534,316
@Override public void onDrawEye(Eye eye) { GLES20.glEnable(GLES20.GL_DEPTH_TEST); GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT | GLES20.GL_DEPTH_BUFFER_BIT); checkGLError("colorParam"); // Apply the eye transformation to the camera. Matrix.multiplyMM(view, 0, eye.getEyeVie...
void function(Eye eye) { GLES20.glEnable(GLES20.GL_DEPTH_TEST); GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT GLES20.GL_DEPTH_BUFFER_BIT); checkGLError(STR); Matrix.multiplyMM(view, 0, eye.getEyeView(), 0, camera, 0); float[] perspective = eye.getPerspective(Z_NEAR, Z_FAR); if(viewMenu) { Matrix.multiplyMM(modelView, 0, vi...
/** * Draws a frame for an eye. * * @param eye The eye to render. Includes all required transformations. */
Draws a frame for an eye
onDrawEye
{ "repo_name": "joster422/Cardboard-Tour", "path": "CardboardSample/src/main/java/com/google/vrtoolkit/cardboard/samples/treasurehunt/MainActivity.java", "license": "apache-2.0", "size": 23281 }
[ "android.opengl.Matrix", "com.google.vrtoolkit.cardboard.Eye" ]
import android.opengl.Matrix; import com.google.vrtoolkit.cardboard.Eye;
import android.opengl.*; import com.google.vrtoolkit.cardboard.*;
[ "android.opengl", "com.google.vrtoolkit" ]
android.opengl; com.google.vrtoolkit;
2,655,882
private void registerNode(String id, String participant, ProcessNode node) { if(!allNodes.containsKey(id)) { allNodes.put(id, new HashMap<String, Collection<ProcessNode>>()); } if(!allNodes.get(id).containsKey(participant)) { allNodes.get(id).put(participant, new HashSet<ProcessNode>()); }...
void function(String id, String participant, ProcessNode node) { if(!allNodes.containsKey(id)) { allNodes.put(id, new HashMap<String, Collection<ProcessNode>>()); } if(!allNodes.get(id).containsKey(participant)) { allNodes.get(id).put(participant, new HashSet<ProcessNode>()); } allNodes.get(id).get(participant).add(nod...
/** * registers, that node is some node concerned with relizing the node with id * for participant. */
registers, that node is some node concerned with relizing the node with id for participant
registerNode
{ "repo_name": "bptlab/processeditor", "path": "src/com/inubit/research/gui/plugins/choreography/interfaceGenerator/BehavioralInterfaceGenerator.java", "license": "apache-2.0", "size": 12510 }
[ "java.util.Collection", "java.util.HashMap", "java.util.HashSet", "net.frapu.code.visualization.ProcessNode" ]
import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import net.frapu.code.visualization.ProcessNode;
import java.util.*; import net.frapu.code.visualization.*;
[ "java.util", "net.frapu.code" ]
java.util; net.frapu.code;
2,357,699
public DataValiditySettingsRecord getDataValiditySettings(int col, int row) { boolean found = false; DataValiditySettingsRecord foundRecord = null; for (Iterator i = validitySettings.iterator(); i.hasNext() && !found;) { DataValiditySettingsRecord dvsr = (DataValiditySettingsRecord) i.next(); if (dvsr...
DataValiditySettingsRecord function(int col, int row) { boolean found = false; DataValiditySettingsRecord foundRecord = null; for (Iterator i = validitySettings.iterator(); i.hasNext() && !found;) { DataValiditySettingsRecord dvsr = (DataValiditySettingsRecord) i.next(); if (dvsr.getFirstColumn() == col && dvsr.getFirs...
/** * Used during the copy process to retrieve the validity settings for * a particular cell */
Used during the copy process to retrieve the validity settings for a particular cell
getDataValiditySettings
{ "repo_name": "stefandmn/AREasy", "path": "src/java/org/areasy/common/parser/excel/biff/DataValidation.java", "license": "lgpl-3.0", "size": 8215 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
270,698
public boolean isPrivate() { for(Modifier m : modifiers) { if(m instanceof Modifier.Private) { return true; } } return false; } } public static class InitialiserBlock extends Stmt.Block implements Decl { public InitialiserBlock(List<Stmt> statements, SyntacticAttribute... at...
boolean function() { for(Modifier m : modifiers) { if(m instanceof Modifier.Private) { return true; } } return false; } } public static class InitialiserBlock extends Stmt.Block implements Decl { public InitialiserBlock(List<Stmt> statements, SyntacticAttribute... attributes) { super(statements,attributes); } } public ...
/** * Check whether this field is private */
Check whether this field is private
isPrivate
{ "repo_name": "DavePearce/jkit", "path": "jkit/java/tree/Decl.java", "license": "gpl-2.0", "size": 17063 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
601,115
TypeConstraintMappingContext<C> defaultGroupSequenceProviderClass( Class<? extends DefaultGroupSequenceProvider<? super C>> defaultGroupSequenceProviderClass);
TypeConstraintMappingContext<C> defaultGroupSequenceProviderClass( Class<? extends DefaultGroupSequenceProvider<? super C>> defaultGroupSequenceProviderClass);
/** * Defines the default group sequence provider for the current type. * * @param defaultGroupSequenceProviderClass The default group sequence provider class. * * @return The current creational context following the method chaining pattern. */
Defines the default group sequence provider for the current type
defaultGroupSequenceProviderClass
{ "repo_name": "DavideD/hibernate-validator", "path": "engine/src/main/java/org/hibernate/validator/cfg/context/TypeConstraintMappingContext.java", "license": "apache-2.0", "size": 1973 }
[ "org.hibernate.validator.spi.group.DefaultGroupSequenceProvider" ]
import org.hibernate.validator.spi.group.DefaultGroupSequenceProvider;
import org.hibernate.validator.spi.group.*;
[ "org.hibernate.validator" ]
org.hibernate.validator;
2,376,644
@JsonProperty("id") public void setId(String id) { this.id = id; }
@JsonProperty("id") void function(String id) { this.id = id; }
/** * Release ID * <p> * An identifier for this particular release of information. A release identifier must be unique within the scope * of its related contracting process (defined by a common ocid), and unique within any release package it * appears in. A release identifier must not contain t...
Release ID An identifier for this particular release of information. A release identifier must be unique within the scope of its related contracting process (defined by a common ocid), and unique within any release package it appears in. A release identifier must not contain the # character. (Required)
setId
{ "repo_name": "devgateway/ocua", "path": "persistence-mongodb/src/main/java/org/devgateway/ocds/persistence/mongo/Release.java", "license": "mit", "size": 24880 }
[ "com.fasterxml.jackson.annotation.JsonProperty" ]
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.*;
[ "com.fasterxml.jackson" ]
com.fasterxml.jackson;
956,741
public static void updateAServerSThreatDetectionPolicyWithMinimalParameters( com.azure.resourcemanager.mysql.MySqlManager manager) { ServerSecurityAlertPolicy resource = manager .serverSecurityAlertPolicies() .getWithResponse( "sec...
static void function( com.azure.resourcemanager.mysql.MySqlManager manager) { ServerSecurityAlertPolicy resource = manager .serverSecurityAlertPolicies() .getWithResponse( STR, STR, SecurityAlertPolicyName.DEFAULT, Context.NONE) .getValue(); resource.update().withState(ServerSecurityAlertPolicyState.DISABLED).withEmail...
/** * Sample code: Update a server's threat detection policy with minimal parameters. * * @param manager Entry point to MySqlManager. */
Sample code: Update a server's threat detection policy with minimal parameters
updateAServerSThreatDetectionPolicyWithMinimalParameters
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/mysql/azure-resourcemanager-mysql/src/samples/java/com/azure/resourcemanager/mysql/generated/ServerSecurityAlertPoliciesCreateOrUpdateSamples.java", "license": "mit", "size": 2841 }
[ "com.azure.core.util.Context", "com.azure.resourcemanager.mysql.models.SecurityAlertPolicyName", "com.azure.resourcemanager.mysql.models.ServerSecurityAlertPolicy", "com.azure.resourcemanager.mysql.models.ServerSecurityAlertPolicyState" ]
import com.azure.core.util.Context; import com.azure.resourcemanager.mysql.models.SecurityAlertPolicyName; import com.azure.resourcemanager.mysql.models.ServerSecurityAlertPolicy; import com.azure.resourcemanager.mysql.models.ServerSecurityAlertPolicyState;
import com.azure.core.util.*; import com.azure.resourcemanager.mysql.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
130,645
private static RatingWriter createFilters(RatingWriter lastWriter, Optional<Integer> maxUsers, Optional<Integer> minRatingsByMovie, Optional<UserSimilarityType> similarityType, Optional<Integer> minCommonRatings, Optional<String> targetUser) { RatingWriter nextWriter = lastWriter; if (minRatings...
static RatingWriter function(RatingWriter lastWriter, Optional<Integer> maxUsers, Optional<Integer> minRatingsByMovie, Optional<UserSimilarityType> similarityType, Optional<Integer> minCommonRatings, Optional<String> targetUser) { RatingWriter nextWriter = lastWriter; if (minRatingsByMovie.isPresent()) { nextWriter = n...
/** * Interposes the necessary filters before the last writer, according to the given parameters. */
Interposes the necessary filters before the last writer, according to the given parameters
createFilters
{ "repo_name": "norbertdev/mynemo", "path": "src/main/java/norbert/mynemo/dataimport/FileImporter.java", "license": "apache-2.0", "size": 8061 }
[ "com.google.common.base.Optional", "com.google.common.base.Preconditions", "norbert.mynemo.dataimport.fileformat.output.DuplicateRemover", "norbert.mynemo.dataimport.fileformat.output.MaxNeighborUserFilter", "norbert.mynemo.dataimport.fileformat.output.MaxUserFilter", "norbert.mynemo.dataimport.fileformat...
import com.google.common.base.Optional; import com.google.common.base.Preconditions; import norbert.mynemo.dataimport.fileformat.output.DuplicateRemover; import norbert.mynemo.dataimport.fileformat.output.MaxNeighborUserFilter; import norbert.mynemo.dataimport.fileformat.output.MaxUserFilter; import norbert.mynemo.data...
import com.google.common.base.*; import norbert.mynemo.dataimport.fileformat.output.*;
[ "com.google.common", "norbert.mynemo.dataimport" ]
com.google.common; norbert.mynemo.dataimport;
1,632,030
@DesignerProperty(editorType = PropertyTypeConstants.PROPERTY_TYPE_BOOLEAN, defaultValue = "False") @SimpleProperty public void ReleasedEventEnabled(boolean enabled) { releasedEventEnabled = enabled; }
@DesignerProperty(editorType = PropertyTypeConstants.PROPERTY_TYPE_BOOLEAN, defaultValue = "False") void function(boolean enabled) { releasedEventEnabled = enabled; }
/** * Specifies whether the Released event should fire when the touch sensor is * released. */
Specifies whether the Released event should fire when the touch sensor is released
ReleasedEventEnabled
{ "repo_name": "afmckinney/appinventor-sources", "path": "appinventor/components/src/com/google/appinventor/components/runtime/Ev3TouchSensor.java", "license": "apache-2.0", "size": 6044 }
[ "com.google.appinventor.components.annotations.DesignerProperty", "com.google.appinventor.components.common.PropertyTypeConstants" ]
import com.google.appinventor.components.annotations.DesignerProperty; import com.google.appinventor.components.common.PropertyTypeConstants;
import com.google.appinventor.components.annotations.*; import com.google.appinventor.components.common.*;
[ "com.google.appinventor" ]
com.google.appinventor;
826,390
public PaillierInteger fakeEncrypt (BigInteger plaintext) { return new PaillierInteger (g.modPow(plaintext, nsquare), this.nsquare); }
PaillierInteger function (BigInteger plaintext) { return new PaillierInteger (g.modPow(plaintext, nsquare), this.nsquare); }
/** Fakes the encryption of an integer * @param plaintext plaintext integer * @return cyphertext */
Fakes the encryption of an integer
fakeEncrypt
{ "repo_name": "heniancheng/FRODO", "path": "src/frodo2/algorithms/mpc_discsp/PaillierPublicKey.java", "license": "agpl-3.0", "size": 3343 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
1,686,710
private String getReplicaInfo(BlockInfo storedBlock) { if (!(showLocations || showRacks || showReplicaDetails || showUpgradeDomains)) { return ""; } final boolean isComplete = storedBlock.isComplete(); Iterator<DatanodeStorageInfo> storagesItr; StringBuilder sb = new StringBuilder(" ...
String function(BlockInfo storedBlock) { if (!(showLocations showRacks showReplicaDetails showUpgradeDomains)) { return STR [STRblk_STR:STR(ud=STR)STR(STRDECOMMISSIONED)STRDECOMMISSIONING)STRENTERING MAINTENANCE)STRIN MAINTENANCE)STRCORRUPT)STREXCESS)STRSTALE_NODE)STRSTALE_BLOCK_CONTENT)STRLIVE)STR, "); } } sb.append('...
/** * Display info of each replica for replication block. * For striped block group, display info of each internal block. */
Display info of each replica for replication block. For striped block group, display info of each internal block
getReplicaInfo
{ "repo_name": "plusplusjiajia/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java", "license": "apache-2.0", "size": 56834 }
[ "org.apache.hadoop.hdfs.server.blockmanagement.BlockInfo" ]
import org.apache.hadoop.hdfs.server.blockmanagement.BlockInfo;
import org.apache.hadoop.hdfs.server.blockmanagement.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
757,405
private void renderAnimations() { Keyframe kf0, kf1; // Set up animator for disappearing. kf0 = Keyframe.ofFloat(0f, 1f); kf1 = Keyframe.ofFloat(1f, 0.8f); PropertyValuesHolder radius = PropertyValuesHolder.ofKeyframe( "animationRadiusMultiplier", kf0, kf1); ...
void function() { Keyframe kf0, kf1; kf0 = Keyframe.ofFloat(0f, 1f); kf1 = Keyframe.ofFloat(1f, 0.8f); PropertyValuesHolder radius = PropertyValuesHolder.ofKeyframe( STR, kf0, kf1); kf0 = Keyframe.ofFloat(0f, 1f); kf1 = Keyframe.ofFloat(1f, 0f); PropertyValuesHolder fade = PropertyValuesHolder.ofKeyframe("alpha", kf0, ...
/** * Render the animations for appearing and disappearing. */
Render the animations for appearing and disappearing
renderAnimations
{ "repo_name": "0359xiaodong/HoloEverywhere", "path": "library/src/org/holoeverywhere/widget/datetimepicker/time/RadialTextsView.java", "license": "mit", "size": 15092 }
[ "com.nineoldandroids.animation.Keyframe", "com.nineoldandroids.animation.ObjectAnimator", "com.nineoldandroids.animation.PropertyValuesHolder" ]
import com.nineoldandroids.animation.Keyframe; import com.nineoldandroids.animation.ObjectAnimator; import com.nineoldandroids.animation.PropertyValuesHolder;
import com.nineoldandroids.animation.*;
[ "com.nineoldandroids.animation" ]
com.nineoldandroids.animation;
330,792
public static long addCompletedDownload(File file) { String title = file.getName(); String path = file.getPath(); long length = file.length(); return DownloadUtils.addCompletedDownload( title, title, getImageMimeType(file), path, length, null, null); }
static long function(File file) { String title = file.getName(); String path = file.getPath(); long length = file.length(); return DownloadUtils.addCompletedDownload( title, title, getImageMimeType(file), path, length, null, null); }
/** * This is a pass through to the {@link AndroidDownloadManager} function of the same name. * @param file The File corresponding to the download. * @return the download ID of this item as assigned by the download manager. */
This is a pass through to the <code>AndroidDownloadManager</code> function of the same name
addCompletedDownload
{ "repo_name": "chromium/chromium", "path": "components/browser_ui/share/android/java/src/org/chromium/components/browser_ui/share/ShareImageFileUtils.java", "license": "bsd-3-clause", "size": 23375 }
[ "java.io.File", "org.chromium.components.browser_ui.util.DownloadUtils" ]
import java.io.File; import org.chromium.components.browser_ui.util.DownloadUtils;
import java.io.*; import org.chromium.components.browser_ui.util.*;
[ "java.io", "org.chromium.components" ]
java.io; org.chromium.components;
371,549
public static NativeDaemonEvent parseRawEvent(String rawEvent, FileDescriptor[] fdList) { final String[] parsed = rawEvent.split(" "); if (parsed.length < 2) { throw new IllegalArgumentException("Insufficient arguments"); } int skiplength = 0; final int code; ...
static NativeDaemonEvent function(String rawEvent, FileDescriptor[] fdList) { final String[] parsed = rawEvent.split(" "); if (parsed.length < 2) { throw new IllegalArgumentException(STR); } int skiplength = 0; final int code; try { code = Integer.parseInt(parsed[0]); skiplength = parsed[0].length() + 1; } catch (Numbe...
/** * Parse the given raw event into {@link NativeDaemonEvent} instance. * * @throws IllegalArgumentException when line doesn't match format expected * from native side. */
Parse the given raw event into <code>NativeDaemonEvent</code> instance
parseRawEvent
{ "repo_name": "xorware/android_frameworks_base", "path": "services/core/java/com/android/server/NativeDaemonEvent.java", "license": "apache-2.0", "size": 8615 }
[ "java.io.FileDescriptor" ]
import java.io.FileDescriptor;
import java.io.*;
[ "java.io" ]
java.io;
1,977,572
private void writeAttribute(java.lang.String namespace,java.lang.String attName, java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{ if (namespace.equals("")) { x...
void function(java.lang.String namespace,java.lang.String attName, java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{ if (namespace.equals("")) { xmlWriter.writeAttribute(attName,attValue); } else { registerPrefix(xmlWriter, namespace); xmlWriter.writeAttri...
/** * Util method to write an attribute without the ns prefix */
Util method to write an attribute without the ns prefix
writeAttribute
{ "repo_name": "sandamal/wso2-axis2", "path": "modules/adb/src/org/apache/axis2/databinding/types/soapencoding/NMTOKEN.java", "license": "apache-2.0", "size": 21097 }
[ "javax.xml.stream.XMLStreamWriter" ]
import javax.xml.stream.XMLStreamWriter;
import javax.xml.stream.*;
[ "javax.xml" ]
javax.xml;
995,663
public void logStatistics() { LOG.info("Transaction Statistics: write pointer = " + lastWritePointer + ", invalid = " + invalid.size() + ", in progress = " + inProgress.size() + ", committing = " + committingChangeSets.size() + ", committed = " + committ...
void function() { LOG.info(STR + lastWritePointer + STR + invalid.size() + STR + inProgress.size() + STR + committingChangeSets.size() + STR + committedChangeSets.size()); } private abstract static class DaemonThreadExecutor extends Thread { private AtomicBoolean stopped = new AtomicBoolean(false); public DaemonThreadE...
/** * Called from the tx service every 10 seconds. * This hack is needed because current metrics system is not flexible when it comes to adding new metrics. */
Called from the tx service every 10 seconds. This hack is needed because current metrics system is not flexible when it comes to adding new metrics
logStatistics
{ "repo_name": "StackVista/tephra", "path": "tephra-core/src/main/java/co/cask/tephra/TransactionManager.java", "license": "apache-2.0", "size": 40790 }
[ "java.util.concurrent.atomic.AtomicBoolean" ]
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.*;
[ "java.util" ]
java.util;
1,056,497
public boolean isLocked() { return getSplitterState(false).locked; } public interface SplitterClickListener extends ConnectorEventListener { public static final Method clickMethod = ReflectTools.findMethod( SplitterClickListener.class, "splitterClick", ...
boolean function() { return getSplitterState(false).locked; } public interface SplitterClickListener extends ConnectorEventListener { public static final Method clickMethod = ReflectTools.findMethod( SplitterClickListener.class, STR, SplitterClickEvent.class);
/** * Is the SplitPanel handle locked (user not allowed to change split * position by dragging). * * @return <code>true</code> if locked, <code>false</code> otherwise. */
Is the SplitPanel handle locked (user not allowed to change split position by dragging)
isLocked
{ "repo_name": "carrchang/vaadin", "path": "server/src/com/vaadin/ui/AbstractSplitPanel.java", "license": "apache-2.0", "size": 25264 }
[ "com.vaadin.event.ConnectorEventListener", "com.vaadin.util.ReflectTools", "java.lang.reflect.Method" ]
import com.vaadin.event.ConnectorEventListener; import com.vaadin.util.ReflectTools; import java.lang.reflect.Method;
import com.vaadin.event.*; import com.vaadin.util.*; import java.lang.reflect.*;
[ "com.vaadin.event", "com.vaadin.util", "java.lang" ]
com.vaadin.event; com.vaadin.util; java.lang;
1,476,718
public static boolean isConfigurationCandidate(AnnotationMetadata metadata) { return (isFullConfigurationCandidate(metadata) || isLiteConfigurationCandidate(metadata)); }
static boolean function(AnnotationMetadata metadata) { return (isFullConfigurationCandidate(metadata) isLiteConfigurationCandidate(metadata)); }
/** * Check the given metadata for a configuration class candidate * (or nested component class declared within a configuration/component class). * @param metadata the metadata of the annotated class * @return {@code true} if the given class is to be registered as a * reflection-detected bean definition; {@co...
Check the given metadata for a configuration class candidate (or nested component class declared within a configuration/component class)
isConfigurationCandidate
{ "repo_name": "boggad/jdk9-sample", "path": "sample-catalog/src/main/spring.context/org/springframework/context/annotation/ConfigurationClassUtils.java", "license": "mit", "size": 8288 }
[ "org.springframework.core.type.AnnotationMetadata" ]
import org.springframework.core.type.AnnotationMetadata;
import org.springframework.core.type.*;
[ "org.springframework.core" ]
org.springframework.core;
88,595
public void setThumbColor(int thumbColor, int indicatorColor) { mThumb.setColorStateList(ColorStateList.valueOf(thumbColor)); mIndicator.setColors(indicatorColor, thumbColor); }
void function(int thumbColor, int indicatorColor) { mThumb.setColorStateList(ColorStateList.valueOf(thumbColor)); mIndicator.setColors(indicatorColor, thumbColor); }
/** * Sets the color of the seek thumb, as well as the color of the popup indicator. * * @param thumbColor The color the seek thumb will be changed to * @param indicatorColor The color the popup indicator will be changed to * The indicator will animate from thumbColor ...
Sets the color of the seek thumb, as well as the color of the popup indicator
setThumbColor
{ "repo_name": "DangHoach/Camera2Video", "path": "Application/src/main/java/com/example/android/camera2video/DiscreteSeekBar.java", "license": "apache-2.0", "size": 36259 }
[ "android.content.res.ColorStateList" ]
import android.content.res.ColorStateList;
import android.content.res.*;
[ "android.content" ]
android.content;
1,760,575
private File getCacheDir() { // Get the root cache dir File cacheDir = new File(configuration.getOptimizerCacheDir()); if (!cacheDir.exists()) { cacheDir.mkdir(); } // Get the directory that represent the host directory // return FootprintGenerator.footprint(getMandatory(P_ROX_URL)); File roxCacheD...
File function() { File cacheDir = new File(configuration.getOptimizerCacheDir()); if (!cacheDir.exists()) { cacheDir.mkdir(); } File roxCacheDir = new File(cacheDir, configuration.getServerConfiguration().getBaseUrlFootprint()); if (!roxCacheDir.exists()) { roxCacheDir.mkdirs(); } return roxCacheDir; }
/** * Get the cache directory. if not exist, it is created and returned. * * @return The cache base directory */
Get the cache directory. if not exist, it is created and returned
getCacheDir
{ "repo_name": "lotaris/rox-client-java", "path": "rox-client-java/src/main/java/com/lotaris/rox/core/cache/CacheOptimizerStore.java", "license": "mit", "size": 6463 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,237,871
@Override public void setRangeZoomable(boolean flag) { if (flag) { Plot plot = this.chart.getPlot(); if (plot instanceof Zoomable) { Zoomable z = (Zoomable) plot; this.rangeZoomable = flag && (z.isRangeZoomable()); } } else { this.rangeZoomable = false; } }
void function(boolean flag) { if (flag) { Plot plot = this.chart.getPlot(); if (plot instanceof Zoomable) { Zoomable z = (Zoomable) plot; this.rangeZoomable = flag && (z.isRangeZoomable()); } } else { this.rangeZoomable = false; } }
/** * A flag that controls mouse-based zooming on the vertical axis. * * @param flag * <code>true</code> enables zooming. */
A flag that controls mouse-based zooming on the vertical axis
setRangeZoomable
{ "repo_name": "aborg0/RapidMiner-Unuk", "path": "src/com/rapidminer/gui/plotter/charts/AbstractChartPanel.java", "license": "agpl-3.0", "size": 82675 }
[ "org.jfree.chart.plot.Plot", "org.jfree.chart.plot.Zoomable" ]
import org.jfree.chart.plot.Plot; import org.jfree.chart.plot.Zoomable;
import org.jfree.chart.plot.*;
[ "org.jfree.chart" ]
org.jfree.chart;
808,463
public Drawable getBadgeDrawable() { return mBadgeView.getDrawable(); }
Drawable function() { return mBadgeView.getDrawable(); }
/** * Returns the badge drawable. */
Returns the badge drawable
getBadgeDrawable
{ "repo_name": "kingargyle/adt-leanback-support", "path": "leanback-v17/src/main/java/android/support/v17/leanback/widget/TitleView.java", "license": "apache-2.0", "size": 3653 }
[ "android.graphics.drawable.Drawable" ]
import android.graphics.drawable.Drawable;
import android.graphics.drawable.*;
[ "android.graphics" ]
android.graphics;
2,441,905
public static void copy(Reader reader, boolean closeIn, Appendable out) throws IOException { try { CharBuffer buffer = CharBuffer.allocate(4096); while (reader.read(buffer) > 0) { buffer.flip(); buffer.rewind(); out.append(buffer); ...
static void function(Reader reader, boolean closeIn, Appendable out) throws IOException { try { CharBuffer buffer = CharBuffer.allocate(4096); while (reader.read(buffer) > 0) { buffer.flip(); buffer.rewind(); out.append(buffer); } } finally { if (closeIn) IOUtils.closeQuietly(reader); } }
/** Copy a Reader to an Appendable, optionally closing the input. * * @param reader the Reader to copy from * @param closeIn whether to close the input when the copy is done * @param out the Appendable to copy to * @throws IOException if an error occurs */
Copy a Reader to an Appendable, optionally closing the input
copy
{ "repo_name": "yuri0x7c1/ofbiz-explorer", "path": "src/test/resources/apache-ofbiz-16.11.03/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilIO.java", "license": "apache-2.0", "size": 12703 }
[ "java.io.IOException", "java.io.Reader", "java.nio.CharBuffer", "org.apache.commons.io.IOUtils" ]
import java.io.IOException; import java.io.Reader; import java.nio.CharBuffer; import org.apache.commons.io.IOUtils;
import java.io.*; import java.nio.*; import org.apache.commons.io.*;
[ "java.io", "java.nio", "org.apache.commons" ]
java.io; java.nio; org.apache.commons;
1,923,516
void storeAggregatedPartitionClassStorageStats( AggregatedPartitionClassStorageStats aggregatedPartitionClassStorageStats) throws Exception;
void storeAggregatedPartitionClassStorageStats( AggregatedPartitionClassStorageStats aggregatedPartitionClassStorageStats) throws Exception;
/** * Store the aggregated partition class storage stats in the {@link AggregatedPartitionClassStorageStats}. * @param aggregatedPartitionClassStorageStats The {@link AggregatedPartitionClassStorageStats} that contains aggregated * partition class container storage s...
Store the aggregated partition class storage stats in the <code>AggregatedPartitionClassStorageStats</code>
storeAggregatedPartitionClassStorageStats
{ "repo_name": "linkedin/ambry", "path": "ambry-api/src/main/java/com/github/ambry/accountstats/AccountStatsStore.java", "license": "apache-2.0", "size": 7693 }
[ "com.github.ambry.server.storagestats.AggregatedPartitionClassStorageStats" ]
import com.github.ambry.server.storagestats.AggregatedPartitionClassStorageStats;
import com.github.ambry.server.storagestats.*;
[ "com.github.ambry" ]
com.github.ambry;
2,769,753
public void enqueueOutboundBlock(TcpClDataBlock block) throws InterruptedException { if (GeneralManagement.isDebugLogging()) { _logger.finer("enqueueOutboundBlock"); } _initiatorStateMachine.enqueueOutboundBlock(block); if (GeneralManagement.isDebugLogging()) { _logger.finer("enqueueOutboundBlock DON...
void function(TcpClDataBlock block) throws InterruptedException { if (GeneralManagement.isDebugLogging()) { _logger.finer(STR); } _initiatorStateMachine.enqueueOutboundBlock(block); if (GeneralManagement.isDebugLogging()) { _logger.finer(STR); } }
/** * Request from upper layer to transmit given Data Block * @param block Given Data Block * @throws InterruptedException if interrupted waiting for queue space */
Request from upper layer to transmit given Data Block
enqueueOutboundBlock
{ "repo_name": "KritikalFabric/corefabric.io", "path": "src/contrib/java/com/cisco/qte/jdtn/tcpcl/TcpClNeighbor.java", "license": "apache-2.0", "size": 21509 }
[ "com.cisco.qte.jdtn.general.GeneralManagement" ]
import com.cisco.qte.jdtn.general.GeneralManagement;
import com.cisco.qte.jdtn.general.*;
[ "com.cisco.qte" ]
com.cisco.qte;
1,621,429
Observable<WorkflowTrigger> listAsync(final String resourceGroupName, final String workflowName);
Observable<WorkflowTrigger> listAsync(final String resourceGroupName, final String workflowName);
/** * Gets a list of workflow triggers. * * @param resourceGroupName The resource group name. * @param workflowName The workflow name. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
Gets a list of workflow triggers
listAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/WorkflowTriggers.java", "license": "mit", "size": 3814 }
[ "com.microsoft.azure.management.logic.v2018_07_01_preview.WorkflowTrigger" ]
import com.microsoft.azure.management.logic.v2018_07_01_preview.WorkflowTrigger;
import com.microsoft.azure.management.logic.v2018_07_01_preview.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
1,439,482
byte[] generateDirectMethodHandleHolderClassBytes(String className, MethodType[] methodTypes, int[] types);
byte[] generateDirectMethodHandleHolderClassBytes(String className, MethodType[] methodTypes, int[] types);
/** * Returns a {@code byte[]} containing the bytecode for a class implementing * DirectMethodHandle of each pairwise combination of {@code MethodType} and * an {@code int} representing method type. Used by * GenerateJLIClassesPlugin to generate such a class during the jlink phase. */
Returns a byte[] containing the bytecode for a class implementing DirectMethodHandle of each pairwise combination of MethodType and an int representing method type. Used by GenerateJLIClassesPlugin to generate such a class during the jlink phase
generateDirectMethodHandleHolderClassBytes
{ "repo_name": "FauxFaux/jdk9-jdk", "path": "src/java.base/share/classes/jdk/internal/misc/JavaLangInvokeAccess.java", "license": "gpl-2.0", "size": 3287 }
[ "java.lang.invoke.MethodType" ]
import java.lang.invoke.MethodType;
import java.lang.invoke.*;
[ "java.lang" ]
java.lang;
2,075,855
private void getPublicRepComments( final HttpServletRequest request, final HttpServletResponse response ) throws IOException { final String sha1 = request.getParameter( PARAM_SHA1 ); final Integer offset = request.getParameter( PARAM_OFFSET ) == null ? 0 : getIntParam( request, PARAM_OFFSET ); final...
void function( final HttpServletRequest request, final HttpServletResponse response ) throws IOException { final String sha1 = request.getParameter( PARAM_SHA1 ); final Integer offset = request.getParameter( PARAM_OFFSET ) == null ? 0 : getIntParam( request, PARAM_OFFSET ); final Integer limit = request.getParameter( P...
/** * Returns public comments of a replay. * * <p> * Example GET url:<br> * https://sciigears.appspot.com/info?protVer=1&op=getPubRepCom&sha1=fc9f84e5caac72ed8899483508809632b07f5d57&offset=0&limit=10&tzone=Europe%2fBudapest * </p> */
Returns public comments of a replay. Example GET url: HREF
getPublicRepComments
{ "repo_name": "icza/sc2gears", "path": "src-sc2gearsdb/hu/belicza/andras/sc2gearsdb/InfoServlet.java", "license": "apache-2.0", "size": 26806 }
[ "hu.belicza.andras.sc2gearsdb.datastore.RepComment", "hu.belicza.andras.sc2gearsdb.util.JQBuilder", "hu.belicza.andras.sc2gearsdb.util.PMF", "hu.belicza.andras.sc2gearsdb.util.ServerUtils", "java.io.IOException", "java.io.PrintWriter", "java.text.DateFormat", "java.util.List", "java.util.TimeZone", ...
import hu.belicza.andras.sc2gearsdb.datastore.RepComment; import hu.belicza.andras.sc2gearsdb.util.JQBuilder; import hu.belicza.andras.sc2gearsdb.util.PMF; import hu.belicza.andras.sc2gearsdb.util.ServerUtils; import java.io.IOException; import java.io.PrintWriter; import java.text.DateFormat; import java.util.List; im...
import hu.belicza.andras.sc2gearsdb.datastore.*; import hu.belicza.andras.sc2gearsdb.util.*; import java.io.*; import java.text.*; import java.util.*; import javax.jdo.*; import javax.servlet.http.*;
[ "hu.belicza.andras", "java.io", "java.text", "java.util", "javax.jdo", "javax.servlet" ]
hu.belicza.andras; java.io; java.text; java.util; javax.jdo; javax.servlet;
525,813
public ClusterInfo getClusterInfo(String clusterName) throws KeeperException { List<String> clusters = ZKUtil.listChildrenNoWatch(this.zkw, this.clustersZNode); if (clusters != null) { for (String cluster : clusters) { if (cluster.equals(clusterName)) { String address = Bytes ...
ClusterInfo function(String clusterName) throws KeeperException { List<String> clusters = ZKUtil.listChildrenNoWatch(this.zkw, this.clustersZNode); if (clusters != null) { for (String cluster : clusters) { if (cluster.equals(clusterName)) { String address = Bytes .toString(ZKUtil.getData(this.zkw, getClusterAddressZNod...
/** * Returns the clusterInfo for the given clusterName * @param clusterName * @return * @throws KeeperException */
Returns the clusterInfo for the given clusterName
getClusterInfo
{ "repo_name": "intel-hadoop/CSBT", "path": "csbt-client/src/main/java/org/apache/hadoop/hbase/crosssite/CrossSiteZNodes.java", "license": "apache-2.0", "size": 33331 }
[ "java.util.List", "java.util.Set", "java.util.TreeSet", "org.apache.hadoop.hbase.util.Bytes", "org.apache.hadoop.hbase.zookeeper.ZKUtil", "org.apache.zookeeper.KeeperException" ]
import java.util.List; import java.util.Set; import java.util.TreeSet; import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.hbase.zookeeper.ZKUtil; import org.apache.zookeeper.KeeperException;
import java.util.*; import org.apache.hadoop.hbase.util.*; import org.apache.hadoop.hbase.zookeeper.*; import org.apache.zookeeper.*;
[ "java.util", "org.apache.hadoop", "org.apache.zookeeper" ]
java.util; org.apache.hadoop; org.apache.zookeeper;
144,280
public Application[] getApplicationsByTier(String tier) throws APIManagementException { if (tier == null) { return null; } Connection connection = null; PreparedStatement prepStmt = null; ResultSet rs = null; Application[] applications = null; Str...
Application[] function(String tier) throws APIManagementException { if (tier == null) { return null; } Connection connection = null; PreparedStatement prepStmt = null; ResultSet rs = null; Application[] applications = null; String sqlQuery = SQLConstants.GET_APPLICATION_BY_TIER_SQL; try { connection = APIMgtDBUtil.getC...
/** * Get all applications associated with given tier * * @param tier String tier name * @return Application object array associated with tier * @throws APIManagementException on error in getting applications array */
Get all applications associated with given tier
getApplicationsByTier
{ "repo_name": "charithag/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/ApiMgtDAO.java", "license": "apache-2.0", "size": 345861 }
[ "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.ResultSet", "java.util.ArrayList", "org.wso2.carbon.apimgt.api.APIManagementException", "org.wso2.carbon.apimgt.api.model.Application", "org.wso2.carbon.apimgt.impl.dao.constants.SQLConstants", "org.wso2.carbon.apimgt.impl.utils.APIMgtDBUt...
import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.ArrayList; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.api.model.Application; import org.wso2.carbon.apimgt.impl.dao.constants.SQLConstants; import org.wso2.carbon.apimg...
import java.sql.*; import java.util.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.api.model.*; import org.wso2.carbon.apimgt.impl.dao.constants.*; import org.wso2.carbon.apimgt.impl.utils.*;
[ "java.sql", "java.util", "org.wso2.carbon" ]
java.sql; java.util; org.wso2.carbon;
2,010,650
// Naming in faces-config.xml Refresh jsp- "refresh" , Notification jsp- "noti" , tab cutomization jsp- "tab" // ///////////////////////////////////// PROCESS ACTION /////////////////////////////////////////// public String processActionAdd() { LOG.debug("processActionAdd()"); tabUpdated = false; // reset suc...
String function() { LOG.debug(STR); tabUpdated = false; String[] values = getSelectedExcludeItems(); if (values.length < 1) { FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(msgs.getString(STR))); return m_TabOutcome; } for (int i = 0; i < values.length; i++) { String value = values[i]; getPrefOrder...
/** * Process the add command from the edit view. * * @return navigation outcome to tab customization page (edit) */
Process the add command from the edit view
processActionAdd
{ "repo_name": "eemirtekin/Sakai-10.6-TR", "path": "user/user-tool-prefs/tool/src/java/org/sakaiproject/user/tool/UserPrefsTool.java", "license": "apache-2.0", "size": 84800 }
[ "javax.faces.application.FacesMessage", "javax.faces.context.FacesContext" ]
import javax.faces.application.FacesMessage; import javax.faces.context.FacesContext;
import javax.faces.application.*; import javax.faces.context.*;
[ "javax.faces" ]
javax.faces;
2,795,517
public SecretBundle setSecret(String vaultBaseUrl, String secretName, String value) { return setSecretWithServiceResponseAsync(vaultBaseUrl, secretName, value).toBlocking().single().body(); }
SecretBundle function(String vaultBaseUrl, String secretName, String value) { return setSecretWithServiceResponseAsync(vaultBaseUrl, secretName, value).toBlocking().single().body(); }
/** * Sets a secret in a specified key vault. * The SET operation adds a secret to the Azure Key Vault. If the named secret already exists, Azure Key Vault creates a new version of that secret. This operation requires the secrets/set permission. * * @param vaultBaseUrl The vault name, for example ht...
Sets a secret in a specified key vault. The SET operation adds a secret to the Azure Key Vault. If the named secret already exists, Azure Key Vault creates a new version of that secret. This operation requires the secrets/set permission
setSecret
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/keyvault/microsoft-azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java", "license": "mit", "size": 884227 }
[ "com.microsoft.azure.keyvault.models.SecretBundle" ]
import com.microsoft.azure.keyvault.models.SecretBundle;
import com.microsoft.azure.keyvault.models.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
1,553,043
public DocumentType getDoctype() { if (needsSyncChildren()) { synchronizeChildren(); } return docType; }
DocumentType function() { if (needsSyncChildren()) { synchronizeChildren(); } return docType; }
/** * For XML, this provides access to the Document Type Definition. * For HTML documents, and XML documents which don't specify a DTD, * it will be null. */
For XML, this provides access to the Document Type Definition. For HTML documents, and XML documents which don't specify a DTD, it will be null
getDoctype
{ "repo_name": "openjdk/jdk8u", "path": "jaxp/src/com/sun/org/apache/xerces/internal/dom/CoreDocumentImpl.java", "license": "gpl-2.0", "size": 105220 }
[ "org.w3c.dom.DocumentType" ]
import org.w3c.dom.DocumentType;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
1,147,728
public static int getOutputImageWidth(@NonNull Intent intent) { return intent.getIntExtra(EXTRA_OUTPUT_IMAGE_WIDTH, -1); }
static int function(@NonNull Intent intent) { return intent.getIntExtra(EXTRA_OUTPUT_IMAGE_WIDTH, -1); }
/** * Retrieve the width of the cropped image * * @param intent crop result intent */
Retrieve the width of the cropped image
getOutputImageWidth
{ "repo_name": "gaojianyang/only", "path": "Only/ucrop/src/main/java/com/yalantis/ucrop/UCrop.java", "license": "gpl-3.0", "size": 20781 }
[ "android.content.Intent", "android.support.annotation.NonNull" ]
import android.content.Intent; import android.support.annotation.NonNull;
import android.content.*; import android.support.annotation.*;
[ "android.content", "android.support" ]
android.content; android.support;
1,992,107
public void setBackgroundBaseColor(String backgroundBaseColor) { try { this.backgroundBaseColor = Color.parseColor(backgroundBaseColor); } catch (IllegalArgumentException e) { e.printStackTrace(); } invalidate(); }
void function(String backgroundBaseColor) { try { this.backgroundBaseColor = Color.parseColor(backgroundBaseColor); } catch (IllegalArgumentException e) { e.printStackTrace(); } invalidate(); }
/** * Sets the background color for this contributions view. * * @param backgroundBaseColor * the color of the background */
Sets the background color for this contributions view
setBackgroundBaseColor
{ "repo_name": "k0shk0sh/FastHub", "path": "app/src/main/java/com/fastaccess/ui/widgets/contributions/GitHubContributionsView.java", "license": "gpl-3.0", "size": 13583 }
[ "android.graphics.Color" ]
import android.graphics.Color;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
1,764,049
private void generateSingleMLBytecodeCompilation( Map<Path, ImmutableSortedSet<BuildRule>> sourceToRule, ImmutableList.Builder<SourcePath> cmoFiles, Path mlSource, ImmutableMap<Path, ImmutableList<Path>> sources, ImmutableList<Path> cycleDetector) { ImmutableList<Path> newCycleDetec...
void function( Map<Path, ImmutableSortedSet<BuildRule>> sourceToRule, ImmutableList.Builder<SourcePath> cmoFiles, Path mlSource, ImmutableMap<Path, ImmutableList<Path>> sources, ImmutableList<Path> cycleDetector) { ImmutableList<Path> newCycleDetector = ImmutableList.<Path>builder() .addAll(cycleDetector) .add(mlSource...
/** * Compiles a single .ml file to a .cmo */
Compiles a single .ml file to a .cmo
generateSingleMLBytecodeCompilation
{ "repo_name": "raviagarwal7/buck", "path": "src/com/facebook/buck/ocaml/OCamlBuildRulesGenerator.java", "license": "apache-2.0", "size": 22482 }
[ "com.facebook.buck.model.BuildTarget", "com.facebook.buck.rules.BuildRule", "com.facebook.buck.rules.BuildRuleParams", "com.facebook.buck.rules.BuildTargetSourcePath", "com.facebook.buck.rules.SourcePath", "com.facebook.buck.util.HumanReadableException", "com.google.common.base.Joiner", "com.google.co...
import com.facebook.buck.model.BuildTarget; import com.facebook.buck.rules.BuildRule; import com.facebook.buck.rules.BuildRuleParams; import com.facebook.buck.rules.BuildTargetSourcePath; import com.facebook.buck.rules.SourcePath; import com.facebook.buck.util.HumanReadableException; import com.google.common.base.Joine...
import com.facebook.buck.model.*; import com.facebook.buck.rules.*; import com.facebook.buck.util.*; import com.google.common.base.*; import com.google.common.collect.*; import java.nio.file.*; import java.util.*;
[ "com.facebook.buck", "com.google.common", "java.nio", "java.util" ]
com.facebook.buck; com.google.common; java.nio; java.util;
877,315
@Test public void testSetGroupIdOnNewMessage() throws Exception { String groupId = "testValue"; AmqpJmsMessageFacade amqpMessageFacade = createNewMessageFacade(); amqpMessageFacade.setGroupId(groupId); assertNotNull("properties section was not created", amqpMessageFacade.getAmq...
void function() throws Exception { String groupId = STR; AmqpJmsMessageFacade amqpMessageFacade = createNewMessageFacade(); amqpMessageFacade.setGroupId(groupId); assertNotNull(STR, amqpMessageFacade.getAmqpMessage().getProperties()); assertEquals(STR, groupId, amqpMessageFacade.getAmqpMessage().getProperties().getGrou...
/** * Check that setting GroupId on the message causes creation of the underlying properties * section with the expected value. New messages lack the properties section section, * as tested by {@link #testNewMessageHasNoUnderlyingPropertiesSection()}. */
Check that setting GroupId on the message causes creation of the underlying properties section with the expected value. New messages lack the properties section section, as tested by <code>#testNewMessageHasNoUnderlyingPropertiesSection()</code>
testSetGroupIdOnNewMessage
{ "repo_name": "avranju/qpid-jms", "path": "qpid-jms-client/src/test/java/org/apache/qpid/jms/provider/amqp/message/AmqpJmsMessageFacadeTest.java", "license": "apache-2.0", "size": 79428 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,384,876
public Facets facets() { return internalResponse.facets(); }
Facets function() { return internalResponse.facets(); }
/** * The search facets. */
The search facets
facets
{ "repo_name": "chanil1218/elasticsearch", "path": "src/main/java/org/elasticsearch/action/search/SearchResponse.java", "license": "apache-2.0", "size": 10403 }
[ "org.elasticsearch.search.facet.Facets" ]
import org.elasticsearch.search.facet.Facets;
import org.elasticsearch.search.facet.*;
[ "org.elasticsearch.search" ]
org.elasticsearch.search;
1,634,031
public boolean containsKey(MethodBinding key) { int index = hashCode(key); while (keyTable[index] != null) { if (equalsForNameAndType(keyTable[index], key)) return true; index = (index + 1) % keyTable.length; } return false; }
boolean function(MethodBinding key) { int index = hashCode(key); while (keyTable[index] != null) { if (equalsForNameAndType(keyTable[index], key)) return true; index = (index + 1) % keyTable.length; } return false; }
/** Returns true if the collection contains an element for the key. * * @param key char[] the key that we are looking for * @return boolean */
Returns true if the collection contains an element for the key
containsKey
{ "repo_name": "Niky4000/UsefulUtils", "path": "projects/others/eclipse-platform-parent/eclipse.jdt.core-master/org.eclipse.jdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/codegen/MethodNameAndTypeCache.java", "license": "gpl-3.0", "size": 5019 }
[ "org.eclipse.jdt.internal.compiler.lookup.MethodBinding" ]
import org.eclipse.jdt.internal.compiler.lookup.MethodBinding;
import org.eclipse.jdt.internal.compiler.lookup.*;
[ "org.eclipse.jdt" ]
org.eclipse.jdt;
219,792
private void assertTiles(String output, String compression, int n, int m, boolean bigTiff) throws Exception { TiffWriter writer = initializeWriter(output, compression, bigTiff); int x, y; byte[] tile; long[] rowPerStrip; int w, h; IFD ifd; int count; int series = reader.get...
void function(String output, String compression, int n, int m, boolean bigTiff) throws Exception { TiffWriter writer = initializeWriter(output, compression, bigTiff); int x, y; byte[] tile; long[] rowPerStrip; int w, h; IFD ifd; int count; int series = reader.getSeriesCount(); String[][][] tileMD5s = new String[series]...
/** * Tests the writing of the tiles. * @param output The output where to write the data. * @param compression The compression to use. * @param n The value by which to divide the width of the image. * @param m The value by which to divide the height of the image. * @param bigTiff Pass <code>true</code...
Tests the writing of the tiles
assertTiles
{ "repo_name": "stelfrich/bioformats", "path": "components/test-suite/src/loci/tests/testng/TiffWriterTest.java", "license": "gpl-2.0", "size": 14003 }
[ "org.testng.AssertJUnit" ]
import org.testng.AssertJUnit;
import org.testng.*;
[ "org.testng" ]
org.testng;
342,403
@NonNull public static UpdateCenter createUpdateCenter(@CheckForNull UpdateCenterConfiguration config) { String requiredClassName = SystemProperties.getString(UpdateCenter.class.getName()+".className", null); if (requiredClassName == null) { // Use the default Update Center ...
static UpdateCenter function(@CheckForNull UpdateCenterConfiguration config) { String requiredClassName = SystemProperties.getString(UpdateCenter.class.getName()+STR, null); if (requiredClassName == null) { LOGGER.log(Level.FINE, STR); return createDefaultUpdateCenter(config); } LOGGER.log(Level.FINE, STR, requiredClas...
/** * Creates an update center. * @param config Requested configuration. May be {@code null} if defaults should be used * @return Created Update center. {@link UpdateCenter} by default, but may be overridden * @since 2.4 */
Creates an update center
createUpdateCenter
{ "repo_name": "damianszczepanik/jenkins", "path": "core/src/main/java/hudson/model/UpdateCenter.java", "license": "mit", "size": 97521 }
[ "edu.umd.cs.findbugs.annotations.CheckForNull", "java.lang.reflect.Constructor", "java.util.logging.Level" ]
import edu.umd.cs.findbugs.annotations.CheckForNull; import java.lang.reflect.Constructor; import java.util.logging.Level;
import edu.umd.cs.findbugs.annotations.*; import java.lang.reflect.*; import java.util.logging.*;
[ "edu.umd.cs", "java.lang", "java.util" ]
edu.umd.cs; java.lang; java.util;
1,112,600
public static boolean containsAllUuids(ParcelUuid[] uuidA, ParcelUuid[] uuidB) { if (uuidA == null && uuidB == null) return true; if (uuidA == null) { return uuidB.length == 0 ? true : false; } if (uuidB == null) return true; HashSet<ParcelUuid> uuidSet = new HashSet<ParcelUuid> (Arrays.asList(uuidA)...
static boolean function(ParcelUuid[] uuidA, ParcelUuid[] uuidB) { if (uuidA == null && uuidB == null) return true; if (uuidA == null) { return uuidB.length == 0 ? true : false; } if (uuidB == null) return true; HashSet<ParcelUuid> uuidSet = new HashSet<ParcelUuid> (Arrays.asList(uuidA)); for (ParcelUuid uuid: uuidB) { ...
/** * Returns true if all the ParcelUuids in ParcelUuidB are present in * ParcelUuidA * * @param uuidA - Array of ParcelUuidsA * @param uuidB - Array of ParcelUuidsB * */
Returns true if all the ParcelUuids in ParcelUuidB are present in ParcelUuidA
containsAllUuids
{ "repo_name": "shelmesky/nexfi_android_ble", "path": "underdark/src/main/java/impl/underdark/transport/bluetooth/discovery/ble/detector/BluetoothUuid.java", "license": "gpl-3.0", "size": 9873 }
[ "android.os.ParcelUuid", "java.util.Arrays", "java.util.HashSet" ]
import android.os.ParcelUuid; import java.util.Arrays; import java.util.HashSet;
import android.os.*; import java.util.*;
[ "android.os", "java.util" ]
android.os; java.util;
319,590
void login(Authentication authentication, boolean rememberMe) throws AuthenticationException, Exception;
void login(Authentication authentication, boolean rememberMe) throws AuthenticationException, Exception;
/** * Tries to login using the specified authentication object. If authentication succeeds, this method * will return without exceptions. * * @param authentication the authentication object to authenticate, must not be {@code null}. * @param rememberMe boolean to indicate if remember me authent...
Tries to login using the specified authentication object. If authentication succeeds, this method will return without exceptions
login
{ "repo_name": "zkendall/vaadin4spring", "path": "extensions/security/src/main/java/org/vaadin/spring/security/VaadinSecurity.java", "license": "apache-2.0", "size": 9007 }
[ "org.springframework.security.core.Authentication", "org.springframework.security.core.AuthenticationException" ]
import org.springframework.security.core.Authentication; import org.springframework.security.core.AuthenticationException;
import org.springframework.security.core.*;
[ "org.springframework.security" ]
org.springframework.security;
1,300,464
private void writeMetaData(final JarPackageData data, final File file, final IPath path) throws FileNotFoundException, IOException { Assert.isNotNull(data); Assert.isNotNull(file); Assert.isNotNull(path); final JarEntry entry= new JarEntry(path.toString().replace(File.separatorChar, '/')); byte[] buffer= n...
void function(final JarPackageData data, final File file, final IPath path) throws FileNotFoundException, IOException { Assert.isNotNull(data); Assert.isNotNull(file); Assert.isNotNull(path); final JarEntry entry= new JarEntry(path.toString().replace(File.separatorChar, '/')); byte[] buffer= new byte[4096]; if (data.is...
/** * Writes the meta file to the JAR file. * * @param data * the jar package data * @param file * the file containing the meta data * @param path * the path of the meta file within the archive * @throws FileNotFoundException * if the meta file could not ...
Writes the meta file to the JAR file
writeMetaData
{ "repo_name": "brunyuriy/quick-fix-scout", "path": "org.eclipse.jdt.ui_3.7.1.r371_v20110824-0800/src/org/eclipse/jdt/ui/jarpackager/JarWriter3.java", "license": "mit", "size": 16659 }
[ "java.io.BufferedInputStream", "java.io.File", "java.io.FileInputStream", "java.io.FileNotFoundException", "java.io.IOException", "java.io.InputStream", "java.util.jar.JarEntry", "java.util.zip.ZipEntry", "org.eclipse.core.runtime.Assert", "org.eclipse.core.runtime.IPath", "org.eclipse.jdt.inter...
import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.util.jar.JarEntry; import java.util.zip.ZipEntry; import org.eclipse.core.runtime.Assert; import org.eclipse.core.runtime.IPa...
import java.io.*; import java.util.jar.*; import java.util.zip.*; import org.eclipse.core.runtime.*; import org.eclipse.jdt.internal.ui.jarpackager.*;
[ "java.io", "java.util", "org.eclipse.core", "org.eclipse.jdt" ]
java.io; java.util; org.eclipse.core; org.eclipse.jdt;
634,711
public String toJVMOptions() { StringBuffer sb = new StringBuffer(); if (mVDSProps != null) { for (Iterator it = mVDSProps.iterator(); it.hasNext(); ) { NameValue nv = (NameValue) it.next(); sb.append(" -D").append(nv.getKey()).append("=").append(nv.getVa...
String function() { StringBuffer sb = new StringBuffer(); if (mVDSProps != null) { for (Iterator it = mVDSProps.iterator(); it.hasNext(); ) { NameValue nv = (NameValue) it.next(); sb.append(STR).append(nv.getKey()).append("=").append(nv.getValue()); } } for (Iterator<Object> it = mProperties.keySet().iterator(); it.has...
/** * Converts the vds properties that need to be passed to the jvm as an option. * * @return the jvm options as String. */
Converts the vds properties that need to be passed to the jvm as an option
toJVMOptions
{ "repo_name": "pegasus-isi/pegasus", "path": "src/edu/isi/pegasus/planner/classes/PlannerOptions.java", "license": "apache-2.0", "size": 50453 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,026,597
protected final Parser ref(String name) { return new Reference(name); }
final Parser function(String name) { return new Reference(name); }
/** * Returns a reference to the production with the given {@code name}. */
Returns a reference to the production with the given name
ref
{ "repo_name": "petitparser/java-petitparser", "path": "petitparser-core/src/main/java/org/petitparser/tools/GrammarDefinition.java", "license": "mit", "size": 5768 }
[ "org.petitparser.parser.Parser" ]
import org.petitparser.parser.Parser;
import org.petitparser.parser.*;
[ "org.petitparser.parser" ]
org.petitparser.parser;
2,317,902
void setScaleType(ImageView.ScaleType scaleType);
void setScaleType(ImageView.ScaleType scaleType);
/** * Controls how the image should be resized or moved to match the size of the ImageView. Any * scaling or panning will happen within the confines of this {@link * android.widget.ImageView.ScaleType}. * * @param scaleType - The desired scaling mode. */
Controls how the image should be resized or moved to match the size of the ImageView. Any scaling or panning will happen within the confines of this <code>android.widget.ImageView.ScaleType</code>
setScaleType
{ "repo_name": "Kimhuang/APICore", "path": "commonlibs/PhotoViewer/src/main/java/com/kim/PhotoViewer/IPhotoView.java", "license": "apache-2.0", "size": 11344 }
[ "android.widget.ImageView" ]
import android.widget.ImageView;
import android.widget.*;
[ "android.widget" ]
android.widget;
177,193
@Override public boolean onOwnerChanged(GridCacheEntryEx entry, GridCacheMvccCandidate owner) { if (isDone()) return false; // Check other futures. if (log.isDebugEnabled()) log.debug("Received onOwnerChanged() callback [entry=" + entry + ", owner=" + owner + "]"); ...
@Override boolean function(GridCacheEntryEx entry, GridCacheMvccCandidate owner) { if (isDone()) return false; if (log.isDebugEnabled()) log.debug(STR + entry + STR + owner + "]"); if (owner != null && owner.version().equals(lockVer)) { synchronized (this) { pendingLocks.remove(entry.key()); } if (checkLocks()) map(ent...
/** * Callback for whenever entry lock ownership changes. * * @param entry Entry whose lock ownership changed. */
Callback for whenever entry lock ownership changes
onOwnerChanged
{ "repo_name": "kromulan/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java", "license": "apache-2.0", "size": 43199 }
[ "org.apache.ignite.internal.processors.cache.GridCacheEntryEx", "org.apache.ignite.internal.processors.cache.GridCacheMvccCandidate" ]
import org.apache.ignite.internal.processors.cache.GridCacheEntryEx; import org.apache.ignite.internal.processors.cache.GridCacheMvccCandidate;
import org.apache.ignite.internal.processors.cache.*;
[ "org.apache.ignite" ]
org.apache.ignite;
1,901,737
@SuppressWarnings("unchecked") public static XmlRDParser getXmlStreamReader(Reader reader) throws JDtnException { try { String platform = System.getProperty("java.runtime.name"); Class<XmlRDParser> parserClass = null; if (platform == null || !platform.contains("Android")) { // Non-Android platfo...
@SuppressWarnings(STR) static XmlRDParser function(Reader reader) throws JDtnException { try { String platform = System.getProperty(STR); Class<XmlRDParser> parserClass = null; if (platform == null !platform.contains(STR)) { parserClass = (Class<XmlRDParser>)Class.forName( STR); } else { parserClass = (Class<XmlRDParse...
/** * Get an instance of XmlRDParser, a recursive descent XML parser. * @return Instance of XmlRDParser * @throws JDtnException encapsulates exceptions from j * avax.xml.stream.XMLInputFactory */
Get an instance of XmlRDParser, a recursive descent XML parser
getXmlStreamReader
{ "repo_name": "KritikalFabric/corefabric.io", "path": "src/contrib/java/com/cisco/qte/jdtn/general/Platform.java", "license": "apache-2.0", "size": 4238 }
[ "com.cisco.qte.jdtn.general.XmlRDParser", "com.cisco.qte.jdtn.general.XmlRdParserException", "java.io.Reader" ]
import com.cisco.qte.jdtn.general.XmlRDParser; import com.cisco.qte.jdtn.general.XmlRdParserException; import java.io.Reader;
import com.cisco.qte.jdtn.general.*; import java.io.*;
[ "com.cisco.qte", "java.io" ]
com.cisco.qte; java.io;
1,643,223
@Test(timeout=60000) public void testCompat400() throws Exception { File journalDir = createTempDir("bookie", "journal"); File ledgerDir = createTempDir("bookie", "ledger"); int port = PortManager.nextFreePort(); // start server, upgrade Server400 s400 = new Server400(jo...
@Test(timeout=60000) void function() throws Exception { File journalDir = createTempDir(STR, STR); File ledgerDir = createTempDir(STR, STR); int port = PortManager.nextFreePort(); Server400 s400 = new Server400(journalDir, ledgerDir, port); s400.start(); Ledger400 l400 = Ledger400.newLedger(); l400.write100(); long old...
/** * Test compatability between version 4.0.0 and the current version. * Incompatabilities are: * - Current client will not be able to talk to 4.0.0 server. * - 4.0.0 client will not be able to fence ledgers on current server. * - Current server won't start with 4.0.0 server directories wit...
Test compatability between version 4.0.0 and the current version. Incompatabilities are: - Current client will not be able to talk to 4.0.0 server. - 4.0.0 client will not be able to fence ledgers on current server. - Current server won't start with 4.0.0 server directories without upgrade
testCompat400
{ "repo_name": "robindh/bookkeeper", "path": "bookkeeper-server/src/test/java/org/apache/bookkeeper/test/TestBackwardCompat.java", "license": "apache-2.0", "size": 29310 }
[ "java.io.File", "org.apache.bookkeeper.bookie.FileSystemUpgrade", "org.junit.Assert", "org.junit.Test" ]
import java.io.File; import org.apache.bookkeeper.bookie.FileSystemUpgrade; import org.junit.Assert; import org.junit.Test;
import java.io.*; import org.apache.bookkeeper.bookie.*; import org.junit.*;
[ "java.io", "org.apache.bookkeeper", "org.junit" ]
java.io; org.apache.bookkeeper; org.junit;
629,634
public final IBreadCrumbModel getBreadCrumbModel() { return breadCrumbModel; }
final IBreadCrumbModel function() { return breadCrumbModel; }
/** * Gets the bread crumb panel. * * @return The bread crumb panel */
Gets the bread crumb panel
getBreadCrumbModel
{ "repo_name": "mosoft521/wicket", "path": "wicket-extensions/src/main/java/org/apache/wicket/extensions/breadcrumb/panel/BreadCrumbPanel.java", "license": "apache-2.0", "size": 5757 }
[ "org.apache.wicket.extensions.breadcrumb.IBreadCrumbModel" ]
import org.apache.wicket.extensions.breadcrumb.IBreadCrumbModel;
import org.apache.wicket.extensions.breadcrumb.*;
[ "org.apache.wicket" ]
org.apache.wicket;
2,848,886
private void retryFlushAfterCreatingTable(DynamoDBMapper mapper, Deque<DynamoDBItem<?>> batch, FailedBatch failedBatch) { logger.debug("Table was not found. Trying to create table and try saving again"); if (createTable(mapper, batch.peek().getClass())) { logger.debug("Table ...
void function(DynamoDBMapper mapper, Deque<DynamoDBItem<?>> batch, FailedBatch failedBatch) { logger.debug(STR); if (createTable(mapper, batch.peek().getClass())) { logger.debug(STR); if (!failedBatch.getUnprocessedItems().isEmpty()) { ExponentialBackoffRetry retry = new ExponentialBackoffRetry(failedBatch.getUnprocess...
/** * Retry flushing data after creating table associated with mapper * * @param mapper mapper associated with the batch * @param batch original batch of data. Used for logging and to determine table name * @param failedBatch failed batch that should be retried */
Retry flushing data after creating table associated with mapper
retryFlushAfterCreatingTable
{ "repo_name": "MikeJMajor/openhab2-addons-dlinksmarthome", "path": "bundles/org.openhab.persistence.dynamodb/src/main/java/org/openhab/persistence/dynamodb/internal/DynamoDBPersistenceService.java", "license": "epl-1.0", "size": 24102 }
[ "com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper", "java.util.Deque" ]
import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper; import java.util.Deque;
import com.amazonaws.services.dynamodbv2.datamodeling.*; import java.util.*;
[ "com.amazonaws.services", "java.util" ]
com.amazonaws.services; java.util;
61,833
private static List<XSLConverterItem> load(IEclipsePreferences store, String keywords) { List<XSLConverterItem> converters = new ArrayList<XSLConverterItem>(); String [] converterNames = keywords.split(COMMA); for (String name : converterNames) { if (name == null || name.leng...
static List<XSLConverterItem> function(IEclipsePreferences store, String keywords) { List<XSLConverterItem> converters = new ArrayList<XSLConverterItem>(); String [] converterNames = keywords.split(COMMA); for (String name : converterNames) { if (name == null name.length() == 0) { continue; } String path = store.get(St...
/** * Load converter configure. * @param store A Preference store. * @param keywords The converter names. * @return A list of converter item. */
Load converter configure
load
{ "repo_name": "kuriking/testdc2", "path": "net.dependableos.dcase.diagram.editor/src/net/dependableos/dcase/diagram/editor/logic/xmlconv/XSLConverterItem.java", "license": "epl-1.0", "size": 4982 }
[ "java.util.ArrayList", "java.util.List", "org.eclipse.core.runtime.preferences.IEclipsePreferences" ]
import java.util.ArrayList; import java.util.List; import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import java.util.*; import org.eclipse.core.runtime.preferences.*;
[ "java.util", "org.eclipse.core" ]
java.util; org.eclipse.core;
1,400,940
public void lookupRepositoryReferences(Repository repository) throws KettleException { for (StepMeta stepMeta : steps) { stepMeta.getStepMetaInterface().lookupRepositoryReferences(repository); } }
void function(Repository repository) throws KettleException { for (StepMeta stepMeta : steps) { stepMeta.getStepMetaInterface().lookupRepositoryReferences(repository); } }
/** * Look up the references after import * @param repository the repository to reference. */
Look up the references after import
lookupRepositoryReferences
{ "repo_name": "soluvas/pdi-ce", "path": "src/org/pentaho/di/trans/TransMeta.java", "license": "apache-2.0", "size": 203052 }
[ "org.pentaho.di.core.exception.KettleException", "org.pentaho.di.repository.Repository", "org.pentaho.di.trans.step.StepMeta" ]
import org.pentaho.di.core.exception.KettleException; import org.pentaho.di.repository.Repository; import org.pentaho.di.trans.step.StepMeta;
import org.pentaho.di.core.exception.*; import org.pentaho.di.repository.*; import org.pentaho.di.trans.step.*;
[ "org.pentaho.di" ]
org.pentaho.di;
2,767,952
List<Group> getAllowedGroups(PerunSession perunSession, Facility facility, Vo specificVo, Service specificService) throws InternalErrorException, PrivilegeException, FacilityNotExistsException, ServiceNotExistsException, VoNotExistsException;
List<Group> getAllowedGroups(PerunSession perunSession, Facility facility, Vo specificVo, Service specificService) throws InternalErrorException, PrivilegeException, FacilityNotExistsException, ServiceNotExistsException, VoNotExistsException;
/** * Get all Groups which can use this facility (Groups must be assigned to resource which belongs to this facility) * specificVo and specificService can choose concrete groups * if specificVo, specificService or both are null, they do not specific (all possible results are returned) * * @param facility ...
Get all Groups which can use this facility (Groups must be assigned to resource which belongs to this facility) specificVo and specificService can choose concrete groups if specificVo, specificService or both are null, they do not specific (all possible results are returned)
getAllowedGroups
{ "repo_name": "stavamichal/perun", "path": "perun-core/src/main/java/cz/metacentrum/perun/core/api/FacilitiesManager.java", "license": "bsd-2-clause", "size": 31409 }
[ "cz.metacentrum.perun.core.api.exceptions.FacilityNotExistsException", "cz.metacentrum.perun.core.api.exceptions.InternalErrorException", "cz.metacentrum.perun.core.api.exceptions.PrivilegeException", "cz.metacentrum.perun.core.api.exceptions.ServiceNotExistsException", "cz.metacentrum.perun.core.api.except...
import cz.metacentrum.perun.core.api.exceptions.FacilityNotExistsException; import cz.metacentrum.perun.core.api.exceptions.InternalErrorException; import cz.metacentrum.perun.core.api.exceptions.PrivilegeException; import cz.metacentrum.perun.core.api.exceptions.ServiceNotExistsException; import cz.metacentrum.perun.c...
import cz.metacentrum.perun.core.api.exceptions.*; import java.util.*;
[ "cz.metacentrum.perun", "java.util" ]
cz.metacentrum.perun; java.util;
1,685,196
protected void updateLaunchConfiguration(ILaunchConfigurationWorkingCopy wc){ }
void function(ILaunchConfigurationWorkingCopy wc){ }
/** * Update the launch configuration with platform implementation specific values. * * @param wc */
Update the launch configuration with platform implementation specific values
updateLaunchConfiguration
{ "repo_name": "reilove/thym", "path": "plugins/org.eclipse.thym.ui/src/org/eclipse/thym/ui/launch/HybridProjectLaunchShortcut.java", "license": "epl-1.0", "size": 6171 }
[ "org.eclipse.debug.core.ILaunchConfigurationWorkingCopy" ]
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.core.*;
[ "org.eclipse.debug" ]
org.eclipse.debug;
1,161,528
public void setTestInjectionControls(final ControlsInjector testInjector, final ExecutionControls testControls, final org.slf4j.Logger testLogger) { tunnel.setTestInjectionControls(testInjector, testControls, testLogger); }
void function(final ControlsInjector testInjector, final ExecutionControls testControls, final org.slf4j.Logger testLogger) { tunnel.setTestInjectionControls(testInjector, testControls, testLogger); }
/** * See {@link DataTunnel#setTestInjectionControls(ControlsInjector, ExecutionControls, Logger)}. */
See <code>DataTunnel#setTestInjectionControls(ControlsInjector, ExecutionControls, Logger)</code>
setTestInjectionControls
{ "repo_name": "maryannxue/drill", "path": "exec/java-exec/src/main/java/org/apache/drill/exec/ops/AccountingDataTunnel.java", "license": "apache-2.0", "size": 2323 }
[ "org.apache.drill.exec.testing.ControlsInjector", "org.apache.drill.exec.testing.ExecutionControls", "org.slf4j.Logger" ]
import org.apache.drill.exec.testing.ControlsInjector; import org.apache.drill.exec.testing.ExecutionControls; import org.slf4j.Logger;
import org.apache.drill.exec.testing.*; import org.slf4j.*;
[ "org.apache.drill", "org.slf4j" ]
org.apache.drill; org.slf4j;
791,054
@Test @DirtiesContext public void getLatestTaskExecutionsByTaskNamesWithIdenticalTaskExecutions() { long executionIdOffset = initializeRepositoryNotInOrderWithMultipleTaskExecutions(); final List<TaskExecution> latestTaskExecutions = this.dao .getLatestTaskExecutionsByTaskNames("FOO5"); assertThat(latest...
void function() { long executionIdOffset = initializeRepositoryNotInOrderWithMultipleTaskExecutions(); final List<TaskExecution> latestTaskExecutions = this.dao .getLatestTaskExecutionsByTaskNames("FOO5"); assertThat(latestTaskExecutions.size() == 1).as( STR + latestTaskExecutions.size()) .isTrue(); final Calendar date...
/** * This test is a special use-case. While not common, it is theoretically possible, * that a task may have executed with the exact same start time multiple times. In * that case we should still only get 1 returned {@link TaskExecution}. */
This test is a special use-case. While not common, it is theoretically possible, that a task may have executed with the exact same start time multiple times. In that case we should still only get 1 returned <code>TaskExecution</code>
getLatestTaskExecutionsByTaskNamesWithIdenticalTaskExecutions
{ "repo_name": "mminella/spring-cloud-task", "path": "spring-cloud-task-core/src/test/java/org/springframework/cloud/task/repository/dao/BaseTaskExecutionDaoTestCases.java", "license": "apache-2.0", "size": 13003 }
[ "java.util.Calendar", "java.util.List", "java.util.TimeZone", "org.assertj.core.api.Assertions", "org.springframework.cloud.task.repository.TaskExecution" ]
import java.util.Calendar; import java.util.List; import java.util.TimeZone; import org.assertj.core.api.Assertions; import org.springframework.cloud.task.repository.TaskExecution;
import java.util.*; import org.assertj.core.api.*; import org.springframework.cloud.task.repository.*;
[ "java.util", "org.assertj.core", "org.springframework.cloud" ]
java.util; org.assertj.core; org.springframework.cloud;
1,087,710
private static void getChildDimensionDictionaryDetail(CarbonDimension queryDimensions, Set<String> dictionaryDimensionFromQuery) { for (int j = 0; j < queryDimensions.getNumberOfChild(); j++) { List<Encoding> encodingList = queryDimensions.getListOfChildDimensions().get(j).getEncoder(); if (quer...
static void function(CarbonDimension queryDimensions, Set<String> dictionaryDimensionFromQuery) { for (int j = 0; j < queryDimensions.getNumberOfChild(); j++) { List<Encoding> encodingList = queryDimensions.getListOfChildDimensions().get(j).getEncoder(); if (queryDimensions.getListOfChildDimensions().get(j).getNumberOf...
/** * Below method will be used to fill the children dimension column id * * @param queryDimensions query dimension * @param dictionaryDimensionFromQuery dictionary dimension for query */
Below method will be used to fill the children dimension column id
getChildDimensionDictionaryDetail
{ "repo_name": "jatin9896/incubator-carbondata", "path": "core/src/main/java/org/apache/carbondata/core/scan/executor/util/QueryUtil.java", "license": "apache-2.0", "size": 32061 }
[ "java.util.List", "java.util.Set", "org.apache.carbondata.core.metadata.encoder.Encoding", "org.apache.carbondata.core.metadata.schema.table.column.CarbonDimension", "org.apache.carbondata.core.util.CarbonUtil" ]
import java.util.List; import java.util.Set; import org.apache.carbondata.core.metadata.encoder.Encoding; import org.apache.carbondata.core.metadata.schema.table.column.CarbonDimension; import org.apache.carbondata.core.util.CarbonUtil;
import java.util.*; import org.apache.carbondata.core.metadata.encoder.*; import org.apache.carbondata.core.metadata.schema.table.column.*; import org.apache.carbondata.core.util.*;
[ "java.util", "org.apache.carbondata" ]
java.util; org.apache.carbondata;
1,311,822
NotificationSchemaDto saveNotificationSchema(NotificationSchemaDto notificationSchema) throws ControlServiceException;
NotificationSchemaDto saveNotificationSchema(NotificationSchemaDto notificationSchema) throws ControlServiceException;
/** * Edits the notification schema. * * @param notificationSchema * the notification schema * @return the notification schema dto * @throws ControlServiceException * the control service exception */
Edits the notification schema
saveNotificationSchema
{ "repo_name": "Oleh-Kravchenko/kaa", "path": "server/node/src/main/java/org/kaaproject/kaa/server/control/service/ControlService.java", "license": "apache-2.0", "size": 64761 }
[ "org.kaaproject.kaa.common.dto.NotificationSchemaDto", "org.kaaproject.kaa.server.control.service.exception.ControlServiceException" ]
import org.kaaproject.kaa.common.dto.NotificationSchemaDto; import org.kaaproject.kaa.server.control.service.exception.ControlServiceException;
import org.kaaproject.kaa.common.dto.*; import org.kaaproject.kaa.server.control.service.exception.*;
[ "org.kaaproject.kaa" ]
org.kaaproject.kaa;
2,395,696
public void applyChanges() { SwingWorker<Boolean, Boolean> worker = new SwingWorker<Boolean, Boolean>() {
void function() { SwingWorker<Boolean, Boolean> worker = new SwingWorker<Boolean, Boolean>() {
/** * Applies the changes made to all of the {@link Account}s by synchronizing * with the {@link BurdeeRoot}. */
Applies the changes made to all of the <code>Account</code>s by synchronizing with the <code>BurdeeRoot</code>
applyChanges
{ "repo_name": "terryyiu/Burdee", "path": "src/main/java/ca/burdee/swing/AccountListModel.java", "license": "gpl-3.0", "size": 7669 }
[ "javax.swing.SwingWorker" ]
import javax.swing.SwingWorker;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
975,524
@ArgumentsChecked @Throws(IllegalNotNullArgumentException.class) public static MatchingStrategy type(final Class<?> clazz) { return new TypeMatchingStrategy(Check.notNull(clazz, "clazz")); } private Match() { // Do not create instances of this class }
@Throws(IllegalNotNullArgumentException.class) static MatchingStrategy function(final Class<?> clazz) { return new TypeMatchingStrategy(Check.notNull(clazz, "clazz")); } private Match() { }
/** * Match a type. * * @param clazz * Type that is matched * @return a {@code MatchingStrategy} which matches the given type. */
Match a type
type
{ "repo_name": "before/quality-check", "path": "modules/quality-test/src/main/java/net/sf/qualitytest/blueprint/Match.java", "license": "apache-2.0", "size": 3239 }
[ "net.sf.qualitycheck.Check", "net.sf.qualitycheck.Throws", "net.sf.qualitycheck.exception.IllegalNotNullArgumentException", "net.sf.qualitytest.blueprint.strategy.matching.TypeMatchingStrategy" ]
import net.sf.qualitycheck.Check; import net.sf.qualitycheck.Throws; import net.sf.qualitycheck.exception.IllegalNotNullArgumentException; import net.sf.qualitytest.blueprint.strategy.matching.TypeMatchingStrategy;
import net.sf.qualitycheck.*; import net.sf.qualitycheck.exception.*; import net.sf.qualitytest.blueprint.strategy.matching.*;
[ "net.sf.qualitycheck", "net.sf.qualitytest" ]
net.sf.qualitycheck; net.sf.qualitytest;
2,285,558
@Test public void testSerialization() throws IOException, ClassNotFoundException { BarRenderer r1 = new BarRenderer(); r1.setDefaultLegendTextFont(new Font("Dialog", Font.PLAIN, 4)); r1.setDefaultLegendTextPaint(new GradientPaint(1.0f, 2.0f, Color.RED, 3.0f, 4.0f, ...
void function() throws IOException, ClassNotFoundException { BarRenderer r1 = new BarRenderer(); r1.setDefaultLegendTextFont(new Font(STR, Font.PLAIN, 4)); r1.setDefaultLegendTextPaint(new GradientPaint(1.0f, 2.0f, Color.RED, 3.0f, 4.0f, Color.green)); r1.setDefaultLegendShape(new Line2D.Double(1.0, 2.0, 3.0, 4.0)); By...
/** * Serialize an instance, restore it, and check for equality. In addition, * test for a bug that was reported where the listener list is 'null' after * deserialization. */
Serialize an instance, restore it, and check for equality. In addition, test for a bug that was reported where the listener list is 'null' after deserialization
testSerialization
{ "repo_name": "greearb/jfreechart-fse-ct", "path": "src/test/java/org/jfree/chart/renderer/AbstractRendererTest.java", "license": "lgpl-2.1", "size": 27742 }
[ "java.awt.Color", "java.awt.Font", "java.awt.GradientPaint", "java.awt.geom.Line2D", "java.io.ByteArrayInputStream", "java.io.ByteArrayOutputStream", "java.io.IOException", "java.io.ObjectInput", "java.io.ObjectInputStream", "java.io.ObjectOutput", "java.io.ObjectOutputStream", "org.jfree.char...
import java.awt.Color; import java.awt.Font; import java.awt.GradientPaint; import java.awt.geom.Line2D; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.ObjectInput; import java.io.ObjectInputStream; import java.io.ObjectOutput; import java.io.Object...
import java.awt.*; import java.awt.geom.*; import java.io.*; import org.jfree.chart.event.*; import org.jfree.chart.renderer.category.*; import org.junit.*;
[ "java.awt", "java.io", "org.jfree.chart", "org.junit" ]
java.awt; java.io; org.jfree.chart; org.junit;
395,923
public void deleteTreesBelow() throws IOException { fileSystem.deleteTreesBelow(this); }
void function() throws IOException { fileSystem.deleteTreesBelow(this); }
/** * Deletes all directory trees recursively beneath this path. Does nothing if the path is not a * directory. * * @throws IOException if the hierarchy cannot be removed successfully */
Deletes all directory trees recursively beneath this path. Does nothing if the path is not a directory
deleteTreesBelow
{ "repo_name": "davidzchen/bazel", "path": "src/main/java/com/google/devtools/build/lib/vfs/Path.java", "license": "apache-2.0", "size": 37594 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
250,856
public MicrosoftGraphDirectoryInner withAdministrativeUnits( List<MicrosoftGraphAdministrativeUnitInner> administrativeUnits) { this.administrativeUnits = administrativeUnits; return this; }
MicrosoftGraphDirectoryInner function( List<MicrosoftGraphAdministrativeUnitInner> administrativeUnits) { this.administrativeUnits = administrativeUnits; return this; }
/** * Set the administrativeUnits property: The administrativeUnits property. * * @param administrativeUnits the administrativeUnits value to set. * @return the MicrosoftGraphDirectoryInner object itself. */
Set the administrativeUnits property: The administrativeUnits property
withAdministrativeUnits
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/models/MicrosoftGraphDirectoryInner.java", "license": "mit", "size": 4156 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
441,062
Set<String> supportedIds = new HashSet<>(); for (String propertyId : propertyIds) { if (propertyId.startsWith(ZERO_PADDING_PARAM) || PropertyHelper.hasAggregateFunctionSuffix(propertyId)) { supportedIds.add(propertyId); } } propertyIds.removeAll(supportedIds); return proper...
Set<String> supportedIds = new HashSet<>(); for (String propertyId : propertyIds) { if (propertyId.startsWith(ZERO_PADDING_PARAM) PropertyHelper.hasAggregateFunctionSuffix(propertyId)) { supportedIds.add(propertyId); } } propertyIds.removeAll(supportedIds); return propertyIds; }
/** * Support properties with aggregate functions and metrics padding method. */
Support properties with aggregate functions and metrics padding method
checkPropertyIds
{ "repo_name": "radicalbit/ambari", "path": "ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/AMSReportPropertyProvider.java", "license": "apache-2.0", "size": 12677 }
[ "java.util.HashSet", "java.util.Set", "org.apache.ambari.server.controller.utilities.PropertyHelper" ]
import java.util.HashSet; import java.util.Set; import org.apache.ambari.server.controller.utilities.PropertyHelper;
import java.util.*; import org.apache.ambari.server.controller.utilities.*;
[ "java.util", "org.apache.ambari" ]
java.util; org.apache.ambari;
905,922
private static Date fromISODateString(String isoDateString) throws Exception { SimpleDateFormat f = new SimpleDateFormat(FORMAT_DATE_ISO); f.setTimeZone(TimeZone.getTimeZone("UTC")); return f.parse(isoDateString); }
static Date function(String isoDateString) throws Exception { SimpleDateFormat f = new SimpleDateFormat(FORMAT_DATE_ISO); f.setTimeZone(TimeZone.getTimeZone("UTC")); return f.parse(isoDateString); }
/** * Takes in an ISO date string of the following format: * yyyy-mm-ddThh:mm:ss.ms+HoMo * * @param isoDateString the iso date string * @return the date * @throws Exception the exception */
Takes in an ISO date string of the following format: yyyy-mm-ddThh:mm:ss.ms+HoMo
fromISODateString
{ "repo_name": "TecMunky/xDrip", "path": "app/src/main/java/com/eveningoutpost/dexdrip/Models/DateUtil.java", "license": "gpl-3.0", "size": 3340 }
[ "java.text.SimpleDateFormat", "java.util.Date", "java.util.TimeZone" ]
import java.text.SimpleDateFormat; import java.util.Date; import java.util.TimeZone;
import java.text.*; import java.util.*;
[ "java.text", "java.util" ]
java.text; java.util;
1,284,427
DeploymentQuery parentDeploymentIds(List<String> parentDeploymentIds);
DeploymentQuery parentDeploymentIds(List<String> parentDeploymentIds);
/** * Only select deployments with a parent deployment id that is the same as one of the given deployment identifiers. */
Only select deployments with a parent deployment id that is the same as one of the given deployment identifiers
parentDeploymentIds
{ "repo_name": "flowable/flowable-engine", "path": "modules/flowable-engine/src/main/java/org/flowable/engine/repository/DeploymentQuery.java", "license": "apache-2.0", "size": 5125 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,915,648
void onActivityResult(int requestCode, int resultCode, Intent intent);
void onActivityResult(int requestCode, int resultCode, Intent intent);
/** * Called when an activity you launched exits, giving you the requestCode you started it with, * the resultCode it returned, and any additional data from it. * * @param requestCode The request code originally supplied to startActivityForResult(), * allowing you to identify who thi...
Called when an activity you launched exits, giving you the requestCode you started it with, the resultCode it returned, and any additional data from it
onActivityResult
{ "repo_name": "roadlabs/android", "path": "appMobiLib/src/com/phonegap/api/IPlugin.java", "license": "mit", "size": 2895 }
[ "android.content.Intent" ]
import android.content.Intent;
import android.content.*;
[ "android.content" ]
android.content;
921,090
public static ViewDragHelper create(final ViewGroup forParent, final float sensitivity, final Callback cb) { final ViewDragHelper helper = create(forParent, cb); helper.mTouchSlop = (int) (helper.mTouchSlop * (1 / sensitivity)); return helper; }
static ViewDragHelper function(final ViewGroup forParent, final float sensitivity, final Callback cb) { final ViewDragHelper helper = create(forParent, cb); helper.mTouchSlop = (int) (helper.mTouchSlop * (1 / sensitivity)); return helper; }
/** * Factory method to create a new ViewDragHelper. * * @param forParent Parent view to monitor * @param sensitivity Multiplier for how sensitive the helper should be * about detecting the start of a drag. Larger values are more * sensitive. 1.0f is normal. * @param cb Callback to ...
Factory method to create a new ViewDragHelper
create
{ "repo_name": "0359xiaodong/twidere", "path": "src/me/imid/swipebacklayout/lib/ViewDragHelper.java", "license": "gpl-3.0", "size": 52841 }
[ "android.view.ViewGroup" ]
import android.view.ViewGroup;
import android.view.*;
[ "android.view" ]
android.view;
1,166,099