method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
void setDispatchQueue(DispatchQueue queue);
void setDispatchQueue(DispatchQueue queue);
/** * Sets the dispatch queue used by the transport * * @param queue */
Sets the dispatch queue used by the transport
setDispatchQueue
{ "repo_name": "fusesource/hawtdispatch", "path": "hawtdispatch-transport/src/main/java/org/fusesource/hawtdispatch/transport/Transport.java", "license": "apache-2.0", "size": 4172 }
[ "org.fusesource.hawtdispatch.DispatchQueue" ]
import org.fusesource.hawtdispatch.DispatchQueue;
import org.fusesource.hawtdispatch.*;
[ "org.fusesource.hawtdispatch" ]
org.fusesource.hawtdispatch;
2,386,353
@Override public TransferResult<CFValue, CFStore> visitMethodInvocation( MethodInvocationNode node, TransferInput<CFValue, CFStore> in) { FormatterAnnotatedTypeFactory atypeFactory = (FormatterAnnotatedTypeFactory) analysis .getTypeFactory(); TransferResult<CFValue, C...
TransferResult<CFValue, CFStore> function( MethodInvocationNode node, TransferInput<CFValue, CFStore> in) { FormatterAnnotatedTypeFactory atypeFactory = (FormatterAnnotatedTypeFactory) analysis .getTypeFactory(); TransferResult<CFValue, CFStore> result = super.visitMethodInvocation(node, in); FormatterTreeUtil tu = aty...
/** * Makes it so that the {@link FormatUtil#asFormat} method returns * a correctly annotated String. */
Makes it so that the <code>FormatUtil#asFormat</code> method returns a correctly annotated String
visitMethodInvocation
{ "repo_name": "biddyweb/checker-framework", "path": "checker/src/org/checkerframework/checker/formatter/FormatterTransfer.java", "license": "gpl-2.0", "size": 2384 }
[ "javax.lang.model.element.AnnotationMirror", "org.checkerframework.checker.formatter.FormatterTreeUtil", "org.checkerframework.checker.formatter.qual.ConversionCategory", "org.checkerframework.dataflow.analysis.RegularTransferResult", "org.checkerframework.dataflow.analysis.TransferInput", "org.checkerfra...
import javax.lang.model.element.AnnotationMirror; import org.checkerframework.checker.formatter.FormatterTreeUtil; import org.checkerframework.checker.formatter.qual.ConversionCategory; import org.checkerframework.dataflow.analysis.RegularTransferResult; import org.checkerframework.dataflow.analysis.TransferInput; impo...
import javax.lang.model.element.*; import org.checkerframework.checker.formatter.*; import org.checkerframework.checker.formatter.qual.*; import org.checkerframework.dataflow.analysis.*; import org.checkerframework.dataflow.cfg.node.*; import org.checkerframework.framework.flow.*;
[ "javax.lang", "org.checkerframework.checker", "org.checkerframework.dataflow", "org.checkerframework.framework" ]
javax.lang; org.checkerframework.checker; org.checkerframework.dataflow; org.checkerframework.framework;
87,054
public void addSeries(TimePeriodValues series) { ParamChecks.nullNotPermitted(series, "series"); this.data.add(series); series.addChangeListener(this); fireDatasetChanged(); }
void function(TimePeriodValues series) { ParamChecks.nullNotPermitted(series, STR); this.data.add(series); series.addChangeListener(this); fireDatasetChanged(); }
/** * Adds a series to the collection. A * {@link org.jfree.data.general.DatasetChangeEvent} is sent to all * registered listeners. * * @param series the time series. */
Adds a series to the collection. A <code>org.jfree.data.general.DatasetChangeEvent</code> is sent to all registered listeners
addSeries
{ "repo_name": "hongliangpan/manydesigns.cn", "path": "trunk/portofino-chart/jfreechat.src/org/jfree/data/time/TimePeriodValuesCollection.java", "license": "lgpl-3.0", "size": 16313 }
[ "org.jfree.chart.util.ParamChecks" ]
import org.jfree.chart.util.ParamChecks;
import org.jfree.chart.util.*;
[ "org.jfree.chart" ]
org.jfree.chart;
2,823,900
public AffineTransform getTransform() { if (transform == null) { transform = new AffineTransform(); } return transform; }
AffineTransform function() { if (transform == null) { transform = new AffineTransform(); } return transform; }
/** * Get the current AffineTransform. * * @return the current transform */
Get the current AffineTransform
getTransform
{ "repo_name": "pellcorp/fop", "path": "src/java/org/apache/fop/util/AbstractPaintingState.java", "license": "apache-2.0", "size": 15378 }
[ "java.awt.geom.AffineTransform" ]
import java.awt.geom.AffineTransform;
import java.awt.geom.*;
[ "java.awt" ]
java.awt;
687,447
@Around("isConfigEnabled() && (pointCut() || pointCutAll())") public Object log(ProceedingJoinPoint point) throws Throwable { long start = System.currentTimeMillis(); MethodSignature signature = (MethodSignature) point.getSignature(); Object result = point.proceed(); String[] arg...
@Around(STR) Object function(ProceedingJoinPoint point) throws Throwable { long start = System.currentTimeMillis(); MethodSignature signature = (MethodSignature) point.getSignature(); Object result = point.proceed(); String[] args = signature.getParameterNames(); String argString; StringBuilder stringBuilder = new Stri...
/** * If the pointcuts results true, this method is invoked every time a method satisfies the * criteria given in the pointcut. * * @param point The JoinPoint before method execution * @return result of method execution * @throws Throwable */
If the pointcuts results true, this method is invoked every time a method satisfies the criteria given in the pointcut
log
{ "repo_name": "pubudu538/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.keymgt/src/main/java/org/wso2/carbon/apimgt/keymgt/MethodTimeLogger.java", "license": "apache-2.0", "size": 5465 }
[ "org.aspectj.lang.ProceedingJoinPoint", "org.aspectj.lang.annotation.Around", "org.aspectj.lang.reflect.MethodSignature" ]
import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.reflect.MethodSignature;
import org.aspectj.lang.*; import org.aspectj.lang.annotation.*; import org.aspectj.lang.reflect.*;
[ "org.aspectj.lang" ]
org.aspectj.lang;
1,991,268
public PlanTableEntry min() { return planTableEntries.stream() .min(Comparator.comparingLong(PlanTableEntry::getEstimatedCardinality)) .orElseThrow(NoSuchElementException::new); }
PlanTableEntry function() { return planTableEntries.stream() .min(Comparator.comparingLong(PlanTableEntry::getEstimatedCardinality)) .orElseThrow(NoSuchElementException::new); }
/** * Returns the entry that represents the query plan with the minimum among all plans stored in * this table. * * @return query plan with minimum cost */
Returns the entry that represents the query plan with the minimum among all plans stored in this table
min
{ "repo_name": "galpha/gradoop", "path": "gradoop-flink/src/main/java/org/gradoop/flink/model/impl/operators/matching/single/cypher/planning/plantable/PlanTable.java", "license": "apache-2.0", "size": 2919 }
[ "java.util.Comparator", "java.util.NoSuchElementException" ]
import java.util.Comparator; import java.util.NoSuchElementException;
import java.util.*;
[ "java.util" ]
java.util;
280,908
private static boolean areInSameHourWindow(Date actual, Date other) { return timeDifference(actual, other) < TimeUnit.HOURS.toMillis(1); }
static boolean function(Date actual, Date other) { return timeDifference(actual, other) < TimeUnit.HOURS.toMillis(1); }
/** * Returns true if both date are in the same year, month and day of month, hour, minute and second, false otherwise. * @param actual the actual date. expected not be null * @param other the other date. expected not be null * @return true if both date are in the same year, month and day of month, hour, mi...
Returns true if both date are in the same year, month and day of month, hour, minute and second, false otherwise
areInSameHourWindow
{ "repo_name": "hazendaz/assertj-core", "path": "src/main/java/org/assertj/core/internal/Dates.java", "license": "apache-2.0", "size": 39823 }
[ "java.util.Date", "java.util.concurrent.TimeUnit", "org.assertj.core.util.DateUtil" ]
import java.util.Date; import java.util.concurrent.TimeUnit; import org.assertj.core.util.DateUtil;
import java.util.*; import java.util.concurrent.*; import org.assertj.core.util.*;
[ "java.util", "org.assertj.core" ]
java.util; org.assertj.core;
2,697,401
public static String closeAllAndShutdown(String logDir, long timeOutMillis) throws IOException { String path = null; final VoltTrace tracer = s_tracer; if (tracer != null) { if (logDir != null) { path = dump(logDir); } s_tracer = null; ...
static String function(String logDir, long timeOutMillis) throws IOException { String path = null; final VoltTrace tracer = s_tracer; if (tracer != null) { if (logDir != null) { path = dump(logDir); } s_tracer = null; if (timeOutMillis >= 0) { try { tracer.m_writerThread.shutdownNow(); tracer.m_writerThread.awaitTermin...
/** * Close all open files and wait for shutdown. * @param logDir The directory to write the trace events to, null to skip writing to file. * @param timeOutMillis Timeout in milliseconds. Negative to not wait * @return The path to the trace file if written, or null if a write is already...
Close all open files and wait for shutdown
closeAllAndShutdown
{ "repo_name": "deerwalk/voltdb", "path": "src/frontend/org/voltdb/utils/VoltTrace.java", "license": "agpl-3.0", "size": 21536 }
[ "java.io.IOException", "java.util.concurrent.TimeUnit" ]
import java.io.IOException; import java.util.concurrent.TimeUnit;
import java.io.*; import java.util.concurrent.*;
[ "java.io", "java.util" ]
java.io; java.util;
881,281
protected void sendFyiForNewUnorderedItems(PurchaseOrderDocument po){ List<AdHocRoutePerson> fyiList = createFyiFiscalOfficerListForNewUnorderedItems(po); String annotation = "Notification of New Unordered Items for Purchase Order" + po.getPurapDocumentIdentifier() + "(document id " + po.getDocumen...
void function(PurchaseOrderDocument po){ List<AdHocRoutePerson> fyiList = createFyiFiscalOfficerListForNewUnorderedItems(po); String annotation = STR + po.getPurapDocumentIdentifier() + STR + po.getDocumentNumber() + ")"; String responsibilityNote = STR; for(AdHocRoutePerson adHocPerson: fyiList){ try{ po.appSpecificRo...
/** * Sends an FYI to fiscal officers for new unordered items. * * @param po */
Sends an FYI to fiscal officers for new unordered items
sendFyiForNewUnorderedItems
{ "repo_name": "Ariah-Group/Finance", "path": "af_webapp/src/main/java/org/kuali/kfs/module/purap/document/service/impl/PurchaseOrderServiceImpl.java", "license": "apache-2.0", "size": 122012 }
[ "java.util.List", "org.kuali.kfs.module.purap.document.PurchaseOrderDocument", "org.kuali.rice.kew.api.exception.WorkflowException", "org.kuali.rice.krad.bo.AdHocRoutePerson" ]
import java.util.List; import org.kuali.kfs.module.purap.document.PurchaseOrderDocument; import org.kuali.rice.kew.api.exception.WorkflowException; import org.kuali.rice.krad.bo.AdHocRoutePerson;
import java.util.*; import org.kuali.kfs.module.purap.document.*; import org.kuali.rice.kew.api.exception.*; import org.kuali.rice.krad.bo.*;
[ "java.util", "org.kuali.kfs", "org.kuali.rice" ]
java.util; org.kuali.kfs; org.kuali.rice;
958,532
public String execute( WikiContext context, String classname, Map< String, String > params ) throws PluginException { if( !m_pluginsEnabled ) { return ""; } ResourceBundle rb = Preferences.getBundle( context, WikiPlugin.CORE_PLUGINS_RESOURCEBUNDLE ); boolean debug = Text...
String function( WikiContext context, String classname, Map< String, String > params ) throws PluginException { if( !m_pluginsEnabled ) { return STRPlugin 'STR' not compatible with this version of JSPWikiSTRPlugin failed while executing:STRplugin.error.failedSTRplugin.error.notawikiplugin" ), classname ), e ); } }
/** * Executes a plugin class in the given context. * <P>Used to be private, but is public since 1.9.21. * * @param context The current WikiContext. * @param classname The name of the class. Can also be a * shortened version without the package name, since the class name is searched ...
Executes a plugin class in the given context. Used to be private, but is public since 1.9.21
execute
{ "repo_name": "tateshitah/jspwiki", "path": "jspwiki-war/src/main/java/org/apache/wiki/plugin/DefaultPluginManager.java", "license": "apache-2.0", "size": 30256 }
[ "java.util.Map", "org.apache.wiki.WikiContext", "org.apache.wiki.api.exceptions.PluginException" ]
import java.util.Map; import org.apache.wiki.WikiContext; import org.apache.wiki.api.exceptions.PluginException;
import java.util.*; import org.apache.wiki.*; import org.apache.wiki.api.exceptions.*;
[ "java.util", "org.apache.wiki" ]
java.util; org.apache.wiki;
2,660,147
public void attackEntityWithRangedAttack(EntityLivingBase target, float distanceFactor) { if (!this.isDrinkingPotion()) { double d0 = target.posY + (double)target.getEyeHeight() - 1.100000023841858D; double d1 = target.posX + target.motionX - this.posX; double...
void function(EntityLivingBase target, float distanceFactor) { if (!this.isDrinkingPotion()) { double d0 = target.posY + (double)target.getEyeHeight() - 1.100000023841858D; double d1 = target.posX + target.motionX - this.posX; double d2 = d0 - this.posY; double d3 = target.posZ + target.motionZ - this.posZ; float f = M...
/** * Attack the specified entity using a ranged attack. */
Attack the specified entity using a ranged attack
attackEntityWithRangedAttack
{ "repo_name": "TheGreatAndPowerfulWeegee/wipunknown", "path": "build/tmp/recompileMc/sources/net/minecraft/entity/monster/EntityWitch.java", "license": "gpl-3.0", "size": 11040 }
[ "net.minecraft.entity.EntityLivingBase", "net.minecraft.entity.player.EntityPlayer", "net.minecraft.entity.projectile.EntityPotion", "net.minecraft.init.Items", "net.minecraft.init.MobEffects", "net.minecraft.init.PotionTypes", "net.minecraft.init.SoundEvents", "net.minecraft.item.ItemStack", "net.m...
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.projectile.EntityPotion; import net.minecraft.init.Items; import net.minecraft.init.MobEffects; import net.minecraft.init.PotionTypes; import net.minecraft.init.SoundEvents; import net.minecraft.it...
import net.minecraft.entity.*; import net.minecraft.entity.player.*; import net.minecraft.entity.projectile.*; import net.minecraft.init.*; import net.minecraft.item.*; import net.minecraft.potion.*; import net.minecraft.util.math.*;
[ "net.minecraft.entity", "net.minecraft.init", "net.minecraft.item", "net.minecraft.potion", "net.minecraft.util" ]
net.minecraft.entity; net.minecraft.init; net.minecraft.item; net.minecraft.potion; net.minecraft.util;
2,058,223
@Override public Paint getPaint() { return this.paint; }
Paint function() { return this.paint; }
/** * Returns the paint used to draw or fill shapes (or text). The default * value is {@link Color#BLACK}. * * @return The paint (never {@code null}). * @see #setPaint(java.awt.Paint) */
Returns the paint used to draw or fill shapes (or text). The default value is <code>Color#BLACK</code>
getPaint
{ "repo_name": "informatik-mannheim/Moduro-Toolbox", "path": "src/main/java/de/hs/mannheim/modUro/controller/diagram/fx/FXGraphics2D.java", "license": "apache-2.0", "size": 60103 }
[ "java.awt.Paint" ]
import java.awt.Paint;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,997,042
protected List<ApiTemplate> getConversionTemplates() { return templateManager.getConversionTemplates(); }
List<ApiTemplate> function() { return templateManager.getConversionTemplates(); }
/** * Fetch conversion template queries from the template manager. This is in a separate method * so we can override and easily use a custom list of templates for testing. * @return a list of conversion templates */
Fetch conversion template queries from the template manager. This is in a separate method so we can override and easily use a custom list of templates for testing
getConversionTemplates
{ "repo_name": "drhee/toxoMine", "path": "intermine/api/main/src/org/intermine/api/bag/BagQueryRunner.java", "license": "lgpl-2.1", "size": 21788 }
[ "java.util.List", "org.intermine.api.template.ApiTemplate" ]
import java.util.List; import org.intermine.api.template.ApiTemplate;
import java.util.*; import org.intermine.api.template.*;
[ "java.util", "org.intermine.api" ]
java.util; org.intermine.api;
2,633,811
public KeyNamePair getKeyNamePair() { return new KeyNamePair(get_ID(), String.valueOf(getM_DistributionRun_ID())); }
KeyNamePair function() { return new KeyNamePair(get_ID(), String.valueOf(getM_DistributionRun_ID())); }
/** Get Record ID/ColumnName @return ID/ColumnName pair */
Get Record ID/ColumnName
getKeyNamePair
{ "repo_name": "pplatek/adempiere", "path": "base/src/org/compiere/model/X_M_DistributionRunLine.java", "license": "gpl-2.0", "size": 8241 }
[ "org.compiere.util.KeyNamePair" ]
import org.compiere.util.KeyNamePair;
import org.compiere.util.*;
[ "org.compiere.util" ]
org.compiere.util;
415,600
private void checkEscaping( String templateText, List<String> strings, String directiveVersion, Function<String, List<String>> lexer, List<String> expectedTokens) { int numStrings = strings.size(); assertTrue(directiveVersion, numStrings != 0); for (int i = 0; i < numStrings; i += 2) { S...
void function( String templateText, List<String> strings, String directiveVersion, Function<String, List<String>> lexer, List<String> expectedTokens) { int numStrings = strings.size(); assertTrue(directiveVersion, numStrings != 0); for (int i = 0; i < numStrings; i += 2) { String unescaped = strings.get(i); String esca...
/** * Does some simple template substitution, and checks that string, comment, * tag, and other token boundaries do not differ based on the string that was * escaped. */
Does some simple template substitution, and checks that string, comment, tag, and other token boundaries do not differ based on the string that was escaped
checkEscaping
{ "repo_name": "viqueen/closure-templates", "path": "java/tests/com/google/template/soy/shared/restricted/EscapingConventionsTest.java", "license": "apache-2.0", "size": 22265 }
[ "com.google.common.base.Function", "java.util.List", "junit.framework.AssertionFailedError" ]
import com.google.common.base.Function; import java.util.List; import junit.framework.AssertionFailedError;
import com.google.common.base.*; import java.util.*; import junit.framework.*;
[ "com.google.common", "java.util", "junit.framework" ]
com.google.common; java.util; junit.framework;
1,050,239
@Override public void setTransactionPostingDate(Date transactionPostingDate) { throw new UnsupportedOperationException(); }
void function(Date transactionPostingDate) { throw new UnsupportedOperationException(); }
/** * History does not track this field. * @see org.kuali.kfs.module.ld.businessobject.LedgerEntry#setTransactionPostingDate(java.sql.Date) */
History does not track this field
setTransactionPostingDate
{ "repo_name": "Ariah-Group/Finance", "path": "af_webapp/src/main/java/org/kuali/kfs/gl/businessobject/EntryHistory.java", "license": "apache-2.0", "size": 14409 }
[ "java.sql.Date" ]
import java.sql.Date;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,781,185
public boolean peerSendsBadReplies(Hash peer) { PeerProfile profile = getProfile(peer); if (profile != null && profile.getIsExpandedDB()) { RateStat invalidReplyRateStat = profile.getDBHistory().getInvalidReplyRate(); Rate invalidReplyRate = invalidReplyRateStat.getRate(30*60...
boolean function(Hash peer) { PeerProfile profile = getProfile(peer); if (profile != null && profile.getIsExpandedDB()) { RateStat invalidReplyRateStat = profile.getDBHistory().getInvalidReplyRate(); Rate invalidReplyRate = invalidReplyRateStat.getRate(30*60*1000l); if ( (invalidReplyRate.getCurrentTotalValue() > MAX_B...
/** * Does the given peer send us bad replies - either invalid store messages * (expired, corrupt, etc) or unreachable replies (pointing towards routers * that don't exist). * */
Does the given peer send us bad replies - either invalid store messages (expired, corrupt, etc) or unreachable replies (pointing towards routers that don't exist)
peerSendsBadReplies
{ "repo_name": "NoYouShutup/CryptMeme", "path": "CryptMeme/router/java/src/net/i2p/router/peermanager/ProfileOrganizer.java", "license": "mit", "size": 68287 }
[ "net.i2p.data.Hash", "net.i2p.stat.Rate", "net.i2p.stat.RateStat" ]
import net.i2p.data.Hash; import net.i2p.stat.Rate; import net.i2p.stat.RateStat;
import net.i2p.data.*; import net.i2p.stat.*;
[ "net.i2p.data", "net.i2p.stat" ]
net.i2p.data; net.i2p.stat;
637,372
public BigInteger getQ() { return this.q; }
BigInteger function() { return this.q; }
/** * Returns the sub-prime <code>q</code>. * @return the sub-prime <code>q</code>. */
Returns the sub-prime <code>q</code>
getQ
{ "repo_name": "Skywalker-11/spongycastle", "path": "prov/src/main/java/org/spongycastle/jce/spec/GOST3410PrivateKeySpec.java", "license": "mit", "size": 1442 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
2,133,400
public boolean checkLevel(Level recordLevel, int value) { if (checkLevel(recordLevel)) { if (value == 0) { return checkLevel(Level.FINEST); } else { return true; } } return false; } // ~--- get methods ----------------------------------------------------------
boolean function(Level recordLevel, int value) { if (checkLevel(recordLevel)) { if (value == 0) { return checkLevel(Level.FINEST); } else { return true; } } return false; }
/** * Method description * * * @param recordLevel * @param value * @return * * */
Method description
checkLevel
{ "repo_name": "cgvarela/tigase-server", "path": "src/main/java/tigase/stats/StatisticsList.java", "license": "agpl-3.0", "size": 11848 }
[ "java.util.logging.Level" ]
import java.util.logging.Level;
import java.util.logging.*;
[ "java.util" ]
java.util;
482,088
@VisibleForTesting Iterable<Path> getClasspathEntries() { ImmutableSet.Builder<Path> classpathEntries = ImmutableSet.builder(); classpathEntries.addAll(gwtModuleJars); for (BuildRule dep : getDeclaredDeps()) { if (!(dep instanceof JavaLibrary)) { continue; } JavaLibrary javaLi...
Iterable<Path> getClasspathEntries() { ImmutableSet.Builder<Path> classpathEntries = ImmutableSet.builder(); classpathEntries.addAll(gwtModuleJars); for (BuildRule dep : getDeclaredDeps()) { if (!(dep instanceof JavaLibrary)) { continue; } JavaLibrary javaLibrary = (JavaLibrary) dep; for (Path path : javaLibrary.getOut...
/** * The classpath entries needed to run {@code com.google.gwt.dev.Compiler} to build the module * specified by {@link #modules}. */
The classpath entries needed to run com.google.gwt.dev.Compiler to build the module specified by <code>#modules</code>
getClasspathEntries
{ "repo_name": "raviagarwal7/buck", "path": "src/com/facebook/buck/gwt/GwtBinary.java", "license": "apache-2.0", "size": 7646 }
[ "com.facebook.buck.jvm.java.JavaLibrary", "com.facebook.buck.rules.BuildRule", "com.google.common.collect.ImmutableSet", "java.nio.file.Path" ]
import com.facebook.buck.jvm.java.JavaLibrary; import com.facebook.buck.rules.BuildRule; import com.google.common.collect.ImmutableSet; import java.nio.file.Path;
import com.facebook.buck.jvm.java.*; import com.facebook.buck.rules.*; import com.google.common.collect.*; import java.nio.file.*;
[ "com.facebook.buck", "com.google.common", "java.nio" ]
com.facebook.buck; com.google.common; java.nio;
1,199,077
@Override public boolean isNatural() { return true; } } private class IntegerListMutator implements EvolutionaryOperator<List<Integer>> { private final NumberGenerator<Probability> probability; IntegerListMutator(Probability mutationProbability) { probability = new ConstantGener...
boolean function() { return true; } } private class IntegerListMutator implements EvolutionaryOperator<List<Integer>> { private final NumberGenerator<Probability> probability; IntegerListMutator(Probability mutationProbability) { probability = new ConstantGenerator<>(mutationProbability); }
/** * Natural means best-fit individual has the highest fitness score. */
Natural means best-fit individual has the highest fitness score
isNatural
{ "repo_name": "sladeware/groningen", "path": "src/main/java/org/arbeitspferde/groningen/hypothesizer/Hypothesizer.java", "license": "apache-2.0", "size": 25332 }
[ "java.util.List", "org.uncommons.maths.number.ConstantGenerator", "org.uncommons.maths.number.NumberGenerator", "org.uncommons.maths.random.Probability", "org.uncommons.watchmaker.framework.EvolutionaryOperator" ]
import java.util.List; import org.uncommons.maths.number.ConstantGenerator; import org.uncommons.maths.number.NumberGenerator; import org.uncommons.maths.random.Probability; import org.uncommons.watchmaker.framework.EvolutionaryOperator;
import java.util.*; import org.uncommons.maths.number.*; import org.uncommons.maths.random.*; import org.uncommons.watchmaker.framework.*;
[ "java.util", "org.uncommons.maths", "org.uncommons.watchmaker" ]
java.util; org.uncommons.maths; org.uncommons.watchmaker;
2,805,926
private static String readXls(String fileName) throws IOException { log.info("Parsing MS excel " + fileName); String data = ""; FileInputStream fis = null; try { fis = new FileInputStream(fileName); // creates an excel book. HSSFWorkbook workbook = new HSSFWorkbook(fis); int numberOfSheets = work...
static String function(String fileName) throws IOException { log.info(STR + fileName); String data = STR\n\nSTR:\nSTRWe couldn't access to the file STRWe couldn't access to the file " + fileName); } return data; }
/** * Reads a classic MS Excel file. * * @param fileName * the name of the file to process. * @return the file content in a String. * @throws IOException * if we couldn't access the file. */
Reads a classic MS Excel file
readXls
{ "repo_name": "AngelesBroullon/AnaklusmosGD-Java", "path": "AnaklusmosWS/AnaklusmosWS/src/main/java/anaklusmos/indexSystem/fileHandlers/impl/ClassicOfficeHandler.java", "license": "gpl-2.0", "size": 5987 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,477,023
containerWidth = container.getWidth(); containerHeight = container.getHeight(); diameter = (104 - (circleSize * 8)); diameter = (diameter * HitObject.getXMultiplier()); // convert from Osupixels (640x480) int diameterInt = (int) diameter; followRadius = diameter / 2 * 3f; // slider ball if (GameImag...
containerWidth = container.getWidth(); containerHeight = container.getHeight(); diameter = (104 - (circleSize * 8)); diameter = (diameter * HitObject.getXMultiplier()); int diameterInt = (int) diameter; followRadius = diameter / 2 * 3f; if (GameImage.SLIDER_BALL.hasBeatmapSkinImages() (!GameImage.SLIDER_BALL.hasBeatmap...
/** * Initializes the Slider data type with images and dimensions. * @param container the game container * @param circleSize the map's circleSize value * @param beatmap the associated beatmap */
Initializes the Slider data type with images and dimensions
init
{ "repo_name": "ScottSWu/opsu", "path": "src/itdelatrisu/opsu/objects/Slider.java", "license": "gpl-3.0", "size": 19480 }
[ "org.newdawn.slick.Color", "org.newdawn.slick.Image" ]
import org.newdawn.slick.Color; import org.newdawn.slick.Image;
import org.newdawn.slick.*;
[ "org.newdawn.slick" ]
org.newdawn.slick;
2,802,245
EAttribute getLiteralDataDomainType1_Default();
EAttribute getLiteralDataDomainType1_Default();
/** * Returns the meta object for the attribute '{@link net.opengis.wps20.LiteralDataDomainType1#isDefault <em>Default</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Default</em>'. * @see net.opengis.wps20.LiteralDataDomainType1#isDefault() * @see ...
Returns the meta object for the attribute '<code>net.opengis.wps20.LiteralDataDomainType1#isDefault Default</code>'.
getLiteralDataDomainType1_Default
{ "repo_name": "geotools/geotools", "path": "modules/ogc/net.opengis.wps/src/net/opengis/wps20/Wps20Package.java", "license": "lgpl-2.1", "size": 228745 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
173,229
@Test public void testAccessors() throws Exception { AtomixConsistentSetMultimap map = createResource("testFourMap"); //Populate for full map behavior tests allKeys.forEach(key -> { map.putAll(key, allValues) .thenAccept(result -> assertTrue(result)).join...
void function() throws Exception { AtomixConsistentSetMultimap map = createResource(STR); allKeys.forEach(key -> { map.putAll(key, allValues) .thenAccept(result -> assertTrue(result)).join(); }); map.size().thenAccept(result -> assertEquals(16, (int) result)).join(); allKeys.forEach(key -> { map.get(key).thenAccept(res...
/** * Tests the get, keySet, keys, values, and entries implementations as well * as a trivial test of the asMap functionality (throws error). * @throws Exception */
Tests the get, keySet, keys, values, and entries implementations as well as a trivial test of the asMap functionality (throws error)
testAccessors
{ "repo_name": "donNewtonAlpha/onos", "path": "core/store/primitives/src/test/java/org/onosproject/store/primitives/resources/impl/AtomixConsistentSetMultimapTest.java", "license": "apache-2.0", "size": 19288 }
[ "com.google.common.collect.Multiset", "com.google.common.collect.TreeMultiset", "java.util.Map", "org.apache.commons.collections.keyvalue.DefaultMapEntry", "org.junit.Assert" ]
import com.google.common.collect.Multiset; import com.google.common.collect.TreeMultiset; import java.util.Map; import org.apache.commons.collections.keyvalue.DefaultMapEntry; import org.junit.Assert;
import com.google.common.collect.*; import java.util.*; import org.apache.commons.collections.keyvalue.*; import org.junit.*;
[ "com.google.common", "java.util", "org.apache.commons", "org.junit" ]
com.google.common; java.util; org.apache.commons; org.junit;
2,098,028
public void setTweetDate(Date tweetDate) { this.tweetDate = tweetDate; }
void function(Date tweetDate) { this.tweetDate = tweetDate; }
/** * Sets the tweet date. * * @param tweetDate * the tweetDate to set */
Sets the tweet date
setTweetDate
{ "repo_name": "ravisund/Kundera", "path": "src/kundera-redis/src/test/java/com/impetus/client/entities/RedisEmbeddedUser.java", "license": "apache-2.0", "size": 3036 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
2,431,323
public void start() { if (anim != null && anim.listener != null) { try { anim.listener.onInterruptedByNewAnim(); } catch (Exception e) { TLog.w(TAG, "Error thrown by animation listener", e); } } ...
void function() { if (anim != null && anim.listener != null) { try { anim.listener.onInterruptedByNewAnim(); } catch (Exception e) { TLog.w(TAG, STR, e); } } int vxCenter = getPaddingLeft() + (getWidth() - getPaddingRight() - getPaddingLeft()) / 2; int vyCenter = getPaddingTop() + (getHeight() - getPaddingBottom() - ge...
/** * Starts the animation. */
Starts the animation
start
{ "repo_name": "vondear/RxTools", "path": "RxUI/src/main/java/com/tamsiree/rxui/view/scaleimage/RxScaleImageView.java", "license": "apache-2.0", "size": 131475 }
[ "android.graphics.PointF", "com.tamsiree.rxkit.TLog" ]
import android.graphics.PointF; import com.tamsiree.rxkit.TLog;
import android.graphics.*; import com.tamsiree.rxkit.*;
[ "android.graphics", "com.tamsiree.rxkit" ]
android.graphics; com.tamsiree.rxkit;
332,153
protected void postAllocateProcess(PurchasingAccountsPayableItemAsset selectedLineItem, List<PurchasingAccountsPayableItemAsset> allocateTargetLines, List<PurchasingAccountsPayableDocument> purApDocs, List<PurchasingAccountsPayableLineAssetAccount> newAccountList, boolean initiateFromBatch) { // add new ac...
void function(PurchasingAccountsPayableItemAsset selectedLineItem, List<PurchasingAccountsPayableItemAsset> allocateTargetLines, List<PurchasingAccountsPayableDocument> purApDocs, List<PurchasingAccountsPayableLineAssetAccount> newAccountList, boolean initiateFromBatch) { addNewAccountToItemList(newAccountList); update...
/** * Process after allocate. * * @param selectedLineItem * @param allocateTargetLines * @param purApDocs * @param newAccountList */
Process after allocate
postAllocateProcess
{ "repo_name": "ua-eas/ua-kfs-5.3", "path": "work/src/org/kuali/kfs/module/cab/document/service/impl/PurApLineServiceImpl.java", "license": "agpl-3.0", "size": 69120 }
[ "java.util.List", "org.kuali.kfs.module.cab.businessobject.PurchasingAccountsPayableDocument", "org.kuali.kfs.module.cab.businessobject.PurchasingAccountsPayableItemAsset", "org.kuali.kfs.module.cab.businessobject.PurchasingAccountsPayableLineAssetAccount", "org.kuali.rice.krad.util.ObjectUtils" ]
import java.util.List; import org.kuali.kfs.module.cab.businessobject.PurchasingAccountsPayableDocument; import org.kuali.kfs.module.cab.businessobject.PurchasingAccountsPayableItemAsset; import org.kuali.kfs.module.cab.businessobject.PurchasingAccountsPayableLineAssetAccount; import org.kuali.rice.krad.util.ObjectUtil...
import java.util.*; import org.kuali.kfs.module.cab.businessobject.*; import org.kuali.rice.krad.util.*;
[ "java.util", "org.kuali.kfs", "org.kuali.rice" ]
java.util; org.kuali.kfs; org.kuali.rice;
46,457
@Override public AccountDataBean register(String userID, String password, String fullname, String address, String email, String creditCard, BigDecimal openBalance) throws Exception { if (Log.doActionTrace()) { Log.trace("TradeAction:register", userID, password, fullname, addr...
AccountDataBean function(String userID, String password, String fullname, String address, String email, String creditCard, BigDecimal openBalance) throws Exception { if (Log.doActionTrace()) { Log.trace(STR, userID, password, fullname, address, email, creditCard, openBalance); } return trade.register(userID, password, ...
/** * Register a new Trade customer. Create a new user profile, user registry * entry, account with initial balance, and empty portfolio. * * @param userID * the new customer to register * @param password * the customers password * @param fullname ...
Register a new Trade customer. Create a new user profile, user registry entry, account with initial balance, and empty portfolio
register
{ "repo_name": "WASdev/sample.daytrader7", "path": "daytrader-ee7-ejb/src/main/java/com/ibm/websphere/samples/daytrader/TradeAction.java", "license": "apache-2.0", "size": 25424 }
[ "com.ibm.websphere.samples.daytrader.entities.AccountDataBean", "com.ibm.websphere.samples.daytrader.util.Log", "java.math.BigDecimal" ]
import com.ibm.websphere.samples.daytrader.entities.AccountDataBean; import com.ibm.websphere.samples.daytrader.util.Log; import java.math.BigDecimal;
import com.ibm.websphere.samples.daytrader.entities.*; import com.ibm.websphere.samples.daytrader.util.*; import java.math.*;
[ "com.ibm.websphere", "java.math" ]
com.ibm.websphere; java.math;
951,627
private Set<String> getFactoryClassNames(final RoundEnvironment roundEnv) { final Set<? extends Element> elements = roundEnv.getElementsAnnotatedWith(Factory.class); final Set<String> names = new HashSet<>(elements.size()); for (Element element : elements) { final Element enclosi...
Set<String> function(final RoundEnvironment roundEnv) { final Set<? extends Element> elements = roundEnv.getElementsAnnotatedWith(Factory.class); final Set<String> names = new HashSet<>(elements.size()); for (Element element : elements) { final Element enclosingElement = element.getEnclosingElement(); if (enclosingElem...
/** * Gets the fully-qualified names of all classes in the given environment that are annotated * with our @Factory annotation. * * @param roundEnv The environment to read elements from * @return A set of all class names that are annotated */
Gets the fully-qualified names of all classes in the given environment that are annotated with our @Factory annotation
getFactoryClassNames
{ "repo_name": "DMDirc/Annotations", "path": "src/com/dmdirc/util/annotations/factory/FactoryProcessor.java", "license": "mit", "size": 14757 }
[ "java.util.HashSet", "java.util.Set", "javax.annotation.processing.RoundEnvironment", "javax.lang.model.element.Element", "javax.lang.model.element.PackageElement", "javax.tools.Diagnostic" ]
import java.util.HashSet; import java.util.Set; import javax.annotation.processing.RoundEnvironment; import javax.lang.model.element.Element; import javax.lang.model.element.PackageElement; import javax.tools.Diagnostic;
import java.util.*; import javax.annotation.processing.*; import javax.lang.model.element.*; import javax.tools.*;
[ "java.util", "javax.annotation", "javax.lang", "javax.tools" ]
java.util; javax.annotation; javax.lang; javax.tools;
2,030,165
@Override public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { HttpSession session = request.getSession(); MainSessionController mainSessionCtrl = (MainSessionController) session .getAttribute(MainSessionController.MAIN_SESSION_CONT...
void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { HttpSession session = request.getSession(); MainSessionController mainSessionCtrl = (MainSessionController) session .getAttribute(MainSessionController.MAIN_SESSION_CONTROLLER_ATT); String view = request.getPa...
/** * servlet method for returning JSON format * @param request the http request * @param response the http response * @throws ServletException * @throws IOException */
servlet method for returning JSON format
doGet
{ "repo_name": "ebonnet/Silverpeas-Core", "path": "core-war/src/main/java/org/silverpeas/web/socialnetwork/newsFeed/servlets/NewsFeedJSONServlet.java", "license": "agpl-3.0", "size": 11772 }
[ "java.io.IOException", "java.io.PrintWriter", "java.util.Date", "java.util.LinkedHashMap", "java.util.List", "java.util.Map", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "javax.servlet.http.HttpSession", "org.silverpeas.cor...
import java.io.IOException; import java.io.PrintWriter; import java.util.Date; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSe...
import java.io.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; import org.silverpeas.core.socialnetwork.*; import org.silverpeas.core.socialnetwork.model.*; import org.silverpeas.core.util.*; import org.silverpeas.core.util.logging.*; import org.silverpeas.core.web.mvc.controller.*;
[ "java.io", "java.util", "javax.servlet", "org.silverpeas.core" ]
java.io; java.util; javax.servlet; org.silverpeas.core;
992,107
@Path("/flows/{flowAlias}/executions") @GET @NoCache @Produces(MediaType.APPLICATION_JSON) public Response getExecutions(@PathParam("flowAlias") String flowAlias) { auth.realm().requireViewRealm(); AuthenticationFlowModel flow = realm.getFlowByAlias(flowAlias); if (flow == n...
@Path(STR) @Produces(MediaType.APPLICATION_JSON) Response function(@PathParam(STR) String flowAlias) { auth.realm().requireViewRealm(); AuthenticationFlowModel flow = realm.getFlowByAlias(flowAlias); if (flow == null) { logger.debug(STR + flowAlias); return Response.status(NOT_FOUND).build(); } List<AuthenticationExecu...
/** * Get authentication executions for a flow * * @param flowAlias Flow alias */
Get authentication executions for a flow
getExecutions
{ "repo_name": "mhajas/keycloak", "path": "services/src/main/java/org/keycloak/services/resources/admin/AuthenticationManagementResource.java", "license": "apache-2.0", "size": 53043 }
[ "java.util.LinkedList", "java.util.List", "javax.ws.rs.Path", "javax.ws.rs.PathParam", "javax.ws.rs.Produces", "javax.ws.rs.core.MediaType", "javax.ws.rs.core.Response", "org.keycloak.models.AuthenticationFlowModel", "org.keycloak.representations.idm.AuthenticationExecutionInfoRepresentation" ]
import java.util.LinkedList; import java.util.List; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.keycloak.models.AuthenticationFlowModel; import org.keycloak.representations.idm.AuthenticationExecution...
import java.util.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.keycloak.models.*; import org.keycloak.representations.idm.*;
[ "java.util", "javax.ws", "org.keycloak.models", "org.keycloak.representations" ]
java.util; javax.ws; org.keycloak.models; org.keycloak.representations;
44,888
public void setPubAlias(KeyStoreAlias pubAlias) { this.pubAlias = pubAlias; }
void function(KeyStoreAlias pubAlias) { this.pubAlias = pubAlias; }
/** * sets the public key alias of the key stored in the keystore * * @param pubAlias - the new public key alias */
sets the public key alias of the key stored in the keystore
setPubAlias
{ "repo_name": "kevinott/crypto", "path": "org.jcryptool.visual.jctca/src/org/jcryptool/visual/jctca/CertificateClasses/CSR.java", "license": "epl-1.0", "size": 8249 }
[ "org.jcryptool.crypto.keystore.backend.KeyStoreAlias" ]
import org.jcryptool.crypto.keystore.backend.KeyStoreAlias;
import org.jcryptool.crypto.keystore.backend.*;
[ "org.jcryptool.crypto" ]
org.jcryptool.crypto;
113,100
void beforeObjectEntries(JsonGenerator gen) throws IOException, JsonGenerationException;
void beforeObjectEntries(JsonGenerator gen) throws IOException, JsonGenerationException;
/** * Method called after object start marker has been output, * and right before the field name of the first entry is * to be output. * It is <b>not</b> called for objects without entries. *<p> * Default handling does not output anything, but pretty-printer * is free to add any white...
Method called after object start marker has been output, and right before the field name of the first entry is to be output. It is not called for objects without entries. Default handling does not output anything, but pretty-printer is free to add any white space decoration
beforeObjectEntries
{ "repo_name": "wmarquesr/NoSQLProject", "path": "src/com/fasterxml/jackson/core/PrettyPrinter.java", "license": "gpl-3.0", "size": 6366 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
249,445
public YangString getRefEntityTagValue() throws JNCException { return (YangString)getValue("ref-entity-tag"); }
YangString function() throws JNCException { return (YangString)getValue(STR); }
/** * Gets the value for child leaf "ref-entity-tag". * @return The value of the leaf. */
Gets the value for child leaf "ref-entity-tag"
getRefEntityTagValue
{ "repo_name": "jnpr-shinma/yangfile", "path": "hitel/src/hctaEpc/mmeSgsn/statistics/umtsSm/SecondaryAct.java", "license": "apache-2.0", "size": 11402 }
[ "com.tailf.jnc.YangString" ]
import com.tailf.jnc.YangString;
import com.tailf.jnc.*;
[ "com.tailf.jnc" ]
com.tailf.jnc;
514,531
ReflectionTestUtils.setField(session, "messageProvider", messageProvider); ReflectionTestUtils.setField(session, "propertyGetter", propertyGetter); ReflectionTestUtils.setField(session, "jschLogger", jschLogger); ReflectionTestUtils.setField(session, "jsch", jsch); }
ReflectionTestUtils.setField(session, STR, messageProvider); ReflectionTestUtils.setField(session, STR, propertyGetter); ReflectionTestUtils.setField(session, STR, jschLogger); ReflectionTestUtils.setField(session, "jsch", jsch); }
/** * Inject Spring dependencies in to session. * * @param session * session to inject dependencies into. */
Inject Spring dependencies in to session
injectSpringDependencies
{ "repo_name": "athrane/pineapple", "path": "plugins/pineapple-ssh-plugin/src/test/java/com/alpha/testutils/ObjectMotherSshSession.java", "license": "gpl-3.0", "size": 4367 }
[ "org.springframework.test.util.ReflectionTestUtils" ]
import org.springframework.test.util.ReflectionTestUtils;
import org.springframework.test.util.*;
[ "org.springframework.test" ]
org.springframework.test;
218,144
private void createLibrary( final String fileName ) throws IOException { final String templateName = getLibraryTemplateName( ); IRunnableWithProgress op = new IRunnableWithProgress( ) {
void function( final String fileName ) throws IOException { final String templateName = getLibraryTemplateName( ); IRunnableWithProgress op = new IRunnableWithProgress( ) {
/** * Creates an library with the specified file name. * * @param fileName * the library's file name. * @throws IOException * if an I/O error occurs. */
Creates an library with the specified file name
createLibrary
{ "repo_name": "sguan-actuate/birt", "path": "UI/org.eclipse.birt.report.designer.ui.lib.explorer/src/org/eclipse/birt/report/designer/ui/lib/explorer/action/NewLibraryAction.java", "license": "epl-1.0", "size": 8234 }
[ "java.io.IOException", "org.eclipse.jface.operation.IRunnableWithProgress" ]
import java.io.IOException; import org.eclipse.jface.operation.IRunnableWithProgress;
import java.io.*; import org.eclipse.jface.operation.*;
[ "java.io", "org.eclipse.jface" ]
java.io; org.eclipse.jface;
2,901,683
void install(UpdateRetrievalResult retrievalResult);
void install(UpdateRetrievalResult retrievalResult);
/** * Installs the retrieved update for the given component. * * @param retrievalResult The result of the retrieval operation */
Installs the retrieved update for the given component
install
{ "repo_name": "csmith/DMDirc", "path": "src/main/java/com/dmdirc/updater/installing/UpdateInstallationStrategy.java", "license": "mit", "size": 2410 }
[ "com.dmdirc.updater.retrieving.UpdateRetrievalResult" ]
import com.dmdirc.updater.retrieving.UpdateRetrievalResult;
import com.dmdirc.updater.retrieving.*;
[ "com.dmdirc.updater" ]
com.dmdirc.updater;
316,551
public int getMaxColumnsInTable() throws SQLException { // hard limit is Integer.MAX_VALUE return 0; }
int function() throws SQLException { return 0; }
/** * Retrieves the maximum number of columns this database allows in * a table. <p> * * <!-- start release-specific documentation --> * <div class="ReleaseSpecificDocumentation"> * <h3>HSQLDB-Specific Information:</h3> <p> * * HSQLDB does not impose a "known" limit. The hard li...
Retrieves the maximum number of columns this database allows in a table. HSQLDB-Specific Information: HSQLDB does not impose a "known" limit. The hard limit is the maximum length of a Java array (java.lang.Integer.MAX_VALUE); this method always returns <code>0</code>.
getMaxColumnsInTable
{ "repo_name": "minghao7896321/canyin", "path": "hsqldb/src/org/hsqldb/jdbc/jdbcDatabaseMetaData.java", "license": "apache-2.0", "size": 237705 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,608,191
private void findReplacements(DeclarationParameter parameter, String starReferenceName, ArrayList<DeclarationParameter> newParameters) throws BlockFileException { String innerRef = starReferenceName.substring(1, starReferenceName.length() - 1); String[] parts = innerRef.split("\\.", -1); if (part...
void function(DeclarationParameter parameter, String starReferenceName, ArrayList<DeclarationParameter> newParameters) throws BlockFileException { String innerRef = starReferenceName.substring(1, starReferenceName.length() - 1); String[] parts = innerRef.split("\\.", -1); if (parts.length != 2) { throw new BlockFileExc...
/** * Finds the parameters a star reference resolves to and stores them in the * newParameters list * * @param parameter * the parameter being replaced. * @param starReferenceName * the value of the reference containing the star operator. * @param newParameters * a li...
Finds the parameters a star reference resolves to and stores them in the newParameters list
findReplacements
{ "repo_name": "vimaier/conqat", "path": "org.conqat.engine.core/src/org/conqat/engine/core/driver/specification/StarReferenceResolver.java", "license": "apache-2.0", "size": 7268 }
[ "java.util.ArrayList", "org.conqat.engine.core.driver.declaration.DeclarationOutput", "org.conqat.engine.core.driver.declaration.DeclarationParameter", "org.conqat.engine.core.driver.declaration.IDeclaration", "org.conqat.engine.core.driver.error.BlockFileException", "org.conqat.engine.core.driver.error.E...
import java.util.ArrayList; import org.conqat.engine.core.driver.declaration.DeclarationOutput; import org.conqat.engine.core.driver.declaration.DeclarationParameter; import org.conqat.engine.core.driver.declaration.IDeclaration; import org.conqat.engine.core.driver.error.BlockFileException; import org.conqat.engine.co...
import java.util.*; import org.conqat.engine.core.driver.declaration.*; import org.conqat.engine.core.driver.error.*;
[ "java.util", "org.conqat.engine" ]
java.util; org.conqat.engine;
215,725
Map<UUID, String> getTitles(@NotNull Collection<UUID> keys); /** * Used to retrieve a list of network entities. * <p> * To iterate over <em>all</em> entities you can use code like this: {@code PagingRequest req = * new PagingRequest(); PagingResponse<T> response; do { response = service.list(req); for ...
Map<UUID, String> getTitles(@NotNull Collection<UUID> keys); /** * Used to retrieve a list of network entities. * <p> * To iterate over <em>all</em> entities you can use code like this: {@code PagingRequest req = * new PagingRequest(); PagingResponse<T> response; do { response = service.list(req); for (T obj * : respon...
/** * Retrieves all titles for the requested entity keys in one go * * @param keys entity keys to get titles * @return pairs of entity key - entity title. */
Retrieves all titles for the requested entity keys in one go
getTitles
{ "repo_name": "gbif/gbif-api", "path": "src/main/java/org/gbif/api/service/registry/NetworkEntityService.java", "license": "apache-2.0", "size": 3803 }
[ "java.util.Collection", "java.util.Map", "javax.validation.constraints.NotNull", "org.gbif.api.model.common.paging.PagingResponse" ]
import java.util.Collection; import java.util.Map; import javax.validation.constraints.NotNull; import org.gbif.api.model.common.paging.PagingResponse;
import java.util.*; import javax.validation.constraints.*; import org.gbif.api.model.common.paging.*;
[ "java.util", "javax.validation", "org.gbif.api" ]
java.util; javax.validation; org.gbif.api;
129,223
public static HRegion createRegionAndWAL(final HRegionInfo info, final Path rootDir, final Configuration conf, final HTableDescriptor htd, boolean initialize) throws IOException { WAL wal = createWal(conf, rootDir, info); return HRegion.createHRegion(info, rootDir, conf, htd, wal, initialize); }
static HRegion function(final HRegionInfo info, final Path rootDir, final Configuration conf, final HTableDescriptor htd, boolean initialize) throws IOException { WAL wal = createWal(conf, rootDir, info); return HRegion.createHRegion(info, rootDir, conf, htd, wal, initialize); }
/** * Create a region with it's own WAL. Be sure to call * {@link HBaseTestingUtility#closeRegionAndWAL(HRegion)} to clean up all resources. */
Create a region with it's own WAL. Be sure to call <code>HBaseTestingUtility#closeRegionAndWAL(HRegion)</code> to clean up all resources
createRegionAndWAL
{ "repo_name": "juwi/hbase", "path": "hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java", "license": "apache-2.0", "size": 151512 }
[ "java.io.IOException", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.fs.Path", "org.apache.hadoop.hbase.regionserver.HRegion" ]
import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.regionserver.HRegion;
import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hbase.regionserver.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
95,149
if (stream != null) { try { MyLog.i(TAG, "Closing stream %s", stream); stream.close(); } catch (IOException x) { MyLog.i(TAG, "Stream close error, ignoring"); } } }
if (stream != null) { try { MyLog.i(TAG, STR, stream); stream.close(); } catch (IOException x) { MyLog.i(TAG, STR); } } }
/** * Safely closes a stream, eating IO exceptions * * @param stream * The stream to close, may be null */
Safely closes a stream, eating IO exceptions
closeStream
{ "repo_name": "kmansoft/tests", "path": "MobileRadioTest/src/org/kman/MobileRadioTest/net/StreamUtil.java", "license": "apache-2.0", "size": 3027 }
[ "java.io.IOException", "org.kman.MobileRadioTest" ]
import java.io.IOException; import org.kman.MobileRadioTest;
import java.io.*; import org.kman.*;
[ "java.io", "org.kman" ]
java.io; org.kman;
1,788,045
public void tearDown() { logger.log(Level.FINE, "in tearDown() method."); try { unexportListener(listener, true); } finally { super.tearDown(); } }
void function() { logger.log(Level.FINE, STR); try { unexportListener(listener, true); } finally { super.tearDown(); } }
/** Performs cleanup actions necessary to achieve a graceful exit of * the current QA test. * * Unexports the listener and then performs any remaining standard * cleanup duties. */
Performs cleanup actions necessary to achieve a graceful exit of the current QA test. Unexports the listener and then performs any remaining standard cleanup duties
tearDown
{ "repo_name": "cdegroot/river", "path": "qa/src/com/sun/jini/test/spec/lookupservice/test_set00/NotifyOnSrvcLeaseExpiration.java", "license": "apache-2.0", "size": 8374 }
[ "java.util.logging.Level" ]
import java.util.logging.Level;
import java.util.logging.*;
[ "java.util" ]
java.util;
2,505,041
public int getMetaFromState(IBlockState state) { int i = 0; i = i | ((EnumFacing)state.getValue(FACING)).getIndex(); if (state.getValue(TYPE) == BlockPistonExtension.EnumPistonType.STICKY) { i |= 8; } return i; }
int function(IBlockState state) { int i = 0; i = i ((EnumFacing)state.getValue(FACING)).getIndex(); if (state.getValue(TYPE) == BlockPistonExtension.EnumPistonType.STICKY) { i = 8; } return i; }
/** * Convert the BlockState into the correct metadata value */
Convert the BlockState into the correct metadata value
getMetaFromState
{ "repo_name": "TheGreatAndPowerfulWeegee/wipunknown", "path": "build/tmp/recompileMc/sources/net/minecraft/block/BlockPistonExtension.java", "license": "gpl-3.0", "size": 11977 }
[ "net.minecraft.block.state.IBlockState", "net.minecraft.util.EnumFacing" ]
import net.minecraft.block.state.IBlockState; import net.minecraft.util.EnumFacing;
import net.minecraft.block.state.*; import net.minecraft.util.*;
[ "net.minecraft.block", "net.minecraft.util" ]
net.minecraft.block; net.minecraft.util;
280,673
private void changeCalendarView(int viewId, GregorianCalendar date, AjaxRequestTarget target) { // set the current date so the panel will load the correct events period setCurrentDate(date); // set the appropriate view switchView(viewId); }
void function(int viewId, GregorianCalendar date, AjaxRequestTarget target) { setCurrentDate(date); switchView(viewId); }
/** * Sets the view to show. It does not actually change the view, see {@code switchView} for that. * @param viewId The ID of the view to show * @param date The date to show * @param target The Ajax target of the panel */
Sets the view to show. It does not actually change the view, see switchView for that
changeCalendarView
{ "repo_name": "google-code-export/webical", "path": "webical-core/src/main/java/org/webical/web/component/calendar/CalendarPanel.java", "license": "gpl-3.0", "size": 24381 }
[ "java.util.GregorianCalendar", "org.apache.wicket.ajax.AjaxRequestTarget" ]
import java.util.GregorianCalendar; import org.apache.wicket.ajax.AjaxRequestTarget;
import java.util.*; import org.apache.wicket.ajax.*;
[ "java.util", "org.apache.wicket" ]
java.util; org.apache.wicket;
2,769,893
public static List<DateTime> getDateTimes(DateTime start, DateTime end, ReadablePeriod p) { List<DateTime> dts = new ArrayList<>(); while (!start.isAfter(end)) { dts.add(start); start = start.plus(p); } return dts; }
static List<DateTime> function(DateTime start, DateTime end, ReadablePeriod p) { List<DateTime> dts = new ArrayList<>(); while (!start.isAfter(end)) { dts.add(start); start = start.plus(p); } return dts; }
/** * Get date time list * * @param start Start date time * @param end End date time * @param p Peroid * @return Date time list */
Get date time list
getDateTimes
{ "repo_name": "meteoinfo/meteoinfolib", "path": "src/org/meteoinfo/global/util/DateUtil.java", "license": "lgpl-3.0", "size": 13197 }
[ "java.util.ArrayList", "java.util.List", "org.joda.time.DateTime", "org.joda.time.ReadablePeriod" ]
import java.util.ArrayList; import java.util.List; import org.joda.time.DateTime; import org.joda.time.ReadablePeriod;
import java.util.*; import org.joda.time.*;
[ "java.util", "org.joda.time" ]
java.util; org.joda.time;
1,590,785
public boolean authenticate(Request request, HttpServletResponse response, LoginConfig config) throws IOException { // Have we already authenticated someone? Principal principal = request.getUserPrincipal(); //String ss...
boolean function(Request request, HttpServletResponse response, LoginConfig config) throws IOException { Principal principal = request.getUserPrincipal(); if (principal != null) { String ssoId = (String) request.getNote(Constants.REQ_SSOID_NOTE); if (ssoId != null) associate(ssoId, request.getSessionInternal(true)); re...
/** * Authenticate the user by checking for the existence of a certificate * chain, and optionally asking a trust manager to validate that we trust * this user. * * @param request Request we are processing * @param response Response we are creating * @param config Login configurati...
Authenticate the user by checking for the existence of a certificate chain, and optionally asking a trust manager to validate that we trust this user
authenticate
{ "repo_name": "benothman/jboss-web-nio2", "path": "java/org/apache/catalina/authenticator/SSLAuthenticator.java", "license": "lgpl-3.0", "size": 6534 }
[ "java.io.IOException", "java.security.Principal", "java.security.cert.X509Certificate", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.apache.catalina.connector.Request", "org.apache.catalina.deploy.LoginConfig" ]
import java.io.IOException; import java.security.Principal; import java.security.cert.X509Certificate; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.catalina.connector.Request; import org.apache.catalina.deploy.LoginConfig;
import java.io.*; import java.security.*; import java.security.cert.*; import javax.servlet.http.*; import org.apache.catalina.connector.*; import org.apache.catalina.deploy.*;
[ "java.io", "java.security", "javax.servlet", "org.apache.catalina" ]
java.io; java.security; javax.servlet; org.apache.catalina;
2,304,276
public IElasticQueryBuilder<DOCTYPE> withFilter(FilterBuilder filter);
IElasticQueryBuilder<DOCTYPE> function(FilterBuilder filter);
/** * Specifiy a custom filter * @return */
Specifiy a custom filter
withFilter
{ "repo_name": "bpatters/eservice", "path": "src/main/java/com/myl/eservice/common/elasticsearch/IElasticQueryBuilder.java", "license": "apache-2.0", "size": 2066 }
[ "org.elasticsearch.index.query.FilterBuilder" ]
import org.elasticsearch.index.query.FilterBuilder;
import org.elasticsearch.index.query.*;
[ "org.elasticsearch.index" ]
org.elasticsearch.index;
740,950
private static Iterable<MapMaker> allEntryTypeMakers() { List<MapMaker> result = newArrayList(allKeyValueStrengthMakers()); for (MapMaker maker : allKeyValueStrengthMakers()) { result.add(maker.maximumSize(SMALL_MAX_SIZE)); } for (MapMaker maker : allKeyValueStrengthMakers()) { result.add(...
static Iterable<MapMaker> function() { List<MapMaker> result = newArrayList(allKeyValueStrengthMakers()); for (MapMaker maker : allKeyValueStrengthMakers()) { result.add(maker.maximumSize(SMALL_MAX_SIZE)); } for (MapMaker maker : allKeyValueStrengthMakers()) { result.add(maker.expireAfterAccess(99999, SECONDS)); } for ...
/** * Returns an iterable containing all combinations of maximumSize, expireAfterAccess/Write, * weak/softKeys and weak/softValues. */
Returns an iterable containing all combinations of maximumSize, expireAfterAccess/Write, weak/softKeys and weak/softValues
allEntryTypeMakers
{ "repo_name": "mkeesey/guava-for-small-classpaths", "path": "guava-tests/test/com/google/common/collect/MapMakerInternalMapTest.java", "license": "apache-2.0", "size": 66383 }
[ "com.google.common.collect.Lists", "java.util.List" ]
import com.google.common.collect.Lists; import java.util.List;
import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
1,311,846
void addCollectionFiles(List<File> files) throws IOException { @SuppressWarnings("unchecked") Iterator<PlexusIoFileResource> resources = collection.getResources(); while(resources.hasNext()) { PlexusIoFileResource resource = resources.next(); files.add(resource.getFile()); } }
void addCollectionFiles(List<File> files) throws IOException { @SuppressWarnings(STR) Iterator<PlexusIoFileResource> resources = collection.getResources(); while(resources.hasNext()) { PlexusIoFileResource resource = resources.next(); files.add(resource.getFile()); } }
/** * Add source files from the {@link PlexusIoFileResourceCollection} to the files list. * * @param files * @throws IOException */
Add source files from the <code>PlexusIoFileResourceCollection</code> to the files list
addCollectionFiles
{ "repo_name": "cipriancraciun/maven-java-formatter-plugin", "path": "src/main/java/com/relativitas/maven/plugins/formatter/FormatterMojo.java", "license": "apache-2.0", "size": 19405 }
[ "java.io.File", "java.io.IOException", "java.util.Iterator", "java.util.List", "org.codehaus.plexus.components.io.resources.PlexusIoFileResource" ]
import java.io.File; import java.io.IOException; import java.util.Iterator; import java.util.List; import org.codehaus.plexus.components.io.resources.PlexusIoFileResource;
import java.io.*; import java.util.*; import org.codehaus.plexus.components.io.resources.*;
[ "java.io", "java.util", "org.codehaus.plexus" ]
java.io; java.util; org.codehaus.plexus;
206,919
public void setLogoDescription(CharSequence description) { if (!TextUtils.isEmpty(description)) { ensureLogoView(); } if (mLogoView != null) { mLogoView.setContentDescription(description); } }
void function(CharSequence description) { if (!TextUtils.isEmpty(description)) { ensureLogoView(); } if (mLogoView != null) { mLogoView.setContentDescription(description); } }
/** * Set a description of the toolbar's logo. * * <p>This description will be used for accessibility or other similar descriptions * of the UI.</p> * * @param description Description to set */
Set a description of the toolbar's logo. This description will be used for accessibility or other similar descriptions of the UI
setLogoDescription
{ "repo_name": "FreeDao/getintouchmaps", "path": "eclipse-compile/appcompat/src/android/support/v7/widget/Toolbar.java", "license": "gpl-3.0", "size": 78630 }
[ "android.text.TextUtils" ]
import android.text.TextUtils;
import android.text.*;
[ "android.text" ]
android.text;
960,959
public static String URLDecode(byte[] bytes, String enc, boolean isQuery) { if (bytes == null) return null; int len = bytes.length; int ix = 0; int ox = 0; while (ix < len) { byte b = bytes[ix++]; // Get byte to test if (b == '+' && i...
static String function(byte[] bytes, String enc, boolean isQuery) { if (bytes == null) return null; int len = bytes.length; int ix = 0; int ox = 0; while (ix < len) { byte b = bytes[ix++]; if (b == '+' && isQuery) { b = (byte)' '; } else if (b == '%') { if (ix + 2 > len) { throw new IllegalArgumentException( sm.getStri...
/** * Decode and return the specified URL-encoded byte array. * * @param bytes The url-encoded byte array * @param enc The encoding to use; if null, the default encoding is used. If * an unsupported encoding is specified null will be returned * @param isQuery Is this a query string being p...
Decode and return the specified URL-encoded byte array
URLDecode
{ "repo_name": "plumer/codana", "path": "tomcat_files/8.0.22/UDecoder.java", "license": "mit", "size": 13948 }
[ "java.io.UnsupportedEncodingException" ]
import java.io.UnsupportedEncodingException;
import java.io.*;
[ "java.io" ]
java.io;
427,193
public Timestamp getDateInvoiced () { return (Timestamp)get_Value(COLUMNNAME_DateInvoiced); }
Timestamp function () { return (Timestamp)get_Value(COLUMNNAME_DateInvoiced); }
/** Get Date Invoiced. @return Date printed on Invoice */
Get Date Invoiced
getDateInvoiced
{ "repo_name": "erpcya/adempierePOS", "path": "base/src/org/compiere/model/X_C_Invoice.java", "license": "gpl-2.0", "size": 40461 }
[ "java.sql.Timestamp" ]
import java.sql.Timestamp;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,704,873
public List<String> getExtraSelectors(IMethodBinding method) { if (method instanceof IOSMethodBinding || method.isConstructor() || BindingUtil.isStatic(method) || BindingUtil.isDestructor(method)) { return Collections.emptyList(); } List<IMethodBinding> originalMethods = getOriginalMethodBin...
List<String> function(IMethodBinding method) { if (method instanceof IOSMethodBinding method.isConstructor() BindingUtil.isStatic(method) BindingUtil.isDestructor(method)) { return Collections.emptyList(); } List<IMethodBinding> originalMethods = getOriginalMethodBindings(method); List<String> extraSelectors = Lists.ne...
/** * In rare edge cases a single method will override two or more methods that * have different selectors. This returns the additional selectors that are * not returned by getMethodSelector(). */
In rare edge cases a single method will override two or more methods that have different selectors. This returns the additional selectors that are not returned by getMethodSelector()
getExtraSelectors
{ "repo_name": "qq644531343/j2objc", "path": "translator/src/main/java/com/google/devtools/j2objc/util/NameTable.java", "license": "apache-2.0", "size": 39764 }
[ "com.google.common.collect.Lists", "com.google.devtools.j2objc.types.IOSMethodBinding", "java.util.Collections", "java.util.List", "org.eclipse.jdt.core.dom.IMethodBinding" ]
import com.google.common.collect.Lists; import com.google.devtools.j2objc.types.IOSMethodBinding; import java.util.Collections; import java.util.List; import org.eclipse.jdt.core.dom.IMethodBinding;
import com.google.common.collect.*; import com.google.devtools.j2objc.types.*; import java.util.*; import org.eclipse.jdt.core.dom.*;
[ "com.google.common", "com.google.devtools", "java.util", "org.eclipse.jdt" ]
com.google.common; com.google.devtools; java.util; org.eclipse.jdt;
1,127,412
@Test public final void testGetAPIDataATCommandParameterNotNull() { // Setup the resources for the test. int frameID = 0x10; String command = "NI"; byte[] parameter = new byte[]{0x6D, 0x79, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65}; ATCommandQueuePacket packet = new ATCommandQueuePacket(frameID, command, parame...
final void function() { int frameID = 0x10; String command = "NI"; byte[] parameter = new byte[]{0x6D, 0x79, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65}; ATCommandQueuePacket packet = new ATCommandQueuePacket(frameID, command, parameter); int expectedLength = 1 + command.length() + parameter.length ; byte[] expectedData = new ...
/** * Test method for {@link com.digi.xbee.api.packet.common.ATCommandQueuePacket#getAPIData()}. * * <p>Test the get API parameters but with a non-{@code null} parameter value.</p> */
Test method for <code>com.digi.xbee.api.packet.common.ATCommandQueuePacket#getAPIData()</code>. Test the get API parameters but with a non-null parameter value
testGetAPIDataATCommandParameterNotNull
{ "repo_name": "brucetsao/XBeeJavaLibrary", "path": "library/src/test/java/com/digi/xbee/api/packet/common/ATCommandQueuePacketTest.java", "license": "mpl-2.0", "size": 30492 }
[ "org.hamcrest.core.Is", "org.junit.Assert" ]
import org.hamcrest.core.Is; import org.junit.Assert;
import org.hamcrest.core.*; import org.junit.*;
[ "org.hamcrest.core", "org.junit" ]
org.hamcrest.core; org.junit;
2,512,660
@Test @Ignore public void testExecWinAnt() throws Exception { File f = new File(ANT_BUILD_FILE_NAME); f.createNewFile(); FileUtils.writeStringToFile(f, ANT_BUILD_FILE_CONTENT); assertTrue("You must create a sample build file!", f.exists()); ExecResult body = templateE...
void function() throws Exception { File f = new File(ANT_BUILD_FILE_NAME); f.createNewFile(); FileUtils.writeStringToFile(f, ANT_BUILD_FILE_CONTENT); assertTrue(STR, f.exists()); ExecResult body = templateExecAnt.requestBody((Object)"test", ExecResult.class); String stdout = IOUtils.toString(body.getStdout()); assertNu...
/** * The test assumes that Apache ant is installed */
The test assumes that Apache ant is installed
testExecWinAnt
{ "repo_name": "objectiser/camel", "path": "components/camel-exec/src/test/java/org/apache/camel/component/exec/impl/ExecDocumentationExamplesTest.java", "license": "apache-2.0", "size": 7682 }
[ "java.io.File", "org.apache.camel.component.exec.ExecResult", "org.apache.commons.io.FileUtils", "org.apache.commons.io.IOUtils" ]
import java.io.File; import org.apache.camel.component.exec.ExecResult; import org.apache.commons.io.FileUtils; import org.apache.commons.io.IOUtils;
import java.io.*; import org.apache.camel.component.exec.*; import org.apache.commons.io.*;
[ "java.io", "org.apache.camel", "org.apache.commons" ]
java.io; org.apache.camel; org.apache.commons;
1,908,644
return new AtomicLongMap<K>(new ConcurrentHashMap<K, AtomicLong>()); }
return new AtomicLongMap<K>(new ConcurrentHashMap<K, AtomicLong>()); }
/** * Creates an {@code AtomicLongMap}. */
Creates an AtomicLongMap
create
{ "repo_name": "mkeesey/guava-for-small-classpaths", "path": "guava/src/com/google/common/util/concurrent/AtomicLongMap.java", "license": "apache-2.0", "size": 12858 }
[ "java.util.concurrent.ConcurrentHashMap", "java.util.concurrent.atomic.AtomicLong" ]
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.*; import java.util.concurrent.atomic.*;
[ "java.util" ]
java.util;
1,430,816
public Icon getIcon() { return ExampleServiceIcon.getIcon(); }
Icon function() { return ExampleServiceIcon.getIcon(); }
/** * Icon for service provider */
Icon for service provider
getIcon
{ "repo_name": "StormShadowTX/Vamdc-TavernaPlugin", "path": "vamdc-taverna-suite/vamdc-activity-ui/src/main/java/org/vamdc/taverna/vamdc_taverna_suite/ui/serviceprovider/SpectColServiceProvider.java", "license": "bsd-3-clause", "size": 1857 }
[ "javax.swing.Icon" ]
import javax.swing.Icon;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
1,971,759
@SuppressWarnings({ "rawtypes", "unchecked" }) public void test_simpleHavingClause() { final VarNode y = new VarNode("y"); final VarNode x = new VarNode("x"); final VarNode z = new VarNode("z"); final IValueExpressionNode xExpr = new FunctionNode( ...
@SuppressWarnings({ STR, STR }) void function() { final VarNode y = new VarNode("y"); final VarNode x = new VarNode("x"); final VarNode z = new VarNode("z"); final IValueExpressionNode xExpr = new FunctionNode( FunctionRegistry.SUM, null, y); final ProjectionNode select = new ProjectionNode(); select.addExpr(new Assign...
/** * <pre> * SELECT SUM(?y) as ?x * GROUP BY ?z * HAVING ?x > 10 * </pre> */
<code> SELECT SUM(?y) as ?x GROUP BY ?z HAVING ?x > 10 </code>
test_simpleHavingClause
{ "repo_name": "blazegraph/database", "path": "bigdata-sails-test/src/test/java/com/bigdata/rdf/sail/sparql/TestVerifyAggregates.java", "license": "gpl-2.0", "size": 18314 }
[ "com.bigdata.rdf.internal.impl.literal.XSDNumericIV", "com.bigdata.rdf.sparql.ast.AssignmentNode", "com.bigdata.rdf.sparql.ast.ConstantNode", "com.bigdata.rdf.sparql.ast.FunctionNode", "com.bigdata.rdf.sparql.ast.FunctionRegistry", "com.bigdata.rdf.sparql.ast.GroupByNode", "com.bigdata.rdf.sparql.ast.Ha...
import com.bigdata.rdf.internal.impl.literal.XSDNumericIV; import com.bigdata.rdf.sparql.ast.AssignmentNode; import com.bigdata.rdf.sparql.ast.ConstantNode; import com.bigdata.rdf.sparql.ast.FunctionNode; import com.bigdata.rdf.sparql.ast.FunctionRegistry; import com.bigdata.rdf.sparql.ast.GroupByNode; import com.bigda...
import com.bigdata.rdf.internal.impl.literal.*; import com.bigdata.rdf.sparql.ast.*;
[ "com.bigdata.rdf" ]
com.bigdata.rdf;
307,854
public IgniteCountDownLatch countDownLatch(final String name, final int cnt, final boolean autoDel, final boolean create) throws IgniteCheckedException { A.notNull(name, "name"); awaitInitialization(); if (create) A.ensure(cnt >= 0, "count ca...
IgniteCountDownLatch function(final String name, final int cnt, final boolean autoDel, final boolean create) throws IgniteCheckedException { A.notNull(name, "name"); awaitInitialization(); if (create) A.ensure(cnt >= 0, STR); checkAtomicsConfiguration(); startQuery();
/** * Gets or creates count down latch. If count down latch is not found in cache, * it is created using provided name and count parameter. * * @param name Name of the latch. * @param cnt Initial count. * @param autoDel {@code True} to automatically delete latch from cache when * ...
Gets or creates count down latch. If count down latch is not found in cache, it is created using provided name and count parameter
countDownLatch
{ "repo_name": "mcherkasov/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java", "license": "apache-2.0", "size": 84263 }
[ "org.apache.ignite.IgniteCheckedException", "org.apache.ignite.IgniteCountDownLatch", "org.apache.ignite.internal.util.typedef.internal.A" ]
import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.IgniteCountDownLatch; import org.apache.ignite.internal.util.typedef.internal.A;
import org.apache.ignite.*; import org.apache.ignite.internal.util.typedef.internal.*;
[ "org.apache.ignite" ]
org.apache.ignite;
2,176,726
OutputStream getOutputStream(long pos) { return new LOBOutputStream(this, pos); }
OutputStream getOutputStream(long pos) { return new LOBOutputStream(this, pos); }
/** * returns output stream linked with this object * @param pos initial postion * @return OutputStream */
returns output stream linked with this object
getOutputStream
{ "repo_name": "papicella/snappy-store", "path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/impl/jdbc/LOBStreamControl.java", "license": "apache-2.0", "size": 22128 }
[ "java.io.OutputStream" ]
import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,870,607
public static final HashSet<Action> generateActionSet() { if (actionSet.isEmpty()) { for (int i = 0; i < beanFactory.getBeanDefinitionNames().length; i++) { if (beanFactory .getBean(beanFactory.getBeanDefinitionNames()[i]) .toString().contains("storage")) { actionSet.add((Action) bean...
static final HashSet<Action> function() { if (actionSet.isEmpty()) { for (int i = 0; i < beanFactory.getBeanDefinitionNames().length; i++) { if (beanFactory .getBean(beanFactory.getBeanDefinitionNames()[i]) .toString().contains(STR)) { actionSet.add((Action) beanFactory.getBean(beanFactory .getBeanDefinitionNames()[i])...
/** * Generate Action Set. */
Generate Action Set
generateActionSet
{ "repo_name": "midoblgsm/occi4java", "path": "infrastructure/src/main/java/occi/infrastructure/Storage.java", "license": "lgpl-3.0", "size": 7464 }
[ "java.util.HashSet" ]
import java.util.HashSet;
import java.util.*;
[ "java.util" ]
java.util;
2,233,560
public static void sendTYPICAL_REQUESTframe(DatagramSocket datagramSocket, String soulissNodeIPAddressOnLAN, int iNodes) { ArrayList<Byte> MACACOframe = new ArrayList<Byte>(); MACACOframe.add(ConstantsUDP.Souliss_UDP_function_typreq); // PUTIN, STARTOFFEST, NUMBEROF MACA...
static void function(DatagramSocket datagramSocket, String soulissNodeIPAddressOnLAN, int iNodes) { ArrayList<Byte> MACACOframe = new ArrayList<Byte>(); MACACOframe.add(ConstantsUDP.Souliss_UDP_function_typreq); MACACOframe.add((byte) 0x00); MACACOframe.add((byte) 0x00); MACACOframe.add((byte) 0x00); MACACOframe.add((b...
/** * Build TYPICAL REQUEST Frame */
Build TYPICAL REQUEST Frame
sendTYPICAL_REQUESTframe
{ "repo_name": "jowiho/openhab", "path": "bundles/binding/org.openhab.binding.souliss/src/main/java/org/openhab/binding/souliss/internal/network/udp/SoulissCommGate.java", "license": "epl-1.0", "size": 13183 }
[ "java.net.DatagramSocket", "java.util.ArrayList" ]
import java.net.DatagramSocket; import java.util.ArrayList;
import java.net.*; import java.util.*;
[ "java.net", "java.util" ]
java.net; java.util;
1,932,769
public void testAcRemoveActionsUnknownChain() { assertEquals(true, this.ach.addSystemReboot(this.admin, this.server.getId().intValue(), CHAIN_LABEL) > 0); try { this.ach.removeAction(t...
void function() { assertEquals(true, this.ach.addSystemReboot(this.admin, this.server.getId().intValue(), CHAIN_LABEL) > 0); try { this.ach.removeAction(this.admin, STRExpected exception: " + NoSuchActionChainException.class.getCanonicalName()); } catch (NoSuchActionChainException ex) { assertEquals(false, this.ach.lis...
/** * Test removal of the actions on the unknown chain. */
Test removal of the actions on the unknown chain
testAcRemoveActionsUnknownChain
{ "repo_name": "xkollar/spacewalk", "path": "java/code/src/com/redhat/rhn/frontend/xmlrpc/chain/test/ActionChainHandlerTest.java", "license": "gpl-2.0", "size": 26780 }
[ "com.redhat.rhn.frontend.xmlrpc.NoSuchActionChainException" ]
import com.redhat.rhn.frontend.xmlrpc.NoSuchActionChainException;
import com.redhat.rhn.frontend.xmlrpc.*;
[ "com.redhat.rhn" ]
com.redhat.rhn;
113,127
public static NabuccoPropertyDescriptor getPropertyDescriptor(String propertyName) { return PropertyCache.getInstance().retrieve(DatabaseAuthenticationExtension.class).getProperty(propertyName); }
static NabuccoPropertyDescriptor function(String propertyName) { return PropertyCache.getInstance().retrieve(DatabaseAuthenticationExtension.class).getProperty(propertyName); }
/** * Getter for the PropertyDescriptor. * * @param propertyName the String. * @return the NabuccoPropertyDescriptor. */
Getter for the PropertyDescriptor
getPropertyDescriptor
{ "repo_name": "NABUCCO/org.nabucco.framework.base", "path": "org.nabucco.framework.base.facade.datatype/src/main/gen/org/nabucco/framework/base/facade/datatype/extension/schema/authorization/authentication/DatabaseAuthenticationExtension.java", "license": "epl-1.0", "size": 4178 }
[ "org.nabucco.framework.base.facade.datatype.property.NabuccoPropertyDescriptor", "org.nabucco.framework.base.facade.datatype.property.PropertyCache" ]
import org.nabucco.framework.base.facade.datatype.property.NabuccoPropertyDescriptor; import org.nabucco.framework.base.facade.datatype.property.PropertyCache;
import org.nabucco.framework.base.facade.datatype.property.*;
[ "org.nabucco.framework" ]
org.nabucco.framework;
1,991,948
public Long[] getContentRange() { String contentRange = (String) metadata.get(Headers.CONTENT_RANGE); Long[] range = null; if (contentRange != null) { String[] tokens = contentRange.split("[ -/]+"); try { range = new Long[] { Long.parseLong(tokens[1]),...
Long[] function() { String contentRange = (String) metadata.get(Headers.CONTENT_RANGE); Long[] range = null; if (contentRange != null) { String[] tokens = contentRange.split(STR); try { range = new Long[] { Long.parseLong(tokens[1]), Long.parseLong(tokens[2]) }; } catch (NumberFormatException nfe) { throw new SdkClient...
/** * <p> * Returns the content range of the object if response contains the Content-Range header. * </p> * <p> * If the request specifies a range or part number, then response returns the Content-Range range header. * Otherwise, the response does not return Content-Range header. * </...
Returns the content range of the object if response contains the Content-Range header. If the request specifies a range or part number, then response returns the Content-Range range header. Otherwise, the response does not return Content-Range header.
getContentRange
{ "repo_name": "loremipsumdolor/CastFast", "path": "src/com/amazonaws/services/s3/model/ObjectMetadata.java", "license": "mit", "size": 35126 }
[ "com.amazonaws.SdkClientException", "com.amazonaws.services.s3.Headers" ]
import com.amazonaws.SdkClientException; import com.amazonaws.services.s3.Headers;
import com.amazonaws.*; import com.amazonaws.services.s3.*;
[ "com.amazonaws", "com.amazonaws.services" ]
com.amazonaws; com.amazonaws.services;
2,181,408
protected void addNominal_voltagePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Triplex_node_nominal_voltage_feature"), getString("_UI_Prop...
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), VisGridPackage.eINSTANCE.getTriplex_node_Nominal_voltage(), true, false, false, ItemPropertyDescr...
/** * This adds a property descriptor for the Nominal voltage feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds a property descriptor for the Nominal voltage feature.
addNominal_voltagePropertyDescriptor
{ "repo_name": "mikesligo/visGrid", "path": "ie.tcd.gmf.visGrid.edit/src/visGrid/provider/Triplex_nodeItemProvider.java", "license": "gpl-3.0", "size": 50747 }
[ "org.eclipse.emf.edit.provider.ComposeableAdapterFactory", "org.eclipse.emf.edit.provider.ItemPropertyDescriptor" ]
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,261,539
@Test public final void testDecompressGzipFile() throws ApplicationException { LOGGER.trace("Invoking testDecompressGzipFile..."); File file = FileUtil.decompressGzipFile(inputZipFile, outputFileDir); LOGGER.debug("Decompressed File: " + inputZipFile.getAbsolutePath() + " to Dir: " + out...
final void function() throws ApplicationException { LOGGER.trace(STR); File file = FileUtil.decompressGzipFile(inputZipFile, outputFileDir); LOGGER.debug(STR + inputZipFile.getAbsolutePath() + STR + outputFileDir); assertTrue(file.exists()); assertEquals(outputFile.getName(), file.getName()); assertEquals(outputFile.ge...
/** * Test method for {@link com.sanjay.common.util.FileUtil#decompressGzipFile(File, String)}. * * @throws ApplicationException */
Test method for <code>com.sanjay.common.util.FileUtil#decompressGzipFile(File, String)</code>
testDecompressGzipFile
{ "repo_name": "SanjayMadnani/com.sanjay.common.common-utils", "path": "common-utils/src/test/java/com/sanjay/common/util/FileUtilTest.java", "license": "gpl-2.0", "size": 7269 }
[ "com.sanjay.common.exception.ApplicationException", "java.io.File", "org.junit.Assert" ]
import com.sanjay.common.exception.ApplicationException; import java.io.File; import org.junit.Assert;
import com.sanjay.common.exception.*; import java.io.*; import org.junit.*;
[ "com.sanjay.common", "java.io", "org.junit" ]
com.sanjay.common; java.io; org.junit;
2,822,171
private void initializeMap(World worldObj, ItemStack mapItem, int x, int y, int z) { mapItem.setItemDamage(worldObj.getUniqueDataId("map")); String mapName = "map_" + mapItem.getItemDamage(); MapData data = new MapData(mapName); worldObj.setItemData(mapName, data); data.xCent...
void function(World worldObj, ItemStack mapItem, int x, int y, int z) { mapItem.setItemDamage(worldObj.getUniqueDataId("map")); String mapName = "map_" + mapItem.getItemDamage(); MapData data = new MapData(mapName); worldObj.setItemData(mapName, data); data.xCenter = x; data.zCenter = z; data.scale = 3; data.markDirty(...
/** * Initialize the map for the realm * @param worldObj World object * @param mapItem Map object * @param x x coordinate * @param y y coordinate * @param z z coordinate */
Initialize the map for the realm
initializeMap
{ "repo_name": "cbaakman/Tropicraft", "path": "src/main/java/net/tropicraft/world/worldgen/WorldGenTropicsTreasure.java", "license": "mpl-2.0", "size": 6577 }
[ "net.minecraft.init.Blocks", "net.minecraft.init.Items", "net.minecraft.item.ItemStack", "net.minecraft.world.World", "net.minecraft.world.storage.MapData", "net.tropicraft.registry.TCBlockRegistry", "net.tropicraft.registry.TCItemRegistry" ]
import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import net.minecraft.world.storage.MapData; import net.tropicraft.registry.TCBlockRegistry; import net.tropicraft.registry.TCItemRegistry;
import net.minecraft.init.*; import net.minecraft.item.*; import net.minecraft.world.*; import net.minecraft.world.storage.*; import net.tropicraft.registry.*;
[ "net.minecraft.init", "net.minecraft.item", "net.minecraft.world", "net.tropicraft.registry" ]
net.minecraft.init; net.minecraft.item; net.minecraft.world; net.tropicraft.registry;
2,137,467
public int getColumnSize(String table, String column) { MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource().addValue("table", table) .addValue("column", column); Map<String, Object> dbResults = new SimpleJdbcCall(jdbcTemplate).withFunctionName("f...
int function(String table, String column) { MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource().addValue("table", table) .addValue(STR, column); Map<String, Object> dbResults = new SimpleJdbcCall(jdbcTemplate).withFunctionName(STR).execute( parameterSource); String resultKey = dbEngineDialect.getFu...
/** * Get the column size as defined in database for char/varchar colmuns * @param table table name * @param column column name * @return the column size (number of characters allowed) */
Get the column size as defined in database for char/varchar colmuns
getColumnSize
{ "repo_name": "derekhiggins/ovirt-engine", "path": "backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/DbFacade.java", "license": "apache-2.0", "size": 28652 }
[ "java.util.Map", "org.springframework.jdbc.core.namedparam.MapSqlParameterSource", "org.springframework.jdbc.core.simple.SimpleJdbcCall" ]
import java.util.Map; import org.springframework.jdbc.core.namedparam.MapSqlParameterSource; import org.springframework.jdbc.core.simple.SimpleJdbcCall;
import java.util.*; import org.springframework.jdbc.core.namedparam.*; import org.springframework.jdbc.core.simple.*;
[ "java.util", "org.springframework.jdbc" ]
java.util; org.springframework.jdbc;
2,636,296
private void handleRemovedFavorite(Agent fav, List<Agent> allFavs) { // LOVESET UPDATE Make the updates to the loveSet that need to be & sync the clients List<Airing> airsThatMayDie = new ArrayList<Airing>(); DBObject[] airs; boolean keywordTest = (fav.agentMask & (Agent.LOVE_MASK|Agent.KEYWORD_MASK...
void function(Agent fav, List<Agent> allFavs) { List<Airing> airsThatMayDie = new ArrayList<Airing>(); DBObject[] airs; boolean keywordTest = (fav.agentMask & (Agent.LOVE_MASK Agent.KEYWORD_MASK)) == (Agent.LOVE_MASK Agent.KEYWORD_MASK); if(keywordTest) { ArrayList<Airing> airingsHaystack = new ArrayList<Airing>(); Sho...
/** * Update the internal Carny state after a favorite has been removed (or disabled) * @param fav The Favorite that was removed * @param allFavs The collection of all Favorites */
Update the internal Carny state after a favorite has been removed (or disabled)
handleRemovedFavorite
{ "repo_name": "richard-nellist/sagetv", "path": "java/sage/Carny.java", "license": "apache-2.0", "size": 62339 }
[ "java.util.ArrayList", "java.util.Arrays", "java.util.Collections", "java.util.HashSet", "java.util.List", "java.util.Set" ]
import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,832,742
@Override public void notifyChanged(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(Dimension.class)) { case GeometryPackage.DIMENSION__SIZE: case GeometryPackage.DIMENSION__IS_CIRCULAR: fireNotifyChanged(new ViewerNotification(notification, notification.g...
void function(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(Dimension.class)) { case GeometryPackage.DIMENSION__SIZE: case GeometryPackage.DIMENSION__IS_CIRCULAR: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; } su...
/** * This handles model notifications by calling {@link #updateChildren} to update any cached * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This handles model notifications by calling <code>#updateChildren</code> to update any cached children and by creating a viewer notification, which it passes to <code>#fireNotifyChanged</code>.
notifyChanged
{ "repo_name": "diverse-project/k3", "path": "k3-samples-incomplete/cellular_automata/org.kermeta.language.sample.cellularautomata.geometry.model.edit/src/geometry/provider/DimensionItemProvider.java", "license": "epl-1.0", "size": 5213 }
[ "org.eclipse.emf.common.notify.Notification", "org.eclipse.emf.edit.provider.ViewerNotification" ]
import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.edit.provider.ViewerNotification;
import org.eclipse.emf.common.notify.*; import org.eclipse.emf.edit.provider.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
453,932
public List<GradoopId> getIdList(int column) { int offset = getIdListOffset(column); int listSize = Ints.fromByteArray(ArrayUtils.subarray(idListData, offset, offset + Integer.BYTES)); offset += Integer.BYTES; List<GradoopId> idList = new ArrayList<>(listSize); for (int i = 0; i < listSi...
List<GradoopId> function(int column) { int offset = getIdListOffset(column); int listSize = Ints.fromByteArray(ArrayUtils.subarray(idListData, offset, offset + Integer.BYTES)); offset += Integer.BYTES; List<GradoopId> idList = new ArrayList<>(listSize); for (int i = 0; i < listSize; i++) { idList.add(GradoopId.fromByte...
/** * Returns the ID-List stored at the specified column * @param column the entries index * @return ID-List stored at the specified column */
Returns the ID-List stored at the specified column
getIdList
{ "repo_name": "galpha/gradoop", "path": "gradoop-flink/src/main/java/org/gradoop/flink/model/impl/operators/matching/single/cypher/pojos/Embedding.java", "license": "apache-2.0", "size": 21630 }
[ "com.google.common.primitives.Ints", "java.util.ArrayList", "java.util.List", "org.apache.commons.lang3.ArrayUtils", "org.gradoop.common.model.impl.id.GradoopId" ]
import com.google.common.primitives.Ints; import java.util.ArrayList; import java.util.List; import org.apache.commons.lang3.ArrayUtils; import org.gradoop.common.model.impl.id.GradoopId;
import com.google.common.primitives.*; import java.util.*; import org.apache.commons.lang3.*; import org.gradoop.common.model.impl.id.*;
[ "com.google.common", "java.util", "org.apache.commons", "org.gradoop.common" ]
com.google.common; java.util; org.apache.commons; org.gradoop.common;
842,022
public boolean verifyTopicCleanupPolicyOnlyCompact(String topic, String workerTopicConfig, String topicPurpose) { Set<String> cleanupPolicies = topicCleanupPolicy(topic); if (cleanupPolicies.isEmpty()) { log.info("Unable to use admin client to verify the cleanup policy of '{}...
boolean function(String topic, String workerTopicConfig, String topicPurpose) { Set<String> cleanupPolicies = topicCleanupPolicy(topic); if (cleanupPolicies.isEmpty()) { log.info(STR + STR + STR + STR + STR, topic, TopicConfig.CLEANUP_POLICY_COMPACT); return false; } Set<String> expectedPolicies = Collections.singleton...
/** * Verify the named topic uses only compaction for the cleanup policy. * * @param topic the name of the topic * @param workerTopicConfig the name of the worker configuration that specifies the topic name * @return true if the admin client could be used to verify the topic setting...
Verify the named topic uses only compaction for the cleanup policy
verifyTopicCleanupPolicyOnlyCompact
{ "repo_name": "lindong28/kafka", "path": "connect/runtime/src/main/java/org/apache/kafka/connect/util/TopicAdmin.java", "license": "apache-2.0", "size": 36143 }
[ "java.util.Collections", "java.util.Set", "org.apache.kafka.common.config.ConfigException", "org.apache.kafka.common.config.TopicConfig" ]
import java.util.Collections; import java.util.Set; import org.apache.kafka.common.config.ConfigException; import org.apache.kafka.common.config.TopicConfig;
import java.util.*; import org.apache.kafka.common.config.*;
[ "java.util", "org.apache.kafka" ]
java.util; org.apache.kafka;
841,843
public void skip(final int numToSkip) throws IOException { // REVIEW // This is horribly inefficient, but it ensures that we // properly skip over bytes via the TarBuffer... // final byte[] skipBuf = new byte[8 * 1024]; int num = numToSkip; while (num > 0)...
void function(final int numToSkip) throws IOException { int num = numToSkip; while (num > 0) { final int count = (num > skipBuf.length) ? skipBuf.length : num; final int numRead = read(skipBuf, 0, count); if (numRead == -1) { break; } num -= numRead; } }
/** * Skip bytes in the input buffer. This skips bytes in the current entry's * data, not the entire archive, and will stop at the end of the current * entry's data if the number to skip extends beyond that point. * * @param numToSkip The number of bytes to skip. * @throws IOException when...
Skip bytes in the input buffer. This skips bytes in the current entry's data, not the entire archive, and will stop at the end of the current entry's data if the number to skip extends beyond that point
skip
{ "repo_name": "raviu/wso2-commons-vfs", "path": "core/src/main/java/org/apache/commons/vfs2/provider/tar/TarInputStream.java", "license": "apache-2.0", "size": 14218 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,041,372
public MicrosoftGraphWorkbookChartGridlinesFormat withAdditionalProperties( Map<String, Object> additionalProperties) { this.additionalProperties = additionalProperties; return this; }
MicrosoftGraphWorkbookChartGridlinesFormat function( Map<String, Object> additionalProperties) { this.additionalProperties = additionalProperties; return this; }
/** * Set the additionalProperties property: workbookChartGridlinesFormat. * * @param additionalProperties the additionalProperties value to set. * @return the MicrosoftGraphWorkbookChartGridlinesFormat object itself. */
Set the additionalProperties property: workbookChartGridlinesFormat
withAdditionalProperties
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/models/MicrosoftGraphWorkbookChartGridlinesFormat.java", "license": "mit", "size": 3074 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,009,460
protected void saveLocationChanges(AssetTransferDocument document, Asset saveAsset) { // change inventory date saveAsset.setLastInventoryDate(SpringContext.getBean(DateTimeService.class).getCurrentTimestamp()); // save asset location details saveAsset.setCampusCode(document.getCampus...
void function(AssetTransferDocument document, Asset saveAsset) { saveAsset.setLastInventoryDate(SpringContext.getBean(DateTimeService.class).getCurrentTimestamp()); saveAsset.setCampusCode(document.getCampusCode()); saveAsset.setBuildingCode(document.getBuildingCode()); saveAsset.setBuildingRoomNumber(document.getBuild...
/** * Updates location details to the asset * * @param document Current document * @param saveAsset Asset */
Updates location details to the asset
saveLocationChanges
{ "repo_name": "bhutchinson/kfs", "path": "kfs-cam/src/main/java/org/kuali/kfs/module/cam/document/service/impl/AssetTransferServiceImpl.java", "license": "agpl-3.0", "size": 30285 }
[ "java.util.List", "org.apache.commons.lang.StringUtils", "org.kuali.kfs.module.cam.CamsConstants", "org.kuali.kfs.module.cam.businessobject.Asset", "org.kuali.kfs.module.cam.businessobject.AssetLocation", "org.kuali.kfs.module.cam.document.AssetTransferDocument", "org.kuali.kfs.sys.context.SpringContext...
import java.util.List; import org.apache.commons.lang.StringUtils; import org.kuali.kfs.module.cam.CamsConstants; import org.kuali.kfs.module.cam.businessobject.Asset; import org.kuali.kfs.module.cam.businessobject.AssetLocation; import org.kuali.kfs.module.cam.document.AssetTransferDocument; import org.kuali.kfs.sys.c...
import java.util.*; import org.apache.commons.lang.*; import org.kuali.kfs.module.cam.*; import org.kuali.kfs.module.cam.businessobject.*; import org.kuali.kfs.module.cam.document.*; import org.kuali.kfs.sys.context.*; import org.kuali.rice.core.api.datetime.*; import org.kuali.rice.krad.util.*;
[ "java.util", "org.apache.commons", "org.kuali.kfs", "org.kuali.rice" ]
java.util; org.apache.commons; org.kuali.kfs; org.kuali.rice;
2,888,818
public static String getGMTime() { SimpleDateFormat gmtDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); gmtDateFormat.setTimeZone(TimeZone.getTimeZone("GMT")); //Current Date Time in GMT return gmtDateFormat.format(new java.util.Date()); }
static String function() { SimpleDateFormat gmtDateFormat = new SimpleDateFormat(STR); gmtDateFormat.setTimeZone(TimeZone.getTimeZone("GMT")); return gmtDateFormat.format(new java.util.Date()); }
/** * Get the current GMT time for user notification. * * @return timestamp value as string. */
Get the current GMT time for user notification
getGMTime
{ "repo_name": "GeoKnow/GeoStats", "path": "src/main/java/org/aksw/geostats/util/UtilsLib.java", "license": "mit", "size": 3620 }
[ "java.text.SimpleDateFormat", "java.util.TimeZone" ]
import java.text.SimpleDateFormat; import java.util.TimeZone;
import java.text.*; import java.util.*;
[ "java.text", "java.util" ]
java.text; java.util;
1,526,479
public static void main(String [] args) throws IOException { Configuration conf = HBaseConfiguration.create(); if (args == null || args.length != 1) { System.out.println("ERROR: Empty arguments list; pass path to MASTERPROCWALS_DIR."); System.out.println("Usage: WALProcedureStore MASTERPROCWALS_DI...
static void function(String [] args) throws IOException { Configuration conf = HBaseConfiguration.create(); if (args == null args.length != 1) { System.out.println(STR); System.out.println(STR); System.exit(-1); }
/** * Parses a directory of WALs building up ProcedureState. * For testing parse and profiling. * @param args Include pointer to directory of WAL files for a store instance to parse & load. */
Parses a directory of WALs building up ProcedureState. For testing parse and profiling
main
{ "repo_name": "francisliu/hbase", "path": "hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/WALProcedureStore.java", "license": "apache-2.0", "size": 49578 }
[ "java.io.IOException", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.hbase.HBaseConfiguration" ]
import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HBaseConfiguration;
import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.hbase.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
656,925
public com.mozu.api.contracts.productadmin.MasterCatalogCollection getMasterCatalogs(String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.productadmin.MasterCatalogCollection> client = com.mozu.api.clients.commerce.catalog.admin.MasterCatalogClient.getMasterCatalogsClient( responseFields); ...
com.mozu.api.contracts.productadmin.MasterCatalogCollection function(String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.productadmin.MasterCatalogCollection> client = com.mozu.api.clients.commerce.catalog.admin.MasterCatalogClient.getMasterCatalogsClient( responseFields); client.setContext(_api...
/** * Retrieve the details of all master catalog associated with a tenant. * <p><pre><code> * MasterCatalog mastercatalog = new MasterCatalog(); * MasterCatalogCollection masterCatalogCollection = mastercatalog.getMasterCatalogs( responseFields); * </code></pre></p> * @param responseFields Use this field to...
Retrieve the details of all master catalog associated with a tenant. <code><code> MasterCatalog mastercatalog = new MasterCatalog(); MasterCatalogCollection masterCatalogCollection = mastercatalog.getMasterCatalogs( responseFields); </code></code>
getMasterCatalogs
{ "repo_name": "sanjaymandadi/mozu-java", "path": "mozu-java-core/src/main/java/com/mozu/api/resources/commerce/catalog/admin/MasterCatalogResource.java", "license": "mit", "size": 6380 }
[ "com.mozu.api.MozuClient" ]
import com.mozu.api.MozuClient;
import com.mozu.api.*;
[ "com.mozu.api" ]
com.mozu.api;
651,286
@Override public Map<String, MetricContext> getChildContextsAsMap() { return ImmutableMap.copyOf(this.children.asMap()); }
Map<String, MetricContext> function() { return ImmutableMap.copyOf(this.children.asMap()); }
/** * Get a view of the child {@link gobblin.metrics.MetricContext}s as a {@link com.google.common.collect.ImmutableMap}. * @return {@link com.google.common.collect.ImmutableMap} of * child {@link gobblin.metrics.MetricContext}s keyed by their names. */
Get a view of the child <code>gobblin.metrics.MetricContext</code>s as a <code>com.google.common.collect.ImmutableMap</code>
getChildContextsAsMap
{ "repo_name": "lbendig/gobblin", "path": "gobblin-metrics-libs/gobblin-metrics-base/src/main/java/gobblin/metrics/InnerMetricContext.java", "license": "apache-2.0", "size": 14174 }
[ "com.google.common.collect.ImmutableMap", "java.util.Map" ]
import com.google.common.collect.ImmutableMap; import java.util.Map;
import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
1,343,200
public void paintBorder( Component c, Graphics g, int x, int y, int width, int height ) { Color old_color = g.getColor(); int x1, y1, x2, y2; g.setColor(m_color); // outline g.drawRect(x, y, width - m_width - 1, height - m_width - 1); // the drop shadow for (int i = 0; i <...
void function( Component c, Graphics g, int x, int y, int width, int height ) { Color old_color = g.getColor(); int x1, y1, x2, y2; g.setColor(m_color); g.drawRect(x, y, width - m_width - 1, height - m_width - 1); for (int i = 0; i <= m_width; i++) { x1 = x + m_width; y1 = y + height - i; x2 = x + width; y2 = y1; g.dra...
/** * Paints the drop shadow border around the given component. * * @param c - the component for which this border is being painted * @param g - the paint graphics * @param x - the x position of the painted border * @param y - the y position of the painted border * @param width - the wid...
Paints the drop shadow border around the given component
paintBorder
{ "repo_name": "dsibournemouth/autoweka", "path": "weka-3.7.7/src/main/java/weka/gui/beans/ShadowBorder.java", "license": "gpl-3.0", "size": 5167 }
[ "java.awt.Color", "java.awt.Component", "java.awt.Graphics" ]
import java.awt.Color; import java.awt.Component; import java.awt.Graphics;
import java.awt.*;
[ "java.awt" ]
java.awt;
538,792
// get hold of the deployment unit DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final ModuleLoader moduleLoader = Module.getBootModuleLoader(); final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION); /...
DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final ModuleLoader moduleLoader = Module.getBootModuleLoader(); final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION); moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, EJB...
/** * Adds Jakarta EE module as a dependency to any deployment unit which is an Jakarta Enterprise Beans deployment * * @param phaseContext the deployment unit context * @throws DeploymentUnitProcessingException * */
Adds Jakarta EE module as a dependency to any deployment unit which is an Jakarta Enterprise Beans deployment
deploy
{ "repo_name": "jstourac/wildfly", "path": "ejb3/src/main/java/org/jboss/as/ejb3/deployment/processors/EjbDependencyDeploymentUnitProcessor.java", "license": "lgpl-2.1", "size": 6359 }
[ "org.jboss.as.ee.structure.DeploymentType", "org.jboss.as.ee.structure.DeploymentTypeMarker", "org.jboss.as.server.deployment.Attachments", "org.jboss.as.server.deployment.DeploymentUnit", "org.jboss.as.server.deployment.module.ModuleDependency", "org.jboss.as.server.deployment.module.ModuleSpecification"...
import org.jboss.as.ee.structure.DeploymentType; import org.jboss.as.ee.structure.DeploymentTypeMarker; import org.jboss.as.server.deployment.Attachments; import org.jboss.as.server.deployment.DeploymentUnit; import org.jboss.as.server.deployment.module.ModuleDependency; import org.jboss.as.server.deployment.module.Mod...
import org.jboss.as.ee.structure.*; import org.jboss.as.server.deployment.*; import org.jboss.as.server.deployment.module.*; import org.jboss.modules.*; import org.wildfly.iiop.openjdk.deployment.*;
[ "org.jboss.as", "org.jboss.modules", "org.wildfly.iiop" ]
org.jboss.as; org.jboss.modules; org.wildfly.iiop;
2,408,249
public synchronized void moveAdjacent () { this.destination = AbstractPathfinder.findAdjacent(entity); final Tile lastTile = entity.getCurrentTile(); if (destination != null) { if (running) { forceRunToggle(); } addWalkStep(new Point(destination.getX(), destination.getY())); }
synchronized void function () { this.destination = AbstractPathfinder.findAdjacent(entity); final Tile lastTile = entity.getCurrentTile(); if (destination != null) { if (running) { forceRunToggle(); } addWalkStep(new Point(destination.getX(), destination.getY())); }
/** * Forces the entity to move to an adjacent tile */
Forces the entity to move to an adjacent tile
moveAdjacent
{ "repo_name": "itsgreco/VirtueRS3", "path": "src/org/virtue/game/world/region/movement/Movement.java", "license": "mit", "size": 22372 }
[ "org.virtue.game.world.region.Tile", "org.virtue.game.world.region.movement.path.Point", "org.virtue.game.world.region.movement.path.impl.AbstractPathfinder" ]
import org.virtue.game.world.region.Tile; import org.virtue.game.world.region.movement.path.Point; import org.virtue.game.world.region.movement.path.impl.AbstractPathfinder;
import org.virtue.game.world.region.*; import org.virtue.game.world.region.movement.path.*; import org.virtue.game.world.region.movement.path.impl.*;
[ "org.virtue.game" ]
org.virtue.game;
2,742,560
public void initQueryStringHandlers() { try { this.transport = getEngine().getTransport(this.transportName); if (this.transport == null) { // No transport by this name is defined. Therefore, fill in default // query string handlers. ...
void function() { try { this.transport = getEngine().getTransport(this.transportName); if (this.transport == null) { this.transport = new SimpleTargetedChain(); this.transport.setOption(STR, STR); this.transport.setOption(STR, STR); this.transport.setOption(STR, STR); return; } else { boolean defaultQueryStrings = true...
/** * Initialize a Handler for the transport defined in the Axis server config. * This includes optionally filling in query string handlers. */
Initialize a Handler for the transport defined in the Axis server config. This includes optionally filling in query string handlers
initQueryStringHandlers
{ "repo_name": "apache/axis1-java", "path": "axis-rt-core/src/main/java/org/apache/axis/transport/http/AxisServlet.java", "license": "apache-2.0", "size": 51099 }
[ "org.apache.axis.AxisFault", "org.apache.axis.SimpleTargetedChain" ]
import org.apache.axis.AxisFault; import org.apache.axis.SimpleTargetedChain;
import org.apache.axis.*;
[ "org.apache.axis" ]
org.apache.axis;
2,431,050
@WebMethod @WebResult(name = "rval", targetNamespace = "https://adwords.google.com/api/adwords/mcm/v201809") @RequestWrapper(localName = "mutateServiceLinks", targetNamespace = "https://adwords.google.com/api/adwords/mcm/v201809", className = "com.google.api.ads.adwords.jaxws.v201809.mcm.CustomerServiceInte...
@WebResult(name = "rval", targetNamespace = STRmutateServiceLinksSTRhttps: @ResponseWrapper(localName = "mutateServiceLinksResponseSTRhttps: List<ServiceLink> function( @WebParam(name = "operationsSTRhttps: List<ServiceLinkOperation> operations) throws ApiException ;
/** * * Modifies links to other services for the authorized customer. * See {@link ServiceType} for information on the various linking types supported. * * @param operations to perform * @throws ApiException * * * @param oper...
Modifies links to other services for the authorized customer. See <code>ServiceType</code> for information on the various linking types supported
mutateServiceLinks
{ "repo_name": "googleads/googleads-java-lib", "path": "modules/adwords_appengine/src/main/java/com/google/api/ads/adwords/jaxws/v201809/mcm/CustomerServiceInterface.java", "license": "apache-2.0", "size": 6833 }
[ "java.util.List", "javax.jws.WebParam", "javax.jws.WebResult", "javax.xml.ws.ResponseWrapper" ]
import java.util.List; import javax.jws.WebParam; import javax.jws.WebResult; import javax.xml.ws.ResponseWrapper;
import java.util.*; import javax.jws.*; import javax.xml.ws.*;
[ "java.util", "javax.jws", "javax.xml" ]
java.util; javax.jws; javax.xml;
2,052,655
public void test(TestHarness harness) { // create instance of a class Object final Object o = new Object(); // get a runtime class of an object "o" final Class c = o.getClass(); harness.check(!c.isMemberClass()); }
void function(TestHarness harness) { final Object o = new Object(); final Class c = o.getClass(); harness.check(!c.isMemberClass()); }
/** * Runs the test using the specified harness. * * @param harness the test harness (<code>null</code> not permitted). */
Runs the test using the specified harness
test
{ "repo_name": "niloc132/mauve-gwt", "path": "src/main/java/gnu/testlet/java/lang/Object/classInfo/isMemberClass.java", "license": "gpl-2.0", "size": 1562 }
[ "gnu.testlet.TestHarness", "java.lang.Object" ]
import gnu.testlet.TestHarness; import java.lang.Object;
import gnu.testlet.*; import java.lang.*;
[ "gnu.testlet", "java.lang" ]
gnu.testlet; java.lang;
1,456,260
public Number getMaximumDomainValue() { final Range r = getDomainRange(); return new Double(r.getUpperBound()); }
Number function() { final Range r = getDomainRange(); return new Double(r.getUpperBound()); }
/** * Returns the maximum value in the dataset (or <code>null</code> if all the values in * the domain are <code>null</code>). * * @return The maximum value. */
Returns the maximum value in the dataset (or <code>null</code> if all the values in the domain are <code>null</code>)
getMaximumDomainValue
{ "repo_name": "simeshev/parabuild-ci", "path": "3rdparty/jfreechart0921/source/org/jfree/data/time/TimeSeriesCollection.java", "license": "lgpl-3.0", "size": 22048 }
[ "org.jfree.data.Range" ]
import org.jfree.data.Range;
import org.jfree.data.*;
[ "org.jfree.data" ]
org.jfree.data;
877,790
@Test public void testScenario4() throws Exception { // Calculation Deduction DeductionCalculationRequest deductionRequest = new DeductionCalculationRequest(); deductionRequest.setServicePeriods(TestsHelper.readServicePeriodsFromFile( SCENARIOS_FILE_FOLDER + "scenario-04....
void function() throws Exception { DeductionCalculationRequest deductionRequest = new DeductionCalculationRequest(); deductionRequest.setServicePeriods(TestsHelper.readServicePeriodsFromFile( SCENARIOS_FILE_FOLDER + STR)); DeductionCalculationResponse deductionResponse = deductionCalculationRuleService.execute(deductio...
/** * Ret Scenario - CSRS Intermittent Svc Dep and FERS Redeposit.pdf * * @throws Exception * to JUnit. */
Ret Scenario - CSRS Intermittent Svc Dep and FERS Redeposit.pdf
testScenario4
{ "repo_name": "NASA-Tournament-Lab/CoECI-OPM-Service-Credit-Redeposit-Deposit-Application", "path": "Code/SCRD_BRE/src/java/tests/gov/opm/scrd/IntegrationTest.java", "license": "apache-2.0", "size": 39833 }
[ "gov.opm.scrd.entities.application.DeductionCalculationRequest", "gov.opm.scrd.entities.application.DeductionCalculationResponse", "gov.opm.scrd.entities.application.InterestCalculationRequest", "gov.opm.scrd.entities.application.InterestCalculationResponse", "java.util.Collections", "junit.framework.Asse...
import gov.opm.scrd.entities.application.DeductionCalculationRequest; import gov.opm.scrd.entities.application.DeductionCalculationResponse; import gov.opm.scrd.entities.application.InterestCalculationRequest; import gov.opm.scrd.entities.application.InterestCalculationResponse; import java.util.Collections; import jun...
import gov.opm.scrd.entities.application.*; import java.util.*; import junit.framework.*; import org.joda.time.*;
[ "gov.opm.scrd", "java.util", "junit.framework", "org.joda.time" ]
gov.opm.scrd; java.util; junit.framework; org.joda.time;
1,065,963
public Process getProcess() { return getStartNode().getProcess(); }
Process function() { return getStartNode().getProcess(); }
/** * Return the process. * @return the process */
Return the process
getProcess
{ "repo_name": "chanakaudaya/developer-studio", "path": "bps/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/editparts/StartNodeEditPart.java", "license": "apache-2.0", "size": 11642 }
[ "org.eclipse.bpel.model.Process" ]
import org.eclipse.bpel.model.Process;
import org.eclipse.bpel.model.*;
[ "org.eclipse.bpel" ]
org.eclipse.bpel;
333,332
// todo: this should be encapsulated in an interface implemented by each SPI implementation private String guid(ModuleDeploymentId id) { return id.toString().replace(".", "_"); }
String function(ModuleDeploymentId id) { return id.toString().replace(".", "_"); }
/** * Create a Diego process guid for the given {@link ModuleDeploymentId}. * * @param id the module deployment id * @return string containing a Diego process guid */
Create a Diego process guid for the given <code>ModuleDeploymentId</code>
guid
{ "repo_name": "twoseat/spring-cloud-dataflow", "path": "spring-cloud-dataflow-module-deployers/spring-cloud-dataflow-module-deployer-lattice/src/main/java/org/springframework/cloud/dataflow/module/deployer/lattice/TaskModuleDeployer.java", "license": "apache-2.0", "size": 5774 }
[ "org.springframework.cloud.dataflow.core.ModuleDeploymentId" ]
import org.springframework.cloud.dataflow.core.ModuleDeploymentId;
import org.springframework.cloud.dataflow.core.*;
[ "org.springframework.cloud" ]
org.springframework.cloud;
2,542,158
public Requester trustAllCerts() throws HttpRequestException { final HttpURLConnection connection = getConnection(); if (connection instanceof HttpsURLConnection) { ((HttpsURLConnection) connection).setSSLSocketFactory(getTrustedFactory()); } return this; }
Requester function() throws HttpRequestException { final HttpURLConnection connection = getConnection(); if (connection instanceof HttpsURLConnection) { ((HttpsURLConnection) connection).setSSLSocketFactory(getTrustedFactory()); } return this; }
/** * Configure HTTPS connection to trust all certificates * <p> * This method does nothing if the current request is not a HTTPS request * * @return this request * @throws HttpRequestException */
Configure HTTPS connection to trust all certificates This method does nothing if the current request is not a HTTPS request
trustAllCerts
{ "repo_name": "vchoury/ses-daemon", "path": "src/main/java/fr/vcy/coredaemon/httpd/utils/Requester.java", "license": "mit", "size": 96195 }
[ "java.net.HttpURLConnection", "javax.net.ssl.HttpsURLConnection" ]
import java.net.HttpURLConnection; import javax.net.ssl.HttpsURLConnection;
import java.net.*; import javax.net.ssl.*;
[ "java.net", "javax.net" ]
java.net; javax.net;
1,960,299
public void setBellStrategy(BellStrategy strategy);
void function(BellStrategy strategy);
/** * Sets the bell strategy. * @param strategy The bell strategy. * @throws NullPointerException if the strategy is {@code null}. */
Sets the bell strategy
setBellStrategy
{ "repo_name": "grahamedgecombe/jterminal", "path": "src/main/java/com/grahamedgecombe/jterminal/TerminalModel.java", "license": "mit", "size": 4533 }
[ "com.grahamedgecombe.jterminal.bell.BellStrategy" ]
import com.grahamedgecombe.jterminal.bell.BellStrategy;
import com.grahamedgecombe.jterminal.bell.*;
[ "com.grahamedgecombe.jterminal" ]
com.grahamedgecombe.jterminal;
36,994
@Test public void testGetSize() throws IOException { File zipFile = new File(TESTDATA, "archive.zip"); ZipArchive archive = new ZipArchive(zipFile); Assert.assertEquals(13, archive.getSize(new File("test.txt"))); archive.close(); }
void function() throws IOException { File zipFile = new File(TESTDATA, STR); ZipArchive archive = new ZipArchive(zipFile); Assert.assertEquals(13, archive.getSize(new File(STR))); archive.close(); }
/** * Tests whether the getSize() method works correctly. * * @throws IOException unwanted. */
Tests whether the getSize() method works correctly
testGetSize
{ "repo_name": "KernelHaven/KernelHaven", "path": "test/net/ssehub/kernel_haven/util/ZipArchiveTest.java", "license": "apache-2.0", "size": 10937 }
[ "java.io.File", "java.io.IOException", "org.junit.Assert" ]
import java.io.File; import java.io.IOException; import org.junit.Assert;
import java.io.*; import org.junit.*;
[ "java.io", "org.junit" ]
java.io; org.junit;
2,185,196
private void addColumnsOutTo(int col) { for (int i = dataSet.getNumColumns() + getNumLeadingCols(); i <= col; i++) { ContinuousVariable var = new ContinuousVariable(""); dataSet.addVariable(var); System.out.println("Adding " + var + " col " + dataSet.getColu...
void function(int col) { for (int i = dataSet.getNumColumns() + getNumLeadingCols(); i <= col; i++) { ContinuousVariable var = new ContinuousVariable(STRAdding STR col STRmodelChanged", null, null); }
/** * Col index here is JTable index. */
Col index here is JTable index
addColumnsOutTo
{ "repo_name": "jdramsey/tetrad", "path": "tetrad-gui/src/main/java/edu/cmu/tetradapp/editor/TabularDataTable.java", "license": "gpl-2.0", "size": 14204 }
[ "edu.cmu.tetrad.data.ContinuousVariable" ]
import edu.cmu.tetrad.data.ContinuousVariable;
import edu.cmu.tetrad.data.*;
[ "edu.cmu.tetrad" ]
edu.cmu.tetrad;
2,497,823
public static MenuDrawer attach(Activity activity, Type type, Position position) { return attach(activity, type, position, MENU_DRAG_CONTENT); } /** * Attaches the MenuDrawer to the Activity. * * @param activity The activity the menu drawer will be attached to. * @param type ...
static MenuDrawer function(Activity activity, Type type, Position position) { return attach(activity, type, position, MENU_DRAG_CONTENT); } /** * Attaches the MenuDrawer to the Activity. * * @param activity The activity the menu drawer will be attached to. * @param type The {@link Type} of the drawer. * @param position...
/** * Attaches the MenuDrawer to the Activity. * * @param activity The activity the menu drawer will be attached to. * @param type The {@link Type} of the drawer. * @param position Where to position the menu. * @return The created MenuDrawer instance. */
Attaches the MenuDrawer to the Activity
attach
{ "repo_name": "fujia/WayHoo", "path": "libs/MenuDrawer-lib/src/net/simonvt/menudrawer/MenuDrawer.java", "license": "apache-2.0", "size": 50496 }
[ "android.app.Activity" ]
import android.app.Activity;
import android.app.*;
[ "android.app" ]
android.app;
595,663
protected Class<?> checkEntitySet(Set<?> entities) { Class<?> entityClass = null; Iterator<?> it = entities.iterator(); while(it.hasNext()) { Object entity = it.next(); if (entityClass == null) { entityClass = (Class<?>) findClass(entity); } if (! che...
Class<?> function(Set<?> entities) { Class<?> entityClass = null; Iterator<?> it = entities.iterator(); while(it.hasNext()) { Object entity = it.next(); if (entityClass == null) { entityClass = (Class<?>) findClass(entity); } if (! checkClass(entityClass).isInstance(entity)) { throw new IllegalArgumentException(STR + e...
/** * Validates the class type and the list of entities before performing * a batch operation (throws IllegalArgumentException) * * @param entities a Set of persistent entities, should all be of the same type */
Validates the class type and the list of entities before performing a batch operation (throws IllegalArgumentException)
checkEntitySet
{ "repo_name": "jonespm/genericdao", "path": "src/main/java/org/sakaiproject/genericdao/base/BaseGeneralGenericDao.java", "license": "apache-2.0", "size": 6159 }
[ "java.util.Iterator", "java.util.Set" ]
import java.util.Iterator; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
482,034
public void resetRecoveryStage() { assert routingEntry().recoverySource().getType() == RecoverySource.Type.PEER : "not a peer recovery [" + routingEntry() + "]"; assert currentEngineReference.get() == null; if (state != IndexShardState.RECOVERING) { throw new IndexShardNotRecover...
void function() { assert routingEntry().recoverySource().getType() == RecoverySource.Type.PEER : STR + routingEntry() + "]"; assert currentEngineReference.get() == null; if (state != IndexShardState.RECOVERING) { throw new IndexShardNotRecoveringException(shardId, state); } recoveryState().setStage(RecoveryState.Stage....
/** * If a file-based recovery occurs, a recovery target calls this method to reset the recovery stage. */
If a file-based recovery occurs, a recovery target calls this method to reset the recovery stage
resetRecoveryStage
{ "repo_name": "scorpionvicky/elasticsearch", "path": "server/src/main/java/org/elasticsearch/index/shard/IndexShard.java", "license": "apache-2.0", "size": 175161 }
[ "org.elasticsearch.cluster.routing.RecoverySource", "org.elasticsearch.indices.recovery.RecoveryState" ]
import org.elasticsearch.cluster.routing.RecoverySource; import org.elasticsearch.indices.recovery.RecoveryState;
import org.elasticsearch.cluster.routing.*; import org.elasticsearch.indices.recovery.*;
[ "org.elasticsearch.cluster", "org.elasticsearch.indices" ]
org.elasticsearch.cluster; org.elasticsearch.indices;
720,795
public boolean isDetailButtonDisplayed() { try { return drone.find(By.cssSelector(DASHLET_DETAILED_VIEW_BUTTON)).isDisplayed(); } catch (NoSuchElementException e) { if (logger.isTraceEnabled()) { logger.trace("Not able t...
boolean function() { try { return drone.find(By.cssSelector(DASHLET_DETAILED_VIEW_BUTTON)).isDisplayed(); } catch (NoSuchElementException e) { if (logger.isTraceEnabled()) { logger.trace(STR, e); } } return false; }
/** * Retrieves the link based on the given cssSelector. * * @return boolean */
Retrieves the link based on the given cssSelector
isDetailButtonDisplayed
{ "repo_name": "loftuxab/community-edition-old", "path": "projects/share-po/src/main/java/org/alfresco/po/share/dashlet/SiteContentDashlet.java", "license": "lgpl-3.0", "size": 21750 }
[ "org.openqa.selenium.By", "org.openqa.selenium.NoSuchElementException" ]
import org.openqa.selenium.By; import org.openqa.selenium.NoSuchElementException;
import org.openqa.selenium.*;
[ "org.openqa.selenium" ]
org.openqa.selenium;
1,332,552