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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
@Test
public void cardStorageEnableTest() {
HppRequest hppRequest = SampleJsonData.generateValidHppRequest(false);
hppRequest.generateDefaults(SampleJsonData.SECRET);
hppRequest.setCardStorageEnable("");
try {
ValidationUtils.validate(hppRequest);
} catch (RealexValidationException ex) {
Assert.fa... | void function() { HppRequest hppRequest = SampleJsonData.generateValidHppRequest(false); hppRequest.generateDefaults(SampleJsonData.SECRET); hppRequest.setCardStorageEnable(STRThis HppRequest should have no validation errors.STR11STRThis HppRequest should have validation errors.STRhppRequest.cardStorageEnable.sizeSTRaS... | /**
* Test card storage enable.
*/ | Test card storage enable | cardStorageEnableTest | {
"repo_name": "realexpayments-developers/rxp-hpp-java",
"path": "src/test/java/com/realexpayments/hpp/sdk/utils/ValidationUtilsTest.java",
"license": "mit",
"size": 46688
} | [
"com.realexpayments.hpp.sdk.SampleJsonData",
"com.realexpayments.hpp.sdk.domain.HppRequest"
] | import com.realexpayments.hpp.sdk.SampleJsonData; import com.realexpayments.hpp.sdk.domain.HppRequest; | import com.realexpayments.hpp.sdk.*; import com.realexpayments.hpp.sdk.domain.*; | [
"com.realexpayments.hpp"
] | com.realexpayments.hpp; | 485,998 |
public static int queryCount(int privilegeId, User user, Map context) {
if (context == null) {
context = new HashMap();
}
EntitleManager entitleManager = Factory.getEntitleManager(appName);
return entitleManager.queryCount(privilegeId, user, context);
} | static int function(int privilegeId, User user, Map context) { if (context == null) { context = new HashMap(); } EntitleManager entitleManager = Factory.getEntitleManager(appName); return entitleManager.queryCount(privilegeId, user, context); } | /**
* Eval query policy, return result count.
*
* @param privilegeId privilegeId
* @param user who queries for data
* @param context context
* @return result count
*/ | Eval query policy, return result count | queryCount | {
"repo_name": "colddew/ralasafe",
"path": "ralasafe-engine/src/main/java/org/ralasafe/Ralasafe.java",
"license": "mit",
"size": 6306
} | [
"java.util.HashMap",
"java.util.Map",
"org.ralasafe.entitle.EntitleManager",
"org.ralasafe.user.User"
] | import java.util.HashMap; import java.util.Map; import org.ralasafe.entitle.EntitleManager; import org.ralasafe.user.User; | import java.util.*; import org.ralasafe.entitle.*; import org.ralasafe.user.*; | [
"java.util",
"org.ralasafe.entitle",
"org.ralasafe.user"
] | java.util; org.ralasafe.entitle; org.ralasafe.user; | 2,824,094 |
public void handleData(String data) {
if (data == null) return;
text = data;
sendEvent(new TextInputEvent(this.user, getPayload(), data));
if (handler != null)
handler.onType(data);
} | void function(String data) { if (data == null) return; text = data; sendEvent(new TextInputEvent(this.user, getPayload(), data)); if (handler != null) handler.onType(data); } | /**
* Internal use only
*
* @param data Data
*/ | Internal use only | handleData | {
"repo_name": "magik6k/JWWF",
"path": "src/main/java/net/magik6k/jwwf/widgets/basic/input/PasswordInput.java",
"license": "mit",
"size": 4811
} | [
"net.magik6k.jwwf.event.input.TextInputEvent"
] | import net.magik6k.jwwf.event.input.TextInputEvent; | import net.magik6k.jwwf.event.input.*; | [
"net.magik6k.jwwf"
] | net.magik6k.jwwf; | 69,032 |
Optional<Measure> createMeasure(T counter, CreateMeasureContext context); | Optional<Measure> createMeasure(T counter, CreateMeasureContext context); | /**
* This method is used to create a measure on each node, using the value of the counter
* If {@link Optional#absent()} is returned, no measure will be created
*
* @param context the context for which the measure must be created
*/ | This method is used to create a measure on each node, using the value of the counter If <code>Optional#absent()</code> is returned, no measure will be created | createMeasure | {
"repo_name": "Builders-SonarSource/sonarqube-bis",
"path": "server/sonar-server/src/main/java/org/sonar/server/computation/task/projectanalysis/formula/Formula.java",
"license": "lgpl-3.0",
"size": 1705
} | [
"com.google.common.base.Optional",
"org.sonar.server.computation.task.projectanalysis.measure.Measure"
] | import com.google.common.base.Optional; import org.sonar.server.computation.task.projectanalysis.measure.Measure; | import com.google.common.base.*; import org.sonar.server.computation.task.projectanalysis.measure.*; | [
"com.google.common",
"org.sonar.server"
] | com.google.common; org.sonar.server; | 2,726,927 |
@Override
public void validate(Collection<JThequeError> errors) {
ConstraintManager.validate(Properties.Film.COMMENT, areaComment.getText(), errors);
ConstraintManager.validate(Properties.Film.NOTE, modelNote.getSelectedNote(), errors);
} | void function(Collection<JThequeError> errors) { ConstraintManager.validate(Properties.Film.COMMENT, areaComment.getText(), errors); ConstraintManager.validate(Properties.Film.NOTE, modelNote.getSelectedNote(), errors); } | /**
* Validate the view.
*
* @param errors The errors list to fill.
*/ | Validate the view | validate | {
"repo_name": "wichtounet/jtheque-films-module",
"path": "src/main/java/org/jtheque/films/view/impl/panels/JPanelInfosPerso.java",
"license": "apache-2.0",
"size": 3793
} | [
"java.util.Collection",
"org.jtheque.core.managers.error.JThequeError",
"org.jtheque.core.utils.ui.constraints.ConstraintManager",
"org.jtheque.films.persistence.od.able.Film",
"org.jtheque.films.utils.Constants"
] | import java.util.Collection; import org.jtheque.core.managers.error.JThequeError; import org.jtheque.core.utils.ui.constraints.ConstraintManager; import org.jtheque.films.persistence.od.able.Film; import org.jtheque.films.utils.Constants; | import java.util.*; import org.jtheque.core.managers.error.*; import org.jtheque.core.utils.ui.constraints.*; import org.jtheque.films.persistence.od.able.*; import org.jtheque.films.utils.*; | [
"java.util",
"org.jtheque.core",
"org.jtheque.films"
] | java.util; org.jtheque.core; org.jtheque.films; | 2,786,295 |
void setEntityResolver(EntityResolver resolver); | void setEntityResolver(EntityResolver resolver); | /**
* Set the EntityResolver to associate with this class.
*
* @param resolver The EntityResolver
*/ | Set the EntityResolver to associate with this class | setEntityResolver | {
"repo_name": "apache/commons-configuration",
"path": "src/main/java/org/apache/commons/configuration2/resolver/EntityResolverSupport.java",
"license": "apache-2.0",
"size": 1362
} | [
"org.xml.sax.EntityResolver"
] | import org.xml.sax.EntityResolver; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 1,276,710 |
@Test
public void testRuleSet1()
throws SAXException, IOException
{
// Configure the digester as required
RuleSet rs = new TestRuleSet();
digester.addRuleSet( rs );
// Parse our test input.
Employee employee = digester.parse( getInputStream( "Test1.xml" ) );... | void function() throws SAXException, IOException { RuleSet rs = new TestRuleSet(); digester.addRuleSet( rs ); Employee employee = digester.parse( getInputStream( STR ) ); assertNotNull( STR, employee ); assertEquals( STR, STR, employee.getFirstName() ); assertEquals( STR, STR, employee.getLastName() ); assertNotNull( S... | /**
* Test object creation (and associated property setting) with nothing on the stack, which should cause an
* appropriate Employee object to be returned. The processing rules will process the nested Address elements as
* well, but will not attempt to add them to the Employee.
*/ | Test object creation (and associated property setting) with nothing on the stack, which should cause an appropriate Employee object to be returned. The processing rules will process the nested Address elements as well, but will not attempt to add them to the Employee | testRuleSet1 | {
"repo_name": "callMeDimit/commons-digester",
"path": "core/src/test/java/org/apache/commons/digester3/RuleTestCase.java",
"license": "apache-2.0",
"size": 22459
} | [
"java.io.IOException",
"org.apache.commons.digester3.RuleSet",
"org.junit.Assert",
"org.xml.sax.SAXException"
] | import java.io.IOException; import org.apache.commons.digester3.RuleSet; import org.junit.Assert; import org.xml.sax.SAXException; | import java.io.*; import org.apache.commons.digester3.*; import org.junit.*; import org.xml.sax.*; | [
"java.io",
"org.apache.commons",
"org.junit",
"org.xml.sax"
] | java.io; org.apache.commons; org.junit; org.xml.sax; | 1,818,911 |
public void setPrimaryKey(NotCompletedPK primaryKey); | void function(NotCompletedPK primaryKey); | /**
* Sets the primary key of this not completed.
*
* @param primaryKey the primary key of this not completed
*/ | Sets the primary key of this not completed | setPrimaryKey | {
"repo_name": "rivetlogic/liferay-announcer",
"path": "portlets/announcer-portlet/docroot/WEB-INF/service/com/rivetlogic/portlet/model/NotCompletedModel.java",
"license": "gpl-3.0",
"size": 4451
} | [
"com.rivetlogic.portlet.service.persistence.NotCompletedPK"
] | import com.rivetlogic.portlet.service.persistence.NotCompletedPK; | import com.rivetlogic.portlet.service.persistence.*; | [
"com.rivetlogic.portlet"
] | com.rivetlogic.portlet; | 414,030 |
public List<String> getDatabasesByPattern(String databasePattern) throws HiveException {
try {
return getMSC().getDatabases(databasePattern);
} catch (Exception e) {
throw new HiveException(e);
}
} | List<String> function(String databasePattern) throws HiveException { try { return getMSC().getDatabases(databasePattern); } catch (Exception e) { throw new HiveException(e); } } | /**
* Get all existing databases that match the given
* pattern. The matching occurs as per Java regular expressions
*
* @param databasePattern
* java re pattern
* @return list of database names
* @throws HiveException
*/ | Get all existing databases that match the given pattern. The matching occurs as per Java regular expressions | getDatabasesByPattern | {
"repo_name": "sankarh/hive",
"path": "ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java",
"license": "apache-2.0",
"size": 267260
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,808,982 |
@Override
public Token recoverInline(Parser recognizer)
throws RecognitionException
{
InputMismatchException e = new InputMismatchException(recognizer);
for (ParserRuleContext context = recognizer.getContext(); context != null; context = context.getParent()) {
context.exception = e;
}
... | Token function(Parser recognizer) throws RecognitionException { InputMismatchException e = new InputMismatchException(recognizer); for (ParserRuleContext context = recognizer.getContext(); context != null; context = context.getParent()) { context.exception = e; } throw new ParseCancellationException(e); } public void s... | /** Make sure we don't attempt to recover inline; if the parser
* successfully recovers, it won't throw an exception.
*/ | Make sure we don't attempt to recover inline; if the parser successfully recovers, it won't throw an exception | recoverInline | {
"repo_name": "Pursuit92/antlr4",
"path": "runtime/Java/src/org/antlr/v4/runtime/BailErrorStrategy.java",
"license": "bsd-3-clause",
"size": 2834
} | [
"org.antlr.v4.runtime.misc.ParseCancellationException"
] | import org.antlr.v4.runtime.misc.ParseCancellationException; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 1,081,214 |
EAttribute getDesignConstraint_DesignConstraintType(); | EAttribute getDesignConstraint_DesignConstraintType(); | /**
* Returns the meta object for the attribute '{@link org.obeonetwork.dsl.east_adl.requirements.DesignConstraint#getDesignConstraintType <em>Design Constraint Type</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Design Constraint Type</em>'.
* @see ... | Returns the meta object for the attribute '<code>org.obeonetwork.dsl.east_adl.requirements.DesignConstraint#getDesignConstraintType Design Constraint Type</code>'. | getDesignConstraint_DesignConstraintType | {
"repo_name": "ObeoNetwork/EAST-ADL-Designer",
"path": "plugins/org.obeonetwork.dsl.eastadl/src/org/obeonetwork/dsl/east_adl/requirements/RequirementsPackage.java",
"license": "epl-1.0",
"size": 122085
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,586,266 |
private GenericTerm freshSortVariableUse()
{
return factory.newVariableUse(freshSortVariable());
} | GenericTerm function() { return factory.newVariableUse(freshSortVariable()); } | /**
* Create a fresh sort variable as a term.
* @return the newly created sort variable
*/ | Create a fresh sort variable as a term | freshSortVariableUse | {
"repo_name": "crsx/crsx",
"path": "src/net/sf/crsx/generic/sort/Sorter.java",
"license": "epl-1.0",
"size": 116281
} | [
"net.sf.crsx.generic.GenericTerm"
] | import net.sf.crsx.generic.GenericTerm; | import net.sf.crsx.generic.*; | [
"net.sf.crsx"
] | net.sf.crsx; | 2,826,682 |
public void clearUndo() {
undo = new ArrayList<TransAction>();
undo_position = -1;
} | void function() { undo = new ArrayList<TransAction>(); undo_position = -1; } | /**
* Clear undo.
*/ | Clear undo | clearUndo | {
"repo_name": "kurtwalker/pentaho-kettle",
"path": "engine/src/main/java/org/pentaho/di/base/AbstractMeta.java",
"license": "apache-2.0",
"size": 55564
} | [
"java.util.ArrayList",
"org.pentaho.di.core.undo.TransAction"
] | import java.util.ArrayList; import org.pentaho.di.core.undo.TransAction; | import java.util.*; import org.pentaho.di.core.undo.*; | [
"java.util",
"org.pentaho.di"
] | java.util; org.pentaho.di; | 1,161,827 |
public static void constraintMatrix6x4( DMatrixRMaj L_6x10, DMatrixRMaj L_6x4 ) {
int index = 0;
for (int i = 0; i < 6; i++) {
L_6x4.data[index++] = L_6x10.get(i, 0);
L_6x4.data[index++] = L_6x10.get(i, 1);
L_6x4.data[index++] = L_6x10.get(i, 3);
L_6x4.data[index++] = L_6x10.get(i, 6);
}
} | static void function( DMatrixRMaj L_6x10, DMatrixRMaj L_6x4 ) { int index = 0; for (int i = 0; i < 6; i++) { L_6x4.data[index++] = L_6x10.get(i, 0); L_6x4.data[index++] = L_6x10.get(i, 1); L_6x4.data[index++] = L_6x10.get(i, 3); L_6x4.data[index++] = L_6x10.get(i, 6); } } | /**
* Extracts the linear constraint matrix for case 1 from the full 6x10 constraint matrix.
*/ | Extracts the linear constraint matrix for case 1 from the full 6x10 constraint matrix | constraintMatrix6x4 | {
"repo_name": "lessthanoptimal/BoofCV",
"path": "main/boofcv-geo/src/main/java/boofcv/alg/geo/pose/UtilLepetitEPnP.java",
"license": "apache-2.0",
"size": 10156
} | [
"org.ejml.data.DMatrixRMaj"
] | import org.ejml.data.DMatrixRMaj; | import org.ejml.data.*; | [
"org.ejml.data"
] | org.ejml.data; | 239,127 |
public static ChangeBlockEvent.Grow createChangeBlockEventGrow(Cause cause, World targetWorld, List<Transaction<BlockSnapshot>> transactions) {
HashMap<String, Object> values = new HashMap<>();
values.put("cause", cause);
values.put("targetWorld", targetWorld);
values.put("transactio... | static ChangeBlockEvent.Grow function(Cause cause, World targetWorld, List<Transaction<BlockSnapshot>> transactions) { HashMap<String, Object> values = new HashMap<>(); values.put("cause", cause); values.put(STR, targetWorld); values.put(STR, transactions); return SpongeEventFactoryUtils.createEventImpl(ChangeBlockEven... | /**
* AUTOMATICALLY GENERATED, DO NOT EDIT.
* Creates a new instance of
* {@link org.spongepowered.api.event.block.ChangeBlockEvent.Grow}.
*
* @param cause The cause
* @param targetWorld The target world
* @param transactions The transactions
* @return A new grow change block eve... | AUTOMATICALLY GENERATED, DO NOT EDIT. Creates a new instance of <code>org.spongepowered.api.event.block.ChangeBlockEvent.Grow</code> | createChangeBlockEventGrow | {
"repo_name": "kashike/SpongeAPI",
"path": "src/main/java/org/spongepowered/api/event/SpongeEventFactory.java",
"license": "mit",
"size": 215110
} | [
"java.util.HashMap",
"java.util.List",
"org.spongepowered.api.block.BlockSnapshot",
"org.spongepowered.api.data.Transaction",
"org.spongepowered.api.event.block.ChangeBlockEvent",
"org.spongepowered.api.event.cause.Cause",
"org.spongepowered.api.world.World"
] | import java.util.HashMap; import java.util.List; import org.spongepowered.api.block.BlockSnapshot; import org.spongepowered.api.data.Transaction; import org.spongepowered.api.event.block.ChangeBlockEvent; import org.spongepowered.api.event.cause.Cause; import org.spongepowered.api.world.World; | import java.util.*; import org.spongepowered.api.block.*; import org.spongepowered.api.data.*; import org.spongepowered.api.event.block.*; import org.spongepowered.api.event.cause.*; import org.spongepowered.api.world.*; | [
"java.util",
"org.spongepowered.api"
] | java.util; org.spongepowered.api; | 1,946,642 |
public boolean storePublicKeyOfOtherUser(Context context, UUID userid, PublicKey publicKey) {
try {
String randomFileName = UUID.randomUUID().toString();
savePublicKey(context, randomFileName, publicKey);
PrefsHelper.storeFilenamePublicKey(context, userid.toString(), rand... | boolean function(Context context, UUID userid, PublicKey publicKey) { try { String randomFileName = UUID.randomUUID().toString(); savePublicKey(context, randomFileName, publicKey); PrefsHelper.storeFilenamePublicKey(context, userid.toString(), randomFileName); return true; } catch (Exception e) { LogHelper.getInstance(... | /**
* Stores the key of the given user on the device. This key will also be available in future sessions.
*
* @return true if the public key of the other user could be saved
* */ | Stores the key of the given user on the device. This key will also be available in future sessions | storePublicKeyOfOtherUser | {
"repo_name": "thomas-bornschlegel/AndroidMultiChannelMiddleware",
"path": "Code/MultiChannelMiddleware/src/de/lmu/mcm/security/KeyHolder.java",
"license": "apache-2.0",
"size": 12674
} | [
"android.content.Context",
"de.lmu.mcm.helper.LogHelper",
"de.lmu.mcm.helper.PrefsHelper",
"java.security.PublicKey",
"java.util.UUID"
] | import android.content.Context; import de.lmu.mcm.helper.LogHelper; import de.lmu.mcm.helper.PrefsHelper; import java.security.PublicKey; import java.util.UUID; | import android.content.*; import de.lmu.mcm.helper.*; import java.security.*; import java.util.*; | [
"android.content",
"de.lmu.mcm",
"java.security",
"java.util"
] | android.content; de.lmu.mcm; java.security; java.util; | 1,933,778 |
private void addComponents() {
PeakList peakLists[] = MZmineCore.getCurrentProject().getPeakLists();
// Elements of pnlpreview
JPanel pnlpreview = new JPanel(new BorderLayout());
preview = new JCheckBox(" Show preview of peak building ");
preview.addActionListener(this);
preview.setHorizontalAlignment... | void function() { PeakList peakLists[] = MZmineCore.getCurrentProject().getPeakLists(); JPanel pnlpreview = new JPanel(new BorderLayout()); preview = new JCheckBox(STR); preview.addActionListener(this); preview.setHorizontalAlignment(SwingConstants.CENTER); preview.setEnabled(peakLists.length > 0); pnlpreview.add(new J... | /**
* This function add all the additional components for this dialog over the
* original ParameterSetupDialog.
*
*/ | This function add all the additional components for this dialog over the original ParameterSetupDialog | addComponents | {
"repo_name": "berlinguyinca/mzmine-fork",
"path": "src/main/java/net/sf/mzmine/modules/peaklistmethods/peakpicking/shapemodeler/ShapeModelerSetupDialog.java",
"license": "gpl-2.0",
"size": 9946
} | [
"java.awt.BorderLayout",
"java.awt.Color",
"java.awt.event.ActionListener",
"javax.swing.Box",
"javax.swing.JCheckBox",
"javax.swing.JComboBox",
"javax.swing.JComponent",
"javax.swing.JLabel",
"javax.swing.JPanel",
"javax.swing.JSeparator",
"javax.swing.SwingConstants",
"net.sf.mzmine.data.Pea... | import java.awt.BorderLayout; import java.awt.Color; import java.awt.event.ActionListener; import javax.swing.Box; import javax.swing.JCheckBox; import javax.swing.JComboBox; import javax.swing.JComponent; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JSeparator; import javax.swing.SwingConst... | import java.awt.*; import java.awt.event.*; import javax.swing.*; import net.sf.mzmine.data.*; import net.sf.mzmine.main.*; import net.sf.mzmine.modules.peaklistmethods.peakpicking.deconvolution.*; import net.sf.mzmine.modules.visualization.tic.*; import net.sf.mzmine.util.*; | [
"java.awt",
"javax.swing",
"net.sf.mzmine"
] | java.awt; javax.swing; net.sf.mzmine; | 1,862,193 |
public boolean run(DatabaseRegistry dbr) {
boolean result = true;
// Get compara DB connection
DatabaseRegistryEntry[] allComparaDBs = dbr.getAll(DatabaseType.COMPARA);
if (allComparaDBs.length == 0) {
result = false;
ReportManager.problem(this, "", "Can... | boolean function(DatabaseRegistry dbr) { boolean result = true; DatabaseRegistryEntry[] allComparaDBs = dbr.getAll(DatabaseType.COMPARA); if (allComparaDBs.length == 0) { result = false; ReportManager.problem(this, STRCannot find compara database"); usage(); return false; } Map speciesDbrs = getSpeciesDatabaseMap(dbr, ... | /**
* Check that every dnafrag corresponds to a top_level seq_region in the core DB
* and vice versa.
* NB: A warning message is displayed if some dnafrags cannot be checked because
* there is not any connection to the corresponding core database.
*
* @param dbr
* The databa... | Check that every dnafrag corresponds to a top_level seq_region in the core DB and vice versa. there is not any connection to the corresponding core database | run | {
"repo_name": "dbolser-ebi/ensj-healthcheck",
"path": "src/org/ensembl/healthcheck/testcase/compara/CheckTopLevelDnaFrag.java",
"license": "apache-2.0",
"size": 8256
} | [
"java.util.Map",
"org.ensembl.healthcheck.DatabaseRegistry",
"org.ensembl.healthcheck.DatabaseRegistryEntry",
"org.ensembl.healthcheck.DatabaseType",
"org.ensembl.healthcheck.ReportManager"
] | import java.util.Map; import org.ensembl.healthcheck.DatabaseRegistry; import org.ensembl.healthcheck.DatabaseRegistryEntry; import org.ensembl.healthcheck.DatabaseType; import org.ensembl.healthcheck.ReportManager; | import java.util.*; import org.ensembl.healthcheck.*; | [
"java.util",
"org.ensembl.healthcheck"
] | java.util; org.ensembl.healthcheck; | 2,297,236 |
public void setDefaultProtocolHandler(SubProtocolHandler defaultProtocolHandler) {
this.defaultProtocolHandler = defaultProtocolHandler;
if (this.protocolHandlerLookup.isEmpty()) {
setProtocolHandlers(Arrays.asList(defaultProtocolHandler));
}
} | void function(SubProtocolHandler defaultProtocolHandler) { this.defaultProtocolHandler = defaultProtocolHandler; if (this.protocolHandlerLookup.isEmpty()) { setProtocolHandlers(Arrays.asList(defaultProtocolHandler)); } } | /**
* Set the {@link SubProtocolHandler} to use when the client did not request a
* sub-protocol.
* @param defaultProtocolHandler the default handler
*/ | Set the <code>SubProtocolHandler</code> to use when the client did not request a sub-protocol | setDefaultProtocolHandler | {
"repo_name": "qobel/esoguproject",
"path": "spring-framework/spring-websocket/src/main/java/org/springframework/web/socket/messaging/SubProtocolWebSocketHandler.java",
"license": "apache-2.0",
"size": 17225
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 2,252,683 |
@Override
public CacheConfig cacheConfig() {
return this.cacheConfig;
} | CacheConfig function() { return this.cacheConfig; } | /**
* Returns the instance of {@link CacheConfig}.
*
* @return {@link CacheConfig} reference.
*/ | Returns the instance of <code>CacheConfig</code> | cacheConfig | {
"repo_name": "vitrivr/cineast",
"path": "cineast-runtime/src/main/java/org/vitrivr/cineast/standalone/config/IngestConfig.java",
"license": "mit",
"size": 12145
} | [
"org.vitrivr.cineast.core.config.CacheConfig"
] | import org.vitrivr.cineast.core.config.CacheConfig; | import org.vitrivr.cineast.core.config.*; | [
"org.vitrivr.cineast"
] | org.vitrivr.cineast; | 1,875,586 |
public static void main(String args[])
throws IOException, InterruptedException, ClassNotFoundException {
Job job = ValueAggregatorJob.createValueAggregatorJob(
new Configuration(), args);
int ret = job.waitForCompletion(true) ? 0 : 1;
System.exit(ret);
} | static void function(String args[]) throws IOException, InterruptedException, ClassNotFoundException { Job job = ValueAggregatorJob.createValueAggregatorJob( new Configuration(), args); int ret = job.waitForCompletion(true) ? 0 : 1; System.exit(ret); } | /**
* create and run an Aggregate based map/reduce job.
*
* @param args the arguments used for job creation
* @throws IOException
*/ | create and run an Aggregate based map/reduce job | main | {
"repo_name": "vlajos/hadoop",
"path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/aggregate/ValueAggregatorJob.java",
"license": "apache-2.0",
"size": 8454
} | [
"java.io.IOException",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.mapreduce.Job"
] | import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.mapreduce.Job; | import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.mapreduce.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,569,011 |
CompletableFuture<MultipleJobsDetails> requestMultipleJobDetails(
@RpcTimeout Time timeout); | CompletableFuture<MultipleJobsDetails> requestMultipleJobDetails( @RpcTimeout Time timeout); | /**
* Requests job details currently being executed on the Flink cluster.
*
* @param timeout for the asynchronous operation
* @return Future containing the job details
*/ | Requests job details currently being executed on the Flink cluster | requestMultipleJobDetails | {
"repo_name": "zimmermatt/flink",
"path": "flink-runtime/src/main/java/org/apache/flink/runtime/webmonitor/RestfulGateway.java",
"license": "apache-2.0",
"size": 3797
} | [
"java.util.concurrent.CompletableFuture",
"org.apache.flink.api.common.time.Time",
"org.apache.flink.runtime.messages.webmonitor.MultipleJobsDetails",
"org.apache.flink.runtime.rpc.RpcTimeout"
] | import java.util.concurrent.CompletableFuture; import org.apache.flink.api.common.time.Time; import org.apache.flink.runtime.messages.webmonitor.MultipleJobsDetails; import org.apache.flink.runtime.rpc.RpcTimeout; | import java.util.concurrent.*; import org.apache.flink.api.common.time.*; import org.apache.flink.runtime.messages.webmonitor.*; import org.apache.flink.runtime.rpc.*; | [
"java.util",
"org.apache.flink"
] | java.util; org.apache.flink; | 2,111,265 |
return new Crop(source, destination);
}
private Crop(Uri source, Uri destination) {
cropIntent = new Intent();
cropIntent.setData(source);
cropIntent.putExtra(MediaStore.EXTRA_OUTPUT, destination);
} | return new Crop(source, destination); } private Crop(Uri source, Uri destination) { cropIntent = new Intent(); cropIntent.setData(source); cropIntent.putExtra(MediaStore.EXTRA_OUTPUT, destination); } | /**
* Create a crop Intent builder with source and destination image Uris
*
* @param source Uri for image to crop
* @param destination Uri for saving the cropped image
*/ | Create a crop Intent builder with source and destination image Uris | of | {
"repo_name": "xujiaji/HaiNaBaiChuan",
"path": "crop/src/main/java/com/soundcloud/android/crop/Crop.java",
"license": "apache-2.0",
"size": 7838
} | [
"android.content.Intent",
"android.net.Uri",
"android.provider.MediaStore"
] | import android.content.Intent; import android.net.Uri; import android.provider.MediaStore; | import android.content.*; import android.net.*; import android.provider.*; | [
"android.content",
"android.net",
"android.provider"
] | android.content; android.net; android.provider; | 2,885,886 |
protected void cleanup(TestParameters tParam, PrintWriter log) {
log.println(" disposing xTextDoc ");
util.DesktopTools.closeDoc(xTextDoc);
} | void function(TestParameters tParam, PrintWriter log) { log.println(STR); util.DesktopTools.closeDoc(xTextDoc); } | /**
* Disposes StarOffice Writer document.
*/ | Disposes StarOffice Writer document | cleanup | {
"repo_name": "qt-haiku/LibreOffice",
"path": "qadevOOo/tests/java/mod/_toolkit/UnoControlButtonModel.java",
"license": "gpl-3.0",
"size": 2710
} | [
"java.io.PrintWriter"
] | import java.io.PrintWriter; | import java.io.*; | [
"java.io"
] | java.io; | 831,102 |
default @NonNull Tristate checkPermission(@NonNull String permission) {
return queryPermission(permission).result();
} | default @NonNull Tristate checkPermission(@NonNull String permission) { return queryPermission(permission).result(); } | /**
* Performs a permission check for the given {@code permission} node.
*
* <p>This check is equivalent to the "hasPermission" method call on most platforms.
* You can use {@link Tristate#asBoolean()} if you need a truthy result.</p>
*
* @param permission the permission node
* @retur... | Performs a permission check for the given permission node. This check is equivalent to the "hasPermission" method call on most platforms. You can use <code>Tristate#asBoolean()</code> if you need a truthy result | checkPermission | {
"repo_name": "lucko/LuckPerms",
"path": "api/src/main/java/net/luckperms/api/cacheddata/CachedPermissionData.java",
"license": "mit",
"size": 3276
} | [
"net.luckperms.api.util.Tristate",
"org.checkerframework.checker.nullness.qual.NonNull"
] | import net.luckperms.api.util.Tristate; import org.checkerframework.checker.nullness.qual.NonNull; | import net.luckperms.api.util.*; import org.checkerframework.checker.nullness.qual.*; | [
"net.luckperms.api",
"org.checkerframework.checker"
] | net.luckperms.api; org.checkerframework.checker; | 2,298,859 |
static String toJson(ObjectMapper mapper, User user) {
try {
return mapper.writeValueAsString(user);
} catch (JsonProcessingException e) {
throw new RuntimeException(e);
}
} | static String toJson(ObjectMapper mapper, User user) { try { return mapper.writeValueAsString(user); } catch (JsonProcessingException e) { throw new RuntimeException(e); } } | /**
* Serializes a user to a JSON String.
*
* @param mapper the mapper used to perform JSON serialization
* @param user the user to serialize to JSON
* @return the JSON string representation of the user
*/ | Serializes a user to a JSON String | toJson | {
"repo_name": "RohanNagar/thunder",
"path": "application/src/main/java/com/sanctionco/thunder/dao/UsersDao.java",
"license": "mit",
"size": 5557
} | [
"com.fasterxml.jackson.core.JsonProcessingException",
"com.fasterxml.jackson.databind.ObjectMapper",
"com.sanctionco.thunder.models.User"
] | import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.sanctionco.thunder.models.User; | import com.fasterxml.jackson.core.*; import com.fasterxml.jackson.databind.*; import com.sanctionco.thunder.models.*; | [
"com.fasterxml.jackson",
"com.sanctionco.thunder"
] | com.fasterxml.jackson; com.sanctionco.thunder; | 2,815,145 |
void onFailure(ApiException e, int statusCode, Map<String, List<String>> responseHeaders); | void onFailure(ApiException e, int statusCode, Map<String, List<String>> responseHeaders); | /**
* This is called when the API call fails.
*
* @param e The exception causing the failure
* @param statusCode Status code of the response if available, otherwise it would be 0
* @param responseHeaders Headers of the response if available, otherwise it would be null
*/ | This is called when the API call fails | onFailure | {
"repo_name": "Telestream/telestream-cloud-java-sdk",
"path": "telestream-cloud-qc-sdk/src/main/java/net/telestream/cloud/qc/ApiCallback.java",
"license": "mit",
"size": 1797
} | [
"java.util.List",
"java.util.Map"
] | import java.util.List; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 423,140 |
@ServiceMethod(returns = ReturnType.SINGLE)
Response<RedisResourceInner> getByResourceGroupWithResponse(String resourceGroupName, String name, Context context); | @ServiceMethod(returns = ReturnType.SINGLE) Response<RedisResourceInner> getByResourceGroupWithResponse(String resourceGroupName, String name, Context context); | /**
* Gets a Redis cache (resource description).
*
* @param resourceGroupName The name of the resource group.
* @param name The name of the Redis cache.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validatio... | Gets a Redis cache (resource description) | getByResourceGroupWithResponse | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/fluent/RedisClient.java",
"license": "mit",
"size": 50974
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context",
"com.azure.resourcemanager.redis.fluent.models.RedisResourceInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.redis.fluent.models.RedisResourceInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.redis.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,081,642 |
void schedule( DaemonEntry entry, long nInitialDelay, TimeUnit unit ); | void schedule( DaemonEntry entry, long nInitialDelay, TimeUnit unit ); | /**
* Schedule a daemon execution.
*
* @see DaemonEntry#getInterval()
* @param entry
* the daemon entry
* @param nInitialDelay
* the initial delay before the first execution
* @param unit
* the unit of <code>nInitialDelay</code> argument
... | Schedule a daemon execution | schedule | {
"repo_name": "lutece-platform/lutece-core",
"path": "src/java/fr/paris/lutece/portal/service/daemon/IDaemonScheduler.java",
"license": "bsd-3-clause",
"size": 3039
} | [
"java.util.concurrent.TimeUnit"
] | import java.util.concurrent.TimeUnit; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 1,755,843 |
public Set<HighlightRegion> getHighlightedRegions() {
if (highlightRegions == null) {
highlightRegions = new HashSet<HighlightRegion>();
}
return highlightRegions;
} | Set<HighlightRegion> function() { if (highlightRegions == null) { highlightRegions = new HashSet<HighlightRegion>(); } return highlightRegions; } | /**
* Getter for the set of regions to be highlighted using the JMX tooling
* interface.
*
* @return the set of regions to be highlighted.
*/ | Getter for the set of regions to be highlighted using the JMX tooling interface | getHighlightedRegions | {
"repo_name": "lostdj/Jaklin-OpenJFX",
"path": "modules/graphics/src/main/java/com/sun/javafx/tk/Toolkit.java",
"license": "gpl-2.0",
"size": 35590
} | [
"com.sun.javafx.jmx.HighlightRegion",
"java.util.HashSet",
"java.util.Set"
] | import com.sun.javafx.jmx.HighlightRegion; import java.util.HashSet; import java.util.Set; | import com.sun.javafx.jmx.*; import java.util.*; | [
"com.sun.javafx",
"java.util"
] | com.sun.javafx; java.util; | 1,509,029 |
public Collection<Plugin> getPlugins() {
return plugins;
}
| Collection<Plugin> function() { return plugins; } | /**
* Returns a Collection of Plugins.
*
* @return a Collection of Plugins.
*/ | Returns a Collection of Plugins | getPlugins | {
"repo_name": "joshuairl/toothchat-client",
"path": "src/java/org/jivesoftware/spark/PluginManager.java",
"license": "apache-2.0",
"size": 32998
} | [
"java.util.Collection",
"org.jivesoftware.spark.plugin.Plugin"
] | import java.util.Collection; import org.jivesoftware.spark.plugin.Plugin; | import java.util.*; import org.jivesoftware.spark.plugin.*; | [
"java.util",
"org.jivesoftware.spark"
] | java.util; org.jivesoftware.spark; | 2,744,351 |
public static JsonArray jsonListDemandesEtEvenements(List<Demande> d, List<Evenement> e) {
JsonArray result = new JsonArray();
for (Demande dem : d) {
if (dem.getStatut() != StatutDemande.VALIDE) {
JsonObject jsonDemande = new JsonObject();
... | static JsonArray function(List<Demande> d, List<Evenement> e) { JsonArray result = new JsonArray(); for (Demande dem : d) { if (dem.getStatut() != StatutDemande.VALIDE) { JsonObject jsonDemande = new JsonObject(); jsonDemande.addProperty("type", STR); jsonDemande.addProperty(STR, dem.getActivite().getDenomination()); j... | /**
* Returns a <code>JsonArray</code> containing the demands and the events that are passed
* as parameter.
* @param d the list of demands.
* @param e the list of events.
* @return
*/ | Returns a <code>JsonArray</code> containing the demands and the events that are passed as parameter | jsonListDemandesEtEvenements | {
"repo_name": "hcburca/CollectIF",
"path": "src/main/java/util/Jsonizer.java",
"license": "gpl-3.0",
"size": 17040
} | [
"com.google.gson.JsonArray",
"com.google.gson.JsonObject",
"fr.insalyon.dasi.collectif.metier.modele.Adherent",
"fr.insalyon.dasi.collectif.metier.modele.Demande",
"fr.insalyon.dasi.collectif.metier.modele.Evenement",
"fr.insalyon.dasi.collectif.metier.modele.EvenementPayant",
"fr.insalyon.dasi.collecti... | import com.google.gson.JsonArray; import com.google.gson.JsonObject; import fr.insalyon.dasi.collectif.metier.modele.Adherent; import fr.insalyon.dasi.collectif.metier.modele.Demande; import fr.insalyon.dasi.collectif.metier.modele.Evenement; import fr.insalyon.dasi.collectif.metier.modele.EvenementPayant; import fr.in... | import com.google.gson.*; import fr.insalyon.dasi.collectif.metier.modele.*; import fr.insalyon.dasi.collectif.util.*; import java.text.*; import java.util.*; import java.util.logging.*; | [
"com.google.gson",
"fr.insalyon.dasi",
"java.text",
"java.util"
] | com.google.gson; fr.insalyon.dasi; java.text; java.util; | 796,018 |
public void process(IndexManager indexManager) {
SilverTrace.debug("indexEngine", "IndexerThread",
"indexEngine.INFO_PROCESS_REMOVE_REQUEST", indexEntry.toString());
indexManager.removeIndexEntry(indexEntry);
}
private final IndexEntryPK indexEntry; | void function(IndexManager indexManager) { SilverTrace.debug(STR, STR, STR, indexEntry.toString()); indexManager.removeIndexEntry(indexEntry); } private final IndexEntryPK indexEntry; | /**
* Method declaration
* @param indexManager
*/ | Method declaration | process | {
"repo_name": "stephaneperry/Silverpeas-Core",
"path": "lib-core/src/main/java/com/stratelia/webactiv/util/indexEngine/model/IndexerThread.java",
"license": "agpl-3.0",
"size": 7055
} | [
"com.stratelia.silverpeas.silvertrace.SilverTrace"
] | import com.stratelia.silverpeas.silvertrace.SilverTrace; | import com.stratelia.silverpeas.silvertrace.*; | [
"com.stratelia.silverpeas"
] | com.stratelia.silverpeas; | 2,895,808 |
CompletableFuture<V> get(K key, Duration timeout); | CompletableFuture<V> get(K key, Duration timeout); | /**
* Retrieves a value from the Map.
*
* @param key The key to retrieve the value for.
* @param timeout Timeout for the operation.
* @return A CompletableFuture that, when completed, will contain the requested value. If the operation fails, this
* will complete with the appropriate ex... | Retrieves a value from the Map | get | {
"repo_name": "pravega/pravega",
"path": "common/src/main/java/io/pravega/common/util/AsyncMap.java",
"license": "apache-2.0",
"size": 2670
} | [
"java.time.Duration",
"java.util.concurrent.CompletableFuture"
] | import java.time.Duration; import java.util.concurrent.CompletableFuture; | import java.time.*; import java.util.concurrent.*; | [
"java.time",
"java.util"
] | java.time; java.util; | 1,280,894 |
public void write(BinaryRawWriter writer) {
writer.writeString(schemaName);
writer.writeString(tableName);
writer.writeString(columnName);
byte typeId = BinaryUtils.typeByClass(dataType);
writer.writeByte(typeId);
if (ver.compareTo(OdbcConnectionContext.VER_2_7_0) ... | void function(BinaryRawWriter writer) { writer.writeString(schemaName); writer.writeString(tableName); writer.writeString(columnName); byte typeId = BinaryUtils.typeByClass(dataType); writer.writeByte(typeId); if (ver.compareTo(OdbcConnectionContext.VER_2_7_0) >= 0) { writer.writeInt(precision); writer.writeInt(scale);... | /**
* Write in a binary format.
*
* @param writer Binary writer.
*/ | Write in a binary format | write | {
"repo_name": "nizhikov/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcColumnMeta.java",
"license": "apache-2.0",
"size": 4569
} | [
"org.apache.ignite.binary.BinaryRawWriter",
"org.apache.ignite.internal.binary.BinaryUtils"
] | import org.apache.ignite.binary.BinaryRawWriter; import org.apache.ignite.internal.binary.BinaryUtils; | import org.apache.ignite.binary.*; import org.apache.ignite.internal.binary.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 1,918,949 |
public boolean isItemValidForSlot(int index, ItemStack stack)
{
return true;
}
| boolean function(int index, ItemStack stack) { return true; } | /**
* Returns true if automation is allowed to insert the given stack (ignoring stack size) into the given slot. For
* guis use Slot.isItemValid
*/ | Returns true if automation is allowed to insert the given stack (ignoring stack size) into the given slot. For guis use Slot.isItemValid | isItemValidForSlot | {
"repo_name": "lucemans/ShapeClient-SRC",
"path": "net/minecraft/inventory/InventoryLargeChest.java",
"license": "mpl-2.0",
"size": 6807
} | [
"net.minecraft.item.ItemStack"
] | import net.minecraft.item.ItemStack; | import net.minecraft.item.*; | [
"net.minecraft.item"
] | net.minecraft.item; | 1,449,681 |
@ServiceMethod(returns = ReturnType.SINGLE)
BudgetInner get(String scope, String budgetName); | @ServiceMethod(returns = ReturnType.SINGLE) BudgetInner get(String scope, String budgetName); | /**
* Gets the budget for the scope by budget name.
*
* @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for
* subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup
* scope, '/... | Gets the budget for the scope by budget name | get | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/BudgetsClient.java",
"license": "mit",
"size": 14360
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.resourcemanager.consumption.fluent.models.BudgetInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.consumption.fluent.models.BudgetInner; | import com.azure.core.annotation.*; import com.azure.resourcemanager.consumption.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 145,374 |
public static MatrixBlock convertToMatrixBlock( double[] data, boolean columnVector ) {
int rows = columnVector ? data.length : 1;
int cols = columnVector ? 1 : data.length;
MatrixBlock mb = new MatrixBlock(rows, cols, false);
//copy data to mb (can be used because we create a dense matrix)
mb.init( data, ... | static MatrixBlock function( double[] data, boolean columnVector ) { int rows = columnVector ? data.length : 1; int cols = columnVector ? 1 : data.length; MatrixBlock mb = new MatrixBlock(rows, cols, false); mb.init( data, rows, cols ); mb.examSparsity(); return mb; } | /**
* Creates a dense Matrix Block and copies the given double vector into it.
*
* @param data double array
* @param columnVector if true, create matrix with single column. if false, create matrix with single row
* @return matrix block
*/ | Creates a dense Matrix Block and copies the given double vector into it | convertToMatrixBlock | {
"repo_name": "apache/incubator-systemml",
"path": "src/main/java/org/apache/sysds/runtime/util/DataConverter.java",
"license": "apache-2.0",
"size": 45537
} | [
"org.apache.sysds.runtime.matrix.data.MatrixBlock"
] | import org.apache.sysds.runtime.matrix.data.MatrixBlock; | import org.apache.sysds.runtime.matrix.data.*; | [
"org.apache.sysds"
] | org.apache.sysds; | 454,748 |
Account create(Context context);
} | Account create(Context context); } | /**
* Executes the create request.
*
* @param context The context to associate with this operation.
* @return the created resource.
*/ | Executes the create request | create | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/purview/azure-resourcemanager-purview/src/main/java/com/azure/resourcemanager/purview/models/Account.java",
"license": "mit",
"size": 13986
} | [
"com.azure.core.util.Context"
] | import com.azure.core.util.Context; | import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 2,595,721 |
@Override
public void updateConfigWithDAndD1Queues(String rootAcl, String queueDAcl,
String queueD1Acl) throws IOException {
CapacitySchedulerConfiguration csConf =
(CapacitySchedulerConfiguration) getConf();
csConf.clear();
csConf.setQueues(CapacitySchedulerConfiguration.ROOT,
... | void function(String rootAcl, String queueDAcl, String queueD1Acl) throws IOException { CapacitySchedulerConfiguration csConf = (CapacitySchedulerConfiguration) getConf(); csConf.clear(); csConf.setQueues(CapacitySchedulerConfiguration.ROOT, new String[] {QUEUED, QUEUEA, QUEUEB}); String dPath = CapacitySchedulerConfig... | /**
* Updates the configuration with the following queue hierarchy:
* root
* |
* D
* |
* D1.
* @param rootAcl administer queue and submit application ACL for root queue
* @param queueDAcl administer queue and submit application ACL for D queue
* @param queueD1Acl administer queue ... | Updates the configuration with the following queue hierarchy: root | D | D1 | updateConfigWithDAndD1Queues | {
"repo_name": "plusplusjiajia/hadoop",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/TestCapacitySchedulerQueueACLs.java",
"license": "apache-2.0",
"size": 5713
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,988,971 |
void showCameraGuide(Activity activity, String type); | void showCameraGuide(Activity activity, String type); | /**
* Called when the app want to show application guide
* @param activity: The parent activity
* @param type: The app type, such as "PHONE/CONTACTS/MMS/CAMERA"
*/ | Called when the app want to show application guide | showCameraGuide | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "packages/apps/Camera/ext/src/com/mediatek/camera/ext/IAppGuideExt.java",
"license": "gpl-2.0",
"size": 344
} | [
"android.app.Activity"
] | import android.app.Activity; | import android.app.*; | [
"android.app"
] | android.app; | 1,245,038 |
V checkValue(@Nullable V value) {
return value;
} | V checkValue(@Nullable V value) { return value; } | /**
* Returns its input, or throws an exception if this is not a valid value.
*/ | Returns its input, or throws an exception if this is not a valid value | checkValue | {
"repo_name": "mkeesey/guava-for-small-classpaths",
"path": "guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/AbstractBiMap.java",
"license": "apache-2.0",
"size": 10392
} | [
"javax.annotation.Nullable"
] | import javax.annotation.Nullable; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 821,334 |
Optional<CeTask> peek(); | Optional<CeTask> peek(); | /**
* Peek the oldest task in status {@link org.sonar.db.ce.CeQueueDto.Status#PENDING}.
* The task status is changed to {@link org.sonar.db.ce.CeQueueDto.Status#IN_PROGRESS}.
* Does not return anything if the queue is paused (see {@link #isPeekPaused()}.
*
* <p>Only a single task can be peeked by project... | Peek the oldest task in status <code>org.sonar.db.ce.CeQueueDto.Status#PENDING</code>. The task status is changed to <code>org.sonar.db.ce.CeQueueDto.Status#IN_PROGRESS</code>. Does not return anything if the queue is paused (see <code>#isPeekPaused()</code>. Only a single task can be peeked by project. An unchecked ex... | peek | {
"repo_name": "abbeyj/sonarqube",
"path": "server/sonar-server/src/main/java/org/sonar/server/computation/queue/CeQueue.java",
"license": "lgpl-3.0",
"size": 3742
} | [
"com.google.common.base.Optional"
] | import com.google.common.base.Optional; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 574,142 |
private void downloadFile(File file, String downloadUrl) throws Exception {
File tempFile = File.createTempFile(file.getName(), TEMP_DOWNLOAD_EXTENSION,
new File(Collect.CACHE_PATH));
URI uri;
try {
// assume the downloadUrl is escaped properly
URL ur... | void function(File file, String downloadUrl) throws Exception { File tempFile = File.createTempFile(file.getName(), TEMP_DOWNLOAD_EXTENSION, new File(Collect.CACHE_PATH)); URI uri; try { URL url = new URL(downloadUrl); uri = url.toURI(); } catch (MalformedURLException e) { e.printStackTrace(); throw e; } catch (URISynt... | /**
* Common routine to download a document from the downloadUrl and save the contents in the file
* 'file'. Shared by media file download and form file download.
*
* SurveyCTO: The file is saved into a temp folder and is moved to the final place if everything
* is okay,
* so that garbage ... | Common routine to download a document from the downloadUrl and save the contents in the file 'file'. Shared by media file download and form file download. is okay, so that garbage is not left over on cancel | downloadFile | {
"repo_name": "SDRC-India/collect",
"path": "collect_app/src/main/java/org/odk/collect/android/tasks/DownloadFormsTask.java",
"license": "apache-2.0",
"size": 28500
} | [
"android.net.Uri",
"android.util.Log",
"java.io.File",
"java.io.FileOutputStream",
"java.io.InputStream",
"java.io.OutputStream",
"java.net.MalformedURLException",
"java.net.URISyntaxException",
"java.util.zip.GZIPInputStream",
"org.odk.collect.android.application.Collect",
"org.odk.collect.andr... | import android.net.Uri; import android.util.Log; import java.io.File; import java.io.FileOutputStream; import java.io.InputStream; import java.io.OutputStream; import java.net.MalformedURLException; import java.net.URISyntaxException; import java.util.zip.GZIPInputStream; import org.odk.collect.android.application.Coll... | import android.net.*; import android.util.*; import java.io.*; import java.net.*; import java.util.zip.*; import org.odk.collect.android.application.*; import org.odk.collect.android.exception.*; import org.odk.collect.android.utilities.*; import org.opendatakit.httpclientandroidlib.*; import org.opendatakit.httpclient... | [
"android.net",
"android.util",
"java.io",
"java.net",
"java.util",
"org.odk.collect",
"org.opendatakit.httpclientandroidlib"
] | android.net; android.util; java.io; java.net; java.util; org.odk.collect; org.opendatakit.httpclientandroidlib; | 547,909 |
private static Node getAddingRoot(Node n) {
Node addingRoot = null;
Node ancestor = n;
while (null != (ancestor = ancestor.getParent())) {
int type = ancestor.getType();
if (type == Token.SCRIPT) {
addingRoot = ancestor;
break;
} else if (type == Token.FUNCTION) {
... | static Node function(Node n) { Node addingRoot = null; Node ancestor = n; while (null != (ancestor = ancestor.getParent())) { int type = ancestor.getType(); if (type == Token.SCRIPT) { addingRoot = ancestor; break; } else if (type == Token.FUNCTION) { addingRoot = ancestor.getLastChild(); break; } } Preconditions.check... | /**
* Gets a Node at the top of the current scope where we can add new var
* declarations as children.
*/ | Gets a Node at the top of the current scope where we can add new var declarations as children | getAddingRoot | {
"repo_name": "ehsan/js-symbolic-executor",
"path": "closure-compiler/src/com/google/javascript/jscomp/NodeUtil.java",
"license": "apache-2.0",
"size": 63706
} | [
"com.google.common.base.Preconditions",
"com.google.javascript.rhino.Node",
"com.google.javascript.rhino.Token"
] | import com.google.common.base.Preconditions; import com.google.javascript.rhino.Node; import com.google.javascript.rhino.Token; | import com.google.common.base.*; import com.google.javascript.rhino.*; | [
"com.google.common",
"com.google.javascript"
] | com.google.common; com.google.javascript; | 1,183,276 |
public static YangNodeIdentifier getValidNodeIdentifierForLeafref(String nodeIdentifierString,
YangConstructType yangConstruct,
ParserRuleContext ctx, YangLeafRef yangLeafRef) ... | static YangNodeIdentifier function(String nodeIdentifierString, YangConstructType yangConstruct, ParserRuleContext ctx, YangLeafRef yangLeafRef) { String tmpIdentifierString = removeQuotesAndHandleConcat(nodeIdentifierString); String[] tmpData = tmpIdentifierString.split(Pattern.quote(COLON)); if (tmpData.length == 1) ... | /**
* Checks and return valid node identifier specific to nodes in leafref path.
*
* @param nodeIdentifierString string from yang file
* @param yangConstruct yang construct for creating error message
* @param ctx yang construct's context to get the line number and charac... | Checks and return valid node identifier specific to nodes in leafref path | getValidNodeIdentifierForLeafref | {
"repo_name": "VinodKumarS-Huawei/ietf96yang",
"path": "utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/parser/impl/parserutils/ListenerUtil.java",
"license": "apache-2.0",
"size": 51561
} | [
"java.util.regex.Pattern",
"org.antlr.v4.runtime.ParserRuleContext",
"org.onosproject.yangutils.datamodel.YangLeafRef",
"org.onosproject.yangutils.datamodel.YangNodeIdentifier",
"org.onosproject.yangutils.datamodel.utils.YangConstructType",
"org.onosproject.yangutils.parser.exceptions.ParserException"
] | import java.util.regex.Pattern; import org.antlr.v4.runtime.ParserRuleContext; import org.onosproject.yangutils.datamodel.YangLeafRef; import org.onosproject.yangutils.datamodel.YangNodeIdentifier; import org.onosproject.yangutils.datamodel.utils.YangConstructType; import org.onosproject.yangutils.parser.exceptions.Par... | import java.util.regex.*; import org.antlr.v4.runtime.*; import org.onosproject.yangutils.datamodel.*; import org.onosproject.yangutils.datamodel.utils.*; import org.onosproject.yangutils.parser.exceptions.*; | [
"java.util",
"org.antlr.v4",
"org.onosproject.yangutils"
] | java.util; org.antlr.v4; org.onosproject.yangutils; | 166,319 |
protected void overrideFieldValue(Field field, Map<String, String[]> newValues, Map<String, String[]> oldValues) {
if (StringUtils.isNotBlank(field.getPropertyName())) {
if (newValues.get(field.getPropertyName()) != null) {
getFormFields().setFieldValue(field, newValues.get(field... | void function(Field field, Map<String, String[]> newValues, Map<String, String[]> oldValues) { if (StringUtils.isNotBlank(field.getPropertyName())) { if (newValues.get(field.getPropertyName()) != null) { getFormFields().setFieldValue(field, newValues.get(field.getPropertyName())); } else if (oldValues.get(field.getProp... | /**
* Overrides a Field value; sets a fallback/restored value if there is no new value
*/ | Overrides a Field value; sets a fallback/restored value if there is no new value | overrideFieldValue | {
"repo_name": "shahess/rice",
"path": "rice-middleware/impl/src/main/java/org/kuali/rice/kew/impl/document/search/DocumentSearchCriteriaBoLookupableHelperService.java",
"license": "apache-2.0",
"size": 52078
} | [
"java.util.Map",
"org.apache.commons.lang.StringUtils",
"org.kuali.rice.kns.web.ui.Field"
] | import java.util.Map; import org.apache.commons.lang.StringUtils; import org.kuali.rice.kns.web.ui.Field; | import java.util.*; import org.apache.commons.lang.*; import org.kuali.rice.kns.web.ui.*; | [
"java.util",
"org.apache.commons",
"org.kuali.rice"
] | java.util; org.apache.commons; org.kuali.rice; | 2,609,082 |
public int getBundledRedstoneOutput( World world, int x, int y, int z, int side ); | int function( World world, int x, int y, int z, int side ); | /**
* Produce an bundled redstone output from a block location.
* @see dan200.computercraft.api.ComputerCraftAPI#registerBundledRedstoneProvider(IBundledRedstoneProvider)
* @return a number in the range 0-65535 to indicate this block is providing output, or -1 if you do not wish to handle this block
... | Produce an bundled redstone output from a block location | getBundledRedstoneOutput | {
"repo_name": "infchem/RealRobots",
"path": "src/main/java/dan200/computercraft/api/redstone/IBundledRedstoneProvider.java",
"license": "lgpl-2.1",
"size": 1013
} | [
"net.minecraft.world.World"
] | import net.minecraft.world.World; | import net.minecraft.world.*; | [
"net.minecraft.world"
] | net.minecraft.world; | 2,281,914 |
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (obj == this) {
return true;
}
if (!(obj instanceof DiskJobWrapper)) {
return false;
}
DiskJobWrapper other = (DiskJobWrapper) obj;
return Objects.equals(diskJob, other.diskJob);
}
/**
* {@inheritDo... | boolean function(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (!(obj instanceof DiskJobWrapper)) { return false; } DiskJobWrapper other = (DiskJobWrapper) obj; return Objects.equals(diskJob, other.diskJob); } /** * {@inheritDoc} | /**
* Tests this wrapper is wrapping the same job as the given object.
* @param obj The object to compare to.
* @return <code>true</code> when equal, otherwise <code>false</code>
*/ | Tests this wrapper is wrapping the same job as the given object | equals | {
"repo_name": "Johnnei/JavaTorrent",
"path": "bittorrent/src/main/java/org/johnnei/javatorrent/internal/disk/DiskJobWrapper.java",
"license": "apache-2.0",
"size": 2336
} | [
"java.util.Objects"
] | import java.util.Objects; | import java.util.*; | [
"java.util"
] | java.util; | 110,651 |
public static void checkPath(TreeItem item, boolean checked, boolean grayed) {
if (item == null) return;
if (grayed) {
checked = true;
} else {
int index = 0;
TreeItem[] items = item.getItems();
while (index < items.length) {
TreeItem child = items[inde... | static void function(TreeItem item, boolean checked, boolean grayed) { if (item == null) return; if (grayed) { checked = true; } else { int index = 0; TreeItem[] items = item.getItems(); while (index < items.length) { TreeItem child = items[index]; if (child.getGrayed() checked != child.getChecked()) { checked = grayed... | /**
* Helper method to implement standard selection behavior for a Tree
*
* @param item
* @param checked
* @param grayed
*/ | Helper method to implement standard selection behavior for a Tree | checkPath | {
"repo_name": "intelligentautomation/proteus",
"path": "plugins/com.iai.proteus/src/com/iai/proteus/ui/UIUtil.java",
"license": "lgpl-3.0",
"size": 8717
} | [
"org.eclipse.swt.widgets.TreeItem"
] | import org.eclipse.swt.widgets.TreeItem; | import org.eclipse.swt.widgets.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 633,553 |
void resumeScheduler(String sessionId, AsyncCallback<Boolean> callback); | void resumeScheduler(String sessionId, AsyncCallback<Boolean> callback); | /**
* Resumes the Scheduler.
* @param sessionId the session id of the user which is logged in
* @param callback the object used for notifying the caller when the asynchronous call is completed.
*/ | Resumes the Scheduler | resumeScheduler | {
"repo_name": "sandrineBeauche/scheduling-portal",
"path": "scheduler-portal/src/main/java/org/ow2/proactive_grid_cloud_portal/scheduler/client/SchedulerServiceAsync.java",
"license": "agpl-3.0",
"size": 13955
} | [
"com.google.gwt.user.client.rpc.AsyncCallback"
] | import com.google.gwt.user.client.rpc.AsyncCallback; | import com.google.gwt.user.client.rpc.*; | [
"com.google.gwt"
] | com.google.gwt; | 1,188,974 |
private void exit() {
if (this.isDirty) {
int response =
JOptionPane.showConfirmDialog(this, new String[] {
"You have made changes to your family tree.",
"Do you want to save them?"},
"Confirm changes",
... | void function() { if (this.isDirty) { int response = JOptionPane.showConfirmDialog(this, new String[] { STR, STR}, STR, JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); if (response == JOptionPane.YES_OPTION) { save(); System.exit(0); } else if (response == JOptionPane.NO_OPTION) { System.exit(0); } } e... | /**
* If the family tree has been modified and not saved, prompt the
* user to verify that he really wants to exit.
*/ | If the family tree has been modified and not saved, prompt the user to verify that he really wants to exit | exit | {
"repo_name": "DavidWhitlock/PortlandStateJava",
"path": "family/src/main/java/edu/pdx/cs410J/family/FamilyTreeGUI.java",
"license": "apache-2.0",
"size": 14528
} | [
"javax.swing.JOptionPane"
] | import javax.swing.JOptionPane; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 2,564,371 |
return Collections.unmodifiableSet(add);
} | return Collections.unmodifiableSet(add); } | /**
* Returns an unmodifiable view of the set of IDs added to the selection when applying
* this move to a subset solution. The returned set may be empty.
*
* @return set of added IDs
*/ | Returns an unmodifiable view of the set of IDs added to the selection when applying this move to a subset solution. The returned set may be empty | getAddedIDs | {
"repo_name": "hdbeukel/james-core",
"path": "src/main/java/org/jamesframework/core/subset/neigh/moves/GeneralSubsetMove.java",
"license": "apache-2.0",
"size": 4953
} | [
"java.util.Collections"
] | import java.util.Collections; | import java.util.*; | [
"java.util"
] | java.util; | 1,971,586 |
public java.util.List<ResourceDescriptor> list(String xmlRequest) throws Exception {
try {
String result = getManagementService().list(xmlRequest);
OperationResult or = (OperationResult) unmarshal(result);
if (or.getReturnCode() != 0)
throw new Exception(composeErrorMessage(or));
return or.getR... | java.util.List<ResourceDescriptor> function(String xmlRequest) throws Exception { try { String result = getManagementService().list(xmlRequest); OperationResult or = (OperationResult) unmarshal(result); if (or.getReturnCode() != 0) throw new Exception(composeErrorMessage(or)); return or.getResourceDescriptors(); } catc... | /**
* It returns a list of resourceDescriptors.
*/ | It returns a list of resourceDescriptors | list | {
"repo_name": "OpenSoftwareSolutions/PDFReporter-Studio",
"path": "com.jaspersoft.studio.server.soap/src/com/jaspersoft/ireport/jasperserver/ws/WSClient.java",
"license": "lgpl-3.0",
"size": 29806
} | [
"com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.OperationResult",
"com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor",
"java.util.List"
] | import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.OperationResult; import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; import java.util.List; | import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.*; import java.util.*; | [
"com.jaspersoft.jasperserver",
"java.util"
] | com.jaspersoft.jasperserver; java.util; | 2,557,385 |
private Integer internalObtainRowLock(final byte[] row, boolean waitForLock)
throws IOException {
checkRow(row, "row lock");
startRegionOperation();
try {
HashedBytes rowKey = new HashedBytes(row);
CountDownLatch rowLatch = new CountDownLatch(1);
// loop until we acquire the row l... | Integer function(final byte[] row, boolean waitForLock) throws IOException { checkRow(row, STR); startRegionOperation(); try { HashedBytes rowKey = new HashedBytes(row); CountDownLatch rowLatch = new CountDownLatch(1); while (true) { CountDownLatch existingLatch = lockedRows.putIfAbsent(rowKey, rowLatch); if (existingL... | /**
* Obtains or tries to obtain the given row lock.
* @param waitForLock if true, will block until the lock is available.
* Otherwise, just tries to obtain the lock and returns
* null if unavailable.
*/ | Obtains or tries to obtain the given row lock | internalObtainRowLock | {
"repo_name": "gdweijin/hindex",
"path": "src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java",
"license": "apache-2.0",
"size": 221667
} | [
"java.io.IOException",
"java.util.concurrent.CountDownLatch",
"java.util.concurrent.TimeUnit",
"org.apache.hadoop.hbase.util.Bytes",
"org.apache.hadoop.hbase.util.HashedBytes"
] | import java.io.IOException; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.hbase.util.HashedBytes; | import java.io.*; import java.util.concurrent.*; import org.apache.hadoop.hbase.util.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 1,244,138 |
public static Class<?> getGenericMultivalueType(final Field p) {
final Type genericType = p.getGenericType();
if (genericType != null && genericType instanceof ParameterizedType) {
final ParameterizedType pt = (ParameterizedType) genericType;
if (pt.getActualTypeArguments() != null && pt.getActualTypeA... | static Class<?> function(final Field p) { final Type genericType = p.getGenericType(); if (genericType != null && genericType instanceof ParameterizedType) { final ParameterizedType pt = (ParameterizedType) genericType; if (pt.getActualTypeArguments() != null && pt.getActualTypeArguments().length > 0) { if (pt.getActua... | /**
* Returns the generic class of multi-value objects.
*
* @param p
* Field to examine
* @return The Class<?> of generic type if any, otherwise null
*/ | Returns the generic class of multi-value objects | getGenericMultivalueType | {
"repo_name": "fedgehog/Orient",
"path": "core/src/main/java/com/orientechnologies/orient/core/serialization/serializer/object/OObjectSerializerHelper.java",
"license": "apache-2.0",
"size": 39569
} | [
"java.lang.reflect.Field",
"java.lang.reflect.ParameterizedType",
"java.lang.reflect.Type"
] | import java.lang.reflect.Field; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 2,006,101 |
public static boolean checkMeshStructure(final TriangleMesh mesh)
{
final int triangles = mesh.getTriangles()
.size();
final int vertices = mesh.getVertices()
.size();
if (log.isDebugEnabled())
{
log.debug(
"C... | static boolean function(final TriangleMesh mesh) { final int triangles = mesh.getTriangles() .size(); final int vertices = mesh.getVertices() .size(); if (log.isDebugEnabled()) { log.debug( STR + triangles + STR + vertices); } boolean ok = true; for (int t = 0; ok && (t < triangles); ++t) { final Triangle tri = mesh.ge... | /**
* Check the structure of a mesh. This was used during debugging to
* identify problems with the buffered mesh implementation and should
* not be necessary in normal operation.
*
* @param mesh The mesh to be checked
* @return <pre>true</pre> if the mesh appears to have a correct
... | Check the structure of a mesh. This was used during debugging to identify problems with the buffered mesh implementation and should not be necessary in normal operation | checkMeshStructure | {
"repo_name": "madebyjeffrey/TerraJ",
"path": "src/main/java/com/alvermont/terraj/fracplanet/geom/MeshUtils.java",
"license": "gpl-2.0",
"size": 5330
} | [
"com.alvermont.terraj.fracplanet.colour.ByteRGBA",
"java.nio.BufferUnderflowException"
] | import com.alvermont.terraj.fracplanet.colour.ByteRGBA; import java.nio.BufferUnderflowException; | import com.alvermont.terraj.fracplanet.colour.*; import java.nio.*; | [
"com.alvermont.terraj",
"java.nio"
] | com.alvermont.terraj; java.nio; | 154,930 |
public void setMacroStatus(String macroKey, boolean start) {
NeeoUtil.requireNotEmpty(macroKey, "macroKey cannot be empty");
final NeeoBrainApi api = callback.getApi();
if (api == null) {
logger.debug("API is null [likely bridge is offline]");
} else {
try {
... | void function(String macroKey, boolean start) { NeeoUtil.requireNotEmpty(macroKey, STR); final NeeoBrainApi api = callback.getApi(); if (api == null) { logger.debug(STR); } else { try { if (start) { api.triggerMacro(roomKey, deviceKey, macroKey); callback.scheduleTask(() -> { callback.stateChanged(UidUtils.createChanne... | /**
* Sets the macro status. If the status is true, the macro will be triggered. If false, nothing occurs
*
* @param macroKey the non-null macro key
* @param start whether to start (true) or stop (false) the macro
*/ | Sets the macro status. If the status is true, the macro will be triggered. If false, nothing occurs | setMacroStatus | {
"repo_name": "aogorek/openhab2-addons",
"path": "addons/binding/org.openhab.binding.neeo/src/main/java/org/openhab/binding/neeo/internal/NeeoDeviceProtocol.java",
"license": "epl-1.0",
"size": 6090
} | [
"java.io.IOException",
"org.eclipse.smarthome.core.library.types.OnOffType",
"org.openhab.binding.neeo.NeeoConstants",
"org.openhab.binding.neeo.NeeoUtil",
"org.openhab.binding.neeo.UidUtils"
] | import java.io.IOException; import org.eclipse.smarthome.core.library.types.OnOffType; import org.openhab.binding.neeo.NeeoConstants; import org.openhab.binding.neeo.NeeoUtil; import org.openhab.binding.neeo.UidUtils; | import java.io.*; import org.eclipse.smarthome.core.library.types.*; import org.openhab.binding.neeo.*; | [
"java.io",
"org.eclipse.smarthome",
"org.openhab.binding"
] | java.io; org.eclipse.smarthome; org.openhab.binding; | 408,931 |
@XmlElement(name="value")
@XmlElementWrapper(name="values")
public void setValues(Integer[] newValues) {
this.values = newValues;
} | @XmlElement(name="value") @XmlElementWrapper(name=STR) void function(Integer[] newValues) { this.values = newValues; } | /**
* Sets the values array.
* @param int[] the values array
*/ | Sets the values array | setValues | {
"repo_name": "jessemull/MicroFlex",
"path": "src/main/java/com/github/jessemull/microflex/integerflex/io/SimpleWellXMLInteger.java",
"license": "apache-2.0",
"size": 3154
} | [
"javax.xml.bind.annotation.XmlElement",
"javax.xml.bind.annotation.XmlElementWrapper"
] | import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElementWrapper; | import javax.xml.bind.annotation.*; | [
"javax.xml"
] | javax.xml; | 1,737,070 |
private boolean isPackageAboveVersion(String packageName, int minVersion) {
return PackageUtils.getPackageVersion(mContext, packageName) >= minVersion;
} | boolean function(String packageName, int minVersion) { return PackageUtils.getPackageVersion(mContext, packageName) >= minVersion; } | /**
* Check whether the given package meets min requirements for using full document mode.
* @param packageName The package name we are inquiring about.
* @param minVersion The minimum version for the package to be.
* @return Whether the package exists on the device and its version is higher than th... | Check whether the given package meets min requirements for using full document mode | isPackageAboveVersion | {
"repo_name": "ric2b/Vivaldi-browser",
"path": "chromium/chrome/browser/gsa/java/src/org/chromium/chrome/browser/gsa/GSAState.java",
"license": "bsd-3-clause",
"size": 12192
} | [
"org.chromium.base.PackageUtils"
] | import org.chromium.base.PackageUtils; | import org.chromium.base.*; | [
"org.chromium.base"
] | org.chromium.base; | 1,953,611 |
////////////////////////////////////////////////////////////////////////////
//
// Eclipse IFile utilities
//
////////////////////////////////////////////////////////////////////////////
public static boolean setFileContents(IFile file, InputStream inputStream) throws CoreException {
if (file.exi... | static boolean function(IFile file, InputStream inputStream) throws CoreException { if (file.exists()) { file.setContents(inputStream, true, false, null); return false; } else { IOUtils2.ensureFolderExists(file); file.create(inputStream, true, null); return true; } } | /**
* Creates or modifies given {@link IFile} with given {@link InputStream}.
*
* @return <code>true</code> if {@link IFile} was created.
*/ | Creates or modifies given <code>IFile</code> with given <code>InputStream</code> | setFileContents | {
"repo_name": "OpenSoftwareSolutions/PDFReporter-Studio",
"path": "com.jaspersoft.studio.community/src/org/eclipse/wb/internal/core/utils/IOUtils2.java",
"license": "lgpl-3.0",
"size": 9982
} | [
"java.io.InputStream",
"org.eclipse.core.resources.IFile",
"org.eclipse.core.runtime.CoreException"
] | import java.io.InputStream; import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.CoreException; | import java.io.*; import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*; | [
"java.io",
"org.eclipse.core"
] | java.io; org.eclipse.core; | 2,750,795 |
@Test(timeout=30000)
public void testFailureBeforeRename () throws IOException {
Configuration conf = new HdfsConfiguration();
FSDataOutputStream fos = null;
SecondaryNameNode secondary = null;
MiniDFSCluster cluster = null;
FileSystem fs = null;
try {
cluster = new MiniDFSCluster.Buil... | @Test(timeout=30000) void function () throws IOException { Configuration conf = new HdfsConfiguration(); FSDataOutputStream fos = null; SecondaryNameNode secondary = null; MiniDFSCluster cluster = null; FileSystem fs = null; try { cluster = new MiniDFSCluster.Builder(conf).numDataNodes(numDatanodes) .build(); cluster.w... | /**
* Test NN restart if a failure happens in between creating the fsimage
* MD5 file and renaming the fsimage.
*/ | Test NN restart if a failure happens in between creating the fsimage MD5 file and renaming the fsimage | testFailureBeforeRename | {
"repo_name": "GeLiXin/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestCheckpoint.java",
"license": "apache-2.0",
"size": 88361
} | [
"java.io.IOException",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.fs.FSDataOutputStream",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hdfs.HdfsConfiguration",
"org.apache.hadoop.hdfs.MiniDFSCluster",
"org.junit.Assert",
"org.junit.Test",
"org.... | import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hdfs.HdfsConfiguration; import org.apache.hadoop.hdfs.MiniDFSCluster; import org.junit.Assert; impor... | import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.*; import org.junit.*; import org.mockito.*; | [
"java.io",
"org.apache.hadoop",
"org.junit",
"org.mockito"
] | java.io; org.apache.hadoop; org.junit; org.mockito; | 56,974 |
public static SiteAssert assertThat(final SiteInfo siteInfo) {
Objects.requireNonNull(siteInfo, "siteInfo is required");
return new SiteAssert(siteInfo);
} | static SiteAssert function(final SiteInfo siteInfo) { Objects.requireNonNull(siteInfo, STR); return new SiteAssert(siteInfo); } | /**
* Instantiate a custom site assertion with an instance of SiteInfo.
*
* @param siteInfo instance of a SiteInfo
* @return an instance of site assertion
*/ | Instantiate a custom site assertion with an instance of SiteInfo | assertThat | {
"repo_name": "ixxus/alfresco-test-assertions",
"path": "src/main/java/com/ixxus/alfresco/SiteAssert.java",
"license": "apache-2.0",
"size": 5307
} | [
"java.util.Objects",
"org.alfresco.service.cmr.site.SiteInfo"
] | import java.util.Objects; import org.alfresco.service.cmr.site.SiteInfo; | import java.util.*; import org.alfresco.service.cmr.site.*; | [
"java.util",
"org.alfresco.service"
] | java.util; org.alfresco.service; | 1,888,058 |
public void setFrameAnchor(RectangleAnchor anchor) {
if (anchor == null) {
throw new IllegalArgumentException("Null 'anchor' argument.");
}
this.frameAnchor = anchor;
notifyListeners(new DialLayerChangeEvent(this));
} | void function(RectangleAnchor anchor) { if (anchor == null) { throw new IllegalArgumentException(STR); } this.frameAnchor = anchor; notifyListeners(new DialLayerChangeEvent(this)); } | /**
* Sets the frame anchor and sends a {@link DialLayerChangeEvent} to all
* registered listeners.
*
* @param anchor the anchor (<code>null</code> not permitted).
*
* @see #getFrameAnchor()
*/ | Sets the frame anchor and sends a <code>DialLayerChangeEvent</code> to all registered listeners | setFrameAnchor | {
"repo_name": "SpoonLabs/astor",
"path": "examples/chart_11/source/org/jfree/chart/plot/dial/DialValueIndicator.java",
"license": "gpl-2.0",
"size": 20817
} | [
"org.jfree.chart.util.RectangleAnchor"
] | import org.jfree.chart.util.RectangleAnchor; | import org.jfree.chart.util.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 2,500,308 |
@Override
public Adapter createRouterMediatorAdapter() {
if (routerMediatorItemProvider == null) {
routerMediatorItemProvider = new RouterMediatorItemProvider(this);
}
return routerMediatorItemProvider;
}
protected RouterRouteItemProvider routerRouteItemProvider;
| Adapter function() { if (routerMediatorItemProvider == null) { routerMediatorItemProvider = new RouterMediatorItemProvider(this); } return routerMediatorItemProvider; } protected RouterRouteItemProvider routerRouteItemProvider; | /**
* This creates an adapter for a {@link org.wso2.developerstudio.eclipse.gmf.esb.RouterMediator}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This creates an adapter for a <code>org.wso2.developerstudio.eclipse.gmf.esb.RouterMediator</code>. | createRouterMediatorAdapter | {
"repo_name": "rajeevanv89/developer-studio",
"path": "esb/org.wso2.developerstudio.eclipse.gmf.esb.edit/src/org/wso2/developerstudio/eclipse/gmf/esb/provider/EsbItemProviderAdapterFactory.java",
"license": "apache-2.0",
"size": 286852
} | [
"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,344,778 |
private static void outputResource(String resName, IHTTPOutput out,
Locale locale, Map<String,String> paramMap) throws ManifoldCFException {
Messages.outputResourceWithVelocity(out,locale,resName,paramMap,true);
} | static void function(String resName, IHTTPOutput out, Locale locale, Map<String,String> paramMap) throws ManifoldCFException { Messages.outputResourceWithVelocity(out,locale,resName,paramMap,true); } | /**
* Read the content of a resource, replace the variable ${PARAMNAME} with the
* value and copy it to the out.
*
* @param resName
* @param out
* @throws ManifoldCFException
*/ | Read the content of a resource, replace the variable ${PARAMNAME} with the value and copy it to the out | outputResource | {
"repo_name": "cogfor/mcf-cogfor",
"path": "connectors/alfresco/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/alfresco/AlfrescoRepositoryConnector.java",
"license": "apache-2.0",
"size": 43305
} | [
"java.util.Locale",
"java.util.Map",
"org.apache.manifoldcf.core.interfaces.IHTTPOutput",
"org.apache.manifoldcf.core.interfaces.ManifoldCFException"
] | import java.util.Locale; import java.util.Map; import org.apache.manifoldcf.core.interfaces.IHTTPOutput; import org.apache.manifoldcf.core.interfaces.ManifoldCFException; | import java.util.*; import org.apache.manifoldcf.core.interfaces.*; | [
"java.util",
"org.apache.manifoldcf"
] | java.util; org.apache.manifoldcf; | 376,013 |
@Test
public void testHtmlHeadless() {
System.setProperty("targetBrowser", "HEADLESS");
final WebDriver webDriver = BrowserFactory.webDriver();
assumeNotNull("Headless webDriver not available", webDriver);
verifyPageLoaded(webDriver);
}
| void function() { System.setProperty(STR, STR); final WebDriver webDriver = BrowserFactory.webDriver(); assumeNotNull(STR, webDriver); verifyPageLoaded(webDriver); } | /**
* test BrowserFactory returns Opera.
*/ | test BrowserFactory returns Opera | testHtmlHeadless | {
"repo_name": "atf4j/atf4j",
"path": "atf4j-webdriver/src/test/java/net/atf4j/webdriver/BrowserFactoryTest.java",
"license": "gpl-3.0",
"size": 5764
} | [
"org.junit.Assume",
"org.openqa.selenium.WebDriver"
] | import org.junit.Assume; import org.openqa.selenium.WebDriver; | import org.junit.*; import org.openqa.selenium.*; | [
"org.junit",
"org.openqa.selenium"
] | org.junit; org.openqa.selenium; | 179,052 |
private static void setRowColour(View view, int position){
Drawable background = view.getResources()
.getDrawable(//zero-indexed, and documentation has it that odd is first row, even is 2nd.
position % 2 != 0 ?
R.drawable.list_item_background_even : R.drawable.list_item_background_odd);
view.s... | static void function(View view, int position){ Drawable background = view.getResources() .getDrawable( position % 2 != 0 ? R.drawable.list_item_background_even : R.drawable.list_item_background_odd); view.setBackgroundDrawable(background); } | /** Sets the background colour of row based upon position.
* @param view The view to set
* @param position The current position of row */ | Sets the background colour of row based upon position | setRowColour | {
"repo_name": "iamovrhere/CurrencyConverter",
"path": "src/com/ovrhere/android/currencyconverter/ui/adapters/CurrencyCursorAdapter.java",
"license": "apache-2.0",
"size": 6846
} | [
"android.graphics.drawable.Drawable",
"android.view.View"
] | import android.graphics.drawable.Drawable; import android.view.View; | import android.graphics.drawable.*; import android.view.*; | [
"android.graphics",
"android.view"
] | android.graphics; android.view; | 2,250,100 |
@Test(expected = RequestException.class)
public void shouldThrowRequestExceptionWhenInnerGetFileAnnotationsThrowsP4JavaException()
throws Exception {
doThrow(P4JavaException.class).when(server).execMapCmdList(eq(ANNOTATE.toString()),
any(String[].class), eq((Map<String, Objec... | @Test(expected = RequestException.class) void function() throws Exception { doThrow(P4JavaException.class).when(server).execMapCmdList(eq(ANNOTATE.toString()), any(String[].class), eq((Map<String, Object>) null)); executeGetFileAnnotations(whitespaceDiffType); } | /**
* Expected thrown <code>RequestException</code> when inner
* getFileAnnotations() throws the <code>P4JavaException</code>
*
* @throws Exception
* if the <code>Exception</code> is thrown, it's mean an
* unexpected error occurs
*/ | Expected thrown <code>RequestException</code> when inner getFileAnnotations() throws the <code>P4JavaException</code> | shouldThrowRequestExceptionWhenInnerGetFileAnnotationsThrowsP4JavaException | {
"repo_name": "groboclown/p4ic4idea",
"path": "p4java/r19-1/src/test/java/com/perforce/p4java/impl/mapbased/server/cmd/FileAnnotateDelegatorTest.java",
"license": "apache-2.0",
"size": 8825
} | [
"com.perforce.p4java.exception.P4JavaException",
"com.perforce.p4java.exception.RequestException",
"com.perforce.p4java.server.CmdSpec",
"java.util.Map",
"org.junit.Test",
"org.mockito.ArgumentMatchers",
"org.mockito.Mockito"
] | import com.perforce.p4java.exception.P4JavaException; import com.perforce.p4java.exception.RequestException; import com.perforce.p4java.server.CmdSpec; import java.util.Map; import org.junit.Test; import org.mockito.ArgumentMatchers; import org.mockito.Mockito; | import com.perforce.p4java.exception.*; import com.perforce.p4java.server.*; import java.util.*; import org.junit.*; import org.mockito.*; | [
"com.perforce.p4java",
"java.util",
"org.junit",
"org.mockito"
] | com.perforce.p4java; java.util; org.junit; org.mockito; | 157,897 |
Map<String, List<CommentInfo>> comments() throws RestApiException; | Map<String, List<CommentInfo>> comments() throws RestApiException; | /**
* Get all published comments on a change.
*
* @return comments in a map keyed by path; comments have the {@code revision} field set to
* indicate their patch set.
* @throws RestApiException
*/ | Get all published comments on a change | comments | {
"repo_name": "WANdisco/gerrit",
"path": "java/com/google/gerrit/extensions/api/changes/ChangeApi.java",
"license": "apache-2.0",
"size": 19434
} | [
"com.google.gerrit.extensions.common.CommentInfo",
"com.google.gerrit.extensions.restapi.RestApiException",
"java.util.List",
"java.util.Map"
] | import com.google.gerrit.extensions.common.CommentInfo; import com.google.gerrit.extensions.restapi.RestApiException; import java.util.List; import java.util.Map; | import com.google.gerrit.extensions.common.*; import com.google.gerrit.extensions.restapi.*; import java.util.*; | [
"com.google.gerrit",
"java.util"
] | com.google.gerrit; java.util; | 2,029,017 |
public boolean abort() throws IOException {
return FTPReply.isPositiveCompletion(abor());
} | boolean function() throws IOException { return FTPReply.isPositiveCompletion(abor()); } | /**
* Abort a transfer in progress.
*
* @return True if successfully completed, false if not.
* @throws FTPConnectionClosedException If the FTP server prematurely closes the connection as a
* result
* of the client being idle or some other reason causing the server
* to send FTP reply code 421. Th... | Abort a transfer in progress | abort | {
"repo_name": "AriaLyy/DownloadUtil",
"path": "AriaFtpPlug/src/main/java/aria/apache/commons/net/ftp/FTPClient.java",
"license": "apache-2.0",
"size": 152886
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,541,561 |
public static HashMap<String, Object> bucketsByNameToManifestEntries(HashMap<String,Object> bucketsByName) {
HashMap<String,Object> manifestEntries = new HashMap<String,Object>();
Iterator<String> i = bucketsByName.keySet().iterator();
while(i.hasNext()) {
String name = i.next();
Object o = bucketsByName... | static HashMap<String, Object> function(HashMap<String,Object> bucketsByName) { HashMap<String,Object> manifestEntries = new HashMap<String,Object>(); Iterator<String> i = bucketsByName.keySet().iterator(); while(i.hasNext()) { String name = i.next(); Object o = bucketsByName.get(name); if(o instanceof ManifestElement)... | /**
* Convert a HashMap of name -> bucket to a HashSet of ManifestEntry's.
* All are to have mimeOverride=null, i.e. we use the auto-detected mime type
* from the filename.
*/ | Convert a HashMap of name -> bucket to a HashSet of ManifestEntry's. All are to have mimeOverride=null, i.e. we use the auto-detected mime type from the filename | bucketsByNameToManifestEntries | {
"repo_name": "wnoisephx/fred-official",
"path": "src/freenet/client/async/SimpleManifestPutter.java",
"license": "gpl-2.0",
"size": 73731
} | [
"java.util.HashMap",
"java.util.Iterator"
] | import java.util.HashMap; import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 94,475 |
public static void run(Class<?> lambdaMainHandlerClazz, EventExecutorRegistry registry,
InputStream input, OutputStream output,
Context context, Consumer<ApplicationContext> startupHandler) throws Exception {
application = Optional.ofNullable(application... | static void function(Class<?> lambdaMainHandlerClazz, EventExecutorRegistry registry, InputStream input, OutputStream output, Context context, Consumer<ApplicationContext> startupHandler) throws Exception { application = Optional.ofNullable(application).orElseGet( () -> { EventApplication app = new EventApplication(lam... | /**
* Static helper that can be used to run your LambdaEventApplication with
* the method to run only once on startup this Lambda function.
*
* @param lambdaMainHandlerClazz
* The Lambda main handler class
* @param registry
* The EventExecutor registry for handli... | Static helper that can be used to run your LambdaEventApplication with the method to run only once on startup this Lambda function | run | {
"repo_name": "visionarts/power-jambda",
"path": "power-jambda-events/src/main/java/com/visionarts/powerjambda/events/EventApplication.java",
"license": "apache-2.0",
"size": 5648
} | [
"com.amazonaws.services.lambda.runtime.Context",
"com.visionarts.powerjambda.ApplicationContext",
"java.io.InputStream",
"java.io.OutputStream",
"java.util.Optional",
"java.util.function.Consumer"
] | import com.amazonaws.services.lambda.runtime.Context; import com.visionarts.powerjambda.ApplicationContext; import java.io.InputStream; import java.io.OutputStream; import java.util.Optional; import java.util.function.Consumer; | import com.amazonaws.services.lambda.runtime.*; import com.visionarts.powerjambda.*; import java.io.*; import java.util.*; import java.util.function.*; | [
"com.amazonaws.services",
"com.visionarts.powerjambda",
"java.io",
"java.util"
] | com.amazonaws.services; com.visionarts.powerjambda; java.io; java.util; | 2,499,558 |
public XYItemRendererState initialise(Graphics2D g2,
Rectangle2D dataArea,
XYPlot plot,
XYDataset data,
PlotRenderingInfo info) {
XYItem... | XYItemRendererState function(Graphics2D g2, Rectangle2D dataArea, XYPlot plot, XYDataset data, PlotRenderingInfo info) { XYItemRendererState state = super.initialise(g2, dataArea, plot, data, info); ValueAxis rangeAxis = plot.getRangeAxis(); this.translatedRangeZero = rangeAxis.valueToJava2D(0.0, dataArea, plot.getRang... | /**
* Initialises the renderer. Here we calculate the Java2D y-coordinate for zero, since all
* the bars have their bases fixed at zero. Copied from superclass to
* initialize local variables.
*
* @param g2 the graphics device.
* @param dataArea the area inside the axes.
* @param plot the pl... | Initialises the renderer. Here we calculate the Java2D y-coordinate for zero, since all the bars have their bases fixed at zero. Copied from superclass to initialize local variables | initialise | {
"repo_name": "simeshev/parabuild-ci",
"path": "3rdparty/jfreechart0921/source/org/jfree/chart/renderer/xy/ClusteredXYBarRenderer.java",
"license": "lgpl-3.0",
"size": 10793
} | [
"java.awt.Graphics2D",
"java.awt.geom.Rectangle2D",
"org.jfree.chart.axis.ValueAxis",
"org.jfree.chart.plot.PlotRenderingInfo",
"org.jfree.chart.plot.XYPlot",
"org.jfree.data.xy.XYDataset"
] | import java.awt.Graphics2D; import java.awt.geom.Rectangle2D; import org.jfree.chart.axis.ValueAxis; import org.jfree.chart.plot.PlotRenderingInfo; import org.jfree.chart.plot.XYPlot; import org.jfree.data.xy.XYDataset; | import java.awt.*; import java.awt.geom.*; import org.jfree.chart.axis.*; import org.jfree.chart.plot.*; import org.jfree.data.xy.*; | [
"java.awt",
"org.jfree.chart",
"org.jfree.data"
] | java.awt; org.jfree.chart; org.jfree.data; | 385,093 |
public void setMenuButtonHighlightDrawable() {
// Return if onFinishInflate didn't finish
if (mMenuImageButton == null) return;
if (mHighlightingMenu) {
if (mHighlightDrawable == null) {
mHighlightDrawable = PulseDrawable.createCircle(getContext());
... | void function() { if (mMenuImageButton == null) return; if (mHighlightingMenu) { if (mHighlightDrawable == null) { mHighlightDrawable = PulseDrawable.createCircle(getContext()); mHighlightDrawable.setInset(ViewCompat.getPaddingStart(mMenuImageButton), mMenuImageButton.getPaddingTop(), ViewCompat.getPaddingEnd(mMenuImag... | /**
* Sets the menu button's background depending on whether or not we are highlighting and whether
* or not we are using light or dark assets.
*/ | Sets the menu button's background depending on whether or not we are highlighting and whether or not we are using light or dark assets | setMenuButtonHighlightDrawable | {
"repo_name": "endlessm/chromium-browser",
"path": "chrome/android/java/src/org/chromium/chrome/browser/toolbar/MenuButton.java",
"license": "bsd-3-clause",
"size": 13827
} | [
"androidx.core.view.ViewCompat",
"org.chromium.components.browser_ui.widget.highlight.PulseDrawable"
] | import androidx.core.view.ViewCompat; import org.chromium.components.browser_ui.widget.highlight.PulseDrawable; | import androidx.core.view.*; import org.chromium.components.browser_ui.widget.highlight.*; | [
"androidx.core",
"org.chromium.components"
] | androidx.core; org.chromium.components; | 2,422,010 |
protected int next() throws IOException, ExifInvalidFormatException {
if (!mContainExifData) {
return EVENT_END;
}
int offset = mTiffStream.getReadByteCount();
int endOfTags = mIfdStartOffset + OFFSET_SIZE + TAG_SIZE * mNumOfTagInIfd;
if (offset < endOfTags) {
... | int function() throws IOException, ExifInvalidFormatException { if (!mContainExifData) { return EVENT_END; } int offset = mTiffStream.getReadByteCount(); int endOfTags = mIfdStartOffset + OFFSET_SIZE + TAG_SIZE * mNumOfTagInIfd; if (offset < endOfTags) { mTag = readTag(); if (mTag == null) { return next(); } if (mNeedT... | /**
* Moves the parser forward and returns the next parsing event
*
* @exception IOException
* @exception ExifInvalidFormatException
* @see #EVENT_START_OF_IFD
* @see #EVENT_NEW_TAG
* @see #EVENT_VALUE_OF_REGISTERED_TAG
* @see #EVENT_COMPRESSED_IMAGE
* @see #EVENT_UNCOMPRESS... | Moves the parser forward and returns the next parsing event | next | {
"repo_name": "oux/PhotoCaption",
"path": "src/com/android/gallery3d/exif/ExifParser.java",
"license": "apache-2.0",
"size": 34321
} | [
"android.util.Log",
"java.io.IOException",
"java.util.Map"
] | import android.util.Log; import java.io.IOException; import java.util.Map; | import android.util.*; import java.io.*; import java.util.*; | [
"android.util",
"java.io",
"java.util"
] | android.util; java.io; java.util; | 1,619,837 |
public RequestMatcher nodeCount(Matcher<? super Integer> matcher) {
return (XpathRequestMatcher) request ->
this.xpathHelper.assertNodeCount(request.getBodyAsBytes(), DEFAULT_ENCODING, matcher);
} | RequestMatcher function(Matcher<? super Integer> matcher) { return (XpathRequestMatcher) request -> this.xpathHelper.assertNodeCount(request.getBodyAsBytes(), DEFAULT_ENCODING, matcher); } | /**
* Apply the XPath and assert the number of nodes found with the given
* {@code Matcher<Integer>}.
*/ | Apply the XPath and assert the number of nodes found with the given Matcher | nodeCount | {
"repo_name": "spring-projects/spring-framework",
"path": "spring-test/src/main/java/org/springframework/test/web/client/match/XpathRequestMatchers.java",
"license": "apache-2.0",
"size": 5521
} | [
"org.hamcrest.Matcher",
"org.springframework.test.web.client.RequestMatcher"
] | import org.hamcrest.Matcher; import org.springframework.test.web.client.RequestMatcher; | import org.hamcrest.*; import org.springframework.test.web.client.*; | [
"org.hamcrest",
"org.springframework.test"
] | org.hamcrest; org.springframework.test; | 872,954 |
IOException getException(); | IOException getException(); | /**
* Returns the exception that occurred while executing the request of null
* if the request was successful.
*/ | Returns the exception that occurred while executing the request of null if the request was successful | getException | {
"repo_name": "TeamEOS/external_chromium_org",
"path": "components/cronet/android/java/src/org/chromium/net/HttpUrlRequest.java",
"license": "bsd-3-clause",
"size": 3831
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,124,731 |
public PagedResult<LocalizedResourceElement> getByName(String name);
| PagedResult<LocalizedResourceElement> function(String name); | /**
* Gets the LocalizedResourceElement by name.
*
* @param name the name
* @return the LocalizedResourceElement by name
*/ | Gets the LocalizedResourceElement by name | getByName | {
"repo_name": "af5m/elm-service-persistence",
"path": "src/main/java/com/af5m/elm/service/persistence/service/LocalizedResourceElementService.java",
"license": "apache-2.0",
"size": 1225
} | [
"com.af5m.elm.model.LocalizedResourceElement",
"com.dell.isg.smi.commons.utilities.model.PagedResult"
] | import com.af5m.elm.model.LocalizedResourceElement; import com.dell.isg.smi.commons.utilities.model.PagedResult; | import com.af5m.elm.model.*; import com.dell.isg.smi.commons.utilities.model.*; | [
"com.af5m.elm",
"com.dell.isg"
] | com.af5m.elm; com.dell.isg; | 2,134,717 |
public static FunctionScoreQueryBuilder functionScoreQuery(ScoreFunctionBuilder function) {
return new FunctionScoreQueryBuilder(function);
} | static FunctionScoreQueryBuilder function(ScoreFunctionBuilder function) { return new FunctionScoreQueryBuilder(function); } | /**
* A query that allows to define a custom scoring function.
*
* @param function The function builder used to custom score
*/ | A query that allows to define a custom scoring function | functionScoreQuery | {
"repo_name": "rhoml/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/index/query/QueryBuilders.java",
"license": "apache-2.0",
"size": 31174
} | [
"org.elasticsearch.index.query.functionscore.FunctionScoreQueryBuilder",
"org.elasticsearch.index.query.functionscore.ScoreFunctionBuilder"
] | import org.elasticsearch.index.query.functionscore.FunctionScoreQueryBuilder; import org.elasticsearch.index.query.functionscore.ScoreFunctionBuilder; | import org.elasticsearch.index.query.functionscore.*; | [
"org.elasticsearch.index"
] | org.elasticsearch.index; | 982,825 |
@Override
public boolean isInfoEnabled() {
return isEnabled(Level.INFO, null, (Object) null, null);
} | boolean function() { return isEnabled(Level.INFO, null, (Object) null, null); } | /**
* Checks whether this Logger is enabled for the INFO Level.
*
* @return boolean - {@code true} if this Logger is enabled for level
* INFO, {@code false} otherwise.
*/ | Checks whether this Logger is enabled for the INFO Level | isInfoEnabled | {
"repo_name": "OuZhencong/log4j2",
"path": "log4j-api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java",
"license": "apache-2.0",
"size": 66623
} | [
"org.apache.logging.log4j.Level"
] | import org.apache.logging.log4j.Level; | import org.apache.logging.log4j.*; | [
"org.apache.logging"
] | org.apache.logging; | 2,039,011 |
public List<X509Certificate> getTrustedChainForServer(X509Certificate[] certs,
String authType, Socket socket) throws CertificateException {
SSLSession session = null;
SSLParameters parameters = null;
if (socket instanceof SSLSocket) {
SSLSocket sslSocket = (SSLSocket... | List<X509Certificate> function(X509Certificate[] certs, String authType, Socket socket) throws CertificateException { SSLSession session = null; SSLParameters parameters = null; if (socket instanceof SSLSocket) { SSLSocket sslSocket = (SSLSocket) socket; session = getHandshakeSessionOrThrow(sslSocket); parameters = ssl... | /**
* Returns the full trusted certificate chain found from {@code certs}.
*
* Throws {@link CertificateException} when no trusted chain can be found from {@code certs}.
*/ | Returns the full trusted certificate chain found from certs. Throws <code>CertificateException</code> when no trusted chain can be found from certs | getTrustedChainForServer | {
"repo_name": "commonsguy/cwac-netsecurity",
"path": "netsecurity/src/main/java/com/commonsware/cwac/netsecurity/conscrypt/TrustManagerImpl.java",
"license": "apache-2.0",
"size": 36331
} | [
"java.net.Socket",
"java.security.cert.CertificateException",
"java.security.cert.X509Certificate",
"java.util.List",
"javax.net.ssl.SSLParameters",
"javax.net.ssl.SSLSession",
"javax.net.ssl.SSLSocket"
] | import java.net.Socket; import java.security.cert.CertificateException; import java.security.cert.X509Certificate; import java.util.List; import javax.net.ssl.SSLParameters; import javax.net.ssl.SSLSession; import javax.net.ssl.SSLSocket; | import java.net.*; import java.security.cert.*; import java.util.*; import javax.net.ssl.*; | [
"java.net",
"java.security",
"java.util",
"javax.net"
] | java.net; java.security; java.util; javax.net; | 2,654,289 |
public static boolean isReferencedBy(IJavaElement element, IMarker marker) throws CoreException {
// only match units or classfiles
if (element instanceof IMember){
IMember member = (IMember) element;
if (member.isBinary()){
element = member.getClassFile();
} else {
element = member.getCompilat... | static boolean function(IJavaElement element, IMarker marker) throws CoreException { if (element instanceof IMember){ IMember member = (IMember) element; if (member.isBinary()){ element = member.getClassFile(); } else { element = member.getCompilationUnit(); } } if (element == null) return false; if (marker == null) re... | /**
* Returns whether the given marker references the given Java element.
* Used for markers, which denote a Java element rather than a resource.
*
* @param element the element
* @param marker the marker
* @return <code>true</code> if the marker references the element, false otherwise
* @exception CoreExc... | Returns whether the given marker references the given Java element. Used for markers, which denote a Java element rather than a resource | isReferencedBy | {
"repo_name": "elucash/eclipse-oxygen",
"path": "org.eclipse.jdt.core/src/org/eclipse/jdt/core/JavaCore.java",
"license": "epl-1.0",
"size": 300211
} | [
"org.eclipse.core.resources.IMarker",
"org.eclipse.core.runtime.CoreException"
] | import org.eclipse.core.resources.IMarker; import org.eclipse.core.runtime.CoreException; | import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*; | [
"org.eclipse.core"
] | org.eclipse.core; | 2,205,149 |
public void removeListener(INotifyChangedListener notifyChangedListener)
{
changeNotifier.removeListener(notifyChangedListener);
} | void function(INotifyChangedListener notifyChangedListener) { changeNotifier.removeListener(notifyChangedListener); } | /**
* This removes a listener.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This removes a listener. | removeListener | {
"repo_name": "mdean77/Model-Driven-Decision-Support",
"path": "edu.utah.dcc.e4.glucose.xcore.model/src/glucose/provider/GlucoseItemProviderAdapterFactory.java",
"license": "epl-1.0",
"size": 6146
} | [
"org.eclipse.emf.edit.provider.INotifyChangedListener"
] | import org.eclipse.emf.edit.provider.INotifyChangedListener; | import org.eclipse.emf.edit.provider.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,542,447 |
private void checkCredentials() throws UnsupportedConstraintException {
if (serverSubject == null) {
return;
}
checkListenPermissions(false);
Set principals = serverSubject.getPrincipals();
boolean nullServerPrincipals = serverPrincipals == null;
Map progress = new HashMa... | void function() throws UnsupportedConstraintException { if (serverSubject == null) { return; } checkListenPermissions(false); Set principals = serverSubject.getPrincipals(); boolean nullServerPrincipals = serverPrincipals == null; Map progress = new HashMap(nullServerPrincipals ? 0 : serverPrincipals.size()); if (!null... | /**
* Check that the subject has credentials for the principals specified
* when the server endpoint was created.
*/ | Check that the subject has credentials for the principals specified when the server endpoint was created | checkCredentials | {
"repo_name": "cdegroot/river",
"path": "src/net/jini/jeri/ssl/SslServerEndpointImpl.java",
"license": "apache-2.0",
"size": 43846
} | [
"java.security.AccessController",
"java.security.cert.CertPath",
"java.security.cert.CertificateException",
"java.security.cert.X509Certificate",
"java.util.HashMap",
"java.util.Iterator",
"java.util.List",
"java.util.Map",
"java.util.Set",
"javax.security.auth.x500.X500Principal",
"javax.securi... | import java.security.AccessController; import java.security.cert.CertPath; import java.security.cert.CertificateException; import java.security.cert.X509Certificate; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import javax.security.auth.x500.X5... | import java.security.*; import java.security.cert.*; import java.util.*; import javax.security.auth.x500.*; import net.jini.io.*; | [
"java.security",
"java.util",
"javax.security",
"net.jini.io"
] | java.security; java.util; javax.security; net.jini.io; | 947,286 |
protected void writeGraphicCtrlExt() throws IOException {
out.write(0x21); // extension introducer
out.write(0xf9); // GCE label
out.write(4); // data block size
int transp, disp;
if (transparent == null) {
transp = 0;
disp = 0; // dispose = no action
} else {
transp = 1;
disp = 2; // force c... | void function() throws IOException { out.write(0x21); out.write(0xf9); out.write(4); int transp, disp; if (transparent == null) { transp = 0; disp = 0; } else { transp = 1; disp = 2; } if (dispose >= 0) { disp = dispose & 7; } disp <<= 2; out.write(0 disp 0 transp); writeShort(delay); out.write(transIndex); out.write(0... | /**
* Writes Graphic Control Extension
*/ | Writes Graphic Control Extension | writeGraphicCtrlExt | {
"repo_name": "rayrelay/devnote",
"path": "devnote-eclipse/src/main/java/org/ray/note/thumbmaker/imageutil/gif/AnimatedGifEncoder.java",
"license": "apache-2.0",
"size": 12930
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,532,393 |
public Integer getCheckBoxValue(String CheckBoxName)
throws java.lang.Exception
{
try {
XInterface xCheckBox =AccessibilityTools.getAccessibleObjectForRole(mXRoot,
AccessibleRole.CHECK_BOX, CheckBoxName);
XAccessibleValue xCheckB... | Integer function(String CheckBoxName) throws java.lang.Exception { try { XInterface xCheckBox =AccessibilityTools.getAccessibleObjectForRole(mXRoot, AccessibleRole.CHECK_BOX, CheckBoxName); XAccessibleValue xCheckBoxValue = UnoRuntime.queryInterface(XAccessibleValue.class, xCheckBox); return (Integer) xCheckBoxValue.ge... | /**
* returns the value of the named check box
* @param CheckBoxName the name of the check box
* @return the value of the check box
* @throws java.lang.Exception if something fail
*/ | returns the value of the named check box | getCheckBoxValue | {
"repo_name": "qt-haiku/LibreOffice",
"path": "qadevOOo/runner/util/UITools.java",
"license": "gpl-3.0",
"size": 31391
} | [
"com.sun.star.accessibility.AccessibleRole",
"com.sun.star.accessibility.XAccessibleValue",
"com.sun.star.uno.UnoRuntime",
"com.sun.star.uno.XInterface"
] | import com.sun.star.accessibility.AccessibleRole; import com.sun.star.accessibility.XAccessibleValue; import com.sun.star.uno.UnoRuntime; import com.sun.star.uno.XInterface; | import com.sun.star.accessibility.*; import com.sun.star.uno.*; | [
"com.sun.star"
] | com.sun.star; | 2,480,201 |
private void validateParameters() throws MojoExecutionException {
if (!(expectedResult.equals("success") ||
expectedResult.equals("failure") ||
expectedResult.equals("any"))) {
throw new MojoExecutionException("expectedResult must be either " +
"success, failure, or any");
}
... | void function() throws MojoExecutionException { if (!(expectedResult.equals(STR) expectedResult.equals(STR) expectedResult.equals("any"))) { throw new MojoExecutionException(STR + STR); } } | /**
* Validate the parameters that the user has passed.
* @throws MojoExecutionException
*/ | Validate the parameters that the user has passed | validateParameters | {
"repo_name": "dennishuo/hadoop",
"path": "hadoop-maven-plugins/src/main/java/org/apache/hadoop/maven/plugin/cmakebuilder/TestMojo.java",
"license": "apache-2.0",
"size": 11974
} | [
"org.apache.maven.plugin.MojoExecutionException"
] | import org.apache.maven.plugin.MojoExecutionException; | import org.apache.maven.plugin.*; | [
"org.apache.maven"
] | org.apache.maven; | 628,126 |
public static void copy(final InputStream input, final Writer output, final String inputEncoding)
throws IOException {
copy(input, output, Charsets.toCharset(inputEncoding));
}
// copy from Reader
//----------------------------------------------------------------------- | static void function(final InputStream input, final Writer output, final String inputEncoding) throws IOException { copy(input, output, Charsets.toCharset(inputEncoding)); } | /**
* Copies bytes from an <code>InputStream</code> to chars on a
* <code>Writer</code> using the specified character encoding.
* <p>
* This method buffers the input internally, so there is no need to use a
* <code>BufferedInputStream</code>.
* <p>
* Character encoding names can be fo... | Copies bytes from an <code>InputStream</code> to chars on a <code>Writer</code> using the specified character encoding. This method buffers the input internally, so there is no need to use a <code>BufferedInputStream</code>. Character encoding names can be found at IANA. This method uses <code>InputStreamReader</code> | copy | {
"repo_name": "krosenvold/commons-io",
"path": "src/main/java/org/apache/commons/io/IOUtils.java",
"license": "apache-2.0",
"size": 125142
} | [
"java.io.IOException",
"java.io.InputStream",
"java.io.Writer"
] | import java.io.IOException; import java.io.InputStream; import java.io.Writer; | import java.io.*; | [
"java.io"
] | java.io; | 2,548,608 |
public static Method[] getMethods(Class<?> clazz, String methodName, Class<?>[] expectedTypes,
boolean exactParameterTypeMatch) {
List<Method> matchingArgumentTypes = new LinkedList<Method>();
Method[] methods = getMethods(clazz, methodName);
for (Method... | static Method[] function(Class<?> clazz, String methodName, Class<?>[] expectedTypes, boolean exactParameterTypeMatch) { List<Method> matchingArgumentTypes = new LinkedList<Method>(); Method[] methods = getMethods(clazz, methodName); for (Method method : methods) { final Class<?>[] parameterTypes = method.getParameterT... | /**
* Get an array of {@link Method}'s that matches the method name and whose
* argument types are assignable from {@code expectedTypes}. Both
* instance and static methods are taken into account.
*
* @param clazz The class that should contain the methods.
* @param method... | Get an array of <code>Method</code>'s that matches the method name and whose argument types are assignable from expectedTypes. Both instance and static methods are taken into account | getMethods | {
"repo_name": "jayway/powermock",
"path": "powermock-reflect/src/main/java/org/powermock/reflect/internal/WhiteboxImpl.java",
"license": "apache-2.0",
"size": 115150
} | [
"java.lang.reflect.Method",
"java.util.LinkedList",
"java.util.List",
"org.powermock.reflect.exceptions.MethodNotFoundException"
] | import java.lang.reflect.Method; import java.util.LinkedList; import java.util.List; import org.powermock.reflect.exceptions.MethodNotFoundException; | import java.lang.reflect.*; import java.util.*; import org.powermock.reflect.exceptions.*; | [
"java.lang",
"java.util",
"org.powermock.reflect"
] | java.lang; java.util; org.powermock.reflect; | 968,485 |
@Override
protected Appender buildLog4jAppender(String fileStr, String maxLogFileSize, Integer maxLogBackupFiles)
throws IOException {
return new DailyRollingFileAppender(new PatternLayout(LOG_PATTERN), fileStr, datePattern);
}
| Appender function(String fileStr, String maxLogFileSize, Integer maxLogBackupFiles) throws IOException { return new DailyRollingFileAppender(new PatternLayout(LOG_PATTERN), fileStr, datePattern); } | /**
* The maxLogFileSize and maxLogBackupFiles are ignored as per the existing behaviour of DailyKeyOutWriter.
*/ | The maxLogFileSize and maxLogBackupFiles are ignored as per the existing behaviour of DailyKeyOutWriter | buildLog4jAppender | {
"repo_name": "RTBHOUSE/jmxtrans",
"path": "jmxtrans-output/jmxtrans-output-log4j/src/main/java/com/googlecode/jmxtrans/model/output/DailyKeyOutWriter.java",
"license": "mit",
"size": 3729
} | [
"java.io.IOException",
"org.apache.log4j.Appender",
"org.apache.log4j.DailyRollingFileAppender",
"org.apache.log4j.PatternLayout"
] | import java.io.IOException; import org.apache.log4j.Appender; import org.apache.log4j.DailyRollingFileAppender; import org.apache.log4j.PatternLayout; | import java.io.*; import org.apache.log4j.*; | [
"java.io",
"org.apache.log4j"
] | java.io; org.apache.log4j; | 2,725,770 |
public void changeCursor(Cursor cursor) {
Cursor old = swapCursor(cursor);
if (old != null) {
old.close();
}
} | void function(Cursor cursor) { Cursor old = swapCursor(cursor); if (old != null) { old.close(); } } | /**
* Change the underlying cursor to a new cursor. If there is an existing cursor it will be
* closed.
*/ | Change the underlying cursor to a new cursor. If there is an existing cursor it will be closed | changeCursor | {
"repo_name": "snejati86/barberside-project",
"path": "app/src/main/java/com/inja/barberside/adapters/CursorRecyclerViewAdapter.java",
"license": "mit",
"size": 4455
} | [
"android.database.Cursor"
] | import android.database.Cursor; | import android.database.*; | [
"android.database"
] | android.database; | 369,547 |
default AdvancedSchedulerEndpointBuilder exchangePattern(
ExchangePattern exchangePattern) {
doSetProperty("exchangePattern", exchangePattern);
return this;
} | default AdvancedSchedulerEndpointBuilder exchangePattern( ExchangePattern exchangePattern) { doSetProperty(STR, exchangePattern); return this; } | /**
* Sets the exchange pattern when the consumer creates an exchange.
*
* The option is a: <code>org.apache.camel.ExchangePattern</code> type.
*
* Group: consumer (advanced)
*/ | Sets the exchange pattern when the consumer creates an exchange. The option is a: <code>org.apache.camel.ExchangePattern</code> type. Group: consumer (advanced) | exchangePattern | {
"repo_name": "adessaigne/camel",
"path": "core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/SchedulerEndpointBuilderFactory.java",
"license": "apache-2.0",
"size": 27870
} | [
"org.apache.camel.ExchangePattern"
] | import org.apache.camel.ExchangePattern; | import org.apache.camel.*; | [
"org.apache.camel"
] | org.apache.camel; | 397,164 |
public Serializable invokeLocally ( long executingAgentId, String serviceClass, String method, Serializable[] parameters ) throws L2pSecurityException, AgentNotKnownException, InterruptedException, L2pServiceException {
if ( getStatus() != NodeStatus.RUNNING )
throw new IllegalStateException ( "You can invoke ... | Serializable function ( long executingAgentId, String serviceClass, String method, Serializable[] parameters ) throws L2pSecurityException, AgentNotKnownException, InterruptedException, L2pServiceException { if ( getStatus() != NodeStatus.RUNNING ) throw new IllegalStateException ( STR); long serviceAgentId = ServiceAg... | /**
* Invokes a service method of a local running service agent.
*
* @param executingAgentId
* @param serviceClass
* @param method
* @param parameters
*
* @return result of the method invocation
*
* @throws AgentNotKnownException cannot find the executing agent
* @throws L2pSecurityException
... | Invokes a service method of a local running service agent | invokeLocally | {
"repo_name": "AlexRuppert/las2peer_project",
"path": "java/i5/las2peer/p2p/Node.java",
"license": "mit",
"size": 47774
} | [
"java.io.Serializable"
] | import java.io.Serializable; | import java.io.*; | [
"java.io"
] | java.io; | 773,206 |
protected void addNamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ElementoDiagrama_name_feature"),
getString("_UI_PropertyDescriptor_des... | void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), VisualizacionPackage.Literals.ELEMENTO_DIAGRAMA__NAME, true, false, false, ItemPropertyDescriptor... | /**
* This adds a property descriptor for the Name feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds a property descriptor for the Name feature. | addNamePropertyDescriptor | {
"repo_name": "lfmendivelso10/AppModernization",
"path": "source/i2/VisualizacionMetricas3.edit/src/visualizacionMetricas3/visualizacion/provider/DiagramaItemProvider.java",
"license": "mit",
"size": 10796
} | [
"org.eclipse.emf.edit.provider.ComposeableAdapterFactory",
"org.eclipse.emf.edit.provider.ItemPropertyDescriptor"
] | import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; | import org.eclipse.emf.edit.provider.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,551,123 |
private ViewInstanceEntity getLatestUnregisteredInstance(String serverVersion, ViewInstanceEntity instance)
throws JAXBException, IOException, SAXException {
File viewDir = configuration.getViewsDir();
String extractedArchivesPath = viewDir.getAbsolutePath() +
File.separator + EXTRACTED_ARCHIVES_DI... | ViewInstanceEntity function(String serverVersion, ViewInstanceEntity instance) throws JAXBException, IOException, SAXException { File viewDir = configuration.getViewsDir(); String extractedArchivesPath = viewDir.getAbsolutePath() + File.separator + EXTRACTED_ARCHIVES_DIR; File extractedArchivesDir = new File(extractedA... | /**
* From all extracted views in the work directory finds ones that are present only in
* extracted version (not registered in the registry during startup).
* If jar is not exists, that means that this view is previous version of view.
* Finds latest between unregistered instances and returns it.
*
*... | From all extracted views in the work directory finds ones that are present only in extracted version (not registered in the registry during startup). If jar is not exists, that means that this view is previous version of view. Finds latest between unregistered instances and returns it | getLatestUnregisteredInstance | {
"repo_name": "alexryndin/ambari",
"path": "ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java",
"license": "apache-2.0",
"size": 89041
} | [
"java.io.File",
"java.io.IOException",
"java.util.HashMap",
"java.util.Map",
"javax.xml.bind.JAXBException",
"org.apache.ambari.server.orm.entities.ViewEntity",
"org.apache.ambari.server.orm.entities.ViewInstanceEntity",
"org.apache.ambari.server.view.configuration.ViewConfig",
"org.xml.sax.SAXExcep... | import java.io.File; import java.io.IOException; import java.util.HashMap; import java.util.Map; import javax.xml.bind.JAXBException; import org.apache.ambari.server.orm.entities.ViewEntity; import org.apache.ambari.server.orm.entities.ViewInstanceEntity; import org.apache.ambari.server.view.configuration.ViewConfig; i... | import java.io.*; import java.util.*; import javax.xml.bind.*; import org.apache.ambari.server.orm.entities.*; import org.apache.ambari.server.view.configuration.*; import org.xml.sax.*; | [
"java.io",
"java.util",
"javax.xml",
"org.apache.ambari",
"org.xml.sax"
] | java.io; java.util; javax.xml; org.apache.ambari; org.xml.sax; | 2,507,279 |
public static void generateProductFile(ProductFileConfig productFileConfig, MavenProject mavenProject) throws
JAXBException, MojoExecutionException, IOException {
// validating version and featureConfig values captured from project pom
ProductConfig validatedProductConfig = ProductFileUt... | static void function(ProductFileConfig productFileConfig, MavenProject mavenProject) throws JAXBException, MojoExecutionException, IOException { ProductConfig validatedProductConfig = ProductFileUtils.validateProductConfig(productFileConfig. getProductConfig(), mavenProject); Product product = new Product(); product.se... | /**
* Write Product bean as an XML to a product file.
*
* @param productFileConfig productFileConfig bean as read from project pom.
* @param mavenProject mavenProject bean as read from project pom.
* @throws JAXBException Is thrown if an error occurs in writing c... | Write Product bean as an XML to a product file | generateProductFile | {
"repo_name": "wso2/carbon-maven-plugins",
"path": "carbon-feature-plugin/src/main/java/org/wso2/maven/p2/utils/ProductFileUtils.java",
"license": "apache-2.0",
"size": 7283
} | [
"java.io.IOException",
"java.io.StringWriter",
"java.nio.charset.Charset",
"java.nio.file.Files",
"java.nio.file.Paths",
"javax.xml.bind.JAXBContext",
"javax.xml.bind.JAXBException",
"javax.xml.bind.Marshaller",
"org.apache.maven.plugin.MojoExecutionException",
"org.apache.maven.project.MavenProje... | import java.io.IOException; import java.io.StringWriter; import java.nio.charset.Charset; import java.nio.file.Files; import java.nio.file.Paths; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; import javax.xml.bind.Marshaller; import org.apache.maven.plugin.MojoExecutionException; import org.ap... | import java.io.*; import java.nio.charset.*; import java.nio.file.*; import javax.xml.bind.*; import org.apache.maven.plugin.*; import org.apache.maven.project.*; import org.wso2.maven.p2.beans.product.*; import org.wso2.maven.p2.beans.product.config.*; | [
"java.io",
"java.nio",
"javax.xml",
"org.apache.maven",
"org.wso2.maven"
] | java.io; java.nio; javax.xml; org.apache.maven; org.wso2.maven; | 309,540 |
public void emptyAndCommit( PreparedStatement ps, boolean batch, int batchCounter ) throws KettleDatabaseException {
boolean isBatchUpdate = false;
try {
if ( ps != null ) {
if ( !isAutoCommit() ) {
// Execute the batch or just perform a commit.
if ( batch && getDatabaseMetaD... | void function( PreparedStatement ps, boolean batch, int batchCounter ) throws KettleDatabaseException { boolean isBatchUpdate = false; try { if ( ps != null ) { if ( !isAutoCommit() ) { if ( batch && getDatabaseMetaData().supportsBatchUpdates() && batchCounter > 0 ) { isBatchUpdate = true; ps.executeBatch(); commit(); ... | /**
* Close the prepared statement of the insert statement.
*
* @param ps The prepared statement to empty and close.
* @param batch true if you are using batch processing
* @param psBatchCounter The number of rows on the batch queue
* @throws KettleDatabaseException
*/ | Close the prepared statement of the insert statement | emptyAndCommit | {
"repo_name": "pedrofvteixeira/pentaho-kettle",
"path": "core/src/main/java/org/pentaho/di/core/database/Database.java",
"license": "apache-2.0",
"size": 180346
} | [
"java.sql.BatchUpdateException",
"java.sql.PreparedStatement",
"java.sql.SQLException",
"org.pentaho.di.core.exception.KettleDatabaseException"
] | import java.sql.BatchUpdateException; import java.sql.PreparedStatement; import java.sql.SQLException; import org.pentaho.di.core.exception.KettleDatabaseException; | import java.sql.*; import org.pentaho.di.core.exception.*; | [
"java.sql",
"org.pentaho.di"
] | java.sql; org.pentaho.di; | 2,648,535 |
EReference getNode_Nodegraphics(); | EReference getNode_Nodegraphics(); | /**
* Returns the meta object for the containment reference '{@link fr.lip6.move.pnml.symmetricnet.hlcorestructure.Node#getNodegraphics <em>Nodegraphics</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Nodegraphics</em>'.
* @see fr.lip6.mov... | Returns the meta object for the containment reference '<code>fr.lip6.move.pnml.symmetricnet.hlcorestructure.Node#getNodegraphics Nodegraphics</code>'. | getNode_Nodegraphics | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-SNNet/src/fr/lip6/move/pnml/symmetricnet/hlcorestructure/HlcorestructurePackage.java",
"license": "epl-1.0",
"size": 178846
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 30,615 |
@SuppressWarnings("unchecked")
private void createComponentsFromNode(FacesContext context, Node node)
throws IOException
{
// add all the properties of the node to the UI
Map<String, Object> props = node.getProperties();
for (String propertyName : props.keySet())
{
... | @SuppressWarnings(STR) void function(FacesContext context, Node node) throws IOException { Map<String, Object> props = node.getProperties(); for (String propertyName : props.keySet()) { UIProperty propComp = (UIProperty)context.getApplication(). createComponent(RepoConstants.ALFRESCO_FACES_PROPERTY); QName qname = QNam... | /**
* Creates all the property components required to display the properties held by the node.
*
* @param context JSF context
* @param node The Node to show all the properties for
* @throws IOException
*/ | Creates all the property components required to display the properties held by the node | createComponentsFromNode | {
"repo_name": "loftuxab/community-edition-old",
"path": "projects/web-client/source/java/org/alfresco/web/ui/repo/component/property/UIPropertySheet.java",
"license": "lgpl-3.0",
"size": 30809
} | [
"java.io.IOException",
"java.util.Iterator",
"java.util.Map",
"javax.faces.context.FacesContext",
"org.alfresco.service.namespace.QName",
"org.alfresco.web.app.servlet.FacesHelper",
"org.alfresco.web.bean.repository.Node",
"org.alfresco.web.ui.repo.RepoConstants"
] | import java.io.IOException; import java.util.Iterator; import java.util.Map; import javax.faces.context.FacesContext; import org.alfresco.service.namespace.QName; import org.alfresco.web.app.servlet.FacesHelper; import org.alfresco.web.bean.repository.Node; import org.alfresco.web.ui.repo.RepoConstants; | import java.io.*; import java.util.*; import javax.faces.context.*; import org.alfresco.service.namespace.*; import org.alfresco.web.app.servlet.*; import org.alfresco.web.bean.repository.*; import org.alfresco.web.ui.repo.*; | [
"java.io",
"java.util",
"javax.faces",
"org.alfresco.service",
"org.alfresco.web"
] | java.io; java.util; javax.faces; org.alfresco.service; org.alfresco.web; | 1,044,783 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.