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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
static <T> Reference<T> getSoftReference(T object) {
return (object != null)
? new SoftReference<T>(object)
: null;
} | static <T> Reference<T> getSoftReference(T object) { return (object != null) ? new SoftReference<T>(object) : null; } | /**
* Creates a new soft reference that refers to the given object.
*
* @return a new soft reference or <code>null</code> if object is <code>null</code>
*
* @see SoftReference
*/ | Creates a new soft reference that refers to the given object | getSoftReference | {
"repo_name": "demidenko05/a-javabeans",
"path": "src/main/java/ajava/beans/FeatureDescriptor.java",
"license": "gpl-2.0",
"size": 13992
} | [
"java.lang.ref.Reference",
"java.lang.ref.SoftReference"
] | import java.lang.ref.Reference; import java.lang.ref.SoftReference; | import java.lang.ref.*; | [
"java.lang"
] | java.lang; | 1,656,547 |
public double paintUnscaledTraceCurves(int startX, int endX, Graphics2D g, double paintX, double paintY,
double horizontalScale) {
PherogramProvider provider = owner.getModel().getPherogramProvider();
double height = calculateTraceCurvesHeight();
startX = Math.max(startX, 0);
endX = Math.min(end... | double function(int startX, int endX, Graphics2D g, double paintX, double paintY, double horizontalScale) { PherogramProvider provider = owner.getModel().getPherogramProvider(); double height = calculateTraceCurvesHeight(); startX = Math.max(startX, 0); endX = Math.min(endX + 1, provider.getTraceLength()); for (Charact... | /**
* Paints parts the four trace curves stored in the specified provider with a constant scale on x.
* <p>
* Note that no background will be painted by this method.
*
* @param startX - the index in {@code provider} of the first trace value to be painted
* @param endX - the index in {@code provider} ... | Paints parts the four trace curves stored in the specified provider with a constant scale on x. Note that no background will be painted by this method | paintUnscaledTraceCurves | {
"repo_name": "bioinfweb/LibrAlign",
"path": "main/info.bioinfweb.libralign.core/src/info/bioinfweb/libralign/pherogram/PherogramPainter.java",
"license": "lgpl-3.0",
"size": 18300
} | [
"info.bioinfweb.libralign.pherogram.provider.PherogramProvider",
"java.awt.Graphics2D",
"java.awt.geom.Path2D"
] | import info.bioinfweb.libralign.pherogram.provider.PherogramProvider; import java.awt.Graphics2D; import java.awt.geom.Path2D; | import info.bioinfweb.libralign.pherogram.provider.*; import java.awt.*; import java.awt.geom.*; | [
"info.bioinfweb.libralign",
"java.awt"
] | info.bioinfweb.libralign; java.awt; | 1,983,492 |
final public static int estimateHeight(int aFontSize,
boolean aUnderlinedStyle,
int aWidth,
int aMaxHeight,
Page aPage)
throws Exception {
//#ifdef DTEST
Common.debug("estimateHeight() started");
//#endif
//#ifdef DLOGGING
Logger lo... | final static int function(int aFontSize, boolean aUnderlinedStyle, int aWidth, int aMaxHeight, Page aPage) throws Exception { Common.debug(STR); Logger logger = Logger.getLogger("View"); boolean finestLoggable = logger.isLoggable(Level.FINEST); View view = new View(); view.width = aWidth; view.height = aMaxHeight; view... | /**
* Estimate height
*/ | Estimate height | estimateHeight | {
"repo_name": "ckaestne/LEADT",
"path": "workspace/MobileRSSReader_Benchmark/src/cz/cacek/ebook/View.java",
"license": "gpl-3.0",
"size": 16169
} | [
"cz.cacek.ebook.Page",
"javax.microedition.lcdui.Font",
"net.sf.jlogmicro.util.logging.Level",
"net.sf.jlogmicro.util.logging.Logger"
] | import cz.cacek.ebook.Page; import javax.microedition.lcdui.Font; import net.sf.jlogmicro.util.logging.Level; import net.sf.jlogmicro.util.logging.Logger; | import cz.cacek.ebook.*; import javax.microedition.lcdui.*; import net.sf.jlogmicro.util.logging.*; | [
"cz.cacek.ebook",
"javax.microedition",
"net.sf.jlogmicro"
] | cz.cacek.ebook; javax.microedition; net.sf.jlogmicro; | 715,703 |
private JPanel createPlotWindowComponents()
{
// Create an empty border to surround the panes. This removes graphic
// artifacts that otherwise can appear at the corners of the panes
Border emptyBorder = BorderFactory.createEmptyBorder();
// Create a border that adds padding bet... | JPanel function() { Border emptyBorder = BorderFactory.createEmptyBorder(); Border plotAndLabelBorder = BorderFactory.createEmptyBorder(0, 0, PLOT_XAXIS_LABEL_PAD, PLOT_SCROLL_BAR_PAD); plotAndLabelPanel = new JPanel(new BorderLayout()); plotAndLabelPanel.setBorder(emptyBorder); createXAxisScrollBar(); if (yAxisCustomS... | /**************************************************************************
* Create the components that make up and arrange the plot window
*
* @return Panel containing the plot components
*************************************************************************/ | Create the components that make up and arrange the plot window | createPlotWindowComponents | {
"repo_name": "CACTUS-Mission/TRAPSat",
"path": "TRAPSat_cFS/cfs/cfe/tools/perfutils-java/src/CFSPerformanceMonitor/CPMXYPlotHandler.java",
"license": "mit",
"size": 134723
} | [
"java.awt.BorderLayout",
"javax.swing.BorderFactory",
"javax.swing.JPanel",
"javax.swing.JScrollPane",
"javax.swing.ScrollPaneConstants",
"javax.swing.border.Border"
] | import java.awt.BorderLayout; import javax.swing.BorderFactory; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.ScrollPaneConstants; import javax.swing.border.Border; | import java.awt.*; import javax.swing.*; import javax.swing.border.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 2,503,713 |
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
buttonGroup1 = new javax.swing.ButtonGroup();
jPanel1 = new javax.swing.JPanel();
jComboBox1 = new javax.swing.JComboBox();
... | @SuppressWarnings(STR) void function() { buttonGroup1 = new javax.swing.ButtonGroup(); jPanel1 = new javax.swing.JPanel(); jComboBox1 = new javax.swing.JComboBox(); jLabel2 = new javax.swing.JLabel(); jLabel1 = new javax.swing.JLabel(); jComboBox1.setEditable(true); try{ jComboBox1.setModel(new PHPVariableNameComboMode... | /**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/ | This method is called from within the constructor to initialize the form. regenerated by the Form Editor | initComponents | {
"repo_name": "qcccs/PhpPalette",
"path": "src/org/netbeans/modules/filepalette/items/resources/EchoPopup.java",
"license": "mit",
"size": 6340
} | [
"java.io.FileNotFoundException",
"org.openide.util.NbBundle"
] | import java.io.FileNotFoundException; import org.openide.util.NbBundle; | import java.io.*; import org.openide.util.*; | [
"java.io",
"org.openide.util"
] | java.io; org.openide.util; | 296,867 |
private EventHandler createEventHandler(OutErr outErr,
BlazeCommandEventHandler.Options eventOptions) {
EventHandler eventHandler;
if ((eventOptions.useColor() || eventOptions.useCursorControl())) {
eventHandler = new FancyTerminalEventHandler(outErr, eventOptions);
} else {
eventHandler... | EventHandler function(OutErr outErr, BlazeCommandEventHandler.Options eventOptions) { EventHandler eventHandler; if ((eventOptions.useColor() eventOptions.useCursorControl())) { eventHandler = new FancyTerminalEventHandler(outErr, eventOptions); } else { eventHandler = new BlazeCommandEventHandler(outErr, eventOptions)... | /**
* Returns the event handler to use for this Blaze command.
*/ | Returns the event handler to use for this Blaze command | createEventHandler | {
"repo_name": "kidaa/bazel",
"path": "src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcher.java",
"license": "apache-2.0",
"size": 28265
} | [
"com.google.devtools.build.lib.events.EventHandler",
"com.google.devtools.build.lib.util.io.OutErr"
] | import com.google.devtools.build.lib.events.EventHandler; import com.google.devtools.build.lib.util.io.OutErr; | import com.google.devtools.build.lib.events.*; import com.google.devtools.build.lib.util.io.*; | [
"com.google.devtools"
] | com.google.devtools; | 2,157,729 |
ConfigFileFormat getConfigFileFormat(); | ConfigFileFormat getConfigFileFormat(); | /**
* Get the file format of this config file instance
* @return the config file format enum
*/ | Get the file format of this config file instance | getConfigFileFormat | {
"repo_name": "nobodyiam/apollo",
"path": "apollo-client/src/main/java/com/ctrip/framework/apollo/ConfigFile.java",
"license": "apache-2.0",
"size": 1992
} | [
"com.ctrip.framework.apollo.core.enums.ConfigFileFormat"
] | import com.ctrip.framework.apollo.core.enums.ConfigFileFormat; | import com.ctrip.framework.apollo.core.enums.*; | [
"com.ctrip.framework"
] | com.ctrip.framework; | 206,958 |
public CmsLocaleManager getLocaleManager() {
return m_localeManager;
} | CmsLocaleManager function() { return m_localeManager; } | /**
* Returns the configured locale manager for multi language support.<p>
*
* @return the configured locale manager for multi language support
*/ | Returns the configured locale manager for multi language support | getLocaleManager | {
"repo_name": "alkacon/opencms-core",
"path": "src/org/opencms/configuration/CmsSystemConfiguration.java",
"license": "lgpl-2.1",
"size": 119837
} | [
"org.opencms.i18n.CmsLocaleManager"
] | import org.opencms.i18n.CmsLocaleManager; | import org.opencms.i18n.*; | [
"org.opencms.i18n"
] | org.opencms.i18n; | 1,225,979 |
public static ImmutableSet<PosixFilePermission> fromMode(long mode) {
ImmutableSet.Builder<PosixFilePermission> permissions = ImmutableSet.builder();
for (int index = 0; index < ORDERED_PERMISSIONS.size(); index++) {
if ((mode & (1 << index)) != 0) {
permissions.add(ORDERED_PERMISSIONS.get(inde... | static ImmutableSet<PosixFilePermission> function(long mode) { ImmutableSet.Builder<PosixFilePermission> permissions = ImmutableSet.builder(); for (int index = 0; index < ORDERED_PERMISSIONS.size(); index++) { if ((mode & (1 << index)) != 0) { permissions.add(ORDERED_PERMISSIONS.get(index)); } } return permissions.buil... | /**
* Convert a unix bit representation (e.g. 0644) into a set of posix file permissions.
*/ | Convert a unix bit representation (e.g. 0644) into a set of posix file permissions | fromMode | {
"repo_name": "MarkRunWu/buck",
"path": "src/com/facebook/buck/io/MorePosixFilePermissions.java",
"license": "apache-2.0",
"size": 3575
} | [
"com.google.common.collect.ImmutableSet",
"java.nio.file.attribute.PosixFilePermission"
] | import com.google.common.collect.ImmutableSet; import java.nio.file.attribute.PosixFilePermission; | import com.google.common.collect.*; import java.nio.file.attribute.*; | [
"com.google.common",
"java.nio"
] | com.google.common; java.nio; | 1,593,892 |
EClass getTypeArgument();
| EClass getTypeArgument(); | /**
* Returns the meta object for class '{@link org.dresdenocl.pivotmodel.TypeArgument <em>Type Argument</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @return the meta object for class '<em>Type Argument</em>'.
* @see org.dresdenocl.pivotmodel.TypeArgument
* @generated
*/ | Returns the meta object for class '<code>org.dresdenocl.pivotmodel.TypeArgument Type Argument</code>'. | getTypeArgument | {
"repo_name": "dresden-ocl/dresdenocl",
"path": "plugins/org.dresdenocl.pivotmodel/src/org/dresdenocl/pivotmodel/PivotModelPackage.java",
"license": "lgpl-3.0",
"size": 98285
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 672,056 |
public static int unmapDigitalChannel(final int channel) {
return 15 - channel;
}
protected DigitalModule(final int moduleNumber) {
super(ModulePresence.ModuleType.kDigital, moduleNumber);
DO_PWMGenerators[m_moduleNumber - 1] = new Resource(tDIO.kDO_PWMDutyCycle_NumEle... | static int function(final int channel) { return 15 - channel; } protected DigitalModule(final int moduleNumber) { super(ModulePresence.ModuleType.kDigital, moduleNumber); DO_PWMGenerators[m_moduleNumber - 1] = new Resource(tDIO.kDO_PWMDutyCycle_NumElements); m_fpgaDIO = new tDIO(m_moduleNumber - 1); while (tDIO.readLoo... | /**
* Convert a channel from it's fpga reference
* @param channel the channel to convert
* @return the converted channel
*/ | Convert a channel from it's fpga reference | unmapDigitalChannel | {
"repo_name": "SkylineSpartabots/Kit-Bot-1",
"path": "src/edu/wpi/first/wpilibj/KickBot1/templates/wpilib/DigitalModule.java",
"license": "bsd-3-clause",
"size": 16720
} | [
"edu.wpi.first.wpilibj.communication.ModulePresence",
"edu.wpi.first.wpilibj.fpga.tDIO"
] | import edu.wpi.first.wpilibj.communication.ModulePresence; import edu.wpi.first.wpilibj.fpga.tDIO; | import edu.wpi.first.wpilibj.communication.*; import edu.wpi.first.wpilibj.fpga.*; | [
"edu.wpi.first"
] | edu.wpi.first; | 1,510,569 |
// establish and open a CacheWriterServer to handle cache
// cache loading requests from a CacheWriterClient
cacheWriter = new RecordingCacheWriter<>();
cacheWriterServer = new CacheWriterServer<>(10000, cacheWriter);
cacheWriterServer.open();
// establish the CacheManager for the tests
cacheMa... | cacheWriter = new RecordingCacheWriter<>(); cacheWriterServer = new CacheWriterServer<>(10000, cacheWriter); cacheWriterServer.open(); cacheManager = Caching.getCachingProvider().getCacheManager(); CacheWriterClient<Integer, String> theCacheWriter = new CacheWriterClient<>(cacheWriterServer.getInetAddress(), cacheWrite... | /**
* Configure write-through before each test.
*/ | Configure write-through before each test | onBeforeEachTest | {
"repo_name": "headissue/cache2k",
"path": "cache2k-jcache-tests/src/test/java/org/jsr107/tck/integration/CacheWriterTest.java",
"license": "gpl-3.0",
"size": 39128
} | [
"javax.cache.Caching",
"javax.cache.configuration.FactoryBuilder",
"javax.cache.configuration.MutableConfiguration"
] | import javax.cache.Caching; import javax.cache.configuration.FactoryBuilder; import javax.cache.configuration.MutableConfiguration; | import javax.cache.*; import javax.cache.configuration.*; | [
"javax.cache"
] | javax.cache; | 928,022 |
public void setInstantProgress(float progress) {
if (isSpinning) {
mProgress = 0.0f;
isSpinning = false;
}
if (progress > 1.0f) {
progress -= 1.0f;
} else if (progress < 0) {
progress = 0;
}
if (progress == mTargetProgress) {
return;
}
mTargetProgress =... | void function(float progress) { if (isSpinning) { mProgress = 0.0f; isSpinning = false; } if (progress > 1.0f) { progress -= 1.0f; } else if (progress < 0) { progress = 0; } if (progress == mTargetProgress) { return; } mTargetProgress = Math.min(progress * 360.0f, 360.0f); mProgress = mTargetProgress; lastTimeAnimated ... | /**
* Set the progress to a specific value,
* the bar will be set instantly to that value
*
* @param progress the progress between 0 and 1
*/ | Set the progress to a specific value, the bar will be set instantly to that value | setInstantProgress | {
"repo_name": "evildoerX/weex-ouikit",
"path": "platforms/android/farwolf/src/main/java/com/farwolf/view/progress/ProgressWheel.java",
"license": "mit",
"size": 20886
} | [
"android.os.SystemClock"
] | import android.os.SystemClock; | import android.os.*; | [
"android.os"
] | android.os; | 1,060,321 |
public ImageSearchHits search(Document doc, IndexReader reader) throws IOException;
| ImageSearchHits function(Document doc, IndexReader reader) throws IOException; | /**
* Searches for images similar to the given image, defined by the Document from the index.
*
* @param doc the example image to search for.
* @param reader the IndexReader which is used to dsearch through the images.
* @return a sorted list of hits.
* @throws java.io.IOException... | Searches for images similar to the given image, defined by the Document from the index | search | {
"repo_name": "kreyssel/lire",
"path": "core/src/main/java/net/semanticmetadata/lire/ImageSearcher.java",
"license": "gpl-2.0",
"size": 4898
} | [
"java.io.IOException",
"org.apache.lucene.document.Document",
"org.apache.lucene.index.IndexReader"
] | import java.io.IOException; import org.apache.lucene.document.Document; import org.apache.lucene.index.IndexReader; | import java.io.*; import org.apache.lucene.document.*; import org.apache.lucene.index.*; | [
"java.io",
"org.apache.lucene"
] | java.io; org.apache.lucene; | 2,167,225 |
@ApiModelProperty(example = "null", value = "")
public String getGlobalUltimateIndicator() {
return globalUltimateIndicator;
} | @ApiModelProperty(example = "null", value = "") String function() { return globalUltimateIndicator; } | /**
* Get globalUltimateIndicator
* @return globalUltimateIndicator
**/ | Get globalUltimateIndicator | getGlobalUltimateIndicator | {
"repo_name": "PitneyBowes/LocationIntelligenceSDK-Java",
"path": "src/main/java/pb/locationintelligence/model/POIPlaces.java",
"license": "apache-2.0",
"size": 22879
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 1,048,946 |
public static CustomDataKey lookupKeyById(Long cikid) {
Session session = HibernateFactory.getSession();
return (CustomDataKey) session.getNamedQuery("CustomDataKey.findById")
.setLong("id", cikid)
//Retrieve from cache if there
.setCacheable(true)
... | static CustomDataKey function(Long cikid) { Session session = HibernateFactory.getSession(); return (CustomDataKey) session.getNamedQuery(STR) .setLong("id", cikid) .setCacheable(true) .uniqueResult(); } | /**
* Get the CustomDataKey represented by the passed in ID
* @param cikid The ID of the key you want
* @return CustomDataKey that was found, null if not.
*/ | Get the CustomDataKey represented by the passed in ID | lookupKeyById | {
"repo_name": "xkollar/spacewalk",
"path": "java/code/src/com/redhat/rhn/domain/org/OrgFactory.java",
"license": "gpl-2.0",
"size": 13916
} | [
"com.redhat.rhn.common.hibernate.HibernateFactory",
"org.hibernate.Session"
] | import com.redhat.rhn.common.hibernate.HibernateFactory; import org.hibernate.Session; | import com.redhat.rhn.common.hibernate.*; import org.hibernate.*; | [
"com.redhat.rhn",
"org.hibernate"
] | com.redhat.rhn; org.hibernate; | 1,050,136 |
protected boolean resourceBundleIsInsideClasses() {
IProject thisProj = getOpenedFile().getProject();
Collection<String> srcs = getSourceFolderPathes(thisProj);
String thisPath = getOpenedFile().getProjectRelativePath().toString();
if (srcs != null) {
for (String srcPath ... | boolean function() { IProject thisProj = getOpenedFile().getProject(); Collection<String> srcs = getSourceFolderPathes(thisProj); String thisPath = getOpenedFile().getProjectRelativePath().toString(); if (srcs != null) { for (String srcPath : srcs) { if (thisPath.startsWith(srcPath)) { return true; } } } return false; ... | /**
* The resource bundle can be either with the rest of the classes or with
* the bundle resources.
*
* @return
*/ | The resource bundle can be either with the rest of the classes or with the bundle resources | resourceBundleIsInsideClasses | {
"repo_name": "OpenSoftwareSolutions/PDFReporter-Studio",
"path": "com.jaspersoft.studio.babel.editor/src/org/eclipse/babel/editor/bundle/NLFragmentBundleGroupStrategy.java",
"license": "lgpl-3.0",
"size": 27207
} | [
"java.util.Collection",
"org.eclipse.core.resources.IProject"
] | import java.util.Collection; import org.eclipse.core.resources.IProject; | import java.util.*; import org.eclipse.core.resources.*; | [
"java.util",
"org.eclipse.core"
] | java.util; org.eclipse.core; | 273,143 |
public void refreshCellWidths() {
// set width of columns
if(getColumnCount()!=dataTable.getColumnCount()) {
return;
}
for(int i = 0; i<getColumnCount(); i++) {
TableColumn propColumn = getColumnModel().getColumn(i);
TableColumn dataColumn = dataTable.getColumnModel().getColumn(i);
... | void function() { if(getColumnCount()!=dataTable.getColumnCount()) { return; } for(int i = 0; i<getColumnCount(); i++) { TableColumn propColumn = getColumnModel().getColumn(i); TableColumn dataColumn = dataTable.getColumnModel().getColumn(i); propColumn.setMaxWidth(dataColumn.getWidth()); propColumn.setMinWidth(dataCol... | /**
* Refresh the cell widths in the table.
*/ | Refresh the cell widths in the table | refreshCellWidths | {
"repo_name": "dobrown/tracker-mvn",
"path": "src/main/java/org/opensourcephysics/tools/DataToolPropsTable.java",
"license": "gpl-3.0",
"size": 28592
} | [
"javax.swing.table.TableColumn"
] | import javax.swing.table.TableColumn; | import javax.swing.table.*; | [
"javax.swing"
] | javax.swing; | 1,665,623 |
public Function getFunction() {
return function;
}
| Function function() { return function; } | /**
* Returns adapted function.
*
* @return Adapted function.
*/ | Returns adapted function | getFunction | {
"repo_name": "ITman1/ScriptBox",
"path": "src/main/java/org/fit/cssbox/scriptbox/script/javascript/wrap/FunctionEventListenerAdapter.java",
"license": "gpl-2.0",
"size": 1890
} | [
"org.mozilla.javascript.Function"
] | import org.mozilla.javascript.Function; | import org.mozilla.javascript.*; | [
"org.mozilla.javascript"
] | org.mozilla.javascript; | 852,010 |
long countWorkspacesInStatus(WorkspaceStatus status, long timestamp) throws ServerException; | long countWorkspacesInStatus(WorkspaceStatus status, long timestamp) throws ServerException; | /**
* Similar to {@link #findInStatusSince(long, WorkspaceStatus, int, long)} but merely provides the
* caller with count of the workspaces in the given state, not their IDs.
*/ | Similar to <code>#findInStatusSince(long, WorkspaceStatus, int, long)</code> but merely provides the caller with count of the workspaces in the given state, not their IDs | countWorkspacesInStatus | {
"repo_name": "davidfestal/che",
"path": "wsmaster/che-core-api-workspace-activity/src/main/java/org/eclipse/che/api/workspace/activity/WorkspaceActivityDao.java",
"license": "epl-1.0",
"size": 4955
} | [
"org.eclipse.che.api.core.ServerException",
"org.eclipse.che.api.core.model.workspace.WorkspaceStatus"
] | import org.eclipse.che.api.core.ServerException; import org.eclipse.che.api.core.model.workspace.WorkspaceStatus; | import org.eclipse.che.api.core.*; import org.eclipse.che.api.core.model.workspace.*; | [
"org.eclipse.che"
] | org.eclipse.che; | 85,206 |
public void advance() {
try {
Path path = Paths.get(otp.getPath());
byte[] otpData = Files.readAllBytes(path);
byte[] newOtpData = new byte[otpData.length - advance];
for(int x = advance; x < otpData.length; x++) {
newOtpData[x - advance] = otp... | void function() { try { Path path = Paths.get(otp.getPath()); byte[] otpData = Files.readAllBytes(path); byte[] newOtpData = new byte[otpData.length - advance]; for(int x = advance; x < otpData.length; x++) { newOtpData[x - advance] = otpData[x]; } FileOutputStream fs = new FileOutputStream(otp.getPath()); otp.delete()... | /**
* Deletes used parts of the OTP. Run after every usage of encrypt() as soon as you have a transmission receipt from the recipient.
*/ | Deletes used parts of the OTP. Run after every usage of encrypt() as soon as you have a transmission receipt from the recipient | advance | {
"repo_name": "YellowLineSoftworks/VIPER-Engine",
"path": "src/crypto/OTP.java",
"license": "bsd-3-clause",
"size": 9834
} | [
"java.io.FileOutputStream",
"java.nio.file.Files",
"java.nio.file.Path",
"java.nio.file.Paths"
] | import java.io.FileOutputStream; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; | import java.io.*; import java.nio.file.*; | [
"java.io",
"java.nio"
] | java.io; java.nio; | 60,810 |
@Nonnull
public java.util.List<com.microsoft.graph.options.FunctionOption> getFunctionOptions() {
final ArrayList<com.microsoft.graph.options.FunctionOption> result = new ArrayList<>();
if(this.number != null) {
result.add(new com.microsoft.graph.options.FunctionOption("number", numb... | java.util.List<com.microsoft.graph.options.FunctionOption> function() { final ArrayList<com.microsoft.graph.options.FunctionOption> result = new ArrayList<>(); if(this.number != null) { result.add(new com.microsoft.graph.options.FunctionOption(STR, number)); } if(this.fromUnit != null) { result.add(new com.microsoft.gr... | /**
* Gets the functions options from the properties that have been set
* @return a list of function options for the request
*/ | Gets the functions options from the properties that have been set | getFunctionOptions | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/models/WorkbookFunctionsConvertParameterSet.java",
"license": "mit",
"size": 5132
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,985,138 |
public void setAnimationStatus(AnimStatus animStatus){
if (mAnimators==null){
return;
}
int count=mAnimators.size();
for (int i = 0; i < count; i++) {
Animator animator=mAnimators.get(i);
boolean isRunning=animator.isRunning();
switch (... | void function(AnimStatus animStatus){ if (mAnimators==null){ return; } int count=mAnimators.size(); for (int i = 0; i < count; i++) { Animator animator=mAnimators.get(i); boolean isRunning=animator.isRunning(); switch (animStatus){ case START: if (!isRunning){ animator.start(); } break; case END: if (isRunning){ animat... | /**
* make animation to start or end when target
* view was be Visible or Gone or Invisible.
* make animation to cancel when target view
* be onDetachedFromWindow.
* @param animStatus
*/ | make animation to start or end when target view was be Visible or Gone or Invisible. make animation to cancel when target view be onDetachedFromWindow | setAnimationStatus | {
"repo_name": "huangfangyi/FanXin-based-HuanXin_2.0beta",
"path": "app/src/main/java/com/htmessage/fanxinht/acitivity/chat/weight/header/ProgressViewController.java",
"license": "gpl-2.0",
"size": 2166
} | [
"android.animation.Animator"
] | import android.animation.Animator; | import android.animation.*; | [
"android.animation"
] | android.animation; | 42,785 |
@ApiModelProperty(required = true, value = "")
public V1RoleRef getRoleRef() {
return roleRef;
} | @ApiModelProperty(required = true, value = "") V1RoleRef function() { return roleRef; } | /**
* Get roleRef
*
* @return roleRef
*/ | Get roleRef | getRoleRef | {
"repo_name": "kubernetes-client/java",
"path": "kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RoleBinding.java",
"license": "apache-2.0",
"size": 7303
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 1,103,436 |
public User getChangedBy() {
return changedBy;
} | User function() { return changedBy; } | /**
* Gets the USer who last changed this item
* @return the last user to change this item
*/ | Gets the USer who last changed this item | getChangedBy | {
"repo_name": "SanaMobile/sana.openmrs",
"path": "api/src/main/java/org/openmrs/module/sana/queue/QueueItem.java",
"license": "bsd-3-clause",
"size": 9422
} | [
"org.openmrs.User"
] | import org.openmrs.User; | import org.openmrs.*; | [
"org.openmrs"
] | org.openmrs; | 2,676,087 |
RedisFuture<Long> keys(KeyStreamingChannel<K> channel, K pattern); | RedisFuture<Long> keys(KeyStreamingChannel<K> channel, K pattern); | /**
* Find all keys matching the given pattern on all cluster upstream nodes.
*
* @param channel the channel
* @param pattern the pattern
* @return Long array-reply list of keys matching {@code pattern}.
* @see RedisKeyAsyncCommands#keys(KeyStreamingChannel, Object)
*/ | Find all keys matching the given pattern on all cluster upstream nodes | keys | {
"repo_name": "lettuce-io/lettuce-core",
"path": "src/main/java/io/lettuce/core/cluster/api/async/RedisAdvancedClusterAsyncCommands.java",
"license": "apache-2.0",
"size": 16598
} | [
"io.lettuce.core.RedisFuture",
"io.lettuce.core.output.KeyStreamingChannel"
] | import io.lettuce.core.RedisFuture; import io.lettuce.core.output.KeyStreamingChannel; | import io.lettuce.core.*; import io.lettuce.core.output.*; | [
"io.lettuce.core"
] | io.lettuce.core; | 994,431 |
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(
String resourceGroupName, String serviceName, String certificateName) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new Il... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Flux<ByteBuffer>>> function( String resourceGroupName, String serviceName, String certificateName) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (this.client.getSubscriptionId() == null) { return Mono .e... | /**
* Delete the certificate resource.
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
* from the Azure Resource Manager API or the portal.
* @param serviceName The name of the Service resource.
* @param certificateName ... | Delete the certificate resource | deleteWithResponseAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/implementation/CertificatesClientImpl.java",
"license": "mit",
"size": 58224
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.FluxUtil",
"java.nio.ByteBuffer"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.FluxUtil; import java.nio.ByteBuffer; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import java.nio.*; | [
"com.azure.core",
"java.nio"
] | com.azure.core; java.nio; | 275,084 |
public void clearBut(TrayPreference... modules) {
String selection = null;
String[] selectionArgs = new String[]{};
for (final TrayPreference module : modules) {
if (module == null) {
continue;
}
String moduleName = module.getModularizedSt... | void function(TrayPreference... modules) { String selection = null; String[] selectionArgs = new String[]{}; for (final TrayPreference module : modules) { if (module == null) { continue; } String moduleName = module.getModularizedStorage().getModuleName(); selection = SqliteHelper .extendSelection(selection, TrayContra... | /**
* clears <b>all</b> Preferences saved but the modules stated.
*
* @param modules modules excluded when deleting preferences
*/ | clears all Preferences saved but the modules stated | clearBut | {
"repo_name": "omegasoft7/tray",
"path": "library/src/main/java/net/grandcentrix/tray/provider/TrayProviderHelper.java",
"license": "apache-2.0",
"size": 6616
} | [
"net.grandcentrix.tray.accessor.TrayPreference",
"net.grandcentrix.tray.util.SqliteHelper"
] | import net.grandcentrix.tray.accessor.TrayPreference; import net.grandcentrix.tray.util.SqliteHelper; | import net.grandcentrix.tray.accessor.*; import net.grandcentrix.tray.util.*; | [
"net.grandcentrix.tray"
] | net.grandcentrix.tray; | 1,559,788 |
public VerificationBean registerUser(String userName, String password,
UserIdentityClaimDTO[] claims, String profileName, String tenantDomain)
throws IdentityMgtServiceException {
VerificationBean vBean = new VerificationBean();
org.wso2.carbon.user.core.UserStoreManager userStoreManager = null;
Permis... | VerificationBean function(String userName, String password, UserIdentityClaimDTO[] claims, String profileName, String tenantDomain) throws IdentityMgtServiceException { VerificationBean vBean = new VerificationBean(); org.wso2.carbon.user.core.UserStoreManager userStoreManager = null; Permission permission = null; Stri... | /**
* This method is used to register an user in the system. The account will be locked if the
* Authentication.Policy.Account.Lock.On.Creation is set to true. Else user will be able to
* login after registration.
*
* @param userName
* @param password
* @param claims
* @param profileName
* @param ten... | This method is used to register an user in the system. The account will be locked if the Authentication.Policy.Account.Lock.On.Creation is set to true. Else user will be able to login after registration | registerUser | {
"repo_name": "maheshika/carbon-identity",
"path": "components/identity/org.wso2.carbon.identity.mgt/src/main/java/org/wso2/carbon/identity/mgt/services/UserInformationRecoveryService.java",
"license": "apache-2.0",
"size": 28989
} | [
"java.util.HashMap",
"java.util.Map",
"org.wso2.carbon.CarbonConstants",
"org.wso2.carbon.context.PrivilegedCarbonContext",
"org.wso2.carbon.identity.base.IdentityConstants",
"org.wso2.carbon.identity.base.IdentityException",
"org.wso2.carbon.identity.mgt.IdentityMgtConfig",
"org.wso2.carbon.identity.... | import java.util.HashMap; import java.util.Map; import org.wso2.carbon.CarbonConstants; import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.identity.base.IdentityConstants; import org.wso2.carbon.identity.base.IdentityException; import org.wso2.carbon.identity.mgt.IdentityMgtConfig; import or... | import java.util.*; import org.wso2.carbon.*; import org.wso2.carbon.context.*; import org.wso2.carbon.identity.base.*; import org.wso2.carbon.identity.mgt.*; import org.wso2.carbon.identity.mgt.beans.*; import org.wso2.carbon.identity.mgt.constants.*; import org.wso2.carbon.identity.mgt.dto.*; import org.wso2.carbon.i... | [
"java.util",
"org.wso2.carbon"
] | java.util; org.wso2.carbon; | 1,695,067 |
@Nonnull
public TargetedManagedAppConfigurationCollectionRequest skip(final int value) {
addSkipOption(value);
return this;
} | TargetedManagedAppConfigurationCollectionRequest function(final int value) { addSkipOption(value); return this; } | /**
* Sets the skip value for the request
*
* @param value of the number of items to skip
* @return the updated request
*/ | Sets the skip value for the request | skip | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/TargetedManagedAppConfigurationCollectionRequest.java",
"license": "mit",
"size": 6690
} | [
"com.microsoft.graph.requests.TargetedManagedAppConfigurationCollectionRequest"
] | import com.microsoft.graph.requests.TargetedManagedAppConfigurationCollectionRequest; | import com.microsoft.graph.requests.*; | [
"com.microsoft.graph"
] | com.microsoft.graph; | 1,905,605 |
public List<PercentileMetricInner> listMetrics(String resourceGroupName, String accountName, String filter) {
return listMetricsWithServiceResponseAsync(resourceGroupName, accountName, filter).toBlocking().single().body();
} | List<PercentileMetricInner> function(String resourceGroupName, String accountName, String filter) { return listMetricsWithServiceResponseAsync(resourceGroupName, accountName, filter).toBlocking().single().body(); } | /**
* Retrieves the metrics determined by the given filter for the given database account. This url is only for PBS and Replication Latency data.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param filter An OData filter e... | Retrieves the metrics determined by the given filter for the given database account. This url is only for PBS and Replication Latency data | listMetrics | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/cosmos/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_03_01/implementation/PercentilesInner.java",
"license": "mit",
"size": 9267
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,149,382 |
private InfoCmd executeInfoRequest(DockerClient client, Message message) {
LOGGER.debug("Executing Docker Info Request");
InfoCmd infoCmd = client.infoCmd();
return infoCmd;
} | InfoCmd function(DockerClient client, Message message) { LOGGER.debug(STR); InfoCmd infoCmd = client.infoCmd(); return infoCmd; } | /**
* Produces a platform information request
*
* @param client
* @param message
* @return
*/ | Produces a platform information request | executeInfoRequest | {
"repo_name": "ramonmaruko/camel",
"path": "components/camel-docker/src/main/java/org/apache/camel/component/docker/producer/DockerProducer.java",
"license": "apache-2.0",
"size": 51680
} | [
"com.github.dockerjava.api.DockerClient",
"com.github.dockerjava.api.command.InfoCmd",
"org.apache.camel.Message"
] | import com.github.dockerjava.api.DockerClient; import com.github.dockerjava.api.command.InfoCmd; import org.apache.camel.Message; | import com.github.dockerjava.api.*; import com.github.dockerjava.api.command.*; import org.apache.camel.*; | [
"com.github.dockerjava",
"org.apache.camel"
] | com.github.dockerjava; org.apache.camel; | 2,455,444 |
public void setContrast(int level) throws IOException, IllegalArgumentException {
if (mI2cDevice == null) {
throw new IllegalStateException("I2C Device not open");
}
if (level < 0 || level > 255) {
throw new IllegalArgumentException("Invalid contrast " + String.valueO... | void function(int level) throws IOException, IllegalArgumentException { if (mI2cDevice == null) { throw new IllegalStateException(STR); } if (level < 0 level > 255) { throw new IllegalArgumentException(STR + String.valueOf(level) + STR); } mI2cDevice.writeRegByte(0, (byte) COMMAND_CONTRAST_LEVEL); mI2cDevice.writeRegBy... | /**
* Sets the contrast for the display.
*
* @param level The contrast level (0-255).
* @throws IllegalStateException
* @throws IllegalArgumentException
*/ | Sets the contrast for the display | setContrast | {
"repo_name": "androidthings/contrib-drivers",
"path": "ssd1306/src/main/java/com/google/android/things/contrib/driver/ssd1306/Ssd1306.java",
"license": "apache-2.0",
"size": 12558
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 769,294 |
public BodyPart getBodyPart(String identifier) {
return (BodyPart) thisNode.getNode(thisNode.findNode(identifier)).getValue();
}
| BodyPart function(String identifier) { return (BodyPart) thisNode.getNode(thisNode.findNode(identifier)).getValue(); } | /**
* get a BodyPart element inside the branches by name
*
* @param identifier
* the name/id
* @return the body part
*/ | get a BodyPart element inside the branches by name | getBodyPart | {
"repo_name": "MyRobotLab/myrobotlab",
"path": "src/main/java/org/myrobotlab/service/abstracts/AbstractBodyPart.java",
"license": "apache-2.0",
"size": 5867
} | [
"org.myrobotlab.service.BodyPart"
] | import org.myrobotlab.service.BodyPart; | import org.myrobotlab.service.*; | [
"org.myrobotlab.service"
] | org.myrobotlab.service; | 480,699 |
public List<SubscriptionBundle> getSubscriptionBundlesForAccountId(UUID accountId, TenantContext context) throws SubscriptionApiException; | List<SubscriptionBundle> function(UUID accountId, TenantContext context) throws SubscriptionApiException; | /**
* Retrieves all the <code>SubscriptionBundle</code> for a given account.
*
* @param accountId the account id
* @param context the context
* @return list of <code>SubscriptionBundle</code>
* @throws SubscriptionApiException if the account does not exist
*/ | Retrieves all the <code>SubscriptionBundle</code> for a given account | getSubscriptionBundlesForAccountId | {
"repo_name": "maguero/killbill-api",
"path": "src/main/java/org/killbill/billing/entitlement/api/SubscriptionApi.java",
"license": "apache-2.0",
"size": 5374
} | [
"java.util.List",
"org.killbill.billing.util.callcontext.TenantContext"
] | import java.util.List; import org.killbill.billing.util.callcontext.TenantContext; | import java.util.*; import org.killbill.billing.util.callcontext.*; | [
"java.util",
"org.killbill.billing"
] | java.util; org.killbill.billing; | 105,374 |
protected Map<HttpRoute, RouteSpecificPool> createRouteToPoolMap() {
return new HashMap<HttpRoute, RouteSpecificPool>();
} | Map<HttpRoute, RouteSpecificPool> function() { return new HashMap<HttpRoute, RouteSpecificPool>(); } | /**
* Creates the map for {@link #routeToPool}.
* Called once by the constructor.
*
* @return a map
*/ | Creates the map for <code>#routeToPool</code>. Called once by the constructor | createRouteToPoolMap | {
"repo_name": "byronka/xenos",
"path": "lib/lib_src/httpcomponents_source/httpcomponents-client-4.4/httpclient/src/main/java-deprecated/org/apache/http/impl/conn/tsccm/ConnPoolByRoute.java",
"license": "mit",
"size": 27924
} | [
"java.util.HashMap",
"java.util.Map",
"org.apache.http.conn.routing.HttpRoute"
] | import java.util.HashMap; import java.util.Map; import org.apache.http.conn.routing.HttpRoute; | import java.util.*; import org.apache.http.conn.routing.*; | [
"java.util",
"org.apache.http"
] | java.util; org.apache.http; | 1,127,790 |
protected String sendRequestForData(final S service, final T accessToken, final String dataUrl, Verb verb) {
logger.debug("accessToken: {} / dataUrl: {}", accessToken, dataUrl);
final long t0 = System.currentTimeMillis();
final OAuthRequest request = createOAuthRequest(dataUrl, verb);
... | String function(final S service, final T accessToken, final String dataUrl, Verb verb) { logger.debug(STR, accessToken, dataUrl); final long t0 = System.currentTimeMillis(); final OAuthRequest request = createOAuthRequest(dataUrl, verb); signRequest(service, accessToken, request); final String body; final int code; try... | /**
* Make a request to get the data of the authenticated user for the provider.
*
* @param service the OAuth service
* @param accessToken the access token
* @param dataUrl url of the data
* @param verb method used to request data
* @return the user data response
*/ | Make a request to get the data of the authenticated user for the provider | sendRequestForData | {
"repo_name": "jkacer/pac4j",
"path": "pac4j-oauth/src/main/java/org/pac4j/oauth/profile/creator/OAuthProfileCreator.java",
"license": "apache-2.0",
"size": 5796
} | [
"com.github.scribejava.core.model.OAuthRequest",
"com.github.scribejava.core.model.Response",
"com.github.scribejava.core.model.Verb",
"java.io.IOException",
"java.util.concurrent.ExecutionException",
"org.pac4j.core.exception.HttpCommunicationException"
] | import com.github.scribejava.core.model.OAuthRequest; import com.github.scribejava.core.model.Response; import com.github.scribejava.core.model.Verb; import java.io.IOException; import java.util.concurrent.ExecutionException; import org.pac4j.core.exception.HttpCommunicationException; | import com.github.scribejava.core.model.*; import java.io.*; import java.util.concurrent.*; import org.pac4j.core.exception.*; | [
"com.github.scribejava",
"java.io",
"java.util",
"org.pac4j.core"
] | com.github.scribejava; java.io; java.util; org.pac4j.core; | 19,411 |
private void readOutputFiles(StringTokenizer line){
String new_line = line.nextToken(); //We read the input data line
StringTokenizer data = new StringTokenizer(new_line, " = \" ");
data.nextToken(); //inputFile
outputTrFile = data.nextToken();
outputTstFile = data.nextT... | void function(StringTokenizer line){ String new_line = line.nextToken(); StringTokenizer data = new StringTokenizer(new_line, STR "); data.nextToken(); outputTrFile = data.nextToken(); outputTstFile = data.nextToken(); while(data.hasMoreTokens()){ outputFiles.add(data.nextToken()); } } | /**
* We read the output files for training and test and all the possible remaining output files
* @param line StringTokenizer It is the line containing the output files.
*/ | We read the output files for training and test and all the possible remaining output files | readOutputFiles | {
"repo_name": "SCI2SUGR/KEEL",
"path": "src/keel/Algorithms/RE_SL_Postprocess/Post_G_T_LatAmp_FRBSs/parseParameters.java",
"license": "gpl-3.0",
"size": 9486
} | [
"java.util.StringTokenizer"
] | import java.util.StringTokenizer; | import java.util.*; | [
"java.util"
] | java.util; | 1,409,318 |
protected boolean applyQuota(CrawlURI curi, String quotaKey, long actual) {
long quota = ((Long)getUncheckedAttribute(curi, quotaKey)).longValue();
if (quota >= 0 && actual >= quota) {
curi.setFetchStatus(S_BLOCKED_BY_QUOTA);
curi.addAnnotation("Q:"+quotaKey);
cur... | boolean function(CrawlURI curi, String quotaKey, long actual) { long quota = ((Long)getUncheckedAttribute(curi, quotaKey)).longValue(); if (quota >= 0 && actual >= quota) { curi.setFetchStatus(S_BLOCKED_BY_QUOTA); curi.addAnnotation("Q:"+quotaKey); curi.skipToProcessorChain(getController().getPostprocessorChain()); if(... | /**
* Apply the quota specified by the given key against the actual
* value provided. If the quota and actual values rule out processing the
* given CrawlURI, mark up the CrawlURI appropriately.
*
* @param curi CrawlURI whose processing is subject to a potential quota
* limitation
... | Apply the quota specified by the given key against the actual value provided. If the quota and actual values rule out processing the given CrawlURI, mark up the CrawlURI appropriately | applyQuota | {
"repo_name": "gaowangyizu/myHeritrix",
"path": "myHeritrix/src/org/archive/crawler/prefetch/QuotaEnforcer.java",
"license": "apache-2.0",
"size": 13030
} | [
"org.archive.crawler.datamodel.CoreAttributeConstants",
"org.archive.crawler.datamodel.CrawlURI"
] | import org.archive.crawler.datamodel.CoreAttributeConstants; import org.archive.crawler.datamodel.CrawlURI; | import org.archive.crawler.datamodel.*; | [
"org.archive.crawler"
] | org.archive.crawler; | 1,979,804 |
private void leaveTrianglesP()
{
this.chunkIntReader.finish();
this.chunkIntReader = null;
final int size = this.intArrayBuilder.size();
final IntList data = new IntList(size);
data.setValues(this.intArrayBuilder);
this.trianglesBuilder.setData(data);
this... | void function() { this.chunkIntReader.finish(); this.chunkIntReader = null; final int size = this.intArrayBuilder.size(); final IntList data = new IntList(size); data.setValues(this.intArrayBuilder); this.trianglesBuilder.setData(data); this.intArrayBuilder = null; leaveElement(); } | /**
* Leaves a triangles p element.
*/ | Leaves a triangles p element | leaveTrianglesP | {
"repo_name": "kayahr/jollada",
"path": "src/main/java/de/ailis/jollada/reader/ColladaHandler.java",
"license": "mit",
"size": 102287
} | [
"de.ailis.jollada.model.IntList"
] | import de.ailis.jollada.model.IntList; | import de.ailis.jollada.model.*; | [
"de.ailis.jollada"
] | de.ailis.jollada; | 402,563 |
public int size(BaselineTopologyRecord rec) throws IgniteCheckedException {
int size = 0;
size += 4;
size += 4;
if (rec.mapping() != null) {
for (Object consistentId : rec.mapping().values()) {
size += 2;
size += marshalConsistentId(... | int function(BaselineTopologyRecord rec) throws IgniteCheckedException { int size = 0; size += 4; size += 4; if (rec.mapping() != null) { for (Object consistentId : rec.mapping().values()) { size += 2; size += marshalConsistentId(consistentId).length; } } return size; } | /**
* Returns size of marshalled {@link BaselineTopologyRecord} in bytes.
*
* @param rec BaselineTopologyRecord instance.
* @return Size of BaselineTopologyRecord instance in bytes.
* @throws IgniteCheckedException In case of fail.
*/ | Returns size of marshalled <code>BaselineTopologyRecord</code> in bytes | size | {
"repo_name": "psadusumilli/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/serializer/BaselineTopologyRecordSerializer.java",
"license": "apache-2.0",
"size": 5454
} | [
"org.apache.ignite.IgniteCheckedException",
"org.apache.ignite.internal.pagemem.wal.record.BaselineTopologyRecord"
] | import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.pagemem.wal.record.BaselineTopologyRecord; | import org.apache.ignite.*; import org.apache.ignite.internal.pagemem.wal.record.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 2,284,047 |
private void removeCompactedFiles() throws IOException {
for (StoreFile oldFile : this.compactedFiles) {
byte[] oldEndRow = endOf(oldFile);
List<StoreFile> source = null;
if (isInvalid(oldEndRow)) {
source = getLevel0Copy();
} else {
int stripeIndex = findSt... | void function() throws IOException { for (StoreFile oldFile : this.compactedFiles) { byte[] oldEndRow = endOf(oldFile); List<StoreFile> source = null; if (isInvalid(oldEndRow)) { source = getLevel0Copy(); } else { int stripeIndex = findStripeIndexByEndRow(oldEndRow); if (stripeIndex < 0) { throw new IOException(STR + o... | /**
* Remove compacted files.
* @param compactedFiles Compacted files.
*/ | Remove compacted files | removeCompactedFiles | {
"repo_name": "toshimasa-nasu/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StripeStoreFileManager.java",
"license": "apache-2.0",
"size": 40417
} | [
"java.io.IOException",
"java.util.List",
"org.apache.hadoop.hbase.util.Bytes"
] | import java.io.IOException; import java.util.List; 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,345,947 |
static void clearItemsFromContainer(ContainerHolder container)
{
container.clear();
}
| static void clearItemsFromContainer(ContainerHolder container) { container.clear(); } | /**
* Utility to clear out the Items from a Container.
* Applies to Map or Collection.
**/ | Utility to clear out the Items from a Container. Applies to Map or Collection | clearItemsFromContainer | {
"repo_name": "hopecee/texsts",
"path": "jdo/identity/src/test/org/datanucleus/tests/types/SCOHolderUtilities.java",
"license": "apache-2.0",
"size": 10308
} | [
"org.jpox.samples.types.container.ContainerHolder"
] | import org.jpox.samples.types.container.ContainerHolder; | import org.jpox.samples.types.container.*; | [
"org.jpox.samples"
] | org.jpox.samples; | 351,806 |
public void setArray(Expression newArray) {
if (newArray != array) {
NotificationChain msgs = null;
if (array != null)
msgs = ((InternalEObject) array).eInverseRemove(this, EOPPOSITE_FEATURE_BASE
- AstPackage.ARRAY_ACCESS__ARRAY, null, msgs);
if (newArray != null)
msgs = ((Inte... | void function(Expression newArray) { if (newArray != array) { NotificationChain msgs = null; if (array != null) msgs = ((InternalEObject) array).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - AstPackage.ARRAY_ACCESS__ARRAY, null, msgs); if (newArray != null) msgs = ((InternalEObject) newArray).eInverseAdd(this, EOPPOSIT... | /**
* Sets the value of the '{@link edu.kit.iti.formal.pse.worthwhile.model.ast.ArrayAccess#getArray <em>Array</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Array</em>' containment reference.
* @see #getArray()
* @generated
*/ | Sets the value of the '<code>edu.kit.iti.formal.pse.worthwhile.model.ast.ArrayAccess#getArray Array</code>' containment reference. | setArray | {
"repo_name": "team-worthwhile/worthwhile",
"path": "implementierung/src/worthwhile.model/target/generated/java/edu/kit/iti/formal/pse/worthwhile/model/ast/ArrayAccess.java",
"license": "bsd-3-clause",
"size": 8264
} | [
"org.eclipse.emf.common.notify.Notification",
"org.eclipse.emf.common.notify.NotificationChain",
"org.eclipse.emf.ecore.InternalEObject",
"org.eclipse.emf.ecore.impl.ENotificationImpl"
] | import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; | import org.eclipse.emf.common.notify.*; import org.eclipse.emf.ecore.*; import org.eclipse.emf.ecore.impl.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 714,067 |
public DoubleArray priceSensitivityModelParamsHullWhite(
ResolvedIborFuture future,
RatesProvider ratesProvider,
HullWhiteOneFactorPiecewiseConstantParametersProvider hwProvider) {
IborIndexObservation obs = future.getIborRate().getObservation();
double forward = ratesProvider.iborIndexRate... | DoubleArray function( ResolvedIborFuture future, RatesProvider ratesProvider, HullWhiteOneFactorPiecewiseConstantParametersProvider hwProvider) { IborIndexObservation obs = future.getIborRate().getObservation(); double forward = ratesProvider.iborIndexRates(future.getIndex()).rate(obs); LocalDate fixingStartDate = obs.... | /**
* Calculates the price sensitivity to piecewise constant volatility parameters of the Hull-White model.
*
* @param future the future
* @param ratesProvider the rates provider
* @param hwProvider the Hull-White model parameter provider
* @return the price parameter sensitivity of the product
*/ | Calculates the price sensitivity to piecewise constant volatility parameters of the Hull-White model | priceSensitivityModelParamsHullWhite | {
"repo_name": "OpenGamma/Strata",
"path": "modules/pricer/src/main/java/com/opengamma/strata/pricer/index/HullWhiteIborFutureProductPricer.java",
"license": "apache-2.0",
"size": 8011
} | [
"com.opengamma.strata.basics.index.IborIndexObservation",
"com.opengamma.strata.collect.array.DoubleArray",
"com.opengamma.strata.pricer.model.HullWhiteOneFactorPiecewiseConstantParametersProvider",
"com.opengamma.strata.pricer.rate.RatesProvider",
"com.opengamma.strata.product.index.ResolvedIborFuture",
... | import com.opengamma.strata.basics.index.IborIndexObservation; import com.opengamma.strata.collect.array.DoubleArray; import com.opengamma.strata.pricer.model.HullWhiteOneFactorPiecewiseConstantParametersProvider; import com.opengamma.strata.pricer.rate.RatesProvider; import com.opengamma.strata.product.index.ResolvedI... | import com.opengamma.strata.basics.index.*; import com.opengamma.strata.collect.array.*; import com.opengamma.strata.pricer.model.*; import com.opengamma.strata.pricer.rate.*; import com.opengamma.strata.product.index.*; import java.time.*; | [
"com.opengamma.strata",
"java.time"
] | com.opengamma.strata; java.time; | 1,794,677 |
public ISarlActionBuilder addDefSarlAction(String name) {
return this.builder.addDefSarlAction(name);
} | ISarlActionBuilder function(String name) { return this.builder.addDefSarlAction(name); } | /** Create a SarlAction.
* @param name the name of the SarlAction.
* @return the builder.
*/ | Create a SarlAction | addDefSarlAction | {
"repo_name": "sarl/sarl",
"path": "main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/appenders/SarlSkillSourceAppender.java",
"license": "apache-2.0",
"size": 7520
} | [
"io.sarl.lang.codebuilder.builders.ISarlActionBuilder"
] | import io.sarl.lang.codebuilder.builders.ISarlActionBuilder; | import io.sarl.lang.codebuilder.builders.*; | [
"io.sarl.lang"
] | io.sarl.lang; | 545,329 |
@Test
public void testInvalidRateTypeForRateType() throws Throwable {
final ParameterService pService = this.context.mock(ParameterService.class);
final BusinessObjectService boService = this.context.mock(BusinessObjectService.class);
InstituteRateRateTypeRateClassRule rule ... | void function() throws Throwable { final ParameterService pService = this.context.mock(ParameterService.class); final BusinessObjectService boService = this.context.mock(BusinessObjectService.class); InstituteRateRateTypeRateClassRule rule = new InstituteRateRateTypeRateClassRuleImpl(boService, pService); Method m = ru... | /**
* Tests a rate class that is invalid for a rate type is properly flagged.
* @throws Throwable if bad happens
*/ | Tests a rate class that is invalid for a rate type is properly flagged | testInvalidRateTypeForRateType | {
"repo_name": "blackcathacker/kc.preclean",
"path": "coeus-code/src/test/java/org/kuali/kra/budget/rules/InstituteRateRateTypeRateClassRuleTest.java",
"license": "apache-2.0",
"size": 17731
} | [
"java.lang.reflect.Method",
"java.util.ArrayList",
"java.util.Collection",
"java.util.HashMap",
"java.util.Map",
"org.jmock.Expectations",
"org.junit.Assert",
"org.kuali.coeus.common.budget.framework.rate.AbstractInstituteRate",
"org.kuali.coeus.common.budget.framework.rate.InstituteRate",
"org.ku... | import java.lang.reflect.Method; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.Map; import org.jmock.Expectations; import org.junit.Assert; import org.kuali.coeus.common.budget.framework.rate.AbstractInstituteRate; import org.kuali.coeus.common.budget.framework.rate... | import java.lang.reflect.*; import java.util.*; import org.jmock.*; import org.junit.*; import org.kuali.coeus.common.budget.framework.rate.*; import org.kuali.coeus.common.budget.impl.rate.*; import org.kuali.kra.infrastructure.*; import org.kuali.rice.coreservice.framework.parameter.*; import org.kuali.rice.krad.serv... | [
"java.lang",
"java.util",
"org.jmock",
"org.junit",
"org.kuali.coeus",
"org.kuali.kra",
"org.kuali.rice"
] | java.lang; java.util; org.jmock; org.junit; org.kuali.coeus; org.kuali.kra; org.kuali.rice; | 2,257,280 |
protected Table getTable() {
if (table == null) {
throw new IllegalStateException(NOT_INITIALIZED);
}
return table;
} | Table function() { if (table == null) { throw new IllegalStateException(NOT_INITIALIZED); } return table; } | /**
* Allows subclasses to get the {@link Table}.
*/ | Allows subclasses to get the <code>Table</code> | getTable | {
"repo_name": "francisliu/hbase",
"path": "hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.java",
"license": "apache-2.0",
"size": 26391
} | [
"org.apache.hadoop.hbase.client.Table"
] | import org.apache.hadoop.hbase.client.Table; | import org.apache.hadoop.hbase.client.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 12,418 |
public T withProcessorFactory(NiftyProcessorFactory processorFactory)
{
this.niftyProcessorFactory = processorFactory;
return (T) this;
} | T function(NiftyProcessorFactory processorFactory) { this.niftyProcessorFactory = processorFactory; return (T) this; } | /**
* Anohter way to specify the TProcessor.
*/ | Anohter way to specify the TProcessor | withProcessorFactory | {
"repo_name": "ivmaykov/nifty",
"path": "nifty-core/src/main/java/com/facebook/nifty/core/ThriftServerDefBuilderBase.java",
"license": "apache-2.0",
"size": 9835
} | [
"com.facebook.nifty.processor.NiftyProcessorFactory"
] | import com.facebook.nifty.processor.NiftyProcessorFactory; | import com.facebook.nifty.processor.*; | [
"com.facebook.nifty"
] | com.facebook.nifty; | 712,355 |
public int getRegisterMapForMCOffset(Offset mcOffset) {
int entry = findOSREntry(mcOffset);
int mapIndex = getOSRMapIndex(entry);
return osrMaps[mapIndex];
} | int function(Offset mcOffset) { int entry = findOSREntry(mcOffset); int mapIndex = getOSRMapIndex(entry); return osrMaps[mapIndex]; } | /**
* get register's reference map for the machine instruction offset
*/ | get register's reference map for the machine instruction offset | getRegisterMapForMCOffset | {
"repo_name": "ut-osa/laminar",
"path": "jikesrvm-3.0.0/rvm/src/org/jikesrvm/osr/EncodedOSRMap.java",
"license": "bsd-3-clause",
"size": 15058
} | [
"org.vmmagic.unboxed.Offset"
] | import org.vmmagic.unboxed.Offset; | import org.vmmagic.unboxed.*; | [
"org.vmmagic.unboxed"
] | org.vmmagic.unboxed; | 1,510,000 |
public BigDecimal bigDecimalValue() {
return new BigDecimal(numerator).divide(new BigDecimal(denominator));
} | BigDecimal function() { return new BigDecimal(numerator).divide(new BigDecimal(denominator)); } | /**
* <p>
* Gets the fraction as a <code>BigDecimal</code>. This calculates the
* fraction as the numerator divided by denominator.
* </p>
*
* @return the fraction as a <code>BigDecimal</code>.
* @throws ArithmeticException
* if the exact quotient does not have a term... | Gets the fraction as a <code>BigDecimal</code>. This calculates the fraction as the numerator divided by denominator. | bigDecimalValue | {
"repo_name": "SpoonLabs/astor",
"path": "examples/math_1/src/main/java/org/apache/commons/math3/fraction/BigFraction.java",
"license": "gpl-2.0",
"size": 38568
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 1,217,114 |
long fetchConsumeOffset(final MessageQueue mq, final boolean fromStore) throws MQClientException;
| long fetchConsumeOffset(final MessageQueue mq, final boolean fromStore) throws MQClientException; | /**
* Fetch the offset
*
* @param mq
* @param fromStore
*
* @return
*
* @throws MQClientException
*/ | Fetch the offset | fetchConsumeOffset | {
"repo_name": "Technoboy-/RocketMQ",
"path": "rocketmq-client/src/main/java/com/alibaba/rocketmq/client/consumer/MQPullConsumer.java",
"license": "apache-2.0",
"size": 7042
} | [
"com.alibaba.rocketmq.client.exception.MQClientException",
"com.alibaba.rocketmq.common.message.MessageQueue"
] | import com.alibaba.rocketmq.client.exception.MQClientException; import com.alibaba.rocketmq.common.message.MessageQueue; | import com.alibaba.rocketmq.client.exception.*; import com.alibaba.rocketmq.common.message.*; | [
"com.alibaba.rocketmq"
] | com.alibaba.rocketmq; | 977,790 |
ServiceResponse<Void> postPathLocalValid(String subscriptionId) throws ErrorException, IOException, IllegalArgumentException; | ServiceResponse<Void> postPathLocalValid(String subscriptionId) throws ErrorException, IOException, IllegalArgumentException; | /**
* POST method with subscriptionId modeled in the method. pass in subscription id = '1234-5678-9012-3456' to succeed.
*
* @param subscriptionId Should appear as a method parameter -use value '1234-5678-9012-3456'
* @throws ErrorException exception thrown from REST call
* @throws IOException... | POST method with subscriptionId modeled in the method. pass in subscription id = '1234-5678-9012-3456' to succeed | postPathLocalValid | {
"repo_name": "John-Hart/autorest",
"path": "src/generator/AutoRest.Java.Azure.Tests/src/main/java/fixtures/azurespecials/SubscriptionInMethods.java",
"license": "mit",
"size": 5963
} | [
"com.microsoft.rest.ServiceResponse",
"java.io.IOException"
] | import com.microsoft.rest.ServiceResponse; import java.io.IOException; | import com.microsoft.rest.*; import java.io.*; | [
"com.microsoft.rest",
"java.io"
] | com.microsoft.rest; java.io; | 1,150,163 |
@Override
public void gameFinished(GameDto game) {
this.updateHighscoreList();
} | void function(GameDto game) { this.updateHighscoreList(); } | /**
* Update the HighscoreList, if a game has ended.
*/ | Update the HighscoreList, if a game has ended | gameFinished | {
"repo_name": "onc/PvS-Repetitorium",
"path": "code/PvS-Rep/src/de/uulm/pvs/rep/solution/lauchner/controller/SettingsController.java",
"license": "mit",
"size": 5643
} | [
"de.uulm.pvs.rep.solution.data.dto.GameDto"
] | import de.uulm.pvs.rep.solution.data.dto.GameDto; | import de.uulm.pvs.rep.solution.data.dto.*; | [
"de.uulm.pvs"
] | de.uulm.pvs; | 430,178 |
protected void setSizes(final CrawlURI curi, HttpRecorder rec) {
// set reporting size
curi.setContentSize(rec.getRecordedInput().getSize());
// special handling for 304-not modified
if (curi.getFetchStatus() == HttpStatus.SC_NOT_MODIFIED
&& curi.containsKey(A_FETCH_H... | void function(final CrawlURI curi, HttpRecorder rec) { curi.setContentSize(rec.getRecordedInput().getSize()); if (curi.getFetchStatus() == HttpStatus.SC_NOT_MODIFIED && curi.containsKey(A_FETCH_HISTORY)) { AList history[] = curi.getAList().getAListArray(A_FETCH_HISTORY); if (history[0] != null && history[0] .containsKe... | /**
* Update CrawlURI internal sizes based on current transaction (and
* in the case of 304s, history)
*
* @param curi CrawlURI
* @param rec HttpRecorder
*/ | Update CrawlURI internal sizes based on current transaction (and in the case of 304s, history) | setSizes | {
"repo_name": "gaowangyizu/myHeritrix",
"path": "myHeritrix/src/org/archive/crawler/fetcher/FetchHTTP.java",
"license": "apache-2.0",
"size": 68804
} | [
"org.apache.commons.httpclient.HttpStatus",
"org.archive.crawler.datamodel.CoreAttributeConstants",
"org.archive.crawler.datamodel.CrawlURI",
"org.archive.util.HttpRecorder",
"st.ata.util.AList"
] | import org.apache.commons.httpclient.HttpStatus; import org.archive.crawler.datamodel.CoreAttributeConstants; import org.archive.crawler.datamodel.CrawlURI; import org.archive.util.HttpRecorder; import st.ata.util.AList; | import org.apache.commons.httpclient.*; import org.archive.crawler.datamodel.*; import org.archive.util.*; import st.ata.util.*; | [
"org.apache.commons",
"org.archive.crawler",
"org.archive.util",
"st.ata.util"
] | org.apache.commons; org.archive.crawler; org.archive.util; st.ata.util; | 2,827,481 |
public static boolean addTaskables(SSHExec connection,
List<String> classes, String agentHomeDir) throws AnkushException {
try {
// empty buffer string for taskable.
StringBuffer taskFileContent = new StringBuffer();
// appending the line separator.
taskFileContent.append(Constant.Strings.LINE_SEPER... | static boolean function(SSHExec connection, List<String> classes, String agentHomeDir) throws AnkushException { try { StringBuffer taskFileContent = new StringBuffer(); taskFileContent.append(Constant.Strings.LINE_SEPERATOR); for (String className : classes) { taskFileContent.append(className) .append(Constant.Strings.... | /**
* Method to add the taskable class names in taskable conf file.
*
* @param connection
* @param className
* @return
*/ | Method to add the taskable class names in taskable conf file | addTaskables | {
"repo_name": "impetus-opensource/ankush",
"path": "ankush/src/main/java/com/impetus/ankush2/agent/AgentUtils.java",
"license": "lgpl-3.0",
"size": 9191
} | [
"com.impetus.ankush.common.exception.AnkushException",
"com.impetus.ankush.common.scripting.AnkushTask",
"com.impetus.ankush.common.scripting.impl.AppendFileUsingEcho",
"com.impetus.ankush2.constant.Constant",
"java.util.List",
"net.neoremind.sshxcute.core.SSHExec"
] | import com.impetus.ankush.common.exception.AnkushException; import com.impetus.ankush.common.scripting.AnkushTask; import com.impetus.ankush.common.scripting.impl.AppendFileUsingEcho; import com.impetus.ankush2.constant.Constant; import java.util.List; import net.neoremind.sshxcute.core.SSHExec; | import com.impetus.ankush.common.exception.*; import com.impetus.ankush.common.scripting.*; import com.impetus.ankush.common.scripting.impl.*; import com.impetus.ankush2.constant.*; import java.util.*; import net.neoremind.sshxcute.core.*; | [
"com.impetus.ankush",
"com.impetus.ankush2",
"java.util",
"net.neoremind.sshxcute"
] | com.impetus.ankush; com.impetus.ankush2; java.util; net.neoremind.sshxcute; | 1,340,223 |
@Override
public void initialize(URL url, ResourceBundle rb) {
basePath.setText(Preferences.getInstance().getBasePath());
timeoutValue.setText(Integer.toString(Preferences.getInstance().getTimeout()));
correctTrack.setText(Preferences.getInstance().getCorrectTrack());
errorTrack.... | void function(URL url, ResourceBundle rb) { basePath.setText(Preferences.getInstance().getBasePath()); timeoutValue.setText(Integer.toString(Preferences.getInstance().getTimeout())); correctTrack.setText(Preferences.getInstance().getCorrectTrack()); errorTrack.setText(Preferences.getInstance().getErrorTrack()); timeout... | /**
* Initializes the controller class.
*/ | Initializes the controller class | initialize | {
"repo_name": "phante/SarabandaSaloon",
"path": "SarabandaSaloon/src/com/phante/sarabandasaloon/ui/ConfigurationController.java",
"license": "cc0-1.0",
"size": 4940
} | [
"com.phante.sarabandasaloon.entity.Preferences",
"java.util.ResourceBundle"
] | import com.phante.sarabandasaloon.entity.Preferences; import java.util.ResourceBundle; | import com.phante.sarabandasaloon.entity.*; import java.util.*; | [
"com.phante.sarabandasaloon",
"java.util"
] | com.phante.sarabandasaloon; java.util; | 919,208 |
private void handleLoopException(Exception ex) {
if (tracker != null) {
tracker.log("Failed LoOP computation: " + ex.getMessage());
}
Logger.getLogger(getClass().getName()).log(Level.WARNING, ex,
() -> "Failed LoOP computation: " + ex.getMessage());
} | void function(Exception ex) { if (tracker != null) { tracker.log(STR + ex.getMessage()); } Logger.getLogger(getClass().getName()).log(Level.WARNING, ex, () -> STR + ex.getMessage()); } | /**
* Handle loop exception.
*
* @param ex the ex
*/ | Handle loop exception | handleLoopException | {
"repo_name": "aherbert/GDSC-Core",
"path": "src/main/java/uk/ac/sussex/gdsc/core/clustering/optics/OpticsManager.java",
"license": "gpl-3.0",
"size": 74412
} | [
"java.util.logging.Level",
"java.util.logging.Logger"
] | import java.util.logging.Level; import java.util.logging.Logger; | import java.util.logging.*; | [
"java.util"
] | java.util; | 1,015,936 |
Collection attachCopyAll(Collection detachedEntities); | Collection attachCopyAll(Collection detachedEntities); | /**
* Reattach the given detached instances (for example, web form objects) with
* the current JDO transaction, merging their changes into the current persistence
* instances that represent the corresponding entities.
* <p>Only available on JDO 2.0+ or through a vendor-specific JdoDialect.
* @param detachedEn... | Reattach the given detached instances (for example, web form objects) with the current JDO transaction, merging their changes into the current persistence instances that represent the corresponding entities. Only available on JDO 2.0+ or through a vendor-specific JdoDialect | attachCopyAll | {
"repo_name": "raedle/univis",
"path": "lib/springframework-1.2.8/src/org/springframework/orm/jdo/JdoOperations.java",
"license": "lgpl-2.1",
"size": 20055
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 2,226,213 |
return Container.getComp(GenLikesEntity.class);
}
public GenLikesEntity() {
super();
}
public GenLikesEntity(Long no) {
super();
this.no = no;
}
private Long no;
private Long knowledgeId;
private Integer likeClass;
private Integ... | return Container.getComp(GenLikesEntity.class); } public GenLikesEntity() { super(); } public GenLikesEntity(Long no) { super(); this.no = no; } private Long no; private Long knowledgeId; private Integer likeClass; private Integer insertUser; private Timestamp insertDatetime; private Integer updateUser; private Timesta... | /**
* Get instance from DI container.
* @return instance
*/ | Get instance from DI container | get | {
"repo_name": "support-project/knowledge",
"path": "src/main/java/org/support/project/knowledge/entity/gen/GenLikesEntity.java",
"license": "apache-2.0",
"size": 9399
} | [
"java.sql.Timestamp",
"org.support.project.di.Container"
] | import java.sql.Timestamp; import org.support.project.di.Container; | import java.sql.*; import org.support.project.di.*; | [
"java.sql",
"org.support.project"
] | java.sql; org.support.project; | 822,354 |
public Set<DependencyNode> subGraph(final Collection<DependencyNode> roots, final Map<ValueSpecification, Set<ValueRequirement>> terminals, final Set<ValueRequirement> missingRequirements) {
return subGraph(roots, terminals, missingRequirements, new HashMap<DependencyNode, NodeState>());
} | Set<DependencyNode> function(final Collection<DependencyNode> roots, final Map<ValueSpecification, Set<ValueRequirement>> terminals, final Set<ValueRequirement> missingRequirements) { return subGraph(roots, terminals, missingRequirements, new HashMap<DependencyNode, NodeState>()); } | /**
* Forms a subgraph of the given graph.
*
* @param roots the root nodes to process, not null
* @param terminals the terminal outputs to update, not null
* @param missingRequirements the structure that should receive any requirements that are ejected from the sub-graph, not null
* @return the new g... | Forms a subgraph of the given graph | subGraph | {
"repo_name": "jeorme/OG-Platform",
"path": "projects/OG-Engine/src/main/java/com/opengamma/engine/depgraph/impl/RootDiscardingSubgrapher.java",
"license": "apache-2.0",
"size": 9591
} | [
"com.opengamma.engine.depgraph.DependencyNode",
"com.opengamma.engine.value.ValueRequirement",
"com.opengamma.engine.value.ValueSpecification",
"java.util.Collection",
"java.util.HashMap",
"java.util.Map",
"java.util.Set"
] | import com.opengamma.engine.depgraph.DependencyNode; import com.opengamma.engine.value.ValueRequirement; import com.opengamma.engine.value.ValueSpecification; import java.util.Collection; import java.util.HashMap; import java.util.Map; import java.util.Set; | import com.opengamma.engine.depgraph.*; import com.opengamma.engine.value.*; import java.util.*; | [
"com.opengamma.engine",
"java.util"
] | com.opengamma.engine; java.util; | 2,906,703 |
public static @Nonnull User getUnknown() {
return getById(UNKNOWN_USERNAME, true);
}
/**
* Gets the {@link User} object by its id or full name.
*
* @param create If true, this method will never return null for valid input
* (by creating a new {@link User} object if... | static @Nonnull User function() { return getById(UNKNOWN_USERNAME, true); } /** * Gets the {@link User} object by its id or full name. * * @param create If true, this method will never return null for valid input * (by creating a new {@link User} object if none exists.) * If false, this method will return null if {@lin... | /**
* Gets the fallback "unknown" user instance.
* <p>
* This is used to avoid null {@link User} instance.
*/ | Gets the fallback "unknown" user instance. This is used to avoid null <code>User</code> instance | getUnknown | {
"repo_name": "recena/jenkins",
"path": "core/src/main/java/hudson/model/User.java",
"license": "mit",
"size": 45496
} | [
"java.util.Map",
"javax.annotation.Nonnull"
] | import java.util.Map; import javax.annotation.Nonnull; | import java.util.*; import javax.annotation.*; | [
"java.util",
"javax.annotation"
] | java.util; javax.annotation; | 1,404,288 |
@Override
public List<Object>[] generateRows(BoofCVImageContainer img) {
List<Object>[] result;
int[] histogram;
result = new List[1];
result[0] = new ArrayList<Object>();
if (img.getImage() instanceof ImageUInt8) {
histogram = new int[256];
ImageStatistics.histogram((ImageUInt... | List<Object>[] function(BoofCVImageContainer img) { List<Object>[] result; int[] histogram; result = new List[1]; result[0] = new ArrayList<Object>(); if (img.getImage() instanceof ImageUInt8) { histogram = new int[256]; ImageStatistics.histogram((ImageUInt8) img.getImage(), histogram); for (int value: histogram) resul... | /**
* Performs the actual feature generation.
*
* @param img the image to process
* @return the generated features
*/ | Performs the actual feature generation | generateRows | {
"repo_name": "waikato-datamining/adams-base",
"path": "adams-imaging-boofcv/src/main/java/adams/data/boofcv/features/Histogram.java",
"license": "gpl-3.0",
"size": 4290
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,451,730 |
public static int getOpacityFromColor(int color) {
int colorAlpha = color >>> 24;
if (colorAlpha == 255) {
return PixelFormat.OPAQUE;
} else if (colorAlpha == 0) {
return PixelFormat.TRANSPARENT;
} else {
return PixelFormat.TRANSLUCENT;
}
} | static int function(int color) { int colorAlpha = color >>> 24; if (colorAlpha == 255) { return PixelFormat.OPAQUE; } else if (colorAlpha == 0) { return PixelFormat.TRANSPARENT; } else { return PixelFormat.TRANSLUCENT; } } | /**
* Gets the opacity from a color. Inspired by Android ColorDrawable.
* @param color
* @return opacity expressed by one of PixelFormat constants
*/ | Gets the opacity from a color. Inspired by Android ColorDrawable | getOpacityFromColor | {
"repo_name": "wstczlt/fresco",
"path": "drawee/src/main/java/com/facebook/drawee/drawable/DrawableUtils.java",
"license": "bsd-3-clause",
"size": 3642
} | [
"android.graphics.PixelFormat"
] | import android.graphics.PixelFormat; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 205,634 |
public static Calendar getMyBirthday() {
Calendar myBirthday = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
myBirthday.set(Calendar.DAY_OF_MONTH, 20);
myBirthday.set(Calendar.MONTH, 5);
myBirthday.set(Calendar.YEAR, 1972);
myBirthday.set(Calendar.HOUR_OF_DAY, 2);
myBirthday.set(Calendar.MINUTE, 0);... | static Calendar function() { Calendar myBirthday = Calendar.getInstance(TimeZone.getTimeZone("UTC")); myBirthday.set(Calendar.DAY_OF_MONTH, 20); myBirthday.set(Calendar.MONTH, 5); myBirthday.set(Calendar.YEAR, 1972); myBirthday.set(Calendar.HOUR_OF_DAY, 2); myBirthday.set(Calendar.MINUTE, 0); myBirthday.set(Calendar.SE... | /**
* Returns a Calendar with my birthday date.
*
* @return A Calendar with my birthday date.
*/ | Returns a Calendar with my birthday date | getMyBirthday | {
"repo_name": "vaibhavbhatnagar/CrossoverProb",
"path": "src/uk/co/jemos/podam/test/utils/PodamTestUtils.java",
"license": "mit",
"size": 966
} | [
"java.util.Calendar",
"java.util.TimeZone"
] | import java.util.Calendar; import java.util.TimeZone; | import java.util.*; | [
"java.util"
] | java.util; | 27,752 |
boolean contains(@Nullable Object rowKey, @Nullable Object columnKey); | boolean contains(@Nullable Object rowKey, @Nullable Object columnKey); | /**
* Returns {@code true} if the table contains a mapping with the specified
* row and column keys.
*
* @param rowKey key of row to search for
* @param columnKey key of column to search for
*/ | Returns true if the table contains a mapping with the specified row and column keys | contains | {
"repo_name": "migue/voltdb",
"path": "third_party/java/src/com/google_voltpatches/common/collect/Table.java",
"license": "agpl-3.0",
"size": 10060
} | [
"javax.annotation_voltpatches.Nullable"
] | import javax.annotation_voltpatches.Nullable; | import javax.annotation_voltpatches.*; | [
"javax.annotation_voltpatches"
] | javax.annotation_voltpatches; | 472,767 |
public UnionOperator<T> union(DataSet<T> other) {
return new UnionOperator<>(this, other, Utils.getCallLocationName());
}
// --------------------------------------------------------------------------------------------
// Partitioning
// -----------------------------------------------------... | UnionOperator<T> function(DataSet<T> other) { return new UnionOperator<>(this, other, Utils.getCallLocationName()); } | /**
* Creates a union of this DataSet with an other DataSet. The other DataSet must be of the same
* data type.
*
* @param other The other DataSet which is unioned with the current DataSet.
* @return The resulting DataSet.
*/ | Creates a union of this DataSet with an other DataSet. The other DataSet must be of the same data type | union | {
"repo_name": "tillrohrmann/flink",
"path": "flink-java/src/main/java/org/apache/flink/api/java/DataSet.java",
"license": "apache-2.0",
"size": 87624
} | [
"org.apache.flink.api.java.operators.UnionOperator"
] | import org.apache.flink.api.java.operators.UnionOperator; | import org.apache.flink.api.java.operators.*; | [
"org.apache.flink"
] | org.apache.flink; | 2,165,738 |
public static void encodeUrl(String pString, String charset, Writer buffer)
throws UnsupportedEncodingException, IOException {
if ((pString == null) || (pString.length() == 0)) {
return;
}
encode(ALL_URL, pString.getBytes(charset), buffer);
}
| static void function(String pString, String charset, Writer buffer) throws UnsupportedEncodingException, IOException { if ((pString == null) (pString.length() == 0)) { return; } encode(ALL_URL, pString.getBytes(charset), buffer); } | /**
* Encodes a string into its URL safe form using the specified
* string character set. Unsafe characters are escaped.
*
* @param pString string to convert to a URL safe form
* @param charset the character set for pString
* @param buffer buffer to use to store output a (US-ASCII)
* @throws... | Encodes a string into its URL safe form using the specified string character set. Unsafe characters are escaped | encodeUrl | {
"repo_name": "appnativa/rare",
"path": "source/util/src/com/appnativa/util/URLEncoder.java",
"license": "gpl-3.0",
"size": 20316
} | [
"java.io.IOException",
"java.io.UnsupportedEncodingException",
"java.io.Writer"
] | import java.io.IOException; import java.io.UnsupportedEncodingException; import java.io.Writer; | import java.io.*; | [
"java.io"
] | java.io; | 680,054 |
GeneratedPropertyContainer filtergpcontainer(BeanItemContainer<Workflow> suitableWorkflows) {
// ONLY SHOW SPECIFIC COLUMNS IN GRID
GeneratedPropertyContainer gpcontainer = new GeneratedPropertyContainer(suitableWorkflows);
gpcontainer.removeContainerProperty("ID");
gpcontainer.removeContainerPropert... | GeneratedPropertyContainer filtergpcontainer(BeanItemContainer<Workflow> suitableWorkflows) { GeneratedPropertyContainer gpcontainer = new GeneratedPropertyContainer(suitableWorkflows); gpcontainer.removeContainerProperty("ID"); gpcontainer.removeContainerProperty(STR); gpcontainer.removeContainerProperty("data"); gpco... | /**
* filter grid columns
*
* @param suitableWorkflows
* @return
*/ | filter grid columns | filtergpcontainer | {
"repo_name": "qbicsoftware/qnavigator",
"path": "QBiCMainPortlet/src/de/uni_tuebingen/qbic/qbicmainportlet/WorkflowComponent.java",
"license": "gpl-3.0",
"size": 24335
} | [
"com.vaadin.data.util.BeanItemContainer",
"com.vaadin.data.util.GeneratedPropertyContainer"
] | import com.vaadin.data.util.BeanItemContainer; import com.vaadin.data.util.GeneratedPropertyContainer; | import com.vaadin.data.util.*; | [
"com.vaadin.data"
] | com.vaadin.data; | 140,520 |
byte[] tmpBytes;
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ObjectOutput out = null;
out = new ObjectOutputStream(bos);
out.writeObject(this);
tmpBytes = bos.toByteArray();
bos.close();
out.close();
return tmpBytes;
}
| byte[] tmpBytes; ByteArrayOutputStream bos = new ByteArrayOutputStream(); ObjectOutput out = null; out = new ObjectOutputStream(bos); out.writeObject(this); tmpBytes = bos.toByteArray(); bos.close(); out.close(); return tmpBytes; } | /**
* Write object. Converts a Passable Object into a byte array.
*
* @return the byte[]
* @throws IOException Signals that an I/O exception has occurred.
*/ | Write object. Converts a Passable Object into a byte array | writeObject | {
"repo_name": "BennyEvans/CardEncryption",
"path": "src/mentalpoker/Passable.java",
"license": "mit",
"size": 1818
} | [
"java.io.ByteArrayOutputStream",
"java.io.ObjectOutput",
"java.io.ObjectOutputStream"
] | import java.io.ByteArrayOutputStream; import java.io.ObjectOutput; import java.io.ObjectOutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,985,196 |
@Test
public void testBinaryTypeWithIdOfMarshallerHeader() throws Exception {
try (Ignite ignite = Ignition.start(Config.getServerConfiguration())) {
try (IgniteClient client = Ignition.startClient(new ClientConfiguration().setAddresses(Config.SERVER))) {
int typeId = GridBin... | void function() throws Exception { try (Ignite ignite = Ignition.start(Config.getServerConfiguration())) { try (IgniteClient client = Ignition.startClient(new ClientConfiguration().setAddresses(Config.SERVER))) { int typeId = GridBinaryMarshaller.OBJ; BinaryObjectImpl binObj = (BinaryObjectImpl)ignite.binary().builder(... | /**
* The purpose of this test is to check that message which begins with the same byte as marshaller header can
* be correctly unmarshalled.
*/ | The purpose of this test is to check that message which begins with the same byte as marshaller header can be correctly unmarshalled | testBinaryTypeWithIdOfMarshallerHeader | {
"repo_name": "ascherbakoff/ignite",
"path": "modules/core/src/test/java/org/apache/ignite/client/IgniteBinaryTest.java",
"license": "apache-2.0",
"size": 16203
} | [
"org.apache.ignite.Ignite",
"org.apache.ignite.Ignition",
"org.apache.ignite.binary.BinaryType",
"org.apache.ignite.configuration.ClientConfiguration",
"org.apache.ignite.internal.binary.BinaryObjectImpl",
"org.apache.ignite.internal.binary.GridBinaryMarshaller",
"org.junit.Assert"
] | import org.apache.ignite.Ignite; import org.apache.ignite.Ignition; import org.apache.ignite.binary.BinaryType; import org.apache.ignite.configuration.ClientConfiguration; import org.apache.ignite.internal.binary.BinaryObjectImpl; import org.apache.ignite.internal.binary.GridBinaryMarshaller; import org.junit.Assert; | import org.apache.ignite.*; import org.apache.ignite.binary.*; import org.apache.ignite.configuration.*; import org.apache.ignite.internal.binary.*; import org.junit.*; | [
"org.apache.ignite",
"org.junit"
] | org.apache.ignite; org.junit; | 2,884,261 |
private boolean updateNextHops(DestinationSet ds,
Map<DeviceId, Set<DeviceId>> newDstNextHops) {
DestinationSetNextObjectiveStoreKey key =
new DestinationSetNextObjectiveStoreKey(deviceId, ds);
NextNeighbors currNext = dsNextObjStore.get(key);
... | boolean function(DestinationSet ds, Map<DeviceId, Set<DeviceId>> newDstNextHops) { DestinationSetNextObjectiveStoreKey key = new DestinationSetNextObjectiveStoreKey(deviceId, ds); NextNeighbors currNext = dsNextObjStore.get(key); Map<DeviceId, Set<DeviceId>> currDstNextHops = currNext.dstNextHops(); boolean success = t... | /**
* Updates the DestinationSetNextObjectiveStore with any per-destination nexthops
* that are not already in the store for the given DestinationSet. Note that
* this method does not remove existing next hops for the destinations in the
* DestinationSet.
*
* @param ds the DestinationSet f... | Updates the DestinationSetNextObjectiveStore with any per-destination nexthops that are not already in the store for the given DestinationSet. Note that this method does not remove existing next hops for the destinations in the DestinationSet | updateNextHops | {
"repo_name": "kuujo/onos",
"path": "apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/grouphandler/DefaultGroupHandler.java",
"license": "apache-2.0",
"size": 73488
} | [
"com.google.common.collect.Sets",
"java.util.Map",
"java.util.Set",
"org.onosproject.net.DeviceId",
"org.onosproject.segmentrouting.storekey.DestinationSetNextObjectiveStoreKey"
] | import com.google.common.collect.Sets; import java.util.Map; import java.util.Set; import org.onosproject.net.DeviceId; import org.onosproject.segmentrouting.storekey.DestinationSetNextObjectiveStoreKey; | import com.google.common.collect.*; import java.util.*; import org.onosproject.net.*; import org.onosproject.segmentrouting.storekey.*; | [
"com.google.common",
"java.util",
"org.onosproject.net",
"org.onosproject.segmentrouting"
] | com.google.common; java.util; org.onosproject.net; org.onosproject.segmentrouting; | 193,866 |
@Override
protected void initialize() {
super.initialize();
m_Queue = new ArrayList();
} | void function() { super.initialize(); m_Queue = new ArrayList(); } | /**
* Initializes the members.
*/ | Initializes the members | initialize | {
"repo_name": "waikato-datamining/adams-base",
"path": "adams-imaging-boofcv/src/main/java/adams/flow/transformer/BoofCVFeatureGenerator.java",
"license": "gpl-3.0",
"size": 10200
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 626,380 |
@Deprecated
public void clipPath(int windingRule) throws IOException
{
if (inTextMode)
{
throw new IllegalStateException("Error: clipPath is not allowed within a text block.");
}
if (windingRule == PathIterator.WIND_NON_ZERO)
{
writeOperator("W... | void function(int windingRule) throws IOException { if (inTextMode) { throw new IllegalStateException(STR); } if (windingRule == PathIterator.WIND_NON_ZERO) { writeOperator("W"); } else if (windingRule == PathIterator.WIND_EVEN_ODD) { writeOperator("W*"); } else { throw new IllegalArgumentException(STR); } writeOperato... | /**
* Clip path.
*
* @param windingRule the winding rule to be used for clipping
* @throws IOException If there is an error while clipping the path.
* @throws IllegalStateException If the method was called within a text block.
* @deprecated Use {@link #clip()} or {@link #clipEvenOdd} inst... | Clip path | clipPath | {
"repo_name": "mdamt/pdfbox",
"path": "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageContentStream.java",
"license": "apache-2.0",
"size": 73880
} | [
"java.awt.geom.PathIterator",
"java.io.IOException"
] | import java.awt.geom.PathIterator; import java.io.IOException; | import java.awt.geom.*; import java.io.*; | [
"java.awt",
"java.io"
] | java.awt; java.io; | 97,439 |
public synchronized Map getEnvironment() throws Fault {
if (env == null) {
// reconstitute environment
// this may result in a Fault, which is okay
reload();
}
return PropertyArray.getProperties(env);
} | synchronized Map function() throws Fault { if (env == null) { reload(); } return PropertyArray.getProperties(env); } | /**
* Get a copy of the environment that this object has stored.
* @return a copy of the environment that this object has stored
* @throws TestResult.Fault if there is a problem
* recreating data from the results file.
* @see #setEnvironment
*/ | Get a copy of the environment that this object has stored | getEnvironment | {
"repo_name": "Distrotech/icedtea6-1.12",
"path": "src/jtreg/com/sun/javatest/TestResult.java",
"license": "gpl-2.0",
"size": 86577
} | [
"com.sun.javatest.util.PropertyArray",
"java.util.Map"
] | import com.sun.javatest.util.PropertyArray; import java.util.Map; | import com.sun.javatest.util.*; import java.util.*; | [
"com.sun.javatest",
"java.util"
] | com.sun.javatest; java.util; | 2,326,090 |
public List<FEConstant> getElements(){
return item.getElements();
}
//getters giving HLAPI object
| List<FEConstant> function(){ return item.getElements(); } | /**
* Return the encapsulate Low Level API object.
*/ | Return the encapsulate Low Level API object | getElements | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-SNNet/src/fr/lip6/move/pnml/symmetricnet/cyclicEnumerations/hlapi/CyclicEnumerationHLAPI.java",
"license": "epl-1.0",
"size": 14995
} | [
"fr.lip6.move.pnml.symmetricnet.finiteEnumerations.FEConstant",
"java.util.List"
] | import fr.lip6.move.pnml.symmetricnet.finiteEnumerations.FEConstant; import java.util.List; | import fr.lip6.move.pnml.symmetricnet.*; import java.util.*; | [
"fr.lip6.move",
"java.util"
] | fr.lip6.move; java.util; | 2,360,965 |
@Test
public void verifySaneDirectBufferAllocations() throws Exception {
createIndex("test");
int estimatedBytesSize = scaledRandomIntBetween(ByteSizeValue.parseBytesSizeValue("1.1mb").bytesAsInt(), ByteSizeValue.parseBytesSizeValue("1.5mb").bytesAsInt());
byte[] data = new byte[estimat... | void function() throws Exception { createIndex("test"); int estimatedBytesSize = scaledRandomIntBetween(ByteSizeValue.parseBytesSizeValue("1.1mb").bytesAsInt(), ByteSizeValue.parseBytesSizeValue("1.5mb").bytesAsInt()); byte[] data = new byte[estimatedBytesSize]; getRandom().nextBytes(data); ByteArrayOutputStream docOut... | /**
* This test validates that using large data sets (large docs + large API requests) don't
* cause a large direct byte buffer to be allocated internally in the sun.nio buffer cache.
* <p/>
* See {@link org.elasticsearch.common.netty.NettyUtils#DEFAULT_GATHERING} for more info.
*/ | This test validates that using large data sets (large docs + large API requests) don't cause a large direct byte buffer to be allocated internally in the sun.nio buffer cache. See <code>org.elasticsearch.common.netty.NettyUtils#DEFAULT_GATHERING</code> for more info | verifySaneDirectBufferAllocations | {
"repo_name": "anti-social/elasticsearch",
"path": "src/test/java/org/elasticsearch/network/DirectBufferNetworkTests.java",
"license": "apache-2.0",
"size": 6439
} | [
"java.io.ByteArrayOutputStream",
"org.elasticsearch.action.index.IndexRequestBuilder",
"org.elasticsearch.common.unit.ByteSizeValue",
"org.elasticsearch.common.xcontent.XContentBuilder",
"org.elasticsearch.common.xcontent.XContentFactory",
"org.elasticsearch.test.hamcrest.ElasticsearchAssertions"
] | import java.io.ByteArrayOutputStream; import org.elasticsearch.action.index.IndexRequestBuilder; import org.elasticsearch.common.unit.ByteSizeValue; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.test.hamcrest.ElasticsearchAss... | import java.io.*; import org.elasticsearch.action.index.*; import org.elasticsearch.common.unit.*; import org.elasticsearch.common.xcontent.*; import org.elasticsearch.test.hamcrest.*; | [
"java.io",
"org.elasticsearch.action",
"org.elasticsearch.common",
"org.elasticsearch.test"
] | java.io; org.elasticsearch.action; org.elasticsearch.common; org.elasticsearch.test; | 43,348 |
T set(ISqlTable table, String columnName); | T set(ISqlTable table, String columnName); | /**
* Set the value of a column.
*
* @param table The table the specified column is in.
* @param columnName The name of the column.
*
* @throws IllegalStateException if the statement is finalized.
*/ | Set the value of a column | set | {
"repo_name": "JCThePants/NucleusFramework",
"path": "src/com/jcwhatever/nucleus/providers/sql/statement/mixins/ISqlDataSetter.java",
"license": "mit",
"size": 1956
} | [
"com.jcwhatever.nucleus.providers.sql.ISqlTable"
] | import com.jcwhatever.nucleus.providers.sql.ISqlTable; | import com.jcwhatever.nucleus.providers.sql.*; | [
"com.jcwhatever.nucleus"
] | com.jcwhatever.nucleus; | 2,209,784 |
public Path resolvePath(String uri)
{
if (uri.startsWith("file:"))
return _app.getRootDirectory().lookup(uri);
else if (uri.indexOf("://") >= 0)
return null;
String realPath = _app.getRealPath(uri);
if (realPath != null)
return _app.getRootDirectory().lookup(realPath);
... | Path function(String uri) { if (uri.startsWith("file:")) return _app.getRootDirectory().lookup(uri); else if (uri.indexOf(": return null; String realPath = _app.getRealPath(uri); if (realPath != null) return _app.getRootDirectory().lookup(realPath); else return null; } | /**
* Resolves a path.
*/ | Resolves a path | resolvePath | {
"repo_name": "WelcomeHUME/svn-caucho-com-resin",
"path": "modules/resin/src/com/caucho/jsp/AppResourceManager.java",
"license": "gpl-2.0",
"size": 1713
} | [
"com.caucho.vfs.Path"
] | import com.caucho.vfs.Path; | import com.caucho.vfs.*; | [
"com.caucho.vfs"
] | com.caucho.vfs; | 1,138,360 |
private synchronized void initFileTransactionsForDirectory(final String path) {
if (resourceManagers.get(path) == null) {
resourceManagers.put(path, new FileResourceManager(path, path + "_dirty", false, new CommonsLoggingLogger(log)));
try {
resourceManagers.get(p... | synchronized void function(final String path) { if (resourceManagers.get(path) == null) { resourceManagers.put(path, new FileResourceManager(path, path + STR, false, new CommonsLoggingLogger(log))); try { resourceManagers.get(path).start(); } catch (final ResourceManagerSystemException ex) { throw new TaskModelPersiste... | /**
* Create a new file transaction manager for the given directory.
*
* @param path
* directory
*/ | Create a new file transaction manager for the given directory | initFileTransactionsForDirectory | {
"repo_name": "smee/elateXam",
"path": "examServer/src/main/java/de/thorstenberger/examServer/dao/AbstractTransactionalFileIO.java",
"license": "gpl-3.0",
"size": 5635
} | [
"de.thorstenberger.taskmodel.TaskModelPersistenceException",
"org.apache.commons.transaction.file.FileResourceManager",
"org.apache.commons.transaction.file.ResourceManagerSystemException",
"org.apache.commons.transaction.util.CommonsLoggingLogger"
] | import de.thorstenberger.taskmodel.TaskModelPersistenceException; import org.apache.commons.transaction.file.FileResourceManager; import org.apache.commons.transaction.file.ResourceManagerSystemException; import org.apache.commons.transaction.util.CommonsLoggingLogger; | import de.thorstenberger.taskmodel.*; import org.apache.commons.transaction.file.*; import org.apache.commons.transaction.util.*; | [
"de.thorstenberger.taskmodel",
"org.apache.commons"
] | de.thorstenberger.taskmodel; org.apache.commons; | 2,707,856 |
@SuppressWarnings("unchecked")
protected <T extends View> T addOrReplaceViewByType(ViewGroup layout, Context context, Class<? extends T> valueType) {
T t = null;
if (layout.getChildCount() > 1) {
layout.removeAllViews();
}
if (layout.getChildCount(... | @SuppressWarnings(STR) <T extends View> T function(ViewGroup layout, Context context, Class<? extends T> valueType) { T t = null; if (layout.getChildCount() > 1) { layout.removeAllViews(); } if (layout.getChildCount() == 1) { if (layout.getChildAt(0).getClass().equals(valueType)) { t = (T) layout.getChildAt(0); } else ... | /**
* This method check if a view of type T already exist inside the layout,
* return it in that case, or create it in other case.
*
* @param layout
* @param context
* @param valueType
* @param <T>
* @return
*/ | This method check if a view of type T already exist inside the layout, return it in that case, or create it in other case | addOrReplaceViewByType | {
"repo_name": "resourcepool/dashboard",
"path": "dashboard-tv/app/src/main/java/io/resourcepool/dashboard/ui/displayables/AbstractDisplayable.java",
"license": "apache-2.0",
"size": 4536
} | [
"android.content.Context",
"android.view.View",
"android.view.ViewGroup",
"java.lang.reflect.InvocationTargetException"
] | import android.content.Context; import android.view.View; import android.view.ViewGroup; import java.lang.reflect.InvocationTargetException; | import android.content.*; import android.view.*; import java.lang.reflect.*; | [
"android.content",
"android.view",
"java.lang"
] | android.content; android.view; java.lang; | 1,068,385 |
@POST
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public Response createFlowClassifier(InputStream stream) {
try {
ObjectNode jsonTree = (ObjectNode) mapper().readTree(stream);
JsonNode flow = jsonTree.get("flow_classifier");
F... | @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response function(InputStream stream) { try { ObjectNode jsonTree = (ObjectNode) mapper().readTree(stream); JsonNode flow = jsonTree.get(STR); FlowClassifier flowClassifier = codec(FlowClassifier.class).decode((ObjectNode) flow, this); Boolean ... | /**
* Creates and stores a new flow classifier.
*
* @param stream
* flow classifier from JSON
* @return status of the request - CREATED if the JSON is correct,
* BAD_REQUEST if the JSON is invalid
*/ | Creates and stores a new flow classifier | createFlowClassifier | {
"repo_name": "sdnwiselab/onos",
"path": "apps/vtn/vtnweb/src/main/java/org/onosproject/vtnweb/resources/FlowClassifierWebResource.java",
"license": "apache-2.0",
"size": 6369
} | [
"com.fasterxml.jackson.databind.JsonNode",
"com.fasterxml.jackson.databind.node.ObjectNode",
"java.io.IOException",
"java.io.InputStream",
"javax.ws.rs.Consumes",
"javax.ws.rs.Produces",
"javax.ws.rs.core.MediaType",
"javax.ws.rs.core.Response",
"org.onlab.util.Tools",
"org.onosproject.vtnrsc.Flow... | import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.ObjectNode; import java.io.IOException; import java.io.InputStream; import javax.ws.rs.Consumes; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.onlab.util.Tools; impor... | import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.node.*; import java.io.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.onlab.util.*; import org.onosproject.vtnrsc.*; import org.onosproject.vtnrsc.flowclassifier.*; | [
"com.fasterxml.jackson",
"java.io",
"javax.ws",
"org.onlab.util",
"org.onosproject.vtnrsc"
] | com.fasterxml.jackson; java.io; javax.ws; org.onlab.util; org.onosproject.vtnrsc; | 1,678,733 |
EAttribute getAnimateType_SkipContent(); | EAttribute getAnimateType_SkipContent(); | /**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateType#isSkipContent <em>Skip Content</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Skip Content</em>'.
* @see org.w3._2001.smil20.language.Anim... | Returns the meta object for the attribute '<code>org.w3._2001.smil20.language.AnimateType#isSkipContent Skip Content</code>'. | getAnimateType_SkipContent | {
"repo_name": "geotools/geotools",
"path": "modules/ogc/net.opengis.wmts/src/org/w3/_2001/smil20/language/LanguagePackage.java",
"license": "lgpl-2.1",
"size": 137841
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,284,569 |
public ValidatorType<T> id(String id)
{
childNode.attribute("id", id);
return this;
} | ValidatorType<T> function(String id) { childNode.attribute("id", id); return this; } | /**
* Sets the <code>id</code> attribute
* @param id the value for the attribute <code>id</code>
* @return the current instance of <code>ValidatorType<T></code>
*/ | Sets the <code>id</code> attribute | id | {
"repo_name": "forge/javaee-descriptors",
"path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/jsptaglibrary20/ValidatorTypeImpl.java",
"license": "epl-1.0",
"size": 7710
} | [
"org.jboss.shrinkwrap.descriptor.api.jsptaglibrary20.ValidatorType"
] | import org.jboss.shrinkwrap.descriptor.api.jsptaglibrary20.ValidatorType; | import org.jboss.shrinkwrap.descriptor.api.jsptaglibrary20.*; | [
"org.jboss.shrinkwrap"
] | org.jboss.shrinkwrap; | 1,944,434 |
public VirtualMachineImageInner withAutomaticOSUpgradeProperties(AutomaticOSUpgradeProperties automaticOSUpgradeProperties) {
this.automaticOSUpgradeProperties = automaticOSUpgradeProperties;
return this;
} | VirtualMachineImageInner function(AutomaticOSUpgradeProperties automaticOSUpgradeProperties) { this.automaticOSUpgradeProperties = automaticOSUpgradeProperties; return this; } | /**
* Set the automaticOSUpgradeProperties value.
*
* @param automaticOSUpgradeProperties the automaticOSUpgradeProperties value to set
* @return the VirtualMachineImageInner object itself.
*/ | Set the automaticOSUpgradeProperties value | withAutomaticOSUpgradeProperties | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/compute/mgmt-v2019_11_01/src/main/java/com/microsoft/azure/management/compute/v2019_11_01/implementation/VirtualMachineImageInner.java",
"license": "mit",
"size": 4497
} | [
"com.microsoft.azure.management.compute.v2019_11_01.AutomaticOSUpgradeProperties"
] | import com.microsoft.azure.management.compute.v2019_11_01.AutomaticOSUpgradeProperties; | import com.microsoft.azure.management.compute.v2019_11_01.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 768,121 |
public static String getParameter(String key) {
Map<String, String[]> parameters = ParametersHelper.convertParameters(
PathinfoHolder.getInstance().getPathInfo().getParamater(), dis
.getReq().getParameterMap());
return ParametersHelper.stringArrayHandle(parameters.get(key));
}
| static String function(String key) { Map<String, String[]> parameters = ParametersHelper.convertParameters( PathinfoHolder.getInstance().getPathInfo().getParamater(), dis .getReq().getParameterMap()); return ParametersHelper.stringArrayHandle(parameters.get(key)); } | /**
* get a parameter from GET or POST action.
*
* @param key
* @return
* @author Yoio<Yoio@3cto.net>
*/ | get a parameter from GET or POST action | getParameter | {
"repo_name": "Yoio/YoioJava",
"path": "src/com/yoiojava/util/WebUtils.java",
"license": "apache-2.0",
"size": 9543
} | [
"com.yoiojava.globle.func.ParametersHelper",
"com.yoiojava.router.dispatcher.PathinfoHolder",
"java.util.Map"
] | import com.yoiojava.globle.func.ParametersHelper; import com.yoiojava.router.dispatcher.PathinfoHolder; import java.util.Map; | import com.yoiojava.globle.func.*; import com.yoiojava.router.dispatcher.*; import java.util.*; | [
"com.yoiojava.globle",
"com.yoiojava.router",
"java.util"
] | com.yoiojava.globle; com.yoiojava.router; java.util; | 954,334 |
@Override
public String getInputFilePath(Map<String, Object> properties)
{
String path = (String) properties.get(SparkPropertiesConstants.FS_INPUT_FILE_PATH);
if (path == null || path.isEmpty())
{
throw new KunderaException(
"Please set the path of inp... | String function(Map<String, Object> properties) { String path = (String) properties.get(SparkPropertiesConstants.FS_INPUT_FILE_PATH); if (path == null path.isEmpty()) { throw new KunderaException( STR + "\"STR\"."); } return path; } | /**
* Gets the input file path.
*
* @param properties
* the properties
* @return the input file path
*/ | Gets the input file path | getInputFilePath | {
"repo_name": "ravisund/Kundera",
"path": "src/kundera-spark/spark-core/src/main/java/com/impetus/spark/client/FSClient.java",
"license": "apache-2.0",
"size": 7985
} | [
"com.impetus.kundera.KunderaException",
"com.impetus.spark.constants.SparkPropertiesConstants",
"java.util.Map"
] | import com.impetus.kundera.KunderaException; import com.impetus.spark.constants.SparkPropertiesConstants; import java.util.Map; | import com.impetus.kundera.*; import com.impetus.spark.constants.*; import java.util.*; | [
"com.impetus.kundera",
"com.impetus.spark",
"java.util"
] | com.impetus.kundera; com.impetus.spark; java.util; | 743,953 |
public DisksClient getDisks() {
return this.disks;
}
private final SnapshotsClient snapshots; | DisksClient function() { return this.disks; } private final SnapshotsClient snapshots; | /**
* Gets the DisksClient object to access its operations.
*
* @return the DisksClient object.
*/ | Gets the DisksClient object to access its operations | getDisks | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/ComputeManagementClientImpl.java",
"license": "mit",
"size": 31289
} | [
"com.azure.resourcemanager.compute.fluent.DisksClient",
"com.azure.resourcemanager.compute.fluent.SnapshotsClient"
] | import com.azure.resourcemanager.compute.fluent.DisksClient; import com.azure.resourcemanager.compute.fluent.SnapshotsClient; | import com.azure.resourcemanager.compute.fluent.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 719,661 |
public IReportRunnable openReportDesign( String report, Map options )
throws EngineException
{
File file = new File( report );
if ( !file.exists( ) )
{
throw new EngineException( MessageConstants.DESIGN_FILE_NOT_FOUND_EXCEPTION,
report );
}
try
{
InputStream in = new FileInputStream( file... | IReportRunnable function( String report, Map options ) throws EngineException { File file = new File( report ); if ( !file.exists( ) ) { throw new EngineException( MessageConstants.DESIGN_FILE_NOT_FOUND_EXCEPTION, report ); } try { InputStream in = new FileInputStream( file ); String systemId = report; try { systemId =... | /**
* Open report design.
*
* @param report
* @param options
* the config options in the report design
* @return the report runnable
* @throws EngineException
*/ | Open report design | openReportDesign | {
"repo_name": "sguan-actuate/birt",
"path": "viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/service/ReportEngineService.java",
"license": "epl-1.0",
"size": 67902
} | [
"java.io.File",
"java.io.FileInputStream",
"java.io.FileNotFoundException",
"java.io.InputStream",
"java.net.MalformedURLException",
"java.util.Map",
"org.eclipse.birt.report.engine.api.EngineException",
"org.eclipse.birt.report.engine.api.IReportRunnable",
"org.eclipse.birt.report.engine.i18n.Messa... | import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.InputStream; import java.net.MalformedURLException; import java.util.Map; import org.eclipse.birt.report.engine.api.EngineException; import org.eclipse.birt.report.engine.api.IReportRunnable; import org.eclipse.bir... | import java.io.*; import java.net.*; import java.util.*; import org.eclipse.birt.report.engine.api.*; import org.eclipse.birt.report.engine.i18n.*; | [
"java.io",
"java.net",
"java.util",
"org.eclipse.birt"
] | java.io; java.net; java.util; org.eclipse.birt; | 853,346 |
public long add(T point) {
return add(point, false, null);
}
/**
* Adds a point to this node if it is a leaf node or one of its
* children if not. If the node that ultimately holds the new point is
* loaded beyond its capacity, it will be partitioned.
* <p/>
* Partitioning ... | long function(T point) { return add(point, false, null); } /** * Adds a point to this node if it is a leaf node or one of its * children if not. If the node that ultimately holds the new point is * loaded beyond its capacity, it will be partitioned. * <p/> * Partitioning may optionally be deferred, in which case it is ... | /**
* Adds a point to this node if it is a leaf node or one of its children
* if not. If the node that ultimately holds the new point is loaded
* beyond its capacity, it will be partitioned.
*
* @param point the point to add to this node or one of its children
* @return {@code true} if thi... | Adds a point to this node if it is a leaf node or one of its children if not. If the node that ultimately holds the new point is loaded beyond its capacity, it will be partitioned | add | {
"repo_name": "CameronTolooee/Mendel",
"path": "src/mendel/vptree/VPNode.java",
"license": "bsd-2-clause",
"size": 32744
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 467,513 |
public Result startSession(String studyId, String email, String token) {
Study study = studyService.getStudy(studyId);
return ok(views.html.startSession.render(ASSETS_HOST, ASSETS_BUILD, study.getName(), study.getIdentifier()));
} | Result function(String studyId, String email, String token) { Study study = studyService.getStudy(studyId); return ok(views.html.startSession.render(ASSETS_HOST, ASSETS_BUILD, study.getName(), study.getIdentifier())); } | /**
* If this page is loaded, it is because the mobile client did not intercept the
* email sign in link. Show an error message and keeps the link valid so the user
* can try again on a phone.
*/ | If this page is loaded, it is because the mobile client did not intercept the email sign in link. Show an error message and keeps the link valid so the user can try again on a phone | startSession | {
"repo_name": "Sage-Bionetworks/BridgePF",
"path": "app/org/sagebionetworks/bridge/play/controllers/ApplicationController.java",
"license": "apache-2.0",
"size": 4963
} | [
"org.sagebionetworks.bridge.models.studies.Study"
] | import org.sagebionetworks.bridge.models.studies.Study; | import org.sagebionetworks.bridge.models.studies.*; | [
"org.sagebionetworks.bridge"
] | org.sagebionetworks.bridge; | 1,678,824 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<SettingListInner>> listWithResponseAsync(String resourceGroupName, String workspaceName) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<SettingListInner>> function(String resourceGroupName, String workspaceName) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (this.client.getSubscriptionId() == null) { return Mono .error( new IllegalArgume... | /**
* List of all the settings.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param workspaceName The name of the workspace.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if ... | List of all the settings | listWithResponseAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductSettingsClientImpl.java",
"license": "mit",
"size": 37763
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.FluxUtil",
"com.azure.resourcemanager.securityinsights.fluent.models.SettingListInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.securityinsights.fluent.models.SettingListInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.securityinsights.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 740,051 |
protected void addDefaultParameters(List methods, DefaultArgsAction action) {
for (Object next : methods) {
MethodNode method = (MethodNode) next;
if (method.hasDefaultValue()) {
addDefaultParameters(action, method);
}
}
} | void function(List methods, DefaultArgsAction action) { for (Object next : methods) { MethodNode method = (MethodNode) next; if (method.hasDefaultValue()) { addDefaultParameters(action, method); } } } | /**
* Creates a new helper method for each combination of default parameter expressions
*/ | Creates a new helper method for each combination of default parameter expressions | addDefaultParameters | {
"repo_name": "russel/incubator-groovy",
"path": "src/main/java/org/codehaus/groovy/classgen/Verifier.java",
"license": "apache-2.0",
"size": 75655
} | [
"java.util.List",
"org.codehaus.groovy.ast.MethodNode"
] | import java.util.List; import org.codehaus.groovy.ast.MethodNode; | import java.util.*; import org.codehaus.groovy.ast.*; | [
"java.util",
"org.codehaus.groovy"
] | java.util; org.codehaus.groovy; | 2,557,927 |
public String createCacheId(PrimaryKey pk,PrimaryKeyMap pkm)
throws CacheException;
}
/*
*
* $Log: CacheIdManager.java,v $
* Revision 1.1 2004/06/28 22:08:46 gmartone
* Initial revision (task 80421 Enanchement DCS)
*
*
| String function(PrimaryKey pk,PrimaryKeyMap pkm) throws CacheException; } /* * * $Log: CacheIdManager.java,v $ * Revision 1.1 2004/06/28 22:08:46 gmartone * Initial revision (task 80421 Enanchement DCS) * * | /**
*
* Creates id cache for an object.
*
* Value of cache id is created on value of primary key
* specified in pk parameter.
*
* @param pk PrimaryKey
* @param pkm PrimaryKeyMap
* @return String cache id
* @throws CacheException
*
*/ | Creates id cache for an object. Value of cache id is created on value of primary key specified in pk parameter | createCacheId | {
"repo_name": "kcsl/immutability-benchmark",
"path": "benchmark-applications/reiminfer-oopsla-2012/source/JdbF/src/org/jdbf/engine/caching/CacheIdManager.java",
"license": "mit",
"size": 2468
} | [
"org.jdbf.engine.basic.PrimaryKey",
"org.jdbf.engine.mapping.PrimaryKeyMap"
] | import org.jdbf.engine.basic.PrimaryKey; import org.jdbf.engine.mapping.PrimaryKeyMap; | import org.jdbf.engine.basic.*; import org.jdbf.engine.mapping.*; | [
"org.jdbf.engine"
] | org.jdbf.engine; | 1,371,577 |
public synchronized ActionListener[] getActionListeners() {
return (ActionListener[])registeredActionListeners.toArray(new ActionListener[this.registeredActionListeners.size()]);
} | synchronized ActionListener[] function() { return (ActionListener[])registeredActionListeners.toArray(new ActionListener[this.registeredActionListeners.size()]); } | /**
* Gets the action listeners.
*
* @return the action listeners
*/ | Gets the action listeners | getActionListeners | {
"repo_name": "acm-uiuc/Tacchi",
"path": "src/org/mt4j/components/visibleComponents/widgets/menus/MTGLButton.java",
"license": "gpl-2.0",
"size": 2475
} | [
"java.awt.event.ActionListener"
] | import java.awt.event.ActionListener; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 2,674,503 |
public static String readStringFromFile(final String path) {
StringBuffer sb = new StringBuffer();
try {
BufferedReader br = new BufferedReader(new FileReader(path));
while (br.ready()) {
sb.append(br.readLine());
sb.append(System.getProperty("line.separator"));
}
br.close();
} catch (IOExc... | static String function(final String path) { StringBuffer sb = new StringBuffer(); try { BufferedReader br = new BufferedReader(new FileReader(path)); while (br.ready()) { sb.append(br.readLine()); sb.append(System.getProperty(STR)); } br.close(); } catch (IOException e) { e.printStackTrace(); } return sb.toString(); } | /**
* This method reads a string from a textfile
*
* @param path
* A path to a file
* @return The contents of the file as string.
*/ | This method reads a string from a textfile | readStringFromFile | {
"repo_name": "deric/clusteval-parent",
"path": "wi-utils/src/main/java/de/wiwie/wiutils/file/FileUtils.java",
"license": "gpl-3.0",
"size": 3399
} | [
"java.io.BufferedReader",
"java.io.FileReader",
"java.io.IOException"
] | import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 801,484 |
public void setStream(ByteBuffer data) {
this.type = STREAM;
this.stream = data;
} | void function(ByteBuffer data) { this.type = STREAM; this.stream = data; } | /**
* set the stream of this object. It should have been
* a DICTIONARY before the call.
*
* @param data
* the data, as a ByteBuffer.
*/ | set the stream of this object. It should have been a DICTIONARY before the call | setStream | {
"repo_name": "Pixplicity/PDFrenderer",
"path": "src/com/sun/pdfview/PDFObject.java",
"license": "lgpl-2.1",
"size": 22732
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 326,878 |
public static FlagProperties getFlags(Email email){
FlagProperties fp = new FlagProperties();
String flagS = "false";
boolean read = false;
boolean replied = false;
boolean flagged = false;
boolean forwarded = false;
if (email != null... | static FlagProperties function(Email email){ FlagProperties fp = new FlagProperties(); String flagS = "false"; boolean read = false; boolean replied = false; boolean flagged = false; boolean forwarded = false; if (email != null) { flagS = (String)email.getRead().getPropertyValue(); if (flagS != null){ read = (Boolean.v... | /**
* returns an object with the flags: read, replied , flagged, forwarded.
*
* @param email Email
* @return FlagProperties
*
*/ | returns an object with the flags: read, replied , flagged, forwarded | getFlags | {
"repo_name": "accesstest3/cfunambol",
"path": "modules/email/email-core/src/main/java/com/funambol/email/util/Utility.java",
"license": "agpl-3.0",
"size": 53607
} | [
"com.funambol.email.model.FlagProperties",
"com.funambol.email.pdi.mail.Email"
] | import com.funambol.email.model.FlagProperties; import com.funambol.email.pdi.mail.Email; | import com.funambol.email.model.*; import com.funambol.email.pdi.mail.*; | [
"com.funambol.email"
] | com.funambol.email; | 1,496,452 |
@SuppressWarnings("FutureReturnValueIgnored")
void clientFaultInjection(boolean isFaultTolerant) throws KuduException {
KuduScanner scanner = harness.getClient().newScannerBuilder(table)
.setFaultTolerant(isFaultTolerant)
.batchSizeBytes(1)
.build();
try {
int rowCount = 0;
... | @SuppressWarnings(STR) void clientFaultInjection(boolean isFaultTolerant) throws KuduException { KuduScanner scanner = harness.getClient().newScannerBuilder(table) .setFaultTolerant(isFaultTolerant) .batchSizeBytes(1) .build(); try { int rowCount = 0; int loopCount = 0; if (scanner.hasMoreRows()) { loopCount++; RowResu... | /**
* Injecting failures (i.e. drop client connection) while scanning, to verify:
* both non-fault tolerant scanner and fault tolerant scanner will continue scan as expected.
*
* @param isFaultTolerant if true use fault-tolerant scanner, otherwise use non-fault-tolerant one
* @throws Exception
*/ | Injecting failures (i.e. drop client connection) while scanning, to verify: both non-fault tolerant scanner and fault tolerant scanner will continue scan as expected | clientFaultInjection | {
"repo_name": "helifu/kudu",
"path": "java/kudu-client/src/test/java/org/apache/kudu/client/ITScannerMultiTablet.java",
"license": "apache-2.0",
"size": 6702
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 762,840 |
public Dimension MaximumSize(){
return getMinimumSize();
}
| Dimension function(){ return getMinimumSize(); } | /**
* This method returns the preferred size.
* @return the 220 by 220 dimension
*/ | This method returns the preferred size | MaximumSize | {
"repo_name": "SOCR/HTML5_WebSite",
"path": "SOCR2.8/src/edu/uah/math/devices/RouletteWheel.java",
"license": "lgpl-3.0",
"size": 6546
} | [
"java.awt.Dimension"
] | import java.awt.Dimension; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,338,360 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.