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
void onConfigured(AuthorizerConfigurationContext configurationContext) throws SecurityProviderCreationException;
void onConfigured(AuthorizerConfigurationContext configurationContext) throws SecurityProviderCreationException;
/** * Called to configure the Authorizer. * * @param configurationContext at the time of configuration * @throws SecurityProviderCreationException for any issues configuring the provider */
Called to configure the Authorizer
onConfigured
{ "repo_name": "MikeThomsen/nifi", "path": "nifi-registry/nifi-registry-core/nifi-registry-security-api/src/main/java/org/apache/nifi/registry/security/authorization/UserGroupProvider.java", "license": "apache-2.0", "size": 4592 }
[ "org.apache.nifi.registry.security.exception.SecurityProviderCreationException" ]
import org.apache.nifi.registry.security.exception.SecurityProviderCreationException;
import org.apache.nifi.registry.security.exception.*;
[ "org.apache.nifi" ]
org.apache.nifi;
1,603,471
public void mousePressed(MouseEvent e) { super.mousePressed(e); int selectedRow = m_tree.getRowForLocation(e.getX(), e.getY()); TreePath selectedPath = m_tree.getPathForLocation(e.getX(), e.getY()); if (selectedRow != -1) { if (e.getClickCount() == 1) { if (SwingUtilities.isRightMouseButton(e)) ...
void function(MouseEvent e) { super.mousePressed(e); int selectedRow = m_tree.getRowForLocation(e.getX(), e.getY()); TreePath selectedPath = m_tree.getPathForLocation(e.getX(), e.getY()); if (selectedRow != -1) { if (e.getClickCount() == 1) { if (SwingUtilities.isRightMouseButton(e)) showContextMenu(selectedRow, select...
/** * Invoked when the user clicked on the mouse on the taskeditor tree. * @param e the mouseevent that occured */
Invoked when the user clicked on the mouse on the taskeditor tree
mousePressed
{ "repo_name": "MartijnTheunissen/PLNR", "path": "src/psopv/taskplanner/views/TaskEditorTreeMouseListener.java", "license": "gpl-2.0", "size": 10401 }
[ "java.awt.event.MouseEvent", "javax.swing.SwingUtilities", "javax.swing.tree.TreePath" ]
import java.awt.event.MouseEvent; import javax.swing.SwingUtilities; import javax.swing.tree.TreePath;
import java.awt.event.*; import javax.swing.*; import javax.swing.tree.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
2,574,899
public void addTextViewer(SegmentViewer viewer) { if (viewer == null) { return; } this.viewer = viewer; StyledText textControl = viewer.getTextWidget(); // 移除 StyledText 默认绑定的 Delete 键。解决“按下 Delete 键后会删除两次”的 Bug。 textControl.setKeyBinding(SWT.DEL, SWT.NULL);
void function(SegmentViewer viewer) { if (viewer == null) { return; } this.viewer = viewer; StyledText textControl = viewer.getTextWidget(); textControl.setKeyBinding(SWT.DEL, SWT.NULL);
/** * Add a <code>Text</code> control to the handler so that the Cut, Copy, Paste, Delete, Undo, Redo and Select All * actions are redirected to it when active. * @param viewer * the inline <code>Text</code> control */
Add a <code>Text</code> control to the handler so that the Cut, Copy, Paste, Delete, Undo, Redo and Select All actions are redirected to it when active
addTextViewer
{ "repo_name": "heartsome/tmxeditor8", "path": "ts/net.heartsome.cat.ts.ui.xliffeditor.nattable/src/net/heartsome/cat/ts/ui/xliffeditor/nattable/editor/XLIFFEditorActionHandler.java", "license": "gpl-2.0", "size": 28590 }
[ "net.heartsome.cat.ts.ui.innertag.SegmentViewer", "org.eclipse.swt.custom.StyledText" ]
import net.heartsome.cat.ts.ui.innertag.SegmentViewer; import org.eclipse.swt.custom.StyledText;
import net.heartsome.cat.ts.ui.innertag.*; import org.eclipse.swt.custom.*;
[ "net.heartsome.cat", "org.eclipse.swt" ]
net.heartsome.cat; org.eclipse.swt;
628,575
private void initializeCMA(double[] guess) { if (lambda <= 0) { throw new NotStrictlyPositiveException(lambda); } // initialize sigma final double[][] sigmaArray = new double[guess.length][1]; for (int i = 0; i < guess.length; i++) { sigmaArray[i][0] =...
void function(double[] guess) { if (lambda <= 0) { throw new NotStrictlyPositiveException(lambda); } final double[][] sigmaArray = new double[guess.length][1]; for (int i = 0; i < guess.length; i++) { sigmaArray[i][0] = inputSigma[i]; } final RealMatrix insigma = new Array2DRowRealMatrix(sigmaArray, false); sigma = max...
/** * Initialization of the dynamic search parameters * * @param guess Initial guess for the arguments of the fitness function. */
Initialization of the dynamic search parameters
initializeCMA
{ "repo_name": "charles-cooper/idylfin", "path": "src/org/apache/commons/math3/optim/nonlinear/scalar/noderiv/CMAESOptimizer.java", "license": "apache-2.0", "size": 50913 }
[ "org.apache.commons.math3.exception.NotStrictlyPositiveException", "org.apache.commons.math3.linear.Array2DRowRealMatrix", "org.apache.commons.math3.linear.MatrixUtils", "org.apache.commons.math3.linear.RealMatrix" ]
import org.apache.commons.math3.exception.NotStrictlyPositiveException; import org.apache.commons.math3.linear.Array2DRowRealMatrix; import org.apache.commons.math3.linear.MatrixUtils; import org.apache.commons.math3.linear.RealMatrix;
import org.apache.commons.math3.exception.*; import org.apache.commons.math3.linear.*;
[ "org.apache.commons" ]
org.apache.commons;
2,704,098
public Object getFromCache(String key) { if (log.isDebugEnabled()) { String tenantDomain = CarbonContext.getThreadLocalCarbonContext().getTenantDomain(); int tenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId(); log.debug("DecisionCache is get for tenant ...
Object function(String key) { if (log.isDebugEnabled()) { String tenantDomain = CarbonContext.getThreadLocalCarbonContext().getTenantDomain(); int tenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId(); log.debug(STR + tenantDomain + STR + tenantId + " " + STR + key); } int tenantId = CarbonContext.getThr...
/** * Can get the decision for the request if it available in the cache. * * @param key * @return */
Can get the decision for the request if it available in the cache
getFromCache
{ "repo_name": "wso2/carbon-identity-framework", "path": "components/entitlement/org.wso2.carbon.identity.entitlement/src/main/java/org/wso2/carbon/identity/entitlement/cache/DecisionCache.java", "license": "apache-2.0", "size": 3267 }
[ "org.wso2.carbon.context.CarbonContext" ]
import org.wso2.carbon.context.CarbonContext;
import org.wso2.carbon.context.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
1,302,804
public void setUp(int fragmentId, DrawerLayout drawerLayout) { mFragmentContainerView = getActivity().findViewById(fragmentId); mDrawerLayout = drawerLayout; // set a custom shadow that overlays the main content when the drawer opens mDrawerLayout.setDrawerShadow(R.drawable.drawer_s...
void function(int fragmentId, DrawerLayout drawerLayout) { mFragmentContainerView = getActivity().findViewById(fragmentId); mDrawerLayout = drawerLayout; mDrawerLayout.setDrawerShadow(R.drawable.drawer_shadow, GravityCompat.START); ActionBar actionBar = getActionBar(); actionBar.setDisplayHomeAsUpEnabled(true); actionB...
/** * Users of this fragment must call this method to set up the navigation drawer interactions. * * @param fragmentId The android:id of this fragment in its activity's layout. * @param drawerLayout The DrawerLayout containing this fragment's UI. */
Users of this fragment must call this method to set up the navigation drawer interactions
setUp
{ "repo_name": "GVanderLugt/RoommateManager", "path": "app/src/main/java/edu/iupui/gdvander/roommatemanager/app/NavigationDrawerFragment.java", "license": "mit", "size": 10853 }
[ "android.app.ActionBar", "android.support.v4.view.GravityCompat", "android.support.v4.widget.DrawerLayout" ]
import android.app.ActionBar; import android.support.v4.view.GravityCompat; import android.support.v4.widget.DrawerLayout;
import android.app.*; import android.support.v4.view.*; import android.support.v4.widget.*;
[ "android.app", "android.support" ]
android.app; android.support;
1,317,609
private String getProductFromFeatures(final Vector features, final String uniqueName) { for(int i=0; i<features.size(); i++) { org.gmod.schema.sequence.Feature ppfeature = (org.gmod.schema.sequence.Feature)features.get(i); if(ppfeature.getUniqueN...
String function(final Vector features, final String uniqueName) { for(int i=0; i<features.size(); i++) { org.gmod.schema.sequence.Feature ppfeature = (org.gmod.schema.sequence.Feature)features.get(i); if(ppfeature.getUniqueName().equals(uniqueName)) { Collection fc = ppfeature.getFeatureCvTerms(); Iterator it = fc.iter...
/** * Return the product for the feature with the given uniquename * from a list of features. * @param polypeptides * @param selectedPolyPetideName * @return */
Return the product for the feature with the given uniquename from a list of features
getProductFromFeatures
{ "repo_name": "satta/Artemis", "path": "uk/ac/sanger/artemis/components/genebuilder/ortholog/MatchPanel.java", "license": "gpl-3.0", "size": 26505 }
[ "java.util.Collection", "java.util.Iterator", "java.util.Vector", "org.gmod.schema.cv.CvTerm", "org.gmod.schema.sequence.FeatureCvTerm", "uk.ac.sanger.artemis.Feature", "uk.ac.sanger.artemis.chado.ChadoTransactionManager" ]
import java.util.Collection; import java.util.Iterator; import java.util.Vector; import org.gmod.schema.cv.CvTerm; import org.gmod.schema.sequence.FeatureCvTerm; import uk.ac.sanger.artemis.Feature; import uk.ac.sanger.artemis.chado.ChadoTransactionManager;
import java.util.*; import org.gmod.schema.cv.*; import org.gmod.schema.sequence.*; import uk.ac.sanger.artemis.*; import uk.ac.sanger.artemis.chado.*;
[ "java.util", "org.gmod.schema", "uk.ac.sanger" ]
java.util; org.gmod.schema; uk.ac.sanger;
1,375,785
public EditPartViewer getViewer() { try { return super.getViewer(); } catch (Exception e) { return holdRoot.getViewer(); } }
EditPartViewer function() { try { return super.getViewer(); } catch (Exception e) { return holdRoot.getViewer(); } }
/** * Overwrite the method by Grid.Qian to get the viewer * when the editpart's parent == null */
Overwrite the method by Grid.Qian to get the viewer when the editpart's parent == null
getViewer
{ "repo_name": "chanakaudaya/developer-studio", "path": "bps/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/editparts/BPELTrayCategoryEditPart.java", "license": "apache-2.0", "size": 3250 }
[ "org.eclipse.gef.EditPartViewer" ]
import org.eclipse.gef.EditPartViewer;
import org.eclipse.gef.*;
[ "org.eclipse.gef" ]
org.eclipse.gef;
2,222,770
public Path getSelfPath(Env env) { return _program.getSourcePath(); }
Path function(Env env) { return _program.getSourcePath(); }
/** * Returns the pwd according to the source page. */
Returns the pwd according to the source page
getSelfPath
{ "repo_name": "dlitz/resin", "path": "modules/quercus/src/com/caucho/quercus/page/InterpretedPage.java", "license": "gpl-2.0", "size": 3908 }
[ "com.caucho.quercus.env.Env", "com.caucho.vfs.Path" ]
import com.caucho.quercus.env.Env; import com.caucho.vfs.Path;
import com.caucho.quercus.env.*; import com.caucho.vfs.*;
[ "com.caucho.quercus", "com.caucho.vfs" ]
com.caucho.quercus; com.caucho.vfs;
814,017
protected void cleanup( TestParameters Param, PrintWriter log) { log.println("disposing xTextDoc"); if (xTextDoc != null) { xTextDoc.dispose(); } }
void function( TestParameters Param, PrintWriter log) { log.println(STR); if (xTextDoc != null) { xTextDoc.dispose(); } }
/** * Disposes the document, if exists, created in * <code>createTestEnvironment</code> method. */
Disposes the document, if exists, created in <code>createTestEnvironment</code> method
cleanup
{ "repo_name": "qt-haiku/LibreOffice", "path": "qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxHeaderCell.java", "license": "gpl-3.0", "size": 7733 }
[ "java.io.PrintWriter" ]
import java.io.PrintWriter;
import java.io.*;
[ "java.io" ]
java.io;
1,963,176
@SuppressWarnings("unused") @Test // BEGIN SUPRESS CATCH EXCEPTION public void test_InternalStructure() throws Exception { // END SUPRESS CATCH EXCEPTION // build the view model // ...> yView // ......> yTable YView yView = factory.createView(); YTable yTable = factory.createTable(); yTable.setType(...
@SuppressWarnings(STR) void function() throws Exception { YView yView = factory.createView(); YTable yTable = factory.createTable(); yTable.setType(String.class); yView.setContent(yTable); VaadinRenderer renderer = new VaadinRenderer(); renderer.render(rootLayout, yView, null); ITableEditpart tableEditpart = Delegating...
/** * Tests the internal structure. * * @throws Exception */
Tests the internal structure
test_InternalStructure
{ "repo_name": "lunifera/lunifera-runtime-web", "path": "org.lunifera.runtime.web.ecview.presentation.vaadin.tests/src/org/lunifera/runtime/web/ecview/presentation/vaadin/tests/presentation/TablePresentationTests.java", "license": "epl-1.0", "size": 64436 }
[ "com.vaadin.ui.Component", "com.vaadin.ui.ComponentContainer", "com.vaadin.ui.CssLayout", "com.vaadin.ui.Table", "org.eclipse.emf.ecp.ecview.common.editpart.DelegatingEditPartManager", "org.eclipse.emf.ecp.ecview.common.model.core.YView", "org.eclipse.emf.ecp.ecview.common.presentation.IWidgetPresentati...
import com.vaadin.ui.Component; import com.vaadin.ui.ComponentContainer; import com.vaadin.ui.CssLayout; import com.vaadin.ui.Table; import org.eclipse.emf.ecp.ecview.common.editpart.DelegatingEditPartManager; import org.eclipse.emf.ecp.ecview.common.model.core.YView; import org.eclipse.emf.ecp.ecview.common.presentati...
import com.vaadin.ui.*; import org.eclipse.emf.ecp.ecview.common.editpart.*; import org.eclipse.emf.ecp.ecview.common.model.core.*; import org.eclipse.emf.ecp.ecview.common.presentation.*; import org.eclipse.emf.ecp.ecview.extension.model.extension.*; import org.eclipse.emf.ecp.ecview.ui.core.editparts.extension.*; imp...
[ "com.vaadin.ui", "org.eclipse.emf", "org.junit", "org.lunifera.runtime" ]
com.vaadin.ui; org.eclipse.emf; org.junit; org.lunifera.runtime;
130,705
public List<String> getHeaderValues(final String headerName) { return Collections.unmodifiableList(getHeaders().get(headerName)); }
List<String> function(final String headerName) { return Collections.unmodifiableList(getHeaders().get(headerName)); }
/** * Gets all values for the specified HTTP header or an empty List if the HTTP header is not set. * <p/> * * @param headerName a String specifying the name of the HTTP header. * @return a list of String values for the specified HTTP header. * @see org.springframework.http.HttpHeaders#get(Object) ...
Gets all values for the specified HTTP header or an empty List if the HTTP header is not set.
getHeaderValues
{ "repo_name": "prasi-in/geode", "path": "geode-core/src/main/java/org/apache/geode/management/internal/web/http/ClientHttpRequest.java", "license": "apache-2.0", "size": 19433 }
[ "java.util.Collections", "java.util.List" ]
import java.util.Collections; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,212,809
void reportServerError(ServerName server) { ServerErrors errors = errorsByServer.get(server); if (errors != null) { errors.addError(); } else { errors = errorsByServer.putIfAbsent(server, new ServerErrors()); if (errors != null){ errors.addError(); } ...
void reportServerError(ServerName server) { ServerErrors errors = errorsByServer.get(server); if (errors != null) { errors.addError(); } else { errors = errorsByServer.putIfAbsent(server, new ServerErrors()); if (errors != null){ errors.addError(); } } }
/** * Reports that there was an error on the server to do whatever bean-counting necessary. * * @param server The server in question. */
Reports that there was an error on the server to do whatever bean-counting necessary
reportServerError
{ "repo_name": "joshelser/hbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionManager.java", "license": "apache-2.0", "size": 101754 }
[ "org.apache.hadoop.hbase.ServerName" ]
import org.apache.hadoop.hbase.ServerName;
import org.apache.hadoop.hbase.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
464,140
Path absoluteTargetCssParentPath = absoluteTargetCssPath.getParent(); return absoluteTargetCssParentPath.relativize(absoluteResourcePath).toString(); }
Path absoluteTargetCssParentPath = absoluteTargetCssPath.getParent(); return absoluteTargetCssParentPath.relativize(absoluteResourcePath).toString(); }
/** * Transforming project/src/resources/static/index-dev.html<br/> * with styles in project/src/resources/static/styles/app.css (styles/app.css in index-dev.html)<br/> * that uses resource from project/src/resources/static/lib/image.png (../lib/image.png in app.css)<br/> * <br/> * to: project/...
Transforming project/src/resources/static/index-dev.html with styles in project/src/resources/static/styles/app.css (styles/app.css in index-dev.html) that uses resource from project/src/resources/static/lib/image.png (../lib/image.png in app.css) to: project/src/resources/static/index-prod.html where style bundle proc...
relativize
{ "repo_name": "kospiotr/bundler-maven-plugin", "path": "src/main/java/com/github/kospiotr/bundler/PathNormalizator.java", "license": "apache-2.0", "size": 2118 }
[ "java.nio.file.Path" ]
import java.nio.file.Path;
import java.nio.file.*;
[ "java.nio" ]
java.nio;
494,155
public void addBoth( Disease disease , Collection<Symptom> smpCollect ) { addDisease( disease ); addAllSymptoms( disease, smpCollect ); }
void function( Disease disease , Collection<Symptom> smpCollect ) { addDisease( disease ); addAllSymptoms( disease, smpCollect ); }
/** * Add both disease and collection of symptoms to the map * @param disease the disease object as key * @param smpCollect the collection of symptoms as value */
Add both disease and collection of symptoms to the map
addBoth
{ "repo_name": "anggaranothing/spselasa", "path": "SistemPakar_Anggara_Library/src/com/anggaranothing/pakar/dyslexia/model/RelationOBSOLETE.java", "license": "mit", "size": 5491 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,800,566
public List<String> getAllTeamnames() { List<String> teams = new ArrayList<String>(userService.getAllTeamNames()); return teams; }
List<String> function() { List<String> teams = new ArrayList<String>(userService.getAllTeamNames()); return teams; }
/** * Returns the list of available teams that a user or repository may be * assigned to. * * @return the list of teams */
Returns the list of available teams that a user or repository may be assigned to
getAllTeamnames
{ "repo_name": "BullShark/IRCBlit", "path": "src/main/java/com/gitblit/GitBlit.java", "license": "apache-2.0", "size": 119961 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,491,082
public Location getLeft(){ return new Location(getLocation().getRow(), getLocation().getCol() - 1); }
Location function(){ return new Location(getLocation().getRow(), getLocation().getCol() - 1); }
/** * Gets the grid location left of this critter. * @return The location one col left. */
Gets the grid location left of this critter
getLeft
{ "repo_name": "asbarber/gridworld-games", "path": "GridWorldCode/GridWorldCode/framework/game/actor/SuperCritter.java", "license": "mit", "size": 10154 }
[ "info.gridworld.grid.Location" ]
import info.gridworld.grid.Location;
import info.gridworld.grid.*;
[ "info.gridworld.grid" ]
info.gridworld.grid;
229,857
public IProviderFactory getProviderFactory( String elementName ) { return getProviderFactoryMap( ).get( elementName ); }
IProviderFactory function( String elementName ) { return getProviderFactoryMap( ).get( elementName ); }
/** * Returns the provider factory for the given element. * * @param elementName * the name of the element * @return the provider factory, or null if there's no factory defined for * the element */
Returns the provider factory for the given element
getProviderFactory
{ "repo_name": "sguan-actuate/birt", "path": "UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/extension/ExtensionPointManager.java", "license": "epl-1.0", "size": 16064 }
[ "org.eclipse.birt.report.designer.ui.extensions.IProviderFactory" ]
import org.eclipse.birt.report.designer.ui.extensions.IProviderFactory;
import org.eclipse.birt.report.designer.ui.extensions.*;
[ "org.eclipse.birt" ]
org.eclipse.birt;
2,542,064
public static BoardEntry[] retrieve(Context context) throws IOException { File boardStorage = new File(context.getFilesDir(), BOARD_FILE + ".json"); if (boardStorage.exists()) { ObjectMapper mapper = new ObjectMapper(); BoardEntry[] entries = mapper.readValue(boardStorage, BoardEntry[].class); Log.i(...
static BoardEntry[] function(Context context) throws IOException { File boardStorage = new File(context.getFilesDir(), BOARD_FILE + ".json"); if (boardStorage.exists()) { ObjectMapper mapper = new ObjectMapper(); BoardEntry[] entries = mapper.readValue(boardStorage, BoardEntry[].class); Log.i(TAG, STR); return entries;...
/** * Retrieve stored board entries from file. * @param context * @return */
Retrieve stored board entries from file
retrieve
{ "repo_name": "BullshitPingu/Guide7", "path": "java-app/app/src/main/java/de/be/thaw/storage/cache/BoardUtil.java", "license": "apache-2.0", "size": 1985 }
[ "android.content.Context", "android.util.Log", "com.fasterxml.jackson.databind.ObjectMapper", "de.be.thaw.model.noticeboard.BoardEntry", "java.io.File", "java.io.IOException" ]
import android.content.Context; import android.util.Log; import com.fasterxml.jackson.databind.ObjectMapper; import de.be.thaw.model.noticeboard.BoardEntry; import java.io.File; import java.io.IOException;
import android.content.*; import android.util.*; import com.fasterxml.jackson.databind.*; import de.be.thaw.model.noticeboard.*; import java.io.*;
[ "android.content", "android.util", "com.fasterxml.jackson", "de.be.thaw", "java.io" ]
android.content; android.util; com.fasterxml.jackson; de.be.thaw; java.io;
179,978
private static void addReturnNew( MethodSpec.Builder builder, TypeElement type, ExecutableElement instantiator, Object builderVar, ProcessingEnvironment env) { List<? extends TypeMirror> allThrown = instantiator.getThrownTypes(); if (!allThrown.isEmpty()) { builder.beginCon...
static void function( MethodSpec.Builder builder, TypeElement type, ExecutableElement instantiator, Object builderVar, ProcessingEnvironment env) { List<? extends TypeMirror> allThrown = instantiator.getThrownTypes(); if (!allThrown.isEmpty()) { builder.beginControlFlow("try"); } TypeName typeName = TypeName.get(env.ge...
/** * Invokes the instantiator and returns the value. * * <p>Used by the {@link AutoCodec.Strategy#INSTANTIATOR} strategy. */
Invokes the instantiator and returns the value. Used by the <code>AutoCodec.Strategy#INSTANTIATOR</code> strategy
addReturnNew
{ "repo_name": "bazelbuild/bazel", "path": "src/main/java/com/google/devtools/build/lib/skyframe/serialization/autocodec/AutoCodecProcessor.java", "license": "apache-2.0", "size": 30383 }
[ "com.google.devtools.build.lib.skyframe.serialization.SerializationException", "com.squareup.javapoet.MethodSpec", "com.squareup.javapoet.TypeName", "java.util.List", "java.util.stream.Collectors", "javax.annotation.processing.ProcessingEnvironment", "javax.lang.model.element.ElementKind", "javax.lang...
import com.google.devtools.build.lib.skyframe.serialization.SerializationException; import com.squareup.javapoet.MethodSpec; import com.squareup.javapoet.TypeName; import java.util.List; import java.util.stream.Collectors; import javax.annotation.processing.ProcessingEnvironment; import javax.lang.model.element.Element...
import com.google.devtools.build.lib.skyframe.serialization.*; import com.squareup.javapoet.*; import java.util.*; import java.util.stream.*; import javax.annotation.processing.*; import javax.lang.model.element.*; import javax.lang.model.type.*;
[ "com.google.devtools", "com.squareup.javapoet", "java.util", "javax.annotation", "javax.lang" ]
com.google.devtools; com.squareup.javapoet; java.util; javax.annotation; javax.lang;
760,012
public List<UserProfile> getProfiles() { return this.profiles; }
List<UserProfile> function() { return this.profiles; }
/** * Get all the profiles of the authenticated user. * * @return the list of profiles */
Get all the profiles of the authenticated user
getProfiles
{ "repo_name": "bujiio/buji-pac4j", "path": "src/main/java/io/buji/pac4j/subject/Pac4jPrincipal.java", "license": "apache-2.0", "size": 4169 }
[ "java.util.List", "org.pac4j.core.profile.UserProfile" ]
import java.util.List; import org.pac4j.core.profile.UserProfile;
import java.util.*; import org.pac4j.core.profile.*;
[ "java.util", "org.pac4j.core" ]
java.util; org.pac4j.core;
2,110,932
private static int findErrorCode(final JSONObject replyJson) throws JSONException { int code = 0; // 0 means no error. if (replyJson.has("error")) { JSONArray errorObj = replyJson.getJSONArray("error"); code = errorObj.getInt(0); } return code; }
static int function(final JSONObject replyJson) throws JSONException { int code = 0; if (replyJson.has("error")) { JSONArray errorObj = replyJson.getJSONArray("error"); code = errorObj.getInt(0); } return code; }
/** * Finds and extracts an error code from reply JSON data. * @param replyJson * @return code * @throws JSONException */
Finds and extracts an error code from reply JSON data
findErrorCode
{ "repo_name": "ssdwa/android", "path": "dConnectDevicePlugin/dConnectDeviceSonyCamera/src/com/example/sony/cameraremote/SimpleCameraEventObserver.java", "license": "mit", "size": 17927 }
[ "org.json.JSONArray", "org.json.JSONException", "org.json.JSONObject" ]
import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject;
import org.json.*;
[ "org.json" ]
org.json;
2,049,018
protected HttpClientConfigurer configureAuth(HttpClientConfigurer configurer, String authMethod, String username, String password, String domain, String host, Set<AuthMethod> authMethods) { // no auth is in use if (username == null && authMethod == n...
HttpClientConfigurer function(HttpClientConfigurer configurer, String authMethod, String username, String password, String domain, String host, Set<AuthMethod> authMethods) { if (username == null && authMethod == null) { return configurer; } if (username != null && authMethod == null) { throw new IllegalArgumentExcepti...
/** * Configures the authentication method to be used * * @return configurer to used */
Configures the authentication method to be used
configureAuth
{ "repo_name": "CandleCandle/camel", "path": "components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java", "license": "apache-2.0", "size": 17611 }
[ "java.util.Set", "org.apache.camel.util.ObjectHelper" ]
import java.util.Set; import org.apache.camel.util.ObjectHelper;
import java.util.*; import org.apache.camel.util.*;
[ "java.util", "org.apache.camel" ]
java.util; org.apache.camel;
1,925,926
public static List<NabuccoPropertyDescriptor> getPropertyDescriptorList() { return PropertyCache.getInstance().retrieve(ScriptEffect.class).getAllProperties(); }
static List<NabuccoPropertyDescriptor> function() { return PropertyCache.getInstance().retrieve(ScriptEffect.class).getAllProperties(); }
/** * Getter for the PropertyDescriptorList. * * @return the List<NabuccoPropertyDescriptor>. */
Getter for the PropertyDescriptorList
getPropertyDescriptorList
{ "repo_name": "NABUCCO/org.nabucco.framework.workflow", "path": "org.nabucco.framework.workflow.facade.datatype/src/main/gen/org/nabucco/framework/workflow/facade/datatype/definition/effect/script/ScriptEffect.java", "license": "epl-1.0", "size": 6618 }
[ "java.util.List", "org.nabucco.framework.base.facade.datatype.property.NabuccoPropertyDescriptor", "org.nabucco.framework.base.facade.datatype.property.PropertyCache" ]
import java.util.List; import org.nabucco.framework.base.facade.datatype.property.NabuccoPropertyDescriptor; import org.nabucco.framework.base.facade.datatype.property.PropertyCache;
import java.util.*; import org.nabucco.framework.base.facade.datatype.property.*;
[ "java.util", "org.nabucco.framework" ]
java.util; org.nabucco.framework;
405,104
public long createEntry(final String logbook, String title, String text, final ELogPriority priority) throws Exception { final long entry_id; // Entry ID from RDB if (title.length() >= MAX_TITLE_SIZE) { // Shorten title. // If the title and body are actually the same, that's it. // Otherwise...
long function(final String logbook, String title, String text, final ELogPriority priority) throws Exception { final long entry_id; if (title.length() >= MAX_TITLE_SIZE) { if (! title.equals(text)) text = "..." + title.substring(MAX_TITLE_SIZE-4) + "\n" + text; title = title.substring(0, MAX_TITLE_SIZE-4) + "..."; } if...
/** Create entry * @param logbook * @param title * @param text * @param filenames * @param captions * @throws Exception * @return Entry ID */
Create entry
createEntry
{ "repo_name": "ControlSystemStudio/org.csstudio.sns", "path": "plugins/org.csstudio.logbook.sns/src/org/csstudio/logbook/sns/elog/ELog.java", "license": "epl-1.0", "size": 23616 }
[ "java.io.ByteArrayInputStream", "java.io.InputStream", "java.sql.PreparedStatement", "java.util.logging.Level", "java.util.logging.Logger" ]
import java.io.ByteArrayInputStream; import java.io.InputStream; import java.sql.PreparedStatement; import java.util.logging.Level; import java.util.logging.Logger;
import java.io.*; import java.sql.*; import java.util.logging.*;
[ "java.io", "java.sql", "java.util" ]
java.io; java.sql; java.util;
2,712,499
protected DateFormat handleGetDateFormat(String pattern, String override, ULocale locale) { FormatConfiguration fmtConfig = new FormatConfiguration(); fmtConfig.pattern = pattern; fmtConfig.override = override; fmtConfig.formatData = new DateFormatSymbols(this, locale); fmtCo...
DateFormat function(String pattern, String override, ULocale locale) { FormatConfiguration fmtConfig = new FormatConfiguration(); fmtConfig.pattern = pattern; fmtConfig.override = override; fmtConfig.formatData = new DateFormatSymbols(this, locale); fmtConfig.loc = locale; fmtConfig.cal = this; return SimpleDateFormat....
/** * Creates a <code>DateFormat</code> appropriate to this calendar. * This is a framework method for subclasses to override. This method * is responsible for creating the calendar-specific DateFormat and * DateFormatSymbols objects as needed. * @param pattern the pattern, specific to the <co...
Creates a <code>DateFormat</code> appropriate to this calendar. This is a framework method for subclasses to override. This method is responsible for creating the calendar-specific DateFormat and DateFormatSymbols objects as needed
handleGetDateFormat
{ "repo_name": "abhijitvalluri/fitnotifications", "path": "icu4j/src/main/java/com/ibm/icu/util/Calendar.java", "license": "apache-2.0", "size": 256671 }
[ "com.ibm.icu.impl.ICUCache", "com.ibm.icu.impl.SimpleCache", "com.ibm.icu.text.DateFormat", "com.ibm.icu.text.DateFormatSymbols", "com.ibm.icu.text.SimpleDateFormat" ]
import com.ibm.icu.impl.ICUCache; import com.ibm.icu.impl.SimpleCache; import com.ibm.icu.text.DateFormat; import com.ibm.icu.text.DateFormatSymbols; import com.ibm.icu.text.SimpleDateFormat;
import com.ibm.icu.impl.*; import com.ibm.icu.text.*;
[ "com.ibm.icu" ]
com.ibm.icu;
1,499,092
public static String[] getPropagatedJvmArgs() { List<String> result = new ArrayList<String>(); List<String> propagating = new ArrayList<String>(); for (Map.Entry<String, String> e : PROPS_TO_PROPAGATE.entrySet()) { String propName = e.getKey(); String propValue = e.ge...
static String[] function() { List<String> result = new ArrayList<String>(); List<String> propagating = new ArrayList<String>(); for (Map.Entry<String, String> e : PROPS_TO_PROPAGATE.entrySet()) { String propName = e.getKey(); String propValue = e.getValue(); if (propValue == null) propValue = System.getProperty(propNam...
/** Returns a list of args that should be passed to any JVM that we * spawn. */
Returns a list of args that should be passed to any JVM that we spawn
getPropagatedJvmArgs
{ "repo_name": "superzadeh/processdash", "path": "src/net/sourceforge/processdash/util/RuntimeUtils.java", "license": "gpl-3.0", "size": 22969 }
[ "java.util.ArrayList", "java.util.List", "java.util.Map" ]
import java.util.ArrayList; import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,354,312
public ForgeDirection getBack() { if(direction == 0)//SOUTH PLACE { return ForgeDirection.SOUTH; } if(direction == 1)//WEST PLACE { return ForgeDirection.WEST; } if(direction == 2)//NORTH PLACE { return ForgeDirection.NORTH; } if(direction == 3)//EAST PLACE { return ForgeDirection....
ForgeDirection function() { if(direction == 0) { return ForgeDirection.SOUTH; } if(direction == 1) { return ForgeDirection.WEST; } if(direction == 2) { return ForgeDirection.NORTH; } if(direction == 3) { return ForgeDirection.EAST; } return ForgeDirection.UNKNOWN; }
/** * Gets the direction the back is facing (Same dir as placer) */
Gets the direction the back is facing (Same dir as placer)
getBack
{ "repo_name": "TheAwesomeGem/MineFantasy", "path": "src/main/java/minefantasy/block/tileentity/TileEntityFurnaceMF.java", "license": "lgpl-2.1", "size": 24779 }
[ "net.minecraftforge.common.ForgeDirection" ]
import net.minecraftforge.common.ForgeDirection;
import net.minecraftforge.common.*;
[ "net.minecraftforge.common" ]
net.minecraftforge.common;
687,396
public static List<String> tokenize(CharSequence self, Character token) { return tokenize(self, token.toString()); }
static List<String> function(CharSequence self, Character token) { return tokenize(self, token.toString()); }
/** * Tokenize a CharSequence based on the given character delimiter. * For example: * <pre class="groovyTestCase"> * char pathSep = ':' * assert "/tmp:/usr".tokenize(pathSep) == ["/tmp", "/usr"] * </pre> * * @param self a CharSequence * @param token the delimiter * @r...
Tokenize a CharSequence based on the given character delimiter. For example: char pathSep = ':' assert "/tmp:/usr".tokenize(pathSep) == ["/tmp", "/usr"] </code>
tokenize
{ "repo_name": "bsideup/incubator-groovy", "path": "src/main/org/codehaus/groovy/runtime/StringGroovyMethods.java", "license": "apache-2.0", "size": 141076 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,264,750
public Collection<Member> allMembers() { // We need to do a copy to avoid affecting the real data HashSet<Member> set = new HashSet<>(serverList.values()); set.add(self); return set; }
Collection<Member> function() { HashSet<Member> set = new HashSet<>(serverList.values()); set.add(self); return set; }
/** * return this cluster all members. * * @return {@link Collection} all member */
return this cluster all members
allMembers
{ "repo_name": "alibaba/nacos", "path": "core/src/main/java/com/alibaba/nacos/core/cluster/ServerMemberManager.java", "license": "apache-2.0", "size": 23860 }
[ "java.util.Collection", "java.util.HashSet" ]
import java.util.Collection; import java.util.HashSet;
import java.util.*;
[ "java.util" ]
java.util;
1,620,655
public Model loadModel(final FileHandle fileHandle, P parameters) { return loadModel(fileHandle, new TextureProvider.FileTextureProvider(), parameters); }
Model function(final FileHandle fileHandle, P parameters) { return loadModel(fileHandle, new TextureProvider.FileTextureProvider(), parameters); }
/** * Directly load the model on the calling thread. The model with not be managed by an {@link AssetManager}. */
Directly load the model on the calling thread. The model with not be managed by an <code>AssetManager</code>
loadModel
{ "repo_name": "MovementSpeed/nhglib", "path": "nhglib-core/src/io/github/movementspeed/nhglib/assets/loaders/NhgModelLoader.java", "license": "mit", "size": 9170 }
[ "com.badlogic.gdx.files.FileHandle", "com.badlogic.gdx.graphics.g3d.Model", "com.badlogic.gdx.graphics.g3d.utils.TextureProvider" ]
import com.badlogic.gdx.files.FileHandle; import com.badlogic.gdx.graphics.g3d.Model; import com.badlogic.gdx.graphics.g3d.utils.TextureProvider;
import com.badlogic.gdx.files.*; import com.badlogic.gdx.graphics.g3d.*; import com.badlogic.gdx.graphics.g3d.utils.*;
[ "com.badlogic.gdx" ]
com.badlogic.gdx;
2,321,362
@Nonnull public ReportRootGetOffice365ActivationsUserDetailRequest buildRequest(@Nonnull final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) { final ReportRootGetOffice365ActivationsUserDetailRequest request = new ReportRootGetOffice365ActivationsUserDetailRequest( ...
ReportRootGetOffice365ActivationsUserDetailRequest function(@Nonnull final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) { final ReportRootGetOffice365ActivationsUserDetailRequest request = new ReportRootGetOffice365ActivationsUserDetailRequest( getRequestUrl(), getClient(), requestOption...
/** * Creates the ReportRootGetOffice365ActivationsUserDetailRequest with specific requestOptions instead of the existing requestOptions * * @param requestOptions the options for the request * @return the ReportRootGetOffice365ActivationsUserDetailRequest instance */
Creates the ReportRootGetOffice365ActivationsUserDetailRequest with specific requestOptions instead of the existing requestOptions
buildRequest
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/requests/ReportRootGetOffice365ActivationsUserDetailRequestBuilder.java", "license": "mit", "size": 2828 }
[ "com.microsoft.graph.requests.ReportRootGetOffice365ActivationsUserDetailRequest", "javax.annotation.Nonnull" ]
import com.microsoft.graph.requests.ReportRootGetOffice365ActivationsUserDetailRequest; import javax.annotation.Nonnull;
import com.microsoft.graph.requests.*; import javax.annotation.*;
[ "com.microsoft.graph", "javax.annotation" ]
com.microsoft.graph; javax.annotation;
802,375
public static void endTenantFlow() { PrivilegedCarbonContext.endTenantFlow(); }
static void function() { PrivilegedCarbonContext.endTenantFlow(); }
/** * Ends the tenant flow */
Ends the tenant flow
endTenantFlow
{ "repo_name": "dharshanaw/carbon-identity-framework", "path": "components/authentication-framework/org.wso2.carbon.identity.application.authentication.framework/src/main/java/org/wso2/carbon/identity/application/authentication/framework/util/FrameworkUtils.java", "license": "apache-2.0", "size": 55252 }
[ "org.wso2.carbon.context.PrivilegedCarbonContext" ]
import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.context.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
2,545,994
@Test public void testQuoteWriter() throws IOException { StringWriter writer = new StringWriter(); renderer.quote(writer, "\\"); renderer.quote(writer, ""); renderer.quote(writer, null); assertEquals("\"\\\\\"\"\"\"\"", writer.toString()); }
void function() throws IOException { StringWriter writer = new StringWriter(); renderer.quote(writer, "\\"); renderer.quote(writer, STR\"\\\\\"\"\"\"\"", writer.toString()); }
/** * Just to make sure that quote(writer, string) which is not indirectly tested anymore still works. For other quote * tests see JSONObjectToStringTest.testQuote* */
Just to make sure that quote(writer, string) which is not indirectly tested anymore still works. For other quote tests see JSONObjectToStringTest.testQuote
testQuoteWriter
{ "repo_name": "Nimco/sling", "path": "bundles/commons/json/src/test/java/org/apache/sling/commons/json/io/JSONRendererTest.java", "license": "apache-2.0", "size": 5659 }
[ "java.io.IOException", "java.io.StringWriter" ]
import java.io.IOException; import java.io.StringWriter;
import java.io.*;
[ "java.io" ]
java.io;
1,978,012
public void removeAttribute(String name) { Object value = null; boolean found = false; // Remove the specified attribute // Check for read only attribute if (readOnlyAttributes.containsKey(name)) return; found = attributes.containsKey(name); if (...
void function(String name) { Object value = null; boolean found = false; if (readOnlyAttributes.containsKey(name)) return; found = attributes.containsKey(name); if (found) { value = attributes.get(name); attributes.remove(name); } else { return; } Object listeners[] = context.getApplicationEventListeners(); if ((listen...
/** * Remove the context attribute with the specified name, if any. * * @param name Name of the context attribute to be removed */
Remove the context attribute with the specified name, if any
removeAttribute
{ "repo_name": "plumer/codana", "path": "tomcat_files/6.0.0/ApplicationContext.java", "license": "mit", "size": 28444 }
[ "javax.servlet.ServletContextAttributeEvent", "javax.servlet.ServletContextAttributeListener" ]
import javax.servlet.ServletContextAttributeEvent; import javax.servlet.ServletContextAttributeListener;
import javax.servlet.*;
[ "javax.servlet" ]
javax.servlet;
1,464,858
public static String readToString(InputStream i) throws IOException { return readToString(i, "UTF-8"); }
static String function(InputStream i) throws IOException { return readToString(i, "UTF-8"); }
/** * Reads an input stream to a string * * @param i the input stream * @return a UTF-8 string * @throws IOException thrown by the stream */
Reads an input stream to a string
readToString
{ "repo_name": "shannah/cn1", "path": "CodenameOne/src/com/codename1/io/Util.java", "license": "gpl-2.0", "size": 39881 }
[ "java.io.IOException", "java.io.InputStream" ]
import java.io.IOException; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,555,542
@CheckResult public PlaybackParameters withSpeed(@FloatRange(from = 0, fromInclusive = false) float speed) { return new PlaybackParameters(speed, pitch); }
PlaybackParameters function(@FloatRange(from = 0, fromInclusive = false) float speed) { return new PlaybackParameters(speed, pitch); }
/** * Returns a copy with the given speed. * * @param speed The new speed. Must be greater than zero. * @return The copied playback parameters. */
Returns a copy with the given speed
withSpeed
{ "repo_name": "ened/ExoPlayer", "path": "library/common/src/main/java/com/google/android/exoplayer2/PlaybackParameters.java", "license": "apache-2.0", "size": 5034 }
[ "androidx.annotation.FloatRange" ]
import androidx.annotation.FloatRange;
import androidx.annotation.*;
[ "androidx.annotation" ]
androidx.annotation;
1,007,266
public MethodHandle getConstructMethod() { if (constructMethod == null) { try { Method method = getClass().getDeclaredMethod("construct", ExecutionContext.class, Constructor.class, Object[].class); constructMethod = lookup().unreflect(method); ...
MethodHandle function() { if (constructMethod == null) { try { Method method = getClass().getDeclaredMethod(STR, ExecutionContext.class, Constructor.class, Object[].class); constructMethod = lookup().unreflect(method); } catch (ReflectiveOperationException e) { throw new RuntimeException(e); } } return constructMethod;...
/** * Returns `(? extends BuiltinConstructor, ExecutionContext, Constructor, Object[]) {@literal ->} ScriptObject` * method-handle. * * @return the call method handle */
Returns `(? extends BuiltinConstructor, ExecutionContext, Constructor, Object[]) -> ScriptObject` method-handle
getConstructMethod
{ "repo_name": "jugglinmike/es6draft", "path": "src/main/java/com/github/anba/es6draft/runtime/types/builtins/BuiltinConstructor.java", "license": "mit", "size": 1768 }
[ "com.github.anba.es6draft.runtime.ExecutionContext", "com.github.anba.es6draft.runtime.types.Constructor", "java.lang.invoke.MethodHandle", "java.lang.reflect.Method" ]
import com.github.anba.es6draft.runtime.ExecutionContext; import com.github.anba.es6draft.runtime.types.Constructor; import java.lang.invoke.MethodHandle; import java.lang.reflect.Method;
import com.github.anba.es6draft.runtime.*; import com.github.anba.es6draft.runtime.types.*; import java.lang.invoke.*; import java.lang.reflect.*;
[ "com.github.anba", "java.lang" ]
com.github.anba; java.lang;
1,238,032
public ClusterSchema findClusterSchema( String name ) { for ( int i = 0; i < clusterSchemas.size(); i++ ) { ClusterSchema schema = clusterSchemas.get( i ); if ( schema.getName().equalsIgnoreCase( name ) ) { return schema; } } return null; }
ClusterSchema function( String name ) { for ( int i = 0; i < clusterSchemas.size(); i++ ) { ClusterSchema schema = clusterSchemas.get( i ); if ( schema.getName().equalsIgnoreCase( name ) ) { return schema; } } return null; }
/** * Find a clustering schema using its name. * * @param name * The name of the clustering schema to look for. * @return the cluster schema with the specified name of null if nothing was found */
Find a clustering schema using its name
findClusterSchema
{ "repo_name": "dkincade/pentaho-kettle", "path": "engine/src/main/java/org/pentaho/di/trans/TransMeta.java", "license": "apache-2.0", "size": 227503 }
[ "org.pentaho.di.cluster.ClusterSchema" ]
import org.pentaho.di.cluster.ClusterSchema;
import org.pentaho.di.cluster.*;
[ "org.pentaho.di" ]
org.pentaho.di;
635,013
protected Transferable createTransferable(JComponent c) { JTree tree = (JTree) c; final TreePath path = tree.getSelectionPath(); Transferable transferable = new Transferable() {
Transferable function(JComponent c) { JTree tree = (JTree) c; final TreePath path = tree.getSelectionPath(); Transferable transferable = new Transferable() {
/** * Creates a Transferable object, in this case the tree path to * the dragged object */
Creates a Transferable object, in this case the tree path to the dragged object
createTransferable
{ "repo_name": "OpenTM2/opentm2-source", "path": "openTM2ScripterGUI/src/de/ibm/com/opentm2scripteride/gui/custom/FileTree.java", "license": "epl-1.0", "size": 14742 }
[ "java.awt.datatransfer.Transferable", "javax.swing.JComponent", "javax.swing.JTree", "javax.swing.tree.TreePath" ]
import java.awt.datatransfer.Transferable; import javax.swing.JComponent; import javax.swing.JTree; import javax.swing.tree.TreePath;
import java.awt.datatransfer.*; import javax.swing.*; import javax.swing.tree.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
2,294,036
private ContainerConfig getEsContainerConfig() { final int esPortRest = 9200; final int esPortNodes = 9300; final Map<String, List<PortBinding>> portBindings = new HashMap<>(); addHostPort(ALL_IP, portBindings, esPortRest, esPortRest); addHostPort(ALL_IP, portBindings, esPort...
ContainerConfig function() { final int esPortRest = 9200; final int esPortNodes = 9300; final Map<String, List<PortBinding>> portBindings = new HashMap<>(); addHostPort(ALL_IP, portBindings, esPortRest, esPortRest); addHostPort(ALL_IP, portBindings, esPortNodes, esPortNodes); final HostConfig hostConfig = HostConfig.bu...
/** * Creation of docker container configuration for Elasticsearch. * * @return Container configuration for Elasticsearch instance. */
Creation of docker container configuration for Elasticsearch
getEsContainerConfig
{ "repo_name": "stzilli/kapua", "path": "qa/integration-steps/src/main/java/org/eclipse/kapua/qa/integration/steps/DockerSteps.java", "license": "epl-1.0", "size": 17507 }
[ "com.spotify.docker.client.messages.ContainerConfig", "com.spotify.docker.client.messages.HostConfig", "com.spotify.docker.client.messages.PortBinding", "java.util.HashMap", "java.util.List", "java.util.Map" ]
import com.spotify.docker.client.messages.ContainerConfig; import com.spotify.docker.client.messages.HostConfig; import com.spotify.docker.client.messages.PortBinding; import java.util.HashMap; import java.util.List; import java.util.Map;
import com.spotify.docker.client.messages.*; import java.util.*;
[ "com.spotify.docker", "java.util" ]
com.spotify.docker; java.util;
966,843
public List<RecognitionException> getErrors();
List<RecognitionException> function();
/** * Retrieve the list of errors occurred. * * @return Might be null for ErrorListeners that don't queue up errors. */
Retrieve the list of errors occurred
getErrors
{ "repo_name": "myblockchain/myblockchain", "path": "storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/clusterj/jdbc/antlr/ErrorListener.java", "license": "gpl-2.0", "size": 2976 }
[ "java.util.List", "org.antlr.runtime.RecognitionException" ]
import java.util.List; import org.antlr.runtime.RecognitionException;
import java.util.*; import org.antlr.runtime.*;
[ "java.util", "org.antlr.runtime" ]
java.util; org.antlr.runtime;
2,678,406
@Message(id = 385, value = "%s cannot be null or empty") IllegalArgumentException stringParamCannotBeNullOrEmpty(final String paramName);
@Message(id = 385, value = STR) IllegalArgumentException stringParamCannotBeNullOrEmpty(final String paramName);
/** * Creates and returns an exception indicating that the param named <code>paramName</code> cannot be null * or empty string. * * @param paramName The param name * @return an {@link IllegalArgumentException} for the exception */
Creates and returns an exception indicating that the param named <code>paramName</code> cannot be null or empty string
stringParamCannotBeNullOrEmpty
{ "repo_name": "golovnin/wildfly", "path": "ejb3/src/main/java/org/jboss/as/ejb3/logging/EjbLogger.java", "license": "lgpl-2.1", "size": 147179 }
[ "org.jboss.logging.annotations.Message" ]
import org.jboss.logging.annotations.Message;
import org.jboss.logging.annotations.*;
[ "org.jboss.logging" ]
org.jboss.logging;
1,150,732
public ServiceFuture<WorkspaceInner> beginCreateAsync(String resourceGroupName, String workspaceName, WorkspaceCreateParameters parameters, final ServiceCallback<WorkspaceInner> serviceCallback) { return ServiceFuture.fromResponse(beginCreateWithServiceResponseAsync(resourceGroupName, workspaceName, paramet...
ServiceFuture<WorkspaceInner> function(String resourceGroupName, String workspaceName, WorkspaceCreateParameters parameters, final ServiceCallback<WorkspaceInner> serviceCallback) { return ServiceFuture.fromResponse(beginCreateWithServiceResponseAsync(resourceGroupName, workspaceName, parameters), serviceCallback); }
/** * Creates a Workspace. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from ...
Creates a Workspace
beginCreateAsync
{ "repo_name": "hovsepm/azure-sdk-for-java", "path": "batchai/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/batchai/v2018_05_01/implementation/WorkspacesInner.java", "license": "mit", "size": 71324 }
[ "com.microsoft.azure.management.batchai.v2018_05_01.WorkspaceCreateParameters", "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.azure.management.batchai.v2018_05_01.WorkspaceCreateParameters; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.azure.management.batchai.v2018_05_01.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
775,899
@Override public String toString() { StringBuilder sb = new StringBuilder(); for (LogRecord logRecord : logRecords) { sb.append(logRecordToStringWithStackTrace(logRecord)); } return sb.toString(); }
String function() { StringBuilder sb = new StringBuilder(); for (LogRecord logRecord : logRecords) { sb.append(logRecordToStringWithStackTrace(logRecord)); } return sb.toString(); }
/** * Returns all log records stored in AssertingHandler with stack traces in a <code>String</code> * format * * @return string representation of the log records */
Returns all log records stored in AssertingHandler with stack traces in a <code>String</code> format
toString
{ "repo_name": "GoogleCloudDataproc/hadoop-connectors", "path": "util/src/test/java/com/google/cloud/hadoop/util/testing/logging/AssertingHandler.java", "license": "apache-2.0", "size": 19566 }
[ "java.util.logging.LogRecord" ]
import java.util.logging.LogRecord;
import java.util.logging.*;
[ "java.util" ]
java.util;
450,169
public static List<Pair<String, SinkBuilder>> getSinkBuilders() { List<Pair<String, SinkBuilder>> builders = new ArrayList<Pair<String, SinkBuilder>>(); builders.add(new Pair<String, SinkBuilder>("hornetQJMSSink", builder())); return builders; }
static List<Pair<String, SinkBuilder>> function() { List<Pair<String, SinkBuilder>> builders = new ArrayList<Pair<String, SinkBuilder>>(); builders.add(new Pair<String, SinkBuilder>(STR, builder())); return builders; }
/** * This is a special function used by the SourceFactory to pull in this class * as a plugin sink. */
This is a special function used by the SourceFactory to pull in this class as a plugin sink
getSinkBuilders
{ "repo_name": "brettlangdon/flume-hornetq", "path": "src/com/blangdon/flume/hornetq/HornetQJMSSink.java", "license": "mit", "size": 3886 }
[ "com.cloudera.flume.conf.SinkFactory", "com.cloudera.util.Pair", "java.util.ArrayList", "java.util.List" ]
import com.cloudera.flume.conf.SinkFactory; import com.cloudera.util.Pair; import java.util.ArrayList; import java.util.List;
import com.cloudera.flume.conf.*; import com.cloudera.util.*; import java.util.*;
[ "com.cloudera.flume", "com.cloudera.util", "java.util" ]
com.cloudera.flume; com.cloudera.util; java.util;
2,525,116
public static void launchModelRun(DataManager data) { String url = DataURL.launchModelRun(data); GWT.log(url); RequestBuilder builder = new RequestBuilder(RequestBuilder.POST, URL.encode(url)); HashMap<String, String> entries = new HashMap<String, String>(); entries.put("uuid", data.get...
static void function(DataManager data) { String url = DataURL.launchModelRun(data); GWT.log(url); RequestBuilder builder = new RequestBuilder(RequestBuilder.POST, URL.encode(url)); HashMap<String, String> entries = new HashMap<String, String>(); entries.put("uuid", data.getSimulationId()); entries.put("host", data.secu...
/** * Makes an asynchronous HTTPS POST request to launch a model run on the * selected server. * * @param data the DataManager object for the WMT session */
Makes an asynchronous HTTPS POST request to launch a model run on the selected server
launchModelRun
{ "repo_name": "mdpiper/wmt-client", "path": "src/edu/colorado/csdms/wmt/client/control/DataTransfer.java", "license": "mit", "size": 46635 }
[ "com.google.gwt.core.client.GWT", "com.google.gwt.http.client.Request", "com.google.gwt.http.client.RequestBuilder", "com.google.gwt.http.client.RequestException", "com.google.gwt.http.client.URL", "com.google.gwt.user.client.Window", "edu.colorado.csdms.wmt.client.Constants", "java.util.HashMap" ]
import com.google.gwt.core.client.GWT; import com.google.gwt.http.client.Request; import com.google.gwt.http.client.RequestBuilder; import com.google.gwt.http.client.RequestException; import com.google.gwt.http.client.URL; import com.google.gwt.user.client.Window; import edu.colorado.csdms.wmt.client.Constants; import ...
import com.google.gwt.core.client.*; import com.google.gwt.http.client.*; import com.google.gwt.user.client.*; import edu.colorado.csdms.wmt.client.*; import java.util.*;
[ "com.google.gwt", "edu.colorado.csdms", "java.util" ]
com.google.gwt; edu.colorado.csdms; java.util;
973,992
HaWorkVO take(long serverId);
HaWorkVO take(long serverId);
/** * Takes an available HA work item. * * @param serverId server that is taking this. * @return WorkVO if there's one to work on; null if none. */
Takes an available HA work item
take
{ "repo_name": "mufaddalq/cloudstack-datera-driver", "path": "server/src/com/cloud/ha/dao/HighAvailabilityDao.java", "license": "apache-2.0", "size": 2817 }
[ "com.cloud.ha.HaWorkVO" ]
import com.cloud.ha.HaWorkVO;
import com.cloud.ha.*;
[ "com.cloud.ha" ]
com.cloud.ha;
2,735,106
static String expandQueryString(final String queryStr) { List<String> fieldQueries = new ArrayList<>(); fieldQueries.add(Server.Schema.TEXT.toString() + ":" + queryStr); fieldQueries.addAll(LANGUAGE_SPECIFIC_CONTENT_FIELDS.stream().map(field -> field.toString() + ":" + queryStr).collect(Coll...
static String expandQueryString(final String queryStr) { List<String> fieldQueries = new ArrayList<>(); fieldQueries.add(Server.Schema.TEXT.toString() + ":" + queryStr); fieldQueries.addAll(LANGUAGE_SPECIFIC_CONTENT_FIELDS.stream().map(field -> field.toString() + ":" + queryStr).collect(Collectors.toList())); return St...
/** * Make a query string from the given one by applying it to the multiple query fields * * @param queryStr escaped query string * @return query string */
Make a query string from the given one by applying it to the multiple query fields
expandQueryString
{ "repo_name": "esaunders/autopsy", "path": "KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/LanguageSpecificContentQueryHelper.java", "license": "apache-2.0", "size": 10254 }
[ "java.util.ArrayList", "java.util.List", "java.util.stream.Collectors" ]
import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors;
import java.util.*; import java.util.stream.*;
[ "java.util" ]
java.util;
684,252
public final Result get() throws InterruptedException, ExecutionException { return mFuture.get(); }
final Result function() throws InterruptedException, ExecutionException { return mFuture.get(); }
/** * Waits if necessary for the computation to complete, and then * retrieves its result. * * @return The computed result. * * @throws CancellationException If the computation was cancelled. * @throws ExecutionException If the computation threw an exception. * @throws Interrupte...
Waits if necessary for the computation to complete, and then retrieves its result
get
{ "repo_name": "xorware/android_frameworks_base", "path": "core/java/android/os/AsyncTask.java", "license": "apache-2.0", "size": 27480 }
[ "java.util.concurrent.ExecutionException" ]
import java.util.concurrent.ExecutionException;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,925,475
public PartitionElementHLAPI getContainerPartitionElementHLAPI(){ if(item.getContainerPartitionElement() == null) return null; return new PartitionElementHLAPI(item.getContainerPartitionElement()); }
PartitionElementHLAPI function(){ if(item.getContainerPartitionElement() == null) return null; return new PartitionElementHLAPI(item.getContainerPartitionElement()); }
/** * This accessor automatically encapsulate an element of the current object. * WARNING : this creates a new object in memory. * @return : null if the element is null */
This accessor automatically encapsulate an element of the current object. WARNING : this creates a new object in memory
getContainerPartitionElementHLAPI
{ "repo_name": "lhillah/pnmlframework", "path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/strings/hlapi/GreaterThanOrEqualHLAPI.java", "license": "epl-1.0", "size": 108757 }
[ "fr.lip6.move.pnml.hlpn.partitions.hlapi.PartitionElementHLAPI" ]
import fr.lip6.move.pnml.hlpn.partitions.hlapi.PartitionElementHLAPI;
import fr.lip6.move.pnml.hlpn.partitions.hlapi.*;
[ "fr.lip6.move" ]
fr.lip6.move;
1,882,578
public AttributeCondition createBeginHyphenAttributeCondition (String localName, String namespaceURI, boolean specified, String value) throws CSSException { return new CSSBeginHyphenAttributeCondition (localName, namespaceURI, specified, value); }
AttributeCondition function (String localName, String namespaceURI, boolean specified, String value) throws CSSException { return new CSSBeginHyphenAttributeCondition (localName, namespaceURI, specified, value); }
/** * <b>SAC</b>: Implements {@link * ConditionFactory#createBeginHyphenAttributeCondition(String,String,boolean,String)}. */
SAC: Implements <code>ConditionFactory#createBeginHyphenAttributeCondition(String,String,boolean,String)</code>
createBeginHyphenAttributeCondition
{ "repo_name": "Uni-Sol/batik", "path": "sources/org/apache/batik/css/engine/sac/CSSConditionFactory.java", "license": "apache-2.0", "size": 6593 }
[ "org.w3c.css.sac.AttributeCondition", "org.w3c.css.sac.CSSException" ]
import org.w3c.css.sac.AttributeCondition; import org.w3c.css.sac.CSSException;
import org.w3c.css.sac.*;
[ "org.w3c.css" ]
org.w3c.css;
1,434,581
// ============================================================================================ // METHODS // ============================================================================================ public static void start(Context _context, boolean _startLogWatcher) { Intent intent = new Intent(_contex...
static void function(Context _context, boolean _startLogWatcher) { Intent intent = new Intent(_context, CallService.class); intent.putExtra(START_LOG_WATCHER_KEY, _startLogWatcher); _context.startService(intent); }
/** * Start service with needed arguments * * @param _context * application context * @param _startLogWatcher * if true Log watcher thread will be started at first, to know * to know when user on the over side pick up the phone, * otherwise minute int...
Start service with needed arguments
start
{ "repo_name": "IvanPosohov/customize-vibrancy", "path": "src/ru/ivanp/vibro/telephony/CallService.java", "license": "apache-2.0", "size": 7426 }
[ "android.content.Context", "android.content.Intent" ]
import android.content.Context; import android.content.Intent;
import android.content.*;
[ "android.content" ]
android.content;
1,432,487
public static <E> LinkedList<E> readLinkedList(DataInput in) throws IOException, ClassNotFoundException { InternalDataSerializer.checkIn(in); int size = InternalDataSerializer.readArrayLength(in); if (size == -1) { return null; } else { LinkedList<E> list = new LinkedList<>(); ...
static <E> LinkedList<E> function(DataInput in) throws IOException, ClassNotFoundException { InternalDataSerializer.checkIn(in); int size = InternalDataSerializer.readArrayLength(in); if (size == -1) { return null; } else { LinkedList<E> list = new LinkedList<>(); for (int i = 0; i < size; i++) { E element = DataSerial...
/** * Reads an <code>LinkedList</code> from a <code>DataInput</code>. * * @throws IOException A problem occurs while reading from <code>in</code> * @throws ClassNotFoundException The class of one of the <Code>LinkedList</code>'s elements * cannot be found. * * @see #writeLinkedList */
Reads an <code>LinkedList</code> from a <code>DataInput</code>
readLinkedList
{ "repo_name": "jdeppe-pivotal/geode", "path": "geode-core/src/main/java/org/apache/geode/DataSerializer.java", "license": "apache-2.0", "size": 104615 }
[ "java.io.DataInput", "java.io.IOException", "java.util.LinkedList", "org.apache.geode.internal.InternalDataSerializer", "org.apache.geode.internal.logging.log4j.LogMarker" ]
import java.io.DataInput; import java.io.IOException; import java.util.LinkedList; import org.apache.geode.internal.InternalDataSerializer; import org.apache.geode.internal.logging.log4j.LogMarker;
import java.io.*; import java.util.*; import org.apache.geode.internal.*; import org.apache.geode.internal.logging.log4j.*;
[ "java.io", "java.util", "org.apache.geode" ]
java.io; java.util; org.apache.geode;
2,016,243
public void testHashcode() { Minute m1 = new Minute(45, 5, 1, 2, 2003); Minute m2 = new Minute(45, 5, 1, 2, 2003); assertTrue(m1.equals(m2)); int h1 = m1.hashCode(); int h2 = m2.hashCode(); assertEquals(h1, h2); }
void function() { Minute m1 = new Minute(45, 5, 1, 2, 2003); Minute m2 = new Minute(45, 5, 1, 2, 2003); assertTrue(m1.equals(m2)); int h1 = m1.hashCode(); int h2 = m2.hashCode(); assertEquals(h1, h2); }
/** * Two objects that are equal are required to return the same hashCode. */
Two objects that are equal are required to return the same hashCode
testHashcode
{ "repo_name": "nologic/nabs", "path": "client/trunk/shared/libraries/jfreechart-1.0.5/tests/org/jfree/data/time/junit/MinuteTests.java", "license": "gpl-2.0", "size": 11374 }
[ "org.jfree.data.time.Minute" ]
import org.jfree.data.time.Minute;
import org.jfree.data.time.*;
[ "org.jfree.data" ]
org.jfree.data;
572,617
public void createModel() { URI resourceURI = EditUIUtil.getURI(getEditorInput(), editingDomain.getResourceSet().getURIConverter()); Exception exception = null; Resource resource = null; try { // Load the resource through the editing domain. // resource = editingDomain.getResourceSet().getRes...
void function() { URI resourceURI = EditUIUtil.getURI(getEditorInput(), editingDomain.getResourceSet().getURIConverter()); Exception exception = null; Resource resource = null; try { resource = editingDomain.getResourceSet().getResource(resourceURI, true); } catch (Exception e) { exception = e; resource = editingDomain...
/** * This is the method called to load a resource into the editing domain's resource set based on the editor's input. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This is the method called to load a resource into the editing domain's resource set based on the editor's input.
createModel
{ "repo_name": "KAMP-Research/KAMP4APS", "path": "edu.kit.ipd.sdq.kamp4aps.model.modificationmarks.editor/src/edu/kit/ipd/sdq/kamp4aps/model/KAMP4aPSModificationmarks/presentation/KAMP4aPSModificationmarksEditor.java", "license": "apache-2.0", "size": 58458 }
[ "org.eclipse.emf.common.util.Diagnostic", "org.eclipse.emf.ecore.resource.Resource", "org.eclipse.emf.edit.ui.util.EditUIUtil" ]
import org.eclipse.emf.common.util.Diagnostic; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.edit.ui.util.EditUIUtil;
import org.eclipse.emf.common.util.*; import org.eclipse.emf.ecore.resource.*; import org.eclipse.emf.edit.ui.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,442,293
Observable<ServiceResponse<List<Pet>>> findPetsByTagsAsync(List<String> tags);
Observable<ServiceResponse<List<Pet>>> findPetsByTagsAsync(List<String> tags);
/** * Finds Pets by tags. * Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing. * * @param tags Tags to filter by * @return the observable to the List&lt;Pet&gt; object */
Finds Pets by tags. Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing
findPetsByTagsAsync
{ "repo_name": "tbombach/autorest", "path": "Samples/petstore/Java/SwaggerPetstore.java", "license": "mit", "size": 38331 }
[ "com.microsoft.rest.ServiceResponse", "java.util.List" ]
import com.microsoft.rest.ServiceResponse; import java.util.List;
import com.microsoft.rest.*; import java.util.*;
[ "com.microsoft.rest", "java.util" ]
com.microsoft.rest; java.util;
1,685,344
List<String> getSimpleLocalizedHeaders(SignType signType);
List<String> getSimpleLocalizedHeaders(SignType signType);
/** * Gets the localized headers for the given sign type, without colors. * * @param signType * The type of the sign. * @return All possible headers. */
Gets the localized headers for the given sign type, without colors
getSimpleLocalizedHeaders
{ "repo_name": "rutgerkok/BlockLocker", "path": "src/main/java/nl/rutgerkok/blocklocker/ChestSettings.java", "license": "mit", "size": 2504 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,446,833
public String parseIfMatches(String tag) throws ValidationException { Matcher matcher = detectionPattern().matcher(tag); if (!matcher.matches()) { return null; } String tagValue = matcher.group(1); String errorMsg = validator().apply(tagValue); if (errorMsg != null) { ...
String function(String tag) throws ValidationException { Matcher matcher = detectionPattern().matcher(tag); if (!matcher.matches()) { return null; } String tagValue = matcher.group(1); String errorMsg = validator().apply(tagValue); if (errorMsg != null) { throw new ValidationException(tagValue, errorMsg); } return tagV...
/** * Returns the parsed value from a tag, if this {@link ParseableRequirement} detects that it is * responsible for it, otherwise returns {@code null}. * * @throws ValidationException if the value parsed out of the tag doesn't pass the validator. */
Returns the parsed value from a tag, if this <code>ParseableRequirement</code> detects that it is responsible for it, otherwise returns null
parseIfMatches
{ "repo_name": "bazelbuild/bazel", "path": "src/main/java/com/google/devtools/build/lib/actions/ExecutionRequirements.java", "license": "apache-2.0", "size": 11245 }
[ "com.google.common.base.Preconditions", "com.google.common.collect.ImmutableMap", "java.util.regex.Matcher", "java.util.regex.Pattern" ]
import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableMap; import java.util.regex.Matcher; import java.util.regex.Pattern;
import com.google.common.base.*; import com.google.common.collect.*; import java.util.regex.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
2,868,277
public static void createOwnersFile() { if (ownersFile.exists()) return; JSONObject obj = new JSONObject(); JSONArray array = new JSONArray(); obj.put("Owners", array); try { FileWriter outFile = new FileWriter(ownersFile); outFile.write(gson.toJson(obj)); Log.info("Creato file owners"); out...
static void function() { if (ownersFile.exists()) return; JSONObject obj = new JSONObject(); JSONArray array = new JSONArray(); obj.put(STR, array); try { FileWriter outFile = new FileWriter(ownersFile); outFile.write(gson.toJson(obj)); Log.info(STR); outFile.flush(); outFile.close(); } catch (IOException e) { Log.stac...
/** * Create a new file for the setting */
Create a new file for the setting
createOwnersFile
{ "repo_name": "BITeam/Telegram_Bot", "path": "src/bot/collections/Owners.java", "license": "lgpl-3.0", "size": 2386 }
[ "java.io.FileWriter", "java.io.IOException", "org.json.simple.JSONArray", "org.json.simple.JSONObject" ]
import java.io.FileWriter; import java.io.IOException; import org.json.simple.JSONArray; import org.json.simple.JSONObject;
import java.io.*; import org.json.simple.*;
[ "java.io", "org.json.simple" ]
java.io; org.json.simple;
379,887
public Object clone() { LayoutMultiBorder rl = new LayoutMultiBorder(); rl.minSize = minSize; rl.prefSize = prefSize; rl.sizesSet = sizesSet; rl.north = (Vector) north.clone(); rl.south = (Vector) south.clone(); rl.east = (Vector) east.clone(); rl.west = (Vector) we...
Object function() { LayoutMultiBorder rl = new LayoutMultiBorder(); rl.minSize = minSize; rl.prefSize = prefSize; rl.sizesSet = sizesSet; rl.north = (Vector) north.clone(); rl.south = (Vector) south.clone(); rl.east = (Vector) east.clone(); rl.west = (Vector) west.clone(); rl.center = center; rl.userinsets = userinsets...
/** * Cloneable role */
Cloneable role
clone
{ "repo_name": "OS2World/DEV-SAMPLES-The-IBM-Developer-Connection-Release-2--Volume-2_CD4", "path": "javaxmp/javaxmp/awt/UserLayout/LayoutMultiBorder.java", "license": "bsd-3-clause", "size": 17166 }
[ "java.awt.Component", "java.awt.Dimension", "java.awt.Insets", "java.util.Vector" ]
import java.awt.Component; import java.awt.Dimension; import java.awt.Insets; import java.util.Vector;
import java.awt.*; import java.util.*;
[ "java.awt", "java.util" ]
java.awt; java.util;
410,835
protected List<? extends EndpointFinder> createDefaultEndpointFinders() { return Arrays.asList(new CxfEndpointFinder(), new CamelEndpointFinder()); }
List<? extends EndpointFinder> function() { return Arrays.asList(new CxfEndpointFinder(), new CamelEndpointFinder()); }
/** * Returns the default endpoint finder rules */
Returns the default endpoint finder rules
createDefaultEndpointFinders
{ "repo_name": "hekonsek/quickstarts", "path": "apps/api-registry/src/main/java/io/fabric8/api/registry/ApiFinder.java", "license": "apache-2.0", "size": 15398 }
[ "io.fabric8.api.registry.rules.CamelEndpointFinder", "io.fabric8.api.registry.rules.CxfEndpointFinder", "java.util.Arrays", "java.util.List" ]
import io.fabric8.api.registry.rules.CamelEndpointFinder; import io.fabric8.api.registry.rules.CxfEndpointFinder; import java.util.Arrays; import java.util.List;
import io.fabric8.api.registry.rules.*; import java.util.*;
[ "io.fabric8.api", "java.util" ]
io.fabric8.api; java.util;
2,493,059
private String getCollection(Class<? extends Document> type) { String result = null; Table table = type.getAnnotation(Table.class); if (table == null) { throw new IllegalArgumentException(type.getSimpleName() + " is not annotated as a " + Table.class.getSimpleName() + ". Are you sure this is right...
String function(Class<? extends Document> type) { String result = null; Table table = type.getAnnotation(Table.class); if (table == null) { throw new IllegalArgumentException(type.getSimpleName() + STR + Table.class.getSimpleName() + STR); } result = StringUtils.defaultIfBlank(table.name(), type.getSimpleName()); retur...
/** * Gets the collection for the given type. * * @param type * The type to determine the collection for. * @return The collection name. */
Gets the collection for the given type
getCollection
{ "repo_name": "davidcarboni/cheep-odm", "path": "src/main/java/com/github/davidcarboni/cheepodm/Odm.java", "license": "apache-2.0", "size": 7912 }
[ "javax.persistence.Table", "org.apache.commons.lang.StringUtils" ]
import javax.persistence.Table; import org.apache.commons.lang.StringUtils;
import javax.persistence.*; import org.apache.commons.lang.*;
[ "javax.persistence", "org.apache.commons" ]
javax.persistence; org.apache.commons;
351,659
public boolean isLeaf() { return !(getContent() instanceof JSONObject) && !isOperator(); }
boolean function() { return !(getContent() instanceof JSONObject) && !isOperator(); }
/** * Checks if the node is a leaf of the tree structure * * @return The result */
Checks if the node is a leaf of the tree structure
isLeaf
{ "repo_name": "Superioz/MooProject", "path": "api/src/main/java/de/superioz/moo/api/database/filter/DbFilterNode.java", "license": "gpl-2.0", "size": 4985 }
[ "org.json.JSONObject" ]
import org.json.JSONObject;
import org.json.*;
[ "org.json" ]
org.json;
1,297,164
private CopycatClient createClient() throws Throwable { return createClient(RecoveryStrategies.CLOSE); }
CopycatClient function() throws Throwable { return createClient(RecoveryStrategies.CLOSE); }
/** * Creates a Copycat client. */
Creates a Copycat client
createClient
{ "repo_name": "atomix/copycat", "path": "test/src/test/java/io/atomix/copycat/test/ClusterTest.java", "license": "apache-2.0", "size": 39445 }
[ "io.atomix.copycat.client.CopycatClient", "io.atomix.copycat.client.RecoveryStrategies" ]
import io.atomix.copycat.client.CopycatClient; import io.atomix.copycat.client.RecoveryStrategies;
import io.atomix.copycat.client.*;
[ "io.atomix.copycat" ]
io.atomix.copycat;
611,453
//----------------------------------------------------------------------- public LocalDate getLastTradeDate() { return lastTradeDate; }
LocalDate function() { return lastTradeDate; }
/** * Gets the last date of trading. * <p> * This must be a valid business day on the fixing calendar of {@code index}. * The last trade date is typically the last business day of the month. * @return the value of the property, not null */
Gets the last date of trading. This must be a valid business day on the fixing calendar of index. The last trade date is typically the last business day of the month
getLastTradeDate
{ "repo_name": "OpenGamma/Strata", "path": "modules/product/src/main/java/com/opengamma/strata/product/index/ResolvedOvernightFuture.java", "license": "apache-2.0", "size": 26844 }
[ "java.time.LocalDate" ]
import java.time.LocalDate;
import java.time.*;
[ "java.time" ]
java.time;
1,130,368
public void processComic() { try { Document doc = Jsoup.connect("http://xkcd.com/" + comicRef).get(); Element e = doc.getElementById("comic"); BufferedImage bi = ImageIO.read(new URL("http:" + e.select("img").attr("src"))); image = new ImageIcon(bi); title = doc.getElementById("ctitl...
void function() { try { Document doc = Jsoup.connect(STRcomicSTRhttp:STRimgSTRsrcSTRctitleSTRcomicSTRimgSTRtitleSTR STRhttp: comicNum = Integer.parseInt(z[i].split("/")[3]); } } } catch (IOException e) { JOptionPane.showMessageDialog(null, STR); } }
/** * Uses JSoup to find the required information */
Uses JSoup to find the required information
processComic
{ "repo_name": "lacraig2/XKCDViewer", "path": "src/Comic.java", "license": "mit", "size": 2011 }
[ "java.io.IOException", "javax.swing.JOptionPane", "org.jsoup.Jsoup", "org.jsoup.nodes.Document" ]
import java.io.IOException; import javax.swing.JOptionPane; import org.jsoup.Jsoup; import org.jsoup.nodes.Document;
import java.io.*; import javax.swing.*; import org.jsoup.*; import org.jsoup.nodes.*;
[ "java.io", "javax.swing", "org.jsoup", "org.jsoup.nodes" ]
java.io; javax.swing; org.jsoup; org.jsoup.nodes;
37,230
public List<Address> getFromLocationName(String locationName, int maxResults, double lowerLeftLatitude, double lowerLeftLongitude, double upperRightLatitude, double upperRightLongitude, boolean bounded) throws IOException { String url = SERVICE_URL + "search?"; if (mKey != null) url += "api_key=" ...
List<Address> function(String locationName, int maxResults, double lowerLeftLatitude, double lowerLeftLongitude, double upperRightLatitude, double upperRightLongitude, boolean bounded) throws IOException { String url = SERVICE_URL + STR; if (mKey != null) url += STR + mKey + "&"; url += "size=" + maxResults + STR + URL...
/** * Equivalent to Geocoder::getFromLocation(String locationName, int maxResults, double lowerLeftLatitude, double lowerLeftLongitude, double upperRightLatitude, double upperRightLongitude) * but adding bounded parameter. * @param bounded true = return only results which are inside the view box. Else, view box ...
Equivalent to Geocoder::getFromLocation(String locationName, int maxResults, double lowerLeftLatitude, double lowerLeftLongitude, double upperRightLatitude, double upperRightLongitude) but adding bounded parameter
getFromLocationName
{ "repo_name": "spyhunter99/osmbonuspack", "path": "OSMBonusPack/src/main/java/org/osmdroid/bonuspack/location/GeocoderMapzen.java", "license": "lgpl-3.0", "size": 8718 }
[ "android.location.Address", "android.util.Log", "com.google.gson.JsonArray", "com.google.gson.JsonElement", "com.google.gson.JsonObject", "com.google.gson.JsonParser", "com.google.gson.JsonSyntaxException", "java.io.IOException", "java.net.URLEncoder", "java.util.ArrayList", "java.util.List", ...
import android.location.Address; import android.util.Log; import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParser; import com.google.gson.JsonSyntaxException; import java.io.IOException; import java.net.URLEncoder; import java.util.Array...
import android.location.*; import android.util.*; import com.google.gson.*; import java.io.*; import java.net.*; import java.util.*; import org.osmdroid.bonuspack.utils.*;
[ "android.location", "android.util", "com.google.gson", "java.io", "java.net", "java.util", "org.osmdroid.bonuspack" ]
android.location; android.util; com.google.gson; java.io; java.net; java.util; org.osmdroid.bonuspack;
870,736
private static ManifestHeader.Entry[] parseStandardHeaderClause(String clauseString) throws IllegalArgumentException { // Break string into semi-colon delimited pieces. String[] pieces = parseDelimitedString(clauseString, PACKAGE_SEPARATOR); // Count the number of different paths; paths...
static ManifestHeader.Entry[] function(String clauseString) throws IllegalArgumentException { String[] pieces = parseDelimitedString(clauseString, PACKAGE_SEPARATOR); int pathCount = 0; for (int pieceIdx = 0; pieceIdx < pieces.length; pieceIdx++) { if (pieces[pieceIdx].indexOf('=') >= 0) { break; } pathCount++; } if (p...
/** * Parse a clause * Like this: path; path; dir1:=dirval1; dir2:=dirval2; attr1=attrval1; attr2=attrval2 */
Parse a clause Like this: path; path; dir1:=dirval1; dir2:=dirval2; attr1=attrval1; attr2=attrval2
parseStandardHeaderClause
{ "repo_name": "codders/k2-sling-fork", "path": "bundles/commons/osgi/src/main/java/org/apache/sling/commons/osgi/ManifestHeader.java", "license": "apache-2.0", "size": 11743 }
[ "java.util.ArrayList", "java.util.HashSet", "java.util.List", "java.util.Set" ]
import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
440,037
@SuppressForbidden(reason = "access /proc/meminfo") List<String> readProcMeminfo() throws IOException { final List<String> lines; if (Files.exists(PathUtils.get("/proc/meminfo"))) { lines = Files.readAllLines(PathUtils.get("/proc/meminfo")); assert lines != null && lines....
@SuppressForbidden(reason = STR) List<String> readProcMeminfo() throws IOException { final List<String> lines; if (Files.exists(PathUtils.get(STR))) { lines = Files.readAllLines(PathUtils.get(STR)); assert lines != null && lines.isEmpty() == false; return lines; } else { return Collections.emptyList(); } }
/** * Returns the lines from /proc/meminfo as a workaround for JDK bugs that prevent retrieval of total system memory * on some Linux variants such as Debian8. */
Returns the lines from /proc/meminfo as a workaround for JDK bugs that prevent retrieval of total system memory on some Linux variants such as Debian8
readProcMeminfo
{ "repo_name": "robin13/elasticsearch", "path": "server/src/main/java/org/elasticsearch/monitor/os/OsProbe.java", "license": "apache-2.0", "size": 34386 }
[ "java.io.IOException", "java.nio.file.Files", "java.util.Collections", "java.util.List", "org.elasticsearch.common.SuppressForbidden", "org.elasticsearch.common.io.PathUtils" ]
import java.io.IOException; import java.nio.file.Files; import java.util.Collections; import java.util.List; import org.elasticsearch.common.SuppressForbidden; import org.elasticsearch.common.io.PathUtils;
import java.io.*; import java.nio.file.*; import java.util.*; import org.elasticsearch.common.*; import org.elasticsearch.common.io.*;
[ "java.io", "java.nio", "java.util", "org.elasticsearch.common" ]
java.io; java.nio; java.util; org.elasticsearch.common;
2,770,525
AddressInfo updateAddressInfo(SimpleString addressName, EnumSet<RoutingType> routingTypes) throws Exception;
AddressInfo updateAddressInfo(SimpleString addressName, EnumSet<RoutingType> routingTypes) throws Exception;
/** it will return null if there are no updates. * it will throw an exception if the address doesn't exist */
it will return null if there are no updates
updateAddressInfo
{ "repo_name": "dejanb/activemq-artemis", "path": "artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/AddressManager.java", "license": "apache-2.0", "size": 2792 }
[ "java.util.EnumSet", "org.apache.activemq.artemis.api.core.RoutingType", "org.apache.activemq.artemis.api.core.SimpleString", "org.apache.activemq.artemis.core.server.impl.AddressInfo" ]
import java.util.EnumSet; import org.apache.activemq.artemis.api.core.RoutingType; import org.apache.activemq.artemis.api.core.SimpleString; import org.apache.activemq.artemis.core.server.impl.AddressInfo;
import java.util.*; import org.apache.activemq.artemis.api.core.*; import org.apache.activemq.artemis.core.server.impl.*;
[ "java.util", "org.apache.activemq" ]
java.util; org.apache.activemq;
1,089,544
@Test public void testSelectFileFromDF() throws FileNotFoundException{ objectStore.selectFileForPersonalization(dedicatedFile); //construct test data FileIdentifier id = new FileIdentifier(0x011A); //run mut objectStore.selectFile(id, Scope.FROM_DF); // make sure currentFile has been set assertTru...
void function() throws FileNotFoundException{ objectStore.selectFileForPersonalization(dedicatedFile); FileIdentifier id = new FileIdentifier(0x011A); objectStore.selectFile(id, Scope.FROM_DF); assertTrue(getField(objectStore, STR).equals(elementaryFile1UnderDF)); }
/** * Select a file from DF. * @throws FileNotFoundException */
Select a file from DF
testSelectFileFromDF
{ "repo_name": "JulianKoch/de.persosim.simulator", "path": "de.persosim.simulator.test/src/de/persosim/simulator/cardobjects/ObjectStoreTest.java", "license": "gpl-3.0", "size": 5521 }
[ "java.io.FileNotFoundException", "org.junit.Assert" ]
import java.io.FileNotFoundException; import org.junit.Assert;
import java.io.*; import org.junit.*;
[ "java.io", "org.junit" ]
java.io; org.junit;
2,856,582
protected void printAttribute(PrintWriter writer, int indent, Object bean, StoreDescription desc, String attributeName, Object bean2, Object value) { if (isPrintValue(bean, bean2, attributeName, desc)) printValue(writer, indent, attributeName, value); }
void function(PrintWriter writer, int indent, Object bean, StoreDescription desc, String attributeName, Object bean2, Object value) { if (isPrintValue(bean, bean2, attributeName, desc)) printValue(writer, indent, attributeName, value); }
/** * Store the specified of the specified JavaBean. * * @param writer PrintWriter to which we are storing * @param indent Indentation level * @param bean The current bean * @param desc RegistryDescriptor from this bean * @param attributeName The attribute name to store * @param ...
Store the specified of the specified JavaBean
printAttribute
{ "repo_name": "Nickname0806/Test_Q4", "path": "java/org/apache/catalina/storeconfig/StoreAppender.java", "license": "apache-2.0", "size": 14099 }
[ "java.io.PrintWriter" ]
import java.io.PrintWriter;
import java.io.*;
[ "java.io" ]
java.io;
1,776,671
private MessageHandler<Message<ID>> getMessageHandler(Message<ID> msg) { Class<?> msgClazz = msg.getClass(); MessageHandler<?> h = handlers.get(msgClazz); if (h == null) { for (Class<?> clazz : handlers.keySet()) { if (clazz.isAssignableFrom(msgClazz)) { h = handlers....
MessageHandler<Message<ID>> function(Message<ID> msg) { Class<?> msgClazz = msg.getClass(); MessageHandler<?> h = handlers.get(msgClazz); if (h == null) { for (Class<?> clazz : handlers.keySet()) { if (clazz.isAssignableFrom(msgClazz)) { h = handlers.get(clazz); handlers.put(msg.getClass(), h); break; } } } if (h == nu...
/** * returns the handler that should process the given message. The default handler is the * membership manager */
returns the handler that should process the given message. The default handler is the membership manager
getMessageHandler
{ "repo_name": "jdeppe-pivotal/geode", "path": "geode-membership/src/main/java/org/apache/geode/distributed/internal/membership/gms/messenger/JGroupsMessenger.java", "license": "apache-2.0", "size": 54394 }
[ "org.apache.geode.distributed.internal.membership.api.Message", "org.apache.geode.distributed.internal.membership.gms.interfaces.MessageHandler" ]
import org.apache.geode.distributed.internal.membership.api.Message; import org.apache.geode.distributed.internal.membership.gms.interfaces.MessageHandler;
import org.apache.geode.distributed.internal.membership.api.*; import org.apache.geode.distributed.internal.membership.gms.interfaces.*;
[ "org.apache.geode" ]
org.apache.geode;
1,884,217
public ChannelFuture writeOneInbound(Object msg) { return writeOneInbound(msg, newPromise()); }
ChannelFuture function(Object msg) { return writeOneInbound(msg, newPromise()); }
/** * Writes one message to the inbound of this {@link Channel} and does not flush it. This * method is conceptually equivalent to {@link #write(Object)}. * * @see #writeOneOutbound(Object) */
Writes one message to the inbound of this <code>Channel</code> and does not flush it. This method is conceptually equivalent to <code>#write(Object)</code>
writeOneInbound
{ "repo_name": "KatsuraKKKK/netty", "path": "transport/src/main/java/io/netty/channel/embedded/EmbeddedChannel.java", "license": "apache-2.0", "size": 27798 }
[ "io.netty.channel.ChannelFuture" ]
import io.netty.channel.ChannelFuture;
import io.netty.channel.*;
[ "io.netty.channel" ]
io.netty.channel;
598,308
Set<String> getRequiredActions();
Set<String> getRequiredActions();
/** * Required actions that are attached to this client session. * * @return */
Required actions that are attached to this client session
getRequiredActions
{ "repo_name": "eugene-chow/keycloak", "path": "model/api/src/main/java/org/keycloak/models/ClientSessionModel.java", "license": "apache-2.0", "size": 2807 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
795,282
@Override public void onValueSelected(int pickerIndex, int newValue, boolean autoAdvance) { if (pickerIndex == HOUR_INDEX) { setHour(newValue, false); String announcement = String.format(Locale.ENGLISH, "%d", newValue); if (mAllowAutoAdvance && autoAdvance) { ...
void function(int pickerIndex, int newValue, boolean autoAdvance) { if (pickerIndex == HOUR_INDEX) { setHour(newValue, false); String announcement = String.format(Locale.ENGLISH, "%d", newValue); if (mAllowAutoAdvance && autoAdvance) { setCurrentItemShowing(MINUTE_INDEX, true, true, false); announcement += STR + mSelec...
/** * Called by the picker for updating the header display. */
Called by the picker for updating the header display
onValueSelected
{ "repo_name": "ttpho/TimePicker", "path": "timer/src/main/java/photran/me/timer/TimePickerDialog.java", "license": "mit", "size": 42174 }
[ "java.util.Locale" ]
import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
165,380
private void suppressBehavior(Node behaviorValue) { if (behaviorValue == null) { compiler.report(JSError.make(behaviorValue, PolymerPassErrors.POLYMER_UNQUALIFIED_BEHAVIOR)); return; } if (behaviorValue.isArrayLit()) { for (Node child : behaviorValue.children()) { suppressBehavi...
void function(Node behaviorValue) { if (behaviorValue == null) { compiler.report(JSError.make(behaviorValue, PolymerPassErrors.POLYMER_UNQUALIFIED_BEHAVIOR)); return; } if (behaviorValue.isArrayLit()) { for (Node child : behaviorValue.children()) { suppressBehavior(child); } } else if (behaviorValue.isObjectLit()) { st...
/** * Strip property type annotations and add suppress checkTypes and globalThis on functions. */
Strip property type annotations and add suppress checkTypes and globalThis on functions
suppressBehavior
{ "repo_name": "Medium/closure-compiler", "path": "src/com/google/javascript/jscomp/PolymerPassSuppressBehaviors.java", "license": "apache-2.0", "size": 4217 }
[ "com.google.javascript.rhino.Node" ]
import com.google.javascript.rhino.Node;
import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
1,916,554
public void arcAbs(float rx, float ry, float xAxisRotation, boolean largeArcFlag, boolean sweepFlag, float x, float y) throws ParseException { // Ensure radii are valid if (rx == 0 || ry == 0) { ...
void function(float rx, float ry, float xAxisRotation, boolean largeArcFlag, boolean sweepFlag, float x, float y) throws ParseException { if (rx == 0 ry == 0) { linetoAbs(x, y); return; } double x0 = lastAbs.getX(); double y0 = lastAbs.getY(); if (x0 == x && y0 == y) { return; } Arc2D arc = ExtendedGeneralPath.computeA...
/** * Implements {@link * org.apache.batik.parser.PathHandler#arcAbs(float,float,float,boolean,boolean,float,float)}. */
Implements <code>org.apache.batik.parser.PathHandler#arcAbs(float,float,float,boolean,boolean,float,float)</code>
arcAbs
{ "repo_name": "Squeegee/batik", "path": "sources/org/apache/batik/dom/svg/AbstractSVGNormPathSegList.java", "license": "apache-2.0", "size": 14568 }
[ "java.awt.Shape", "java.awt.geom.AffineTransform", "java.awt.geom.Arc2D", "java.awt.geom.PathIterator", "org.apache.batik.ext.awt.geom.ExtendedGeneralPath", "org.apache.batik.parser.ParseException", "org.w3c.dom.svg.SVGPathSeg" ]
import java.awt.Shape; import java.awt.geom.AffineTransform; import java.awt.geom.Arc2D; import java.awt.geom.PathIterator; import org.apache.batik.ext.awt.geom.ExtendedGeneralPath; import org.apache.batik.parser.ParseException; import org.w3c.dom.svg.SVGPathSeg;
import java.awt.*; import java.awt.geom.*; import org.apache.batik.ext.awt.geom.*; import org.apache.batik.parser.*; import org.w3c.dom.svg.*;
[ "java.awt", "org.apache.batik", "org.w3c.dom" ]
java.awt; org.apache.batik; org.w3c.dom;
2,763,774
@Override public UnaryOperator<Integer> getResolutionDecrement() { return (x) -> { return fixResolution(x-1); }; }
UnaryOperator<Integer> function() { return (x) -> { return fixResolution(x-1); }; }
/** * Return the UnaryOperator for decrementing resolution * * @return resolution increment value */
Return the UnaryOperator for decrementing resolution
getResolutionDecrement
{ "repo_name": "shimniok/WheelEncoderGenerator", "path": "src/main/java/com/botthoughts/wheelencodergenerator/model/BasicEncoder.java", "license": "apache-2.0", "size": 4362 }
[ "java.util.function.UnaryOperator" ]
import java.util.function.UnaryOperator;
import java.util.function.*;
[ "java.util" ]
java.util;
850,468
public Collection<StoreFileInfo> getStoreFiles(final byte[] familyName) throws IOException { return getStoreFiles(Bytes.toString(familyName)); }
Collection<StoreFileInfo> function(final byte[] familyName) throws IOException { return getStoreFiles(Bytes.toString(familyName)); }
/** * Returns the store files available for the family. * This methods performs the filtering based on the valid store files. * @param familyName Column Family Name * @return a set of {@link StoreFileInfo} for the specified family. */
Returns the store files available for the family. This methods performs the filtering based on the valid store files
getStoreFiles
{ "repo_name": "mapr/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java", "license": "apache-2.0", "size": 40687 }
[ "java.io.IOException", "java.util.Collection", "org.apache.hadoop.hbase.util.Bytes" ]
import java.io.IOException; import java.util.Collection; import org.apache.hadoop.hbase.util.Bytes;
import java.io.*; import java.util.*; import org.apache.hadoop.hbase.util.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
1,009,631
public void append(ConvertibleOutputStream otherStream) { try { otherStream.writeTo(this); } catch (IOException e) { // Should never happen because these are all ByteArrayOutputStreams throw new AssertionError(e); } }
void function(ConvertibleOutputStream otherStream) { try { otherStream.writeTo(this); } catch (IOException e) { throw new AssertionError(e); } }
/** * Concatenates the given stream to this stream. */
Concatenates the given stream to this stream
append
{ "repo_name": "alexmojaki/s3-stream-upload", "path": "src/main/java/alex/mojaki/s3upload/ConvertibleOutputStream.java", "license": "mit", "size": 2449 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,614,190
public void test_11() throws Exception { final String namespace = "test" + UUID.randomUUID(); final BigdataSailRepositoryConnection cxn = prepareTest(namespace, false , false , false ); { loadData(cxn); IValueCentricTe...
void function() throws Exception { final String namespace = "test" + UUID.randomUUID(); final BigdataSailRepositoryConnection cxn = prepareTest(namespace, false , false , false ); { loadData(cxn); IValueCentricTextIndexer<?> searchEngine = cxn.getTripleStore().getLexiconRelation().getSearchEngine(); assertEquals(0, sea...
/** * case 11: * {@link Options#INLINE_TEXT_LITERALS} is false * {@link Options#INLINE_XSD_DATATYPE_LITERALS} is false * {@link Options#TEXT_INDEX_DATATYPE_LITERALS} is false * data loaded from file */
case 11: <code>Options#INLINE_TEXT_LITERALS</code> is false <code>Options#INLINE_XSD_DATATYPE_LITERALS</code> is false <code>Options#TEXT_INDEX_DATATYPE_LITERALS</code> is false data loaded from file
test_11
{ "repo_name": "blazegraph/database", "path": "bigdata-sails-test/src/test/java/com/bigdata/rdf/sail/TestTicket1893.java", "license": "gpl-2.0", "size": 41638 }
[ "com.bigdata.rdf.lexicon.IValueCentricTextIndexer", "java.util.UUID" ]
import com.bigdata.rdf.lexicon.IValueCentricTextIndexer; import java.util.UUID;
import com.bigdata.rdf.lexicon.*; import java.util.*;
[ "com.bigdata.rdf", "java.util" ]
com.bigdata.rdf; java.util;
2,491,687
private boolean apply(GridClientPredicate<N>[] p, N n) { if (p != null) { for (GridClientPredicate<? super N> r : p) { if (r != null && !r.apply(n)) return false; } } return true; }
boolean function(GridClientPredicate<N>[] p, N n) { if (p != null) { for (GridClientPredicate<? super N> r : p) { if (r != null && !r.apply(n)) return false; } } return true; }
/** * Apply predicate to the node. * * @param p Predicate. * @param n Node. * @return {@code True} if filter passed or empty. */
Apply predicate to the node
apply
{ "repo_name": "samaitra/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/client/util/GridClientConsistentHash.java", "license": "apache-2.0", "size": 12863 }
[ "org.apache.ignite.internal.client.GridClientPredicate" ]
import org.apache.ignite.internal.client.GridClientPredicate;
import org.apache.ignite.internal.client.*;
[ "org.apache.ignite" ]
org.apache.ignite;
1,285,932
public SensorRequestFactory deleteSensor(final Project project, final Sensor sensor) throws CreateRequestException { this.verifyNotNull(project); this.verifyNotNull(sensor); return (this.deleteSensor(project.getCompanyId(), project.getId(), sensor.getDeviceId(), sensor)); }
SensorRequestFactory function(final Project project, final Sensor sensor) throws CreateRequestException { this.verifyNotNull(project); this.verifyNotNull(sensor); return (this.deleteSensor(project.getCompanyId(), project.getId(), sensor.getDeviceId(), sensor)); }
/** * Create a {@code DELETE} request for a {@link Sensor}. * * @param project * The {@link Project} that owns the {@link Device} that has the {@link Sensor}. Should not be {@code null} and has a valid id. * @param sensor * The {@link Sensor} to delete. Should not be {@code null}...
Create a DELETE request for a <code>Sensor</code>
deleteSensor
{ "repo_name": "VisianTeam/VIPJavaSDK", "path": "src/fr/visian/vip/client/sdk/request/factory/SensorRequestFactory.java", "license": "apache-2.0", "size": 15350 }
[ "fr.visian.vip.client.sdk.exception.CreateRequestException", "fr.visian.vip.client.sdk.model.Project", "fr.visian.vip.client.sdk.model.Sensor" ]
import fr.visian.vip.client.sdk.exception.CreateRequestException; import fr.visian.vip.client.sdk.model.Project; import fr.visian.vip.client.sdk.model.Sensor;
import fr.visian.vip.client.sdk.exception.*; import fr.visian.vip.client.sdk.model.*;
[ "fr.visian.vip" ]
fr.visian.vip;
2,793,768
public static MozuClient<com.mozu.api.contracts.location.LocationType> updateLocationTypeClient(com.mozu.api.contracts.location.LocationType locationType, String locationTypeCode) throws Exception { return updateLocationTypeClient( locationType, locationTypeCode, null); }
static MozuClient<com.mozu.api.contracts.location.LocationType> function(com.mozu.api.contracts.location.LocationType locationType, String locationTypeCode) throws Exception { return updateLocationTypeClient( locationType, locationTypeCode, null); }
/** * Updates the name of a defined location type. * <p><pre><code> * MozuClient<com.mozu.api.contracts.location.LocationType> mozuClient=UpdateLocationTypeClient( locationType, locationTypeCode); * client.setBaseAddress(url); * client.executeRequest(); * LocationType locationType = client.Result(); * </...
Updates the name of a defined location type. <code><code> MozuClient mozuClient=UpdateLocationTypeClient( locationType, locationTypeCode); client.setBaseAddress(url); client.executeRequest(); LocationType locationType = client.Result(); </code></code>
updateLocationTypeClient
{ "repo_name": "lakshmi-nair/mozu-java", "path": "mozu-javaasync-core/src/main/java/com/mozu/api/clients/commerce/admin/LocationTypeClient.java", "license": "mit", "size": 9977 }
[ "com.mozu.api.MozuClient" ]
import com.mozu.api.MozuClient;
import com.mozu.api.*;
[ "com.mozu.api" ]
com.mozu.api;
1,117,214
@Override public MapChunkCache getChunkCache(List<DynmapChunk> chunks) { SpoutMapChunkCache c = new SpoutMapChunkCache(); c.setChunks(this, chunks); return c; }
MapChunkCache function(List<DynmapChunk> chunks) { SpoutMapChunkCache c = new SpoutMapChunkCache(); c.setChunks(this, chunks); return c; }
/** * Get map chunk cache for world */
Get map chunk cache for world
getChunkCache
{ "repo_name": "webbukkit/DynmapSpout", "path": "src/main/java/org/dynmap/spout/SpoutWorld.java", "license": "apache-2.0", "size": 3668 }
[ "java.util.List", "org.dynmap.DynmapChunk", "org.dynmap.utils.MapChunkCache" ]
import java.util.List; import org.dynmap.DynmapChunk; import org.dynmap.utils.MapChunkCache;
import java.util.*; import org.dynmap.*; import org.dynmap.utils.*;
[ "java.util", "org.dynmap", "org.dynmap.utils" ]
java.util; org.dynmap; org.dynmap.utils;
1,986,078
public boolean isDict() { if (isObject()) { ObjectType objType = toObjectType(); ObjectType iproto = objType.getImplicitPrototype(); // For the case when a @dict constructor is assigned to a function's // prototype property if (iproto != null && iproto.isDict()) { return true...
boolean function() { if (isObject()) { ObjectType objType = toObjectType(); ObjectType iproto = objType.getImplicitPrototype(); if (iproto != null && iproto.isDict()) { return true; } FunctionType ctor = objType.getConstructor(); if (ctor == null) { JSDocInfo info = objType.getJSDocInfo(); return info != null && info.m...
/** * Returns true iff {@code this} can be a {@code dict}. * UnionType overrides the method, assume {@code this} is not a union here. */
Returns true iff this can be a dict. UnionType overrides the method, assume this is not a union here
isDict
{ "repo_name": "jhiswin/idiil-closure-compiler", "path": "src/com/google/javascript/rhino/jstype/JSType.java", "license": "apache-2.0", "size": 45418 }
[ "com.google.javascript.rhino.JSDocInfo" ]
import com.google.javascript.rhino.JSDocInfo;
import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
2,584,885
public void testDeleteVersion() throws Exception { engine.saveText(NAME1, "v1\r\n"); engine.saveText(NAME1, "v2\r\n"); engine.saveText(NAME1, "v3\r\n"); PageManager mgr = engine.getPageManager(); WikiPageProvider provider = mgr.getProvider(); provide...
void function() throws Exception { engine.saveText(NAME1, STR); engine.saveText(NAME1, STR); engine.saveText(NAME1, STR); PageManager mgr = engine.getPageManager(); WikiPageProvider provider = mgr.getProvider(); provider.deleteVersion(NAME1, 2); List l = provider.getVersionHistory(NAME1); assertEquals(STR, 2, l.size())...
/** * DOCUMENT ME! * * @throws Exception DOCUMENT ME! */
DOCUMENT ME
testDeleteVersion
{ "repo_name": "hgschmie/EyeWiki", "path": "src/test/de/softwareforge/eyewiki/providers/RCSFileProviderTest.java", "license": "lgpl-2.1", "size": 7696 }
[ "de.softwareforge.eyewiki.manager.PageManager", "de.softwareforge.eyewiki.providers.NoSuchVersionException", "de.softwareforge.eyewiki.providers.WikiPageProvider", "java.util.List" ]
import de.softwareforge.eyewiki.manager.PageManager; import de.softwareforge.eyewiki.providers.NoSuchVersionException; import de.softwareforge.eyewiki.providers.WikiPageProvider; import java.util.List;
import de.softwareforge.eyewiki.manager.*; import de.softwareforge.eyewiki.providers.*; import java.util.*;
[ "de.softwareforge.eyewiki", "java.util" ]
de.softwareforge.eyewiki; java.util;
1,252,366
private Calendar julianDateToCalendar(Double jd, Calendar cal) { if (jd == null) { return null; } int yyyy, dd, mm, hh, mn, ss, ms , A; double w = jd + 0.5; int Z = (int)w; double F = w - Z; if (Z < 2299161) { A = Z; } ...
Calendar function(Double jd, Calendar cal) { if (jd == null) { return null; } int yyyy, dd, mm, hh, mn, ss, ms , A; double w = jd + 0.5; int Z = (int)w; double F = w - Z; if (Z < 2299161) { A = Z; } else { int alpha = (int)((Z - 1867216.25) / 36524.25); A = Z + 1 + alpha - (int)(alpha / 4.0); } int B = A + 1524; int C ...
/** * Transforms a Julian Date to java.util.Calendar object. * Based on Guine Christian's function found here: * http://java.ittoolbox.com/groups/technical-functional/java-l/java-function-to-convert-julian-date-to-calendar-date-1947446 */
Transforms a Julian Date to java.util.Calendar object. Based on Guine Christian's function found here: HREF
julianDateToCalendar
{ "repo_name": "DanielRuf/Plain-of-JARs", "path": "sources/xsqlite/org/sqlite/RS.java", "license": "gpl-3.0", "size": 35065 }
[ "java.util.Calendar", "java.util.GregorianCalendar" ]
import java.util.Calendar; import java.util.GregorianCalendar;
import java.util.*;
[ "java.util" ]
java.util;
1,247,130
public void paint(IFigure figure, Graphics graphics, Insets insets) { // Don't paint the center of the figure. int width = 1, edgeSize; Rectangle rect = tempRect; tempRect.setBounds(getPaintRectangle(figure, insets)); rect.width--; rect.height--; rect.shrink(width / 2, width / 2); graphics.se...
void function(IFigure figure, Graphics graphics, Insets insets) { int width = 1, edgeSize; Rectangle rect = tempRect; tempRect.setBounds(getPaintRectangle(figure, insets)); rect.width--; rect.height--; rect.shrink(width / 2, width / 2); graphics.setLineWidth(width); edgeSize = isPrimary() ? 7 : 6; PointList pList = new...
/** * Paints the border. If this is a border for the primary selection, it's * painted black. Otherwise, it's painted white. * * @param figure * The <code>IFigure</code> this border will be painted on * @param graphics * The <code>Graphics</code>. * @param insets * ...
Paints the border. If this is a border for the primary selection, it's painted black. Otherwise, it's painted white
paint
{ "repo_name": "opensagres/xdocreport.eclipse", "path": "rap/org.eclipse.gef/src/org/eclipse/gef/handles/CornerTriangleBorder.java", "license": "lgpl-2.1", "size": 5425 }
[ "org.eclipse.draw2d.Graphics", "org.eclipse.draw2d.IFigure", "org.eclipse.draw2d.geometry.Insets", "org.eclipse.draw2d.geometry.Point", "org.eclipse.draw2d.geometry.PointList", "org.eclipse.draw2d.geometry.Rectangle" ]
import org.eclipse.draw2d.Graphics; import org.eclipse.draw2d.IFigure; import org.eclipse.draw2d.geometry.Insets; import org.eclipse.draw2d.geometry.Point; import org.eclipse.draw2d.geometry.PointList; import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.draw2d.*; import org.eclipse.draw2d.geometry.*;
[ "org.eclipse.draw2d" ]
org.eclipse.draw2d;
722,495
@SuppressWarnings("unchecked") public static List<Boolean> getAt(boolean[] array, ObjectRange range) { return primitiveArrayGet(array, range); }
@SuppressWarnings(STR) static List<Boolean> function(boolean[] array, ObjectRange range) { return primitiveArrayGet(array, range); }
/** * Support the subscript operator with an ObjectRange for a byte array * * @param array a byte array * @param range an ObjectRange indicating the indices for the items to retrieve * @return list of the retrieved bytes * @since 1.0 */
Support the subscript operator with an ObjectRange for a byte array
getAt
{ "repo_name": "apache/incubator-groovy", "path": "src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java", "license": "apache-2.0", "size": 703151 }
[ "groovy.lang.ObjectRange", "java.util.List" ]
import groovy.lang.ObjectRange; import java.util.List;
import groovy.lang.*; import java.util.*;
[ "groovy.lang", "java.util" ]
groovy.lang; java.util;
2,620,787
public boolean containsNonEmptyColumn(byte [] family, int foffset, int flength, byte [] qualifier, int qoffset, int qlength) { Cell kv = getColumnLatestCell(family, foffset, flength, qualifier, qoffset, qlength); return (kv != null) && (kv.getValueLength() > 0); }
boolean function(byte [] family, int foffset, int flength, byte [] qualifier, int qoffset, int qlength) { Cell kv = getColumnLatestCell(family, foffset, flength, qualifier, qoffset, qlength); return (kv != null) && (kv.getValueLength() > 0); }
/** * Checks if the specified column contains a non-empty value (not a zero-length byte array). * * @param family family name * @param foffset family offset * @param flength family length * @param qualifier column qualifier * @param qoffset qualifier offset * @param qlength qualifier length *...
Checks if the specified column contains a non-empty value (not a zero-length byte array)
containsNonEmptyColumn
{ "repo_name": "JingchengDu/hbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/Result.java", "license": "apache-2.0", "size": 33516 }
[ "org.apache.hadoop.hbase.Cell" ]
import org.apache.hadoop.hbase.Cell;
import org.apache.hadoop.hbase.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,898,538
public static String gsm7BitPackedToString(byte[] pdu, int offset, int lengthSeptets, int numPaddingBits) { StringBuilder ret = new StringBuilder(lengthSeptets); boolean prevCharWasEscape; try { prevCharWasEscape = false; for (int i = 0 ; i < lengthSepte...
static String function(byte[] pdu, int offset, int lengthSeptets, int numPaddingBits) { StringBuilder ret = new StringBuilder(lengthSeptets); boolean prevCharWasEscape; try { prevCharWasEscape = false; for (int i = 0 ; i < lengthSeptets ; i++) { int bitOffset = (7 * i) + numPaddingBits; int byteOffset = bitOffset / 8; ...
/** * Convert a GSM alphabet 7 bit packed string (SMS string) into a * {@link java.lang.String}. * * See TS 23.038 6.1.2.1 for SMS Character Packing * * @param pdu the raw data from the pdu * @param offset the byte offset of * @param lengthSeptets string length in septets, not by...
Convert a GSM alphabet 7 bit packed string (SMS string) into a <code>java.lang.String</code>. See TS 23.038 6.1.2.1 for SMS Character Packing
gsm7BitPackedToString
{ "repo_name": "mateor/PDroidHistory", "path": "frameworks/base/telephony/java/com/android/internal/telephony/GsmAlphabet.java", "license": "gpl-3.0", "size": 23162 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
1,073,727
public Block getBlock() { return world.getBlockAt(this); }
Block function() { return world.getBlockAt(this); }
/** * Gets the block at the represented location * * @return Block at the represented location */
Gets the block at the represented location
getBlock
{ "repo_name": "BukkitDocChinese/BukkitAPI", "path": "src/main/java/org/bukkit/Location.java", "license": "gpl-3.0", "size": 17006 }
[ "org.bukkit.block.Block" ]
import org.bukkit.block.Block;
import org.bukkit.block.*;
[ "org.bukkit.block" ]
org.bukkit.block;
2,564,555
GuiUtilsApi getGuiUtilsApi();
GuiUtilsApi getGuiUtilsApi();
/** * Returns a {@link GuiUtilsApi} reference. * @return a {@link GuiUtilsApi} reference */
Returns a <code>GuiUtilsApi</code> reference
getGuiUtilsApi
{ "repo_name": "icza/sc2gears", "path": "src-sc2gearspluginapi/hu/belicza/andras/sc2gearspluginapi/GeneralServices.java", "license": "apache-2.0", "size": 3900 }
[ "hu.belicza.andras.sc2gearspluginapi.api.GuiUtilsApi" ]
import hu.belicza.andras.sc2gearspluginapi.api.GuiUtilsApi;
import hu.belicza.andras.sc2gearspluginapi.api.*;
[ "hu.belicza.andras" ]
hu.belicza.andras;
1,772,425
@Test public void testPreInvoke_isAuthorized_nullInvocationSubject() throws EJBAccessDeniedException { createEJBSecurityExpecations(); createAuthzServiceExpectations(); createComponentContextExpectations(); subjectManager.setCallerSubject(callerSubject); subjectManager.se...
void function() throws EJBAccessDeniedException { createEJBSecurityExpecations(); createAuthzServiceExpectations(); createComponentContextExpectations(); subjectManager.setCallerSubject(callerSubject); subjectManager.setInvocationSubject(null); rolesAllowed.add(STR); mock.checking(new Expectations() { { allowing(reques...
/** * Test method for {@link com.ibm.ws.ejbcontainer.security.internal.EJBSecurityCollaborator#preInvoke(com.ibm.ws.ejbcontainer.EJBRequestData)}. * * @throws EJBAccessDeniedException */
Test method for <code>com.ibm.ws.ejbcontainer.security.internal.EJBSecurityCollaborator#preInvoke(com.ibm.ws.ejbcontainer.EJBRequestData)</code>
testPreInvoke_isAuthorized_nullInvocationSubject
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.ejbcontainer.security/test/com/ibm/ws/ejbcontainer/security/internal/EJBSecurityCollaboratorImplTest.java", "license": "epl-1.0", "size": 48241 }
[ "com.ibm.ws.ejbcontainer.EJBMethodInterface", "com.ibm.ws.ejbcontainer.InternalConstants", "org.jmock.Expectations", "org.junit.Assert" ]
import com.ibm.ws.ejbcontainer.EJBMethodInterface; import com.ibm.ws.ejbcontainer.InternalConstants; import org.jmock.Expectations; import org.junit.Assert;
import com.ibm.ws.ejbcontainer.*; import org.jmock.*; import org.junit.*;
[ "com.ibm.ws", "org.jmock", "org.junit" ]
com.ibm.ws; org.jmock; org.junit;
551,396
public static String describe(Object objeto, Boolean conHash) { String nombre = objeto.getClass().getSimpleName(); String nombreClase = objeto.getClass().getName(); StringBuffer ret = new StringBuffer(); StringBuffer sbNullValues = new StringBuffer("{"); PropertyDescriptor[] descs; int i = 0; tr...
static String function(Object objeto, Boolean conHash) { String nombre = objeto.getClass().getSimpleName(); String nombreClase = objeto.getClass().getName(); StringBuffer ret = new StringBuffer(); StringBuffer sbNullValues = new StringBuffer("{"); PropertyDescriptor[] descs; int i = 0; try { ret.append("<").append(nomb...
/** * * Describe la clase y la instancia con el formato nombrePropiedad * (tipoDeDato) : valor * * @param objeto * @param conHash * Indica si se imprimen el "de facto" toString ni los hashcodes * @return */
Describe la clase y la instancia con el formato nombrePropiedad (tipoDeDato) : valor
describe
{ "repo_name": "alefq/tekoporu-postgresql", "path": "src/main/java/py/gov/setics/registro/util/ReflectionUtil.java", "license": "gpl-3.0", "size": 20881 }
[ "java.beans.PropertyDescriptor", "java.lang.reflect.Method", "javax.persistence.FetchType", "javax.persistence.ManyToOne", "org.hibernate.collection.PersistentBag", "org.hibernate.collection.PersistentSet" ]
import java.beans.PropertyDescriptor; import java.lang.reflect.Method; import javax.persistence.FetchType; import javax.persistence.ManyToOne; import org.hibernate.collection.PersistentBag; import org.hibernate.collection.PersistentSet;
import java.beans.*; import java.lang.reflect.*; import javax.persistence.*; import org.hibernate.collection.*;
[ "java.beans", "java.lang", "javax.persistence", "org.hibernate.collection" ]
java.beans; java.lang; javax.persistence; org.hibernate.collection;
768,424
private int getInt(Scanner scanner) { if (scanner.hasNext()) { return Integer.parseInt(scanner.next()); } return 0; }
int function(Scanner scanner) { if (scanner.hasNext()) { return Integer.parseInt(scanner.next()); } return 0; }
/** * Gets an int from user input, then returns it. * * @param scanner * Scanner instance to get user input. * @return int parsed from user input. */
Gets an int from user input, then returns it
getInt
{ "repo_name": "ElyasAlbay/computer-database", "path": "console/src/main/java/com/excilys/cdb/console/Parser.java", "license": "apache-2.0", "size": 7902 }
[ "java.util.Scanner" ]
import java.util.Scanner;
import java.util.*;
[ "java.util" ]
java.util;
877,390
public static void setFont(Font font) { g.setFont(font); }
static void function(Font font) { g.setFont(font); }
/** * Sets the graphics context's font to the specified font. * All subsequent text operations using this graphics context use this font. A null argument is silently ignored. * @param font The new font to be used */
Sets the graphics context's font to the specified font. All subsequent text operations using this graphics context use this font. A null argument is silently ignored
setFont
{ "repo_name": "BossLetsPlays/GfxLib-2D", "path": "source/com/blp/gfxlib/gfx/Gfx.java", "license": "apache-2.0", "size": 25020 }
[ "java.awt.Font" ]
import java.awt.Font;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,628,188