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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
public static void writeBoolean(JsonWriter writer, String jsonProperty, Boolean blValue, boolean writeEmpty) throws IOException, JsonException {
writeBoolean(writer, jsonProperty, blValue, writeEmpty ? JSONEmptyValueStrategy.NULL : JSONEmptyValueStrategy.NOPROPERTY);
}
| static void function(JsonWriter writer, String jsonProperty, Boolean blValue, boolean writeEmpty) throws IOException, JsonException { writeBoolean(writer, jsonProperty, blValue, writeEmpty ? JSONEmptyValueStrategy.NULL : JSONEmptyValueStrategy.NOPROPERTY); } | /**
* Writes a Boolean value for a given property
*
* @param writer
* @param jsonProperty
* @param blValue
* @param writeEmpty
* @throws IOException
* @throws JsonException
*/ | Writes a Boolean value for a given property | writeBoolean | {
"repo_name": "OpenNTF/XPagesToolkit",
"path": "org.openntf.xpt.core/src/org/openntf/xpt/core/utils/JSONSupport.java",
"license": "apache-2.0",
"size": 6895
} | [
"com.ibm.commons.util.io.json.JsonException",
"com.ibm.domino.services.util.JsonWriter",
"java.io.IOException",
"org.openntf.xpt.core.json.JSONEmptyValueStrategy"
] | import com.ibm.commons.util.io.json.JsonException; import com.ibm.domino.services.util.JsonWriter; import java.io.IOException; import org.openntf.xpt.core.json.JSONEmptyValueStrategy; | import com.ibm.commons.util.io.json.*; import com.ibm.domino.services.util.*; import java.io.*; import org.openntf.xpt.core.json.*; | [
"com.ibm.commons",
"com.ibm.domino",
"java.io",
"org.openntf.xpt"
] | com.ibm.commons; com.ibm.domino; java.io; org.openntf.xpt; | 485,516 |
@Override
public Adapter createProductToProductVersionMapEntryAdapter()
{
if (productToProductVersionMapEntryItemProvider == null)
{
productToProductVersionMapEntryItemProvider = new ProductToProductVersionMapEntryItemProvider(this);
}
return productToProductVersionMapEntryItemProvider;
}
protected ProjectToStreamMapEntryItemProvider projectToStreamMapEntryItemProvider; | Adapter function() { if (productToProductVersionMapEntryItemProvider == null) { productToProductVersionMapEntryItemProvider = new ProductToProductVersionMapEntryItemProvider(this); } return productToProductVersionMapEntryItemProvider; } protected ProjectToStreamMapEntryItemProvider projectToStreamMapEntryItemProvider; | /**
* This creates an adapter for a {@link java.util.Map.Entry}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This creates an adapter for a <code>java.util.Map.Entry</code>. | createProductToProductVersionMapEntryAdapter | {
"repo_name": "peterkir/org.eclipse.oomph",
"path": "plugins/org.eclipse.oomph.setup.edit/src/org/eclipse/oomph/setup/provider/SetupItemProviderAdapterFactory.java",
"license": "epl-1.0",
"size": 39182
} | [
"org.eclipse.emf.common.notify.Adapter"
] | import org.eclipse.emf.common.notify.Adapter; | import org.eclipse.emf.common.notify.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 266,075 |
private void createResource() {
String resourceUri = "/a/light"; // URI of the resource
String resourceTypeName = "core.light"; // resource type name.
String resourceInterface = OcPlatform.DEFAULT_INTERFACE; // resource interface.
try {
// This will internally create and register the resource.
mResourceHandle = OcPlatform.registerResource(
resourceUri,
resourceTypeName,
resourceInterface,
null, //Use default entity handler
EnumSet.of(ResourceProperty.DISCOVERABLE));
} catch (OcException e) {
msg("Resource creation was unsuccessful.");
Log.e(TAG, e.toString());
}
} | void function() { String resourceUri = STR; String resourceTypeName = STR; String resourceInterface = OcPlatform.DEFAULT_INTERFACE; try { mResourceHandle = OcPlatform.registerResource( resourceUri, resourceTypeName, resourceInterface, null, EnumSet.of(ResourceProperty.DISCOVERABLE)); } catch (OcException e) { msg(STR); Log.e(TAG, e.toString()); } } | /**
* This function internally calls registerResource API.
*/ | This function internally calls registerResource API | createResource | {
"repo_name": "kadasaikumar/iotivity-1.2.1",
"path": "android/examples/presenceserver/src/main/java/org/iotivity/base/examples/PresenceServer.java",
"license": "gpl-3.0",
"size": 7867
} | [
"android.util.Log",
"java.util.EnumSet",
"org.iotivity.base.OcException",
"org.iotivity.base.OcPlatform",
"org.iotivity.base.ResourceProperty"
] | import android.util.Log; import java.util.EnumSet; import org.iotivity.base.OcException; import org.iotivity.base.OcPlatform; import org.iotivity.base.ResourceProperty; | import android.util.*; import java.util.*; import org.iotivity.base.*; | [
"android.util",
"java.util",
"org.iotivity.base"
] | android.util; java.util; org.iotivity.base; | 565,075 |
EList<EntryRelationship> getEntryRelationships();
| EList<EntryRelationship> getEntryRelationships(); | /**
* Returns the value of the '<em><b>Entry Relationship</b></em>' containment reference list.
* The list contents are of type {@link org.openhealthtools.mdht.uml.cda.EntryRelationship}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Entry Relationship</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>Entry Relationship</em>' containment reference list.
* @see org.openhealthtools.mdht.uml.cda.CDAPackage#getObservation_EntryRelationship()
* @model containment="true" ordered="false"
* extendedMetaData="namespace='##targetNamespace'"
* @generated
*/ | Returns the value of the 'Entry Relationship' containment reference list. The list contents are of type <code>org.openhealthtools.mdht.uml.cda.EntryRelationship</code>. If the meaning of the 'Entry Relationship' containment reference list isn't clear, there really should be more of a description here... | getEntryRelationships | {
"repo_name": "drbgfc/mdht",
"path": "cda/plugins/org.openhealthtools.mdht.uml.cda/src/org/openhealthtools/mdht/uml/cda/Observation.java",
"license": "epl-1.0",
"size": 34888
} | [
"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; | 1,241,766 |
private void initiateLevelPicker() {
npTrainerLevel = (NumberPicker) findViewById(R.id.trainerLevel);
npTrainerLevel.setMaxValue(40);
npTrainerLevel.setMinValue(1);
npTrainerLevel.setWrapSelectorWheel(false);
npTrainerLevel.setValue(trainerLevel);
npTrainerLevel.setOnScrollListener(npTrainerLevelPickerListenerInstance);
npTrainerLevel.setOnValueChangedListener(npTrainerLevelPickerListenerInstance);
} | void function() { npTrainerLevel = (NumberPicker) findViewById(R.id.trainerLevel); npTrainerLevel.setMaxValue(40); npTrainerLevel.setMinValue(1); npTrainerLevel.setWrapSelectorWheel(false); npTrainerLevel.setValue(trainerLevel); npTrainerLevel.setOnScrollListener(npTrainerLevelPickerListenerInstance); npTrainerLevel.setOnValueChangedListener(npTrainerLevelPickerListenerInstance); } | /**
* Initiates the scrollable level picker.
*/ | Initiates the scrollable level picker | initiateLevelPicker | {
"repo_name": "rhari991/GoIV",
"path": "app/src/main/java/com/kamron/pogoiv/MainActivity.java",
"license": "gpl-3.0",
"size": 23617
} | [
"android.widget.NumberPicker"
] | import android.widget.NumberPicker; | import android.widget.*; | [
"android.widget"
] | android.widget; | 1,195,780 |
@Test
@Feature({"NFCTest"})
public void testResumeSuspend() {
TestNfcImpl nfc = new TestNfcImpl(mContext, mDelegate);
// No activity / client or active pending operations
nfc.suspendNfcOperations();
nfc.resumeNfcOperations();
mDelegate.invokeCallback();
nfc.setClient(mNfcClient);
Watch_Response mockCallback = mock(Watch_Response.class);
nfc.watch(mNextWatchId, mockCallback);
nfc.suspendNfcOperations();
verify(mNfcAdapter, times(1)).disableReaderMode(mActivity);
nfc.resumeNfcOperations();
// 1. Enable after watch is called, 2. after resumeNfcOperations is called.
verify(mNfcAdapter, times(2))
.enableReaderMode(any(Activity.class), any(ReaderCallback.class), anyInt(),
(Bundle) isNull());
nfc.processPendingOperationsForTesting(mNfcTagHandler);
// Check that watch request was completed successfully.
verify(mockCallback).call(mErrorCaptor.capture());
assertNull(mErrorCaptor.getValue());
// Check that client was notified and watch with correct id was triggered.
verify(mNfcClient, times(1))
.onWatch(mOnWatchCallbackCaptor.capture(), nullable(String.class),
any(NdefMessage.class));
assertEquals(mNextWatchId, mOnWatchCallbackCaptor.getValue()[0]);
} | @Feature({STR}) void function() { TestNfcImpl nfc = new TestNfcImpl(mContext, mDelegate); nfc.suspendNfcOperations(); nfc.resumeNfcOperations(); mDelegate.invokeCallback(); nfc.setClient(mNfcClient); Watch_Response mockCallback = mock(Watch_Response.class); nfc.watch(mNextWatchId, mockCallback); nfc.suspendNfcOperations(); verify(mNfcAdapter, times(1)).disableReaderMode(mActivity); nfc.resumeNfcOperations(); verify(mNfcAdapter, times(2)) .enableReaderMode(any(Activity.class), any(ReaderCallback.class), anyInt(), (Bundle) isNull()); nfc.processPendingOperationsForTesting(mNfcTagHandler); verify(mockCallback).call(mErrorCaptor.capture()); assertNull(mErrorCaptor.getValue()); verify(mNfcClient, times(1)) .onWatch(mOnWatchCallbackCaptor.capture(), nullable(String.class), any(NdefMessage.class)); assertEquals(mNextWatchId, mOnWatchCallbackCaptor.getValue()[0]); } | /**
* Test that Nfc.suspendNfcOperations() and Nfc.resumeNfcOperations() work correctly.
*/ | Test that Nfc.suspendNfcOperations() and Nfc.resumeNfcOperations() work correctly | testResumeSuspend | {
"repo_name": "scheib/chromium",
"path": "services/device/nfc/android/junit/src/org/chromium/device/nfc/NFCTest.java",
"license": "bsd-3-clause",
"size": 85355
} | [
"android.app.Activity",
"android.nfc.NfcAdapter",
"android.os.Bundle",
"org.chromium.base.test.util.Feature",
"org.chromium.device.mojom.NdefMessage",
"org.junit.Assert",
"org.mockito.ArgumentMatchers",
"org.mockito.Mockito"
] | import android.app.Activity; import android.nfc.NfcAdapter; import android.os.Bundle; import org.chromium.base.test.util.Feature; import org.chromium.device.mojom.NdefMessage; import org.junit.Assert; import org.mockito.ArgumentMatchers; import org.mockito.Mockito; | import android.app.*; import android.nfc.*; import android.os.*; import org.chromium.base.test.util.*; import org.chromium.device.mojom.*; import org.junit.*; import org.mockito.*; | [
"android.app",
"android.nfc",
"android.os",
"org.chromium.base",
"org.chromium.device",
"org.junit",
"org.mockito"
] | android.app; android.nfc; android.os; org.chromium.base; org.chromium.device; org.junit; org.mockito; | 2,293,265 |
protected List<EObject> trimSelection (List<EObject> aList) {
//
ArrayList<EObject> trimmedList = new ArrayList<EObject>( aList.size() );
for(EObject next : aList) {
boolean skipNext = false;
for(EObject parent : aList) {
if (next != parent && ModelHelper.isChildContainedBy(parent, next)) {
skipNext = true;
break;
}
}
if (skipNext) {
continue;
}
trimmedList.add(next);
}
return trimmedList;
}
| List<EObject> function (List<EObject> aList) { ArrayList<EObject> trimmedList = new ArrayList<EObject>( aList.size() ); for(EObject next : aList) { boolean skipNext = false; for(EObject parent : aList) { if (next != parent && ModelHelper.isChildContainedBy(parent, next)) { skipNext = true; break; } } if (skipNext) { continue; } trimmedList.add(next); } return trimmedList; } | /**
* Trims the selection to the list of "parent" objects. So if you select a sequence and an
* activity within it, the result is the sequence element.
*
* @param aList a list of currently selected objects.
*
* @return the trimmed list.
*/ | Trims the selection to the list of "parent" objects. So if you select a sequence and an activity within it, the result is the sequence element | trimSelection | {
"repo_name": "Drifftr/devstudio-tooling-bps",
"path": "plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/actions/EditAction.java",
"license": "apache-2.0",
"size": 2763
} | [
"java.util.ArrayList",
"java.util.List",
"org.eclipse.bpel.ui.util.ModelHelper",
"org.eclipse.emf.ecore.EObject"
] | import java.util.ArrayList; import java.util.List; import org.eclipse.bpel.ui.util.ModelHelper; import org.eclipse.emf.ecore.EObject; | import java.util.*; import org.eclipse.bpel.ui.util.*; import org.eclipse.emf.ecore.*; | [
"java.util",
"org.eclipse.bpel",
"org.eclipse.emf"
] | java.util; org.eclipse.bpel; org.eclipse.emf; | 2,107,522 |
@Test
public void testWeightedGraph() throws Exception {
// A small graph
String[] graph =
new String[] { "12 34:0.1 56:0.9", "34 78:0.9 56:0.1",
"56 12:0.1 34:0.8 78:0.1", "78 34:1.0" };
GiraphConfiguration conf = new GiraphConfiguration();
conf.setInt(RandomWalkWithRestartVertex.SOURCE_VERTEX, 12);
conf.setInt(RandomWalkWithRestartVertex.MAX_SUPERSTEPS, 30);
conf.setFloat(RandomWalkWithRestartVertex.TELEPORTATION_PROBABILITY, 0.15f);
conf.setVertexClass(RandomWalkWithRestartVertex.class);
conf.setVertexEdgesClass(ByteArrayEdges.class);
conf.setVertexInputFormatClass(
NormalizingLongDoubleDoubleTextInputFormat.class);
conf.setVertexOutputFormatClass(
VertexWithDoubleValueDoubleEdgeTextOutputFormat.class);
conf.setWorkerContextClass(RandomWalkWorkerContext.class);
conf.setMasterComputeClass(RandomWalkVertexMasterCompute.class);
// Run internally
Iterable<String> results = InternalVertexRunner.run(conf, graph);
Map<Long, Double> steadyStateProbabilities =
RandomWalkTestUtils.parseSteadyStateProbabilities(results);
// values computed with external software
// 0.163365, 0.378932, 0.156886, 0.300816
assertEquals(0.163365, steadyStateProbabilities.get(12L),
RandomWalkTestUtils.EPSILON);
assertEquals(0.378932, steadyStateProbabilities.get(34L),
RandomWalkTestUtils.EPSILON);
assertEquals(0.156886, steadyStateProbabilities.get(56L),
RandomWalkTestUtils.EPSILON);
assertEquals(0.300816, steadyStateProbabilities.get(78L),
RandomWalkTestUtils.EPSILON);
} | void function() throws Exception { String[] graph = new String[] { STR, STR, STR, STR }; GiraphConfiguration conf = new GiraphConfiguration(); conf.setInt(RandomWalkWithRestartVertex.SOURCE_VERTEX, 12); conf.setInt(RandomWalkWithRestartVertex.MAX_SUPERSTEPS, 30); conf.setFloat(RandomWalkWithRestartVertex.TELEPORTATION_PROBABILITY, 0.15f); conf.setVertexClass(RandomWalkWithRestartVertex.class); conf.setVertexEdgesClass(ByteArrayEdges.class); conf.setVertexInputFormatClass( NormalizingLongDoubleDoubleTextInputFormat.class); conf.setVertexOutputFormatClass( VertexWithDoubleValueDoubleEdgeTextOutputFormat.class); conf.setWorkerContextClass(RandomWalkWorkerContext.class); conf.setMasterComputeClass(RandomWalkVertexMasterCompute.class); Iterable<String> results = InternalVertexRunner.run(conf, graph); Map<Long, Double> steadyStateProbabilities = RandomWalkTestUtils.parseSteadyStateProbabilities(results); assertEquals(0.163365, steadyStateProbabilities.get(12L), RandomWalkTestUtils.EPSILON); assertEquals(0.378932, steadyStateProbabilities.get(34L), RandomWalkTestUtils.EPSILON); assertEquals(0.156886, steadyStateProbabilities.get(56L), RandomWalkTestUtils.EPSILON); assertEquals(0.300816, steadyStateProbabilities.get(78L), RandomWalkTestUtils.EPSILON); } | /**
* A local integration test on toy data
*/ | A local integration test on toy data | testWeightedGraph | {
"repo_name": "pmPartch/giraph",
"path": "giraph-examples/src/test/java/org/apache/giraph/examples/RandomWalkWithRestartVertexTest.java",
"license": "apache-2.0",
"size": 4545
} | [
"java.util.Map",
"org.apache.giraph.conf.GiraphConfiguration",
"org.apache.giraph.edge.ByteArrayEdges",
"org.apache.giraph.examples.RandomWalkVertex",
"org.apache.giraph.utils.InternalVertexRunner",
"org.junit.Assert"
] | import java.util.Map; import org.apache.giraph.conf.GiraphConfiguration; import org.apache.giraph.edge.ByteArrayEdges; import org.apache.giraph.examples.RandomWalkVertex; import org.apache.giraph.utils.InternalVertexRunner; import org.junit.Assert; | import java.util.*; import org.apache.giraph.conf.*; import org.apache.giraph.edge.*; import org.apache.giraph.examples.*; import org.apache.giraph.utils.*; import org.junit.*; | [
"java.util",
"org.apache.giraph",
"org.junit"
] | java.util; org.apache.giraph; org.junit; | 2,377,563 |
Observable<ServiceResponse<Void>> putDateValidWithServiceResponseAsync(Map<String, LocalDate> arrayBody); | Observable<ServiceResponse<Void>> putDateValidWithServiceResponseAsync(Map<String, LocalDate> arrayBody); | /**
* Set dictionary value {"0": "2000-12-01", "1": "1980-01-02", "2": "1492-10-12"}.
*
* @param arrayBody the Map<String, LocalDate> value
* @return the {@link ServiceResponse} object if successful.
*/ | Set dictionary value {"0": "2000-12-01", "1": "1980-01-02", "2": "1492-10-12"} | putDateValidWithServiceResponseAsync | {
"repo_name": "anudeepsharma/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodydictionary/Dictionarys.java",
"license": "mit",
"size": 79030
} | [
"com.microsoft.rest.ServiceResponse",
"java.util.Map",
"org.joda.time.LocalDate"
] | import com.microsoft.rest.ServiceResponse; import java.util.Map; import org.joda.time.LocalDate; | import com.microsoft.rest.*; import java.util.*; import org.joda.time.*; | [
"com.microsoft.rest",
"java.util",
"org.joda.time"
] | com.microsoft.rest; java.util; org.joda.time; | 788,802 |
protected void setEndpoints(final String...endpoints) {
this.endpoints = Endpoint.fromStrings(endpoints);
if(this.endpoints.length==0) System.err.println("[JMXMPSpec] WARNING: No endpoints defined");
}
/**
* {@inheritDoc} | void function(final String...endpoints) { this.endpoints = Endpoint.fromStrings(endpoints); if(this.endpoints.length==0) System.err.println(STR); } /** * {@inheritDoc} | /**
* Sets the endpoints
* @param endpoints the endpoints to set
*/ | Sets the endpoints | setEndpoints | {
"repo_name": "nickman/JMXMPAgent",
"path": "agent-publisher/src/main/java/com/heliosapm/endpoint/publisher/cl/JMXMPSpec.java",
"license": "apache-2.0",
"size": 6596
} | [
"com.heliosapm.endpoint.publisher.endpoint.Endpoint"
] | import com.heliosapm.endpoint.publisher.endpoint.Endpoint; | import com.heliosapm.endpoint.publisher.endpoint.*; | [
"com.heliosapm.endpoint"
] | com.heliosapm.endpoint; | 678,575 |
public void createMainThread(Meta meta) {
StaticObject systemThreadGroup = meta.java_lang_ThreadGroup.allocateInstance();
meta.java_lang_ThreadGroup.lookupDeclaredMethod(Symbol.Name._init_, Symbol.Signature._void) // private
// ThreadGroup()
.invokeDirect(systemThreadGroup);
Thread hostThread = Thread.currentThread();
StaticObject mainThread = meta.java_lang_Thread.allocateInstance();
// Allow guest Thread.currentThread() to work.
meta.java_lang_Thread_priority.setInt(mainThread, Thread.NORM_PRIORITY);
meta.HIDDEN_HOST_THREAD.setHiddenObject(mainThread, hostThread);
mainThreadGroup = meta.java_lang_ThreadGroup.allocateInstance();
registerMainThread(hostThread, mainThread);
// Guest Thread.currentThread() must work as this point.
meta.java_lang_ThreadGroup // public ThreadGroup(ThreadGroup parent, String name)
.lookupDeclaredMethod(Symbol.Name._init_, Symbol.Signature._void_ThreadGroup_String) //
.invokeDirect(mainThreadGroup,
systemThreadGroup,
meta.toGuestString("main"));
meta.java_lang_Thread // public Thread(ThreadGroup group, String name)
.lookupDeclaredMethod(Symbol.Name._init_, Symbol.Signature._void_ThreadGroup_String) //
.invokeDirect(mainThread,
mainThreadGroup,
meta.toGuestString("main"));
meta.java_lang_Thread_threadStatus.setInt(mainThread, State.RUNNABLE.value);
// Notify native backend about main thread.
getNativeAccess().prepareThread();
mainThreadCreated = true;
logger.fine(() -> {
String guestName = getThreadAccess().getThreadName(mainThread);
long guestId = getThreadAccess().getThreadId(mainThread);
return String.format("createMainThread: [HOST:%s, %d], [GUEST:%s, %d]", hostThread.getName(), hostThread.getId(), guestName, guestId);
});
} | void function(Meta meta) { StaticObject systemThreadGroup = meta.java_lang_ThreadGroup.allocateInstance(); meta.java_lang_ThreadGroup.lookupDeclaredMethod(Symbol.Name._init_, Symbol.Signature._void) .invokeDirect(systemThreadGroup); Thread hostThread = Thread.currentThread(); StaticObject mainThread = meta.java_lang_Thread.allocateInstance(); meta.java_lang_Thread_priority.setInt(mainThread, Thread.NORM_PRIORITY); meta.HIDDEN_HOST_THREAD.setHiddenObject(mainThread, hostThread); mainThreadGroup = meta.java_lang_ThreadGroup.allocateInstance(); registerMainThread(hostThread, mainThread); meta.java_lang_ThreadGroup .lookupDeclaredMethod(Symbol.Name._init_, Symbol.Signature._void_ThreadGroup_String) systemThreadGroup, meta.toGuestString("main")); meta.java_lang_Thread .lookupDeclaredMethod(Symbol.Name._init_, Symbol.Signature._void_ThreadGroup_String) mainThreadGroup, meta.toGuestString("main")); meta.java_lang_Thread_threadStatus.setInt(mainThread, State.RUNNABLE.value); getNativeAccess().prepareThread(); mainThreadCreated = true; logger.fine(() -> { String guestName = getThreadAccess().getThreadName(mainThread); long guestId = getThreadAccess().getThreadId(mainThread); return String.format(STR, hostThread.getName(), hostThread.getId(), guestName, guestId); }); } | /**
* The order in which methods are called and fields are set here is important, it mimics
* HotSpot's implementation.
*/ | The order in which methods are called and fields are set here is important, it mimics HotSpot's implementation | createMainThread | {
"repo_name": "smarr/Truffle",
"path": "espresso/src/com.oracle.truffle.espresso/src/com/oracle/truffle/espresso/threads/EspressoThreadRegistry.java",
"license": "gpl-2.0",
"size": 17827
} | [
"com.oracle.truffle.espresso.descriptors.Symbol",
"com.oracle.truffle.espresso.meta.Meta",
"com.oracle.truffle.espresso.runtime.StaticObject"
] | import com.oracle.truffle.espresso.descriptors.Symbol; import com.oracle.truffle.espresso.meta.Meta; import com.oracle.truffle.espresso.runtime.StaticObject; | import com.oracle.truffle.espresso.descriptors.*; import com.oracle.truffle.espresso.meta.*; import com.oracle.truffle.espresso.runtime.*; | [
"com.oracle.truffle"
] | com.oracle.truffle; | 626,120 |
protected Collection<String> getInitialObjectNames() {
if (initialObjectNames == null) {
initialObjectNames = new ArrayList<String>();
for (EClassifier eClassifier : wtSpec4MPackage.getEClassifiers()) {
if (eClassifier instanceof EClass) {
EClass eClass = (EClass)eClassifier;
if (!eClass.isAbstract()) {
initialObjectNames.add(eClass.getName());
}
}
}
Collections.sort(initialObjectNames, java.text.Collator.getInstance());
}
return initialObjectNames;
} | Collection<String> function() { if (initialObjectNames == null) { initialObjectNames = new ArrayList<String>(); for (EClassifier eClassifier : wtSpec4MPackage.getEClassifiers()) { if (eClassifier instanceof EClass) { EClass eClass = (EClass)eClassifier; if (!eClass.isAbstract()) { initialObjectNames.add(eClass.getName()); } } } Collections.sort(initialObjectNames, java.text.Collator.getInstance()); } return initialObjectNames; } | /**
* Returns the names of the types that can be created as the root object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | Returns the names of the types that can be created as the root object. | getInitialObjectNames | {
"repo_name": "mondo-project/mondo-demo-wt",
"path": "MONDO-Collab/org.mondo.wt.cstudy.metamodel.online.editor/src/WTSpec4M/presentation/WTSpec4MModelWizard.java",
"license": "epl-1.0",
"size": 14812
} | [
"java.util.ArrayList",
"java.util.Collection",
"java.util.Collections",
"org.eclipse.emf.ecore.EClass",
"org.eclipse.emf.ecore.EClassifier"
] | import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EClassifier; | import java.util.*; import org.eclipse.emf.ecore.*; | [
"java.util",
"org.eclipse.emf"
] | java.util; org.eclipse.emf; | 1,898,765 |
List<EngineProcess> listGameWeekly(final int gameId, final int scenarioID); | List<EngineProcess> listGameWeekly(final int gameId, final int scenarioID); | /**
* Listing all the processes for a particular Game from the database that are ready to be processed
* within the ongoing week.
*
* @param gameId the game ID to look up.
* @param scenarioID the scenario ID to look up.
* @return a list of processes related to the particular game.
*/ | Listing all the processes for a particular Game from the database that are ready to be processed within the ongoing week | listGameWeekly | {
"repo_name": "EaW1805/data",
"path": "src/main/java/com/eaw1805/data/managers/beans/EngineProcessManagerBean.java",
"license": "mit",
"size": 3067
} | [
"com.eaw1805.data.model.EngineProcess",
"java.util.List"
] | import com.eaw1805.data.model.EngineProcess; import java.util.List; | import com.eaw1805.data.model.*; import java.util.*; | [
"com.eaw1805.data",
"java.util"
] | com.eaw1805.data; java.util; | 1,807,857 |
private Object getOrSaveImage(Map<String, Object> params) throws Exception {
byte[] bytes = null;
String errMsg = null;
String type = ((String) params.get("type")).toUpperCase();
String fileName = (String) params.get("fileName");
String[] scripts = (String[]) params.get("scripts");
Object objImage = params.get("image");
int[] rgbbuf = (int[]) params.get("rgbbuf"); // only from OBJ exporter creating PNG output
OC out = (OC) params.get("outputChannel");
boolean asBytes = (out == null && fileName == null);
boolean closeChannel = (out == null && fileName != null);
boolean releaseImage = (objImage == null);
Object image = (type.equals("BINARY") || type.equals("ZIPDATA") ? ""
: rgbbuf != null ? rgbbuf : objImage != null ? objImage : vwr
.getScreenImageBuffer(null, true));
boolean isOK = false;
try {
if (image == null)
return errMsg = vwr.getErrorMessage();
if (fileName != null && fileName.startsWith("\1")) {
isOK = true;
Map<String, Object> info = new Hashtable<String, Object>();
info.put("_IMAGE_", image);
vwr.fm.loadImage(info, fileName, false);
return errMsg = "OK - viewing " + fileName.substring(1);
}
if (out == null && (out = openOutputChannel(privateKey, fileName, false, false)) == null)
return errMsg = "ERROR: canceled";
fileName = out.getFileName();
String comment = null;
Object stateData = null;
params.put("date", vwr.apiPlatform.getDateFormat("8601"));
if (type.startsWith("JP")) {
type = PT.rep(type, "E", "");
if (type.equals("JPG64")) {
params.put("outputChannelTemp", getOutputChannel(null, null));
comment = "";
} else {
comment = (!asBytes ? (String) getWrappedState(null, null, image,
null) : "");
}
params.put("jpgAppTag", FileManager.JPEG_CONTINUE_STRING);
} else if (type.equals("PDF")) {
comment = "";
} else if (type.startsWith("PNG")) {
comment = "";
boolean isPngj = type.equals("PNGJ");
if (isPngj) {// get zip file data
OC outTemp = getOutputChannel(null, null);
getWrappedState(fileName, scripts, image, outTemp);
stateData = outTemp.toByteArray();
} else if (rgbbuf == null && !asBytes
&& !params.containsKey("captureMode")) {
stateData = ((String) getWrappedState(null, scripts, image, null))
.getBytes();
}
if (stateData != null) {
params.put("pngAppData", stateData);
params.put("pngAppPrefix", "Jmol Type");
}
}
if (type.equals("PNGT") || type.equals("GIFT"))
params
.put("transparentColor", Integer.valueOf(vwr.getBackgroundArgb()));
if (type.length() == 4) // PNGT PNGJ GIFT
type = type.substring(0, 3);
if (comment != null)
params.put("comment", comment.length() == 0 ? Viewer.getJmolVersion()
: comment);
String[] errRet = new String[1];
isOK = createTheImage(image, type, out, params, errRet);
if (closeChannel)
out.closeChannel();
if (isOK) {
if (params.containsKey("captureMsg")
&& !params.containsKey("captureSilent"))
vwr.prompt((String) params.get("captureMsg"), "OK", null, true);
if (asBytes)
bytes = out.toByteArray();
else if (params.containsKey("captureByteCount"))
errMsg = "OK: " + params.get("captureByteCount").toString()
+ " bytes";
} else {
errMsg = errRet[0];
}
} finally {
if (releaseImage)
vwr.releaseScreenImage();
if (bytes != null || out != null)
params.put("byteCount", Integer.valueOf(bytes != null ? bytes.length
: isOK ? out.getByteCount() : -1));
if (objImage != null) {
// _ObjExport is saving the texture file -- just return file name, regardless of whether there is an error
return fileName;
}
}
return (errMsg == null ? bytes : errMsg);
} | Object function(Map<String, Object> params) throws Exception { byte[] bytes = null; String errMsg = null; String type = ((String) params.get("type")).toUpperCase(); String fileName = (String) params.get(STR); String[] scripts = (String[]) params.get(STR); Object objImage = params.get("image"); int[] rgbbuf = (int[]) params.get(STR); OC out = (OC) params.get(STR); boolean asBytes = (out == null && fileName == null); boolean closeChannel = (out == null && fileName != null); boolean releaseImage = (objImage == null); Object image = (type.equals(STR) type.equals(STR) ? STR\1STR_IMAGE_STROK - viewing STRERROR: canceledSTRdateSTR8601STRJPSTRESTRSTRJPG64STRoutputChannelTempSTRSTRSTRjpgAppTagSTRPDFSTRSTRPNGSTRSTRPNGJSTRcaptureModeSTRpngAppDataSTRpngAppPrefixSTRJmol TypeSTRPNGTSTRGIFTSTRtransparentColorSTRcommentSTRcaptureMsgSTRcaptureSilentSTRcaptureMsgSTROKSTRcaptureByteCountSTROK: STRcaptureByteCountSTR bytesSTRbyteCount", Integer.valueOf(bytes != null ? bytes.length : isOK ? out.getByteCount() : -1)); if (objImage != null) { return fileName; } } return (errMsg == null ? bytes : errMsg); } | /**
*
* Creates an image of params.type form -- PNG, PNGJ, PNGT, JPG, JPG64, PDF,
* PPM, GIF, GIFT.
*
* From createImage and getImageAsBytes
*
* @param params
* include fileName, type, text, bytes, image, scripts, appendix,
* quality, outputStream, and type-specific parameters. If
* params.outputChannel != null, then we are passing back the data, and
* the channel will not be closed.
*
* @return bytes[] if params.fileName==null and params.outputChannel==null
* otherwise, return a message string or null
* @throws Exception
*
*/ | Creates an image of params.type form -- PNG, PNGJ, PNGT, JPG, JPG64, PDF, PPM, GIF, GIFT. From createImage and getImageAsBytes | getOrSaveImage | {
"repo_name": "drdrsh/JmolOVR",
"path": "src/org/jmol/viewer/OutputManager.java",
"license": "lgpl-2.1",
"size": 41702
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 796,130 |
public IStatus validateSpaceSelection(CloudSpace selectedCloudSpace) {
return validateSpaceSelection(null, selectedCloudSpace);
} | IStatus function(CloudSpace selectedCloudSpace) { return validateSpaceSelection(null, selectedCloudSpace); } | /**
* Given space selection, determine if it is valid. For example, a user
* wishes to create a server instance to the selected cloudSpace, if the
* cloud space is valid, return
* {@link org.eclipse.core.runtime.Status#OK_STATUS}.
* @param selectionObj a potential space selection.
* @return if valid, return
* {@link org.eclipse.core.runtime.Status#OK_STATUS}. Otherwise return
* appropriate error status. Must not be null.
*/ | Given space selection, determine if it is valid. For example, a user wishes to create a server instance to the selected cloudSpace, if the cloud space is valid, return <code>org.eclipse.core.runtime.Status#OK_STATUS</code> | validateSpaceSelection | {
"repo_name": "jgwest/cft",
"path": "org.eclipse.cft.server.ui/src/org/eclipse/cft/server/ui/internal/CloudSpacesDelegate.java",
"license": "apache-2.0",
"size": 13949
} | [
"org.cloudfoundry.client.lib.domain.CloudSpace",
"org.eclipse.core.runtime.IStatus"
] | import org.cloudfoundry.client.lib.domain.CloudSpace; import org.eclipse.core.runtime.IStatus; | import org.cloudfoundry.client.lib.domain.*; import org.eclipse.core.runtime.*; | [
"org.cloudfoundry.client",
"org.eclipse.core"
] | org.cloudfoundry.client; org.eclipse.core; | 1,083,381 |
public GridFailoverManager failover(); | GridFailoverManager function(); | /**
* Gets failover manager.
*
* @return Failover manager.
*/ | Gets failover manager | failover | {
"repo_name": "leveyj/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/GridKernalContext.java",
"license": "apache-2.0",
"size": 16870
} | [
"org.apache.ignite.internal.managers.failover.GridFailoverManager"
] | import org.apache.ignite.internal.managers.failover.GridFailoverManager; | import org.apache.ignite.internal.managers.failover.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 2,669,491 |
@SuppressWarnings("unchecked")
private <T extends Comparable> boolean compare(final T l, final T r, final StellarParser.ComparisonOpContext op) {
int compareTo = l.compareTo(r);
if (op.LT() != null) {
return compareTo < 0;
} else if (op.LTE() != null) {
return compareTo <= 0;
} else if (op.GT() != null) {
return compareTo > 0;
} else if (op.GTE() != null) {
return compareTo >= 0;
}
throw new ParseException("Unsupported operator: " + op);
} | @SuppressWarnings(STR) <T extends Comparable> boolean function(final T l, final T r, final StellarParser.ComparisonOpContext op) { int compareTo = l.compareTo(r); if (op.LT() != null) { return compareTo < 0; } else if (op.LTE() != null) { return compareTo <= 0; } else if (op.GT() != null) { return compareTo > 0; } else if (op.GTE() != null) { return compareTo >= 0; } throw new ParseException(STR + op); } | /**
* This method uses the inputs' ability to compare with one another's values by using the {@code compareTo} method. It will use this and
* the operator to evaluate the output.
*
* @param l The value of the left side of the expression.
* @param r The value of the right side of the expression.
* @param op The operator to use when comparing.
* @param <T> The type of values being compared.
* @return A boolean value representing the comparison of the two values with the given operator. For example, {@code 1 <= 1} would be true.
*/ | This method uses the inputs' ability to compare with one another's values by using the compareTo method. It will use this and the operator to evaluate the output | compare | {
"repo_name": "mmiklavc/metron",
"path": "metron-stellar/stellar-common/src/main/java/org/apache/metron/stellar/common/evaluators/ComparisonOperatorsEvaluator.java",
"license": "apache-2.0",
"size": 8502
} | [
"org.apache.metron.stellar.common.generated.StellarParser",
"org.apache.metron.stellar.dsl.ParseException"
] | import org.apache.metron.stellar.common.generated.StellarParser; import org.apache.metron.stellar.dsl.ParseException; | import org.apache.metron.stellar.common.generated.*; import org.apache.metron.stellar.dsl.*; | [
"org.apache.metron"
] | org.apache.metron; | 1,573,347 |
String relativeToAbsolutePath(String baseDir, String path) {
File pathFile = new File(path);
if (pathFile.isAbsolute()) {
return path;
}
return new File(baseDir, path).toString();
} | String relativeToAbsolutePath(String baseDir, String path) { File pathFile = new File(path); if (pathFile.isAbsolute()) { return path; } return new File(baseDir, path).toString(); } | /**
* Convert the given <code>path</code> to an absolute path resolved
* relative to the given <code>baseDir</code> if the path is not
* already absolute.
*
* @param path the path to convert to an absolute path
* @param baseDir the base directory if <code>path</code> is relative
* @return an absolute value for <code>path</code>
*/ | Convert the given <code>path</code> to an absolute path resolved relative to the given <code>baseDir</code> if the path is not already absolute | relativeToAbsolutePath | {
"repo_name": "pfirmstone/river-internet",
"path": "qa/src/org/apache/river/qa/harness/QAConfig.java",
"license": "apache-2.0",
"size": 110034
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,650,262 |
NotificationsFragment fragment = new NotificationsFragment();
Bundle args = new Bundle();
args.putString(ARG_PARAM1, param1);
args.putString(ARG_PARAM2, param2);
fragment.setArguments(args);
return fragment;
} | NotificationsFragment fragment = new NotificationsFragment(); Bundle args = new Bundle(); args.putString(ARG_PARAM1, param1); args.putString(ARG_PARAM2, param2); fragment.setArguments(args); return fragment; } | /**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
*
* @param param1 Parameter 1.
* @param param2 Parameter 2.
* @return A new instance of fragment NotificationsFragment.
*/ | Use this factory method to create a new instance of this fragment using the provided parameters | newInstance | {
"repo_name": "vidhyadhari1989/Learnopedia-C2C",
"path": "app/src/main/java/com/c2c/learnopedia/fragment/NotificationsFragment.java",
"license": "apache-2.0",
"size": 3757
} | [
"android.os.Bundle"
] | import android.os.Bundle; | import android.os.*; | [
"android.os"
] | android.os; | 92,938 |
@Test
public void testGetConnectionString() throws Exception {
String value = Settings.getConnectionString(Settings.KEYS.DB_CONNECTION_STRING, Settings.KEYS.DB_FILE_NAME);
Assert.assertNotNull(value);
String msg = null;
try {
value = Settings.getConnectionString("invalidKey", null);
} catch (InvalidSettingException e) {
msg = e.getMessage();
}
Assert.assertNotNull(msg);
} | void function() throws Exception { String value = Settings.getConnectionString(Settings.KEYS.DB_CONNECTION_STRING, Settings.KEYS.DB_FILE_NAME); Assert.assertNotNull(value); String msg = null; try { value = Settings.getConnectionString(STR, null); } catch (InvalidSettingException e) { msg = e.getMessage(); } Assert.assertNotNull(msg); } | /**
* Test of getConnectionString.
*/ | Test of getConnectionString | testGetConnectionString | {
"repo_name": "colezlaw/DependencyCheck",
"path": "dependency-check-utils/src/test/java/org/owasp/dependencycheck/utils/SettingsTest.java",
"license": "apache-2.0",
"size": 10737
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,627,895 |
@Test
public void givenParkinglotCellInfoEntityMapsToParkinglotCellInfo() {
// Arrange
ParkinglotCellInfoEntity parkinglotCellInfoEntity = new ParkinglotCellInfoEntityDataBuilder().withPlate(PLATE)
.withVehicleType(VEHICLE_TYPE).build();
// Act
ParkinglotCellInfo parkinglotCellInfo = parkinglotCellInfoMapper
.parkinglotCellInfoEntityToParkinglotCellInfo(parkinglotCellInfoEntity);
// Assert
assertThat(parkinglotCellInfo.getPlate()).isEqualTo(PLATE);
assertThat(parkinglotCellInfo.getVehicleType()).isEqualTo(VEHICLE_TYPE);
}
| void function() { ParkinglotCellInfoEntity parkinglotCellInfoEntity = new ParkinglotCellInfoEntityDataBuilder().withPlate(PLATE) .withVehicleType(VEHICLE_TYPE).build(); ParkinglotCellInfo parkinglotCellInfo = parkinglotCellInfoMapper .parkinglotCellInfoEntityToParkinglotCellInfo(parkinglotCellInfoEntity); assertThat(parkinglotCellInfo.getPlate()).isEqualTo(PLATE); assertThat(parkinglotCellInfo.getVehicleType()).isEqualTo(VEHICLE_TYPE); } | /**
* Validates that the mapper from ParkinglotCellInfoEntity to ParkinglotCellInfo
* works.
*/ | Validates that the mapper from ParkinglotCellInfoEntity to ParkinglotCellInfo works | givenParkinglotCellInfoEntityMapsToParkinglotCellInfo | {
"repo_name": "cortizqgithub/csoftz-ceiba-java-learning",
"path": "app-code/server/parking-service/src/test/java/com/csoftz/ceiba/java/learn/parking/service/test/mapper/ParkinglotCellInfoMapperTests.java",
"license": "apache-2.0",
"size": 9394
} | [
"com.csoftz.ceiba.java.learn.parking.domain.ParkinglotCellInfo",
"com.csoftz.ceiba.java.learn.parking.service.entities.ParkinglotCellInfoEntity",
"com.csoftz.ceiba.java.learn.parking.service.test.entities.data.builder.ParkinglotCellInfoEntityDataBuilder",
"org.assertj.core.api.Assertions"
] | import com.csoftz.ceiba.java.learn.parking.domain.ParkinglotCellInfo; import com.csoftz.ceiba.java.learn.parking.service.entities.ParkinglotCellInfoEntity; import com.csoftz.ceiba.java.learn.parking.service.test.entities.data.builder.ParkinglotCellInfoEntityDataBuilder; import org.assertj.core.api.Assertions; | import com.csoftz.ceiba.java.learn.parking.domain.*; import com.csoftz.ceiba.java.learn.parking.service.entities.*; import com.csoftz.ceiba.java.learn.parking.service.test.entities.data.builder.*; import org.assertj.core.api.*; | [
"com.csoftz.ceiba",
"org.assertj.core"
] | com.csoftz.ceiba; org.assertj.core; | 1,042,592 |
public void knnMatch(Mat queryImage, MatOfKeyPoint queryKeypoints, Mat trainImage, MatOfKeyPoint trainKeypoints, List<MatOfDMatch> matches, int k)
{
Mat queryKeypoints_mat = queryKeypoints;
Mat trainKeypoints_mat = trainKeypoints;
Mat matches_mat = new Mat();
knnMatch_1(nativeObj, queryImage.nativeObj, queryKeypoints_mat.nativeObj, trainImage.nativeObj, trainKeypoints_mat.nativeObj, matches_mat.nativeObj, k);
Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
matches_mat.release();
return;
}
//
// C++: void javaGenericDescriptorMatcher::knnMatch(Mat queryImage, vector_KeyPoint queryKeypoints, vector_vector_DMatch& matches, int k, vector_Mat masks = vector<Mat>(), bool compactResult = false)
// | void function(Mat queryImage, MatOfKeyPoint queryKeypoints, Mat trainImage, MatOfKeyPoint trainKeypoints, List<MatOfDMatch> matches, int k) { Mat queryKeypoints_mat = queryKeypoints; Mat trainKeypoints_mat = trainKeypoints; Mat matches_mat = new Mat(); knnMatch_1(nativeObj, queryImage.nativeObj, queryKeypoints_mat.nativeObj, trainImage.nativeObj, trainKeypoints_mat.nativeObj, matches_mat.nativeObj, k); Converters.Mat_to_vector_vector_DMatch(matches_mat, matches); matches_mat.release(); return; } // | /**
* <p>Finds the <code>k</code> best matches for each query keypoint.</p>
*
* <p>The methods are extended variants of <code>GenericDescriptorMatch.match</code>.
* The parameters are similar, and the semantics is similar to <code>DescriptorMatcher.knnMatch</code>.
* But this class does not require explicitly computed keypoint descriptors.</p>
*
* @param queryImage a queryImage
* @param queryKeypoints a queryKeypoints
* @param trainImage a trainImage
* @param trainKeypoints a trainKeypoints
* @param matches a matches
* @param k a k
*
* @see <a href="http://docs.opencv.org/modules/features2d/doc/common_interfaces_of_generic_descriptor_matchers.html#genericdescriptormatcher-knnmatch">org.opencv.features2d.GenericDescriptorMatcher.knnMatch</a>
*/ | Finds the <code>k</code> best matches for each query keypoint. The methods are extended variants of <code>GenericDescriptorMatch.match</code>. The parameters are similar, and the semantics is similar to <code>DescriptorMatcher.knnMatch</code>. But this class does not require explicitly computed keypoint descriptors | knnMatch | {
"repo_name": "nloewen/ORB_SLAM2_Android",
"path": "openCVLibrary24132/src/main/java/org/opencv/features2d/GenericDescriptorMatcher.java",
"license": "gpl-3.0",
"size": 38416
} | [
"java.util.List",
"org.opencv.core.Mat",
"org.opencv.core.MatOfDMatch",
"org.opencv.core.MatOfKeyPoint",
"org.opencv.utils.Converters"
] | import java.util.List; import org.opencv.core.Mat; import org.opencv.core.MatOfDMatch; import org.opencv.core.MatOfKeyPoint; import org.opencv.utils.Converters; | import java.util.*; import org.opencv.core.*; import org.opencv.utils.*; | [
"java.util",
"org.opencv.core",
"org.opencv.utils"
] | java.util; org.opencv.core; org.opencv.utils; | 837,584 |
public AfterWatermarkEarlyAndLate withEarlyFirings(OnceTrigger earlyFirings) {
checkNotNull(earlyFirings, "Must specify the trigger to use for early firings");
return new AfterWatermarkEarlyAndLate(earlyFirings, null);
} | AfterWatermarkEarlyAndLate function(OnceTrigger earlyFirings) { checkNotNull(earlyFirings, STR); return new AfterWatermarkEarlyAndLate(earlyFirings, null); } | /**
* Creates a new {@code Trigger} like the this, except that it fires repeatedly whenever
* the given {@code Trigger} fires before the watermark has passed the end of the window.
*/ | Creates a new Trigger like the this, except that it fires repeatedly whenever the given Trigger fires before the watermark has passed the end of the window | withEarlyFirings | {
"repo_name": "tgroh/incubator-beam",
"path": "sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/windowing/AfterWatermark.java",
"license": "apache-2.0",
"size": 7382
} | [
"com.google.common.base.Preconditions",
"org.apache.beam.sdk.transforms.windowing.Trigger"
] | import com.google.common.base.Preconditions; import org.apache.beam.sdk.transforms.windowing.Trigger; | import com.google.common.base.*; import org.apache.beam.sdk.transforms.windowing.*; | [
"com.google.common",
"org.apache.beam"
] | com.google.common; org.apache.beam; | 519,357 |
@Generated
@Selector("layerWithReflectionPadding:")
public static native MLCPaddingLayer layerWithReflectionPadding(NSArray<? extends NSNumber> padding); | @Selector(STR) static native MLCPaddingLayer function(NSArray<? extends NSNumber> padding); | /**
* Create a padding layer with reflection padding
*
* @param padding The padding sizes.
* @return A new padding layer
*/ | Create a padding layer with reflection padding | layerWithReflectionPadding | {
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/mlcompute/MLCPaddingLayer.java",
"license": "apache-2.0",
"size": 7261
} | [
"org.moe.natj.objc.ann.Selector"
] | import org.moe.natj.objc.ann.Selector; | import org.moe.natj.objc.ann.*; | [
"org.moe.natj"
] | org.moe.natj; | 133,725 |
@Nonnull
public Relation post(@Nonnull final Relation newRelation) throws ClientException {
final String requestUrl = getBaseRequest().getRequestUrl().toString();
return new RelationRequestBuilder(requestUrl, getBaseRequest().getClient(), null)
.buildRequest(getBaseRequest().getHeaders())
.post(newRelation);
} | Relation function(@Nonnull final Relation newRelation) throws ClientException { final String requestUrl = getBaseRequest().getRequestUrl().toString(); return new RelationRequestBuilder(requestUrl, getBaseRequest().getClient(), null) .buildRequest(getBaseRequest().getHeaders()) .post(newRelation); } | /**
* Creates a new Relation
* @param newRelation the Relation to create
* @return the newly created object
*/ | Creates a new Relation | post | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/termstore/requests/RelationCollectionRequest.java",
"license": "mit",
"size": 5650
} | [
"com.microsoft.graph.core.ClientException",
"com.microsoft.graph.termstore.models.Relation",
"javax.annotation.Nonnull"
] | import com.microsoft.graph.core.ClientException; import com.microsoft.graph.termstore.models.Relation; import javax.annotation.Nonnull; | import com.microsoft.graph.core.*; import com.microsoft.graph.termstore.models.*; import javax.annotation.*; | [
"com.microsoft.graph",
"javax.annotation"
] | com.microsoft.graph; javax.annotation; | 1,440,221 |
@Test
public void testPredicateGet() {
final Date date1 = new Date(1464475553640L);
final LocalDateTime localDateTime1 = DateUtils.getLocalDateTime(date1);
assertFalse(Assertor.<ChronoLocalDateTime<?>> ofTemporal().hasHashCode(0).that(localDateTime1).isOK());
assertTrue(
Assertor.<ChronoLocalDateTime<?>> ofTemporal().hasHashCode(Objects.hashCode(localDateTime1)).that(localDateTime1).isOK());
assertFalse(Assertor.<ChronoLocalDateTime<?>> ofTemporal().hasHashCode(0)
.and(Assertor.<ChronoLocalDateTime<?>> ofTemporal().hasHashCode(0)).that(localDateTime1).isOK());
}
| void function() { final Date date1 = new Date(1464475553640L); final LocalDateTime localDateTime1 = DateUtils.getLocalDateTime(date1); assertFalse(Assertor.<ChronoLocalDateTime<?>> ofTemporal().hasHashCode(0).that(localDateTime1).isOK()); assertTrue( Assertor.<ChronoLocalDateTime<?>> ofTemporal().hasHashCode(Objects.hashCode(localDateTime1)).that(localDateTime1).isOK()); assertFalse(Assertor.<ChronoLocalDateTime<?>> ofTemporal().hasHashCode(0) .and(Assertor.<ChronoLocalDateTime<?>> ofTemporal().hasHashCode(0)).that(localDateTime1).isOK()); } | /**
* Test method for {@link AssertorTemporal} .
*/ | Test method for <code>AssertorTemporal</code> | testPredicateGet | {
"repo_name": "Gilandel/utils-assertor",
"path": "src/test/java/fr/landel/utils/assertor/predicate/PredicateAssertorTemporalTest.java",
"license": "apache-2.0",
"size": 31319
} | [
"fr.landel.utils.assertor.Assertor",
"fr.landel.utils.commons.DateUtils",
"java.time.LocalDateTime",
"java.time.chrono.ChronoLocalDateTime",
"java.util.Date",
"java.util.Objects",
"org.junit.Assert"
] | import fr.landel.utils.assertor.Assertor; import fr.landel.utils.commons.DateUtils; import java.time.LocalDateTime; import java.time.chrono.ChronoLocalDateTime; import java.util.Date; import java.util.Objects; import org.junit.Assert; | import fr.landel.utils.assertor.*; import fr.landel.utils.commons.*; import java.time.*; import java.time.chrono.*; import java.util.*; import org.junit.*; | [
"fr.landel.utils",
"java.time",
"java.util",
"org.junit"
] | fr.landel.utils; java.time; java.util; org.junit; | 2,832,219 |
private void persist(Object entity, KieRuntimeEvent event) {
EntityManager em = getEntityManager(event);
Object tx = joinTransaction(em);
em.persist(entity);
leaveTransaction(em, tx);
} | void function(Object entity, KieRuntimeEvent event) { EntityManager em = getEntityManager(event); Object tx = joinTransaction(em); em.persist(entity); leaveTransaction(em, tx); } | /**
* This method persists the entity given to it.
* </p>
* This method also makes sure that the entity manager used for persisting the entity, joins the existing JTA transaction.
* @param entity An entity to be persisted.
*/ | This method persists the entity given to it. This method also makes sure that the entity manager used for persisting the entity, joins the existing JTA transaction | persist | {
"repo_name": "pleacu/jbpm",
"path": "jbpm-audit/src/main/java/org/jbpm/process/audit/JPAWorkingMemoryDbLogger.java",
"license": "apache-2.0",
"size": 12979
} | [
"javax.persistence.EntityManager",
"org.kie.api.event.KieRuntimeEvent"
] | import javax.persistence.EntityManager; import org.kie.api.event.KieRuntimeEvent; | import javax.persistence.*; import org.kie.api.event.*; | [
"javax.persistence",
"org.kie.api"
] | javax.persistence; org.kie.api; | 1,791,291 |
public Image getIconImage() {
return iconImage_;
} | Image function() { return iconImage_; } | /**
* Get icon image
*
* @return icon image
*/ | Get icon image | getIconImage | {
"repo_name": "luttero/Maud",
"path": "src/gov/noaa/pmel/sgt/swing/JGraphicLayout.java",
"license": "bsd-3-clause",
"size": 32791
} | [
"java.awt.Image"
] | import java.awt.Image; | import java.awt.*; | [
"java.awt"
] | java.awt; | 873,103 |
private void scanGroups(MetaData onTmp, MetaData onDisk) {
final GroupTreeNode groupsTmp = onTmp.getGroups();
final GroupTreeNode groupsDisk = onDisk.getGroups();
if ((groupsTmp == null) && (groupsDisk == null)) {
return;
}
if (((groupsTmp != null) && (groupsDisk == null)) || (groupsTmp == null)) {
changes.add(new GroupChange(groupsDisk, groupsTmp));
return;
}
if (!groupsTmp.equals(groupsDisk)) {
changes.add(new GroupChange(groupsDisk, groupsTmp));
}
} | void function(MetaData onTmp, MetaData onDisk) { final GroupTreeNode groupsTmp = onTmp.getGroups(); final GroupTreeNode groupsDisk = onDisk.getGroups(); if ((groupsTmp == null) && (groupsDisk == null)) { return; } if (((groupsTmp != null) && (groupsDisk == null)) (groupsTmp == null)) { changes.add(new GroupChange(groupsDisk, groupsTmp)); return; } if (!groupsTmp.equals(groupsDisk)) { changes.add(new GroupChange(groupsDisk, groupsTmp)); } } | /**
* This method only detects whether a change took place or not. It does not determine the type of change. This would
* be possible, but difficult to do properly, so I rather only report the change.
*/ | This method only detects whether a change took place or not. It does not determine the type of change. This would be possible, but difficult to do properly, so I rather only report the change | scanGroups | {
"repo_name": "ambro2/jabref",
"path": "src/main/java/net/sf/jabref/collab/ChangeScanner.java",
"license": "gpl-2.0",
"size": 20731
} | [
"net.sf.jabref.MetaData",
"net.sf.jabref.logic.groups.GroupTreeNode"
] | import net.sf.jabref.MetaData; import net.sf.jabref.logic.groups.GroupTreeNode; | import net.sf.jabref.*; import net.sf.jabref.logic.groups.*; | [
"net.sf.jabref"
] | net.sf.jabref; | 1,492,615 |
@SuppressWarnings("UnnecessaryBoxing")
public static Short getShortValue(ResultSet resultSet, int columnIndex) throws SQLException {
short value = resultSet.getShort(columnIndex);
if (resultSet.wasNull()) {
return null;
}
return Short.valueOf(value);
} | @SuppressWarnings(STR) static Short function(ResultSet resultSet, int columnIndex) throws SQLException { short value = resultSet.getShort(columnIndex); if (resultSet.wasNull()) { return null; } return Short.valueOf(value); } | /**
* Return any short value.
*/ | Return any short value | getShortValue | {
"repo_name": "ewbankkit/java-util",
"path": "src/main/java/com/github/ewbankkit/SqlUtils.java",
"license": "apache-2.0",
"size": 6074
} | [
"java.sql.ResultSet",
"java.sql.SQLException"
] | import java.sql.ResultSet; import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,725,084 |
public void setClassNamePersistence(
ClassNamePersistence classNamePersistence) {
this.classNamePersistence = classNamePersistence;
} | void function( ClassNamePersistence classNamePersistence) { this.classNamePersistence = classNamePersistence; } | /**
* Sets the class name persistence.
*
* @param classNamePersistence the class name persistence
*/ | Sets the class name persistence | setClassNamePersistence | {
"repo_name": "VietOpenCPS/opencps-v2",
"path": "modules/backend-cache-builder/backend-cache-builder-service/src/main/java/org/opencps/cache/service/base/CacheLocalServiceBaseImpl.java",
"license": "agpl-3.0",
"size": 7249
} | [
"com.liferay.portal.kernel.service.persistence.ClassNamePersistence"
] | import com.liferay.portal.kernel.service.persistence.ClassNamePersistence; | import com.liferay.portal.kernel.service.persistence.*; | [
"com.liferay.portal"
] | com.liferay.portal; | 421,422 |
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
sourceOfFractionsOptions_buttonGroup = new javax.swing.ButtonGroup();
destinationOfFractionsOptions_buttonGroup = new javax.swing.ButtonGroup();
updateMode_buttonGroup = new javax.swing.ButtonGroup();
modeChooser_buttonGroup = new javax.swing.ButtonGroup();
TWsource = new javax.swing.ButtonGroup();
jPanel1 = new javax.swing.JPanel();
sampleName_label = new javax.swing.JLabel();
sampleName_text = new javax.swing.JTextField();
sampleIGSN_label = new javax.swing.JLabel();
sampleIGSN_text = new javax.swing.JTextField();
sampleReduxFile_label = new javax.swing.JLabel();
sampleReduxFileName_label = new javax.swing.JLabel();
sampleNotes_label = new javax.swing.JLabel();
sampleNotes_scrollPane = new javax.swing.JScrollPane();
sampleNotes_textArea = new javax.swing.JTextArea();
physicalConstantsModelChooser = new javax.swing.JComboBox<String>();
defaultHeader_label = new javax.swing.JLabel();
standardMineralNameChooser = new javax.swing.JComboBox<String>();
chooseStandardMineral_label = new javax.swing.JLabel();
chooseAnalysisPurpose_label = new javax.swing.JLabel();
analysisPurposeChooser = new javax.swing.JComboBox<String>();
chooseTWrho_label = new javax.swing.JLabel();
TWZeroRho_radioBut = new javax.swing.JRadioButton();
TWCalculateRho_radioBut = new javax.swing.JRadioButton();
sampleIGSN_label1 = new javax.swing.JLabel();
sampleRegistryChooser = new javax.swing.JComboBox<SampleRegistries>();
validSampleID_label = new javax.swing.JLabel();
validateIGSN = new javax.swing.JButton();
jPanel2 = new javax.swing.JPanel();
close = new javax.swing.JButton();
saveAndClose = new javax.swing.JButton();
sampleType_panel = new javax.swing.JPanel();
sampleType_label = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
setResizable(false);
jPanel1.setBackground(new java.awt.Color(245, 236, 206));
jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED));
jPanel1.setMaximumSize(new java.awt.Dimension(480, 620));
jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
sampleName_label.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
sampleName_label.setText("Lab's Local Sample Name:");
jPanel1.add(sampleName_label, new org.netbeans.lib.awtextra.AbsoluteConstraints(109, 9, -1, -1));
sampleName_text.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
sampleName_text.setHorizontalAlignment(javax.swing.JTextField.CENTER);
sampleName_text.setText("Sample Name");
jPanel1.add(sampleName_text, new org.netbeans.lib.awtextra.AbsoluteConstraints(259, 2, 199, -1));
sampleIGSN_label.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
sampleIGSN_label.setText("Sample ID:");
jPanel1.add(sampleIGSN_label, new org.netbeans.lib.awtextra.AbsoluteConstraints(233, 42, -1, -1)); | void function() { sourceOfFractionsOptions_buttonGroup = new javax.swing.ButtonGroup(); destinationOfFractionsOptions_buttonGroup = new javax.swing.ButtonGroup(); updateMode_buttonGroup = new javax.swing.ButtonGroup(); modeChooser_buttonGroup = new javax.swing.ButtonGroup(); TWsource = new javax.swing.ButtonGroup(); jPanel1 = new javax.swing.JPanel(); sampleName_label = new javax.swing.JLabel(); sampleName_text = new javax.swing.JTextField(); sampleIGSN_label = new javax.swing.JLabel(); sampleIGSN_text = new javax.swing.JTextField(); sampleReduxFile_label = new javax.swing.JLabel(); sampleReduxFileName_label = new javax.swing.JLabel(); sampleNotes_label = new javax.swing.JLabel(); sampleNotes_scrollPane = new javax.swing.JScrollPane(); sampleNotes_textArea = new javax.swing.JTextArea(); physicalConstantsModelChooser = new javax.swing.JComboBox<String>(); defaultHeader_label = new javax.swing.JLabel(); standardMineralNameChooser = new javax.swing.JComboBox<String>(); chooseStandardMineral_label = new javax.swing.JLabel(); chooseAnalysisPurpose_label = new javax.swing.JLabel(); analysisPurposeChooser = new javax.swing.JComboBox<String>(); chooseTWrho_label = new javax.swing.JLabel(); TWZeroRho_radioBut = new javax.swing.JRadioButton(); TWCalculateRho_radioBut = new javax.swing.JRadioButton(); sampleIGSN_label1 = new javax.swing.JLabel(); sampleRegistryChooser = new javax.swing.JComboBox<SampleRegistries>(); validSampleID_label = new javax.swing.JLabel(); validateIGSN = new javax.swing.JButton(); jPanel2 = new javax.swing.JPanel(); close = new javax.swing.JButton(); saveAndClose = new javax.swing.JButton(); sampleType_panel = new javax.swing.JPanel(); sampleType_label = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setResizable(false); jPanel1.setBackground(new java.awt.Color(245, 236, 206)); jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED)); jPanel1.setMaximumSize(new java.awt.Dimension(480, 620)); jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); sampleName_label.setFont(new java.awt.Font(STR, 1, 11)); sampleName_label.setText(STR); jPanel1.add(sampleName_label, new org.netbeans.lib.awtextra.AbsoluteConstraints(109, 9, -1, -1)); sampleName_text.setFont(new java.awt.Font(STR, 1, 12)); sampleName_text.setHorizontalAlignment(javax.swing.JTextField.CENTER); sampleName_text.setText(STR); jPanel1.add(sampleName_text, new org.netbeans.lib.awtextra.AbsoluteConstraints(259, 2, 199, -1)); sampleIGSN_label.setFont(new java.awt.Font(STR, 1, 11)); sampleIGSN_label.setText(STR); jPanel1.add(sampleIGSN_label, new org.netbeans.lib.awtextra.AbsoluteConstraints(233, 42, -1, -1)); | /** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/ | This method is called from within the constructor to initialize the form. always regenerated by the Form Editor | initComponents | {
"repo_name": "clementparizot/ET_Redux",
"path": "src/main/java/org/earthtime/UPb_Redux/dialogs/sampleManagers/sampleFromProjectManagers/AbstractSampleFromProjectManagerDialog.java",
"license": "apache-2.0",
"size": 28808
} | [
"org.earthtime.dataDictionaries.SampleRegistries"
] | import org.earthtime.dataDictionaries.SampleRegistries; | import org.earthtime.*; | [
"org.earthtime"
] | org.earthtime; | 2,093,383 |
protected void fill() {
m_list.clear();
List<CmsResourceStatusRelationBean> relationBeans = getRelationBeans();
if (relationBeans.isEmpty()) {
CmsSimpleListItem item = new CmsSimpleListItem();
item.add(new Label(getEmptyMessage()));
m_list.add(item);
} else {
if ((m_mode == Mode.sources) && !m_statusBean.getOtherSiteRelationSources().isEmpty()) {
m_otherSitesList = createList(Messages.get().key(Messages.GUI_RESOURCEINFO_OTHERSITES_LEGEND_0));
for (CmsResourceStatusRelationBean relationBean : m_statusBean.getOtherSiteRelationSources()) {
CmsListItemWidget itemWidget = new CmsListItemWidget(relationBean.getInfoBean());
CmsListItem item = new CmsListItem(itemWidget);
m_otherSitesList.add(item);
}
}
for (CmsResourceStatusRelationBean relationBean : relationBeans) {
CmsListItemWidget itemWidget = new CmsListItemWidget(relationBean.getInfoBean());
CmsListItem item = new CmsListItem(itemWidget);
// itemWidget.setWidth("490px");
CmsContextMenuButton button = new CmsContextMenuButton(
relationBean.getStructureId(),
new CmsResourceInfoView.ContextMenuHandler());
item.getListItemWidget().addButton(button);
final CmsResourceStatusRelationBean currentRelationBean = relationBean;
final boolean isContainerpage = CmsGwtConstants.TYPE_CONTAINERPAGE.equals(
relationBean.getInfoBean().getResourceType());
final boolean isXmlContent = relationBean.isXmlContent();
final boolean isEditable = (isXmlContent || isContainerpage)
&& relationBean.getPermissionInfo().hasWritePermission();
if (isEditable) {
m_editButton = new CmsPushButton();
m_editButton.setImageClass(I_CmsButton.PEN_SMALL);
m_editButton.setButtonStyle(ButtonStyle.FONT_ICON, null);
m_editButton.setTitle(
org.opencms.gwt.client.Messages.get().key(
org.opencms.gwt.client.Messages.GUI_BUTTON_ELEMENT_EDIT_0));
if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(relationBean.getPermissionInfo().getNoEditReason())) {
m_editButton.disable(relationBean.getPermissionInfo().getNoEditReason());
} else {
m_editButton.setEnabled(true);
}
item.getListItemWidget().addButton(m_editButton);
m_editButton.addClickHandler(new ClickHandler() {
| void function() { m_list.clear(); List<CmsResourceStatusRelationBean> relationBeans = getRelationBeans(); if (relationBeans.isEmpty()) { CmsSimpleListItem item = new CmsSimpleListItem(); item.add(new Label(getEmptyMessage())); m_list.add(item); } else { if ((m_mode == Mode.sources) && !m_statusBean.getOtherSiteRelationSources().isEmpty()) { m_otherSitesList = createList(Messages.get().key(Messages.GUI_RESOURCEINFO_OTHERSITES_LEGEND_0)); for (CmsResourceStatusRelationBean relationBean : m_statusBean.getOtherSiteRelationSources()) { CmsListItemWidget itemWidget = new CmsListItemWidget(relationBean.getInfoBean()); CmsListItem item = new CmsListItem(itemWidget); m_otherSitesList.add(item); } } for (CmsResourceStatusRelationBean relationBean : relationBeans) { CmsListItemWidget itemWidget = new CmsListItemWidget(relationBean.getInfoBean()); CmsListItem item = new CmsListItem(itemWidget); CmsContextMenuButton button = new CmsContextMenuButton( relationBean.getStructureId(), new CmsResourceInfoView.ContextMenuHandler()); item.getListItemWidget().addButton(button); final CmsResourceStatusRelationBean currentRelationBean = relationBean; final boolean isContainerpage = CmsGwtConstants.TYPE_CONTAINERPAGE.equals( relationBean.getInfoBean().getResourceType()); final boolean isXmlContent = relationBean.isXmlContent(); final boolean isEditable = (isXmlContent isContainerpage) && relationBean.getPermissionInfo().hasWritePermission(); if (isEditable) { m_editButton = new CmsPushButton(); m_editButton.setImageClass(I_CmsButton.PEN_SMALL); m_editButton.setButtonStyle(ButtonStyle.FONT_ICON, null); m_editButton.setTitle( org.opencms.gwt.client.Messages.get().key( org.opencms.gwt.client.Messages.GUI_BUTTON_ELEMENT_EDIT_0)); if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(relationBean.getPermissionInfo().getNoEditReason())) { m_editButton.disable(relationBean.getPermissionInfo().getNoEditReason()); } else { m_editButton.setEnabled(true); } item.getListItemWidget().addButton(m_editButton); m_editButton.addClickHandler(new ClickHandler() { | /**
* Creates and renders the resource boxes for the related resources.<p>
*/ | Creates and renders the resource boxes for the related resources | fill | {
"repo_name": "gallardo/opencms-core",
"path": "src-gwt/org/opencms/gwt/client/ui/resourceinfo/CmsResourceRelationView.java",
"license": "lgpl-2.1",
"size": 15682
} | [
"com.google.gwt.event.dom.client.ClickHandler",
"com.google.gwt.user.client.ui.Label",
"java.util.List",
"org.opencms.gwt.client.Messages",
"org.opencms.gwt.client.ui.CmsListItem",
"org.opencms.gwt.client.ui.CmsListItemWidget",
"org.opencms.gwt.client.ui.CmsPushButton",
"org.opencms.gwt.client.ui.CmsS... | import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.user.client.ui.Label; import java.util.List; import org.opencms.gwt.client.Messages; import org.opencms.gwt.client.ui.CmsListItem; import org.opencms.gwt.client.ui.CmsListItemWidget; import org.opencms.gwt.client.ui.CmsPushButton; import org.opencms.gwt.client.ui.CmsSimpleListItem; import org.opencms.gwt.client.ui.I_CmsButton; import org.opencms.gwt.client.ui.contextmenu.CmsContextMenuButton; import org.opencms.gwt.client.ui.resourceinfo.CmsResourceInfoView; import org.opencms.gwt.shared.CmsGwtConstants; import org.opencms.gwt.shared.CmsResourceStatusRelationBean; import org.opencms.util.CmsStringUtil; | import com.google.gwt.event.dom.client.*; import com.google.gwt.user.client.ui.*; import java.util.*; import org.opencms.gwt.client.*; import org.opencms.gwt.client.ui.*; import org.opencms.gwt.client.ui.contextmenu.*; import org.opencms.gwt.client.ui.resourceinfo.*; import org.opencms.gwt.shared.*; import org.opencms.util.*; | [
"com.google.gwt",
"java.util",
"org.opencms.gwt",
"org.opencms.util"
] | com.google.gwt; java.util; org.opencms.gwt; org.opencms.util; | 1,997,592 |
Collections.sort(mItemList, new Comparator<Marker>() { | Collections.sort(mItemList, new Comparator<Marker>() { | /**
* Sorts List of Marker by Latitude
*/ | Sorts List of Marker by Latitude | sortListByLatitude | {
"repo_name": "onaio/OpenMapKit",
"path": "MapboxAndroidSDK/src/main/java/com/mapbox/mapboxsdk/overlay/ItemizedIconOverlay.java",
"license": "bsd-3-clause",
"size": 8566
} | [
"java.util.Collections",
"java.util.Comparator"
] | import java.util.Collections; import java.util.Comparator; | import java.util.*; | [
"java.util"
] | java.util; | 1,788,999 |
void update(DbGroup group); | void update(DbGroup group); | /**
* Updates the supplied group.
*
* @param group
* the group
*/ | Updates the supplied group | update | {
"repo_name": "jtux270/translate",
"path": "ovirt/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/DbGroupDAO.java",
"license": "gpl-3.0",
"size": 2029
} | [
"org.ovirt.engine.core.common.businessentities.aaa.DbGroup"
] | import org.ovirt.engine.core.common.businessentities.aaa.DbGroup; | import org.ovirt.engine.core.common.businessentities.aaa.*; | [
"org.ovirt.engine"
] | org.ovirt.engine; | 2,163,779 |
public ServiceFuture<List<VirtualMachineImageResourceInner>> listOffersAsync(String location, String publisherName, final ServiceCallback<List<VirtualMachineImageResourceInner>> serviceCallback) {
return ServiceFuture.fromResponse(listOffersWithServiceResponseAsync(location, publisherName), serviceCallback);
} | ServiceFuture<List<VirtualMachineImageResourceInner>> function(String location, String publisherName, final ServiceCallback<List<VirtualMachineImageResourceInner>> serviceCallback) { return ServiceFuture.fromResponse(listOffersWithServiceResponseAsync(location, publisherName), serviceCallback); } | /**
* Gets a list of virtual machine image offers for the specified location and publisher.
*
* @param location The name of a supported Azure region.
* @param publisherName A valid image publisher.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/ | Gets a list of virtual machine image offers for the specified location and publisher | listOffersAsync | {
"repo_name": "martinsawicki/azure-sdk-for-java",
"path": "azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImagesInner.java",
"license": "mit",
"size": 37600
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture",
"java.util.List"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import java.util.List; | import com.microsoft.rest.*; import java.util.*; | [
"com.microsoft.rest",
"java.util"
] | com.microsoft.rest; java.util; | 1,450,461 |
public static AddonDependencyEntry create(String name, boolean exported, boolean optional)
{
return create(name, new EmptyVersionRange(), exported, optional);
} | static AddonDependencyEntry function(String name, boolean exported, boolean optional) { return create(name, new EmptyVersionRange(), exported, optional); } | /**
* Create a new {@link AddonDependencyEntry} with the given attributes.
*/ | Create a new <code>AddonDependencyEntry</code> with the given attributes | create | {
"repo_name": "gastaldi/furnace",
"path": "container-api/src/main/java/org/jboss/forge/furnace/repositories/AddonDependencyEntry.java",
"license": "epl-1.0",
"size": 4906
} | [
"org.jboss.forge.furnace.versions.EmptyVersionRange"
] | import org.jboss.forge.furnace.versions.EmptyVersionRange; | import org.jboss.forge.furnace.versions.*; | [
"org.jboss.forge"
] | org.jboss.forge; | 2,803,147 |
public boolean status(final String mailboxName, final String[] itemNames) throws IOException
{
if (itemNames == null || itemNames.length < 1) {
throw new IllegalArgumentException("STATUS command requires at least one data item name");
}
final StringBuilder sb = new StringBuilder();
sb.append(quoteMailboxName(mailboxName));
sb.append(" (");
for ( int i = 0; i < itemNames.length; i++ )
{
if (i > 0) {
sb.append(" ");
}
sb.append(itemNames[i]);
}
sb.append(")");
return doCommand (IMAPCommand.STATUS, sb.toString());
} | boolean function(final String mailboxName, final String[] itemNames) throws IOException { if (itemNames == null itemNames.length < 1) { throw new IllegalArgumentException(STR); } final StringBuilder sb = new StringBuilder(); sb.append(quoteMailboxName(mailboxName)); sb.append(STR); for ( int i = 0; i < itemNames.length; i++ ) { if (i > 0) { sb.append(" "); } sb.append(itemNames[i]); } sb.append(")"); return doCommand (IMAPCommand.STATUS, sb.toString()); } | /**
* Send a STATUS command to the server.
* @param mailboxName The reference name.
* @param itemNames The status data item names.
* @return {@code true} if the command was successful,{@code false} if not.
* @throws IOException If a network I/O error occurs.
*/ | Send a STATUS command to the server | status | {
"repo_name": "apache/commons-net",
"path": "src/main/java/org/apache/commons/net/imap/IMAPClient.java",
"license": "apache-2.0",
"size": 22748
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,830,943 |
private Icon parseIconType(IconType iconType) {
List<Icon> icons = Utils.getIcons();
for (Icon icon : icons) {
if (icon.getIconType().equals(iconType)) {
return icon;
}
}
throw new IllegalArgumentException("Correct icon type not specified.");
} | Icon function(IconType iconType) { List<Icon> icons = Utils.getIcons(); for (Icon icon : icons) { if (icon.getIconType().equals(iconType)) { return icon; } } throw new IllegalArgumentException(STR); } | /**
* Parses the specific icon based on it's type.
* These icons are bundled with the library and
* are accessed via objects that contain their
* resource ids and an enum with their name.
* @param iconType
* @return
*/ | Parses the specific icon based on it's type. These icons are bundled with the library and are accessed via objects that contain their resource ids and an enum with their name | parseIconType | {
"repo_name": "cowthan/AyoWeibo",
"path": "sample/src/main/java_opensource/com/ayo/opensource/zlikeview/LikeButton.java",
"license": "apache-2.0",
"size": 15004
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 151,129 |
EAttribute getPassenger_NumberOfWaits(); | EAttribute getPassenger_NumberOfWaits(); | /**
* Returns the meta object for the attribute '{@link com.paxelerate.model.agent.Passenger#getNumberOfWaits <em>Number Of Waits</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Number Of Waits</em>'.
* @see com.paxelerate.model.agent.Passenger#getNumberOfWaits()
* @see #getPassenger()
* @generated
*/ | Returns the meta object for the attribute '<code>com.paxelerate.model.agent.Passenger#getNumberOfWaits Number Of Waits</code>'. | getPassenger_NumberOfWaits | {
"repo_name": "BauhausLuftfahrt/PAXelerate",
"path": "com.paxelerate.model/src/com/paxelerate/model/agent/AgentPackage.java",
"license": "epl-1.0",
"size": 45860
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 793,577 |
public static Track parseTrak(Atom.ContainerAtom trak, Atom.LeafAtom mvhd, long duration,
DrmInitData drmInitData, boolean isQuickTime) throws ParserException {
Atom.ContainerAtom mdia = trak.getContainerAtomOfType(Atom.TYPE_mdia);
int trackType = parseHdlr(mdia.getLeafAtomOfType(Atom.TYPE_hdlr).data);
if (trackType == C.TRACK_TYPE_UNKNOWN) {
return null;
}
TkhdData tkhdData = parseTkhd(trak.getLeafAtomOfType(Atom.TYPE_tkhd).data);
if (duration == C.TIME_UNSET) {
duration = tkhdData.duration;
}
long movieTimescale = parseMvhd(mvhd.data);
long durationUs;
if (duration == C.TIME_UNSET) {
durationUs = C.TIME_UNSET;
} else {
durationUs = Util.scaleLargeTimestamp(duration, C.MICROS_PER_SECOND, movieTimescale);
}
Atom.ContainerAtom stbl = mdia.getContainerAtomOfType(Atom.TYPE_minf)
.getContainerAtomOfType(Atom.TYPE_stbl);
Pair<Long, String> mdhdData = parseMdhd(mdia.getLeafAtomOfType(Atom.TYPE_mdhd).data);
StsdData stsdData = parseStsd(stbl.getLeafAtomOfType(Atom.TYPE_stsd).data, tkhdData.id,
tkhdData.rotationDegrees, mdhdData.second, drmInitData, isQuickTime);
Pair<long[], long[]> edtsData = parseEdts(trak.getContainerAtomOfType(Atom.TYPE_edts));
return stsdData.format == null ? null
: new Track(tkhdData.id, trackType, mdhdData.first, movieTimescale, durationUs,
stsdData.format, stsdData.requiredSampleTransformation, stsdData.trackEncryptionBoxes,
stsdData.nalUnitLengthFieldLength, edtsData.first, edtsData.second);
} | static Track function(Atom.ContainerAtom trak, Atom.LeafAtom mvhd, long duration, DrmInitData drmInitData, boolean isQuickTime) throws ParserException { Atom.ContainerAtom mdia = trak.getContainerAtomOfType(Atom.TYPE_mdia); int trackType = parseHdlr(mdia.getLeafAtomOfType(Atom.TYPE_hdlr).data); if (trackType == C.TRACK_TYPE_UNKNOWN) { return null; } TkhdData tkhdData = parseTkhd(trak.getLeafAtomOfType(Atom.TYPE_tkhd).data); if (duration == C.TIME_UNSET) { duration = tkhdData.duration; } long movieTimescale = parseMvhd(mvhd.data); long durationUs; if (duration == C.TIME_UNSET) { durationUs = C.TIME_UNSET; } else { durationUs = Util.scaleLargeTimestamp(duration, C.MICROS_PER_SECOND, movieTimescale); } Atom.ContainerAtom stbl = mdia.getContainerAtomOfType(Atom.TYPE_minf) .getContainerAtomOfType(Atom.TYPE_stbl); Pair<Long, String> mdhdData = parseMdhd(mdia.getLeafAtomOfType(Atom.TYPE_mdhd).data); StsdData stsdData = parseStsd(stbl.getLeafAtomOfType(Atom.TYPE_stsd).data, tkhdData.id, tkhdData.rotationDegrees, mdhdData.second, drmInitData, isQuickTime); Pair<long[], long[]> edtsData = parseEdts(trak.getContainerAtomOfType(Atom.TYPE_edts)); return stsdData.format == null ? null : new Track(tkhdData.id, trackType, mdhdData.first, movieTimescale, durationUs, stsdData.format, stsdData.requiredSampleTransformation, stsdData.trackEncryptionBoxes, stsdData.nalUnitLengthFieldLength, edtsData.first, edtsData.second); } | /**
* Parses a trak atom (defined in 14496-12).
*
* @param trak Atom to decode.
* @param mvhd Movie header atom, used to get the timescale.
* @param duration The duration in units of the timescale declared in the mvhd atom, or
* {@link C#TIME_UNSET} if the duration should be parsed from the tkhd atom.
* @param drmInitData {@link DrmInitData} to be included in the format.
* @param isQuickTime True for QuickTime media. False otherwise.
* @return A {@link Track} instance, or {@code null} if the track's type isn't supported.
*/ | Parses a trak atom (defined in 14496-12) | parseTrak | {
"repo_name": "ClubCom/AndroidExoPlayer",
"path": "library/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java",
"license": "apache-2.0",
"size": 53139
} | [
"android.util.Pair",
"com.google.android.exoplayer2.ParserException",
"com.google.android.exoplayer2.drm.DrmInitData",
"com.google.android.exoplayer2.util.Util"
] | import android.util.Pair; import com.google.android.exoplayer2.ParserException; import com.google.android.exoplayer2.drm.DrmInitData; import com.google.android.exoplayer2.util.Util; | import android.util.*; import com.google.android.exoplayer2.*; import com.google.android.exoplayer2.drm.*; import com.google.android.exoplayer2.util.*; | [
"android.util",
"com.google.android"
] | android.util; com.google.android; | 2,444,243 |
@Test(timeout = 100000) // timeout after 100 seconds
public void testTaskManagerFailure() {
LOG.info("Starting testTaskManagerFailure()");
Runner runner = startWithArgs(new String[]{"-j", flinkUberjar.getAbsolutePath(), "-t", flinkLibFolder.getAbsolutePath(),
"-n", "1",
"-jm", "768",
"-tm", "1024",
"-s", "3", // set the slots 3 to check if the vCores are set properly!
"-nm", "customName",
"-Dfancy-configuration-value=veryFancy",
"-Dyarn.maximum-failed-containers=3",
"-D" + ConfigConstants.YARN_VCORES + "=2"},
"Number of connected TaskManagers changed to 1. Slots available: 3",
RunTypes.YARN_SESSION);
Assert.assertEquals(2, getRunningContainers());
// ------------------------ Test if JobManager web interface is accessible -------
YarnClient yc = null;
try {
yc = YarnClient.createYarnClient();
yc.init(YARN_CONFIGURATION);
yc.start();
List<ApplicationReport> apps = yc.getApplications(EnumSet.of(YarnApplicationState.RUNNING));
Assert.assertEquals(1, apps.size()); // Only one running
ApplicationReport app = apps.get(0);
Assert.assertEquals("customName", app.getName());
String url = app.getTrackingUrl();
if (!url.endsWith("/")) {
url += "/";
}
if (!url.startsWith("http://")) {
url = "http://" + url;
}
LOG.info("Got application URL from YARN {}", url);
String response = TestBaseUtils.getFromHTTP(url + "taskmanagers/");
JsonNode parsedTMs = new ObjectMapper().readTree(response);
ArrayNode taskManagers = (ArrayNode) parsedTMs.get("taskmanagers");
Assert.assertNotNull(taskManagers);
Assert.assertEquals(1, taskManagers.size());
Assert.assertEquals(3, taskManagers.get(0).get("slotsNumber").asInt());
// get the configuration from webinterface & check if the dynamic properties from YARN show up there.
String jsonConfig = TestBaseUtils.getFromHTTP(url + "jobmanager/config");
Map<String, String> parsedConfig = WebMonitorUtils.fromKeyValueJsonArray(jsonConfig);
Assert.assertEquals("veryFancy", parsedConfig.get("fancy-configuration-value"));
Assert.assertEquals("3", parsedConfig.get("yarn.maximum-failed-containers"));
Assert.assertEquals("2", parsedConfig.get(ConfigConstants.YARN_VCORES));
// -------------- FLINK-1902: check if jobmanager hostname/port are shown in web interface
// first, get the hostname/port
String oC = outContent.toString();
Pattern p = Pattern.compile("Flink JobManager is now running on ([a-zA-Z0-9.-]+):([0-9]+)");
Matcher matches = p.matcher(oC);
String hostname = null;
String port = null;
while (matches.find()) {
hostname = matches.group(1).toLowerCase();
port = matches.group(2);
}
LOG.info("Extracted hostname:port: {} {}", hostname, port);
Assert.assertEquals("unable to find hostname in " + jsonConfig, hostname,
parsedConfig.get(ConfigConstants.JOB_MANAGER_IPC_ADDRESS_KEY));
Assert.assertEquals("unable to find port in " + jsonConfig, port,
parsedConfig.get(ConfigConstants.JOB_MANAGER_IPC_PORT_KEY));
// test logfile access
String logs = TestBaseUtils.getFromHTTP(url + "jobmanager/log");
Assert.assertTrue(logs.contains("Starting YARN ApplicationMaster"));
Assert.assertTrue(logs.contains("Starting JobManager"));
Assert.assertTrue(logs.contains("Starting JobManager Web Frontend"));
} catch (Throwable e) {
LOG.warn("Error while running test", e);
Assert.fail(e.getMessage());
}
// ------------------------ Kill container with TaskManager and check if vcores are set correctly -------
// find container id of taskManager:
ContainerId taskManagerContainer = null;
NodeManager nodeManager = null;
UserGroupInformation remoteUgi = null;
NMTokenIdentifier nmIdent = null;
try {
remoteUgi = UserGroupInformation.getCurrentUser();
} catch (IOException e) {
LOG.warn("Unable to get curr user", e);
Assert.fail();
}
for (int nmId = 0; nmId < NUM_NODEMANAGERS; nmId++) {
NodeManager nm = yarnCluster.getNodeManager(nmId);
ConcurrentMap<ContainerId, Container> containers = nm.getNMContext().getContainers();
for (Map.Entry<ContainerId, Container> entry : containers.entrySet()) {
String command = Joiner.on(" ").join(entry.getValue().getLaunchContext().getCommands());
if (command.contains(YarnTaskManager.class.getSimpleName())) {
taskManagerContainer = entry.getKey();
nodeManager = nm;
nmIdent = new NMTokenIdentifier(taskManagerContainer.getApplicationAttemptId(), null, "", 0);
// allow myself to do stuff with the container
// remoteUgi.addCredentials(entry.getValue().getCredentials());
remoteUgi.addTokenIdentifier(nmIdent);
}
}
sleep(500);
}
Assert.assertNotNull("Unable to find container with TaskManager", taskManagerContainer);
Assert.assertNotNull("Illegal state", nodeManager);
yc.stop();
List<ContainerId> toStop = new LinkedList<ContainerId>();
toStop.add(taskManagerContainer);
StopContainersRequest scr = StopContainersRequest.newInstance(toStop);
try {
nodeManager.getNMContext().getContainerManager().stopContainers(scr);
} catch (Throwable e) {
LOG.warn("Error stopping container", e);
Assert.fail("Error stopping container: " + e.getMessage());
}
// stateful termination check:
// wait until we saw a container being killed and AFTERWARDS a new one launched
boolean ok = false;
do {
LOG.debug("Waiting for correct order of events. Output: {}", errContent.toString());
String o = errContent.toString();
int killedOff = o.indexOf("Container killed by the ApplicationMaster");
if (killedOff != -1) {
o = o.substring(killedOff);
ok = o.indexOf("Launching TaskManager") > 0;
}
sleep(1000);
} while(!ok);
// send "stop" command to command line interface
runner.sendStop();
// wait for the thread to stop
try {
runner.join(1000);
} catch (InterruptedException e) {
LOG.warn("Interrupted while stopping runner", e);
}
LOG.warn("stopped");
// ----------- Send output to logger
System.setOut(ORIGINAL_STDOUT);
System.setErr(ORIGINAL_STDERR);
String oC = outContent.toString();
String eC = errContent.toString();
LOG.info("Sending stdout content through logger: \n\n{}\n\n", oC);
LOG.info("Sending stderr content through logger: \n\n{}\n\n", eC);
// ------ Check if everything happened correctly
Assert.assertTrue("Expect to see failed container",
eC.contains("New messages from the YARN cluster"));
Assert.assertTrue("Expect to see failed container",
eC.contains("Container killed by the ApplicationMaster"));
Assert.assertTrue("Expect to see new container started",
eC.contains("Launching TaskManager") && eC.contains("on host"));
// cleanup auth for the subsequent tests.
remoteUgi.getTokenIdentifiers().remove(nmIdent);
LOG.info("Finished testTaskManagerFailure()");
} | @Test(timeout = 100000) void function() { LOG.info(STR); Runner runner = startWithArgs(new String[]{"-j", flinkUberjar.getAbsolutePath(), "-t", flinkLibFolder.getAbsolutePath(), "-n", "1", "-jm", "768", "-tm", "1024", "-s", "3", "-nm", STR, STR, STR, "-D" + ConfigConstants.YARN_VCORES + "=2"}, STR, RunTypes.YARN_SESSION); Assert.assertEquals(2, getRunningContainers()); YarnClient yc = null; try { yc = YarnClient.createYarnClient(); yc.init(YARN_CONFIGURATION); yc.start(); List<ApplicationReport> apps = yc.getApplications(EnumSet.of(YarnApplicationState.RUNNING)); Assert.assertEquals(1, apps.size()); ApplicationReport app = apps.get(0); Assert.assertEquals(STR, app.getName()); String url = app.getTrackingUrl(); if (!url.endsWith("/")) { url += "/"; } if (!url.startsWith(STRhttp: } LOG.info(STR, url); String response = TestBaseUtils.getFromHTTP(url + STR); JsonNode parsedTMs = new ObjectMapper().readTree(response); ArrayNode taskManagers = (ArrayNode) parsedTMs.get(STR); Assert.assertNotNull(taskManagers); Assert.assertEquals(1, taskManagers.size()); Assert.assertEquals(3, taskManagers.get(0).get(STR).asInt()); String jsonConfig = TestBaseUtils.getFromHTTP(url + STR); Map<String, String> parsedConfig = WebMonitorUtils.fromKeyValueJsonArray(jsonConfig); Assert.assertEquals(STR, parsedConfig.get(STR)); Assert.assertEquals("3", parsedConfig.get(STR)); Assert.assertEquals("2", parsedConfig.get(ConfigConstants.YARN_VCORES)); String oC = outContent.toString(); Pattern p = Pattern.compile(STR); Matcher matches = p.matcher(oC); String hostname = null; String port = null; while (matches.find()) { hostname = matches.group(1).toLowerCase(); port = matches.group(2); } LOG.info(STR, hostname, port); Assert.assertEquals(STR + jsonConfig, hostname, parsedConfig.get(ConfigConstants.JOB_MANAGER_IPC_ADDRESS_KEY)); Assert.assertEquals(STR + jsonConfig, port, parsedConfig.get(ConfigConstants.JOB_MANAGER_IPC_PORT_KEY)); String logs = TestBaseUtils.getFromHTTP(url + STR); Assert.assertTrue(logs.contains(STR)); Assert.assertTrue(logs.contains(STR)); Assert.assertTrue(logs.contains(STR)); } catch (Throwable e) { LOG.warn(STR, e); Assert.fail(e.getMessage()); } ContainerId taskManagerContainer = null; NodeManager nodeManager = null; UserGroupInformation remoteUgi = null; NMTokenIdentifier nmIdent = null; try { remoteUgi = UserGroupInformation.getCurrentUser(); } catch (IOException e) { LOG.warn(STR, e); Assert.fail(); } for (int nmId = 0; nmId < NUM_NODEMANAGERS; nmId++) { NodeManager nm = yarnCluster.getNodeManager(nmId); ConcurrentMap<ContainerId, Container> containers = nm.getNMContext().getContainers(); for (Map.Entry<ContainerId, Container> entry : containers.entrySet()) { String command = Joiner.on(" ").join(entry.getValue().getLaunchContext().getCommands()); if (command.contains(YarnTaskManager.class.getSimpleName())) { taskManagerContainer = entry.getKey(); nodeManager = nm; nmIdent = new NMTokenIdentifier(taskManagerContainer.getApplicationAttemptId(), null, STRUnable to find container with TaskManagerSTRIllegal stateSTRError stopping containerSTRError stopping container: STRWaiting for correct order of events. Output: {}STRContainer killed by the ApplicationMasterSTRLaunching TaskManagerSTRInterrupted while stopping runnerSTRstoppedSTRSending stdout content through logger: \n\n{}\n\nSTRSending stderr content through logger: \n\n{}\n\nSTRExpect to see failed containerSTRNew messages from the YARN clusterSTRExpect to see failed containerSTRContainer killed by the ApplicationMasterSTRExpect to see new container startedSTRLaunching TaskManagerSTRon hostSTRFinished testTaskManagerFailure()"); } | /**
* Test TaskManager failure and also if the vcores are set correctly (see issue FLINK-2213).
*/ | Test TaskManager failure and also if the vcores are set correctly (see issue FLINK-2213) | testTaskManagerFailure | {
"repo_name": "WangTaoTheTonic/flink",
"path": "flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNSessionCapacitySchedulerITCase.java",
"license": "apache-2.0",
"size": 23550
} | [
"com.fasterxml.jackson.databind.JsonNode",
"com.fasterxml.jackson.databind.ObjectMapper",
"com.fasterxml.jackson.databind.node.ArrayNode",
"com.google.common.base.Joiner",
"java.io.IOException",
"java.util.EnumSet",
"java.util.List",
"java.util.Map",
"java.util.concurrent.ConcurrentMap",
"java.uti... | import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ArrayNode; import com.google.common.base.Joiner; import java.io.IOException; import java.util.EnumSet; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentMap; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.flink.configuration.ConfigConstants; import org.apache.flink.runtime.webmonitor.WebMonitorUtils; import org.apache.flink.test.util.TestBaseUtils; import org.apache.hadoop.security.UserGroupInformation; import org.apache.hadoop.yarn.api.records.ApplicationReport; import org.apache.hadoop.yarn.api.records.ContainerId; import org.apache.hadoop.yarn.api.records.YarnApplicationState; import org.apache.hadoop.yarn.client.api.YarnClient; import org.apache.hadoop.yarn.security.NMTokenIdentifier; import org.apache.hadoop.yarn.server.nodemanager.NodeManager; import org.apache.hadoop.yarn.server.nodemanager.containermanager.container.Container; import org.junit.Assert; import org.junit.Test; | import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.node.*; import com.google.common.base.*; import java.io.*; import java.util.*; import java.util.concurrent.*; import java.util.regex.*; import org.apache.flink.configuration.*; import org.apache.flink.runtime.webmonitor.*; import org.apache.flink.test.util.*; import org.apache.hadoop.security.*; import org.apache.hadoop.yarn.api.records.*; import org.apache.hadoop.yarn.client.api.*; import org.apache.hadoop.yarn.security.*; import org.apache.hadoop.yarn.server.nodemanager.*; import org.apache.hadoop.yarn.server.nodemanager.containermanager.container.*; import org.junit.*; | [
"com.fasterxml.jackson",
"com.google.common",
"java.io",
"java.util",
"org.apache.flink",
"org.apache.hadoop",
"org.junit"
] | com.fasterxml.jackson; com.google.common; java.io; java.util; org.apache.flink; org.apache.hadoop; org.junit; | 84,722 |
protected void addJavadocTag(JavaElement javaElement,
boolean markAsDoNotDelete) {
javaElement.addJavaDocLine(" *"); //$NON-NLS-1$
StringBuilder sb = new StringBuilder();
sb.append(" * "); //$NON-NLS-1$
sb.append(MergeConstants.NEW_ELEMENT_TAG);
if (markAsDoNotDelete) {
sb.append(" do_not_delete_during_merge"); //$NON-NLS-1$
}
String s = getDateString();
if (s != null) {
sb.append(' ');
sb.append(s);
}
javaElement.addJavaDocLine(sb.toString());
} | void function(JavaElement javaElement, boolean markAsDoNotDelete) { javaElement.addJavaDocLine(STR); StringBuilder sb = new StringBuilder(); sb.append(STR); sb.append(MergeConstants.NEW_ELEMENT_TAG); if (markAsDoNotDelete) { sb.append(STR); } String s = getDateString(); if (s != null) { sb.append(' '); sb.append(s); } javaElement.addJavaDocLine(sb.toString()); } | /**
* This method adds the custom javadoc tag for. You may do nothing if you do not wish to include the Javadoc tag -
* however, if you do not include the Javadoc tag then the Java merge capability of the eclipse plugin will break.
*
* @param javaElement
* the java element
* @param markAsDoNotDelete
* the mark as do not delete
*/ | This method adds the custom javadoc tag for. You may do nothing if you do not wish to include the Javadoc tag - however, if you do not include the Javadoc tag then the Java merge capability of the eclipse plugin will break | addJavadocTag | {
"repo_name": "393562632/mybatis-generator",
"path": "mybatis-generator-core/src/main/java/org/mybatis/generator/internal/DefaultCommentGenerator.java",
"license": "apache-2.0",
"size": 14196
} | [
"org.mybatis.generator.api.dom.java.JavaElement",
"org.mybatis.generator.config.MergeConstants"
] | import org.mybatis.generator.api.dom.java.JavaElement; import org.mybatis.generator.config.MergeConstants; | import org.mybatis.generator.api.dom.java.*; import org.mybatis.generator.config.*; | [
"org.mybatis.generator"
] | org.mybatis.generator; | 1,974,078 |
public static Element getRespMusic(WxRespMusicEntity respMusic, WxItemThumbEntity thumb) throws DocumentException {
Element ele = respEntityFactory(respMusic);
Element musicEle = ele.addElement("Music");
musicEle.addElement("Title").addCDATA(StringUtils.defaultString(respMusic.getMusic().getTitle()));
musicEle.addElement("Description").addCDATA(StringUtils.defaultString(respMusic.getMusic().getDescription()));
musicEle.addElement("MusicUrl").addCDATA(StringUtils.defaultString(respMusic.getMusic().getMusicUrl()));
musicEle.addElement("HQMusicUrl").addCDATA(StringUtils.defaultString(respMusic.getMusic().getHqMusicUrl()));
musicEle.addElement("ThumbMediaId").addCDATA(thumb.getMediaId());
return ele;
}
| static Element function(WxRespMusicEntity respMusic, WxItemThumbEntity thumb) throws DocumentException { Element ele = respEntityFactory(respMusic); Element musicEle = ele.addElement("Music"); musicEle.addElement("Title").addCDATA(StringUtils.defaultString(respMusic.getMusic().getTitle())); musicEle.addElement(STR).addCDATA(StringUtils.defaultString(respMusic.getMusic().getDescription())); musicEle.addElement(STR).addCDATA(StringUtils.defaultString(respMusic.getMusic().getMusicUrl())); musicEle.addElement(STR).addCDATA(StringUtils.defaultString(respMusic.getMusic().getHqMusicUrl())); musicEle.addElement(STR).addCDATA(thumb.getMediaId()); return ele; } | /**
* <code>
* <xml><br />
* <ToUserName><![CDATA[toUser]]></ToUserName><br />
* <FromUserName><![CDATA[fromUser]]></FromUserName><br />
* <CreateTime>12345678</CreateTime><br />
* <MsgType><![CDATA[music]]></MsgType><br />
* <Music><br />
* <Title><![CDATA[TITLE]]></Title><br />
* <Description><![CDATA[DESCRIPTION]]></Description><br />
* <MusicUrl><![CDATA[MUSIC_Url]]></MusicUrl><br />
* <HQMusicUrl><![CDATA[HQ_MUSIC_Url]]></HQMusicUrl><br />
* <ThumbMediaId><![CDATA[media_id]]></ThumbMediaId><br />
* </Music><br />
* <FuncFlag>0</FuncFlag><br />
* </xml>
* </code>
*
* @param respMusic
* @return
* @throws DocumentException
*/ | <code> <xml> <ToUserName><![CDATA[toUser]]></ToUserName> <FromUserName><![CDATA[fromUser]]></FromUserName> <CreateTime>12345678</CreateTime> <MsgType><![CDATA[music]]></MsgType> <Music> <Title><![CDATA[TITLE]]></Title> <Description><![CDATA[DESCRIPTION]]></Description> <MusicUrl><![CDATA[MUSIC_Url]]></MusicUrl> <HQMusicUrl><![CDATA[HQ_MUSIC_Url]]></HQMusicUrl> <ThumbMediaId><![CDATA[media_id]]></ThumbMediaId> </Music> <FuncFlag>0</FuncFlag> </xml> </code> | getRespMusic | {
"repo_name": "onepip/weixin-mp-java",
"path": "src/main/java/org/hamster/weixinmp/controller/util/WxXmlUtil.java",
"license": "apache-2.0",
"size": 24785
} | [
"org.apache.commons.lang3.StringUtils",
"org.dom4j.DocumentException",
"org.dom4j.Element",
"org.hamster.weixinmp.dao.entity.item.WxItemThumbEntity",
"org.hamster.weixinmp.dao.entity.resp.WxRespMusicEntity"
] | import org.apache.commons.lang3.StringUtils; import org.dom4j.DocumentException; import org.dom4j.Element; import org.hamster.weixinmp.dao.entity.item.WxItemThumbEntity; import org.hamster.weixinmp.dao.entity.resp.WxRespMusicEntity; | import org.apache.commons.lang3.*; import org.dom4j.*; import org.hamster.weixinmp.dao.entity.item.*; import org.hamster.weixinmp.dao.entity.resp.*; | [
"org.apache.commons",
"org.dom4j",
"org.hamster.weixinmp"
] | org.apache.commons; org.dom4j; org.hamster.weixinmp; | 774,603 |
public void updateAlloggio(Alloggio alloggio) {
this.setAlloggio(alloggio);
this.aggiornaUI();
}
| void function(Alloggio alloggio) { this.setAlloggio(alloggio); this.aggiornaUI(); } | /**
* Aggiorna l'Alloggio
*
* @param alloggio
*/ | Aggiorna l'Alloggio | updateAlloggio | {
"repo_name": "SpeearthTeam/Speearth",
"path": "src/com/speearth/view/prenotaservizio/schermate/componenti/AlloggioOffertaItem.java",
"license": "cc0-1.0",
"size": 3540
} | [
"com.speearth.model.core.Alloggio"
] | import com.speearth.model.core.Alloggio; | import com.speearth.model.core.*; | [
"com.speearth.model"
] | com.speearth.model; | 1,334,361 |
private static int getLine(ParseTree tree) {
if (tree instanceof TerminalNode) {
return ((TerminalNode) tree).getSymbol().getLine() - 1;
}
else {
final ParserRuleContext rule = (ParserRuleContext) tree;
return rule.start.getLine() - 1;
}
} | static int function(ParseTree tree) { if (tree instanceof TerminalNode) { return ((TerminalNode) tree).getSymbol().getLine() - 1; } else { final ParserRuleContext rule = (ParserRuleContext) tree; return rule.start.getLine() - 1; } } | /**
* Gets line number from ParseTree node.
* @param tree
* ParseTree node
* @return line number
*/ | Gets line number from ParseTree node | getLine | {
"repo_name": "cs1331/checkstyle",
"path": "src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/AbstractJavadocCheck.java",
"license": "apache-2.0",
"size": 22828
} | [
"org.antlr.v4.runtime.ParserRuleContext",
"org.antlr.v4.runtime.tree.ParseTree",
"org.antlr.v4.runtime.tree.TerminalNode"
] | import org.antlr.v4.runtime.ParserRuleContext; import org.antlr.v4.runtime.tree.ParseTree; import org.antlr.v4.runtime.tree.TerminalNode; | import org.antlr.v4.runtime.*; import org.antlr.v4.runtime.tree.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 1,960,762 |
@Override
public synchronized void doBuild() throws TorqueException
{
if ( isBuilt() ) {
return;
}
dbMap = Torque.getDatabaseMap("track");
dbMap.addTable("TGENERALSETTINGS");
TableMap tMap = dbMap.getTable("TGENERALSETTINGS");
tMap.setJavaName("TGeneralSettings");
tMap.setOMClass( com.aurel.track.persist.TGeneralSettings.class );
tMap.setPeerClass( com.aurel.track.persist.TGeneralSettingsPeer.class );
tMap.setPrimaryKeyMethod(TableMap.ID_BROKER);
tMap.setPrimaryKeyMethodInfo(tMap.getName());
ColumnMap cMap = null;
// ------------- Column: OBJECTID --------------------
cMap = new ColumnMap( "OBJECTID", tMap);
cMap.setType( new Integer(0) );
cMap.setTorqueType( "INTEGER" );
cMap.setUsePrimitive(false);
cMap.setPrimaryKey(true);
cMap.setNotNull(true);
cMap.setJavaName( "ObjectID" );
cMap.setAutoIncrement(false);
cMap.setProtected(false);
cMap.setInheritance("false");
cMap.setPosition(1);
tMap.addColumn(cMap);
// ------------- Column: CONFIG --------------------
cMap = new ColumnMap( "CONFIG", tMap);
cMap.setType( new Integer(0) );
cMap.setTorqueType( "INTEGER" );
cMap.setUsePrimitive(false);
cMap.setPrimaryKey(false);
cMap.setNotNull(true);
cMap.setJavaName( "Config" );
cMap.setAutoIncrement(false);
cMap.setProtected(false);
cMap.setInheritance("false");
cMap.setForeignKey("TFIELDCONFIG", "OBJECTID");
cMap.setPosition(2);
tMap.addColumn(cMap);
// ------------- Column: INTEGERVALUE --------------------
cMap = new ColumnMap( "INTEGERVALUE", tMap);
cMap.setType( new Integer(0) );
cMap.setTorqueType( "INTEGER" );
cMap.setUsePrimitive(false);
cMap.setPrimaryKey(false);
cMap.setNotNull(false);
cMap.setJavaName( "IntegerValue" );
cMap.setAutoIncrement(false);
cMap.setProtected(false);
cMap.setInheritance("false");
cMap.setPosition(3);
tMap.addColumn(cMap);
// ------------- Column: DOUBLEVALUE --------------------
cMap = new ColumnMap( "DOUBLEVALUE", tMap);
cMap.setType( new Double(0) );
cMap.setTorqueType( "DOUBLE" );
cMap.setUsePrimitive(false);
cMap.setPrimaryKey(false);
cMap.setNotNull(false);
cMap.setJavaName( "DoubleValue" );
cMap.setAutoIncrement(false);
cMap.setProtected(false);
cMap.setInheritance("false");
cMap.setPosition(4);
tMap.addColumn(cMap);
// ------------- Column: TEXTVALUE --------------------
cMap = new ColumnMap( "TEXTVALUE", tMap);
cMap.setType( "" );
cMap.setTorqueType( "VARCHAR" );
cMap.setUsePrimitive(false);
cMap.setPrimaryKey(false);
cMap.setNotNull(false);
cMap.setJavaName( "TextValue" );
cMap.setAutoIncrement(false);
cMap.setProtected(false);
cMap.setInheritance("false");
cMap.setSize( 255 );
cMap.setPosition(5);
tMap.addColumn(cMap);
// ------------- Column: DATEVALUE --------------------
cMap = new ColumnMap( "DATEVALUE", tMap);
cMap.setType( new Date() );
cMap.setTorqueType( "TIMESTAMP" );
cMap.setUsePrimitive(false);
cMap.setPrimaryKey(false);
cMap.setNotNull(false);
cMap.setJavaName( "DateValue" );
cMap.setAutoIncrement(false);
cMap.setProtected(false);
cMap.setInheritance("false");
cMap.setPosition(6);
tMap.addColumn(cMap);
// ------------- Column: CHARACTERVALUE --------------------
cMap = new ColumnMap( "CHARACTERVALUE", tMap);
cMap.setType( "" );
cMap.setTorqueType( "CHAR" );
cMap.setUsePrimitive(false);
cMap.setPrimaryKey(false);
cMap.setNotNull(false);
cMap.setJavaName( "CharacterValue" );
cMap.setAutoIncrement(false);
cMap.setProtected(false);
cMap.setInheritance("false");
cMap.setSize( 1 );
cMap.setPosition(7);
tMap.addColumn(cMap);
// ------------- Column: PARAMETERCODE --------------------
cMap = new ColumnMap( "PARAMETERCODE", tMap);
cMap.setType( new Integer(0) );
cMap.setTorqueType( "INTEGER" );
cMap.setUsePrimitive(false);
cMap.setPrimaryKey(false);
cMap.setNotNull(false);
cMap.setJavaName( "ParameterCode" );
cMap.setAutoIncrement(false);
cMap.setProtected(false);
cMap.setInheritance("false");
cMap.setPosition(8);
tMap.addColumn(cMap);
// ------------- Column: VALIDVALUE --------------------
cMap = new ColumnMap( "VALIDVALUE", tMap);
cMap.setType( new Integer(0) );
cMap.setTorqueType( "INTEGER" );
cMap.setUsePrimitive(false);
cMap.setPrimaryKey(false);
cMap.setNotNull(false);
cMap.setJavaName( "ValidValue" );
cMap.setAutoIncrement(false);
cMap.setProtected(false);
cMap.setInheritance("false");
cMap.setPosition(9);
tMap.addColumn(cMap);
// ------------- Column: TPUUID --------------------
cMap = new ColumnMap( "TPUUID", tMap);
cMap.setType( "" );
cMap.setTorqueType( "VARCHAR" );
cMap.setUsePrimitive(false);
cMap.setPrimaryKey(false);
cMap.setNotNull(false);
cMap.setJavaName( "Uuid" );
cMap.setAutoIncrement(false);
cMap.setProtected(false);
cMap.setInheritance("false");
cMap.setSize( 36 );
cMap.setPosition(10);
tMap.addColumn(cMap);
tMap.setUseInheritance(false);
} | synchronized void function() throws TorqueException { if ( isBuilt() ) { return; } dbMap = Torque.getDatabaseMap("track"); dbMap.addTable(STR); TableMap tMap = dbMap.getTable(STR); tMap.setJavaName(STR); tMap.setOMClass( com.aurel.track.persist.TGeneralSettings.class ); tMap.setPeerClass( com.aurel.track.persist.TGeneralSettingsPeer.class ); tMap.setPrimaryKeyMethod(TableMap.ID_BROKER); tMap.setPrimaryKeyMethodInfo(tMap.getName()); ColumnMap cMap = null; cMap = new ColumnMap( STR, tMap); cMap.setType( new Integer(0) ); cMap.setTorqueType( STR ); cMap.setUsePrimitive(false); cMap.setPrimaryKey(true); cMap.setNotNull(true); cMap.setJavaName( STR ); cMap.setAutoIncrement(false); cMap.setProtected(false); cMap.setInheritance("false"); cMap.setPosition(1); tMap.addColumn(cMap); cMap = new ColumnMap( STR, tMap); cMap.setType( new Integer(0) ); cMap.setTorqueType( STR ); cMap.setUsePrimitive(false); cMap.setPrimaryKey(false); cMap.setNotNull(true); cMap.setJavaName( STR ); cMap.setAutoIncrement(false); cMap.setProtected(false); cMap.setInheritance("false"); cMap.setForeignKey(STR, STR); cMap.setPosition(2); tMap.addColumn(cMap); cMap = new ColumnMap( STR, tMap); cMap.setType( new Integer(0) ); cMap.setTorqueType( STR ); cMap.setUsePrimitive(false); cMap.setPrimaryKey(false); cMap.setNotNull(false); cMap.setJavaName( STR ); cMap.setAutoIncrement(false); cMap.setProtected(false); cMap.setInheritance("false"); cMap.setPosition(3); tMap.addColumn(cMap); cMap = new ColumnMap( STR, tMap); cMap.setType( new Double(0) ); cMap.setTorqueType( STR ); cMap.setUsePrimitive(false); cMap.setPrimaryKey(false); cMap.setNotNull(false); cMap.setJavaName( STR ); cMap.setAutoIncrement(false); cMap.setProtected(false); cMap.setInheritance("false"); cMap.setPosition(4); tMap.addColumn(cMap); cMap = new ColumnMap( STR, tMap); cMap.setType( STRVARCHARSTRTextValueSTRfalseSTRDATEVALUESTRTIMESTAMPSTRDateValueSTRfalseSTRCHARACTERVALUE", tMap); cMap.setType( STRCHARSTRCharacterValueSTRfalseSTRPARAMETERCODE", tMap); cMap.setType( new Integer(0) ); cMap.setTorqueType( STR ); cMap.setUsePrimitive(false); cMap.setPrimaryKey(false); cMap.setNotNull(false); cMap.setJavaName( "ParameterCodeSTRfalseSTRVALIDVALUE", tMap); cMap.setType( new Integer(0) ); cMap.setTorqueType( STR ); cMap.setUsePrimitive(false); cMap.setPrimaryKey(false); cMap.setNotNull(false); cMap.setJavaName( "ValidValueSTRfalseSTRTPUUID", tMap); cMap.setType( STRVARCHARSTRUuidSTRfalse"); cMap.setSize( 36 ); cMap.setPosition(10); tMap.addColumn(cMap); tMap.setUseInheritance(false); } | /**
* The doBuild() method builds the DatabaseMap
*
* @throws TorqueException
*/ | The doBuild() method builds the DatabaseMap | doBuild | {
"repo_name": "trackplus/Genji",
"path": "src/main/java/com/aurel/track/persist/map/TGeneralSettingsMapBuilder.java",
"license": "gpl-3.0",
"size": 7933
} | [
"org.apache.torque.Torque",
"org.apache.torque.TorqueException",
"org.apache.torque.map.ColumnMap",
"org.apache.torque.map.TableMap"
] | import org.apache.torque.Torque; import org.apache.torque.TorqueException; import org.apache.torque.map.ColumnMap; import org.apache.torque.map.TableMap; | import org.apache.torque.*; import org.apache.torque.map.*; | [
"org.apache.torque"
] | org.apache.torque; | 1,329,989 |
public void getData( SalesforceInsertMeta in ) {
wURL.setText( Const.NVL( in.getTargetURL(), "" ) );
wUserName.setText( Const.NVL( in.getUserName(), "" ) );
wPassword.setText( Const.NVL( in.getPassword(), "" ) );
wBatchSize.setText( in.getBatchSize() );
wModule.setText( Const.NVL( in.getModule(), "Account" ) );
wBatchSize.setText( "" + in.getBatchSize() );
wSalesforceIDFieldName.setText( Const.NVL( in.getSalesforceIDFieldName(), "" ) );
if ( isDebug() ) {
logDebug( BaseMessages.getString( PKG, "SalesforceInsertDialog.Log.GettingFieldsInfo" ) );
}
if ( input.getUpdateLookup() != null ) {
for ( int i = 0; i < input.getUpdateLookup().length; i++ ) {
TableItem item = wReturn.table.getItem( i );
if ( input.getUpdateLookup()[i] != null ) {
item.setText( 1, input.getUpdateLookup()[i] );
}
if ( input.getUpdateStream()[i] != null ) {
item.setText( 2, input.getUpdateStream()[i] );
}
if ( input.getUseExternalId()[i] == null || input.getUseExternalId()[i].booleanValue() ) {
item.setText( 3, "Y" );
} else {
item.setText( 3, "N" );
}
}
}
wReturn.removeEmptyRows();
wReturn.setRowNums();
wReturn.optWidth( true );
wTimeOut.setText( Const.NVL( in.getTimeOut(), SalesforceConnectionUtils.DEFAULT_TIMEOUT ) );
wUseCompression.setSelection( in.isUsingCompression() );
wRollbackAllChangesOnError.setSelection( in.isRollbackAllChangesOnError() );
wStepname.selectAll();
wStepname.setFocus();
} | void function( SalesforceInsertMeta in ) { wURL.setText( Const.NVL( in.getTargetURL(), STRSTRSTRAccountSTRSTRSTRSalesforceInsertDialog.Log.GettingFieldsInfoSTRYSTRN" ); } } } wReturn.removeEmptyRows(); wReturn.setRowNums(); wReturn.optWidth( true ); wTimeOut.setText( Const.NVL( in.getTimeOut(), SalesforceConnectionUtils.DEFAULT_TIMEOUT ) ); wUseCompression.setSelection( in.isUsingCompression() ); wRollbackAllChangesOnError.setSelection( in.isRollbackAllChangesOnError() ); wStepname.selectAll(); wStepname.setFocus(); } | /**
* Read the data from the TextFileInputMeta object and show it in this dialog.
*
* @param in
* The SalesforceInsertMeta object to obtain the data from.
*/ | Read the data from the TextFileInputMeta object and show it in this dialog | getData | {
"repo_name": "ma459006574/pentaho-kettle",
"path": "ui/src/org/pentaho/di/ui/trans/steps/salesforceinsert/SalesforceInsertDialog.java",
"license": "apache-2.0",
"size": 42596
} | [
"org.pentaho.di.core.Const",
"org.pentaho.di.trans.steps.salesforceinput.SalesforceConnectionUtils",
"org.pentaho.di.trans.steps.salesforceinsert.SalesforceInsertMeta"
] | import org.pentaho.di.core.Const; import org.pentaho.di.trans.steps.salesforceinput.SalesforceConnectionUtils; import org.pentaho.di.trans.steps.salesforceinsert.SalesforceInsertMeta; | import org.pentaho.di.core.*; import org.pentaho.di.trans.steps.salesforceinput.*; import org.pentaho.di.trans.steps.salesforceinsert.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 1,654,631 |
EReference getListLiteral_T14(); | EReference getListLiteral_T14(); | /**
* Returns the meta object for the containment reference list '{@link com.euclideanspace.spad.editor.ListLiteral#getT14 <em>T14</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>T14</em>'.
* @see com.euclideanspace.spad.editor.ListLiteral#getT14()
* @see #getListLiteral()
* @generated
*/ | Returns the meta object for the containment reference list '<code>com.euclideanspace.spad.editor.ListLiteral#getT14 T14</code>'. | getListLiteral_T14 | {
"repo_name": "martinbaker/euclideanspace",
"path": "com.euclideanspace.spad/src-gen/com/euclideanspace/spad/editor/EditorPackage.java",
"license": "agpl-3.0",
"size": 593321
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,228,806 |
public String parseLatitude(@Nullable final String text) {
if (text != null) {
final ResultWrapper wrapper = parseHelper(text, Geopoint.LatLon.LAT);
if (wrapper != null) {
return wrapper.result;
}
}
throw new FormulaParser.ParseException("Cannot parse latitude", Geopoint.LatLon.LAT);
} | String function(@Nullable final String text) { if (text != null) { final ResultWrapper wrapper = parseHelper(text, Geopoint.LatLon.LAT); if (wrapper != null) { return wrapper.result; } } throw new FormulaParser.ParseException(STR, Geopoint.LatLon.LAT); } | /**
* Parses latitude out of the given string.
*
* The parsing fails if the string contains additional characters (except whitespaces).
*
* @see #parse(String)
* @param text
* the string to be parsed
* @return the latitude as decimal degrees
* @throws FormulaParser.ParseException
* if latitude could not be parsed
*/ | Parses latitude out of the given string. The parsing fails if the string contains additional characters (except whitespaces) | parseLatitude | {
"repo_name": "matej116/cgeo",
"path": "main/src/cgeo/geocaching/calculator/FormulaParser.java",
"license": "apache-2.0",
"size": 14156
} | [
"androidx.annotation.Nullable"
] | import androidx.annotation.Nullable; | import androidx.annotation.*; | [
"androidx.annotation"
] | androidx.annotation; | 225,854 |
public void testParserErrors( ) throws Exception
{
fileName = "wrong_3.css"; //$NON-NLS-1$
CssStyleSheetHandle styleSheet = loadStyleSheet( fileName );
assertEquals( 1, styleSheet.getParserErrors( ).size( ) );
assertEquals(
"[11:1] encountered \"_\". Was expecting one of: \"{\" \",\" \"[\" \".\" \":\" <HASH> \"+\" \">\" ", styleSheet.getParserErrors( ).get( 0 ) ); //$NON-NLS-1$
assertEquals( 0, styleSheet.getParserFatalErrors( ).size( ) );
assertEquals( 0, styleSheet.getParserWarnings( ).size( ) );
} | void function( ) throws Exception { fileName = STR; CssStyleSheetHandle styleSheet = loadStyleSheet( fileName ); assertEquals( 1, styleSheet.getParserErrors( ).size( ) ); assertEquals( STR_\STR{\STR,\STR[\STR.\STR:\STR+\STR>\" ", styleSheet.getParserErrors( ).get( 0 ) ); assertEquals( 0, styleSheet.getParserFatalErrors( ).size( ) ); assertEquals( 0, styleSheet.getParserWarnings( ).size( ) ); } | /**
* Tests warnings related.
*
* @throws Exception
*/ | Tests warnings related | testParserErrors | {
"repo_name": "sguan-actuate/birt",
"path": "model/org.eclipse.birt.report.model.tests/test/org/eclipse/birt/report/model/css/StyleSheetLoaderTest.java",
"license": "epl-1.0",
"size": 16168
} | [
"org.eclipse.birt.report.model.api.css.CssStyleSheetHandle"
] | import org.eclipse.birt.report.model.api.css.CssStyleSheetHandle; | import org.eclipse.birt.report.model.api.css.*; | [
"org.eclipse.birt"
] | org.eclipse.birt; | 2,866,184 |
private boolean areFiltersPassed(Object object, ViewerFilter[] filters) {
if (null != filters) {
for (ViewerFilter filter : filters) {
if (!filter.select(getViewer(), null, object)) {
return false;
}
}
}
return true;
} | boolean function(Object object, ViewerFilter[] filters) { if (null != filters) { for (ViewerFilter filter : filters) { if (!filter.select(getViewer(), null, object)) { return false; } } } return true; } | /**
* Are all filers passed.
*
* @param object
* Object to check.
* @param filters
* Filters.
* @return True if all filters are passed or no filter was given.
*/ | Are all filers passed | areFiltersPassed | {
"repo_name": "inspectIT/inspectIT",
"path": "inspectit.ui.rcp/src/main/java/rocks/inspectit/ui/rcp/editor/search/helper/AbstractSearchHelper.java",
"license": "agpl-3.0",
"size": 8104
} | [
"org.eclipse.jface.viewers.ViewerFilter"
] | import org.eclipse.jface.viewers.ViewerFilter; | import org.eclipse.jface.viewers.*; | [
"org.eclipse.jface"
] | org.eclipse.jface; | 2,763,705 |
private String getSizeMethodCode() {
StringBuilder code = new StringBuilder();
Set<Integer> orders = new HashSet<Integer>();
// encode method
code.append("public int size(").append(ClassHelper.getInternalName(cls.getName()));
code.append(" t) throws IOException {").append(LINE_BREAK);
code.append("int size = 0").append(JAVA_LINE_BREAK);
for (FieldInfo field : fields) {
boolean isList = field.isList();
// check type
if (!isList) {
checkType(field.getFieldType(), field.getField());
}
if (orders.contains(field.getOrder())) {
throw new IllegalArgumentException("Field order '" + field.getOrder() + "' on field"
+ field.getField().getName() + " already exsit.");
}
// define field
code.append(CodedConstant.getMappedTypeDefined(field.getOrder(), field.getFieldType(),
getAccessByField("t", field.getField(), cls), isList, field.isMap()));
// compute size
code.append("if (!CodedConstant.isNull(").append(getAccessByField("t", field.getField(), cls))
.append("))").append("{").append(LINE_BREAK);
code.append("size += ");
code.append(CodedConstant.getMappedTypeSize(field, field.getOrder(), field.getFieldType(), isList,
field.isMap(), debug, outputPath));
code.append("}").append(LINE_BREAK);
if (field.isRequired()) {
code.append(CodedConstant.getRequiredCheck(field.getOrder(), field.getField()));
}
}
code.append("return size").append(JAVA_LINE_BREAK);
code.append("}").append(LINE_BREAK);
return code.toString();
} | String function() { StringBuilder code = new StringBuilder(); Set<Integer> orders = new HashSet<Integer>(); code.append(STR).append(ClassHelper.getInternalName(cls.getName())); code.append(STR).append(LINE_BREAK); code.append(STR).append(JAVA_LINE_BREAK); for (FieldInfo field : fields) { boolean isList = field.isList(); if (!isList) { checkType(field.getFieldType(), field.getField()); } if (orders.contains(field.getOrder())) { throw new IllegalArgumentException(STR + field.getOrder() + STR + field.getField().getName() + STR); } code.append(CodedConstant.getMappedTypeDefined(field.getOrder(), field.getFieldType(), getAccessByField("t", field.getField(), cls), isList, field.isMap())); code.append(STR).append(getAccessByField("t", field.getField(), cls)) .append("))").append("{").append(LINE_BREAK); code.append(STR); code.append(CodedConstant.getMappedTypeSize(field, field.getOrder(), field.getFieldType(), isList, field.isMap(), debug, outputPath)); code.append("}").append(LINE_BREAK); if (field.isRequired()) { code.append(CodedConstant.getRequiredCheck(field.getOrder(), field.getField())); } } code.append(STR).append(JAVA_LINE_BREAK); code.append("}").append(LINE_BREAK); return code.toString(); } | /**
* generate <code>size</code> method source code
*
* @return
*/ | generate <code>size</code> method source code | getSizeMethodCode | {
"repo_name": "gspandy/jprotobuf",
"path": "v3/src/main/java/com/baidu/bjf/remoting/protobuf/CodeGenerator.java",
"license": "apache-2.0",
"size": 28022
} | [
"com.baidu.bjf.remoting.protobuf.utils.ClassHelper",
"com.baidu.bjf.remoting.protobuf.utils.FieldInfo",
"java.util.HashSet",
"java.util.Set"
] | import com.baidu.bjf.remoting.protobuf.utils.ClassHelper; import com.baidu.bjf.remoting.protobuf.utils.FieldInfo; import java.util.HashSet; import java.util.Set; | import com.baidu.bjf.remoting.protobuf.utils.*; import java.util.*; | [
"com.baidu.bjf",
"java.util"
] | com.baidu.bjf; java.util; | 2,726,951 |
public void parse(String recur) {
resetFields();
int parseFlags = 0;
String[] parts;
if (ALLOW_LOWER_CASE) {
parts = recur.toUpperCase().split(";");
} else {
parts = recur.split(";");
}
for (String part : parts) {
// allow empty part (e.g., double semicolon ";;")
if (TextUtils.isEmpty(part)) {
continue;
}
int equalIndex = part.indexOf('=');
if (equalIndex <= 0) {
throw new InvalidFormatException("Missing LHS in " + part);
}
String lhs = part.substring(0, equalIndex);
String rhs = part.substring(equalIndex + 1);
if (rhs.length() == 0) {
throw new InvalidFormatException("Missing RHS in " + part);
}
PartParser parser = sParsePartMap.get(lhs);
if (parser == null) {
if (lhs.startsWith("X-")) {
//Log.d(TAG, "Ignoring custom part " + lhs);
continue;
}
throw new InvalidFormatException("Couldn't find parser for " + lhs);
} else {
int flag = parser.parsePart(rhs, this);
if ((parseFlags & flag) != 0) {
throw new InvalidFormatException("Part " + lhs + " was specified twice");
}
parseFlags |= flag;
}
}
// If not specified, week starts on Monday.
if ((parseFlags & PARSED_WKST) == 0) {
wkst = MO;
}
// FREQ is mandatory.
if ((parseFlags & PARSED_FREQ) == 0) {
throw new InvalidFormatException("Must specify a FREQ value");
}
// Can't have both UNTIL and COUNT.
if ((parseFlags & (PARSED_UNTIL | PARSED_COUNT)) == (PARSED_UNTIL | PARSED_COUNT)) {
if (ONLY_ONE_UNTIL_COUNT) {
throw new InvalidFormatException("Must not specify both UNTIL and COUNT: " + recur);
} else {
Log.w(TAG, "Warning: rrule has both UNTIL and COUNT: " + recur);
}
}
} | void function(String recur) { resetFields(); int parseFlags = 0; String[] parts; if (ALLOW_LOWER_CASE) { parts = recur.toUpperCase().split(";"); } else { parts = recur.split(";"); } for (String part : parts) { if (TextUtils.isEmpty(part)) { continue; } int equalIndex = part.indexOf('='); if (equalIndex <= 0) { throw new InvalidFormatException(STR + part); } String lhs = part.substring(0, equalIndex); String rhs = part.substring(equalIndex + 1); if (rhs.length() == 0) { throw new InvalidFormatException(STR + part); } PartParser parser = sParsePartMap.get(lhs); if (parser == null) { if (lhs.startsWith("X-")) { continue; } throw new InvalidFormatException(STR + lhs); } else { int flag = parser.parsePart(rhs, this); if ((parseFlags & flag) != 0) { throw new InvalidFormatException(STR + lhs + STR); } parseFlags = flag; } } if ((parseFlags & PARSED_WKST) == 0) { wkst = MO; } if ((parseFlags & PARSED_FREQ) == 0) { throw new InvalidFormatException(STR); } if ((parseFlags & (PARSED_UNTIL PARSED_COUNT)) == (PARSED_UNTIL PARSED_COUNT)) { if (ONLY_ONE_UNTIL_COUNT) { throw new InvalidFormatException(STR + recur); } else { Log.w(TAG, STR + recur); } } } | /**
* Parses an rfc2445 recurrence rule string into its component pieces. Attempting to parse
* malformed input will result in an EventRecurrence.InvalidFormatException.
*
* @param recur The recurrence rule to parse (in un-folded form).
*/ | Parses an rfc2445 recurrence rule string into its component pieces. Attempting to parse malformed input will result in an EventRecurrence.InvalidFormatException | parse | {
"repo_name": "x7hub/Calendar_lunar",
"path": "src/com/android/calendarcommon/EventRecurrence.java",
"license": "mit",
"size": 33523
} | [
"android.text.TextUtils",
"android.util.Log"
] | import android.text.TextUtils; import android.util.Log; | import android.text.*; import android.util.*; | [
"android.text",
"android.util"
] | android.text; android.util; | 376,777 |
public static void forceDeletion(File fileToDelete) throws IOException {
if (fileToDelete.exists() && !fileToDelete.canWrite()) {
fileToDelete.setWritable(true);
}
FileUtils.forceDelete(fileToDelete);
} | static void function(File fileToDelete) throws IOException { if (fileToDelete.exists() && !fileToDelete.canWrite()) { fileToDelete.setWritable(true); } FileUtils.forceDelete(fileToDelete); } | /**
* Forces the deletion of the specified file. If the write property of the file to delete isn't
* set, this property is then set before deleting.
*
* @param fileToDelete file to delete.
* @throws IOException if the deletion failed or if the file doesn't exist.
*/ | Forces the deletion of the specified file. If the write property of the file to delete isn't set, this property is then set before deleting | forceDeletion | {
"repo_name": "CecileBONIN/Silverpeas-Core",
"path": "lib-core/src/main/java/com/silverpeas/util/FileUtil.java",
"license": "agpl-3.0",
"size": 17656
} | [
"java.io.File",
"java.io.IOException",
"org.apache.commons.io.FileUtils"
] | import java.io.File; import java.io.IOException; import org.apache.commons.io.FileUtils; | import java.io.*; import org.apache.commons.io.*; | [
"java.io",
"org.apache.commons"
] | java.io; org.apache.commons; | 409,859 |
public void attrModified(Attr node, String oldv, String newv) {
if (!changing) {
valid = false;
}
fireBaseAttributeListeners();
if (!hasAnimVal) {
fireAnimatedAttributeListeners();
}
} | void function(Attr node, String oldv, String newv) { if (!changing) { valid = false; } fireBaseAttributeListeners(); if (!hasAnimVal) { fireAnimatedAttributeListeners(); } } | /**
* Called when an Attr node has been modified.
*/ | Called when an Attr node has been modified | attrModified | {
"repo_name": "Squeegee/batik",
"path": "sources/org/apache/batik/dom/svg/SVGOMAnimatedNumber.java",
"license": "apache-2.0",
"size": 6189
} | [
"org.w3c.dom.Attr"
] | import org.w3c.dom.Attr; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 2,148,700 |
public static ScalarType getContainingIntType(ScalarType decType) {
Preconditions.checkState(decType.isFullySpecifiedDecimal());
Preconditions.checkState(decType.decimalScale() == 0);
// TINYINT_MAX = 128
if (decType.decimalPrecision() <= 2) return Type.TINYINT;
// SMALLINT_MAX = 32768
if (decType.decimalPrecision() <= 4) return Type.SMALLINT;
// INT_MAX = 2147483648
if (decType.decimalPrecision() <= 9) return Type.INT;
return Type.BIGINT;
} | static ScalarType function(ScalarType decType) { Preconditions.checkState(decType.isFullySpecifiedDecimal()); Preconditions.checkState(decType.decimalScale() == 0); if (decType.decimalPrecision() <= 2) return Type.TINYINT; if (decType.decimalPrecision() <= 4) return Type.SMALLINT; if (decType.decimalPrecision() <= 9) return Type.INT; return Type.BIGINT; } | /**
* Returns the smallest integer type that can store decType without loss
* of precision. decType must have scale == 0.
* In the case where the decimal can be bigger than BIGINT, we return
* BIGINT (and the execution will report it as overflows).
*/ | Returns the smallest integer type that can store decType without loss of precision. decType must have scale == 0. In the case where the decimal can be bigger than BIGINT, we return BIGINT (and the execution will report it as overflows) | getContainingIntType | {
"repo_name": "theyaa/Impala",
"path": "fe/src/main/java/com/cloudera/impala/analysis/TypesUtil.java",
"license": "apache-2.0",
"size": 8928
} | [
"com.cloudera.impala.catalog.ScalarType",
"com.cloudera.impala.catalog.Type",
"com.google.common.base.Preconditions"
] | import com.cloudera.impala.catalog.ScalarType; import com.cloudera.impala.catalog.Type; import com.google.common.base.Preconditions; | import com.cloudera.impala.catalog.*; import com.google.common.base.*; | [
"com.cloudera.impala",
"com.google.common"
] | com.cloudera.impala; com.google.common; | 2,835,625 |
//-----------------------------------------------------------------------
static void writeEpochSec(long epochSec, DataOutput out) throws IOException {
if (epochSec >= -4575744000L && epochSec < 10413792000L && epochSec % 900 == 0) { // quarter hours between 1825 and 2300
int store = (int) ((epochSec + 4575744000L) / 900);
out.writeByte((store >>> 16) & 255);
out.writeByte((store >>> 8) & 255);
out.writeByte(store & 255);
} else {
out.writeByte(255);
out.writeLong(epochSec);
}
} | static void writeEpochSec(long epochSec, DataOutput out) throws IOException { if (epochSec >= -4575744000L && epochSec < 10413792000L && epochSec % 900 == 0) { int store = (int) ((epochSec + 4575744000L) / 900); out.writeByte((store >>> 16) & 255); out.writeByte((store >>> 8) & 255); out.writeByte(store & 255); } else { out.writeByte(255); out.writeLong(epochSec); } } | /**
* Writes the state to the stream.
*
* @param epochSec the epoch seconds, not null
* @param out the output stream, not null
* @throws IOException if an error occurs
*/ | Writes the state to the stream | writeEpochSec | {
"repo_name": "shun634501730/java_source_cn",
"path": "src_en/java/time/zone/Ser.java",
"license": "apache-2.0",
"size": 9651
} | [
"java.io.DataOutput",
"java.io.IOException"
] | import java.io.DataOutput; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,562,972 |
private void validateAttributes(Request request, Response response) {
if (this.validations != null) {
for (final ValidateInfo validate : getValidations()) {
if (validate.required
&& !request.getAttributes().containsKey(
validate.attribute)) {
response
.setStatus(
Status.CLIENT_ERROR_BAD_REQUEST,
"Unable to find the \""
+ validate.attribute
+ "\" attribute in the request. Please check your request.");
} else if (validate.format != null) {
final Object value = request.getAttributes().get(
validate.attribute);
if (value == null) {
response
.setStatus(
Status.CLIENT_ERROR_BAD_REQUEST,
"Unable to validate the \""
+ validate.attribute
+ "\" attribute with a null value. Please check your request.");
} else {
if (!Pattern.matches(validate.format, value.toString())) {
response
.setStatus(
Status.CLIENT_ERROR_BAD_REQUEST,
"Unable to validate the value of the \""
+ validate.attribute
+ "\" attribute. The expected format is: "
+ validate.format
+ " (Java Regex). Please check your request.");
}
}
}
}
}
} | void function(Request request, Response response) { if (this.validations != null) { for (final ValidateInfo validate : getValidations()) { if (validate.required && !request.getAttributes().containsKey( validate.attribute)) { response .setStatus( Status.CLIENT_ERROR_BAD_REQUEST, STRSTR\STR); } else if (validate.format != null) { final Object value = request.getAttributes().get( validate.attribute); if (value == null) { response .setStatus( Status.CLIENT_ERROR_BAD_REQUEST, STRSTR\STR); } else { if (!Pattern.matches(validate.format, value.toString())) { response .setStatus( Status.CLIENT_ERROR_BAD_REQUEST, STRSTR\STR + validate.format + STR); } } } } } } | /**
* Validates the attributes from the request.
*
* @param request
* The request to process.
* @param response
* The response to process.
*/ | Validates the attributes from the request | validateAttributes | {
"repo_name": "pecko/debrief",
"path": "org.mwc.asset.comms/docs/restlet_src/org.restlet/org/restlet/routing/Route.java",
"license": "epl-1.0",
"size": 18560
} | [
"java.util.regex.Pattern",
"org.restlet.Request",
"org.restlet.Response",
"org.restlet.data.Status"
] | import java.util.regex.Pattern; import org.restlet.Request; import org.restlet.Response; import org.restlet.data.Status; | import java.util.regex.*; import org.restlet.*; import org.restlet.data.*; | [
"java.util",
"org.restlet",
"org.restlet.data"
] | java.util; org.restlet; org.restlet.data; | 2,387,649 |
public static final String readString(byte[] bytes, int offset, int length, String charset) throws IOException {
return readString(bytes, 0, bytes.length, Charset.forName(charset));
} | static final String function(byte[] bytes, int offset, int length, String charset) throws IOException { return readString(bytes, 0, bytes.length, Charset.forName(charset)); } | /** Convert a byte array to a string; consistently uses \n line
* endings in java. The conversion is limited to the specified
* offset/length pair, and uses the requested charset to decode the
* bytes.
*
* @param bytes the array of bytes to convert
* @param offset the start of the conversion
* @param length how many bytes to convert
* @param charset the charset to use to convert the raw bytes
* @return the converted string, with platform line endings converted
* to \n
*/ | Convert a byte array to a string; consistently uses \n line endings in java. The conversion is limited to the specified offset/length pair, and uses the requested charset to decode the bytes | readString | {
"repo_name": "yuri0x7c1/ofbiz-explorer",
"path": "src/test/resources/apache-ofbiz-16.11.03/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilIO.java",
"license": "apache-2.0",
"size": 12703
} | [
"java.io.IOException",
"java.nio.charset.Charset"
] | import java.io.IOException; import java.nio.charset.Charset; | import java.io.*; import java.nio.charset.*; | [
"java.io",
"java.nio"
] | java.io; java.nio; | 1,923,520 |
private static Collection<String> loadTLDListeners(Bundle bundle) {
Collection<Bundle> bundles = DelegatingClassLoader.allOf(bundle);
Collection<URL> urlsToParse = bundles.stream().
map((b) -> b.findEntries("META-INF", "*.tld", true)).
filter((e) -> e != null).
map((e) -> Collections.list(e)).flatMap((c) -> c.stream()).collect(Collectors.toList());
ArrayList<String> toReturn = new ArrayList<>();
urlsToParse.forEach((u) -> parseTLD(u, toReturn));
return toReturn;
} | static Collection<String> function(Bundle bundle) { Collection<Bundle> bundles = DelegatingClassLoader.allOf(bundle); Collection<URL> urlsToParse = bundles.stream(). map((b) -> b.findEntries(STR, "*.tld", true)). filter((e) -> e != null). map((e) -> Collections.list(e)).flatMap((c) -> c.stream()).collect(Collectors.toList()); ArrayList<String> toReturn = new ArrayList<>(); urlsToParse.forEach((u) -> parseTLD(u, toReturn)); return toReturn; } | /**
* Load the listener classes from the tag library descriptors.
*
* @param bundle The bundle to parse (+ its dependencies)
* @return A collection with listener class names
*/ | Load the listener classes from the tag library descriptors | loadTLDListeners | {
"repo_name": "arievanwi/osgi.ee",
"path": "osgi.ee.extender.web/src/osgi/extender/web/service/ServletContextParser.java",
"license": "apache-2.0",
"size": 16021
} | [
"java.util.ArrayList",
"java.util.Collection",
"java.util.Collections",
"java.util.stream.Collectors",
"org.osgi.framework.Bundle"
] | import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.stream.Collectors; import org.osgi.framework.Bundle; | import java.util.*; import java.util.stream.*; import org.osgi.framework.*; | [
"java.util",
"org.osgi.framework"
] | java.util; org.osgi.framework; | 2,755,095 |
@Override
public int doEndTag() throws JspException {
try {
// Resolve the unescaped message.
String msg = resolveMessage();
// HTML and/or JavaScript escape, if demanded.
msg = htmlEscape(msg);
msg = this.javaScriptEscape ? JavaScriptUtils.javaScriptEscape(msg) : msg;
// Expose as variable, if demanded, else write to the page.
if (this.var != null) {
pageContext.setAttribute(this.var, msg, TagUtils.getScope(this.scope));
}
else {
writeMessage(msg);
}
return EVAL_PAGE;
}
catch (IOException ex) {
throw new JspTagException(ex.getMessage(), ex);
}
catch (NoSuchMessageException ex) {
throw new JspTagException(getNoSuchMessageExceptionDescription(ex));
}
} | int function() throws JspException { try { String msg = resolveMessage(); msg = htmlEscape(msg); msg = this.javaScriptEscape ? JavaScriptUtils.javaScriptEscape(msg) : msg; if (this.var != null) { pageContext.setAttribute(this.var, msg, TagUtils.getScope(this.scope)); } else { writeMessage(msg); } return EVAL_PAGE; } catch (IOException ex) { throw new JspTagException(ex.getMessage(), ex); } catch (NoSuchMessageException ex) { throw new JspTagException(getNoSuchMessageExceptionDescription(ex)); } } | /**
* Resolves the message, escapes it if demanded,
* and writes it to the page (or exposes it as variable).
* @see #resolveMessage()
* @see org.springframework.web.util.HtmlUtils#htmlEscape(String)
* @see org.springframework.web.util.JavaScriptUtils#javaScriptEscape(String)
* @see #writeMessage(String)
*/ | Resolves the message, escapes it if demanded, and writes it to the page (or exposes it as variable) | doEndTag | {
"repo_name": "boggad/jdk9-sample",
"path": "sample-catalog/spring-jdk9/src/spring.webmvc/org/springframework/web/servlet/tags/MessageTag.java",
"license": "mit",
"size": 9514
} | [
"java.io.IOException",
"javax.servlet.jsp.JspException",
"javax.servlet.jsp.JspTagException",
"org.springframework.context.NoSuchMessageException",
"org.springframework.web.util.JavaScriptUtils",
"org.springframework.web.util.TagUtils"
] | import java.io.IOException; import javax.servlet.jsp.JspException; import javax.servlet.jsp.JspTagException; import org.springframework.context.NoSuchMessageException; import org.springframework.web.util.JavaScriptUtils; import org.springframework.web.util.TagUtils; | import java.io.*; import javax.servlet.jsp.*; import org.springframework.context.*; import org.springframework.web.util.*; | [
"java.io",
"javax.servlet",
"org.springframework.context",
"org.springframework.web"
] | java.io; javax.servlet; org.springframework.context; org.springframework.web; | 336,132 |
public ConnectorOffer connectorOffer() {
return this.connectorOffer;
} | ConnectorOffer function() { return this.connectorOffer; } | /**
* Get the cassandra connector offer type for the Cosmos DB database C* account. Possible values include: 'Small'.
*
* @return the connectorOffer value
*/ | Get the cassandra connector offer type for the Cosmos DB database C* account. Possible values include: 'Small' | connectorOffer | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/implementation/DatabaseAccountGetResultsInner.java",
"license": "mit",
"size": 20796
} | [
"com.microsoft.azure.management.cosmosdb.v2020_04_01.ConnectorOffer"
] | import com.microsoft.azure.management.cosmosdb.v2020_04_01.ConnectorOffer; | import com.microsoft.azure.management.cosmosdb.v2020_04_01.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 561,202 |
@SubjectNotPresent
@BodyParser.Of(BodyParser.Json.class)
public Result login() {
JsonLogin req = Json.fromJson(request().body().asJson(), JsonLogin.class);
if (req.email == null || req.email.length() == 0) {
return badRequest(Json.toJson(new JsonError("Missing e-mail address in request")));
} else if (req.password == null || req.password.length() == 0) {
return badRequest(Json.toJson(new JsonError("Missing password in request")));
}
logger.debug(String.format("Incoming login request for user: %s", req.email));
// attempt to log the user in
Session session;
try {
session = authRepo.login(req.email, req.password, session());
} catch (NoSuchAlgorithmException e) {
logger.error("Cannot get hash algorithm", e);
return internalServerError(Json.toJson(new JsonError("Internal server error")));
} catch (DoesNotExistException e) {
logger.error(String.format("E-mail address %s does not exist in database", req.email), e);
return notFound(Json.toJson(new JsonError(String.format("Cannot find user with e-mail address: %s", req.email))));
} catch (InvalidPasswordException e) {
return badRequest(Json.toJson(new JsonError("Invalid password")));
}
logger.debug(String.format("Successfully logged user %s in; session key: %s", req.email, session.getKey()));
return ok(Json.toJson(new JsonLoginSuccess(session)));
}
| @BodyParser.Of(BodyParser.Json.class) Result function() { JsonLogin req = Json.fromJson(request().body().asJson(), JsonLogin.class); if (req.email == null req.email.length() == 0) { return badRequest(Json.toJson(new JsonError(STR))); } else if (req.password == null req.password.length() == 0) { return badRequest(Json.toJson(new JsonError(STR))); } logger.debug(String.format(STR, req.email)); Session session; try { session = authRepo.login(req.email, req.password, session()); } catch (NoSuchAlgorithmException e) { logger.error(STR, e); return internalServerError(Json.toJson(new JsonError(STR))); } catch (DoesNotExistException e) { logger.error(String.format(STR, req.email), e); return notFound(Json.toJson(new JsonError(String.format(STR, req.email)))); } catch (InvalidPasswordException e) { return badRequest(Json.toJson(new JsonError(STR))); } logger.debug(String.format(STR, req.email, session.getKey())); return ok(Json.toJson(new JsonLoginSuccess(session))); } | /**
* Attempts to perform an API-based login, where the session ID will be returned in the JSON payload.
*/ | Attempts to perform an API-based login, where the session ID will be returned in the JSON payload | login | {
"repo_name": "thanethomson/shrty",
"path": "app/controllers/APIController.java",
"license": "mit",
"size": 9836
} | [
"java.security.NoSuchAlgorithmException"
] | import java.security.NoSuchAlgorithmException; | import java.security.*; | [
"java.security"
] | java.security; | 1,346,306 |
void setEnvironment(ConfigurableEnvironment environment); | void setEnvironment(ConfigurableEnvironment environment); | /**
* Set the {@code Environment} for this application context.
* @param environment the new environment
* @since 3.1
*/ | Set the Environment for this application context | setEnvironment | {
"repo_name": "lamsfoundation/lams",
"path": "3rdParty_sources/spring/org/springframework/context/ConfigurableApplicationContext.java",
"license": "gpl-2.0",
"size": 8355
} | [
"org.springframework.core.env.ConfigurableEnvironment"
] | import org.springframework.core.env.ConfigurableEnvironment; | import org.springframework.core.env.*; | [
"org.springframework.core"
] | org.springframework.core; | 1,147,913 |
public IAST select(Predicate<? super IExpr> predicate, int maxMatches); | IAST function(Predicate<? super IExpr> predicate, int maxMatches); | /**
* Select all elements by applying the <code>predicate</code> to each argument in this <code>AST
* </code> and append up to <code>maxMatches</code> arguments which satisfy the predicate.
*
* @param predicate the predicate which filters each argument in this <code>AST</code>
* @param maxMatches the maximum number of matches
* @return the selected ast
*/ | Select all elements by applying the <code>predicate</code> to each argument in this <code>AST </code> and append up to <code>maxMatches</code> arguments which satisfy the predicate | select | {
"repo_name": "axkr/symja_android_library",
"path": "symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/interfaces/IAST.java",
"license": "gpl-3.0",
"size": 60090
} | [
"java.util.function.Predicate"
] | import java.util.function.Predicate; | import java.util.function.*; | [
"java.util"
] | java.util; | 1,548,969 |
@SideOnly(Side.CLIENT)
public boolean canRenderOnFire()
{
return this.isBurning();
} | @SideOnly(Side.CLIENT) boolean function() { return this.isBurning(); } | /**
* Return whether this entity should be rendered as on fire.
*/ | Return whether this entity should be rendered as on fire | canRenderOnFire | {
"repo_name": "dafuq360/essenceplusnew",
"path": "build/tmp/recompileMc/sources/net/minecraft/entity/Entity.java",
"license": "lgpl-2.1",
"size": 118537
} | [
"net.minecraftforge.fml.relauncher.Side",
"net.minecraftforge.fml.relauncher.SideOnly"
] | import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; | import net.minecraftforge.fml.relauncher.*; | [
"net.minecraftforge.fml"
] | net.minecraftforge.fml; | 1,146,035 |
public OSM_Port getRemoteOSM_Port(ArrayList<OSM_Port> allPortsArray)
{
if((allPortsArray == null) || (allPortsArray.size() < 1) || !hasRemote())
return null;
IB_Guid rg = new IB_Guid(sbnPort.linked_node_guid);
for(OSM_Port p: allPortsArray)
{
if((p.getPortGuid() != null) && (p.getPortGuid().equals(rg)))
return p;
}
for(OSM_Port p: allPortsArray)
{
if((p.getNodeGuid() != null) && (p.getNodeGuid().equals(rg)))
return p;
}
return null;
} | OSM_Port function(ArrayList<OSM_Port> allPortsArray) { if((allPortsArray == null) (allPortsArray.size() < 1) !hasRemote()) return null; IB_Guid rg = new IB_Guid(sbnPort.linked_node_guid); for(OSM_Port p: allPortsArray) { if((p.getPortGuid() != null) && (p.getPortGuid().equals(rg))) return p; } for(OSM_Port p: allPortsArray) { if((p.getNodeGuid() != null) && (p.getNodeGuid().equals(rg))) return p; } return null; } | /**
* Given a list of all the OSM_Ports that exist, this convenience
* method will discover and return the port at the other end of the link.
*
* @see describe related java objects
* @param describe the parameters
*
* @return describe the value returned
***********************************************************/ | Given a list of all the OSM_Ports that exist, this convenience method will discover and return the port at the other end of the link | getRemoteOSM_Port | {
"repo_name": "meier/opensm-client-server",
"path": "src/main/java/gov/llnl/lc/infiniband/opensm/plugin/data/OSM_Port.java",
"license": "gpl-2.0",
"size": 25082
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 434,573 |
public List<Map<String, String>> getFixedIndexedProperties(String key, List<String> subKeys) {
// determine max index
final int maxIndex = extractMaxIndex(key, "\\.(.*)");
// validate and create result
final List<Map<String, String>> list = new ArrayList<>();
for (int i = 0; i <= maxIndex; i++) {
final Map<String, String> map = new HashMap<>();
for (String subKey : subKeys) {
final String fullKey = key + '.' + i + '.' + subKey;
// check for existence of full key
if (!containsKey(fullKey)) {
throw exceptionSupplier(fullKey).get();
}
map.put(subKey, fullKey);
}
list.add(map);
}
return list;
} | List<Map<String, String>> function(String key, List<String> subKeys) { final int maxIndex = extractMaxIndex(key, STR); final List<Map<String, String>> list = new ArrayList<>(); for (int i = 0; i <= maxIndex; i++) { final Map<String, String> map = new HashMap<>(); for (String subKey : subKeys) { final String fullKey = key + '.' + i + '.' + subKey; if (!containsKey(fullKey)) { throw exceptionSupplier(fullKey).get(); } map.put(subKey, fullKey); } list.add(map); } return list; } | /**
* Returns the property keys of fixed indexed properties.
*
* <p>For example:
*
* <pre>
* schema.fields.0.type = INT, schema.fields.0.name = test
* schema.fields.1.type = LONG, schema.fields.1.name = test2
* </pre>
*
* <p>getFixedIndexedProperties("schema.fields", List("type", "name")) leads to:
*
* <pre>
* 0: Map("type" -> "schema.fields.0.type", "name" -> "schema.fields.0.name")
* 1: Map("type" -> "schema.fields.1.type", "name" -> "schema.fields.1.name")
* </pre>
*/ | Returns the property keys of fixed indexed properties. For example: <code> schema.fields.0.type = INT, schema.fields.0.name = test schema.fields.1.type = LONG, schema.fields.1.name = test2 </code> getFixedIndexedProperties("schema.fields", List("type", "name")) leads to: <code> 0: Map("type" -> "schema.fields.0.type", "name" -> "schema.fields.0.name") 1: Map("type" -> "schema.fields.1.type", "name" -> "schema.fields.1.name") </code> | getFixedIndexedProperties | {
"repo_name": "ueshin/apache-flink",
"path": "flink-table/flink-table-common/src/main/java/org/apache/flink/table/descriptors/DescriptorProperties.java",
"license": "apache-2.0",
"size": 38931
} | [
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"java.util.Map"
] | import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,847,839 |
public byte[] pack() throws Exception {
int len = 1 + 4 + 4 + 4 + 8 + 4 + 4;
byte[] eventCreationAsBytes = null;
getEventCreationPointAsString();
if (this.eventCreationPointDesc != null) {
eventCreationAsBytes = StringUtils.getBytes(
this.eventCreationPointDesc, "ISO8859_1");
len += (4 + eventCreationAsBytes.length);
} else {
len += 4;
}
byte[] messageAsBytes = null;
if (this.message != null) {
messageAsBytes = StringUtils.getBytes(this.message, "ISO8859_1");
len += (4 + messageAsBytes.length);
} else {
len += 4;
}
byte[] durationUnitsAsBytes = null;
if (this.durationUnits != null) {
durationUnitsAsBytes = StringUtils.getBytes(this.durationUnits, "ISO8859_1");
len += (4 + durationUnitsAsBytes.length);
} else {
len += 4;
durationUnitsAsBytes = StringUtils.getBytes("", "ISO8859_1");
}
byte[] buf = new byte[len];
int pos = 0;
buf[pos++] = this.eventType;
pos = writeLong(this.connectionId, buf, pos);
pos = writeInt(this.statementId, buf, pos);
pos = writeInt(this.resultSetId, buf, pos);
pos = writeLong(this.eventCreationTime, buf, pos);
pos = writeLong(this.eventDuration, buf, pos);
pos = writeBytes(durationUnitsAsBytes, buf, pos);
pos = writeInt(this.eventCreationPointIndex, buf, pos);
if (eventCreationAsBytes != null) {
pos = writeBytes(eventCreationAsBytes, buf, pos);
} else {
pos = writeInt(0, buf, pos);
}
if (messageAsBytes != null) {
pos = writeBytes(messageAsBytes, buf, pos);
} else {
pos = writeInt(0, buf, pos);
}
return buf;
} | byte[] function() throws Exception { int len = 1 + 4 + 4 + 4 + 8 + 4 + 4; byte[] eventCreationAsBytes = null; getEventCreationPointAsString(); if (this.eventCreationPointDesc != null) { eventCreationAsBytes = StringUtils.getBytes( this.eventCreationPointDesc, STR); len += (4 + eventCreationAsBytes.length); } else { len += 4; } byte[] messageAsBytes = null; if (this.message != null) { messageAsBytes = StringUtils.getBytes(this.message, STR); len += (4 + messageAsBytes.length); } else { len += 4; } byte[] durationUnitsAsBytes = null; if (this.durationUnits != null) { durationUnitsAsBytes = StringUtils.getBytes(this.durationUnits, STR); len += (4 + durationUnitsAsBytes.length); } else { len += 4; durationUnitsAsBytes = StringUtils.getBytes("", STR); } byte[] buf = new byte[len]; int pos = 0; buf[pos++] = this.eventType; pos = writeLong(this.connectionId, buf, pos); pos = writeInt(this.statementId, buf, pos); pos = writeInt(this.resultSetId, buf, pos); pos = writeLong(this.eventCreationTime, buf, pos); pos = writeLong(this.eventDuration, buf, pos); pos = writeBytes(durationUnitsAsBytes, buf, pos); pos = writeInt(this.eventCreationPointIndex, buf, pos); if (eventCreationAsBytes != null) { pos = writeBytes(eventCreationAsBytes, buf, pos); } else { pos = writeInt(0, buf, pos); } if (messageAsBytes != null) { pos = writeBytes(messageAsBytes, buf, pos); } else { pos = writeInt(0, buf, pos); } return buf; } | /**
* Creates a binary representation of this event.
*
* @return a binary representation of this event
* @throws Exception
* if an error occurs while packing this event.
*/ | Creates a binary representation of this event | pack | {
"repo_name": "seadsystem/SchemaSpy",
"path": "src/com/mysql/jdbc/profiler/ProfilerEvent.java",
"license": "gpl-2.0",
"size": 12448
} | [
"com.mysql.jdbc.StringUtils"
] | import com.mysql.jdbc.StringUtils; | import com.mysql.jdbc.*; | [
"com.mysql.jdbc"
] | com.mysql.jdbc; | 1,970,171 |
public void transform(DataPipe cr) {
wasCalled = true;
} | void function(DataPipe cr) { wasCalled = true; } | /**
* Sets wasCalled to true
*
* @param cr a reference to DataPipe from which to read the current map
*/ | Sets wasCalled to true | transform | {
"repo_name": "mibrahim/DataGenerator",
"path": "dg-core/src/test/java/org/finra/datagenerator/engine/scxml/tags/InLineTransformerExtensionTest.java",
"license": "apache-2.0",
"size": 7601
} | [
"org.finra.datagenerator.consumer.DataPipe"
] | import org.finra.datagenerator.consumer.DataPipe; | import org.finra.datagenerator.consumer.*; | [
"org.finra.datagenerator"
] | org.finra.datagenerator; | 664,497 |
public boolean reschedule(AbstractInstant newTime); | boolean function(AbstractInstant newTime); | /**
* Reschedules a timer to a new starting time.
* This can also be called after a timer has terminated, which will result in another
* execution of the same code.
*
* @param newTime the new time to execute the code
* @return true, if the rescheduling was done successful
*/ | Reschedules a timer to a new starting time. This can also be called after a timer has terminated, which will result in another execution of the same code | reschedule | {
"repo_name": "CrackerStealth/smarthome",
"path": "bundles/model/org.eclipse.smarthome.model.script/src/org/eclipse/smarthome/model/script/actions/Timer.java",
"license": "epl-1.0",
"size": 1625
} | [
"org.joda.time.base.AbstractInstant"
] | import org.joda.time.base.AbstractInstant; | import org.joda.time.base.*; | [
"org.joda.time"
] | org.joda.time; | 41,022 |
protected DataObjectCollection getCollectionMetadataFromCollectionAttribute(PluralAttribute cd) {
try {
DataObjectCollectionImpl collection = new DataObjectCollectionImpl();
// OJB stores the related class object name. We need to go into the repository and grab the table name.
Class<?> collectionElementClass = cd.getElementType().getJavaType();
EntityType<?> elementEntityType = entityManager.getMetamodel().entity(collectionElementClass);
collection.setName(cd.getName());
collection.setRelatedType(collectionElementClass);
populateImplementationSpecificCollectionLevelMetadata(collection, cd);
// Set to read only if store (save) operations should not be pushed through
PersistentAttributeType persistentAttributeType = cd.getPersistentAttributeType();
// default case: Without any mapping attributes, collections are linked by their primary key
if (persistentAttributeType == PersistentAttributeType.ONE_TO_MANY) {
// TODO: We probably still need to handle the "mappedBy" property on the OneToMany definition
// We only perform this logic here if we did not populate it in the implementation-specific call above
if (collection.getAttributeRelationships().isEmpty()) {
// need to obtain the keys for the relationship
List<String> pkFields = getPrimaryKeyAttributeNames((EntityType<?>) cd.getDeclaringType());
List<String> fkFields = getPrimaryKeyAttributeNames(elementEntityType);
List<DataObjectAttributeRelationship> attributeRelationships = new ArrayList<DataObjectAttributeRelationship>();
for (int i = 0; i < pkFields.size(); i++) {
attributeRelationships.add(new DataObjectAttributeRelationshipImpl(pkFields.get(i), fkFields
.get(i)));
}
collection.setAttributeRelationships(attributeRelationships);
}
} else if ( persistentAttributeType == PersistentAttributeType.MANY_TO_MANY ) {
// OK, this is an assumption
collection.setIndirectCollection( true );
// And, since the connection is set at the *database* level through the @JoinTable anotation
// we do not have any field names with which to make the connection
collection.setAttributeRelationships(null);
}
return collection;
} catch (RuntimeException ex) {
LOG.error("Unable to process Collection metadata: " + cd);
throw ex;
}
} | DataObjectCollection function(PluralAttribute cd) { try { DataObjectCollectionImpl collection = new DataObjectCollectionImpl(); Class<?> collectionElementClass = cd.getElementType().getJavaType(); EntityType<?> elementEntityType = entityManager.getMetamodel().entity(collectionElementClass); collection.setName(cd.getName()); collection.setRelatedType(collectionElementClass); populateImplementationSpecificCollectionLevelMetadata(collection, cd); PersistentAttributeType persistentAttributeType = cd.getPersistentAttributeType(); if (persistentAttributeType == PersistentAttributeType.ONE_TO_MANY) { if (collection.getAttributeRelationships().isEmpty()) { List<String> pkFields = getPrimaryKeyAttributeNames((EntityType<?>) cd.getDeclaringType()); List<String> fkFields = getPrimaryKeyAttributeNames(elementEntityType); List<DataObjectAttributeRelationship> attributeRelationships = new ArrayList<DataObjectAttributeRelationship>(); for (int i = 0; i < pkFields.size(); i++) { attributeRelationships.add(new DataObjectAttributeRelationshipImpl(pkFields.get(i), fkFields .get(i))); } collection.setAttributeRelationships(attributeRelationships); } } else if ( persistentAttributeType == PersistentAttributeType.MANY_TO_MANY ) { collection.setIndirectCollection( true ); collection.setAttributeRelationships(null); } return collection; } catch (RuntimeException ex) { LOG.error(STR + cd); throw ex; } } | /**
* Extracts the collection metadata from a single JPA {@link PluralAttribute} object.
*
* @param cd The plural attribute to process.
* @return The collection metadata from a single JPA {@link PluralAttribute} object.
*/ | Extracts the collection metadata from a single JPA <code>PluralAttribute</code> object | getCollectionMetadataFromCollectionAttribute | {
"repo_name": "bhutchinson/rice",
"path": "rice-framework/krad-data/src/main/java/org/kuali/rice/krad/data/jpa/JpaMetadataProviderImpl.java",
"license": "apache-2.0",
"size": 19905
} | [
"java.util.ArrayList",
"java.util.List",
"javax.persistence.metamodel.Attribute",
"javax.persistence.metamodel.EntityType",
"javax.persistence.metamodel.PluralAttribute",
"org.kuali.rice.krad.data.metadata.DataObjectAttributeRelationship",
"org.kuali.rice.krad.data.metadata.DataObjectCollection",
"org... | import java.util.ArrayList; import java.util.List; import javax.persistence.metamodel.Attribute; import javax.persistence.metamodel.EntityType; import javax.persistence.metamodel.PluralAttribute; import org.kuali.rice.krad.data.metadata.DataObjectAttributeRelationship; import org.kuali.rice.krad.data.metadata.DataObjectCollection; import org.kuali.rice.krad.data.metadata.impl.DataObjectAttributeRelationshipImpl; import org.kuali.rice.krad.data.metadata.impl.DataObjectCollectionImpl; | import java.util.*; import javax.persistence.metamodel.*; import org.kuali.rice.krad.data.metadata.*; import org.kuali.rice.krad.data.metadata.impl.*; | [
"java.util",
"javax.persistence",
"org.kuali.rice"
] | java.util; javax.persistence; org.kuali.rice; | 1,485,170 |
@PropertySetter(value = "title", description = "The title text.")
public void setTitle(String title) {
propertyChange("title", this.title, this.title = nullify(title), true);
} | @PropertySetter(value = "title", description = STR) void function(String title) { propertyChange("title", this.title, this.title = nullify(title), true); } | /**
* Sets the title text.
*
* @param title The title text.
*/ | Sets the title text | setTitle | {
"repo_name": "fujion/fujion-framework",
"path": "fujion-core/src/main/java/org/fujion/component/Grid.java",
"license": "apache-2.0",
"size": 3835
} | [
"org.fujion.annotation.Component"
] | import org.fujion.annotation.Component; | import org.fujion.annotation.*; | [
"org.fujion.annotation"
] | org.fujion.annotation; | 2,038,597 |
public final native void open(JavaScriptObject properties)
;
| final native void function(JavaScriptObject properties) ; | /**
* Open the email dialog. the email dialog itself is a modal window
*
* @param properties
* object of animation properties. pass `animated` property (as
* boolean) to indicate if the dialog should be animated on open.
*/ | Open the email dialog. the email dialog itself is a modal window | open | {
"repo_name": "urish/gwt-titanium",
"path": "src/main/java/org/urish/gwtit/titanium/ui/EmailDialog.java",
"license": "apache-2.0",
"size": 5517
} | [
"com.google.gwt.core.client.JavaScriptObject"
] | import com.google.gwt.core.client.JavaScriptObject; | import com.google.gwt.core.client.*; | [
"com.google.gwt"
] | com.google.gwt; | 1,393,401 |
public static void collectParameter(String s, Set<String> parameters) {
int l = s.length();
int i = 0;
int pStart = -1;
char lastC = ' ';
while (i < l) {
char c = s.charAt(i);
if (pStart < 0) {
if (lastC == '$' && c == '{') {
pStart = i + 1;
}
} else {
if (c == '}') {
if (pStart < i) {
parameters.add(s.substring(pStart, i));
}
pStart = -1;
} else {
if (VALID_CHARS.indexOf(c) < 0) {
pStart = -1;
}
}
}
++i;
lastC = c;
}
} | static void function(String s, Set<String> parameters) { int l = s.length(); int i = 0; int pStart = -1; char lastC = ' '; while (i < l) { char c = s.charAt(i); if (pStart < 0) { if (lastC == '$' && c == '{') { pStart = i + 1; } } else { if (c == '}') { if (pStart < i) { parameters.add(s.substring(pStart, i)); } pStart = -1; } else { if (VALID_CHARS.indexOf(c) < 0) { pStart = -1; } } } ++i; lastC = c; } } | /**
* Collects all parameters in a given string.
*
* @param s the string
* @param parameters to put parameters into
*/ | Collects all parameters in a given string | collectParameter | {
"repo_name": "Recombine/jailer",
"path": "src/main/net/sf/jailer/datamodel/ParameterHandler.java",
"license": "apache-2.0",
"size": 2665
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 893,468 |
void cleanUp() {
if (threadStarted) {
return;
}
Reference<?> reference;
while ((reference = queue.poll()) != null) {
reference.clear();
try {
((FinalizableReference) reference).finalizeReferent();
} catch (Throwable t) {
logger.log(Level.SEVERE, "Error cleaning up after reference.", t);
}
}
} | void cleanUp() { if (threadStarted) { return; } Reference<?> reference; while ((reference = queue.poll()) != null) { reference.clear(); try { ((FinalizableReference) reference).finalizeReferent(); } catch (Throwable t) { logger.log(Level.SEVERE, STR, t); } } } | /**
* Repeatedly dequeues references from the queue and invokes {@link
* FinalizableReference#finalizeReferent()} on them until the queue is empty. This method is a
* no-op if the background thread was created successfully.
*/ | Repeatedly dequeues references from the queue and invokes <code>FinalizableReference#finalizeReferent()</code> on them until the queue is empty. This method is a no-op if the background thread was created successfully | cleanUp | {
"repo_name": "wspeirs/sop4j-base",
"path": "src/main/java/com/sop4j/base/google/common/base/FinalizableReferenceQueue.java",
"license": "apache-2.0",
"size": 11293
} | [
"java.lang.ref.Reference",
"java.util.logging.Level"
] | import java.lang.ref.Reference; import java.util.logging.Level; | import java.lang.ref.*; import java.util.logging.*; | [
"java.lang",
"java.util"
] | java.lang; java.util; | 1,212,405 |
protected static float toGradians(Value value) {
switch (value.getPrimitiveType()) {
case CSSPrimitiveValue.CSS_DEG:
return (float)(value.getFloatValue() * Math.PI / 180); // todo ????
case CSSPrimitiveValue.CSS_RAD:
return (float)(value.getFloatValue() * Math.PI / 100);
case CSSPrimitiveValue.CSS_GRAD:
return value.getFloatValue();
default:
throw new DOMException(DOMException.INVALID_ACCESS_ERR, "");
}
} | static float function(Value value) { switch (value.getPrimitiveType()) { case CSSPrimitiveValue.CSS_DEG: return (float)(value.getFloatValue() * Math.PI / 180); case CSSPrimitiveValue.CSS_RAD: return (float)(value.getFloatValue() * Math.PI / 100); case CSSPrimitiveValue.CSS_GRAD: return value.getFloatValue(); default: throw new DOMException(DOMException.INVALID_ACCESS_ERR, ""); } } | /**
* Converts the current value into gradians.
*/ | Converts the current value into gradians | toGradians | {
"repo_name": "apache/batik",
"path": "batik-css/src/main/java/org/apache/batik/css/dom/CSSOMValue.java",
"license": "apache-2.0",
"size": 46315
} | [
"org.apache.batik.css.engine.value.Value",
"org.w3c.dom.DOMException",
"org.w3c.dom.css.CSSPrimitiveValue"
] | import org.apache.batik.css.engine.value.Value; import org.w3c.dom.DOMException; import org.w3c.dom.css.CSSPrimitiveValue; | import org.apache.batik.css.engine.value.*; import org.w3c.dom.*; import org.w3c.dom.css.*; | [
"org.apache.batik",
"org.w3c.dom"
] | org.apache.batik; org.w3c.dom; | 1,823,837 |
@Override
public void process(final DM dm, ReplyProcessor21 processor) {
final long startTime = getTimestamp();
if (logger.isTraceEnabled(LogMarker.DM)) {
logger
.trace(
LogMarker.DM,
"DistTXRollbackReplyMessage process invoking reply processor with processorId:{}",
this.processorId);
}
if (processor == null) {
if (logger.isTraceEnabled(LogMarker.DM)) {
logger.trace(LogMarker.DM,
"DistTXRollbackReplyMessage processor not found");
}
return;
}
processor.process(this);
} | void function(final DM dm, ReplyProcessor21 processor) { final long startTime = getTimestamp(); if (logger.isTraceEnabled(LogMarker.DM)) { logger .trace( LogMarker.DM, STR, this.processorId); } if (processor == null) { if (logger.isTraceEnabled(LogMarker.DM)) { logger.trace(LogMarker.DM, STR); } return; } processor.process(this); } | /**
* Processes this message. This method is invoked by the receiver of the
* message.
*
* @param dm
* the distribution manager that is processing the message.
*/ | Processes this message. This method is invoked by the receiver of the message | process | {
"repo_name": "kidaa/incubator-geode",
"path": "gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/DistTXRollbackMessage.java",
"license": "apache-2.0",
"size": 16571
} | [
"com.gemstone.gemfire.distributed.internal.ReplyProcessor21",
"com.gemstone.gemfire.internal.logging.log4j.LogMarker"
] | import com.gemstone.gemfire.distributed.internal.ReplyProcessor21; import com.gemstone.gemfire.internal.logging.log4j.LogMarker; | import com.gemstone.gemfire.distributed.internal.*; import com.gemstone.gemfire.internal.logging.log4j.*; | [
"com.gemstone.gemfire"
] | com.gemstone.gemfire; | 899,730 |
private ArrayList<Double> getClassProbs(ArrayList<ArrayList<String>> record){
double N=record.size();
HashMap<String, Integer > counts = new HashMap<String, Integer>();
for(ArrayList<String> s : record){
String clas = GetClass(s);
if(counts.containsKey(clas))
counts.put(clas, counts.get(clas)+1);
else
counts.put(clas, 1);
}
ArrayList<Double> probs = new ArrayList<Double>();
for(Entry<String, Integer> entry : counts.entrySet()){
double prob = entry.getValue()/N;
probs.add(prob);
}return probs;
} | ArrayList<Double> function(ArrayList<ArrayList<String>> record){ double N=record.size(); HashMap<String, Integer > counts = new HashMap<String, Integer>(); for(ArrayList<String> s : record){ String clas = GetClass(s); if(counts.containsKey(clas)) counts.put(clas, counts.get(clas)+1); else counts.put(clas, 1); } ArrayList<Double> probs = new ArrayList<Double>(); for(Entry<String, Integer> entry : counts.entrySet()){ double prob = entry.getValue()/N; probs.add(prob); }return probs; } | /**
* Given a data matrix, return a probabilty mass function representing
* the frequencies of a class in the matrix (the y values)
*
* @param records the data matrix to be examined
* @return the probability mass function
*/ | Given a data matrix, return a probabilty mass function representing the frequencies of a class in the matrix (the y values) | getClassProbs | {
"repo_name": "ironmanMA/Random-Forest",
"path": "src/com/rf/categ/DTreeCateg2.java",
"license": "bsd-3-clause",
"size": 26270
} | [
"java.util.ArrayList",
"java.util.HashMap",
"java.util.Map"
] | import java.util.ArrayList; import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,456,050 |
protected boolean isStartedUpCorrectly(Intent intent) {
return true;
} | boolean function(Intent intent) { return true; } | /**
* Whether or not the Activity was started up via a valid Intent.
*/ | Whether or not the Activity was started up via a valid Intent | isStartedUpCorrectly | {
"repo_name": "js0701/chromium-crosswalk",
"path": "chrome/android/java/src/org/chromium/chrome/browser/init/AsyncInitializationActivity.java",
"license": "bsd-3-clause",
"size": 15595
} | [
"android.content.Intent"
] | import android.content.Intent; | import android.content.*; | [
"android.content"
] | android.content; | 2,558,771 |
protected void createNewTransitions(FSMPDA fsm)
throws ResourceInstantiationException{
LinkedList<StatePDA> oldStatesQueue = new LinkedList<StatePDA>();
oldStatesQueue.add(fsm.getInitialState());
IntArrayList visitedOldStates = new IntArrayList();
while(oldStatesQueue.size() > 0){
StatePDA anOldState = oldStatesQueue.removeFirst();
if(visitedOldStates.contains(anOldState.getIndex())){
//state already processed -> nothing to do
}else{
if(!oldToNewStates.containsKey(anOldState.getIndex())){
throw new ResourceInstantiationException(
"State mapping error: " +
"old state not associated with a new state!");
}
SPTBase.State newState = newStates.get(oldToNewStates.get(
anOldState.getIndex()));
//now process all transitions
List<SPTBase.Transition> newTransitions =
new LinkedList<SPTBase.Transition>();
for(gate.fsm.Transition t : anOldState.getTransitions()){
TransitionPDA anOldTransition = (TransitionPDA) t;
if(!visitedOldStates.contains(anOldTransition.getTarget().getIndex())){
oldStatesQueue.add((StatePDA) anOldTransition.getTarget());
}
if(!oldToNewStates.containsKey(anOldTransition.getTarget().getIndex())){
throw new ResourceInstantiationException(
"State mapping error: " +
"old target state not associated with a new state!");
}
int newStateTarget = oldToNewStates.get(anOldTransition.getTarget().getIndex());
SPTBase.Transition newTransition = new SPTBase.Transition();
newTransitions.add(newTransition);
newTransition.nextState = newStateTarget;
newTransition.type = anOldTransition.getType();
if(newTransition.type != TransitionPDA.TYPE_CONSTRAINT){
continue;
}
Constraint[] oldConstraints = anOldTransition.getConstraints().
getConstraints();
List<int[]> newConstraints = new ArrayList<int[]>();
for(int i = 0; i< oldConstraints.length; i++){
String annType = oldConstraints[i].getAnnotType();
int annTypeInt = annotationTypes.indexOf(annType);
if(annTypeInt < 0){
annotationTypes.add(annType);
annTypeInt = annotationTypes.size() -1;
}
int[] newConstraint = new int[oldConstraints[i].
getAttributeSeq().size() + 2];
newConstraints.add(newConstraint);
newConstraint[0] = annTypeInt;
newConstraint[1] = oldConstraints[i].isNegated() ? -1 : 0;
int predId = 2;
for(ConstraintPredicate oldPredicate :
oldConstraints[i].getAttributeSeq()){
newConstraint[predId++] = convertPredicate(annType, oldPredicate);
}
}
//now save the new constraints
newTransition.constraints = new int[newConstraints.size()][];
newTransition.constraints = newConstraints.toArray(
newTransition.constraints);
}
//convert the transitions list to an array
newState.transitions = new SPTBase.Transition[newTransitions.size()];
newState.transitions = newTransitions.toArray(newState.transitions);
//finally, mark the old state as visited.
visitedOldStates.add(anOldState.getIndex());
}
}
} | void function(FSMPDA fsm) throws ResourceInstantiationException{ LinkedList<StatePDA> oldStatesQueue = new LinkedList<StatePDA>(); oldStatesQueue.add(fsm.getInitialState()); IntArrayList visitedOldStates = new IntArrayList(); while(oldStatesQueue.size() > 0){ StatePDA anOldState = oldStatesQueue.removeFirst(); if(visitedOldStates.contains(anOldState.getIndex())){ }else{ if(!oldToNewStates.containsKey(anOldState.getIndex())){ throw new ResourceInstantiationException( STR + STR); } SPTBase.State newState = newStates.get(oldToNewStates.get( anOldState.getIndex())); List<SPTBase.Transition> newTransitions = new LinkedList<SPTBase.Transition>(); for(gate.fsm.Transition t : anOldState.getTransitions()){ TransitionPDA anOldTransition = (TransitionPDA) t; if(!visitedOldStates.contains(anOldTransition.getTarget().getIndex())){ oldStatesQueue.add((StatePDA) anOldTransition.getTarget()); } if(!oldToNewStates.containsKey(anOldTransition.getTarget().getIndex())){ throw new ResourceInstantiationException( STR + STR); } int newStateTarget = oldToNewStates.get(anOldTransition.getTarget().getIndex()); SPTBase.Transition newTransition = new SPTBase.Transition(); newTransitions.add(newTransition); newTransition.nextState = newStateTarget; newTransition.type = anOldTransition.getType(); if(newTransition.type != TransitionPDA.TYPE_CONSTRAINT){ continue; } Constraint[] oldConstraints = anOldTransition.getConstraints(). getConstraints(); List<int[]> newConstraints = new ArrayList<int[]>(); for(int i = 0; i< oldConstraints.length; i++){ String annType = oldConstraints[i].getAnnotType(); int annTypeInt = annotationTypes.indexOf(annType); if(annTypeInt < 0){ annotationTypes.add(annType); annTypeInt = annotationTypes.size() -1; } int[] newConstraint = new int[oldConstraints[i]. getAttributeSeq().size() + 2]; newConstraints.add(newConstraint); newConstraint[0] = annTypeInt; newConstraint[1] = oldConstraints[i].isNegated() ? -1 : 0; int predId = 2; for(ConstraintPredicate oldPredicate : oldConstraints[i].getAttributeSeq()){ newConstraint[predId++] = convertPredicate(annType, oldPredicate); } } newTransition.constraints = new int[newConstraints.size()][]; newTransition.constraints = newConstraints.toArray( newTransition.constraints); } newState.transitions = new SPTBase.Transition[newTransitions.size()]; newState.transitions = newTransitions.toArray(newState.transitions); visitedOldStates.add(anOldState.getIndex()); } } } | /**
* Parses the provided FSMPDA and converts the old transitions to new ones. The
* {@link #newStates} list and the {@link #oldToNewStates} mapping should
* already be populated before this method is called.
* @param fsm
* @throws ResourceInstantiationException
*/ | Parses the provided FSMPDA and converts the old transitions to new ones. The <code>#newStates</code> list and the <code>#oldToNewStates</code> mapping should already be populated before this method is called | createNewTransitions | {
"repo_name": "TsangLab/Annotators",
"path": "substrateMINE/plugins/JAPE_Plus/src/gate/jape/plus/SPTBuilder.java",
"license": "mit",
"size": 32781
} | [
"com.ontotext.jape.pda.StatePDA",
"com.ontotext.jape.pda.TransitionPDA",
"java.util.ArrayList",
"java.util.LinkedList",
"java.util.List"
] | import com.ontotext.jape.pda.StatePDA; import com.ontotext.jape.pda.TransitionPDA; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; | import com.ontotext.jape.pda.*; import java.util.*; | [
"com.ontotext.jape",
"java.util"
] | com.ontotext.jape; java.util; | 251,180 |
public PluggableObjectCollection getPlugInViews()
{
return plugInViews;
} | PluggableObjectCollection function() { return plugInViews; } | /**
* Information to resolve plug-in view namespace and name.
* @return plug-in view information
*/ | Information to resolve plug-in view namespace and name | getPlugInViews | {
"repo_name": "jackyhong/esper",
"path": "esper/src/main/java/com/espertech/esper/core/service/EPServicesContext.java",
"license": "gpl-2.0",
"size": 26936
} | [
"com.espertech.esper.epl.spec.PluggableObjectCollection"
] | import com.espertech.esper.epl.spec.PluggableObjectCollection; | import com.espertech.esper.epl.spec.*; | [
"com.espertech.esper"
] | com.espertech.esper; | 1,427,310 |
@WaitUntil
public String downloadFromRowWhereIs(String place, String selectOnColumn, String selectOnValue) {
return downloadFromRow(GridBy.linkInRowWhereIs(place, selectOnColumn, selectOnValue));
} | String function(String place, String selectOnColumn, String selectOnValue) { return downloadFromRow(GridBy.linkInRowWhereIs(place, selectOnColumn, selectOnValue)); } | /**
* Downloads the target of a link in a grid, finding the row based on one of the other columns' value.
* @param place which link to download.
* @param selectOnColumn column header of cell whose value must be selectOnValue.
* @param selectOnValue value to be present in selectOnColumn to find correct row.
* @return downloaded file if any, null otherwise.
*/ | Downloads the target of a link in a grid, finding the row based on one of the other columns' value | downloadFromRowWhereIs | {
"repo_name": "GDasai/hsac-fitnesse-fixtures",
"path": "src/main/java/nl/hsac/fitnesse/fixture/slim/web/BrowserTest.java",
"license": "apache-2.0",
"size": 86267
} | [
"nl.hsac.fitnesse.fixture.util.selenium.by.GridBy"
] | import nl.hsac.fitnesse.fixture.util.selenium.by.GridBy; | import nl.hsac.fitnesse.fixture.util.selenium.by.*; | [
"nl.hsac.fitnesse"
] | nl.hsac.fitnesse; | 814,601 |
private static void executeDIServer() {
setServer(2);
System.out.print(CMDConstant.NEW_LINE_SINGLE);
System.out.print(CMDConstant.DI_SERVER);
System.out.print(CMDConstant.NEW_LINE_SINGLE);
System.out.print(CMDConstant.LIST_ONE);
System.out.print(CMDConstant.LIST_TWO);
System.out.print(CMDConstant.LIST_THREE);
System.out.print(CMDConstant.LIST_FOUR);
System.out.print(CMDConstant.LIST_FIVE);
System.out.print(CMDConstant.LIST_SIX);
System.out.print(CMDConstant.LIST_SEVEN);
System.out.print(CMDConstant.NEW_LINE_SINGLE);
System.out.print(CMDConstant.NEW_LINE_SINGLE);
System.out.print(CMDConstant.ENTER_OPTION + CMDConstant.SEMICOLON);
String selected[] = CommandLineService.processInput();
executeService(selected, CMDConstant.PENTAHO_DI);
} | static void function() { setServer(2); System.out.print(CMDConstant.NEW_LINE_SINGLE); System.out.print(CMDConstant.DI_SERVER); System.out.print(CMDConstant.NEW_LINE_SINGLE); System.out.print(CMDConstant.LIST_ONE); System.out.print(CMDConstant.LIST_TWO); System.out.print(CMDConstant.LIST_THREE); System.out.print(CMDConstant.LIST_FOUR); System.out.print(CMDConstant.LIST_FIVE); System.out.print(CMDConstant.LIST_SIX); System.out.print(CMDConstant.LIST_SEVEN); System.out.print(CMDConstant.NEW_LINE_SINGLE); System.out.print(CMDConstant.NEW_LINE_SINGLE); System.out.print(CMDConstant.ENTER_OPTION + CMDConstant.SEMICOLON); String selected[] = CommandLineService.processInput(); executeService(selected, CMDConstant.PENTAHO_DI); } | /**
* accepts input command line argument and executes DI-Service
*/ | accepts input command line argument and executes DI-Service | executeDIServer | {
"repo_name": "matthewtckr/support-utility",
"path": "CommandLineUtility/src/org/pentaho/support/cmd/CommandLineUtility.java",
"license": "apache-2.0",
"size": 15836
} | [
"org.pentaho.supportutil.cmd.constant.CMDConstant"
] | import org.pentaho.supportutil.cmd.constant.CMDConstant; | import org.pentaho.supportutil.cmd.constant.*; | [
"org.pentaho.supportutil"
] | org.pentaho.supportutil; | 990,162 |
protected boolean activityAlreadyContainsJobDeclarationEventType(List<EventSubscriptionJobDeclaration> jobDeclarationsForActivity,
EventSubscriptionJobDeclaration jobDeclaration){
for(EventSubscriptionJobDeclaration declaration: jobDeclarationsForActivity){
if(declaration.getEventType().equals(jobDeclaration.getEventType())){
return true;
}
}
return false;
} | boolean function(List<EventSubscriptionJobDeclaration> jobDeclarationsForActivity, EventSubscriptionJobDeclaration jobDeclaration){ for(EventSubscriptionJobDeclaration declaration: jobDeclarationsForActivity){ if(declaration.getEventType().equals(jobDeclaration.getEventType())){ return true; } } return false; } | /**
* Assumes that an activity has at most one declaration of a certain eventType.
*/ | Assumes that an activity has at most one declaration of a certain eventType | activityAlreadyContainsJobDeclarationEventType | {
"repo_name": "camunda/camunda-bpm-platform",
"path": "engine/src/main/java/org/camunda/bpm/engine/impl/bpmn/parser/BpmnParse.java",
"license": "apache-2.0",
"size": 230001
} | [
"java.util.List",
"org.camunda.bpm.engine.impl.jobexecutor.EventSubscriptionJobDeclaration"
] | import java.util.List; import org.camunda.bpm.engine.impl.jobexecutor.EventSubscriptionJobDeclaration; | import java.util.*; import org.camunda.bpm.engine.impl.jobexecutor.*; | [
"java.util",
"org.camunda.bpm"
] | java.util; org.camunda.bpm; | 1,501,407 |
public void verifyFileExists(Path path) throws IOException {
FileStatus status = fileSystem.getFileStatus(path);
if (!status.isFile()) {
throw new FileNotFoundException("Not a file: " + path.toString());
}
} | void function(Path path) throws IOException { FileStatus status = fileSystem.getFileStatus(path); if (!status.isFile()) { throw new FileNotFoundException(STR + path.toString()); } } | /**
* Verify that a path exists
* @param path path to check
* @throws FileNotFoundException file not found or is not a file
* @throws IOException trouble with FS
*/ | Verify that a path exists | verifyFileExists | {
"repo_name": "dennishuo/hadoop",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/main/java/org/apache/hadoop/yarn/service/utils/CoreFileSystem.java",
"license": "apache-2.0",
"size": 19228
} | [
"java.io.FileNotFoundException",
"java.io.IOException",
"org.apache.hadoop.fs.FileStatus",
"org.apache.hadoop.fs.Path"
] | import java.io.FileNotFoundException; import java.io.IOException; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.Path; | import java.io.*; import org.apache.hadoop.fs.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,452,887 |
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__CREATOR, CoreFactory.eINSTANCE.createSourceReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__CHANGE_INSTRUCTIONS, CoreFactory.eINSTANCE.createOpaqueData()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__CHANGE_INSTRUCTIONS, CoreFactory.eINSTANCE.createEntryDescription()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__CHANGE_INSTRUCTIONS, CoreFactory.eINSTANCE.createComment()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__CHANGE_INSTRUCTIONS, CoreFactory.eINSTANCE.createDefinition()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__CHANGE_INSTRUCTIONS, CoreFactory.eINSTANCE.createExample()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__CHANGE_INSTRUCTIONS, EntityFactory.eINSTANCE.createDesignation()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__CHANGE_INSTRUCTIONS,
ValueSetDefinitionFactory.eINSTANCE.createExternalValueSetDefinition()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER,
CoreFactory.eINSTANCE.createAbstractResourceDescriptionDirectoryEntry()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createEntityReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createAnonymousEntityReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createAnonymousStatement()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createNameAndMeaningReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createAssociationReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createBindingQualifierReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createCaseSignificanceReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createChangeDescription()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createChangeSetBase()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createCodeSystemCategoryReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createCodeSystemReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createCodeSystemVersionReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createOpaqueData()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createEntryDescription()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createComment()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createConceptDomainReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createContextReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createDefinition()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createDescriptionInCodeSystem()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createDesignationFidelityReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createDesignationTypeReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createMessage()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createEntityExpression()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createEntityReferenceList()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createURIAndEntityName()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createEntitySynopsis()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createExample()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createFilter()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createPropertyReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createFilterComponent()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createFormalityLevelReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createFormatReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createLanguageReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createMapCorrelationReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createMapReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createMapVersionReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createMatchAlgorithmReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createModelAttributeReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createNamedEntityReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createNamespaceReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createOntologyDomainReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER,
CoreFactory.eINSTANCE.createOntologyEngineeringMethodologyReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER,
CoreFactory.eINSTANCE.createOntologyEngineeringToolReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createOntologyLanguageAndSyntax()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createOntologyLanguageReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createOntologySyntaxReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createOntologyTaskReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createOntologyTypeReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createParameter()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createPredicateReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createProperty()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createReasoningAlgorithmReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER,
CoreFactory.eINSTANCE.createResourceVersionDescriptionDirectoryEntry()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createRESTResource()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createRoleReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createScopedEntityName()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createSortCriteria()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createSortCriterion()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createSourceAndNotation()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createSourceAndRoleReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createSourceReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createStatementTarget()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createStatusReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createTsAnyType()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createValueSetDefinitionReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createValueSetReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createVersionTagReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, AssociationFactory.eINSTANCE.createAssociation()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, AssociationFactory.eINSTANCE.createAssociationDirectory()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER,
AssociationFactory.eINSTANCE.createAssociationDirectoryEntry()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, AssociationFactory.eINSTANCE.createAssociationGraph()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, AssociationFactory.eINSTANCE.createAssociationList()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, AssociationFactory.eINSTANCE.createAssociationListEntry()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, AssociationFactory.eINSTANCE.createAssociationMsg()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, AssociationFactory.eINSTANCE.createAssociationRendering()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, AssociationFactory.eINSTANCE.createGraphNode()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CodeSystemFactory.eINSTANCE.createCodeSystemCatalogEntry()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER,
CodeSystemFactory.eINSTANCE.createCodeSystemCatalogEntryDirectory()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER,
CodeSystemFactory.eINSTANCE.createCodeSystemCatalogEntryList()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER,
CodeSystemFactory.eINSTANCE.createCodeSystemCatalogEntryListEntry()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CodeSystemFactory.eINSTANCE.createCodeSystemCatalogEntryMsg()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER,
CodeSystemFactory.eINSTANCE.createCodeSystemCatalogEntrySummary()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER,
CodeSystemVersionFactory.eINSTANCE.createCodeSystemVersionCatalogEntry()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER,
CodeSystemVersionFactory.eINSTANCE.createCodeSystemVersionCatalogEntryDirectory()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER,
CodeSystemVersionFactory.eINSTANCE.createCodeSystemVersionCatalogEntryList()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER,
CodeSystemVersionFactory.eINSTANCE.createCodeSystemVersionCatalogEntryListEntry()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER,
CodeSystemVersionFactory.eINSTANCE.createCodeSystemVersionCatalogEntryMsg()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER,
CodeSystemVersionFactory.eINSTANCE.createCodeSystemVersionCatalogEntrySummary()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, EntityFactory.eINSTANCE.createNamedEntityDescription()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, EntityFactory.eINSTANCE.createPredicateDescription()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, EntityFactory.eINSTANCE.createAnnotationPropertyDescription()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, EntityFactory.eINSTANCE.createAnonymousEntityDescription()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER,
EntityFactory.eINSTANCE.createAnonymousIndividualDescription()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, EntityFactory.eINSTANCE.createClassDescription()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, EntityFactory.eINSTANCE.createDataPropertyDescription()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, EntityFactory.eINSTANCE.createDataTypeDescription()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, EntityFactory.eINSTANCE.createDesignation()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, EntityFactory.eINSTANCE.createEntityDescription()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, EntityFactory.eINSTANCE.createEntityDescriptionMsg()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, EntityFactory.eINSTANCE.createEntityDirectory()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, EntityFactory.eINSTANCE.createEntityDirectoryEntry()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, EntityFactory.eINSTANCE.createEntityList()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, EntityFactory.eINSTANCE.createEntityListEntry()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, EntityFactory.eINSTANCE.createEntityReferenceMsg()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, EntityFactory.eINSTANCE.createNamedIndividualDescription()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, EntityFactory.eINSTANCE.createObjectPropertyDescription()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, StatementFactory.eINSTANCE.createStatement()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, StatementFactory.eINSTANCE.createStatementDirectory()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, StatementFactory.eINSTANCE.createStatementDirectoryEntry()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, StatementFactory.eINSTANCE.createStatementList()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, StatementFactory.eINSTANCE.createStatementListEntry()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, StatementFactory.eINSTANCE.createStatementMsg()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, StatementFactory.eINSTANCE.createStatementQualifier()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, StatementFactory.eINSTANCE.createStatementSubject()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, ValueSetFactory.eINSTANCE.createValueSetCatalogEntry()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER,
ValueSetFactory.eINSTANCE.createValueSetCatalogEntryDirectory()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, ValueSetFactory.eINSTANCE.createValueSetCatalogEntryList()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER,
ValueSetFactory.eINSTANCE.createValueSetCatalogEntryListEntry()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, ValueSetFactory.eINSTANCE.createValueSetCatalogEntryMsg()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, ValueSetFactory.eINSTANCE.createValueSetCatalogEntrySummary()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER,
ValueSetDefinitionFactory.eINSTANCE.createAssociatedEntitiesReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER,
ValueSetDefinitionFactory.eINSTANCE.createCompleteCodeSystemReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER,
ValueSetDefinitionFactory.eINSTANCE.createCompleteValueSetReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER,
ValueSetDefinitionFactory.eINSTANCE.createExternalValueSetDefinition()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER,
ValueSetDefinitionFactory.eINSTANCE.createIteratableResolvedValueSet()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER,
ValueSetDefinitionFactory.eINSTANCE.createPropertyQueryReference()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, ValueSetDefinitionFactory.eINSTANCE.createResolvedValueSet()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER,
ValueSetDefinitionFactory.eINSTANCE.createResolvedValueSetDirectory()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER,
ValueSetDefinitionFactory.eINSTANCE.createResolvedValueSetSummary()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER,
ValueSetDefinitionFactory.eINSTANCE.createResolvedValueSetDirectoryEntry()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER,
ValueSetDefinitionFactory.eINSTANCE.createResolvedValueSetHeader()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER,
ValueSetDefinitionFactory.eINSTANCE.createResolvedValueSetMsg()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER,
ValueSetDefinitionFactory.eINSTANCE.createSpecificEntityList()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER,
ValueSetDefinitionFactory.eINSTANCE.createValueSetDefinition()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER,
ValueSetDefinitionFactory.eINSTANCE.createValueSetDefinitionDirectory()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER,
ValueSetDefinitionFactory.eINSTANCE.createValueSetDefinitionDirectoryEntry()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER,
ValueSetDefinitionFactory.eINSTANCE.createValueSetDefinitionEntry()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER,
ValueSetDefinitionFactory.eINSTANCE.createValueSetDefinitionList()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER,
ValueSetDefinitionFactory.eINSTANCE.createValueSetDefinitionListEntry()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER,
ValueSetDefinitionFactory.eINSTANCE.createValueSetDefinitionMsg()));
newChildDescriptors.add(createChildParameter(
CorePackage.Literals.CHANGE_SET_BASE__MEMBER, XMLTypeFactory.eINSTANCE.createAnyType()));
} | void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__CREATOR, CoreFactory.eINSTANCE.createSourceReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__CHANGE_INSTRUCTIONS, CoreFactory.eINSTANCE.createOpaqueData())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__CHANGE_INSTRUCTIONS, CoreFactory.eINSTANCE.createEntryDescription())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__CHANGE_INSTRUCTIONS, CoreFactory.eINSTANCE.createComment())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__CHANGE_INSTRUCTIONS, CoreFactory.eINSTANCE.createDefinition())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__CHANGE_INSTRUCTIONS, CoreFactory.eINSTANCE.createExample())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__CHANGE_INSTRUCTIONS, EntityFactory.eINSTANCE.createDesignation())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__CHANGE_INSTRUCTIONS, ValueSetDefinitionFactory.eINSTANCE.createExternalValueSetDefinition())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createAbstractResourceDescriptionDirectoryEntry())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createEntityReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createAnonymousEntityReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createAnonymousStatement())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createNameAndMeaningReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createAssociationReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createBindingQualifierReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createCaseSignificanceReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createChangeDescription())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createChangeSetBase())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createCodeSystemCategoryReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createCodeSystemReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createCodeSystemVersionReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createOpaqueData())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createEntryDescription())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createComment())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createConceptDomainReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createContextReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createDefinition())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createDescriptionInCodeSystem())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createDesignationFidelityReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createDesignationTypeReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createMessage())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createEntityExpression())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createEntityReferenceList())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createURIAndEntityName())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createEntitySynopsis())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createExample())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createFilter())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createPropertyReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createFilterComponent())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createFormalityLevelReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createFormatReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createLanguageReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createMapCorrelationReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createMapReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createMapVersionReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createMatchAlgorithmReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createModelAttributeReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createNamedEntityReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createNamespaceReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createOntologyDomainReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createOntologyEngineeringMethodologyReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createOntologyEngineeringToolReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createOntologyLanguageAndSyntax())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createOntologyLanguageReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createOntologySyntaxReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createOntologyTaskReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createOntologyTypeReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createParameter())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createPredicateReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createProperty())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createReasoningAlgorithmReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createResourceVersionDescriptionDirectoryEntry())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createRESTResource())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createRoleReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createScopedEntityName())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createSortCriteria())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createSortCriterion())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createSourceAndNotation())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createSourceAndRoleReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createSourceReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createStatementTarget())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createStatusReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createTsAnyType())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createValueSetDefinitionReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createValueSetReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CoreFactory.eINSTANCE.createVersionTagReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, AssociationFactory.eINSTANCE.createAssociation())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, AssociationFactory.eINSTANCE.createAssociationDirectory())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, AssociationFactory.eINSTANCE.createAssociationDirectoryEntry())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, AssociationFactory.eINSTANCE.createAssociationGraph())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, AssociationFactory.eINSTANCE.createAssociationList())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, AssociationFactory.eINSTANCE.createAssociationListEntry())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, AssociationFactory.eINSTANCE.createAssociationMsg())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, AssociationFactory.eINSTANCE.createAssociationRendering())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, AssociationFactory.eINSTANCE.createGraphNode())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CodeSystemFactory.eINSTANCE.createCodeSystemCatalogEntry())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CodeSystemFactory.eINSTANCE.createCodeSystemCatalogEntryDirectory())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CodeSystemFactory.eINSTANCE.createCodeSystemCatalogEntryList())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CodeSystemFactory.eINSTANCE.createCodeSystemCatalogEntryListEntry())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CodeSystemFactory.eINSTANCE.createCodeSystemCatalogEntryMsg())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CodeSystemFactory.eINSTANCE.createCodeSystemCatalogEntrySummary())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CodeSystemVersionFactory.eINSTANCE.createCodeSystemVersionCatalogEntry())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CodeSystemVersionFactory.eINSTANCE.createCodeSystemVersionCatalogEntryDirectory())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CodeSystemVersionFactory.eINSTANCE.createCodeSystemVersionCatalogEntryList())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CodeSystemVersionFactory.eINSTANCE.createCodeSystemVersionCatalogEntryListEntry())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CodeSystemVersionFactory.eINSTANCE.createCodeSystemVersionCatalogEntryMsg())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, CodeSystemVersionFactory.eINSTANCE.createCodeSystemVersionCatalogEntrySummary())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, EntityFactory.eINSTANCE.createNamedEntityDescription())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, EntityFactory.eINSTANCE.createPredicateDescription())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, EntityFactory.eINSTANCE.createAnnotationPropertyDescription())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, EntityFactory.eINSTANCE.createAnonymousEntityDescription())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, EntityFactory.eINSTANCE.createAnonymousIndividualDescription())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, EntityFactory.eINSTANCE.createClassDescription())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, EntityFactory.eINSTANCE.createDataPropertyDescription())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, EntityFactory.eINSTANCE.createDataTypeDescription())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, EntityFactory.eINSTANCE.createDesignation())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, EntityFactory.eINSTANCE.createEntityDescription())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, EntityFactory.eINSTANCE.createEntityDescriptionMsg())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, EntityFactory.eINSTANCE.createEntityDirectory())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, EntityFactory.eINSTANCE.createEntityDirectoryEntry())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, EntityFactory.eINSTANCE.createEntityList())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, EntityFactory.eINSTANCE.createEntityListEntry())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, EntityFactory.eINSTANCE.createEntityReferenceMsg())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, EntityFactory.eINSTANCE.createNamedIndividualDescription())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, EntityFactory.eINSTANCE.createObjectPropertyDescription())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, StatementFactory.eINSTANCE.createStatement())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, StatementFactory.eINSTANCE.createStatementDirectory())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, StatementFactory.eINSTANCE.createStatementDirectoryEntry())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, StatementFactory.eINSTANCE.createStatementList())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, StatementFactory.eINSTANCE.createStatementListEntry())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, StatementFactory.eINSTANCE.createStatementMsg())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, StatementFactory.eINSTANCE.createStatementQualifier())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, StatementFactory.eINSTANCE.createStatementSubject())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, ValueSetFactory.eINSTANCE.createValueSetCatalogEntry())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, ValueSetFactory.eINSTANCE.createValueSetCatalogEntryDirectory())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, ValueSetFactory.eINSTANCE.createValueSetCatalogEntryList())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, ValueSetFactory.eINSTANCE.createValueSetCatalogEntryListEntry())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, ValueSetFactory.eINSTANCE.createValueSetCatalogEntryMsg())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, ValueSetFactory.eINSTANCE.createValueSetCatalogEntrySummary())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, ValueSetDefinitionFactory.eINSTANCE.createAssociatedEntitiesReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, ValueSetDefinitionFactory.eINSTANCE.createCompleteCodeSystemReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, ValueSetDefinitionFactory.eINSTANCE.createCompleteValueSetReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, ValueSetDefinitionFactory.eINSTANCE.createExternalValueSetDefinition())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, ValueSetDefinitionFactory.eINSTANCE.createIteratableResolvedValueSet())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, ValueSetDefinitionFactory.eINSTANCE.createPropertyQueryReference())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, ValueSetDefinitionFactory.eINSTANCE.createResolvedValueSet())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, ValueSetDefinitionFactory.eINSTANCE.createResolvedValueSetDirectory())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, ValueSetDefinitionFactory.eINSTANCE.createResolvedValueSetSummary())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, ValueSetDefinitionFactory.eINSTANCE.createResolvedValueSetDirectoryEntry())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, ValueSetDefinitionFactory.eINSTANCE.createResolvedValueSetHeader())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, ValueSetDefinitionFactory.eINSTANCE.createResolvedValueSetMsg())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, ValueSetDefinitionFactory.eINSTANCE.createSpecificEntityList())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, ValueSetDefinitionFactory.eINSTANCE.createValueSetDefinition())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, ValueSetDefinitionFactory.eINSTANCE.createValueSetDefinitionDirectory())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, ValueSetDefinitionFactory.eINSTANCE.createValueSetDefinitionDirectoryEntry())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, ValueSetDefinitionFactory.eINSTANCE.createValueSetDefinitionEntry())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, ValueSetDefinitionFactory.eINSTANCE.createValueSetDefinitionList())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, ValueSetDefinitionFactory.eINSTANCE.createValueSetDefinitionListEntry())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, ValueSetDefinitionFactory.eINSTANCE.createValueSetDefinitionMsg())); newChildDescriptors.add(createChildParameter( CorePackage.Literals.CHANGE_SET_BASE__MEMBER, XMLTypeFactory.eINSTANCE.createAnyType())); } | /**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/ | This adds <code>org.eclipse.emf.edit.command.CommandParameter</code>s describing the children that can be created under this object. | collectNewChildDescriptors | {
"repo_name": "drbgfc/mdht",
"path": "cts2/plugins/org.openhealthtools.mdht.cts2.core.edit/src/org/openhealthtools/mdht/cts2/core/provider/ChangeSetBaseItemProvider.java",
"license": "epl-1.0",
"size": 34795
} | [
"java.util.Collection",
"org.eclipse.emf.ecore.xml.type.XMLTypeFactory",
"org.openhealthtools.mdht.cts2.association.AssociationFactory",
"org.openhealthtools.mdht.cts2.codesystem.CodeSystemFactory",
"org.openhealthtools.mdht.cts2.codesystemversion.CodeSystemVersionFactory",
"org.openhealthtools.mdht.cts2.... | import java.util.Collection; import org.eclipse.emf.ecore.xml.type.XMLTypeFactory; import org.openhealthtools.mdht.cts2.association.AssociationFactory; import org.openhealthtools.mdht.cts2.codesystem.CodeSystemFactory; import org.openhealthtools.mdht.cts2.codesystemversion.CodeSystemVersionFactory; import org.openhealthtools.mdht.cts2.core.CoreFactory; import org.openhealthtools.mdht.cts2.core.CorePackage; import org.openhealthtools.mdht.cts2.entity.EntityFactory; import org.openhealthtools.mdht.cts2.statement.StatementFactory; import org.openhealthtools.mdht.cts2.valueset.ValueSetFactory; import org.openhealthtools.mdht.cts2.valuesetdefinition.ValueSetDefinitionFactory; | import java.util.*; import org.eclipse.emf.ecore.xml.type.*; import org.openhealthtools.mdht.cts2.association.*; import org.openhealthtools.mdht.cts2.codesystem.*; import org.openhealthtools.mdht.cts2.codesystemversion.*; import org.openhealthtools.mdht.cts2.core.*; import org.openhealthtools.mdht.cts2.entity.*; import org.openhealthtools.mdht.cts2.statement.*; import org.openhealthtools.mdht.cts2.valueset.*; import org.openhealthtools.mdht.cts2.valuesetdefinition.*; | [
"java.util",
"org.eclipse.emf",
"org.openhealthtools.mdht"
] | java.util; org.eclipse.emf; org.openhealthtools.mdht; | 2,782,124 |
public static AbstractHttpEntity getCompressedEntity(byte data[], ContentResolver resolver)
throws IOException {
AbstractHttpEntity entity;
if (data.length < getMinGzipSize(resolver)) {
entity = new ByteArrayEntity(data);
} else {
ByteArrayOutputStream arr = new ByteArrayOutputStream();
OutputStream zipper = new GZIPOutputStream(arr);
zipper.write(data);
zipper.close();
entity = new ByteArrayEntity(arr.toByteArray());
entity.setContentEncoding("gzip");
}
return entity;
} | static AbstractHttpEntity function(byte data[], ContentResolver resolver) throws IOException { AbstractHttpEntity entity; if (data.length < getMinGzipSize(resolver)) { entity = new ByteArrayEntity(data); } else { ByteArrayOutputStream arr = new ByteArrayOutputStream(); OutputStream zipper = new GZIPOutputStream(arr); zipper.write(data); zipper.close(); entity = new ByteArrayEntity(arr.toByteArray()); entity.setContentEncoding("gzip"); } return entity; } | /**
* Compress data to send to server.
* Creates a Http Entity holding the gzipped data.
* The data will not be compressed if it is too short.
* @param data The bytes to compress
* @return Entity holding the data
*/ | Compress data to send to server. Creates a Http Entity holding the gzipped data. The data will not be compressed if it is too short | getCompressedEntity | {
"repo_name": "mateor/PDroidHistory",
"path": "frameworks/base/core/java/android/net/http/AndroidHttpClient.java",
"license": "gpl-3.0",
"size": 17963
} | [
"android.content.ContentResolver",
"java.io.ByteArrayOutputStream",
"java.io.IOException",
"java.io.OutputStream",
"java.util.zip.GZIPOutputStream",
"org.apache.http.entity.AbstractHttpEntity",
"org.apache.http.entity.ByteArrayEntity"
] | import android.content.ContentResolver; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.OutputStream; import java.util.zip.GZIPOutputStream; import org.apache.http.entity.AbstractHttpEntity; import org.apache.http.entity.ByteArrayEntity; | import android.content.*; import java.io.*; import java.util.zip.*; import org.apache.http.entity.*; | [
"android.content",
"java.io",
"java.util",
"org.apache.http"
] | android.content; java.io; java.util; org.apache.http; | 1,932,596 |
public boolean attemptFallbackProtocol() {
vds.setProtocol(VdsProtocol.XML);
ResourceManager.getInstance().AddVds(vds, false);
return attemptConnection();
} | boolean function() { vds.setProtocol(VdsProtocol.XML); ResourceManager.getInstance().AddVds(vds, false); return attemptConnection(); } | /**
* Fall back the protocol and attempts the connection {@link ProtocolDetector#attemptConnection()}.
*
* @return <code>true</code> if connected or <code>false</code> if connection failed.
*/ | Fall back the protocol and attempts the connection <code>ProtocolDetector#attemptConnection()</code> | attemptFallbackProtocol | {
"repo_name": "jtux270/translate",
"path": "ovirt/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/transport/ProtocolDetector.java",
"license": "gpl-3.0",
"size": 3963
} | [
"org.ovirt.engine.core.common.businessentities.VdsProtocol",
"org.ovirt.engine.core.vdsbroker.ResourceManager"
] | import org.ovirt.engine.core.common.businessentities.VdsProtocol; import org.ovirt.engine.core.vdsbroker.ResourceManager; | import org.ovirt.engine.core.common.businessentities.*; import org.ovirt.engine.core.vdsbroker.*; | [
"org.ovirt.engine"
] | org.ovirt.engine; | 1,285,445 |
public TokenizerFactory<? extends HasWord> getTokenizerFactory(); | TokenizerFactory<? extends HasWord> function(); | /**
* Return a tokenizer factory which might be suitable for tokenizing text
* that will be used with this Treebank/Language pair. This is for
* real text of this language pair, not for reading stuff inside the
* treebank files.
*
* @return A tokenizer
*/ | Return a tokenizer factory which might be suitable for tokenizing text that will be used with this Treebank/Language pair. This is for real text of this language pair, not for reading stuff inside the treebank files | getTokenizerFactory | {
"repo_name": "sanjithuom/Stanford-corenlp",
"path": "src/edu/stanford/nlp/trees/TreebankLanguagePack.java",
"license": "gpl-2.0",
"size": 13567
} | [
"edu.stanford.nlp.ling.HasWord",
"edu.stanford.nlp.process.TokenizerFactory"
] | import edu.stanford.nlp.ling.HasWord; import edu.stanford.nlp.process.TokenizerFactory; | import edu.stanford.nlp.ling.*; import edu.stanford.nlp.process.*; | [
"edu.stanford.nlp"
] | edu.stanford.nlp; | 1,720,821 |
public boolean autoReject(String number, int type) {
Cursor cursor = mContext.getContentResolver().query(Uri.parse(BLACK_LIST_URI),
BLACK_LIST_PROJECTION, null, null, Telephony.Carriers.DEFAULT_SORT_ORDER);
if (cursor == null) {
if (DBG) {
log("cursor is null...");
}
return false;
}
String blockNumber;
int blockType;
boolean result = false;
cursor.moveToFirst();
while (!cursor.isAfterLast()) {
blockNumber = cursor.getString(0);
if (PhoneNumberUtils.compare(number,blockNumber)) {
// get it
blockType = Integer.parseInt(cursor.getString(1));
if (DBG) {
log("blockType = " + blockType);
}
if (blockType == BLOCK_VOICE_AND_VIDEO_CALL) {
result = true;
break;
}
if (type == VOICE_CALL_REJECT_MODE && blockType == BLOCK_VOICE_CALL) {
result = true;
break;
}
if (type == VIDEO_CALL_REJECT_MODE && blockType == BLOCK_VIDEO_CALL) {
result = true;
break;
}
}
cursor.moveToNext();
}
cursor.close();
return result;
} | boolean function(String number, int type) { Cursor cursor = mContext.getContentResolver().query(Uri.parse(BLACK_LIST_URI), BLACK_LIST_PROJECTION, null, null, Telephony.Carriers.DEFAULT_SORT_ORDER); if (cursor == null) { if (DBG) { log(STR); } return false; } String blockNumber; int blockType; boolean result = false; cursor.moveToFirst(); while (!cursor.isAfterLast()) { blockNumber = cursor.getString(0); if (PhoneNumberUtils.compare(number,blockNumber)) { blockType = Integer.parseInt(cursor.getString(1)); if (DBG) { log(STR + blockType); } if (blockType == BLOCK_VOICE_AND_VIDEO_CALL) { result = true; break; } if (type == VOICE_CALL_REJECT_MODE && blockType == BLOCK_VOICE_CALL) { result = true; break; } if (type == VIDEO_CALL_REJECT_MODE && blockType == BLOCK_VIDEO_CALL) { result = true; break; } } cursor.moveToNext(); } cursor.close(); return result; } | /**
* check if the call should be rejected
* @param number the incoming call number
* @param type reject type
* @return the result that the current number should be auto reject
*/ | check if the call should be rejected | autoReject | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "packages/apps/Phone/src/com/mediatek/phone/BlackListManager.java",
"license": "gpl-2.0",
"size": 4458
} | [
"android.database.Cursor",
"android.net.Uri",
"android.provider.Telephony",
"android.telephony.PhoneNumberUtils"
] | import android.database.Cursor; import android.net.Uri; import android.provider.Telephony; import android.telephony.PhoneNumberUtils; | import android.database.*; import android.net.*; import android.provider.*; import android.telephony.*; | [
"android.database",
"android.net",
"android.provider",
"android.telephony"
] | android.database; android.net; android.provider; android.telephony; | 1,191,062 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<SqlRoleAssignmentGetResultsInner> createUpdateSqlRoleAssignmentAsync(
String roleAssignmentId,
String resourceGroupName,
String accountName,
SqlRoleAssignmentCreateUpdateParameters createUpdateSqlRoleAssignmentParameters,
Context context) {
return beginCreateUpdateSqlRoleAssignmentAsync(
roleAssignmentId, resourceGroupName, accountName, createUpdateSqlRoleAssignmentParameters, context)
.last()
.flatMap(this.client::getLroFinalResultOrError);
} | @ServiceMethod(returns = ReturnType.SINGLE) Mono<SqlRoleAssignmentGetResultsInner> function( String roleAssignmentId, String resourceGroupName, String accountName, SqlRoleAssignmentCreateUpdateParameters createUpdateSqlRoleAssignmentParameters, Context context) { return beginCreateUpdateSqlRoleAssignmentAsync( roleAssignmentId, resourceGroupName, accountName, createUpdateSqlRoleAssignmentParameters, context) .last() .flatMap(this.client::getLroFinalResultOrError); } | /**
* Creates or updates an Azure Cosmos DB SQL Role Assignment.
*
* @param roleAssignmentId The GUID for the Role Assignment.
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName Cosmos DB database account name.
* @param createUpdateSqlRoleAssignmentParameters The properties required to create or update a Role Assignment.
* @param context The context to associate with this 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 an Azure Cosmos DB Role Assignment.
*/ | Creates or updates an Azure Cosmos DB SQL Role Assignment | createUpdateSqlRoleAssignmentAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/implementation/SqlResourcesClientImpl.java",
"license": "mit",
"size": 547809
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.util.Context",
"com.azure.resourcemanager.cosmos.fluent.models.SqlRoleAssignmentGetResultsInner",
"com.azure.resourcemanager.cosmos.models.SqlRoleAssignmentCreateUpdateParameters"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.util.Context; import com.azure.resourcemanager.cosmos.fluent.models.SqlRoleAssignmentGetResultsInner; import com.azure.resourcemanager.cosmos.models.SqlRoleAssignmentCreateUpdateParameters; | import com.azure.core.annotation.*; import com.azure.core.util.*; import com.azure.resourcemanager.cosmos.fluent.models.*; import com.azure.resourcemanager.cosmos.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,839,654 |
@JsonProperty("common_prod_id")
public Long getCommonProdId() {
return commonProdId;
} | @JsonProperty(STR) Long function() { return commonProdId; } | /**
* Get commonProdId
*
* @return commonProdId
**/ | Get commonProdId | getCommonProdId | {
"repo_name": "scott-seo/dvdstore-api",
"path": "src/main/java/com/scottwseo/dvdstore/api/ProductCreate.java",
"license": "mit",
"size": 4868
} | [
"com.fasterxml.jackson.annotation.JsonProperty"
] | import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.*; | [
"com.fasterxml.jackson"
] | com.fasterxml.jackson; | 2,184,590 |
void onStopTrackingTouch(SeekArc seekArc);
}
public SeekArc(Context context) {
super(context);
init(context, null, 0);
}
public SeekArc(Context context, AttributeSet attrs) {
super(context, attrs);
init(context, attrs, 0);
}
public SeekArc(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
init(context, attrs, defStyle);
} | void onStopTrackingTouch(SeekArc seekArc); } public SeekArc(Context context) { super(context); init(context, null, 0); } public SeekArc(Context context, AttributeSet attrs) { super(context, attrs); init(context, attrs, 0); } public SeekArc(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); init(context, attrs, defStyle); } | /**
* Notification that the user has finished a touch gesture. Clients may
* want to use this to re-enable advancing the seekarc.
*
* @param seekArc
* The SeekArc in which the touch gesture began
*/ | Notification that the user has finished a touch gesture. Clients may want to use this to re-enable advancing the seekarc | onStopTrackingTouch | {
"repo_name": "pzhangleo/android-base",
"path": "base/src/main/java/com/zhp/base/ui/widget/seekbar/SeekArc.java",
"license": "lgpl-3.0",
"size": 18293
} | [
"android.content.Context",
"android.util.AttributeSet"
] | import android.content.Context; import android.util.AttributeSet; | import android.content.*; import android.util.*; | [
"android.content",
"android.util"
] | android.content; android.util; | 1,583,227 |
CompletableFuture<Void> startUpdateConfiguration(final ReaderGroupConfig configuration, OperationContext context); | CompletableFuture<Void> startUpdateConfiguration(final ReaderGroupConfig configuration, OperationContext context); | /**
* Starts updating the configuration of an existing stream.
*
* @param configuration new stream configuration.
* @return future of new StreamConfigWithVersion.
*/ | Starts updating the configuration of an existing stream | startUpdateConfiguration | {
"repo_name": "pravega/pravega",
"path": "controller/src/main/java/io/pravega/controller/store/stream/ReaderGroup.java",
"license": "apache-2.0",
"size": 3698
} | [
"io.pravega.client.stream.ReaderGroupConfig",
"java.util.concurrent.CompletableFuture"
] | import io.pravega.client.stream.ReaderGroupConfig; import java.util.concurrent.CompletableFuture; | import io.pravega.client.stream.*; import java.util.concurrent.*; | [
"io.pravega.client",
"java.util"
] | io.pravega.client; java.util; | 173,938 |
void enterColumnNameOrder(@NotNull CQLParser.ColumnNameOrderContext ctx);
void exitColumnNameOrder(@NotNull CQLParser.ColumnNameOrderContext ctx); | void enterColumnNameOrder(@NotNull CQLParser.ColumnNameOrderContext ctx); void exitColumnNameOrder(@NotNull CQLParser.ColumnNameOrderContext ctx); | /**
* Exit a parse tree produced by {@link CQLParser#columnNameOrder}.
*/ | Exit a parse tree produced by <code>CQLParser#columnNameOrder</code> | exitColumnNameOrder | {
"repo_name": "HuaweiBigData/StreamCQL",
"path": "cql/src/main/java/com/huawei/streaming/cql/semanticanalyzer/parser/CQLParserListener.java",
"license": "apache-2.0",
"size": 58667
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 2,798,730 |
void addInterceptStrategy(InterceptStrategy interceptStrategy); | void addInterceptStrategy(InterceptStrategy interceptStrategy); | /**
* Adds the given interceptor strategy
*
* @param interceptStrategy the strategy
*/ | Adds the given interceptor strategy | addInterceptStrategy | {
"repo_name": "gnodet/camel",
"path": "core/camel-api/src/main/java/org/apache/camel/ExtendedCamelContext.java",
"license": "apache-2.0",
"size": 24074
} | [
"org.apache.camel.spi.InterceptStrategy"
] | import org.apache.camel.spi.InterceptStrategy; | import org.apache.camel.spi.*; | [
"org.apache.camel"
] | org.apache.camel; | 877,057 |
@Idempotent
SnapshotDiffReport getSnapshotDiffReport(String snapshotRoot,
String fromSnapshot, String toSnapshot) throws IOException; | SnapshotDiffReport getSnapshotDiffReport(String snapshotRoot, String fromSnapshot, String toSnapshot) throws IOException; | /**
* Get the difference between two snapshots, or between a snapshot and the
* current tree of a directory.
*
* @param snapshotRoot
* full path of the directory where snapshots are taken
* @param fromSnapshot
* snapshot name of the from point. Null indicates the current
* tree
* @param toSnapshot
* snapshot name of the to point. Null indicates the current
* tree.
* @return The difference report represented as a {@link SnapshotDiffReport}.
* @throws IOException on error
*/ | Get the difference between two snapshots, or between a snapshot and the current tree of a directory | getSnapshotDiffReport | {
"repo_name": "legend-hua/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java",
"license": "apache-2.0",
"size": 61815
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,345,739 |
public void convertFO2PDF(URL fo, File pdf)
throws IOException, FOPException, TransformerException {
OutputStream out = null;
try {
//Create the user agent for this processing run
FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
//Adding a simple logging listener that writes to stdout and stderr
foUserAgent.getEventBroadcaster().addEventListener(new SysOutEventListener());
// Add your own event listener
foUserAgent.getEventBroadcaster().addEventListener(new MyEventListener());
// configure foUserAgent further as desired
// Setup output stream. Note: Using BufferedOutputStream
// for performance reasons (helpful with FileOutputStreams).
out = new FileOutputStream(pdf);
out = new BufferedOutputStream(out);
// Construct fop with desired output format
Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent, out);
// Setup JAXP using identity transformer
TransformerFactory factory = TransformerFactory.newInstance();
Transformer transformer = factory.newTransformer(); // identity transformer
// Setup input stream
Source src = new StreamSource(fo.toExternalForm());
// Resulting SAX events (the generated FO) must be piped through to FOP
Result res = new SAXResult(fop.getDefaultHandler());
// Start XSLT transformation and FOP processing
transformer.transform(src, res);
} finally {
IOUtils.closeQuietly(out);
}
}
private static class MyEventListener implements EventListener { | void function(URL fo, File pdf) throws IOException, FOPException, TransformerException { OutputStream out = null; try { FOUserAgent foUserAgent = fopFactory.newFOUserAgent(); foUserAgent.getEventBroadcaster().addEventListener(new SysOutEventListener()); foUserAgent.getEventBroadcaster().addEventListener(new MyEventListener()); out = new FileOutputStream(pdf); out = new BufferedOutputStream(out); Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent, out); TransformerFactory factory = TransformerFactory.newInstance(); Transformer transformer = factory.newTransformer(); Source src = new StreamSource(fo.toExternalForm()); Result res = new SAXResult(fop.getDefaultHandler()); transformer.transform(src, res); } finally { IOUtils.closeQuietly(out); } } private static class MyEventListener implements EventListener { | /**
* Converts an FO file to a PDF file using FOP
* @param fo the FO file
* @param pdf the target PDF file
* @throws IOException In case of an I/O problem
* @throws FOPException In case of a FOP problem
* @throws TransformerException In case of a problem with XSLT
*/ | Converts an FO file to a PDF file using FOP | convertFO2PDF | {
"repo_name": "jbampton/eclipse-cheatsheets-to-dita-to-pdf",
"path": "src/libs/fop-2.1/examples/embedding/java/embedding/events/ExampleEvents.java",
"license": "gpl-3.0",
"size": 8590
} | [
"java.io.BufferedOutputStream",
"java.io.File",
"java.io.FileOutputStream",
"java.io.IOException",
"java.io.OutputStream",
"javax.xml.transform.Result",
"javax.xml.transform.Source",
"javax.xml.transform.Transformer",
"javax.xml.transform.TransformerException",
"javax.xml.transform.TransformerFact... | import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import javax.xml.transform.Result; import javax.xml.transform.Source; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory; import javax.xml.transform.sax.SAXResult; import javax.xml.transform.stream.StreamSource; import org.apache.commons.io.IOUtils; import org.apache.fop.apps.FOPException; import org.apache.fop.apps.FOUserAgent; import org.apache.fop.apps.Fop; import org.apache.fop.apps.MimeConstants; import org.apache.fop.events.EventListener; | import java.io.*; import javax.xml.transform.*; import javax.xml.transform.sax.*; import javax.xml.transform.stream.*; import org.apache.commons.io.*; import org.apache.fop.apps.*; import org.apache.fop.events.*; | [
"java.io",
"javax.xml",
"org.apache.commons",
"org.apache.fop"
] | java.io; javax.xml; org.apache.commons; org.apache.fop; | 328,325 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.