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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
public static InputStream parseInputStream(String path, String defaultPath)
throws IOException
{
if (path == null)
path = defaultPath;
if (path.equals("-"))
return System.in;
return new FileInputStream(path);
} | static InputStream function(String path, String defaultPath) throws IOException { if (path == null) path = defaultPath; if (path.equals("-")) return System.in; return new FileInputStream(path); } | /**
* Return a <code>InputStream</code> that is the result of creating
* a new <code>FileInputStream</code> object for the file named by
* the given <code>path</code>. If the argument is `<code>-</code>'
* then <code>System.in</code> is returned. If <code>path</code>
* is <code>null</code>, t... | Return a <code>InputStream</code> that is the result of creating a new <code>FileInputStream</code> object for the file named by the given <code>path</code>. If the argument is `<code>-</code>' then <code>System.in</code> is returned. If <code>path</code> is <code>null</code>, the string <code>path</code> is used as th... | parseInputStream | {
"repo_name": "trasukg/river-qa-2.2",
"path": "src/com/sun/jini/system/CommandLine.java",
"license": "apache-2.0",
"size": 12319
} | [
"java.io.FileInputStream",
"java.io.IOException",
"java.io.InputStream"
] | import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,906,853 |
public void addDockedTab(String title,
Icon icon,
Component component,
String tip,
int position,
boolean selected) {
DockedTabContainer tabContainer = null;
... | void function(String title, Icon icon, Component component, String tip, int position, boolean selected) { DockedTabContainer tabContainer = null; switch (position) { case SwingConstants.NORTH_WEST: tabContainer = initTabContainer(SwingConstants.WEST); break; case SwingConstants.SOUTH_WEST: tabContainer = initTabContain... | /**
* Adds the specified component as a docked tab component in the
* specified position.
*
* @param the tab title
* @param the tab icon
* @param the component
* @param the tab's tool tip
* @param the position
*/ | Adds the specified component as a docked tab component in the specified position | addDockedTab | {
"repo_name": "toxeh/ExecuteQuery",
"path": "java/src/org/executequery/base/DesktopMediator.java",
"license": "gpl-3.0",
"size": 36328
} | [
"java.awt.Component",
"javax.swing.Icon",
"javax.swing.SwingConstants"
] | import java.awt.Component; import javax.swing.Icon; import javax.swing.SwingConstants; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 1,336,760 |
public void setLastVisit(final Date lastVisit)
{
this.lastVisit = lastVisit;
} | void function(final Date lastVisit) { this.lastVisit = lastVisit; } | /**
* Set session last visit time.
*
* @param lastVisit Time in milliseconds
*/ | Set session last visit time | setLastVisit | {
"repo_name": "linda1890/jforum2",
"path": "src/main/java/net/jforum/entities/UserSession.java",
"license": "bsd-3-clause",
"size": 11955
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,889,293 |
private void setPagerIndicators() {
indicators = new ImageView[adapter.getCount()];
//Creating circle dot ImageView based on adapter size
for (int i = 0; i < adapter.getCount(); i++) {
indicators[i] = new ImageView(this);
indicators[i].setImageDrawable(getResources().... | void function() { indicators = new ImageView[adapter.getCount()]; for (int i = 0; i < adapter.getCount(); i++) { indicators[i] = new ImageView(this); indicators[i].setImageDrawable(getResources().getDrawable(R.drawable.pager_indicator_dot)); LinearLayout.LayoutParams params = new LinearLayout.LayoutParams( LinearLayout... | /**
* Creates pager indicator dynamically using number of fragments present in the adapter
*/ | Creates pager indicator dynamically using number of fragments present in the adapter | setPagerIndicators | {
"repo_name": "Samourai-Wallet/samourai-wallet-android",
"path": "app/src/main/java/com/samourai/wallet/CreateWalletActivity.java",
"license": "unlicense",
"size": 17545
} | [
"android.widget.ImageView",
"android.widget.LinearLayout"
] | import android.widget.ImageView; import android.widget.LinearLayout; | import android.widget.*; | [
"android.widget"
] | android.widget; | 1,778,684 |
@Nonnull
public WorkbookChartPointCollectionRequest top(final int value) {
addTopOption(value);
return this;
} | WorkbookChartPointCollectionRequest function(final int value) { addTopOption(value); return this; } | /**
* Sets the top value for the request
*
* @param value the max number of items to return
* @return the updated request
*/ | Sets the top value for the request | top | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/WorkbookChartPointCollectionRequest.java",
"license": "mit",
"size": 5997
} | [
"com.microsoft.graph.requests.WorkbookChartPointCollectionRequest"
] | import com.microsoft.graph.requests.WorkbookChartPointCollectionRequest; | import com.microsoft.graph.requests.*; | [
"com.microsoft.graph"
] | com.microsoft.graph; | 13,568 |
public void insertEntity(Entity entity, boolean doCommit)
{
// there might be only a merge method, not an insert method
ClassMappingDescriptor descriptor = ClassMappingDescriptor.getInstance(entity.getClass());
Method method =
descriptor.getCreateMethod() != null? descriptor.getCreateMethod(): des... | void function(Entity entity, boolean doCommit) { ClassMappingDescriptor descriptor = ClassMappingDescriptor.getInstance(entity.getClass()); Method method = descriptor.getCreateMethod() != null? descriptor.getCreateMethod(): descriptor.getMergeMethod(); sendWriteRequest(entity, method,ACTION_INSERT); } | /**
* Do web service call that inserts data of the entity passed in.
* This method calls sendWriteRequest method. If a create-method is specified in
* peristyenceMapping.xml, this method will be used, otherwise the merge-method will be used
* @param entity
* @param doCommit
*/ | Do web service call that inserts data of the entity passed in. This method calls sendWriteRequest method. If a create-method is specified in peristyenceMapping.xml, this method will be used, otherwise the merge-method will be used | insertEntity | {
"repo_name": "oracle/mobile-persistence",
"path": "Projects/Framework/Runtime/src/oracle/ateam/sample/mobile/persistence/manager/AbstractRemotePersistenceManager.java",
"license": "mit",
"size": 15894
} | [
"oracle.ateam.sample.mobile.persistence.metadata.ClassMappingDescriptor",
"oracle.ateam.sample.mobile.persistence.metadata.Method",
"oracle.ateam.sample.mobile.persistence.model.Entity"
] | import oracle.ateam.sample.mobile.persistence.metadata.ClassMappingDescriptor; import oracle.ateam.sample.mobile.persistence.metadata.Method; import oracle.ateam.sample.mobile.persistence.model.Entity; | import oracle.ateam.sample.mobile.persistence.metadata.*; import oracle.ateam.sample.mobile.persistence.model.*; | [
"oracle.ateam.sample"
] | oracle.ateam.sample; | 1,108,125 |
EClass getEnumLiteralExp(); | EClass getEnumLiteralExp(); | /**
* Returns the meta object for class '{@link anatlyzer.atlext.OCL.EnumLiteralExp <em>Enum Literal Exp</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Enum Literal Exp</em>'.
* @see anatlyzer.atlext.OCL.EnumLiteralExp
* @generated
*/ | Returns the meta object for class '<code>anatlyzer.atlext.OCL.EnumLiteralExp Enum Literal Exp</code>'. | getEnumLiteralExp | {
"repo_name": "jesusc/anatlyzer",
"path": "plugins/anatlyzer.atl.typing/src-gen/anatlyzer/atlext/OCL/OCLPackage.java",
"license": "epl-1.0",
"size": 484377
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,621,566 |
@Override
public Counter counter(final String name) {
return getOrAdd(name, MetricBuilder.COUNTERS);
} | Counter function(final String name) { return getOrAdd(name, MetricBuilder.COUNTERS); } | /**
* Get the counter associated with the given name.
*
* @param name the name of the counter
* @return the counter associated with the given name
*/ | Get the counter associated with the given name | counter | {
"repo_name": "koshalt/modules",
"path": "metrics/src/main/java/org/motechproject/metrics/service/impl/MetricRegistryServiceImpl.java",
"license": "bsd-3-clause",
"size": 10065
} | [
"org.motechproject.metrics.api.Counter"
] | import org.motechproject.metrics.api.Counter; | import org.motechproject.metrics.api.*; | [
"org.motechproject.metrics"
] | org.motechproject.metrics; | 1,319,609 |
void expectArgumentMatchesParameter(NodeTraversal t, Node n, JSType argType,
JSType paramType, Node callNode, int ordinal) {
if (!argType.isSubtype(paramType)) {
mismatch(t, n,
String.format("actual parameter %d of %s does not match " +
"formal parameter", ordinal,
... | void expectArgumentMatchesParameter(NodeTraversal t, Node n, JSType argType, JSType paramType, Node callNode, int ordinal) { if (!argType.isSubtype(paramType)) { mismatch(t, n, String.format(STR + STR, ordinal, getReadableJSTypeName(callNode.getFirstChild(), false)), argType, paramType); } } | /**
* Expect that the type of an argument matches the type of the parameter
* that it's fulfilling.
*
* @param t The node traversal.
* @param n The node to issue warnings on.
* @param argType The type of the argument.
* @param paramType The type of the parameter.
* @param callNode The call node,... | Expect that the type of an argument matches the type of the parameter that it's fulfilling | expectArgumentMatchesParameter | {
"repo_name": "jhiswin/idiil-closure-compiler",
"path": "src/com/google/javascript/jscomp/TypeValidator.java",
"license": "apache-2.0",
"size": 32351
} | [
"com.google.javascript.rhino.Node",
"com.google.javascript.rhino.jstype.JSType"
] | import com.google.javascript.rhino.Node; import com.google.javascript.rhino.jstype.JSType; | import com.google.javascript.rhino.*; import com.google.javascript.rhino.jstype.*; | [
"com.google.javascript"
] | com.google.javascript; | 645,038 |
private ProMasDeuInc instanciarProMasDeuInc(DeudaAdmin deudaAdmin, Procurador procurador, String obsMotNoVueAtras, String desCuentaTitular, CueExeCache exeCache) throws Exception {
// idProcesoMasivo: id del envio
//idDeuda: id de la deuda
//idProcurador: id del procurador asignado
//obsMotNoVueAtr: nula
/... | ProMasDeuInc function(DeudaAdmin deudaAdmin, Procurador procurador, String obsMotNoVueAtras, String desCuentaTitular, CueExeCache exeCache) throws Exception { ProMasDeuInc proMasDeuInc = new ProMasDeuInc(); proMasDeuInc.setProcesoMasivo(this); proMasDeuInc.setIdDeuda(deudaAdmin.getId()); proMasDeuInc.setProcurador(proc... | /**
* Crea una deuda a incluir en la tabla de deuda incluida del envio.
* @param deuda deuda a incluir en el envio
* @param procurador Procurador asignado a la deuda
* @param obsMotNoVueAtras observacion del motivo de no vuelta a atras
* @return en objeto insertado
* @throws Exception
*/ | Crea una deuda a incluir en la tabla de deuda incluida del envio | instanciarProMasDeuInc | {
"repo_name": "avdata99/SIAT",
"path": "siat-1.0-SOURCE/src/buss/src/ar/gov/rosario/siat/gde/buss/bean/ProcesoMasivo.java",
"license": "gpl-3.0",
"size": 173904
} | [
"ar.gov.rosario.siat.exe.buss.bean.CueExeCache",
"coop.tecso.demoda.iface.model.Estado"
] | import ar.gov.rosario.siat.exe.buss.bean.CueExeCache; import coop.tecso.demoda.iface.model.Estado; | import ar.gov.rosario.siat.exe.buss.bean.*; import coop.tecso.demoda.iface.model.*; | [
"ar.gov.rosario",
"coop.tecso.demoda"
] | ar.gov.rosario; coop.tecso.demoda; | 2,778,258 |
private void findClassLayoutMappings() {
Iterator<MethodOrMethodContext> rmIterator = Scene.v().getReachableMethods().listener();
while (rmIterator.hasNext()) {
SootMethod sm = rmIterator.next().method();
if (!sm.isConcrete())
continue;
for (Unit u : sm.retrieveActiveBody().getUnits())
if (u ins... | void function() { Iterator<MethodOrMethodContext> rmIterator = Scene.v().getReachableMethods().listener(); while (rmIterator.hasNext()) { SootMethod sm = rmIterator.next().method(); if (!sm.isConcrete()) continue; for (Unit u : sm.retrieveActiveBody().getUnits()) if (u instanceof Stmt) { Stmt stmt = (Stmt) u; if (stmt.... | /**
* Finds the mappings between classes and their respective layout files
*/ | Finds the mappings between classes and their respective layout files | findClassLayoutMappings | {
"repo_name": "0-14N/soot-infoflow-android",
"path": "src/soot/jimple/infoflow/android/AnalyzeJimpleClass.java",
"license": "lgpl-2.1",
"size": 15283
} | [
"java.util.HashSet",
"java.util.Iterator",
"java.util.Set"
] | import java.util.HashSet; import java.util.Iterator; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 633,491 |
public void writeTo(StringBuffer sb)
{
if (mediaID != null) {
sb.append("<MediaID><![CDATA[")
.append(mediaID)
.append("]]></MediaID>");
}
if (mediaType != null) {
sb.append("<MediaType><![CDATA[")
.appen... | void function(StringBuffer sb) { if (mediaID != null) { sb.append(STR) .append(mediaID) .append(STR); } if (mediaType != null) { sb.append(STR) .append(mediaType) .append(STR); } for (Iterator it = suids.iterator(); it.hasNext(); ) { sb.append(STR) .append(it.next()) .append(STR); } for (Iterator it = pats.iterator(); ... | /**
* Description of the Method
*
* @param sb Description of the Parameter
*/ | Description of the Method | writeTo | {
"repo_name": "medicayun/medicayundicom",
"path": "dcm4che14/tags/DCM4JBOSS_2_5_3/src/java/org/dcm4cheri/auditlog/MediaDescriptionImpl.java",
"license": "apache-2.0",
"size": 4702
} | [
"java.util.Iterator",
"org.dcm4che.auditlog.Patient"
] | import java.util.Iterator; import org.dcm4che.auditlog.Patient; | import java.util.*; import org.dcm4che.auditlog.*; | [
"java.util",
"org.dcm4che.auditlog"
] | java.util; org.dcm4che.auditlog; | 2,694,005 |
private void deleteQuietlyLocalJar(Path jar) {
if (jar != null) {
FileUtils.deleteQuietly(new File(jar.toUri().getPath()));
}
} | void function(Path jar) { if (jar != null) { FileUtils.deleteQuietly(new File(jar.toUri().getPath())); } } | /**
* Deletes quietly local jar but first checks if path to jar is not null.
*
* @param jar path to jar
*/ | Deletes quietly local jar but first checks if path to jar is not null | deleteQuietlyLocalJar | {
"repo_name": "KulykRoman/drill",
"path": "exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/FunctionImplementationRegistry.java",
"license": "apache-2.0",
"size": 25757
} | [
"java.io.File",
"org.apache.commons.io.FileUtils",
"org.apache.hadoop.fs.Path"
] | import java.io.File; import org.apache.commons.io.FileUtils; import org.apache.hadoop.fs.Path; | import java.io.*; import org.apache.commons.io.*; import org.apache.hadoop.fs.*; | [
"java.io",
"org.apache.commons",
"org.apache.hadoop"
] | java.io; org.apache.commons; org.apache.hadoop; | 1,558,751 |
public EjbRefType<WebAppType<T>> createEjbRef(); | EjbRefType<WebAppType<T>> function(); | /**
* Creates a new <code>ejb-ref</code> element
* @return the new created instance of <code>EjbRefType<WebAppType<T>></code>
*/ | Creates a new <code>ejb-ref</code> element | createEjbRef | {
"repo_name": "forge/javaee-descriptors",
"path": "api/src/main/java/org/jboss/shrinkwrap/descriptor/api/webapp31/WebAppType.java",
"license": "epl-1.0",
"size": 60822
} | [
"org.jboss.shrinkwrap.descriptor.api.javaee7.EjbRefType"
] | import org.jboss.shrinkwrap.descriptor.api.javaee7.EjbRefType; | import org.jboss.shrinkwrap.descriptor.api.javaee7.*; | [
"org.jboss.shrinkwrap"
] | org.jboss.shrinkwrap; | 2,563,379 |
public Inventory queryInventory(boolean querySkuDetails, List<String> moreItemSkus,
List<String> moreSubsSkus) throws IabException {
checkNotDisposed();
checkSetupDone("queryInventory");
try {
Inventory inv = new Inventory();
int r ... | Inventory function(boolean querySkuDetails, List<String> moreItemSkus, List<String> moreSubsSkus) throws IabException { checkNotDisposed(); checkSetupDone(STR); try { Inventory inv = new Inventory(); int r = queryPurchases(inv, ITEM_TYPE_INAPP); if (r != BILLING_RESPONSE_RESULT_OK) { throw new IabException(r, STR); } i... | /**
* Queries the inventory. This will query all owned items from the server, as well as
* information on additional skus, if specified. This method may block or take long to execute.
* Do not call from a UI thread. For that, use the non-blocking version {@link #refreshInventoryAsync}.
*
* @par... | Queries the inventory. This will query all owned items from the server, as well as information on additional skus, if specified. This method may block or take long to execute. Do not call from a UI thread. For that, use the non-blocking version <code>#refreshInventoryAsync</code> | queryInventory | {
"repo_name": "Dato0011/btb-sms",
"path": "QKSMS/src/main/java/com/bitblocker/messenger/external/iab/IabHelper.java",
"license": "gpl-3.0",
"size": 44893
} | [
"android.os.RemoteException",
"java.util.List",
"org.json.JSONException"
] | import android.os.RemoteException; import java.util.List; import org.json.JSONException; | import android.os.*; import java.util.*; import org.json.*; | [
"android.os",
"java.util",
"org.json"
] | android.os; java.util; org.json; | 856,774 |
static LexicalScope containingScopeForNode(ParseTreeNode node) {
return node.getAttributes().get(CONTAINING_SCOPE);
} | static LexicalScope containingScopeForNode(ParseTreeNode node) { return node.getAttributes().get(CONTAINING_SCOPE); } | /**
* The scope containing the node. This can only be called after
* {@link #computeLexicalScopes} has been called on an ancestor node.
*/ | The scope containing the node. This can only be called after <code>#computeLexicalScopes</code> has been called on an ancestor node | containingScopeForNode | {
"repo_name": "googlearchive/caja",
"path": "src/com/google/caja/ancillary/linter/ScopeAnalyzer.java",
"license": "apache-2.0",
"size": 9301
} | [
"com.google.caja.parser.ParseTreeNode"
] | import com.google.caja.parser.ParseTreeNode; | import com.google.caja.parser.*; | [
"com.google.caja"
] | com.google.caja; | 417,035 |
@GET
@Path("/current-id")
@Produces({ APPLICATION_JSON })
public String getCurrentTenantId() {
return (String) PentahoSessionHolder.getSession().getAttribute( IPentahoSession.TENANT_ID_KEY );
} | @Path(STR) @Produces({ APPLICATION_JSON }) String function() { return (String) PentahoSessionHolder.getSession().getAttribute( IPentahoSession.TENANT_ID_KEY ); } | /**
* Returns the current tenant from the user's session
* @return
*/ | Returns the current tenant from the user's session | getCurrentTenantId | {
"repo_name": "kynx/multen",
"path": "src/org/kynx/pentaho/multen/MultenApi.java",
"license": "gpl-2.0",
"size": 9086
} | [
"javax.ws.rs.Path",
"javax.ws.rs.Produces",
"org.pentaho.platform.api.engine.IPentahoSession",
"org.pentaho.platform.engine.core.system.PentahoSessionHolder"
] | import javax.ws.rs.Path; import javax.ws.rs.Produces; import org.pentaho.platform.api.engine.IPentahoSession; import org.pentaho.platform.engine.core.system.PentahoSessionHolder; | import javax.ws.rs.*; import org.pentaho.platform.api.engine.*; import org.pentaho.platform.engine.core.system.*; | [
"javax.ws",
"org.pentaho.platform"
] | javax.ws; org.pentaho.platform; | 1,174,068 |
public Dialog waitDialog(String title, boolean compareExactly, boolean compareCaseSensitive)
throws InterruptedException {
return waitDialog(title, compareExactly, compareCaseSensitive, 0);
}
/**
* Waits for a dialog to show. Wait for the {@code index+1}'th dialog
* to show th... | Dialog function(String title, boolean compareExactly, boolean compareCaseSensitive) throws InterruptedException { return waitDialog(title, compareExactly, compareCaseSensitive, 0); } /** * Waits for a dialog to show. Wait for the {@code index+1}'th dialog * to show that is both owned by the {@code java.awt.Window} * {@... | /**
* Waits for a dialog to show. Wait for the first dialog to show with a
* suitable title.
*
* @param title Dialog title or subtitle.
* @param compareExactly If {@code true} and the search is case
* sensitive, then a match occurs when the {@code title} argument is a
* substring of a... | Waits for a dialog to show. Wait for the first dialog to show with a suitable title | waitDialog | {
"repo_name": "FauxFaux/jdk9-jdk",
"path": "test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/DialogWaiter.java",
"license": "gpl-2.0",
"size": 29635
} | [
"java.awt.Dialog",
"java.awt.Window"
] | import java.awt.Dialog; import java.awt.Window; | import java.awt.*; | [
"java.awt"
] | java.awt; | 281,334 |
public CompletableFuture<Void> resume(); | CompletableFuture<Void> function(); | /**
* Resume execution of this object
*
* <p>
* Note, this would be called "continue" if it weren't a Java reserved word :( .
*
* @return a future which completes upon successful resumption
*/ | Resume execution of this object Note, this would be called "continue" if it weren't a Java reserved word :( | resume | {
"repo_name": "NationalSecurityAgency/ghidra",
"path": "Ghidra/Debug/Framework-Debugging/src/main/java/ghidra/dbg/target/TargetResumable.java",
"license": "apache-2.0",
"size": 1117
} | [
"java.util.concurrent.CompletableFuture"
] | import java.util.concurrent.CompletableFuture; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 592,490 |
private Connection assureValid(Connection conn) {
boolean isValid = false;
try { isValid = conn.isValid(0); } catch (Exception ex) {}
if (!isValid) {
try { conn.close(); } catch (Exception ex) {}
conn = null;
}
return conn;
} | Connection function(Connection conn) { boolean isValid = false; try { isValid = conn.isValid(0); } catch (Exception ex) {} if (!isValid) { try { conn.close(); } catch (Exception ex) {} conn = null; } return conn; } | /**
* Test connection for validity. If not valid, close it.
*
* @param conn is the connection to test
* @return conn if valid, otherwise null
*/ | Test connection for validity. If not valid, close it | assureValid | {
"repo_name": "rdesantis/hauldata",
"path": "dbpa/src/main/java/com/hauldata/dbpa/connection/DatabaseConnection.java",
"license": "apache-2.0",
"size": 5512
} | [
"java.sql.Connection"
] | import java.sql.Connection; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,487,852 |
private void requestInputMethod(Dialog dialog) {
Window window = dialog.getWindow();
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
} | void function(Dialog dialog) { Window window = dialog.getWindow(); window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE); } | /**
* Sets the required flags on the dialog window to enable input method window to show up.
*/ | Sets the required flags on the dialog window to enable input method window to show up | requestInputMethod | {
"repo_name": "syslover33/ctank",
"path": "java/android-sdk-linux_r24.4.1_src/sources/android-23/android/support/v14/preference/PreferenceDialogFragment.java",
"license": "gpl-3.0",
"size": 6344
} | [
"android.app.Dialog",
"android.view.Window",
"android.view.WindowManager"
] | import android.app.Dialog; import android.view.Window; import android.view.WindowManager; | import android.app.*; import android.view.*; | [
"android.app",
"android.view"
] | android.app; android.view; | 2,080,794 |
List<User> getSpecificUsersByUser(PerunSession sess, User user) throws UserNotExistsException, PrivilegeException, NotSpecificUserExpectedException; | List<User> getSpecificUsersByUser(PerunSession sess, User user) throws UserNotExistsException, PrivilegeException, NotSpecificUserExpectedException; | /**
* Return all specificUsers who are owned by the user
*
* @param sess
* @param user the user
* @return list of specific users who are owned by the user
* @throws InternalErrorException
* @throws UserNotExistsException
* @throws PrivilegeException
* @throws NotSpecificUserExpectedException when the ... | Return all specificUsers who are owned by the user | getSpecificUsersByUser | {
"repo_name": "balcirakpeter/perun",
"path": "perun-core/src/main/java/cz/metacentrum/perun/core/api/UsersManager.java",
"license": "bsd-2-clause",
"size": 50685
} | [
"cz.metacentrum.perun.core.api.exceptions.NotSpecificUserExpectedException",
"cz.metacentrum.perun.core.api.exceptions.PrivilegeException",
"cz.metacentrum.perun.core.api.exceptions.UserNotExistsException",
"java.util.List"
] | import cz.metacentrum.perun.core.api.exceptions.NotSpecificUserExpectedException; import cz.metacentrum.perun.core.api.exceptions.PrivilegeException; import cz.metacentrum.perun.core.api.exceptions.UserNotExistsException; import java.util.List; | import cz.metacentrum.perun.core.api.exceptions.*; import java.util.*; | [
"cz.metacentrum.perun",
"java.util"
] | cz.metacentrum.perun; java.util; | 257,828 |
public Observable<ServiceResponseWithHeaders<Void, LROSADsDeleteAsyncRelativeRetryNoStatusHeadersInner>> deleteAsyncRelativeRetryNoStatusWithServiceResponseAsync() {
Observable<Response<ResponseBody>> observable = service.deleteAsyncRelativeRetryNoStatus(this.client.acceptLanguage(), this.client.userAgent()... | Observable<ServiceResponseWithHeaders<Void, LROSADsDeleteAsyncRelativeRetryNoStatusHeadersInner>> function() { Observable<Response<ResponseBody>> observable = service.deleteAsyncRelativeRetryNoStatus(this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultWithHeadersA... | /**
* Long running delete request, service returns a 202 to the initial request. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status.
*
* @return the observable for the request
*/ | Long running delete request, service returns a 202 to the initial request. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status | deleteAsyncRelativeRetryNoStatusWithServiceResponseAsync | {
"repo_name": "matthchr/autorest",
"path": "src/generator/AutoRest.Java.Azure.Fluent.Tests/src/main/java/fixtures/lro/implementation/LROSADsInner.java",
"license": "mit",
"size": 277083
} | [
"com.google.common.reflect.TypeToken",
"com.microsoft.rest.ServiceResponseWithHeaders"
] | import com.google.common.reflect.TypeToken; import com.microsoft.rest.ServiceResponseWithHeaders; | import com.google.common.reflect.*; import com.microsoft.rest.*; | [
"com.google.common",
"com.microsoft.rest"
] | com.google.common; com.microsoft.rest; | 1,217,979 |
public void verifyPathSecurityParameters() throws TCTokenException {
try {
if (token.getPathSecurityProtocol().equals("urn:ietf:rfc:4279")
|| token.getPathSecurityProtocol().equals("urn:ietf:rfc:5487")) {
TCTokenType.PathSecurityParameters psp = token.getPathSecurityParameters();
if (!checkEmpty(psp... | void function() throws TCTokenException { try { if (token.getPathSecurityProtocol().equals(STR) token.getPathSecurityProtocol().equals(STR)) { TCTokenType.PathSecurityParameters psp = token.getPathSecurityParameters(); if (!checkEmpty(psp)) { assertRequired(psp.getPSK()); checkPSKLength(ByteUtils.toHexString(psp.getPSK... | /**
* Verifies the PathSecurity-Parameter element of the TCToken.
*
* @throws TCTokenException
*/ | Verifies the PathSecurity-Parameter element of the TCToken | verifyPathSecurityParameters | {
"repo_name": "adelapie/open-ecard-IRMA",
"path": "addons/tr03112/src/main/java/org/openecard/control/module/tctoken/TCTokenVerifier.java",
"license": "apache-2.0",
"size": 6487
} | [
"org.openecard.common.util.ByteUtils"
] | import org.openecard.common.util.ByteUtils; | import org.openecard.common.util.*; | [
"org.openecard.common"
] | org.openecard.common; | 2,269,388 |
public void updateTime(String columnName, java.sql.Time x)
throws SQLException {
updateTime(findColumn(columnName), x);
}
| void function(String columnName, java.sql.Time x) throws SQLException { updateTime(findColumn(columnName), x); } | /**
* JDBC 2.0 Update a column with a Time value. The updateXXX() methods are
* used to update column values in the current row, or the insert row. The
* updateXXX() methods do not update the underlying database, instead the
* updateRow() or insertRow() methods are called to update the database.
*
* @param... | JDBC 2.0 Update a column with a Time value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database | updateTime | {
"repo_name": "shubhanshu-gupta/Apache-Solr",
"path": "example/solr/collection1/lib/mysql-connector-java-5.1.32/src/com/mysql/jdbc/ResultSetImpl.java",
"license": "apache-2.0",
"size": 247329
} | [
"java.sql.SQLException",
"java.sql.Time"
] | import java.sql.SQLException; import java.sql.Time; | import java.sql.*; | [
"java.sql"
] | java.sql; | 545,815 |
public static ByteBuf copiedBuffer(char[] array, Charset charset) {
if (array == null) {
throw new NullPointerException("array");
}
return copiedBuffer(array, 0, array.length, charset);
} | static ByteBuf function(char[] array, Charset charset) { if (array == null) { throw new NullPointerException("array"); } return copiedBuffer(array, 0, array.length, charset); } | /**
* Creates a new big-endian buffer whose content is the specified
* {@code array} encoded in the specified {@code charset}.
* The new buffer's {@code readerIndex} and {@code writerIndex} are
* {@code 0} and the length of the encoded string respectively.
*/ | Creates a new big-endian buffer whose content is the specified array encoded in the specified charset. The new buffer's readerIndex and writerIndex are 0 and the length of the encoded string respectively | copiedBuffer | {
"repo_name": "jongyeol/netty",
"path": "buffer/src/main/java/io/netty/buffer/Unpooled.java",
"license": "apache-2.0",
"size": 30606
} | [
"java.nio.charset.Charset"
] | import java.nio.charset.Charset; | import java.nio.charset.*; | [
"java.nio"
] | java.nio; | 1,099,000 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<ExpressRoutePortInner>> getByResourceGroupWithResponseAsync(
String resourceGroupName, String expressRoutePortName, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<ExpressRoutePortInner>> function( String resourceGroupName, String expressRoutePortName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (this.client.getSubscriptionId() == null) { return ... | /**
* Retrieves the requested ExpressRoutePort resource.
*
* @param resourceGroupName The name of the resource group.
* @param expressRoutePortName The name of ExpressRoutePort.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if para... | Retrieves the requested ExpressRoutePort resource | getByResourceGroupWithResponseAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRoutePortsClientImpl.java",
"license": "mit",
"size": 68799
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context",
"com.azure.resourcemanager.network.fluent.models.ExpressRoutePortInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.network.fluent.models.ExpressRoutePortInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.network.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,344,706 |
public void handleActionEvent(ActionEvent arg0) {
if (arg0.getActionCommand().equals(ActionCommands.GENERIC_TIMER)) {
// Show help on perks
if ((perkListSelection==0) || (perkListSelection==2)) {
if (!csPerkSelectionListUpdate()) {
csPerkActiveListUpdate();
}
... | void function(ActionEvent arg0) { if (arg0.getActionCommand().equals(ActionCommands.GENERIC_TIMER)) { if ((perkListSelection==0) (perkListSelection==2)) { if (!csPerkSelectionListUpdate()) { csPerkActiveListUpdate(); } } else { if (!csPerkActiveListUpdate()) { csPerkSelectionListUpdate(); } } int index = itemList.getSe... | /**
* Handle Character Sheet Action event
* @param arg0 ActionEvent
*/ | Handle Character Sheet Action event | handleActionEvent | {
"repo_name": "tuomount/JHeroes",
"path": "src/org/jheroes/game/GameCharacterSheet.java",
"license": "gpl-2.0",
"size": 41516
} | [
"java.awt.event.ActionEvent",
"org.jheroes.gui.ActionCommands",
"org.jheroes.map.Party",
"org.jheroes.map.item.Item"
] | import java.awt.event.ActionEvent; import org.jheroes.gui.ActionCommands; import org.jheroes.map.Party; import org.jheroes.map.item.Item; | import java.awt.event.*; import org.jheroes.gui.*; import org.jheroes.map.*; import org.jheroes.map.item.*; | [
"java.awt",
"org.jheroes.gui",
"org.jheroes.map"
] | java.awt; org.jheroes.gui; org.jheroes.map; | 1,785,141 |
public XWPFTable getTable(CTTbl ctTable) {
for (XWPFTable table : tables) {
if (table == null)
return null;
if (table.getCTTbl().equals(ctTable))
return table;
}
return null;
} | XWPFTable function(CTTbl ctTable) { for (XWPFTable table : tables) { if (table == null) return null; if (table.getCTTbl().equals(ctTable)) return table; } return null; } | /**
* if there is a corresponding {@link XWPFTable} of the parameter ctTable in the tableList of this header
* the method will return this table
* if there is no corresponding {@link XWPFTable} the method will return null
*
* @param ctTable
*/ | if there is a corresponding <code>XWPFTable</code> of the parameter ctTable in the tableList of this header the method will return this table if there is no corresponding <code>XWPFTable</code> the method will return null | getTable | {
"repo_name": "lvweiwolf/poi-3.16",
"path": "src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFHeaderFooter.java",
"license": "apache-2.0",
"size": 19887
} | [
"org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl"
] | import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl; | import org.openxmlformats.schemas.wordprocessingml.x2006.main.*; | [
"org.openxmlformats.schemas"
] | org.openxmlformats.schemas; | 2,287,785 |
public JSONArray put(Hashtable value) {
put(new JSONObject(value));
return this;
}
| JSONArray function(Hashtable value) { put(new JSONObject(value)); return this; } | /**
* Put a value in the JSONArray, where the value will be a
* JSONObject which is produced from a Map.
* @param value A Map value.
* @return this.
*/ | Put a value in the JSONArray, where the value will be a JSONObject which is produced from a Map | put | {
"repo_name": "matias-pequeno/ikea-calc-j2me-java",
"path": "lib/src/com/mxme/json/JSONArray.java",
"license": "gpl-2.0",
"size": 26204
} | [
"java.util.Hashtable"
] | import java.util.Hashtable; | import java.util.*; | [
"java.util"
] | java.util; | 181,244 |
public Operand popAddress() {
Operand r = pop();
if (VM.VerifyAssertions) VM._assert(r.isAddress());
return r;
} | Operand function() { Operand r = pop(); if (VM.VerifyAssertions) VM._assert(r.isAddress()); return r; } | /**
* Pop a ref operand from the stack.
*/ | Pop a ref operand from the stack | popAddress | {
"repo_name": "CodeOffloading/JikesRVM-CCO",
"path": "jikesrvm-3.1.3/rvm/src/org/jikesrvm/compilers/opt/bc2ir/BC2IR.java",
"license": "epl-1.0",
"size": 176758
} | [
"org.jikesrvm.compilers.opt.ir.operand.Operand"
] | import org.jikesrvm.compilers.opt.ir.operand.Operand; | import org.jikesrvm.compilers.opt.ir.operand.*; | [
"org.jikesrvm.compilers"
] | org.jikesrvm.compilers; | 730,939 |
private void mutateOnce() {
boolean succesfulMutation = false;
while (!succesfulMutation) {
succesfulMutation = true;
try {
random.choose(mutators).run();
} catch (UnsupportedOperationException | GraphRuntimeException | GraphGeneratorException
... | void function() { boolean succesfulMutation = false; while (!succesfulMutation) { succesfulMutation = true; try { random.choose(mutators).run(); } catch (UnsupportedOperationException GraphRuntimeException GraphGeneratorException ClassCastException e) { succesfulMutation = false; } } } | /**
* Mutate the graph being generated by calling a random method on it.
*/ | Mutate the graph being generated by calling a random method on it | mutateOnce | {
"repo_name": "mikonapoli/grakn",
"path": "grakn-graph/src/test/java/ai/grakn/generator/GraknGraphs.java",
"license": "gpl-3.0",
"size": 8302
} | [
"ai.grakn.exception.GraphRuntimeException"
] | import ai.grakn.exception.GraphRuntimeException; | import ai.grakn.exception.*; | [
"ai.grakn.exception"
] | ai.grakn.exception; | 1,145,742 |
public static HTTPMessageObject processResubscribe(HTTPParser httpParser, Device device)
{
InetSocketAddress serverAddress = httpParser.getHTTPMessageObject().getDestinationAddress();
// retrieve URL from request
URL parameterURL = httpParser.getRequestURL();
if (parameterURL == null)
{
r... | static HTTPMessageObject function(HTTPParser httpParser, Device device) { InetSocketAddress serverAddress = httpParser.getHTTPMessageObject().getDestinationAddress(); URL parameterURL = httpParser.getRequestURL(); if (parameterURL == null) { return new HTTPMessageObject(HTTPConstant.HTTP_ERROR_503, serverAddress); } St... | /**
* Processes a resubscription message.
*
* @param httpParser
* Associated parser
* @param device
* The device that received the resubscription request
*
* @return HTTP OK if message was correct otherwise returns the corresponding HTTP error message
*/ | Processes a resubscription message | processResubscribe | {
"repo_name": "fraunhoferfokus/fokus-upnp",
"path": "upnp-core/src/main/java/de/fraunhofer/fokus/upnp/core/device/DeviceSubscribeMessageProcessor.java",
"license": "gpl-3.0",
"size": 10178
} | [
"de.fraunhofer.fokus.upnp.gena.GENAConstant",
"de.fraunhofer.fokus.upnp.gena.GENAMessageBuilder",
"de.fraunhofer.fokus.upnp.http.HTTPConstant",
"de.fraunhofer.fokus.upnp.http.HTTPParser",
"de.fraunhofer.fokus.upnp.util.network.HTTPMessageObject",
"java.net.InetSocketAddress"
] | import de.fraunhofer.fokus.upnp.gena.GENAConstant; import de.fraunhofer.fokus.upnp.gena.GENAMessageBuilder; import de.fraunhofer.fokus.upnp.http.HTTPConstant; import de.fraunhofer.fokus.upnp.http.HTTPParser; import de.fraunhofer.fokus.upnp.util.network.HTTPMessageObject; import java.net.InetSocketAddress; | import de.fraunhofer.fokus.upnp.gena.*; import de.fraunhofer.fokus.upnp.http.*; import de.fraunhofer.fokus.upnp.util.network.*; import java.net.*; | [
"de.fraunhofer.fokus",
"java.net"
] | de.fraunhofer.fokus; java.net; | 1,348,774 |
public Packet executeCommand() {
if (isReady) {
Packet value = this.currentCommand;
this.currentCommand = null;
this.isReady = false;
return value;
} else
return null;
} | Packet function() { if (isReady) { Packet value = this.currentCommand; this.currentCommand = null; this.isReady = false; return value; } else return null; } | /**
* We execute command from other thread, so we take the current command
* packet and send it. Set it to null afterwards
*/ | We execute command from other thread, so we take the current command packet and send it. Set it to null afterwards | executeCommand | {
"repo_name": "LongNguyenHoang89/Hedwig",
"path": "src/JHarry/src/fi/aalto/cse/harry/controller/CommandFactory.java",
"license": "gpl-2.0",
"size": 1654
} | [
"fi.aalto.cse.harry.protocol.Packet"
] | import fi.aalto.cse.harry.protocol.Packet; | import fi.aalto.cse.harry.protocol.*; | [
"fi.aalto.cse"
] | fi.aalto.cse; | 2,294,138 |
public static void addNoCacheToWebAppRequest(String servletPath, HttpServletResponse response) {
if (servletPath.indexOf(HttpUtils.ANGULAR_WEBAPP) != -1) {
response.setHeader("Cache-Control", "no-cache, no-store");
}
} | static void function(String servletPath, HttpServletResponse response) { if (servletPath.indexOf(HttpUtils.ANGULAR_WEBAPP) != -1) { response.setHeader(STR, STR); } } | /**
* add no cache and no store header to response in order to avoid java script caching on browser
*
* @param servletPath - http servlet path
* @param response - http servlet response
*/ | add no cache and no store header to response in order to avoid java script caching on browser | addNoCacheToWebAppRequest | {
"repo_name": "alancnet/artifactory",
"path": "web/application/src/main/java/org/artifactory/webapp/servlet/RequestUtils.java",
"license": "apache-2.0",
"size": 11782
} | [
"javax.servlet.http.HttpServletResponse",
"org.artifactory.util.HttpUtils"
] | import javax.servlet.http.HttpServletResponse; import org.artifactory.util.HttpUtils; | import javax.servlet.http.*; import org.artifactory.util.*; | [
"javax.servlet",
"org.artifactory.util"
] | javax.servlet; org.artifactory.util; | 2,900,884 |
@Override
public Usage getUsageByAPI(APIIdentifier apiIdentifier) {
return null;
} | Usage function(APIIdentifier apiIdentifier) { return null; } | /**
* Return Usage of given APIIdentifier
*
* @param apiIdentifier APIIdentifier
* @return Usage
*/ | Return Usage of given APIIdentifier | getUsageByAPI | {
"repo_name": "tharikaGitHub/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIProviderImpl.java",
"license": "apache-2.0",
"size": 497958
} | [
"org.wso2.carbon.apimgt.api.model.APIIdentifier",
"org.wso2.carbon.apimgt.api.model.Usage"
] | import org.wso2.carbon.apimgt.api.model.APIIdentifier; import org.wso2.carbon.apimgt.api.model.Usage; | import org.wso2.carbon.apimgt.api.model.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 2,403,319 |
@Nonnull
public static <A extends SourceFileBase> A fromFile(
@Nonnull final File inputFile,
@Nonnull final Class<A> aClass) {
final Function<File, A> transformFunction = getTransformFunction
(aClass);
final A sourceFile = transformFunction.apply(inputFile... | static <A extends SourceFileBase> A function( @Nonnull final File inputFile, @Nonnull final Class<A> aClass) { final Function<File, A> transformFunction = getTransformFunction (aClass); final A sourceFile = transformFunction.apply(inputFile); if (sourceFile != null) { return sourceFile; } throw new NullPointerException... | /**
* Convert a File object into a source file.
* <p/>
* Example:
* <code>
* File inputFile = ...;
* GssSourceFile = SourceFileBase.fromFile(inputFile, GssSourceFile.class);
* </code>
*
* @param inputFile
* @param aClass
* @return
*/ | Convert a File object into a source file. Example: <code> File inputFile = ...; GssSourceFile = SourceFileBase.fromFile(inputFile, GssSourceFile.class); </code> | fromFile | {
"repo_name": "StefanLiebenberg/closure-utilities",
"path": "src/main/java/slieb/closure/build/internal/SourceFileBase.java",
"license": "mit",
"size": 5223
} | [
"com.google.common.base.Function",
"java.io.File",
"javax.annotation.Nonnull"
] | import com.google.common.base.Function; import java.io.File; import javax.annotation.Nonnull; | import com.google.common.base.*; import java.io.*; import javax.annotation.*; | [
"com.google.common",
"java.io",
"javax.annotation"
] | com.google.common; java.io; javax.annotation; | 780,940 |
private String generateURLEncodedSignature(String query) throws CloneNotSupportedException, UnsupportedEncodingException {
final MessageDigest digester = (MessageDigest) digest.clone();
digester.reset();
final String urlEncodedSignature = URLEncoder.encode(new String(Base64.encode(digester.digest(query.g... | String function(String query) throws CloneNotSupportedException, UnsupportedEncodingException { final MessageDigest digester = (MessageDigest) digest.clone(); digester.reset(); final String urlEncodedSignature = URLEncoder.encode(new String(Base64.encode(digester.digest(query.getBytes("UTF-8"))), "UTF-8").substring(0, ... | /**
* URL encodes the query and digest for transportation.
*
* @param query The query string.
* @return The URL encoded query string.
* @throws CloneNotSupportedException
* @throws UnsupportedEncodingException
*/ | URL encodes the query and digest for transportation | generateURLEncodedSignature | {
"repo_name": "ooyala/Ooyala-AdobeCQ",
"path": "core/src/main/java/com/siteworx/cq5/ooyala/client/OoyalaClient.java",
"license": "bsd-2-clause",
"size": 10808
} | [
"com.sun.jersey.core.util.Base64",
"java.io.UnsupportedEncodingException",
"java.net.URLEncoder",
"java.security.MessageDigest"
] | import com.sun.jersey.core.util.Base64; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import java.security.MessageDigest; | import com.sun.jersey.core.util.*; import java.io.*; import java.net.*; import java.security.*; | [
"com.sun.jersey",
"java.io",
"java.net",
"java.security"
] | com.sun.jersey; java.io; java.net; java.security; | 1,623,863 |
private TripleCollection getRdfQuery(double [] coordinates, double radius, String startDate) {
TripleCollection rdf = new SimpleMGraph();
String lat = String.valueOf(coordinates[0]);
String lon = String.valueOf(coordinates[1]);
String rad = String.valueOf(radius);
UriRef posi... | TripleCollection function(double [] coordinates, double radius, String startDate) { TripleCollection rdf = new SimpleMGraph(); String lat = String.valueOf(coordinates[0]); String lon = String.valueOf(coordinates[1]); String rad = String.valueOf(radius); UriRef positionUri = new UriRef(STR); UriRef circleUri = new UriRe... | /**
* Puts the input information about position and start date into RDF.
* @param coordinates
* @param radius
* @param startDate
* @return
*/ | Puts the input information about position and start date into RDF | getRdfQuery | {
"repo_name": "fusepoolP3/p3-spatialsearch-demo",
"path": "src/main/java/eu/fusepool/p3/spatial/demo/SpatialSearchServlet.java",
"license": "apache-2.0",
"size": 6120
} | [
"org.apache.clerezza.rdf.core.TripleCollection",
"org.apache.clerezza.rdf.core.UriRef",
"org.apache.clerezza.rdf.core.impl.PlainLiteralImpl",
"org.apache.clerezza.rdf.core.impl.SimpleMGraph",
"org.apache.clerezza.rdf.core.impl.TripleImpl",
"org.apache.clerezza.rdf.core.impl.TypedLiteralImpl"
] | import org.apache.clerezza.rdf.core.TripleCollection; import org.apache.clerezza.rdf.core.UriRef; import org.apache.clerezza.rdf.core.impl.PlainLiteralImpl; import org.apache.clerezza.rdf.core.impl.SimpleMGraph; import org.apache.clerezza.rdf.core.impl.TripleImpl; import org.apache.clerezza.rdf.core.impl.TypedLiteralIm... | import org.apache.clerezza.rdf.core.*; import org.apache.clerezza.rdf.core.impl.*; | [
"org.apache.clerezza"
] | org.apache.clerezza; | 836,613 |
public static <T> T getCatchableFieldFromReflection(String fieldName, Class<?> containingClass, Object containterInstance, Class<T> type)
throws NoSuchFieldException {
try {
Field desiredField = containingClass.getDeclaredField(fieldName);
desiredField.setAccessible(true)... | static <T> T function(String fieldName, Class<?> containingClass, Object containterInstance, Class<T> type) throws NoSuchFieldException { try { Field desiredField = containingClass.getDeclaredField(fieldName); desiredField.setAccessible(true); return type.cast(desiredField.get(containterInstance)); } catch (IllegalArgu... | /**
* Helper method to Perform Reflection to Get non-static Field of Provided Type. Field is assumed Private.
*
* @param fieldName
* @param type
* @return
*/ | Helper method to Perform Reflection to Get non-static Field of Provided Type. Field is assumed Private | getCatchableFieldFromReflection | {
"repo_name": "soultek101/projectzulu1.7.10",
"path": "src/main/java/com/stek101/projectzulu/common/core/ObfuscationHelper.java",
"license": "lgpl-2.1",
"size": 15396
} | [
"java.lang.reflect.Field"
] | import java.lang.reflect.Field; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 2,017,364 |
@Test()
public void testCannotGetConnection()
throws Exception
{
final String[] args =
{
"--hostname", "127.0.0.1",
"--port", String.valueOf(successDS.getListenPort()),
"--bindDN", "cn=Directory Manager",
"--bindPassword", "wrong",
"--otp", "YubiKeyOTP"
};
f... | @Test() void function() throws Exception { final String[] args = { STR, STR, STR, String.valueOf(successDS.getListenPort()), STR, STR, STR, "wrong", "--otp", STR }; final ResultCode rc = RegisterYubiKeyOTPDevice.main(args, null, null); assertEquals(rc, ResultCode.INVALID_CREDENTIALS); } | /**
* Tests the behavior when when the tool is unable to get a connection to the
* target server.
*
* @throws Exception If an unexpected problem occurs.
*/ | Tests the behavior when when the tool is unable to get a connection to the target server | testCannotGetConnection | {
"repo_name": "UnboundID/ldapsdk",
"path": "tests/unit/src/com/unboundid/ldap/sdk/unboundidds/RegisterYubiKeyOTPDeviceTestCase.java",
"license": "gpl-2.0",
"size": 15201
} | [
"com.unboundid.ldap.sdk.ResultCode",
"org.testng.annotations.Test"
] | import com.unboundid.ldap.sdk.ResultCode; import org.testng.annotations.Test; | import com.unboundid.ldap.sdk.*; import org.testng.annotations.*; | [
"com.unboundid.ldap",
"org.testng.annotations"
] | com.unboundid.ldap; org.testng.annotations; | 2,527,284 |
void removeAllQuotas(Connection conn) throws IOException {
// Wait for the quota table to be created
if (!conn.getAdmin().tableExists(QuotaUtil.QUOTA_TABLE_NAME)) {
waitForQuotaTable(conn);
} else {
// Or, clean up any quotas from previous test runs.
QuotaRetriever scanner = QuotaRetriev... | void removeAllQuotas(Connection conn) throws IOException { if (!conn.getAdmin().tableExists(QuotaUtil.QUOTA_TABLE_NAME)) { waitForQuotaTable(conn); } else { QuotaRetriever scanner = QuotaRetriever.open(conn.getConfiguration()); try { for (QuotaSettings quotaSettings : scanner) { final String namespace = quotaSettings.g... | /**
* Removes all quotas defined in the HBase quota table.
*/ | Removes all quotas defined in the HBase quota table | removeAllQuotas | {
"repo_name": "mahak/hbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/SpaceQuotaHelperForTests.java",
"license": "apache-2.0",
"size": 27369
} | [
"java.io.IOException",
"org.apache.hadoop.hbase.TableName",
"org.apache.hadoop.hbase.client.Connection"
] | import java.io.IOException; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.client.Connection; | import java.io.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.client.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,442,652 |
void addQueryParts(CmsSolrQuery query, CmsObject cms); | void addQueryParts(CmsSolrQuery query, CmsObject cms); | /** Generate the Solr query part specific for the controller, e.g., the part for a field facet.
* @param query A, possibly empty, query, where further query parts are added
* @param cms the current context to resolve context-specific macros.
*/ | Generate the Solr query part specific for the controller, e.g., the part for a field facet | addQueryParts | {
"repo_name": "alkacon/opencms-core",
"path": "src/org/opencms/jsp/search/controller/I_CmsSearchController.java",
"license": "lgpl-2.1",
"size": 3181
} | [
"org.opencms.file.CmsObject",
"org.opencms.search.solr.CmsSolrQuery"
] | import org.opencms.file.CmsObject; import org.opencms.search.solr.CmsSolrQuery; | import org.opencms.file.*; import org.opencms.search.solr.*; | [
"org.opencms.file",
"org.opencms.search"
] | org.opencms.file; org.opencms.search; | 1,153,477 |
return new ThriftWritable<M>(new TypeRef<M>(tClass){});
}
public ThriftWritable() {
super(null, null);
}
public ThriftWritable(TypeRef<M> typeRef) {
this(null, typeRef);
}
public ThriftWritable(M message, TypeRef<M> typeRef) {
super(message, new ThriftConverter<M>(typeRef));
} | return new ThriftWritable<M>(new TypeRef<M>(tClass){}); } public ThriftWritable() { super(null, null); } public ThriftWritable(TypeRef<M> typeRef) { this(null, typeRef); } public ThriftWritable(M message, TypeRef<M> typeRef) { super(message, new ThriftConverter<M>(typeRef)); } | /**
* Returns a ThriftWritable for a given Thrift class.
*/ | Returns a ThriftWritable for a given Thrift class | newInstance | {
"repo_name": "ketralnis/elephant-bird",
"path": "src/java/com/twitter/elephantbird/mapreduce/io/ThriftWritable.java",
"license": "apache-2.0",
"size": 851
} | [
"com.twitter.elephantbird.util.TypeRef"
] | import com.twitter.elephantbird.util.TypeRef; | import com.twitter.elephantbird.util.*; | [
"com.twitter.elephantbird"
] | com.twitter.elephantbird; | 939,691 |
private void createLinkedinLabels(LinkedInPerson linkedInPerson,
Resource linkedinIndividual) {
// getting profile URL
String publicProfileUrl = linkedInPerson.getPerson()
.getPublicProfileUrl();
// creating foaf:page property of linkedinIndividual
createProperty(linkedinIndividual,
CommonOntolog... | void function(LinkedInPerson linkedInPerson, Resource linkedinIndividual) { String publicProfileUrl = linkedInPerson.getPerson() .getPublicProfileUrl(); createProperty(linkedinIndividual, CommonOntologyVocabulary.FOAF_PAGE_PRP_URI, createDocumentIndv(publicProfileUrl)); String pictureUrl = linkedInPerson.getPerson().ge... | /**
* creating RDFS label, profile URL, and profile pricute URL properties of
* linkedin individual
*
* @param linkedInPerson
* @param linkedinIndividual
*/ | creating RDFS label, profile URL, and profile pricute URL properties of linkedin individual | createLinkedinLabels | {
"repo_name": "GalaksiyaIT/socialcrawler",
"path": "src/com/galaksiya/social/fetcher/LinkedinIndividualCreator.java",
"license": "apache-2.0",
"size": 12070
} | [
"com.galaksiya.social.entity.LinkedInPerson",
"com.galaksiya.social.ontology.vocabulary.CommonOntologyVocabulary",
"com.hp.hpl.jena.rdf.model.Resource"
] | import com.galaksiya.social.entity.LinkedInPerson; import com.galaksiya.social.ontology.vocabulary.CommonOntologyVocabulary; import com.hp.hpl.jena.rdf.model.Resource; | import com.galaksiya.social.entity.*; import com.galaksiya.social.ontology.vocabulary.*; import com.hp.hpl.jena.rdf.model.*; | [
"com.galaksiya.social",
"com.hp.hpl"
] | com.galaksiya.social; com.hp.hpl; | 1,755,164 |
public static URL getActorUrl(String actorId, int count) throws TrailerAddictException {
return getActorUrl(actorId, count, DEFAULT_INT);
} | static URL function(String actorId, int count) throws TrailerAddictException { return getActorUrl(actorId, count, DEFAULT_INT); } | /**
* Get the Actor URL with the default width
*
* @param actorId
* @param count
* @return
* @throws TrailerAddictException
*/ | Get the Actor URL with the default width | getActorUrl | {
"repo_name": "Omertron/api-traileraddict",
"path": "src/main/java/com/omertron/traileraddictapi/tools/ApiBuilder.java",
"license": "gpl-3.0",
"size": 9371
} | [
"com.omertron.traileraddictapi.TrailerAddictException"
] | import com.omertron.traileraddictapi.TrailerAddictException; | import com.omertron.traileraddictapi.*; | [
"com.omertron.traileraddictapi"
] | com.omertron.traileraddictapi; | 2,703,588 |
public boolean mustWait(Long seconds) {
Date now = new Date();
return now.getTime() > (lastModified + (seconds * 1000L));
}
| boolean function(Long seconds) { Date now = new Date(); return now.getTime() > (lastModified + (seconds * 1000L)); } | /**
* Check if wait time exceeded.
* @param seconds wait time in seconds
* @return true if wait time not exceeded
*/ | Check if wait time exceeded | mustWait | {
"repo_name": "patlau/vssj-plugin",
"path": "src/main/java/org/jenkinsci/plugins/vssj/VssRevisionState.java",
"license": "mit",
"size": 3832
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,411,311 |
protected void onException(String message, Throwable ex)
{
activity.notifyError("Unable to download the file", message, ex);
}
FilesLoader(UserNotifier viewer, Registry reg,
Map<FileAnnotationData, File> files, ActivityComponent activity)
{
super(viewer, reg, activity);
if (files == n... | void function(String message, Throwable ex) { activity.notifyError(STR, message, ex); } FilesLoader(UserNotifier viewer, Registry reg, Map<FileAnnotationData, File> files, ActivityComponent activity) { super(viewer, reg, activity); if (files == null files.size() == 0) throw new IllegalArgumentException(STR); this.files... | /**
* Notifies that an error occurred.
* @see UserNotifierLoader#onException(String, Throwable)
*/ | Notifies that an error occurred | onException | {
"repo_name": "joshmoore/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/env/ui/FilesLoader.java",
"license": "gpl-2.0",
"size": 5173
} | [
"java.io.File",
"java.util.ArrayList",
"java.util.Map",
"org.openmicroscopy.shoola.env.config.Registry"
] | import java.io.File; import java.util.ArrayList; import java.util.Map; import org.openmicroscopy.shoola.env.config.Registry; | import java.io.*; import java.util.*; import org.openmicroscopy.shoola.env.config.*; | [
"java.io",
"java.util",
"org.openmicroscopy.shoola"
] | java.io; java.util; org.openmicroscopy.shoola; | 847,184 |
public View getView(String name) throws IOException {
return client.get("/view/" + encode(name) + "/", View.class);
} | View function(String name) throws IOException { return client.get(STR + encode(name) + "/", View.class); } | /**
* Get a single view object from the server
*
* @param name
* name of the view in Jenkins
* @return the view object
* @throws IOException
*/ | Get a single view object from the server | getView | {
"repo_name": "JasmeenKaur19/jenkins-client",
"path": "src/main/java/com/offbytwo/jenkins/JenkinsServer.java",
"license": "mit",
"size": 11207
} | [
"com.offbytwo.jenkins.model.View",
"java.io.IOException"
] | import com.offbytwo.jenkins.model.View; import java.io.IOException; | import com.offbytwo.jenkins.model.*; import java.io.*; | [
"com.offbytwo.jenkins",
"java.io"
] | com.offbytwo.jenkins; java.io; | 650,667 |
TestSuite suite = new TestSuite(name);
suite.addTestSuite(BatchUpdateTest.class);
return new CleanDatabaseTestSetup(
DatabasePropertyTestSetup.setLockTimeouts(suite, 2, 4))
{
protected void decorateSQL(Statement stmt) throws SQLException
{
... | TestSuite suite = new TestSuite(name); suite.addTestSuite(BatchUpdateTest.class); return new CleanDatabaseTestSetup( DatabasePropertyTestSetup.setLockTimeouts(suite, 2, 4)) { void function(Statement stmt) throws SQLException { stmt.execute(STR); stmt.execute(STR); stmt.execute(STR); stmt.execute(STR); stmt.execute(STR)... | /**
* Creates the tables used in the test cases.
* @exception SQLException if a database error occurs
*/ | Creates the tables used in the test cases | decorateSQL | {
"repo_name": "splicemachine/spliceengine",
"path": "db-testing/src/test/java/com/splicemachine/dbTesting/functionTests/tests/jdbcapi/BatchUpdateTest.java",
"license": "agpl-3.0",
"size": 57585
} | [
"com.splicemachine.dbTesting.junit.CleanDatabaseTestSetup",
"com.splicemachine.dbTesting.junit.DatabasePropertyTestSetup",
"java.sql.SQLException",
"java.sql.Statement",
"junit.framework.TestSuite"
] | import com.splicemachine.dbTesting.junit.CleanDatabaseTestSetup; import com.splicemachine.dbTesting.junit.DatabasePropertyTestSetup; import java.sql.SQLException; import java.sql.Statement; import junit.framework.TestSuite; | import com.splicemachine.*; import java.sql.*; import junit.framework.*; | [
"com.splicemachine",
"java.sql",
"junit.framework"
] | com.splicemachine; java.sql; junit.framework; | 2,602,693 |
@Public
@Stable
public Resource getMinimumResourceCapability(); | Resource function(); | /**
* Get minimum allocatable {@link Resource}.
* @return minimum allocatable resource
*/ | Get minimum allocatable <code>Resource</code> | getMinimumResourceCapability | {
"repo_name": "ronny-macmaster/hadoop",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/YarnScheduler.java",
"license": "apache-2.0",
"size": 12356
} | [
"org.apache.hadoop.yarn.api.records.Resource"
] | import org.apache.hadoop.yarn.api.records.Resource; | import org.apache.hadoop.yarn.api.records.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,421,476 |
int tryReceiveInteger() throws AbnormalCloseException, NormalCloseException; | int tryReceiveInteger() throws AbnormalCloseException, NormalCloseException; | /**
* Trys to receive a single {@link Integer} value from the client.
*
* @return the received int
* @throws NormalCloseException
* When receiving was not possible because the connection the the client was closed in a normal way.
* @throws AbnormalCloseException
* ... | Trys to receive a single <code>Integer</code> value from the client | tryReceiveInteger | {
"repo_name": "rbi/trading4j",
"path": "server/src/main/java/de/voidnode/trading4j/server/protocol/ClientConnection.java",
"license": "gpl-3.0",
"size": 5532
} | [
"de.voidnode.trading4j.server.protocol.exceptions.AbnormalCloseException",
"de.voidnode.trading4j.server.protocol.exceptions.NormalCloseException"
] | import de.voidnode.trading4j.server.protocol.exceptions.AbnormalCloseException; import de.voidnode.trading4j.server.protocol.exceptions.NormalCloseException; | import de.voidnode.trading4j.server.protocol.exceptions.*; | [
"de.voidnode.trading4j"
] | de.voidnode.trading4j; | 1,706,137 |
public Map <Class, StringficationStrategy> getCustomTypeStringficationStrategyMapping() {
return customTypeStringficationStrategyMapping;
} | Map <Class, StringficationStrategy> function() { return customTypeStringficationStrategyMapping; } | /**
* <p>Obtain the custom stringfication strategy by type mapping.</p>
*
* @return Custom stringfication strategy by type mapping
*/ | Obtain the custom stringfication strategy by type mapping | getCustomTypeStringficationStrategyMapping | {
"repo_name": "bsofiato/appworks",
"path": "appworks-core/src/main/java/br/com/appworks/runtime/lang/support/stringfication/DefaultStringficationStrategyFactory.java",
"license": "mpl-2.0",
"size": 16733
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,722,247 |
public TooltipLabelCallback getLabelCallback() {
return labelCallback;
} | TooltipLabelCallback function() { return labelCallback; } | /**
* Returns the user label callback.
*
* @return the labelCallback
*/ | Returns the user label callback | getLabelCallback | {
"repo_name": "pepstock-org/Charba",
"path": "src/org/pepstock/charba/client/configuration/TooltipsCallbacks.java",
"license": "apache-2.0",
"size": 22247
} | [
"org.pepstock.charba.client.callbacks.TooltipLabelCallback"
] | import org.pepstock.charba.client.callbacks.TooltipLabelCallback; | import org.pepstock.charba.client.callbacks.*; | [
"org.pepstock.charba"
] | org.pepstock.charba; | 2,271,177 |
public SkipScanFilter intersect(byte[] lowerInclusiveKey, byte[] upperExclusiveKey) {
List<List<KeyRange>> newSlots = Lists.newArrayListWithCapacity(slots.size());
if (intersect(lowerInclusiveKey, upperExclusiveKey, newSlots)) {
return new SkipScanFilter(newSlots, slotSpan, schema);
... | SkipScanFilter function(byte[] lowerInclusiveKey, byte[] upperExclusiveKey) { List<List<KeyRange>> newSlots = Lists.newArrayListWithCapacity(slots.size()); if (intersect(lowerInclusiveKey, upperExclusiveKey, newSlots)) { return new SkipScanFilter(newSlots, slotSpan, schema); } return null; } | /**
* Intersect the ranges of this filter with the ranges form by lowerInclusive and upperInclusive
* key and filter out the ones that are not included in the region. Return the new intersected
* SkipScanFilter or null if there is no intersection.
*/ | Intersect the ranges of this filter with the ranges form by lowerInclusive and upperInclusive key and filter out the ones that are not included in the region. Return the new intersected SkipScanFilter or null if there is no intersection | intersect | {
"repo_name": "shehzaadn/phoenix",
"path": "phoenix-core/src/main/java/org/apache/phoenix/filter/SkipScanFilter.java",
"license": "apache-2.0",
"size": 31260
} | [
"com.google.common.collect.Lists",
"java.util.List",
"org.apache.phoenix.query.KeyRange"
] | import com.google.common.collect.Lists; import java.util.List; import org.apache.phoenix.query.KeyRange; | import com.google.common.collect.*; import java.util.*; import org.apache.phoenix.query.*; | [
"com.google.common",
"java.util",
"org.apache.phoenix"
] | com.google.common; java.util; org.apache.phoenix; | 1,029,126 |
private Server newServer() throws CertificateException, IOException {
File serverCertChainFile = TestUtils.loadCert("server1.pem");
File serverPrivateKeyFile = TestUtils.loadCert("server1.key");
X509Certificate[] serverTrustedCaCerts = {
TestUtils.loadX509Cert("ca.pem")
};
SslContext sslCon... | Server function() throws CertificateException, IOException { File serverCertChainFile = TestUtils.loadCert(STR); File serverPrivateKeyFile = TestUtils.loadCert(STR); X509Certificate[] serverTrustedCaCerts = { TestUtils.loadX509Cert(STR) }; SslContext sslContext = GrpcSslContexts.forServer(serverCertChainFile, serverPri... | /**
* Creates and starts a new {@link TestServiceImpl} server.
*/ | Creates and starts a new <code>TestServiceImpl</code> server | newServer | {
"repo_name": "louiscryan/grpc-java",
"path": "interop-testing/src/test/java/io/grpc/testing/integration/ConcurrencyTest.java",
"license": "bsd-3-clause",
"size": 9179
} | [
"io.grpc.Server",
"io.grpc.netty.GrpcSslContexts",
"io.grpc.netty.NettyServerBuilder",
"io.grpc.testing.TestUtils",
"io.netty.handler.ssl.ClientAuth",
"io.netty.handler.ssl.SslContext",
"java.io.File",
"java.io.IOException",
"java.security.cert.CertificateException",
"java.security.cert.X509Certif... | import io.grpc.Server; import io.grpc.netty.GrpcSslContexts; import io.grpc.netty.NettyServerBuilder; import io.grpc.testing.TestUtils; import io.netty.handler.ssl.ClientAuth; import io.netty.handler.ssl.SslContext; import java.io.File; import java.io.IOException; import java.security.cert.CertificateException; import ... | import io.grpc.*; import io.grpc.netty.*; import io.grpc.testing.*; import io.netty.handler.ssl.*; import java.io.*; import java.security.cert.*; | [
"io.grpc",
"io.grpc.netty",
"io.grpc.testing",
"io.netty.handler",
"java.io",
"java.security"
] | io.grpc; io.grpc.netty; io.grpc.testing; io.netty.handler; java.io; java.security; | 1,961,865 |
public void modifySchemaSubentry( ModifyOperationContext modifyContext, boolean doCascadeModify )
throws LdapException
{
DirectoryService directoryService = modifyContext.getSession().getDirectoryService();
// Compute the next interceptor for the Add and Delete operation, starting from
... | void function( ModifyOperationContext modifyContext, boolean doCascadeModify ) throws LdapException { DirectoryService directoryService = modifyContext.getSession().getDirectoryService(); Interceptor nextAdd = findNextInterceptor( OperationEnum.ADD, directoryService ); int positionAdd = findPosition( OperationEnum.ADD,... | /**
* Update the SubschemaSubentry with all the modifications
*/ | Update the SubschemaSubentry with all the modifications | modifySchemaSubentry | {
"repo_name": "drankye/directory-server",
"path": "interceptors/schema/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryManager.java",
"license": "apache-2.0",
"size": 22465
} | [
"org.apache.directory.api.ldap.model.entry.Attribute",
"org.apache.directory.api.ldap.model.entry.Modification",
"org.apache.directory.api.ldap.model.exception.LdapException",
"org.apache.directory.api.ldap.model.exception.LdapUnwillingToPerformException",
"org.apache.directory.api.ldap.model.message.Result... | import org.apache.directory.api.ldap.model.entry.Attribute; import org.apache.directory.api.ldap.model.entry.Modification; import org.apache.directory.api.ldap.model.exception.LdapException; import org.apache.directory.api.ldap.model.exception.LdapUnwillingToPerformException; import org.apache.directory.api.ldap.model.... | import org.apache.directory.api.ldap.model.entry.*; import org.apache.directory.api.ldap.model.exception.*; import org.apache.directory.api.ldap.model.message.*; import org.apache.directory.server.core.api.*; import org.apache.directory.server.core.api.interceptor.*; import org.apache.directory.server.core.api.intercep... | [
"org.apache.directory"
] | org.apache.directory; | 2,214,049 |
public void remove(Entry<T> entry) {
Integer hash = hashFunction.hash(entry.getKey());
Iterator<Entry<T>> iterator = data.get(hash).iterator();
while (iterator.hasNext()) {
Entry<T> e = iterator.next();
if (e.getValue().equals(entry.getValue())) {
iterator.remove();
break;
}
}
} | void function(Entry<T> entry) { Integer hash = hashFunction.hash(entry.getKey()); Iterator<Entry<T>> iterator = data.get(hash).iterator(); while (iterator.hasNext()) { Entry<T> e = iterator.next(); if (e.getValue().equals(entry.getValue())) { iterator.remove(); break; } } } | /**
* Removes the.
*
* @param entry the entry
*/ | Removes the | remove | {
"repo_name": "andres1537/ml-java",
"path": "src/main/java/com/cgomez/search/lsh/HashTable.java",
"license": "mit",
"size": 2289
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 2,875,678 |
public void execute() {
Set<String> processedSections = new HashSet<String>();
FileInputStream configInStream = null;
BufferedReader reader = null;
PrintStream writer = null;
try {
configInStream = new FileInputStream(origFile);
reader = new BufferedReader(new InputStreamReader(configInStream, "UTF... | void function() { Set<String> processedSections = new HashSet<String>(); FileInputStream configInStream = null; BufferedReader reader = null; PrintStream writer = null; try { configInStream = new FileInputStream(origFile); reader = new BufferedReader(new InputStreamReader(configInStream, "UTF-8")); writer = new PrintSt... | /**
* Does the patching.
*/ | Does the patching | execute | {
"repo_name": "SiphonSquirrel/jepperscore",
"path": "scrapers/ut2004/src/main/java/jepperscore/scraper/ut2004/IniPatcher.java",
"license": "apache-2.0",
"size": 3815
} | [
"java.io.BufferedReader",
"java.io.FileInputStream",
"java.io.IOException",
"java.io.InputStreamReader",
"java.io.PrintStream",
"java.util.HashSet",
"java.util.Set",
"org.apache.commons.io.IOUtils"
] | import java.io.BufferedReader; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintStream; import java.util.HashSet; import java.util.Set; import org.apache.commons.io.IOUtils; | import java.io.*; import java.util.*; import org.apache.commons.io.*; | [
"java.io",
"java.util",
"org.apache.commons"
] | java.io; java.util; org.apache.commons; | 102,495 |
public static File getTargetDir() {
// target/test-classes
String targetClassesDir = CompilerTestHelper.class.getProtectionDomain().getCodeSource().getLocation().getFile();
return new File ( targetClassesDir ).getParentFile();
} | static File function() { String targetClassesDir = CompilerTestHelper.class.getProtectionDomain().getCodeSource().getLocation().getFile(); return new File ( targetClassesDir ).getParentFile(); } | /**
* Returns the target directory of the build.
*
* @return the target directory of the build
*/ | Returns the target directory of the build | getTargetDir | {
"repo_name": "fazerish/hibernate-validator",
"path": "annotation-processor/src/test/java/org/hibernate/validator/ap/testutil/CompilerTestHelper.java",
"license": "apache-2.0",
"size": 8258
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 686,287 |
Map<String, AbstractFeature> getFeatures(FeatureQueryHandlerQueryObject queryObject) throws OwsExceptionReport; | Map<String, AbstractFeature> getFeatures(FeatureQueryHandlerQueryObject queryObject) throws OwsExceptionReport; | /**
* Get feature data for identifiers and/or for a spatial filter
*
* @param foiIDs
* FOI identifiers
* @param list
* Spatial filter
* @param connection
* Data source connection
* @param version
* SOS version
* @param r... | Get feature data for identifiers and/or for a spatial filter | getFeatures | {
"repo_name": "ahuarte47/SOS",
"path": "core/api/src/main/java/org/n52/sos/ds/FeatureQueryHandler.java",
"license": "gpl-2.0",
"size": 6385
} | [
"java.util.Map",
"org.n52.sos.ogc.gml.AbstractFeature",
"org.n52.sos.ogc.ows.OwsExceptionReport"
] | import java.util.Map; import org.n52.sos.ogc.gml.AbstractFeature; import org.n52.sos.ogc.ows.OwsExceptionReport; | import java.util.*; import org.n52.sos.ogc.gml.*; import org.n52.sos.ogc.ows.*; | [
"java.util",
"org.n52.sos"
] | java.util; org.n52.sos; | 489,388 |
@Test(expected = GenieNotFoundException.class)
public void testRemoveCommandForClusterNoCluster() throws GenieException {
final String id = UUID.randomUUID().toString();
Mockito.when(this.clusterRepository.findOne(id)).thenReturn(null);
this.service.removeCommandForCluster(id, UUID.rando... | @Test(expected = GenieNotFoundException.class) void function() throws GenieException { final String id = UUID.randomUUID().toString(); Mockito.when(this.clusterRepository.findOne(id)).thenReturn(null); this.service.removeCommandForCluster(id, UUID.randomUUID().toString()); } | /**
* Test removing all commands for the cluster.
*
* @throws GenieException For any problem
*/ | Test removing all commands for the cluster | testRemoveCommandForClusterNoCluster | {
"repo_name": "sensaid/genie",
"path": "genie-core/src/test/java/com/netflix/genie/core/services/impl/jpa/TestClusterConfigServiceJPAImpl.java",
"license": "apache-2.0",
"size": 17701
} | [
"com.netflix.genie.common.exceptions.GenieException",
"com.netflix.genie.common.exceptions.GenieNotFoundException",
"java.util.UUID",
"org.junit.Test",
"org.mockito.Mockito"
] | import com.netflix.genie.common.exceptions.GenieException; import com.netflix.genie.common.exceptions.GenieNotFoundException; import java.util.UUID; import org.junit.Test; import org.mockito.Mockito; | import com.netflix.genie.common.exceptions.*; import java.util.*; import org.junit.*; import org.mockito.*; | [
"com.netflix.genie",
"java.util",
"org.junit",
"org.mockito"
] | com.netflix.genie; java.util; org.junit; org.mockito; | 1,978,786 |
private void visitPart(SoyMsgSelectPart selectPart) {
String selectVarName = selectPart.getSelectVarName();
MsgSelectNode repSelectNode = msgNode.getRepSelectNode(selectVarName);
// Associate the select variable with the value.
String correctSelectValue;
ExprRootNode<?> selectExpr = ... | void function(SoyMsgSelectPart selectPart) { String selectVarName = selectPart.getSelectVarName(); MsgSelectNode repSelectNode = msgNode.getRepSelectNode(selectVarName); String correctSelectValue; ExprRootNode<?> selectExpr = repSelectNode.getExpr(); try { correctSelectValue = master.evalForUseByAssistants(selectExpr).... | /**
* Processes a {@code SoyMsgSelectPart} and appends the rendered output to
* the {@code StringBuilder} object in {@code RenderVisitor}.
* @param selectPart The Select part.
*/ | Processes a SoyMsgSelectPart and appends the rendered output to the StringBuilder object in RenderVisitor | visitPart | {
"repo_name": "core9/closure-templates",
"path": "src/impl/java/com/google/template/soy/sharedpasses/render/RenderVisitorAssistantForMsgs.java",
"license": "apache-2.0",
"size": 16372
} | [
"com.google.template.soy.data.SoyDataException",
"com.google.template.soy.exprtree.ExprRootNode",
"com.google.template.soy.internal.base.Pair",
"com.google.template.soy.msgs.restricted.SoyMsgPart",
"com.google.template.soy.msgs.restricted.SoyMsgPlaceholderPart",
"com.google.template.soy.msgs.restricted.So... | import com.google.template.soy.data.SoyDataException; import com.google.template.soy.exprtree.ExprRootNode; import com.google.template.soy.internal.base.Pair; import com.google.template.soy.msgs.restricted.SoyMsgPart; import com.google.template.soy.msgs.restricted.SoyMsgPlaceholderPart; import com.google.template.soy.m... | import com.google.template.soy.data.*; import com.google.template.soy.exprtree.*; import com.google.template.soy.internal.base.*; import com.google.template.soy.msgs.restricted.*; import com.google.template.soy.soytree.*; import java.util.*; | [
"com.google.template",
"java.util"
] | com.google.template; java.util; | 277,119 |
@Deprecated
public int countAllMembersNamesForGroup(String group) throws XWikiException
{
int count = 0;
try {
count = RightsManager.getInstance().countAllMembersNamesForGroup(group, this.context);
} catch (RightsManagerException e) {
logError("Try to count a... | int function(String group) throws XWikiException { int count = 0; try { count = RightsManager.getInstance().countAllMembersNamesForGroup(group, this.context); } catch (RightsManagerException e) { logError(STR, e); } return count; } | /**
* Return the number of members provided group contains.
*
* @param group the name of the group.
* @return the number of members.
* @throws XWikiException error when getting number of groups.
* @deprecated since 10.8RC1, use org.xwiki.user.script.GroupScriptService ($services.user.group... | Return the number of members provided group contains | countAllMembersNamesForGroup | {
"repo_name": "xwiki/xwiki-platform",
"path": "xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/plugin/rightsmanager/RightsManagerPluginApi.java",
"license": "lgpl-2.1",
"size": 11366
} | [
"com.xpn.xwiki.XWikiException"
] | import com.xpn.xwiki.XWikiException; | import com.xpn.xwiki.*; | [
"com.xpn.xwiki"
] | com.xpn.xwiki; | 53,512 |
@Nullable
public String getCustomDataPath() {
return customDataPath;
}
}
public static class NodeStoreFilesMetadata extends BaseNodeResponse {
private StoreFilesMetadata storeFilesMetadata;
public NodeStoreFilesMetadata(StreamInput in) throws IOException {
... | String function() { return customDataPath; } } public static class NodeStoreFilesMetadata extends BaseNodeResponse { private StoreFilesMetadata storeFilesMetadata; public NodeStoreFilesMetadata(StreamInput in) throws IOException { super(in); storeFilesMetadata = new StoreFilesMetadata(in); } public NodeStoreFilesMetada... | /**
* Returns the custom data path that is used to look up information for this shard.
* Returns an empty string if no custom data path is used for this index.
* Returns null if custom data path information is not available (due to BWC).
*/ | Returns the custom data path that is used to look up information for this shard. Returns an empty string if no custom data path is used for this index. Returns null if custom data path information is not available (due to BWC) | getCustomDataPath | {
"repo_name": "nknize/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/indices/store/TransportNodesListShardStoreMetadata.java",
"license": "apache-2.0",
"size": 16759
} | [
"java.io.IOException",
"org.elasticsearch.action.support.nodes.BaseNodeResponse",
"org.elasticsearch.cluster.node.DiscoveryNode",
"org.elasticsearch.common.io.stream.StreamInput"
] | import java.io.IOException; import org.elasticsearch.action.support.nodes.BaseNodeResponse; import org.elasticsearch.cluster.node.DiscoveryNode; import org.elasticsearch.common.io.stream.StreamInput; | import java.io.*; import org.elasticsearch.action.support.nodes.*; import org.elasticsearch.cluster.node.*; import org.elasticsearch.common.io.stream.*; | [
"java.io",
"org.elasticsearch.action",
"org.elasticsearch.cluster",
"org.elasticsearch.common"
] | java.io; org.elasticsearch.action; org.elasticsearch.cluster; org.elasticsearch.common; | 2,846,231 |
public static int getRouteStartupOrder(CamelContext camelContext, String routeId) {
for (RouteStartupOrder order : camelContext.getRouteStartupOrder()) {
if (order.getRoute().getId().equals(routeId)) {
return order.getStartupOrder();
}
}
return 0;
... | static int function(CamelContext camelContext, String routeId) { for (RouteStartupOrder order : camelContext.getRouteStartupOrder()) { if (order.getRoute().getId().equals(routeId)) { return order.getStartupOrder(); } } return 0; } | /**
* Gets the route startup order for the given route id
*
* @param camelContext the camel context
* @param routeId the id of the route
* @return the startup order, or <tt>0</tt> if not possible to determine
*/ | Gets the route startup order for the given route id | getRouteStartupOrder | {
"repo_name": "snadakuduru/camel",
"path": "camel-core/src/main/java/org/apache/camel/util/CamelContextHelper.java",
"license": "apache-2.0",
"size": 26766
} | [
"org.apache.camel.CamelContext",
"org.apache.camel.spi.RouteStartupOrder"
] | import org.apache.camel.CamelContext; import org.apache.camel.spi.RouteStartupOrder; | import org.apache.camel.*; import org.apache.camel.spi.*; | [
"org.apache.camel"
] | org.apache.camel; | 299,248 |
@Override
public int getLengthInBytes(final DataTypeDescriptor dtd)
throws StandardException {
if (!isNull()) {
NullDataOutputStream ndos = new NullDataOutputStream();
try {
toDataForOptimizedResultHolder(ndos);
} catch (IOException ioe) {
throw GemFireXDRuntimeException.... | int function(final DataTypeDescriptor dtd) throws StandardException { if (!isNull()) { NullDataOutputStream ndos = new NullDataOutputStream(); try { toDataForOptimizedResultHolder(ndos); } catch (IOException ioe) { throw GemFireXDRuntimeException.newRuntimeException( STR, ioe); } return ndos.size(); } return 0; } /** *... | /**
* Return length of this value in bytes.
*/ | Return length of this value in bytes | getLengthInBytes | {
"repo_name": "papicella/snappy-store",
"path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/iapi/types/UserType.java",
"license": "apache-2.0",
"size": 20581
} | [
"com.gemstone.gemfire.internal.NullDataOutputStream",
"com.pivotal.gemfirexd.internal.engine.jdbc.GemFireXDRuntimeException",
"com.pivotal.gemfirexd.internal.iapi.error.StandardException",
"java.io.IOException"
] | import com.gemstone.gemfire.internal.NullDataOutputStream; import com.pivotal.gemfirexd.internal.engine.jdbc.GemFireXDRuntimeException; import com.pivotal.gemfirexd.internal.iapi.error.StandardException; import java.io.IOException; | import com.gemstone.gemfire.internal.*; import com.pivotal.gemfirexd.internal.engine.jdbc.*; import com.pivotal.gemfirexd.internal.iapi.error.*; import java.io.*; | [
"com.gemstone.gemfire",
"com.pivotal.gemfirexd",
"java.io"
] | com.gemstone.gemfire; com.pivotal.gemfirexd; java.io; | 1,802,013 |
@Override
public void delete(Delete delete) {
if (delete.getColumns().isEmpty()) {
// full row delete
delete(delete.getRow());
return;
}
delete(delete.getRow(), delete.getColumns().toArray(new byte[0][]));
} | void function(Delete delete) { if (delete.getColumns().isEmpty()) { delete(delete.getRow()); return; } delete(delete.getRow(), delete.getColumns().toArray(new byte[0][])); } | /**
* Perform a delete on the data table. Any index entries referencing the deleted row will also be removed.
*
* @param delete The delete operation identifying the row and optional columns to remove
*/ | Perform a delete on the data table. Any index entries referencing the deleted row will also be removed | delete | {
"repo_name": "mpouttuclarke/cdap",
"path": "cdap-api/src/main/java/co/cask/cdap/api/dataset/lib/IndexedTable.java",
"license": "apache-2.0",
"size": 25145
} | [
"co.cask.cdap.api.dataset.table.Delete"
] | import co.cask.cdap.api.dataset.table.Delete; | import co.cask.cdap.api.dataset.table.*; | [
"co.cask.cdap"
] | co.cask.cdap; | 310,328 |
public void runBare() throws Throwable {
setUp();
try {
runTest();
} finally {
tearDown();
// Stop Helpers
for (int i = 0; i < m_helpers.size(); i++) {
((Helper) m_helpers.get(i)).dispose();
}
// Unget se... | void function() throws Throwable { setUp(); try { runTest(); } finally { tearDown(); for (int i = 0; i < m_helpers.size(); i++) { ((Helper) m_helpers.get(i)).dispose(); } for (int i = 0; i < m_references.size(); i++) { context.ungetService((ServiceReference) m_references.get(i)); } m_references.clear(); } } | /**
* Extends runBare to release (unget) services after the teardown.
* @throws Throwable when an error occurs.
* @see junit.framework.TestCase#runBare()
*/ | Extends runBare to release (unget) services after the teardown | runBare | {
"repo_name": "boneman1231/org.apache.felix",
"path": "trunk/ipojo/junit4osgi/junit4osgi/src/main/java/org/apache/felix/ipojo/junit4osgi/OSGiTestCase.java",
"license": "apache-2.0",
"size": 27249
} | [
"org.osgi.framework.ServiceReference"
] | import org.osgi.framework.ServiceReference; | import org.osgi.framework.*; | [
"org.osgi.framework"
] | org.osgi.framework; | 692,888 |
@Override
public void onPanelResize(ConfigPanelHost host) {
} | void function(ConfigPanelHost host) { } | /**
* Called when the window is resized whilst the panel is active
*
* @param host panel host
*/ | Called when the window is resized whilst the panel is active | onPanelResize | {
"repo_name": "GuntherDW/TweakcraftUtils-Client",
"path": "src/main/java/be/guntherdw/minecraft/tcutilsclient/settings/TCUtilsClientModConfigPanel.java",
"license": "gpl-2.0",
"size": 5677
} | [
"com.mumfrey.liteloader.modconfig.ConfigPanelHost"
] | import com.mumfrey.liteloader.modconfig.ConfigPanelHost; | import com.mumfrey.liteloader.modconfig.*; | [
"com.mumfrey.liteloader"
] | com.mumfrey.liteloader; | 2,871,536 |
private static void closeConnection(Connection dbConnection) {
if (dbConnection != null) {
try {
dbConnection.close();
} catch (SQLException e) {
log.warn("Database error. Could not close database connection. Continuing with " +
... | static void function(Connection dbConnection) { if (dbConnection != null) { try { dbConnection.close(); } catch (SQLException e) { log.warn(STR + STR + e.getMessage(), e); } } } | /**
* Close Connection
*
* @param dbConnection Connection
*/ | Close Connection | closeConnection | {
"repo_name": "wso2/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.internal.service/src/main/java/org/wso2/carbon/apimgt/internal/service/utils/BlockConditionDBUtil.java",
"license": "apache-2.0",
"size": 12387
} | [
"java.sql.Connection",
"java.sql.SQLException"
] | import java.sql.Connection; import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,062,302 |
public Task<Void> saveFileText(String fileId, String name, String content) {
return Tasks.call(mExecutor, () -> {
// Create a File containing any metadata changes.
File metadata = new File().setName(name);
// Convert content to an AbstractInputStreamContent instance.
... | Task<Void> function(String fileId, String name, String content) { return Tasks.call(mExecutor, () -> { File metadata = new File().setName(name); ByteArrayContent contentStream = ByteArrayContent.fromString(STR, content); mDriveService.files().update(fileId, metadata, contentStream).execute(); return null; }); } | /**
* Updates the file identified by {@code fileId} with the given {@code name} and {@code
* content}.
*/ | Updates the file identified by fileId with the given name and content | saveFileText | {
"repo_name": "alberapps/tiempobus",
"path": "TiempoBus/src/alberapps/android/tiempobus/favoritos/googledriverest/DriveServiceHelper.java",
"license": "gpl-3.0",
"size": 10041
} | [
"com.google.android.gms.tasks.Task",
"com.google.android.gms.tasks.Tasks",
"com.google.api.client.http.ByteArrayContent",
"com.google.api.services.drive.model.File"
] | import com.google.android.gms.tasks.Task; import com.google.android.gms.tasks.Tasks; import com.google.api.client.http.ByteArrayContent; import com.google.api.services.drive.model.File; | import com.google.android.gms.tasks.*; import com.google.api.client.http.*; import com.google.api.services.drive.model.*; | [
"com.google.android",
"com.google.api"
] | com.google.android; com.google.api; | 2,844,889 |
public ReportConfigDatasetConfiguration withColumns(List<String> columns) {
this.columns = columns;
return this;
} | ReportConfigDatasetConfiguration function(List<String> columns) { this.columns = columns; return this; } | /**
* Set array of column names to be included in the report. Any valid report column name is allowed. If not provided, then report includes all columns.
*
* @param columns the columns value to set
* @return the ReportConfigDatasetConfiguration object itself.
*/ | Set array of column names to be included in the report. Any valid report column name is allowed. If not provided, then report includes all columns | withColumns | {
"repo_name": "navalev/azure-sdk-for-java",
"path": "sdk/costmanagement/mgmt-v2018_05_31/src/main/java/com/microsoft/azure/management/costmanagement/v2018_05_31/ReportConfigDatasetConfiguration.java",
"license": "mit",
"size": 1451
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 535,898 |
public static interface CursorToStringConverter {
CharSequence convertToString(Cursor cursor);
} | static interface CursorToStringConverter { CharSequence function(Cursor cursor); } | /**
* Returns a CharSequence representing the specified Cursor.
*
* @param cursor the cursor for which a CharSequence representation
* is requested
*
* @return a non-null CharSequence representing the cursor
*/ | Returns a CharSequence representing the specified Cursor | convertToString | {
"repo_name": "clamburger/trosnoth-server-app",
"path": "libs/ActionBarSherlock/src/android/support/v4/widget/SimpleCursorAdapter.java",
"license": "apache-2.0",
"size": 15685
} | [
"android.database.Cursor"
] | import android.database.Cursor; | import android.database.*; | [
"android.database"
] | android.database; | 1,731,019 |
@Test
public void exportBuzasInJson(){
l(this,"@Test exportBuzasInJson");
BuzaExporterMock bem = new BuzaExporterMock();
bem.exportBuzasInJson(Mockito.mock(BuzasActivity.class), null, "");
} | void function(){ l(this,STR); BuzaExporterMock bem = new BuzaExporterMock(); bem.exportBuzasInJson(Mockito.mock(BuzasActivity.class), null, ""); } | /**
* Tests the exportBuzasInJson() method
*/ | Tests the exportBuzasInJson() method | exportBuzasInJson | {
"repo_name": "pylapp/Buza",
"path": "app/src/test/java/pylapp/buza/android/tools/export/UtBuzaExporterMock.java",
"license": "mit",
"size": 3868
} | [
"org.mockito.Mockito"
] | import org.mockito.Mockito; | import org.mockito.*; | [
"org.mockito"
] | org.mockito; | 57,675 |
@NbBundle.Messages({"FileSearchPanel.steptwo.images=Step 2: Filter which images to show"})
private void imagesSelected(boolean enabled, boolean resetSelected) {
stepTwoLabel.setText(Bundle.FileSearchPanel_steptwo_images());
dataSourceFilterSettings(true, enabled, !resetSelected && dataSourceChec... | @NbBundle.Messages({STR}) void function(boolean enabled, boolean resetSelected) { stepTwoLabel.setText(Bundle.FileSearchPanel_steptwo_images()); dataSourceFilterSettings(true, enabled, !resetSelected && dataSourceCheckbox.isSelected(), null); int[] selectedSizeIndices = {1, 2, 3, 4, 5}; sizeFilterSettings(true, enabled... | /**
* Set the UI elements available to be the set of UI elements available when
* an Image search is being performed.
*
* @param enabled Boolean indicating if the filters present for images
* should be enabled.
* @param resetSelected Boolean indicating if selecti... | Set the UI elements available to be the set of UI elements available when an Image search is being performed | imagesSelected | {
"repo_name": "esaunders/autopsy",
"path": "Core/src/org/sleuthkit/autopsy/filequery/FileSearchPanel.java",
"license": "apache-2.0",
"size": 95881
} | [
"org.openide.util.NbBundle",
"org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepository"
] | import org.openide.util.NbBundle; import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepository; | import org.openide.util.*; import org.sleuthkit.autopsy.centralrepository.datamodel.*; | [
"org.openide.util",
"org.sleuthkit.autopsy"
] | org.openide.util; org.sleuthkit.autopsy; | 189,573 |
void writeSortTempFile(Object[][] records) throws CarbonSortKeyAndGroupByException; | void writeSortTempFile(Object[][] records) throws CarbonSortKeyAndGroupByException; | /**
* Below method will be used to write the sort temp file
*
* @param records
* @throws CarbonSortKeyAndGroupByException
*/ | Below method will be used to write the sort temp file | writeSortTempFile | {
"repo_name": "Sephiroth-Lin/incubator-carbondata",
"path": "processing/src/main/java/org/apache/carbondata/processing/sortandgroupby/sortdata/TempSortFileWriter.java",
"license": "apache-2.0",
"size": 1552
} | [
"org.apache.carbondata.processing.sortandgroupby.exception.CarbonSortKeyAndGroupByException"
] | import org.apache.carbondata.processing.sortandgroupby.exception.CarbonSortKeyAndGroupByException; | import org.apache.carbondata.processing.sortandgroupby.exception.*; | [
"org.apache.carbondata"
] | org.apache.carbondata; | 856,012 |
public void removePeriodicSync() {
Bundle bundle = new Bundle();
ContentResolver.removePeriodicSync(mAccount, mAuthority, bundle);
} | void function() { Bundle bundle = new Bundle(); ContentResolver.removePeriodicSync(mAccount, mAuthority, bundle); } | /**
* Remove any periodic sync for this account
*/ | Remove any periodic sync for this account | removePeriodicSync | {
"repo_name": "Michenux/YourAppIdea",
"path": "drodrolib/src/main/java/org/michenux/drodrolib/network/sync/AbstractSyncHelper.java",
"license": "apache-2.0",
"size": 6085
} | [
"android.content.ContentResolver",
"android.os.Bundle"
] | import android.content.ContentResolver; import android.os.Bundle; | import android.content.*; import android.os.*; | [
"android.content",
"android.os"
] | android.content; android.os; | 2,566,755 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Void> deleteAsync(String deviceName, String name, String resourceGroupName, Context context) {
return beginDeleteAsync(deviceName, name, resourceGroupName, context)
.last()
.flatMap(this.client::getLroFinalResultOrError);
... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Void> function(String deviceName, String name, String resourceGroupName, Context context) { return beginDeleteAsync(deviceName, name, resourceGroupName, context) .last() .flatMap(this.client::getLroFinalResultOrError); } | /**
* Deletes the trigger on the gateway device.
*
* @param deviceName The device name.
* @param name The trigger name.
* @param resourceGroupName The resource group name.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if param... | Deletes the trigger on the gateway device | deleteAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/TriggersClientImpl.java",
"license": "mit",
"size": 52188
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.util.Context"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.util.Context; | import com.azure.core.annotation.*; import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 1,750,582 |
public ItemStack insertItem(ForgeDirection from, ItemStack item); | ItemStack function(ForgeDirection from, ItemStack item); | /**
* Insert an ItemStack into the IItemDuct. Will only accept items if there is a valid destination. This returns what is remaining of the original stack - a
* null return means that the entire stack was accepted/routed!
*
* @param from
* Orientation the item is inserted from.
* @param item
* ... | Insert an ItemStack into the IItemDuct. Will only accept items if there is a valid destination. This returns what is remaining of the original stack - a null return means that the entire stack was accepted/routed | insertItem | {
"repo_name": "Deax-Ent/KitCraft",
"path": "src/main/java/cofh/api/transport/IItemDuct.java",
"license": "lgpl-3.0",
"size": 908
} | [
"net.minecraft.item.ItemStack",
"net.minecraftforge.common.util.ForgeDirection"
] | import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.ForgeDirection; | import net.minecraft.item.*; import net.minecraftforge.common.util.*; | [
"net.minecraft.item",
"net.minecraftforge.common"
] | net.minecraft.item; net.minecraftforge.common; | 2,030,000 |
private Node findPrintPageNodeHelper(Element e){
int count = e.getChildCount();
for(int i = 0; i < count; i++){
if(e.getChild(i) instanceof Element && (((Element)e.getChild(i)).getLocalName().equals("span") || ((Element)e.getChild(i)).getLocalName().equals("brl"))){
return findPrintPageNodeHelper((Element... | Node function(Element e){ int count = e.getChildCount(); for(int i = 0; i < count; i++){ if(e.getChild(i) instanceof Element && (((Element)e.getChild(i)).getLocalName().equals("span") ((Element)e.getChild(i)).getLocalName().equals("brl"))){ return findPrintPageNodeHelper((Element)e.getChild(i)); } else if(e.getChild(i)... | /** private helper method used to search a pagenum element in UTDML markup
* @param e :Element to search
* @return the text node containing the page representation, null if not found
*/ | private helper method used to search a pagenum element in UTDML markup | findPrintPageNodeHelper | {
"repo_name": "DynamicalSystem/brailleblaster",
"path": "src/main/org/brailleblaster/document/BBDocument.java",
"license": "apache-2.0",
"size": 23111
} | [
"nu.xom.Element",
"nu.xom.Node",
"nu.xom.Text"
] | import nu.xom.Element; import nu.xom.Node; import nu.xom.Text; | import nu.xom.*; | [
"nu.xom"
] | nu.xom; | 2,080,135 |
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
switch (keyCode) {
case KeyEvent.KEYCODE_DPAD_LEFT:
if (movePrevious()) {
playSoundEffect(SoundEffectConstants.NAVIGATION_LEFT);
}
return true;
case KeyEvent.KEYCODE_DPAD_RIGHT:
if (moveNext()) {
playSoundEffect(SoundEffec... | boolean function(int keyCode, KeyEvent event) { switch (keyCode) { case KeyEvent.KEYCODE_DPAD_LEFT: if (movePrevious()) { playSoundEffect(SoundEffectConstants.NAVIGATION_LEFT); } return true; case KeyEvent.KEYCODE_DPAD_RIGHT: if (moveNext()) { playSoundEffect(SoundEffectConstants.NAVIGATION_RIGHT); } return true; case ... | /**
* Handles left, right, and clicking
*
* @see android.view.View#onKeyDown
*/ | Handles left, right, and clicking | onKeyDown | {
"repo_name": "entertailion/Open-Launcher-for-GTV",
"path": "src/com/entertailion/android/launcher/widget/EcoGallery.java",
"license": "apache-2.0",
"size": 38543
} | [
"android.view.KeyEvent",
"android.view.SoundEffectConstants"
] | import android.view.KeyEvent; import android.view.SoundEffectConstants; | import android.view.*; | [
"android.view"
] | android.view; | 2,800,781 |
protected void update(HashMap<ResourceSet,Double> newModel){
possibleResSets = newModel;
rssAbs[11] = possibleResSets.size();
}
| void function(HashMap<ResourceSet,Double> newModel){ possibleResSets = newModel; rssAbs[11] = possibleResSets.size(); } | /**
* Updates the model
* @param newModel
*/ | Updates the model | update | {
"repo_name": "sorinMD/MCTS",
"path": "src/main/java/mcts/game/catan/belief/PlayerResourceModel.java",
"license": "mit",
"size": 8655
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 2,342,196 |
public static List<ListViewColumn> createDefaultInitialColumnList() {
// OK, set up default list of columns:
// create all instances
ArrayList<ListViewColumn> r = new ArrayList<ListViewColumn>();
DescriptorExtensionList<ListViewColumn, Descriptor<ListViewColumn>> all = ListViewColumn... | static List<ListViewColumn> function() { ArrayList<ListViewColumn> r = new ArrayList<ListViewColumn>(); DescriptorExtensionList<ListViewColumn, Descriptor<ListViewColumn>> all = ListViewColumn.all(); ArrayList<Descriptor<ListViewColumn>> left = new ArrayList<Descriptor<ListViewColumn>>(all); for (Class<? extends ListVi... | /**
* Creates the list of {@link ListViewColumn}s to be used for newly created {@link ListView}s and their likes.
* @since 1.391
*/ | Creates the list of <code>ListViewColumn</code>s to be used for newly created <code>ListView</code>s and their likes | createDefaultInitialColumnList | {
"repo_name": "jtnord/jenkins",
"path": "core/src/main/java/hudson/views/ListViewColumn.java",
"license": "mit",
"size": 6588
} | [
"hudson.model.Descriptor",
"java.util.ArrayList",
"java.util.Arrays",
"java.util.List",
"java.util.logging.Level",
"java.util.logging.Logger"
] | import hudson.model.Descriptor; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; | import hudson.model.*; import java.util.*; import java.util.logging.*; | [
"hudson.model",
"java.util"
] | hudson.model; java.util; | 2,799,711 |
@ServiceMethod(returns = ReturnType.SINGLE)
public RunCommandResultInner runCommand(
String resourceGroupName, String vmName, RunCommandInput parameters, Context context) {
return runCommandAsync(resourceGroupName, vmName, parameters, context).block();
} | @ServiceMethod(returns = ReturnType.SINGLE) RunCommandResultInner function( String resourceGroupName, String vmName, RunCommandInput parameters, Context context) { return runCommandAsync(resourceGroupName, vmName, parameters, context).block(); } | /**
* Run command on the VM.
*
* @param resourceGroupName The name of the resource group.
* @param vmName The name of the virtual machine.
* @param parameters Parameters supplied to the Run command operation.
* @param context The context to associate with this operation.
* @throws Ill... | Run command on the VM | runCommand | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachinesClientImpl.java",
"license": "mit",
"size": 333925
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.util.Context",
"com.azure.resourcemanager.compute.fluent.models.RunCommandResultInner",
"com.azure.resourcemanager.compute.models.RunCommandInput"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.util.Context; import com.azure.resourcemanager.compute.fluent.models.RunCommandResultInner; import com.azure.resourcemanager.compute.models.RunCommandInput; | import com.azure.core.annotation.*; import com.azure.core.util.*; import com.azure.resourcemanager.compute.fluent.models.*; import com.azure.resourcemanager.compute.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 902,770 |
private Configuration createConfigurationWithProbe(final int probe) {
Configuration conf = new Configuration(getFileSystem().getConf());
S3ATestUtils.disableFilesystemCaching(conf);
conf.setInt(S3A_BUCKET_PROBE, probe);
return conf;
} | Configuration function(final int probe) { Configuration conf = new Configuration(getFileSystem().getConf()); S3ATestUtils.disableFilesystemCaching(conf); conf.setInt(S3A_BUCKET_PROBE, probe); return conf; } | /**
* Create a new configuration with the given bucket probe;
* we also disable FS caching.
* @param probe value to use as the bucket probe.
* @return a configuration.
*/ | Create a new configuration with the given bucket probe; we also disable FS caching | createConfigurationWithProbe | {
"repo_name": "apurtell/hadoop",
"path": "hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3ABucketExistence.java",
"license": "apache-2.0",
"size": 6092
} | [
"org.apache.hadoop.conf.Configuration"
] | import org.apache.hadoop.conf.Configuration; | import org.apache.hadoop.conf.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 877,800 |
JobSpecification resolveJobSpecificationDryRun(
@Valid AgentJobRequest jobRequest
) throws JobSpecificationResolutionException; | JobSpecification resolveJobSpecificationDryRun( @Valid AgentJobRequest jobRequest ) throws JobSpecificationResolutionException; | /**
* Invoke the job specification resolution logic without persisting anything on the server.
*
* @param jobRequest The various parameters required to perform the dry run should be contained in this request
* @return The job specification
* @throws JobSpecificationResolutionException When an e... | Invoke the job specification resolution logic without persisting anything on the server | resolveJobSpecificationDryRun | {
"repo_name": "Netflix/genie",
"path": "genie-agent/src/main/java/com/netflix/genie/agent/execution/services/AgentJobService.java",
"license": "apache-2.0",
"size": 7014
} | [
"com.netflix.genie.agent.execution.exceptions.JobSpecificationResolutionException",
"com.netflix.genie.common.external.dtos.v4.AgentJobRequest",
"com.netflix.genie.common.external.dtos.v4.JobSpecification",
"javax.validation.Valid"
] | import com.netflix.genie.agent.execution.exceptions.JobSpecificationResolutionException; import com.netflix.genie.common.external.dtos.v4.AgentJobRequest; import com.netflix.genie.common.external.dtos.v4.JobSpecification; import javax.validation.Valid; | import com.netflix.genie.agent.execution.exceptions.*; import com.netflix.genie.common.external.dtos.v4.*; import javax.validation.*; | [
"com.netflix.genie",
"javax.validation"
] | com.netflix.genie; javax.validation; | 1,138,065 |
public ResultSet startSelect(int maxRec) {
String sql = "";
String tmp = "";
rsSelect = null;
try {
if (conn != null)
mspSelect = conn.getConn();
sql = "SELECT " + genColumns() + " FROM " + genFrom();
tmp = genWhere();
if (!tmp.equals(""))
sql += " WHERE " + tmp;
tmp = genGroupBy()... | ResultSet function(int maxRec) { String sql = STRSTRSELECT STR FROM STRSTR WHERE STRSTR GROUP BY STRSTR ORDER BY STR LIMIT STRstartSelect sql: " + sql); if (conn != null) { rsSelect = mspSelect.StartSelect(sql); this.recTot = mspSelect.getRecTot(); } else { rsSelect = msp.StartSelect(sql); this.recTot = msp.getRecTot()... | /**
* Questo metodo viene utilizzato per eseguire la ricerca sul database
*
* @return Restituisce il RecordSet relativo alla ricerca eseguita
*/ | Questo metodo viene utilizzato per eseguire la ricerca sul database | startSelect | {
"repo_name": "TecaDigitale/Gestione-Connessioni-DataBase",
"path": "Gestione Connessioni DataBase/src/mx/database/table/DataSet.java",
"license": "agpl-3.0",
"size": 26040
} | [
"java.sql.ResultSet",
"java.sql.SQLException"
] | import java.sql.ResultSet; import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 751,029 |
private void generateMappings() {
if ( !checkInput() ) {
return;
}
// Determine the source and target fields...
//
RowMetaInterface sourceFields;
RowMetaInterface targetFields = new RowMeta();
try {
sourceFields = transMeta.getPrevStepFields( stepMeta );
} catch ( Kettle... | void function() { if ( !checkInput() ) { return; } RowMetaInterface targetFields = new RowMeta(); try { sourceFields = transMeta.getPrevStepFields( stepMeta ); } catch ( KettleException e ) { new ErrorDialog( shell, BaseMessages.getString( PKG, STR ), BaseMessages.getString( PKG, STR ), e ); return; } try { String[] fi... | /**
* Reads in the fields from the previous steps and from the ONE next step and opens an EnterMappingDialog with this
* information. After the user did the mapping, those information is put into the Select/Rename table.
*/ | Reads in the fields from the previous steps and from the ONE next step and opens an EnterMappingDialog with this information. After the user did the mapping, those information is put into the Select/Rename table | generateMappings | {
"repo_name": "nicoben/pentaho-kettle",
"path": "plugins/salesforce/src/org/pentaho/di/ui/trans/steps/salesforceupdate/SalesforceUpdateDialog.java",
"license": "apache-2.0",
"size": 38777
} | [
"org.eclipse.swt.widgets.TableItem",
"org.pentaho.di.core.Const",
"org.pentaho.di.core.SourceToTargetMapping",
"org.pentaho.di.core.exception.KettleException",
"org.pentaho.di.core.row.RowMeta",
"org.pentaho.di.core.row.RowMetaInterface",
"org.pentaho.di.core.row.ValueMetaInterface",
"org.pentaho.di.c... | import org.eclipse.swt.widgets.TableItem; import org.pentaho.di.core.Const; import org.pentaho.di.core.SourceToTargetMapping; import org.pentaho.di.core.exception.KettleException; import org.pentaho.di.core.row.RowMeta; import org.pentaho.di.core.row.RowMetaInterface; import org.pentaho.di.core.row.ValueMetaInterface; ... | import org.eclipse.swt.widgets.*; import org.pentaho.di.core.*; import org.pentaho.di.core.exception.*; import org.pentaho.di.core.row.*; import org.pentaho.di.core.row.value.*; import org.pentaho.di.i18n.*; import org.pentaho.di.ui.core.dialog.*; | [
"org.eclipse.swt",
"org.pentaho.di"
] | org.eclipse.swt; org.pentaho.di; | 628,054 |
public String getParsedString(IWApplicationContext iwac, String tag) {
try {
// Applicant part
if (holder.getApplicant() != null) {
if (tag.equals(tenant_name)) {
return holder.getApplicant().getName();
} else if (tag.equals(tenant_address)) {
return holder.getApplicant().getResidence();
... | String function(IWApplicationContext iwac, String tag) { try { if (holder.getApplicant() != null) { if (tag.equals(tenant_name)) { return holder.getApplicant().getName(); } else if (tag.equals(tenant_address)) { return holder.getApplicant().getResidence(); } else if (tag.equals(tenant_id)) { return holder.getApplicant(... | /**
* Gets the parsedString of the LetterParser object
*
* @param tag
* Description of the Parameter
* @return The parsed string value
*/ | Gets the parsedString of the LetterParser object | getParsedString | {
"repo_name": "idega/platform2",
"path": "src/is/idega/idegaweb/campus/block/mailinglist/business/LetterParser.java",
"license": "gpl-3.0",
"size": 11439
} | [
"com.idega.block.building.business.BuildingCacher",
"com.idega.block.finance.data.Tariff",
"com.idega.block.finance.data.TariffBMPBean",
"com.idega.block.finance.data.TariffHome",
"com.idega.data.IDOLookup",
"com.idega.data.IDOLookupException",
"com.idega.idegaweb.IWApplicationContext",
"com.idega.uti... | import com.idega.block.building.business.BuildingCacher; import com.idega.block.finance.data.Tariff; import com.idega.block.finance.data.TariffBMPBean; import com.idega.block.finance.data.TariffHome; import com.idega.data.IDOLookup; import com.idega.data.IDOLookupException; import com.idega.idegaweb.IWApplicationContex... | import com.idega.block.building.business.*; import com.idega.block.finance.data.*; import com.idega.data.*; import com.idega.idegaweb.*; import com.idega.util.*; import is.idega.idegaweb.campus.block.application.business.*; import java.text.*; import java.util.*; import javax.ejb.*; | [
"com.idega.block",
"com.idega.data",
"com.idega.idegaweb",
"com.idega.util",
"is.idega.idegaweb",
"java.text",
"java.util",
"javax.ejb"
] | com.idega.block; com.idega.data; com.idega.idegaweb; com.idega.util; is.idega.idegaweb; java.text; java.util; javax.ejb; | 509,114 |
@GET
@Produces(MediaType.APPLICATION_JSON)
public UserTransfer getUser()
{
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
Object principal = authentication.getPrincipal();
if (principal instanceof String && ((String) principal).equals("anonymousUser")) {
throw new... | @Produces(MediaType.APPLICATION_JSON) UserTransfer function() { Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); Object principal = authentication.getPrincipal(); if (principal instanceof String && ((String) principal).equals(STR)) { throw new WebApplicationException(401); } UserD... | /**
* Retrieves the currently logged in user.
*
* @return A transfer containing the username and the roles.
*/ | Retrieves the currently logged in user | getUser | {
"repo_name": "chandrakumar1985/TMSREPO",
"path": "src/main/java/com/accion/tms/rest/resources/UserResource.java",
"license": "apache-2.0",
"size": 7719
} | [
"com.accion.tms.entity.User",
"com.accion.tms.transfer.UserTransfer",
"javax.ws.rs.Produces",
"javax.ws.rs.WebApplicationException",
"javax.ws.rs.core.MediaType",
"org.springframework.security.core.Authentication",
"org.springframework.security.core.context.SecurityContextHolder",
"org.springframework... | import com.accion.tms.entity.User; import com.accion.tms.transfer.UserTransfer; import javax.ws.rs.Produces; import javax.ws.rs.WebApplicationException; import javax.ws.rs.core.MediaType; import org.springframework.security.core.Authentication; import org.springframework.security.core.context.SecurityContextHolder; imp... | import com.accion.tms.entity.*; import com.accion.tms.transfer.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.springframework.security.core.*; import org.springframework.security.core.context.*; import org.springframework.security.core.userdetails.*; | [
"com.accion.tms",
"javax.ws",
"org.springframework.security"
] | com.accion.tms; javax.ws; org.springframework.security; | 2,088,587 |
public boolean performInitialCommit(String site, String message, String sandboxBranch) {
boolean toReturn = true;
Repository repo = getRepository(site, GitRepositories.SANDBOX, sandboxBranch);
String gitLockKey = SITE_SANDBOX_REPOSITORY_GIT_LOCK.replaceAll(PATTERN_SITE, site);
gener... | boolean function(String site, String message, String sandboxBranch) { boolean toReturn = true; Repository repo = getRepository(site, GitRepositories.SANDBOX, sandboxBranch); String gitLockKey = SITE_SANDBOX_REPOSITORY_GIT_LOCK.replaceAll(PATTERN_SITE, site); generalLockService.lock(gitLockKey); try (Git git = new Git(r... | /**
* Perform an initial commit after large changes to a site. Will not work against the global config repo.
* @param site
* @param message
* @return true if successful, false otherwise
*/ | Perform an initial commit after large changes to a site. Will not work against the global config repo | performInitialCommit | {
"repo_name": "craftercms/studio2",
"path": "src/main/java/org/craftercms/studio/api/v2/utils/GitRepositoryHelper.java",
"license": "gpl-3.0",
"size": 55972
} | [
"java.util.Objects",
"org.craftercms.studio.api.v1.constant.GitRepositories",
"org.craftercms.studio.api.v1.exception.ServiceLayerException",
"org.craftercms.studio.api.v1.exception.security.UserNotFoundException",
"org.craftercms.studio.api.v2.dal.User",
"org.eclipse.jgit.api.CommitCommand",
"org.eclip... | import java.util.Objects; import org.craftercms.studio.api.v1.constant.GitRepositories; import org.craftercms.studio.api.v1.exception.ServiceLayerException; import org.craftercms.studio.api.v1.exception.security.UserNotFoundException; import org.craftercms.studio.api.v2.dal.User; import org.eclipse.jgit.api.CommitComma... | import java.util.*; import org.craftercms.studio.api.v1.constant.*; import org.craftercms.studio.api.v1.exception.*; import org.craftercms.studio.api.v1.exception.security.*; import org.craftercms.studio.api.v2.dal.*; import org.eclipse.jgit.api.*; import org.eclipse.jgit.api.errors.*; import org.eclipse.jgit.dircache.... | [
"java.util",
"org.craftercms.studio",
"org.eclipse.jgit"
] | java.util; org.craftercms.studio; org.eclipse.jgit; | 1,963,271 |
public void scriptData (String sTableName, String sWhere, String sFilePath)
throws SQLException, IOException {
Statement oStmt;
ResultSet oRSet;
ResultSetMetaData oMDat;
FileOutputStream oWriter;
String sColumns;
Object oValue;
String sValue;
String sValueEscaped;
int iCols;
byte[] by... | void function (String sTableName, String sWhere, String sFilePath) throws SQLException, IOException { Statement oStmt; ResultSet oRSet; ResultSetMetaData oMDat; FileOutputStream oWriter; String sColumns; Object oValue; String sValue; String sValueEscaped; int iCols; byte[] byComma = new String(",").getBytes(sEncoding);... | /**
* Create INSERT SQL statements for the data of a table
* @param sTableName Table Name
* @param sWhere SQL filter clause
* @param sFilePath Path for file where INSERT statements are to be written
* @throws SQLException
* @throws IOException
*/ | Create INSERT SQL statements for the data of a table | scriptData | {
"repo_name": "sergiomt/judal",
"path": "jdbc/src/main/java/org/judal/jdbc/metadata/SQLModelManager.java",
"license": "apache-2.0",
"size": 46889
} | [
"java.io.FileOutputStream",
"java.io.IOException",
"java.sql.ResultSet",
"java.sql.ResultSetMetaData",
"java.sql.SQLException",
"java.sql.Statement",
"java.sql.Types"
] | import java.io.FileOutputStream; import java.io.IOException; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.SQLException; import java.sql.Statement; import java.sql.Types; | import java.io.*; import java.sql.*; | [
"java.io",
"java.sql"
] | java.io; java.sql; | 1,915,677 |
private void listStatusInternal(LockedInodePath currInodePath, AuditContext auditContext,
DescendantType descendantType, List<FileInfo> statusList)
throws FileDoesNotExistException, UnavailableException,
AccessControlException, InvalidPathException {
Inode inode = currInodePath.getInode();
i... | void function(LockedInodePath currInodePath, AuditContext auditContext, DescendantType descendantType, List<FileInfo> statusList) throws FileDoesNotExistException, UnavailableException, AccessControlException, InvalidPathException { Inode inode = currInodePath.getInode(); if (inode.isDirectory() && descendantType != De... | /**
* Lists the status of the path in {@link LockedInodePath}, possibly recursively depending on
* the descendantType. The result is returned via a list specified by statusList, in postorder
* traversal order.
*
* @param currInodePath the inode path to find the status
* @param auditContext the audit c... | Lists the status of the path in <code>LockedInodePath</code>, possibly recursively depending on the descendantType. The result is returned via a list specified by statusList, in postorder traversal order | listStatusInternal | {
"repo_name": "madanadit/alluxio",
"path": "core/server/master/src/main/java/alluxio/master/file/DefaultFileSystemMaster.java",
"license": "apache-2.0",
"size": 197318
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,534,402 |
private void readConfig() {
ApplicationId routingAppId =
coreService.registerApplication(RoutingService.ROUTER_APP_ID);
RouterConfig config = networkConfigService.getConfig(
routingAppId, RoutingService.ROUTER_CONFIG_CLASS);
if (config == null) {
... | void function() { ApplicationId routingAppId = coreService.registerApplication(RoutingService.ROUTER_APP_ID); RouterConfig config = networkConfigService.getConfig( routingAppId, RoutingService.ROUTER_CONFIG_CLASS); if (config == null) { log.warn(STR); return; } controlPlaneConnectPoint = config.getControlPlaneConnectPo... | /**
* Installs or removes interface configuration
* based on the flag used on activate or deactivate.
*
**/ | Installs or removes interface configuration based on the flag used on activate or deactivate | readConfig | {
"repo_name": "y-higuchi/onos",
"path": "apps/routing/src/main/java/org/onosproject/routing/impl/ControlPlaneRedirectManager.java",
"license": "apache-2.0",
"size": 29836
} | [
"org.onosproject.core.ApplicationId",
"org.onosproject.routing.RoutingService",
"org.onosproject.routing.config.RouterConfig"
] | import org.onosproject.core.ApplicationId; import org.onosproject.routing.RoutingService; import org.onosproject.routing.config.RouterConfig; | import org.onosproject.core.*; import org.onosproject.routing.*; import org.onosproject.routing.config.*; | [
"org.onosproject.core",
"org.onosproject.routing"
] | org.onosproject.core; org.onosproject.routing; | 604,271 |
public static String getColorNameFromRgb(float r, float g, float b)
{
ArrayList<ColorName> colorList = initColorList();
ColorName closestMatch = null;
int minMSE = Integer.MAX_VALUE;
int mse;
for (ColorName c : colorList)
{
mse = c.computeMSE(r, g, b... | static String function(float r, float g, float b) { ArrayList<ColorName> colorList = initColorList(); ColorName closestMatch = null; int minMSE = Integer.MAX_VALUE; int mse; for (ColorName c : colorList) { mse = c.computeMSE(r, g, b); if (mse < minMSE) { minMSE = mse; closestMatch = c; } } if (closestMatch != null) { r... | /**
* Get the closest color name from our list
*/ | Get the closest color name from our list | getColorNameFromRgb | {
"repo_name": "Weisses/Ebonheart-Mods",
"path": "ViesCraft/Archived/1.11.2 - 2230/src/main/java/com/viesis/viescraft/api/ColorHelperVC.java",
"license": "mit",
"size": 12315
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 182,396 |
void addChildRows(
TreeNode rParentNode,
DataModel<? extends DataModel<?>> rChildModels)
{
TreeNode rPrevNode = null;
int nNodeIndex = rParentNode.getAbsoluteIndex();
int nRow = nNodeIndex + 1;
int nLastRow = nTableRows - 1;
for (DataModel<?> rChild : rChildModels)
{
if (nVis... | void addChildRows( TreeNode rParentNode, DataModel<? extends DataModel<?>> rChildModels) { TreeNode rPrevNode = null; int nNodeIndex = rParentNode.getAbsoluteIndex(); int nRow = nNodeIndex + 1; int nLastRow = nTableRows - 1; for (DataModel<?> rChild : rChildModels) { if (nVisibleDataRows++ < nTableRows) { aDataTable.re... | /***************************************
* Adds the rows for children of an expanded node.
*
* @param rParentNode The parent node to add the child nodes to
* @param rChildModels The data model containing the child data models
*/ | Adds the rows for children of an expanded node | addChildRows | {
"repo_name": "esoco/gewt",
"path": "src/main/java/de/esoco/ewt/impl/gwt/table/GwtTable.java",
"license": "apache-2.0",
"size": 48655
} | [
"de.esoco.lib.model.DataModel"
] | import de.esoco.lib.model.DataModel; | import de.esoco.lib.model.*; | [
"de.esoco.lib"
] | de.esoco.lib; | 1,202,831 |
protected JacksonDBCollection<T, Long> getAll() {
return this.all;
} | JacksonDBCollection<T, Long> function() { return this.all; } | /**
* Returns the collection of all (loaded) Identifiables
* @return the collection with the loaded identifiables
*/ | Returns the collection of all (loaded) Identifiables | getAll | {
"repo_name": "kikogatto/bone-collector",
"path": "core/src/main/java/br/com/keepitsimple/commons/repositories/mongo/MongoRepository.java",
"license": "mit",
"size": 3023
} | [
"org.mongojack.JacksonDBCollection"
] | import org.mongojack.JacksonDBCollection; | import org.mongojack.*; | [
"org.mongojack"
] | org.mongojack; | 1,204,312 |
public List<String> getWhitelistedDomains() {
return whitelistedDomains;
} | List<String> function() { return whitelistedDomains; } | /**
* Gets the {@link #whitelistedDomains}.
*
* @return the {@link #whitelistedDomains}.
*/ | Gets the <code>#whitelistedDomains</code> | getWhitelistedDomains | {
"repo_name": "Aurasphere/facebot",
"path": "src/main/java/co/aurasphere/botmill/fb/model/api/messengerprofile/SetWhitelistedDomainsRequest.java",
"license": "mit",
"size": 3912
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,767,667 |
protected AsyncClientHttpRequest createAsyncRequest(URI url, HttpMethod method)
throws IOException {
AsyncClientHttpRequest request = getAsyncRequestFactory().createAsyncRequest(url, method);
if (logger.isDebugEnabled()) {
logger.debug("Created asynchronous " + method.name() + " request for \"" + url + "\"... | AsyncClientHttpRequest function(URI url, HttpMethod method) throws IOException { AsyncClientHttpRequest request = getAsyncRequestFactory().createAsyncRequest(url, method); if (logger.isDebugEnabled()) { logger.debug(STR + method.name() + STRSTR\""); } return request; } | /**
* Create a new {@link AsyncClientHttpRequest} via this template's {@link
* AsyncClientHttpRequestFactory}.
* @param url the URL to connect to
* @param method the HTTP method to execute (GET, POST, etc.)
* @return the created request
* @throws IOException in case of I/O errors
*/ | Create a new <code>AsyncClientHttpRequest</code> via this template's <code>AsyncClientHttpRequestFactory</code> | createAsyncRequest | {
"repo_name": "shivpun/spring-framework",
"path": "spring-web/src/main/java/org/springframework/http/client/support/AsyncHttpAccessor.java",
"license": "apache-2.0",
"size": 2937
} | [
"java.io.IOException",
"org.springframework.http.HttpMethod",
"org.springframework.http.client.AsyncClientHttpRequest"
] | import java.io.IOException; import org.springframework.http.HttpMethod; import org.springframework.http.client.AsyncClientHttpRequest; | import java.io.*; import org.springframework.http.*; import org.springframework.http.client.*; | [
"java.io",
"org.springframework.http"
] | java.io; org.springframework.http; | 2,170,643 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.