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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
protected static void injectMessageTime( byte[] header, long seconds )
{
// TODO: Use AqUtil instead of ByteEncoder. (JWB)
byte data[] = null;
ByteEncoder be = new ByteEncoder();
int pos = headerStartOffset(header);
pos += MSG_TIME_IDX;
if( header.length > ( pos + 4 ) )
{
try
{
be.writeLong( 4, seconds );
data = be.getContent();
header[pos++] = data[0];
header[pos++] = data[1];
header[pos++] = data[2];
header[pos++] = data[3];
}
catch( Exception e )
{
}
}
} | static void function( byte[] header, long seconds ) { byte data[] = null; ByteEncoder be = new ByteEncoder(); int pos = headerStartOffset(header); pos += MSG_TIME_IDX; if( header.length > ( pos + 4 ) ) { try { be.writeLong( 4, seconds ); data = be.getContent(); header[pos++] = data[0]; header[pos++] = data[1]; header[pos++] = data[2]; header[pos++] = data[3]; } catch( Exception e ) { } } } | /**
* <p>Injects the passed message time into the passed data packet or header.</p>
*
* <p><b>NOTE:</b> this method is used by the viaaq simulator and has limited error checking.</p>
* <p><b>NOTE:</b> Seconds should not exceed 4 bytes ... it is define as long to accomodate
* unsigned values but will get encoded into 4 bytes.</p>
*
* @param header
* @param seconds
*/ | Injects the passed message time into the passed data packet or header. unsigned values but will get encoded into 4 bytes | injectMessageTime | {
"repo_name": "yangjun2/android",
"path": "sfsp_application/src/com/airbiquity/android/choreofleetmessaging/CMessage.java",
"license": "unlicense",
"size": 40737
} | [
"com.airbiquity.util.ByteEncoder"
] | import com.airbiquity.util.ByteEncoder; | import com.airbiquity.util.*; | [
"com.airbiquity.util"
] | com.airbiquity.util; | 2,521,412 |
void doImportCheckpoint() throws IOException {
FSImage ckptImage = new FSImage();
FSNamesystem fsNamesys = FSNamesystem.getFSNamesystem();
// replace real image with the checkpoint image
FSImage realImage = fsNamesys.getFSImage();
assert realImage == this;
fsNamesys.dir.fsImage = ckptImage;
// load from the checkpoint dirs
try {
ckptImage.recoverTransitionRead(checkpointDirs,
checkpointEditsDirs, StartupOption.REGULAR);
} finally {
ckptImage.close();
}
// return back the real image
realImage.setStorageInfo(ckptImage);
fsNamesys.dir.fsImage = realImage;
// and save it
saveFSImage();
} | void doImportCheckpoint() throws IOException { FSImage ckptImage = new FSImage(); FSNamesystem fsNamesys = FSNamesystem.getFSNamesystem(); FSImage realImage = fsNamesys.getFSImage(); assert realImage == this; fsNamesys.dir.fsImage = ckptImage; try { ckptImage.recoverTransitionRead(checkpointDirs, checkpointEditsDirs, StartupOption.REGULAR); } finally { ckptImage.close(); } realImage.setStorageInfo(ckptImage); fsNamesys.dir.fsImage = realImage; saveFSImage(); } | /**
* Load image from a checkpoint directory and save it into the current one.
*
* @throws IOException
*/ | Load image from a checkpoint directory and save it into the current one | doImportCheckpoint | {
"repo_name": "shot/hadoop-source-reading",
"path": "src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSImage.java",
"license": "apache-2.0",
"size": 51517
} | [
"java.io.IOException",
"org.apache.hadoop.hdfs.server.common.HdfsConstants"
] | import java.io.IOException; import org.apache.hadoop.hdfs.server.common.HdfsConstants; | import java.io.*; import org.apache.hadoop.hdfs.server.common.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,641,339 |
protected void addComponentsPropertyDescriptor(Object object) {
ItemPropertyDescriptor ipd = createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Suite_components_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Suite_components_feature", "_UI_Suite_type"),
FoundationPackage.Literals.SUITE__COMPONENTS,
true,
false,
false,
getResourceLocator().getImage("full/obj16/images-stack.png"),
getString("_UI_GeneralPropertyCategory"),
null);
itemPropertyDescriptors.get(object).add
(new DialogItemPropertyDescriptorImpl(ipd, null) { | void function(Object object) { ItemPropertyDescriptor ipd = createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), FoundationPackage.Literals.SUITE__COMPONENTS, true, false, false, getResourceLocator().getImage(STR), getString(STR), null); itemPropertyDescriptors.get(object).add (new DialogItemPropertyDescriptorImpl(ipd, null) { | /**
* This adds a property descriptor for the Components feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/ | This adds a property descriptor for the Components feature. | addComponentsPropertyDescriptor | {
"repo_name": "Nasdanika/amur-it-js",
"path": "org.nasdanika.amur.it.js.foundation.edit/src/org/nasdanika/amur/it/js/foundation/provider/SuiteItemProvider.java",
"license": "epl-1.0",
"size": 7494
} | [
"org.eclipse.emf.edit.provider.ComposeableAdapterFactory",
"org.eclipse.emf.edit.provider.ItemPropertyDescriptor",
"org.nasdanika.amur.it.js.foundation.FoundationPackage",
"org.nasdanika.common.DialogItemPropertyDescriptorImpl"
] | import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.nasdanika.amur.it.js.foundation.FoundationPackage; import org.nasdanika.common.DialogItemPropertyDescriptorImpl; | import org.eclipse.emf.edit.provider.*; import org.nasdanika.amur.it.js.foundation.*; import org.nasdanika.common.*; | [
"org.eclipse.emf",
"org.nasdanika.amur",
"org.nasdanika.common"
] | org.eclipse.emf; org.nasdanika.amur; org.nasdanika.common; | 2,261,179 |
public Bitmap getTitleBitmap(Context context, String title) {
try {
boolean drawText = !TextUtils.isEmpty(title);
int textWidth =
drawText ? (int) Math.ceil(Layout.getDesiredWidth(title, mTextPaint)) : 0;
// Minimum 1 width bitmap to avoid createBitmap function's IllegalArgumentException,
// when textWidth == 0.
Bitmap b = Bitmap.createBitmap(Math.max(Math.min(mMaxWidth, textWidth), 1), mViewHeight,
Bitmap.Config.ARGB_8888);
Canvas c = new Canvas(b);
if (drawText) {
c.drawText(title, 0, Math.min(MAX_NUM_TITLE_CHAR, title.length()), 0,
Math.round((mViewHeight - mTextHeight) / 2.0f + mTextYOffset), mTextPaint);
}
return b;
} catch (OutOfMemoryError ex) {
Log.e(TAG, "OutOfMemoryError while building title texture.");
} catch (InflateException ex) {
Log.w(TAG, "InflateException while building title texture.");
}
return null;
} | Bitmap function(Context context, String title) { try { boolean drawText = !TextUtils.isEmpty(title); int textWidth = drawText ? (int) Math.ceil(Layout.getDesiredWidth(title, mTextPaint)) : 0; Bitmap b = Bitmap.createBitmap(Math.max(Math.min(mMaxWidth, textWidth), 1), mViewHeight, Bitmap.Config.ARGB_8888); Canvas c = new Canvas(b); if (drawText) { c.drawText(title, 0, Math.min(MAX_NUM_TITLE_CHAR, title.length()), 0, Math.round((mViewHeight - mTextHeight) / 2.0f + mTextYOffset), mTextPaint); } return b; } catch (OutOfMemoryError ex) { Log.e(TAG, STR); } catch (InflateException ex) { Log.w(TAG, STR); } return null; } | /**
* Generates the title bitmap.
*
* @param context Android's UI context.
* @param title The title of the tab.
* @return The Bitmap with the title.
*/ | Generates the title bitmap | getTitleBitmap | {
"repo_name": "ric2b/Vivaldi-browser",
"path": "chromium/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/content/TitleBitmapFactory.java",
"license": "bsd-3-clause",
"size": 5575
} | [
"android.content.Context",
"android.graphics.Bitmap",
"android.graphics.Canvas",
"android.text.Layout",
"android.text.TextUtils",
"android.util.Log",
"android.view.InflateException"
] | import android.content.Context; import android.graphics.Bitmap; import android.graphics.Canvas; import android.text.Layout; import android.text.TextUtils; import android.util.Log; import android.view.InflateException; | import android.content.*; import android.graphics.*; import android.text.*; import android.util.*; import android.view.*; | [
"android.content",
"android.graphics",
"android.text",
"android.util",
"android.view"
] | android.content; android.graphics; android.text; android.util; android.view; | 937,227 |
void create( NamedCluster namedCluster, IMetaStore metastore ) throws MetaStoreException; | void create( NamedCluster namedCluster, IMetaStore metastore ) throws MetaStoreException; | /**
* Saves a named cluster in the provided IMetaStore
*
* @param namedCluster the NamedCluster to save
* @param metastore the IMetaStore to operate with
* @throws MetaStoreException
*/ | Saves a named cluster in the provided IMetaStore | create | {
"repo_name": "bmorrise/big-data-plugin",
"path": "api/cluster/src/main/java/org/pentaho/big/data/api/cluster/NamedClusterService.java",
"license": "apache-2.0",
"size": 3992
} | [
"org.pentaho.metastore.api.IMetaStore",
"org.pentaho.metastore.api.exceptions.MetaStoreException"
] | import org.pentaho.metastore.api.IMetaStore; import org.pentaho.metastore.api.exceptions.MetaStoreException; | import org.pentaho.metastore.api.*; import org.pentaho.metastore.api.exceptions.*; | [
"org.pentaho.metastore"
] | org.pentaho.metastore; | 863,326 |
private JasperPrintLP printSammelmahnung(Integer mahnlaufIId,
Integer kundeIId, Boolean bMitLogo, TheClientDto theClientDto)
throws EJBExceptionLP {
try {
this.useCase = UC_SAMMELMAHNUNG;
index = -1;
MahnungDto[] mahnungen = getMahnwesenFac()
.mahnungFindByMahnlaufIId(mahnlaufIId);
String sRechnungen = "";
Collection<SammelmahnungDto> c = new LinkedList<SammelmahnungDto>();
Integer iMaxMahnstufe = null;
// PJ18939
ParametermandantDto p = getParameterFac().getMandantparameter(
theClientDto.getMandant(), ParameterFac.KATEGORIE_RECHNUNG,
ParameterFac.PARAMETER_MINDEST_MAHNBETRAG);
Double dMindestmahnbetrag = (Double) p.getCWertAsObject();
// SP1104 Sammelmahnung -> Ansprechpartner Tel/Fax/Email aus der
// 1.Rechnung verwenden
Integer partnerIIdAnsprechpartnerErsteRechnung = null;
for (int i = 0; i < mahnungen.length; i++) {
RechnungDto rechnungDto = getRechnungFac()
.rechnungFindByPrimaryKey(mahnungen[i].getRechnungIId());
// Stornierte werden nicht mitgedruckt.
if (!rechnungDto.getStatusCNr().equals(
RechnungFac.STATUS_STORNIERT)) {
Integer kundeIIdMahnung = rechnungDto.getKundeIId();
if (kundeIIdMahnung.equals(kundeIId)) {
if (iMaxMahnstufe == null) {
iMaxMahnstufe = mahnungen[i].getMahnstufeIId();
} else {
if (mahnungen[i].getMahnstufeIId().intValue() > iMaxMahnstufe
.intValue()) {
iMaxMahnstufe = mahnungen[i].getMahnstufeIId();
}
}
SammelmahnungDto smDto = new SammelmahnungDto();
BigDecimal bdOffen = rechnungDto
.getNWertfw()
.add(rechnungDto.getNWertustfw())
.subtract(
getRechnungFac()
.getBereitsBezahltWertVonRechnungFw(
rechnungDto.getIId(),
null))
.subtract(
getRechnungFac()
.getBereitsBezahltWertVonRechnungUstFw(
rechnungDto.getIId(),
null));
// SP839
BigDecimal bdUstAnzahlungFW = new BigDecimal(0);
BigDecimal bdNettoAnzahlungFW = new BigDecimal(0);
if (rechnungDto.getAuftragIId() != null
&& rechnungDto.getRechnungartCNr().equals(
RechnungFac.RECHNUNGART_SCHLUSSZAHLUNG)) {
bdNettoAnzahlungFW = getRechnungFac()
.getAnzahlungenZuSchlussrechnungFw(
rechnungDto.getIId());
bdUstAnzahlungFW = getRechnungFac()
.getAnzahlungenZuSchlussrechnungUstFw(
rechnungDto.getIId());
bdOffen = bdOffen.subtract(bdUstAnzahlungFW)
.subtract(bdNettoAnzahlungFW);
}
String rechnungtyp = getRechnungServiceFac()
.rechnungartFindByPrimaryKey(
rechnungDto.getRechnungartCNr(),
theClientDto).getRechnungtypCNr();
if (rechnungtyp
.equals(RechnungFac.RECHNUNGTYP_GUTSCHRIFT)) {
smDto.setBdOffen(bdOffen.negate());
smDto.setBdWert(rechnungDto.getNWertfw()
.add(rechnungDto.getNWertustfw()).negate());
smDto.setBdZinsen(new BigDecimal(0));
} else {
smDto.setBdOffen(bdOffen);
smDto.setBdWert(rechnungDto.getNWertfw().add(
rechnungDto.getNWertustfw()));
MahnstufeDto mahnstufeDto = getMahnwesenFac()
.mahnstufeFindByPrimaryKey(
new MahnstufePK(mahnungen[i]
.getMahnstufeIId(),
theClientDto.getMandant()));
Date dZieldatum = rechnungDto.getTBelegdatum();
if (rechnungDto.getZahlungszielIId() != null) {
ZahlungszielDto zzDto = getMandantFac()
.zahlungszielFindByPrimaryKey(
rechnungDto
.getZahlungszielIId(),
theClientDto);
if (zzDto.getAnzahlZieltageFuerNetto() == null) {
zzDto.setAnzahlZieltageFuerNetto(new Integer(
0));
}
dZieldatum = Helper.addiereTageZuDatum(
dZieldatum, zzDto
.getAnzahlZieltageFuerNetto()
.intValue());
}
if (mahnstufeDto.getFZinssatz() != null) {
BigDecimal bdZinssatz = new BigDecimal(
mahnstufeDto.getFZinssatz());
BigDecimal bdZinsenFuerEinJahr = bdOffen
.multiply(bdZinssatz.movePointLeft(2));
BigDecimal bdDays = new BigDecimal(
Helper.getDifferenzInTagen(dZieldatum,
mahnungen[i].getTMahndatum()));
BigDecimal bdZinsenFuerEinenTag = bdZinsenFuerEinJahr
.divide(new BigDecimal(360.0), 4,
BigDecimal.ROUND_HALF_EVEN);
BigDecimal bdZinsen = bdZinsenFuerEinenTag
.multiply(bdDays);
bdZinsen = Helper.rundeKaufmaennisch(bdZinsen,
FinanzFac.NACHKOMMASTELLEN);
smDto.setBdZinsen(bdZinsen);
} else {
smDto.setBdZinsen(new BigDecimal(0));
}
}
smDto.setDBelegdatum(rechnungDto.getTBelegdatum());
Date dZieldatum = rechnungDto.getTBelegdatum();
if (rechnungDto.getZahlungszielIId() != null) {
ZahlungszielDto zzDto = getMandantFac()
.zahlungszielFindByPrimaryKey(
rechnungDto.getZahlungszielIId(),
theClientDto);
if (zzDto.getAnzahlZieltageFuerNetto() == null) {
EJBExceptionLP ex = new EJBExceptionLP(
EJBExceptionLP.FEHLER_RECHNUNG_ZAHLUNGSZIEL_KEINE_TAGE,
"");
ArrayList<Object> al = new ArrayList<Object>();
al.add(zzDto.getCBez());
al.add(rechnungDto.getCNr());
ex.setAlInfoForTheClient(al);
throw ex;
}
dZieldatum = Helper.addiereTageZuDatum(dZieldatum,
zzDto.getAnzahlZieltageFuerNetto()
.intValue());
}
smDto.setDFaelligkeitsdatum(dZieldatum);
smDto.setIMahnstufe(mahnungen[i].getMahnstufeIId());
smDto.setSRechnungsnummer(rechnungDto
.getRechnungartCNr().substring(0, 1)
+ rechnungDto.getCNr());
c.add(smDto);
AnsprechpartnerDto oAnsprechpartner = null;
if (rechnungDto.getAnsprechpartnerIId() != null) {
oAnsprechpartner = getAnsprechpartnerFac()
.ansprechpartnerFindByPrimaryKey(
rechnungDto.getAnsprechpartnerIId(),
theClientDto);
partnerIIdAnsprechpartnerErsteRechnung = oAnsprechpartner
.getPartnerIIdAnsprechpartner();
}
}
}
}
data = new Object[c.size()][7];
int i = 0;
BigDecimal bdOffenGesamt = BigDecimal.ZERO;
for (Iterator<SammelmahnungDto> iter = c.iterator(); iter.hasNext();) {
SammelmahnungDto item = iter.next();
data[i][REPORT_SAMMELMAHNUNG_OFFEN] = item.getBdOffen();
if (item.getBdWert() != null) {
bdOffenGesamt = bdOffenGesamt.add(item.getBdOffen());
}
data[i][REPORT_SAMMELMAHNUNG_WERT] = item.getBdWert();
data[i][REPORT_SAMMELMAHNUNG_ZINSEN] = item.getBdZinsen();
data[i][REPORT_SAMMELMAHNUNG_BELEGDATUM] = item
.getDBelegdatum();
data[i][REPORT_SAMMELMAHNUNG_FAELLIGKEITSDATUM] = item
.getDFaelligkeitsdatum();
data[i][REPORT_SAMMELMAHNUNG_MAHNSTUFE] = item.getIMahnstufe();
data[i][REPORT_SAMMELMAHNUNG_RECHNUNGSNUMMER] = item
.getSRechnungsnummer();
if (sRechnungen.length() > 0) {
sRechnungen = sRechnungen + ", "
+ item.getSRechnungsnummer();
} else {
sRechnungen = item.getSRechnungsnummer();
}
i++;
}
// PJ18939
if (bdOffenGesamt.doubleValue() < dMindestmahnbetrag) {
return null;
}
Map<String, Object> mapParameter = new TreeMap<String, Object>();
KundeDto kundeDto = getKundeFac().kundeFindByPrimaryKey(kundeIId,
theClientDto);
Locale locDruck = Helper.string2Locale(kundeDto.getPartnerDto()
.getLocaleCNrKommunikation());
MandantDto mandantDto = getMandantFac().mandantFindByPrimaryKey(
theClientDto.getMandant(), theClientDto);
mapParameter.put(LPReport.P_MANDANTADRESSE,
Helper.formatMandantAdresse(mandantDto));
mapParameter.put(
"P_KUNDE_ADRESSBLOCK",
formatAdresseFuerAusdruck(kundeDto.getPartnerDto(), null,
mandantDto, locDruck));
mapParameter.put("P_KUNDE_UID", kundeDto.getPartnerDto().getCUid());
mapParameter.put("P_KUNDE_HINWEISEXTERN",
kundeDto.getSHinweisextern());
PersonalDto oPersonalBenutzer = getPersonalFac()
.personalFindByPrimaryKey(theClientDto.getIDPersonal(),
theClientDto);
mapParameter.put("P_UNSER_ZEICHEN", Helper.getKurzzeichenkombi(
oPersonalBenutzer.getCKurzzeichen(),
oPersonalBenutzer.getCKurzzeichen()));
mapParameter.put("P_DATUM", getDate());
String sEmail = getPartnerFac()
.partnerkommFindRespectPartnerAsStringOhneExec(
partnerIIdAnsprechpartnerErsteRechnung,
kundeDto.getPartnerDto(),
PartnerFac.KOMMUNIKATIONSART_EMAIL,
theClientDto.getMandant(), theClientDto);
String sFax = getPartnerFac()
.partnerkommFindRespectPartnerAsStringOhneExec(
partnerIIdAnsprechpartnerErsteRechnung,
kundeDto.getPartnerDto(),
PartnerFac.KOMMUNIKATIONSART_FAX,
theClientDto.getMandant(), theClientDto);
String sTelefon = getPartnerFac()
.partnerkommFindRespectPartnerAsStringOhneExec(
partnerIIdAnsprechpartnerErsteRechnung,
kundeDto.getPartnerDto(),
PartnerFac.KOMMUNIKATIONSART_TELEFON,
theClientDto.getMandant(), theClientDto);
// belegkommunikation: 3 daten als parameter an den Report
// weitergeben
mapParameter.put(LPReport.P_ANSPRECHPARTNEREMAIL,
sEmail != null ? sEmail : "");
mapParameter.put(LPReport.P_ANSPRECHPARTNERFAX, sFax != null ? sFax
: "");
mapParameter.put(LPReport.P_ANSPRECHPARTNERTELEFON,
sTelefon != null ? sTelefon : "");
MahntextDto mahntextDto = getFinanzServiceFac()
.mahntextFindByMandantLocaleCNr(mandantDto.getCNr(),
Helper.locale2String(locDruck), iMaxMahnstufe);
if (mahntextDto != null) {
mapParameter.put("P_MAHNTEXT",
Helper.formatStyledTextForJasper(mahntextDto
.getCTextinhalt()));
} else {
EJBExceptionLP e = new EJBExceptionLP(
EJBExceptionLP.FEHLER_FINANZ_KEINE_MAHNTEXTE_EINGETRAGEN,
"");
ArrayList<Object> a = new ArrayList<Object>();
a.add(mandantDto.getCNr() + "|"
+ theClientDto.getLocUiAsString() + "|" + iMaxMahnstufe);
e.setAlInfoForTheClient(a);
throw e;
}
MahnlaufDto mahnlaufDto = getMahnwesenFac()
.mahnlaufFindByPrimaryKey(mahnlaufIId);
MahnstufeDto mahnstufeDto = getMahnwesenFac()
.mahnstufeFindByPrimaryKey(
new MahnstufePK(iMaxMahnstufe, theClientDto
.getMandant()));
BigDecimal mahnspesen = getMahnspesen(mahnstufeDto,
new java.sql.Date(mahnlaufDto.getTAnlegen().getTime()),
theClientDto, mandantDto.getWaehrungCNr());
if (mahnspesen != null) {
mapParameter.put("P_MAHNSPESEN", mahnspesen);
} else {
mapParameter.put("P_MAHNSPESEN", new BigDecimal(0));
}
mapParameter.put("P_BERUECKSICHTIGTBIS",
new java.sql.Date(System.currentTimeMillis()));
mapParameter.put(LPReport.P_WAEHRUNG, mandantDto.getWaehrungCNr());
mapParameter.put("P_ABSENDER", mandantDto.getPartnerDto()
.formatAnrede());
mapParameter.put("P_BENUTZERNAME", oPersonalBenutzer
.getPartnerDto().formatAnrede());
initJRDS(mapParameter, FinanzReportFac.REPORT_MODUL,
FinanzReportFac.REPORT_SAMMELMAHNUNG,
theClientDto.getMandant(), locDruck, theClientDto,
bMitLogo, kundeDto.getKostenstelleIId());
JasperPrintLP print = getReportPrint();
print.putAdditionalInformation(JasperPrintLP.KEY_MAHNSTUFE,
iMaxMahnstufe);
print.putAdditionalInformation(JasperPrintLP.KEY_RECHNUNG_C_NR,
sRechnungen);
return print;
} catch (RemoteException ex) {
throwEJBExceptionLPRespectOld(ex);
return null;
}
} | JasperPrintLP function(Integer mahnlaufIId, Integer kundeIId, Boolean bMitLogo, TheClientDto theClientDto) throws EJBExceptionLP { try { this.useCase = UC_SAMMELMAHNUNG; index = -1; MahnungDto[] mahnungen = getMahnwesenFac() .mahnungFindByMahnlaufIId(mahnlaufIId); String sRechnungen = STRSTR, STRP_KUNDE_ADRESSBLOCKSTRP_KUNDE_UIDSTRP_KUNDE_HINWEISEXTERNSTRP_UNSER_ZEICHENSTRP_DATUMSTRSTRSTRSTRP_MAHNTEXTSTRSTR STR STRP_MAHNSPESENSTRP_MAHNSPESENSTRP_BERUECKSICHTIGTBISSTRP_ABSENDERSTRP_BENUTZERNAME", oPersonalBenutzer .getPartnerDto().formatAnrede()); initJRDS(mapParameter, FinanzReportFac.REPORT_MODUL, FinanzReportFac.REPORT_SAMMELMAHNUNG, theClientDto.getMandant(), locDruck, theClientDto, bMitLogo, kundeDto.getKostenstelleIId()); JasperPrintLP print = getReportPrint(); print.putAdditionalInformation(JasperPrintLP.KEY_MAHNSTUFE, iMaxMahnstufe); print.putAdditionalInformation(JasperPrintLP.KEY_RECHNUNG_C_NR, sRechnungen); return print; } catch (RemoteException ex) { throwEJBExceptionLPRespectOld(ex); return null; } } | /**
* Alle Mahnungen eines Mahnlaufes in einen Report zusammenfassen.
*
* @param mahnlaufIId
* Integer
* @param kundeIId
* Integer
* @param theClientDto
* String
* @return JasperPrint
* @throws EJBExceptionLP
*/ | Alle Mahnungen eines Mahnlaufes in einen Report zusammenfassen | printSammelmahnung | {
"repo_name": "erdincay/ejb",
"path": "src/com/lp/server/finanz/ejbfac/FinanzReportFacBean.java",
"license": "agpl-3.0",
"size": 260905
} | [
"com.lp.server.finanz.service.FinanzReportFac",
"com.lp.server.finanz.service.MahnungDto",
"com.lp.server.system.service.TheClientDto",
"com.lp.server.util.report.JasperPrintLP",
"com.lp.util.EJBExceptionLP",
"java.rmi.RemoteException"
] | import com.lp.server.finanz.service.FinanzReportFac; import com.lp.server.finanz.service.MahnungDto; import com.lp.server.system.service.TheClientDto; import com.lp.server.util.report.JasperPrintLP; import com.lp.util.EJBExceptionLP; import java.rmi.RemoteException; | import com.lp.server.finanz.service.*; import com.lp.server.system.service.*; import com.lp.server.util.report.*; import com.lp.util.*; import java.rmi.*; | [
"com.lp.server",
"com.lp.util",
"java.rmi"
] | com.lp.server; com.lp.util; java.rmi; | 805,670 |
if (getAIProfiles().containsKey("attack weakest")) {
Map<String, String> profiles = new HashMap<String, String>(getAIProfiles());
profiles.remove("attack weakest");
setAIProfiles(profiles);
} else if (getAIProfiles().containsKey("strategy")) {
// Replace the attack weakest subprofile with the default profile
// (== HandToHand)
Map<String, String> profiles = new HashMap<String, String>(getAIProfiles());
String desc = profiles.get("strategy");
desc = desc.replace("attack weakest", "");
profiles.put("strategy", desc);
setAIProfiles(profiles);
}
} | if (getAIProfiles().containsKey(STR)) { Map<String, String> profiles = new HashMap<String, String>(getAIProfiles()); profiles.remove(STR); setAIProfiles(profiles); } else if (getAIProfiles().containsKey(STR)) { Map<String, String> profiles = new HashMap<String, String>(getAIProfiles()); String desc = profiles.get(STR); desc = desc.replace(STR, ""); profiles.put(STR, desc); setAIProfiles(profiles); } } | /**
* Pity newbies taking part in raids.
*/ | Pity newbies taking part in raids | removeAttackWeakestProfile | {
"repo_name": "acsid/stendhal",
"path": "src/games/stendhal/server/entity/creature/RaidCreature.java",
"license": "gpl-2.0",
"size": 2360
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,894,604 |
public UnicodeSet freeze() {
if (!isFrozen()) {
// Do most of what compact() does before freezing because
// compact() will not work when the set is frozen.
// Small modification: Don't shrink if the savings would be tiny (<=GROW_EXTRA).
// Delete buffer first to defragment memory less.
buffer = null;
if (list.length > (len + GROW_EXTRA)) {
// Make the capacity equal to len or 1.
// We don't want to realloc of 0 size.
int capacity = (len == 0) ? 1 : len;
int[] oldList = list;
list = new int[capacity];
for (int i = capacity; i-- > 0;) {
list[i] = oldList[i];
}
}
// Optimize contains() and span() and similar functions.
if (!strings.isEmpty()) {
stringSpan = new UnicodeSetStringSpan(this, new ArrayList<String>(strings), UnicodeSetStringSpan.ALL);
}
if (stringSpan == null || !stringSpan.needsStringSpanUTF16()) {
// Optimize for code point spans.
// There are no strings, or
// all strings are irrelevant for span() etc. because
// all of each string's code points are contained in this set.
// However, fully contained strings are relevant for spanAndCount(),
// so we create both objects.
bmpSet = new BMPSet(list, len);
}
}
return this;
} | UnicodeSet function() { if (!isFrozen()) { buffer = null; if (list.length > (len + GROW_EXTRA)) { int capacity = (len == 0) ? 1 : len; int[] oldList = list; list = new int[capacity]; for (int i = capacity; i-- > 0;) { list[i] = oldList[i]; } } if (!strings.isEmpty()) { stringSpan = new UnicodeSetStringSpan(this, new ArrayList<String>(strings), UnicodeSetStringSpan.ALL); } if (stringSpan == null !stringSpan.needsStringSpanUTF16()) { bmpSet = new BMPSet(list, len); } } return this; } | /**
* Freeze this class, according to the Freezable interface.
*
* @return this
* @stable ICU 4.4
*/ | Freeze this class, according to the Freezable interface | freeze | {
"repo_name": "md-5/jdk10",
"path": "src/java.base/share/classes/sun/text/normalizer/UnicodeSet.java",
"license": "gpl-2.0",
"size": 56102
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 667,745 |
@Override
public int hashCode() {
return name.hashCode();
}
ZipEntry(byte[] hdrBuf, InputStream in) throws IOException {
Streams.readFully(in, hdrBuf, 0, hdrBuf.length);
BufferIterator it = HeapBufferIterator.iterator(hdrBuf, 0, hdrBuf.length, ByteOrder.LITTLE_ENDIAN);
int sig = it.readInt();
if (sig != CENSIG) {
throw new ZipException("Central Directory Entry not found");
}
it.seek(10);
compressionMethod = it.readShort();
time = it.readShort();
modDate = it.readShort();
// These are 32-bit values in the file, but 64-bit fields in this object.
crc = ((long) it.readInt()) & 0xffffffffL;
compressedSize = ((long) it.readInt()) & 0xffffffffL;
size = ((long) it.readInt()) & 0xffffffffL;
nameLength = it.readShort();
int extraLength = it.readShort();
int commentByteCount = it.readShort();
// This is a 32-bit value in the file, but a 64-bit field in this object.
it.seek(42);
localHeaderRelOffset = ((long) it.readInt()) & 0xffffffffL;
byte[] nameBytes = new byte[nameLength];
Streams.readFully(in, nameBytes, 0, nameBytes.length);
name = new String(nameBytes, 0, nameBytes.length, Charsets.UTF_8);
// The RI has always assumed UTF-8. (If GPBF_UTF8_FLAG isn't set, the encoding is
// actually IBM-437.)
if (commentByteCount > 0) {
byte[] commentBytes = new byte[commentByteCount];
Streams.readFully(in, commentBytes, 0, commentByteCount);
comment = new String(commentBytes, 0, commentBytes.length, Charsets.UTF_8);
}
if (extraLength > 0) {
extra = new byte[extraLength];
Streams.readFully(in, extra, 0, extraLength);
}
} | int function() { return name.hashCode(); } ZipEntry(byte[] hdrBuf, InputStream in) throws IOException { Streams.readFully(in, hdrBuf, 0, hdrBuf.length); BufferIterator it = HeapBufferIterator.iterator(hdrBuf, 0, hdrBuf.length, ByteOrder.LITTLE_ENDIAN); int sig = it.readInt(); if (sig != CENSIG) { throw new ZipException(STR); } it.seek(10); compressionMethod = it.readShort(); time = it.readShort(); modDate = it.readShort(); crc = ((long) it.readInt()) & 0xffffffffL; compressedSize = ((long) it.readInt()) & 0xffffffffL; size = ((long) it.readInt()) & 0xffffffffL; nameLength = it.readShort(); int extraLength = it.readShort(); int commentByteCount = it.readShort(); it.seek(42); localHeaderRelOffset = ((long) it.readInt()) & 0xffffffffL; byte[] nameBytes = new byte[nameLength]; Streams.readFully(in, nameBytes, 0, nameBytes.length); name = new String(nameBytes, 0, nameBytes.length, Charsets.UTF_8); if (commentByteCount > 0) { byte[] commentBytes = new byte[commentByteCount]; Streams.readFully(in, commentBytes, 0, commentByteCount); comment = new String(commentBytes, 0, commentBytes.length, Charsets.UTF_8); } if (extraLength > 0) { extra = new byte[extraLength]; Streams.readFully(in, extra, 0, extraLength); } } | /**
* Returns the hash code for this {@code ZipEntry}.
*
* @return the hash code of the entry.
*/ | Returns the hash code for this ZipEntry | hashCode | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "libcore/luni/src/main/java/java/util/zip/ZipEntry.java",
"license": "gpl-2.0",
"size": 12630
} | [
"java.io.IOException",
"java.io.InputStream",
"java.nio.ByteOrder",
"java.nio.charset.Charsets"
] | import java.io.IOException; import java.io.InputStream; import java.nio.ByteOrder; import java.nio.charset.Charsets; | import java.io.*; import java.nio.*; import java.nio.charset.*; | [
"java.io",
"java.nio"
] | java.io; java.nio; | 2,504,889 |
public static ParameterMemento fromRegistration(ParameterRegistrationImplementor registration) {
return new ParameterMemento(
registration.getPosition(),
registration.getName(),
registration.getMode(),
registration.getType(),
registration.getHibernateType()
);
}
} | static ParameterMemento function(ParameterRegistrationImplementor registration) { return new ParameterMemento( registration.getPosition(), registration.getName(), registration.getMode(), registration.getType(), registration.getHibernateType() ); } } | /**
* Build a ParameterMemento from the given parameter registration
*
* @param registration The parameter registration from a ProcedureCall
*
* @return The memento
*/ | Build a ParameterMemento from the given parameter registration | fromRegistration | {
"repo_name": "kevin-chen-hw/LDAE",
"path": "com.huawei.soa.ldae/src/main/java/org/hibernate/procedure/internal/ProcedureCallMementoImpl.java",
"license": "lgpl-2.1",
"size": 5329
} | [
"org.hibernate.procedure.spi.ParameterRegistrationImplementor"
] | import org.hibernate.procedure.spi.ParameterRegistrationImplementor; | import org.hibernate.procedure.spi.*; | [
"org.hibernate.procedure"
] | org.hibernate.procedure; | 2,552,549 |
public UpdateResponse deleteById(String id) throws SolrServerException, IOException {
return deleteById(id, -1);
} | UpdateResponse function(String id) throws SolrServerException, IOException { return deleteById(id, -1); } | /**
* Deletes a single document by unique ID
* @param id the ID of the document to delete
* @throws SolrServerException
* @throws IOException
*/ | Deletes a single document by unique ID | deleteById | {
"repo_name": "Lythimus/lptv",
"path": "apache-solr-3.6.0/solr/solrj/src/java/org/apache/solr/client/solrj/SolrServer.java",
"license": "gpl-2.0",
"size": 12363
} | [
"java.io.IOException",
"org.apache.solr.client.solrj.response.UpdateResponse"
] | import java.io.IOException; import org.apache.solr.client.solrj.response.UpdateResponse; | import java.io.*; import org.apache.solr.client.solrj.response.*; | [
"java.io",
"org.apache.solr"
] | java.io; org.apache.solr; | 698,034 |
EAttribute getAcceptanceTest_Type(); | EAttribute getAcceptanceTest_Type(); | /**
* Returns the meta object for the attribute '{@link CIM.IEC61968.Assets.AcceptanceTest#getType <em>Type</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Type</em>'.
* @see CIM.IEC61968.Assets.AcceptanceTest#getType()
* @see #getAcceptanceTest()
* @generated
*/ | Returns the meta object for the attribute '<code>CIM.IEC61968.Assets.AcceptanceTest#getType Type</code>'. | getAcceptanceTest_Type | {
"repo_name": "georghinkel/ttc2017smartGrids",
"path": "solutions/ModelJoin/src/main/java/CIM/IEC61968/Assets/AssetsPackage.java",
"license": "mit",
"size": 88490
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,317,917 |
private JPanel getJPanelTranslation() {
if (jPanelTranslation == null) {
GridBagConstraints gridBagConstraints18 = new GridBagConstraints();
gridBagConstraints18.gridx = 6;
gridBagConstraints18.anchor = GridBagConstraints.WEST;
gridBagConstraints18.insets = new Insets(10, 20, 5, 10);
gridBagConstraints18.fill = GridBagConstraints.HORIZONTAL;
gridBagConstraints18.gridy = 0;
GridBagConstraints gridBagConstraints16 = new GridBagConstraints();
gridBagConstraints16.gridx = 4;
gridBagConstraints16.insets = new Insets(20, 5, 5, 5);
gridBagConstraints16.gridy = 2;
GridBagConstraints gridBagConstraints9 = new GridBagConstraints();
gridBagConstraints9.gridx = 5;
gridBagConstraints9.anchor = GridBagConstraints.WEST;
gridBagConstraints9.insets = new Insets(10, 30, 5, 5);
gridBagConstraints9.gridy = 0;
GridBagConstraints gridBagConstraints14 = new GridBagConstraints();
gridBagConstraints14.gridx = 3;
gridBagConstraints14.insets = new Insets(20, 20, 5, 5);
gridBagConstraints14.gridy = 2;
GridBagConstraints gridBagConstraints13 = new GridBagConstraints();
gridBagConstraints13.gridx = 4;
gridBagConstraints13.anchor = GridBagConstraints.WEST;
gridBagConstraints13.insets = new Insets(10, 5, 5, 5);
gridBagConstraints13.gridy = 0;
GridBagConstraints gridBagConstraints12 = new GridBagConstraints();
gridBagConstraints12.gridx = 3;
gridBagConstraints12.insets = new Insets(10, 20, 5, 5);
gridBagConstraints12.gridy = 0;
GridBagConstraints gridBagConstraints2 = new GridBagConstraints();
gridBagConstraints2.gridx = 0;
gridBagConstraints2.gridy = 0;
gridBagConstraints2.anchor = GridBagConstraints.WEST;
gridBagConstraints2.insets = new Insets(10, 14, 5, 0);
GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
gridBagConstraints1.fill = GridBagConstraints.BOTH;
gridBagConstraints1.gridx = 0;
gridBagConstraints1.gridy = 1;
gridBagConstraints1.weightx = 1.0;
gridBagConstraints1.insets = new Insets(0, 10, 0, 10);
gridBagConstraints1.weighty = 0.33;
gridBagConstraints1.gridwidth = 7;
GridBagConstraints gridBagConstraints3 = new GridBagConstraints();
gridBagConstraints3.gridx = 0;
gridBagConstraints3.gridy = 2;
gridBagConstraints3.anchor = GridBagConstraints.WEST;
gridBagConstraints3.insets = new Insets(20, 14, 5, 0);
GridBagConstraints gridBagConstraints4 = new GridBagConstraints();
gridBagConstraints4.fill = GridBagConstraints.BOTH;
gridBagConstraints4.gridx = 0;
gridBagConstraints4.gridy = 3;
gridBagConstraints4.weightx = 1.0;
gridBagConstraints4.insets = new Insets(0, 10, 0, 10);
gridBagConstraints4.weighty = 0.33;
gridBagConstraints4.gridwidth = 7;
GridBagConstraints gridBagConstraints7 = new GridBagConstraints();
gridBagConstraints7.gridx = 1;
gridBagConstraints7.insets = new Insets(10, 20, 5, 0);
gridBagConstraints7.gridy = 0;
GridBagConstraints gridBagConstraints5 = new GridBagConstraints();
gridBagConstraints5.fill = GridBagConstraints.NONE;
gridBagConstraints5.gridx = 2;
gridBagConstraints5.gridy = 0;
gridBagConstraints5.weightx = 0.0;
gridBagConstraints5.anchor = GridBagConstraints.WEST;
gridBagConstraints5.insets = new Insets(10, 5, 5, 0);
GridBagConstraints gridBagConstraints8 = new GridBagConstraints();
gridBagConstraints8.gridx = 1;
gridBagConstraints8.gridy = 2;
gridBagConstraints8.insets = new Insets(20, 20, 5, 0);
GridBagConstraints gridBagConstraints6 = new GridBagConstraints();
gridBagConstraints6.fill = GridBagConstraints.NONE;
gridBagConstraints6.gridx = 2;
gridBagConstraints6.gridy = 2;
gridBagConstraints6.weightx = 0.0;
gridBagConstraints6.anchor = GridBagConstraints.WEST;
gridBagConstraints6.weighty = 0.0;
gridBagConstraints6.insets = new Insets(20, 5, 5, 0);
jLabelSelectSourceLang = new JLabel();
jLabelSelectSourceLang.setText("Sprache:");
jLabelSelectDestinationLang = new JLabel();
jLabelSelectDestinationLang.setText("Sprache:");
jLabelSource = new JLabel();
jLabelSource.setText("Text zur Übersetzung");
jLabelSource.setFont(new Font("Dialog", Font.BOLD, 12));
jLabelDestination = new JLabel();
jLabelDestination.setText("Übersetzter Text ");
jLabelDestination.setFont(new Font("Dialog", Font.BOLD, 12));
jLabelSourceLanguage = new JLabel();
jLabelSourceLanguage.setText("");
jLabelSourceLanguage.setFont(new Font("Dialog", Font.BOLD, 12));
jLabelSourceLanguage.setForeground(new Color(204, 0, 0));
jLabelSourceLanguage.setHorizontalAlignment(SwingConstants.LEADING);
jLabelSourceLanguage.setPreferredSize(new Dimension(38, 26));
jPanelTranslation = new JPanel();
jPanelTranslation.setLayout(new GridBagLayout());
jPanelTranslation.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));
jPanelTranslation.add(getJScrollPaneTextSource(), gridBagConstraints1);
jPanelTranslation.add(jLabelSource, gridBagConstraints2);
jPanelTranslation.add(jLabelDestination, gridBagConstraints3);
jPanelTranslation.add(getJScrollPaneTextDestination(), gridBagConstraints4);
jPanelTranslation.add(getJComboBoxSourceLang(), gridBagConstraints5);
jPanelTranslation.add(getJComboBoxDestinationLang(), gridBagConstraints6);
jPanelTranslation.add(jLabelSelectSourceLang, gridBagConstraints7);
jPanelTranslation.add(jLabelSelectDestinationLang, gridBagConstraints8);
jPanelTranslation.add(getJButtonPreviousDS(), gridBagConstraints12);
jPanelTranslation.add(getJButtonNextDS(), gridBagConstraints13);
jPanelTranslation.add(getJButtonSave(), gridBagConstraints14);
jPanelTranslation.add(getJButtonDelete(), gridBagConstraints9);
jPanelTranslation.add(getJButtonFindGap(), gridBagConstraints16);
jPanelTranslation.add(jLabelSourceLanguage, gridBagConstraints18);
}
return jPanelTranslation;
} | JPanel function() { if (jPanelTranslation == null) { GridBagConstraints gridBagConstraints18 = new GridBagConstraints(); gridBagConstraints18.gridx = 6; gridBagConstraints18.anchor = GridBagConstraints.WEST; gridBagConstraints18.insets = new Insets(10, 20, 5, 10); gridBagConstraints18.fill = GridBagConstraints.HORIZONTAL; gridBagConstraints18.gridy = 0; GridBagConstraints gridBagConstraints16 = new GridBagConstraints(); gridBagConstraints16.gridx = 4; gridBagConstraints16.insets = new Insets(20, 5, 5, 5); gridBagConstraints16.gridy = 2; GridBagConstraints gridBagConstraints9 = new GridBagConstraints(); gridBagConstraints9.gridx = 5; gridBagConstraints9.anchor = GridBagConstraints.WEST; gridBagConstraints9.insets = new Insets(10, 30, 5, 5); gridBagConstraints9.gridy = 0; GridBagConstraints gridBagConstraints14 = new GridBagConstraints(); gridBagConstraints14.gridx = 3; gridBagConstraints14.insets = new Insets(20, 20, 5, 5); gridBagConstraints14.gridy = 2; GridBagConstraints gridBagConstraints13 = new GridBagConstraints(); gridBagConstraints13.gridx = 4; gridBagConstraints13.anchor = GridBagConstraints.WEST; gridBagConstraints13.insets = new Insets(10, 5, 5, 5); gridBagConstraints13.gridy = 0; GridBagConstraints gridBagConstraints12 = new GridBagConstraints(); gridBagConstraints12.gridx = 3; gridBagConstraints12.insets = new Insets(10, 20, 5, 5); gridBagConstraints12.gridy = 0; GridBagConstraints gridBagConstraints2 = new GridBagConstraints(); gridBagConstraints2.gridx = 0; gridBagConstraints2.gridy = 0; gridBagConstraints2.anchor = GridBagConstraints.WEST; gridBagConstraints2.insets = new Insets(10, 14, 5, 0); GridBagConstraints gridBagConstraints1 = new GridBagConstraints(); gridBagConstraints1.fill = GridBagConstraints.BOTH; gridBagConstraints1.gridx = 0; gridBagConstraints1.gridy = 1; gridBagConstraints1.weightx = 1.0; gridBagConstraints1.insets = new Insets(0, 10, 0, 10); gridBagConstraints1.weighty = 0.33; gridBagConstraints1.gridwidth = 7; GridBagConstraints gridBagConstraints3 = new GridBagConstraints(); gridBagConstraints3.gridx = 0; gridBagConstraints3.gridy = 2; gridBagConstraints3.anchor = GridBagConstraints.WEST; gridBagConstraints3.insets = new Insets(20, 14, 5, 0); GridBagConstraints gridBagConstraints4 = new GridBagConstraints(); gridBagConstraints4.fill = GridBagConstraints.BOTH; gridBagConstraints4.gridx = 0; gridBagConstraints4.gridy = 3; gridBagConstraints4.weightx = 1.0; gridBagConstraints4.insets = new Insets(0, 10, 0, 10); gridBagConstraints4.weighty = 0.33; gridBagConstraints4.gridwidth = 7; GridBagConstraints gridBagConstraints7 = new GridBagConstraints(); gridBagConstraints7.gridx = 1; gridBagConstraints7.insets = new Insets(10, 20, 5, 0); gridBagConstraints7.gridy = 0; GridBagConstraints gridBagConstraints5 = new GridBagConstraints(); gridBagConstraints5.fill = GridBagConstraints.NONE; gridBagConstraints5.gridx = 2; gridBagConstraints5.gridy = 0; gridBagConstraints5.weightx = 0.0; gridBagConstraints5.anchor = GridBagConstraints.WEST; gridBagConstraints5.insets = new Insets(10, 5, 5, 0); GridBagConstraints gridBagConstraints8 = new GridBagConstraints(); gridBagConstraints8.gridx = 1; gridBagConstraints8.gridy = 2; gridBagConstraints8.insets = new Insets(20, 20, 5, 0); GridBagConstraints gridBagConstraints6 = new GridBagConstraints(); gridBagConstraints6.fill = GridBagConstraints.NONE; gridBagConstraints6.gridx = 2; gridBagConstraints6.gridy = 2; gridBagConstraints6.weightx = 0.0; gridBagConstraints6.anchor = GridBagConstraints.WEST; gridBagConstraints6.weighty = 0.0; gridBagConstraints6.insets = new Insets(20, 5, 5, 0); jLabelSelectSourceLang = new JLabel(); jLabelSelectSourceLang.setText(STR); jLabelSelectDestinationLang = new JLabel(); jLabelSelectDestinationLang.setText(STR); jLabelSource = new JLabel(); jLabelSource.setText(STR); jLabelSource.setFont(new Font(STR, Font.BOLD, 12)); jLabelDestination = new JLabel(); jLabelDestination.setText(STR); jLabelDestination.setFont(new Font(STR, Font.BOLD, 12)); jLabelSourceLanguage = new JLabel(); jLabelSourceLanguage.setText(""); jLabelSourceLanguage.setFont(new Font(STR, Font.BOLD, 12)); jLabelSourceLanguage.setForeground(new Color(204, 0, 0)); jLabelSourceLanguage.setHorizontalAlignment(SwingConstants.LEADING); jLabelSourceLanguage.setPreferredSize(new Dimension(38, 26)); jPanelTranslation = new JPanel(); jPanelTranslation.setLayout(new GridBagLayout()); jPanelTranslation.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED)); jPanelTranslation.add(getJScrollPaneTextSource(), gridBagConstraints1); jPanelTranslation.add(jLabelSource, gridBagConstraints2); jPanelTranslation.add(jLabelDestination, gridBagConstraints3); jPanelTranslation.add(getJScrollPaneTextDestination(), gridBagConstraints4); jPanelTranslation.add(getJComboBoxSourceLang(), gridBagConstraints5); jPanelTranslation.add(getJComboBoxDestinationLang(), gridBagConstraints6); jPanelTranslation.add(jLabelSelectSourceLang, gridBagConstraints7); jPanelTranslation.add(jLabelSelectDestinationLang, gridBagConstraints8); jPanelTranslation.add(getJButtonPreviousDS(), gridBagConstraints12); jPanelTranslation.add(getJButtonNextDS(), gridBagConstraints13); jPanelTranslation.add(getJButtonSave(), gridBagConstraints14); jPanelTranslation.add(getJButtonDelete(), gridBagConstraints9); jPanelTranslation.add(getJButtonFindGap(), gridBagConstraints16); jPanelTranslation.add(jLabelSourceLanguage, gridBagConstraints18); } return jPanelTranslation; } | /**
* This method initializes jPanelTranslation.
* @return javax.swing.JPanel
*/ | This method initializes jPanelTranslation | getJPanelTranslation | {
"repo_name": "EnFlexIT/AgentWorkbench",
"path": "eclipseProjects/org.agentgui/bundles/org.agentgui.core/src/agentgui/core/gui/Translation.java",
"license": "lgpl-2.1",
"size": 43677
} | [
"java.awt.Color",
"java.awt.Dimension",
"java.awt.Font",
"java.awt.GridBagConstraints",
"java.awt.GridBagLayout",
"java.awt.Insets",
"javax.swing.BorderFactory",
"javax.swing.JLabel",
"javax.swing.JPanel",
"javax.swing.SwingConstants",
"javax.swing.border.EtchedBorder"
] | import java.awt.Color; import java.awt.Dimension; import java.awt.Font; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; import javax.swing.BorderFactory; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.SwingConstants; import javax.swing.border.EtchedBorder; | import java.awt.*; import javax.swing.*; import javax.swing.border.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 1,262,236 |
public String[] getCommandLine(boolean actualRun) throws CoreException, JDTNotAvailableException {
List<String> cmdArgs = new ArrayList<String>();
boolean profileRun = PyProfilePreferences.getAllRunsDoProfile();
boolean coverageRun = PyCoveragePreferences.getAllRunsDoCoverage();
boolean addWithDashMFlag = false;
String modName = null;
if (resource.length == 1 && RunPreferencesPage.getLaunchWithMFlag() && !isUnittest() && !coverageRun
&& !isInteractive) {
IPath p = resource[0];
String osString = p.toOSString();
PythonNature pythonNature = PythonNature.getPythonNature(project);
modName = pythonNature.resolveModule(osString);
if (modName != null) {
addWithDashMFlag = true;
}
}
if (isJython()) {
//"java.exe" -classpath "C:\bin\jython21\jython.jar" org.python.util.jython script %ARGS%
String javaLoc = JavaVmLocationFinder.findDefaultJavaExecutable().getAbsolutePath();
if (!InterpreterInfo.isJythonExecutable(interpreter.toOSString())) {
throw new RuntimeException("The jython jar must be specified as the interpreter to run. Found: "
+ interpreter);
}
cmdArgs.add(javaLoc);
//some nice things on the classpath config: http://mindprod.com/jgloss/classpath.html
cmdArgs.add("-classpath");
String cpath;
//TODO: add some option in the project so that the user can choose to use the
//classpath specified in the java project instead of the pythonpath itself
// if (project.getNature(Constants.JAVA_NATURE) != null){
// cpath = getClasspath(JavaCore.create(project));
// } else {
cpath = interpreter + SimpleRunner.getPythonPathSeparator() + pythonpathUsed;
// }
cmdArgs.add(cpath);
cmdArgs.add("-Dpython.path=" + pythonpathUsed); //will be added to the env variables in the run (check if this works on all platforms...)
addVmArgs(cmdArgs);
addProfileArgs(cmdArgs, profileRun, actualRun);
if (isDebug) {
//This was removed because it cannot be used. See:
//http://bugs.jython.org/issue1438
//cmdArgs.add("-Dpython.security.respectJavaAccessibility=false");
cmdArgs.add("org.python.util.jython");
addDebugArgs(cmdArgs, "jython", actualRun, addWithDashMFlag, modName);
} else {
cmdArgs.add("org.python.util.jython");
}
} else {
//python or iron python
cmdArgs.add(interpreter.toOSString());
// Next option is for unbuffered stdout, otherwise Eclipse will not see any output until done
cmdArgs.add("-u");
addVmArgs(cmdArgs);
addProfileArgs(cmdArgs, profileRun, actualRun);
if (isDebug && isIronpython()) {
addIronPythonDebugVmArgs(cmdArgs);
}
addDebugArgs(cmdArgs, "python", actualRun, addWithDashMFlag, modName);
}
//Check if we should do code-coverage...
if (coverageRun && isDebug) {
if (actualRun) {
RunInUiThread.async(new Runnable() { | String[] function(boolean actualRun) throws CoreException, JDTNotAvailableException { List<String> cmdArgs = new ArrayList<String>(); boolean profileRun = PyProfilePreferences.getAllRunsDoProfile(); boolean coverageRun = PyCoveragePreferences.getAllRunsDoCoverage(); boolean addWithDashMFlag = false; String modName = null; if (resource.length == 1 && RunPreferencesPage.getLaunchWithMFlag() && !isUnittest() && !coverageRun && !isInteractive) { IPath p = resource[0]; String osString = p.toOSString(); PythonNature pythonNature = PythonNature.getPythonNature(project); modName = pythonNature.resolveModule(osString); if (modName != null) { addWithDashMFlag = true; } } if (isJython()) { String javaLoc = JavaVmLocationFinder.findDefaultJavaExecutable().getAbsolutePath(); if (!InterpreterInfo.isJythonExecutable(interpreter.toOSString())) { throw new RuntimeException(STR + interpreter); } cmdArgs.add(javaLoc); cmdArgs.add(STR); String cpath; cpath = interpreter + SimpleRunner.getPythonPathSeparator() + pythonpathUsed; cmdArgs.add(cpath); cmdArgs.add(STR + pythonpathUsed); addVmArgs(cmdArgs); addProfileArgs(cmdArgs, profileRun, actualRun); if (isDebug) { cmdArgs.add(STR); addDebugArgs(cmdArgs, STR, actualRun, addWithDashMFlag, modName); } else { cmdArgs.add(STR); } } else { cmdArgs.add(interpreter.toOSString()); cmdArgs.add("-u"); addVmArgs(cmdArgs); addProfileArgs(cmdArgs, profileRun, actualRun); if (isDebug && isIronpython()) { addIronPythonDebugVmArgs(cmdArgs); } addDebugArgs(cmdArgs, STR, actualRun, addWithDashMFlag, modName); } if (coverageRun && isDebug) { if (actualRun) { RunInUiThread.async(new Runnable() { | /**
* Create a command line for launching.
*
* @param actualRun if true it'll make the variable substitution and start the listen connector in the case
* of a debug session.
*
* @return command line ready to be exec'd
* @throws CoreException
* @throws JDTNotAvailableException
*/ | Create a command line for launching | getCommandLine | {
"repo_name": "fabioz/Pydev",
"path": "plugins/org.python.pydev.debug/src/org/python/pydev/debug/ui/launching/PythonRunnerConfig.java",
"license": "epl-1.0",
"size": 47231
} | [
"java.util.ArrayList",
"java.util.List",
"org.eclipse.core.runtime.CoreException",
"org.eclipse.core.runtime.IPath",
"org.python.copiedfromeclipsesrc.JDTNotAvailableException",
"org.python.pydev.ast.interpreter_managers.InterpreterInfo",
"org.python.pydev.ast.listing_utils.JavaVmLocationFinder",
"org.python.pydev.ast.runners.SimpleRunner",
"org.python.pydev.debug.codecoverage.PyCoveragePreferences",
"org.python.pydev.debug.profile.PyProfilePreferences",
"org.python.pydev.debug.ui.RunPreferencesPage",
"org.python.pydev.plugin.nature.PythonNature",
"org.python.pydev.shared_ui.utils.RunInUiThread"
] | import java.util.ArrayList; import java.util.List; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.python.copiedfromeclipsesrc.JDTNotAvailableException; import org.python.pydev.ast.interpreter_managers.InterpreterInfo; import org.python.pydev.ast.listing_utils.JavaVmLocationFinder; import org.python.pydev.ast.runners.SimpleRunner; import org.python.pydev.debug.codecoverage.PyCoveragePreferences; import org.python.pydev.debug.profile.PyProfilePreferences; import org.python.pydev.debug.ui.RunPreferencesPage; import org.python.pydev.plugin.nature.PythonNature; import org.python.pydev.shared_ui.utils.RunInUiThread; | import java.util.*; import org.eclipse.core.runtime.*; import org.python.copiedfromeclipsesrc.*; import org.python.pydev.ast.interpreter_managers.*; import org.python.pydev.ast.listing_utils.*; import org.python.pydev.ast.runners.*; import org.python.pydev.debug.codecoverage.*; import org.python.pydev.debug.profile.*; import org.python.pydev.debug.ui.*; import org.python.pydev.plugin.nature.*; import org.python.pydev.shared_ui.utils.*; | [
"java.util",
"org.eclipse.core",
"org.python.copiedfromeclipsesrc",
"org.python.pydev"
] | java.util; org.eclipse.core; org.python.copiedfromeclipsesrc; org.python.pydev; | 1,081,721 |
EAttribute getDigitalSensorIO4_Pin(); | EAttribute getDigitalSensorIO4_Pin(); | /**
* Returns the meta object for the attribute '{@link org.openhab.binding.tinkerforge.internal.model.DigitalSensorIO4#getPin <em>Pin</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Pin</em>'.
* @see org.openhab.binding.tinkerforge.internal.model.DigitalSensorIO4#getPin()
* @see #getDigitalSensorIO4()
* @generated
*/ | Returns the meta object for the attribute '<code>org.openhab.binding.tinkerforge.internal.model.DigitalSensorIO4#getPin Pin</code>'. | getDigitalSensorIO4_Pin | {
"repo_name": "gregfinley/openhab",
"path": "bundles/binding/org.openhab.binding.tinkerforge/src/main/java/org/openhab/binding/tinkerforge/internal/model/ModelPackage.java",
"license": "epl-1.0",
"size": 665067
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 63,975 |
public boolean isDynamic() throws RemoteImagingException {
try {
return imageServer.isDynamic(id);
} catch (RemoteException re) {
String message = JaiI18N.getString("JAIRMICRIF9");
listener.errorOccurred(message,
new RemoteImagingException(message, re),
this, false);
// throw new RemoteImagingException(ImageUtil.getStackTraceString(re));
}
return true;
} | boolean function() throws RemoteImagingException { try { return imageServer.isDynamic(id); } catch (RemoteException re) { String message = JaiI18N.getString(STR); listener.errorOccurred(message, new RemoteImagingException(message, re), this, false); } return true; } | /**
* Returns true if successive renderings (that is, calls to
* createRendering() or createScaledRendering()) with the same arguments
* may produce different results. This method may be used to
* determine whether an existing rendering may be cached and
* reused. It is always safe to return true.
* @return <code>true</code> if successive renderings with the
* same arguments might produce different results;
* <code>false</code> otherwise.
*/ | Returns true if successive renderings (that is, calls to createRendering() or createScaledRendering()) with the same arguments may produce different results. This method may be used to determine whether an existing rendering may be cached and reused. It is always safe to return true | isDynamic | {
"repo_name": "MarinnaCole/LightZone",
"path": "lightcrafts/extsrc/com/lightcrafts/media/jai/rmi/RenderableRMIServerProxy.java",
"license": "bsd-3-clause",
"size": 14757
} | [
"com.lightcrafts.mediax.jai.remote.RemoteImagingException",
"java.rmi.RemoteException"
] | import com.lightcrafts.mediax.jai.remote.RemoteImagingException; import java.rmi.RemoteException; | import com.lightcrafts.mediax.jai.remote.*; import java.rmi.*; | [
"com.lightcrafts.mediax",
"java.rmi"
] | com.lightcrafts.mediax; java.rmi; | 2,072,703 |
public BigDecimal getMarketValueForCashEquivalentsForAvailableIncomeCash(String kemId); | BigDecimal function(String kemId); | /**
* The Market Value of the KEMID END_HLDG_TAX_LOT_T records with a CLS_CD_TYP of Cash Equivalents (C), and with the HLDG_IP_IND
* equal to I.
*
* @param kemId
* @return marketValue
*/ | The Market Value of the KEMID END_HLDG_TAX_LOT_T records with a CLS_CD_TYP of Cash Equivalents (C), and with the HLDG_IP_IND equal to I | getMarketValueForCashEquivalentsForAvailableIncomeCash | {
"repo_name": "Ariah-Group/Finance",
"path": "af_webapp/src/main/java/org/kuali/kfs/module/endow/document/service/HoldingTaxLotService.java",
"license": "apache-2.0",
"size": 6418
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 327,334 |
public void writeExif(Bitmap bmap, String exifOutFileName) throws FileNotFoundException,
IOException {
if (bmap == null || exifOutFileName == null) {
throw new IllegalArgumentException(NULL_ARGUMENT_STRING);
}
OutputStream s = null;
try {
s = getExifWriterStream(exifOutFileName);
bmap.compress(Bitmap.CompressFormat.JPEG, 90, s);
s.flush();
} catch (IOException e) {
closeSilently(s);
throw e;
}
s.close();
} | void function(Bitmap bmap, String exifOutFileName) throws FileNotFoundException, IOException { if (bmap == null exifOutFileName == null) { throw new IllegalArgumentException(NULL_ARGUMENT_STRING); } OutputStream s = null; try { s = getExifWriterStream(exifOutFileName); bmap.compress(Bitmap.CompressFormat.JPEG, 90, s); s.flush(); } catch (IOException e) { closeSilently(s); throw e; } s.close(); } | /**
* Writes the tags from this ExifInterface object into a jpeg compressed
* bitmap, removing prior exif tags.
*
* @param bmap a bitmap to compress and write exif into.
* @param exifOutFileName a String containing the filepath to which the jpeg
* image with added exif tags will be written.
* @throws FileNotFoundException
* @throws IOException
*/ | Writes the tags from this ExifInterface object into a jpeg compressed bitmap, removing prior exif tags | writeExif | {
"repo_name": "bmaupin/android-sms-plus",
"path": "src/com/android/mms/exif/ExifInterface.java",
"license": "apache-2.0",
"size": 92509
} | [
"android.graphics.Bitmap",
"java.io.FileNotFoundException",
"java.io.IOException",
"java.io.OutputStream"
] | import android.graphics.Bitmap; import java.io.FileNotFoundException; import java.io.IOException; import java.io.OutputStream; | import android.graphics.*; import java.io.*; | [
"android.graphics",
"java.io"
] | android.graphics; java.io; | 905,021 |
static void updateParametersDuringCheckpointRestart(hex.deepwater.DeepWaterParameters srcParms, hex.deepwater.DeepWaterParameters tgtParms, boolean doIt, boolean quiet) {
for (Field fTarget : tgtParms.getClass().getFields()) {
if (ArrayUtils.contains(cp_modifiable, fTarget.getName())) {
for (Field fSource : srcParms.getClass().getFields()) {
if (fTarget.equals(fSource)) {
try {
if (fSource.get(srcParms) == null || fTarget.get(tgtParms) == null || !fTarget.get(tgtParms).toString().equals(fSource.get(srcParms).toString())) { // if either of the two parameters is null, skip the toString()
if (fTarget.get(tgtParms) == null && fSource.get(srcParms) == null)
continue; //if both parameters are null, we don't need to do anything
if (!tgtParms._quiet_mode && !quiet)
Log.info("Applying user-requested modification of '" + fTarget.getName() + "': " + fTarget.get(tgtParms) + " -> " + fSource.get(srcParms));
if (doIt)
fTarget.set(tgtParms, fSource.get(srcParms));
}
} catch (IllegalAccessException e) {
e.printStackTrace();
}
}
}
}
}
} | static void updateParametersDuringCheckpointRestart(hex.deepwater.DeepWaterParameters srcParms, hex.deepwater.DeepWaterParameters tgtParms, boolean doIt, boolean quiet) { for (Field fTarget : tgtParms.getClass().getFields()) { if (ArrayUtils.contains(cp_modifiable, fTarget.getName())) { for (Field fSource : srcParms.getClass().getFields()) { if (fTarget.equals(fSource)) { try { if (fSource.get(srcParms) == null fTarget.get(tgtParms) == null !fTarget.get(tgtParms).toString().equals(fSource.get(srcParms).toString())) { if (fTarget.get(tgtParms) == null && fSource.get(srcParms) == null) continue; if (!tgtParms._quiet_mode && !quiet) Log.info(STR + fTarget.getName() + STR + fTarget.get(tgtParms) + STR + fSource.get(srcParms)); if (doIt) fTarget.set(tgtParms, fSource.get(srcParms)); } } catch (IllegalAccessException e) { e.printStackTrace(); } } } } } } | /**
* Update the parameters from checkpoint to user-specified
*
* @param srcParms source: user-specified parameters
* @param tgtParms target: parameters to be modified
* @param doIt whether to overwrite target parameters (or just print the message)
* @param quiet whether to suppress the notifications about parameter changes
*/ | Update the parameters from checkpoint to user-specified | updateParametersDuringCheckpointRestart | {
"repo_name": "mathemage/h2o-3",
"path": "h2o-algos/src/main/java/hex/deepwater/DeepWaterParameters.java",
"license": "apache-2.0",
"size": 30374
} | [
"java.lang.reflect.Field"
] | import java.lang.reflect.Field; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 2,105,060 |
@Auditable(parameters = {"template", "model", "out"})
public void processTemplate(String template, Object model, Writer out)
throws TemplateException;
| @Auditable(parameters = {STR, "model", "out"}) void function(String template, Object model, Writer out) throws TemplateException; | /**
* Process a template against the supplied data model and write to the out.
*
* The template engine used will be determined by the extension of the template.
*
* @param template Template (qualified classpath name or noderef)
* @param model Object model to process template against
* @param out Writer object to send output too
*/ | Process a template against the supplied data model and write to the out. The template engine used will be determined by the extension of the template | processTemplate | {
"repo_name": "Alfresco/alfresco-repository",
"path": "src/main/java/org/alfresco/service/cmr/repository/TemplateService.java",
"license": "lgpl-3.0",
"size": 8115
} | [
"java.io.Writer",
"org.alfresco.service.Auditable"
] | import java.io.Writer; import org.alfresco.service.Auditable; | import java.io.*; import org.alfresco.service.*; | [
"java.io",
"org.alfresco.service"
] | java.io; org.alfresco.service; | 1,213,266 |
private Map<String, String> uploadDriver(String driverDeploymentName, InputStream driverContent) throws Exception {
Map<String, String> responseParams = new HashMap<String, String>();
// Deploy the driver
InputStream contentStream = null;
try {
clientAccessor.getClient().deploy(driverDeploymentName, driverContent);
} finally {
IOUtils.closeQuietly(contentStream);
}
return responseParams;
} | Map<String, String> function(String driverDeploymentName, InputStream driverContent) throws Exception { Map<String, String> responseParams = new HashMap<String, String>(); InputStream contentStream = null; try { clientAccessor.getClient().deploy(driverDeploymentName, driverContent); } finally { IOUtils.closeQuietly(contentStream); } return responseParams; } | /**
* Uploads a driver to the Teiid Server
* @param driverDeploymentName
* @param driverContent
* @return responseParams
* @throws Exception
*/ | Uploads a driver to the Teiid Server | uploadDriver | {
"repo_name": "mdrillin/teiid-webui",
"path": "teiid-webui-webapp/src/main/java/org/teiid/webui/backend/server/servlets/DataVirtUploadServlet.java",
"license": "apache-2.0",
"size": 6443
} | [
"java.io.InputStream",
"java.util.HashMap",
"java.util.Map",
"org.apache.commons.io.IOUtils"
] | import java.io.InputStream; import java.util.HashMap; import java.util.Map; import org.apache.commons.io.IOUtils; | import java.io.*; import java.util.*; import org.apache.commons.io.*; | [
"java.io",
"java.util",
"org.apache.commons"
] | java.io; java.util; org.apache.commons; | 2,106,980 |
@Override
public void sendHtmlMail(String subject, String message, Collection<String> toAddresses) {
this.sendHtmlMail(null, subject, message, toAddresses.toArray(new String[0]));
} | void function(String subject, String message, Collection<String> toAddresses) { this.sendHtmlMail(null, subject, message, toAddresses.toArray(new String[0])); } | /**
* Notify users by email of something.
*
* @param subject
* @param message
* @param toAddresses
*/ | Notify users by email of something | sendHtmlMail | {
"repo_name": "culmat/gitblit",
"path": "src/main/java/com/gitblit/manager/NotificationManager.java",
"license": "apache-2.0",
"size": 5770
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 2,717,651 |
public static void acquireGooglePlayServices(Context context) {
GoogleApiAvailability apiAvailability =
GoogleApiAvailability.getInstance();
final int connectionStatusCode =
apiAvailability.isGooglePlayServicesAvailable(context);
if (apiAvailability.isUserResolvableError(connectionStatusCode)) {
Log.e("Error","Connection Status Code"+connectionStatusCode);
}
} | static void function(Context context) { GoogleApiAvailability apiAvailability = GoogleApiAvailability.getInstance(); final int connectionStatusCode = apiAvailability.isGooglePlayServicesAvailable(context); if (apiAvailability.isUserResolvableError(connectionStatusCode)) { Log.e("Error",STR+connectionStatusCode); } } | /**
* Attempt to resolve a missing, out-of-date, invalid or disabled Google
* Play Services installation via a user dialog, if possible.
*/ | Attempt to resolve a missing, out-of-date, invalid or disabled Google Play Services installation via a user dialog, if possible | acquireGooglePlayServices | {
"repo_name": "ylimit/PrivacyStreams",
"path": "privacystreams-android-sdk/src/main/java/io/github/privacystreams/utils/DeviceUtils.java",
"license": "apache-2.0",
"size": 4858
} | [
"android.content.Context",
"android.util.Log",
"com.google.android.gms.common.GoogleApiAvailability"
] | import android.content.Context; import android.util.Log; import com.google.android.gms.common.GoogleApiAvailability; | import android.content.*; import android.util.*; import com.google.android.gms.common.*; | [
"android.content",
"android.util",
"com.google.android"
] | android.content; android.util; com.google.android; | 707,998 |
private IndexMetadata stripAliases(IndexMetadata indexMetadata) {
if (indexMetadata.getAliases().isEmpty()) {
return indexMetadata;
} else {
logger.info(
"[{}] stripping aliases: {} from index before importing",
indexMetadata.getIndex(),
indexMetadata.getAliases().keys()
);
return IndexMetadata.builder(indexMetadata).removeAllAliases().build();
}
} | IndexMetadata function(IndexMetadata indexMetadata) { if (indexMetadata.getAliases().isEmpty()) { return indexMetadata; } else { logger.info( STR, indexMetadata.getIndex(), indexMetadata.getAliases().keys() ); return IndexMetadata.builder(indexMetadata).removeAllAliases().build(); } } | /**
* Removes all aliases from the supplied index metadata.
*
* Importing dangling indices with aliases is dangerous, it could for instance result in inability to write to an existing alias if it
* previously had only one index with any is_write_index indication.
*/ | Removes all aliases from the supplied index metadata. Importing dangling indices with aliases is dangerous, it could for instance result in inability to write to an existing alias if it previously had only one index with any is_write_index indication | stripAliases | {
"repo_name": "GlenRSmith/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/gateway/DanglingIndicesState.java",
"license": "apache-2.0",
"size": 3783
} | [
"org.elasticsearch.cluster.metadata.IndexMetadata"
] | import org.elasticsearch.cluster.metadata.IndexMetadata; | import org.elasticsearch.cluster.metadata.*; | [
"org.elasticsearch.cluster"
] | org.elasticsearch.cluster; | 219,979 |
public boolean isPanningEvent(MouseEvent event)
{
return (event != null) ? event.isShiftDown() && event.isControlDown()
: false;
} | boolean function(MouseEvent event) { return (event != null) ? event.isShiftDown() && event.isControlDown() : false; } | /**
* Note: This is not used during drag and drop operations due to limitations
* of the underlying API. To enable this for move operations set dragEnabled
* to false.
*
* @param event
* @return Returns true if the given event is a panning event.
*/ | Note: This is not used during drag and drop operations due to limitations of the underlying API. To enable this for move operations set dragEnabled to false | isPanningEvent | {
"repo_name": "dpisarewski/gka_wise12",
"path": "src/com/mxgraph/swing/mxGraphComponent.java",
"license": "lgpl-2.1",
"size": 102389
} | [
"java.awt.event.MouseEvent"
] | import java.awt.event.MouseEvent; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 2,816,612 |
public static String convertToDDMMMM(final BigDecimal bd,
final DEGREES_FORMAT degreesFMT,
final DIRECTION direction,
final int decimalLen)
{
return convertToDDMMMM(bd, degreesFMT, direction, decimalLen, false);
} | static String function(final BigDecimal bd, final DEGREES_FORMAT degreesFMT, final DIRECTION direction, final int decimalLen) { return convertToDDMMMM(bd, degreesFMT, direction, decimalLen, false); } | /**
* Converts BigDecimal to Degrees and Decimal Minutes.
* @param bd the DigDecimal to be converted.
* @return a 2 piece string
*/ | Converts BigDecimal to Degrees and Decimal Minutes | convertToDDMMMM | {
"repo_name": "specify/specify6",
"path": "src/edu/ku/brc/util/LatLonConverter.java",
"license": "gpl-2.0",
"size": 36115
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 1,438,267 |
EAttribute getActivity_StartQuantity(); | EAttribute getActivity_StartQuantity(); | /**
* Returns the meta object for the attribute '{@link org.eclipse.bpmn2.Activity#getStartQuantity <em>Start Quantity</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Start Quantity</em>'.
* @see org.eclipse.bpmn2.Activity#getStartQuantity()
* @see #getActivity()
* @generated
*/ | Returns the meta object for the attribute '<code>org.eclipse.bpmn2.Activity#getStartQuantity Start Quantity</code>'. | getActivity_StartQuantity | {
"repo_name": "Rikkola/kie-wb-common",
"path": "kie-wb-common-stunner/kie-wb-common-stunner-sets/kie-wb-common-stunner-bpmn/kie-wb-common-stunner-bpmn-emf/src/main/java/org/eclipse/bpmn2/Bpmn2Package.java",
"license": "apache-2.0",
"size": 929298
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,124,075 |
public WebDriver getDriverAutoOpenWindow() {
// @TODO the goal is to set
// fp.setPreference("browser.link.open_newwindow.restriction", 2);
return getWebDriver();
} | WebDriver function() { return getWebDriver(); } | /**
* function set seleniumWebDriver to auto open new window when click link
*/ | function set seleniumWebDriver to auto open new window when click link | getDriverAutoOpenWindow | {
"repo_name": "exoplatform/platform-qa-ui",
"path": "core/src/main/java/org/exoplatform/platform/qa/ui/core/config/driver/ExoWebDriver.java",
"license": "lgpl-3.0",
"size": 1212
} | [
"org.openqa.selenium.WebDriver"
] | import org.openqa.selenium.WebDriver; | import org.openqa.selenium.*; | [
"org.openqa.selenium"
] | org.openqa.selenium; | 1,794,488 |
@Test
public void testCorruptedIndexPartitionShouldFailValidationWithoutCrc() throws Exception {
Ignite ignite = prepareGridForTest();
forceCheckpoint();
stopAllGrids();
File idxPath = indexPartition(ignite, GROUP_NAME);
corruptIndexPartition(idxPath, 6, 47746);
startGrids(GRID_CNT);
awaitPartitionMapExchange();
forceCheckpoint();
enableCheckpoints(G.allGrids(), false);
injectTestSystemOut();
assertEquals(EXIT_CODE_OK, execute("--cache", "validate_indexes", CACHE_NAME));
assertContains(log, testOut.toString(), "Runtime failure on bounds");
assertNotContains(log, testOut.toString(), "CRC validation failed");
} | void function() throws Exception { Ignite ignite = prepareGridForTest(); forceCheckpoint(); stopAllGrids(); File idxPath = indexPartition(ignite, GROUP_NAME); corruptIndexPartition(idxPath, 6, 47746); startGrids(GRID_CNT); awaitPartitionMapExchange(); forceCheckpoint(); enableCheckpoints(G.allGrids(), false); injectTestSystemOut(); assertEquals(EXIT_CODE_OK, execute(STR, STR, CACHE_NAME)); assertContains(log, testOut.toString(), STR); assertNotContains(log, testOut.toString(), STR); } | /**
* Tests with that corrupted pages in the index partition are detected.
*/ | Tests with that corrupted pages in the index partition are detected | testCorruptedIndexPartitionShouldFailValidationWithoutCrc | {
"repo_name": "ascherbakoff/ignite",
"path": "modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerIndexingTest.java",
"license": "apache-2.0",
"size": 10865
} | [
"java.io.File",
"org.apache.ignite.Ignite",
"org.apache.ignite.internal.util.typedef.G",
"org.apache.ignite.testframework.GridTestUtils"
] | import java.io.File; import org.apache.ignite.Ignite; import org.apache.ignite.internal.util.typedef.G; import org.apache.ignite.testframework.GridTestUtils; | import java.io.*; import org.apache.ignite.*; import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.testframework.*; | [
"java.io",
"org.apache.ignite"
] | java.io; org.apache.ignite; | 2,070,336 |
void setIndexEntry(IndexMap.IndexEntry entry) {
this.entry = entry;
} | void setIndexEntry(IndexMap.IndexEntry entry) { this.entry = entry; } | /**
* sets the IndexEntry
*/ | sets the IndexEntry | setIndexEntry | {
"repo_name": "jdeppe-pivotal/geode",
"path": "geode-core/src/main/java/org/apache/geode/cache/query/internal/index/MapIndexStore.java",
"license": "apache-2.0",
"size": 11108
} | [
"org.apache.geode.internal.cache.persistence.query.IndexMap"
] | import org.apache.geode.internal.cache.persistence.query.IndexMap; | import org.apache.geode.internal.cache.persistence.query.*; | [
"org.apache.geode"
] | org.apache.geode; | 1,116,615 |
try {
String className = (String) ContextManagerFactory.instance().getProperty(RULE_NAME);
return className != null ? (IVoucherGenerator) Class.forName(className).newInstance() : new SimpleVoucherGenerator();
} catch (Exception e) {
throw new RuntimeException("Cannot create VoucherGenerator: " + e.getLocalizedMessage(), e);
}
} | try { String className = (String) ContextManagerFactory.instance().getProperty(RULE_NAME); return className != null ? (IVoucherGenerator) Class.forName(className).newInstance() : new SimpleVoucherGenerator(); } catch (Exception e) { throw new RuntimeException(STR + e.getLocalizedMessage(), e); } } | /** Returns an implentation of the IVoucherGenerator interface.
* @return Returns an implentation of the IVoucherGenerator interface.
*/ | Returns an implentation of the IVoucherGenerator interface | instance | {
"repo_name": "snavaneethan1/jaffa-framework",
"path": "jaffa-core/source/java/org/jaffa/components/voucher/VoucherGeneratorFactory.java",
"license": "gpl-3.0",
"size": 3908
} | [
"org.jaffa.session.ContextManagerFactory"
] | import org.jaffa.session.ContextManagerFactory; | import org.jaffa.session.*; | [
"org.jaffa.session"
] | org.jaffa.session; | 2,288,187 |
@Test
public void testUpdateJob() {
postgres.createJob(createJob());
postgres.createJob(createJob());
// create one job with a defined state
Job createJob = createJob();
createJob.setState(JobState.PENDING);
String uuid = postgres.createJob(createJob);
// get everything
List<Job> jobs = postgres.getJobs(null);
Assert.assertTrue("found jobs, incorrect number " + jobs.size(), jobs.size() == 3);
List<Job> jobs2 = postgres.getJobs(JobState.PENDING);
Assert.assertTrue("found jobs, incorrect number " + jobs2.size(), jobs2.size() == 1);
postgres.updateJob(uuid, "none", JobState.FAILED);
List<Job> jobs3 = postgres.getJobs(JobState.PENDING);
Assert.assertTrue("found jobs, incorrect number " + jobs3.size(), jobs3.isEmpty());
} | void function() { postgres.createJob(createJob()); postgres.createJob(createJob()); Job createJob = createJob(); createJob.setState(JobState.PENDING); String uuid = postgres.createJob(createJob); List<Job> jobs = postgres.getJobs(null); Assert.assertTrue(STR + jobs.size(), jobs.size() == 3); List<Job> jobs2 = postgres.getJobs(JobState.PENDING); Assert.assertTrue(STR + jobs2.size(), jobs2.size() == 1); postgres.updateJob(uuid, "none", JobState.FAILED); List<Job> jobs3 = postgres.getJobs(JobState.PENDING); Assert.assertTrue(STR + jobs3.size(), jobs3.isEmpty()); } | /**
* Test of updateJob method, of class PostgreSQL.
*/ | Test of updateJob method, of class PostgreSQL | testUpdateJob | {
"repo_name": "Consonance/consonance",
"path": "consonance-server-common/src/test/java/io/consonance/arch/persistence/PostgreSQLIT.java",
"license": "gpl-3.0",
"size": 14302
} | [
"io.consonance.arch.beans.Job",
"io.consonance.arch.beans.JobState",
"java.util.List",
"org.junit.Assert"
] | import io.consonance.arch.beans.Job; import io.consonance.arch.beans.JobState; import java.util.List; import org.junit.Assert; | import io.consonance.arch.beans.*; import java.util.*; import org.junit.*; | [
"io.consonance.arch",
"java.util",
"org.junit"
] | io.consonance.arch; java.util; org.junit; | 1,478,029 |
private synchronized void init() throws IOException {
if (!isInitialized()) {
boolean needHeader = true;
if (append && file.exists() && file.length() > 0) {
needHeader = false;
}
initialized = true;
writer = new BufferedWriter(new FileWriter(file, append));
// Write header if needed
if (needHeader) {
for (int i=0; i<columns.length; i++) {
if (i > 0) {
writer.write(colSep);
}
writer.write(columns[i]);
}
}
}
} | synchronized void function() throws IOException { if (!isInitialized()) { boolean needHeader = true; if (append && file.exists() && file.length() > 0) { needHeader = false; } initialized = true; writer = new BufferedWriter(new FileWriter(file, append)); if (needHeader) { for (int i=0; i<columns.length; i++) { if (i > 0) { writer.write(colSep); } writer.write(columns[i]); } } } } | /**
* Initialize this logger. This method has no effect if the logger is already initialized.
* @throws IOException if an IO problem is risen opening the log file.
*/ | Initialize this logger. This method has no effect if the logger is already initialized | init | {
"repo_name": "HOMlab/QN-ACTR-Release",
"path": "QN-ACTR Java/src/jmt/engine/log/CSVLogger.java",
"license": "lgpl-3.0",
"size": 4981
} | [
"java.io.BufferedWriter",
"java.io.FileWriter",
"java.io.IOException"
] | import java.io.BufferedWriter; import java.io.FileWriter; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,794,450 |
String smartToString(ImmutableSet<ListenableFuture<String>> inputs) {
Iterable<String> inputNames = Iterables.transform(inputs, nameGetter);
return Joiner.on(", ").join(inputNames);
} | String smartToString(ImmutableSet<ListenableFuture<String>> inputs) { Iterable<String> inputNames = Iterables.transform(inputs, nameGetter); return Joiner.on(STR).join(inputNames); } | /**
* Like {@code inputs.toString()}, but with the nonsense {@code toString} representations
* replaced with the name of each future from {@link #allFutures}.
*/ | Like inputs.toString(), but with the nonsense toString representations replaced with the name of each future from <code>#allFutures</code> | smartToString | {
"repo_name": "typetools/guava",
"path": "guava-tests/test/com/google/common/util/concurrent/FuturesTest.java",
"license": "apache-2.0",
"size": 147021
} | [
"com.google.common.base.Joiner",
"com.google.common.collect.ImmutableSet",
"com.google.common.collect.Iterables",
"com.google.common.util.concurrent.Futures"
] | import com.google.common.base.Joiner; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; import com.google.common.util.concurrent.Futures; | import com.google.common.base.*; import com.google.common.collect.*; import com.google.common.util.concurrent.*; | [
"com.google.common"
] | com.google.common; | 2,781,916 |
@SimpleFunction(description = "Derives latitude of given address")
public double LatitudeFromAddress(String locationName) {
try {
List<Address> addressObjs = geocoder.getFromLocationName(locationName, 1);
if (addressObjs == null) {
throw new IOException("");
}
return addressObjs.get(0).getLatitude();
} catch (IOException e) {
form.dispatchErrorOccurredEvent(this, "LatitudeFromAddress",
ErrorMessages.ERROR_LOCATION_SENSOR_LATITUDE_NOT_FOUND, locationName);
return 0;
}
} | @SimpleFunction(description = STR) double function(String locationName) { try { List<Address> addressObjs = geocoder.getFromLocationName(locationName, 1); if (addressObjs == null) { throw new IOException(STRLatitudeFromAddress", ErrorMessages.ERROR_LOCATION_SENSOR_LATITUDE_NOT_FOUND, locationName); return 0; } } | /**
* Derives Latitude from Address
*
* @param locationName human-readable address
*
* @return latitude in degrees, 0 if not found.
*/ | Derives Latitude from Address | LatitudeFromAddress | {
"repo_name": "rkipper/AppInventor_RK",
"path": "appinventor/components/src/com/google/appinventor/components/runtime/LocationSensor.java",
"license": "mit",
"size": 19779
} | [
"android.location.Address",
"com.google.appinventor.components.annotations.SimpleFunction",
"com.google.appinventor.components.runtime.util.ErrorMessages",
"java.io.IOException",
"java.util.List"
] | import android.location.Address; import com.google.appinventor.components.annotations.SimpleFunction; import com.google.appinventor.components.runtime.util.ErrorMessages; import java.io.IOException; import java.util.List; | import android.location.*; import com.google.appinventor.components.annotations.*; import com.google.appinventor.components.runtime.util.*; import java.io.*; import java.util.*; | [
"android.location",
"com.google.appinventor",
"java.io",
"java.util"
] | android.location; com.google.appinventor; java.io; java.util; | 974,104 |
public Extent getAreaOfInterest() {
return areaOfInterest;
} | Extent function() { return areaOfInterest; } | /**
* Returns the spatiotemporal area of interest, or {@code null} if none.
*
* @return the spatiotemporal area of interest, or {@code null} if none.
*
* @see Extents#getGeographicBoundingBox(Extent)
*/ | Returns the spatiotemporal area of interest, or null if none | getAreaOfInterest | {
"repo_name": "apache/sis",
"path": "core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationContext.java",
"license": "apache-2.0",
"size": 11576
} | [
"org.opengis.metadata.extent.Extent"
] | import org.opengis.metadata.extent.Extent; | import org.opengis.metadata.extent.*; | [
"org.opengis.metadata"
] | org.opengis.metadata; | 799,221 |
private TreeElement findDepthFirst(TreeElement parent, String name) {
int len = parent.getNumChildren();
for ( int i = 0; i < len ; ++i ) {
TreeElement e = parent.getChildAt(i);
if ( name.equals(e.getName()) ) {
return e;
} else if ( e.getNumChildren() != 0 ) {
TreeElement v = findDepthFirst(e, name);
if ( v != null ) return v;
}
}
return null;
} | TreeElement function(TreeElement parent, String name) { int len = parent.getNumChildren(); for ( int i = 0; i < len ; ++i ) { TreeElement e = parent.getChildAt(i); if ( name.equals(e.getName()) ) { return e; } else if ( e.getNumChildren() != 0 ) { TreeElement v = findDepthFirst(e, name); if ( v != null ) return v; } } return null; } | /**
* Traverse the submission looking for the first matching tag in depth-first order.
*
* @param parent
* @param name
* @return
*/ | Traverse the submission looking for the first matching tag in depth-first order | findDepthFirst | {
"repo_name": "smap-consulting/ODK1.4_lib",
"path": "src/org/odk/collect/android/logic/FormController.java",
"license": "apache-2.0",
"size": 44030
} | [
"org.javarosa.core.model.instance.TreeElement"
] | import org.javarosa.core.model.instance.TreeElement; | import org.javarosa.core.model.instance.*; | [
"org.javarosa.core"
] | org.javarosa.core; | 2,060,314 |
public void toPNML(FileChannel fc){
item.toPNML(fc);
} | void function(FileChannel fc){ item.toPNML(fc); } | /**
* Writes the PNML XML tree of this object into file channel.
*/ | Writes the PNML XML tree of this object into file channel | toPNML | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/strings/hlapi/LessThanOrEqualHLAPI.java",
"license": "epl-1.0",
"size": 108661
} | [
"java.nio.channels.FileChannel"
] | import java.nio.channels.FileChannel; | import java.nio.channels.*; | [
"java.nio"
] | java.nio; | 2,815,454 |
private Insets parseInsets(String insets, String errorMsg) throws
SAXException {
StringTokenizer tokenizer = new StringTokenizer(insets);
return new Insets(nextInt(tokenizer, errorMsg),
nextInt(tokenizer, errorMsg),
nextInt(tokenizer, errorMsg),
nextInt(tokenizer, errorMsg));
}
//
// The following methods are invoked from startElement/stopElement
// | Insets function(String insets, String errorMsg) throws SAXException { StringTokenizer tokenizer = new StringTokenizer(insets); return new Insets(nextInt(tokenizer, errorMsg), nextInt(tokenizer, errorMsg), nextInt(tokenizer, errorMsg), nextInt(tokenizer, errorMsg)); } // | /**
* Convenience method to return an Insets object.
*/ | Convenience method to return an Insets object | parseInsets | {
"repo_name": "TheTypoMaster/Scaper",
"path": "openjdk/jdk/src/share/classes/javax/swing/plaf/synth/SynthParser.java",
"license": "gpl-2.0",
"size": 48830
} | [
"java.awt.Insets",
"java.util.StringTokenizer",
"org.xml.sax.SAXException"
] | import java.awt.Insets; import java.util.StringTokenizer; import org.xml.sax.SAXException; | import java.awt.*; import java.util.*; import org.xml.sax.*; | [
"java.awt",
"java.util",
"org.xml.sax"
] | java.awt; java.util; org.xml.sax; | 1,147,902 |
public void setDayFormatter(NumberFormat formatter) {
ParamChecks.nullNotPermitted(formatter, "formatter");
this.dayFormatter = formatter;
}
| void function(NumberFormat formatter) { ParamChecks.nullNotPermitted(formatter, STR); this.dayFormatter = formatter; } | /**
* Sets the formatter for the days.
*
* @param formatter the formatter (<code>null</code> not permitted).
*
* @since 1.0.11
*/ | Sets the formatter for the days | setDayFormatter | {
"repo_name": "Mr-Steve/LTSpice_Library_Manager",
"path": "libs/jfreechart-1.0.16/source/org/jfree/chart/util/RelativeDateFormat.java",
"license": "gpl-2.0",
"size": 18333
} | [
"java.text.NumberFormat"
] | import java.text.NumberFormat; | import java.text.*; | [
"java.text"
] | java.text; | 100,691 |
@ApiModelProperty(example = "null", required = true, value = "corporation_id integer")
public Integer getCorporationId() {
return corporationId;
} | @ApiModelProperty(example = "null", required = true, value = STR) Integer function() { return corporationId; } | /**
* corporation_id integer
* @return corporationId
**/ | corporation_id integer | getCorporationId | {
"repo_name": "Tmin10/EVE-Security-Service",
"path": "server-api/src/main/java/ru/tmin10/EVESecurityService/serverApi/model/GetUniverseBloodlines200Ok.java",
"license": "gpl-3.0",
"size": 8751
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 814,076 |
@NotNull PsiField createField(@NotNull @NonNls String name, @NotNull PsiType type) throws IncorrectOperationException; | @NotNull PsiField createField(@NotNull @NonNls String name, @NotNull PsiType type) throws IncorrectOperationException; | /**
* Creates a field with the specified name and type.
*
* @param name the name of the field to create.
* @param type the type of the field to create.
* @return the created field instance.
* @throws IncorrectOperationException <code>name</code> is not a valid Java identifier
* or <code>type</code> represents an invalid type.
*/ | Creates a field with the specified name and type | createField | {
"repo_name": "joewalnes/idea-community",
"path": "java/openapi/src/com/intellij/psi/PsiElementFactory.java",
"license": "apache-2.0",
"size": 23064
} | [
"com.intellij.util.IncorrectOperationException",
"org.jetbrains.annotations.NonNls",
"org.jetbrains.annotations.NotNull"
] | import com.intellij.util.IncorrectOperationException; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; | import com.intellij.util.*; import org.jetbrains.annotations.*; | [
"com.intellij.util",
"org.jetbrains.annotations"
] | com.intellij.util; org.jetbrains.annotations; | 1,765,442 |
public static Date getDate(Calendar calendar) {
return calendar == null ? null : calendar.getTime();
} | static Date function(Calendar calendar) { return calendar == null ? null : calendar.getTime(); } | /**
* Returns a date object from a calendar.
*/ | Returns a date object from a calendar | getDate | {
"repo_name": "watou/openhab",
"path": "bundles/binding/org.openhab.binding.astro/src/main/java/org/openhab/binding/astro/internal/util/DateTimeUtils.java",
"license": "epl-1.0",
"size": 5273
} | [
"java.util.Calendar",
"java.util.Date"
] | import java.util.Calendar; import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,466,967 |
public int getIndex() {
return m_Index;
}
}
public static class ContainerComparator
implements Comparator<SortContainer> {
protected Comparator m_Comparator;
public ContainerComparator(Comparator comp) {
m_Comparator = comp;
} | int function() { return m_Index; } } public static class ContainerComparator implements Comparator<SortContainer> { protected Comparator m_Comparator; public ContainerComparator(Comparator comp) { m_Comparator = comp; } | /**
* Returns the index of the column.
*
* @return the index
*/ | Returns the index of the column | getIndex | {
"repo_name": "waikato-datamining/adams-base",
"path": "adams-spreadsheet/src/main/java/adams/flow/transformer/SpreadSheetSortColumns.java",
"license": "gpl-3.0",
"size": 11261
} | [
"java.util.Comparator"
] | import java.util.Comparator; | import java.util.*; | [
"java.util"
] | java.util; | 1,102,933 |
public Object lookupLink(String name)
throws NamingException {
return lookup(new CompositeName(name), false);
} | Object function(String name) throws NamingException { return lookup(new CompositeName(name), false); } | /**
* Retrieves the named object, following links except for the terminal
* atomic component of the name.
*
* @param name the name of the object to look up
* @return the object bound to name, not following the terminal link
* (if any).
* @exception NamingException if a naming exception is encountered
*/ | Retrieves the named object, following links except for the terminal atomic component of the name | lookupLink | {
"repo_name": "plumer/codana",
"path": "tomcat_files/6.0.0/NamingContext.java",
"license": "mit",
"size": 32969
} | [
"javax.naming.CompositeName",
"javax.naming.NamingException"
] | import javax.naming.CompositeName; import javax.naming.NamingException; | import javax.naming.*; | [
"javax.naming"
] | javax.naming; | 371,826 |
private static Configuration getConfigurationWithoutSharedEdits(
Configuration conf)
throws IOException {
List<URI> editsDirs = FSNamesystem.getNamespaceEditsDirs(conf, false);
String editsDirsString = Joiner.on(",").join(editsDirs);
Configuration confWithoutShared = new Configuration(conf);
confWithoutShared.unset(DFSConfigKeys.DFS_NAMENODE_SHARED_EDITS_DIR_KEY);
confWithoutShared.setStrings(DFSConfigKeys.DFS_NAMENODE_EDITS_DIR_KEY,
editsDirsString);
return confWithoutShared;
} | static Configuration function( Configuration conf) throws IOException { List<URI> editsDirs = FSNamesystem.getNamespaceEditsDirs(conf, false); String editsDirsString = Joiner.on(",").join(editsDirs); Configuration confWithoutShared = new Configuration(conf); confWithoutShared.unset(DFSConfigKeys.DFS_NAMENODE_SHARED_EDITS_DIR_KEY); confWithoutShared.setStrings(DFSConfigKeys.DFS_NAMENODE_EDITS_DIR_KEY, editsDirsString); return confWithoutShared; } | /**
* Clone the supplied configuration but remove the shared edits dirs.
*
* @param conf Supplies the original configuration.
* @return Cloned configuration without the shared edit dirs.
* @throws IOException on failure to generate the configuration.
*/ | Clone the supplied configuration but remove the shared edits dirs | getConfigurationWithoutSharedEdits | {
"repo_name": "GeLiXin/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java",
"license": "apache-2.0",
"size": 80804
} | [
"com.google.common.base.Joiner",
"java.io.IOException",
"java.util.List",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.hdfs.DFSConfigKeys"
] | import com.google.common.base.Joiner; import java.io.IOException; import java.util.List; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hdfs.DFSConfigKeys; | import com.google.common.base.*; import java.io.*; import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.hdfs.*; | [
"com.google.common",
"java.io",
"java.util",
"org.apache.hadoop"
] | com.google.common; java.io; java.util; org.apache.hadoop; | 426,439 |
@Override
public void contextInitialized(final ServletContextEvent sce) {
File workDir = (File) sce.getServletContext().getAttribute("javax.servlet.context.tempdir");
workDir = new File(workDir, "server-work");
final boolean loadDefaultContent = !workDir.exists();
if (loadDefaultContent && !workDir.mkdirs()) {
throw new RuntimeException("Could not create " + workDir.getAbsolutePath());
}
Entry result;
try {
initDirectoryService(sce.getServletContext(), workDir, loadDefaultContent);
ApplicationContext applicationContext = WebApplicationContextUtils.getWebApplicationContext(
sce.getServletContext());
server = new LdapServer();
server.setTransports(new TcpTransport(Integer.parseInt(
Objects.requireNonNull(
Objects.requireNonNull(applicationContext).getEnvironment().getProperty("testds.port")))));
server.setDirectoryService(service);
server.start();
// store directoryService in context to provide it to servlets etc.
sce.getServletContext().setAttribute(DirectoryService.JNDI_KEY, service);
result = service.getAdminSession().lookup(new Dn("o=isp"));
} catch (Exception e) {
LOG.error("Fatal error in context init", e);
throw new RuntimeException(e);
}
if (result == null) {
throw new RuntimeException("Base DN not found");
} else {
LOG.info("ApacheDS startup completed successfully");
}
} | void function(final ServletContextEvent sce) { File workDir = (File) sce.getServletContext().getAttribute(STR); workDir = new File(workDir, STR); final boolean loadDefaultContent = !workDir.exists(); if (loadDefaultContent && !workDir.mkdirs()) { throw new RuntimeException(STR + workDir.getAbsolutePath()); } Entry result; try { initDirectoryService(sce.getServletContext(), workDir, loadDefaultContent); ApplicationContext applicationContext = WebApplicationContextUtils.getWebApplicationContext( sce.getServletContext()); server = new LdapServer(); server.setTransports(new TcpTransport(Integer.parseInt( Objects.requireNonNull( Objects.requireNonNull(applicationContext).getEnvironment().getProperty(STR))))); server.setDirectoryService(service); server.start(); sce.getServletContext().setAttribute(DirectoryService.JNDI_KEY, service); result = service.getAdminSession().lookup(new Dn("o=isp")); } catch (Exception e) { LOG.error(STR, e); throw new RuntimeException(e); } if (result == null) { throw new RuntimeException(STR); } else { LOG.info(STR); } } | /**
* Startup ApacheDS embedded.
*
* @param sce ServletContext event
*/ | Startup ApacheDS embedded | contextInitialized | {
"repo_name": "apache/syncope",
"path": "fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ApacheDSStartStopListener.java",
"license": "apache-2.0",
"size": 11629
} | [
"java.io.File",
"java.util.Objects",
"javax.servlet.ServletContextEvent",
"org.apache.directory.api.ldap.model.entry.Entry",
"org.apache.directory.api.ldap.model.name.Dn",
"org.apache.directory.server.core.api.DirectoryService",
"org.apache.directory.server.ldap.LdapServer",
"org.apache.directory.server.protocol.shared.transport.TcpTransport",
"org.springframework.context.ApplicationContext",
"org.springframework.web.context.support.WebApplicationContextUtils"
] | import java.io.File; import java.util.Objects; import javax.servlet.ServletContextEvent; import org.apache.directory.api.ldap.model.entry.Entry; import org.apache.directory.api.ldap.model.name.Dn; import org.apache.directory.server.core.api.DirectoryService; import org.apache.directory.server.ldap.LdapServer; import org.apache.directory.server.protocol.shared.transport.TcpTransport; import org.springframework.context.ApplicationContext; import org.springframework.web.context.support.WebApplicationContextUtils; | import java.io.*; import java.util.*; import javax.servlet.*; import org.apache.directory.api.ldap.model.entry.*; import org.apache.directory.api.ldap.model.name.*; import org.apache.directory.server.core.api.*; import org.apache.directory.server.ldap.*; import org.apache.directory.server.protocol.shared.transport.*; import org.springframework.context.*; import org.springframework.web.context.support.*; | [
"java.io",
"java.util",
"javax.servlet",
"org.apache.directory",
"org.springframework.context",
"org.springframework.web"
] | java.io; java.util; javax.servlet; org.apache.directory; org.springframework.context; org.springframework.web; | 1,102,249 |
public Actor loadActor(String id) throws IOException, ContentNotFoundException
{
Actor a = new Actor(id);
GetParameter gp = new GetParameter(a.getKey(), a.getType(), a.getId());
JSocialKademliaStorageEntry se = dataManager.getAndCache(gp);
return (Actor) new Actor().fromSerializedForm(se.getContent());
} | Actor function(String id) throws IOException, ContentNotFoundException { Actor a = new Actor(id); GetParameter gp = new GetParameter(a.getKey(), a.getType(), a.getId()); JSocialKademliaStorageEntry se = dataManager.getAndCache(gp); return (Actor) new Actor().fromSerializedForm(se.getContent()); } | /**
* Load the actor object from the DHT
*
* @param id The actor's user ID on the network
*
* @return The actor
*
* @throws java.io.IOException
* @throws kademlia.exceptions.ContentNotFoundException
*/ | Load the actor object from the DHT | loadActor | {
"repo_name": "JoshuaKissoon/SuperDosna",
"path": "src/dosna/osn/actor/ActorManager.java",
"license": "mit",
"size": 3482
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,011,065 |
public Observable<ServiceResponse<List<MetricInner>>> listMetricsWithServiceResponseAsync(String resourceGroupName, String accountName, String region, String databaseRid, String collectionRid, String filter) {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (accountName == null) {
throw new IllegalArgumentException("Parameter accountName is required and cannot be null.");
}
if (region == null) {
throw new IllegalArgumentException("Parameter region is required and cannot be null.");
}
if (databaseRid == null) {
throw new IllegalArgumentException("Parameter databaseRid is required and cannot be null.");
}
if (collectionRid == null) {
throw new IllegalArgumentException("Parameter collectionRid is required and cannot be null.");
}
if (this.client.apiVersion() == null) {
throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
}
if (filter == null) {
throw new IllegalArgumentException("Parameter filter is required and cannot be null.");
} | Observable<ServiceResponse<List<MetricInner>>> function(String resourceGroupName, String accountName, String region, String databaseRid, String collectionRid, String filter) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException(STR); } if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (accountName == null) { throw new IllegalArgumentException(STR); } if (region == null) { throw new IllegalArgumentException(STR); } if (databaseRid == null) { throw new IllegalArgumentException(STR); } if (collectionRid == null) { throw new IllegalArgumentException(STR); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException(STR); } if (filter == null) { throw new IllegalArgumentException(STR); } | /**
* Retrieves the metrics determined by the given filter for the given database account, collection and region.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param region Cosmos DB region, with spaces between words and each word capitalized.
* @param databaseRid Cosmos DB database rid.
* @param collectionRid Cosmos DB collection rid.
* @param filter An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and timeGrain. The supported operator is eq.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the List<MetricInner> object
*/ | Retrieves the metrics determined by the given filter for the given database account, collection and region | listMetricsWithServiceResponseAsync | {
"repo_name": "navalev/azure-sdk-for-java",
"path": "sdk/cosmosdb/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CollectionRegionsInner.java",
"license": "mit",
"size": 10867
} | [
"com.microsoft.rest.ServiceResponse",
"java.util.List"
] | import com.microsoft.rest.ServiceResponse; import java.util.List; | import com.microsoft.rest.*; import java.util.*; | [
"com.microsoft.rest",
"java.util"
] | com.microsoft.rest; java.util; | 517,210 |
@Test
public void testSLRemoteEnvEntry_Short_NotExist() throws Exception {
try {
// The test case looks for a environment variable named "envShortNotExist".
Short tempShort = fejb1.getShortEnvVar("envShortNotExist");
fail("Get environment not exist should have failed, instead got short object = " + tempShort);
} catch (NamingException ne) {
svLogger.info("Caught expected " + ne.getClass().getName());
}
} | void function() throws Exception { try { Short tempShort = fejb1.getShortEnvVar(STR); fail(STR + tempShort); } catch (NamingException ne) { svLogger.info(STR + ne.getClass().getName()); } } | /**
* (ive31) Test an env-entry of type Short where there is no env-entry.
*/ | (ive31) Test an env-entry of type Short where there is no env-entry | testSLRemoteEnvEntry_Short_NotExist | {
"repo_name": "kgibm/open-liberty",
"path": "dev/com.ibm.ws.ejbcontainer.legacy_fat/test-applications/EJB2XRemoteSpecWeb.war/src/com/ibm/ejb2x/base/spec/slr/web/SLRemoteImplEnvEntryServlet.java",
"license": "epl-1.0",
"size": 39112
} | [
"javax.naming.NamingException",
"org.junit.Assert"
] | import javax.naming.NamingException; import org.junit.Assert; | import javax.naming.*; import org.junit.*; | [
"javax.naming",
"org.junit"
] | javax.naming; org.junit; | 823,994 |
public CentralDogmaBuilder repositoryCacheSpec(String repositoryCacheSpec) {
this.repositoryCacheSpec = validateCacheSpec(repositoryCacheSpec);
return this;
} | CentralDogmaBuilder function(String repositoryCacheSpec) { this.repositoryCacheSpec = validateCacheSpec(repositoryCacheSpec); return this; } | /**
* Sets the cache specification which determines the capacity and behavior of the cache for the return
* values of methods in {@link Repository} of the server. See {@link CaffeineSpec} for the syntax
* of the spec. If unspecified, the default cache spec of {@value #DEFAULT_REPOSITORY_CACHE_SPEC} is used.
*/ | Sets the cache specification which determines the capacity and behavior of the cache for the return values of methods in <code>Repository</code> of the server. See <code>CaffeineSpec</code> for the syntax of the spec. If unspecified, the default cache spec of #DEFAULT_REPOSITORY_CACHE_SPEC is used | repositoryCacheSpec | {
"repo_name": "line/centraldogma",
"path": "server/src/main/java/com/linecorp/centraldogma/server/CentralDogmaBuilder.java",
"license": "apache-2.0",
"size": 23802
} | [
"com.linecorp.centraldogma.server.internal.storage.repository.RepositoryCache"
] | import com.linecorp.centraldogma.server.internal.storage.repository.RepositoryCache; | import com.linecorp.centraldogma.server.internal.storage.repository.*; | [
"com.linecorp.centraldogma"
] | com.linecorp.centraldogma; | 437,840 |
protected Map<String, Object> createResultsMap() {
if (isResultsMapCaseInsensitive()) {
return new LinkedCaseInsensitiveMap<Object>();
}
else {
return new LinkedHashMap<String, Object>();
}
} | Map<String, Object> function() { if (isResultsMapCaseInsensitive()) { return new LinkedCaseInsensitiveMap<Object>(); } else { return new LinkedHashMap<String, Object>(); } } | /**
* Create a Map instance to be used as results map.
* <p>If "isResultsMapCaseInsensitive" has been set to true,
* a linked case-insensitive Map will be created.
* @return the results Map instance
* @see #setResultsMapCaseInsensitive
*/ | Create a Map instance to be used as results map. If "isResultsMapCaseInsensitive" has been set to true, a linked case-insensitive Map will be created | createResultsMap | {
"repo_name": "deathspeeder/class-guard",
"path": "spring-framework-3.2.x/spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcTemplate.java",
"license": "gpl-2.0",
"size": 53768
} | [
"java.util.LinkedHashMap",
"java.util.Map",
"org.springframework.util.LinkedCaseInsensitiveMap"
] | import java.util.LinkedHashMap; import java.util.Map; import org.springframework.util.LinkedCaseInsensitiveMap; | import java.util.*; import org.springframework.util.*; | [
"java.util",
"org.springframework.util"
] | java.util; org.springframework.util; | 1,013,529 |
public Map getTypeMap() throws SQLException
{
if (connection_ != null)
return connection_.getTypeMap();
return typeMap_;
} | Map function() throws SQLException { if (connection_ != null) return connection_.getTypeMap(); return typeMap_; } | /**
* Returns the type map.
* @return The type map. The default value is null.
* @exception SQLException If a database error occurs.
**/ | Returns the type map | getTypeMap | {
"repo_name": "piguangming/jt400",
"path": "cvsroot/src/com/ibm/as400/access/AS400JDBCRowSet.java",
"license": "epl-1.0",
"size": 311708
} | [
"java.sql.SQLException",
"java.util.Map"
] | import java.sql.SQLException; import java.util.Map; | import java.sql.*; import java.util.*; | [
"java.sql",
"java.util"
] | java.sql; java.util; | 2,810,386 |
double modifyCustomCounter(String name, double delta, Map<String, String> tags); | double modifyCustomCounter(String name, double delta, Map<String, String> tags); | /**
* Modifies the value of a custom counter.
*
* @param name The name of the counter to update. Cannot be null.
* @param delta The amount of change to apply to the counter.
* @param tags The tags representing the TSDB metric for this counter.
*
* @return The updated counter value.
*/ | Modifies the value of a custom counter | modifyCustomCounter | {
"repo_name": "salesforce/Argus",
"path": "ArgusCore/src/main/java/com/salesforce/dva/argus/service/MonitorService.java",
"license": "bsd-3-clause",
"size": 18421
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 931,020 |
public List<LimitLine> getLimitLines() {
return mLimitLines;
} | List<LimitLine> function() { return mLimitLines; } | /**
* Returns the LimitLines of this axis.
*
* @return
*/ | Returns the LimitLines of this axis | getLimitLines | {
"repo_name": "BD-ITAC/BD-ITAC",
"path": "mobile/Alertas/MPChartLib/src/main/java/com/github/mikephil/charting/components/AxisBase.java",
"license": "mit",
"size": 9735
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,344,347 |
public void setMediaStatus(long pk, int status, String info)
throws FinderException {
if (log.isDebugEnabled()) log.debug("setMediaStatus: pk="+pk+", status:"+status+", info"+info);
MediaLocal media = mediaHome.findByPrimaryKey(new Long(pk));
media.setMediaStatus(status);
media.setMediaStatusInfo(info);
if ( status == MediaDTO.COMPLETED )
updateSeriesAndStudies( media );
} | void function(long pk, int status, String info) throws FinderException { if (log.isDebugEnabled()) log.debug(STR+pk+STR+status+STR+info); MediaLocal media = mediaHome.findByPrimaryKey(new Long(pk)); media.setMediaStatus(status); media.setMediaStatusInfo(info); if ( status == MediaDTO.COMPLETED ) updateSeriesAndStudies( media ); } | /**
* Set media staus and status info.
*
* @param pk Primary key of media.
* @param status Status to set.
* @param info Status info to set.
*
* @ejb.interface-method
*/ | Set media staus and status info | setMediaStatus | {
"repo_name": "medicayun/medicayundicom",
"path": "dcm4jboss-all/tags/DCM4CHEE_2_9_5/dcm4jboss-ejb/src/java/org/dcm4chex/archive/ejb/session/MediaComposerBean.java",
"license": "apache-2.0",
"size": 20947
} | [
"javax.ejb.FinderException",
"org.dcm4chex.archive.ejb.interfaces.MediaDTO",
"org.dcm4chex.archive.ejb.interfaces.MediaLocal"
] | import javax.ejb.FinderException; import org.dcm4chex.archive.ejb.interfaces.MediaDTO; import org.dcm4chex.archive.ejb.interfaces.MediaLocal; | import javax.ejb.*; import org.dcm4chex.archive.ejb.interfaces.*; | [
"javax.ejb",
"org.dcm4chex.archive"
] | javax.ejb; org.dcm4chex.archive; | 1,322,099 |
protected AuditListener getListener()
throws MavenReportException
{
AuditListener listener = null;
if ( StringUtils.isNotEmpty( outputFileFormat ) )
{
File resultFile = outputFile;
OutputStream out = getOutputStream( resultFile );
if ( "xml".equals( outputFileFormat ) )
{
listener = new XMLLogger( out, true );
}
else if ( "plain".equals( outputFileFormat ) )
{
listener = new DefaultLogger( out, true );
}
else
{
// TODO: failure if not a report
throw new MavenReportException( "Invalid output file format: (" + outputFileFormat
+ "). Must be 'plain' or 'xml'." );
}
}
return listener;
} | AuditListener function() throws MavenReportException { AuditListener listener = null; if ( StringUtils.isNotEmpty( outputFileFormat ) ) { File resultFile = outputFile; OutputStream out = getOutputStream( resultFile ); if ( "xml".equals( outputFileFormat ) ) { listener = new XMLLogger( out, true ); } else if ( "plain".equals( outputFileFormat ) ) { listener = new DefaultLogger( out, true ); } else { throw new MavenReportException( STR + outputFileFormat + STR ); } } return listener; } | /**
* Creates and returns the report generation listener.
*
* @return The audit listener.
* @throws MavenReportException If something goes wrong.
*/ | Creates and returns the report generation listener | getListener | {
"repo_name": "dmlloyd/maven-plugins",
"path": "maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/AbstractCheckstyleReport.java",
"license": "apache-2.0",
"size": 14617
} | [
"com.puppycrawl.tools.checkstyle.DefaultLogger",
"com.puppycrawl.tools.checkstyle.XMLLogger",
"com.puppycrawl.tools.checkstyle.api.AuditListener",
"java.io.File",
"java.io.OutputStream",
"org.apache.maven.reporting.MavenReportException",
"org.codehaus.plexus.util.StringUtils"
] | import com.puppycrawl.tools.checkstyle.DefaultLogger; import com.puppycrawl.tools.checkstyle.XMLLogger; import com.puppycrawl.tools.checkstyle.api.AuditListener; import java.io.File; import java.io.OutputStream; import org.apache.maven.reporting.MavenReportException; import org.codehaus.plexus.util.StringUtils; | import com.puppycrawl.tools.checkstyle.*; import com.puppycrawl.tools.checkstyle.api.*; import java.io.*; import org.apache.maven.reporting.*; import org.codehaus.plexus.util.*; | [
"com.puppycrawl.tools",
"java.io",
"org.apache.maven",
"org.codehaus.plexus"
] | com.puppycrawl.tools; java.io; org.apache.maven; org.codehaus.plexus; | 1,634,268 |
public void testAddAll2() {
ConcurrentLinkedDeque q = new ConcurrentLinkedDeque();
try {
q.addAll(Arrays.asList(new Integer[SIZE]));
shouldThrow();
} catch (NullPointerException success) {}
} | void function() { ConcurrentLinkedDeque q = new ConcurrentLinkedDeque(); try { q.addAll(Arrays.asList(new Integer[SIZE])); shouldThrow(); } catch (NullPointerException success) {} } | /**
* addAll of a collection with null elements throws NPE
*/ | addAll of a collection with null elements throws NPE | testAddAll2 | {
"repo_name": "life-beam/j2objc",
"path": "jre_emul/android/platform/libcore/jsr166-tests/src/test/java/jsr166/ConcurrentLinkedDequeTest.java",
"license": "apache-2.0",
"size": 26542
} | [
"java.util.Arrays",
"java.util.concurrent.ConcurrentLinkedDeque"
] | import java.util.Arrays; import java.util.concurrent.ConcurrentLinkedDeque; | import java.util.*; import java.util.concurrent.*; | [
"java.util"
] | java.util; | 2,381,419 |
public HashMap getSubmitData(String publishedId, String agentId, Integer scoringoption, String assessmentGradingId)
{
try {
Long gradingId = null;
if (assessmentGradingId != null) gradingId = Long.valueOf(assessmentGradingId);
return (HashMap) PersistenceService.getInstance().
getAssessmentGradingFacadeQueries().getSubmitData(Long.valueOf(publishedId), agentId, scoringoption, gradingId);
} catch (Exception e) {
log.error(e.getMessage(), e);
return new HashMap();
}
} | HashMap function(String publishedId, String agentId, Integer scoringoption, String assessmentGradingId) { try { Long gradingId = null; if (assessmentGradingId != null) gradingId = Long.valueOf(assessmentGradingId); return (HashMap) PersistenceService.getInstance(). getAssessmentGradingFacadeQueries().getSubmitData(Long.valueOf(publishedId), agentId, scoringoption, gradingId); } catch (Exception e) { log.error(e.getMessage(), e); return new HashMap(); } } | /**
* Get the last submission for a student per assessment
*/ | Get the last submission for a student per assessment | getSubmitData | {
"repo_name": "zqian/sakai",
"path": "samigo/samigo-services/src/java/org/sakaiproject/tool/assessment/services/GradingService.java",
"license": "apache-2.0",
"size": 143447
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 1,843,167 |
@Test
public void testResponseRemovedWhenCompletedAndFetched() {
withReplicator(replicator -> {
final Set<NodeIdentifier> nodeIds = new HashSet<>();
nodeIds.add(new NodeIdentifier("1", "localhost", 8000, "localhost", 8001, "localhost", 8002, 8003, false));
final URI uri = new URI("http://localhost:8080/processors/1");
final Entity entity = new ProcessorEntity();
// set the user
final Authentication authentication = new NiFiAuthenticationToken(new NiFiUserDetails(StandardNiFiUser.ANONYMOUS));
SecurityContextHolder.getContext().setAuthentication(authentication);
final AsyncClusterResponse response = replicator.replicate(nodeIds, HttpMethod.GET, uri, entity, new HashMap<>(), true, true);
// We should get back the same response object
assertTrue(response == replicator.getClusterResponse(response.getRequestIdentifier()));
assertEquals(HttpMethod.GET, response.getMethod());
assertEquals(nodeIds, response.getNodesInvolved());
assertTrue(response == replicator.getClusterResponse(response.getRequestIdentifier()));
final NodeResponse nodeResponse = response.awaitMergedResponse(3, TimeUnit.SECONDS);
assertEquals(8000, nodeResponse.getNodeId().getApiPort());
assertEquals(Response.Status.OK.getStatusCode(), nodeResponse.getStatus());
assertNull(replicator.getClusterResponse(response.getRequestIdentifier()));
});
} | void function() { withReplicator(replicator -> { final Set<NodeIdentifier> nodeIds = new HashSet<>(); nodeIds.add(new NodeIdentifier("1", STR, 8000, STR, 8001, STR, 8002, 8003, false)); final URI uri = new URI("http: final Entity entity = new ProcessorEntity(); final Authentication authentication = new NiFiAuthenticationToken(new NiFiUserDetails(StandardNiFiUser.ANONYMOUS)); SecurityContextHolder.getContext().setAuthentication(authentication); final AsyncClusterResponse response = replicator.replicate(nodeIds, HttpMethod.GET, uri, entity, new HashMap<>(), true, true); assertTrue(response == replicator.getClusterResponse(response.getRequestIdentifier())); assertEquals(HttpMethod.GET, response.getMethod()); assertEquals(nodeIds, response.getNodesInvolved()); assertTrue(response == replicator.getClusterResponse(response.getRequestIdentifier())); final NodeResponse nodeResponse = response.awaitMergedResponse(3, TimeUnit.SECONDS); assertEquals(8000, nodeResponse.getNodeId().getApiPort()); assertEquals(Response.Status.OK.getStatusCode(), nodeResponse.getStatus()); assertNull(replicator.getClusterResponse(response.getRequestIdentifier())); }); } | /**
* If we replicate a request, whenever we obtain the merged response from
* the AsyncClusterResponse object, the response should no longer be
* available and should be cleared from internal state. This test is to
* verify that this behavior occurs.
*/ | If we replicate a request, whenever we obtain the merged response from the AsyncClusterResponse object, the response should no longer be available and should be cleared from internal state. This test is to verify that this behavior occurs | testResponseRemovedWhenCompletedAndFetched | {
"repo_name": "zhengsg/nifi",
"path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/test/java/org/apache/nifi/cluster/coordination/http/replication/TestThreadPoolRequestReplicator.java",
"license": "apache-2.0",
"size": 31720
} | [
"java.util.HashMap",
"java.util.HashSet",
"java.util.Set",
"java.util.concurrent.TimeUnit",
"javax.ws.rs.HttpMethod",
"javax.ws.rs.core.Response",
"org.apache.nifi.authorization.user.NiFiUserDetails",
"org.apache.nifi.authorization.user.StandardNiFiUser",
"org.apache.nifi.cluster.manager.NodeResponse",
"org.apache.nifi.cluster.protocol.NodeIdentifier",
"org.apache.nifi.web.api.entity.Entity",
"org.apache.nifi.web.api.entity.ProcessorEntity",
"org.apache.nifi.web.security.token.NiFiAuthenticationToken",
"org.junit.Assert",
"org.springframework.security.core.Authentication",
"org.springframework.security.core.context.SecurityContextHolder"
] | import java.util.HashMap; import java.util.HashSet; import java.util.Set; import java.util.concurrent.TimeUnit; import javax.ws.rs.HttpMethod; import javax.ws.rs.core.Response; import org.apache.nifi.authorization.user.NiFiUserDetails; import org.apache.nifi.authorization.user.StandardNiFiUser; import org.apache.nifi.cluster.manager.NodeResponse; import org.apache.nifi.cluster.protocol.NodeIdentifier; import org.apache.nifi.web.api.entity.Entity; import org.apache.nifi.web.api.entity.ProcessorEntity; import org.apache.nifi.web.security.token.NiFiAuthenticationToken; import org.junit.Assert; import org.springframework.security.core.Authentication; import org.springframework.security.core.context.SecurityContextHolder; | import java.util.*; import java.util.concurrent.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.apache.nifi.authorization.user.*; import org.apache.nifi.cluster.manager.*; import org.apache.nifi.cluster.protocol.*; import org.apache.nifi.web.api.entity.*; import org.apache.nifi.web.security.token.*; import org.junit.*; import org.springframework.security.core.*; import org.springframework.security.core.context.*; | [
"java.util",
"javax.ws",
"org.apache.nifi",
"org.junit",
"org.springframework.security"
] | java.util; javax.ws; org.apache.nifi; org.junit; org.springframework.security; | 1,716,264 |
public PackageIdentifier getPackageId() {
return packageId;
} | PackageIdentifier function() { return packageId; } | /**
* Returns the package that "owns" this glob.
*
* <p>The glob evaluation code ensures that the boundaries of this package are not crossed.
*/ | Returns the package that "owns" this glob. The glob evaluation code ensures that the boundaries of this package are not crossed | getPackageId | {
"repo_name": "rzagabe/bazel",
"path": "src/main/java/com/google/devtools/build/lib/skyframe/GlobDescriptor.java",
"license": "apache-2.0",
"size": 3735
} | [
"com.google.devtools.build.lib.packages.PackageIdentifier"
] | import com.google.devtools.build.lib.packages.PackageIdentifier; | import com.google.devtools.build.lib.packages.*; | [
"com.google.devtools"
] | com.google.devtools; | 1,523,891 |
public void deleteAllById(String kindName, List<String> idList) throws IOException {
// prepare for EntityListDto
EntityListDto cdl = createEntityListDto(kindName, idList);
// delete
getMBSEndpoint().deleteAll(cdl).execute();
Log.i(Consts.TAG, "deleteAll: deleted: " + kindName + ": " + idList);
} | void function(String kindName, List<String> idList) throws IOException { EntityListDto cdl = createEntityListDto(kindName, idList); getMBSEndpoint().deleteAll(cdl).execute(); Log.i(Consts.TAG, STR + kindName + STR + idList); } | /**
* Deletes all the specified {@link CloudEntity}s synchronously.
*
* @param kindName
* Name of the table for the CloudEntity to delete.
* @param idList
* {@link List} that contains a list of Ids to delete.
* @throws IOException
* When the call had failed for any reason.
*/ | Deletes all the specified <code>CloudEntity</code>s synchronously | deleteAllById | {
"repo_name": "smbale/solutions-mobile-backend-starter-android-client",
"path": "src/com/google/cloud/backend/android/CloudBackend.java",
"license": "apache-2.0",
"size": 12280
} | [
"android.util.Log",
"com.google.cloud.backend.android.mobilebackend.model.EntityListDto",
"java.io.IOException",
"java.util.List"
] | import android.util.Log; import com.google.cloud.backend.android.mobilebackend.model.EntityListDto; import java.io.IOException; import java.util.List; | import android.util.*; import com.google.cloud.backend.android.mobilebackend.model.*; import java.io.*; import java.util.*; | [
"android.util",
"com.google.cloud",
"java.io",
"java.util"
] | android.util; com.google.cloud; java.io; java.util; | 772,912 |
protected void updateLayoutLocations(InternalNode[] nodes) {
for (int i = 0; i < nodes.length; i++) {
InternalNode node = nodes[i];
if (!node.hasPreferredLocation()) {
node.setLocation(node.getInternalX(), node.getInternalY());
if ((layout_styles & LayoutStyles.NO_LAYOUT_NODE_RESIZING) != 1) {
// Only set the size if we are supposed to
node.setSize(node.getInternalWidth(), node.getInternalHeight());
}
}
}
} | void function(InternalNode[] nodes) { for (int i = 0; i < nodes.length; i++) { InternalNode node = nodes[i]; if (!node.hasPreferredLocation()) { node.setLocation(node.getInternalX(), node.getInternalY()); if ((layout_styles & LayoutStyles.NO_LAYOUT_NODE_RESIZING) != 1) { node.setSize(node.getInternalWidth(), node.getInternalHeight()); } } } } | /**
* Updates the layout locations so the external nodes know about the new locations
*/ | Updates the layout locations so the external nodes know about the new locations | updateLayoutLocations | {
"repo_name": "uci-sdcl/lighthouse",
"path": "deprecated/org.eclipse.zest.layouts/src/org/eclipse/zest/layouts/algorithms/AbstractLayoutAlgorithm.java",
"license": "epl-1.0",
"size": 38679
} | [
"org.eclipse.zest.layouts.LayoutStyles",
"org.eclipse.zest.layouts.dataStructures.InternalNode"
] | import org.eclipse.zest.layouts.LayoutStyles; import org.eclipse.zest.layouts.dataStructures.InternalNode; | import org.eclipse.zest.layouts.*; | [
"org.eclipse.zest"
] | org.eclipse.zest; | 2,591,301 |
public static DataSource createCSVSource(File file, Charset charset, char separator, boolean containsHeader) {
return new DataSource(file, charset, separator, containsHeader);
}
| static DataSource function(File file, Charset charset, char separator, boolean containsHeader) { return new DataSource(file, charset, separator, containsHeader); } | /**
* Creates a CSV data source.
*
* @param file
* @param separator
* @param containsHeader
* @return
*/ | Creates a CSV data source | createCSVSource | {
"repo_name": "arx-deidentifier/arx",
"path": "src/main/org/deidentifier/arx/DataSource.java",
"license": "apache-2.0",
"size": 10980
} | [
"java.io.File",
"java.nio.charset.Charset"
] | import java.io.File; import java.nio.charset.Charset; | import java.io.*; import java.nio.charset.*; | [
"java.io",
"java.nio"
] | java.io; java.nio; | 2,424,165 |
public void setLabelModel(IModel<String> labelModel) {
valueField.setLabel(labelModel);
labelWasSet = true;
} | void function(IModel<String> labelModel) { valueField.setLabel(labelModel); labelWasSet = true; } | /**
* Sets label model for the value field. It will be used in error messages to replace ${label)
* property
*
* @param labelModel
*/ | Sets label model for the value field. It will be used in error messages to replace ${label) property | setLabelModel | {
"repo_name": "inventiLT/inventi-wicket",
"path": "inventi-wicket-autocomplete/src/main/java/lt/inventi/wicket/component/autocomplete/Autocomplete.java",
"license": "apache-2.0",
"size": 13380
} | [
"org.apache.wicket.model.IModel"
] | import org.apache.wicket.model.IModel; | import org.apache.wicket.model.*; | [
"org.apache.wicket"
] | org.apache.wicket; | 241,871 |
private PathQuery allelesPathQuery(Integer objectId) {
PathQuery query = new PathQuery(im.getModel());
query.addViews("Gene.homologues.homologue.alleles.primaryIdentifier");
query.addConstraint(Constraints.eq("Gene.homologues.homologue.organism.shortName",
"M. musculus"), "A");
query.addConstraint(Constraints.eq("Gene.id", objectId.toString()), "B");
query.setConstraintLogic("A and B");
return query;
} | PathQuery function(Integer objectId) { PathQuery query = new PathQuery(im.getModel()); query.addViews(STR); query.addConstraint(Constraints.eq(STR, STR), "A"); query.addConstraint(Constraints.eq(STR, objectId.toString()), "B"); query.setConstraintLogic(STR); return query; } | /**
* Generate PathQuery to Mousey Alleles
* @param query
* @param objectId
* @return
*/ | Generate PathQuery to Mousey Alleles | allelesPathQuery | {
"repo_name": "joshkh/intermine",
"path": "bio/webapp/src/org/intermine/bio/web/displayer/MetabolicGeneSummaryDisplayer.java",
"license": "lgpl-2.1",
"size": 15458
} | [
"org.intermine.pathquery.Constraints",
"org.intermine.pathquery.PathQuery"
] | import org.intermine.pathquery.Constraints; import org.intermine.pathquery.PathQuery; | import org.intermine.pathquery.*; | [
"org.intermine.pathquery"
] | org.intermine.pathquery; | 2,413,270 |
@Override public void enterEnumDeclaration(@NotNull JavaParser.EnumDeclarationContext ctx) { }
| @Override public void enterEnumDeclaration(@NotNull JavaParser.EnumDeclarationContext ctx) { } | /**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/ | The default implementation does nothing | exitCreatedName | {
"repo_name": "martinaguero/deep",
"path": "src/org/trimatek/deep/lexer/JavaBaseListener.java",
"license": "apache-2.0",
"size": 39286
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 1,030,568 |
static private MiniKdc setupMiniKdc() throws Exception {
Properties conf = MiniKdc.createConf();
conf.put(MiniKdc.DEBUG, true);
MiniKdc kdc = null;
File dir = null;
// There is time lag between selecting a port and trying to bind with it. It's possible that
// another service captures the port in between which'll result in BindException.
boolean bindException;
int numTries = 0;
do {
try {
bindException = false;
dir = new File(HTU.getDataTestDir("kdc").toUri().getPath());
kdc = new MiniKdc(conf, dir);
kdc.start();
} catch (BindException e) {
FileUtils.deleteDirectory(dir); // clean directory
numTries++;
if (numTries == 3) {
log.error("Failed setting up MiniKDC. Tried " + numTries + " times.");
throw e;
}
log.error("BindException encountered when setting up MiniKdc. Trying again.");
bindException = true;
}
} while (bindException);
return kdc;
} | static MiniKdc function() throws Exception { Properties conf = MiniKdc.createConf(); conf.put(MiniKdc.DEBUG, true); MiniKdc kdc = null; File dir = null; boolean bindException; int numTries = 0; do { try { bindException = false; dir = new File(HTU.getDataTestDir("kdc").toUri().getPath()); kdc = new MiniKdc(conf, dir); kdc.start(); } catch (BindException e) { FileUtils.deleteDirectory(dir); numTries++; if (numTries == 3) { log.error(STR + numTries + STR); throw e; } log.error(STR); bindException = true; } } while (bindException); return kdc; } | /**
* Sets up {@link MiniKdc} for testing security.
* Copied from HBaseTestingUtility#setupMiniKdc().
*/ | Sets up <code>MiniKdc</code> for testing security. Copied from HBaseTestingUtility#setupMiniKdc() | setupMiniKdc | {
"repo_name": "francisliu/hbase",
"path": "hbase-http/src/test/java/org/apache/hadoop/hbase/http/log/TestLogLevel.java",
"license": "apache-2.0",
"size": 18554
} | [
"java.io.File",
"java.net.BindException",
"java.util.Properties",
"org.apache.commons.io.FileUtils",
"org.apache.hadoop.minikdc.MiniKdc"
] | import java.io.File; import java.net.BindException; import java.util.Properties; import org.apache.commons.io.FileUtils; import org.apache.hadoop.minikdc.MiniKdc; | import java.io.*; import java.net.*; import java.util.*; import org.apache.commons.io.*; import org.apache.hadoop.minikdc.*; | [
"java.io",
"java.net",
"java.util",
"org.apache.commons",
"org.apache.hadoop"
] | java.io; java.net; java.util; org.apache.commons; org.apache.hadoop; | 940,838 |
@VisibleForTesting
void addConfiguration(CombinedConfiguration combinedConfiguration,
final Configuration configuration) {
if (configuration instanceof AbstractConfiguration) {
combinedConfiguration.addConfiguration((AbstractConfiguration) configuration);
} else {
combinedConfiguration.addConfiguration(setupConfiguration(new AbstractConfiguration() { | void addConfiguration(CombinedConfiguration combinedConfiguration, final Configuration configuration) { if (configuration instanceof AbstractConfiguration) { combinedConfiguration.addConfiguration((AbstractConfiguration) configuration); } else { combinedConfiguration.addConfiguration(setupConfiguration(new AbstractConfiguration() { | /**
* Adds a configuration to the combined configuration, overwriting any
* existing properties.
*/ | Adds a configuration to the combined configuration, overwriting any existing properties | addConfiguration | {
"repo_name": "raja15792/googleads-java-lib",
"path": "modules/ads_lib/src/main/java/com/google/api/ads/common/lib/conf/ConfigurationHelper.java",
"license": "apache-2.0",
"size": 11044
} | [
"org.apache.commons.configuration.AbstractConfiguration",
"org.apache.commons.configuration.CombinedConfiguration",
"org.apache.commons.configuration.Configuration"
] | import org.apache.commons.configuration.AbstractConfiguration; import org.apache.commons.configuration.CombinedConfiguration; import org.apache.commons.configuration.Configuration; | import org.apache.commons.configuration.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,833,533 |
public static void setDouble(Context context, int keyId, double value) {
setDouble(context, getKey(context, keyId), value);
} | static void function(Context context, int keyId, double value) { setDouble(context, getKey(context, keyId), value); } | /**
* Sets a float value from preferences
*
* @param context the context
* @param keyId the key id
* @param value the value
*/ | Sets a float value from preferences | setDouble | {
"repo_name": "ternup/caddisfly-app-camera",
"path": "Caddisfly/src/main/java/com/ternup/caddisfly/util/PreferencesUtils.java",
"license": "agpl-3.0",
"size": 8171
} | [
"android.content.Context"
] | import android.content.Context; | import android.content.*; | [
"android.content"
] | android.content; | 2,112,893 |
public ITextComponent getDisplayName()
{
return (ITextComponent)(this.hasCustomName() ? new TextComponentString(this.getName()) : new TextComponentTranslation(this.getName(), new Object[0]));
} | ITextComponent function() { return (ITextComponent)(this.hasCustomName() ? new TextComponentString(this.getName()) : new TextComponentTranslation(this.getName(), new Object[0])); } | /**
* Get the formatted ChatComponent that will be used for the sender's username in chat
*/ | Get the formatted ChatComponent that will be used for the sender's username in chat | getDisplayName | {
"repo_name": "MartyParty21/AwakenDreamsClient",
"path": "mcp/src/minecraft/net/minecraft/tileentity/TileEntityEnchantmentTable.java",
"license": "gpl-3.0",
"size": 5019
} | [
"net.minecraft.util.text.ITextComponent",
"net.minecraft.util.text.TextComponentString",
"net.minecraft.util.text.TextComponentTranslation"
] | import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.TextComponentString; import net.minecraft.util.text.TextComponentTranslation; | import net.minecraft.util.text.*; | [
"net.minecraft.util"
] | net.minecraft.util; | 2,093,946 |
private void shortcutDocIdsToLoad(SearchContext context) {
final int[] docIdsToLoad;
int docsOffset = 0;
final Suggest suggest = context.queryResult().suggest();
int numSuggestDocs = 0;
final List<CompletionSuggestion> completionSuggestions;
if (suggest != null && suggest.hasScoreDocs()) {
completionSuggestions = suggest.filter(CompletionSuggestion.class);
for (CompletionSuggestion completionSuggestion : completionSuggestions) {
numSuggestDocs += completionSuggestion.getOptions().size();
}
} else {
completionSuggestions = Collections.emptyList();
}
if (context.request().scroll() != null) {
TopDocs topDocs = context.queryResult().topDocs();
docIdsToLoad = new int[topDocs.scoreDocs.length + numSuggestDocs];
for (int i = 0; i < topDocs.scoreDocs.length; i++) {
docIdsToLoad[docsOffset++] = topDocs.scoreDocs[i].doc;
}
} else {
TopDocs topDocs = context.queryResult().topDocs();
if (topDocs.scoreDocs.length < context.from()) {
// no more docs...
docIdsToLoad = new int[numSuggestDocs];
} else {
int totalSize = context.from() + context.size();
docIdsToLoad = new int[Math.min(topDocs.scoreDocs.length - context.from(), context.size()) +
numSuggestDocs];
for (int i = context.from(); i < Math.min(totalSize, topDocs.scoreDocs.length); i++) {
docIdsToLoad[docsOffset++] = topDocs.scoreDocs[i].doc;
}
}
}
for (CompletionSuggestion completionSuggestion : completionSuggestions) {
for (CompletionSuggestion.Entry.Option option : completionSuggestion.getOptions()) {
docIdsToLoad[docsOffset++] = option.getDoc().doc;
}
}
context.docIdsToLoad(docIdsToLoad, 0, docIdsToLoad.length);
} | void function(SearchContext context) { final int[] docIdsToLoad; int docsOffset = 0; final Suggest suggest = context.queryResult().suggest(); int numSuggestDocs = 0; final List<CompletionSuggestion> completionSuggestions; if (suggest != null && suggest.hasScoreDocs()) { completionSuggestions = suggest.filter(CompletionSuggestion.class); for (CompletionSuggestion completionSuggestion : completionSuggestions) { numSuggestDocs += completionSuggestion.getOptions().size(); } } else { completionSuggestions = Collections.emptyList(); } if (context.request().scroll() != null) { TopDocs topDocs = context.queryResult().topDocs(); docIdsToLoad = new int[topDocs.scoreDocs.length + numSuggestDocs]; for (int i = 0; i < topDocs.scoreDocs.length; i++) { docIdsToLoad[docsOffset++] = topDocs.scoreDocs[i].doc; } } else { TopDocs topDocs = context.queryResult().topDocs(); if (topDocs.scoreDocs.length < context.from()) { docIdsToLoad = new int[numSuggestDocs]; } else { int totalSize = context.from() + context.size(); docIdsToLoad = new int[Math.min(topDocs.scoreDocs.length - context.from(), context.size()) + numSuggestDocs]; for (int i = context.from(); i < Math.min(totalSize, topDocs.scoreDocs.length); i++) { docIdsToLoad[docsOffset++] = topDocs.scoreDocs[i].doc; } } } for (CompletionSuggestion completionSuggestion : completionSuggestions) { for (CompletionSuggestion.Entry.Option option : completionSuggestion.getOptions()) { docIdsToLoad[docsOffset++] = option.getDoc().doc; } } context.docIdsToLoad(docIdsToLoad, 0, docIdsToLoad.length); } | /**
* Shortcut ids to load, we load only "from" and up to "size". The phase controller
* handles this as well since the result is always size * shards for Q_A_F
*/ | Shortcut ids to load, we load only "from" and up to "size". The phase controller handles this as well since the result is always size * shards for Q_A_F | shortcutDocIdsToLoad | {
"repo_name": "zkidkid/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/search/SearchService.java",
"license": "apache-2.0",
"size": 40063
} | [
"java.util.Collections",
"java.util.List",
"org.apache.lucene.search.TopDocs",
"org.elasticsearch.search.internal.SearchContext",
"org.elasticsearch.search.suggest.Suggest",
"org.elasticsearch.search.suggest.completion.CompletionSuggestion"
] | import java.util.Collections; import java.util.List; import org.apache.lucene.search.TopDocs; import org.elasticsearch.search.internal.SearchContext; import org.elasticsearch.search.suggest.Suggest; import org.elasticsearch.search.suggest.completion.CompletionSuggestion; | import java.util.*; import org.apache.lucene.search.*; import org.elasticsearch.search.internal.*; import org.elasticsearch.search.suggest.*; import org.elasticsearch.search.suggest.completion.*; | [
"java.util",
"org.apache.lucene",
"org.elasticsearch.search"
] | java.util; org.apache.lucene; org.elasticsearch.search; | 1,274,744 |
@Override
public boolean start(String xmlDescription)
{
Guard.check(xmlDescription);
log_.debug(String.format("Creating domain from XML: %s", xmlDescription));
try
{
connect_.domainCreateLinux(xmlDescription, 0);
}
catch (LibvirtException exception)
{
log_.debug(String.format("Libvirt exception happened: %s", exception.getMessage()));
return false;
}
log_.debug("Domain created successfully!");
return true;
} | boolean function(String xmlDescription) { Guard.check(xmlDescription); log_.debug(String.format(STR, xmlDescription)); try { connect_.domainCreateLinux(xmlDescription, 0); } catch (LibvirtException exception) { log_.debug(String.format(STR, exception.getMessage())); return false; } log_.debug(STR); return true; } | /**
* Launches a new Linux guest domain based on XML description.
*
* @param xmlDescription XML description of the domain
* @return true if everything ok, false otherwise
*/ | Launches a new Linux guest domain based on XML description | start | {
"repo_name": "snoozesoftware/snoozenode",
"path": "src/main/java/org/inria/myriads/snoozenode/localcontroller/actuator/api/impl/LibVirtVirtualMachineActuator.java",
"license": "gpl-2.0",
"size": 12799
} | [
"org.inria.myriads.snoozecommon.guard.Guard",
"org.libvirt.LibvirtException"
] | import org.inria.myriads.snoozecommon.guard.Guard; import org.libvirt.LibvirtException; | import org.inria.myriads.snoozecommon.guard.*; import org.libvirt.*; | [
"org.inria.myriads",
"org.libvirt"
] | org.inria.myriads; org.libvirt; | 478,110 |
public static java.util.Set extractActivitySet(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.ActivityLiteVoCollection voCollection)
{
return extractActivitySet(domainFactory, voCollection, null, new HashMap());
}
| static java.util.Set function(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.ActivityLiteVoCollection voCollection) { return extractActivitySet(domainFactory, voCollection, null, new HashMap()); } | /**
* Create the ims.core.resource.place.domain.objects.Activity set from the value object collection.
* @param domainFactory - used to create existing (persistent) domain objects.
* @param voCollection - the collection of value objects
*/ | Create the ims.core.resource.place.domain.objects.Activity set from the value object collection | extractActivitySet | {
"repo_name": "open-health-hub/openmaxims-linux",
"path": "openmaxims_workspace/ValueObjects/src/ims/core/vo/domain/ActivityLiteVoAssembler.java",
"license": "agpl-3.0",
"size": 15947
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 2,157,662 |
public static <T> void ensureIndex(ObjectArrayList<T> list, int index, T value) {
while (list.size() <= index) {
list.add(value);
}
}
| static <T> void function(ObjectArrayList<T> list, int index, T value) { while (list.size() <= index) { list.add(value); } } | /**
* Ensures valid index in provided list by filling list with provided values
* until the index is valid.
*/ | Ensures valid index in provided list by filling list with provided values until the index is valid | ensureIndex | {
"repo_name": "danke-sra/GearVRf",
"path": "GVRf/Framework/src/org/gearvrf/bulletphysics/linearmath/MiscUtil.java",
"license": "apache-2.0",
"size": 5697
} | [
"org.gearvrf.bulletphysics.util.ObjectArrayList"
] | import org.gearvrf.bulletphysics.util.ObjectArrayList; | import org.gearvrf.bulletphysics.util.*; | [
"org.gearvrf.bulletphysics"
] | org.gearvrf.bulletphysics; | 129,145 |
void assertGaugeLt(String name, double expected, BaseSource source); | void assertGaugeLt(String name, double expected, BaseSource source); | /**
* Assert that a gauge exists and it's value is less than a given value
*
* @param name The name of the gauge
* @param expected Value that the gauge is expected to be less than
* @param source The BaseSource{@link BaseSource} that will provide the tags,
* gauges, and counters.
*/ | Assert that a gauge exists and it's value is less than a given value | assertGaugeLt | {
"repo_name": "ultratendency/hbase",
"path": "hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/test/MetricsAssertHelper.java",
"license": "apache-2.0",
"size": 6630
} | [
"org.apache.hadoop.hbase.metrics.BaseSource"
] | import org.apache.hadoop.hbase.metrics.BaseSource; | import org.apache.hadoop.hbase.metrics.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 982,683 |
public Context enterContext() {
return contextFactory.enterContext();
}
| Context function() { return contextFactory.enterContext(); } | /**
* Enters new context.
*
* @return New entered context.
*/ | Enters new context | enterContext | {
"repo_name": "ITman1/ScriptBox",
"path": "src/main/java/org/fit/cssbox/scriptbox/script/javascript/WindowJavaScriptEngine.java",
"license": "gpl-2.0",
"size": 13161
} | [
"org.mozilla.javascript.Context"
] | import org.mozilla.javascript.Context; | import org.mozilla.javascript.*; | [
"org.mozilla.javascript"
] | org.mozilla.javascript; | 2,807,568 |
private void setContacts(Customer customer, List<PTContactEntity> contacts)
throws RequiredFieldNotFoundException, InvalidContactTypeException {
for (PTContactEntity ce : contacts) {
if ((this.optionalParam = this.validateString("Telephone", ce.getTelephone(), this.MAX_LENGTH_20, false))
.length() > 0) {
customer.setTelephone(this.optionalParam);
} else {
if ((this.optionalParam = this.validateString("Telephone", ce.getMobile(), this.MAX_LENGTH_20, false))
.length() > 0) {
customer.setTelephone(this.optionalParam);
}
}
if ((this.optionalParam = this.validateString("Fax", ce.getFax(), this.MAX_LENGTH_20, false))
.length() > 0) {
customer.setFax(this.optionalParam);
}
if ((this.optionalParam = this.validateString("Email", ce.getEmail(), this.MAX_LENGTH_60, false))
.length() > 0) {
customer.setEmail(this.optionalParam);
}
if ((this.optionalParam = this.validateString("Website", ce.getWebsite(), this.MAX_LENGTH_60, false))
.length() > 0) {
customer.setWebsite(this.optionalParam);
}
}
} | void function(Customer customer, List<PTContactEntity> contacts) throws RequiredFieldNotFoundException, InvalidContactTypeException { for (PTContactEntity ce : contacts) { if ((this.optionalParam = this.validateString(STR, ce.getTelephone(), this.MAX_LENGTH_20, false)) .length() > 0) { customer.setTelephone(this.optionalParam); } else { if ((this.optionalParam = this.validateString(STR, ce.getMobile(), this.MAX_LENGTH_20, false)) .length() > 0) { customer.setTelephone(this.optionalParam); } } if ((this.optionalParam = this.validateString("Fax", ce.getFax(), this.MAX_LENGTH_20, false)) .length() > 0) { customer.setFax(this.optionalParam); } if ((this.optionalParam = this.validateString("Email", ce.getEmail(), this.MAX_LENGTH_60, false)) .length() > 0) { customer.setEmail(this.optionalParam); } if ((this.optionalParam = this.validateString(STR, ce.getWebsite(), this.MAX_LENGTH_60, false)) .length() > 0) { customer.setWebsite(this.optionalParam); } } } | /**
* Sets the contacts of a customer
*
* @param customer
* @param contacts
* - the customer's list of contacts
* @throws RequiredFieldNotFoundException
* @throws InvalidContactTypeException
*/ | Sets the contacts of a customer | setContacts | {
"repo_name": "premium-minds/billy",
"path": "billy-portugal/src/main/java/com/premiumminds/billy/portugal/services/export/saftpt/v1_03_01/PTSAFTFileGenerator.java",
"license": "lgpl-3.0",
"size": 71224
} | [
"com.premiumminds.billy.portugal.persistence.entities.PTContactEntity",
"com.premiumminds.billy.portugal.services.export.exceptions.InvalidContactTypeException",
"com.premiumminds.billy.portugal.services.export.exceptions.RequiredFieldNotFoundException",
"com.premiumminds.billy.portugal.services.export.saftpt.v1_03_01.schema.Customer",
"java.util.List"
] | import com.premiumminds.billy.portugal.persistence.entities.PTContactEntity; import com.premiumminds.billy.portugal.services.export.exceptions.InvalidContactTypeException; import com.premiumminds.billy.portugal.services.export.exceptions.RequiredFieldNotFoundException; import com.premiumminds.billy.portugal.services.export.saftpt.v1_03_01.schema.Customer; import java.util.List; | import com.premiumminds.billy.portugal.persistence.entities.*; import com.premiumminds.billy.portugal.services.export.exceptions.*; import com.premiumminds.billy.portugal.services.export.saftpt.v1_03_01.schema.*; import java.util.*; | [
"com.premiumminds.billy",
"java.util"
] | com.premiumminds.billy; java.util; | 2,675,471 |
private ResourceCalculatorProcessTree
getResourceCalculatorProcessTree(String pId) {
return ResourceCalculatorProcessTree.
getResourceCalculatorProcessTree(
pId, processTreeClass, conf);
} | ResourceCalculatorProcessTree function(String pId) { return ResourceCalculatorProcessTree. getResourceCalculatorProcessTree( pId, processTreeClass, conf); } | /**
* Get the best process tree calculator.
* @param pId container process id
* @return process tree calculator
*/ | Get the best process tree calculator | getResourceCalculatorProcessTree | {
"repo_name": "szegedim/hadoop",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/ContainersMonitorImpl.java",
"license": "apache-2.0",
"size": 39266
} | [
"org.apache.hadoop.yarn.util.ResourceCalculatorProcessTree"
] | import org.apache.hadoop.yarn.util.ResourceCalculatorProcessTree; | import org.apache.hadoop.yarn.util.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,720,606 |
public Queue<Object> outboundMessages() {
if (outboundMessages == null) {
outboundMessages = new ArrayDeque<Object>();
}
return outboundMessages;
}
/**
* @deprecated use {@link #outboundMessages()} | Queue<Object> function() { if (outboundMessages == null) { outboundMessages = new ArrayDeque<Object>(); } return outboundMessages; } /** * @deprecated use {@link #outboundMessages()} | /**
* Returns the {@link Queue} which holds all the {@link Object}s that were written by this {@link Channel}.
*/ | Returns the <code>Queue</code> which holds all the <code>Object</code>s that were written by this <code>Channel</code> | outboundMessages | {
"repo_name": "Apache9/netty",
"path": "transport/src/main/java/io/netty/channel/embedded/EmbeddedChannel.java",
"license": "apache-2.0",
"size": 27970
} | [
"java.util.ArrayDeque",
"java.util.Queue"
] | import java.util.ArrayDeque; import java.util.Queue; | import java.util.*; | [
"java.util"
] | java.util; | 2,415,456 |
@Test
public void canRememberItsAuthor() throws Exception {
final MkGithub first = new MkGithub("first");
final Github second = first.relogin("second");
final Repo repo = first.randomRepo();
final int number = second.repos()
.get(repo.coordinates())
.issues()
.create("", "")
.number();
final Issue issue = first.repos()
.get(repo.coordinates())
.issues()
.get(number);
MatcherAssert.assertThat(
new Issue.Smart(issue).author().login(),
Matchers.is("second")
);
} | void function() throws Exception { final MkGithub first = new MkGithub("first"); final Github second = first.relogin(STR); final Repo repo = first.randomRepo(); final int number = second.repos() .get(repo.coordinates()) .issues() .create(STR") .number(); final Issue issue = first.repos() .get(repo.coordinates()) .issues() .get(number); MatcherAssert.assertThat( new Issue.Smart(issue).author().login(), Matchers.is(STR) ); } | /**
* MkIssue can remember it's author.
* @throws Exception when a problem occurs.
*/ | MkIssue can remember it's author | canRememberItsAuthor | {
"repo_name": "cvrebert/typed-github",
"path": "src/test/java/com/jcabi/github/mock/MkIssueTest.java",
"license": "bsd-3-clause",
"size": 9955
} | [
"com.jcabi.github.Github",
"com.jcabi.github.Issue",
"com.jcabi.github.Repo",
"org.hamcrest.MatcherAssert",
"org.hamcrest.Matchers"
] | import com.jcabi.github.Github; import com.jcabi.github.Issue; import com.jcabi.github.Repo; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; | import com.jcabi.github.*; import org.hamcrest.*; | [
"com.jcabi.github",
"org.hamcrest"
] | com.jcabi.github; org.hamcrest; | 1,261,139 |
public boolean configureSlavesFile(NodeConfig nodeConfig, Set<String> slaves) {
// configuring slaves file
Result res = null;
try {
LOG.info("Updating Hadoop slaves file",
Constant.Component.Name.HADOOP, nodeConfig.getHost());
String slavesFile = (String) compConfig
.getAdvanceConfProperty(HadoopConstants.AdvanceConfKeys.DIR_CONF) // getConfDir()
+ HadoopConstants.FileName.ConfigurationFile.SLAVES;// "slaves";
AnkushTask clearFile = new ClearFile(slavesFile);
res = nodeConfig.getConnection().exec(clearFile);
if (!res.isSuccess) {
HadoopUtils.addAndLogError(this.LOG, this.clusterConfig,
"Could not clear slaves file contents",
Constant.Component.Name.HADOOP, nodeConfig.getHost());
return false;
}
String slavesFileContent = StringUtils.join(slaves,
Constant.Strings.LINE_SEPERATOR);
AnkushTask appendSlaveFile = new AppendFileUsingEcho(
slavesFileContent, slavesFile);
res = nodeConfig.getConnection().exec(appendSlaveFile);
if (!res.isSuccess) {
HadoopUtils.addAndLogError(this.LOG, this.clusterConfig,
"Could not update slaves file",
Constant.Component.Name.HADOOP, nodeConfig.getHost());
return false;
}
ConfigurationManager confManager = new ConfigurationManager();
// Saving slaveFile property.
confManager.saveConfiguration(this.clusterConfig.getClusterId(),
this.clusterConfig.getCreatedBy(),
HadoopConstants.FileName.ConfigurationFile.SLAVES,
nodeConfig.getHost(), "Slaves List", slavesFileContent);
return true;
} catch (Exception e) {
HadoopUtils.addAndLogError(this.LOG, this.clusterConfig,
"Could not update slaves file.",
Constant.Component.Name.HADOOP, nodeConfig.getHost());
return false;
}
} | boolean function(NodeConfig nodeConfig, Set<String> slaves) { Result res = null; try { LOG.info(STR, Constant.Component.Name.HADOOP, nodeConfig.getHost()); String slavesFile = (String) compConfig .getAdvanceConfProperty(HadoopConstants.AdvanceConfKeys.DIR_CONF) + HadoopConstants.FileName.ConfigurationFile.SLAVES; AnkushTask clearFile = new ClearFile(slavesFile); res = nodeConfig.getConnection().exec(clearFile); if (!res.isSuccess) { HadoopUtils.addAndLogError(this.LOG, this.clusterConfig, STR, Constant.Component.Name.HADOOP, nodeConfig.getHost()); return false; } String slavesFileContent = StringUtils.join(slaves, Constant.Strings.LINE_SEPERATOR); AnkushTask appendSlaveFile = new AppendFileUsingEcho( slavesFileContent, slavesFile); res = nodeConfig.getConnection().exec(appendSlaveFile); if (!res.isSuccess) { HadoopUtils.addAndLogError(this.LOG, this.clusterConfig, STR, Constant.Component.Name.HADOOP, nodeConfig.getHost()); return false; } ConfigurationManager confManager = new ConfigurationManager(); confManager.saveConfiguration(this.clusterConfig.getClusterId(), this.clusterConfig.getCreatedBy(), HadoopConstants.FileName.ConfigurationFile.SLAVES, nodeConfig.getHost(), STR, slavesFileContent); return true; } catch (Exception e) { HadoopUtils.addAndLogError(this.LOG, this.clusterConfig, STR, Constant.Component.Name.HADOOP, nodeConfig.getHost()); return false; } } | /**
* Configure slaves file.
*
* @param nodeConfig
* the node config
* @return true, if successful
*/ | Configure slaves file | configureSlavesFile | {
"repo_name": "zengzhaozheng/ankush",
"path": "ankush/src/main/java/com/impetus/ankush2/hadoop/deployer/configurator/HadoopConfigurator.java",
"license": "lgpl-3.0",
"size": 8458
} | [
"com.impetus.ankush.common.scripting.AnkushTask",
"com.impetus.ankush.common.scripting.impl.AppendFileUsingEcho",
"com.impetus.ankush.common.scripting.impl.ClearFile",
"com.impetus.ankush.common.service.ConfigurationManager",
"com.impetus.ankush2.constant.Constant",
"com.impetus.ankush2.framework.config.NodeConfig",
"com.impetus.ankush2.hadoop.utils.HadoopConstants",
"com.impetus.ankush2.hadoop.utils.HadoopUtils",
"java.util.Set",
"net.neoremind.sshxcute.core.Result",
"org.apache.commons.lang.StringUtils"
] | import com.impetus.ankush.common.scripting.AnkushTask; import com.impetus.ankush.common.scripting.impl.AppendFileUsingEcho; import com.impetus.ankush.common.scripting.impl.ClearFile; import com.impetus.ankush.common.service.ConfigurationManager; import com.impetus.ankush2.constant.Constant; import com.impetus.ankush2.framework.config.NodeConfig; import com.impetus.ankush2.hadoop.utils.HadoopConstants; import com.impetus.ankush2.hadoop.utils.HadoopUtils; import java.util.Set; import net.neoremind.sshxcute.core.Result; import org.apache.commons.lang.StringUtils; | import com.impetus.ankush.common.scripting.*; import com.impetus.ankush.common.scripting.impl.*; import com.impetus.ankush.common.service.*; import com.impetus.ankush2.constant.*; import com.impetus.ankush2.framework.config.*; import com.impetus.ankush2.hadoop.utils.*; import java.util.*; import net.neoremind.sshxcute.core.*; import org.apache.commons.lang.*; | [
"com.impetus.ankush",
"com.impetus.ankush2",
"java.util",
"net.neoremind.sshxcute",
"org.apache.commons"
] | com.impetus.ankush; com.impetus.ankush2; java.util; net.neoremind.sshxcute; org.apache.commons; | 970,804 |
public ReportInfo getCabBatchMismatchReportInfo() {
return cabBatchMismatchReportInfo;
} | ReportInfo function() { return cabBatchMismatchReportInfo; } | /**
* Gets the cabBatchMismatchReportInfo attribute.
*
* @return Returns the cabBatchMismatchReportInfo.
*/ | Gets the cabBatchMismatchReportInfo attribute | getCabBatchMismatchReportInfo | {
"repo_name": "quikkian-ua-devops/will-financials",
"path": "kfs-cam/src/main/java/org/kuali/kfs/module/cam/batch/service/impl/BatchExtractReportServiceImpl.java",
"license": "agpl-3.0",
"size": 7144
} | [
"org.kuali.kfs.sys.report.ReportInfo"
] | import org.kuali.kfs.sys.report.ReportInfo; | import org.kuali.kfs.sys.report.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 992,144 |
public Date getDateTime() {
return dateTime;
} | Date function() { return dateTime; } | /**
* Gets the date time.
*
* @return The dateTime
*/ | Gets the date time | getDateTime | {
"repo_name": "m2fd/java-sdk",
"path": "src/main/java/com/ibm/watson/developer_cloud/dialog/v1/model/Message.java",
"license": "apache-2.0",
"size": 1869
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 2,194,378 |
private MultiPointToSinglePointIntent buildUniIntent(Key key,
Set<ConnectPoint> srcs,
ConnectPoint dst,
VlanId vlanId,
MacAddress mac) {
log.debug("Building mp2p intent to {}", dst);
MultiPointToSinglePointIntent intent;
TrafficTreatment treatment = DefaultTrafficTreatment.emptyTreatment();
TrafficSelector.Builder builder = DefaultTrafficSelector.builder()
.matchEthDst(mac)
.matchVlanId(vlanId);
TrafficSelector selector = builder.build();
intent = MultiPointToSinglePointIntent.builder()
.appId(appId)
.key(key)
.selector(selector)
.treatment(treatment)
.ingressPoints(srcs)
.egressPoint(dst)
.priority(PRIORITY_OFFSET)
.build();
return intent;
} | MultiPointToSinglePointIntent function(Key key, Set<ConnectPoint> srcs, ConnectPoint dst, VlanId vlanId, MacAddress mac) { log.debug(STR, dst); MultiPointToSinglePointIntent intent; TrafficTreatment treatment = DefaultTrafficTreatment.emptyTreatment(); TrafficSelector.Builder builder = DefaultTrafficSelector.builder() .matchEthDst(mac) .matchVlanId(vlanId); TrafficSelector selector = builder.build(); intent = MultiPointToSinglePointIntent.builder() .appId(appId) .key(key) .selector(selector) .treatment(treatment) .ingressPoints(srcs) .egressPoint(dst) .priority(PRIORITY_OFFSET) .build(); return intent; } | /**
* Builds a Multi Point to Single Point intent.
*
* @param srcs The source Connect Points
* @param dst The destination Connect Point
* @return Multi Point to Single Point intent generated.
*/ | Builds a Multi Point to Single Point intent | buildUniIntent | {
"repo_name": "sonu283304/onos",
"path": "apps/vpls/src/main/java/org/onosproject/vpls/IntentInstaller.java",
"license": "apache-2.0",
"size": 9397
} | [
"java.util.Set",
"org.onlab.packet.MacAddress",
"org.onlab.packet.VlanId",
"org.onosproject.net.ConnectPoint",
"org.onosproject.net.flow.DefaultTrafficSelector",
"org.onosproject.net.flow.DefaultTrafficTreatment",
"org.onosproject.net.flow.TrafficSelector",
"org.onosproject.net.flow.TrafficTreatment",
"org.onosproject.net.intent.Key",
"org.onosproject.net.intent.MultiPointToSinglePointIntent"
] | import java.util.Set; import org.onlab.packet.MacAddress; import org.onlab.packet.VlanId; import org.onosproject.net.ConnectPoint; import org.onosproject.net.flow.DefaultTrafficSelector; import org.onosproject.net.flow.DefaultTrafficTreatment; import org.onosproject.net.flow.TrafficSelector; import org.onosproject.net.flow.TrafficTreatment; import org.onosproject.net.intent.Key; import org.onosproject.net.intent.MultiPointToSinglePointIntent; | import java.util.*; import org.onlab.packet.*; import org.onosproject.net.*; import org.onosproject.net.flow.*; import org.onosproject.net.intent.*; | [
"java.util",
"org.onlab.packet",
"org.onosproject.net"
] | java.util; org.onlab.packet; org.onosproject.net; | 131,350 |
private static TopWebSearchResult getWebSearchResult(BlackboardArtifact artifact) {
String searchString = DataSourceInfoUtilities.getStringOrNull(artifact, TYPE_TEXT);
Date dateAccessed = DataSourceInfoUtilities.getDateOrNull(artifact, TYPE_DATETIME_ACCESSED);
return (StringUtils.isNotBlank(searchString) && dateAccessed != null)
? new TopWebSearchResult(searchString, dateAccessed, artifact)
: null;
} | static TopWebSearchResult function(BlackboardArtifact artifact) { String searchString = DataSourceInfoUtilities.getStringOrNull(artifact, TYPE_TEXT); Date dateAccessed = DataSourceInfoUtilities.getDateOrNull(artifact, TYPE_DATETIME_ACCESSED); return (StringUtils.isNotBlank(searchString) && dateAccessed != null) ? new TopWebSearchResult(searchString, dateAccessed, artifact) : null; } | /**
* Attempts to obtain a web search result record from a blackboard artifact.
*
* @param artifact The artifact.
*
* @return The TopWebSearchResult or null if the search string or date
* accessed cannot be determined.
*/ | Attempts to obtain a web search result record from a blackboard artifact | getWebSearchResult | {
"repo_name": "sleuthkit/autopsy",
"path": "Core/src/org/sleuthkit/autopsy/datasourcesummary/datamodel/UserActivitySummary.java",
"license": "apache-2.0",
"size": 42236
} | [
"java.util.Date",
"org.apache.commons.lang3.StringUtils",
"org.sleuthkit.datamodel.BlackboardArtifact"
] | import java.util.Date; import org.apache.commons.lang3.StringUtils; import org.sleuthkit.datamodel.BlackboardArtifact; | import java.util.*; import org.apache.commons.lang3.*; import org.sleuthkit.datamodel.*; | [
"java.util",
"org.apache.commons",
"org.sleuthkit.datamodel"
] | java.util; org.apache.commons; org.sleuthkit.datamodel; | 408,883 |
public static void main(String[] args)
{
createSShell();
sShell.open();
while(!sShell.isDisposed())
while(!Display.getCurrent().readAndDispatch())
Display.getCurrent().sleep();
}
| static void function(String[] args) { createSShell(); sShell.open(); while(!sShell.isDisposed()) while(!Display.getCurrent().readAndDispatch()) Display.getCurrent().sleep(); } | /**
* This method initializes sShell
*/ | This method initializes sShell | main | {
"repo_name": "btrzcinski/netchat",
"path": "j-client/testing/TreeTest.java",
"license": "gpl-2.0",
"size": 1391
} | [
"org.eclipse.swt.widgets.Display"
] | import org.eclipse.swt.widgets.Display; | import org.eclipse.swt.widgets.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 2,538,540 |
void saveSyncInfo(String key, Order order); | void saveSyncInfo(String key, Order order); | /**
* Saves synchronization info.
*
* @param key
* the key(label)
* @param order
* an order which already synchronized
*/ | Saves synchronization info | saveSyncInfo | {
"repo_name": "dgray16/libreplan",
"path": "libreplan-webapp/src/main/java/org/libreplan/importers/IJiraOrderElementSynchronizer.java",
"license": "agpl-3.0",
"size": 4680
} | [
"org.libreplan.business.orders.entities.Order"
] | import org.libreplan.business.orders.entities.Order; | import org.libreplan.business.orders.entities.*; | [
"org.libreplan.business"
] | org.libreplan.business; | 2,540,097 |
static PythonFunction getPythonFunction(String fullyQualifiedName, ReadableConfig config)
throws IOException, ExecutionException, InterruptedException {
int splitIndex = fullyQualifiedName.lastIndexOf(".");
if (splitIndex <= 0) {
throw new IllegalArgumentException(
String.format("The fully qualified name is invalid: '%s'", fullyQualifiedName));
}
String moduleName = fullyQualifiedName.substring(0, splitIndex);
String objectName = fullyQualifiedName.substring(splitIndex + 1);
Configuration mergedConfig =
new Configuration(
ExecutionEnvironment.getExecutionEnvironment().getConfiguration());
mergedConfig.addAll((Configuration) config);
PythonFunctionFactory pythonFunctionFactory = getPythonFunctionFactory(mergedConfig);
return pythonFunctionFactory.getPythonFunction(moduleName, objectName);
} | static PythonFunction getPythonFunction(String fullyQualifiedName, ReadableConfig config) throws IOException, ExecutionException, InterruptedException { int splitIndex = fullyQualifiedName.lastIndexOf("."); if (splitIndex <= 0) { throw new IllegalArgumentException( String.format(STR, fullyQualifiedName)); } String moduleName = fullyQualifiedName.substring(0, splitIndex); String objectName = fullyQualifiedName.substring(splitIndex + 1); Configuration mergedConfig = new Configuration( ExecutionEnvironment.getExecutionEnvironment().getConfiguration()); mergedConfig.addAll((Configuration) config); PythonFunctionFactory pythonFunctionFactory = getPythonFunctionFactory(mergedConfig); return pythonFunctionFactory.getPythonFunction(moduleName, objectName); } | /**
* Returns PythonFunction according to the fully qualified name of the Python UDF i.e
* ${moduleName}.${functionName} or ${moduleName}.${className}.
*
* @param fullyQualifiedName The fully qualified name of the Python UDF.
* @param config The configuration of python dependencies.
* @return The PythonFunction object which represents the Python UDF.
*/ | Returns PythonFunction according to the fully qualified name of the Python UDF i.e ${moduleName}.${functionName} or ${moduleName}.${className} | getPythonFunction | {
"repo_name": "aljoscha/flink",
"path": "flink-python/src/main/java/org/apache/flink/client/python/PythonFunctionFactory.java",
"license": "apache-2.0",
"size": 8565
} | [
"java.io.IOException",
"java.util.concurrent.ExecutionException",
"org.apache.flink.api.java.ExecutionEnvironment",
"org.apache.flink.configuration.Configuration",
"org.apache.flink.configuration.ReadableConfig",
"org.apache.flink.table.functions.python.PythonFunction"
] | import java.io.IOException; import java.util.concurrent.ExecutionException; import org.apache.flink.api.java.ExecutionEnvironment; import org.apache.flink.configuration.Configuration; import org.apache.flink.configuration.ReadableConfig; import org.apache.flink.table.functions.python.PythonFunction; | import java.io.*; import java.util.concurrent.*; import org.apache.flink.api.java.*; import org.apache.flink.configuration.*; import org.apache.flink.table.functions.python.*; | [
"java.io",
"java.util",
"org.apache.flink"
] | java.io; java.util; org.apache.flink; | 1,063,660 |
public void setDueType()
{
Timestamp due = getDateNextAction();
if (due == null)
return;
//
Timestamp overdue = TimeUtil.addDays(due, getRequestType().getDueDateTolerance());
Timestamp now = new Timestamp (System.currentTimeMillis());
//
String DueType = DUETYPE_Due;
if (now.before(due))
DueType = DUETYPE_Scheduled;
else if (now.after(overdue))
DueType = DUETYPE_Overdue;
super.setDueType(DueType);
} // setDueType
| void function() { Timestamp due = getDateNextAction(); if (due == null) return; Timestamp overdue = TimeUtil.addDays(due, getRequestType().getDueDateTolerance()); Timestamp now = new Timestamp (System.currentTimeMillis()); String DueType = DUETYPE_Due; if (now.before(due)) DueType = DUETYPE_Scheduled; else if (now.after(overdue)) DueType = DUETYPE_Overdue; super.setDueType(DueType); } | /**
* Set DueType based on Date Next Action
*/ | Set DueType based on Date Next Action | setDueType | {
"repo_name": "erpcya/adempierePOS",
"path": "base/src/org/compiere/model/MRequest.java",
"license": "gpl-2.0",
"size": 37907
} | [
"java.sql.Timestamp",
"org.compiere.util.TimeUtil"
] | import java.sql.Timestamp; import org.compiere.util.TimeUtil; | import java.sql.*; import org.compiere.util.*; | [
"java.sql",
"org.compiere.util"
] | java.sql; org.compiere.util; | 279,061 |
@Override
protected final void setProvider(Provider p) {
super.setProvider(p);
if (null == this.pro) {
this.pro = p;
}
} | final void function(Provider p) { super.setProvider(p); if (null == this.pro) { this.pro = p; } } | /**
* Sets the Provider attribute of the JsseSSLManager object
*
* @param p
* The new Provider value
*/ | Sets the Provider attribute of the JsseSSLManager object | setProvider | {
"repo_name": "benbenw/jmeter",
"path": "src/core/src/main/java/org/apache/jmeter/util/JsseSSLManager.java",
"license": "apache-2.0",
"size": 15371
} | [
"java.security.Provider"
] | import java.security.Provider; | import java.security.*; | [
"java.security"
] | java.security; | 2,587,182 |
public CountRequestBuilder setQuery(XContentBuilder query) {
return setQuery(query.bytes());
} | CountRequestBuilder function(XContentBuilder query) { return setQuery(query.bytes()); } | /**
* Constructs a new builder with a raw search query.
*/ | Constructs a new builder with a raw search query | setQuery | {
"repo_name": "dantuffery/elasticsearch",
"path": "src/main/java/org/elasticsearch/action/count/CountRequestBuilder.java",
"license": "apache-2.0",
"size": 4793
} | [
"org.elasticsearch.common.xcontent.XContentBuilder"
] | import org.elasticsearch.common.xcontent.XContentBuilder; | import org.elasticsearch.common.xcontent.*; | [
"org.elasticsearch.common"
] | org.elasticsearch.common; | 2,526,968 |
private void updateLayouts()
{
mLayoutTherion.setVisibility( View.GONE );
mLayoutCSurvey.setVisibility( View.GONE );
mLayoutDxf.setVisibility( View.GONE );
mLayoutSvg.setVisibility( View.GONE );
mLayoutShp.setVisibility( View.GONE );
mLayoutPng.setVisibility( View.GONE );
mLayoutPdf.setVisibility( View.GONE );
if ( mParentType == 0 ) { // SketchWindow
switch ( mSelectedPos ) {
case 0: mLayoutTherion.setVisibility( View.VISIBLE ); break;
case 1: mLayoutCSurvey.setVisibility( View.VISIBLE ); break;
case 2: mLayoutDxf.setVisibility( View.VISIBLE ); break;
case 3: mLayoutSvg.setVisibility( View.VISIBLE ); break;
case 4: if ( TDLevel.overExpert ) mLayoutShp.setVisibility( View.VISIBLE ); break;
case 5: mLayoutPng.setVisibility( View.VISIBLE ); break;
case 6: mLayoutPdf.setVisibility( View.VISIBLE ); break;
}
} else { // mParentType == 1 // OverviewWindow
switch ( mSelectedPos ) {
case 0: mLayoutTherion.setVisibility( View.VISIBLE ); break;
// case 1: mLayoutCSurvey.setVisibility( View.VISIBLE ); break;
case 1: mLayoutDxf.setVisibility( View.VISIBLE ); break;
case 2: mLayoutSvg.setVisibility( View.VISIBLE ); break;
case 3: if ( TDLevel.overExpert ) mLayoutShp.setVisibility( View.VISIBLE ); break;
case 4: mLayoutPdf.setVisibility( View.VISIBLE ); break;
// case 4: mLayoutPng.setVisibility( View.VISIBLE ); break;
}
}
} | void function() { mLayoutTherion.setVisibility( View.GONE ); mLayoutCSurvey.setVisibility( View.GONE ); mLayoutDxf.setVisibility( View.GONE ); mLayoutSvg.setVisibility( View.GONE ); mLayoutShp.setVisibility( View.GONE ); mLayoutPng.setVisibility( View.GONE ); mLayoutPdf.setVisibility( View.GONE ); if ( mParentType == 0 ) { switch ( mSelectedPos ) { case 0: mLayoutTherion.setVisibility( View.VISIBLE ); break; case 1: mLayoutCSurvey.setVisibility( View.VISIBLE ); break; case 2: mLayoutDxf.setVisibility( View.VISIBLE ); break; case 3: mLayoutSvg.setVisibility( View.VISIBLE ); break; case 4: if ( TDLevel.overExpert ) mLayoutShp.setVisibility( View.VISIBLE ); break; case 5: mLayoutPng.setVisibility( View.VISIBLE ); break; case 6: mLayoutPdf.setVisibility( View.VISIBLE ); break; } } else { switch ( mSelectedPos ) { case 0: mLayoutTherion.setVisibility( View.VISIBLE ); break; case 1: mLayoutDxf.setVisibility( View.VISIBLE ); break; case 2: mLayoutSvg.setVisibility( View.VISIBLE ); break; case 3: if ( TDLevel.overExpert ) mLayoutShp.setVisibility( View.VISIBLE ); break; case 4: mLayoutPdf.setVisibility( View.VISIBLE ); break; } } } | /** update the layouts
*/ | update the layouts | updateLayouts | {
"repo_name": "marcocorvi/topodroid",
"path": "src/com/topodroid/DistoX/ExportDialogPlot.java",
"license": "gpl-3.0",
"size": 13283
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 263,953 |
public static void cleanTaskStagingData(State state, Logger logger, Closer closer,
Map<String, ParallelRunner> parallelRunners) throws IOException {
int numBranches = state.getPropAsInt(ConfigurationKeys.FORK_BRANCHES_KEY, 1);
int parallelRunnerThreads =
state.getPropAsInt(ParallelRunner.PARALLEL_RUNNER_THREADS_KEY, ParallelRunner.DEFAULT_PARALLEL_RUNNER_THREADS);
for (int branchId = 0; branchId < numBranches; branchId++) {
String writerFsUri = state.getProp(
ForkOperatorUtils.getPropertyNameForBranch(ConfigurationKeys.WRITER_FILE_SYSTEM_URI, numBranches, branchId),
ConfigurationKeys.LOCAL_FS_URI);
FileSystem fs = getFsWithProxy(state, writerFsUri);
ParallelRunner parallelRunner = getParallelRunner(fs, closer, parallelRunnerThreads, parallelRunners);
Path stagingPath = WriterUtils.getWriterStagingDir(state, numBranches, branchId);
if (fs.exists(stagingPath)) {
logger.info("Cleaning up staging directory " + stagingPath.toUri().getPath());
parallelRunner.deletePath(stagingPath, true);
}
Path outputPath = WriterUtils.getWriterOutputDir(state, numBranches, branchId);
if (fs.exists(outputPath)) {
logger.info("Cleaning up output directory " + outputPath.toUri().getPath());
parallelRunner.deletePath(outputPath, true);
}
}
} | static void function(State state, Logger logger, Closer closer, Map<String, ParallelRunner> parallelRunners) throws IOException { int numBranches = state.getPropAsInt(ConfigurationKeys.FORK_BRANCHES_KEY, 1); int parallelRunnerThreads = state.getPropAsInt(ParallelRunner.PARALLEL_RUNNER_THREADS_KEY, ParallelRunner.DEFAULT_PARALLEL_RUNNER_THREADS); for (int branchId = 0; branchId < numBranches; branchId++) { String writerFsUri = state.getProp( ForkOperatorUtils.getPropertyNameForBranch(ConfigurationKeys.WRITER_FILE_SYSTEM_URI, numBranches, branchId), ConfigurationKeys.LOCAL_FS_URI); FileSystem fs = getFsWithProxy(state, writerFsUri); ParallelRunner parallelRunner = getParallelRunner(fs, closer, parallelRunnerThreads, parallelRunners); Path stagingPath = WriterUtils.getWriterStagingDir(state, numBranches, branchId); if (fs.exists(stagingPath)) { logger.info(STR + stagingPath.toUri().getPath()); parallelRunner.deletePath(stagingPath, true); } Path outputPath = WriterUtils.getWriterOutputDir(state, numBranches, branchId); if (fs.exists(outputPath)) { logger.info(STR + outputPath.toUri().getPath()); parallelRunner.deletePath(outputPath, true); } } } | /**
* Cleanup staging data of a Gobblin task using a {@link ParallelRunner}.
*
* @param state workunit state.
* @param logger a {@link Logger} used for logging.
* @param closer a closer that registers the given map of ParallelRunners. The caller is responsible
* for closing the closer after the cleaning is done.
* @param parallelRunners a map from FileSystem URI to ParallelRunner.
* @throws IOException if it fails to cleanup the task staging data.
*/ | Cleanup staging data of a Gobblin task using a <code>ParallelRunner</code> | cleanTaskStagingData | {
"repo_name": "Hanmourang/Gobblin",
"path": "gobblin-utility/src/main/java/gobblin/util/JobLauncherUtils.java",
"license": "apache-2.0",
"size": 10722
} | [
"com.google.common.io.Closer",
"java.io.IOException",
"java.util.Map",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.slf4j.Logger"
] | import com.google.common.io.Closer; import java.io.IOException; import java.util.Map; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.slf4j.Logger; | import com.google.common.io.*; import java.io.*; import java.util.*; import org.apache.hadoop.fs.*; import org.slf4j.*; | [
"com.google.common",
"java.io",
"java.util",
"org.apache.hadoop",
"org.slf4j"
] | com.google.common; java.io; java.util; org.apache.hadoop; org.slf4j; | 1,647,820 |
public Set<Object> getPredicateSet(Object key) {
List<Triple> triples = getTriples(key);
Set<Object> result = new HashSet<Object>();
for (Triple triple : triples) {
result.add(triple.getPredicate());
}
return result;
} | Set<Object> function(Object key) { List<Triple> triples = getTriples(key); Set<Object> result = new HashSet<Object>(); for (Triple triple : triples) { result.add(triple.getPredicate()); } return result; } | /**
* get the set of predicates for a given key
*
* @param key
* @return - the set of unique objects for that key
*/ | get the set of predicates for a given key | getPredicateSet | {
"repo_name": "BITPlan/org.sidif.triplestore",
"path": "src/main/java/org/sidif/triple/TripleStore.java",
"license": "apache-2.0",
"size": 9665
} | [
"java.util.HashSet",
"java.util.List",
"java.util.Set"
] | import java.util.HashSet; import java.util.List; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 706,812 |
@SuppressWarnings("unused")
@CalledByNative
private void onAppendResponseHeader(ResponseHeadersMap headersMap, String name, String value) {
try {
if (!headersMap.containsKey(name)) {
headersMap.put(name, new ArrayList<String>());
}
headersMap.get(name).add(value);
} catch (Exception e) {
onCalledByNativeException(e);
}
} | @SuppressWarnings(STR) void function(ResponseHeadersMap headersMap, String name, String value) { try { if (!headersMap.containsKey(name)) { headersMap.put(name, new ArrayList<String>()); } headersMap.get(name).add(value); } catch (Exception e) { onCalledByNativeException(e); } } | /**
* Appends header |name| with value |value| to |headersMap|.
*/ | Appends header |name| with value |value| to |headersMap| | onAppendResponseHeader | {
"repo_name": "danakj/chromium",
"path": "components/cronet/android/java/src/org/chromium/net/impl/ChromiumUrlRequest.java",
"license": "bsd-3-clause",
"size": 26061
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,111,597 |
private static void loadProductVersionHolder() throws SqlException {
try {
dncProductVersionHolder__ = buildProductVersionHolder();
} catch (java.security.PrivilegedActionException e) {
throw new SqlException(null,
new ClientMessageId (SQLState.ERROR_PRIVILEGED_ACTION),
e.getException());
} catch (java.io.IOException ioe) {
throw SqlException.javaException(null, ioe);
}
} | static void function() throws SqlException { try { dncProductVersionHolder__ = buildProductVersionHolder(); } catch (java.security.PrivilegedActionException e) { throw new SqlException(null, new ClientMessageId (SQLState.ERROR_PRIVILEGED_ACTION), e.getException()); } catch (java.io.IOException ioe) { throw SqlException.javaException(null, ioe); } } | /**
* load product version information and accumulate exceptions
*/ | load product version information and accumulate exceptions | loadProductVersionHolder | {
"repo_name": "SnappyDataInc/snappy-store",
"path": "gemfirexd/client/src/main/java/com/pivotal/gemfirexd/internal/client/am/Configuration.java",
"license": "apache-2.0",
"size": 9955
} | [
"com.pivotal.gemfirexd.internal.shared.common.reference.SQLState",
"java.io.IOException"
] | import com.pivotal.gemfirexd.internal.shared.common.reference.SQLState; import java.io.IOException; | import com.pivotal.gemfirexd.internal.shared.common.reference.*; import java.io.*; | [
"com.pivotal.gemfirexd",
"java.io"
] | com.pivotal.gemfirexd; java.io; | 408,112 |
public void setVolume(int volume);
}
public static interface IIFMismatchedFamilyOutput extends Serializable{ | void function(int volume); } public static interface IIFMismatchedFamilyOutput extends Serializable{ | /**
* Changes the output value for tuple field "volume".
* @param volume the field value
*/ | Changes the output value for tuple field "volume" | setVolume | {
"repo_name": "SSEHUB/EASyProducer",
"path": "Plugins/EASy-Producer/ScenariosTest/testdata/real/QualiMaster/feb15/expected/if-gen/eu/qualimaster/families/inf/IFMismatchedFamily.java",
"license": "apache-2.0",
"size": 2723
} | [
"java.io.Serializable"
] | import java.io.Serializable; | import java.io.*; | [
"java.io"
] | java.io; | 1,196,126 |
public Builder floatingRate(RateComputation floatingRate) {
JodaBeanUtils.notNull(floatingRate, "floatingRate");
this.floatingRate = floatingRate;
return this;
} | Builder function(RateComputation floatingRate) { JodaBeanUtils.notNull(floatingRate, STR); this.floatingRate = floatingRate; return this; } | /**
* Sets the floating rate of interest.
* <p>
* The floating rate to be paid is based on this index.
* It will be a well known market index such as 'GBP-LIBOR-3M'.
* @param floatingRate the new value, not null
* @return this, for chaining, not null
*/ | Sets the floating rate of interest. The floating rate to be paid is based on this index. It will be a well known market index such as 'GBP-LIBOR-3M' | floatingRate | {
"repo_name": "jmptrader/Strata",
"path": "modules/product/src/main/java/com/opengamma/strata/product/fra/ResolvedFra.java",
"license": "apache-2.0",
"size": 30862
} | [
"com.opengamma.strata.product.rate.RateComputation",
"org.joda.beans.JodaBeanUtils"
] | import com.opengamma.strata.product.rate.RateComputation; import org.joda.beans.JodaBeanUtils; | import com.opengamma.strata.product.rate.*; import org.joda.beans.*; | [
"com.opengamma.strata",
"org.joda.beans"
] | com.opengamma.strata; org.joda.beans; | 2,692,702 |
List<Entity> findRelatedConceptsWithUrl(
TokenProxy<?, TokenType.Simple> tokenProxy,
String url,
FindRelatedConceptsRequestBuilder params
) throws HodErrorException;
/**
* Query Micro Focus Haven OnDemand for related concepts using query text in a file using a token proxy
* provided by a {@link com.hp.autonomy.hod.client.token.TokenProxyService} | List<Entity> findRelatedConceptsWithUrl( TokenProxy<?, TokenType.Simple> tokenProxy, String url, FindRelatedConceptsRequestBuilder params ) throws HodErrorException; /** * Query Micro Focus Haven OnDemand for related concepts using query text in a file using a token proxy * provided by a {@link com.hp.autonomy.hod.client.token.TokenProxyService} | /**
* Query Micro Focus Haven OnDemand for related concepts using query text from a url using the given token proxy
* @param tokenProxy The token proxy to use to authenticate the request
* @param url A publicly accessible HTTP URL from which the query text can be retrieved
* @param params Additional parameters to be sent as part of the request
* @return A list of related concepts that match the query text
* @throws com.hp.autonomy.hod.client.api.authentication.HodAuthenticationFailedException If the token associated
* with the token proxy has expired
*/ | Query Micro Focus Haven OnDemand for related concepts using query text from a url using the given token proxy | findRelatedConceptsWithUrl | {
"repo_name": "hpautonomy/java-hod-client",
"path": "src/main/java/com/hp/autonomy/hod/client/api/textindex/query/search/FindRelatedConceptsService.java",
"license": "mit",
"size": 10342
} | [
"com.hp.autonomy.hod.client.api.authentication.TokenType",
"com.hp.autonomy.hod.client.error.HodErrorException",
"com.hp.autonomy.hod.client.token.TokenProxy",
"java.util.List"
] | import com.hp.autonomy.hod.client.api.authentication.TokenType; import com.hp.autonomy.hod.client.error.HodErrorException; import com.hp.autonomy.hod.client.token.TokenProxy; import java.util.List; | import com.hp.autonomy.hod.client.api.authentication.*; import com.hp.autonomy.hod.client.error.*; import com.hp.autonomy.hod.client.token.*; import java.util.*; | [
"com.hp.autonomy",
"java.util"
] | com.hp.autonomy; java.util; | 2,541,791 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.