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
List<Exception> getWarnings(); }
List<Exception> getWarnings(); }
/** * Returns a list of warnings and errors that occurred while loading this * schema. * * @return list of warnings */
Returns a list of warnings and errors that occurred while loading this schema
getWarnings
{ "repo_name": "inevo/mondrian", "path": "src/main/mondrian/olap/Schema.java", "license": "epl-1.0", "size": 2525 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,538,437
public void testWithCandidateClassWithResultClass() throws Exception { PersistenceManager pm = pmf.getPersistenceManager(); Transaction tx = pm.currentTransaction(); try { // Create some basic data to query, and query using a ResultClass that is constructor...
void function() throws Exception { PersistenceManager pm = pmf.getPersistenceManager(); Transaction tx = pm.currentTransaction(); try { tx = pm.currentTransaction(); tx.begin(); Person pers1 = new Person(234568, "Homer", STR, STR); pers1.setAge(45); Person pers2 = new Person(234578, "Marge", STR, STR); pers1.setAge(42)...
/** * Test of SQL queries with a candidate class AND a result class. */
Test of SQL queries with a candidate class AND a result class
testWithCandidateClassWithResultClass
{ "repo_name": "hopecee/texsts", "path": "jdo/identity/src/test/org/datanucleus/tests/SQLQueryTest.java", "license": "apache-2.0", "size": 60782 }
[ "java.math.BigDecimal", "java.util.HashMap", "java.util.Iterator", "java.util.List", "javax.jdo.JDOUserException", "javax.jdo.PersistenceManager", "javax.jdo.Query", "javax.jdo.Transaction", "org.jpox.samples.models.company.Developer", "org.jpox.samples.models.company.DeveloperRC", "org.jpox.sam...
import java.math.BigDecimal; import java.util.HashMap; import java.util.Iterator; import java.util.List; import javax.jdo.JDOUserException; import javax.jdo.PersistenceManager; import javax.jdo.Query; import javax.jdo.Transaction; import org.jpox.samples.models.company.Developer; import org.jpox.samples.models.company....
import java.math.*; import java.util.*; import javax.jdo.*; import org.jpox.samples.models.company.*;
[ "java.math", "java.util", "javax.jdo", "org.jpox.samples" ]
java.math; java.util; javax.jdo; org.jpox.samples;
2,285,382
return builder.createPerson("I1", "J. Random/Schoeller/"); } @Configuration static class ContextConfiguration { }
return builder.createPerson("I1", STR); } static class ContextConfiguration { }
/** * A common person creator. * * @return the person */
A common person creator
createJRandom
{ "repo_name": "dickschoeller/gedbrowser", "path": "gedbrowser-renderer/src/test/java/org/schoellerfamily/gedbrowser/renderer/test/PlaceListRendererTest.java", "license": "apache-2.0", "size": 12117 }
[ "org.springframework.test.context.ContextConfiguration" ]
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.*;
[ "org.springframework.test" ]
org.springframework.test;
1,507,641
@Override public String[] promptKeyboardInteractive(String destination, String name, String instruction, String[] prompt, boolean[] echo) { // Local Declarations DataComponent comp = null; ArrayList<Entry> entries = null; String password = null; String[] response = new String[1]; // Get the passwor...
String[] function(String destination, String name, String instruction, String[] prompt, boolean[] echo) { DataComponent comp = null; ArrayList<Entry> entries = null; String password = null; String[] response = new String[1]; if (loginInfoFormAtomic.get() != null) { comp = (DataComponent) loginInfoFormAtomic.get().getCo...
/** * This operation fakes out Jsch's keyboard interactive check and gives it * the stored password. */
This operation fakes out Jsch's keyboard interactive check and gives it the stored password
promptKeyboardInteractive
{ "repo_name": "SmithRWORNL/ice", "path": "src/org.eclipse.ice.item/src/org/eclipse/ice/item/action/ICEJschUIInfo.java", "license": "epl-1.0", "size": 5918 }
[ "java.util.ArrayList", "org.eclipse.ice.datastructures.form.DataComponent", "org.eclipse.ice.datastructures.form.Entry" ]
import java.util.ArrayList; import org.eclipse.ice.datastructures.form.DataComponent; import org.eclipse.ice.datastructures.form.Entry;
import java.util.*; import org.eclipse.ice.datastructures.form.*;
[ "java.util", "org.eclipse.ice" ]
java.util; org.eclipse.ice;
837,488
User getUser(String userId);
User getUser(String userId);
/** * Returns user data given user id. If the user data for the given id * doesn't already exist in the storage, it should be created. * * @param userId unique user id * @return user data */
Returns user data given user id. If the user data for the given id doesn't already exist in the storage, it should be created
getUser
{ "repo_name": "rkipper/AppInventor_RK", "path": "appinventor/appengine/src/com/google/appinventor/server/storage/StorageIo.java", "license": "mit", "size": 12012 }
[ "com.google.appinventor.shared.rpc.user.User" ]
import com.google.appinventor.shared.rpc.user.User;
import com.google.appinventor.shared.rpc.user.*;
[ "com.google.appinventor" ]
com.google.appinventor;
1,571,069
public Message requestRealTimeClockData() { sendCommand(rr_CMD_REQUEST_REAL_TIME_CLOCK_DATA); try { return readMessages(RR_REPLY_REAL_TIME_CLOCK_DATA); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; } // TODO: rw // TODO: sd
Message function() { sendCommand(rr_CMD_REQUEST_REAL_TIME_CLOCK_DATA); try { return readMessages(RR_REPLY_REAL_TIME_CLOCK_DATA); } catch (IOException e) { e.printStackTrace(); } return null; }
/** * 4.28.1 Request Real Time Clock Data (rr) * * * @return */
4.28.1 Request Real Time Clock Data (rr)
requestRealTimeClockData
{ "repo_name": "cdhesse/ElkM1API", "path": "src/com/elkm1api/ElkM1Controller.java", "license": "apache-2.0", "size": 32257 }
[ "com.elkm1api.messages.Message", "java.io.IOException" ]
import com.elkm1api.messages.Message; import java.io.IOException;
import com.elkm1api.messages.*; import java.io.*;
[ "com.elkm1api.messages", "java.io" ]
com.elkm1api.messages; java.io;
2,786,257
public static Theory getTheoryToDerive(Theory theory, Set<Literal> literals) throws TheoryException { Set<String> rules = theory.getRulesToDerive(literals); return createNewTheoryWithRules(theory, rules); }
static Theory function(Theory theory, Set<Literal> literals) throws TheoryException { Set<String> rules = theory.getRulesToDerive(literals); return createNewTheoryWithRules(theory, rules); }
/** * Extract the set of facts, rules and superiority relation that are required to derive the specified literal and * return it as a defeasible theory. * * @param theory Original theory. * @param literals Literals to derive. * @return A new theory that contains the set of rules (including facts, all types...
Extract the set of facts, rules and superiority relation that are required to derive the specified literal and return it as a defeasible theory
getTheoryToDerive
{ "repo_name": "NICTA/SPINdle", "path": "src/spindle/core/dom/TheoryUtilities.java", "license": "gpl-3.0", "size": 4621 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,947,323
final GuidedDecisionTable52 destination = source; //These are the columns we want to update final int iRowNumberColumnIndex = 0; Integer iSalienceColumnIndex = null; Integer iDurationColumnIndex = null; //Find the Salience and Duration column indexes List<BaseCo...
final GuidedDecisionTable52 destination = source; final int iRowNumberColumnIndex = 0; Integer iSalienceColumnIndex = null; Integer iDurationColumnIndex = null; List<BaseColumn> allColumns = destination.getExpandedColumns(); for (int iCol = 0; iCol < allColumns.size(); iCol++) { final BaseColumn column = allColumns.get...
/** * Convert the data-types in the Decision Table model * * @param source * @return The new DTModel */
Convert the data-types in the Decision Table model
upgrade
{ "repo_name": "romartin/drools", "path": "drools-workbench-models/drools-workbench-models-guided-dtable/src/main/java/org/drools/workbench/models/guided/dtable/backend/util/GuidedDecisionTableUpgradeHelper2.java", "license": "apache-2.0", "size": 3947 }
[ "java.util.List", "org.drools.workbench.models.guided.dtable.shared.model.AttributeCol52", "org.drools.workbench.models.guided.dtable.shared.model.BaseColumn", "org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52", "org.drools.workbench.models.guided.dtable.shared.model.GuidedDecisionTable5...
import java.util.List; import org.drools.workbench.models.guided.dtable.shared.model.AttributeCol52; import org.drools.workbench.models.guided.dtable.shared.model.BaseColumn; import org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52; import org.drools.workbench.models.guided.dtable.shared.model.Guided...
import java.util.*; import org.drools.workbench.models.guided.dtable.shared.model.*;
[ "java.util", "org.drools.workbench" ]
java.util; org.drools.workbench;
1,900,550
public Connection getConnection() throws SQLException { debugCodeCall("getConnection"); return getJdbcConnection(userName, StringUtils.cloneCharArray(passwordChars)); }
Connection function() throws SQLException { debugCodeCall(STR); return getJdbcConnection(userName, StringUtils.cloneCharArray(passwordChars)); }
/** * Open a new connection using the current URL, user name and password. * * @return the connection */
Open a new connection using the current URL, user name and password
getConnection
{ "repo_name": "titus08/frostwire-desktop", "path": "lib/jars-src/h2-1.3.164/org/h2/jdbcx/JdbcDataSource.java", "license": "gpl-3.0", "size": 11322 }
[ "java.sql.Connection", "java.sql.SQLException", "org.h2.util.StringUtils" ]
import java.sql.Connection; import java.sql.SQLException; import org.h2.util.StringUtils;
import java.sql.*; import org.h2.util.*;
[ "java.sql", "org.h2.util" ]
java.sql; org.h2.util;
2,395,502
protected boolean isVisibleTo(Account.Id to) throws PermissionBackendException { return true; }
boolean function(Account.Id to) throws PermissionBackendException { return true; }
/** * Returns whether this email is visible to the given account * * @param to account. * @throws PermissionBackendException thrown if checking a permission fails due to an error in the * permission backend */
Returns whether this email is visible to the given account
isVisibleTo
{ "repo_name": "GerritCodeReview/gerrit", "path": "java/com/google/gerrit/server/mail/send/OutgoingEmail.java", "license": "apache-2.0", "size": 25541 }
[ "com.google.gerrit.entities.Account", "com.google.gerrit.server.permissions.PermissionBackendException" ]
import com.google.gerrit.entities.Account; import com.google.gerrit.server.permissions.PermissionBackendException;
import com.google.gerrit.entities.*; import com.google.gerrit.server.permissions.*;
[ "com.google.gerrit" ]
com.google.gerrit;
2,584,848
public static <T> T readNonPdxInstanceObject(final DataInput in) throws IOException, ClassNotFoundException { boolean wouldReadSerialized = PdxInstanceImpl.getPdxReadSerialized(); if (!wouldReadSerialized) { return DataSerializer.readObject(in); } else { PdxInstanceImpl.setPdxReadSeriali...
static <T> T function(final DataInput in) throws IOException, ClassNotFoundException { boolean wouldReadSerialized = PdxInstanceImpl.getPdxReadSerialized(); if (!wouldReadSerialized) { return DataSerializer.readObject(in); } else { PdxInstanceImpl.setPdxReadSerialized(false); try { return DataSerializer.readObject(in);...
/** * Just like readObject but make sure and pdx deserialized is not a PdxInstance. * * @since GemFire 6.6.2 */
Just like readObject but make sure and pdx deserialized is not a PdxInstance
readNonPdxInstanceObject
{ "repo_name": "masaki-yamakawa/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/InternalDataSerializer.java", "license": "apache-2.0", "size": 132544 }
[ "java.io.DataInput", "java.io.IOException", "org.apache.geode.DataSerializer", "org.apache.geode.pdx.internal.PdxInstanceImpl" ]
import java.io.DataInput; import java.io.IOException; import org.apache.geode.DataSerializer; import org.apache.geode.pdx.internal.PdxInstanceImpl;
import java.io.*; import org.apache.geode.*; import org.apache.geode.pdx.internal.*;
[ "java.io", "org.apache.geode" ]
java.io; org.apache.geode;
2,852,583
@Test @Feature({"NFCTest"}) public void testNFCIsNotPermitted() { doReturn(PackageManager.PERMISSION_DENIED) .when(mContext) .checkPermission(anyString(), anyInt(), anyInt()); TestNfcImpl nfc = new TestNfcImpl(mContext, mDelegate); CancelAllWatchesResp...
@Feature({STR}) void function() { doReturn(PackageManager.PERMISSION_DENIED) .when(mContext) .checkPermission(anyString(), anyInt(), anyInt()); TestNfcImpl nfc = new TestNfcImpl(mContext, mDelegate); CancelAllWatchesResponse mockCallback = mock(CancelAllWatchesResponse.class); nfc.cancelAllWatches(mockCallback); verify...
/** * Test that error with type SECURITY is returned if permission to use NFC is not granted. */
Test that error with type SECURITY is returned if permission to use NFC is not granted
testNFCIsNotPermitted
{ "repo_name": "endlessm/chromium-browser", "path": "services/device/nfc/android/junit/src/org/chromium/device/nfc/NFCTest.java", "license": "bsd-3-clause", "size": 92380 }
[ "android.content.pm.PackageManager", "org.chromium.base.test.util.Feature", "org.chromium.device.mojom.NdefErrorType", "org.chromium.device.mojom.Nfc", "org.junit.Assert", "org.mockito.ArgumentMatchers", "org.mockito.Mockito" ]
import android.content.pm.PackageManager; import org.chromium.base.test.util.Feature; import org.chromium.device.mojom.NdefErrorType; import org.chromium.device.mojom.Nfc; import org.junit.Assert; import org.mockito.ArgumentMatchers; import org.mockito.Mockito;
import android.content.pm.*; import org.chromium.base.test.util.*; import org.chromium.device.mojom.*; import org.junit.*; import org.mockito.*;
[ "android.content", "org.chromium.base", "org.chromium.device", "org.junit", "org.mockito" ]
android.content; org.chromium.base; org.chromium.device; org.junit; org.mockito;
2,236,694
@NonNull default CreateTable withColumn(@NonNull String columnName, @NonNull DataType dataType) { return withColumn(CqlIdentifier.fromCql(columnName), dataType); }
default CreateTable withColumn(@NonNull String columnName, @NonNull DataType dataType) { return withColumn(CqlIdentifier.fromCql(columnName), dataType); }
/** * Shortcut for {@link #withColumn(CqlIdentifier, DataType) * withColumn(CqlIdentifier.asCql(columnName), dataType)}. */
Shortcut for <code>#withColumn(CqlIdentifier, DataType) withColumn(CqlIdentifier.asCql(columnName), dataType)</code>
withColumn
{ "repo_name": "datastax/java-driver", "path": "query-builder/src/main/java/com/datastax/oss/driver/api/querybuilder/schema/CreateTable.java", "license": "apache-2.0", "size": 3483 }
[ "com.datastax.oss.driver.api.core.CqlIdentifier", "com.datastax.oss.driver.api.core.type.DataType", "edu.umd.cs.findbugs.annotations.NonNull" ]
import com.datastax.oss.driver.api.core.CqlIdentifier; import com.datastax.oss.driver.api.core.type.DataType; import edu.umd.cs.findbugs.annotations.NonNull;
import com.datastax.oss.driver.api.core.*; import com.datastax.oss.driver.api.core.type.*; import edu.umd.cs.findbugs.annotations.*;
[ "com.datastax.oss", "edu.umd.cs" ]
com.datastax.oss; edu.umd.cs;
2,546,117
public RegistryEntry findEntry(Class<?> clazz) { return (RegistryEntry) getEntry(clazz, false); }
RegistryEntry function(Class<?> clazz) { return (RegistryEntry) getEntry(clazz, false); }
/** * Searches the registry for a resource identified by a JSON API resource * class. If a resource cannot be found, * {@link ResourceNotFoundInitializationException} is thrown. * * @param clazz * resource type * @return registry entry * @throws ResourceNotFoundInitializationException * ...
Searches the registry for a resource identified by a JSON API resource class. If a resource cannot be found, <code>ResourceNotFoundInitializationException</code> is thrown
findEntry
{ "repo_name": "apetrucci/katharsis-framework", "path": "katharsis-core/src/main/java/io/katharsis/core/internal/registry/ResourceRegistryImpl.java", "license": "apache-2.0", "size": 7040 }
[ "io.katharsis.resource.registry.RegistryEntry" ]
import io.katharsis.resource.registry.RegistryEntry;
import io.katharsis.resource.registry.*;
[ "io.katharsis.resource" ]
io.katharsis.resource;
2,257,945
@Override public void actionPerform(Component component) { if (!isEnabled()) { return; } if (beforeActionPerformedHandler != null) { if (!beforeActionPerformedHandler.beforeActionPerformed()) return; } @SuppressWarnings("unchecked...
void function(Component component) { if (!isEnabled()) { return; } if (beforeActionPerformedHandler != null) { if (!beforeActionPerformedHandler.beforeActionPerformed()) return; } @SuppressWarnings(STR) Set<Entity> selected = target.getSelected(); if (!selected.isEmpty()) { if (confirm) { confirmAndRemove(selected); } ...
/** * This method is invoked by the action owner component. * * @param component component invoking the action */
This method is invoked by the action owner component
actionPerform
{ "repo_name": "dimone-kun/cuba", "path": "modules/gui/src/com/haulmont/cuba/gui/components/actions/RemoveAction.java", "license": "apache-2.0", "size": 12730 }
[ "com.haulmont.cuba.core.entity.Entity", "com.haulmont.cuba.gui.components.Component", "java.util.Set" ]
import com.haulmont.cuba.core.entity.Entity; import com.haulmont.cuba.gui.components.Component; import java.util.Set;
import com.haulmont.cuba.core.entity.*; import com.haulmont.cuba.gui.components.*; import java.util.*;
[ "com.haulmont.cuba", "java.util" ]
com.haulmont.cuba; java.util;
1,763,146
public WellSetBigDecimal toWellSetObject() { WellSetBigDecimal set = new WellSetBigDecimal(); set.setLabel(this.label); for(SimpleWellXMLBigDecimal well : wells) { set.add(well.toWellObject()); } return set; }
WellSetBigDecimal function() { WellSetBigDecimal set = new WellSetBigDecimal(); set.setLabel(this.label); for(SimpleWellXMLBigDecimal well : wells) { set.add(well.toWellObject()); } return set; }
/** * Returns a WellSetBigDecimal object. * @return the well set */
Returns a WellSetBigDecimal object
toWellSetObject
{ "repo_name": "jessemull/MicroFlex", "path": "src/main/java/com/github/jessemull/microflex/bigdecimalflex/io/WellSetXMLBigDecimal.java", "license": "apache-2.0", "size": 4646 }
[ "com.github.jessemull.microflex.bigdecimalflex.plate.WellSetBigDecimal" ]
import com.github.jessemull.microflex.bigdecimalflex.plate.WellSetBigDecimal;
import com.github.jessemull.microflex.bigdecimalflex.plate.*;
[ "com.github.jessemull" ]
com.github.jessemull;
1,895,000
private static File getNewShapeFile(File csvFile) { String path = csvFile.getAbsolutePath(); String newPath = path.substring(0, path.length() - 4) + ".shp"; JFileDataStoreChooser chooser = new JFileDataStoreChooser("shp"); chooser.setDialogTitle("Save shapefile"); chooser.setSelectedFile(new File(new...
static File function(File csvFile) { String path = csvFile.getAbsolutePath(); String newPath = path.substring(0, path.length() - 4) + ".shp"; JFileDataStoreChooser chooser = new JFileDataStoreChooser("shp"); chooser.setDialogTitle(STR); chooser.setSelectedFile(new File(newPath)); int returnVal = chooser.showSaveDialog(...
/** * Prompt the user for the name and path to use for the output shapefile * * @param csvFile the input csv file used to create a default shapefile name * * @return name and path for the shapefile as a new File object */
Prompt the user for the name and path to use for the output shapefile
getNewShapeFile
{ "repo_name": "petebrew/fhaes", "path": "fhaes/src/main/java/org/fhaes/util/Csv2Shape2.java", "license": "gpl-3.0", "size": 7769 }
[ "java.io.File", "org.geotools.swing.data.JFileDataStoreChooser" ]
import java.io.File; import org.geotools.swing.data.JFileDataStoreChooser;
import java.io.*; import org.geotools.swing.data.*;
[ "java.io", "org.geotools.swing" ]
java.io; org.geotools.swing;
112,127
@RequestMapping(value = "/uploadAsset", method = RequestMethod.POST) public String upload(HttpServletRequest request, @RequestParam("file") MultipartFile file, @PathVariable(value="sectionKey") String sectionKey) throws IOException { StaticAsset staticAsset = staticAsset...
@RequestMapping(value = STR, method = RequestMethod.POST) String function(HttpServletRequest request, @RequestParam("file") MultipartFile file, @PathVariable(value=STR) String sectionKey) throws IOException { StaticAsset staticAsset = staticAssetService.createStaticAssetFromFile(file, null); staticAssetStorageService.c...
/** * Used by the Asset list view to upload an asset and then immediately show the * edit form for that record. * * @param request * @param file * @param sectionKey * @return * @throws IOException */
Used by the Asset list view to upload an asset and then immediately show the edit form for that record
upload
{ "repo_name": "cloudbearings/BroadleafCommerce", "path": "admin/broadleaf-contentmanagement-module/src/main/java/org/broadleafcommerce/cms/admin/web/controller/AdminAssetUploadController.java", "license": "apache-2.0", "size": 8705 }
[ "java.io.IOException", "javax.servlet.http.HttpServletRequest", "org.broadleafcommerce.cms.file.domain.StaticAsset", "org.springframework.web.bind.annotation.PathVariable", "org.springframework.web.bind.annotation.RequestMapping", "org.springframework.web.bind.annotation.RequestMethod", "org.springframe...
import java.io.IOException; import javax.servlet.http.HttpServletRequest; import org.broadleafcommerce.cms.file.domain.StaticAsset; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; im...
import java.io.*; import javax.servlet.http.*; import org.broadleafcommerce.cms.file.domain.*; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.*;
[ "java.io", "javax.servlet", "org.broadleafcommerce.cms", "org.springframework.web" ]
java.io; javax.servlet; org.broadleafcommerce.cms; org.springframework.web;
1,251,608
public void test_idleTimeout_with_infiniteChunkTimeout() throws InterruptedException, ExecutionException, TimeoutException { final long sinkIdleTimeoutNanos = TimeUnit.MILLISECONDS.toNanos(100); final H masterStats = new H(); final BlockingBuffer<KVO<O>[]> masterBuffer ...
void function() throws InterruptedException, ExecutionException, TimeoutException { final long sinkIdleTimeoutNanos = TimeUnit.MILLISECONDS.toNanos(100); final H masterStats = new H(); final BlockingBuffer<KVO<O>[]> masterBuffer = new BlockingBuffer<KVO<O>[]>( masterQueueCapacity); final M master = new M(masterStats, m...
/** * Unit test verifies that an idle timeout will cause a sink to flush its * buffer without waiting to combine additional chunks even though it has an * infinite chunkTimeout. * * @throws InterruptedException * @throws ExecutionException * @throws TimeoutException */
Unit test verifies that an idle timeout will cause a sink to flush its buffer without waiting to combine additional chunks even though it has an infinite chunkTimeout
test_idleTimeout_with_infiniteChunkTimeout
{ "repo_name": "smalyshev/blazegraph", "path": "bigdata/src/test/com/bigdata/service/ndx/pipeline/TestMasterTaskIdleTimeout.java", "license": "gpl-2.0", "size": 36679 }
[ "com.bigdata.relation.accesspath.BlockingBuffer", "java.util.concurrent.ExecutionException", "java.util.concurrent.TimeUnit", "java.util.concurrent.TimeoutException" ]
import com.bigdata.relation.accesspath.BlockingBuffer; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException;
import com.bigdata.relation.accesspath.*; import java.util.concurrent.*;
[ "com.bigdata.relation", "java.util" ]
com.bigdata.relation; java.util;
1,295,772
public void incluirTecModels() throws AplicacaoException { // -------------------- TECMODEL 1 ---------------------// TecModel tecModel1 = new TecModel(); tecModel1.setConsumoPorLoteMt(2.0); tecModel1.setTempoDefasagemUsoTec(1.0); tecModel1.setModelo(modeloService.recuperaModeloPorCodigo("121131"));...
void function() throws AplicacaoException { TecModel tecModel1 = new TecModel(); tecModel1.setConsumoPorLoteMt(2.0); tecModel1.setTempoDefasagemUsoTec(1.0); tecModel1.setModelo(modeloService.recuperaModeloPorCodigo(STR)); tecModel1.setTecido(tecidoService.recuperaTecidoPorCodigo("01")); TecModel tecModel2 = new TecMode...
/** * Primeira versao de carga, nao esta mais sendo usado. */
Primeira versao de carga, nao esta mais sendo usado
incluirTecModels
{ "repo_name": "dayse/gesplan", "path": "test/cargaDoSistema/CargaTecModel.java", "license": "mit", "size": 6790 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,147,303
@GET @Path("/{name}") @ApiOperation(value = "Find source by name", notes = "") @ApiErrors(value = {@ApiError(code = NotFoundException.CODE, reason = "Source not found")}) public Response getSourceByName( @ApiParam(value = "Name of the source", required = true) @PathParam("name") final String name) { f...
@Path(STR) @ApiOperation(value = STR, notes = STRSource not foundSTRName of the sourceSTRnameSTRSource not found: " + name); } }
/** * Get an existing {@link Source}. * * @param name * The source name. * @return The source or throws {@link NotFoundException} if not found. */
Get an existing <code>Source</code>
getSourceByName
{ "repo_name": "openpreserve/scout", "path": "web/src/main/java/eu/scape_project/watch/rest/resource/SourceResource.java", "license": "apache-2.0", "size": 4155 }
[ "com.wordnik.swagger.annotations.ApiOperation", "javax.ws.rs.Path" ]
import com.wordnik.swagger.annotations.ApiOperation; import javax.ws.rs.Path;
import com.wordnik.swagger.annotations.*; import javax.ws.rs.*;
[ "com.wordnik.swagger", "javax.ws" ]
com.wordnik.swagger; javax.ws;
988,290
// return 2; // }/ public int getCursor_new(Window w, int x, int y) { Insets insets = w.getInsets(); return getCursor_new(x - insets.left, y - insets.top, w.getWidth() - insets.left - insets.right, w.getHeight() - insets.top - insets.bottom); ...
int function(Window w, int x, int y) { Insets insets = w.getInsets(); return getCursor_new(x - insets.left, y - insets.top, w.getWidth() - insets.left - insets.right, w.getHeight() - insets.top - insets.bottom); }
/** * Gets the cursor_new. * * @param w the w * @param x the x * @param y the y * @return the cursor_new */
Gets the cursor_new
getCursor_new
{ "repo_name": "mclauncher/HMCL", "path": "HMCLaF/src/main/java/org/jackhuang/hmcl/laf/titlepane/BERootPaneUI.java", "license": "gpl-3.0", "size": 48324 }
[ "java.awt.Insets", "java.awt.Window" ]
import java.awt.Insets; import java.awt.Window;
import java.awt.*;
[ "java.awt" ]
java.awt;
715,797
protected void logDBColumnData(Cursor cursor, String column) { int index = cursor.getColumnIndex(column); Log.i(LOG_TAG, "columnName: " + column); Log.i(LOG_TAG, "columnValue: " + cursor.getString(index)); }
void function(Cursor cursor, String column) { int index = cursor.getColumnIndex(column); Log.i(LOG_TAG, STR + column); Log.i(LOG_TAG, STR + cursor.getString(index)); }
/** * Gets the Uri that should be used to access the mock server * * @param filename The name of the file to try to retrieve from the mock server * @return the Uri to use for access the file on the mock server */
Gets the Uri that should be used to access the mock server
logDBColumnData
{ "repo_name": "xjwangliang/android_source_note", "path": "Download-Provider/DownloadProvider/src/android/app/DownloadManagerBaseTest.java", "license": "apache-2.0", "size": 39103 }
[ "android.database.Cursor", "android.util.Log" ]
import android.database.Cursor; import android.util.Log;
import android.database.*; import android.util.*;
[ "android.database", "android.util" ]
android.database; android.util;
1,351,856
public static double getImageScaleX(final Image img) { if (!(img instanceof VolatileImage)) { return 1; } final SurfaceManager sm = getManager(img); return sm.getPrimarySurfaceData().getDefaultScaleX(); }
static double function(final Image img) { if (!(img instanceof VolatileImage)) { return 1; } final SurfaceManager sm = getManager(img); return sm.getPrimarySurfaceData().getDefaultScaleX(); }
/** * Returns a horizontal scale factor of the image. This is utility method, * which fetches information from the SurfaceData of the image. * * @see SurfaceData#getDefaultScaleX */
Returns a horizontal scale factor of the image. This is utility method, which fetches information from the SurfaceData of the image
getImageScaleX
{ "repo_name": "FauxFaux/jdk9-jdk", "path": "src/java.desktop/share/classes/sun/awt/image/SurfaceManager.java", "license": "gpl-2.0", "size": 12172 }
[ "java.awt.Image", "java.awt.image.VolatileImage" ]
import java.awt.Image; import java.awt.image.VolatileImage;
import java.awt.*; import java.awt.image.*;
[ "java.awt" ]
java.awt;
952,965
private Collection<String> getHostStringsFromLocalhost(String origValue, ClusterTopology topology) { Set<String> hostStrings = new HashSet<>(); if(origValue.contains("localhost")) { Matcher localhostMatcher = LOCALHOST_PORT_REGEX.matcher(origValue); String port = null; if(localho...
Collection<String> function(String origValue, ClusterTopology topology) { Set<String> hostStrings = new HashSet<>(); if(origValue.contains(STR)) { Matcher localhostMatcher = LOCALHOST_PORT_REGEX.matcher(origValue); String port = null; if(localhostMatcher.find()) { port = calculatePort(localhostMatcher.group()); } for (...
/** * Resolves localhost value to "host:port" elements (port is optional) * @param origValue property value * @param topology cluster topology * @return list of hosts that have the given components */
Resolves localhost value to "host:port" elements (port is optional)
getHostStringsFromLocalhost
{ "repo_name": "arenadata/ambari", "path": "ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java", "license": "apache-2.0", "size": 150546 }
[ "java.util.Collection", "java.util.HashSet", "java.util.Set", "java.util.regex.Matcher", "org.apache.ambari.server.topology.ClusterTopology" ]
import java.util.Collection; import java.util.HashSet; import java.util.Set; import java.util.regex.Matcher; import org.apache.ambari.server.topology.ClusterTopology;
import java.util.*; import java.util.regex.*; import org.apache.ambari.server.topology.*;
[ "java.util", "org.apache.ambari" ]
java.util; org.apache.ambari;
2,127,898
public SortHLAPI getSortHLAPI(){ if(item.getSort() == null) return null; Sort object = item.getSort(); if(object.getClass().equals(fr.lip6.move.pnml.symmetricnet.booleans.impl.BoolImpl.class)){ return new fr.lip6.move.pnml.symmetricnet.booleans.hlapi.BoolHLAPI((fr.lip6.move.pnml.symmetricnet.booleans...
SortHLAPI function(){ if(item.getSort() == null) return null; Sort object = item.getSort(); if(object.getClass().equals(fr.lip6.move.pnml.symmetricnet.booleans.impl.BoolImpl.class)){ return new fr.lip6.move.pnml.symmetricnet.booleans.hlapi.BoolHLAPI((fr.lip6.move.pnml.symmetricnet.booleans.Bool)object); } if(object.get...
/** * This accessor automatically encapsulate an element of the current object. * WARNING : this creates a new object in memory. * @return : null if the element is null */
This accessor automatically encapsulate an element of the current object. WARNING : this creates a new object in memory
getSortHLAPI
{ "repo_name": "lhillah/pnmlframework", "path": "pnmlFw-SNNet/src/fr/lip6/move/pnml/symmetricnet/booleans/hlapi/BooleanConstantHLAPI.java", "license": "epl-1.0", "size": 91863 }
[ "fr.lip6.move.pnml.symmetricnet.terms.Sort", "fr.lip6.move.pnml.symmetricnet.terms.hlapi.SortHLAPI" ]
import fr.lip6.move.pnml.symmetricnet.terms.Sort; import fr.lip6.move.pnml.symmetricnet.terms.hlapi.SortHLAPI;
import fr.lip6.move.pnml.symmetricnet.terms.*; import fr.lip6.move.pnml.symmetricnet.terms.hlapi.*;
[ "fr.lip6.move" ]
fr.lip6.move;
1,844,085
public void close( ) { try { connection.close(); } catch (SQLException sqle) { System.err.println(sqle.getMessage()); } }
void function( ) { try { connection.close(); } catch (SQLException sqle) { System.err.println(sqle.getMessage()); } }
/** * Close the real JDBC Connection * */
Close the real JDBC Connection
close
{ "repo_name": "srnsw/xena", "path": "xena/ext/src/xalan-j_2_7_1/src/org/apache/xalan/lib/sql/PooledConnection.java", "license": "gpl-3.0", "size": 2146 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,027,293
void addOps(String user_list) { List<String> userList = parseDoubleDollarList(user_list); for (int i = 0; i < userList.size(); i++) { String user = userList.get(i); if (user.equalsIgnoreCase(_bot.botname())) _bot.setOp(true); else { synchronized (users) { User u; if (!userExist(user)) ...
void addOps(String user_list) { List<String> userList = parseDoubleDollarList(user_list); for (int i = 0; i < userList.size(); i++) { String user = userList.get(i); if (user.equalsIgnoreCase(_bot.botname())) _bot.setOp(true); else { synchronized (users) { User u; if (!userExist(user)) { u = new User(user, _bot); users....
/** * Sets the users (including the bot) in the list as operators. If the user is not in the internal * data structure then it is automatically added. * @param user_list */
Sets the users (including the bot) in the list as operators. If the user is not in the internal data structure then it is automatically added
addOps
{ "repo_name": "applegrew/jdcbot", "path": "src/org/elite/jdcbot/framework/UserManager.java", "license": "gpl-3.0", "size": 9344 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,657,389
protected void setBuffer(int threshold) { compressionThreshold = threshold; buffer = new byte[compressionThreshold]; if (debug > 1) { UtilImpl.LOGGER.info("buffer is set to "+compressionThreshold); } }
void function(int threshold) { compressionThreshold = threshold; buffer = new byte[compressionThreshold]; if (debug > 1) { UtilImpl.LOGGER.info(STR+compressionThreshold); } }
/** * Set the compressionThreshold number and create buffer for this size */
Set the compressionThreshold number and create buffer for this size
setBuffer
{ "repo_name": "skyvers/skyve", "path": "skyve-web/src/main/java/org/skyve/impl/web/filter/gzip/CompressionResponseStream.java", "license": "lgpl-2.1", "size": 8641 }
[ "org.skyve.impl.util.UtilImpl" ]
import org.skyve.impl.util.UtilImpl;
import org.skyve.impl.util.*;
[ "org.skyve.impl" ]
org.skyve.impl;
212,168
private List<KnownApplicationInfo> getInstalledNativeApplications() { PackageManager pm = getActivity().getPackageManager(); List<ApplicationInfo> apps = pm.getInstalledApplications(0); List<KnownApplicationInfo> result = new ArrayList<KnownApplicationInfo>(); for (ApplicationInfo ap...
List<KnownApplicationInfo> function() { PackageManager pm = getActivity().getPackageManager(); List<ApplicationInfo> apps = pm.getInstalledApplications(0); List<KnownApplicationInfo> result = new ArrayList<KnownApplicationInfo>(); for (ApplicationInfo app : apps) { result.add(new InstalledNativeApplicationInfo(app)); }...
/** * Gets information of all applications installed in the Android device. * * @return information of all applications installed */
Gets information of all applications installed in the Android device
getInstalledNativeApplications
{ "repo_name": "TakayukiHoshi1984/DeviceConnect-Android", "path": "dConnectManager/dConnectManager/dconnect-manager-app/src/main/java/org/deviceconnect/android/manager/setting/AllowlistFragment.java", "license": "mit", "size": 25579 }
[ "android.content.pm.ApplicationInfo", "android.content.pm.PackageManager", "java.util.ArrayList", "java.util.List" ]
import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import java.util.ArrayList; import java.util.List;
import android.content.pm.*; import java.util.*;
[ "android.content", "java.util" ]
android.content; java.util;
1,226,897
public boolean isDownloading(Account account, OCFile file) { if (account == null || file == null) return false; return (mPendingDownloads.contains(account, file.getRemotePath())); }
boolean function(Account account, OCFile file) { if (account == null file == null) return false; return (mPendingDownloads.contains(account, file.getRemotePath())); }
/** * Returns True when the file described by 'file' in the ownCloud account 'account' * is downloading or waiting to download. * * If 'file' is a directory, returns 'true' if any of its descendant files is downloading or * waiting to download. * * @param a...
Returns True when the file described by 'file' in the ownCloud account 'account' is downloading or waiting to download. If 'file' is a directory, returns 'true' if any of its descendant files is downloading or waiting to download
isDownloading
{ "repo_name": "ekeitho/android", "path": "src/com/owncloud/android/files/services/FileDownloader.java", "license": "gpl-2.0", "size": 27274 }
[ "android.accounts.Account", "com.owncloud.android.datamodel.OCFile" ]
import android.accounts.Account; import com.owncloud.android.datamodel.OCFile;
import android.accounts.*; import com.owncloud.android.datamodel.*;
[ "android.accounts", "com.owncloud.android" ]
android.accounts; com.owncloud.android;
1,735,764
private synchronized void buildMineralList(Document configDoc) { if (mineralTypes != null) { // just in case if another thread is being created return; } // Build the global list in a temp to avoid access before it is built List<MineralType> newList = new ArrayList<>(); Element root = configDoc....
synchronized void function(Document configDoc) { if (mineralTypes != null) { return; } List<MineralType> newList = new ArrayList<>(); Element root = configDoc.getRootElement(); List<Element> minerals = root.getChildren(MINERAL); for (Element mineral : minerals) { String name = mineral.getAttributeValue(NAME).toLowerCas...
/** * Build the mineralTypes list * * @param configDoc */
Build the mineralTypes list
buildMineralList
{ "repo_name": "mars-sim/mars-sim", "path": "mars-sim-core/src/main/java/org/mars_sim/msp/core/environment/MineralMapConfig.java", "license": "gpl-3.0", "size": 3040 }
[ "java.util.ArrayList", "java.util.Collections", "java.util.List", "org.jdom2.Document", "org.jdom2.Element" ]
import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.jdom2.Document; import org.jdom2.Element;
import java.util.*; import org.jdom2.*;
[ "java.util", "org.jdom2" ]
java.util; org.jdom2;
1,682,153
public void unregisterForMmiComplete(Handler h){ mMmiCompleteRegistrants.remove(h); }
void function(Handler h){ mMmiCompleteRegistrants.remove(h); }
/** * Unregisters for MMI complete notification. * Extraneous calls are tolerated silently */
Unregisters for MMI complete notification. Extraneous calls are tolerated silently
unregisterForMmiComplete
{ "repo_name": "mateor/pdroid", "path": "android-4.0.3_r1/trunk/frameworks/base/telephony/java/com/android/internal/telephony/CallManager.java", "license": "gpl-3.0", "size": 66119 }
[ "android.os.Handler" ]
import android.os.Handler;
import android.os.*;
[ "android.os" ]
android.os;
102,145
public synchronized void delete() throws IOException, InterruptedException { checkPermission(DELETE); performDelete(); try { invokeOnDeleted(); } catch (AbstractMethodError e) { // ignore } Jenkins.getInstance().rebuildDependencyGraph(); ...
synchronized void function() throws IOException, InterruptedException { checkPermission(DELETE); performDelete(); try { invokeOnDeleted(); } catch (AbstractMethodError e) { } Jenkins.getInstance().rebuildDependencyGraph(); }
/** * Deletes this item. * * <p> * Any exception indicates the deletion has failed, but {@link AbortException} would prevent the caller * from showing the stack trace. This */
Deletes this item. Any exception indicates the deletion has failed, but <code>AbortException</code> would prevent the caller from showing the stack trace. This
delete
{ "repo_name": "lvotypko/jenkins2", "path": "core/src/main/java/hudson/model/AbstractItem.java", "license": "mit", "size": 20828 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,700,226
@Test(expected = IllegalArgumentException.class) public void getContentBadTableName() throws ClassNotFoundException, SQLException, ConformanceException, IOException { final File testFile = TestUtility.getRandomFile(); try(final GeoPackage gpkg = new GeoPackage(testFile, GeoPackage.OpenMode.C...
@Test(expected = IllegalArgumentException.class) void function() throws ClassNotFoundException, SQLException, ConformanceException, IOException { final File testFile = TestUtility.getRandomFile(); try(final GeoPackage gpkg = new GeoPackage(testFile, GeoPackage.OpenMode.Create)) { gpkg.core().getContent(STRExpected the ...
/** * Tests GeoPackageCore if it throws an IllegalArgumentException * when giving an empty string for the table name parameter. */
Tests GeoPackageCore if it throws an IllegalArgumentException when giving an empty string for the table name parameter
getContentBadTableName
{ "repo_name": "GitHubRGI/swagd", "path": "GeoPackage/src/test/java/com/rgi/geopackage/GeoPackageCoreAPITest.java", "license": "mit", "size": 51865 }
[ "com.rgi.geopackage.verification.ConformanceException", "java.io.File", "java.io.IOException", "java.sql.SQLException", "org.junit.Test" ]
import com.rgi.geopackage.verification.ConformanceException; import java.io.File; import java.io.IOException; import java.sql.SQLException; import org.junit.Test;
import com.rgi.geopackage.verification.*; import java.io.*; import java.sql.*; import org.junit.*;
[ "com.rgi.geopackage", "java.io", "java.sql", "org.junit" ]
com.rgi.geopackage; java.io; java.sql; org.junit;
2,182,208
public ServiceFuture<EmailTemplateContractInner> createOrUpdateAsync(String resourceGroupName, String serviceName, TemplateName templateName, EmailTemplateUpdateParameters parameters, String ifMatch, final ServiceCallback<EmailTemplateContractInner> serviceCallback) { return ServiceFuture.fromResponse(creat...
ServiceFuture<EmailTemplateContractInner> function(String resourceGroupName, String serviceName, TemplateName templateName, EmailTemplateUpdateParameters parameters, String ifMatch, final ServiceCallback<EmailTemplateContractInner> serviceCallback) { return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAs...
/** * Updates an Email Template. * * @param resourceGroupName The name of the resource group. * @param serviceName The name of the API Management service. * @param templateName Email Template Name Identifier. Possible values include: 'applicationApprovedNotificationMessage', 'accountClosedDevel...
Updates an Email Template
createOrUpdateAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/apimanagement/mgmt-v2019_01_01/src/main/java/com/microsoft/azure/management/apimanagement/v2019_01_01/implementation/EmailTemplatesInner.java", "license": "mit", "size": 79976 }
[ "com.microsoft.azure.management.apimanagement.v2019_01_01.EmailTemplateUpdateParameters", "com.microsoft.azure.management.apimanagement.v2019_01_01.TemplateName", "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.azure.management.apimanagement.v2019_01_01.EmailTemplateUpdateParameters; import com.microsoft.azure.management.apimanagement.v2019_01_01.TemplateName; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.azure.management.apimanagement.v2019_01_01.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
2,910,671
private void writeEvaluatorInfoWebOutput( final HttpServletResponse response, final List<String> ids) throws IOException { for (final String id : ids) { final EvaluatorDescriptor evaluatorDescriptor = this.reefStateManager.getEvaluators().get(id); final PrintWriter writer = response.getWriter(...
void function( final HttpServletResponse response, final List<String> ids) throws IOException { for (final String id : ids) { final EvaluatorDescriptor evaluatorDescriptor = this.reefStateManager.getEvaluators().get(id); final PrintWriter writer = response.getWriter(); if (evaluatorDescriptor != null) { final String no...
/** * Write Evaluator info on the Response so that to display on web page directly. * This is for direct browser queries. */
Write Evaluator info on the Response so that to display on web page directly. This is for direct browser queries
writeEvaluatorInfoWebOutput
{ "repo_name": "dkm2110/Microsoft-cisl", "path": "lang/java/reef-webserver/src/main/java/org/apache/reef/webserver/HttpServerReefEventHandler.java", "license": "apache-2.0", "size": 15739 }
[ "java.io.IOException", "java.io.PrintWriter", "java.net.InetSocketAddress", "java.util.List", "javax.servlet.http.HttpServletResponse", "org.apache.reef.driver.evaluator.EvaluatorDescriptor" ]
import java.io.IOException; import java.io.PrintWriter; import java.net.InetSocketAddress; import java.util.List; import javax.servlet.http.HttpServletResponse; import org.apache.reef.driver.evaluator.EvaluatorDescriptor;
import java.io.*; import java.net.*; import java.util.*; import javax.servlet.http.*; import org.apache.reef.driver.evaluator.*;
[ "java.io", "java.net", "java.util", "javax.servlet", "org.apache.reef" ]
java.io; java.net; java.util; javax.servlet; org.apache.reef;
2,495,803
@Nonnull public WorkbookFunctionsPoisson_DistRequest buildRequest(@Nullable final com.microsoft.graph.options.Option... requestOptions) { return buildRequest(getOptions(requestOptions)); }
WorkbookFunctionsPoisson_DistRequest function(@Nullable final com.microsoft.graph.options.Option... requestOptions) { return buildRequest(getOptions(requestOptions)); }
/** * Creates the WorkbookFunctionsPoisson_DistRequest * * @param requestOptions the options for the request * @return the WorkbookFunctionsPoisson_DistRequest instance */
Creates the WorkbookFunctionsPoisson_DistRequest
buildRequest
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/requests/WorkbookFunctionsPoisson_DistRequestBuilder.java", "license": "mit", "size": 3536 }
[ "javax.annotation.Nullable" ]
import javax.annotation.Nullable;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
1,380,826
public void displayGUIChest(IInventory chestInventory) { String s = chestInventory instanceof IInteractionObject ? ((IInteractionObject)chestInventory).getGuiID() : "minecraft:container"; if ("minecraft:chest".equals(s)) { this.mc.displayGuiScreen(new GuiChest(this.inventory...
void function(IInventory chestInventory) { String s = chestInventory instanceof IInteractionObject ? ((IInteractionObject)chestInventory).getGuiID() : STR; if (STR.equals(s)) { this.mc.displayGuiScreen(new GuiChest(this.inventory, chestInventory)); } else if (STR.equals(s)) { this.mc.displayGuiScreen(new GuiHopper(this...
/** * Displays the GUI for interacting with a chest inventory. Args: chestInventory */
Displays the GUI for interacting with a chest inventory. Args: chestInventory
displayGUIChest
{ "repo_name": "kelthalorn/ConquestCraft", "path": "build/tmp/recompSrc/net/minecraft/client/entity/EntityPlayerSP.java", "license": "lgpl-2.1", "size": 30417 }
[ "net.minecraft.client.gui.GuiHopper", "net.minecraft.client.gui.inventory.GuiBeacon", "net.minecraft.client.gui.inventory.GuiBrewingStand", "net.minecraft.client.gui.inventory.GuiChest", "net.minecraft.client.gui.inventory.GuiDispenser", "net.minecraft.client.gui.inventory.GuiFurnace", "net.minecraft.in...
import net.minecraft.client.gui.GuiHopper; import net.minecraft.client.gui.inventory.GuiBeacon; import net.minecraft.client.gui.inventory.GuiBrewingStand; import net.minecraft.client.gui.inventory.GuiChest; import net.minecraft.client.gui.inventory.GuiDispenser; import net.minecraft.client.gui.inventory.GuiFurnace; imp...
import net.minecraft.client.gui.*; import net.minecraft.client.gui.inventory.*; import net.minecraft.inventory.*; import net.minecraft.world.*;
[ "net.minecraft.client", "net.minecraft.inventory", "net.minecraft.world" ]
net.minecraft.client; net.minecraft.inventory; net.minecraft.world;
696,144
@Beta public static <E> ImmutableMultiset<E> copyHighestCountFirst(Multiset<E> multiset) { Entry<E>[] entries = (Entry<E>[]) multiset.entrySet().toArray(new Entry[0]); Arrays.sort(entries, DecreasingCount.INSTANCE); return ImmutableMultiset.copyFromEntries(Arrays.asList(entries)); } private static ...
static <E> ImmutableMultiset<E> function(Multiset<E> multiset) { Entry<E>[] entries = (Entry<E>[]) multiset.entrySet().toArray(new Entry[0]); Arrays.sort(entries, DecreasingCount.INSTANCE); return ImmutableMultiset.copyFromEntries(Arrays.asList(entries)); } private static final class DecreasingCount implements Comparat...
/** * Returns a copy of {@code multiset} as an {@link ImmutableMultiset} whose iteration order is * highest count first, with ties broken by the iteration order of the original multiset. * * @since 11.0 */
Returns a copy of multiset as an <code>ImmutableMultiset</code> whose iteration order is highest count first, with ties broken by the iteration order of the original multiset
copyHighestCountFirst
{ "repo_name": "Xaerxess/guava", "path": "android/guava/src/com/google/common/collect/Multisets.java", "license": "apache-2.0", "size": 38665 }
[ "com.google.common.collect.Multiset", "java.util.Arrays", "java.util.Comparator" ]
import com.google.common.collect.Multiset; import java.util.Arrays; import java.util.Comparator;
import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
1,579,004
@Nullable @Override public TokenInfo getTokenInfo(@NotNull String token) { int pos = token.indexOf(DELIM); String nodeId = (pos == -1) ? token : token.substring(0, pos); Tree tokenTree = identifierManager.getTree(nodeId); if (isValidTokenTree(tokenTree)) { try { ...
TokenInfo function(@NotNull String token) { int pos = token.indexOf(DELIM); String nodeId = (pos == -1) ? token : token.substring(0, pos); Tree tokenTree = identifierManager.getTree(nodeId); if (isValidTokenTree(tokenTree)) { try { User user = getUser(tokenTree); if (user != null) { return new TokenInfoImpl(tokenTree, ...
/** * Retrieves the token information associated with the specified login * token. If no accessible {@code Tree} exists for the given token or if * the token is not associated with a valid user this method returns {@code null}. * * @param token A valid login token. * @return The {@code Tok...
Retrieves the token information associated with the specified login token. If no accessible Tree exists for the given token or if the token is not associated with a valid user this method returns null
getTokenInfo
{ "repo_name": "trekawek/jackrabbit-oak", "path": "oak-core/src/main/java/org/apache/jackrabbit/oak/security/authentication/token/TokenProviderImpl.java", "license": "apache-2.0", "size": 28393 }
[ "javax.jcr.RepositoryException", "org.apache.jackrabbit.api.security.user.User", "org.apache.jackrabbit.oak.api.Tree", "org.apache.jackrabbit.oak.spi.security.authentication.token.TokenInfo", "org.jetbrains.annotations.NotNull" ]
import javax.jcr.RepositoryException; import org.apache.jackrabbit.api.security.user.User; import org.apache.jackrabbit.oak.api.Tree; import org.apache.jackrabbit.oak.spi.security.authentication.token.TokenInfo; import org.jetbrains.annotations.NotNull;
import javax.jcr.*; import org.apache.jackrabbit.api.security.user.*; import org.apache.jackrabbit.oak.api.*; import org.apache.jackrabbit.oak.spi.security.authentication.token.*; import org.jetbrains.annotations.*;
[ "javax.jcr", "org.apache.jackrabbit", "org.jetbrains.annotations" ]
javax.jcr; org.apache.jackrabbit; org.jetbrains.annotations;
1,303,098
public void testMergeOnlyAttributes() throws ParserConfigurationException, SAXException, IOException { String higherPriority = "" + "<manifest\n" + " xmlns:android=\"http://schemas.android.com/apk/res/android\"\n" + " xmlns:tools=\"http://sch...
void function() throws ParserConfigurationException, SAXException, IOException { String higherPriority = STR<manifest\nSTR xmlns:android=\STR xmlns:tools=\STR package=\STR>\nSTR\nSTR <activity android:name=\STR STR android:exported=\"true\STR tools:node=\STR>\nSTR <meta-data android:name=\"bird\" android:value=\STR />\...
/** * test tools:node="removeAll" with several target elements to be removed. */
test tools:node="removeAll" with several target elements to be removed
testMergeOnlyAttributes
{ "repo_name": "consulo/consulo-android", "path": "tools-base/build-system/manifest-merger/src/test/java/com/android/manifmerger/XmlElementTest.java", "license": "apache-2.0", "size": 85975 }
[ "java.io.IOException", "javax.xml.parsers.ParserConfigurationException", "org.xml.sax.SAXException" ]
import java.io.IOException; import javax.xml.parsers.ParserConfigurationException; import org.xml.sax.SAXException;
import java.io.*; import javax.xml.parsers.*; import org.xml.sax.*;
[ "java.io", "javax.xml", "org.xml.sax" ]
java.io; javax.xml; org.xml.sax;
1,267,437
private void pingAllOnlineFriends() { for (FriendsListEntry entry : friendsList) { if (entry.isOnline()) { // If friend din't reply since last call, set him offline if (entry.isWaitingForHeartbeat()) { entry.setOnline(false); ...
void function() { for (FriendsListEntry entry : friendsList) { if (entry.isOnline()) { if (entry.isWaitingForHeartbeat()) { entry.setOnline(false); sortFriendsListView(); } entry.setWaitingForHeartbeat(true); OnlineStatusMessage ping = new OnlineStatusMessage(p2p.getPeerAddress(), userProfile.getUserID(), true, true); ...
/** * Heartbeat like ping to all online friends to check periodically if they * are still online. This will send a OnlineStatusMessage to each online * friend and tell them to respond with a reply message. If the friend * didn't reply since the last call, she will be set offline. */
Heartbeat like ping to all online friends to check periodically if they are still online. This will send a OnlineStatusMessage to each online friend and tell them to respond with a reply message. If the friend didn't reply since the last call, she will be set offline
pingAllOnlineFriends
{ "repo_name": "sebastian-stephan/p2p-messenger", "path": "src/main/java/org/challengetask/MainApp.java", "license": "apache-2.0", "size": 26122 }
[ "org.challengetask.messages.OnlineStatusMessage", "org.challengetask.usermanagement.FriendsListEntry" ]
import org.challengetask.messages.OnlineStatusMessage; import org.challengetask.usermanagement.FriendsListEntry;
import org.challengetask.messages.*; import org.challengetask.usermanagement.*;
[ "org.challengetask.messages", "org.challengetask.usermanagement" ]
org.challengetask.messages; org.challengetask.usermanagement;
234,916
public static Objectify ofy() { return ObjectifyService.ofy(); }
static Objectify function() { return ObjectifyService.ofy(); }
/** * Use this static method for getting the Objectify service object in order * to make sure the above static block is executed before using Objectify. * * @return Objectify service object. */
Use this static method for getting the Objectify service object in order to make sure the above static block is executed before using Objectify
ofy
{ "repo_name": "TheGarage-ciandt/oAuthModel", "path": "src/main/java/com/ciandt/service/OfyService.java", "license": "apache-2.0", "size": 822 }
[ "com.googlecode.objectify.Objectify", "com.googlecode.objectify.ObjectifyService" ]
import com.googlecode.objectify.Objectify; import com.googlecode.objectify.ObjectifyService;
import com.googlecode.objectify.*;
[ "com.googlecode.objectify" ]
com.googlecode.objectify;
1,490,826
public int solutionHashCode() { return new HashCodeBuilder() .append(id) .append(location) // TODO performance leak: not needed? .append(previousAppearance) // TODO performance leak: not needed? .toHashCode(); }
int function() { return new HashCodeBuilder() .append(id) .append(location) .append(previousAppearance) .toHashCode(); }
/** * The normal methods {@link #equals(Object)} and {@link #hashCode()} cannot be used because the rule engine already * requires them (for performance in their original state). * @see #solutionEquals(Object) */
The normal methods <code>#equals(Object)</code> and <code>#hashCode()</code> cannot be used because the rule engine already requires them (for performance in their original state)
solutionHashCode
{ "repo_name": "cyberdrcarr/optaplanner", "path": "drools-planner-examples/src/main/java/org/drools/planner/examples/vehiclerouting/domain/VrpCustomer.java", "license": "apache-2.0", "size": 5474 }
[ "org.apache.commons.lang.builder.HashCodeBuilder" ]
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.*;
[ "org.apache.commons" ]
org.apache.commons;
884,321
public static String sha256Hex(String data) { return Hex.encodeHexString(sha256(data)); }
static String function(String data) { return Hex.encodeHexString(sha256(data)); }
/** * Calculates the SHA-256 digest and returns the value as a hex string. * <p> * Throws a <code>RuntimeException</code> on JRE versions prior to 1.4.0. * </p> * * @param data * Data to digest * @return SHA-256 digest as a hex string * @since 1.4 */
Calculates the SHA-256 digest and returns the value as a hex string. Throws a <code>RuntimeException</code> on JRE versions prior to 1.4.0.
sha256Hex
{ "repo_name": "mcomella/FirefoxAccounts-android", "path": "thirdparty/src/main/java/org/mozilla/apache/commons/codec/digest/DigestUtils.java", "license": "mpl-2.0", "size": 17367 }
[ "org.mozilla.apache.commons.codec.binary.Hex" ]
import org.mozilla.apache.commons.codec.binary.Hex;
import org.mozilla.apache.commons.codec.binary.*;
[ "org.mozilla.apache" ]
org.mozilla.apache;
1,664,429
public T caseConversationLink(ConversationLink object) { return null; }
T function(ConversationLink object) { return null; }
/** * Returns the result of interpreting the object as an instance of '<em>Conversation Link</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result ...
Returns the result of interpreting the object as an instance of 'Conversation Link'. This implementation returns null; returning a non-null result will terminate the switch.
caseConversationLink
{ "repo_name": "romartin/kie-wb-common", "path": "kie-wb-common-stunner/kie-wb-common-stunner-sets/kie-wb-common-stunner-bpmn/kie-wb-common-stunner-bpmn-emf/src/main/java/org/eclipse/bpmn2/util/Bpmn2Switch.java", "license": "apache-2.0", "size": 144865 }
[ "org.eclipse.bpmn2.ConversationLink" ]
import org.eclipse.bpmn2.ConversationLink;
import org.eclipse.bpmn2.*;
[ "org.eclipse.bpmn2" ]
org.eclipse.bpmn2;
1,340,550
public void addSample(SampleResult res) { long aTimeInMillis = res.getTime(); counter+=res.getSampleCount(); errorCount += res.getErrorCount(); long startTime = res.getStartTime(); long endTime = res.getEndTime(); if (firstTime > startTime) { ...
void function(SampleResult res) { long aTimeInMillis = res.getTime(); counter+=res.getSampleCount(); errorCount += res.getErrorCount(); long startTime = res.getStartTime(); long endTime = res.getEndTime(); if (firstTime > startTime) { firstTime = startTime; } if (lastTime < endTime) { lastTime = endTime; } runningSum +...
/** * Records a sample. * * @param res sample to record */
Records a sample
addSample
{ "repo_name": "yuyupapa/OpenSource", "path": "apache-jmeter-3.0/src/core/org/apache/jmeter/visualizers/RunningSample.java", "license": "apache-2.0", "size": 10850 }
[ "org.apache.jmeter.samplers.SampleResult" ]
import org.apache.jmeter.samplers.SampleResult;
import org.apache.jmeter.samplers.*;
[ "org.apache.jmeter" ]
org.apache.jmeter;
1,822,881
default Method getSetterMethod(String targetProperty) { return null; }
default Method getSetterMethod(String targetProperty) { return null; }
/** * Return the Field object for the specific property * @param targetProperty property name * @return Field object if present, null otherwise */
Return the Field object for the specific property
getField
{ "repo_name": "ddalton/xor", "path": "src/main/java/tools/xor/EntityType.java", "license": "apache-2.0", "size": 14801 }
[ "java.lang.reflect.Method" ]
import java.lang.reflect.Method;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
2,898,454
public List<String> getApplicationsRegisteredForTable(TableIdentity id) { ConnectionHandler handler = receivers.get(id); return getApplicationsRegisteredForHandler(handler); }
List<String> function(TableIdentity id) { ConnectionHandler handler = receivers.get(id); return getApplicationsRegisteredForHandler(handler); }
/** * Gets the applications registered for table. * * @param id * the id * @return the applications registered for table */
Gets the applications registered for table
getApplicationsRegisteredForTable
{ "repo_name": "synergynet/synergynet2.5", "path": "synergynet2.5/src/main/java/synergynetframework/appsystem/services/net/tablecomms/server/TableCommsServerService.java", "license": "bsd-3-clause", "size": 17078 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,469,369
public static boolean isEnableContainerNimbus() { String path = System.getenv(CONTAINER_NIMBUS_HEARTBEAT); if (StringUtils.isBlank(path)) { return false; } else { return true; } }
static boolean function() { String path = System.getenv(CONTAINER_NIMBUS_HEARTBEAT); if (StringUtils.isBlank(path)) { return false; } else { return true; } }
/** * Get to know whether nimbus is run under Apsara/Yarn container */
Get to know whether nimbus is run under Apsara/Yarn container
isEnableContainerNimbus
{ "repo_name": "haoyanjun21/jstorm", "path": "jstorm-core/src/main/java/com/alibaba/jstorm/client/ConfigExtension.java", "license": "apache-2.0", "size": 48763 }
[ "org.apache.commons.lang.StringUtils" ]
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.*;
[ "org.apache.commons" ]
org.apache.commons;
1,482,611
public void savePreference(View view) { SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this); SharedPreferences.Editor editor = sharedPref.edit(); SeekBar bar = (SeekBar) findViewById(R.id.frequency_bar); editor.putInt("frequency", bar.getProgress(...
void function(View view) { SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this); SharedPreferences.Editor editor = sharedPref.edit(); SeekBar bar = (SeekBar) findViewById(R.id.frequency_bar); editor.putInt(STR, bar.getProgress()); for (int i = 0; i < numCheckboxes; i++) { String key = chec...
/** Saves the data * @param view The Android view * click on the save button in my preference activity */
Saves the data
savePreference
{ "repo_name": "Tvli/AgonyAunt", "path": "app/src/main/java/com/example/agonyaunt/MyPreferences.java", "license": "apache-2.0", "size": 16106 }
[ "android.content.SharedPreferences", "android.preference.PreferenceManager", "android.view.View", "android.widget.SeekBar", "android.widget.Toast" ]
import android.content.SharedPreferences; import android.preference.PreferenceManager; import android.view.View; import android.widget.SeekBar; import android.widget.Toast;
import android.content.*; import android.preference.*; import android.view.*; import android.widget.*;
[ "android.content", "android.preference", "android.view", "android.widget" ]
android.content; android.preference; android.view; android.widget;
1,744,648
Set<Hint> getHints();
Set<Hint> getHints();
/** * Returns a set of window hints that can be used by the text gui system, the window manager or any other part that * is interacting with windows. * @return Set of hints defined for this window */
Returns a set of window hints that can be used by the text gui system, the window manager or any other part that is interacting with windows
getHints
{ "repo_name": "wknishio/variable-terminal", "path": "src/lanterna/com/googlecode/lanterna/gui2/Window.java", "license": "mit", "size": 20678 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
788,947
public static void logOutUser(HttpServletRequest request, HttpServletResponse response) { UserSessionManager.removeSession(); response.setStatus(HttpServletResponse.SC_OK); }
static void function(HttpServletRequest request, HttpServletResponse response) { UserSessionManager.removeSession(); response.setStatus(HttpServletResponse.SC_OK); }
/** * Handle logout requests. Remove existing session. * * @param request servlet request * @param response servlet response */
Handle logout requests. Remove existing session
logOutUser
{ "repo_name": "prabushi/devstudio-tooling-esb", "path": "plugins/org.wso2.developerstudio.eclipse.apim.endpoint.central/src/org/wso2/developerstudio/eclipse/apim/endpoint/central/handler/EndpointCentralServletRequestHandler.java", "license": "apache-2.0", "size": 25403 }
[ "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.wso2.developerstudio.eclipse.apim.endpoint.central.utils.UserSessionManager" ]
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.wso2.developerstudio.eclipse.apim.endpoint.central.utils.UserSessionManager;
import javax.servlet.http.*; import org.wso2.developerstudio.eclipse.apim.endpoint.central.utils.*;
[ "javax.servlet", "org.wso2.developerstudio" ]
javax.servlet; org.wso2.developerstudio;
602,510
@SuppressWarnings("IfMayBeConditional") private Map<K, V> interceptGet(@Nullable Collection<? extends K> keys, Map<K, V> map) { if (F.isEmpty(keys)) return map; CacheInterceptor<K, V> interceptor = cacheCfg.getInterceptor(); assert interceptor != null; Map<K, V> re...
@SuppressWarnings(STR) Map<K, V> function(@Nullable Collection<? extends K> keys, Map<K, V> map) { if (F.isEmpty(keys)) return map; CacheInterceptor<K, V> interceptor = cacheCfg.getInterceptor(); assert interceptor != null; Map<K, V> res = U.newHashMap(keys.size()); for (Map.Entry<K, V> e : map.entrySet()) { V val = in...
/** * Applies cache interceptor on result of 'get' operation. * * @param keys All requested keys. * @param map Result map. * @return Map with values returned by cache interceptor.. */
Applies cache interceptor on result of 'get' operation
interceptGet
{ "repo_name": "VladimirErshov/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java", "license": "apache-2.0", "size": 207138 }
[ "java.util.Collection", "java.util.Map", "org.apache.ignite.cache.CacheInterceptor", "org.apache.ignite.internal.util.typedef.F", "org.apache.ignite.internal.util.typedef.internal.U", "org.jetbrains.annotations.Nullable" ]
import java.util.Collection; import java.util.Map; import org.apache.ignite.cache.CacheInterceptor; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.U; import org.jetbrains.annotations.Nullable;
import java.util.*; import org.apache.ignite.cache.*; import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.internal.util.typedef.internal.*; import org.jetbrains.annotations.*;
[ "java.util", "org.apache.ignite", "org.jetbrains.annotations" ]
java.util; org.apache.ignite; org.jetbrains.annotations;
725,207
private long[] validate() throws SQLException { int i = 0; Long scn = connection.getSCN(); MetaDataClient client = new MetaDataClient(connection); long[] timeStamps = new long[this.mutations.size()]; for (Map.Entry<TableRef, Map<ImmutableBytesPtr,RowMutationState>> entry : mu...
long[] function() throws SQLException { int i = 0; Long scn = connection.getSCN(); MetaDataClient client = new MetaDataClient(connection); long[] timeStamps = new long[this.mutations.size()]; for (Map.Entry<TableRef, Map<ImmutableBytesPtr,RowMutationState>> entry : mutations.entrySet()) { TableRef tableRef = entry.getK...
/** * Validates that the meta data is valid against the server meta data if we haven't yet done so. * Otherwise, for every UPSERT VALUES call, we'd need to hit the server to see if the meta data * has changed. * @param connection * @return the server time to use for the upsert * @throws SQ...
Validates that the meta data is valid against the server meta data if we haven't yet done so. Otherwise, for every UPSERT VALUES call, we'd need to hit the server to see if the meta data has changed
validate
{ "repo_name": "nickman/phoenix", "path": "phoenix-core/src/main/java/org/apache/phoenix/execute/MutationState.java", "license": "apache-2.0", "size": 28734 }
[ "java.sql.SQLException", "java.util.Map", "org.apache.hadoop.hbase.HConstants", "org.apache.phoenix.coprocessor.MetaDataProtocol", "org.apache.phoenix.hbase.index.util.ImmutableBytesPtr", "org.apache.phoenix.query.QueryConstants", "org.apache.phoenix.schema.MetaDataClient", "org.apache.phoenix.schema....
import java.sql.SQLException; import java.util.Map; import org.apache.hadoop.hbase.HConstants; import org.apache.phoenix.coprocessor.MetaDataProtocol; import org.apache.phoenix.hbase.index.util.ImmutableBytesPtr; import org.apache.phoenix.query.QueryConstants; import org.apache.phoenix.schema.MetaDataClient; import org...
import java.sql.*; import java.util.*; import org.apache.hadoop.hbase.*; import org.apache.phoenix.coprocessor.*; import org.apache.phoenix.hbase.index.util.*; import org.apache.phoenix.query.*; import org.apache.phoenix.schema.*;
[ "java.sql", "java.util", "org.apache.hadoop", "org.apache.phoenix" ]
java.sql; java.util; org.apache.hadoop; org.apache.phoenix;
1,964,768
public int sendSample(String sample) throws IOException, SAPIException { int numberOfChannelsFlushed = 0; long sampleTimeAsSecondsSinceEpoch; // Set up a PacIOOS 2020 format converter to insert data as a second channel format byte[] sampleAsBytes = sample.getBytes(StandardCharsets.U...
int function(String sample) throws IOException, SAPIException { int numberOfChannelsFlushed = 0; long sampleTimeAsSecondsSinceEpoch; byte[] sampleAsBytes = sample.getBytes(StandardCharsets.UTF_8); InputStream sampleAsInputStream = new BufferedInputStream(new ByteArrayInputStream(sampleAsBytes)); OutputStream sampleAsOu...
/** * Send the sample to the DataTurbine * * @param sample the ASCII sample string to send * @throws IOException an IO exception * @throws SAPIException an SAPI exception */
Send the sample to the DataTurbine
sendSample
{ "repo_name": "csjx/realtime-data", "path": "src/main/java/edu/hawaii/soest/pacioos/text/SimpleTextSource.java", "license": "gpl-2.0", "size": 35751 }
[ "com.rbnb.sapi.SAPIException", "java.io.BufferedInputStream", "java.io.ByteArrayInputStream", "java.io.ByteArrayOutputStream", "java.io.IOException", "java.io.InputStream", "java.io.OutputStream", "java.nio.charset.StandardCharsets" ]
import com.rbnb.sapi.SAPIException; import java.io.BufferedInputStream; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.nio.charset.StandardCharsets;
import com.rbnb.sapi.*; import java.io.*; import java.nio.charset.*;
[ "com.rbnb.sapi", "java.io", "java.nio" ]
com.rbnb.sapi; java.io; java.nio;
1,626,818
public void testCannotGetInvalidResource() throws IOException, NamespaceException { HttpService httpService = getHTTPService( registry.getBundleContext() ); httpService.registerResources( "/", "/webroot/", null ); HttpURLConnection client = getConnection( DEFAULT_BASE_URL + "/index2.ht...
void function() throws IOException, NamespaceException { HttpService httpService = getHTTPService( registry.getBundleContext() ); httpService.registerResources( "/", STR, null ); HttpURLConnection client = getConnection( DEFAULT_BASE_URL + STR, "GET" ); client.connect(); assertTrue( client.getResponseCode() == 404 ); }
/** * Test that non-existent resource returns 404. * @throws IOException * @throws NamespaceException */
Test that non-existent resource returns 404
testCannotGetInvalidResource
{ "repo_name": "boneman1231/org.apache.felix", "path": "trunk/httplite/core/src/test/java/org/apache/felix/httplite/osgi/test/cases/TestResources.java", "license": "apache-2.0", "size": 2484 }
[ "java.io.IOException", "java.net.HttpURLConnection", "org.osgi.service.http.HttpService", "org.osgi.service.http.NamespaceException" ]
import java.io.IOException; import java.net.HttpURLConnection; import org.osgi.service.http.HttpService; import org.osgi.service.http.NamespaceException;
import java.io.*; import java.net.*; import org.osgi.service.http.*;
[ "java.io", "java.net", "org.osgi.service" ]
java.io; java.net; org.osgi.service;
1,455,351
public ReferenceSequence getSubsequenceAt(String contig, long start, long stop ) { try { if(bamView.isConcatSequences()) { int offset = bamView.getSequenceOffset(contig); start += offset; stop += offset; } return new ReferenceSe...
ReferenceSequence function(String contig, long start, long stop ) { try { if(bamView.isConcatSequences()) { int offset = bamView.getSequenceOffset(contig); start += offset; stop += offset; } return new ReferenceSequence(sequence.getName(), 0, sequence.getBases().getSubSequence(new Range((int)start, (int)stop), Bases.FO...
/** * Gets the subsequence of the contig in the range [start,stop] * @param contig Contig whose subsequence to retrieve. * @param start inclusive, 1-based start of region. * @param stop inclusive, 1-based stop of region. * @return The partial reference sequence associated with this range. * @thr...
Gets the subsequence of the contig in the range [start,stop]
getSubsequenceAt
{ "repo_name": "mrGeen/Artemis", "path": "uk/ac/sanger/artemis/components/alignment/CRAMReferenceSequenceFile.java", "license": "gpl-3.0", "size": 3369 }
[ "net.sf.picard.reference.ReferenceSequence", "uk.ac.sanger.artemis.io.Range", "uk.ac.sanger.artemis.sequence.Bases", "uk.ac.sanger.artemis.util.OutOfRangeException" ]
import net.sf.picard.reference.ReferenceSequence; import uk.ac.sanger.artemis.io.Range; import uk.ac.sanger.artemis.sequence.Bases; import uk.ac.sanger.artemis.util.OutOfRangeException;
import net.sf.picard.reference.*; import uk.ac.sanger.artemis.io.*; import uk.ac.sanger.artemis.sequence.*; import uk.ac.sanger.artemis.util.*;
[ "net.sf.picard", "uk.ac.sanger" ]
net.sf.picard; uk.ac.sanger;
1,726,816
public boolean waitForText(String text) { if(config.commandLogging){ Log.d(config.commandLoggingTag, "waitForText(\""+text+"\")"); } return (waiter.waitForText(text) != null); }
boolean function(String text) { if(config.commandLogging){ Log.d(config.commandLoggingTag, STRSTR\")"); } return (waiter.waitForText(text) != null); }
/** * Waits for the specified text to appear. Default timeout is 20 seconds. * * @param text the text to wait for, specified as a regular expression * @return {@code true} if text is displayed and {@code false} if it is not displayed before the timeout */
Waits for the specified text to appear. Default timeout is 20 seconds
waitForText
{ "repo_name": "IfengAutomation/test_agent_android", "path": "app/src/androidTest/java/com/robotium/solo/Solo.java", "license": "apache-2.0", "size": 134036 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
1,675,825
public MLOutput execute(String dmlScriptFilePath, String [] args) throws IOException, DMLException, ParseException { return execute(dmlScriptFilePath, args, false, null); }
MLOutput function(String dmlScriptFilePath, String [] args) throws IOException, DMLException, ParseException { return execute(dmlScriptFilePath, args, false, null); }
/** * Execute DML script by passing positional arguments using default configuration * @param dmlScriptFilePath * @param args * @throws IOException * @throws DMLException * @throws ParseException */
Execute DML script by passing positional arguments using default configuration
execute
{ "repo_name": "Wenpei/incubator-systemml", "path": "src/main/java/org/apache/sysml/api/MLContext.java", "license": "apache-2.0", "size": 58727 }
[ "java.io.IOException", "org.apache.sysml.parser.ParseException" ]
import java.io.IOException; import org.apache.sysml.parser.ParseException;
import java.io.*; import org.apache.sysml.parser.*;
[ "java.io", "org.apache.sysml" ]
java.io; org.apache.sysml;
1,290,805
Composite container = new Composite(parent, SWT.NULL); setControl(container); }
Composite container = new Composite(parent, SWT.NULL); setControl(container); }
/** * Create contents of the wizard. * @param parent */
Create contents of the wizard
createControl
{ "repo_name": "gobiiproject/GOBii-System", "path": "loaderui/src/edu/cornell/gobii/gdi/wizards/dnasamples/pgProject.java", "license": "mit", "size": 570 }
[ "org.eclipse.swt.widgets.Composite" ]
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
199,227
public final StoredClassCatalog getClassCatalog() { return javaCatalog; }
final StoredClassCatalog function() { return javaCatalog; }
/** * Return the class catalog. */
Return the class catalog
getClassCatalog
{ "repo_name": "djsedulous/namecoind", "path": "libs/db-4.7.25.NC/examples_java/src/collections/ship/tuple/SampleDatabase.java", "license": "mit", "size": 11791 }
[ "com.sleepycat.bind.serial.StoredClassCatalog" ]
import com.sleepycat.bind.serial.StoredClassCatalog;
import com.sleepycat.bind.serial.*;
[ "com.sleepycat.bind" ]
com.sleepycat.bind;
481,886
EClass getEPatch();
EClass getEPatch();
/** * Returns the meta object for class '{@link org.eclipse.xtext.parser.epatch.epatchTestLanguage.EPatch <em>EPatch</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>EPatch</em>'. * @see org.eclipse.xtext.parser.epatch.epatchTestLanguage.EPatch * @gene...
Returns the meta object for class '<code>org.eclipse.xtext.parser.epatch.epatchTestLanguage.EPatch EPatch</code>'.
getEPatch
{ "repo_name": "miklossy/xtext-core", "path": "org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/parser/epatch/epatchTestLanguage/EpatchTestLanguagePackage.java", "license": "epl-1.0", "size": 81411 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
199,334
public void removeLocation(Location location) { locations.remove(location); }
void function(Location location) { locations.remove(location); }
/** * Deletes a Location from the list of locations. * * @param location * The Location to remove. */
Deletes a Location from the list of locations
removeLocation
{ "repo_name": "hellodk/unfolding", "path": "src/de/fhpotsdam/unfolding/marker/AbstractShapeMarker.java", "license": "mit", "size": 10146 }
[ "de.fhpotsdam.unfolding.geo.Location" ]
import de.fhpotsdam.unfolding.geo.Location;
import de.fhpotsdam.unfolding.geo.*;
[ "de.fhpotsdam.unfolding" ]
de.fhpotsdam.unfolding;
57,463
public Map<ConnectPoint, Identifier<?>> assignLabelToPorts(Set<Link> links, ResourceConsumer resourceConsumer, EncapsulationType type) { Map<LinkKey, Identifier<?>> allocation = this...
Map<ConnectPoint, Identifier<?>> function(Set<Link> links, ResourceConsumer resourceConsumer, EncapsulationType type) { Map<LinkKey, Identifier<?>> allocation = this.assignLabelToLinks(links, resourceConsumer, type); if (allocation.isEmpty()) { return Collections.emptyMap(); } Map<ConnectPoint, Identifier<?>> finalAllo...
/** * Allocates labels and associates them to source * and destination ports of a link. * * @param links the links on which labels will be reserved * @param resourceConsumer the resource consumer * @param type the encapsulation type * @return the list of ports and associated labels ...
Allocates labels and associates them to source and destination ports of a link
assignLabelToPorts
{ "repo_name": "LorenzReinhart/ONOSnew", "path": "core/net/src/main/java/org/onosproject/net/resource/impl/LabelAllocator.java", "license": "apache-2.0", "size": 11140 }
[ "com.google.common.collect.ImmutableMap", "com.google.common.collect.Maps", "java.util.Collections", "java.util.Map", "java.util.Set", "org.onlab.util.Identifier", "org.onosproject.net.ConnectPoint", "org.onosproject.net.EncapsulationType", "org.onosproject.net.Link", "org.onosproject.net.LinkKey"...
import com.google.common.collect.ImmutableMap; import com.google.common.collect.Maps; import java.util.Collections; import java.util.Map; import java.util.Set; import org.onlab.util.Identifier; import org.onosproject.net.ConnectPoint; import org.onosproject.net.EncapsulationType; import org.onosproject.net.Link; import...
import com.google.common.collect.*; import java.util.*; import org.onlab.util.*; import org.onosproject.net.*; import org.onosproject.net.resource.*;
[ "com.google.common", "java.util", "org.onlab.util", "org.onosproject.net" ]
com.google.common; java.util; org.onlab.util; org.onosproject.net;
724,622
private String getCore() { try { return m_configObject.getString(JSON_KEY_CORE); } catch (final JSONException e) { LOG.info(Messages.get().getBundle().key(Messages.LOG_NO_CORE_SPECIFIED_0), e); return null; } }
String function() { try { return m_configObject.getString(JSON_KEY_CORE); } catch (final JSONException e) { LOG.info(Messages.get().getBundle().key(Messages.LOG_NO_CORE_SPECIFIED_0), e); return null; } }
/** Returns the configured Solr core, or <code>null</code> if no core is configured. * @return The configured Solr core, or <code>null</code> if no core is configured. */
Returns the configured Solr core, or <code>null</code> if no core is configured
getCore
{ "repo_name": "ggiudetti/opencms-core", "path": "src/org/opencms/jsp/search/config/parser/CmsJSONSearchConfigurationParser.java", "license": "lgpl-2.1", "size": 40432 }
[ "org.opencms.json.JSONException" ]
import org.opencms.json.JSONException;
import org.opencms.json.*;
[ "org.opencms.json" ]
org.opencms.json;
2,157,681
public Alert getAlert(Integer alertId) throws APIException; /** * @deprecated use {@link #saveAlert(Alert)}
Alert function(Integer alertId) throws APIException; /** * @deprecated use {@link #saveAlert(Alert)}
/** * Get alert by internal identifier * * @param alertId internal alert identifier * @return alert with given internal identifier * @throws APIException */
Get alert by internal identifier
getAlert
{ "repo_name": "Bhamni/openmrs-core", "path": "api/src/main/java/org/openmrs/notification/AlertService.java", "license": "mpl-2.0", "size": 5795 }
[ "org.openmrs.api.APIException" ]
import org.openmrs.api.APIException;
import org.openmrs.api.*;
[ "org.openmrs.api" ]
org.openmrs.api;
1,487,847
private ArrayList<Cluster> constructClusters(LinkedList<HashEntry> partitions, double curInterestPercentage) { ArrayList<Cluster> clusters = new ArrayList<Cluster>(); // Thresholds for the current run of the cluster builder (c.f. the threshold for the partitions list). double curInterestThreshold = (double) (noO...
ArrayList<Cluster> function(LinkedList<HashEntry> partitions, double curInterestPercentage) { ArrayList<Cluster> clusters = new ArrayList<Cluster>(); double curInterestThreshold = (double) (noOfTrees * (curInterestPercentage / 100.0d)); int majInterestThreshold = (int) (noOfTrees * (50.0 / 100.0d)); for (Iterator<HashE...
/** * Create partitions from an input tree - recursive so will be called by many nodes, beginning with root but with calculations actually beginning on leaves. * * @param partitions Partitions in the form of entries in the hash table * @param curInterestPercentage Current percentage of interest th...
Create partitions from an input tree - recursive so will be called by many nodes, beginning with root but with calculations actually beginning on leaves
constructClusters
{ "repo_name": "ingolfured/StatAlign", "path": "src/statalign/postprocess/plugins/contree/CTMain.java", "license": "gpl-3.0", "size": 38814 }
[ "java.util.ArrayList", "java.util.Collections", "java.util.Iterator", "java.util.LinkedList" ]
import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.LinkedList;
import java.util.*;
[ "java.util" ]
java.util;
1,077,094
public ValueExpression makeValueExpression(final String expression, final Class<?> type) { ValueExpression ve = getExpressionFactory().createValueExpression( getElContext(), expression, type); return ve; }
ValueExpression function(final String expression, final Class<?> type) { ValueExpression ve = getExpressionFactory().createValueExpression( getElContext(), expression, type); return ve; }
/** * Crea una expression que se utiliza para representar el tipo * * @param expression * @param type * @return value expression con la expression pasada que retorna el type * especificado */
Crea una expression que se utiliza para representar el tipo
makeValueExpression
{ "repo_name": "fpuna-cia/karaku", "path": "src/main/java/py/una/pol/karaku/util/ELHelper.java", "license": "lgpl-2.1", "size": 8526 }
[ "javax.el.ValueExpression" ]
import javax.el.ValueExpression;
import javax.el.*;
[ "javax.el" ]
javax.el;
2,093,790
public static int[] arange(final int len) { checkArgument(len > 0); final int[] ret = new int[len]; for (int i = 0; i < len; ++i) { ret[i] = i; } return ret; }
static int[] function(final int len) { checkArgument(len > 0); final int[] ret = new int[len]; for (int i = 0; i < len; ++i) { ret[i] = i; } return ret; }
/** * Produces an array of integers from 0 (inclusive) to len (exclusive) */
Produces an array of integers from 0 (inclusive) to len (exclusive)
arange
{ "repo_name": "BBN-E/bue-common-open", "path": "common-core-open/src/main/java/com/bbn/bue/common/primitives/IntUtils.java", "license": "mit", "size": 3852 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
1,763,417
public static Crs of(final String uri) { Crs crs = new Crs(); crs.setType("name"); crs.setProperties(new HashMap<String, Object>() { { put("name", uri); } }); return crs; }
static Crs function(final String uri) { Crs crs = new Crs(); crs.setType("name"); crs.setProperties(new HashMap<String, Object>() { { put("name", uri); } }); return crs; }
/** * create a name style CRS * * @param uri name string * @return name style crs */
create a name style CRS
of
{ "repo_name": "metatron-app/metatron-discovery", "path": "discovery-server/src/main/java/app/metatron/discovery/common/geospatial/geojson/Crs.java", "license": "apache-2.0", "size": 1753 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
324,946
private boolean createGraphPlaceFromModel(String id,boolean marked){ String label = SBMLutilities.getArrayId(bioModel.getSBMLDocument(), id); if (bioModel.isInput(id)) { label += '\n' + GlobalConstants.INPUT; } else if (bioModel.isOutput(id)) { label += '\n' + GlobalConstants.OUTPUT; } else { //labe...
boolean function(String id,boolean marked){ String label = SBMLutilities.getArrayId(bioModel.getSBMLDocument(), id); if (bioModel.isInput(id)) { label += '\n' + GlobalConstants.INPUT; } else if (bioModel.isOutput(id)) { label += '\n' + GlobalConstants.OUTPUT; } else { } CellValueObject cvo = new CellValueObject(label, ...
/** * Creates a variable using the internal model * @param pname * @return */
Creates a variable using the internal model
createGraphPlaceFromModel
{ "repo_name": "MyersResearchGroup/iBioSim", "path": "gui/src/main/java/edu/utah/ece/async/ibiosim/gui/modelEditor/schematic/BioGraph.java", "license": "apache-2.0", "size": 155474 }
[ "edu.utah.ece.async.ibiosim.dataModels.biomodel.util.SBMLutilities", "edu.utah.ece.async.ibiosim.dataModels.util.GlobalConstants" ]
import edu.utah.ece.async.ibiosim.dataModels.biomodel.util.SBMLutilities; import edu.utah.ece.async.ibiosim.dataModels.util.GlobalConstants;
import edu.utah.ece.async.ibiosim.*;
[ "edu.utah.ece" ]
edu.utah.ece;
846,090
public String findCorrespondingKey(String actualExtension) { IOOperationsUtility ioOperationUtility = new IOOperationsUtility(); Map<String, String> keyValuePairs = ioOperationUtility.getVisibleExtensionsKeyValuePairs(); if (keyValuePairs != null && actualExtension != null) { fo...
String function(String actualExtension) { IOOperationsUtility ioOperationUtility = new IOOperationsUtility(); Map<String, String> keyValuePairs = ioOperationUtility.getVisibleExtensionsKeyValuePairs(); if (keyValuePairs != null && actualExtension != null) { for (Map.Entry<String, String> entry : keyValuePairs.entrySet(...
/** * <p> * Obtains the corresponding key for the file with extension actualExtension * </p> * * @param actualExtension a <code>String</code> which is extension of a file * @return The corresponding key for the actualExtension */
Obtains the corresponding key for the file with extension actualExtension
findCorrespondingKey
{ "repo_name": "helicalinsight/helicalinsight", "path": "core/src/main/java/com/helicalinsight/efw/io/delete/DeleteOperationUtility.java", "license": "apache-2.0", "size": 12470 }
[ "com.helicalinsight.efw.io.IOOperationsUtility", "java.util.Map" ]
import com.helicalinsight.efw.io.IOOperationsUtility; import java.util.Map;
import com.helicalinsight.efw.io.*; import java.util.*;
[ "com.helicalinsight.efw", "java.util" ]
com.helicalinsight.efw; java.util;
2,537,169
public void removeOnEditTextAttachedListener(@NonNull OnEditTextAttachedListener listener) { editTextAttachedListeners.remove(listener); }
void function(@NonNull OnEditTextAttachedListener listener) { editTextAttachedListeners.remove(listener); }
/** * Remove the given {@link OnEditTextAttachedListener} that was previously added via {@link * #addOnEditTextAttachedListener(OnEditTextAttachedListener)}. * * @param listener listener to remove */
Remove the given <code>OnEditTextAttachedListener</code> that was previously added via <code>#addOnEditTextAttachedListener(OnEditTextAttachedListener)</code>
removeOnEditTextAttachedListener
{ "repo_name": "material-components/material-components-android", "path": "lib/java/com/google/android/material/textfield/TextInputLayout.java", "license": "apache-2.0", "size": 171507 }
[ "androidx.annotation.NonNull" ]
import androidx.annotation.NonNull;
import androidx.annotation.*;
[ "androidx.annotation" ]
androidx.annotation;
1,858,324
public TemporalRelation getDuration() { if (Procedure_Type.featOkTst && ((Procedure_Type)jcasType).casFeat_duration == null) jcasType.jcas.throwFeatMissing("duration", "org.apache.ctakes.typesystem.type.refsem.Procedure"); return (TemporalRelation)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRe...
TemporalRelation function() { if (Procedure_Type.featOkTst && ((Procedure_Type)jcasType).casFeat_duration == null) jcasType.jcas.throwFeatMissing(STR, STR); return (TemporalRelation)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((Procedure_Type)jcasType).casFeatCode_duration)));}
/** getter for duration - gets * @generated */
getter for duration - gets
getDuration
{ "repo_name": "schorndorfer/uima-components", "path": "annotator-parent/type-system/src/main/java/org/apache/ctakes/typesystem/type/refsem/Procedure.java", "license": "apache-2.0", "size": 10258 }
[ "org.apache.ctakes.typesystem.type.relation.TemporalRelation" ]
import org.apache.ctakes.typesystem.type.relation.TemporalRelation;
import org.apache.ctakes.typesystem.type.relation.*;
[ "org.apache.ctakes" ]
org.apache.ctakes;
932,936
@Override public void enterUtf8_3(@NotNull ECLParser.Utf8_3Context ctx) { }
@Override public void enterUtf8_3(@NotNull ECLParser.Utf8_3Context ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */
The default implementation does nothing
exitEscapedchar
{ "repo_name": "WestCoastInformatics/UMLS-Terminology-Server", "path": "jpa-services/src/main/resources/ECLBaseListener.java", "license": "apache-2.0", "size": 18157 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
2,506,541
public void updateCardSlideHints() { if (DBG) log("updateCardSlideHints()..."); if (mSlideInProgress) { // If currently sliding, do nothing. (Leave the hints in whatever // state they were before we started the slide.) if (DBG) log("--> SLIDING: do nothin...
void function() { if (DBG) log(STR); if (mSlideInProgress) { if (DBG) log(STR); return; } final boolean hasRingingCall = Receiver.ccCall != null && Receiver.ccCall.getState() == Call.State.INCOMING; int slideUpHint = 0; int slideDownHint = 0; if (hasRingingCall) { slideUpHint = R.string.slide_hint_up_to_answer; } else ...
/** * Update the "slide hints" (displayed onscreen either above or below * the slidable CallCard) based on the current state. */
Update the "slide hints" (displayed onscreen either above or below the slidable CallCard) based on the current state
updateCardSlideHints
{ "repo_name": "371816210/mysipdroid", "path": "src/org/sipdroid/sipua/phone/SlidingCardManager.java", "license": "gpl-3.0", "size": 28076 }
[ "org.sipdroid.sipua.ui.Receiver" ]
import org.sipdroid.sipua.ui.Receiver;
import org.sipdroid.sipua.ui.*;
[ "org.sipdroid.sipua" ]
org.sipdroid.sipua;
2,683,255
public final void createConditionalTypeConstraint(final ConstraintVariable2 expressionVariable, final ConstraintVariable2 thenVariable, final ConstraintVariable2 elseVariable) { final ITypeConstraint2 constraint= new ConditionalTypeConstraint(expressionVariable, thenVariable, elseVariable); if (!fTypeConstraints...
final void function(final ConstraintVariable2 expressionVariable, final ConstraintVariable2 thenVariable, final ConstraintVariable2 elseVariable) { final ITypeConstraint2 constraint= new ConditionalTypeConstraint(expressionVariable, thenVariable, elseVariable); if (!fTypeConstraints.contains(constraint)) { fTypeConstra...
/** * Creates a conditional type constraint. * * @param expressionVariable the expression type constraint variable * @param thenVariable the then type constraint variable * @param elseVariable the else type constraint variable */
Creates a conditional type constraint
createConditionalTypeConstraint
{ "repo_name": "kumattau/JDTPatch", "path": "org.eclipse.jdt.ui/src/org/eclipse/jdt/internal/corext/refactoring/structure/constraints/SuperTypeConstraintsModel.java", "license": "epl-1.0", "size": 19988 }
[ "org.eclipse.jdt.internal.corext.refactoring.typeconstraints2.ConstraintVariable2", "org.eclipse.jdt.internal.corext.refactoring.typeconstraints2.ITypeConstraint2" ]
import org.eclipse.jdt.internal.corext.refactoring.typeconstraints2.ConstraintVariable2; import org.eclipse.jdt.internal.corext.refactoring.typeconstraints2.ITypeConstraint2;
import org.eclipse.jdt.internal.corext.refactoring.typeconstraints2.*;
[ "org.eclipse.jdt" ]
org.eclipse.jdt;
1,314,618
public static Object invokeExactMethod( Object object, String methodName, Object arg) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { Object[] args = {arg}; return invokeExactMethod...
static Object function( Object object, String methodName, Object arg) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { Object[] args = {arg}; return invokeExactMethod(object, methodName, args); }
/** * <p>Invoke a method whose parameter type matches exactly the object * type.</p> * * <p> This is a convenient wrapper for * {@link #invokeExactMethod(Object object,String methodName,Object [] args)}. * </p> * * @param object invoke method on this object * @param methodNa...
Invoke a method whose parameter type matches exactly the object type. This is a convenient wrapper for <code>#invokeExactMethod(Object object,String methodName,Object [] args)</code>.
invokeExactMethod
{ "repo_name": "OpenSoftwareSolutions/PDFReporter", "path": "pdfreporter-extensions/src/org/oss/pdfreporter/uses/org/apache/commons/beanutils/MethodUtils.java", "license": "lgpl-3.0", "size": 50544 }
[ "java.lang.reflect.InvocationTargetException" ]
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
1,731,796
checkNotNull(view, "view == null"); return new ToolbarItemClickObservable(view); } /** * Create an observable which emits on {@code view} navigation click events. The emitted value is * unspecified and should only be used as notification. * <p> * <em>Warning:</em> The created observable keeps a str...
checkNotNull(view, STR); return new ToolbarItemClickObservable(view); } /** * Create an observable which emits on {@code view} navigation click events. The emitted value is * unspecified and should only be used as notification. * <p> * <em>Warning:</em> The created observable keeps a strong reference to {@code view}. U...
/** * Create an observable which emits the clicked item in {@code view}'s menu. * <p> * <em>Warning:</em> The created observable keeps a strong reference to {@code view}. Unsubscribe * to free this reference. */
Create an observable which emits the clicked item in view's menu. Warning: The created observable keeps a strong reference to view. Unsubscribe to free this reference
itemClicks
{ "repo_name": "vanniktech/RxBinding", "path": "rxbinding-appcompat-v7/src/main/java/com/jakewharton/rxbinding2/support/v7/widget/RxToolbar.java", "license": "apache-2.0", "size": 4241 }
[ "android.support.v7.widget.Toolbar" ]
import android.support.v7.widget.Toolbar;
import android.support.v7.widget.*;
[ "android.support" ]
android.support;
1,620,692
@AboutToShow public void aboutToShow(List<MMenuElement> items, IEclipseContext context) { List<TestProject> projects = testProjectService.getProjects(); for (int i = 0; i < projects.size(); i++) { MDirectMenuItem element = MMenuFactory.INSTANCE.createDirectMenuItem(); String projectName = projects....
void function(List<MMenuElement> items, IEclipseContext context) { List<TestProject> projects = testProjectService.getProjects(); for (int i = 0; i < projects.size(); i++) { MDirectMenuItem element = MMenuFactory.INSTANCE.createDirectMenuItem(); String projectName = projects.get(i).getName(); element.setLabel(projectNa...
/** * creating projects names in dropdown menu in LastRunsTable-toolbar. * * @param context * IEclipseContext context * @param items * to add project-items to drop down menu */
creating projects names in dropdown menu in LastRunsTable-toolbar
aboutToShow
{ "repo_name": "test-editor/test-editor", "path": "dashboard/org.testeditor.dashboard/src/org/testeditor/dashboard/ProjectComboBox.java", "license": "epl-1.0", "size": 2104 }
[ "java.util.List", "org.eclipse.e4.core.contexts.IEclipseContext", "org.eclipse.e4.ui.model.application.ui.menu.MDirectMenuItem", "org.eclipse.e4.ui.model.application.ui.menu.MMenuElement", "org.eclipse.e4.ui.model.application.ui.menu.MMenuFactory", "org.testeditor.core.model.teststructure.TestProject" ]
import java.util.List; import org.eclipse.e4.core.contexts.IEclipseContext; import org.eclipse.e4.ui.model.application.ui.menu.MDirectMenuItem; import org.eclipse.e4.ui.model.application.ui.menu.MMenuElement; import org.eclipse.e4.ui.model.application.ui.menu.MMenuFactory; import org.testeditor.core.model.teststructure...
import java.util.*; import org.eclipse.e4.core.contexts.*; import org.eclipse.e4.ui.model.application.ui.menu.*; import org.testeditor.core.model.teststructure.*;
[ "java.util", "org.eclipse.e4", "org.testeditor.core" ]
java.util; org.eclipse.e4; org.testeditor.core;
782,785
Set<SubResourceDefinition> getSubResourceDefinitions();
Set<SubResourceDefinition> getSubResourceDefinitions();
/** * Obtain a set of all child resource types. * * @return set of sub-resource definitions */
Obtain a set of all child resource types
getSubResourceDefinitions
{ "repo_name": "arenadata/ambari", "path": "ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceDefinition.java", "license": "apache-2.0", "size": 4766 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,667,163
public List<Float> getWidths() { if (widths == null) { COSArray array = (COSArray)font.getDictionaryObject( COSName.WIDTHS ); if (array != null) { widths = COSArrayList.convertFloatCOSArrayToList(array); } } return w...
List<Float> function() { if (widths == null) { COSArray array = (COSArray)font.getDictionaryObject( COSName.WIDTHS ); if (array != null) { widths = COSArrayList.convertFloatCOSArrayToList(array); } } return widths; }
/** * The widths of the characters. This will be null for the standard 14 fonts. * * @return The widths of the characters. * */
The widths of the characters. This will be null for the standard 14 fonts
getWidths
{ "repo_name": "myrridin/qz-print", "path": "pdfbox_1.8.4_qz/src/org/apache/pdfbox/pdmodel/font/PDFont.java", "license": "lgpl-2.1", "size": 26890 }
[ "java.util.List", "org.apache.pdfbox.cos.COSArray", "org.apache.pdfbox.cos.COSName", "org.apache.pdfbox.pdmodel.common.COSArrayList" ]
import java.util.List; import org.apache.pdfbox.cos.COSArray; import org.apache.pdfbox.cos.COSName; import org.apache.pdfbox.pdmodel.common.COSArrayList;
import java.util.*; import org.apache.pdfbox.cos.*; import org.apache.pdfbox.pdmodel.common.*;
[ "java.util", "org.apache.pdfbox" ]
java.util; org.apache.pdfbox;
41,980
@Test public void testPopulateModel() throws IOException, InvalidSPDXAnalysisException { model = ModelFactory.createDefaultModel(); SPDXDocument doc = new SPDXDocument(model); String testDocUri = "https://olex.openlogic.com/spdxdoc/package_versions/download/4832?path=openlogic/zlib/1.2.3/zlib-1.2.3-all-src.zi...
void function() throws IOException, InvalidSPDXAnalysisException { model = ModelFactory.createDefaultModel(); SPDXDocument doc = new SPDXDocument(model); String testDocUri = STRhttps: doc.createSpdxPackage(pkgUri); StringWriter writer = new StringWriter(); doc.getModel().write(writer); String beforeCreate = writer.toSt...
/** * Test method for {@link org.spdx.rdfparser.SPDXFile#populateModel(org.apache.jena.rdf.model.Resource, org.apache.jena.rdf.model.Model)}. * @throws IOException * @throws InvalidSPDXAnalysisException */
Test method for <code>org.spdx.rdfparser.SPDXFile#populateModel(org.apache.jena.rdf.model.Resource, org.apache.jena.rdf.model.Model)</code>
testPopulateModel
{ "repo_name": "spdx/tools", "path": "Test/org/spdx/rdfparser/TestSPDXFile.java", "license": "apache-2.0", "size": 26589 }
[ "java.io.IOException", "java.io.StringWriter", "java.util.List", "org.apache.jena.rdf.model.ModelFactory", "org.apache.jena.rdf.model.Property", "org.apache.jena.rdf.model.Resource", "org.junit.Assert", "org.spdx.rdfparser.license.AnyLicenseInfo", "org.spdx.spdxspreadsheet.TestPackageInfoSheet" ]
import java.io.IOException; import java.io.StringWriter; import java.util.List; import org.apache.jena.rdf.model.ModelFactory; import org.apache.jena.rdf.model.Property; import org.apache.jena.rdf.model.Resource; import org.junit.Assert; import org.spdx.rdfparser.license.AnyLicenseInfo; import org.spdx.spdxspreadsheet....
import java.io.*; import java.util.*; import org.apache.jena.rdf.model.*; import org.junit.*; import org.spdx.rdfparser.license.*; import org.spdx.spdxspreadsheet.*;
[ "java.io", "java.util", "org.apache.jena", "org.junit", "org.spdx.rdfparser", "org.spdx.spdxspreadsheet" ]
java.io; java.util; org.apache.jena; org.junit; org.spdx.rdfparser; org.spdx.spdxspreadsheet;
1,981,051
public Vector right(int i) { return ((Vertex)elementAt((i+1)%size())).point; }
Vector function(int i) { return ((Vertex)elementAt((i+1)%size())).point; }
/** * Returns the point to the right of the point number i * * @param i * @return point to the right of the point number i */
Returns the point to the right of the point number i
right
{ "repo_name": "wdiestel/arbaro", "path": "src/net/sourceforge/arbaro/mesh/MeshSection.java", "license": "gpl-2.0", "size": 9364 }
[ "net.sourceforge.arbaro.transformation.Vector" ]
import net.sourceforge.arbaro.transformation.Vector;
import net.sourceforge.arbaro.transformation.*;
[ "net.sourceforge.arbaro" ]
net.sourceforge.arbaro;
2,424,290
private Calendar asCalendar(Calendar base, Time time) { // Get calendar from given SQL time Calendar timeCalendar = Calendar.getInstance(); timeCalendar.setTime(time); // Apply given time to base calendar base.set(Calendar.HOUR_OF_DAY, timeCalendar.get(Calendar.HOUR_OF_DAY)...
Calendar function(Calendar base, Time time) { Calendar timeCalendar = Calendar.getInstance(); timeCalendar.setTime(time); base.set(Calendar.HOUR_OF_DAY, timeCalendar.get(Calendar.HOUR_OF_DAY)); base.set(Calendar.MINUTE, timeCalendar.get(Calendar.MINUTE)); base.set(Calendar.SECOND, timeCalendar.get(Calendar.SECOND)); ba...
/** * Converts a SQL Time to a Calendar, independently of time zone, using the * given Calendar as a base. The time components will be copied to the * given Calendar verbatim, leaving the date and time zone components of * the given Calendar otherwise intact. * * @param base * The...
Converts a SQL Time to a Calendar, independently of time zone, using the given Calendar as a base. The time components will be copied to the given Calendar verbatim, leaving the date and time zone components of the given Calendar otherwise intact
asCalendar
{ "repo_name": "DaanWillemsen/guacamole-client", "path": "extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/ModeledUser.java", "license": "apache-2.0", "size": 21477 }
[ "java.sql.Time", "java.util.Calendar" ]
import java.sql.Time; import java.util.Calendar;
import java.sql.*; import java.util.*;
[ "java.sql", "java.util" ]
java.sql; java.util;
2,309,273
public WorkflowTriggerCallbackUrlInner listContentCallbackUrl(String resourceGroupName, String integrationAccountName, String partnerName, GetCallbackUrlParameters listContentCallbackUrl) { return listContentCallbackUrlWithServiceResponseAsync(resourceGroupName, integrationAccountName, partnerName, listCont...
WorkflowTriggerCallbackUrlInner function(String resourceGroupName, String integrationAccountName, String partnerName, GetCallbackUrlParameters listContentCallbackUrl) { return listContentCallbackUrlWithServiceResponseAsync(resourceGroupName, integrationAccountName, partnerName, listContentCallbackUrl).toBlocking().sing...
/** * Get the content callback url. * * @param resourceGroupName The resource group name. * @param integrationAccountName The integration account name. * @param partnerName The integration account partner name. * @param listContentCallbackUrl the GetCallbackUrlParameters value * @thro...
Get the content callback url
listContentCallbackUrl
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/IntegrationAccountPartnersInner.java", "license": "mit", "size": 51815 }
[ "com.microsoft.azure.management.logic.v2018_07_01_preview.GetCallbackUrlParameters" ]
import com.microsoft.azure.management.logic.v2018_07_01_preview.GetCallbackUrlParameters;
import com.microsoft.azure.management.logic.v2018_07_01_preview.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
422,023
public void mergeIntoConfig(final Definition eventDef) { removeDefaults(eventDef); MergeableDefinition eventToMerge = new MergeableDefinition(eventDef); removeDefinitionsthatDontMatchLocation(eventDef); // remove pass purgeRangesFromDefinitions(eventToMerge); if (eventToMerge.isTrivial()) return...
void function(final Definition eventDef) { removeDefaults(eventDef); MergeableDefinition eventToMerge = new MergeableDefinition(eventDef); removeDefinitionsthatDontMatchLocation(eventDef); purgeRangesFromDefinitions(eventToMerge); if (eventToMerge.isTrivial()) return; MergeableDefinition matchingDef = findMatchingDefin...
/** * This is the exposed method for moving the data from a configureSNMP event * into the SnmpConfig from SnmpPeerFactory. * * @param eventDef * a {@link org.opennms.netmgt.config.snmp.Definition} object. */
This is the exposed method for moving the data from a configureSNMP event into the SnmpConfig from SnmpPeerFactory
mergeIntoConfig
{ "repo_name": "jeffgdotorg/opennms", "path": "opennms-config/src/main/java/org/opennms/netmgt/config/SnmpConfigManager.java", "license": "gpl-2.0", "size": 8710 }
[ "org.opennms.netmgt.config.snmp.Definition" ]
import org.opennms.netmgt.config.snmp.Definition;
import org.opennms.netmgt.config.snmp.*;
[ "org.opennms.netmgt" ]
org.opennms.netmgt;
7,815
public static Properties propertiesOf(String key, String value, String... keyVals) { Properties properties = new Properties(); properties.setProperty(key, value); for (int i = 0; i < keyVals.length; i += 2) { properties.setProperty( keyVals[i], ke...
static Properties function(String key, String value, String... keyVals) { Properties properties = new Properties(); properties.setProperty(key, value); for (int i = 0; i < keyVals.length; i += 2) { properties.setProperty( keyVals[i], keyVals[i + 1] ); } return properties; }
/** * Build a {@link java.util.Properties} from varargs. */
Build a <code>java.util.Properties</code> from varargs
propertiesOf
{ "repo_name": "ullgren/camel", "path": "core/camel-util/src/main/java/org/apache/camel/util/CollectionHelper.java", "license": "apache-2.0", "size": 7267 }
[ "java.util.Properties" ]
import java.util.Properties;
import java.util.*;
[ "java.util" ]
java.util;
765,107
@ApiModelProperty(value = "E-mail address of the user who initiated this build. Note that this was the user's e-mail address at the time the build was initiated; this address may not represent the same end-user for all time.") public String getCreator() { return creator; }
@ApiModelProperty(value = STR) String function() { return creator; }
/** * E-mail address of the user who initiated this build. Note that this was the user&#39;s e-mail address at the time the build was initiated; this address may not represent the same end-user for all time. * @return creator **/
E-mail address of the user who initiated this build. Note that this was the user&#39;s e-mail address at the time the build was initiated; this address may not represent the same end-user for all time
getCreator
{ "repo_name": "grafeas/client-java", "path": "src/main/java/io/grafeas/model/ApiBuildProvenance.java", "license": "apache-2.0", "size": 12335 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
2,617,715
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH) private static void postIcsRegisterActivityLifecycleCallbacks(Application application, ActivityLifecycleCallbacksCompat callback) { application.registerActivityLifecycleCallbacks(new ActivityLifecycleCallbacksWrapper(callback)); }
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH) static void function(Application application, ActivityLifecycleCallbacksCompat callback) { application.registerActivityLifecycleCallbacks(new ActivityLifecycleCallbacksWrapper(callback)); }
/** * SDK>=14 use system callback * @param application * @param callback */
SDK>=14 use system callback
postIcsRegisterActivityLifecycleCallbacks
{ "repo_name": "haodynasty/BaseUtilsLib", "path": "XUtilsLib/src/main/java/com/plusub/lib/activity/lifecycle/LifecycleDispatcher.java", "license": "apache-2.0", "size": 14411 }
[ "android.annotation.TargetApi", "android.app.Application", "android.os.Build" ]
import android.annotation.TargetApi; import android.app.Application; import android.os.Build;
import android.annotation.*; import android.app.*; import android.os.*;
[ "android.annotation", "android.app", "android.os" ]
android.annotation; android.app; android.os;
537,963
public Adapter createSequenceAdapter() { return null; }
Adapter function() { return null; }
/** * Creates a new adapter for an object of class '{@link org_sl_planet_bgfSimplified.Sequence <em>Sequence</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- ...
Creates a new adapter for an object of class '<code>org_sl_planet_bgfSimplified.Sequence Sequence</code>'. This default implementation returns null so that we can easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway.
createSequenceAdapter
{ "repo_name": "patrickneubauer/XMLIntellEdit", "path": "xmlintelledit/xmltext/src/main/java/org_sl_planet_bgfSimplified/util/Org_sl_planet_bgfSimplifiedAdapterFactory.java", "license": "mit", "size": 13545 }
[ "org.eclipse.emf.common.notify.Adapter" ]
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,710,675
protected void channelIdle(ChannelHandlerContext ctx, IdleStateEvent evt) throws Exception { ctx.fireUserEventTriggered(evt); }
void function(ChannelHandlerContext ctx, IdleStateEvent evt) throws Exception { ctx.fireUserEventTriggered(evt); }
/** * Is called when an {@link IdleStateEvent} should be fired. This implementation calls * {@link ChannelHandlerContext#fireUserEventTriggered(Object)}. */
Is called when an <code>IdleStateEvent</code> should be fired. This implementation calls <code>ChannelHandlerContext#fireUserEventTriggered(Object)</code>
channelIdle
{ "repo_name": "SinaTadayon/netty", "path": "handler/src/main/java/io/netty/handler/timeout/IdleStateHandler.java", "license": "apache-2.0", "size": 17694 }
[ "io.netty.channel.ChannelHandlerContext" ]
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.*;
[ "io.netty.channel" ]
io.netty.channel;
2,613,962
@Override public Adapter createAuxiliaryTrafficAreaPropertyTypeAdapter() { if (auxiliaryTrafficAreaPropertyTypeItemProvider == null) { auxiliaryTrafficAreaPropertyTypeItemProvider = new AuxiliaryTrafficAreaPropertyTypeItemProvider(this); } return auxiliaryTrafficAreaPropertyTypeItemProvider; } protec...
Adapter function() { if (auxiliaryTrafficAreaPropertyTypeItemProvider == null) { auxiliaryTrafficAreaPropertyTypeItemProvider = new AuxiliaryTrafficAreaPropertyTypeItemProvider(this); } return auxiliaryTrafficAreaPropertyTypeItemProvider; } protected AuxiliaryTrafficAreaTypeItemProvider auxiliaryTrafficAreaTypeItemProv...
/** * This creates an adapter for a {@link net.opengis.citygml.transportation.AuxiliaryTrafficAreaPropertyType}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This creates an adapter for a <code>net.opengis.citygml.transportation.AuxiliaryTrafficAreaPropertyType</code>.
createAuxiliaryTrafficAreaPropertyTypeAdapter
{ "repo_name": "markus1978/citygml4emf", "path": "de.hub.citygml.emf.ecore.edit/src/net/opengis/citygml/transportation/provider/TransportationItemProviderAdapterFactory.java", "license": "apache-2.0", "size": 12947 }
[ "org.eclipse.emf.common.notify.Adapter" ]
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,069,617
public Collection<PropertyElement> getTypeMembers(String typeName, String memberName) { ArrayList<PropertyElement> properties = new ArrayList<PropertyElement>(); for (Index index : indices) { properties.addAll(_reader.getFunctions(index, typeName, memberName)); properties.addAll(_reader.getProperties(in...
Collection<PropertyElement> function(String typeName, String memberName) { ArrayList<PropertyElement> properties = new ArrayList<PropertyElement>(); for (Index index : indices) { properties.addAll(_reader.getFunctions(index, typeName, memberName)); properties.addAll(_reader.getProperties(index, typeName, memberName)); ...
/** * Gets all the functions and properties with the given name for the given type. * * @param typeName * @param memberName * @return */
Gets all the functions and properties with the given name for the given type
getTypeMembers
{ "repo_name": "HossainKhademian/Studio3", "path": "plugins/com.aptana.js.core/src/com/aptana/js/core/index/JSIndexQueryHelper.java", "license": "gpl-3.0", "size": 14802 }
[ "com.aptana.index.core.Index", "com.aptana.js.core.model.PropertyElement", "java.util.ArrayList", "java.util.Collection" ]
import com.aptana.index.core.Index; import com.aptana.js.core.model.PropertyElement; import java.util.ArrayList; import java.util.Collection;
import com.aptana.index.core.*; import com.aptana.js.core.model.*; import java.util.*;
[ "com.aptana.index", "com.aptana.js", "java.util" ]
com.aptana.index; com.aptana.js; java.util;
882,805
IComplexNDArray complexZeros(int[] shape);
IComplexNDArray complexZeros(int[] shape);
/** * Create an ndarray of ones * * @param shape the shape of the ndarray * @return an ndarray with ones filled in */
Create an ndarray of ones
complexZeros
{ "repo_name": "drlebedev/nd4j", "path": "nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/factory/NDArrayFactory.java", "license": "apache-2.0", "size": 43801 }
[ "org.nd4j.linalg.api.complex.IComplexNDArray" ]
import org.nd4j.linalg.api.complex.IComplexNDArray;
import org.nd4j.linalg.api.complex.*;
[ "org.nd4j.linalg" ]
org.nd4j.linalg;
2,762,881
public void setParams(Map<String, String> params) { if (params != null) { m_params = params; } }
void function(Map<String, String> params) { if (params != null) { m_params = params; } }
/** * Sets the parameters for the context menu command.<p> * * @param params the parameters for the context menu command */
Sets the parameters for the context menu command
setParams
{ "repo_name": "it-tavis/opencms-core", "path": "src/org/opencms/gwt/shared/CmsContextMenuEntryBean.java", "license": "lgpl-2.1", "size": 7675 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,972,301
public void enableErasureCodingPolicy(String ecPolicyName) throws IOException { dfs.enableErasureCodingPolicy(ecPolicyName); }
void function(String ecPolicyName) throws IOException { dfs.enableErasureCodingPolicy(ecPolicyName); }
/** * Enable erasure coding policy. * * @param ecPolicyName The name of the policy to be enabled. * @throws IOException */
Enable erasure coding policy
enableErasureCodingPolicy
{ "repo_name": "soumabrata-chakraborty/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java", "license": "apache-2.0", "size": 105290 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,866,113
private void reportExceptionThrow(Element element, Throwable t) { if (element != null) { logMessage("throw for %s:\n", element); } logException(t); printError(element, "Exception throw during processing: %s %s", t, Arrays.toString(Arrays.copyOf(t.getStackTrace(), 4))); ...
void function(Element element, Throwable t) { if (element != null) { logMessage(STR, element); } logException(t); printError(element, STR, t, Arrays.toString(Arrays.copyOf(t.getStackTrace(), 4))); } static class TypeDescriptor { final TypeMirror mirror; final String shortName; final String nodeClass; final String nodeP...
/** * Bugs in an annotation processor can cause silent failure so try to report any exception * throws as errors. */
Bugs in an annotation processor can cause silent failure so try to report any exception throws as errors
reportExceptionThrow
{ "repo_name": "smarr/Truffle", "path": "compiler/src/org.graalvm.compiler.core.match.processor/src/org/graalvm/compiler/core/match/processor/MatchProcessor.java", "license": "gpl-2.0", "size": 43459 }
[ "java.util.Arrays", "java.util.HashMap", "java.util.HashSet", "java.util.List", "java.util.Map", "java.util.Set", "javax.lang.model.element.Element", "javax.lang.model.type.TypeMirror" ]
import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import javax.lang.model.element.Element; import javax.lang.model.type.TypeMirror;
import java.util.*; import javax.lang.model.element.*; import javax.lang.model.type.*;
[ "java.util", "javax.lang" ]
java.util; javax.lang;
2,191,438