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
|
|---|---|---|---|---|---|---|---|---|---|---|---|
EList<Transformation> getTransformations();
|
EList<Transformation> getTransformations();
|
/**
* Returns the value of the '<em><b>Transformations</b></em>' containment reference list.
* The list contents are of type {@link net.atos.optimus.m2m.engine.sdk.tom.Transformation}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Transformations</em>' containment reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Transformations</em>' containment reference list.
* @see net.atos.optimus.m2m.engine.sdk.tom.TomPackage#getTransformationSet_Transformations()
* @model containment="true" required="true"
* @generated
*/
|
Returns the value of the 'Transformations' containment reference list. The list contents are of type <code>net.atos.optimus.m2m.engine.sdk.tom.Transformation</code>. If the meaning of the 'Transformations' containment reference list isn't clear, there really should be more of a description here...
|
getTransformations
|
{
"repo_name": "awltech/eclipse-optimus",
"path": "net.atos.optimus.m2m.engine.sdk.parent/net.atos.optimus.m2m.engine.sdk.tom/src/main/java/net/atos/optimus/m2m/engine/sdk/tom/TransformationSet.java",
"license": "lgpl-3.0",
"size": 5416
}
|
[
"org.eclipse.emf.common.util.EList"
] |
import org.eclipse.emf.common.util.EList;
|
import org.eclipse.emf.common.util.*;
|
[
"org.eclipse.emf"
] |
org.eclipse.emf;
| 239,002
|
@Override
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
RenderUtil.bindTexture(GUI_TEXTURE);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
TileVat vat = getTileEntity();
if(shouldRenderProgress()) {
int scaled = getProgressScaled(14) + 1;
drawTexturedModalRect(guiLeft + 81, guiTop + 77 - scaled, 176, 14 - scaled, 14, scaled);
IIcon inputIcon = null;
if(vat.currentTaskInputFluid != null) {
inputIcon = vat.currentTaskInputFluid.getStillIcon();
}
IIcon outputIcon = null;
if(vat.currentTaskOutputFluid != null) {
outputIcon = vat.currentTaskOutputFluid.getStillIcon();
}
if(inputIcon != null && outputIcon != null) {
renderVat(inputIcon, outputIcon, vat.getProgress());
}
}
int x = guiLeft + 30;
int y = guiTop + 12;
RenderUtil.renderGuiTank(vat.inputTank, x, y, zLevel, 15, 47);
x = guiLeft + 132;
RenderUtil.renderGuiTank(vat.outputTank, x, y, zLevel, 15, 47);
if(vat.currentTaskOutputFluid != null || vat.outputTank.getFluidAmount() > 0) {
Fluid outputFluid;
if(vat.outputTank.getFluidAmount() > 0) {
outputFluid = vat.outputTank.getFluid().getFluid();
} else {
outputFluid = vat.currentTaskOutputFluid;
}
float mult;
ItemStack inStack = vat.getStackInSlot(0);
if(inStack != null) {
mult = VatRecipeManager.instance.getMultiplierForInput(inStack, outputFluid);
String str = "x" + mult;
x = guiLeft + 63 - fontRendererObj.getStringWidth(str) / 2;
fontRendererObj.drawString(str, x, guiTop + 32, ColorUtil.getRGB(Color.gray), false);
}
inStack = vat.getStackInSlot(1);
if(inStack != null) {
mult = VatRecipeManager.instance.getMultiplierForInput(inStack, outputFluid);
String str = "x" + mult;
x = guiLeft + 113 - fontRendererObj.getStringWidth(str) / 2;
fontRendererObj.drawString(str, x, guiTop + 32, ColorUtil.getRGB(Color.gray), false);
}
}
RenderUtil.bindTexture(GUI_TEXTURE);
super.drawGuiContainerBackgroundLayer(par1, par2, par3);
}
|
void function(float par1, int par2, int par3) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); RenderUtil.bindTexture(GUI_TEXTURE); drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); TileVat vat = getTileEntity(); if(shouldRenderProgress()) { int scaled = getProgressScaled(14) + 1; drawTexturedModalRect(guiLeft + 81, guiTop + 77 - scaled, 176, 14 - scaled, 14, scaled); IIcon inputIcon = null; if(vat.currentTaskInputFluid != null) { inputIcon = vat.currentTaskInputFluid.getStillIcon(); } IIcon outputIcon = null; if(vat.currentTaskOutputFluid != null) { outputIcon = vat.currentTaskOutputFluid.getStillIcon(); } if(inputIcon != null && outputIcon != null) { renderVat(inputIcon, outputIcon, vat.getProgress()); } } int x = guiLeft + 30; int y = guiTop + 12; RenderUtil.renderGuiTank(vat.inputTank, x, y, zLevel, 15, 47); x = guiLeft + 132; RenderUtil.renderGuiTank(vat.outputTank, x, y, zLevel, 15, 47); if(vat.currentTaskOutputFluid != null vat.outputTank.getFluidAmount() > 0) { Fluid outputFluid; if(vat.outputTank.getFluidAmount() > 0) { outputFluid = vat.outputTank.getFluid().getFluid(); } else { outputFluid = vat.currentTaskOutputFluid; } float mult; ItemStack inStack = vat.getStackInSlot(0); if(inStack != null) { mult = VatRecipeManager.instance.getMultiplierForInput(inStack, outputFluid); String str = "x" + mult; x = guiLeft + 63 - fontRendererObj.getStringWidth(str) / 2; fontRendererObj.drawString(str, x, guiTop + 32, ColorUtil.getRGB(Color.gray), false); } inStack = vat.getStackInSlot(1); if(inStack != null) { mult = VatRecipeManager.instance.getMultiplierForInput(inStack, outputFluid); String str = "x" + mult; x = guiLeft + 113 - fontRendererObj.getStringWidth(str) / 2; fontRendererObj.drawString(str, x, guiTop + 32, ColorUtil.getRGB(Color.gray), false); } } RenderUtil.bindTexture(GUI_TEXTURE); super.drawGuiContainerBackgroundLayer(par1, par2, par3); }
|
/**
* Draw the background layer for the GuiContainer (everything behind the
* items)
*/
|
Draw the background layer for the GuiContainer (everything behind the items)
|
drawGuiContainerBackgroundLayer
|
{
"repo_name": "MatthiasMann/EnderIO",
"path": "src/main/java/crazypants/enderio/machine/vat/GuiVat.java",
"license": "unlicense",
"size": 6338
}
|
[
"com.enderio.core.client.render.ColorUtil",
"com.enderio.core.client.render.RenderUtil",
"java.awt.Color",
"net.minecraft.item.ItemStack",
"net.minecraft.util.IIcon",
"net.minecraftforge.fluids.Fluid"
] |
import com.enderio.core.client.render.ColorUtil; import com.enderio.core.client.render.RenderUtil; import java.awt.Color; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraftforge.fluids.Fluid;
|
import com.enderio.core.client.render.*; import java.awt.*; import net.minecraft.item.*; import net.minecraft.util.*; import net.minecraftforge.fluids.*;
|
[
"com.enderio.core",
"java.awt",
"net.minecraft.item",
"net.minecraft.util",
"net.minecraftforge.fluids"
] |
com.enderio.core; java.awt; net.minecraft.item; net.minecraft.util; net.minecraftforge.fluids;
| 116,093
|
public Loader<Cursor> onCreateLoader(int i, Bundle bundle)
{
return new CursorLoader(this,
// Retrieve data rows for the device user's 'profile' contact.
Uri.withAppendedPath(ContactsContract.Profile.CONTENT_URI,
ContactsContract.Contacts.Data.CONTENT_DIRECTORY), ProfileQuery.PROJECTION,
// Select only email addresses.
ContactsContract.Contacts.Data.MIMETYPE +
" = ?", new String[]{ContactsContract.CommonDataKinds.Email
.CONTENT_ITEM_TYPE},
// Show primary email addresses first. Note that there won't be
// a primary email address if the user hasn't specified one.
ContactsContract.Contacts.Data.IS_PRIMARY + " DESC");
}
|
Loader<Cursor> function(int i, Bundle bundle) { return new CursorLoader(this, Uri.withAppendedPath(ContactsContract.Profile.CONTENT_URI, ContactsContract.Contacts.Data.CONTENT_DIRECTORY), ProfileQuery.PROJECTION, ContactsContract.Contacts.Data.MIMETYPE + STR, new String[]{ContactsContract.CommonDataKinds.Email .CONTENT_ITEM_TYPE}, ContactsContract.Contacts.Data.IS_PRIMARY + STR); }
|
/**
* Prepare autocomplete for emails
*
* @param i
* @param bundle
* @return
*/
|
Prepare autocomplete for emails
|
onCreateLoader
|
{
"repo_name": "ricofehr/nextdeploy-android",
"path": "src/main/java/io/nextdeploy/LoginActivity.java",
"license": "mit",
"size": 9927
}
|
[
"android.content.CursorLoader",
"android.content.Loader",
"android.database.Cursor",
"android.net.Uri",
"android.os.Bundle",
"android.provider.ContactsContract"
] |
import android.content.CursorLoader; import android.content.Loader; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.provider.ContactsContract;
|
import android.content.*; import android.database.*; import android.net.*; import android.os.*; import android.provider.*;
|
[
"android.content",
"android.database",
"android.net",
"android.os",
"android.provider"
] |
android.content; android.database; android.net; android.os; android.provider;
| 427,674
|
@Test
public void testBitmapRequestResponse() {
// Sets the bitmap tile size to 150x200 and triggers bitmap request for the upper left tiles
// and their adjacent tiles.
mMediator.updateViewportSize(150, 200, 1f);
// Create mock bitmaps for response.
Bitmap bitmap00 = Mockito.mock(Bitmap.class);
Bitmap bitmap10 = Mockito.mock(Bitmap.class);
Bitmap bitmap20 = Mockito.mock(Bitmap.class);
Bitmap bitmap30 = Mockito.mock(Bitmap.class);
Bitmap bitmap01 = Mockito.mock(Bitmap.class);
Bitmap bitmap11 = Mockito.mock(Bitmap.class);
Bitmap bitmap21 = Mockito.mock(Bitmap.class);
Bitmap bitmap31 = Mockito.mock(Bitmap.class);
Bitmap bitmap02 = Mockito.mock(Bitmap.class);
Bitmap bitmap12 = Mockito.mock(Bitmap.class);
Bitmap bitmap22 = Mockito.mock(Bitmap.class);
SequencedTaskRunner mockTaskRunner = Mockito.mock(SequencedTaskRunner.class);
CompressibleBitmap compressibleBitmap00 =
new CompressibleBitmap(bitmap00, mockTaskRunner, true, true);
CompressibleBitmap compressibleBitmap10 =
new CompressibleBitmap(bitmap10, mockTaskRunner, true, true);
CompressibleBitmap compressibleBitmap20 =
new CompressibleBitmap(bitmap20, mockTaskRunner, true, true);
CompressibleBitmap compressibleBitmap30 =
new CompressibleBitmap(bitmap30, mockTaskRunner, true, true);
CompressibleBitmap compressibleBitmap01 =
new CompressibleBitmap(bitmap01, mockTaskRunner, true, true);
CompressibleBitmap compressibleBitmap11 =
new CompressibleBitmap(bitmap11, mockTaskRunner, true, true);
CompressibleBitmap compressibleBitmap21 =
new CompressibleBitmap(bitmap21, mockTaskRunner, true, true);
CompressibleBitmap compressibleBitmap31 =
new CompressibleBitmap(bitmap31, mockTaskRunner, true, true);
CompressibleBitmap compressibleBitmap02 =
new CompressibleBitmap(bitmap02, mockTaskRunner, true, true);
CompressibleBitmap compressibleBitmap12 =
new CompressibleBitmap(bitmap12, mockTaskRunner, true, true);
CompressibleBitmap compressibleBitmap22 =
new CompressibleBitmap(bitmap22, mockTaskRunner, true, true);
CompressibleBitmap[][] expectedBitmapMatrix = new CompressibleBitmap[12][4];
expectedBitmapMatrix[0][0] = compressibleBitmap00;
expectedBitmapMatrix[0][1] = compressibleBitmap01;
expectedBitmapMatrix[1][0] = compressibleBitmap10;
expectedBitmapMatrix[1][1] = compressibleBitmap11;
expectedBitmapMatrix[2][0] = compressibleBitmap20;
// Call the request callback with mock bitmaps and assert they're added to the model.
mCompositorDelegate.mRequestedBitmap.get(0).mBitmapCallback.onResult(
compressibleBitmap00.getBitmap());
mCompositorDelegate.mRequestedBitmap.get(1).mBitmapCallback.onResult(
compressibleBitmap10.getBitmap());
mCompositorDelegate.mRequestedBitmap.get(2).mBitmapCallback.onResult(
compressibleBitmap01.getBitmap());
mCompositorDelegate.mRequestedBitmap.get(3).mBitmapCallback.onResult(
compressibleBitmap20.getBitmap());
mCompositorDelegate.mRequestedBitmap.get(4).mBitmapCallback.onResult(
compressibleBitmap11.getBitmap());
Assert.assertTrue(Arrays.deepEquals(
expectedBitmapMatrix, mModel.get(PlayerFrameProperties.BITMAP_MATRIX)));
// Move the viewport slightly..
mScrollController.scrollBy(10, 10);
// Scroll should've triggered bitmap requests for an the new tiles as well as adjacent
// tiles. See comments on {@link #testBitmapRequest} for details on which tiles will be
// requested.
// Call the request callback with mock bitmaps and assert they're added to the model.
expectedBitmapMatrix[2][1] = compressibleBitmap21;
// expectedBitmapMatrix[3][0] = compressibleBitmap30;
expectedBitmapMatrix[0][2] = compressibleBitmap02;
expectedBitmapMatrix[1][2] = compressibleBitmap12;
expectedBitmapMatrix[3][1] = compressibleBitmap31;
expectedBitmapMatrix[2][2] = compressibleBitmap22;
mCompositorDelegate.mRequestedBitmap.get(5).mBitmapCallback.onResult(
compressibleBitmap21.getBitmap());
// Mock a compositing failure for this tile. No bitmaps should be added.
mCompositorDelegate.mRequestedBitmap.get(6).mErrorCallback.run();
mCompositorDelegate.mRequestedBitmap.get(7).mBitmapCallback.onResult(
compressibleBitmap02.getBitmap());
mCompositorDelegate.mRequestedBitmap.get(8).mBitmapCallback.onResult(
compressibleBitmap12.getBitmap());
mCompositorDelegate.mRequestedBitmap.get(9).mBitmapCallback.onResult(
compressibleBitmap31.getBitmap());
mCompositorDelegate.mRequestedBitmap.get(10).mBitmapCallback.onResult(
compressibleBitmap22.getBitmap());
Assert.assertTrue(Arrays.deepEquals(
expectedBitmapMatrix, mModel.get(PlayerFrameProperties.BITMAP_MATRIX)));
// Assert 15 bitmap requests have been made in total.
Assert.assertEquals(11, mCompositorDelegate.mRequestedBitmap.size());
// Move the view port while staying within the current tiles in order to trigger the
// request logic again. Make sure only one new request is added, for the tile with a
// compositing failure.
mScrollController.scrollBy(10, 10);
Assert.assertEquals(12, mCompositorDelegate.mRequestedBitmap.size());
Assert.assertEquals(new RequestedBitmap(mFrameGuid, getRectForTile(150, 100, 3, 0), 1f),
mCompositorDelegate.mRequestedBitmap.get(
mCompositorDelegate.mRequestedBitmap.size() - 1));
}
|
void function() { mMediator.updateViewportSize(150, 200, 1f); Bitmap bitmap00 = Mockito.mock(Bitmap.class); Bitmap bitmap10 = Mockito.mock(Bitmap.class); Bitmap bitmap20 = Mockito.mock(Bitmap.class); Bitmap bitmap30 = Mockito.mock(Bitmap.class); Bitmap bitmap01 = Mockito.mock(Bitmap.class); Bitmap bitmap11 = Mockito.mock(Bitmap.class); Bitmap bitmap21 = Mockito.mock(Bitmap.class); Bitmap bitmap31 = Mockito.mock(Bitmap.class); Bitmap bitmap02 = Mockito.mock(Bitmap.class); Bitmap bitmap12 = Mockito.mock(Bitmap.class); Bitmap bitmap22 = Mockito.mock(Bitmap.class); SequencedTaskRunner mockTaskRunner = Mockito.mock(SequencedTaskRunner.class); CompressibleBitmap compressibleBitmap00 = new CompressibleBitmap(bitmap00, mockTaskRunner, true, true); CompressibleBitmap compressibleBitmap10 = new CompressibleBitmap(bitmap10, mockTaskRunner, true, true); CompressibleBitmap compressibleBitmap20 = new CompressibleBitmap(bitmap20, mockTaskRunner, true, true); CompressibleBitmap compressibleBitmap30 = new CompressibleBitmap(bitmap30, mockTaskRunner, true, true); CompressibleBitmap compressibleBitmap01 = new CompressibleBitmap(bitmap01, mockTaskRunner, true, true); CompressibleBitmap compressibleBitmap11 = new CompressibleBitmap(bitmap11, mockTaskRunner, true, true); CompressibleBitmap compressibleBitmap21 = new CompressibleBitmap(bitmap21, mockTaskRunner, true, true); CompressibleBitmap compressibleBitmap31 = new CompressibleBitmap(bitmap31, mockTaskRunner, true, true); CompressibleBitmap compressibleBitmap02 = new CompressibleBitmap(bitmap02, mockTaskRunner, true, true); CompressibleBitmap compressibleBitmap12 = new CompressibleBitmap(bitmap12, mockTaskRunner, true, true); CompressibleBitmap compressibleBitmap22 = new CompressibleBitmap(bitmap22, mockTaskRunner, true, true); CompressibleBitmap[][] expectedBitmapMatrix = new CompressibleBitmap[12][4]; expectedBitmapMatrix[0][0] = compressibleBitmap00; expectedBitmapMatrix[0][1] = compressibleBitmap01; expectedBitmapMatrix[1][0] = compressibleBitmap10; expectedBitmapMatrix[1][1] = compressibleBitmap11; expectedBitmapMatrix[2][0] = compressibleBitmap20; mCompositorDelegate.mRequestedBitmap.get(0).mBitmapCallback.onResult( compressibleBitmap00.getBitmap()); mCompositorDelegate.mRequestedBitmap.get(1).mBitmapCallback.onResult( compressibleBitmap10.getBitmap()); mCompositorDelegate.mRequestedBitmap.get(2).mBitmapCallback.onResult( compressibleBitmap01.getBitmap()); mCompositorDelegate.mRequestedBitmap.get(3).mBitmapCallback.onResult( compressibleBitmap20.getBitmap()); mCompositorDelegate.mRequestedBitmap.get(4).mBitmapCallback.onResult( compressibleBitmap11.getBitmap()); Assert.assertTrue(Arrays.deepEquals( expectedBitmapMatrix, mModel.get(PlayerFrameProperties.BITMAP_MATRIX))); mScrollController.scrollBy(10, 10); expectedBitmapMatrix[2][1] = compressibleBitmap21; expectedBitmapMatrix[0][2] = compressibleBitmap02; expectedBitmapMatrix[1][2] = compressibleBitmap12; expectedBitmapMatrix[3][1] = compressibleBitmap31; expectedBitmapMatrix[2][2] = compressibleBitmap22; mCompositorDelegate.mRequestedBitmap.get(5).mBitmapCallback.onResult( compressibleBitmap21.getBitmap()); mCompositorDelegate.mRequestedBitmap.get(6).mErrorCallback.run(); mCompositorDelegate.mRequestedBitmap.get(7).mBitmapCallback.onResult( compressibleBitmap02.getBitmap()); mCompositorDelegate.mRequestedBitmap.get(8).mBitmapCallback.onResult( compressibleBitmap12.getBitmap()); mCompositorDelegate.mRequestedBitmap.get(9).mBitmapCallback.onResult( compressibleBitmap31.getBitmap()); mCompositorDelegate.mRequestedBitmap.get(10).mBitmapCallback.onResult( compressibleBitmap22.getBitmap()); Assert.assertTrue(Arrays.deepEquals( expectedBitmapMatrix, mModel.get(PlayerFrameProperties.BITMAP_MATRIX))); Assert.assertEquals(11, mCompositorDelegate.mRequestedBitmap.size()); mScrollController.scrollBy(10, 10); Assert.assertEquals(12, mCompositorDelegate.mRequestedBitmap.size()); Assert.assertEquals(new RequestedBitmap(mFrameGuid, getRectForTile(150, 100, 3, 0), 1f), mCompositorDelegate.mRequestedBitmap.get( mCompositorDelegate.mRequestedBitmap.size() - 1)); }
|
/**
* Mocks responses on bitmap requests from {@link PlayerFrameMediator} and tests those responses
* are correctly handled.
*/
|
Mocks responses on bitmap requests from <code>PlayerFrameMediator</code> and tests those responses are correctly handled
|
testBitmapRequestResponse
|
{
"repo_name": "ric2b/Vivaldi-browser",
"path": "chromium/components/paint_preview/player/android/junit/src/org/chromium/components/paintpreview/player/frame/PlayerFrameMediatorTest.java",
"license": "bsd-3-clause",
"size": 68666
}
|
[
"android.graphics.Bitmap",
"java.util.Arrays",
"org.chromium.base.task.SequencedTaskRunner",
"org.junit.Assert",
"org.mockito.Mockito"
] |
import android.graphics.Bitmap; import java.util.Arrays; import org.chromium.base.task.SequencedTaskRunner; import org.junit.Assert; import org.mockito.Mockito;
|
import android.graphics.*; import java.util.*; import org.chromium.base.task.*; import org.junit.*; import org.mockito.*;
|
[
"android.graphics",
"java.util",
"org.chromium.base",
"org.junit",
"org.mockito"
] |
android.graphics; java.util; org.chromium.base; org.junit; org.mockito;
| 2,048,991
|
public boolean abort() throws LoginException {
if (!isAuthSucceeded())
return false;
if (isAuthSucceeded() && !isCommitSucceeded())
reset();
else
logout();
return true;
}
|
boolean function() throws LoginException { if (!isAuthSucceeded()) return false; if (isAuthSucceeded() && !isCommitSucceeded()) reset(); else logout(); return true; }
|
/**
* Abort authentication (when overall authentication fails)
*/
|
Abort authentication (when overall authentication fails)
|
abort
|
{
"repo_name": "zuzanamullerova/unitime",
"path": "JavaSource/org/unitime/timetable/authenticate/jaas/LdapAuthenticateModule.java",
"license": "apache-2.0",
"size": 8650
}
|
[
"javax.security.auth.login.LoginException"
] |
import javax.security.auth.login.LoginException;
|
import javax.security.auth.login.*;
|
[
"javax.security"
] |
javax.security;
| 1,566,265
|
public void removeOnChildAttachStateChangeListener(
@NonNull OnChildAttachStateChangeListener listener) {
if (mOnChildAttachStateListeners == null) {
return;
}
mOnChildAttachStateListeners.remove(listener);
}
|
void function( @NonNull OnChildAttachStateChangeListener listener) { if (mOnChildAttachStateListeners == null) { return; } mOnChildAttachStateListeners.remove(listener); }
|
/**
* Removes the provided listener from child attached state listeners list.
*
* @param listener Listener to unregister
*/
|
Removes the provided listener from child attached state listeners list
|
removeOnChildAttachStateChangeListener
|
{
"repo_name": "aosp-mirror/platform_frameworks_support",
"path": "v7/recyclerview/src/main/java/androidx/recyclerview/widget/RecyclerView.java",
"license": "apache-2.0",
"size": 582575
}
|
[
"androidx.annotation.NonNull"
] |
import androidx.annotation.NonNull;
|
import androidx.annotation.*;
|
[
"androidx.annotation"
] |
androidx.annotation;
| 1,942,913
|
@JsonSerialize(using = DatetimePickerFieldSerializer.class)
T getMin();
/**
* Create new instance.
*
* @param label Label for the action. Max: 20 characters.
* @param data String returned via webhook in the postback.data property of the postback event.
* Max: 300 characters.
* @param mode Action mode. One of 'date', 'time', 'datetime'.
* @param initial Initial value of date or time (optional)
* @param max Largest date or time value that can be selected.
* Must be greater than the min value. (optional)
* @param min Smallest date or time value that can be selected.
* Must be less than the max value. (optional)
*
* @deprecated This method intended to used in deserialize json object.
* Use {@link DatetimePickerAction.OfLocalTime#builder()},
* {@link DatetimePickerAction.OfLocalDate#builder()}
|
@JsonSerialize(using = DatetimePickerFieldSerializer.class) T getMin(); /** * Create new instance. * * @param label Label for the action. Max: 20 characters. * @param data String returned via webhook in the postback.data property of the postback event. * Max: 300 characters. * @param mode Action mode. One of 'date', 'time', 'datetime'. * @param initial Initial value of date or time (optional) * @param max Largest date or time value that can be selected. * Must be greater than the min value. (optional) * @param min Smallest date or time value that can be selected. * Must be less than the max value. (optional) * * @deprecated This method intended to used in deserialize json object. * Use {@link DatetimePickerAction.OfLocalTime#builder()}, * {@link DatetimePickerAction.OfLocalDate#builder()}
|
/**
* Smallest date or time value that can be selected.
* Must be less than the max value.
*/
|
Smallest date or time value that can be selected. Must be less than the max value
|
getMin
|
{
"repo_name": "line/line-bot-sdk-java",
"path": "line-bot-model/src/main/java/com/linecorp/bot/model/action/DatetimePickerAction.java",
"license": "apache-2.0",
"size": 6951
}
|
[
"com.fasterxml.jackson.databind.annotation.JsonSerialize",
"com.linecorp.bot.internal.DatetimePickerFieldSerializer"
] |
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.linecorp.bot.internal.DatetimePickerFieldSerializer;
|
import com.fasterxml.jackson.databind.annotation.*; import com.linecorp.bot.internal.*;
|
[
"com.fasterxml.jackson",
"com.linecorp.bot"
] |
com.fasterxml.jackson; com.linecorp.bot;
| 264,553
|
public UnadaInfo getuNaDaInfo();
|
UnadaInfo function();
|
/**
* Returns the local UnadaInfo
* @return
*/
|
Returns the local UnadaInfo
|
getuNaDaInfo
|
{
"repo_name": "smartenit-eu/smartenit",
"path": "unada/om/src/main/java/eu/smartenit/unada/om/IOverlayManager.java",
"license": "apache-2.0",
"size": 4396
}
|
[
"eu.smartenit.unada.db.dto.UnadaInfo"
] |
import eu.smartenit.unada.db.dto.UnadaInfo;
|
import eu.smartenit.unada.db.dto.*;
|
[
"eu.smartenit.unada"
] |
eu.smartenit.unada;
| 2,010,722
|
switch (fslType) {
case CONTEXT:
return Hardwired.LINK_IR_CONTEXT;
case CONTEXT_IMPLICATION:
return Hardwired.LINK_IR_CONTEXT_IMPLICATION;
case IN_SHADOW:
return null;
case PREDECESSOR:
return Hardwired.LINK_PREDECESSOR;
case SUCCESSOR:
return Hardwired.LINK_SUCCESSOR;
case QUESTION:
return Hardwired.LINK_QUESTION;
case ANSWER:
return Hardwired.LINK_ANSWER;
case COINCIDENCE:
return Hardwired.LINK_COINCIDENCE;
}
throw new Error("It should never get here");
}
|
switch (fslType) { case CONTEXT: return Hardwired.LINK_IR_CONTEXT; case CONTEXT_IMPLICATION: return Hardwired.LINK_IR_CONTEXT_IMPLICATION; case IN_SHADOW: return null; case PREDECESSOR: return Hardwired.LINK_PREDECESSOR; case SUCCESSOR: return Hardwired.LINK_SUCCESSOR; case QUESTION: return Hardwired.LINK_QUESTION; case ANSWER: return Hardwired.LINK_ANSWER; case COINCIDENCE: return Hardwired.LINK_COINCIDENCE; } throw new Error(STR); }
|
/**
* As most FSL-s are built upon a link, this function maps back the FslType
* to the link which forms it. The exception is the IN_SHADOW, which is not
* built on a link
*
* @param fslType
* @return
*/
|
As most FSL-s are built upon a link, this function maps back the FslType to the link which forms it. The exception is the IN_SHADOW, which is not built on a link
|
getLinksForFslType
|
{
"repo_name": "Xapagy/Xapagy",
"path": "src/main/java/org/xapagy/headless_shadows/FslType.java",
"license": "agpl-3.0",
"size": 2221
}
|
[
"org.xapagy.concepts.Hardwired"
] |
import org.xapagy.concepts.Hardwired;
|
import org.xapagy.concepts.*;
|
[
"org.xapagy.concepts"
] |
org.xapagy.concepts;
| 1,271,502
|
public void addElementCollectionCacheMapping(Object rowKey, Object elementCollectionObject,
String elementCollObjectName)
{
Map embeddedObjectMap = new HashMap<Object, String>();
if (getElementCollectionCache().get(rowKey) == null)
{
embeddedObjectMap.put(elementCollectionObject, elementCollObjectName);
getElementCollectionCache().put(rowKey, embeddedObjectMap);
}
else
{
getElementCollectionCache().get(rowKey).put(elementCollectionObject, elementCollObjectName);
}
}
|
void function(Object rowKey, Object elementCollectionObject, String elementCollObjectName) { Map embeddedObjectMap = new HashMap<Object, String>(); if (getElementCollectionCache().get(rowKey) == null) { embeddedObjectMap.put(elementCollectionObject, elementCollObjectName); getElementCollectionCache().put(rowKey, embeddedObjectMap); } else { getElementCollectionCache().get(rowKey).put(elementCollectionObject, elementCollObjectName); } }
|
/**
* Adds the element collection cache mapping.
*
* @param rowKey
* the row key
* @param elementCollectionObject
* the element collection object
* @param elementCollObjectName
* the element coll object name
*/
|
Adds the element collection cache mapping
|
addElementCollectionCacheMapping
|
{
"repo_name": "ravisund/Kundera",
"path": "src/jpa-engine/core/src/main/java/com/impetus/kundera/cache/ElementCollectionCacheManager.java",
"license": "apache-2.0",
"size": 7636
}
|
[
"java.util.HashMap",
"java.util.Map"
] |
import java.util.HashMap; import java.util.Map;
|
import java.util.*;
|
[
"java.util"
] |
java.util;
| 2,833,080
|
checkArgument(!Character.isDigit(negativeSign));
checkArgument(negativeSign > 0);
if (negativeSign == this.negativeSign)
return this;
else
return new MonetaryFormat(negativeSign, positiveSign, zeroDigit, decimalMark, minDecimals, decimalGroups,
shift, roundingMode, codes, codeSeparator, codePrefixed);
}
|
checkArgument(!Character.isDigit(negativeSign)); checkArgument(negativeSign > 0); if (negativeSign == this.negativeSign) return this; else return new MonetaryFormat(negativeSign, positiveSign, zeroDigit, decimalMark, minDecimals, decimalGroups, shift, roundingMode, codes, codeSeparator, codePrefixed); }
|
/**
* Set character to prefix negative values.
*/
|
Set character to prefix negative values
|
negativeSign
|
{
"repo_name": "egordon/CoinJoin",
"path": "lib/bitcoinj/bitcoinj-0.12-src/main/java/org/bitcoinj/utils/MonetaryFormat.java",
"license": "apache-2.0",
"size": 18611
}
|
[
"com.google.common.base.Preconditions"
] |
import com.google.common.base.Preconditions;
|
import com.google.common.base.*;
|
[
"com.google.common"
] |
com.google.common;
| 1,953,633
|
public DeleteActivityTypeProperties withLogStorageSettings(LogStorageSettings logStorageSettings) {
this.logStorageSettings = logStorageSettings;
return this;
}
|
DeleteActivityTypeProperties function(LogStorageSettings logStorageSettings) { this.logStorageSettings = logStorageSettings; return this; }
|
/**
* Set the logStorageSettings property: Log storage settings customer need to provide when enableLogging is true.
*
* @param logStorageSettings the logStorageSettings value to set.
* @return the DeleteActivityTypeProperties object itself.
*/
|
Set the logStorageSettings property: Log storage settings customer need to provide when enableLogging is true
|
withLogStorageSettings
|
{
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/datafactory/azure-resourcemanager-datafactory/src/main/java/com/azure/resourcemanager/datafactory/fluent/models/DeleteActivityTypeProperties.java",
"license": "mit",
"size": 7010
}
|
[
"com.azure.resourcemanager.datafactory.models.LogStorageSettings"
] |
import com.azure.resourcemanager.datafactory.models.LogStorageSettings;
|
import com.azure.resourcemanager.datafactory.models.*;
|
[
"com.azure.resourcemanager"
] |
com.azure.resourcemanager;
| 1,392,286
|
private boolean removeDirRecursively(File directory) throws FileExistsException {
if (directory.isDirectory()) {
for (File file : directory.listFiles()) {
removeDirRecursively(file);
}
}
if (!directory.delete()) {
throw new FileExistsException("could not delete: " + directory.getName());
} else {
return true;
}
}
|
boolean function(File directory) throws FileExistsException { if (directory.isDirectory()) { for (File file : directory.listFiles()) { removeDirRecursively(file); } } if (!directory.delete()) { throw new FileExistsException(STR + directory.getName()); } else { return true; } }
|
/**
* Loops through a directory deleting all the files.
*
* @param directory to be removed
* @return a boolean representing success of failure
* @throws FileExistsException
*/
|
Loops through a directory deleting all the files
|
removeDirRecursively
|
{
"repo_name": "usersource/tasks",
"path": "tasks_phonegap/Tasks/plugins/io.usersource.anno/anno_plugin_android/src/org/apache/cordova/file/FileUtils.java",
"license": "mpl-2.0",
"size": 47712
}
|
[
"java.io.File"
] |
import java.io.File;
|
import java.io.*;
|
[
"java.io"
] |
java.io;
| 2,674,232
|
private WorkQueue findNonEmptyStealQueue() {
int r = ThreadLocalRandom.current().nextInt();
for (;;) {
int ps = plock, m; WorkQueue[] ws; WorkQueue q;
if ((ws = workQueues) != null && (m = ws.length - 1) >= 0) {
for (int j = (m + 1) << 2; j >= 0; --j) {
if ((q = ws[(((r - j) << 1) | 1) & m]) != null &&
q.base - q.top < 0)
return q;
}
}
if (plock == ps)
return null;
}
}
|
WorkQueue function() { int r = ThreadLocalRandom.current().nextInt(); for (;;) { int ps = plock, m; WorkQueue[] ws; WorkQueue q; if ((ws = workQueues) != null && (m = ws.length - 1) >= 0) { for (int j = (m + 1) << 2; j >= 0; --j) { if ((q = ws[(((r - j) << 1) 1) & m]) != null && q.base - q.top < 0) return q; } } if (plock == ps) return null; } }
|
/**
* Returns a (probably) non-empty steal queue, if one is found
* during a scan, else null. This method must be retried by
* caller if, by the time it tries to use the queue, it is empty.
*/
|
Returns a (probably) non-empty steal queue, if one is found during a scan, else null. This method must be retried by caller if, by the time it tries to use the queue, it is empty
|
findNonEmptyStealQueue
|
{
"repo_name": "JuudeDemos/android-sdk-20",
"path": "src/java/util/concurrent/ForkJoinPool.java",
"license": "apache-2.0",
"size": 142287
}
|
[
"java.util.concurrent.ThreadLocalRandom"
] |
import java.util.concurrent.ThreadLocalRandom;
|
import java.util.concurrent.*;
|
[
"java.util"
] |
java.util;
| 705,467
|
void updateBuildDetails(BuildDetails buildDetails);
|
void updateBuildDetails(BuildDetails buildDetails);
|
/**
* Updates build details
*
* @param buildDetails Build details
*/
|
Updates build details
|
updateBuildDetails
|
{
"repo_name": "dkhmelenko/Varis-Android",
"path": "app/src/main/java/com/khmelenko/lab/varis/builddetails/BuildDetailsView.java",
"license": "apache-2.0",
"size": 1286
}
|
[
"com.khmelenko.lab.varis.network.response.BuildDetails"
] |
import com.khmelenko.lab.varis.network.response.BuildDetails;
|
import com.khmelenko.lab.varis.network.response.*;
|
[
"com.khmelenko.lab"
] |
com.khmelenko.lab;
| 2,870,990
|
public void deliverMessage(String content)
{
try {
deliverMessageJMS(content);
}
catch (JMSException x) {
// throw exception; caller will schedule retry
throw new RuntimeException(x);
}
}
|
void function(String content) { try { deliverMessageJMS(content); } catch (JMSException x) { throw new RuntimeException(x); } }
|
/**
* Delivers Message to Endpoint Can be called by different threads so must
* handle it properly.
*/
|
Delivers Message to Endpoint Can be called by different threads so must handle it properly
|
deliverMessage
|
{
"repo_name": "BrickStreetSoftware/brickstapi-replyhandler",
"path": "src/main/java/net/brickst/connect/custom/webservices/JMSEndpoint.java",
"license": "apache-2.0",
"size": 11507
}
|
[
"javax.jms.JMSException"
] |
import javax.jms.JMSException;
|
import javax.jms.*;
|
[
"javax.jms"
] |
javax.jms;
| 2,566,154
|
private static List loadSingleDataset(Table table) {
List rowList = new ArrayList();
int total = (modelList == null ? 0 : modelList.size());
for (int index=0; index < total; index++) {
TableItem ti = new TableItem(table, SWT.NONE);
Model model = (Model)modelList.get(index);
ti.setText(model.getDescription());
rowList.add(ti);
}
return rowList;
}
|
static List function(Table table) { List rowList = new ArrayList(); int total = (modelList == null ? 0 : modelList.size()); for (int index=0; index < total; index++) { TableItem ti = new TableItem(table, SWT.NONE); Model model = (Model)modelList.get(index); ti.setText(model.getDescription()); rowList.add(ti); } return rowList; }
|
/**
* load a list of rows with a single column
* @return
*/
|
load a list of rows with a single column
|
loadSingleDataset
|
{
"repo_name": "Transkribus/TranskribusSwtGui",
"path": "src/main/java/examples/TableComboSnippet1.java",
"license": "gpl-3.0",
"size": 15043
}
|
[
"java.util.ArrayList",
"java.util.List",
"org.eclipse.swt.widgets.Table",
"org.eclipse.swt.widgets.TableItem"
] |
import java.util.ArrayList; import java.util.List; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableItem;
|
import java.util.*; import org.eclipse.swt.widgets.*;
|
[
"java.util",
"org.eclipse.swt"
] |
java.util; org.eclipse.swt;
| 2,647,981
|
public static String getShortTextFormat(Message m) {
if (m == null) return "null";
if (m instanceof ScanRequest) {
// This should be small and safe to output. No data.
return TextFormat.shortDebugString(m);
} else if (m instanceof RegionServerReportRequest) {
// Print a short message only, just the servername and the requests, not the full load.
RegionServerReportRequest r = (RegionServerReportRequest)m;
return "server " + TextFormat.shortDebugString(r.getServer()) +
" load { numberOfRequests: " + r.getLoad().getNumberOfRequests() + " }";
} else if (m instanceof RegionServerStartupRequest) {
// Should be small enough.
return TextFormat.shortDebugString(m);
} else if (m instanceof MutationProto) {
return toShortString((MutationProto)m);
} else if (m instanceof GetRequest) {
GetRequest r = (GetRequest) m;
return "region= " + getStringForByteString(r.getRegion().getValue()) +
", row=" + getStringForByteString(r.getGet().getRow());
} else if (m instanceof ClientProtos.MultiRequest) {
ClientProtos.MultiRequest r = (ClientProtos.MultiRequest) m;
// Get first set of Actions.
ClientProtos.RegionAction actions = r.getRegionActionList().get(0);
String row = actions.getActionCount() <= 0? "":
getStringForByteString(actions.getAction(0).hasGet()?
actions.getAction(0).getGet().getRow():
actions.getAction(0).getMutation().getRow());
return "region= " + getStringForByteString(actions.getRegion().getValue()) +
", for " + r.getRegionActionCount() +
" actions and 1st row key=" + row;
} else if (m instanceof ClientProtos.MutateRequest) {
ClientProtos.MutateRequest r = (ClientProtos.MutateRequest) m;
return "region= " + getStringForByteString(r.getRegion().getValue()) +
", row=" + getStringForByteString(r.getMutation().getRow());
}
return "TODO: " + m.getClass().toString();
}
|
static String function(Message m) { if (m == null) return "null"; if (m instanceof ScanRequest) { return TextFormat.shortDebugString(m); } else if (m instanceof RegionServerReportRequest) { RegionServerReportRequest r = (RegionServerReportRequest)m; return STR + TextFormat.shortDebugString(r.getServer()) + STR + r.getLoad().getNumberOfRequests() + STR; } else if (m instanceof RegionServerStartupRequest) { return TextFormat.shortDebugString(m); } else if (m instanceof MutationProto) { return toShortString((MutationProto)m); } else if (m instanceof GetRequest) { GetRequest r = (GetRequest) m; return STR + getStringForByteString(r.getRegion().getValue()) + STR + getStringForByteString(r.getGet().getRow()); } else if (m instanceof ClientProtos.MultiRequest) { ClientProtos.MultiRequest r = (ClientProtos.MultiRequest) m; ClientProtos.RegionAction actions = r.getRegionActionList().get(0); String row = actions.getActionCount() <= 0? "": getStringForByteString(actions.getAction(0).hasGet()? actions.getAction(0).getGet().getRow(): actions.getAction(0).getMutation().getRow()); return STR + getStringForByteString(actions.getRegion().getValue()) + ", for STR actions and 1st row key=" + row; } else if (m instanceof ClientProtos.MutateRequest) { ClientProtos.MutateRequest r = (ClientProtos.MutateRequest) m; return STR + getStringForByteString(r.getRegion().getValue()) + STR + getStringForByteString(r.getMutation().getRow()); } return "TODO: " + m.getClass().toString(); }
|
/**
* Return short version of Message toString'd, shorter than TextFormat#shortDebugString.
* Tries to NOT print out data both because it can be big but also so we do not have data in our
* logs. Use judiciously.
* @param m
* @return toString of passed <code>m</code>
*/
|
Return short version of Message toString'd, shorter than TextFormat#shortDebugString. Tries to NOT print out data both because it can be big but also so we do not have data in our logs. Use judiciously
|
getShortTextFormat
|
{
"repo_name": "drewpope/hbase",
"path": "hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java",
"license": "apache-2.0",
"size": 114457
}
|
[
"com.google.protobuf.Message",
"com.google.protobuf.TextFormat",
"org.apache.hadoop.hbase.protobuf.generated.ClientProtos",
"org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos"
] |
import com.google.protobuf.Message; import com.google.protobuf.TextFormat; import org.apache.hadoop.hbase.protobuf.generated.ClientProtos; import org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos;
|
import com.google.protobuf.*; import org.apache.hadoop.hbase.protobuf.generated.*;
|
[
"com.google.protobuf",
"org.apache.hadoop"
] |
com.google.protobuf; org.apache.hadoop;
| 106,060
|
private UserDTO getUser() {
String usernameFromContext = PrivilegedCarbonContext.getThreadLocalCarbonContext().getUsername();
String tenantFromContext = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain();
UserDTO userDTO = new UserDTO();
userDTO.setUsername(UserCoreUtil.removeDomainFromName(usernameFromContext));
userDTO.setRealm(UserCoreUtil.extractDomainFromName(usernameFromContext));
userDTO.setTenantDomain(tenantFromContext);
return userDTO;
}
|
UserDTO function() { String usernameFromContext = PrivilegedCarbonContext.getThreadLocalCarbonContext().getUsername(); String tenantFromContext = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain(); UserDTO userDTO = new UserDTO(); userDTO.setUsername(UserCoreUtil.removeDomainFromName(usernameFromContext)); userDTO.setRealm(UserCoreUtil.extractDomainFromName(usernameFromContext)); userDTO.setTenantDomain(tenantFromContext); return userDTO; }
|
/**
* Form UserDTO using username and tenant from context.
*
* @return userDTO.
*/
|
Form UserDTO using username and tenant from context
|
getUser
|
{
"repo_name": "wso2-extensions/identity-governance",
"path": "components/org.wso2.carbon.identity.api.user.governance/src/main/java/org/wso2/carbon/identity/user/endpoint/impl/MeApiServiceImpl.java",
"license": "apache-2.0",
"size": 18312
}
|
[
"org.wso2.carbon.context.PrivilegedCarbonContext",
"org.wso2.carbon.identity.user.endpoint.dto.UserDTO",
"org.wso2.carbon.user.core.util.UserCoreUtil"
] |
import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.identity.user.endpoint.dto.UserDTO; import org.wso2.carbon.user.core.util.UserCoreUtil;
|
import org.wso2.carbon.context.*; import org.wso2.carbon.identity.user.endpoint.dto.*; import org.wso2.carbon.user.core.util.*;
|
[
"org.wso2.carbon"
] |
org.wso2.carbon;
| 2,894,152
|
public List<String> ipAddresses() {
return this.ipAddresses;
}
|
List<String> function() { return this.ipAddresses; }
|
/**
* Get the ipAddresses property: Private IPAddresses mapped to the remote private endpoint.
*
* @return the ipAddresses value.
*/
|
Get the ipAddresses property: Private IPAddresses mapped to the remote private endpoint
|
ipAddresses
|
{
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/models/RemotePrivateEndpointConnectionArmResourceProperties.java",
"license": "mit",
"size": 4509
}
|
[
"java.util.List"
] |
import java.util.List;
|
import java.util.*;
|
[
"java.util"
] |
java.util;
| 1,548,783
|
public static Address[] parse(String addressList) {
if (TextUtils.isEmpty(addressList)) {
return EMPTY_ADDRESS_ARRAY;
}
List<Address> addresses = new ArrayList<>();
try {
MailboxList parsedList = DefaultAddressParser.DEFAULT.parseAddressList(addressList).flatten();
for (int i = 0, count = parsedList.size(); i < count; i++) {
Mailbox mailbox = parsedList.get(i);
addresses.add(new Address(mailbox.getLocalPart() + "@" + mailbox.getDomain(), mailbox.getName(), false));
}
} catch (MimeException pe) {
Timber.e(pe, "MimeException in Address.parse()");
//but we do an silent failover : we just use the given string as name with empty address
addresses.add(new Address(null, addressList, false));
}
return addresses.toArray(EMPTY_ADDRESS_ARRAY);
}
|
static Address[] function(String addressList) { if (TextUtils.isEmpty(addressList)) { return EMPTY_ADDRESS_ARRAY; } List<Address> addresses = new ArrayList<>(); try { MailboxList parsedList = DefaultAddressParser.DEFAULT.parseAddressList(addressList).flatten(); for (int i = 0, count = parsedList.size(); i < count; i++) { Mailbox mailbox = parsedList.get(i); addresses.add(new Address(mailbox.getLocalPart() + "@" + mailbox.getDomain(), mailbox.getName(), false)); } } catch (MimeException pe) { Timber.e(pe, STR); addresses.add(new Address(null, addressList, false)); } return addresses.toArray(EMPTY_ADDRESS_ARRAY); }
|
/**
* Parse a comma separated list of addresses in RFC-822 format and return an
* array of Address objects.
*
* @param addressList
* @return An array of 0 or more Addresses.
*/
|
Parse a comma separated list of addresses in RFC-822 format and return an array of Address objects
|
parse
|
{
"repo_name": "philipwhiuk/q-mail",
"path": "qmail-library/src/main/java/com/fsck/k9/mail/Address.java",
"license": "apache-2.0",
"size": 10595
}
|
[
"android.text.TextUtils",
"java.util.ArrayList",
"java.util.List",
"org.apache.james.mime4j.MimeException",
"org.apache.james.mime4j.dom.address.Mailbox",
"org.apache.james.mime4j.dom.address.MailboxList",
"org.apache.james.mime4j.field.address.DefaultAddressParser"
] |
import android.text.TextUtils; import java.util.ArrayList; import java.util.List; import org.apache.james.mime4j.MimeException; import org.apache.james.mime4j.dom.address.Mailbox; import org.apache.james.mime4j.dom.address.MailboxList; import org.apache.james.mime4j.field.address.DefaultAddressParser;
|
import android.text.*; import java.util.*; import org.apache.james.mime4j.*; import org.apache.james.mime4j.dom.address.*; import org.apache.james.mime4j.field.address.*;
|
[
"android.text",
"java.util",
"org.apache.james"
] |
android.text; java.util; org.apache.james;
| 1,671,677
|
@ServiceMethod(returns = ReturnType.SINGLE)
public TrafficManagerNameAvailabilityInner checkTrafficManagerRelativeDnsNameAvailability(
CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters) {
return checkTrafficManagerRelativeDnsNameAvailabilityAsync(parameters).block();
}
|
@ServiceMethod(returns = ReturnType.SINGLE) TrafficManagerNameAvailabilityInner function( CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters) { return checkTrafficManagerRelativeDnsNameAvailabilityAsync(parameters).block(); }
|
/**
* Checks the availability of a Traffic Manager Relative DNS name.
*
* @param parameters Parameters supplied to check Traffic Manager name operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return class representing a Traffic Manager Name Availability response.
*/
|
Checks the availability of a Traffic Manager Relative DNS name
|
checkTrafficManagerRelativeDnsNameAvailability
|
{
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/ProfilesClientImpl.java",
"license": "mit",
"size": 57785
}
|
[
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.resourcemanager.trafficmanager.fluent.models.TrafficManagerNameAvailabilityInner",
"com.azure.resourcemanager.trafficmanager.models.CheckTrafficManagerRelativeDnsNameAvailabilityParameters"
] |
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.trafficmanager.fluent.models.TrafficManagerNameAvailabilityInner; import com.azure.resourcemanager.trafficmanager.models.CheckTrafficManagerRelativeDnsNameAvailabilityParameters;
|
import com.azure.core.annotation.*; import com.azure.resourcemanager.trafficmanager.fluent.models.*; import com.azure.resourcemanager.trafficmanager.models.*;
|
[
"com.azure.core",
"com.azure.resourcemanager"
] |
com.azure.core; com.azure.resourcemanager;
| 235,432
|
AsyncProcessorAwaitManager getAsyncProcessorAwaitManager();
|
AsyncProcessorAwaitManager getAsyncProcessorAwaitManager();
|
/**
* Gets the {@link org.apache.camel.AsyncProcessor} await manager.
*
* @return the manager
*/
|
Gets the <code>org.apache.camel.AsyncProcessor</code> await manager
|
getAsyncProcessorAwaitManager
|
{
"repo_name": "NickCis/camel",
"path": "camel-core/src/main/java/org/apache/camel/CamelContext.java",
"license": "apache-2.0",
"size": 74001
}
|
[
"org.apache.camel.spi.AsyncProcessorAwaitManager"
] |
import org.apache.camel.spi.AsyncProcessorAwaitManager;
|
import org.apache.camel.spi.*;
|
[
"org.apache.camel"
] |
org.apache.camel;
| 1,112,056
|
public void testAdd() {
ConcurrentSkipListSet q = new ConcurrentSkipListSet();
assertTrue(q.add(zero));
assertTrue(q.add(one));
}
|
void function() { ConcurrentSkipListSet q = new ConcurrentSkipListSet(); assertTrue(q.add(zero)); assertTrue(q.add(one)); }
|
/**
* Add of comparable element succeeds
*/
|
Add of comparable element succeeds
|
testAdd
|
{
"repo_name": "YouDiSN/OpenJDK-Research",
"path": "jdk9/jdk/test/java/util/concurrent/tck/ConcurrentSkipListSetTest.java",
"license": "gpl-2.0",
"size": 31925
}
|
[
"java.util.concurrent.ConcurrentSkipListSet"
] |
import java.util.concurrent.ConcurrentSkipListSet;
|
import java.util.concurrent.*;
|
[
"java.util"
] |
java.util;
| 2,348,884
|
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-10-25T05:29:34+06:00", comments = "JAXB RI v2.2.11")
public long getId() {
return id;
}
|
@Generated(value = STR, date = STR, comments = STR) long function() { return id; }
|
/**
* Gets the value of the id property.
*
*/
|
Gets the value of the id property
|
getId
|
{
"repo_name": "kanonirov/lanb-client",
"path": "src/main/java/ru/lanbilling/webservice/wsdl/InsupdPhoneParser.java",
"license": "mit",
"size": 2717
}
|
[
"javax.annotation.Generated"
] |
import javax.annotation.Generated;
|
import javax.annotation.*;
|
[
"javax.annotation"
] |
javax.annotation;
| 538,888
|
public static Label waitLabel(Container cont, String text, boolean ce, boolean ccs) {
return waitLabel(cont, text, ce, ccs, 0);
}
|
static Label function(Container cont, String text, boolean ce, boolean ccs) { return waitLabel(cont, text, ce, ccs, 0); }
|
/**
* Waits Label by text.
*
* @param cont Container to search component in.
* @param text Component text.
* @param ce Compare text exactly.
* @param ccs Compare text case sensitively.
* @return Label instance.
* @see ComponentOperator#isCaptionEqual(String, String, boolean, boolean)
* @throws TimeoutExpiredException
*/
|
Waits Label by text
|
waitLabel
|
{
"repo_name": "FauxFaux/jdk9-jdk",
"path": "test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/operators/LabelOperator.java",
"license": "gpl-2.0",
"size": 12209
}
|
[
"java.awt.Container",
"java.awt.Label"
] |
import java.awt.Container; import java.awt.Label;
|
import java.awt.*;
|
[
"java.awt"
] |
java.awt;
| 2,164,409
|
StringWriter stackTraceWriter = new StringWriter();
new StrictModePolicyViolation(violation).printStackTrace(new PrintWriter(stackTraceWriter));
String stackTrace = stackTraceWriter.toString();
if (TextUtils.isEmpty(stackTrace)) {
Log.d(TAG, "StrictMode violation stack trace was empty.");
} else {
Log.d(TAG, "Upload stack trace: " + stackTrace);
JavaExceptionReporter.reportStackTrace(stackTrace);
}
}
|
StringWriter stackTraceWriter = new StringWriter(); new StrictModePolicyViolation(violation).printStackTrace(new PrintWriter(stackTraceWriter)); String stackTrace = stackTraceWriter.toString(); if (TextUtils.isEmpty(stackTrace)) { Log.d(TAG, STR); } else { Log.d(TAG, STR + stackTrace); JavaExceptionReporter.reportStackTrace(stackTrace); } }
|
/**
* Always process the violation on the UI thread. This ensures other crash reports are not
* corrupted. Since each individual user has a very small chance of uploading each violation,
* and we have a hard cap of 3 per session, this will not affect performance too much.
*
* @param violationInfo The violation info from the StrictMode violation in question.
*/
|
Always process the violation on the UI thread. This ensures other crash reports are not corrupted. Since each individual user has a very small chance of uploading each violation, and we have a hard cap of 3 per session, this will not affect performance too much
|
reportStrictModeViolation
|
{
"repo_name": "ric2b/Vivaldi-browser",
"path": "chromium/chrome/android/java/src/org/chromium/chrome/browser/ChromeStrictMode.java",
"license": "bsd-3-clause",
"size": 11984
}
|
[
"android.text.TextUtils",
"java.io.PrintWriter",
"java.io.StringWriter",
"org.chromium.base.JavaExceptionReporter",
"org.chromium.base.Log",
"org.chromium.components.strictmode.StrictModePolicyViolation"
] |
import android.text.TextUtils; import java.io.PrintWriter; import java.io.StringWriter; import org.chromium.base.JavaExceptionReporter; import org.chromium.base.Log; import org.chromium.components.strictmode.StrictModePolicyViolation;
|
import android.text.*; import java.io.*; import org.chromium.base.*; import org.chromium.components.strictmode.*;
|
[
"android.text",
"java.io",
"org.chromium.base",
"org.chromium.components"
] |
android.text; java.io; org.chromium.base; org.chromium.components;
| 514,998
|
@Override
public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
super.looseUnmarshal(wireFormat, o, dataIn);
ConnectionControl info = (ConnectionControl)o;
info.setClose(dataIn.readBoolean());
info.setExit(dataIn.readBoolean());
info.setFaultTolerant(dataIn.readBoolean());
info.setResume(dataIn.readBoolean());
info.setSuspend(dataIn.readBoolean());
}
|
void function(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); ConnectionControl info = (ConnectionControl)o; info.setClose(dataIn.readBoolean()); info.setExit(dataIn.readBoolean()); info.setFaultTolerant(dataIn.readBoolean()); info.setResume(dataIn.readBoolean()); info.setSuspend(dataIn.readBoolean()); }
|
/**
* Un-marshal an object instance from the data input stream
*
* @param o the object to un-marshal
* @param dataIn the data input stream to build the object from
* @throws IOException
*/
|
Un-marshal an object instance from the data input stream
|
looseUnmarshal
|
{
"repo_name": "tabish121/OpenWire",
"path": "openwire-legacy/src/main/java/io/openwire/codec/v2/ConnectionControlMarshaller.java",
"license": "apache-2.0",
"size": 4623
}
|
[
"io.openwire.codec.OpenWireFormat",
"io.openwire.commands.ConnectionControl",
"java.io.DataInput",
"java.io.IOException"
] |
import io.openwire.codec.OpenWireFormat; import io.openwire.commands.ConnectionControl; import java.io.DataInput; import java.io.IOException;
|
import io.openwire.codec.*; import io.openwire.commands.*; import java.io.*;
|
[
"io.openwire.codec",
"io.openwire.commands",
"java.io"
] |
io.openwire.codec; io.openwire.commands; java.io;
| 1,564,321
|
//------------------------- AUTOGENERATED START -------------------------
///CLOVER:OFF
public static MockIdentifiable2.Meta meta() {
return MockIdentifiable2.Meta.INSTANCE;
}
static {
JodaBeanUtils.registerMetaBean(MockIdentifiable2.Meta.INSTANCE);
}
|
static MockIdentifiable2.Meta function() { return MockIdentifiable2.Meta.INSTANCE; } static { JodaBeanUtils.registerMetaBean(MockIdentifiable2.Meta.INSTANCE); }
|
/**
* The meta-bean for {@code MockIdentifiable2}.
* @return the meta-bean, not null
*/
|
The meta-bean for MockIdentifiable2
|
meta
|
{
"repo_name": "nssales/Strata",
"path": "modules/collect/src/test/java/com/opengamma/strata/collect/id/MockIdentifiable2.java",
"license": "apache-2.0",
"size": 8730
}
|
[
"org.joda.beans.JodaBeanUtils"
] |
import org.joda.beans.JodaBeanUtils;
|
import org.joda.beans.*;
|
[
"org.joda.beans"
] |
org.joda.beans;
| 518,896
|
public static RFFIVariables[] initialize(RContext context) {
R_Home.value = REnvVars.rHome(context);
R_TempDir.value = TempPathName.tempDirPath(context);
Sys_TempDir.value = TempPathName.tempDirPath(context);
R_GlobalEnv.value = RContext.getInstance().stateREnvironment.getGlobalEnv();
R_BaseEnv.value = RContext.getInstance().stateREnvironment.getBaseEnv();
R_BaseNamespace.value = RContext.getInstance().stateREnvironment.getBaseNamespace();
R_NamespaceRegistry.value = RContext.getInstance().stateREnvironment.getNamespaceRegistry();
R_Interactive.value = context.isInteractive() ? 1 : 0;
return values();
}
|
static RFFIVariables[] function(RContext context) { R_Home.value = REnvVars.rHome(context); R_TempDir.value = TempPathName.tempDirPath(context); Sys_TempDir.value = TempPathName.tempDirPath(context); R_GlobalEnv.value = RContext.getInstance().stateREnvironment.getGlobalEnv(); R_BaseEnv.value = RContext.getInstance().stateREnvironment.getBaseEnv(); R_BaseNamespace.value = RContext.getInstance().stateREnvironment.getBaseNamespace(); R_NamespaceRegistry.value = RContext.getInstance().stateREnvironment.getNamespaceRegistry(); R_Interactive.value = context.isInteractive() ? 1 : 0; return values(); }
|
/**
* Sets {@link #R_TempDir} for the initial context.
*/
|
Sets <code>#R_TempDir</code> for the initial context
|
initialize
|
{
"repo_name": "graalvm/fastr",
"path": "com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/RFFIVariables.java",
"license": "gpl-2.0",
"size": 6101
}
|
[
"com.oracle.truffle.r.runtime.REnvVars",
"com.oracle.truffle.r.runtime.TempPathName",
"com.oracle.truffle.r.runtime.context.RContext"
] |
import com.oracle.truffle.r.runtime.REnvVars; import com.oracle.truffle.r.runtime.TempPathName; import com.oracle.truffle.r.runtime.context.RContext;
|
import com.oracle.truffle.r.runtime.*; import com.oracle.truffle.r.runtime.context.*;
|
[
"com.oracle.truffle"
] |
com.oracle.truffle;
| 441,286
|
private JComboBox getUserStatus() {
if (userStatus == null) {
userStatus = new UserStatusComboBox();
userStatus.setSelectedItem(user.getUserStatus());
}
return userStatus;
}
|
JComboBox function() { if (userStatus == null) { userStatus = new UserStatusComboBox(); userStatus.setSelectedItem(user.getUserStatus()); } return userStatus; }
|
/**
* This method initializes userStatus
*
* @return javax.swing.JComboBox
*/
|
This method initializes userStatus
|
getUserStatus
|
{
"repo_name": "NCIP/cagrid",
"path": "cagrid/Software/core/caGrid/projects/gaards-ui/src/org/cagrid/gaards/ui/dorian/federation/UserWindow.java",
"license": "bsd-3-clause",
"size": 28038
}
|
[
"javax.swing.JComboBox"
] |
import javax.swing.JComboBox;
|
import javax.swing.*;
|
[
"javax.swing"
] |
javax.swing;
| 1,579,296
|
protected synchronized void resetAnalyzers() throws IOException {
productFieldAnalyzer.reset();
vendorFieldAnalyzer.reset();
}
|
synchronized void function() throws IOException { productFieldAnalyzer.reset(); vendorFieldAnalyzer.reset(); }
|
/**
* Common method to reset the searching analyzers.
*
* @throws IOException thrown if there is an index error
*/
|
Common method to reset the searching analyzers
|
resetAnalyzers
|
{
"repo_name": "jeremylong/DependencyCheck",
"path": "core/src/main/java/org/owasp/dependencycheck/data/cpe/AbstractMemoryIndex.java",
"license": "apache-2.0",
"size": 12757
}
|
[
"java.io.IOException"
] |
import java.io.IOException;
|
import java.io.*;
|
[
"java.io"
] |
java.io;
| 1,552,596
|
public void exit () throws WrongStateException, UnknownTransactionException, SystemException;
|
void function () throws WrongStateException, UnknownTransactionException, SystemException;
|
/**
* The participant has exited the business activity. The participant
* uses this to inform the coordinator that is has left the activity.
* It will not be informed when (and how) the business activity terminates.
*/
|
The participant has exited the business activity. The participant uses this to inform the coordinator that is has left the activity. It will not be informed when (and how) the business activity terminates
|
exit
|
{
"repo_name": "nmcl/wfswarm-example-arjuna-old",
"path": "graalvm/transactions/fork/narayana/XTS/WS-T/dev/src/com/arjuna/wst11/BAParticipantManager.java",
"license": "apache-2.0",
"size": 2814
}
|
[
"com.arjuna.wst.SystemException",
"com.arjuna.wst.UnknownTransactionException",
"com.arjuna.wst.WrongStateException"
] |
import com.arjuna.wst.SystemException; import com.arjuna.wst.UnknownTransactionException; import com.arjuna.wst.WrongStateException;
|
import com.arjuna.wst.*;
|
[
"com.arjuna.wst"
] |
com.arjuna.wst;
| 2,251,334
|
Optional<T> getValue(World world);
/**
* Set the value of this option
* @param world The world the value is being set for.
* @param value String value will be contained with the the {@link #getOptions()}
|
Optional<T> getValue(World world); /** * Set the value of this option * @param world The world the value is being set for. * @param value String value will be contained with the the {@link #getOptions()}
|
/**
* Get the value of the option for the given world.
* @param world The value to retrieve the value for
* @return Empty if value is not set.
*/
|
Get the value of the option for the given world
|
getValue
|
{
"repo_name": "endercrest/VoidSpawn",
"path": "src/main/java/com/endercrest/voidspawn/options/Option.java",
"license": "lgpl-2.1",
"size": 1663
}
|
[
"java.util.Optional",
"org.bukkit.World"
] |
import java.util.Optional; import org.bukkit.World;
|
import java.util.*; import org.bukkit.*;
|
[
"java.util",
"org.bukkit"
] |
java.util; org.bukkit;
| 79,235
|
public void execStartActivityFromAppTask(
Context who, IBinder contextThread, IAppTask appTask,
Intent intent, Bundle options) {
IApplicationThread whoThread = (IApplicationThread) contextThread;
if (mActivityMonitors != null) {
synchronized (mSync) {
final int N = mActivityMonitors.size();
for (int i=0; i<N; i++) {
final ActivityMonitor am = mActivityMonitors.get(i);
if (am.match(who, null, intent)) {
am.mHits++;
if (am.isBlocking()) {
return;
}
break;
}
}
}
}
try {
intent.migrateExtraStreamToClipData();
intent.prepareToLeaveProcess();
int result = appTask.startActivity(whoThread.asBinder(), who.getBasePackageName(),
intent, intent.resolveTypeIfNeeded(who.getContentResolver()), options);
checkStartActivityResult(result, intent);
} catch (RemoteException e) {
}
return;
}
|
void function( Context who, IBinder contextThread, IAppTask appTask, Intent intent, Bundle options) { IApplicationThread whoThread = (IApplicationThread) contextThread; if (mActivityMonitors != null) { synchronized (mSync) { final int N = mActivityMonitors.size(); for (int i=0; i<N; i++) { final ActivityMonitor am = mActivityMonitors.get(i); if (am.match(who, null, intent)) { am.mHits++; if (am.isBlocking()) { return; } break; } } } } try { intent.migrateExtraStreamToClipData(); intent.prepareToLeaveProcess(); int result = appTask.startActivity(whoThread.asBinder(), who.getBasePackageName(), intent, intent.resolveTypeIfNeeded(who.getContentResolver()), options); checkStartActivityResult(result, intent); } catch (RemoteException e) { } return; }
|
/**
* Special version!
* @hide
*/
|
Special version
|
execStartActivityFromAppTask
|
{
"repo_name": "ketanbj/eapps",
"path": "android/frameworks/base/core/java/android/app/Instrumentation.java",
"license": "mit",
"size": 77837
}
|
[
"android.content.Context",
"android.content.Intent",
"android.os.Bundle",
"android.os.IBinder",
"android.os.RemoteException"
] |
import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.os.IBinder; import android.os.RemoteException;
|
import android.content.*; import android.os.*;
|
[
"android.content",
"android.os"
] |
android.content; android.os;
| 2,363,334
|
public List<ServiceEndpointPropertiesFormat> serviceEndpoints() {
return this.serviceEndpoints;
}
|
List<ServiceEndpointPropertiesFormat> function() { return this.serviceEndpoints; }
|
/**
* Get an array of service endpoints.
*
* @return the serviceEndpoints value
*/
|
Get an array of service endpoints
|
serviceEndpoints
|
{
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/SubnetInner.java",
"license": "mit",
"size": 13592
}
|
[
"com.microsoft.azure.management.network.v2019_09_01.ServiceEndpointPropertiesFormat",
"java.util.List"
] |
import com.microsoft.azure.management.network.v2019_09_01.ServiceEndpointPropertiesFormat; import java.util.List;
|
import com.microsoft.azure.management.network.v2019_09_01.*; import java.util.*;
|
[
"com.microsoft.azure",
"java.util"
] |
com.microsoft.azure; java.util;
| 1,718,479
|
public static boolean isValidJoinCode(@NonNull String joinCode) {
if (IP_ADDRESS_PATTERN.matcher(joinCode).matches()) {
return true;
} else {
return JOIN_CODE_PATTERN.matcher(joinCode).matches();
}
}
|
static boolean function(@NonNull String joinCode) { if (IP_ADDRESS_PATTERN.matcher(joinCode).matches()) { return true; } else { return JOIN_CODE_PATTERN.matcher(joinCode).matches(); } }
|
/**
* Returns if a given string is a valid join code.
*
* Valid join codes include:
* - IP addresses
* - A single number from 0 to 255
* - Two numbers from 0 to 255 separated by a period
*
* @param joinCode Join code to validate
* @return If given join code is valid
*/
|
Returns if a given string is a valid join code. Valid join codes include: - IP addresses - A single number from 0 to 255 - Two numbers from 0 to 255 separated by a period
|
isValidJoinCode
|
{
"repo_name": "ThomasGaubert/zephyr",
"path": "android/app/src/main/java/com/texasgamer/zephyr/util/NetworkUtils.java",
"license": "mit",
"size": 5421
}
|
[
"androidx.annotation.NonNull"
] |
import androidx.annotation.NonNull;
|
import androidx.annotation.*;
|
[
"androidx.annotation"
] |
androidx.annotation;
| 272,530
|
protected Integer getIntParameter(String name) {
String value = getRequiredParameter(name);
try {
return Integer.valueOf(value);
} catch (NumberFormatException e) {
String msg = String.format("%s should be a valid number. Got %s", name, value);
throw new BadRequestException(msg, e);
}
}
|
Integer function(String name) { String value = getRequiredParameter(name); try { return Integer.valueOf(value); } catch (NumberFormatException e) { String msg = String.format(STR, name, value); throw new BadRequestException(msg, e); } }
|
/**
* Get the value of a parameter that should be interpreted as an integer.
*
* @param name The name of the parameter.
* @return An integer
* @throws BadRequestException if The value is absent or mal-formed.
*/
|
Get the value of a parameter that should be interpreted as an integer
|
getIntParameter
|
{
"repo_name": "tomck/intermine",
"path": "intermine/web/main/src/org/intermine/webservice/server/WebService.java",
"license": "lgpl-2.1",
"size": 38971
}
|
[
"org.intermine.webservice.server.exceptions.BadRequestException"
] |
import org.intermine.webservice.server.exceptions.BadRequestException;
|
import org.intermine.webservice.server.exceptions.*;
|
[
"org.intermine.webservice"
] |
org.intermine.webservice;
| 221,808
|
@Override
public void setDate(java.util.Date date) {
_event.setDate(date);
}
|
void function(java.util.Date date) { _event.setDate(date); }
|
/**
* Sets the date of this event.
*
* @param date the date of this event
*/
|
Sets the date of this event
|
setDate
|
{
"repo_name": "bnguyen82/stuff-projects",
"path": "PortletInAction/event-listing-portlet/event-listing-portlet-portlet-service/src/main/java/com/nosester/portlet/eventlisting/model/EventWrapper.java",
"license": "mit",
"size": 11218
}
|
[
"java.util.Date"
] |
import java.util.Date;
|
import java.util.*;
|
[
"java.util"
] |
java.util;
| 1,660,875
|
private boolean cpeIdentifiersMatch(Dependency dependency1, Dependency dependency2) {
if (dependency1 == null || dependency1.getIdentifiers() == null
|| dependency2 == null || dependency2.getIdentifiers() == null) {
return false;
}
boolean matches = false;
int cpeCount1 = 0;
int cpeCount2 = 0;
for (Identifier i : dependency1.getIdentifiers()) {
if ("cpe".equals(i.getType())) {
cpeCount1 += 1;
}
}
for (Identifier i : dependency2.getIdentifiers()) {
if ("cpe".equals(i.getType())) {
cpeCount2 += 1;
}
}
if (cpeCount1 > 0 && cpeCount1 == cpeCount2) {
for (Identifier i : dependency1.getIdentifiers()) {
if ("cpe".equals(i.getType())) {
matches |= dependency2.getIdentifiers().contains(i);
if (!matches) {
break;
}
}
}
}
if (LogUtils.isVerboseLoggingEnabled()) {
final String msg = String.format("IdentifiersMatch=%s (%s, %s)", matches, dependency1.getFileName(), dependency2.getFileName());
LOGGER.log(Level.FINE, msg);
}
return matches;
}
|
boolean function(Dependency dependency1, Dependency dependency2) { if (dependency1 == null dependency1.getIdentifiers() == null dependency2 == null dependency2.getIdentifiers() == null) { return false; } boolean matches = false; int cpeCount1 = 0; int cpeCount2 = 0; for (Identifier i : dependency1.getIdentifiers()) { if ("cpe".equals(i.getType())) { cpeCount1 += 1; } } for (Identifier i : dependency2.getIdentifiers()) { if ("cpe".equals(i.getType())) { cpeCount2 += 1; } } if (cpeCount1 > 0 && cpeCount1 == cpeCount2) { for (Identifier i : dependency1.getIdentifiers()) { if ("cpe".equals(i.getType())) { matches = dependency2.getIdentifiers().contains(i); if (!matches) { break; } } } } if (LogUtils.isVerboseLoggingEnabled()) { final String msg = String.format(STR, matches, dependency1.getFileName(), dependency2.getFileName()); LOGGER.log(Level.FINE, msg); } return matches; }
|
/**
* Returns true if the CPE identifiers in the two supplied dependencies are equal.
*
* @param dependency1 a dependency2 to compare
* @param dependency2 a dependency2 to compare
* @return true if the identifiers in the two supplied dependencies are equal
*/
|
Returns true if the CPE identifiers in the two supplied dependencies are equal
|
cpeIdentifiersMatch
|
{
"repo_name": "simon-eastwood/DependencyCheckCM",
"path": "dependency-check-core/src/main/java/org/owasp/dependencycheck/analyzer/DependencyBundlingAnalyzer.java",
"license": "apache-2.0",
"size": 18943
}
|
[
"java.util.logging.Level",
"org.owasp.dependencycheck.dependency.Dependency",
"org.owasp.dependencycheck.dependency.Identifier",
"org.owasp.dependencycheck.utils.LogUtils"
] |
import java.util.logging.Level; import org.owasp.dependencycheck.dependency.Dependency; import org.owasp.dependencycheck.dependency.Identifier; import org.owasp.dependencycheck.utils.LogUtils;
|
import java.util.logging.*; import org.owasp.dependencycheck.dependency.*; import org.owasp.dependencycheck.utils.*;
|
[
"java.util",
"org.owasp.dependencycheck"
] |
java.util; org.owasp.dependencycheck;
| 2,803,642
|
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<CertificateInner> listByResourceGroup(String resourceGroupName);
|
@ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<CertificateInner> listByResourceGroup(String resourceGroupName);
|
/**
* Description for Get all certificates in a resource group.
*
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.resourcemanager.appservice.models.DefaultErrorResponseErrorException thrown if the request is
* rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return collection of certificates as paginated response with {@link PagedIterable}.
*/
|
Description for Get all certificates in a resource group
|
listByResourceGroup
|
{
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/CertificatesClient.java",
"license": "mit",
"size": 19470
}
|
[
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedIterable",
"com.azure.resourcemanager.appservice.fluent.models.CertificateInner"
] |
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.appservice.fluent.models.CertificateInner;
|
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.appservice.fluent.models.*;
|
[
"com.azure.core",
"com.azure.resourcemanager"
] |
com.azure.core; com.azure.resourcemanager;
| 2,103,136
|
public void cacheResult(List<biodiversity_values> biodiversity_valueses) {
for (biodiversity_values biodiversity_values : biodiversity_valueses) {
if (EntityCacheUtil.getResult(
biodiversity_valuesModelImpl.ENTITY_CACHE_ENABLED,
biodiversity_valuesImpl.class,
biodiversity_values.getPrimaryKey()) == null) {
cacheResult(biodiversity_values);
}
else {
biodiversity_values.resetOriginalValues();
}
}
}
|
void function(List<biodiversity_values> biodiversity_valueses) { for (biodiversity_values biodiversity_values : biodiversity_valueses) { if (EntityCacheUtil.getResult( biodiversity_valuesModelImpl.ENTITY_CACHE_ENABLED, biodiversity_valuesImpl.class, biodiversity_values.getPrimaryKey()) == null) { cacheResult(biodiversity_values); } else { biodiversity_values.resetOriginalValues(); } } }
|
/**
* Caches the biodiversity_valueses in the entity cache if it is enabled.
*
* @param biodiversity_valueses the biodiversity_valueses
*/
|
Caches the biodiversity_valueses in the entity cache if it is enabled
|
cacheResult
|
{
"repo_name": "iucn-whp/world-heritage-outlook",
"path": "portlets/iucn-dbservice-portlet/docroot/WEB-INF/src/com/iucn/whp/dbservice/service/persistence/biodiversity_valuesPersistenceImpl.java",
"license": "gpl-2.0",
"size": 53170
}
|
[
"com.liferay.portal.kernel.dao.orm.EntityCacheUtil",
"java.util.List"
] |
import com.liferay.portal.kernel.dao.orm.EntityCacheUtil; import java.util.List;
|
import com.liferay.portal.kernel.dao.orm.*; import java.util.*;
|
[
"com.liferay.portal",
"java.util"
] |
com.liferay.portal; java.util;
| 2,129,532
|
public static void componentLinkedStorageAccountsUpdate(
com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
ComponentLinkedStorageAccounts resource =
manager
.componentLinkedStorageAccountsOperations()
.getWithResponse("someResourceGroupName", "myComponent", StorageType.SERVICE_PROFILER, Context.NONE)
.getValue();
resource
.update()
.withLinkedStorageAccount(
"/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/someResourceGroupName/providers/Microsoft.Storage/storageAccounts/storageaccountname")
.apply();
}
|
static void function( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { ComponentLinkedStorageAccounts resource = manager .componentLinkedStorageAccountsOperations() .getWithResponse(STR, STR, StorageType.SERVICE_PROFILER, Context.NONE) .getValue(); resource .update() .withLinkedStorageAccount( STR) .apply(); }
|
/**
* Sample code: ComponentLinkedStorageAccountsUpdate.
*
* @param manager Entry point to ApplicationInsightsManager.
*/
|
Sample code: ComponentLinkedStorageAccountsUpdate
|
componentLinkedStorageAccountsUpdate
|
{
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsOperationUpdateSamples.java",
"license": "mit",
"size": 1610
}
|
[
"com.azure.core.util.Context",
"com.azure.resourcemanager.applicationinsights.models.ComponentLinkedStorageAccounts",
"com.azure.resourcemanager.applicationinsights.models.StorageType"
] |
import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.ComponentLinkedStorageAccounts; import com.azure.resourcemanager.applicationinsights.models.StorageType;
|
import com.azure.core.util.*; import com.azure.resourcemanager.applicationinsights.models.*;
|
[
"com.azure.core",
"com.azure.resourcemanager"
] |
com.azure.core; com.azure.resourcemanager;
| 1,485,396
|
private void adjustCrcFilePosition() throws IOException {
if (out != null) {
out.flush();
}
if (checksumOut != null) {
checksumOut.flush();
}
// rollback the position of the meta file
datanode.data.adjustCrcChannelPosition(block, streams, checksumSize);
}
|
void function() throws IOException { if (out != null) { out.flush(); } if (checksumOut != null) { checksumOut.flush(); } datanode.data.adjustCrcChannelPosition(block, streams, checksumSize); }
|
/**
* Adjust the file pointer in the local meta file so that the last checksum
* will be overwritten.
*/
|
Adjust the file pointer in the local meta file so that the last checksum will be overwritten
|
adjustCrcFilePosition
|
{
"repo_name": "korrelate/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java",
"license": "apache-2.0",
"size": 55865
}
|
[
"java.io.IOException"
] |
import java.io.IOException;
|
import java.io.*;
|
[
"java.io"
] |
java.io;
| 2,291,121
|
protected void loadRegions() {
final long LOG_INTERVAL_MILLIS = 10000;
int numKeysToCreate = keyIntervals.getNumKeys();
long lastLogTime = System.currentTimeMillis();
long minTaskGranularitySec = TestConfig.tab().longAt(
TestHelperPrms.minTaskGranularitySec, -1);
long minTaskGranularityMS = -1;
if (minTaskGranularitySec != -1)
minTaskGranularityMS = minTaskGranularitySec
* TestHelper.SEC_MILLI_FACTOR;
long startTime = System.currentTimeMillis();
do {
long shouldAddCount = sc.incrementAndRead(InitImageBB.SHOULD_ADD_COUNT);
if (shouldAddCount > numKeysToCreate) {
String aStr = "In loadRegion, for Region shouldAddCount is "
+ shouldAddCount + ", numOriginalKeysCreated is "
+ sc.read(InitImageBB.NUM_ORIGINAL_KEYS_CREATED)
+ ", numKeysToCreate is " + numKeysToCreate;
Log.getLogWriter().info(aStr);
NameBB.getBB().printSharedCounters();
throw new StopSchedulingTaskOnClientOrder(aStr);
}
Object key = NameFactory.getNextPositiveObjectName();
try {
Object value = getValueToAdd(key);
Month callBackArg = Month.months[((int)(shouldAddCount % 12))];
loadRegion(key, value, callBackArg);
sc.increment(InitImageBB.NUM_ORIGINAL_KEYS_CREATED);
}
catch (TimeoutException e) {
throw new TestException(TestHelper.getStackTrace(e));
}
catch (CacheWriterException e) {
throw new TestException(TestHelper.getStackTrace(e));
}
catch (CacheLoaderException e) {
throw new TestException(TestHelper.getStackTrace(e));
}
if (System.currentTimeMillis() - lastLogTime > LOG_INTERVAL_MILLIS) {
Log.getLogWriter().info(
"Added " + sc.read(InitImageBB.NUM_ORIGINAL_KEYS_CREATED)
+ " out of " + numKeysToCreate);
lastLogTime = System.currentTimeMillis();
}
} while ((minTaskGranularitySec == -1)
|| (System.currentTimeMillis() - startTime < minTaskGranularityMS));
}
|
void function() { final long LOG_INTERVAL_MILLIS = 10000; int numKeysToCreate = keyIntervals.getNumKeys(); long lastLogTime = System.currentTimeMillis(); long minTaskGranularitySec = TestConfig.tab().longAt( TestHelperPrms.minTaskGranularitySec, -1); long minTaskGranularityMS = -1; if (minTaskGranularitySec != -1) minTaskGranularityMS = minTaskGranularitySec * TestHelper.SEC_MILLI_FACTOR; long startTime = System.currentTimeMillis(); do { long shouldAddCount = sc.incrementAndRead(InitImageBB.SHOULD_ADD_COUNT); if (shouldAddCount > numKeysToCreate) { String aStr = STR + shouldAddCount + STR + sc.read(InitImageBB.NUM_ORIGINAL_KEYS_CREATED) + STR + numKeysToCreate; Log.getLogWriter().info(aStr); NameBB.getBB().printSharedCounters(); throw new StopSchedulingTaskOnClientOrder(aStr); } Object key = NameFactory.getNextPositiveObjectName(); try { Object value = getValueToAdd(key); Month callBackArg = Month.months[((int)(shouldAddCount % 12))]; loadRegion(key, value, callBackArg); sc.increment(InitImageBB.NUM_ORIGINAL_KEYS_CREATED); } catch (TimeoutException e) { throw new TestException(TestHelper.getStackTrace(e)); } catch (CacheWriterException e) { throw new TestException(TestHelper.getStackTrace(e)); } catch (CacheLoaderException e) { throw new TestException(TestHelper.getStackTrace(e)); } if (System.currentTimeMillis() - lastLogTime > LOG_INTERVAL_MILLIS) { Log.getLogWriter().info( STR + sc.read(InitImageBB.NUM_ORIGINAL_KEYS_CREATED) + STR + numKeysToCreate); lastLogTime = System.currentTimeMillis(); } } while ((minTaskGranularitySec == -1) (System.currentTimeMillis() - startTime < minTaskGranularityMS)); }
|
/**
* Task to load regions
*/
|
Task to load regions
|
loadRegions
|
{
"repo_name": "SnappyDataInc/snappy-store",
"path": "tests/core/src/main/java/parReg/fixedPartitioning/KeyCallbackResolverTest.java",
"license": "apache-2.0",
"size": 22993
}
|
[
"com.gemstone.gemfire.cache.CacheLoaderException",
"com.gemstone.gemfire.cache.CacheWriterException",
"com.gemstone.gemfire.cache.TimeoutException"
] |
import com.gemstone.gemfire.cache.CacheLoaderException; import com.gemstone.gemfire.cache.CacheWriterException; import com.gemstone.gemfire.cache.TimeoutException;
|
import com.gemstone.gemfire.cache.*;
|
[
"com.gemstone.gemfire"
] |
com.gemstone.gemfire;
| 853,744
|
return p -> new Tuple<>(p.getGender(), p.getWeightClass());
}
|
return p -> new Tuple<>(p.getGender(), p.getWeightClass()); }
|
/**
* Gets the ranking grouper for this builder.
*
* In total weight competitions, ranking groups contain participants of
* the same gender and weight class. This method returns a function which
* returns a tuple of a participant's gender and weight class.
*
* @return function returning a tuple containing a participant's gender
* and weight class
*/
|
Gets the ranking grouper for this builder. In total weight competitions, ranking groups contain participants of the same gender and weight class. This method returns a function which returns a tuple of a participant's gender and weight class
|
getRankingGrouper
|
{
"repo_name": "DanMeakin/P8-Project",
"path": "src/main/java/dk/aau/ida8/util/groupbuilders/TotalWeightGroupBuilder.java",
"license": "gpl-3.0",
"size": 4537
}
|
[
"dk.aau.ida8.util.Tuple"
] |
import dk.aau.ida8.util.Tuple;
|
import dk.aau.ida8.util.*;
|
[
"dk.aau.ida8"
] |
dk.aau.ida8;
| 364,266
|
CompletableFuture<SetPublishingModeResponse> setPublishingMode(boolean publishingEnabled,
List<UInteger> subscriptionIds);
|
CompletableFuture<SetPublishingModeResponse> setPublishingMode(boolean publishingEnabled, List<UInteger> subscriptionIds);
|
/**
* This service is used to enable sending of notifications on one or more subscriptions.
*
* @param publishingEnabled {@code true} if publishing of notification messages is to be enabled.
* @param subscriptionIds a list of server-assigned subscription identifiers to enable or disable publishing on.
* @return a {@link CompletableFuture} containing the {@link SetPublishingModeResponse}.
*/
|
This service is used to enable sending of notifications on one or more subscriptions
|
setPublishingMode
|
{
"repo_name": "wsuetholz/opc-ua-sdk",
"path": "sdk-client/src/main/java/com/digitalpetri/opcua/sdk/client/api/services/SubscriptionServices.java",
"license": "agpl-3.0",
"size": 9275
}
|
[
"com.digitalpetri.opcua.stack.core.types.builtin.unsigned.UInteger",
"com.digitalpetri.opcua.stack.core.types.structured.SetPublishingModeResponse",
"java.util.List",
"java.util.concurrent.CompletableFuture"
] |
import com.digitalpetri.opcua.stack.core.types.builtin.unsigned.UInteger; import com.digitalpetri.opcua.stack.core.types.structured.SetPublishingModeResponse; import java.util.List; import java.util.concurrent.CompletableFuture;
|
import com.digitalpetri.opcua.stack.core.types.builtin.unsigned.*; import com.digitalpetri.opcua.stack.core.types.structured.*; import java.util.*; import java.util.concurrent.*;
|
[
"com.digitalpetri.opcua",
"java.util"
] |
com.digitalpetri.opcua; java.util;
| 451,920
|
private void addImport(final String base, final HashSet<String> set, final String name)
{
if(name.startsWith(base + "$") == false)
{
set.add(name.replace('$', '.'));
}
}
|
void function(final String base, final HashSet<String> set, final String name) { if(name.startsWith(base + "$") == false) { set.add(name.replace('$', '.')); } }
|
/**
* Add import in list
*
* @param base
* Base class name
* @param set
* List of import
* @param name
* Class name
*/
|
Add import in list
|
addImport
|
{
"repo_name": "printedheart/opennars",
"path": "nars_lab/src/main/java/jhelp/util/classLoader/EmptyClassLoader.java",
"license": "agpl-3.0",
"size": 34849
}
|
[
"java.util.HashSet"
] |
import java.util.HashSet;
|
import java.util.*;
|
[
"java.util"
] |
java.util;
| 2,005,917
|
protected synchronized void notifyChangeListeners() {
ChangeEvent e;
e = new ChangeEvent(this);
for (ChangeListener l: m_ChangeListeners)
l.stateChanged(e);
}
|
synchronized void function() { ChangeEvent e; e = new ChangeEvent(this); for (ChangeListener l: m_ChangeListeners) l.stateChanged(e); }
|
/**
* Notifies all the change listeners.
*/
|
Notifies all the change listeners
|
notifyChangeListeners
|
{
"repo_name": "waikato-datamining/adams-base",
"path": "adams-weka/src/main/java/adams/gui/visualization/instances/InstancesTable.java",
"license": "gpl-3.0",
"size": 24100
}
|
[
"javax.swing.event.ChangeEvent",
"javax.swing.event.ChangeListener"
] |
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener;
|
import javax.swing.event.*;
|
[
"javax.swing"
] |
javax.swing;
| 1,394,948
|
protected TrashService getTrashService() {
return trashServiceMock;
}
|
TrashService function() { return trashServiceMock; }
|
/**
* Override this to inject an actual implementation of the trash service into the instance service.
*
* @return the trash service that will be used, a mock by default
*/
|
Override this to inject an actual implementation of the trash service into the instance service
|
getTrashService
|
{
"repo_name": "sebbrudzinski/motech",
"path": "platform/mds/mds/src/test/java/org/motechproject/mds/it/BaseInstanceIT.java",
"license": "bsd-3-clause",
"size": 10086
}
|
[
"org.motechproject.mds.service.TrashService"
] |
import org.motechproject.mds.service.TrashService;
|
import org.motechproject.mds.service.*;
|
[
"org.motechproject.mds"
] |
org.motechproject.mds;
| 1,535,400
|
private Collection<String> getSafePathStrings(Collection<PathFragment> paths) {
ImmutableSet.Builder<String> result = ImmutableSet.builder();
for (PathFragment path : paths) {
result.add(path.getSafePathString());
}
return result.build();
}
|
Collection<String> function(Collection<PathFragment> paths) { ImmutableSet.Builder<String> result = ImmutableSet.builder(); for (PathFragment path : paths) { result.add(path.getSafePathString()); } return result.build(); }
|
/**
* Get the safe path strings for a list of paths to use in the build variables.
*/
|
Get the safe path strings for a list of paths to use in the build variables
|
getSafePathStrings
|
{
"repo_name": "mikelalcon/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CppModel.java",
"license": "apache-2.0",
"size": 42278
}
|
[
"com.google.common.collect.ImmutableSet",
"com.google.devtools.build.lib.rules.cpp.CcCompilationOutputs",
"com.google.devtools.build.lib.vfs.PathFragment",
"java.util.Collection"
] |
import com.google.common.collect.ImmutableSet; import com.google.devtools.build.lib.rules.cpp.CcCompilationOutputs; import com.google.devtools.build.lib.vfs.PathFragment; import java.util.Collection;
|
import com.google.common.collect.*; import com.google.devtools.build.lib.rules.cpp.*; import com.google.devtools.build.lib.vfs.*; import java.util.*;
|
[
"com.google.common",
"com.google.devtools",
"java.util"
] |
com.google.common; com.google.devtools; java.util;
| 2,077,370
|
void saveFilesUnderConstruction(FSNamesystem fsn, DataOutputStream out,
Map<Long, INodeFile> snapshotUCMap) throws IOException {
// This is run by an inferior thread of saveNamespace, which holds a read
// lock on our behalf. If we took the read lock here, we could block
// for fairness if a writer is waiting on the lock.
final LeaseManager leaseManager = fsn.getLeaseManager();
final FSDirectory dir = fsn.getFSDirectory();
synchronized (leaseManager) {
Collection<Long> filesWithUC = leaseManager.getINodeIdWithLeases();
for (Long id : filesWithUC) {
// TODO: for HDFS-5428, because of rename operations, some
// under-construction files that are
// in the current fs directory can also be captured in the
// snapshotUCMap. We should remove them from the snapshotUCMap.
snapshotUCMap.remove(id);
}
out.writeInt(filesWithUC.size() + snapshotUCMap.size()); // write the size
for (Long id : filesWithUC) {
INodeFile file = dir.getInode(id).asFile();
String path = file.getFullPathName();
FSImageSerialization.writeINodeUnderConstruction(
out, file, path);
}
for (Map.Entry<Long, INodeFile> entry : snapshotUCMap.entrySet()) {
// for those snapshot INodeFileUC, we use "/.reserved/.inodes/<inodeid>"
// as their paths
StringBuilder b = new StringBuilder();
b.append(FSDirectory.DOT_RESERVED_PATH_PREFIX)
.append(Path.SEPARATOR).append(FSDirectory.DOT_INODES_STRING)
.append(Path.SEPARATOR).append(entry.getValue().getId());
FSImageSerialization.writeINodeUnderConstruction(
out, entry.getValue(), b.toString());
}
}
}
}
|
void saveFilesUnderConstruction(FSNamesystem fsn, DataOutputStream out, Map<Long, INodeFile> snapshotUCMap) throws IOException { final LeaseManager leaseManager = fsn.getLeaseManager(); final FSDirectory dir = fsn.getFSDirectory(); synchronized (leaseManager) { Collection<Long> filesWithUC = leaseManager.getINodeIdWithLeases(); for (Long id : filesWithUC) { snapshotUCMap.remove(id); } out.writeInt(filesWithUC.size() + snapshotUCMap.size()); for (Long id : filesWithUC) { INodeFile file = dir.getInode(id).asFile(); String path = file.getFullPathName(); FSImageSerialization.writeINodeUnderConstruction( out, file, path); } for (Map.Entry<Long, INodeFile> entry : snapshotUCMap.entrySet()) { StringBuilder b = new StringBuilder(); b.append(FSDirectory.DOT_RESERVED_PATH_PREFIX) .append(Path.SEPARATOR).append(FSDirectory.DOT_INODES_STRING) .append(Path.SEPARATOR).append(entry.getValue().getId()); FSImageSerialization.writeINodeUnderConstruction( out, entry.getValue(), b.toString()); } } } }
|
/**
* Serializes leases.
*/
|
Serializes leases
|
saveFilesUnderConstruction
|
{
"repo_name": "vlajos/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImageFormat.java",
"license": "apache-2.0",
"size": 56850
}
|
[
"java.io.DataOutputStream",
"java.io.IOException",
"java.util.Collection",
"java.util.Map",
"org.apache.hadoop.fs.Path"
] |
import java.io.DataOutputStream; import java.io.IOException; import java.util.Collection; import java.util.Map; import org.apache.hadoop.fs.Path;
|
import java.io.*; import java.util.*; import org.apache.hadoop.fs.*;
|
[
"java.io",
"java.util",
"org.apache.hadoop"
] |
java.io; java.util; org.apache.hadoop;
| 2,422,799
|
@Test
public void nullFormatZip4() {
final ZipCode test = new ZipCode();
test.setZip(null);
test.setZip4("1111");
Assert.assertNull(test.toString());
}
|
void function() { final ZipCode test = new ZipCode(); test.setZip(null); test.setZip4("1111"); Assert.assertNull(test.toString()); }
|
/**
* Test null with zip4
*/
|
Test null with zip4
|
nullFormatZip4
|
{
"repo_name": "efsavage/ajah",
"path": "ajah-geo/src/test/java/test/ajah/geo/us/ZipCodeTest.java",
"license": "apache-2.0",
"size": 2877
}
|
[
"com.ajah.geo.us.ZipCode",
"org.junit.Assert"
] |
import com.ajah.geo.us.ZipCode; import org.junit.Assert;
|
import com.ajah.geo.us.*; import org.junit.*;
|
[
"com.ajah.geo",
"org.junit"
] |
com.ajah.geo; org.junit;
| 424,358
|
private void copyLocators( Element src, Element dst ) {
forest.locatorTable.storeStartLocation(
dst, forest.locatorTable.getStartLocation(src) );
forest.locatorTable.storeEndLocation(
dst, forest.locatorTable.getEndLocation(src) );
// recursively process child elements
Element[] srcChilds = DOMUtils.getChildElements(src);
Element[] dstChilds = DOMUtils.getChildElements(dst);
for( int i=0; i<srcChilds.length; i++ )
copyLocators( srcChilds[i], dstChilds[i] );
}
|
void function( Element src, Element dst ) { forest.locatorTable.storeStartLocation( dst, forest.locatorTable.getStartLocation(src) ); forest.locatorTable.storeEndLocation( dst, forest.locatorTable.getEndLocation(src) ); Element[] srcChilds = DOMUtils.getChildElements(src); Element[] dstChilds = DOMUtils.getChildElements(dst); for( int i=0; i<srcChilds.length; i++ ) copyLocators( srcChilds[i], dstChilds[i] ); }
|
/**
* Copies location information attached to the "src" node to the "dst" node.
*/
|
Copies location information attached to the "src" node to the "dst" node
|
copyLocators
|
{
"repo_name": "rokn/Count_Words_2015",
"path": "testing/openjdk2/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/Internalizer.java",
"license": "mit",
"size": 24120
}
|
[
"com.sun.tools.internal.xjc.util.DOMUtils",
"org.w3c.dom.Element"
] |
import com.sun.tools.internal.xjc.util.DOMUtils; import org.w3c.dom.Element;
|
import com.sun.tools.internal.xjc.util.*; import org.w3c.dom.*;
|
[
"com.sun.tools",
"org.w3c.dom"
] |
com.sun.tools; org.w3c.dom;
| 1,138,403
|
@ServiceMethod(returns = ReturnType.SINGLE)
WebApplicationFirewallPolicyInner createOrUpdate(
String resourceGroupName, String policyName, WebApplicationFirewallPolicyInner parameters, Context context);
|
@ServiceMethod(returns = ReturnType.SINGLE) WebApplicationFirewallPolicyInner createOrUpdate( String resourceGroupName, String policyName, WebApplicationFirewallPolicyInner parameters, Context context);
|
/**
* Create or update policy with specified rule set name within a resource group.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param policyName The name of the Web Application Firewall Policy.
* @param parameters Policy to be created.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return defines web application firewall policy.
*/
|
Create or update policy with specified rule set name within a resource group
|
createOrUpdate
|
{
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/PoliciesClient.java",
"license": "mit",
"size": 10499
}
|
[
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.util.Context",
"com.azure.resourcemanager.frontdoor.fluent.models.WebApplicationFirewallPolicyInner"
] |
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.util.Context; import com.azure.resourcemanager.frontdoor.fluent.models.WebApplicationFirewallPolicyInner;
|
import com.azure.core.annotation.*; import com.azure.core.util.*; import com.azure.resourcemanager.frontdoor.fluent.models.*;
|
[
"com.azure.core",
"com.azure.resourcemanager"
] |
com.azure.core; com.azure.resourcemanager;
| 2,733,416
|
public Attributes getAttributes(Name name, String[] attrIds)
throws NamingException {
Entry entry = null;
if (name.isEmpty())
entry = entries;
else
entry = treeLookup(name);
if (entry == null)
throw new NamingException
(sm.getString("resources.notFound", name));
ZipEntry zipEntry = entry.getEntry();
ResourceAttributes attrs = new ResourceAttributes();
attrs.setCreationDate(new Date(zipEntry.getTime()));
attrs.setName(entry.getName());
if (!zipEntry.isDirectory())
attrs.setResourceType("");
attrs.setContentLength(zipEntry.getSize());
attrs.setLastModified(new Date(zipEntry.getTime()));
return attrs;
}
|
Attributes function(Name name, String[] attrIds) throws NamingException { Entry entry = null; if (name.isEmpty()) entry = entries; else entry = treeLookup(name); if (entry == null) throw new NamingException (sm.getString(STR, name)); ZipEntry zipEntry = entry.getEntry(); ResourceAttributes attrs = new ResourceAttributes(); attrs.setCreationDate(new Date(zipEntry.getTime())); attrs.setName(entry.getName()); if (!zipEntry.isDirectory()) attrs.setResourceType(""); attrs.setContentLength(zipEntry.getSize()); attrs.setLastModified(new Date(zipEntry.getTime())); return attrs; }
|
/**
* Retrieves all of the attributes associated with a named object.
*
* @return the set of attributes associated with name.
* Returns an empty attribute set if name has no attributes; never null.
* @param name the name of the object from which to retrieve attributes
* @exception NamingException if a naming exception is encountered
*/
|
Retrieves all of the attributes associated with a named object
|
getAttributes
|
{
"repo_name": "devjin24/howtomcatworks",
"path": "bookrefer/jakarta-tomcat-4.1.12-src/catalina/src/share/org/apache/naming/resources/WARDirContext.java",
"license": "apache-2.0",
"size": 37143
}
|
[
"java.util.Date",
"java.util.zip.ZipEntry",
"javax.naming.Name",
"javax.naming.NamingException",
"javax.naming.directory.Attributes"
] |
import java.util.Date; import java.util.zip.ZipEntry; import javax.naming.Name; import javax.naming.NamingException; import javax.naming.directory.Attributes;
|
import java.util.*; import java.util.zip.*; import javax.naming.*; import javax.naming.directory.*;
|
[
"java.util",
"javax.naming"
] |
java.util; javax.naming;
| 1,664,570
|
@SuppressWarnings("unchecked")
Collection<ProcessConf> processQuery(ProcessFilter filter) {
List<QName> pids = _store.getProcesses();
|
@SuppressWarnings(STR) Collection<ProcessConf> processQuery(ProcessFilter filter) { List<QName> pids = _store.getProcesses();
|
/**
* Query processes based on a {@link ProcessFilter} criteria. This is
* implemented in memory rather than via database calls since the processes
* are managed by the {@link ProcessStore} object and we don't want to make
* this needlessly complicated.
*
* @param filter
* @return
*/
|
Query processes based on a <code>ProcessFilter</code> criteria. This is implemented in memory rather than via database calls since the processes are managed by the <code>ProcessStore</code> object and we don't want to make this needlessly complicated
|
processQuery
|
{
"repo_name": "Subasinghe/ode",
"path": "bpel-runtime/src/main/java/org/apache/ode/bpel/engine/ProcessAndInstanceManagementImpl.java",
"license": "apache-2.0",
"size": 69505
}
|
[
"java.util.Collection",
"java.util.List",
"javax.xml.namespace.QName",
"org.apache.ode.bpel.common.ProcessFilter",
"org.apache.ode.bpel.iapi.ProcessConf"
] |
import java.util.Collection; import java.util.List; import javax.xml.namespace.QName; import org.apache.ode.bpel.common.ProcessFilter; import org.apache.ode.bpel.iapi.ProcessConf;
|
import java.util.*; import javax.xml.namespace.*; import org.apache.ode.bpel.common.*; import org.apache.ode.bpel.iapi.*;
|
[
"java.util",
"javax.xml",
"org.apache.ode"
] |
java.util; javax.xml; org.apache.ode;
| 1,056,609
|
public static EObject resolveElementAt( XtextResource resource, int offset )
{
try {
return EObjectUtils.resolveElementAt( resource, offset );
} catch( NullPointerException e ) {
// in xtext 2.0, there is a bug, that if the file
// contains errors, this method may throw a null pointer exception
return null;
}
}
|
static EObject function( XtextResource resource, int offset ) { try { return EObjectUtils.resolveElementAt( resource, offset ); } catch( NullPointerException e ) { return null; } }
|
/**
* Returns the {@link EObject} found at the specified offset in the
* specified resource
*
* @param resource
* The resource to search into
* @param offset
* The offset where to search
* @return An {@link EObject} instance of null if none found.
*/
|
Returns the <code>EObject</code> found at the specified offset in the specified resource
|
resolveElementAt
|
{
"repo_name": "ehsan/wesnoth",
"path": "utils/umc_dev/org.wesnoth/src/org/wesnoth/utils/WMLUtils.java",
"license": "gpl-2.0",
"size": 7033
}
|
[
"org.eclipse.emf.ecore.EObject",
"org.eclipse.xtext.resource.XtextResource"
] |
import org.eclipse.emf.ecore.EObject; import org.eclipse.xtext.resource.XtextResource;
|
import org.eclipse.emf.ecore.*; import org.eclipse.xtext.resource.*;
|
[
"org.eclipse.emf",
"org.eclipse.xtext"
] |
org.eclipse.emf; org.eclipse.xtext;
| 2,282,409
|
public static Bson out(final Bson destination) {
return new SimplePipelineStage("$out", destination);
}
|
static Bson function(final Bson destination) { return new SimplePipelineStage("$out", destination); }
|
/**
* Creates a $out pipeline stage that writes out to the specified destination
*
* @param destination the destination details
* @return the $out pipeline stage
* @mongodb.driver.manual reference/operator/aggregation/out/ $out
* @since 4.1
*/
|
Creates a $out pipeline stage that writes out to the specified destination
|
out
|
{
"repo_name": "rozza/mongo-java-driver",
"path": "driver-core/src/main/com/mongodb/client/model/Aggregates.java",
"license": "apache-2.0",
"size": 61174
}
|
[
"org.bson.conversions.Bson"
] |
import org.bson.conversions.Bson;
|
import org.bson.conversions.*;
|
[
"org.bson.conversions"
] |
org.bson.conversions;
| 2,611,142
|
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
super.onCreateView(inflater, container, savedInstanceState);
return null;
}
|
View function(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { super.onCreateView(inflater, container, savedInstanceState); return null; }
|
/**
* The layout has to be selected according to the calling Activity.
* MainActivity and DetailActivity each has its own layout, NOT
* necessarily dependent on device size or orientation.
*/
|
The layout has to be selected according to the calling Activity. MainActivity and DetailActivity each has its own layout, NOT necessarily dependent on device size or orientation
|
onCreateView
|
{
"repo_name": "jheske/Popcorn",
"path": "app/src/main/java/com/nano/movies/activities/DetailFragment.java",
"license": "apache-2.0",
"size": 14916
}
|
[
"android.os.Bundle",
"android.view.LayoutInflater",
"android.view.View",
"android.view.ViewGroup"
] |
import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup;
|
import android.os.*; import android.view.*;
|
[
"android.os",
"android.view"
] |
android.os; android.view;
| 1,874,417
|
public List<DataAccessRequest> findAll(@Nullable String applicant) {
if(Strings.isNullOrEmpty(applicant)) return dataAccessRequestRepository.findAll();
return dataAccessRequestRepository.findByApplicant(applicant);
}
|
List<DataAccessRequest> function(@Nullable String applicant) { if(Strings.isNullOrEmpty(applicant)) return dataAccessRequestRepository.findAll(); return dataAccessRequestRepository.findByApplicant(applicant); }
|
/**
* Get all {@link DataAccessRequest}s, optionally filtered by applicant.
*
* @param applicant
* @return
*/
|
Get all <code>DataAccessRequest</code>s, optionally filtered by applicant
|
findAll
|
{
"repo_name": "apruden/mica2",
"path": "mica-core/src/main/java/org/obiba/mica/access/service/DataAccessRequestService.java",
"license": "gpl-3.0",
"size": 17711
}
|
[
"com.google.common.base.Strings",
"java.util.List",
"javax.annotation.Nullable",
"org.obiba.mica.access.domain.DataAccessRequest"
] |
import com.google.common.base.Strings; import java.util.List; import javax.annotation.Nullable; import org.obiba.mica.access.domain.DataAccessRequest;
|
import com.google.common.base.*; import java.util.*; import javax.annotation.*; import org.obiba.mica.access.domain.*;
|
[
"com.google.common",
"java.util",
"javax.annotation",
"org.obiba.mica"
] |
com.google.common; java.util; javax.annotation; org.obiba.mica;
| 1,299,573
|
private void extractData(Message msg) throws NotificationServerException {
TextMessage tm = (TextMessage) msg;
try {
channel = tm.getStringProperty(NotificationServerConstant.JMS_HEADER_CHANNEL);
} catch (JMSException e) {
throw new NotificationServerException(e);
}
try {
payLoad = tm.getText();
} catch (JMSException e) {
throw new NotificationServerException(e);
}
}
|
void function(Message msg) throws NotificationServerException { TextMessage tm = (TextMessage) msg; try { channel = tm.getStringProperty(NotificationServerConstant.JMS_HEADER_CHANNEL); } catch (JMSException e) { throw new NotificationServerException(e); } try { payLoad = tm.getText(); } catch (JMSException e) { throw new NotificationServerException(e); } }
|
/**
* Extract the data from the header of the JMS message
* @param msg : the message to extract the notification data from.
* @throws NotificationServerException
*/
|
Extract the data from the header of the JMS message
|
extractData
|
{
"repo_name": "SilverDav/Silverpeas-Core",
"path": "core-library/src/main/java/org/silverpeas/core/notification/user/server/channel/AbstractListener.java",
"license": "agpl-3.0",
"size": 2908
}
|
[
"javax.jms.JMSException",
"javax.jms.Message",
"javax.jms.TextMessage",
"org.silverpeas.core.notification.user.server.NotificationServerConstant",
"org.silverpeas.core.notification.user.server.NotificationServerException"
] |
import javax.jms.JMSException; import javax.jms.Message; import javax.jms.TextMessage; import org.silverpeas.core.notification.user.server.NotificationServerConstant; import org.silverpeas.core.notification.user.server.NotificationServerException;
|
import javax.jms.*; import org.silverpeas.core.notification.user.server.*;
|
[
"javax.jms",
"org.silverpeas.core"
] |
javax.jms; org.silverpeas.core;
| 1,896,929
|
@Override
public void onCreate() {
Log.d(LOG_TAG, "onCreate of DarshakService is called.");
// Initialize the thread handler.
HandlerThread thread = new HandlerThread("ServiceStartArguments",
Process.THREAD_PRIORITY_BACKGROUND);
thread.start();
// Looper which keeps tracks of the the messages and the runnable added.
Looper mServiceLooper = thread.getLooper();
mServiceHandler = new ServiceHandler(mServiceLooper);
// Set the intent to be triggered when clicked on notification,
sNotificationIntent = new Intent(getApplicationContext(),
AirplaneModeConfigureActivity.class);
sContentIntent = PendingIntent.getActivity(getApplicationContext(), 0,
sNotificationIntent, Intent.FLAG_ACTIVITY_NEW_TASK);
sDBHelper = ((Application) getApplication()).getDBHelper();
sPacketReader = new PacketReader(getApplicationContext(), sDBHelper);
}
|
void function() { Log.d(LOG_TAG, STR); HandlerThread thread = new HandlerThread(STR, Process.THREAD_PRIORITY_BACKGROUND); thread.start(); Looper mServiceLooper = thread.getLooper(); mServiceHandler = new ServiceHandler(mServiceLooper); sNotificationIntent = new Intent(getApplicationContext(), AirplaneModeConfigureActivity.class); sContentIntent = PendingIntent.getActivity(getApplicationContext(), 0, sNotificationIntent, Intent.FLAG_ACTIVITY_NEW_TASK); sDBHelper = ((Application) getApplication()).getDBHelper(); sPacketReader = new PacketReader(getApplicationContext(), sDBHelper); }
|
/**
* Initialize the Thread handler.
*/
|
Initialize the Thread handler
|
onCreate
|
{
"repo_name": "darshakframework/darshak",
"path": "src/com/darshak/service/DarshakService.java",
"license": "gpl-3.0",
"size": 16327
}
|
[
"android.app.PendingIntent",
"android.content.Intent",
"android.os.HandlerThread",
"android.os.Looper",
"android.os.Process",
"android.util.Log",
"com.darshak.AirplaneModeConfigureActivity",
"com.darshak.Application",
"com.darshak.packetreader.PacketReader"
] |
import android.app.PendingIntent; import android.content.Intent; import android.os.HandlerThread; import android.os.Looper; import android.os.Process; import android.util.Log; import com.darshak.AirplaneModeConfigureActivity; import com.darshak.Application; import com.darshak.packetreader.PacketReader;
|
import android.app.*; import android.content.*; import android.os.*; import android.util.*; import com.darshak.*; import com.darshak.packetreader.*;
|
[
"android.app",
"android.content",
"android.os",
"android.util",
"com.darshak",
"com.darshak.packetreader"
] |
android.app; android.content; android.os; android.util; com.darshak; com.darshak.packetreader;
| 441,366
|
public static boolean canSmelt(ItemStack input) {
if (getResult(input) != null)
return true;
return false;
}
|
static boolean function(ItemStack input) { if (getResult(input) != null) return true; return false; }
|
/**
*
* Checks the given input ItemStack for a result.
*
* @param input
* The input ItemStack to check
* @return true if the input can be processed
*/
|
Checks the given input ItemStack for a result
|
canSmelt
|
{
"repo_name": "jarthur36/MMOMats",
"path": "mm_common/uk/co/alteff4/mm/api/registry/ForgeRecipeRegistry.java",
"license": "gpl-3.0",
"size": 2209
}
|
[
"net.minecraft.item.ItemStack"
] |
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.*;
|
[
"net.minecraft.item"
] |
net.minecraft.item;
| 2,757,109
|
@ManagedOperation(description = "Sets the value of a Camel global option")
void setGlobalOption(String key, String value) throws Exception;
|
@ManagedOperation(description = STR) void setGlobalOption(String key, String value) throws Exception;
|
/**
* Sets the value of a CamelContext property name
*
* @param key the global option key
* @param value the global option value
* @throws Exception when an error occurred
*/
|
Sets the value of a CamelContext property name
|
setGlobalOption
|
{
"repo_name": "tlehoux/camel",
"path": "camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedCamelContextMBean.java",
"license": "apache-2.0",
"size": 17024
}
|
[
"org.apache.camel.api.management.ManagedOperation"
] |
import org.apache.camel.api.management.ManagedOperation;
|
import org.apache.camel.api.management.*;
|
[
"org.apache.camel"
] |
org.apache.camel;
| 937,060
|
@Override
protected LineGraph2DRenderer getRenderer(int imageWidth, int imageHeight) {
LineGraph2DRenderer renderer = new LineGraph2DRenderer(imageWidth, imageHeight);
return renderer;
}
|
LineGraph2DRenderer function(int imageWidth, int imageHeight) { LineGraph2DRenderer renderer = new LineGraph2DRenderer(imageWidth, imageHeight); return renderer; }
|
/**
* Returns the renderer used in the render loop.
* The 2D point is rendered by a <code>LineGraph2DRenderer</code>.
* @param imageWidth width of rendered image in pixels
* @param imageHeight height of rendered image in pixels
* @return a line graph to draw the data
*/
|
Returns the renderer used in the render loop. The 2D point is rendered by a <code>LineGraph2DRenderer</code>
|
getRenderer
|
{
"repo_name": "richardfearn/diirt",
"path": "graphene/graphene-profile/src/main/java/org/diirt/graphene/profile/impl/ProfileLineGraph2D.java",
"license": "mit",
"size": 3446
}
|
[
"org.diirt.graphene.LineGraph2DRenderer"
] |
import org.diirt.graphene.LineGraph2DRenderer;
|
import org.diirt.graphene.*;
|
[
"org.diirt.graphene"
] |
org.diirt.graphene;
| 1,821,020
|
public void registerEvents() {
final PluginManager manager = getServer().getPluginManager();
// Nether portal events
manager.registerEvents(new NetherPortals(this), this);
// Island Protection events
manager.registerEvents(new IslandGuard(this), this);
// Player events
manager.registerEvents(new PlayerEvents(this), this);
// New V1.8 events
if (onePointEight) {
manager.registerEvents(new IslandGuardNew(this), this);
}
// Events for when a player joins or leaves the server
manager.registerEvents(new JoinLeaveEvents(this), this);
// Ensures Lava flows correctly in ASkyBlock world
lavaListener = new LavaCheck(this);
manager.registerEvents(lavaListener, this);
// Ensures that water is acid
manager.registerEvents(new AcidEffect(this), this);
// Ensures that boats are safe in ASkyBlock
if (Settings.acidDamage > 0D) {
manager.registerEvents(new SafeBoat(this), this);
}
// Enables warp signs in ASkyBlock
warpSignsListener = new WarpSigns(this);
manager.registerEvents(warpSignsListener, this);
// Control panel - for future use
// manager.registerEvents(new ControlPanel(), this);
// Change names of inventory items
manager.registerEvents(new AcidInventory(this), this);
// Biomes
// Load Biomes
biomes = new BiomesPanel(this);
manager.registerEvents(biomes, this);
// Schematics panel
schematicsPanel = new SchematicsPanel(this);
manager.registerEvents(schematicsPanel, this);
// Track incoming world teleports
manager.registerEvents(new WorldEnter(this), this);
// Team chat
chatListener = new ChatListener(this);
manager.registerEvents(chatListener, this);
// Wither
if (Settings.restrictWither) {
manager.registerEvents(new WitherEvents(this), this);
}
}
|
void function() { final PluginManager manager = getServer().getPluginManager(); manager.registerEvents(new NetherPortals(this), this); manager.registerEvents(new IslandGuard(this), this); manager.registerEvents(new PlayerEvents(this), this); if (onePointEight) { manager.registerEvents(new IslandGuardNew(this), this); } manager.registerEvents(new JoinLeaveEvents(this), this); lavaListener = new LavaCheck(this); manager.registerEvents(lavaListener, this); manager.registerEvents(new AcidEffect(this), this); if (Settings.acidDamage > 0D) { manager.registerEvents(new SafeBoat(this), this); } warpSignsListener = new WarpSigns(this); manager.registerEvents(warpSignsListener, this); manager.registerEvents(new AcidInventory(this), this); biomes = new BiomesPanel(this); manager.registerEvents(biomes, this); schematicsPanel = new SchematicsPanel(this); manager.registerEvents(schematicsPanel, this); manager.registerEvents(new WorldEnter(this), this); chatListener = new ChatListener(this); manager.registerEvents(chatListener, this); if (Settings.restrictWither) { manager.registerEvents(new WitherEvents(this), this); } }
|
/**
* Registers events
*/
|
Registers events
|
registerEvents
|
{
"repo_name": "jaxzin/askyblock",
"path": "src/com/wasteofplastic/askyblock/ASkyBlock.java",
"license": "gpl-2.0",
"size": 63604
}
|
[
"com.wasteofplastic.askyblock.listeners.AcidEffect",
"com.wasteofplastic.askyblock.listeners.AcidInventory",
"com.wasteofplastic.askyblock.listeners.ChatListener",
"com.wasteofplastic.askyblock.listeners.IslandGuard",
"com.wasteofplastic.askyblock.listeners.IslandGuardNew",
"com.wasteofplastic.askyblock.listeners.JoinLeaveEvents",
"com.wasteofplastic.askyblock.listeners.LavaCheck",
"com.wasteofplastic.askyblock.listeners.NetherPortals",
"com.wasteofplastic.askyblock.listeners.PlayerEvents",
"com.wasteofplastic.askyblock.listeners.WitherEvents",
"com.wasteofplastic.askyblock.listeners.WorldEnter",
"com.wasteofplastic.askyblock.panels.BiomesPanel",
"com.wasteofplastic.askyblock.panels.SchematicsPanel",
"org.bukkit.plugin.PluginManager"
] |
import com.wasteofplastic.askyblock.listeners.AcidEffect; import com.wasteofplastic.askyblock.listeners.AcidInventory; import com.wasteofplastic.askyblock.listeners.ChatListener; import com.wasteofplastic.askyblock.listeners.IslandGuard; import com.wasteofplastic.askyblock.listeners.IslandGuardNew; import com.wasteofplastic.askyblock.listeners.JoinLeaveEvents; import com.wasteofplastic.askyblock.listeners.LavaCheck; import com.wasteofplastic.askyblock.listeners.NetherPortals; import com.wasteofplastic.askyblock.listeners.PlayerEvents; import com.wasteofplastic.askyblock.listeners.WitherEvents; import com.wasteofplastic.askyblock.listeners.WorldEnter; import com.wasteofplastic.askyblock.panels.BiomesPanel; import com.wasteofplastic.askyblock.panels.SchematicsPanel; import org.bukkit.plugin.PluginManager;
|
import com.wasteofplastic.askyblock.listeners.*; import com.wasteofplastic.askyblock.panels.*; import org.bukkit.plugin.*;
|
[
"com.wasteofplastic.askyblock",
"org.bukkit.plugin"
] |
com.wasteofplastic.askyblock; org.bukkit.plugin;
| 1,726,514
|
protected String getNodeValue(Xpp3Dom parent, String name, String defaultValue) {
Xpp3Dom node = parent.getChild(name);
if (node == null) {
return defaultValue;
// do NOT create nodes for inspection, only explicitly with setNodeValue()
// node = new Xpp3Dom( name );
// node.setValue( defaultValue );
// parent.addChild( node );
}
return node.getValue();
}
|
String function(Xpp3Dom parent, String name, String defaultValue) { Xpp3Dom node = parent.getChild(name); if (node == null) { return defaultValue; } return node.getValue(); }
|
/**
* Gets the node value, creating it on the fly if not existing.
*/
|
Gets the node value, creating it on the fly if not existing
|
getNodeValue
|
{
"repo_name": "scmod/nexus-public",
"path": "components/nexus-core/src/main/java/org/sonatype/nexus/configuration/model/AbstractXpp3DomExternalConfigurationHolder.java",
"license": "epl-1.0",
"size": 7881
}
|
[
"org.codehaus.plexus.util.xml.Xpp3Dom"
] |
import org.codehaus.plexus.util.xml.Xpp3Dom;
|
import org.codehaus.plexus.util.xml.*;
|
[
"org.codehaus.plexus"
] |
org.codehaus.plexus;
| 1,651,871
|
protected void setEditPart(EditPart source) {
this.source = source;
// source.addEditPartListener();
}
|
void function(EditPart source) { this.source = source; }
|
/**
* Sets the source edit part.
* @param source the source edit part
*/
|
Sets the source edit part
|
setEditPart
|
{
"repo_name": "mikesligo/visGrid",
"path": "ie.tcd.gmf.visGrid.plugin/src/org/eclipse/gmf/runtime/lite/services/TreeDirectEditManager.java",
"license": "gpl-3.0",
"size": 10314
}
|
[
"org.eclipse.gef.EditPart"
] |
import org.eclipse.gef.EditPart;
|
import org.eclipse.gef.*;
|
[
"org.eclipse.gef"
] |
org.eclipse.gef;
| 2,358,067
|
@Override
public boolean isSubscribed(PublisherEvent publisherEvent) throws NotificationManagementException {
return (publisherEvent != null && subscriptionMap.containsKey(publisherEvent.getEventName()));
}
|
boolean function(PublisherEvent publisherEvent) throws NotificationManagementException { return (publisherEvent != null && subscriptionMap.containsKey(publisherEvent.getEventName())); }
|
/**
* Checks whether this message sending module is registered for the given name of event
*
* @return true if subscribed. false if not.
*/
|
Checks whether this message sending module is registered for the given name of event
|
isSubscribed
|
{
"repo_name": "thariyarox/ORG-carbon-identity",
"path": "components/identity/org.wso2.carbon.identity.notification.mgt.email/src/main/java/org/wso2/carbon/identity/notification/mgt/email/EmailSendingModule.java",
"license": "apache-2.0",
"size": 11762
}
|
[
"org.wso2.carbon.identity.notification.mgt.NotificationManagementException",
"org.wso2.carbon.identity.notification.mgt.bean.PublisherEvent"
] |
import org.wso2.carbon.identity.notification.mgt.NotificationManagementException; import org.wso2.carbon.identity.notification.mgt.bean.PublisherEvent;
|
import org.wso2.carbon.identity.notification.mgt.*; import org.wso2.carbon.identity.notification.mgt.bean.*;
|
[
"org.wso2.carbon"
] |
org.wso2.carbon;
| 1,653,434
|
public String showWebPage(final String url, HashMap<String, Boolean> features, HashMap<String, Integer> params) {
// Determine if we should hide the location bar.
showLocationBar = true;
showZoomControls = true;
openWindowHidden = false;
if (features != null) {
Boolean show = features.get(LOCATION);
if (show != null) {
showLocationBar = show.booleanValue();
}
Boolean zoom = features.get(ZOOM);
if (zoom != null) {
showZoomControls = zoom.booleanValue();
}
Boolean hidden = features.get(HIDDEN);
if (hidden != null) {
openWindowHidden = hidden.booleanValue();
}
Boolean hardwareBack = features.get(HARDWARE_BACK_BUTTON);
if (hardwareBack != null) {
hadwareBackButton = hardwareBack.booleanValue();
}
Boolean cache = features.get(CLEAR_ALL_CACHE);
if (cache != null) {
clearAllCache = cache.booleanValue();
} else {
cache = features.get(CLEAR_SESSION_CACHE);
if (cache != null) {
clearSessionCache = cache.booleanValue();
}
}
}
final CordovaWebView thatWebView = this.webView;
final HashMap<String, Integer> webViewParams = params;
|
String function(final String url, HashMap<String, Boolean> features, HashMap<String, Integer> params) { showLocationBar = true; showZoomControls = true; openWindowHidden = false; if (features != null) { Boolean show = features.get(LOCATION); if (show != null) { showLocationBar = show.booleanValue(); } Boolean zoom = features.get(ZOOM); if (zoom != null) { showZoomControls = zoom.booleanValue(); } Boolean hidden = features.get(HIDDEN); if (hidden != null) { openWindowHidden = hidden.booleanValue(); } Boolean hardwareBack = features.get(HARDWARE_BACK_BUTTON); if (hardwareBack != null) { hadwareBackButton = hardwareBack.booleanValue(); } Boolean cache = features.get(CLEAR_ALL_CACHE); if (cache != null) { clearAllCache = cache.booleanValue(); } else { cache = features.get(CLEAR_SESSION_CACHE); if (cache != null) { clearSessionCache = cache.booleanValue(); } } } final CordovaWebView thatWebView = this.webView; final HashMap<String, Integer> webViewParams = params;
|
/**
* Display a new browser with the specified URL.
*
* @param url The url to load.
* @param jsonObject
*/
|
Display a new browser with the specified URL
|
showWebPage
|
{
"repo_name": "etabard/Cordova-OverAppBrowser",
"path": "src/android/OverAppBrowser.java",
"license": "mit",
"size": 33282
}
|
[
"java.util.HashMap",
"org.apache.cordova.CordovaWebView"
] |
import java.util.HashMap; import org.apache.cordova.CordovaWebView;
|
import java.util.*; import org.apache.cordova.*;
|
[
"java.util",
"org.apache.cordova"
] |
java.util; org.apache.cordova;
| 2,397,334
|
EAttribute getTag_attr_Value();
|
EAttribute getTag_attr_Value();
|
/**
* Returns the meta object for the attribute '{@link org.xtext.example.macros.macros.Tag_attr#getValue <em>Value</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Value</em>'.
* @see org.xtext.example.macros.macros.Tag_attr#getValue()
* @see #getTag_attr()
* @generated
*/
|
Returns the meta object for the attribute '<code>org.xtext.example.macros.macros.Tag_attr#getValue Value</code>'.
|
getTag_attr_Value
|
{
"repo_name": "adolfosbh/cs2as",
"path": "org.xtext.example.macros/src-gen/org/xtext/example/macros/macros/MacrosPackage.java",
"license": "epl-1.0",
"size": 25384
}
|
[
"org.eclipse.emf.ecore.EAttribute"
] |
import org.eclipse.emf.ecore.EAttribute;
|
import org.eclipse.emf.ecore.*;
|
[
"org.eclipse.emf"
] |
org.eclipse.emf;
| 763,692
|
public void setVersion(Version version) {
this.version = version;
}
|
void function(Version version) { this.version = version; }
|
/**
* If the serializer supports versioning it may set the version to use for the serialization on this object.
*
* @param version
*/
|
If the serializer supports versioning it may set the version to use for the serialization on this object
|
setVersion
|
{
"repo_name": "emrahkocaman/hazelcast",
"path": "hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/VersionedObjectDataOutput.java",
"license": "apache-2.0",
"size": 1866
}
|
[
"com.hazelcast.version.Version"
] |
import com.hazelcast.version.Version;
|
import com.hazelcast.version.*;
|
[
"com.hazelcast.version"
] |
com.hazelcast.version;
| 554,576
|
public static void deleteAll(Context context) {
SharedPreferencesStorage.writeSharedPreferences(context, INBOX_ITEM_KEY, null);
}
|
static void function(Context context) { SharedPreferencesStorage.writeSharedPreferences(context, INBOX_ITEM_KEY, null); }
|
/**
* Clear the entire storage of inbox items.
* @param context
*/
|
Clear the entire storage of inbox items
|
deleteAll
|
{
"repo_name": "wkmeijer/CS4160-trustchain-android",
"path": "app/src/main/java/nl/tudelft/cs4160/trustchain_android/SharedPreferences/InboxItemStorage.java",
"license": "lgpl-3.0",
"size": 3979
}
|
[
"android.content.Context"
] |
import android.content.Context;
|
import android.content.*;
|
[
"android.content"
] |
android.content;
| 379,860
|
public SearchRecentSuggestions getRecentSuggestions() {
return mRecentSuggestions;
}
|
SearchRecentSuggestions function() { return mRecentSuggestions; }
|
/**
* Returns the content provider wrapper that allows access to recent searches.
* @return Returns the content provider wrapper that allows access to recent searches.
*/
|
Returns the content provider wrapper that allows access to recent searches
|
getRecentSuggestions
|
{
"repo_name": "AdeebNqo/Thula",
"path": "Thula/src/main/java/com/ThulaApp.java",
"license": "gpl-3.0",
"size": 6952
}
|
[
"android.provider.SearchRecentSuggestions"
] |
import android.provider.SearchRecentSuggestions;
|
import android.provider.*;
|
[
"android.provider"
] |
android.provider;
| 509,158
|
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<VpnSiteInner> list();
|
@ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<VpnSiteInner> list();
|
/**
* Lists all the VpnSites in a subscription.
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return result of the request to list VpnSites as paginated response with {@link PagedIterable}.
*/
|
Lists all the VpnSites in a subscription
|
list
|
{
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VpnSitesClient.java",
"license": "mit",
"size": 22869
}
|
[
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedIterable",
"com.azure.resourcemanager.network.fluent.models.VpnSiteInner"
] |
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.network.fluent.models.VpnSiteInner;
|
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.network.fluent.models.*;
|
[
"com.azure.core",
"com.azure.resourcemanager"
] |
com.azure.core; com.azure.resourcemanager;
| 1,996,418
|
// ----- ASpath.prepend_as ----------------------------------------------- //
public final void prepend_as(int ASNum) {
if (segs.size() == 0) {
Segment seg = new Segment(Segment.SEQ, new ArrayList<Integer>());
seg.append_as(ASNum);
segs.add(seg);
} else {
if (((Segment)segs.get(0)).typ == Segment.SEQ) {
// insert the AS number at the beginning of the list
((Segment)segs.get(0)).prepend_as(ASNum);
} else {
// create a new segment of type AS_SEQUENCE
Segment seg = new Segment(Segment.SEQ, new ArrayList<Integer>());
seg.append_as(ASNum);
segs.add(0,seg);
}
}
}
|
final void function(int ASNum) { if (segs.size() == 0) { Segment seg = new Segment(Segment.SEQ, new ArrayList<Integer>()); seg.append_as(ASNum); segs.add(seg); } else { if (((Segment)segs.get(0)).typ == Segment.SEQ) { ((Segment)segs.get(0)).prepend_as(ASNum); } else { Segment seg = new Segment(Segment.SEQ, new ArrayList<Integer>()); seg.append_as(ASNum); segs.add(0,seg); } } }
|
/**
* Prepends an AS NHI address prefix to an AS_SEQUENCE segment at the
* beginning of the list of segments. A new AS_SEQUENCE segment is created
* at the beginning if necessary.
*
* @param asnh The AS NHI address prefix to prepend.
*/
|
Prepends an AS NHI address prefix to an AS_SEQUENCE segment at the beginning of the list of segments. A new AS_SEQUENCE segment is created at the beginning if necessary
|
prepend_as
|
{
"repo_name": "yunxao/JN-Sim",
"path": "Simulador/src/infonet/javasim/bgp4/path/ASpath.java",
"license": "apache-2.0",
"size": 12380
}
|
[
"java.util.ArrayList"
] |
import java.util.ArrayList;
|
import java.util.*;
|
[
"java.util"
] |
java.util;
| 1,978,744
|
public static boolean isImaginary(final Complex[][] a) {
final int n = a.length;
for (int i = 0; i < n; i++) if (!isImaginary(a[i])) return false;
return true;
}
|
static boolean function(final Complex[][] a) { final int n = a.length; for (int i = 0; i < n; i++) if (!isImaginary(a[i])) return false; return true; }
|
/**
* Check if the given complex matrix has only imaginary coefficients.
*
* @param a complex matrix to check
* @return boolean indicating imaginary matrix
*/
|
Check if the given complex matrix has only imaginary coefficients
|
isImaginary
|
{
"repo_name": "axkr/symja_android_library",
"path": "symja_android_library/matheclipse-external/src/main/java/de/lab4inf/math/lapack/LinearAlgebra.java",
"license": "gpl-3.0",
"size": 103733
}
|
[
"de.lab4inf.math.Complex"
] |
import de.lab4inf.math.Complex;
|
import de.lab4inf.math.*;
|
[
"de.lab4inf.math"
] |
de.lab4inf.math;
| 23,567
|
public void truncateLog(long zxid) throws IOException {
this.zkDb.truncateLog(zxid);
}
|
void function(long zxid) throws IOException { this.zkDb.truncateLog(zxid); }
|
/**
* trunccate the log to get in sync with others
* if in a quorum
* @param zxid the zxid that it needs to get in sync
* with others
* @throws IOException
*/
|
trunccate the log to get in sync with others if in a quorum
|
truncateLog
|
{
"repo_name": "woggle/mesos-old",
"path": "third_party/zookeeper-3.3.1/src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java",
"license": "apache-2.0",
"size": 22475
}
|
[
"java.io.IOException"
] |
import java.io.IOException;
|
import java.io.*;
|
[
"java.io"
] |
java.io;
| 2,031,968
|
@Override
public Person getLedgerPerson() {
if( (ledgerPerson == null || !StringUtils.equals(ledgerPerson.getEmployeeId(), emplid)) && StringUtils.isNotBlank(emplid) ) {
ledgerPerson = SpringContext.getBean(PersonService.class).getPersonByEmployeeId(emplid);
}
return ledgerPerson;
}
|
Person function() { if( (ledgerPerson == null !StringUtils.equals(ledgerPerson.getEmployeeId(), emplid)) && StringUtils.isNotBlank(emplid) ) { ledgerPerson = SpringContext.getBean(PersonService.class).getPersonByEmployeeId(emplid); } return ledgerPerson; }
|
/**
* Gets the Person
*
* @return Returns the Person
*/
|
Gets the Person
|
getLedgerPerson
|
{
"repo_name": "ua-eas/ua-kfs-5.3",
"path": "work/src/org/kuali/kfs/module/ld/businessobject/LedgerBalance.java",
"license": "agpl-3.0",
"size": 22122
}
|
[
"org.apache.commons.lang.StringUtils",
"org.kuali.kfs.sys.context.SpringContext",
"org.kuali.rice.kim.api.identity.Person",
"org.kuali.rice.kim.api.identity.PersonService"
] |
import org.apache.commons.lang.StringUtils; import org.kuali.kfs.sys.context.SpringContext; import org.kuali.rice.kim.api.identity.Person; import org.kuali.rice.kim.api.identity.PersonService;
|
import org.apache.commons.lang.*; import org.kuali.kfs.sys.context.*; import org.kuali.rice.kim.api.identity.*;
|
[
"org.apache.commons",
"org.kuali.kfs",
"org.kuali.rice"
] |
org.apache.commons; org.kuali.kfs; org.kuali.rice;
| 1,599,800
|
public Enumeration enumerateMeasures() {
Vector newVector = new Vector(1);
newVector.addElement("measureOutOfBagError");
return newVector.elements();
}
|
Enumeration function() { Vector newVector = new Vector(1); newVector.addElement(STR); return newVector.elements(); }
|
/**
* Returns an enumeration of the additional measure names.
*
* @return an enumeration of the measure names
*/
|
Returns an enumeration of the additional measure names
|
enumerateMeasures
|
{
"repo_name": "dsibournemouth/autoweka",
"path": "weka-3.7.7/src/main/java/weka/classifiers/trees/RandomForest.java",
"license": "gpl-3.0",
"size": 17123
}
|
[
"java.util.Enumeration",
"java.util.Vector"
] |
import java.util.Enumeration; import java.util.Vector;
|
import java.util.*;
|
[
"java.util"
] |
java.util;
| 1,786,672
|
public Iterator<E> iterator() {
return new Itr(toArray());
}
final class Itr implements Iterator<E> {
final Object[] array; // Array of all elements
int cursor; // index of next element to return
int lastRet = -1; // index of last element, or -1 if no such
Itr(Object[] array) {
this.array = array;
}
|
Iterator<E> function() { return new Itr(toArray()); } final class Itr implements Iterator<E> { final Object[] array; int cursor; int lastRet = -1; Itr(Object[] array) { this.array = array; }
|
/**
* Returns an iterator over the elements in this queue. The
* iterator does not return the elements in any particular order.
*
* <p>The returned iterator is
* <a href="package-summary.html#Weakly"><i>weakly consistent</i></a>.
*
* @return an iterator over the elements in this queue
*/
|
Returns an iterator over the elements in this queue. The iterator does not return the elements in any particular order. The returned iterator is weakly consistent
|
iterator
|
{
"repo_name": "google/desugar_jdk_libs",
"path": "jdk11/src/java.base/share/classes/java/util/concurrent/PriorityBlockingQueue.java",
"license": "gpl-2.0",
"size": 39104
}
|
[
"java.util.Iterator"
] |
import java.util.Iterator;
|
import java.util.*;
|
[
"java.util"
] |
java.util;
| 260,969
|
public static Map<String, Object> parseParameters(URI uri) throws URISyntaxException {
String query = uri.getQuery();
if (query == null) {
String schemeSpecificPart = uri.getSchemeSpecificPart();
int idx = schemeSpecificPart.indexOf('?');
if (idx < 0) {
// return an empty map
return new LinkedHashMap<String, Object>(0);
} else {
query = schemeSpecificPart.substring(idx + 1);
}
} else {
query = stripPrefix(query, "?");
}
return parseQuery(query);
}
|
static Map<String, Object> function(URI uri) throws URISyntaxException { String query = uri.getQuery(); if (query == null) { String schemeSpecificPart = uri.getSchemeSpecificPart(); int idx = schemeSpecificPart.indexOf('?'); if (idx < 0) { return new LinkedHashMap<String, Object>(0); } else { query = schemeSpecificPart.substring(idx + 1); } } else { query = stripPrefix(query, "?"); } return parseQuery(query); }
|
/**
* Parses the query parameters of the uri (eg the query part).
*
* @param uri the uri
* @return the parameters, or an empty map if no parameters (eg never null)
* @throws URISyntaxException is thrown if uri has invalid syntax.
*/
|
Parses the query parameters of the uri (eg the query part)
|
parseParameters
|
{
"repo_name": "oscerd/camel",
"path": "platforms/catalog/src/main/java/org/apache/camel/catalog/URISupport.java",
"license": "apache-2.0",
"size": 12688
}
|
[
"java.net.URISyntaxException",
"java.util.LinkedHashMap",
"java.util.Map"
] |
import java.net.URISyntaxException; import java.util.LinkedHashMap; import java.util.Map;
|
import java.net.*; import java.util.*;
|
[
"java.net",
"java.util"
] |
java.net; java.util;
| 607,515
|
@Deprecated
public static void handleDeprecationIfEventReport( final ObjectBundleParams bundleParams )
{
final Map<Class<? extends IdentifiableObject>, List<IdentifiableObject>> objects = bundleParams
.getObjects();
for ( final Map.Entry<Class<? extends IdentifiableObject>, List<IdentifiableObject>> entry : objects
.entrySet() )
{
handleDeprecationIfEventReport( entry.getKey(), entry.getValue() );
}
}
|
static void function( final ObjectBundleParams bundleParams ) { final Map<Class<? extends IdentifiableObject>, List<IdentifiableObject>> objects = bundleParams .getObjects(); for ( final Map.Entry<Class<? extends IdentifiableObject>, List<IdentifiableObject>> entry : objects .entrySet() ) { handleDeprecationIfEventReport( entry.getKey(), entry.getValue() ); } }
|
/**
* Finds objects of type EventReport and sets the respective mandatory type
* so it can be correctly validated and saved.
*
* @deprecated Needed to keep backward compatibility between the new
* EventVisualization and EventReport entities.
*
* @param bundleParams
*/
|
Finds objects of type EventReport and sets the respective mandatory type so it can be correctly validated and saved
|
handleDeprecationIfEventReport
|
{
"repo_name": "hispindia/dhis2-Core",
"path": "dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/objectbundle/EventReportCompatibilityGuard.java",
"license": "bsd-3-clause",
"size": 4763
}
|
[
"java.util.List",
"java.util.Map",
"org.hisp.dhis.common.IdentifiableObject"
] |
import java.util.List; import java.util.Map; import org.hisp.dhis.common.IdentifiableObject;
|
import java.util.*; import org.hisp.dhis.common.*;
|
[
"java.util",
"org.hisp.dhis"
] |
java.util; org.hisp.dhis;
| 734,928
|
KeyValueStreamListener<K, V> keys(List<K> keys) throws IOException;
|
KeyValueStreamListener<K, V> keys(List<K> keys) throws IOException;
|
/**
* Declare the keys for the values
*
* @param keys the keys
* @return this ValueListener
*/
|
Declare the keys for the values
|
keys
|
{
"repo_name": "songwie/elasticsearch-river-jdbc",
"path": "src/main/java/org/xbib/elasticsearch/plugin/jdbc/keyvalue/KeyValueStreamListener.java",
"license": "apache-2.0",
"size": 1758
}
|
[
"java.io.IOException",
"java.util.List"
] |
import java.io.IOException; import java.util.List;
|
import java.io.*; import java.util.*;
|
[
"java.io",
"java.util"
] |
java.io; java.util;
| 1,342,835
|
private boolean isMergeOngoing(List<ILSMDiskComponent> immutableComponents) {
int size = immutableComponents.size();
for (int i = 0; i < size; i++) {
if (immutableComponents.get(i).getState() == ComponentState.READABLE_MERGING) {
return true;
}
}
return false;
}
|
boolean function(List<ILSMDiskComponent> immutableComponents) { int size = immutableComponents.size(); for (int i = 0; i < size; i++) { if (immutableComponents.get(i).getState() == ComponentState.READABLE_MERGING) { return true; } } return false; }
|
/**
* This method returns whether there is an ongoing merge operation or not by checking
* each component state of given components.
*
* @return true if there is an ongoing merge operation, false otherwise.
*/
|
This method returns whether there is an ongoing merge operation or not by checking each component state of given components
|
isMergeOngoing
|
{
"repo_name": "ty1er/incubator-asterixdb",
"path": "hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/ConstantMergePolicy.java",
"license": "apache-2.0",
"size": 6357
}
|
[
"java.util.List",
"org.apache.hyracks.storage.am.lsm.common.api.ILSMComponent",
"org.apache.hyracks.storage.am.lsm.common.api.ILSMDiskComponent"
] |
import java.util.List; import org.apache.hyracks.storage.am.lsm.common.api.ILSMComponent; import org.apache.hyracks.storage.am.lsm.common.api.ILSMDiskComponent;
|
import java.util.*; import org.apache.hyracks.storage.am.lsm.common.api.*;
|
[
"java.util",
"org.apache.hyracks"
] |
java.util; org.apache.hyracks;
| 1,278,150
|
public boolean rename(TachyonURI path) throws IOException {
return mTachyonFS.rename(mFileId, path);
}
|
boolean function(TachyonURI path) throws IOException { return mTachyonFS.rename(mFileId, path); }
|
/**
* Rename this file
*
* @param path the new name
* @return true if succeed, false otherwise
* @throws IOException
*/
|
Rename this file
|
rename
|
{
"repo_name": "mesosphere/tachyon",
"path": "core/src/main/java/tachyon/client/TachyonFile.java",
"license": "apache-2.0",
"size": 18091
}
|
[
"java.io.IOException"
] |
import java.io.IOException;
|
import java.io.*;
|
[
"java.io"
] |
java.io;
| 2,549,193
|
void getNextMessages(int limitOfMessages, @NonNull GetMessagesCallback callback);
|
void getNextMessages(int limitOfMessages, @NonNull GetMessagesCallback callback);
|
/**
* Requests the messages above in history. Returns not more than 'limitOfMessages' of messaged.
* If an empty list is returned, it indicated the end of the message history.
* Notice that this method can not be called again until the callback for the previous call will
* be invoked.
* @param limitOfMessages will be returned not more than the specified number of messages
* @param callback a callback
* @throws IllegalArgumentException if limit <= 0
* @throws IllegalStateException if the previous request was not completed
* @throws IllegalStateException if the MessageTracker or the WebimSession was destroyed
* @throws RuntimeException if the method was called not from the thread the WebimSession was
* created in
*/
|
Requests the messages above in history. Returns not more than 'limitOfMessages' of messaged. If an empty list is returned, it indicated the end of the message history. Notice that this method can not be called again until the callback for the previous call will be invoked
|
getNextMessages
|
{
"repo_name": "webim/webim-android-sdk-demo",
"path": "sdk/src/main/java/ru/webim/android/sdk/MessageTracker.java",
"license": "mit",
"size": 4978
}
|
[
"androidx.annotation.NonNull"
] |
import androidx.annotation.NonNull;
|
import androidx.annotation.*;
|
[
"androidx.annotation"
] |
androidx.annotation;
| 1,275,362
|
BasicPoolEntry getPoolEntry(
long timeout,
TimeUnit tunit) throws InterruptedException, ConnectionPoolTimeoutException;
|
BasicPoolEntry getPoolEntry( long timeout, TimeUnit tunit) throws InterruptedException, ConnectionPoolTimeoutException;
|
/**
* Obtains a pool entry with a connection within the given timeout.
* If {@link #abortRequest()} is called before this completes
* an {@link InterruptedException} is thrown.
*
* @param timeout the timeout, 0 or negative for no timeout
* @param tunit the unit for the <code>timeout</code>,
* may be <code>null</code> only if there is no timeout
*
* @return pool entry holding a connection for the route
*
* @throws ConnectionPoolTimeoutException
* if the timeout expired
* @throws InterruptedException
* if the calling thread was interrupted or the request was aborted
*/
|
Obtains a pool entry with a connection within the given timeout. If <code>#abortRequest()</code> is called before this completes an <code>InterruptedException</code> is thrown
|
getPoolEntry
|
{
"repo_name": "0x90sled/droidtowers",
"path": "main/source/org/apach3/http/impl/conn/tsccm/PoolEntryRequest.java",
"license": "mit",
"size": 2589
}
|
[
"java.util.concurrent.TimeUnit",
"org.apach3.http.conn.ConnectionPoolTimeoutException"
] |
import java.util.concurrent.TimeUnit; import org.apach3.http.conn.ConnectionPoolTimeoutException;
|
import java.util.concurrent.*; import org.apach3.http.conn.*;
|
[
"java.util",
"org.apach3.http"
] |
java.util; org.apach3.http;
| 709,869
|
public void setColumns(Object... propertyIds) {
Set<?> removePids = new HashSet<Object>(columns.keySet());
removePids.removeAll(Arrays.asList(propertyIds));
for (Object removePid : removePids) {
removeColumn(removePid);
}
Set<?> addPids = new HashSet<Object>(Arrays.asList(propertyIds));
addPids.removeAll(columns.keySet());
for (Object propertyId : addPids) {
addColumn(propertyId);
}
setColumnOrder(propertyIds);
}
|
void function(Object... propertyIds) { Set<?> removePids = new HashSet<Object>(columns.keySet()); removePids.removeAll(Arrays.asList(propertyIds)); for (Object removePid : removePids) { removeColumn(removePid); } Set<?> addPids = new HashSet<Object>(Arrays.asList(propertyIds)); addPids.removeAll(columns.keySet()); for (Object propertyId : addPids) { addColumn(propertyId); } setColumnOrder(propertyIds); }
|
/**
* Sets the columns and their order for the grid. Current columns whose
* property id is not in propertyIds are removed. Similarly, a column is
* added for any property id in propertyIds that has no corresponding column
* in this Grid.
*
* @since 7.5.0
*
* @param propertyIds
* properties in the desired column order
*/
|
Sets the columns and their order for the grid. Current columns whose property id is not in propertyIds are removed. Similarly, a column is added for any property id in propertyIds that has no corresponding column in this Grid
|
setColumns
|
{
"repo_name": "synes/vaadin",
"path": "server/src/com/vaadin/ui/Grid.java",
"license": "apache-2.0",
"size": 239096
}
|
[
"java.util.Arrays",
"java.util.HashSet",
"java.util.Set"
] |
import java.util.Arrays; import java.util.HashSet; import java.util.Set;
|
import java.util.*;
|
[
"java.util"
] |
java.util;
| 1,974,318
|
public static void addMoney(Player player, double n) {
if (!s_isEnabled || s_economy == null) {
return;
}
s_economy.depositPlayer(player.getName(), n);
}
|
static void function(Player player, double n) { if (!s_isEnabled s_economy == null) { return; } s_economy.depositPlayer(player.getName(), n); }
|
/**
* Add money to player
*
* @param player The player
* @param n Ammount of money to add
*/
|
Add money to player
|
addMoney
|
{
"repo_name": "SBPrime/MCPainter",
"path": "MCPainter/src/main/java/org/primesoft/mcpainter/FoundManager.java",
"license": "mit",
"size": 3455
}
|
[
"org.bukkit.entity.Player"
] |
import org.bukkit.entity.Player;
|
import org.bukkit.entity.*;
|
[
"org.bukkit.entity"
] |
org.bukkit.entity;
| 914,813
|
public void map(MessageBytes host, MessageBytes uri, String version,
MappingData mappingData)
throws Exception {
if (host.isNull()) {
host.getCharChunk().append(defaultHostName);
}
host.toChars();
uri.toChars();
internalMap(host.getCharChunk(), uri.getCharChunk(), version,
mappingData);
}
|
void function(MessageBytes host, MessageBytes uri, String version, MappingData mappingData) throws Exception { if (host.isNull()) { host.getCharChunk().append(defaultHostName); } host.toChars(); uri.toChars(); internalMap(host.getCharChunk(), uri.getCharChunk(), version, mappingData); }
|
/**
* Map the specified host name and URI, mutating the given mapping data.
*
* @param host Virtual host name
* @param uri URI
* @param mappingData This structure will contain the result of the mapping
* operation
*/
|
Map the specified host name and URI, mutating the given mapping data
|
map
|
{
"repo_name": "mayonghui2112/helloWorld",
"path": "sourceCode/apache-tomcat-7.0.82-src/java/org/apache/tomcat/util/http/mapper/Mapper.java",
"license": "apache-2.0",
"size": 61011
}
|
[
"org.apache.tomcat.util.buf.MessageBytes"
] |
import org.apache.tomcat.util.buf.MessageBytes;
|
import org.apache.tomcat.util.buf.*;
|
[
"org.apache.tomcat"
] |
org.apache.tomcat;
| 2,251,057
|
public AssertionClause predicate(Predicate predicate) {
addPredicate(predicate);
return this;
}
|
AssertionClause function(Predicate predicate) { addPredicate(predicate); return this; }
|
/**
* Adds the given predicate to this assertion clause
*/
|
Adds the given predicate to this assertion clause
|
predicate
|
{
"repo_name": "chicagozer/rheosoft",
"path": "camel-core/src/main/java/org/apache/camel/component/mock/AssertionClause.java",
"license": "apache-2.0",
"size": 5318
}
|
[
"org.apache.camel.Predicate"
] |
import org.apache.camel.Predicate;
|
import org.apache.camel.*;
|
[
"org.apache.camel"
] |
org.apache.camel;
| 845,755
|
void setCCPTimer(SystemTimer ccpTimer) {
this.ccpTimer = ccpTimer;
}
static final int PURGE_INTERVAL = 1000;
private int cancelCount = 0;
|
void setCCPTimer(SystemTimer ccpTimer) { this.ccpTimer = ccpTimer; } static final int PURGE_INTERVAL = 1000; private int cancelCount = 0;
|
/**
* For use by unit tests to inject a mocked ccpTimer
*/
|
For use by unit tests to inject a mocked ccpTimer
|
setCCPTimer
|
{
"repo_name": "charliemblack/geode",
"path": "geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java",
"license": "apache-2.0",
"size": 186222
}
|
[
"org.apache.geode.internal.SystemTimer"
] |
import org.apache.geode.internal.SystemTimer;
|
import org.apache.geode.internal.*;
|
[
"org.apache.geode"
] |
org.apache.geode;
| 1,073,280
|
azure
.cdnProfiles()
.manager()
.serviceClient()
.getRules()
.listByRuleSet("RG", "profile1", "ruleSet1", Context.NONE);
}
|
azure .cdnProfiles() .manager() .serviceClient() .getRules() .listByRuleSet("RG", STR, STR, Context.NONE); }
|
/**
* Sample code: Rules_ListByRuleSet.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
|
Sample code: Rules_ListByRuleSet
|
rulesListByRuleSet
|
{
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/cdn/generated/RulesListByRuleSetSamples.java",
"license": "mit",
"size": 918
}
|
[
"com.azure.core.util.Context"
] |
import com.azure.core.util.Context;
|
import com.azure.core.util.*;
|
[
"com.azure.core"
] |
com.azure.core;
| 2,909,460
|
public EntityKey getEntityKey();
|
EntityKey function();
|
/**
* Obtain the registered EntityKey for this EntityReference for the row currently being processed.
*
* @return The registered EntityKey for this EntityReference
*/
|
Obtain the registered EntityKey for this EntityReference for the row currently being processed
|
getEntityKey
|
{
"repo_name": "1fechner/FeatureExtractor",
"path": "sources/FeatureExtractor/lib/hibernate-release-5.1.0.Final/project/hibernate-core/src/main/java/org/hibernate/loader/plan/exec/process/spi/ResultSetProcessingContext.java",
"license": "lgpl-2.1",
"size": 4613
}
|
[
"org.hibernate.engine.spi.EntityKey"
] |
import org.hibernate.engine.spi.EntityKey;
|
import org.hibernate.engine.spi.*;
|
[
"org.hibernate.engine"
] |
org.hibernate.engine;
| 2,285,108
|
List<T> getTransactionsPerSku(String mPathTransactions, String mSku);
|
List<T> getTransactionsPerSku(String mPathTransactions, String mSku);
|
/**
* to get Transactions per product's SKU
**/
|
to get Transactions per product's SKU
|
getTransactionsPerSku
|
{
"repo_name": "raulh82vlc/Transactions-Viewer",
"path": "domain/src/main/java/com/raulh82vlc/TransactionsViewer/domain/repository/DataRepository.java",
"license": "apache-2.0",
"size": 1400
}
|
[
"java.util.List"
] |
import java.util.List;
|
import java.util.*;
|
[
"java.util"
] |
java.util;
| 1,367,994
|
@Override
protected final void renderGame(@Nonnull final GameContainer container, @Nonnull final Graphics g) {
g.clear();
}
|
final void function(@Nonnull final GameContainer container, @Nonnull final Graphics g) { g.clear(); }
|
/**
* Rendering the GUI only requires that the display is cleared before rendering the screen.
*/
|
Rendering the GUI only requires that the display is cleared before rendering the screen
|
renderGame
|
{
"repo_name": "mkaring/nifty-gui",
"path": "nifty-renderer-slick/src/main/java/de/lessvoid/nifty/slick2d/NiftyGame.java",
"license": "bsd-2-clause",
"size": 2564
}
|
[
"javax.annotation.Nonnull",
"org.newdawn.slick.GameContainer",
"org.newdawn.slick.Graphics"
] |
import javax.annotation.Nonnull; import org.newdawn.slick.GameContainer; import org.newdawn.slick.Graphics;
|
import javax.annotation.*; import org.newdawn.slick.*;
|
[
"javax.annotation",
"org.newdawn.slick"
] |
javax.annotation; org.newdawn.slick;
| 2,691,408
|
@Override
public int updateUsedAxis(UsedAxis usedAxis, String treeId) throws PdcException {
try (Connection con = DBUtil.openConnection()) {
// test si la valeur de base a été modifiée
int newBaseValue = usedAxis.getBaseValue();
int oldBaseValue = (getUsedAxis(usedAxis.getPK().getId())).getBaseValue();
// si elle a été modifiée alors on reporte la modification.
if (newBaseValue != oldBaseValue &&
utilizationDAO.isAlreadyAdded(con, usedAxis.getInstanceId(),
Integer.parseInt(usedAxis.getPK().getId()), usedAxis.getAxisId(),
usedAxis.getBaseValue(), treeId)) {
return 1;
}
dao.update(usedAxis);
// une fois cette axe modifié, il faut tenir compte de la propagation des
// choix aux niveaux obligatoire/facultatif et variant/invariante
utilizationDAO.updateAllUsedAxis(con, usedAxis);
return 0;
} catch (Exception e) {
throw new PdcException(e);
}
}
|
int function(UsedAxis usedAxis, String treeId) throws PdcException { try (Connection con = DBUtil.openConnection()) { int newBaseValue = usedAxis.getBaseValue(); int oldBaseValue = (getUsedAxis(usedAxis.getPK().getId())).getBaseValue(); if (newBaseValue != oldBaseValue && utilizationDAO.isAlreadyAdded(con, usedAxis.getInstanceId(), Integer.parseInt(usedAxis.getPK().getId()), usedAxis.getAxisId(), usedAxis.getBaseValue(), treeId)) { return 1; } dao.update(usedAxis); utilizationDAO.updateAllUsedAxis(con, usedAxis); return 0; } catch (Exception e) { throw new PdcException(e); } }
|
/**
* Update an used axis into the data base.
* @param usedAxis - the object which contains all data about utilization of the axis
*/
|
Update an used axis into the data base
|
updateUsedAxis
|
{
"repo_name": "SilverDav/Silverpeas-Core",
"path": "core-services/pdc/src/main/java/org/silverpeas/core/pdc/pdc/service/DefaultPdcUtilizationService.java",
"license": "agpl-3.0",
"size": 12092
}
|
[
"java.sql.Connection",
"org.silverpeas.core.pdc.pdc.model.PdcException",
"org.silverpeas.core.pdc.pdc.model.UsedAxis",
"org.silverpeas.core.persistence.jdbc.DBUtil"
] |
import java.sql.Connection; import org.silverpeas.core.pdc.pdc.model.PdcException; import org.silverpeas.core.pdc.pdc.model.UsedAxis; import org.silverpeas.core.persistence.jdbc.DBUtil;
|
import java.sql.*; import org.silverpeas.core.pdc.pdc.model.*; import org.silverpeas.core.persistence.jdbc.*;
|
[
"java.sql",
"org.silverpeas.core"
] |
java.sql; org.silverpeas.core;
| 2,640,716
|
public Set<OdinClient> getLvapsLocal() {
return clientList;
}
|
Set<OdinClient> function() { return clientList; }
|
/**
* Return a list of LVAPs that the master knows this agent is hosting.
* Between the time an agent has crashed and the master detecting the crash,
* this can return stale values.
*
* @return a list of OdinClient entities on the agent
*/
|
Return a list of LVAPs that the master knows this agent is hosting. Between the time an agent has crashed and the master detecting the crash, this can return stale values
|
getLvapsLocal
|
{
"repo_name": "schuza/odin-master",
"path": "src/main/java/net/floodlightcontroller/odin/master/OdinAgent.java",
"license": "apache-2.0",
"size": 11359
}
|
[
"java.util.Set"
] |
import java.util.Set;
|
import java.util.*;
|
[
"java.util"
] |
java.util;
| 2,066,727
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.