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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
@Override public T visitNewLineOrComments(@NotNull AssemblerParser.NewLineOrCommentsContext ctx) { return visitChildren(ctx); } | @Override public T visitNewLineOrComments(@NotNull AssemblerParser.NewLineOrCommentsContext ctx) { return visitChildren(ctx); } | /**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/ | The default implementation returns the result of calling <code>#visitChildren</code> on ctx | visitInstruction | {
"repo_name": "Fantast/nand2tetris-implementation",
"path": "Chapter-06/Assembler/src/main/java/com/dpaulenk/nand2tetris/assembler/parser/AssemblerBaseVisitor.java",
"license": "mit",
"size": 4278
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 364,015 |
protected boolean handleDirtyConflict() {
return
MessageDialog.openQuestion
(getSite().getShell(),
getString("_UI_FileConflict_label"),
getString("_WARN_FileConflict"));
}
public SpecificationEditor() {
super();
initializeEditingDomain();
} | boolean function() { return MessageDialog.openQuestion (getSite().getShell(), getString(STR), getString(STR)); } public SpecificationEditor() { super(); initializeEditingDomain(); } | /**
* Shows a dialog that asks if conflicting changes should be discarded.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | Shows a dialog that asks if conflicting changes should be discarded. | handleDirtyConflict | {
"repo_name": "CloudScale-Project/Environment",
"path": "plugins/org.scaledl.overview.editor/src/org/scaledl/overview/specification/presentation/SpecificationEditor.java",
"license": "epl-1.0",
"size": 51499
} | [
"org.eclipse.jface.dialogs.MessageDialog"
] | import org.eclipse.jface.dialogs.MessageDialog; | import org.eclipse.jface.dialogs.*; | [
"org.eclipse.jface"
] | org.eclipse.jface; | 1,626,682 |
public ServiceFuture<AppServicePlanInner> beginCreateOrUpdateAsync(String resourceGroupName, String name, AppServicePlanInner appServicePlan, final ServiceCallback<AppServicePlanInner> serviceCallback) {
return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, name, a... | ServiceFuture<AppServicePlanInner> function(String resourceGroupName, String name, AppServicePlanInner appServicePlan, final ServiceCallback<AppServicePlanInner> serviceCallback) { return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, name, appServicePlan), serviceCallback); } | /**
* Creates or updates an App Service Plan.
* Creates or updates an App Service Plan.
*
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param name Name of the App Service plan.
* @param appServicePlan Details of the App Service plan.
* @param ... | Creates or updates an App Service Plan. Creates or updates an App Service Plan | beginCreateOrUpdateAsync | {
"repo_name": "jianghaolu/azure-sdk-for-java",
"path": "azure-mgmt-appservice/src/main/java/com/microsoft/azure/management/appservice/implementation/AppServicePlansInner.java",
"license": "mit",
"size": 260114
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 130,148 |
public void onPullEvent(final PullToRefreshBase<V> refreshView, State state, Mode direction);
}
public static interface OnRefreshListener<V extends View> { | void function(final PullToRefreshBase<V> refreshView, State state, Mode direction); } public static interface OnRefreshListener<V extends View> { | /**
* Called when the internal state has been changed, usually by the user
* pulling.
*
* @param refreshView - View which has had it's state change.
* @param state - The new state of View.
* @param direction - One of {@link Mode#PULL_FROM_START} or
* {@link Mode#PULL_FROM_END} depending ... | Called when the internal state has been changed, usually by the user pulling | onPullEvent | {
"repo_name": "liupengandroid/ywApplication",
"path": "pulltorefreshlibrary/src/main/java/com/handmark/pulltorefresh/library/PullToRefreshBase.java",
"license": "apache-2.0",
"size": 46262
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 1,398,168 |
public Criterion getHaving() {
return having;
}
| Criterion function() { return having; } | /**
* Gets the grouping filter
*
* @return the having fields
*/ | Gets the grouping filter | getHaving | {
"repo_name": "alfasoftware/morf",
"path": "morf-core/src/main/java/org/alfasoftware/morf/sql/SelectStatement.java",
"license": "apache-2.0",
"size": 26315
} | [
"org.alfasoftware.morf.sql.element.Criterion"
] | import org.alfasoftware.morf.sql.element.Criterion; | import org.alfasoftware.morf.sql.element.*; | [
"org.alfasoftware.morf"
] | org.alfasoftware.morf; | 2,273,988 |
List<CryptoAddress> getCryptoAddresses(); | List<CryptoAddress> getCryptoAddresses(); | /**
* Return the crypto addresses
*
* @return list of CryptoAddresses of the wallet contact
*/ | Return the crypto addresses | getCryptoAddresses | {
"repo_name": "fvasquezjatar/fermat-unused",
"path": "fermat-ccp-api/src/main/java/com/bitdubai/fermat_ccp_api/layer/middleware/wallet_contacts/interfaces/WalletContactRecord.java",
"license": "mit",
"size": 1642
} | [
"com.bitdubai.fermat_api.layer.all_definition.money.CryptoAddress",
"java.util.List"
] | import com.bitdubai.fermat_api.layer.all_definition.money.CryptoAddress; import java.util.List; | import com.bitdubai.fermat_api.layer.all_definition.money.*; import java.util.*; | [
"com.bitdubai.fermat_api",
"java.util"
] | com.bitdubai.fermat_api; java.util; | 2,503,795 |
public void addSequence(SequentialPattern sequence, int k){
while(levels.size() <= k){
levels.add(new ArrayList<SequentialPattern>());
}
levels.get(k).add(sequence);
sequenceCount++;
}
| void function(SequentialPattern sequence, int k){ while(levels.size() <= k){ levels.add(new ArrayList<SequentialPattern>()); } levels.get(k).add(sequence); sequenceCount++; } | /**
* Add a sequential pattern to this set of sequential patterns.
* @param sequence the sequential pattern
* @param k the size of the sequential pattern in temrs of itemset.
*/ | Add a sequential pattern to this set of sequential patterns | addSequence | {
"repo_name": "dragonzhou/humor",
"path": "src/ca/pfv/spmf/algorithms/sequentialpatterns/BIDE_and_prefixspan/SequentialPatterns.java",
"license": "apache-2.0",
"size": 4066
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 276,807 |
@Memoized
public ImmutableList<TypeElement> includes() {
return includesAsAnnotationValues().stream()
.map(MoreAnnotationValues::asType)
.map(MoreTypes::asTypeElement)
.collect(toImmutableList());
} | ImmutableList<TypeElement> function() { return includesAsAnnotationValues().stream() .map(MoreAnnotationValues::asType) .map(MoreTypes::asTypeElement) .collect(toImmutableList()); } | /**
* The types specified in the {@code includes} attribute.
*
* @throws IllegalArgumentException if any of the values are error types
*/ | The types specified in the includes attribute | includes | {
"repo_name": "dushmis/dagger",
"path": "java/dagger/internal/codegen/base/ModuleAnnotation.java",
"license": "apache-2.0",
"size": 4827
} | [
"com.google.auto.common.MoreTypes",
"com.google.common.collect.ImmutableList",
"javax.lang.model.element.TypeElement"
] | import com.google.auto.common.MoreTypes; import com.google.common.collect.ImmutableList; import javax.lang.model.element.TypeElement; | import com.google.auto.common.*; import com.google.common.collect.*; import javax.lang.model.element.*; | [
"com.google.auto",
"com.google.common",
"javax.lang"
] | com.google.auto; com.google.common; javax.lang; | 2,451,358 |
private Response getComponentTypes(String compmgrId) {
try {
Response resp = request(compmgrId, Method.GET, "component_types", null);
if (resp.isError("GET")) {
log.warn("invalid GET:" + resp.statusCode);
return resp;
}
ComponentTypesHash types = resp.getBody(ComponentTypes... | Response function(String compmgrId) { try { Response resp = request(compmgrId, Method.GET, STR, null); if (resp.isError("GET")) { log.warn(STR + resp.statusCode); return resp; } ComponentTypesHash types = resp.getBody(ComponentTypesHash.class); return new Response(Response.OK, types); } catch (Exception ex) { log.error... | /**
* Method for getting the CompoentManager's componentTypes.
*
* @return res ResponseObject.
* {@literal Body should be HashMap<String, ComponentType>}.
*/ | Method for getting the CompoentManager's componentTypes | getComponentTypes | {
"repo_name": "y-higuchi/odenos",
"path": "src/main/java/org/o3project/odenos/core/manager/system/SystemManager.java",
"license": "apache-2.0",
"size": 51475
} | [
"org.o3project.odenos.remoteobject.manager.ComponentTypesHash",
"org.o3project.odenos.remoteobject.message.Request",
"org.o3project.odenos.remoteobject.message.Response"
] | import org.o3project.odenos.remoteobject.manager.ComponentTypesHash; import org.o3project.odenos.remoteobject.message.Request; import org.o3project.odenos.remoteobject.message.Response; | import org.o3project.odenos.remoteobject.manager.*; import org.o3project.odenos.remoteobject.message.*; | [
"org.o3project.odenos"
] | org.o3project.odenos; | 2,808,135 |
public void propertyChange(PropertyChangeEvent pce) {
String name = pce.getPropertyName();
if (name.equals("title")) {
progressWindow.setHeader((String) pce.getNewValue());
} else if (name.equals("message")) {
progressWindow.setStatus((String) pce.getNewValue());
} else if (name.equa... | void function(PropertyChangeEvent pce) { String name = pce.getPropertyName(); if (name.equals("title")) { progressWindow.setHeader((String) pce.getNewValue()); } else if (name.equals(STR)) { progressWindow.setStatus((String) pce.getNewValue()); } else if (name.equals(STR)) { float progress = ((Integer) pce.getNewValue(... | /**
* Listens for property changes in the task and updates the progress window.
* This will listen to the title, message, progress and state of the task.
*/ | Listens for property changes in the task and updates the progress window. This will listen to the title, message, progress and state of the task | propertyChange | {
"repo_name": "cagrierciyes/osdt",
"path": "rdv/src/org/rdv/action/ProgressWindowController.java",
"license": "isc",
"size": 4846
} | [
"java.beans.PropertyChangeEvent",
"org.jdesktop.swingworker.SwingWorker"
] | import java.beans.PropertyChangeEvent; import org.jdesktop.swingworker.SwingWorker; | import java.beans.*; import org.jdesktop.swingworker.*; | [
"java.beans",
"org.jdesktop.swingworker"
] | java.beans; org.jdesktop.swingworker; | 1,625,745 |
public Object[] getCellsForGroup(Object[] cells)
{
List<Object> result = new ArrayList<Object>(cells.length);
if (cells.length > 0)
{
Object parent = model.getParent(cells[0]);
result.add(cells[0]);
// Filters selection cells with the same parent
for (int i = 1; i < cells.length; i++)
{
i... | Object[] function(Object[] cells) { List<Object> result = new ArrayList<Object>(cells.length); if (cells.length > 0) { Object parent = model.getParent(cells[0]); result.add(cells[0]); for (int i = 1; i < cells.length; i++) { if (model.getParent(cells[i]) == parent) { result.add(cells[i]); } } } return result.toArray();... | /**
* Returns the cells with the same parent as the first cell
* in the given array.
*/ | Returns the cells with the same parent as the first cell in the given array | getCellsForGroup | {
"repo_name": "tsxuehu/jgraphlearn",
"path": "java/src/com/mxgraph/view/mxGraph.java",
"license": "apache-2.0",
"size": 205407
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,018,595 |
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable<OperationInner> list() {
return new PagedIterable<>(listAsync());
} | @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<OperationInner> function() { return new PagedIterable<>(listAsync()); } | /**
* Lists all of the available REST API operations of the Microsoft.Communication provider.
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a list of REST AP... | Lists all of the available REST API operations of the Microsoft.Communication provider | list | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/OperationsClientImpl.java",
"license": "mit",
"size": 12912
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedIterable",
"com.azure.resourcemanager.communication.fluent.models.OperationInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.communication.fluent.models.OperationInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.communication.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,652,760 |
void visit(FunctionAnnotation node); | void visit(FunctionAnnotation node); | /**
* Visits an AST node of type FunctionAnnotation.
*
* @param node
* The AST node to visit
*/ | Visits an AST node of type FunctionAnnotation | visit | {
"repo_name": "team-worthwhile/worthwhile",
"path": "implementierung/src/worthwhile.model/src/edu/kit/iti/formal/pse/worthwhile/model/ast/visitor/IASTNodeVisitor.java",
"license": "bsd-3-clause",
"size": 13590
} | [
"edu.kit.iti.formal.pse.worthwhile.model.ast.FunctionAnnotation"
] | import edu.kit.iti.formal.pse.worthwhile.model.ast.FunctionAnnotation; | import edu.kit.iti.formal.pse.worthwhile.model.ast.*; | [
"edu.kit.iti"
] | edu.kit.iti; | 494,701 |
public static CsvReader parse(String data) {
if (data == null) {
throw new IllegalArgumentException("Parameter data can not be null.");
}
return new CsvReader(new StringReader(data));
}
private Charset charset = null;
private boolean closed = false;
private Co... | static CsvReader function(String data) { if (data == null) { throw new IllegalArgumentException(STR); } return new CsvReader(new StringReader(data)); } private Charset charset = null; private boolean closed = false; private ColumnBuffer columnBuffer = new ColumnBuffer(); private int columnsCount = 0; private long curre... | /**
* Creates a
* {@link com.taobao.api.internal.tdc.parser.csvreader.CsvReader
* CsvReader} object using a string of data as the source. Uses
* ISO-8859-1 as the {@link java.nio.charset.Charset Charset}.
*
* @param data The String of data to use as the source.
* @return A
... | Creates a <code>com.taobao.api.internal.tdc.parser.csvreader.CsvReader CsvReader</code> object using a string of data as the source. Uses ISO-8859-1 as the <code>java.nio.charset.Charset Charset</code> | parse | {
"repo_name": "kuiwang/my-dev",
"path": "src/main/java/com/taobao/api/internal/tdc/parser/CsvReader.java",
"license": "gpl-3.0",
"size": 61732
} | [
"java.io.Reader",
"java.io.StringReader",
"java.nio.charset.Charset"
] | import java.io.Reader; import java.io.StringReader; import java.nio.charset.Charset; | import java.io.*; import java.nio.charset.*; | [
"java.io",
"java.nio"
] | java.io; java.nio; | 1,513,924 |
void setPo(Parser parser); | void setPo(Parser parser); | /**
* Sets the parser with the Po command to parse.
*
* @param parser
* the parser of Cami commands.
*/ | Sets the parser with the Po command to parse | setPo | {
"repo_name": "lhillah/camipnml",
"path": "cpnami2-cpnami2/src/fr/lip6/move/pnml/cpnami/cami/model/Po.java",
"license": "epl-1.0",
"size": 3429
} | [
"fr.lip6.move.pnml.cpnami.cami.Parser"
] | import fr.lip6.move.pnml.cpnami.cami.Parser; | import fr.lip6.move.pnml.cpnami.cami.*; | [
"fr.lip6.move"
] | fr.lip6.move; | 2,885,019 |
public static TStream<String> directoryWatcher(TopologyElement te,
Supplier<String> directory) {
return directoryWatcher(te, directory, null);
} | static TStream<String> function(TopologyElement te, Supplier<String> directory) { return directoryWatcher(te, directory, null); } | /**
* Declare a stream containing the absolute pathname of
* newly created file names from watching {@code directory}.
* <p>
* This is the same as {@code directoryWatcher(t, () -> dir, null)}.
*
* @param te topology element whose topology the watcher will be added to
* @param direct... | Declare a stream containing the absolute pathname of newly created file names from watching directory. This is the same as directoryWatcher(t, () -> dir, null) | directoryWatcher | {
"repo_name": "queeniema/incubator-edgent",
"path": "connectors/file/src/main/java/org/apache/edgent/connectors/file/FileStreams.java",
"license": "apache-2.0",
"size": 11879
} | [
"org.apache.edgent.function.Supplier",
"org.apache.edgent.topology.TStream",
"org.apache.edgent.topology.TopologyElement"
] | import org.apache.edgent.function.Supplier; import org.apache.edgent.topology.TStream; import org.apache.edgent.topology.TopologyElement; | import org.apache.edgent.function.*; import org.apache.edgent.topology.*; | [
"org.apache.edgent"
] | org.apache.edgent; | 1,029,071 |
private void publishHandshakeEvent(ChannelHandlerContext ctx, InboundMessageContext inboundMessageContext) {
if (APIUtil.isAnalyticsEnabled()) {
WebSocketUtils.setApiPropertyToChannel(ctx,
org.wso2.carbon.apimgt.gateway.handlers.analytics.Constants.USER_AGENT_PROPERTY,
... | void function(ChannelHandlerContext ctx, InboundMessageContext inboundMessageContext) { if (APIUtil.isAnalyticsEnabled()) { WebSocketUtils.setApiPropertyToChannel(ctx, org.wso2.carbon.apimgt.gateway.handlers.analytics.Constants.USER_AGENT_PROPERTY, inboundMessageContext.getRequestHeaders().get(HttpHeaders.USER_AGENT));... | /**
* Publish handshake event if analytics enabled.
*
* @param ctx Channel context
* @param inboundMessageContext InboundMessageContext
*/ | Publish handshake event if analytics enabled | publishHandshakeEvent | {
"repo_name": "wso2/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/handlers/WebsocketInboundHandler.java",
"license": "apache-2.0",
"size": 12460
} | [
"io.netty.channel.ChannelHandlerContext",
"org.apache.http.HttpHeaders",
"org.wso2.carbon.apimgt.gateway.handlers.streaming.websocket.WebSocketUtils",
"org.wso2.carbon.apimgt.gateway.inbound.InboundMessageContext",
"org.wso2.carbon.apimgt.impl.APIConstants",
"org.wso2.carbon.apimgt.impl.utils.APIUtil"
] | import io.netty.channel.ChannelHandlerContext; import org.apache.http.HttpHeaders; import org.wso2.carbon.apimgt.gateway.handlers.streaming.websocket.WebSocketUtils; import org.wso2.carbon.apimgt.gateway.inbound.InboundMessageContext; import org.wso2.carbon.apimgt.impl.APIConstants; import org.wso2.carbon.apimgt.impl.u... | import io.netty.channel.*; import org.apache.http.*; import org.wso2.carbon.apimgt.gateway.handlers.streaming.websocket.*; import org.wso2.carbon.apimgt.gateway.inbound.*; import org.wso2.carbon.apimgt.impl.*; import org.wso2.carbon.apimgt.impl.utils.*; | [
"io.netty.channel",
"org.apache.http",
"org.wso2.carbon"
] | io.netty.channel; org.apache.http; org.wso2.carbon; | 2,549,461 |
public static PathQuery getQuery(HttpServletRequest request) {
return (PathQuery) request.getSession().getAttribute(Constants.QUERY);
} | static PathQuery function(HttpServletRequest request) { return (PathQuery) request.getSession().getAttribute(Constants.QUERY); } | /**
* Returns the PathQuery on the session.
*
* @param request The the current request.
* @return a PathQuery for the current user from the session
*/ | Returns the PathQuery on the session | getQuery | {
"repo_name": "JoeCarlson/intermine",
"path": "intermine/web/main/src/org/intermine/web/logic/session/SessionMethods.java",
"license": "lgpl-2.1",
"size": 47321
} | [
"javax.servlet.http.HttpServletRequest",
"org.intermine.pathquery.PathQuery",
"org.intermine.web.logic.Constants"
] | import javax.servlet.http.HttpServletRequest; import org.intermine.pathquery.PathQuery; import org.intermine.web.logic.Constants; | import javax.servlet.http.*; import org.intermine.pathquery.*; import org.intermine.web.logic.*; | [
"javax.servlet",
"org.intermine.pathquery",
"org.intermine.web"
] | javax.servlet; org.intermine.pathquery; org.intermine.web; | 1,758,710 |
public final void testGetFormat() {
byte[] encodedKey = new byte[] {(byte)1,(byte)2,(byte)3,(byte)4};
PKCS8EncodedKeySpec meks = new PKCS8EncodedKeySpec(encodedKey);
assertEquals("PKCS#8", meks.getFormat());
} | final void function() { byte[] encodedKey = new byte[] {(byte)1,(byte)2,(byte)3,(byte)4}; PKCS8EncodedKeySpec meks = new PKCS8EncodedKeySpec(encodedKey); assertEquals(STR, meks.getFormat()); } | /**
* Test for <code>getFormat()</code> method
* Assertion: returns format name (always "PKCS#8")
*/ | Test for <code>getFormat()</code> method Assertion: returns format name (always "PKCS#8") | testGetFormat | {
"repo_name": "debian-pkg-android-tools/android-platform-libcore",
"path": "luni/src/test/java/tests/security/spec/PKCS8EncodedKeySpecTest.java",
"license": "gpl-2.0",
"size": 4169
} | [
"java.security.spec.PKCS8EncodedKeySpec"
] | import java.security.spec.PKCS8EncodedKeySpec; | import java.security.spec.*; | [
"java.security"
] | java.security; | 1,599,055 |
public void add(HashTree newTree) {
for (Object item : newTree.list()) {
add(item).add(newTree.getTree(item));
}
}
public HashTree(Collection<?> keys) {
data = new HashMap<Object, HashTree>();
for (Object o : keys) {
data.put(o, new HashTree());
... | void function(HashTree newTree) { for (Object item : newTree.list()) { add(item).add(newTree.getTree(item)); } } public HashTree(Collection<?> keys) { data = new HashMap<Object, HashTree>(); for (Object o : keys) { data.put(o, new HashTree()); } } public HashTree(Object[] keys) { data = new HashMap<Object, HashTree>();... | /**
* Adds all the nodes and branches of the given tree to this tree. Is like
* merging two trees. Duplicates are ignored.
*
* @param newTree the tree to be added
*/ | Adds all the nodes and branches of the given tree to this tree. Is like merging two trees. Duplicates are ignored | add | {
"repo_name": "aksivaram2k2/jmeter-trunk",
"path": "src/jorphan/org/apache/jorphan/collections/HashTree.java",
"license": "apache-2.0",
"size": 36043
} | [
"java.util.Collection",
"java.util.HashMap"
] | import java.util.Collection; import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 1,491,999 |
protected boolean findText(BufferedReader in, String literal) throws IOException {
String line;
while((line=in.readLine())!=null)
if(line.indexOf(literal)!=-1)
return true;
return false;
} | boolean function(BufferedReader in, String literal) throws IOException { String line; while((line=in.readLine())!=null) if(line.indexOf(literal)!=-1) return true; return false; } | /**
* Finds the string literal from the given reader.
* @return
* true if found, false otherwise.
*/ | Finds the string literal from the given reader | findText | {
"repo_name": "fujibee/hudson",
"path": "core/src/main/java/hudson/util/FormFieldValidator.java",
"license": "mit",
"size": 23817
} | [
"java.io.BufferedReader",
"java.io.IOException"
] | import java.io.BufferedReader; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,733,676 |
public boolean equals(Object o) {
boolean result;
if (o instanceof BindReceiverRespPDU) {
BindReceiverRespPDU p = (BindReceiverRespPDU) o;
EqualsBuilder b = new EqualsBuilder();
b.append(p.getSequence(), getSequence());
b.append(p.getStatus(), getStatus());
// App... | boolean function(Object o) { boolean result; if (o instanceof BindReceiverRespPDU) { BindReceiverRespPDU p = (BindReceiverRespPDU) o; EqualsBuilder b = new EqualsBuilder(); b.append(p.getSequence(), getSequence()); b.append(p.getStatus(), getStatus()); b.append(p.system_id, system_id); b.append(p.getParameters(), getPa... | /**
* Checks if <code>o</code> and this object are equal.
*
* @return true if objects are equal, false otherwise
*/ | Checks if <code>o</code> and this object are equal | equals | {
"repo_name": "vnesek/nmote-smpp",
"path": "src/main/java/com/nmote/smpp/BindReceiverRespPDU.java",
"license": "bsd-3-clause",
"size": 4802
} | [
"org.apache.commons.lang3.builder.EqualsBuilder"
] | import org.apache.commons.lang3.builder.EqualsBuilder; | import org.apache.commons.lang3.builder.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,375,501 |
public static void main(String[] args)
{
SpringApplication.run(Application.class, args);
} | static void function(String[] args) { SpringApplication.run(Application.class, args); } | /**
* The main method.
*
* @param args the command-line arguments
*/ | The main method | main | {
"repo_name": "marcusportmann/mmp-java",
"path": "src/mmp-sample-wicket/src/main/java/guru/mmp/sample/Application.java",
"license": "apache-2.0",
"size": 8311
} | [
"org.springframework.boot.SpringApplication"
] | import org.springframework.boot.SpringApplication; | import org.springframework.boot.*; | [
"org.springframework.boot"
] | org.springframework.boot; | 2,598,934 |
static String streamToString(ContentStream stream) throws IOException
{
InputStream in = stream.getStream();
StringWriter writer = new StringWriter();
IOUtils.copy(in, writer, "UTF-8");
String content = writer.toString();
return content;
}
| static String streamToString(ContentStream stream) throws IOException { InputStream in = stream.getStream(); StringWriter writer = new StringWriter(); IOUtils.copy(in, writer, "UTF-8"); String content = writer.toString(); return content; } | /**
* Returns String content from Stream.
*
* @param stream
* @return
* @throws IOException
*/ | Returns String content from Stream | streamToString | {
"repo_name": "loftuxab/community-edition-old",
"path": "projects/qa-share/src/test/java/org/alfresco/share/api/cmis/CMISAppendTest.java",
"license": "lgpl-3.0",
"size": 8415
} | [
"java.io.IOException",
"java.io.InputStream",
"java.io.StringWriter",
"org.apache.chemistry.opencmis.commons.data.ContentStream",
"org.apache.commons.io.IOUtils"
] | import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; import org.apache.chemistry.opencmis.commons.data.ContentStream; import org.apache.commons.io.IOUtils; | import java.io.*; import org.apache.chemistry.opencmis.commons.data.*; import org.apache.commons.io.*; | [
"java.io",
"org.apache.chemistry",
"org.apache.commons"
] | java.io; org.apache.chemistry; org.apache.commons; | 2,684,086 |
public IIOMetadataNode getNativeNode() {
IIOMetadataNode node = new IIOMetadataNode(Box.getName(getType()));
setDefaultAttributes(node);
IIOMetadataNode child = new IIOMetadataNode("VerticalResolutionNumerator");
child.setUserObject(new Short(numV));
child.setNodeValue("" + numV);
... | IIOMetadataNode function() { IIOMetadataNode node = new IIOMetadataNode(Box.getName(getType())); setDefaultAttributes(node); IIOMetadataNode child = new IIOMetadataNode(STR); child.setUserObject(new Short(numV)); child.setNodeValue(STRVerticalResolutionDenominatorSTRSTRHorizontalResolutionNumeratorSTRSTRHorizontalResol... | /** Creates an <code>IIOMetadataNode</code> from this resolution
* box. The format of this node is defined in the XML dtd and xsd
* for the JP2 image file.
*/ | Creates an <code>IIOMetadataNode</code> from this resolution box. The format of this node is defined in the XML dtd and xsd for the JP2 image file | getNativeNode | {
"repo_name": "stelfrich/bioformats",
"path": "components/forks/jai/src/com/sun/media/imageioimpl/plugins/jpeg2000/ResolutionBox.java",
"license": "gpl-2.0",
"size": 9468
} | [
"javax.imageio.metadata.IIOMetadataNode"
] | import javax.imageio.metadata.IIOMetadataNode; | import javax.imageio.metadata.*; | [
"javax.imageio"
] | javax.imageio; | 945,529 |
public void printDirectory(CliDirectory directory, boolean recursive) {
printDirectory0(new PrintContext(), directory, recursive);
} | void function(CliDirectory directory, boolean recursive) { printDirectory0(new PrintContext(), directory, recursive); } | /**
* Print a directory and it's content.
*
* @param directory Directory to print.
* @param recursive Whether to recurse into sub-directories.
*/ | Print a directory and it's content | printDirectory | {
"repo_name": "ykrasik/jaci",
"path": "jaci-cli-core/src/main/java/com/github/ykrasik/jaci/cli/output/CliPrinter.java",
"license": "apache-2.0",
"size": 13063
} | [
"com.github.ykrasik.jaci.cli.directory.CliDirectory"
] | import com.github.ykrasik.jaci.cli.directory.CliDirectory; | import com.github.ykrasik.jaci.cli.directory.*; | [
"com.github.ykrasik"
] | com.github.ykrasik; | 1,165,446 |
@Test
public void metricRemoval_mockMetric() throws InterruptedException {
KafkaMetric metric = randomMetric();
this.simpleProvider.metricChange(metric);
this.latch = new CountDownLatch(1);
this.simpleProvider.metricRemoval(metric);
assertThat(this.latch.getCount()).isEqualTo(1);
assertThat(this.latch.a... | void function() throws InterruptedException { KafkaMetric metric = randomMetric(); this.simpleProvider.metricChange(metric); this.latch = new CountDownLatch(1); this.simpleProvider.metricRemoval(metric); assertThat(this.latch.getCount()).isEqualTo(1); assertThat(this.latch.await(2 * this.updateInterval, TimeUnit.MILLIS... | /**
* If {@link KafkaMetric} is removed, {@link GaugeService} is not triggered anymore.
*/ | If <code>KafkaMetric</code> is removed, <code>GaugeService</code> is not triggered anymore | metricRemoval_mockMetric | {
"repo_name": "stepio/spring-actuator-kafka",
"path": "src/test/java/org/springframework/boot/actuate/metrics/kafka/KafkaStatisticsProviderTests.java",
"license": "apache-2.0",
"size": 9078
} | [
"java.util.concurrent.CountDownLatch",
"java.util.concurrent.TimeUnit",
"org.apache.kafka.common.metrics.KafkaMetric",
"org.assertj.core.api.Assertions"
] | import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import org.apache.kafka.common.metrics.KafkaMetric; import org.assertj.core.api.Assertions; | import java.util.concurrent.*; import org.apache.kafka.common.metrics.*; import org.assertj.core.api.*; | [
"java.util",
"org.apache.kafka",
"org.assertj.core"
] | java.util; org.apache.kafka; org.assertj.core; | 803,021 |
protected void sequence_DeltaConstraint(ISerializationContext context, DeltaConstraint semanticObject) {
if (errorAcceptor != null) {
if (transientValues.isValueTransient(semanticObject, TypesPackage.Literals.DELTA_CONSTRAINT__DELTA) == ValueTransient.YES)
errorAcceptor.accept(diagnosticProvider.createFeatu... | void function(ISerializationContext context, DeltaConstraint semanticObject) { if (errorAcceptor != null) { if (transientValues.isValueTransient(semanticObject, TypesPackage.Literals.DELTA_CONSTRAINT__DELTA) == ValueTransient.YES) errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, TypesPa... | /**
* Contexts:
* AbstractTypeConstraint returns DeltaConstraint
* DeltaConstraint returns DeltaConstraint
*
* Constraint:
* (delta=ConstExpression constraint=RangeConstraint)
*/ | Contexts: AbstractTypeConstraint returns DeltaConstraint DeltaConstraint returns DeltaConstraint Constraint: (delta=ConstExpression constraint=RangeConstraint) | sequence_DeltaConstraint | {
"repo_name": "perojonsson/bridgepoint",
"path": "src/org.xtuml.bp.xtext.masl.parent/org.xtuml.bp.xtext.masl/src-gen/org/xtuml/bp/xtext/masl/serializer/MASLSemanticSequencer.java",
"license": "apache-2.0",
"size": 376780
} | [
"org.eclipse.xtext.serializer.ISerializationContext",
"org.eclipse.xtext.serializer.acceptor.SequenceFeeder",
"org.eclipse.xtext.serializer.sequencer.ITransientValueService",
"org.xtuml.bp.xtext.masl.masl.types.DeltaConstraint",
"org.xtuml.bp.xtext.masl.masl.types.TypesPackage"
] | import org.eclipse.xtext.serializer.ISerializationContext; import org.eclipse.xtext.serializer.acceptor.SequenceFeeder; import org.eclipse.xtext.serializer.sequencer.ITransientValueService; import org.xtuml.bp.xtext.masl.masl.types.DeltaConstraint; import org.xtuml.bp.xtext.masl.masl.types.TypesPackage; | import org.eclipse.xtext.serializer.*; import org.eclipse.xtext.serializer.acceptor.*; import org.eclipse.xtext.serializer.sequencer.*; import org.xtuml.bp.xtext.masl.masl.types.*; | [
"org.eclipse.xtext",
"org.xtuml.bp"
] | org.eclipse.xtext; org.xtuml.bp; | 1,452,154 |
public JsonArray deleteMultipleDevices(JsonArray arryOfDevicesToBeDeleted) throws IoTFCReSTException {
final String METHOD = "bulkDevicesRemove";
StringBuilder sb = new StringBuilder("https://");
sb.append(orgId).
append('.').
append(this.domain).append(BASIC_API_V0002_URL).
append("/bulk/dev... | JsonArray function(JsonArray arryOfDevicesToBeDeleted) throws IoTFCReSTException { final String METHOD = STR; StringBuilder sb = new StringBuilder(STR/bulk/devices/removeSTRpostSTRFailure in deleting the Devices, STR:: STRSome devices deleted successfullySTRInvalid request (No body, invalid JSON, unexpected key, bad va... | /**
* Delete multiple devices, each request can contain a maximum of 512Kb
*
* @param arryOfDevicesToBeDeleted Array of JSON devices to be deleted. Refer to
* <a href="https://docs.internetofthings.ibmcloud.com/swagger/v0002.html#!/Bulk_Operations/post_bulk_devices_remove">link</a>
* for more information a... | Delete multiple devices, each request can contain a maximum of 512Kb | deleteMultipleDevices | {
"repo_name": "sathipal/iot-java",
"path": "src/main/java/com/ibm/iotf/client/api/APIClient.java",
"license": "epl-1.0",
"size": 124231
} | [
"com.google.gson.JsonArray",
"com.ibm.iotf.client.IoTFCReSTException"
] | import com.google.gson.JsonArray; import com.ibm.iotf.client.IoTFCReSTException; | import com.google.gson.*; import com.ibm.iotf.client.*; | [
"com.google.gson",
"com.ibm.iotf"
] | com.google.gson; com.ibm.iotf; | 743,557 |
public static java.util.Set extractPatientGraphicAssessmentQuestionAnswerSet(ims.domain.ILightweightDomainFactory domainFactory, ims.assessment.vo.PatientGraphicAssessmentQuestionAnswerVoCollection voCollection)
{
return extractPatientGraphicAssessmentQuestionAnswerSet(domainFactory, voCollection, null, new H... | static java.util.Set function(ims.domain.ILightweightDomainFactory domainFactory, ims.assessment.vo.PatientGraphicAssessmentQuestionAnswerVoCollection voCollection) { return extractPatientGraphicAssessmentQuestionAnswerSet(domainFactory, voCollection, null, new HashMap()); } | /**
* Create the ims.assessment.instantiation.domain.objects.PatientGraphicAssessmentQuestionAnswer set from the value object collection.
* @param domainFactory - used to create existing (persistent) domain objects.
* @param voCollection - the collection of value objects
*/ | Create the ims.assessment.instantiation.domain.objects.PatientGraphicAssessmentQuestionAnswer set from the value object collection | extractPatientGraphicAssessmentQuestionAnswerSet | {
"repo_name": "open-health-hub/openMAXIMS",
"path": "openmaxims_workspace/ValueObjects/src/ims/assessment/vo/domain/PatientGraphicAssessmentQuestionAnswerVoAssembler.java",
"license": "agpl-3.0",
"size": 19924
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 570,733 |
private void persistRegionLastFlushedSequenceIds() throws IOException {
if (isFlushSeqIdPersistInProgress) {
return;
}
isFlushSeqIdPersistInProgress = true;
try {
Configuration conf = master.getConfiguration();
Path rootDir = FSUtils.getRootDir(conf);
Path lastFlushedSeqIdPath ... | void function() throws IOException { if (isFlushSeqIdPersistInProgress) { return; } isFlushSeqIdPersistInProgress = true; try { Configuration conf = master.getConfiguration(); Path rootDir = FSUtils.getRootDir(conf); Path lastFlushedSeqIdPath = new Path(rootDir, LAST_FLUSHED_SEQ_ID_FILE); FileSystem fs = FileSystem.get... | /**
* Persist last flushed sequence id of each region to HDFS
* @throws IOException if persit to HDFS fails
*/ | Persist last flushed sequence id of each region to HDFS | persistRegionLastFlushedSequenceIds | {
"repo_name": "francisliu/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java",
"license": "apache-2.0",
"size": 47198
} | [
"java.io.IOException",
"java.util.Map",
"java.util.concurrent.ConcurrentNavigableMap",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.fs.FSDataOutputStream",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos",
"... | import java.io.IOException; import java.util.Map; import java.util.concurrent.ConcurrentNavigableMap; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.shaded.protobuf.gene... | import java.io.*; import java.util.*; import java.util.concurrent.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hbase.shaded.protobuf.generated.*; import org.apache.hadoop.hbase.util.*; import org.apache.hbase.thirdparty.com.google.protobuf.*; | [
"java.io",
"java.util",
"org.apache.hadoop",
"org.apache.hbase"
] | java.io; java.util; org.apache.hadoop; org.apache.hbase; | 1,763,261 |
public void setMedications(Set<Medication> medications) {
this.medications = medications;
} | void function(Set<Medication> medications) { this.medications = medications; } | /**
* Sets the medications.
*
* @param medications
* the new medications
*/ | Sets the medications | setMedications | {
"repo_name": "tlin-fei/ds4p",
"path": "DS4P/consent2share/core/src/main/java/gov/samhsa/consent2share/domain/patient/Patient.java",
"license": "bsd-3-clause",
"size": 22738
} | [
"gov.samhsa.consent2share.domain.clinicaldata.Medication",
"java.util.Set"
] | import gov.samhsa.consent2share.domain.clinicaldata.Medication; import java.util.Set; | import gov.samhsa.consent2share.domain.clinicaldata.*; import java.util.*; | [
"gov.samhsa.consent2share",
"java.util"
] | gov.samhsa.consent2share; java.util; | 632,011 |
public TimerUpdateBuilder withCompletedTimers(Iterable<TimerData> completedTimers) {
Iterables.addAll(this.completedTimers, completedTimers);
return this;
} | TimerUpdateBuilder function(Iterable<TimerData> completedTimers) { Iterables.addAll(this.completedTimers, completedTimers); return this; } | /**
* Adds all of the provided timers to the collection of completed timers, and returns this
* {@link TimerUpdateBuilder}.
*/ | Adds all of the provided timers to the collection of completed timers, and returns this <code>TimerUpdateBuilder</code> | withCompletedTimers | {
"repo_name": "elibixby/DataflowJavaSDK",
"path": "sdk/src/main/java/com/google/cloud/dataflow/sdk/runners/inprocess/InMemoryWatermarkManager.java",
"license": "apache-2.0",
"size": 55003
} | [
"com.google.cloud.dataflow.sdk.util.TimerInternals",
"com.google.common.collect.Iterables"
] | import com.google.cloud.dataflow.sdk.util.TimerInternals; import com.google.common.collect.Iterables; | import com.google.cloud.dataflow.sdk.util.*; import com.google.common.collect.*; | [
"com.google.cloud",
"com.google.common"
] | com.google.cloud; com.google.common; | 1,822,946 |
private @CheckForNull Runnable makeBuildable(final BuildableItem p) {
if (p.task instanceof FlyweightTask) {
String taskDisplayName = LOGGER.isLoggable(Level.FINEST) ? p.task.getFullDisplayName() : null;
if (!isBlockedByShutdown(p.task)) {
Runnable runnable = makeFly... | @CheckForNull Runnable function(final BuildableItem p) { if (p.task instanceof FlyweightTask) { String taskDisplayName = LOGGER.isLoggable(Level.FINEST) ? p.task.getFullDisplayName() : null; if (!isBlockedByShutdown(p.task)) { Runnable runnable = makeFlyWeightTaskBuildable(p); LOGGER.log(Level.FINEST, STR, taskDisplayN... | /**
* Tries to make an item ready to build.
* @param p a proposed buildable item
* @return a thunk to actually prepare it (after leaving an earlier list), or null if it cannot be run now
*/ | Tries to make an item ready to build | makeBuildable | {
"repo_name": "kohsuke/hudson",
"path": "core/src/main/java/hudson/model/Queue.java",
"license": "mit",
"size": 115775
} | [
"java.util.logging.Level",
"javax.annotation.CheckForNull"
] | import java.util.logging.Level; import javax.annotation.CheckForNull; | import java.util.logging.*; import javax.annotation.*; | [
"java.util",
"javax.annotation"
] | java.util; javax.annotation; | 1,076,722 |
public void testIndexOf2() {
XYIntervalSeries s1 = new XYIntervalSeries("Series 1", false, true);
s1.add(1.0, 1.0, 1.0, 2.0, 1.9, 2.1);
s1.add(3.0, 3.0, 3.0, 3.0, 2.9, 3.1);
s1.add(2.0, 2.0, 2.0, 2.0, 1.9, 2.1);
assertEquals(0, s1.indexOf(new Double(1.0)));
assertEqua... | void function() { XYIntervalSeries s1 = new XYIntervalSeries(STR, false, true); s1.add(1.0, 1.0, 1.0, 2.0, 1.9, 2.1); s1.add(3.0, 3.0, 3.0, 3.0, 2.9, 3.1); s1.add(2.0, 2.0, 2.0, 2.0, 1.9, 2.1); assertEquals(0, s1.indexOf(new Double(1.0))); assertEquals(1, s1.indexOf(new Double(3.0))); assertEquals(2, s1.indexOf(new Dou... | /**
* A check for the indexOf() method for an unsorted series.
*/ | A check for the indexOf() method for an unsorted series | testIndexOf2 | {
"repo_name": "ilyessou/jfreechart",
"path": "tests/org/jfree/data/xy/junit/XYIntervalSeriesTests.java",
"license": "lgpl-2.1",
"size": 10837
} | [
"org.jfree.data.xy.XYIntervalSeries"
] | import org.jfree.data.xy.XYIntervalSeries; | import org.jfree.data.xy.*; | [
"org.jfree.data"
] | org.jfree.data; | 420,600 |
public void testMarkResetOverflowInternalBufferKeepBytes()
throws IOException {
InputStream is = getStream(128*1024);
is.mark(120*1024);
byte[] buf = new byte[120*1024-1];
fillArray(is, buf);
is.reset();
checkBeginningOfStream(is);
// Again, but t... | void function() throws IOException { InputStream is = getStream(128*1024); is.mark(120*1024); byte[] buf = new byte[120*1024-1]; fillArray(is, buf); is.reset(); checkBeginningOfStream(is); is = getStream(36*1024); is.mark(4*1024); buf = new byte[36*1024-1]; fillArray(is, buf); try { is.reset(); fail(STR); } catch (IOEx... | /**
* Reads almost enough bytes to read past the read ahead limit, then tests
* that the reset works. After that, reads past the read ahead limit and
* tests that the reset fails.
*
* @throws IOException if something goes wrong
*/ | Reads almost enough bytes to read past the read ahead limit, then tests that the reset works. After that, reads past the read ahead limit and tests that the reset fails | testMarkResetOverflowInternalBufferKeepBytes | {
"repo_name": "trejkaz/derby",
"path": "java/testing/org/apache/derbyTesting/unitTests/junit/ReaderToUTF8StreamTest.java",
"license": "apache-2.0",
"size": 24965
} | [
"java.io.IOException",
"java.io.InputStream"
] | import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 292,239 |
public int getVersion() {
return ((Long) DatabaseUtils.longForQuery(this, "PRAGMA user_version;", null)).intValue();
} | int function() { return ((Long) DatabaseUtils.longForQuery(this, STR, null)).intValue(); } | /**
* Gets the database version.
*
* @return the database version
*/ | Gets the database version | getVersion | {
"repo_name": "mateor/pdroid",
"path": "android-4.0.3_r1/trunk/frameworks/base/core/java/android/database/sqlite/SQLiteDatabase.java",
"license": "gpl-3.0",
"size": 113971
} | [
"android.database.DatabaseUtils"
] | import android.database.DatabaseUtils; | import android.database.*; | [
"android.database"
] | android.database; | 2,722,235 |
@ModelNodeBinding(detypedName = "filter-spec")
public String filterSpec() {
return this.filterSpec;
} | @ModelNodeBinding(detypedName = STR) String function() { return this.filterSpec; } | /**
* A filter expression value to define a filter. Example for a filter that does not match a pattern: not(match("JBAS.*"))
*/ | A filter expression value to define a filter. Example for a filter that does not match a pattern: not(match("JBAS.*")) | filterSpec | {
"repo_name": "wildfly-swarm/wildfly-config-api",
"path": "generator/src/test/java/org/wildfly/apigen/test/invocation/logging/subsystem/loggingProfile/periodicRotatingFileHandler/PeriodicRotatingFileHandler.java",
"license": "apache-2.0",
"size": 5465
} | [
"org.wildfly.swarm.config.runtime.ModelNodeBinding"
] | import org.wildfly.swarm.config.runtime.ModelNodeBinding; | import org.wildfly.swarm.config.runtime.*; | [
"org.wildfly.swarm"
] | org.wildfly.swarm; | 1,671,278 |
public static void setStart(IteratorSetting is, String start, boolean startInclusive) {
SimpleDateFormat dateParser = initDateParser();
try {
long startTS = dateParser.parse(start).getTime();
setStart(is, startTS, startInclusive);
} catch (ParseException e) {
throw new IllegalArgumentExc... | static void function(IteratorSetting is, String start, boolean startInclusive) { SimpleDateFormat dateParser = initDateParser(); try { long startTS = dateParser.parse(start).getTime(); setStart(is, startTS, startInclusive); } catch (ParseException e) { throw new IllegalArgumentException(STR + start); } } | /**
* A convenience method for setting the start timestamp accepted by the timestamp filter.
*
* @param is
* the iterator setting object to configure
* @param start
* the start timestamp (yyyyMMddHHmmssz)
* @param startInclusive
* boolean indicating whether the start i... | A convenience method for setting the start timestamp accepted by the timestamp filter | setStart | {
"repo_name": "milleruntime/accumulo",
"path": "core/src/main/java/org/apache/accumulo/core/iterators/user/TimestampFilter.java",
"license": "apache-2.0",
"size": 10649
} | [
"java.text.ParseException",
"java.text.SimpleDateFormat",
"org.apache.accumulo.core.client.IteratorSetting"
] | import java.text.ParseException; import java.text.SimpleDateFormat; import org.apache.accumulo.core.client.IteratorSetting; | import java.text.*; import org.apache.accumulo.core.client.*; | [
"java.text",
"org.apache.accumulo"
] | java.text; org.apache.accumulo; | 2,119,633 |
@ActionDoc(text = "Sends a message to an XMPP multi user chat.")
static public boolean chatXMPP(@ParamDoc(name = "message") String message) {
boolean success = false;
try {
MultiUserChat chat = XMPPConnect.getChat();
try {
while (message.length() >= 2000... | @ActionDoc(text = STR) static boolean function(@ParamDoc(name = STR) String message) { boolean success = false; try { MultiUserChat chat = XMPPConnect.getChat(); try { while (message.length() >= 2000) { chat.sendMessage(message.substring(0, 2000)); message = message.substring(2000); } chat.sendMessage(message); logger.... | /**
* Sends a message to an XMPP multi user chat.
*
* @param message the message to send
*
* @return <code>true</code>, if sending the message has been successful and
* <code>false</code> in all other cases.
*/ | Sends a message to an XMPP multi user chat | chatXMPP | {
"repo_name": "openhab/openhab",
"path": "bundles/action/org.openhab.action.xmpp/src/main/java/org/openhab/action/xmpp/internal/XMPP.java",
"license": "epl-1.0",
"size": 7303
} | [
"org.jivesoftware.smack.SmackException",
"org.jivesoftware.smack.XMPPException",
"org.jivesoftware.smackx.muc.MultiUserChat",
"org.openhab.core.scriptengine.action.ActionDoc",
"org.openhab.core.scriptengine.action.ParamDoc"
] | import org.jivesoftware.smack.SmackException; import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smackx.muc.MultiUserChat; import org.openhab.core.scriptengine.action.ActionDoc; import org.openhab.core.scriptengine.action.ParamDoc; | import org.jivesoftware.smack.*; import org.jivesoftware.smackx.muc.*; import org.openhab.core.scriptengine.action.*; | [
"org.jivesoftware.smack",
"org.jivesoftware.smackx",
"org.openhab.core"
] | org.jivesoftware.smack; org.jivesoftware.smackx; org.openhab.core; | 86,321 |
@Override
public String toString() {
String type = null;
// iterate through all optypes, looking for
// a match...
// sadly do this with reflection
Field[] fields = OpTypes.class.getFields();
for (Field f : fields) {
if (f.getType() != int.class) cont... | String function() { String type = null; Field[] fields = OpTypes.class.getFields(); for (Field f : fields) { if (f.getType() != int.class) continue; int value = 0; try { value = f.getInt(null); } catch (Exception e) { e.printStackTrace(); } if (value == opType) { type = f.getName(); break; } } assert(type != null); Str... | /**
* This ugly code is never called by HSQL or VoltDB
* explicitly, but it does make debugging in eclipse
* easier because it makes expressions display their
* type when you mouse over them.
*/ | This ugly code is never called by HSQL or VoltDB explicitly, but it does make debugging in eclipse easier because it makes expressions display their type when you mouse over them | toString | {
"repo_name": "zheguang/voltdb",
"path": "src/hsqldb19b3/org/hsqldb_voltpatches/Expression.java",
"license": "agpl-3.0",
"size": 68739
} | [
"java.lang.reflect.Field"
] | import java.lang.reflect.Field; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 1,579,491 |
public String requestWithGETNoProxy(String param, @Nullable String headerKey, @Nullable String headerValue) throws IOException, HttpException {
HttpURLConnection connection = null;
try {
log.debug("Executing HTTP request " + baseUrl + param + " proxy: none.");
URL url = new U... | String function(String param, @Nullable String headerKey, @Nullable String headerValue) throws IOException, HttpException { HttpURLConnection connection = null; try { log.debug(STR + baseUrl + param + STR); URL url = new URL(baseUrl + param); connection = (HttpURLConnection) url.openConnection(); connection.setRequestM... | /**
* Make an HTTP Get request directly (not routed over socks5 proxy).
*/ | Make an HTTP Get request directly (not routed over socks5 proxy) | requestWithGETNoProxy | {
"repo_name": "haiqu/bitsquare",
"path": "network/src/main/java/io/bitsquare/http/HttpClient.java",
"license": "agpl-3.0",
"size": 7628
} | [
"io.bitsquare.app.Version",
"java.io.IOException",
"java.net.HttpURLConnection",
"javax.annotation.Nullable"
] | import io.bitsquare.app.Version; import java.io.IOException; import java.net.HttpURLConnection; import javax.annotation.Nullable; | import io.bitsquare.app.*; import java.io.*; import java.net.*; import javax.annotation.*; | [
"io.bitsquare.app",
"java.io",
"java.net",
"javax.annotation"
] | io.bitsquare.app; java.io; java.net; javax.annotation; | 1,218,761 |
private boolean createSecurityModelNode(String securityComponent, String subnodeName, String flagAttributeName,
String flagDefaultValue, final SecurityModule[] securityModules, String domainName, ModelNode operations) {
if (securityModules == null || securityModul... | boolean function(String securityComponent, String subnodeName, String flagAttributeName, String flagDefaultValue, final SecurityModule[] securityModules, String domainName, ModelNode operations) { if (securityModules == null securityModules.length == 0) { if (LOGGER.isInfoEnabled()) { LOGGER.trace(STR + securityCompone... | /**
* Creates a {@link ModelNode} with the security component configuration. If the securityConfigurations array is empty or
* null, then null is returned.
*
* @param securityComponent name of security component (e.g. {@link org.jboss.as.test.integration.security.common.Constants#AUTHORIZATION})
... | Creates a <code>ModelNode</code> with the security component configuration. If the securityConfigurations array is empty or null, then null is returned | createSecurityModelNode | {
"repo_name": "xasx/wildfly",
"path": "testsuite/shared/src/main/java/org/jboss/as/test/integration/security/common/AbstractSecurityDomainsServerSetupTask.java",
"license": "lgpl-2.1",
"size": 20647
} | [
"java.util.Collections",
"java.util.Map",
"org.apache.commons.lang.StringUtils",
"org.jboss.as.controller.PathAddress",
"org.jboss.as.controller.descriptions.ModelDescriptionConstants",
"org.jboss.as.controller.operations.common.Util",
"org.jboss.as.test.integration.security.common.config.SecurityModule... | import java.util.Collections; import java.util.Map; import org.apache.commons.lang.StringUtils; import org.jboss.as.controller.PathAddress; import org.jboss.as.controller.descriptions.ModelDescriptionConstants; import org.jboss.as.controller.operations.common.Util; import org.jboss.as.test.integration.security.common.c... | import java.util.*; import org.apache.commons.lang.*; import org.jboss.as.controller.*; import org.jboss.as.controller.descriptions.*; import org.jboss.as.controller.operations.common.*; import org.jboss.as.test.integration.security.common.config.*; import org.jboss.dmr.*; | [
"java.util",
"org.apache.commons",
"org.jboss.as",
"org.jboss.dmr"
] | java.util; org.apache.commons; org.jboss.as; org.jboss.dmr; | 1,563,190 |
public static MsrAssistData_R98_ExpOTD fromPerUnaligned(byte[] encodedBytes) {
MsrAssistData_R98_ExpOTD result = new MsrAssistData_R98_ExpOTD();
result.decodePerUnaligned(new BitStreamReader(encodedBytes));
return result;
} | static MsrAssistData_R98_ExpOTD function(byte[] encodedBytes) { MsrAssistData_R98_ExpOTD result = new MsrAssistData_R98_ExpOTD(); result.decodePerUnaligned(new BitStreamReader(encodedBytes)); return result; } | /**
* Creates a new MsrAssistData_R98_ExpOTD from encoded stream.
*/ | Creates a new MsrAssistData_R98_ExpOTD from encoded stream | fromPerUnaligned | {
"repo_name": "google/supl-client",
"path": "src/main/java/com/google/location/suplclient/asn1/supl2/rrlp_components/MsrAssistData_R98_ExpOTD.java",
"license": "apache-2.0",
"size": 6537
} | [
"com.google.location.suplclient.asn1.base.BitStreamReader"
] | import com.google.location.suplclient.asn1.base.BitStreamReader; | import com.google.location.suplclient.asn1.base.*; | [
"com.google.location"
] | com.google.location; | 1,652,310 |
public void generate() throws IOException {
setGenerators();
postSetGenerators();
if (interfaceWriter != null) {
interfaceWriter.generate();
}
if (stubWriter != null) {
stubWriter.generate();
}
if (skelWriter != null) {
... | void function() throws IOException { setGenerators(); postSetGenerators(); if (interfaceWriter != null) { interfaceWriter.generate(); } if (stubWriter != null) { stubWriter.generate(); } if (skelWriter != null) { skelWriter.generate(); } if (implWriter != null) { implWriter.generate(); } } | /**
* Write all the binding bindings: stub, skeleton, and impl.
*
* @throws IOException
*/ | Write all the binding bindings: stub, skeleton, and impl | generate | {
"repo_name": "hugosato/apache-axis",
"path": "src/org/apache/axis/wsdl/toJava/JavaBindingWriter.java",
"license": "apache-2.0",
"size": 7092
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,877,085 |
@Deprecated
public boolean rename(String src, String dst) throws IOException {
checkOpen();
try {
return namenode.rename(src, dst);
} catch(RemoteException re) {
throw re.unwrapRemoteException(AccessControlException.class,
NSQuotaExceededException.class,
... | boolean function(String src, String dst) throws IOException { checkOpen(); try { return namenode.rename(src, dst); } catch(RemoteException re) { throw re.unwrapRemoteException(AccessControlException.class, NSQuotaExceededException.class, DSQuotaExceededException.class, UnresolvedPathException.class, SnapshotAccessContr... | /**
* Rename file or directory.
* @see ClientProtocol#rename(String, String)
* @deprecated Use {@link #rename(String, String, Options.Rename...)} instead.
*/ | Rename file or directory | rename | {
"repo_name": "tomatoKiller/Hadoop_Source_Learn",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java",
"license": "apache-2.0",
"size": 95752
} | [
"java.io.IOException",
"org.apache.hadoop.hdfs.protocol.DSQuotaExceededException",
"org.apache.hadoop.hdfs.protocol.NSQuotaExceededException",
"org.apache.hadoop.hdfs.protocol.SnapshotAccessControlException",
"org.apache.hadoop.hdfs.protocol.UnresolvedPathException",
"org.apache.hadoop.ipc.RemoteException... | import java.io.IOException; import org.apache.hadoop.hdfs.protocol.DSQuotaExceededException; import org.apache.hadoop.hdfs.protocol.NSQuotaExceededException; import org.apache.hadoop.hdfs.protocol.SnapshotAccessControlException; import org.apache.hadoop.hdfs.protocol.UnresolvedPathException; import org.apache.hadoop.ip... | import java.io.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.ipc.*; import org.apache.hadoop.security.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,287,704 |
public boolean isAcVersionExists(String preferred_name, String context_IDSEQ, String actl_name, Connection conn) throws DBException {
boolean isExists;
StringBuffer sql = new StringBuffer();
sql.append("select COUNT(*) as count from admin_components_view ");
sql.append("where (preferred_name = '").append(p... | boolean function(String preferred_name, String context_IDSEQ, String actl_name, Connection conn) throws DBException { boolean isExists; StringBuffer sql = new StringBuffer(); sql.append(STR); sql.append(STR).append(preferred_name).append( STR).append(context_IDSEQ).append( STR).append(actl_name).append( STR) .append(DB... | /**
* This method checks if prior version of AC already exists
* If exists, returns true else returns false
*
* @param preferred_name
* @param context_IDSEQ
* @param actl_name
* @param conn
* @return
* @throws DBException
*/ | This method checks if prior version of AC already exists If exists, returns true else returns false | isAcVersionExists | {
"repo_name": "NCIP/cadsr-cdecurate",
"path": "src/gov/nih/nci/cadsr/persist/ac/Admin_Components_Mgr.java",
"license": "bsd-3-clause",
"size": 7207
} | [
"gov.nih.nci.cadsr.persist.common.DBConstants",
"gov.nih.nci.cadsr.persist.exception.DBException",
"java.sql.Connection"
] | import gov.nih.nci.cadsr.persist.common.DBConstants; import gov.nih.nci.cadsr.persist.exception.DBException; import java.sql.Connection; | import gov.nih.nci.cadsr.persist.common.*; import gov.nih.nci.cadsr.persist.exception.*; import java.sql.*; | [
"gov.nih.nci",
"java.sql"
] | gov.nih.nci; java.sql; | 1,362,036 |
public void flush() throws IOException {
final ByteBuffer data = ByteBuffer.allocate(
getCapacity() * FatDirectoryEntry.SIZE + (volumeLabel != null ? FatDirectoryEntry.SIZE : 0));
for (FatDirectoryEntry entry : this.entries) {
if (entry != null) {
... | void function() throws IOException { final ByteBuffer data = ByteBuffer.allocate( getCapacity() * FatDirectoryEntry.SIZE + (volumeLabel != null ? FatDirectoryEntry.SIZE : 0)); for (FatDirectoryEntry entry : this.entries) { if (entry != null) { entry.write(data); } } if (this.volumeLabel != null) { final FatDirectoryEnt... | /**
* Flush the contents of this directory to the persistent storage
*/ | Flush the contents of this directory to the persistent storage | flush | {
"repo_name": "waldheinz/fat32-lib",
"path": "src/main/java/de/waldheinz/fs/fat/AbstractDirectory.java",
"license": "lgpl-3.0",
"size": 12090
} | [
"java.io.IOException",
"java.nio.ByteBuffer"
] | import java.io.IOException; import java.nio.ByteBuffer; | import java.io.*; import java.nio.*; | [
"java.io",
"java.nio"
] | java.io; java.nio; | 720,448 |
public DateTime toDateTime(DateTimeZone zone) {
Chronology chrono = DateTimeUtils.getChronology(getChronology());
chrono = chrono.withZone(zone);
return new DateTime(getMillis(), chrono);
} | DateTime function(DateTimeZone zone) { Chronology chrono = DateTimeUtils.getChronology(getChronology()); chrono = chrono.withZone(zone); return new DateTime(getMillis(), chrono); } | /**
* Get this object as a DateTime using the same chronology but a different zone.
*
* @param zone time zone to apply, or default if null
* @return a DateTime using the same millis
*/ | Get this object as a DateTime using the same chronology but a different zone | toDateTime | {
"repo_name": "PavelSozonov/JodaTimeTesting",
"path": "src/main/java/org/joda/time/base/AbstractInstant.java",
"license": "apache-2.0",
"size": 15049
} | [
"org.joda.time.Chronology",
"org.joda.time.DateTime",
"org.joda.time.DateTimeUtils",
"org.joda.time.DateTimeZone"
] | import org.joda.time.Chronology; import org.joda.time.DateTime; import org.joda.time.DateTimeUtils; import org.joda.time.DateTimeZone; | import org.joda.time.*; | [
"org.joda.time"
] | org.joda.time; | 472,914 |
private static void attemptRetryOnException(String logPrefix, Request<?> request, VolleyError exception)
throws VolleyError
{
RetryPolicy retryPolicy = request.getRetryPolicy();
int oldTimeout = request.getTimeoutMs();
try
{
retryPolicy.retry(exception);
}
catch (VolleyError e)
{
request.add... | static void function(String logPrefix, Request<?> request, VolleyError exception) throws VolleyError { RetryPolicy retryPolicy = request.getRetryPolicy(); int oldTimeout = request.getTimeoutMs(); try { retryPolicy.retry(exception); } catch (VolleyError e) { request.addMarker(String.format(STR, logPrefix, oldTimeout)); ... | /**
* Attempts to prepare the request for a retry. If there are no more
* attempts remaining in the
* request's retry policy, a timeout exception is thrown.
*
* @param request
* The request to use.
*/ | Attempts to prepare the request for a retry. If there are no more attempts remaining in the request's retry policy, a timeout exception is thrown | attemptRetryOnException | {
"repo_name": "himanshuagarwal77225/BookMySkills",
"path": "src/com/android/volley/toolbox/BasicNetwork.java",
"license": "mit",
"size": 8357
} | [
"com.android.volley.Request",
"com.android.volley.RetryPolicy",
"com.android.volley.VolleyError"
] | import com.android.volley.Request; import com.android.volley.RetryPolicy; import com.android.volley.VolleyError; | import com.android.volley.*; | [
"com.android.volley"
] | com.android.volley; | 1,912,086 |
protected CacheEntry lookupEntryFromCurrentTransaction() {
// Prior to 5.1, this used to happen by grabbing any InvocationContext in ThreadLocal. Since ThreadLocals
// can no longer be relied upon in 5.1, we need to grab the TransactionTable and check if an ongoing
// transaction exists, peeking i... | CacheEntry function() { try { Transaction tx = transactionManager.getTransaction(); LocalTransaction localTransaction = tx == null ? null : transactionTable.getLocalTransaction(tx); return localTransaction == null ? null : localTransaction.lookupEntry(deltaMapKey); } catch (SystemException e) { return null; } } | /**
* Looks up the CacheEntry stored in transactional context corresponding to this AtomicMap. If this AtomicMap
* has yet to be touched by the current transaction, this method will return a null.
* @return
*/ | Looks up the CacheEntry stored in transactional context corresponding to this AtomicMap. If this AtomicMap has yet to be touched by the current transaction, this method will return a null | lookupEntryFromCurrentTransaction | {
"repo_name": "nmldiegues/stibt",
"path": "infinispan/core/src/main/java/org/infinispan/atomic/AtomicHashMapProxy.java",
"license": "apache-2.0",
"size": 10537
} | [
"javax.transaction.SystemException",
"javax.transaction.Transaction",
"org.infinispan.container.entries.CacheEntry",
"org.infinispan.transaction.LocalTransaction"
] | import javax.transaction.SystemException; import javax.transaction.Transaction; import org.infinispan.container.entries.CacheEntry; import org.infinispan.transaction.LocalTransaction; | import javax.transaction.*; import org.infinispan.container.entries.*; import org.infinispan.transaction.*; | [
"javax.transaction",
"org.infinispan.container",
"org.infinispan.transaction"
] | javax.transaction; org.infinispan.container; org.infinispan.transaction; | 2,204,443 |
@PostMapping("/addMappingProject")
public String addMappingProject(
@RequestParam("mapping-project-name") String name,
@RequestParam("target-entity") String targetEntity,
@RequestParam("depth") int depth) {
MappingProject newMappingProject = mappingService.addMappingProject(name, targetEntity,... | @PostMapping(STR) String function( @RequestParam(STR) String name, @RequestParam(STR) String targetEntity, @RequestParam("depth") int depth) { MappingProject newMappingProject = mappingService.addMappingProject(name, targetEntity, depth); return STR + getMappingServiceMenuUrl() + STR + newMappingProject.getIdentifier()... | /**
* Adds a new mapping project.
*
* @param name name of the mapping project
* @param targetEntity name of the project's first {@link MappingTarget}'s target entity
* @return redirect URL for the newly created mapping project
*/ | Adds a new mapping project | addMappingProject | {
"repo_name": "marikaris/molgenis",
"path": "molgenis-semantic-mapper/src/main/java/org/molgenis/semanticmapper/controller/MappingServiceController.java",
"license": "lgpl-3.0",
"size": 44481
} | [
"org.molgenis.semanticmapper.mapping.model.MappingProject",
"org.springframework.web.bind.annotation.PostMapping",
"org.springframework.web.bind.annotation.RequestParam"
] | import org.molgenis.semanticmapper.mapping.model.MappingProject; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestParam; | import org.molgenis.semanticmapper.mapping.model.*; import org.springframework.web.bind.annotation.*; | [
"org.molgenis.semanticmapper",
"org.springframework.web"
] | org.molgenis.semanticmapper; org.springframework.web; | 1,940,157 |
public interface ImageListener extends ErrorListener {
public void onResponse(ImageContainer response, boolean isImmediate);
}
| interface ImageListener extends ErrorListener { public void function(ImageContainer response, boolean isImmediate); } | /**
* Listens for non-error changes to the loading of the image request.
*
* @param response Holds all information pertaining to the request, as well
* as the bitmap (if it is loaded).
* @param isImmediate True if this was called during ImageLoader.get() variants.
... | Listens for non-error changes to the loading of the image request | onResponse | {
"repo_name": "LifengMr/apker",
"path": "ApkerTest/apker/src/main/java/com/ss/android/apker/volley/toolbox/ImageLoader.java",
"license": "apache-2.0",
"size": 21110
} | [
"com.ss.android.apker.volley.Response"
] | import com.ss.android.apker.volley.Response; | import com.ss.android.apker.volley.*; | [
"com.ss.android"
] | com.ss.android; | 2,180,796 |
boolean canPlayerMoveLeft(Pair<Integer, Integer> p);
boolean canPlayerMoveRight(Pair<Integer, Integer> p);
boolean canPlayerMoveUp(Pair<Integer, Integer> p);
boolean canPlayerMoveDown(Pair<Integer, Integer> p);
boolean isPlayerTrapped(int playerNumber);
void setPlayerPosition(Pair<Integer, Integer> p... | boolean canPlayerMoveLeft(Pair<Integer, Integer> p); boolean canPlayerMoveRight(Pair<Integer, Integer> p); boolean canPlayerMoveUp(Pair<Integer, Integer> p); boolean canPlayerMoveDown(Pair<Integer, Integer> p); boolean isPlayerTrapped(int playerNumber); void setPlayerPosition(Pair<Integer, Integer> p, int playerNumber)... | /**
* Teleport player to random position on the board.New position
* is not guaranteed to be safe. Remember to set the new location
* afterwards!
* @return Pair representing new player location
*/ | Teleport player to random position on the board.New position is not guaranteed to be safe. Remember to set the new location afterwards | teleportPlayer | {
"repo_name": "Tacohen/Killbots",
"path": "Killbots/src/com/tacohen/killbots/Logic/IPlayerMovement.java",
"license": "gpl-2.0",
"size": 1917
} | [
"android.util.Pair"
] | import android.util.Pair; | import android.util.*; | [
"android.util"
] | android.util; | 1,506,871 |
synchronized Session connect(String username, String password,
String zoneString, int timeZoneSeconds) {
if (username.equalsIgnoreCase("SA")) {
username = "SA";
}
User user = userManager.getUser(username, password);
Session session = ses... | synchronized Session connect(String username, String password, String zoneString, int timeZoneSeconds) { if (username.equalsIgnoreCase("SA")) { username = "SA"; } User user = userManager.getUser(username, password); Session session = sessionManager.newSession(this, user, databaseReadOnly, true, zoneString, timeZoneSeco... | /**
* Constructs a new Session that operates within (is connected to) the
* context of this Database object. <p>
*
* If successful, the new Session object initially operates on behalf of
* the user specified by the supplied user name.
*
* Throws if username or password is invalid.... | Constructs a new Session that operates within (is connected to) the context of this Database object. If successful, the new Session object initially operates on behalf of the user specified by the supplied user name. Throws if username or password is invalid | connect | {
"repo_name": "RabadanLab/Pegasus",
"path": "resources/hsqldb-2.2.7/hsqldb/src/org/hsqldb/Database.java",
"license": "mit",
"size": 23977
} | [
"org.hsqldb.rights.User"
] | import org.hsqldb.rights.User; | import org.hsqldb.rights.*; | [
"org.hsqldb.rights"
] | org.hsqldb.rights; | 477,771 |
@Test
public void testFindOperationsProjected2ProjectedSameDatum() throws Exception {
String source = "EPSG:25830";
String target = "EPSG:3035";
String expectedText = "AUTHORITY[\"EPSG\",\"19986\"]";
Set<CoordinateOperation> operations = findOperations(source, target);
A... | void function() throws Exception { String source = STR; String target = STR; String expectedText = STREPSG\",\"19986\"]"; Set<CoordinateOperation> operations = findOperations(source, target); Assert.assertEquals(1, operations.size()); assertOperationContained(operations, expectedText); } | /**
* Tests findOperations method for a pair of known CRSs. 25830 (Projected) to 3035 (Projected),
* same datum
*/ | Tests findOperations method for a pair of known CRSs. 25830 (Projected) to 3035 (Projected), same datum | testFindOperationsProjected2ProjectedSameDatum | {
"repo_name": "geotools/geotools",
"path": "modules/plugin/epsg-hsql/src/test/java/org/geotools/referencing/factory/epsg/hsql/OperationFactoryTest.java",
"license": "lgpl-2.1",
"size": 25650
} | [
"java.util.Set",
"org.junit.Assert",
"org.opengis.referencing.operation.CoordinateOperation"
] | import java.util.Set; import org.junit.Assert; import org.opengis.referencing.operation.CoordinateOperation; | import java.util.*; import org.junit.*; import org.opengis.referencing.operation.*; | [
"java.util",
"org.junit",
"org.opengis.referencing"
] | java.util; org.junit; org.opengis.referencing; | 26,076 |
public static NlsString concat(List<NlsString> args) {
if (args.size() < 2) {
return args.get(0);
}
String charSetName = args.get(0).charsetName;
SqlCollation collation = args.get(0).collation;
int length = args.get(0).value.length();
// sum string lengths and validate
for (int i = ... | static NlsString function(List<NlsString> args) { if (args.size() < 2) { return args.get(0); } String charSetName = args.get(0).charsetName; SqlCollation collation = args.get(0).collation; int length = args.get(0).value.length(); for (int i = 1; i < args.size(); i++) { final NlsString arg = args.get(i); length += arg.v... | /**
* Concatenates some {@link NlsString} objects. The result has the charset
* and collation of the first element. The other elements must have matching
* (or null) charset and collation. Concatenates all at once, not pairwise,
* to avoid string copies.
*
* @param args array of {@link NlsString} to b... | Concatenates some <code>NlsString</code> objects. The result has the charset and collation of the first element. The other elements must have matching (or null) charset and collation. Concatenates all at once, not pairwise, to avoid string copies | concat | {
"repo_name": "arina-ielchiieva/calcite",
"path": "core/src/main/java/org/apache/calcite/util/NlsString.java",
"license": "apache-2.0",
"size": 7271
} | [
"java.util.List",
"org.apache.calcite.sql.SqlCollation"
] | import java.util.List; import org.apache.calcite.sql.SqlCollation; | import java.util.*; import org.apache.calcite.sql.*; | [
"java.util",
"org.apache.calcite"
] | java.util; org.apache.calcite; | 2,471,814 |
public JSONObject put(String key, Map value) throws JSONException {
this.put(key, new JSONObject(value));
return this;
} | JSONObject function(String key, Map value) throws JSONException { this.put(key, new JSONObject(value)); return this; } | /**
* Put a key/value pair in the JSONObject, where the value will be a
* JSONObject which is produced from a Map.
*
* @param key
* A key string.
* @param value
* A Map value.
* @return this.
* @throws org.json.JSONException
*/ | Put a key/value pair in the JSONObject, where the value will be a JSONObject which is produced from a Map | put | {
"repo_name": "kasoki/jfeedly",
"path": "src/org/json/JSONObject.java",
"license": "apache-2.0",
"size": 56173
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,950,047 |
if (e == null) {
return STRINGIFIED_NULL_EXCEPTION;
}
try {
StringWriter stm = new StringWriter();
PrintWriter wrt = new PrintWriter(stm);
e.printStackTrace(wrt);
wrt.close();
return stm.toString();
} catch (Throwable t) {
... | if (e == null) { return STRINGIFIED_NULL_EXCEPTION; } try { StringWriter stm = new StringWriter(); PrintWriter wrt = new PrintWriter(stm); e.printStackTrace(wrt); wrt.close(); return stm.toString(); } catch (Throwable t) { return e.getClass().getName() + STR; } } | /**
* Makes a string representation of the exception's stack trace, or "(null)", if the exception
* is null.
*
* <p>This method makes a best effort and never fails.
*
* @param e The exception to stringify.
* @return A string with exception name and call stack.
*/ | Makes a string representation of the exception's stack trace, or "(null)", if the exception is null. This method makes a best effort and never fails | stringifyException | {
"repo_name": "kl0u/flink",
"path": "flink-core/src/main/java/org/apache/flink/util/ExceptionUtils.java",
"license": "apache-2.0",
"size": 26235
} | [
"java.io.PrintWriter",
"java.io.StringWriter"
] | import java.io.PrintWriter; import java.io.StringWriter; | import java.io.*; | [
"java.io"
] | java.io; | 1,961,590 |
@ServiceMethod(returns = ReturnType.SINGLE)
void updateDirectoryRole(String directoryRoleId, MicrosoftGraphDirectoryRoleInner body); | @ServiceMethod(returns = ReturnType.SINGLE) void updateDirectoryRole(String directoryRoleId, MicrosoftGraphDirectoryRoleInner body); | /**
* Update entity in directoryRoles.
*
* @param directoryRoleId key: id of directoryRole.
* @param body New property values.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.resourcemanager.authorization.fluent.models.OdataErrorMainExceptio... | Update entity in directoryRoles | updateDirectoryRole | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/DirectoryRolesDirectoryRolesClient.java",
"license": "mit",
"size": 17367
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.resourcemanager.authorization.fluent.models.MicrosoftGraphDirectoryRoleInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.authorization.fluent.models.MicrosoftGraphDirectoryRoleInner; | import com.azure.core.annotation.*; import com.azure.resourcemanager.authorization.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,844,547 |
public Node getConfigurationOption (String optionName) {
NodeList children = configuration.getChildNodes ();
Node configurationOption = null;
for (int childIndex = 0; childIndex < children.getLength (); childIndex++) {
if (children.item (childIndex).getNodeName ().equals (optionName)) {
configurationOpt... | Node function (String optionName) { NodeList children = configuration.getChildNodes (); Node configurationOption = null; for (int childIndex = 0; childIndex < children.getLength (); childIndex++) { if (children.item (childIndex).getNodeName ().equals (optionName)) { configurationOption = children.item (childIndex); bre... | /**
* Get a configuration option of this configurator.
* @param optionName
* @return The configuration option node. <code>null</code> if it does not exist
*/ | Get a configuration option of this configurator | getConfigurationOption | {
"repo_name": "dmerkushov/log-helper",
"path": "src/main/java/ru/dmerkushov/loghelper/configure/loggerwrapper/LoggerWrapperConfigurator.java",
"license": "apache-2.0",
"size": 5336
} | [
"org.w3c.dom.Node",
"org.w3c.dom.NodeList"
] | import org.w3c.dom.Node; import org.w3c.dom.NodeList; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 919,887 |
private static int readWordFromBuffer(ByteBuffer buffer, int wordSize, int index) {
int wordIndex = index * wordSize;
return wordSize == SHORT_NUM_BYTES ? buffer.getShort(wordIndex) : buffer.getInt(wordIndex);
} | static int function(ByteBuffer buffer, int wordSize, int index) { int wordIndex = index * wordSize; return wordSize == SHORT_NUM_BYTES ? buffer.getShort(wordIndex) : buffer.getInt(wordIndex); } | /**
* Reads the {@code value} at the specified {@code index} from the provided byte {@code buffer}.
* Note that only integer and short sizes are supported.
*
* @param buffer the byte buffer from which the value is read
* @param wordSize the number of bytes used to store the value
* @param index the... | Reads the value at the specified index from the provided byte buffer. Note that only integer and short sizes are supported | readWordFromBuffer | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "external/libphonenumber/java/src/com/android/i18n/phonenumbers/geocoding/FlyweightMapStorage.java",
"license": "gpl-2.0",
"size": 10429
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 2,370,018 |
public void putVoid(A key) {
if (map.containsKey(key))
return;
map.put(key, new LinkedHashSet<B>());
} | void function(A key) { if (map.containsKey(key)) return; map.put(key, new LinkedHashSet<B>()); } | /**
* Put a key that maps to nothing. (Only if it is not already in the map)
*
* Afterwards containsKey(key) will return true and get(key) will return
* an empty Set instead of null.
*/ | Put a key that maps to nothing. (Only if it is not already in the map) Afterwards containsKey(key) will return true and get(key) will return an empty Set instead of null | putVoid | {
"repo_name": "CURocketry/Ground_Station_GUI",
"path": "src/org/openstreetmap/josm/tools/MultiMap.java",
"license": "gpl-3.0",
"size": 4077
} | [
"java.util.LinkedHashSet"
] | import java.util.LinkedHashSet; | import java.util.*; | [
"java.util"
] | java.util; | 2,063,356 |
public static com.iucn.whp.dbservice.model.key_conservation_issues findByassessment_version_id_Last(
long assessment_version_id,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.iucn.whp.dbservice.NoSuchkey_conservation_issuesException,
com.liferay.portal.kernel.exception.Syste... | static com.iucn.whp.dbservice.model.key_conservation_issues function( long assessment_version_id, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.iucn.whp.dbservice.NoSuchkey_conservation_issuesException, com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findB... | /**
* Returns the last key_conservation_issues in the ordered set where assessment_version_id = ?.
*
* @param assessment_version_id the assessment_version_id
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the last matching key_conservation_issues
* @thro... | Returns the last key_conservation_issues in the ordered set where assessment_version_id = ? | findByassessment_version_id_Last | {
"repo_name": "iucn-whp/world-heritage-outlook",
"path": "portlets/iucn-dbservice-portlet/docroot/WEB-INF/service/com/iucn/whp/dbservice/service/persistence/key_conservation_issuesUtil.java",
"license": "gpl-2.0",
"size": 20686
} | [
"com.liferay.portal.kernel.exception.SystemException",
"com.liferay.portal.kernel.util.OrderByComparator"
] | import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.util.OrderByComparator; | import com.liferay.portal.kernel.exception.*; import com.liferay.portal.kernel.util.*; | [
"com.liferay.portal"
] | com.liferay.portal; | 425,915 |
public void initialize() {
if (isSVG12AccessKey) {
NodeEventTarget eventTarget =
(NodeEventTarget) owner.getRootEventTarget();
eventTarget.addEventListenerNS
(XMLConstants.XML_EVENTS_NAMESPACE_URI, "keydown",
this, false, null);
... | void function() { if (isSVG12AccessKey) { NodeEventTarget eventTarget = (NodeEventTarget) owner.getRootEventTarget(); eventTarget.addEventListenerNS (XMLConstants.XML_EVENTS_NAMESPACE_URI, STR, this, false, null); } else { EventTarget eventTarget = owner.getRootEventTarget(); eventTarget.addEventListener(STR, this, fal... | /**
* Initializes this timing specifier by adding the initial instance time
* to the owner's instance time list or setting up any event listeners.
*/ | Initializes this timing specifier by adding the initial instance time to the owner's instance time list or setting up any event listeners | initialize | {
"repo_name": "apache/batik",
"path": "batik-anim/src/main/java/org/apache/batik/anim/timing/AccesskeyTimingSpecifier.java",
"license": "apache-2.0",
"size": 4985
} | [
"org.apache.batik.constants.XMLConstants",
"org.apache.batik.dom.events.NodeEventTarget",
"org.w3c.dom.events.EventTarget"
] | import org.apache.batik.constants.XMLConstants; import org.apache.batik.dom.events.NodeEventTarget; import org.w3c.dom.events.EventTarget; | import org.apache.batik.constants.*; import org.apache.batik.dom.events.*; import org.w3c.dom.events.*; | [
"org.apache.batik",
"org.w3c.dom"
] | org.apache.batik; org.w3c.dom; | 1,415,652 |
private NestedSet<Artifact> buildFilesToRun(
NestedSet<Artifact> runfilesMiddlemen, NestedSet<Artifact> filesToBuild) {
filesToRunBuilder.addTransitive(filesToBuild);
filesToRunBuilder.addTransitive(runfilesMiddlemen);
return filesToRunBuilder.build();
} | NestedSet<Artifact> function( NestedSet<Artifact> runfilesMiddlemen, NestedSet<Artifact> filesToBuild) { filesToRunBuilder.addTransitive(filesToBuild); filesToRunBuilder.addTransitive(runfilesMiddlemen); return filesToRunBuilder.build(); } | /**
* Compute the artifacts to put into the {@link FilesToRunProvider} for this target. These are the
* filesToBuild, any artifacts added by the rule with {@link #addFilesToRun}, and the runfiles'
* middlemen if they exists.
*/ | Compute the artifacts to put into the <code>FilesToRunProvider</code> for this target. These are the filesToBuild, any artifacts added by the rule with <code>#addFilesToRun</code>, and the runfiles' middlemen if they exists | buildFilesToRun | {
"repo_name": "ButterflyNetwork/bazel",
"path": "src/main/java/com/google/devtools/build/lib/analysis/RuleConfiguredTargetBuilder.java",
"license": "apache-2.0",
"size": 17677
} | [
"com.google.devtools.build.lib.actions.Artifact",
"com.google.devtools.build.lib.collect.nestedset.NestedSet"
] | import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.collect.nestedset.NestedSet; | import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.collect.nestedset.*; | [
"com.google.devtools"
] | com.google.devtools; | 874,862 |
public void finish(boolean delayed) {
mIsStarted = false;
if (delayed) {
updateVisibleProgress();
RecordHistogram.recordCount1000Histogram(PROGRESS_BAR_UPDATE_COUNT_HISTOGRAM,
getProgressUpdateCount());
RecordHistogram.recordCount100Histogram(... | void function(boolean delayed) { mIsStarted = false; if (delayed) { updateVisibleProgress(); RecordHistogram.recordCount1000Histogram(PROGRESS_BAR_UPDATE_COUNT_HISTOGRAM, getProgressUpdateCount()); RecordHistogram.recordCount100Histogram( PROGRESS_BAR_BREAK_POINT_UPDATE_COUNT_HISTOGRAM, mTargetProgressUpdateCount); } e... | /**
* Start hiding progress bar animation.
* @param delayed Whether a delayed fading out animation should be posted.
*/ | Start hiding progress bar animation | finish | {
"repo_name": "axinging/chromium-crosswalk",
"path": "chrome/android/java/src/org/chromium/chrome/browser/widget/ToolbarProgressBar.java",
"license": "bsd-3-clause",
"size": 14986
} | [
"org.chromium.base.metrics.RecordHistogram"
] | import org.chromium.base.metrics.RecordHistogram; | import org.chromium.base.metrics.*; | [
"org.chromium.base"
] | org.chromium.base; | 642,160 |
public void handleFocusEvent(FocusEvent ev)
{
processFocusEvent(ev);
} | void function(FocusEvent ev) { processFocusEvent(ev); } | /**
* Handles focus events by forwarding it to <code>processFocusEvent()</code>.
*
* @param ev the Focus event
*/ | Handles focus events by forwarding it to <code>processFocusEvent()</code> | handleFocusEvent | {
"repo_name": "SanDisk-Open-Source/SSD_Dashboard",
"path": "uefi/gcc/gcc-4.6.3/libjava/classpath/gnu/java/awt/peer/swing/SwingListPeer.java",
"license": "gpl-2.0",
"size": 8820
} | [
"java.awt.event.FocusEvent"
] | import java.awt.event.FocusEvent; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 156,667 |
public ConfigType getConfig() {
return config;
} | ConfigType function() { return config; } | /**
* Gets a Config instance corresponding to the input from config.xml.
*
* @return a Config instance corresponding to the input from config.xml
*/ | Gets a Config instance corresponding to the input from config.xml | getConfig | {
"repo_name": "DSRCorporation/imf-conversion",
"path": "imf-conversion-core/src/main/java/com/netflix/imfutility/config/ConfigXmlProvider.java",
"license": "gpl-3.0",
"size": 3054
} | [
"com.netflix.imfutility.generated.config.ConfigType"
] | import com.netflix.imfutility.generated.config.ConfigType; | import com.netflix.imfutility.generated.config.*; | [
"com.netflix.imfutility"
] | com.netflix.imfutility; | 1,738,645 |
public List<String> getHttpsTransports() {
List<String> httpsTransports = new ArrayList<>();
for (Iterator iter = axisConfig.getTransportsIn().keySet().iterator(); iter.hasNext(); ) {
String transport = (String) iter.next();
if (transport.toLowerCase().indexOf(SecurityConsta... | List<String> function() { List<String> httpsTransports = new ArrayList<>(); for (Iterator iter = axisConfig.getTransportsIn().keySet().iterator(); iter.hasNext(); ) { String transport = (String) iter.next(); if (transport.toLowerCase().indexOf(SecurityConstants.HTTPS_TRANSPORT) != -1) { httpsTransports.add(transport); ... | /**
* Get "https" transports in the AxisConfig
*
* @return list
*/ | Get "https" transports in the AxisConfig | getHttpsTransports | {
"repo_name": "kasungayan/carbon-identity",
"path": "components/security-mgt/org.wso2.carbon.security.mgt/src/main/java/org/wso2/carbon/security/config/SecurityConfigAdmin.java",
"license": "apache-2.0",
"size": 64371
} | [
"java.util.ArrayList",
"java.util.Iterator",
"java.util.List",
"org.wso2.carbon.security.SecurityConstants"
] | import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.wso2.carbon.security.SecurityConstants; | import java.util.*; import org.wso2.carbon.security.*; | [
"java.util",
"org.wso2.carbon"
] | java.util; org.wso2.carbon; | 2,232,548 |
public Iterator<QueryKeyResult> queryKeys(int nodeId,
String storeName,
final Iterator<ByteArray> keys) {
final Store<ByteArray, byte[], byte[]> store;
try {
store = admi... | Iterator<QueryKeyResult> function(int nodeId, String storeName, final Iterator<ByteArray> keys) { final Store<ByteArray, byte[], byte[]> store; try { store = adminStoreClient.getSocketStore(nodeId, storeName); } catch(Exception e) { throw new VoldemortException(e); } return new AbstractIterator<QueryKeyResult>() { | /**
* Fetch key/value tuples from a given server, directly from storage
* engine
*
* <p>
* Entries are being queried synchronously
* <em>as the iteration happens</em> i.e. the whole result set is
* <b>not</b> buffered in memory.
*
* @par... | Fetch key/value tuples from a given server, directly from storage engine Entries are being queried synchronously as the iteration happens i.e. the whole result set is not buffered in memory | queryKeys | {
"repo_name": "birendraa/voldemort",
"path": "src/java/voldemort/client/protocol/admin/AdminClient.java",
"license": "apache-2.0",
"size": 239787
} | [
"com.google.common.collect.AbstractIterator",
"java.util.Iterator"
] | import com.google.common.collect.AbstractIterator; import java.util.Iterator; | import com.google.common.collect.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 1,837,483 |
@Override
public String toString() {
StringBuilder buf = new StringBuilder()
.append(StringUtil.simpleClassName(this))
.append('{');
AbstractChannelHandlerContext ctx = head.next;
for (;;) {
if (ctx == tail) {
break;
}
buf.append('(')
.append(ctx.name())
.append(" = ")
.append(... | String function() { StringBuilder buf = new StringBuilder() .append(StringUtil.simpleClassName(this)) .append('{'); AbstractChannelHandlerContext ctx = head.next; for (;;) { if (ctx == tail) { break; } buf.append('(') .append(ctx.name()) .append(STR) .append(ctx.handler().getClass().getName()) .append(')'); ctx = ctx.n... | /**
* Returns the {@link String} representation of this pipeline.
*/ | Returns the <code>String</code> representation of this pipeline | toString | {
"repo_name": "kvr000/zbynek-java-exp",
"path": "netty-exp/netty5-exp/netty5-datagram-listener-exp/src/main/java/io/netty/channel/AbstractChannelPipeline.java",
"license": "apache-2.0",
"size": 35876
} | [
"io.netty.util.internal.StringUtil"
] | import io.netty.util.internal.StringUtil; | import io.netty.util.internal.*; | [
"io.netty.util"
] | io.netty.util; | 789,720 |
public Object parse(File file, String charset) {
return parseFile(file, charset);
} | Object function(File file, String charset) { return parseFile(file, charset); } | /**
* Parse a JSON data structure from content within a given File.
*
* @param file File containing JSON content
* @param charset the charset for this File
* @return a data structure of lists and maps
* @since 2.2.0
*/ | Parse a JSON data structure from content within a given File | parse | {
"repo_name": "russel/incubator-groovy",
"path": "subprojects/groovy-json/src/main/java/groovy/json/JsonSlurperClassic.java",
"license": "apache-2.0",
"size": 16439
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,171,013 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<Void>> rebootWithResponseAsync(String resourceGroupName, String name, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Void>> function(String resourceGroupName, String name, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException(STR)); ... | /**
* Reboot all machines in an App Service Environment.
*
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param name Name of the App Service Environment.
* @param context The context to associate with this operation.
* @throws IllegalArgumentExcepti... | Reboot all machines in an App Service Environment | rebootWithResponseAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanagerhybrid/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/AppServiceEnvironmentsClientImpl.java",
"license": "mit",
"size": 563770
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context"
] | 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.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 2,642,974 |
public List<LocalTime> bottom(int n) {
List<LocalTime> bottom = new ArrayList<>();
int[] values = data.toIntArray();
IntArrays.parallelQuickSort(values);
int rowCount = 0;
int validCount = 0;
while (validCount < n && rowCount < size()) {
int value = values[rowCount];
if (value != T... | List<LocalTime> function(int n) { List<LocalTime> bottom = new ArrayList<>(); int[] values = data.toIntArray(); IntArrays.parallelQuickSort(values); int rowCount = 0; int validCount = 0; while (validCount < n && rowCount < size()) { int value = values[rowCount]; if (value != TimeColumnType.missingValueIndicator()) { bo... | /**
* Returns the smallest ("bottom") n values in the column, Does not change the order in this
* column
*
* @param n The maximum number of records to return. The actual number will be smaller if n is
* greater than the number of observations in the column
* @return A list, possibly empty, of the ... | Returns the smallest ("bottom") n values in the column, Does not change the order in this column | bottom | {
"repo_name": "axkr/symja_android_library",
"path": "symja_android_library/matheclipse-io/src/main/java/tech/tablesaw/api/TimeColumn.java",
"license": "gpl-3.0",
"size": 17352
} | [
"it.unimi.dsi.fastutil.ints.IntArrays",
"java.time.LocalTime",
"java.util.ArrayList",
"java.util.List",
"tech.tablesaw.columns.times.PackedLocalTime",
"tech.tablesaw.columns.times.TimeColumnType"
] | import it.unimi.dsi.fastutil.ints.IntArrays; import java.time.LocalTime; import java.util.ArrayList; import java.util.List; import tech.tablesaw.columns.times.PackedLocalTime; import tech.tablesaw.columns.times.TimeColumnType; | import it.unimi.dsi.fastutil.ints.*; import java.time.*; import java.util.*; import tech.tablesaw.columns.times.*; | [
"it.unimi.dsi",
"java.time",
"java.util",
"tech.tablesaw.columns"
] | it.unimi.dsi; java.time; java.util; tech.tablesaw.columns; | 2,550,375 |
private static void addHeading2(final LayoutEngine layoutEngine, final String text) {
final Heading h = new Heading(text);
h.getStyle().setFontFamilies(Arrays.asList("Times New Roman", "Times"));
layoutEngine.add(h);
} | static void function(final LayoutEngine layoutEngine, final String text) { final Heading h = new Heading(text); h.getStyle().setFontFamilies(Arrays.asList(STR, "Times")); layoutEngine.add(h); } | /**
* Add a level-2 heading to the layout.
*
* @param layoutEngine the layout engine
* @param text the text to lay out
*/ | Add a level-2 heading to the layout | addHeading2 | {
"repo_name": "datalogics-coreyy/pdf-java-toolkit-samples",
"path": "src/main/java/com/datalogics/pdf/samples/creation/MakeWhiteFangBook.java",
"license": "mit",
"size": 8529
} | [
"com.datalogics.pdf.layout.LayoutEngine",
"com.datalogics.pdf.text.Heading",
"java.util.Arrays"
] | import com.datalogics.pdf.layout.LayoutEngine; import com.datalogics.pdf.text.Heading; import java.util.Arrays; | import com.datalogics.pdf.layout.*; import com.datalogics.pdf.text.*; import java.util.*; | [
"com.datalogics.pdf",
"java.util"
] | com.datalogics.pdf; java.util; | 777,182 |
protected boolean isCxxTestEnabled( String stepName, boolean quiet ) throws MojoExecutionException
{
if ( ! MSBuildPackaging.isSolution( mavenProject.getPackaging() )
&& ( cxxTest.getTestTargets() != null ) )
{
String msg = "CxxTest is only supported for solution (.sln) f... | boolean function( String stepName, boolean quiet ) throws MojoExecutionException { if ( ! MSBuildPackaging.isSolution( mavenProject.getPackaging() ) && ( cxxTest.getTestTargets() != null ) ) { String msg = STR; getLog().error( msg ); throw new MojoExecutionException( msg ); } if ( cxxTest.getSkip() ) { if ( ! quiet ) {... | /**
* Determine whether CxxTest is enabled by the configuration
* @param stepName the string to use in log messages to describe the process being attempted
* @param quiet does not output any log messages ({@code stepName} may be {@code null} in this case)
* @return true if CxxTest is configured, fal... | Determine whether CxxTest is enabled by the configuration | isCxxTestEnabled | {
"repo_name": "andi12/msbuild-maven-plugin",
"path": "msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/AbstractMSBuildPluginMojo.java",
"license": "apache-2.0",
"size": 28963
} | [
"org.apache.maven.plugin.MojoExecutionException",
"uk.org.raje.maven.plugin.msbuild.configuration.CxxTestConfiguration"
] | import org.apache.maven.plugin.MojoExecutionException; import uk.org.raje.maven.plugin.msbuild.configuration.CxxTestConfiguration; | import org.apache.maven.plugin.*; import uk.org.raje.maven.plugin.msbuild.configuration.*; | [
"org.apache.maven",
"uk.org.raje"
] | org.apache.maven; uk.org.raje; | 72,785 |
@Override
public String getJMSCorrelationID() throws JMSException {
if (ActiveMQRAMessage.trace) {
ActiveMQRALogger.LOGGER.trace("getJMSCorrelationID()");
}
return message.getJMSCorrelationID();
} | String function() throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace(STR); } return message.getJMSCorrelationID(); } | /**
* Get correlation id
*
* @return The value
* @throws JMSException Thrown if an error occurs
*/ | Get correlation id | getJMSCorrelationID | {
"repo_name": "l-dobrev/activemq-artemis",
"path": "artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMessage.java",
"license": "apache-2.0",
"size": 21214
} | [
"javax.jms.JMSException"
] | import javax.jms.JMSException; | import javax.jms.*; | [
"javax.jms"
] | javax.jms; | 2,066,779 |
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
map.onCreate(savedInstanceState);
} | void function(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); map.onCreate(savedInstanceState); } | /**
* Called when the fragment view hierarchy is created.
*
* @param view The content view of the fragment
* @param savedInstanceState THe saved instance state of the framgnt
*/ | Called when the fragment view hierarchy is created | onViewCreated | {
"repo_name": "geminy/aidear",
"path": "oss/qt/qt-everywhere-opensource-src-5.9.0/qtlocation/src/3rdparty/mapbox-gl-native/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapFragment.java",
"license": "gpl-3.0",
"size": 4201
} | [
"android.os.Bundle",
"android.view.View"
] | import android.os.Bundle; import android.view.View; | import android.os.*; import android.view.*; | [
"android.os",
"android.view"
] | android.os; android.view; | 2,504,132 |
public boolean processMultipleReply(MessageEnvelope envelope) {
if (this.event == null) {
return false;
}
boolean triggered = this.event.verifyEventCondition(envelope);
if (triggered) {
beforeReply(envelope);
if (this.replies != null) {
synchronized (replies) {
for (AutoReply reply : replie... | boolean function(MessageEnvelope envelope) { if (this.event == null) { return false; } boolean triggered = this.event.verifyEventCondition(envelope); if (triggered) { beforeReply(envelope); if (this.replies != null) { synchronized (replies) { for (AutoReply reply : replies) { reply.reply(envelope); } } } afterReply(env... | /**
* Executes multiple replies when multiple autoreply is set.
*
* @param envelope
* the incoming message.
* @return true, if the event has been triggered.
*/ | Executes multiple replies when multiple autoreply is set | processMultipleReply | {
"repo_name": "Aurasphere/facebot",
"path": "src/main/java/co/aurasphere/botmill/fb/actionframe/ActionFrame.java",
"license": "mit",
"size": 6011
} | [
"co.aurasphere.botmill.fb.autoreply.AutoReply",
"co.aurasphere.botmill.fb.model.incoming.MessageEnvelope"
] | import co.aurasphere.botmill.fb.autoreply.AutoReply; import co.aurasphere.botmill.fb.model.incoming.MessageEnvelope; | import co.aurasphere.botmill.fb.autoreply.*; import co.aurasphere.botmill.fb.model.incoming.*; | [
"co.aurasphere.botmill"
] | co.aurasphere.botmill; | 1,961,477 |
default void preSetNamespaceQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,
final String namespace, final GlobalQuotaSettings quotas) throws IOException {} | default void preSetNamespaceQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx, final String namespace, final GlobalQuotaSettings quotas) throws IOException {} | /**
* Called before the quota for the namespace is stored.
* @param ctx the environment to interact with the framework and master
* @param namespace the name of the namespace
* @param quotas the current quota for the namespace
*/ | Called before the quota for the namespace is stored | preSetNamespaceQuota | {
"repo_name": "apurtell/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/MasterObserver.java",
"license": "apache-2.0",
"size": 74501
} | [
"java.io.IOException",
"org.apache.hadoop.hbase.quotas.GlobalQuotaSettings"
] | import java.io.IOException; import org.apache.hadoop.hbase.quotas.GlobalQuotaSettings; | import java.io.*; import org.apache.hadoop.hbase.quotas.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 923,112 |
public void getChildren(X3DNode[] val) {
if ( children == null ) {
children = (MFNode)getField( "children" );
}
children.getValue( val );
} | void function(X3DNode[] val) { if ( children == null ) { children = (MFNode)getField( STR ); } children.getValue( val ); } | /** Return the children value in the argument X3DNode[]
* @param val The X3DNode[] to initialize. */ | Return the children value in the argument X3DNode[] | getChildren | {
"repo_name": "Norkart/NK-VirtualGlobe",
"path": "Xj3D/src/java/org/xj3d/sai/internal/node/hanim/SAIHAnimJoint.java",
"license": "gpl-2.0",
"size": 12447
} | [
"org.web3d.x3d.sai.MFNode",
"org.web3d.x3d.sai.X3DNode"
] | import org.web3d.x3d.sai.MFNode; import org.web3d.x3d.sai.X3DNode; | import org.web3d.x3d.sai.*; | [
"org.web3d.x3d"
] | org.web3d.x3d; | 2,122,224 |
public Builder peer(InetPeerAddress peerAddress) {
Objects.requireNonNull(peerAddress);
if (peerAddresses == null) {
peerAddresses = new HashSet<>();
}
peerAddresses.add(peerAddress);
return this;
} | Builder function(InetPeerAddress peerAddress) { Objects.requireNonNull(peerAddress); if (peerAddresses == null) { peerAddresses = new HashSet<>(); } peerAddresses.add(peerAddress); return this; } | /**
* Add "x.pe" parameter.
*
* @param peerAddress Well-known peer address
* @since 1.3
*/ | Add "x.pe" parameter | peer | {
"repo_name": "atomashpolskiy/bt",
"path": "bt-core/src/main/java/bt/magnet/MagnetUri.java",
"license": "apache-2.0",
"size": 5145
} | [
"java.util.HashSet",
"java.util.Objects"
] | import java.util.HashSet; import java.util.Objects; | import java.util.*; | [
"java.util"
] | java.util; | 1,871,811 |
// Don't bother to uses the request contextual cache for this.
public Long getJvmMemGCCount() throws SnmpStatusException {
return new Long(gcm.getCollectionCount());
} | Long function() throws SnmpStatusException { return new Long(gcm.getCollectionCount()); } | /**
* Getter for the "JvmMemGCCount" variable.
*/ | Getter for the "JvmMemGCCount" variable | getJvmMemGCCount | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/openjdk2/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmMemGCEntryImpl.java",
"license": "mit",
"size": 2914
} | [
"com.sun.jmx.snmp.SnmpStatusException"
] | import com.sun.jmx.snmp.SnmpStatusException; | import com.sun.jmx.snmp.*; | [
"com.sun.jmx"
] | com.sun.jmx; | 2,561,153 |
throw new SonarException(message);
} | throw new SonarException(message); } | /**
* Execute this method to fail the build.
*/ | Execute this method to fail the build | fail | {
"repo_name": "Builders-SonarSource/sonarqube-bis",
"path": "sonar-plugin-api/src/main/java/org/sonar/api/batch/BuildBreaker.java",
"license": "lgpl-3.0",
"size": 1209
} | [
"org.sonar.api.utils.SonarException"
] | import org.sonar.api.utils.SonarException; | import org.sonar.api.utils.*; | [
"org.sonar.api"
] | org.sonar.api; | 2,257,051 |
public NamingEnumeration<SearchResult> search(String arg0, Attributes arg1)
throws NamingException {
Object obj = lookup(arg0);
if (obj instanceof DNSContext) {
throw new OperationNotSupportedException();
} else if (obj instanceof DirContext) {
return ((D... | NamingEnumeration<SearchResult> function(String arg0, Attributes arg1) throws NamingException { Object obj = lookup(arg0); if (obj instanceof DNSContext) { throw new OperationNotSupportedException(); } else if (obj instanceof DirContext) { return ((DirContext) obj).search(STRjndi.4A")); } } | /**
* This method is not supported.
*
* @see DirContext#search(String,
* Attributes)
*/ | This method is not supported | search | {
"repo_name": "nextopio/nextop-client",
"path": "org.apache-jarjar/src/main/java/org/apache/harmony/jndi/provider/dns/DNSContext.java",
"license": "apache-2.0",
"size": 80073
} | [
"javax.naming.NamingEnumeration",
"javax.naming.NamingException",
"javax.naming.OperationNotSupportedException",
"javax.naming.directory.Attributes",
"javax.naming.directory.DirContext",
"javax.naming.directory.SearchResult"
] | import javax.naming.NamingEnumeration; import javax.naming.NamingException; import javax.naming.OperationNotSupportedException; import javax.naming.directory.Attributes; import javax.naming.directory.DirContext; import javax.naming.directory.SearchResult; | import javax.naming.*; import javax.naming.directory.*; | [
"javax.naming"
] | javax.naming; | 1,986,101 |
List<UUID> getNodeIds() {
List<UUID> nodes = nodeList.getNodes();
return Collections.unmodifiableList(nodes);
} | List<UUID> getNodeIds() { List<UUID> nodes = nodeList.getNodes(); return Collections.unmodifiableList(nodes); } | /**
* THIS METHOD IS USED ONLY FOR TESTING.
*
* @return Internal list of nodes.
*/ | THIS METHOD IS USED ONLY FOR TESTING | getNodeIds | {
"repo_name": "NSAmelchev/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/roundrobin/RoundRobinGlobalLoadBalancer.java",
"license": "apache-2.0",
"size": 10767
} | [
"java.util.Collections",
"java.util.List"
] | import java.util.Collections; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 233,739 |
public static List<IMendixObject> retrieveXPathQuery(IContext context, String xpathQuery, int depth) throws CoreException
{
return Core.retrieveXPathQuery(context, xpathQuery, -1, -1, new LinkedHashMap<String,String>(), depth);
}
| static List<IMendixObject> function(IContext context, String xpathQuery, int depth) throws CoreException { return Core.retrieveXPathQuery(context, xpathQuery, -1, -1, new LinkedHashMap<String,String>(), depth); } | /**
* Retrieves object list based on the given XPath query (synchronously).
* @param context the context.
* @param xpathQuery the XPath query to execute.
* @param depth indicates the level until which each reference (IMendixIdentifier) is also retrieved as an IMendixObject.
* @return the list of retrieved obj... | Retrieves object list based on the given XPath query (synchronously) | retrieveXPathQuery | {
"repo_name": "tieniber/FileDocumentLink",
"path": "test/javasource/com/mendix/core/Core.java",
"license": "apache-2.0",
"size": 77610
} | [
"com.mendix.systemwideinterfaces.core.IContext",
"com.mendix.systemwideinterfaces.core.IMendixObject",
"java.util.LinkedHashMap",
"java.util.List"
] | import com.mendix.systemwideinterfaces.core.IContext; import com.mendix.systemwideinterfaces.core.IMendixObject; import java.util.LinkedHashMap; import java.util.List; | import com.mendix.systemwideinterfaces.core.*; import java.util.*; | [
"com.mendix.systemwideinterfaces",
"java.util"
] | com.mendix.systemwideinterfaces; java.util; | 2,264,458 |
public ResourceId subnet() {
return this.subnet;
} | ResourceId function() { return this.subnet; } | /**
* Get the subnet property: The subnet resource id.
*
* @return the subnet value.
*/ | Get the subnet property: The subnet resource id | subnet | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/IpConfigurationProperties.java",
"license": "mit",
"size": 4771
} | [
"com.azure.resourcemanager.hdinsight.models.ResourceId"
] | import com.azure.resourcemanager.hdinsight.models.ResourceId; | import com.azure.resourcemanager.hdinsight.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 1,383,204 |
public boolean archive(List<Contentlet> contentlets, User user, boolean respectFrontendRoles);
public boolean unarchive(List<Contentlet> contentlets, User user, boolean respectFrontendRoles); | boolean archive(List<Contentlet> contentlets, User user, boolean respectFrontendRoles); public boolean function(List<Contentlet> contentlets, User user, boolean respectFrontendRoles); | /**
* This method unarchives the given contentlets
* @param contentlets
* @param user
* @param respectFrontendRoles
*/ | This method unarchives the given contentlets | unarchive | {
"repo_name": "jtesser/core-2.x",
"path": "src/com/dotmarketing/portlets/contentlet/business/ContentletAPIPreHook.java",
"license": "gpl-3.0",
"size": 46259
} | [
"com.dotmarketing.portlets.contentlet.model.Contentlet",
"com.liferay.portal.model.User",
"java.util.List"
] | import com.dotmarketing.portlets.contentlet.model.Contentlet; import com.liferay.portal.model.User; import java.util.List; | import com.dotmarketing.portlets.contentlet.model.*; import com.liferay.portal.model.*; import java.util.*; | [
"com.dotmarketing.portlets",
"com.liferay.portal",
"java.util"
] | com.dotmarketing.portlets; com.liferay.portal; java.util; | 2,427,038 |
public void test_001_basicGrant()
throws Exception
{
Connection dboConnection = openUserConnection( TEST_DBO );
Connection ruthConnection = openUserConnection( RUTH );
Connection aliceConnection = openUserConnection( ALICE );
//
// Create an aggregate and ... | void function() throws Exception { Connection dboConnection = openUserConnection( TEST_DBO ); Connection ruthConnection = openUserConnection( RUTH ); Connection aliceConnection = openUserConnection( ALICE ); ( ruthConnection, STR + STR ); goodStatement ( ruthConnection, STR ); goodStatement ( ruthConnection, STR ); goo... | /**
* <p>
* Test that you need USAGE privilege on an aggregate in order to invoke it.
* and in order to declare objects which mention that type.
* </p>
*/ | Test that you need USAGE privilege on an aggregate in order to invoke it. and in order to declare objects which mention that type. | test_001_basicGrant | {
"repo_name": "scnakandala/derby",
"path": "java/testing/org/apache/derbyTesting/functionTests/tests/lang/UDAPermsTest.java",
"license": "apache-2.0",
"size": 15559
} | [
"java.sql.Connection"
] | import java.sql.Connection; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,250,802 |
public Tile getTile(TileSource source, int x, int y, int z);
| Tile function(TileSource source, int x, int y, int z); | /**
* Retrieves a tile from the cache if present, otherwise <code>null</code>
* will be returned.
*
* @param source
* @param x
* tile number on the x axis of the tile to be retrieved
* @param y
* tile number on the y axis of the tile to be retrieved... | Retrieves a tile from the cache if present, otherwise <code>null</code> will be returned | getTile | {
"repo_name": "utkuozdemir/jTileDownloader",
"path": "src/org/openstreetmap/gui/jmapviewer/interfaces/TileCache.java",
"license": "gpl-3.0",
"size": 1356
} | [
"org.openstreetmap.gui.jmapviewer.Tile"
] | import org.openstreetmap.gui.jmapviewer.Tile; | import org.openstreetmap.gui.jmapviewer.*; | [
"org.openstreetmap.gui"
] | org.openstreetmap.gui; | 2,554,408 |
public static Matcher<View> withSaveMenuIdOrText() {
return withMenuIdOrText(R.id.action_save_edited_password, R.string.save);
} | static Matcher<View> function() { return withMenuIdOrText(R.id.action_save_edited_password, R.string.save); } | /**
* Looks for the save edited password icon by id or by its title.
* @return Returns either the icon button or the menu option.
*/ | Looks for the save edited password icon by id or by its title | withSaveMenuIdOrText | {
"repo_name": "endlessm/chromium-browser",
"path": "chrome/android/javatests/src/org/chromium/chrome/browser/password_manager/settings/PasswordSettingsTest.java",
"license": "bsd-3-clause",
"size": 94005
} | [
"android.view.View",
"org.hamcrest.Matcher"
] | import android.view.View; import org.hamcrest.Matcher; | import android.view.*; import org.hamcrest.*; | [
"android.view",
"org.hamcrest"
] | android.view; org.hamcrest; | 2,031,383 |
@Test
public void testScannerSeesAllRecords() throws Exception {
Connection conn = TEST_UTIL.getConnection();
try (Table table = conn.getTable(TABLENAME)) {
Scan s = new Scan();
s.addFamily(FAMILY);
s.setMaxResultSize(-1);
s.setBatch(-1);
s.setCaching(500);
Entry<Long,Lon... | void function() throws Exception { Connection conn = TEST_UTIL.getConnection(); try (Table table = conn.getTable(TABLENAME)) { Scan s = new Scan(); s.addFamily(FAMILY); s.setMaxResultSize(-1); s.setBatch(-1); s.setCaching(500); Entry<Long,Long> entry = sumTable(table.getScanner(s)); long rowsObserved = entry.getKey(); ... | /**
* Basic client side validation of HBASE-13262
*/ | Basic client side validation of HBASE-13262 | testScannerSeesAllRecords | {
"repo_name": "ChinmaySKulkarni/hbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSizeFailures.java",
"license": "apache-2.0",
"size": 6114
} | [
"java.util.Map",
"org.junit.Assert"
] | import java.util.Map; import org.junit.Assert; | import java.util.*; import org.junit.*; | [
"java.util",
"org.junit"
] | java.util; org.junit; | 1,505,987 |
protected GzipResponseWrapper newGzipResponseWrapper(HttpServletRequest request, HttpServletResponse response)
{
return new GzipResponseWrapper(request, response)
{
{
super.setMimeTypes(GzipHandler.this._mimeTypes);
super.setBufferSize(GzipHandler.this... | GzipResponseWrapper function(HttpServletRequest request, HttpServletResponse response) { return new GzipResponseWrapper(request, response) { { super.setMimeTypes(GzipHandler.this._mimeTypes); super.setBufferSize(GzipHandler.this._bufferSize); super.setMinGzipSize(GzipHandler.this._minGzipSize); } | /**
* Allows derived implementations to replace ResponseWrapper implementation.
*
* @param request the request
* @param response the response
* @return the gzip response wrapper
*/ | Allows derived implementations to replace ResponseWrapper implementation | newGzipResponseWrapper | {
"repo_name": "thomasbecker/jetty-7",
"path": "jetty-server/src/main/java/org/eclipse/jetty/server/handler/GzipHandler.java",
"license": "apache-2.0",
"size": 10404
} | [
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"org.eclipse.jetty.http.gzip.GzipResponseWrapper"
] | import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.eclipse.jetty.http.gzip.GzipResponseWrapper; | import javax.servlet.http.*; import org.eclipse.jetty.http.gzip.*; | [
"javax.servlet",
"org.eclipse.jetty"
] | javax.servlet; org.eclipse.jetty; | 337,466 |
public static String getTagValue(Iterable<Tag> tags, String k) {
Preconditions.checkNotNull(tags, "tags");
Preconditions.checkNotNull(k, "key");
if (tags instanceof TagList) {
TagList list = (TagList) tags;
int n = list.size();
for (int i = 0; i < n; ++i) {
if (k.equals(list.getK... | static String function(Iterable<Tag> tags, String k) { Preconditions.checkNotNull(tags, "tags"); Preconditions.checkNotNull(k, "key"); if (tags instanceof TagList) { TagList list = (TagList) tags; int n = list.size(); for (int i = 0; i < n; ++i) { if (k.equals(list.getKey(i))) { return list.getValue(i); } } } else { fo... | /**
* Returns the value associated with with a given key or null if no such key is present in the
* set of tags.
*
* @param tags
* Set of tags to search.
* @param k
* Key to search for.
* @return
* Value for the key or null if the key is not present.
*/ | Returns the value associated with with a given key or null if no such key is present in the set of tags | getTagValue | {
"repo_name": "Netflix/spectator",
"path": "spectator-api/src/main/java/com/netflix/spectator/api/Utils.java",
"license": "apache-2.0",
"size": 10157
} | [
"com.netflix.spectator.impl.Preconditions"
] | import com.netflix.spectator.impl.Preconditions; | import com.netflix.spectator.impl.*; | [
"com.netflix.spectator"
] | com.netflix.spectator; | 741,377 |
public DataResultViewerTable.Score getScore() {
return currentScore;
} | DataResultViewerTable.Score function() { return currentScore; } | /**
* Get the aggregate score of this ResultFile. Calculated as the highest
* score among all instances it represents.
*
* @return The score of this ResultFile.
*/ | Get the aggregate score of this ResultFile. Calculated as the highest score among all instances it represents | getScore | {
"repo_name": "eugene7646/autopsy",
"path": "Core/src/org/sleuthkit/autopsy/discovery/search/ResultFile.java",
"license": "apache-2.0",
"size": 13383
} | [
"org.sleuthkit.autopsy.corecomponents.DataResultViewerTable"
] | import org.sleuthkit.autopsy.corecomponents.DataResultViewerTable; | import org.sleuthkit.autopsy.corecomponents.*; | [
"org.sleuthkit.autopsy"
] | org.sleuthkit.autopsy; | 2,594,404 |
public static Date parseDateTime(String s)
{
return parseDateTime(s, null);
} | static Date function(String s) { return parseDateTime(s, null); } | /**
* Converts a date in the form of "yy-MM-dd HH:mm:ss" to a Date object using
* the default time zone.
*
* @param s date string in the form of "yy-MM-dd HH:mm:ss"
* @return the corresponding Java date object or <code>null</code> if it is not parsable.
*/ | the default time zone | parseDateTime | {
"repo_name": "michaelrice/asterisk-java",
"path": "src/main/java/org/asteriskjava/util/DateUtil.java",
"license": "apache-2.0",
"size": 3272
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 630,427 |
public WorkerSizeOptions workerSize() {
return this.workerSize;
} | WorkerSizeOptions function() { return this.workerSize; } | /**
* Get the workerSize value.
*
* @return the workerSize value
*/ | Get the workerSize value | workerSize | {
"repo_name": "pomortaz/azure-sdk-for-java",
"path": "azure-mgmt-appservice/src/main/java/com/microsoft/azure/management/appservice/implementation/StampCapacityInner.java",
"license": "mit",
"size": 6833
} | [
"com.microsoft.azure.management.appservice.WorkerSizeOptions"
] | import com.microsoft.azure.management.appservice.WorkerSizeOptions; | import com.microsoft.azure.management.appservice.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 916,891 |
Validate.notNull(bean, "Bean can not be null");
if (containsBean(bean)) {
throw new IllegalStateException("Circular dependency - bean already in creation: " + bean);
}
beansInCreation.add(bean);
} | Validate.notNull(bean, STR); if (containsBean(bean)) { throw new IllegalStateException(STR + bean); } beansInCreation.add(bean); } | /**
* Adds a new bean to the beans in creation list.
*
* @param bean The bean to add.
*/ | Adds a new bean to the beans in creation list | addBean | {
"repo_name": "blurpy/kouinject",
"path": "src/main/java/net/usikkert/kouinject/BeansInCreation.java",
"license": "gpl-3.0",
"size": 3349
} | [
"org.apache.commons.lang.Validate"
] | import org.apache.commons.lang.Validate; | import org.apache.commons.lang.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,542,682 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.