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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
AST ast= rewrite.getAST();
if (extraDimensions.isEmpty()) {
return (Type) rewrite.createCopyTarget(type);
}
ArrayType result;
if (type instanceof ArrayType) {
ArrayType arrayType= (ArrayType) type;
Type varElementType= (Type) rewrite.createCopyTarget(arrayType.getElementType());
result... | AST ast= rewrite.getAST(); if (extraDimensions.isEmpty()) { return (Type) rewrite.createCopyTarget(type); } ArrayType result; if (type instanceof ArrayType) { ArrayType arrayType= (ArrayType) type; Type varElementType= (Type) rewrite.createCopyTarget(arrayType.getElementType()); result= ast.newArrayType(varElementType,... | /**
* Creates a {@link ASTRewrite#createCopyTarget(ASTNode) copy} of <code>type</code>
* and adds <code>extraDimensions</code> to it.
*
* @param type the type to copy
* @param extraDimensions the dimensions to add
* @param rewrite the ASTRewrite with which to create new nodes
* @return the copy ta... | Creates a <code>ASTRewrite#createCopyTarget(ASTNode) copy</code> of <code>type</code> and adds <code>extraDimensions</code> to it | copyTypeAndAddDimensions | {
"repo_name": "eclipse/flux",
"path": "org.eclipse.flux.jdt.service/jdt ui/org/eclipse/jdt/internal/corext/dom/DimensionRewrite.java",
"license": "bsd-3-clause",
"size": 3894
} | [
"org.eclipse.jdt.core.dom.ArrayType",
"org.eclipse.jdt.core.dom.Type"
] | import org.eclipse.jdt.core.dom.ArrayType; import org.eclipse.jdt.core.dom.Type; | import org.eclipse.jdt.core.dom.*; | [
"org.eclipse.jdt"
] | org.eclipse.jdt; | 263,053 |
public static File getDataLocation() {
File loc = dataLoc;
if (!loc.exists()) {
loc.mkdirs();
}
return loc;
}
| static File function() { File loc = dataLoc; if (!loc.exists()) { loc.mkdirs(); } return loc; } | /**
* Gets the file location where data such as settings or molecule saves are
* stored.
*
* @return the location for data
*/ | Gets the file location where data such as settings or molecule saves are stored | getDataLocation | {
"repo_name": "matthewseal/MoleculeViewer",
"path": "src/org/mseal/moleculeViewer/Constants.java",
"license": "gpl-2.0",
"size": 3360
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,500,052 |
public boolean isSelected(PositionCoordinate p);
| boolean function(PositionCoordinate p); | /**
* Determine if a cell at a given position is selected.
*
* @param p cell to query
* @return <code>true</code> if the given cell is selected
*/ | Determine if a cell at a given position is selected | isSelected | {
"repo_name": "heartsome/tmxeditor8",
"path": "others/net.sourceforge.nattable.core/src/net/sourceforge/nattable/selection/Selectable.java",
"license": "gpl-2.0",
"size": 613
} | [
"net.sourceforge.nattable.coordinate.PositionCoordinate"
] | import net.sourceforge.nattable.coordinate.PositionCoordinate; | import net.sourceforge.nattable.coordinate.*; | [
"net.sourceforge.nattable"
] | net.sourceforge.nattable; | 1,948,617 |
protected static String versionCheck(DatabaseMetaData md, int xmaj, int xmin, String description) throws SQLException {
int maj = md.getDatabaseMajorVersion();
int min = md.getDatabaseMinorVersion();
if (maj < xmaj || (maj == xmaj && min < xmin)) {
return "Unsupported " + descrip... | static String function(DatabaseMetaData md, int xmaj, int xmin, String description) throws SQLException { int maj = md.getDatabaseMajorVersion(); int min = md.getDatabaseMinorVersion(); if (maj < xmaj (maj == xmaj && min < xmin)) { return STR + description + STR + maj + "." + min + STR + xmaj + "." + xmin; } else { ret... | /**
* Generate version diagnostics.
*/ | Generate version diagnostics | versionCheck | {
"repo_name": "afilimonov/jackrabbit-oak",
"path": "oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBJDBCTools.java",
"license": "apache-2.0",
"size": 7603
} | [
"java.sql.DatabaseMetaData",
"java.sql.SQLException"
] | import java.sql.DatabaseMetaData; import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 710,153 |
private float scoreChunkLogP(List<Integer> words, boolean considerIncompleteNgrams,
boolean skipStart) {
float score = 0.0f;
if (words.size() > 0) {
int startIndex;
if (!considerIncompleteNgrams) {
startIndex = this.ngramOrder;
} else if (skipStart) {
startIndex = 2;
... | float function(List<Integer> words, boolean considerIncompleteNgrams, boolean skipStart) { float score = 0.0f; if (words.size() > 0) { int startIndex; if (!considerIncompleteNgrams) { startIndex = this.ngramOrder; } else if (skipStart) { startIndex = 2; } else { startIndex = 1; } score = this.languageModel.sentenceLogP... | /**
* This function is basically a wrapper for NGramLanguageModel::sentenceLogProbability(). It
* computes the probability of a phrase ("chunk"), using lower-order n-grams for the first n-1
* words.
*
* @param words
* @param considerIncompleteNgrams
* @param skipStart
* @return the phrase log p... | This function is basically a wrapper for NGramLanguageModel::sentenceLogProbability(). It computes the probability of a phrase ("chunk"), using lower-order n-grams for the first n-1 words | scoreChunkLogP | {
"repo_name": "lukeorland/joshua",
"path": "src/joshua/decoder/ff/lm/LanguageModelFF.java",
"license": "lgpl-2.1",
"size": 16352
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,568,443 |
@Override
@Test
public void testMBeansRegistered() throws Exception {
assertDefaultDomain();
resolveMandatoryEndpoint("mock:end", MockEndpoint.class);
Set<ObjectName> s = mbsc.queryNames(new ObjectName(domainName + ":type=endpoints,*"), null);
assertEquals(2, s.size(), "Cou... | void function() throws Exception { assertDefaultDomain(); resolveMandatoryEndpoint(STR, MockEndpoint.class); Set<ObjectName> s = mbsc.queryNames(new ObjectName(domainName + STR), null); assertEquals(2, s.size(), STR + s); s = mbsc.queryNames(new ObjectName(domainName + STR), null); assertEquals(1, s.size(), STR + s); s... | /**
* It retrieves a mbean for each "to" processor instance in the query ":type=processor"
*/ | It retrieves a mbean for each "to" processor instance in the query ":type=processor" | testMBeansRegistered | {
"repo_name": "nikhilvibhav/camel",
"path": "core/camel-management/src/test/java/org/apache/camel/management/MultiInstanceProcessorTest.java",
"license": "apache-2.0",
"size": 3030
} | [
"java.util.Set",
"javax.management.ObjectName",
"org.apache.camel.component.mock.MockEndpoint",
"org.junit.jupiter.api.Assertions"
] | import java.util.Set; import javax.management.ObjectName; import org.apache.camel.component.mock.MockEndpoint; import org.junit.jupiter.api.Assertions; | import java.util.*; import javax.management.*; import org.apache.camel.component.mock.*; import org.junit.jupiter.api.*; | [
"java.util",
"javax.management",
"org.apache.camel",
"org.junit.jupiter"
] | java.util; javax.management; org.apache.camel; org.junit.jupiter; | 1,064,562 |
public void testColumnMakeAutoIncrement()
{
if (!getPlatformInfo().isNonPrimaryKeyIdentityColumnsSupported())
{
return;
}
boolean isSybase = SybasePlatform.DATABASENAME.equals(getPlatform().getName());
final String model1Xml =
"<?x... | void function() { if (!getPlatformInfo().isNonPrimaryKeyIdentityColumnsSupported()) { return; } boolean isSybase = SybasePlatform.DATABASENAME.equals(getPlatform().getName()); final String model1Xml = STR+ STR + DatabaseIO.DDLUTILS_NAMESPACE + STR+ STR+ STR+ (isSybase ? STR : STR) + STR+ STR; final String model2Xml = S... | /**
* Tests making a column auto increment.
*/ | Tests making a column auto increment | testColumnMakeAutoIncrement | {
"repo_name": "ramizul/ddlutilsplus",
"path": "src/test/java/org/apache/ddlutils/io/TestChangeColumn.java",
"license": "apache-2.0",
"size": 184741
} | [
"java.math.BigDecimal",
"java.util.List",
"org.apache.ddlutils.platform.sybase.SybasePlatform"
] | import java.math.BigDecimal; import java.util.List; import org.apache.ddlutils.platform.sybase.SybasePlatform; | import java.math.*; import java.util.*; import org.apache.ddlutils.platform.sybase.*; | [
"java.math",
"java.util",
"org.apache.ddlutils"
] | java.math; java.util; org.apache.ddlutils; | 738,744 |
public static File getUserVideoDirectory(File downloadDir, String username) {
final File videosDir = new File(downloadDir, AppConstants.Directories.VIDEOS);
final File usersVideosDir = new File(videosDir, Sha1Util.SHA1(username));
return usersVideosDir;
} | static File function(File downloadDir, String username) { final File videosDir = new File(downloadDir, AppConstants.Directories.VIDEOS); final File usersVideosDir = new File(videosDir, Sha1Util.SHA1(username)); return usersVideosDir; } | /**
* Utility method to return the directory that have videos, and username hash as parent directories.
*
* @param downloadDir App download directory (such as Phone memory / SD-Card).
* @param username Current user name.
* @return Return external directory.
*/ | Utility method to return the directory that have videos, and username hash as parent directories | getUserVideoDirectory | {
"repo_name": "edx/edx-app-android",
"path": "OpenEdXMobile/src/main/java/org/edx/mobile/util/FileUtil.java",
"license": "apache-2.0",
"size": 12344
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,386,467 |
@NotNull
public static <IN> InvocationFactory<IN, Boolean> noneMatch(
@NotNull final Predicate<? super IN> predicate) {
return new AllMatchInvocationFactory<IN>(PredicateDecorator.decorate(predicate).negate());
} | static <IN> InvocationFactory<IN, Boolean> function( @NotNull final Predicate<? super IN> predicate) { return new AllMatchInvocationFactory<IN>(PredicateDecorator.decorate(predicate).negate()); } | /**
* Returns a factory of invocations verifying that none of the inputs satisfy a specific
* conditions.
*
* @param predicate the predicate defining the condition.
* @param <IN> the input data type.
* @return the invocation factory instance.
*/ | Returns a factory of invocations verifying that none of the inputs satisfy a specific conditions | noneMatch | {
"repo_name": "davide-maestroni/jroutine",
"path": "operator/src/main/java/com/github/dm/jrt/operator/Operators.java",
"license": "apache-2.0",
"size": 67942
} | [
"com.github.dm.jrt.core.invocation.InvocationFactory",
"com.github.dm.jrt.function.Predicate",
"com.github.dm.jrt.function.PredicateDecorator",
"org.jetbrains.annotations.NotNull"
] | import com.github.dm.jrt.core.invocation.InvocationFactory; import com.github.dm.jrt.function.Predicate; import com.github.dm.jrt.function.PredicateDecorator; import org.jetbrains.annotations.NotNull; | import com.github.dm.jrt.core.invocation.*; import com.github.dm.jrt.function.*; import org.jetbrains.annotations.*; | [
"com.github.dm",
"org.jetbrains.annotations"
] | com.github.dm; org.jetbrains.annotations; | 146,754 |
public void setBlockType(BlockType type) {
getExtent().setBlockType(getBlockPosition(), type);
} | void function(BlockType type) { getExtent().setBlockType(getBlockPosition(), type); } | /**
* Replace the block type at this position by a new type.
*
* <p>This will remove any extended block data at the given position.</p>
*
* @param type The new type
*/ | Replace the block type at this position by a new type. This will remove any extended block data at the given position | setBlockType | {
"repo_name": "modwizcode/SpongeAPI",
"path": "src/main/java/org/spongepowered/api/world/Location.java",
"license": "mit",
"size": 24514
} | [
"org.spongepowered.api.block.BlockType"
] | import org.spongepowered.api.block.BlockType; | import org.spongepowered.api.block.*; | [
"org.spongepowered.api"
] | org.spongepowered.api; | 676,525 |
@RequestMapping("/doMineralOccurrenceFilterStyle.do")
public void doMineralOccurrenceFilterStyle(
HttpServletResponse response,
@RequestParam(value = "commodityName", required = false) String commodityName,
@RequestParam(required = false, value = "bbox") String bboxJson,
... | @RequestMapping(STR) void function( HttpServletResponse response, @RequestParam(value = STR, required = false) String commodityName, @RequestParam(required = false, value = "bbox") String bboxJson, @RequestParam(required = false, value = STR, defaultValue = "0") int maxFeatures) throws Exception { FilterBoundingBox bbo... | /**
* Handles counting the results of a Earth Resource MineralOccerrence style request query.
*
* @param commodityName
* @param bbox
* @param maxFeatures
*
* @throws Exception
*/ | Handles counting the results of a Earth Resource MineralOccerrence style request query | doMineralOccurrenceFilterStyle | {
"repo_name": "GeoscienceAustralia/geoscience-portal-laurie",
"path": "src/main/java/org/auscope/portal/server/web/controllers/EarthResourcesFilterController.java",
"license": "lgpl-3.0",
"size": 25535
} | [
"java.io.ByteArrayInputStream",
"java.io.OutputStream",
"javax.servlet.http.HttpServletResponse",
"org.auscope.portal.core.services.methodmakers.filter.FilterBoundingBox",
"org.auscope.portal.core.util.FileIOUtil",
"org.springframework.web.bind.annotation.RequestMapping",
"org.springframework.web.bind.a... | import java.io.ByteArrayInputStream; import java.io.OutputStream; import javax.servlet.http.HttpServletResponse; import org.auscope.portal.core.services.methodmakers.filter.FilterBoundingBox; import org.auscope.portal.core.util.FileIOUtil; import org.springframework.web.bind.annotation.RequestMapping; import org.spring... | import java.io.*; import javax.servlet.http.*; import org.auscope.portal.core.services.methodmakers.filter.*; import org.auscope.portal.core.util.*; import org.springframework.web.bind.annotation.*; | [
"java.io",
"javax.servlet",
"org.auscope.portal",
"org.springframework.web"
] | java.io; javax.servlet; org.auscope.portal; org.springframework.web; | 1,744,128 |
boolean isInstalled(DependencyTree tree); | boolean isInstalled(DependencyTree tree); | /**
* Check if a given dependency tree item is already installed in the facade's context
*
* @param tree the dependency tree
* @return <code>true</code> is the dependency is already installed
*/ | Check if a given dependency tree item is already installed in the facade's context | isInstalled | {
"repo_name": "janstey/fuse",
"path": "fab/fab-osgi/src/main/java/org/fusesource/fabric/fab/osgi/internal/FabFacade.java",
"license": "apache-2.0",
"size": 2095
} | [
"org.fusesource.fabric.fab.DependencyTree"
] | import org.fusesource.fabric.fab.DependencyTree; | import org.fusesource.fabric.fab.*; | [
"org.fusesource.fabric"
] | org.fusesource.fabric; | 904,369 |
public static CommandResult execCommand(List<String> commands, boolean isRoot, boolean isNeedResultMsg) {
return execCommand(commands == null ? null : commands.toArray(new String[] {}), isRoot, isNeedResultMsg);
} | static CommandResult function(List<String> commands, boolean isRoot, boolean isNeedResultMsg) { return execCommand(commands == null ? null : commands.toArray(new String[] {}), isRoot, isNeedResultMsg); } | /**
* execute shell commands
*
* @param commands command list
* @param isRoot whether need to run with root
* @param isNeedResultMsg whether need result msg
* @return
* @see ShellUtils#execCommand(String[], boolean, boolean)
*/ | execute shell commands | execCommand | {
"repo_name": "enphoneh/AppleEmoji",
"path": "src/enphone/RootHelper/ShellUtils.java",
"license": "epl-1.0",
"size": 7558
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 506,569 |
public void register(Decorator decorator, final Factory<?>... factories); | void function(Decorator decorator, final Factory<?>... factories); | /**
* Register all the given factories after being decorated by the given
* decorator. The decorator can NOT be null
*
* Example: register(SingletonScope.class, ...);
*
* @param decorator
* the decorator to be applied. Can NOT be null
* @param factories
* ... | Register all the given factories after being decorated by the given decorator. The decorator can NOT be null Example: register(SingletonScope.class, ...) | register | {
"repo_name": "mohitvargia/smsgateway-android",
"path": "lib/com/calclab/suco/client/ioc/module/ModuleBuilder.java",
"license": "agpl-3.0",
"size": 4514
} | [
"com.calclab.suco.client.ioc.Decorator"
] | import com.calclab.suco.client.ioc.Decorator; | import com.calclab.suco.client.ioc.*; | [
"com.calclab.suco"
] | com.calclab.suco; | 2,865,069 |
Dataset open(String filePath) throws IOException; | Dataset open(String filePath) throws IOException; | /**
* Opens a connection to a file
*
* @return a dataset
*
* @throws IOException a file system error or database connection failure.
*/ | Opens a connection to a file | open | {
"repo_name": "RoProducts/rastertheque",
"path": "RasterLibrary/src/de/rooehler/rastertheque/core/Driver.java",
"license": "gpl-2.0",
"size": 915
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,764,417 |
@Test
public void testAddMovieAfterStory(){
cycleToTest.addMovie(movie1, 3, 0);
Assert.assertEquals(4, cycleToTest.getElements().size());
String key = cycleToTest.getStoryTellingChronology().get(1);
Assert.assertEquals(DEFAULT_ORIGINAL_TITLE_2, cycleToTest.getElements().get(key).getTitle().getOriginal... | void function(){ cycleToTest.addMovie(movie1, 3, 0); Assert.assertEquals(4, cycleToTest.getElements().size()); String key = cycleToTest.getStoryTellingChronology().get(1); Assert.assertEquals(DEFAULT_ORIGINAL_TITLE_2, cycleToTest.getElements().get(key).getTitle().getOriginal()); key = cycleToTest.getStoryTellingChronol... | /**
* Test the addMovie method.
* Add a movie after an existing movie in the story order.
* <p>
* Storytelling order should then be :
* <ul>
* <li>default1</li>
* <li>default2</li>
* <li>default3</li>
* <li>addedMovie</li>
* </ul>
*/ | Test the addMovie method. Add a movie after an existing movie in the story order. Storytelling order should then be : default1 default2 default3 addedMovie | testAddMovieAfterStory | {
"repo_name": "mlefevre/movieStore",
"path": "test/be/mlefevre/MovieStore/model/CycleTest.java",
"license": "gpl-3.0",
"size": 15803
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 589,844 |
private File getExecutable() {
String execName = (File.separatorChar == '\\') ? "java.exe" : "java";
return new File(getHome(),"bin/"+execName);
} | File function() { String execName = (File.separatorChar == '\\') ? STR : "java"; return new File(getHome(),"bin/"+execName); } | /**
* Gets the path to 'java'.
*/ | Gets the path to 'java' | getExecutable | {
"repo_name": "brunocvcunha/jenkins",
"path": "core/src/main/java/hudson/model/JDK.java",
"license": "mit",
"size": 6581
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,015,144 |
@Provides
@Singleton
@Directory(DirectoryType.THEMES)
public String getThemesDirectory(@Directory(DirectoryType.BASE) final String baseDirectory) {
return baseDirectory + "themes" + File.separator;
} | @Directory(DirectoryType.THEMES) String function(@Directory(DirectoryType.BASE) final String baseDirectory) { return baseDirectory + STR + File.separator; } | /**
* Provides the path to the themes directory.
*
* @param baseDirectory The base DMDirc directory.
*
* @return The themes directory.
*/ | Provides the path to the themes directory | getThemesDirectory | {
"repo_name": "csmith/DMDirc",
"path": "src/main/java/com/dmdirc/commandline/CommandLineOptionsModule.java",
"license": "mit",
"size": 7554
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,322,173 |
public Observable<ServiceResponse<EventSubscriptionInner>> createOrUpdateWithServiceResponseAsync(String scope, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) {
if (scope == null) {
throw new IllegalArgumentException("Parameter scope is required and cannot be null.")... | Observable<ServiceResponse<EventSubscriptionInner>> function(String scope, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { if (scope == null) { throw new IllegalArgumentException(STR); } if (eventSubscriptionName == null) { throw new IllegalArgumentException(STR); } if (eventSubscriptionIn... | /**
* Create or update an event subscription.
* Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope.
*
* @param scope The identifier of the resource to which the event subscription needs to be created or updated. The scope can be a s... | Create or update an event subscription. Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope | createOrUpdateWithServiceResponseAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/eventgrid/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_06_01/implementation/EventSubscriptionsInner.java",
"license": "mit",
"size": 345238
} | [
"com.google.common.reflect.TypeToken",
"com.microsoft.rest.ServiceResponse",
"com.microsoft.rest.Validator"
] | import com.google.common.reflect.TypeToken; import com.microsoft.rest.ServiceResponse; import com.microsoft.rest.Validator; | import com.google.common.reflect.*; import com.microsoft.rest.*; | [
"com.google.common",
"com.microsoft.rest"
] | com.google.common; com.microsoft.rest; | 1,321,208 |
public String getMessage(String code, Object[] args, String defaultMessage, boolean htmlEscape) {
String msg = this.webApplicationContext.getMessage(code, args, defaultMessage, this.locale);
return (htmlEscape ? HtmlUtils.htmlEscape(msg) : msg);
} | String function(String code, Object[] args, String defaultMessage, boolean htmlEscape) { String msg = this.webApplicationContext.getMessage(code, args, defaultMessage, this.locale); return (htmlEscape ? HtmlUtils.htmlEscape(msg) : msg); } | /**
* Retrieve the message for the given code.
* @param code code of the message
* @param args arguments for the message, or {@code null} if none
* @param defaultMessage String to return if the lookup fails
* @param htmlEscape HTML escape the message?
* @return the message
*/ | Retrieve the message for the given code | getMessage | {
"repo_name": "QBNemo/spring-mvc-showcase",
"path": "src/main/java/org/springframework/web/servlet/support/RequestContext.java",
"license": "apache-2.0",
"size": 38194
} | [
"org.springframework.web.util.HtmlUtils"
] | import org.springframework.web.util.HtmlUtils; | import org.springframework.web.util.*; | [
"org.springframework.web"
] | org.springframework.web; | 2,708,243 |
protected void addKeyPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(),
getString("_UI_LongToStateMapEntry_key_feature"),
getString("_UI_PropertyDescriptor_description"... | void function(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), ClassMakerPackage.Literals.LONG_TO_STATE_MAP_ENTRY__KEY, true, false, false, ItemPropertyDescript... | /**
* This adds a property descriptor for the Key feature. <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/ | This adds a property descriptor for the Key feature. | addKeyPropertyDescriptor | {
"repo_name": "enterpriseDomain/ClassMaker",
"path": "bundles/org.enterprisedomain.classmaker.edit/src/org/enterprisedomain/classmaker/provider/LongToStateMapEntryItemProvider.java",
"license": "apache-2.0",
"size": 6829
} | [
"org.eclipse.emf.edit.provider.ComposeableAdapterFactory",
"org.eclipse.emf.edit.provider.ItemPropertyDescriptor",
"org.enterprisedomain.classmaker.ClassMakerPackage"
] | import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.enterprisedomain.classmaker.ClassMakerPackage; | import org.eclipse.emf.edit.provider.*; import org.enterprisedomain.classmaker.*; | [
"org.eclipse.emf",
"org.enterprisedomain.classmaker"
] | org.eclipse.emf; org.enterprisedomain.classmaker; | 1,975,021 |
public Map<InetSocketAddress, ServerPort> activePorts() {
synchronized (activePorts) {
return Collections.unmodifiableMap(new LinkedHashMap<>(activePorts));
}
}
/**
* Returns the primary {@link ServerPort} that this {@link Server} is listening to. If this {@link Server} | Map<InetSocketAddress, ServerPort> function() { synchronized (activePorts) { return Collections.unmodifiableMap(new LinkedHashMap<>(activePorts)); } } /** * Returns the primary {@link ServerPort} that this {@link Server} is listening to. If this {@link Server} | /**
* Returns all {@link ServerPort}s that this {@link Server} is listening to.
*
* @return a {@link Map} whose key is the bind address and value is {@link ServerPort}.
* an empty {@link Map} if this {@link Server} did not start.
*
* @see Server#activePort()
*/ | Returns all <code>ServerPort</code>s that this <code>Server</code> is listening to | activePorts | {
"repo_name": "line/armeria",
"path": "core/src/main/java/com/linecorp/armeria/server/Server.java",
"license": "apache-2.0",
"size": 34734
} | [
"java.net.InetSocketAddress",
"java.util.Collections",
"java.util.LinkedHashMap",
"java.util.Map"
] | import java.net.InetSocketAddress; import java.util.Collections; import java.util.LinkedHashMap; import java.util.Map; | import java.net.*; import java.util.*; | [
"java.net",
"java.util"
] | java.net; java.util; | 1,024,149 |
public static void removeAllLastReplyDate(Model model,
org.ontoware.rdf2go.model.node.Resource instanceResource) {
Base.removeAll(model, instanceResource, LASTREPLYDATE);
} | static void function(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) { Base.removeAll(model, instanceResource, LASTREPLYDATE); } | /**
* Removes all values of property LastReplyDate * @param model an RDF2Go
* model
*
* @param resource
* an RDF2Go resource
*
* [Generated from RDFReactor template rule #removeall1static]
*/ | Removes all values of property LastReplyDate model | removeAllLastReplyDate | {
"repo_name": "m0ep/master-thesis",
"path": "source/apis/rdf2go/rdf2go-sioc/src/main/java/org/rdfs/sioc/Thing.java",
"license": "mit",
"size": 317844
} | [
"org.ontoware.rdf2go.model.Model",
"org.ontoware.rdfreactor.runtime.Base"
] | import org.ontoware.rdf2go.model.Model; import org.ontoware.rdfreactor.runtime.Base; | import org.ontoware.rdf2go.model.*; import org.ontoware.rdfreactor.runtime.*; | [
"org.ontoware.rdf2go",
"org.ontoware.rdfreactor"
] | org.ontoware.rdf2go; org.ontoware.rdfreactor; | 1,083,780 |
private void setDimLookup( RowMetaInterface rowMeta ) throws KettleDatabaseException {
DatabaseMeta databaseMeta = meta.getDatabaseMeta();
data.lookupRowMeta = new RowMeta();
String sql =
"SELECT "
+ databaseMeta.quoteField( meta.getKeyField() ) + ", "
+ databaseMeta.quoteFiel... | void function( RowMetaInterface rowMeta ) throws KettleDatabaseException { DatabaseMeta databaseMeta = meta.getDatabaseMeta(); data.lookupRowMeta = new RowMeta(); String sql = STR + databaseMeta.quoteField( meta.getKeyField() ) + STR + databaseMeta.quoteField( meta.getVersionField() ); if ( !Utils.isEmpty( meta.getFiel... | /**
* table: dimension table keys[]: which dim-fields do we use to look up key? retval: name of the key to return
* datefield: do we have a datefield? datefrom, dateto: date-range, if any.
*/ | table: dimension table keys[]: which dim-fields do we use to look up key? retval: name of the key to return datefield: do we have a datefield? datefrom, dateto: date-range, if any | setDimLookup | {
"repo_name": "alina-ipatina/pentaho-kettle",
"path": "engine/src/org/pentaho/di/trans/steps/dimensionlookup/DimensionLookup.java",
"license": "apache-2.0",
"size": 69207
} | [
"java.sql.SQLException",
"org.pentaho.di.core.Const",
"org.pentaho.di.core.database.DatabaseMeta",
"org.pentaho.di.core.exception.KettleDatabaseException",
"org.pentaho.di.core.row.RowMeta",
"org.pentaho.di.core.row.RowMetaInterface",
"org.pentaho.di.core.row.value.ValueMetaDate",
"org.pentaho.di.core... | import java.sql.SQLException; import org.pentaho.di.core.Const; import org.pentaho.di.core.database.DatabaseMeta; import org.pentaho.di.core.exception.KettleDatabaseException; import org.pentaho.di.core.row.RowMeta; import org.pentaho.di.core.row.RowMetaInterface; import org.pentaho.di.core.row.value.ValueMetaDate; imp... | import java.sql.*; import org.pentaho.di.core.*; import org.pentaho.di.core.database.*; import org.pentaho.di.core.exception.*; import org.pentaho.di.core.row.*; import org.pentaho.di.core.row.value.*; import org.pentaho.di.core.util.*; | [
"java.sql",
"org.pentaho.di"
] | java.sql; org.pentaho.di; | 269,859 |
public Timestamp getUpdated();
public static final String COLUMNNAME_UpdatedBy = "UpdatedBy"; | Timestamp function(); public static final String COLUMNNAME_UpdatedBy = STR; | /** Get Updated.
* Date this record was updated
*/ | Get Updated. Date this record was updated | getUpdated | {
"repo_name": "klst-com/metasfresh",
"path": "de.metas.adempiere.adempiere/base/src/main/java-gen/org/compiere/model/I_CM_Template_Ad_Cat.java",
"license": "gpl-2.0",
"size": 5000
} | [
"java.sql.Timestamp"
] | import java.sql.Timestamp; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,747,281 |
public String getOpenCmsContext() {
return OpenCms.getSystemInfo().getOpenCmsContext();
}
| String function() { return OpenCms.getSystemInfo().getOpenCmsContext(); } | /**
* Returns the OpenCms request context path.<p>
*
* This is a convenience method to use in the editor.<p>
*
* @return the OpenCms request context path
*/ | Returns the OpenCms request context path. This is a convenience method to use in the editor | getOpenCmsContext | {
"repo_name": "comundus/opencms-comundus",
"path": "src/main/java/org/opencms/workplace/editors/CmsEditor.java",
"license": "lgpl-2.1",
"size": 36249
} | [
"org.opencms.main.OpenCms"
] | import org.opencms.main.OpenCms; | import org.opencms.main.*; | [
"org.opencms.main"
] | org.opencms.main; | 135,900 |
public CustomPortletModeType<T> removeId()
{
childNode.removeAttribute("id");
return this;
} | CustomPortletModeType<T> function() { childNode.removeAttribute("id"); return this; } | /**
* Removes the <code>id</code> attribute
* @return the current instance of <code>CustomPortletModeType<T></code>
*/ | Removes the <code>id</code> attribute | removeId | {
"repo_name": "forge/javaee-descriptors",
"path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/portletapp20/CustomPortletModeTypeImpl.java",
"license": "epl-1.0",
"size": 7650
} | [
"org.jboss.shrinkwrap.descriptor.api.portletapp20.CustomPortletModeType"
] | import org.jboss.shrinkwrap.descriptor.api.portletapp20.CustomPortletModeType; | import org.jboss.shrinkwrap.descriptor.api.portletapp20.*; | [
"org.jboss.shrinkwrap"
] | org.jboss.shrinkwrap; | 1,259,393 |
public static boolean checkAllSettings(Predicate<Settings> p,
Consumer<Settings> truth)
{
boolean good = true;
for (Settings setting : values())
{
if (p.test(setting))
{
if (setting != CONFIG_FILE)
{
good = false;
}
if (truth != null)
{
truth.accept(setting);
}
}... | static boolean function(Predicate<Settings> p, Consumer<Settings> truth) { boolean good = true; for (Settings setting : values()) { if (p.test(setting)) { if (setting != CONFIG_FILE) { good = false; } if (truth != null) { truth.accept(setting); } } } return good; } | /**
* Check all settings against a certain predicate.
*
* @param p The predicate to check against
* @param failer The Consumer to call when the predicate is true.
* @return True if all settings pass the predicate
*/ | Check all settings against a certain predicate | checkAllSettings | {
"repo_name": "spmadden/usgs-srtm1-downloader",
"path": "src/main/com/seanmadden/usgs/Settings.java",
"license": "mit",
"size": 9111
} | [
"java.util.function.Consumer",
"java.util.function.Predicate"
] | import java.util.function.Consumer; import java.util.function.Predicate; | import java.util.function.*; | [
"java.util"
] | java.util; | 2,066,013 |
public static String getRemoteAddress() {
InetAddress addr = getRemoteIp();
return (addr == null) ? null : addr.getHostAddress();
} | static String function() { InetAddress addr = getRemoteIp(); return (addr == null) ? null : addr.getHostAddress(); } | /** Returns remote address as a string when invoked inside an RPC.
* Returns null in case of an error.
*/ | Returns remote address as a string when invoked inside an RPC. Returns null in case of an error | getRemoteAddress | {
"repo_name": "apurtell/hadoop",
"path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java",
"license": "apache-2.0",
"size": 146393
} | [
"java.net.InetAddress"
] | import java.net.InetAddress; | import java.net.*; | [
"java.net"
] | java.net; | 2,596,739 |
public boolean marshal(XPathFragment xPathFragment, MarshalRecord marshalRecord, Object object, CoreAbstractSession session, NamespaceResolver namespaceResolver) {
if (xmlCompositeDirectCollectionMapping.isReadOnly()) {
return false;
}
CoreContainerPolicy cp = getContainerP... | boolean function(XPathFragment xPathFragment, MarshalRecord marshalRecord, Object object, CoreAbstractSession session, NamespaceResolver namespaceResolver) { if (xmlCompositeDirectCollectionMapping.isReadOnly()) { return false; } CoreContainerPolicy cp = getContainerPolicy(); Object collection = xmlCompositeDirectColle... | /**
* Override the method in XPathNode such that the marshaller can be set on the
* marshalRecord - this is required for XMLConverter usage.
*/ | Override the method in XPathNode such that the marshaller can be set on the marshalRecord - this is required for XMLConverter usage | marshal | {
"repo_name": "bfg-repo-cleaner-demos/eclipselink.runtime-bfg-strip-big-blobs",
"path": "foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/oxm/XMLCompositeDirectCollectionMappingNodeValue.java",
"license": "epl-1.0",
"size": 19188
} | [
"javax.xml.namespace.QName",
"org.eclipse.persistence.internal.core.queries.CoreContainerPolicy",
"org.eclipse.persistence.internal.core.sessions.CoreAbstractSession",
"org.eclipse.persistence.internal.oxm.mappings.Field",
"org.eclipse.persistence.internal.oxm.record.MarshalRecord",
"org.eclipse.persisten... | import javax.xml.namespace.QName; import org.eclipse.persistence.internal.core.queries.CoreContainerPolicy; import org.eclipse.persistence.internal.core.sessions.CoreAbstractSession; import org.eclipse.persistence.internal.oxm.mappings.Field; import org.eclipse.persistence.internal.oxm.record.MarshalRecord; import org.... | import javax.xml.namespace.*; import org.eclipse.persistence.internal.core.queries.*; import org.eclipse.persistence.internal.core.sessions.*; import org.eclipse.persistence.internal.oxm.mappings.*; import org.eclipse.persistence.internal.oxm.record.*; import org.eclipse.persistence.oxm.mappings.nullpolicy.*; | [
"javax.xml",
"org.eclipse.persistence"
] | javax.xml; org.eclipse.persistence; | 1,472,370 |
@Override
public synchronized void loadFromXML(InputStream in) throws IOException {
// Calling super
super.loadFromXML(in);
// ...and recreating transport configuration
recreateTransportConfiguration();
removeExistingTransportConfigurationEntries();
}
... | synchronized void function(InputStream in) throws IOException { super.loadFromXML(in); recreateTransportConfiguration(); removeExistingTransportConfigurationEntries(); } | /**
* In addition to loading this configuration, it creates the HTTP, TCP and Multicasting
* configuration too.
*
* @param an input stream
*/ | In addition to loading this configuration, it creates the HTTP, TCP and Multicasting configuration too | loadFromXML | {
"repo_name": "johnjianfang/jxse",
"path": "src/main/java/net/jxse/configuration/JxsePeerConfiguration.java",
"license": "apache-2.0",
"size": 38745
} | [
"java.io.IOException",
"java.io.InputStream"
] | import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,292,345 |
public static DeweyNumber fromString(final String deweyNumberString) {
String[] splits = deweyNumberString.split("\\.");
if (splits.length == 0) {
return new DeweyNumber(Integer.parseInt(deweyNumberString));
} else {
int[] deweyNumber = new int[splits.length];
for (int i = 0; i < splits.length; i++)... | static DeweyNumber function(final String deweyNumberString) { String[] splits = deweyNumberString.split("\\."); if (splits.length == 0) { return new DeweyNumber(Integer.parseInt(deweyNumberString)); } else { int[] deweyNumber = new int[splits.length]; for (int i = 0; i < splits.length; i++) { deweyNumber[i] = Integer.p... | /**
* Creates a dewey number from a string representation. The input string must be a dot separated
* string of integers.
*
* @param deweyNumberString Dot separated string of integers
* @return Dewey number generated from the given input string
*/ | Creates a dewey number from a string representation. The input string must be a dot separated string of integers | fromString | {
"repo_name": "mylog00/flink",
"path": "flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/DeweyNumber.java",
"license": "apache-2.0",
"size": 7648
} | [
"org.apache.flink.api.common.typeutils.base.IntSerializer",
"org.apache.flink.api.common.typeutils.base.TypeSerializerSingleton"
] | import org.apache.flink.api.common.typeutils.base.IntSerializer; import org.apache.flink.api.common.typeutils.base.TypeSerializerSingleton; | import org.apache.flink.api.common.typeutils.base.*; | [
"org.apache.flink"
] | org.apache.flink; | 2,882,412 |
public void writeTo(OutputStream out) {
try {
JAXBContext.newInstance(getClass()).createMarshaller().marshal(this, out);
}
catch (JAXBException e) {
throw new RuntimeException(e);
}
} | void function(OutputStream out) { try { JAXBContext.newInstance(getClass()).createMarshaller().marshal(this, out); } catch (JAXBException e) { throw new RuntimeException(e); } } | /**
* Write this instrumentation info to a file.
*
* @param out The file to which to write this instrumentation info.
*/ | Write this instrumentation info to a file | writeTo | {
"repo_name": "garyhodgson/enunciate",
"path": "core-rt/src/main/java/org/codehaus/enunciate/bytecode/InstrumentationInfo.java",
"license": "apache-2.0",
"size": 2188
} | [
"java.io.OutputStream",
"javax.xml.bind.JAXBContext",
"javax.xml.bind.JAXBException"
] | import java.io.OutputStream; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; | import java.io.*; import javax.xml.bind.*; | [
"java.io",
"javax.xml"
] | java.io; javax.xml; | 52,004 |
public static FlowModBuilder builder(FlowRule flowRule,
OFFactory factory,
Optional<Long> xid) {
switch (factory.getVersion()) {
case OF_10:
return new FlowModBuilderVer10(flowRule, factory, xid);
c... | static FlowModBuilder function(FlowRule flowRule, OFFactory factory, Optional<Long> xid) { switch (factory.getVersion()) { case OF_10: return new FlowModBuilderVer10(flowRule, factory, xid); case OF_13: return new FlowModBuilderVer13(flowRule, factory, xid); default: throw new UnsupportedOperationException( STR + facto... | /**
* Creates a new flow mod builder.
*
* @param flowRule the flow rule to transform into a flow mod
* @param factory the OpenFlow factory to use to build the flow mod
* @param xid the transaction ID
* @return the new flow mod builder
*/ | Creates a new flow mod builder | builder | {
"repo_name": "kuangrewawa/OnosFw",
"path": "providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/FlowModBuilder.java",
"license": "apache-2.0",
"size": 19335
} | [
"java.util.Optional",
"org.onosproject.net.flow.FlowRule",
"org.projectfloodlight.openflow.protocol.OFFactory"
] | import java.util.Optional; import org.onosproject.net.flow.FlowRule; import org.projectfloodlight.openflow.protocol.OFFactory; | import java.util.*; import org.onosproject.net.flow.*; import org.projectfloodlight.openflow.protocol.*; | [
"java.util",
"org.onosproject.net",
"org.projectfloodlight.openflow"
] | java.util; org.onosproject.net; org.projectfloodlight.openflow; | 394,240 |
public ResourcePersistence getResourcePersistence() {
return resourcePersistence;
} | ResourcePersistence function() { return resourcePersistence; } | /**
* Returns the resource persistence.
*
* @return the resource persistence
*/ | Returns the resource persistence | getResourcePersistence | {
"repo_name": "iucn-whp/world-heritage-outlook",
"path": "portlets/iucn-dbservice-portlet/docroot/WEB-INF/src/com/iucn/whp/dbservice/service/base/other_designation_lkpLocalServiceBaseImpl.java",
"license": "gpl-2.0",
"size": 176262
} | [
"com.liferay.portal.service.persistence.ResourcePersistence"
] | import com.liferay.portal.service.persistence.ResourcePersistence; | import com.liferay.portal.service.persistence.*; | [
"com.liferay.portal"
] | com.liferay.portal; | 748,754 |
//@@author A0125680H
public boolean isAfterNow() {
Date now = Calendar.getInstance().getTime();
return this.value.getTime().after(now);
} | boolean function() { Date now = Calendar.getInstance().getTime(); return this.value.getTime().after(now); } | /**
* Returns true if the stored time is after the current time.
*/ | Returns true if the stored time is after the current time | isAfterNow | {
"repo_name": "CS2103AUG2016-T13-C2/main",
"path": "src/main/java/seedu/lifekeeper/model/activity/DateTime.java",
"license": "mit",
"size": 3757
} | [
"java.util.Calendar",
"java.util.Date"
] | import java.util.Calendar; import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,199,707 |
public boolean isIncluded(File file) {
return isIncluded(file.getAbsolutePath());
} | boolean function(File file) { return isIncluded(file.getAbsolutePath()); } | /**
* Exposes the {@link DirectoryScanner#isIncluded(String)} method to check if a single file should be included
* in the scan.
*
* @param file for scanning
* @return weather the file should be included or not
*/ | Exposes the <code>DirectoryScanner#isIncluded(String)</code> method to check if a single file should be included in the scan | isIncluded | {
"repo_name": "whitesource/fs-agent",
"path": "src/main/java/org/whitesource/agent/SingleFileScanner.java",
"license": "apache-2.0",
"size": 1227
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,248,282 |
public Builder addTool(FilesToRunProvider tool) {
addTools(tool.getFilesToRun());
if (tool.getRunfilesManifest() != null) {
addToolManifest(
tool.getRunfilesManifest(),
BaseSpawn.runfilesForFragment(tool.getExecutable().getExecPath()));
}
return this;
} | Builder function(FilesToRunProvider tool) { addTools(tool.getFilesToRun()); if (tool.getRunfilesManifest() != null) { addToolManifest( tool.getRunfilesManifest(), BaseSpawn.runfilesForFragment(tool.getExecutable().getExecPath())); } return this; } | /**
* Adds an executable and its runfiles, which is necessary for executing the spawn itself (e.g.
* a compiler), in contrast to artifacts that are necessary for the spawn to do its work (e.g.
* source code).
*/ | Adds an executable and its runfiles, which is necessary for executing the spawn itself (e.g. a compiler), in contrast to artifacts that are necessary for the spawn to do its work (e.g. source code) | addTool | {
"repo_name": "kamalmarhubi/bazel",
"path": "src/main/java/com/google/devtools/build/lib/analysis/actions/SpawnAction.java",
"license": "apache-2.0",
"size": 35439
} | [
"com.google.devtools.build.lib.actions.BaseSpawn",
"com.google.devtools.build.lib.analysis.FilesToRunProvider"
] | import com.google.devtools.build.lib.actions.BaseSpawn; import com.google.devtools.build.lib.analysis.FilesToRunProvider; | import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.analysis.*; | [
"com.google.devtools"
] | com.google.devtools; | 733,907 |
public static void insert(Any a, String that)
{
a.insert_string(that);
} | static void function(Any a, String that) { a.insert_string(that); } | /**
* Insert the Object Id into Any (uses {@link Any#insert_string(String)}).
*
* @param a the Any to insert into.
* @param that the string to insert.
*/ | Insert the Object Id into Any (uses <code>Any#insert_string(String)</code>) | insert | {
"repo_name": "shaotuanchen/sunflower_exp",
"path": "tools/source/gcc-4.2.4/libjava/classpath/org/omg/PortableInterceptor/ORBInitInfoPackage/ObjectIdHelper.java",
"license": "bsd-3-clause",
"size": 3667
} | [
"org.omg.CORBA"
] | import org.omg.CORBA; | import org.omg.*; | [
"org.omg"
] | org.omg; | 648,903 |
public void test_fill$CIIC() {
// Test for method void java.util.Arrays.fill(char [], int, int, char)
char val = 'T';
char d[] = new char[1000];
Arrays.fill(d, 400, d.length, val);
for (int i = 0; i < 400; i++)
assertTrue("Filled elements not in range", !(d[i] == ... | public void test_fill$CIIC() { char val = 'T'; char d[] = new char[1000]; Arrays.fill(d, 400, d.length, val); for (int i = 0; i < 400; i++) assertTrue(STR, !(d[i] == val)); for (int i = 400; i < d.length; i++) assertTrue(STR, d[i] == val); try { Arrays.fill(d, 10, 0, val); fail(STR); } catch (IllegalArgumentException e... | /**
* java.util.Arrays#fill(char[], int, int, char)
*/ | java.util.Arrays#fill(char[], int, int, char) | test_fill$CIIC | {
"repo_name": "AdmireTheDistance/android_libcore",
"path": "harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ArraysTest.java",
"license": "gpl-2.0",
"size": 156287
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 1,836,666 |
public static Zxid fromProtoZxid(ZabMessage.Zxid zxid) {
return new Zxid(zxid.getEpoch(), zxid.getXid());
} | static Zxid function(ZabMessage.Zxid zxid) { return new Zxid(zxid.getEpoch(), zxid.getXid()); } | /**
* Converts protobuf Zxid object to Zxid object.
*
* @param zxid the protobuf Zxid object.
* @return the Zxid object.
*/ | Converts protobuf Zxid object to Zxid object | fromProtoZxid | {
"repo_name": "fpj/jzab",
"path": "src/main/java/com/github/zk1931/jzab/MessageBuilder.java",
"license": "apache-2.0",
"size": 23166
} | [
"com.github.zk1931.jzab.proto.ZabMessage"
] | import com.github.zk1931.jzab.proto.ZabMessage; | import com.github.zk1931.jzab.proto.*; | [
"com.github.zk1931"
] | com.github.zk1931; | 1,950,849 |
public byte[] encodeBase(Response response) {
int outputSize = 4 // request id
+ 1 // opcode
+ 1; // status
ByteBuffer buffer = ByteBuffer.allocate(outputSize);
buffer.put(response.getOpCode());
buffer.putInt(response.getReq... | byte[] function(Response response) { int outputSize = 4 + 1 + 1; ByteBuffer buffer = ByteBuffer.allocate(outputSize); buffer.put(response.getOpCode()); buffer.putInt(response.getRequestId()); buffer.put(response.getStatus()); return buffer.array(); } | /**
* Encode a simple, base response.
*
* @param response The base response.
* @return
*/ | Encode a simple, base response | encodeBase | {
"repo_name": "tzaeschke/distributed-phtree",
"path": "codec/src/main/java/ch/ethz/globis/disindex/codec/ByteResponseEncoder.java",
"license": "agpl-3.0",
"size": 5501
} | [
"ch.ethz.globis.distindex.operation.response.Response",
"java.nio.ByteBuffer"
] | import ch.ethz.globis.distindex.operation.response.Response; import java.nio.ByteBuffer; | import ch.ethz.globis.distindex.operation.response.*; import java.nio.*; | [
"ch.ethz.globis",
"java.nio"
] | ch.ethz.globis; java.nio; | 890,946 |
@Test
public void test2Build() throws Exception {
SendMessageRequest request = new SendMessageRequest();
request.setClientId("test");
String message = "<message><subject>This is a test</subject><content>Tell me a story</content></message>";
request.setContent(message);
request.setContentType("te... | void function() throws Exception { SendMessageRequest request = new SendMessageRequest(); request.setClientId("test"); String message = STR; request.setContent(message); request.setContentType("text"); request.setRequestAck(true); AppEntity app = new AppEntity(); app.setAppId(STR); app.setServerUserId(STR); MessageBuil... | /**
* Test with content containing XML characters.
* @throws Exception
*/ | Test with content containing XML characters | test2Build | {
"repo_name": "sanyaade-iot/message-server",
"path": "server/plugins/mmxmgmt/src/test/java/com/magnet/mmx/server/plugin/mmxmgmt/message/MessageBuilderTest.java",
"license": "apache-2.0",
"size": 4619
} | [
"com.magnet.mmx.protocol.Constants",
"com.magnet.mmx.server.common.data.AppEntity",
"com.magnet.mmx.server.plugin.mmxmgmt.util.MMXServerConstants",
"com.magnet.mmx.server.plugin.mmxmgmt.web.SendMessageRequest",
"junit.framework.Assert",
"org.dom4j.Element",
"org.junit.Assert",
"org.xmpp.packet.Message... | import com.magnet.mmx.protocol.Constants; import com.magnet.mmx.server.common.data.AppEntity; import com.magnet.mmx.server.plugin.mmxmgmt.util.MMXServerConstants; import com.magnet.mmx.server.plugin.mmxmgmt.web.SendMessageRequest; import junit.framework.Assert; import org.dom4j.Element; import org.junit.Assert; import ... | import com.magnet.mmx.protocol.*; import com.magnet.mmx.server.common.data.*; import com.magnet.mmx.server.plugin.mmxmgmt.util.*; import com.magnet.mmx.server.plugin.mmxmgmt.web.*; import junit.framework.*; import org.dom4j.*; import org.junit.*; import org.xmpp.packet.*; | [
"com.magnet.mmx",
"junit.framework",
"org.dom4j",
"org.junit",
"org.xmpp.packet"
] | com.magnet.mmx; junit.framework; org.dom4j; org.junit; org.xmpp.packet; | 42,443 |
public static java.util.Set extractSurgicalOperationNotesSet(ims.domain.ILightweightDomainFactory domainFactory, ims.clinical.vo.SurgicalOperationNotesVoCollection voCollection)
{
return extractSurgicalOperationNotesSet(domainFactory, voCollection, null, new HashMap());
}
| static java.util.Set function(ims.domain.ILightweightDomainFactory domainFactory, ims.clinical.vo.SurgicalOperationNotesVoCollection voCollection) { return extractSurgicalOperationNotesSet(domainFactory, voCollection, null, new HashMap()); } | /**
* Create the ims.clinical.domain.objects.SurgicalOperationNotes set from the value object collection.
* @param domainFactory - used to create existing (persistent) domain objects.
* @param voCollection - the collection of value objects
*/ | Create the ims.clinical.domain.objects.SurgicalOperationNotes set from the value object collection | extractSurgicalOperationNotesSet | {
"repo_name": "open-health-hub/openMAXIMS",
"path": "openmaxims_workspace/ValueObjects/src/ims/clinical/vo/domain/SurgicalOperationNotesVoAssembler.java",
"license": "agpl-3.0",
"size": 25981
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 1,387,196 |
@Function(name = "cbrt", arity = 1)
public static Object cbrt(ExecutionContext cx, Object thisValue, Object x) {
return Math.cbrt(ToNumber(cx, x));
} | @Function(name = "cbrt", arity = 1) static Object function(ExecutionContext cx, Object thisValue, Object x) { return Math.cbrt(ToNumber(cx, x)); } | /**
* 20.2.2.9 Math.cbrt(x)
*
* @param cx
* the execution context
* @param thisValue
* the function this-value
* @param x
* the argument number
* @return the cubic root of its argument
*/ | 20.2.2.9 Math.cbrt(x) | cbrt | {
"repo_name": "anba/es6draft",
"path": "src/main/java/com/github/anba/es6draft/runtime/objects/number/MathObject.java",
"license": "mit",
"size": 31918
} | [
"com.github.anba.es6draft.runtime.AbstractOperations",
"com.github.anba.es6draft.runtime.ExecutionContext",
"com.github.anba.es6draft.runtime.internal.Properties"
] | import com.github.anba.es6draft.runtime.AbstractOperations; import com.github.anba.es6draft.runtime.ExecutionContext; import com.github.anba.es6draft.runtime.internal.Properties; | import com.github.anba.es6draft.runtime.*; import com.github.anba.es6draft.runtime.internal.*; | [
"com.github.anba"
] | com.github.anba; | 1,946,979 |
public SmoothCurve2D asCurve(Point2D lastControl, Point2D lastStart) {
return null;
}
| SmoothCurve2D function(Point2D lastControl, Point2D lastStart) { return null; } | /**
* Returns null.
*/ | Returns null | asCurve | {
"repo_name": "pokowaka/android-geom",
"path": "geom/src/main/java/math/geom2d/spline/GeneralPath2D.java",
"license": "lgpl-2.1",
"size": 29759
} | [
"math.geom2d.Point2D",
"math.geom2d.curve.SmoothCurve2D"
] | import math.geom2d.Point2D; import math.geom2d.curve.SmoothCurve2D; | import math.geom2d.*; import math.geom2d.curve.*; | [
"math.geom2d",
"math.geom2d.curve"
] | math.geom2d; math.geom2d.curve; | 1,091,474 |
public List<String> getStringWithInvalid() throws ServiceException {
try {
Call<ResponseBody> call = service.getStringWithInvalid();
ServiceResponse<List<String>> response = getStringWithInvalidDelegate(call.execute(), null);
return response.getBody();
} catch (Se... | List<String> function() throws ServiceException { try { Call<ResponseBody> call = service.getStringWithInvalid(); ServiceResponse<List<String>> response = getStringWithInvalidDelegate(call.execute(), null); return response.getBody(); } catch (ServiceException ex) { throw ex; } catch (Exception ex) { throw new ServiceEx... | /**
* Get string array value ['foo', 123, 'foo2']
*
* @return the List<String> object if successful.
* @throws ServiceException the exception wrapped in ServiceException if failed.
*/ | Get string array value ['foo', 123, 'foo2'] | getStringWithInvalid | {
"repo_name": "BretJohnson/autorest",
"path": "AutoRest/Generators/Java/Java.Tests/src/main/java/fixtures/bodyarray/ArrayImpl.java",
"license": "mit",
"size": 128720
} | [
"com.microsoft.rest.ServiceException",
"com.microsoft.rest.ServiceResponse",
"com.squareup.okhttp.ResponseBody",
"java.util.List"
] | import com.microsoft.rest.ServiceException; import com.microsoft.rest.ServiceResponse; import com.squareup.okhttp.ResponseBody; import java.util.List; | import com.microsoft.rest.*; import com.squareup.okhttp.*; import java.util.*; | [
"com.microsoft.rest",
"com.squareup.okhttp",
"java.util"
] | com.microsoft.rest; com.squareup.okhttp; java.util; | 1,406,159 |
@Test(expectedExceptions = { LDAPException.class })
public void testGetSearchReferenceInvalidGenericType()
throws Exception
{
final Control[] controls =
{
new Control(GetServerIDResponseControl.GET_SERVER_ID_RESPONSE_OID, false,
null)
};
final SearchResultReference r = n... | @Test(expectedExceptions = { LDAPException.class }) void function() throws Exception { final Control[] controls = { new Control(GetServerIDResponseControl.GET_SERVER_ID_RESPONSE_OID, false, null) }; final SearchResultReference r = new SearchResultReference( new String[] { "ldap: controls); GetServerIDResponseControl.ge... | /**
* Tests the {@code get} method with a result that contains a response control
* that is a generic control that cannot be parsed as a get server ID response
* control.
*
* @throws Exception If an unexpected problem occurs.
*/ | Tests the get method with a result that contains a response control that is a generic control that cannot be parsed as a get server ID response control | testGetSearchReferenceInvalidGenericType | {
"repo_name": "UnboundID/ldapsdk",
"path": "tests/unit/src/com/unboundid/ldap/sdk/unboundidds/controls/GetServerIDResponseControlTestCase.java",
"license": "gpl-2.0",
"size": 11471
} | [
"com.unboundid.ldap.sdk.Control",
"com.unboundid.ldap.sdk.LDAPException",
"com.unboundid.ldap.sdk.SearchResultReference",
"org.testng.annotations.Test"
] | import com.unboundid.ldap.sdk.Control; import com.unboundid.ldap.sdk.LDAPException; import com.unboundid.ldap.sdk.SearchResultReference; import org.testng.annotations.Test; | import com.unboundid.ldap.sdk.*; import org.testng.annotations.*; | [
"com.unboundid.ldap",
"org.testng.annotations"
] | com.unboundid.ldap; org.testng.annotations; | 925,540 |
public static int getTcpBacklog(int tcpBacklog) {
// Taken from netty.
// As a SecurityManager may prevent reading the somaxconn file we wrap this in a privileged block.
//
// See https://github.com/netty/netty/issues/3680
return AccessController.doPrivileged((PrivilegedActi... | static int function(int tcpBacklog) { return AccessController.doPrivileged((PrivilegedAction<Integer>) () -> { final File file = new File(TCP_BACKLOG_SETTING_LOCATION); try (BufferedReader in = new BufferedReader(new FileReader(file))) { return Integer.parseInt(in.readLine().trim()); } catch (SecurityException IOExcept... | /**
* The SOMAXCONN value of the current machine. If failed to get the value, <code>defaultBacklog</code> argument is
* used
*/ | The SOMAXCONN value of the current machine. If failed to get the value, <code>defaultBacklog</code> argument is used | getTcpBacklog | {
"repo_name": "Alexey1Gavrilov/dropwizard",
"path": "dropwizard-jetty/src/main/java/io/dropwizard/jetty/NetUtil.java",
"license": "apache-2.0",
"size": 5916
} | [
"java.io.BufferedReader",
"java.io.File",
"java.io.FileReader",
"java.io.IOException",
"java.security.AccessController",
"java.security.PrivilegedAction"
] | import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.security.AccessController; import java.security.PrivilegedAction; | import java.io.*; import java.security.*; | [
"java.io",
"java.security"
] | java.io; java.security; | 1,166,818 |
public void testRewrite2() throws Exception
{
File out = null;
boolean success = true;
try
{
File in = new File(m_basedir + "/sample1.xml");
ProjectFile xml = new MSPDIReader().read(in);
out = File.createTempFile("junit", ".xml");
new MSPDIWriter().writ... | void function() throws Exception { File out = null; boolean success = true; try { File in = new File(m_basedir + STR); ProjectFile xml = new MSPDIReader().read(in); out = File.createTempFile("junit", ".xml"); new MSPDIWriter().write(xml, out); success = FileUtility.equals(in, out); assertTrue(STR, success); } finally {... | /**
* This method performs a simple data driven test to read then write
* the contents of a single MPX file. Assuming the MPX file contains
* at least one example of each type of record, this test will be able
* to exercise a large part of the MPX library.
*/ | This method performs a simple data driven test to read then write the contents of a single MPX file. Assuming the MPX file contains at least one example of each type of record, this test will be able to exercise a large part of the MPX library | testRewrite2 | {
"repo_name": "tmyroadctfig/mpxj",
"path": "net/sf/mpxj/junit/BasicTest.java",
"license": "lgpl-2.1",
"size": 75163
} | [
"java.io.File",
"net.sf.mpxj.ProjectFile",
"net.sf.mpxj.mspdi.MSPDIReader",
"net.sf.mpxj.mspdi.MSPDIWriter"
] | import java.io.File; import net.sf.mpxj.ProjectFile; import net.sf.mpxj.mspdi.MSPDIReader; import net.sf.mpxj.mspdi.MSPDIWriter; | import java.io.*; import net.sf.mpxj.*; import net.sf.mpxj.mspdi.*; | [
"java.io",
"net.sf.mpxj"
] | java.io; net.sf.mpxj; | 1,724,511 |
public static void main(String [] args) {
if (args.length < 1 || args[0].isEmpty()) {
throw new IllegalArgumentException(
"YAML simulation configuration file path must be provided.");
}
// Open the config file
Path configFilePath = Paths.get(args[0]);
File configFile = new File(... | static void function(String [] args) { if (args.length < 1 args[0].isEmpty()) { throw new IllegalArgumentException( STR); } Path configFilePath = Paths.get(args[0]); File configFile = new File(configFilePath.toString()); FileInputStream inputStream; try { inputStream = new FileInputStream(configFile); } catch (FileNotF... | /**
* Executes a physiology simulation according to a given configuration file.
* @param args command line arguments
*/ | Executes a physiology simulation according to a given configuration file | main | {
"repo_name": "synthetichealth/synthea",
"path": "src/main/java/org/mitre/synthea/engine/PhysiologySimulator.java",
"license": "apache-2.0",
"size": 15573
} | [
"java.io.File",
"java.io.FileInputStream",
"java.io.FileNotFoundException",
"java.io.IOException",
"java.nio.file.Files",
"java.nio.file.Path",
"java.nio.file.Paths",
"org.apache.commons.math.ode.DerivativeException",
"org.mitre.synthea.helpers.ChartRenderer",
"org.simulator.math.odes.MultiTable",... | import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import org.apache.commons.math.ode.DerivativeException; import org.mitre.synthea.helpers.ChartRenderer; import org.sim... | import java.io.*; import java.nio.file.*; import org.apache.commons.math.ode.*; import org.mitre.synthea.helpers.*; import org.simulator.math.odes.*; import org.yaml.snakeyaml.*; import org.yaml.snakeyaml.constructor.*; | [
"java.io",
"java.nio",
"org.apache.commons",
"org.mitre.synthea",
"org.simulator.math",
"org.yaml.snakeyaml"
] | java.io; java.nio; org.apache.commons; org.mitre.synthea; org.simulator.math; org.yaml.snakeyaml; | 282,200 |
public final void setReplacementLength(int length) {
Assert.isLegal(length >= 0);
fUserReplacementLength= length;
} | final void function(int length) { Assert.isLegal(length >= 0); fUserReplacementLength= length; } | /**
* If the replacement length is set, it overrides the length returned from
* the content assist infrastructure. Use this setting if code assist is
* called with a none empty selection.
*
* @param length the new replacement length, relative to the code assist
* offset. Must be equal to or greater t... | If the replacement length is set, it overrides the length returned from the content assist infrastructure. Use this setting if code assist is called with a none empty selection | setReplacementLength | {
"repo_name": "brunyuriy/quick-fix-scout",
"path": "org.eclipse.jdt.ui_3.7.1.r371_v20110824-0800/src/org/eclipse/jdt/ui/text/java/CompletionProposalCollector.java",
"license": "mit",
"size": 34165
} | [
"org.eclipse.core.runtime.Assert"
] | import org.eclipse.core.runtime.Assert; | import org.eclipse.core.runtime.*; | [
"org.eclipse.core"
] | org.eclipse.core; | 805,569 |
public static void drawContour(Mat image, MatOfPoint contour, Scalar color, boolean fill) {
ArrayList<MatOfPoint> tmp = new ArrayList<>();
tmp.add(contour);
Imgproc.drawContours(image, tmp, 0, color, fill ? -1 : 1);
}
| static void function(Mat image, MatOfPoint contour, Scalar color, boolean fill) { ArrayList<MatOfPoint> tmp = new ArrayList<>(); tmp.add(contour); Imgproc.drawContours(image, tmp, 0, color, fill ? -1 : 1); } | /**
* Wrapper function around Imgproc.drawContours to draw a single contour
* @param image The image
* @param contour The contour
* @param color The color
* @param fill Fill the contour or paint strokes only
*/ | Wrapper function around Imgproc.drawContours to draw a single contour | drawContour | {
"repo_name": "Aletheios/MIME",
"path": "app/src/main/java/de/lmu/ifi/medien/mime/OpenCVUtil.java",
"license": "gpl-2.0",
"size": 7392
} | [
"java.util.ArrayList",
"org.opencv.core.Mat",
"org.opencv.core.MatOfPoint",
"org.opencv.core.Scalar",
"org.opencv.imgproc.Imgproc"
] | import java.util.ArrayList; import org.opencv.core.Mat; import org.opencv.core.MatOfPoint; import org.opencv.core.Scalar; import org.opencv.imgproc.Imgproc; | import java.util.*; import org.opencv.core.*; import org.opencv.imgproc.*; | [
"java.util",
"org.opencv.core",
"org.opencv.imgproc"
] | java.util; org.opencv.core; org.opencv.imgproc; | 824,057 |
public void setData(byte[] data) {
if (data != null) {
this.data = Arrays.copyOf(data, data.length);
}
} | void function(byte[] data) { if (data != null) { this.data = Arrays.copyOf(data, data.length); } } | /**
* Set private data on pipeline.
*
* @param data -- private data.
*/ | Set private data on pipeline | setData | {
"repo_name": "ChetnaChaudhari/hadoop",
"path": "hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/container/common/helpers/Pipeline.java",
"license": "apache-2.0",
"size": 7276
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 2,157,369 |
CapacitySchedulerConfiguration loadConfiguration(Configuration conf)
throws IOException; | CapacitySchedulerConfiguration loadConfiguration(Configuration conf) throws IOException; | /**
* Loads capacity scheduler configuration object.
* @param conf initial bootstrap configuration
* @return CS configuration
* @throws IOException if fail to retrieve configuration
*/ | Loads capacity scheduler configuration object | loadConfiguration | {
"repo_name": "dennishuo/hadoop",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/conf/CSConfigurationProvider.java",
"license": "apache-2.0",
"size": 1816
} | [
"java.io.IOException",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacitySchedulerConfiguration"
] | import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacitySchedulerConfiguration; | import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,833,399 |
public void setAxisOrder(List<Axis> axisOrder); | void function(List<Axis> axisOrder); | /**
* Set the axis checking order, length must be 3, use Axis.NONE for
* skipping.
*
* @param axisOrder
* @throws UnsupportedOperationException
* If setting the order of axes is not supported.
*/ | Set the axis checking order, length must be 3, use Axis.NONE for skipping | setAxisOrder | {
"repo_name": "NoCheatPlus/NoCheatPlus",
"path": "NCPCore/src/main/java/fr/neatmonster/nocheatplus/utilities/collision/ICollidePassable.java",
"license": "gpl-3.0",
"size": 3319
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 157,199 |
@SuppressWarnings("rawtypes")
@Override
public boolean equals(Object other) {
if (!(other instanceof ArrayWrapper)) {
return false;
}
return Arrays.equals(_array, ((ArrayWrapper) other)._array);
} | @SuppressWarnings(STR) boolean function(Object other) { if (!(other instanceof ArrayWrapper)) { return false; } return Arrays.equals(_array, ((ArrayWrapper) other)._array); } | /**
* Determines if this object has a value equivalent to another object.
*
* @see Arrays#equals(Object[], Object[])
*/ | Determines if this object has a value equivalent to another object | equals | {
"repo_name": "korotyx/VirtualEntity",
"path": "src/main/java/com/korotyx/virtualentity/json/ArrayWrapper.java",
"license": "mit",
"size": 2683
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 585,002 |
private DetailNode getJavadocTree(DetailAST blockComment) {
DetailNode javadocTree = blockCommentToJavadocTree.get(blockComment);
if (javadocTree == null) {
javadocTree = new JavadocDetailNodeParser().parseJavadocAsDetailNode(blockComment)
.getTree();
bloc... | DetailNode function(DetailAST blockComment) { DetailNode javadocTree = blockCommentToJavadocTree.get(blockComment); if (javadocTree == null) { javadocTree = new JavadocDetailNodeParser().parseJavadocAsDetailNode(blockComment) .getTree(); blockCommentToJavadocTree.put(blockComment, javadocTree); } return javadocTree; } | /**
* Gets Javadoc (DetailNode) tree of specified block comments.
* @param blockComment Javadoc comment as a block comment
* @return DetailNode tree
*/ | Gets Javadoc (DetailNode) tree of specified block comments | getJavadocTree | {
"repo_name": "sharang108/checkstyle",
"path": "src/main/java/com/puppycrawl/tools/checkstyle/gui/ParseTreeTablePresentation.java",
"license": "lgpl-2.1",
"size": 11689
} | [
"com.puppycrawl.tools.checkstyle.JavadocDetailNodeParser",
"com.puppycrawl.tools.checkstyle.api.DetailAST",
"com.puppycrawl.tools.checkstyle.api.DetailNode"
] | import com.puppycrawl.tools.checkstyle.JavadocDetailNodeParser; import com.puppycrawl.tools.checkstyle.api.DetailAST; import com.puppycrawl.tools.checkstyle.api.DetailNode; | import com.puppycrawl.tools.checkstyle.*; import com.puppycrawl.tools.checkstyle.api.*; | [
"com.puppycrawl.tools"
] | com.puppycrawl.tools; | 1,622,994 |
public void close() throws IOException {
if (debug > 1) {
System.out.println("close() @ CompressionResponseStream");
}
if (closed)
throw new IOException("This output stream has already been closed");
if (gzipstream != null) {
flushToGZip... | void function() throws IOException { if (debug > 1) { System.out.println(STR); } if (closed) throw new IOException(STR); if (gzipstream != null) { flushToGZip(); gzipstream.close(); gzipstream = null; } else { if (bufferCount > 0) { if (debug > 2) { System.out.print(STR); System.out.write(buffer, 0, bufferCount); Syste... | /**
* Close this output stream, causing any buffered data to be flushed and
* any further output data to throw an IOException.
*/ | Close this output stream, causing any buffered data to be flushed and any further output data to throw an IOException | close | {
"repo_name": "yuyupapa/OpenSource",
"path": "apache-tomcat-6.0.48/webapps/examples/WEB-INF/classes/compressionFilters/CompressionResponseStream.java",
"license": "apache-2.0",
"size": 9228
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,811,299 |
@Override Queryable<TSource> except(Enumerable<TSource> enumerable,
EqualityComparer<TSource> comparer); | @Override Queryable<TSource> except(Enumerable<TSource> enumerable, EqualityComparer<TSource> comparer); | /**
* Produces the set difference of two sequences by
* using the specified {@code EqualityComparer<TSource>} to compare
* values, eliminate duplicates.
*/ | Produces the set difference of two sequences by using the specified EqualityComparer to compare values, eliminate duplicates | except | {
"repo_name": "julianhyde/calcite",
"path": "linq4j/src/main/java/org/apache/calcite/linq4j/ExtendedQueryable.java",
"license": "apache-2.0",
"size": 26708
} | [
"org.apache.calcite.linq4j.function.EqualityComparer"
] | import org.apache.calcite.linq4j.function.EqualityComparer; | import org.apache.calcite.linq4j.function.*; | [
"org.apache.calcite"
] | org.apache.calcite; | 1,938,371 |
public Event createCalendarEvent(Event eventToCreate) throws ExecutionException, InterruptedException {
return mCalendarClient
.getMe()
.getEvents()
.select("ID")
.add(eventToCreate).get();
} | Event function(Event eventToCreate) throws ExecutionException, InterruptedException { return mCalendarClient .getMe() .getEvents() .select("ID") .add(eventToCreate).get(); } | /**
* Create a calendar event based off a full Event object passed to this method.
*
* @return the same Event object updated with the ID from the server.
*/ | Create a calendar event based off a full Event object passed to this method | createCalendarEvent | {
"repo_name": "OfficeDev/O365-Android-Snippets",
"path": "app/src/main/java/com/microsoft/office365/snippetapp/Snippets/CalendarSnippets.java",
"license": "mit",
"size": 16362
} | [
"com.microsoft.outlookservices.Event",
"java.util.concurrent.ExecutionException"
] | import com.microsoft.outlookservices.Event; import java.util.concurrent.ExecutionException; | import com.microsoft.outlookservices.*; import java.util.concurrent.*; | [
"com.microsoft.outlookservices",
"java.util"
] | com.microsoft.outlookservices; java.util; | 1,279,927 |
@Test
public void testFetchAllIsoDomainOldestFile() {
List<RepoFileMetaData> listOfIsoFiles = repoFileMetaDataDao
.getAllRepoFilesForAllStoragePools(StorageDomainType.ISO,
StoragePoolStatus.Up,
StorageDomainStatus.Active,
... | void function() { List<RepoFileMetaData> listOfIsoFiles = repoFileMetaDataDao .getAllRepoFilesForAllStoragePools(StorageDomainType.ISO, StoragePoolStatus.Up, StorageDomainStatus.Active, VDSStatus.Up); List<RepoFileMetaData> listOfFloppyFiles = repoFileMetaDataDao .getRepoListForStorageDomain(FixturesTool.SHARED_ISO_STO... | /**
* Test fetch of all storage pools and check if fetched the oldest file,
* when fetching all the repository files.
*/ | Test fetch of all storage pools and check if fetched the oldest file, when fetching all the repository files | testFetchAllIsoDomainOldestFile | {
"repo_name": "jbeecham/ovirt-engine",
"path": "backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/RepoFileMetaDataDAOTest.java",
"license": "apache-2.0",
"size": 13014
} | [
"java.util.List",
"org.junit.Assert",
"org.ovirt.engine.core.common.businessentities.FileTypeExtension",
"org.ovirt.engine.core.common.businessentities.RepoFileMetaData",
"org.ovirt.engine.core.common.businessentities.StorageDomainStatus",
"org.ovirt.engine.core.common.businessentities.StorageDomainType",... | import java.util.List; import org.junit.Assert; import org.ovirt.engine.core.common.businessentities.FileTypeExtension; import org.ovirt.engine.core.common.businessentities.RepoFileMetaData; import org.ovirt.engine.core.common.businessentities.StorageDomainStatus; import org.ovirt.engine.core.common.businessentities.St... | import java.util.*; import org.junit.*; import org.ovirt.engine.core.common.businessentities.*; | [
"java.util",
"org.junit",
"org.ovirt.engine"
] | java.util; org.junit; org.ovirt.engine; | 317,898 |
@Test
public void testAddAnnotationProcessorWithOptions() throws Exception {
AnnotationProcessingScenario scenario = new AnnotationProcessingScenario();
scenario.addAnnotationProcessorTarget(AnnotationProcessorTarget.VALID_JAVA_BINARY);
scenario.getAnnotationProcessingParamsBuilder().addAllProcessors(
... | void function() throws Exception { AnnotationProcessingScenario scenario = new AnnotationProcessingScenario(); scenario.addAnnotationProcessorTarget(AnnotationProcessorTarget.VALID_JAVA_BINARY); scenario.getAnnotationProcessingParamsBuilder().addAllProcessors( ImmutableList.of(STR)); scenario.getAnnotationProcessingPar... | /**
* Verify adding an annotation processor java binary with options.
*/ | Verify adding an annotation processor java binary with options | testAddAnnotationProcessorWithOptions | {
"repo_name": "sdwilsh/buck",
"path": "test/com/facebook/buck/jvm/java/DefaultJavaLibraryTest.java",
"license": "apache-2.0",
"size": 62728
} | [
"com.facebook.buck.testutil.MoreAsserts",
"com.google.common.collect.ImmutableList",
"org.junit.Assert"
] | import com.facebook.buck.testutil.MoreAsserts; import com.google.common.collect.ImmutableList; import org.junit.Assert; | import com.facebook.buck.testutil.*; import com.google.common.collect.*; import org.junit.*; | [
"com.facebook.buck",
"com.google.common",
"org.junit"
] | com.facebook.buck; com.google.common; org.junit; | 60,134 |
private final Class<?> getValueType(final JsonNode value) {
if (value.isArray()) {
return List.class;
} else if (value.isBoolean()) {
return Boolean.class;
} else if (value.isNumber()) {
return Double.class;
} else {
return String.class;
}
} | final Class<?> function(final JsonNode value) { if (value.isArray()) { return List.class; } else if (value.isBoolean()) { return Boolean.class; } else if (value.isNumber()) { return Double.class; } else { return String.class; } } | /**
* Check data type. All numbers will be set to Double.
*
* @param value
* @return
*
*/ | Check data type. All numbers will be set to Double | getValueType | {
"repo_name": "idekerlab/cyREST",
"path": "src/main/java/org/cytoscape/rest/internal/datamapper/TableMapper.java",
"license": "mit",
"size": 7676
} | [
"com.fasterxml.jackson.databind.JsonNode",
"java.util.List"
] | import com.fasterxml.jackson.databind.JsonNode; import java.util.List; | import com.fasterxml.jackson.databind.*; import java.util.*; | [
"com.fasterxml.jackson",
"java.util"
] | com.fasterxml.jackson; java.util; | 2,337,703 |
if (path.equals(watcher.splitLogZNode)) {
if (LOG.isTraceEnabled()) LOG.trace("tasks arrived or departed on " + path);
synchronized (taskReadyLock) {
taskReadySeq++;
taskReadyLock.notify();
}
}
}
/**
* Override handler from {@link ZooKeeperListener} | if (path.equals(watcher.splitLogZNode)) { if (LOG.isTraceEnabled()) LOG.trace(STR + path); synchronized (taskReadyLock) { taskReadySeq++; taskReadyLock.notify(); } } } /** * Override handler from {@link ZooKeeperListener} | /**
* Override handler from {@link ZooKeeperListener}
*/ | Override handler from <code>ZooKeeperListener</code> | nodeChildrenChanged | {
"repo_name": "juwi/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZkSplitLogWorkerCoordination.java",
"license": "apache-2.0",
"size": 23994
} | [
"org.apache.hadoop.hbase.zookeeper.ZooKeeperListener"
] | import org.apache.hadoop.hbase.zookeeper.ZooKeeperListener; | import org.apache.hadoop.hbase.zookeeper.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,144,733 |
public List<String> trafficManagerHostNames() {
return this.trafficManagerHostNames;
} | List<String> function() { return this.trafficManagerHostNames; } | /**
* Get the trafficManagerHostNames property: Azure Traffic Manager hostnames associated with the app. Read-only.
*
* @return the trafficManagerHostNames value.
*/ | Get the trafficManagerHostNames property: Azure Traffic Manager hostnames associated with the app. Read-only | trafficManagerHostNames | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanagerhybrid/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/models/SitePropertiesInner.java",
"license": "mit",
"size": 28448
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,692,050 |
@Message(id = 175, value = "Resource %s does not exist; a resource at address %s cannot be created until all ancestor resources have been added")
OperationFailedRuntimeException resourceNotFound(PathAddress ancestor, PathAddress address); | @Message(id = 175, value = STR) OperationFailedRuntimeException resourceNotFound(PathAddress ancestor, PathAddress address); | /**
* Creates an exception indicating a resource does not exist.
*
* @param ancestor the ancestor path.
* @param address the address.
*
* @return an {@link OperationFailedRuntimeException} for the error.
*/ | Creates an exception indicating a resource does not exist | resourceNotFound | {
"repo_name": "aloubyansky/wildfly-core",
"path": "controller/src/main/java/org/jboss/as/controller/logging/ControllerLogger.java",
"license": "lgpl-2.1",
"size": 164970
} | [
"org.jboss.as.controller.PathAddress",
"org.jboss.as.controller._private.OperationFailedRuntimeException",
"org.jboss.logging.annotations.Message"
] | import org.jboss.as.controller.PathAddress; import org.jboss.as.controller._private.OperationFailedRuntimeException; import org.jboss.logging.annotations.Message; | import org.jboss.as.controller.*; import org.jboss.as.controller._private.*; import org.jboss.logging.annotations.*; | [
"org.jboss.as",
"org.jboss.logging"
] | org.jboss.as; org.jboss.logging; | 79,149 |
private TransformerHandler createXmlDocument(StringWriter output)
throws TransformerFactoryConfigurationError,
TransformerConfigurationException {
StreamResult result = new StreamResult(output);
SAXTransformerFactory tf = (SAXTransformerFactory) SAXTransformerFac... | TransformerHandler function(StringWriter output) throws TransformerFactoryConfigurationError, TransformerConfigurationException { StreamResult result = new StreamResult(output); SAXTransformerFactory tf = (SAXTransformerFactory) SAXTransformerFactory .newInstance(); TransformerHandler transformer = tf.newTransformerHan... | /**
* <p>
* Helper method to abstract away the drudgery of getting the XML
* transformer.
* </p>
*
* @param output
* Output Stream
* @return XML Transformer for generating XML
*
* @throws TransformerFactoryConfigurationError
* If... | Helper method to abstract away the drudgery of getting the XML transformer. | createXmlDocument | {
"repo_name": "Microsoft/BeanSpy",
"path": "source/code/JEE/Common/src/com/interopbridges/scx/xml/StatisticXMLTransformer.java",
"license": "apache-2.0",
"size": 10324
} | [
"java.io.StringWriter",
"javax.xml.transform.OutputKeys",
"javax.xml.transform.Transformer",
"javax.xml.transform.TransformerConfigurationException",
"javax.xml.transform.TransformerFactoryConfigurationError",
"javax.xml.transform.sax.SAXTransformerFactory",
"javax.xml.transform.sax.TransformerHandler",... | import java.io.StringWriter; import javax.xml.transform.OutputKeys; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerConfigurationException; import javax.xml.transform.TransformerFactoryConfigurationError; import javax.xml.transform.sax.SAXTransformerFactory; import javax.xml.transform.sax.... | import java.io.*; import javax.xml.transform.*; import javax.xml.transform.sax.*; import javax.xml.transform.stream.*; | [
"java.io",
"javax.xml"
] | java.io; javax.xml; | 1,338,092 |
public int nextIvl(Card card, int ease) {
try {
if (card.getQueue() == 0 || card.getQueue() == 1 || card.getQueue() == 3) {
return _nextLrnIvl(card, ease);
} else if (ease == 1) {
// lapsed
JSONObject conf = _lapseConf(card);
... | int function(Card card, int ease) { try { if (card.getQueue() == 0 card.getQueue() == 1 card.getQueue() == 3) { return _nextLrnIvl(card, ease); } else if (ease == 1) { JSONObject conf = _lapseConf(card); if (conf.getJSONArray(STR).length() > 0) { return (int) (conf.getJSONArray(STR).getDouble(0) * 60.0); } return _next... | /**
* Return the next interval for CARD, in seconds.
*/ | Return the next interval for CARD, in seconds | nextIvl | {
"repo_name": "federvieh/Anki-Android",
"path": "AnkiDroid/src/main/java/com/ichi2/libanki/Sched.java",
"license": "gpl-3.0",
"size": 90697
} | [
"org.json.JSONException",
"org.json.JSONObject"
] | import org.json.JSONException; import org.json.JSONObject; | import org.json.*; | [
"org.json"
] | org.json; | 1,981,839 |
void uploadProjectProperties(Project project, List<Props> properties)
throws ProjectManagerException; | void uploadProjectProperties(Project project, List<Props> properties) throws ProjectManagerException; | /**
* Upload Project properties. Map contains key value of path and properties
*/ | Upload Project properties. Map contains key value of path and properties | uploadProjectProperties | {
"repo_name": "chengren311/azkaban",
"path": "azkaban-common/src/main/java/azkaban/project/ProjectLoader.java",
"license": "apache-2.0",
"size": 7102
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 696,771 |
public static Card remove(int position) {
return cards.remove(position);
} | static Card function(int position) { return cards.remove(position); } | /**
* Removes card from the list
*
* @param position Index of the card to delete
* @return The removed card object
*/ | Removes card from the list | remove | {
"repo_name": "DerGenaue/TumCampusApp",
"path": "app/src/main/java/de/tum/in/tumcampus/models/managers/CardManager.java",
"license": "gpl-2.0",
"size": 5950
} | [
"de.tum.in.tumcampus.cards.Card"
] | import de.tum.in.tumcampus.cards.Card; | import de.tum.in.tumcampus.cards.*; | [
"de.tum.in"
] | de.tum.in; | 1,719,708 |
void putManifestToS3(String manifestKey, BackupManifest manifest) {
try {
byte[] bytes = EntityFactory.createJSONStringForEntity(manifest).getBytes(StandardCharsets.UTF_8);
ObjectMetadata metadata = new ObjectMetadata();
metadata.setContentLength(bytes.length);
metadata.setContentDisposition("applicati... | void putManifestToS3(String manifestKey, BackupManifest manifest) { try { byte[] bytes = EntityFactory.createJSONStringForEntity(manifest).getBytes(StandardCharsets.UTF_8); ObjectMetadata metadata = new ObjectMetadata(); metadata.setContentLength(bytes.length); metadata.setContentDisposition(STR); metadata.setContentTy... | /**
* Put the given manifest to S3.
* @param manifestKey
* @param manifest
*/ | Put the given manifest to S3 | putManifestToS3 | {
"repo_name": "Sage-Bionetworks/Synapse-Repository-Services",
"path": "services/repository-managers/src/main/java/org/sagebionetworks/repo/manager/migration/MigrationManagerImpl.java",
"license": "apache-2.0",
"size": 28747
} | [
"com.amazonaws.services.s3.model.ObjectMetadata",
"com.amazonaws.services.s3.model.PutObjectRequest",
"java.io.ByteArrayInputStream",
"java.nio.charset.StandardCharsets",
"org.sagebionetworks.repo.model.migration.BackupManifest",
"org.sagebionetworks.schema.adapter.JSONObjectAdapterException",
"org.sage... | import com.amazonaws.services.s3.model.ObjectMetadata; import com.amazonaws.services.s3.model.PutObjectRequest; import java.io.ByteArrayInputStream; import java.nio.charset.StandardCharsets; import org.sagebionetworks.repo.model.migration.BackupManifest; import org.sagebionetworks.schema.adapter.JSONObjectAdapterExcept... | import com.amazonaws.services.s3.model.*; import java.io.*; import java.nio.charset.*; import org.sagebionetworks.repo.model.migration.*; import org.sagebionetworks.schema.adapter.*; import org.sagebionetworks.schema.adapter.org.json.*; | [
"com.amazonaws.services",
"java.io",
"java.nio",
"org.sagebionetworks.repo",
"org.sagebionetworks.schema"
] | com.amazonaws.services; java.io; java.nio; org.sagebionetworks.repo; org.sagebionetworks.schema; | 1,885,916 |
@Test
public void testReservedKeyLabels() throws Exception {
assertFalse(BuildType.Selector.isReservedLabel(Label.parseAbsolute("//condition:a")));
assertTrue(BuildType.Selector.isReservedLabel(
Label.parseAbsolute(BuildType.Selector.DEFAULT_CONDITION_KEY)));
} | void function() throws Exception { assertFalse(BuildType.Selector.isReservedLabel(Label.parseAbsolute(" assertTrue(BuildType.Selector.isReservedLabel( Label.parseAbsolute(BuildType.Selector.DEFAULT_CONDITION_KEY))); } | /**
* Tests for "reserved" key labels (i.e. not intended to map to actual targets).
*/ | Tests for "reserved" key labels (i.e. not intended to map to actual targets) | testReservedKeyLabels | {
"repo_name": "mikelalcon/bazel",
"path": "src/test/java/com/google/devtools/build/lib/packages/BuildTypeTest.java",
"license": "apache-2.0",
"size": 16638
} | [
"com.google.devtools.build.lib.cmdline.Label",
"com.google.devtools.build.lib.packages.BuildType",
"org.junit.Assert"
] | import com.google.devtools.build.lib.cmdline.Label; import com.google.devtools.build.lib.packages.BuildType; import org.junit.Assert; | import com.google.devtools.build.lib.cmdline.*; import com.google.devtools.build.lib.packages.*; import org.junit.*; | [
"com.google.devtools",
"org.junit"
] | com.google.devtools; org.junit; | 2,809,151 |
protected TableResult parseResponse(final InputStream inStream, final int httpStatusCode, String etagFromHeader,
final OperationContext opContext, final TableRequestOptions options) throws InstantiationException,
IllegalAccessException, StorageException, JsonParseException, IOException {
... | TableResult function(final InputStream inStream, final int httpStatusCode, String etagFromHeader, final OperationContext opContext, final TableRequestOptions options) throws InstantiationException, IllegalAccessException, StorageException, JsonParseException, IOException { TableResult resObj; if (this.opType == TableOp... | /**
* Reserved for internal use. Parses the table operation response into a {@link TableResult} to return.
*
* @param inStream
* An <code>InputStream</code> which specifies the response to an insert operation.
* @param httpStatusCode
* An <code>int</code> which repre... | Reserved for internal use. Parses the table operation response into a <code>TableResult</code> to return | parseResponse | {
"repo_name": "esummers-msft/azure-storage-java",
"path": "microsoft-azure-storage/src/com/microsoft/azure/storage/table/TableOperation.java",
"license": "apache-2.0",
"size": 43617
} | [
"com.fasterxml.jackson.core.JsonParseException",
"com.microsoft.azure.storage.OperationContext",
"com.microsoft.azure.storage.StorageException",
"java.io.IOException",
"java.io.InputStream"
] | import com.fasterxml.jackson.core.JsonParseException; import com.microsoft.azure.storage.OperationContext; import com.microsoft.azure.storage.StorageException; import java.io.IOException; import java.io.InputStream; | import com.fasterxml.jackson.core.*; import com.microsoft.azure.storage.*; import java.io.*; | [
"com.fasterxml.jackson",
"com.microsoft.azure",
"java.io"
] | com.fasterxml.jackson; com.microsoft.azure; java.io; | 1,270,670 |
@Override
@SuppressWarnings("unchecked")
void mapValues(final ExpressionList parameterList) {
// Lower left point.
parameterList.getExpressions().add(lon1);
parameterList.getExpressions().add(lat1);
// Upper right point.
parameterList.getExpressions().add(lon2);
... | @SuppressWarnings(STR) void mapValues(final ExpressionList parameterList) { parameterList.getExpressions().add(lon1); parameterList.getExpressions().add(lat1); parameterList.getExpressions().add(lon2); parameterList.getExpressions().add(lat2); } | /**
* Map this shape's values to ORACLE ORDINATE function parameters.
*
* @param parameterList The ExpressionList to add parameters to.
*/ | Map this shape's values to ORACLE ORDINATE function parameters | mapValues | {
"repo_name": "opencadc/tap",
"path": "cadc-tap-server-oracle/src/main/java/ca/nrc/cadc/tap/parser/region/function/OracleBox.java",
"license": "agpl-3.0",
"size": 5473
} | [
"net.sf.jsqlparser.expression.operators.relational.ExpressionList"
] | import net.sf.jsqlparser.expression.operators.relational.ExpressionList; | import net.sf.jsqlparser.expression.operators.relational.*; | [
"net.sf.jsqlparser"
] | net.sf.jsqlparser; | 2,720,215 |
public void runClient() {
I2PSocketManager mgr = I2PSocketManagerFactory.createManager();
Destination peer = null;
FileInputStream fis = null;
try {
fis = new FileInputStream(_peerDestFile);
peer = new Destination();
peer.readBytes(fis);
}... | void function() { I2PSocketManager mgr = I2PSocketManagerFactory.createManager(); Destination peer = null; FileInputStream fis = null; try { fis = new FileInputStream(_peerDestFile); peer = new Destination(); peer.readBytes(fis); } catch (IOException ioe) { _log.error(STR + _peerDestFile, ioe); return; } catch (DataFor... | /**
* Actually connect and run the client - this call blocks until completion.
*
*/ | Actually connect and run the client - this call blocks until completion | runClient | {
"repo_name": "NoYouShutup/CryptMeme",
"path": "CryptMeme/apps/ministreaming/java/test/junit/net/i2p/client/streaming/StreamSinkSend.java",
"license": "mit",
"size": 4853
} | [
"java.io.FileInputStream",
"java.io.IOException",
"java.io.InterruptedIOException",
"java.io.OutputStream",
"java.net.ConnectException",
"java.net.NoRouteToHostException",
"net.i2p.I2PException",
"net.i2p.data.DataFormatException",
"net.i2p.data.Destination",
"net.i2p.util.Log"
] | import java.io.FileInputStream; import java.io.IOException; import java.io.InterruptedIOException; import java.io.OutputStream; import java.net.ConnectException; import java.net.NoRouteToHostException; import net.i2p.I2PException; import net.i2p.data.DataFormatException; import net.i2p.data.Destination; import net.i2p.... | import java.io.*; import java.net.*; import net.i2p.*; import net.i2p.data.*; import net.i2p.util.*; | [
"java.io",
"java.net",
"net.i2p",
"net.i2p.data",
"net.i2p.util"
] | java.io; java.net; net.i2p; net.i2p.data; net.i2p.util; | 1,266,095 |
private List<User> usersFromJson(JSONArray json_list) throws JSONException {
List<User> listItems = new LinkedList<>();
for (int i = 0; i < json_list.length(); i++) {
String friend = json_list.getString(i);
listItems.add(new User(friend)); //Remove id from here. It should no... | List<User> function(JSONArray json_list) throws JSONException { List<User> listItems = new LinkedList<>(); for (int i = 0; i < json_list.length(); i++) { String friend = json_list.getString(i); listItems.add(new User(friend)); } return listItems; } | /**
* Parse users from a list of json
* @param json_list JSONArray of usernames
* @return List of users
* @throws JSONException
*/ | Parse users from a list of json | usersFromJson | {
"repo_name": "PINOMG/determinator",
"path": "app/src/main/java/com/pinomg/determinator/net/ApiHandler.java",
"license": "mit",
"size": 10073
} | [
"com.pinomg.determinator.model.User",
"java.util.LinkedList",
"java.util.List",
"org.json.JSONArray",
"org.json.JSONException"
] | import com.pinomg.determinator.model.User; import java.util.LinkedList; import java.util.List; import org.json.JSONArray; import org.json.JSONException; | import com.pinomg.determinator.model.*; import java.util.*; import org.json.*; | [
"com.pinomg.determinator",
"java.util",
"org.json"
] | com.pinomg.determinator; java.util; org.json; | 846,957 |
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, JAXBToStringStyle.DEFAULT_STYLE);
} | String function() { return ToStringBuilder.reflectionToString(this, JAXBToStringStyle.DEFAULT_STYLE); } | /**
* Generates a String representation of the contents of this type.
* This is an extension method, produced by the 'ts' xjc plugin
*
*/ | Generates a String representation of the contents of this type. This is an extension method, produced by the 'ts' xjc plugin | toString | {
"repo_name": "fpompermaier/onvif",
"path": "onvif-ws-client/src/main/java/org/xmlsoap/schemas/ws/_2005/_04/discovery/HelloType.java",
"license": "apache-2.0",
"size": 7404
} | [
"org.apache.commons.lang3.builder.ToStringBuilder",
"org.apache.cxf.xjc.runtime.JAXBToStringStyle"
] | import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.cxf.xjc.runtime.JAXBToStringStyle; | import org.apache.commons.lang3.builder.*; import org.apache.cxf.xjc.runtime.*; | [
"org.apache.commons",
"org.apache.cxf"
] | org.apache.commons; org.apache.cxf; | 1,361,371 |
public void recheck() {
CacheLockCandidates prev = null;
CacheLockCandidates owner = null;
CacheObject val;
synchronized (this) {
GridCacheMvcc mvcc = mvccExtras();
if (mvcc != null) {
prev = mvcc.allOwners();
boolean emptyB... | void function() { CacheLockCandidates prev = null; CacheLockCandidates owner = null; CacheObject val; synchronized (this) { GridCacheMvcc mvcc = mvccExtras(); if (mvcc != null) { prev = mvcc.allOwners(); boolean emptyBefore = mvcc.isEmpty(); owner = mvcc.recheck(); boolean emptyAfter = mvcc.isEmpty(); checkCallbacks(em... | /**
* Rechecks if lock should be reassigned.
*/ | Rechecks if lock should be reassigned | recheck | {
"repo_name": "a1vanov/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheEntry.java",
"license": "apache-2.0",
"size": 21810
} | [
"org.apache.ignite.internal.processors.cache.CacheLockCandidates",
"org.apache.ignite.internal.processors.cache.CacheObject",
"org.apache.ignite.internal.processors.cache.GridCacheMvcc"
] | import org.apache.ignite.internal.processors.cache.CacheLockCandidates; import org.apache.ignite.internal.processors.cache.CacheObject; import org.apache.ignite.internal.processors.cache.GridCacheMvcc; | import org.apache.ignite.internal.processors.cache.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 2,513,288 |
public void setFinancialSystemsCashReceiptProcessingTimestamp(Timestamp financialSystemsCashReceiptProcessingTimestamp) {
this.financialSystemsCashReceiptProcessingTimestamp = financialSystemsCashReceiptProcessingTimestamp;
}
| void function(Timestamp financialSystemsCashReceiptProcessingTimestamp) { this.financialSystemsCashReceiptProcessingTimestamp = financialSystemsCashReceiptProcessingTimestamp; } | /**
* Sets the financialSystemsCashReceiptProcessingTimestamp attribute value.
*
* @param financialSystemsCashReceiptProcessingTimestamp The financialSystemsCashReceiptProcessingTimestamp to set.
*/ | Sets the financialSystemsCashReceiptProcessingTimestamp attribute value | setFinancialSystemsCashReceiptProcessingTimestamp | {
"repo_name": "ua-eas/ua-kfs-5.3",
"path": "work/src/org/kuali/kfs/fp/businessobject/DepositCashReceiptControl.java",
"license": "agpl-3.0",
"size": 6319
} | [
"java.sql.Timestamp"
] | import java.sql.Timestamp; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,121,355 |
@Nonnull
@Override
public RunnableFuture<SnapshotResult<KeyedStateHandle>> snapshot(
final long checkpointId,
final long timestamp,
@Nonnull final CheckpointStreamFactory streamFactory,
@Nonnull CheckpointOptions checkpointOptions) throws Exception {
long startTime = System.currentTimeMillis();
// fl... | RunnableFuture<SnapshotResult<KeyedStateHandle>> function( final long checkpointId, final long timestamp, @Nonnull final CheckpointStreamFactory streamFactory, @Nonnull CheckpointOptions checkpointOptions) throws Exception { long startTime = System.currentTimeMillis(); writeBatchWrapper.flush(); RocksDBSnapshotStrategy... | /**
* Triggers an asynchronous snapshot of the keyed state backend from RocksDB. This snapshot can be canceled and
* is also stopped when the backend is closed through {@link #dispose()}. For each backend, this method must always
* be called by the same thread.
*
* @param checkpointId The Id of the checkpoin... | Triggers an asynchronous snapshot of the keyed state backend from RocksDB. This snapshot can be canceled and is also stopped when the backend is closed through <code>#dispose()</code>. For each backend, this method must always be called by the same thread | snapshot | {
"repo_name": "gyfora/flink",
"path": "flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBKeyedStateBackend.java",
"license": "apache-2.0",
"size": 29972
} | [
"java.util.concurrent.RunnableFuture",
"javax.annotation.Nonnull",
"org.apache.flink.contrib.streaming.state.snapshot.RocksDBSnapshotStrategyBase",
"org.apache.flink.runtime.checkpoint.CheckpointOptions",
"org.apache.flink.runtime.state.CheckpointStreamFactory",
"org.apache.flink.runtime.state.KeyedStateH... | import java.util.concurrent.RunnableFuture; import javax.annotation.Nonnull; import org.apache.flink.contrib.streaming.state.snapshot.RocksDBSnapshotStrategyBase; import org.apache.flink.runtime.checkpoint.CheckpointOptions; import org.apache.flink.runtime.state.CheckpointStreamFactory; import org.apache.flink.runtime.... | import java.util.concurrent.*; import javax.annotation.*; import org.apache.flink.contrib.streaming.state.snapshot.*; import org.apache.flink.runtime.checkpoint.*; import org.apache.flink.runtime.state.*; | [
"java.util",
"javax.annotation",
"org.apache.flink"
] | java.util; javax.annotation; org.apache.flink; | 2,861,776 |
public AstorCoreEngine createEngine(ExecutionMode mode) throws Exception {
core = null;
MutationSupporter mutSupporter = new MutationSupporter();
if (ExecutionMode.DeepRepair.equals(mode)) {
core = new DeepRepairEngine(mutSupporter, projectFacade);
} else if (ExecutionMode.CARDUMEN.equals(mode)) {
co... | AstorCoreEngine function(ExecutionMode mode) throws Exception { core = null; MutationSupporter mutSupporter = new MutationSupporter(); if (ExecutionMode.DeepRepair.equals(mode)) { core = new DeepRepairEngine(mutSupporter, projectFacade); } else if (ExecutionMode.CARDUMEN.equals(mode)) { core = new CardumenApproach(mutS... | /**
* It creates a repair engine according to an execution mode.
*
*
* @param removeMode
* @return
* @throws Exception
*/ | It creates a repair engine according to an execution mode | createEngine | {
"repo_name": "martingwhite/astor",
"path": "src/main/java/fr/inria/main/evolution/AstorMain.java",
"license": "gpl-2.0",
"size": 9019
} | [
"fr.inria.astor.approaches.cardumen.CardumenApproach",
"fr.inria.astor.approaches.deeprepair.DeepRepairEngine",
"fr.inria.astor.approaches.jgenprog.JGenProg",
"fr.inria.astor.approaches.jkali.JKaliEngine",
"fr.inria.astor.approaches.jmutrepair.jMutRepairExhaustive",
"fr.inria.astor.approaches.scaffold.Sca... | import fr.inria.astor.approaches.cardumen.CardumenApproach; import fr.inria.astor.approaches.deeprepair.DeepRepairEngine; import fr.inria.astor.approaches.jgenprog.JGenProg; import fr.inria.astor.approaches.jkali.JKaliEngine; import fr.inria.astor.approaches.jmutrepair.jMutRepairExhaustive; import fr.inria.astor.approa... | import fr.inria.astor.approaches.cardumen.*; import fr.inria.astor.approaches.deeprepair.*; import fr.inria.astor.approaches.jgenprog.*; import fr.inria.astor.approaches.jkali.*; import fr.inria.astor.approaches.jmutrepair.*; import fr.inria.astor.approaches.scaffold.*; import fr.inria.astor.core.faultlocalization.enti... | [
"fr.inria.astor",
"fr.inria.main",
"java.util"
] | fr.inria.astor; fr.inria.main; java.util; | 50,986 |
public static Ignite getOrStart(IgniteConfiguration cfg) throws IgniteException {
try {
return IgnitionEx.start(cfg, false);
}
catch (IgniteCheckedException e) {
throw U.convertException(e);
}
} | static Ignite function(IgniteConfiguration cfg) throws IgniteException { try { return IgnitionEx.start(cfg, false); } catch (IgniteCheckedException e) { throw U.convertException(e); } } | /**
* Gets or starts new grid instance if it hasn't been started yet.
*
* @param cfg Grid configuration. This cannot be {@code null}.
* @return Grid instance.
* @throws IgniteException If grid could not be started.
*/ | Gets or starts new grid instance if it hasn't been started yet | getOrStart | {
"repo_name": "vladisav/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/Ignition.java",
"license": "apache-2.0",
"size": 25799
} | [
"org.apache.ignite.configuration.IgniteConfiguration",
"org.apache.ignite.internal.IgnitionEx",
"org.apache.ignite.internal.util.typedef.internal.U"
] | import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.IgnitionEx; import org.apache.ignite.internal.util.typedef.internal.U; | import org.apache.ignite.configuration.*; import org.apache.ignite.internal.*; import org.apache.ignite.internal.util.typedef.internal.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 2,682,197 |
EventQueue.invokeLater(new Runnable() { | EventQueue.invokeLater(new Runnable() { | /**
* Launch the application.
*/ | Launch the application | main | {
"repo_name": "Jagermaestro1/KD405A_Jonas_G",
"path": "Assignment_1/src/se/mah/KD405A/jg/Main.java",
"license": "apache-2.0",
"size": 5673
} | [
"java.awt.EventQueue"
] | import java.awt.EventQueue; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,818,518 |
public long getSunlight(double latitude, double longitude, Date date, TimeZone tz) {
return this.getSunlight(latitude, longitude, date, SunriseSunset.OFFICIAL_ZENITH, tz);
} | long function(double latitude, double longitude, Date date, TimeZone tz) { return this.getSunlight(latitude, longitude, date, SunriseSunset.OFFICIAL_ZENITH, tz); } | /**
* Returns the amount of sunlight in ms for a particular day at a particular location
*
* @param latitude
* @param longitude
* @param date
* @return
*/ | Returns the amount of sunlight in ms for a particular day at a particular location | getSunlight | {
"repo_name": "PeteManchester/SmartHome",
"path": "smarthome2/src/main/java/com/pete/smarthome/scheduler/SunriseSunset.java",
"license": "apache-2.0",
"size": 20400
} | [
"java.util.Date",
"java.util.TimeZone"
] | import java.util.Date; import java.util.TimeZone; | import java.util.*; | [
"java.util"
] | java.util; | 2,248,152 |
private IComponent createUniqueComponent()
{
return TestComponents.createUniqueComponent( getTable().getTableEnvironment() );
}
| IComponent function() { return TestComponents.createUniqueComponent( getTable().getTableEnvironment() ); } | /**
* Creates a new component with unique attributes using the fixture table
* environment.
*
* @return A new component.
*/ | Creates a new component with unique attributes using the fixture table environment | createUniqueComponent | {
"repo_name": "gamegineer/dev",
"path": "main/table/org.gamegineer.table.core.test/src/org/gamegineer/table/core/dnd/test/AbstractDragSourceTestCase.java",
"license": "gpl-3.0",
"size": 10322
} | [
"org.gamegineer.table.core.IComponent",
"org.gamegineer.table.core.test.TestComponents"
] | import org.gamegineer.table.core.IComponent; import org.gamegineer.table.core.test.TestComponents; | import org.gamegineer.table.core.*; import org.gamegineer.table.core.test.*; | [
"org.gamegineer.table"
] | org.gamegineer.table; | 161,709 |
public void setFloating(boolean b, Point p)
{
// FIXME: use p for something. It's not location
// since we already have setFloatingLocation.
floatFrame.setVisible(b);
} | void function(boolean b, Point p) { floatFrame.setVisible(b); } | /**
* This method sets the floating property for the JToolBar.
*
* @param b Whether the JToolBar is floating.
* @param p FIXME
*/ | This method sets the floating property for the JToolBar | setFloating | {
"repo_name": "shaotuanchen/sunflower_exp",
"path": "tools/source/gcc-4.2.4/libjava/classpath/javax/swing/plaf/basic/BasicToolBarUI.java",
"license": "bsd-3-clause",
"size": 43307
} | [
"java.awt.Point"
] | import java.awt.Point; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,334,048 |
public void error(ImageIcon errorIcon) {
path.setText("");
valid.setIcon(errorIcon);
image.setIcon(null);
}
| void function(ImageIcon errorIcon) { path.setText(""); valid.setIcon(errorIcon); image.setIcon(null); } | /**
* Clear the fields.
* @param errorIcon the icon
*/ | Clear the fields | error | {
"repo_name": "akarnokd/open-ig",
"path": "src/hu/openig/editors/ce/CEVideoRef.java",
"license": "lgpl-3.0",
"size": 4412
} | [
"javax.swing.ImageIcon"
] | import javax.swing.ImageIcon; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 1,880,730 |
public ResourceHandle acquireResources(ActionExecutionMetadata owner, ResourceSet resources)
throws InterruptedException {
Preconditions.checkNotNull(
resources, "acquireResources called with resources == NULL during %s", owner);
Preconditions.checkState(
!threadHasResources(), "acquireR... | ResourceHandle function(ActionExecutionMetadata owner, ResourceSet resources) throws InterruptedException { Preconditions.checkNotNull( resources, STR, owner); Preconditions.checkState( !threadHasResources(), STR, owner); AutoProfiler p = profiled(owner.describe(), ProfilerTask.ACTION_LOCK); CountDownLatch latch = null... | /**
* Acquires requested resource set. Will block if resource is not available.
* NB! This method must be thread-safe!
*/ | Acquires requested resource set. Will block if resource is not available. NB! This method must be thread-safe | acquireResources | {
"repo_name": "ButterflyNetwork/bazel",
"path": "src/main/java/com/google/devtools/build/lib/actions/ResourceManager.java",
"license": "apache-2.0",
"size": 17470
} | [
"com.google.common.base.Preconditions",
"com.google.devtools.build.lib.profiler.AutoProfiler",
"com.google.devtools.build.lib.profiler.ProfilerTask",
"java.util.concurrent.CountDownLatch"
] | import com.google.common.base.Preconditions; import com.google.devtools.build.lib.profiler.AutoProfiler; import com.google.devtools.build.lib.profiler.ProfilerTask; import java.util.concurrent.CountDownLatch; | import com.google.common.base.*; import com.google.devtools.build.lib.profiler.*; import java.util.concurrent.*; | [
"com.google.common",
"com.google.devtools",
"java.util"
] | com.google.common; com.google.devtools; java.util; | 1,237,241 |
public void autoSizeColumn(int column) {
if (DesktopUtils.isWindows()) {
getActiveSheet().autoSizeColumn(column);
}
else {
double width = -1;
Row[] rows = getRows();
for (int k = 0; k < rows.length; k++) {
Row row = rows[k];
if (row == null)
continue;
Cell ... | void function(int column) { if (DesktopUtils.isWindows()) { getActiveSheet().autoSizeColumn(column); } else { double width = -1; Row[] rows = getRows(); for (int k = 0; k < rows.length; k++) { Row row = rows[k]; if (row == null) continue; Cell cell = row.getCell(column); if (cell == null) continue; double cellwidth = g... | /**
* Adjusts the column width to fit the contents.
*
* @param column
* the column index
*/ | Adjusts the column width to fit the contents | autoSizeColumn | {
"repo_name": "rranz/meccano4j_vaadin",
"path": "javalego/javalego_office/src/main/java/com/javalego/poi/report/ExcelWorkbookXSSF.java",
"license": "gpl-3.0",
"size": 58313
} | [
"com.javalego.util.DesktopUtils",
"org.apache.poi.ss.usermodel.Cell",
"org.apache.poi.ss.usermodel.Row"
] | import com.javalego.util.DesktopUtils; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.Row; | import com.javalego.util.*; import org.apache.poi.ss.usermodel.*; | [
"com.javalego.util",
"org.apache.poi"
] | com.javalego.util; org.apache.poi; | 1,876,969 |
protected void configUserContext(String userId) {
if (userId == null) {
// No custom user Id is given, so get this info from settings
userId = this.settings.getString(TelemetryContext.USER_ID_KEY, null);
if (userId == null) {
// No settings available, gene... | void function(String userId) { if (userId == null) { userId = this.settings.getString(TelemetryContext.USER_ID_KEY, null); if (userId == null) { userId = UUID.randomUUID().toString(); } } setUserId(userId); saveUserInfo(); } | /**
* Sets the user Id. This method has been made protected to make sure it's not accessed from outside the SDK
*
* @param userId custom user id
*/ | Sets the user Id. This method has been made protected to make sure it's not accessed from outside the SDK | configUserContext | {
"repo_name": "Microsoft/ApplicationInsights-Android",
"path": "applicationinsights-android/src/main/java/com/microsoft/applicationinsights/library/TelemetryContext.java",
"license": "mit",
"size": 25471
} | [
"java.util.UUID"
] | import java.util.UUID; | import java.util.*; | [
"java.util"
] | java.util; | 758,674 |
public JComponent getCommunityVisualizationComponent(
final GraphPartition<V, E> graphPartition,
final PartitionVisualizationParameters vizualizationParameters){
final List<Community<V,E>> communities = graphPartition.getCommunities();
final IndexableUndirectedSparseGraph<V, E> graph =
graphPartitio... | JComponent function( final GraphPartition<V, E> graphPartition, final PartitionVisualizationParameters vizualizationParameters){ final List<Community<V,E>> communities = graphPartition.getCommunities(); final IndexableUndirectedSparseGraph<V, E> graph = graphPartition.getReferenceGraph(); int countNonSingletons = 0; co... | /**
* Visualize a graph partition based on given parameters.
*
* @param graphPartition Partition to visualize.
* @param vizualizationParameters Visualization parameters.
* @return A JComponent which contains the visualization.
*/ | Visualize a graph partition based on given parameters | getCommunityVisualizationComponent | {
"repo_name": "kleinmind/bridge-bounding",
"path": "src/test/java/viz/CommunityVisualization.java",
"license": "apache-2.0",
"size": 7895
} | [
"java.util.HashMap",
"java.util.List",
"javax.swing.JComponent"
] | import java.util.HashMap; import java.util.List; import javax.swing.JComponent; | import java.util.*; import javax.swing.*; | [
"java.util",
"javax.swing"
] | java.util; javax.swing; | 1,856,172 |
public boolean remove() throws LODVaderMissingPropertiesException {
checkMandatoryFields();
DBCursor d = collection.find(mongoDBObject);
if (d.hasNext()) {
collection.remove(d.next());
return true;
}
return false;
} | boolean function() throws LODVaderMissingPropertiesException { checkMandatoryFields(); DBCursor d = collection.find(mongoDBObject); if (d.hasNext()) { collection.remove(d.next()); return true; } return false; } | /**
* Remove an object
*
* @return true case successfully removed
* @throws LODVaderMissingPropertiesException
*/ | Remove an object | remove | {
"repo_name": "AKSW/LODVader",
"path": "src/main/java/lodVader/mongodb/DBSuperClass2.java",
"license": "apache-2.0",
"size": 9085
} | [
"com.mongodb.DBCursor"
] | import com.mongodb.DBCursor; | import com.mongodb.*; | [
"com.mongodb"
] | com.mongodb; | 293,303 |
Observable<ServiceResponse<Void>> putDateTimeValidAsync(List<DateTime> arrayBody); | Observable<ServiceResponse<Void>> putDateTimeValidAsync(List<DateTime> arrayBody); | /**
* Set array value ['2000-12-01t00:00:01z', '1980-01-02T00:11:35+01:00', '1492-10-12T10:15:01-08:00'].
*
* @param arrayBody the List<DateTime> value
* @return the {@link ServiceResponse} object if successful.
*/ | Set array value ['2000-12-01t00:00:01z', '1980-01-02T00:11:35+01:00', '1492-10-12T10:15:01-08:00'] | putDateTimeValidAsync | {
"repo_name": "haocs/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodyarray/Arrays.java",
"license": "mit",
"size": 72234
} | [
"com.microsoft.rest.ServiceResponse",
"java.util.List",
"org.joda.time.DateTime"
] | import com.microsoft.rest.ServiceResponse; import java.util.List; import org.joda.time.DateTime; | import com.microsoft.rest.*; import java.util.*; import org.joda.time.*; | [
"com.microsoft.rest",
"java.util",
"org.joda.time"
] | com.microsoft.rest; java.util; org.joda.time; | 2,501,212 |
return new ArrayList<E>();
}
/**
* Creates a resizable {@code ArrayList} instance containing the given
* elements.
*
* <p><b>Note:</b> due to a bug in javac 1.5.0_06, we cannot support the
* following:
*
* <p>{@code List<Base> list = Lists.newArrayList(sub1, sub2);}
*
... | return new ArrayList<E>(); } /** * Creates a resizable {@code ArrayList} instance containing the given * elements. * * <p><b>Note:</b> due to a bug in javac 1.5.0_06, we cannot support the * following: * * <p>{@code List<Base> list = Lists.newArrayList(sub1, sub2);} * * <p>where {@code sub1} and {@code sub2} are refere... | /**
* Creates an empty {@code ArrayList} instance.
*
* <p><b>Note:</b> if you only need an <i>immutable</i> empty List, use
* {@link Collections#emptyList} instead.
*
* @return a newly-created, initially-empty {@code ArrayList}
*/ | Creates an empty ArrayList instance. Note: if you only need an immutable empty List, use <code>Collections#emptyList</code> instead | newArrayList | {
"repo_name": "haikuowuya/android_system_code",
"path": "src/com/google/android/collect/Lists.java",
"license": "apache-2.0",
"size": 2184
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,376,285 |
@Nullable public HadoopCounters jobCounters(HadoopJobId jobId) throws IgniteCheckedException {
if (!busyLock.tryReadLock())
return null;
try {
final HadoopJobMetadata meta = jobMetaCache().get(jobId);
return meta != null ? meta.counters() : null;
}
... | @Nullable HadoopCounters function(HadoopJobId jobId) throws IgniteCheckedException { if (!busyLock.tryReadLock()) return null; try { final HadoopJobMetadata meta = jobMetaCache().get(jobId); return meta != null ? meta.counters() : null; } finally { busyLock.readUnlock(); } } | /**
* Returns job counters.
*
* @param jobId Job identifier.
* @return Job counters or {@code null} if job cannot be found.
* @throws IgniteCheckedException If failed.
*/ | Returns job counters | jobCounters | {
"repo_name": "f7753/ignite",
"path": "modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/jobtracker/HadoopJobTracker.java",
"license": "apache-2.0",
"size": 57890
} | [
"org.apache.ignite.IgniteCheckedException",
"org.apache.ignite.internal.processors.hadoop.HadoopJobId",
"org.apache.ignite.internal.processors.hadoop.counter.HadoopCounters",
"org.jetbrains.annotations.Nullable"
] | import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.processors.hadoop.HadoopJobId; import org.apache.ignite.internal.processors.hadoop.counter.HadoopCounters; import org.jetbrains.annotations.Nullable; | import org.apache.ignite.*; import org.apache.ignite.internal.processors.hadoop.*; import org.apache.ignite.internal.processors.hadoop.counter.*; import org.jetbrains.annotations.*; | [
"org.apache.ignite",
"org.jetbrains.annotations"
] | org.apache.ignite; org.jetbrains.annotations; | 612,066 |
public static <T extends HasFilename> List<T> filterList(final Iterable<T> items,
FileType... fileTypes) {
if (fileTypes.length > 0) {
return filterList(items, FileTypeSet.of(fileTypes));
} else {
return new ArrayList<>();
}
} | static <T extends HasFilename> List<T> function(final Iterable<T> items, FileType... fileTypes) { if (fileTypes.length > 0) { return filterList(items, FileTypeSet.of(fileTypes)); } else { return new ArrayList<>(); } } | /**
* A filter for List<? extends HasFileType> that returns only those of the specified file types.
* The result is a mutable list, computed eagerly; see {@link #filter} for a lazy variant.
*/ | A filter for List that returns only those of the specified file types. The result is a mutable list, computed eagerly; see <code>#filter</code> for a lazy variant | filterList | {
"repo_name": "iamthearm/bazel",
"path": "src/main/java/com/google/devtools/build/lib/util/FileType.java",
"license": "apache-2.0",
"size": 8728
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,484,519 |
public void scheduledTrigger(ExtensionServicesContext extensionServicesContext);
| void function(ExtensionServicesContext extensionServicesContext); | /**
* Callback that is invoked as indicated by a schedule added to the scheduling service.
* @param extensionServicesContext is a marker interface for providing custom extension services
* passed to the triggered class
*/ | Callback that is invoked as indicated by a schedule added to the scheduling service | scheduledTrigger | {
"repo_name": "mobile-event-processing/Asper",
"path": "source/src/com/espertech/esper/schedule/ScheduleHandleCallback.java",
"license": "gpl-2.0",
"size": 1257
} | [
"com.espertech.esper.core.service.ExtensionServicesContext"
] | import com.espertech.esper.core.service.ExtensionServicesContext; | import com.espertech.esper.core.service.*; | [
"com.espertech.esper"
] | com.espertech.esper; | 2,913,067 |
public void setUserVersion(Connection c, Long userVersion) throws
BadServerResponse,
XenAPIException,
XmlRpcException {
String method_call = "VM.set_user_version";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshall... | void function(Connection c, Long userVersion) throws BadServerResponse, XenAPIException, XmlRpcException { String method_call = STR; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(userVersion)}; Map response = c.dis... | /**
* Set the user_version field of the given VM.
*
* @param userVersion New value to set
*/ | Set the user_version field of the given VM | setUserVersion | {
"repo_name": "cinderella/incubator-cloudstack",
"path": "deps/XenServerJava/com/xensource/xenapi/VM.java",
"license": "apache-2.0",
"size": 169722
} | [
"com.xensource.xenapi.Types",
"java.util.Map",
"org.apache.xmlrpc.XmlRpcException"
] | import com.xensource.xenapi.Types; import java.util.Map; import org.apache.xmlrpc.XmlRpcException; | import com.xensource.xenapi.*; import java.util.*; import org.apache.xmlrpc.*; | [
"com.xensource.xenapi",
"java.util",
"org.apache.xmlrpc"
] | com.xensource.xenapi; java.util; org.apache.xmlrpc; | 1,830,744 |
public List<ProjectClusterActivity> findAll();
| List<ProjectClusterActivity> function(); | /**
* This method gets a list of projectClusterActivity that are active
*
* @return a list from ProjectClusterActivity null if no exist records
*/ | This method gets a list of projectClusterActivity that are active | findAll | {
"repo_name": "CCAFS/MARLO",
"path": "marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/ProjectClusterActivityManager.java",
"license": "gpl-3.0",
"size": 2925
} | [
"java.util.List",
"org.cgiar.ccafs.marlo.data.model.ProjectClusterActivity"
] | import java.util.List; import org.cgiar.ccafs.marlo.data.model.ProjectClusterActivity; | import java.util.*; import org.cgiar.ccafs.marlo.data.model.*; | [
"java.util",
"org.cgiar.ccafs"
] | java.util; org.cgiar.ccafs; | 917,168 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.